tags:

views:

52

answers:

1

Hi,

Handy shortcut "*" - which reads the "string" under the cursor and goes to the next place it appears.

can some one clarify what comprises a valid "string" in vim. I am facing a problem that when i use "*" with cursor on word "function" on the following line
function(val) {}

it selects the text "function(val)" and searches for that but i am interested only in search for "function" alone. It considering parentheses also as a valid character in a string.

I see this behavior randomly and want to understand what comprises a valid "string" in vim and is it configurable like "isfname" option which specifies the list of characters that can appear in a file name.

Thanks in advance,
Naga Kiran

+4  A: 

Hi,
the setting involved is iskeyword, which follows the same syntax as isfname. On my gvim on Windows XP it is set to

  iskeyword=@,48-57,_,192-255

and I don't observe the behavior that you describe. See :help iskeyword and :help isfname for further information.

jhwist