marijnh/CodeMirror — pull request #1067 by mightyguava (2012-12-08 19:31:11+00:00)
Title: [vim keymap] Improvements to * and #.

Searches using `*` and `#` will fall back to non-blank characters if no keyword is found. Now fully follows the Vim spec:

```
*star* *E348* *E349*
*	Search forward for the [count]'th occurrence of the
word nearest to the cursor. The word used for the
search is the first of:
1. the keyword under the cursor |'iskeyword'|
2. the first keyword after the cursor, in the
current line
3. the non-blank word under the cursor
4. the first non-blank word after the cursor,
in the current line
Only whole keywords are searched for, like with the
command "/\". |exclusive| {not in Vi}
'ignorecase' is used, 'smartcase' is not.

*#*
#	Same as "*", but search backward. The pound sign
(character 163) also works. If the "#" key works as
backspace, try using "stty erase " before starting
Vim ( is CTRL-H or a real backspace). {not in Vi}
```