Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make * only search current word? #897

Open
mocheng opened this issue Mar 8, 2016 · 7 comments
Open

How to make * only search current word? #897

mocheng opened this issue Mar 8, 2016 · 7 comments

Comments

@mocheng
Copy link

mocheng commented Mar 8, 2016

After deploying spf13, I find that it doesn't search current word when typing *.

For example, if cursor is at the first foo, * will not search foo but this.foo.

   this.foo() // cursor stay at foo

   function foo() {
   }

This is really annoying. Since it is preferable to search current exact word.

@davidhan527
Copy link

I also experienced something similar with commands like viw (select inside word) will not select just the word you want to select but what is considered W which is the entire word including . in between the words. viw will select.all.these.words instead of just the one word you want to select. I tried looking all over the config files and couldn't find where this setting takes place. Anyone figure this out?

@davidhan527
Copy link

I think i found the answer @mocheng . You can remove these lines and it should fix the issue.

    set iskeyword-=.                    " '.' is an end of word designator
    set iskeyword-=#                    " '#' is an end of word designator
    set iskeyword-=-                    " '-' is an end of word designator

You might need to also clear your vim views in order for the setting to take effect and you can do that by running rm ~/.vimviews/*

@davidhan527
Copy link

Actually I'm still having the same issue. Anyone figure this out?

@davidhan527
Copy link

@spf13 Any ideas? Sorry to bother but I've been trying to figure this out for a long time now with no luck. Would greatly appreciate your feedback!

@zires
Copy link

zires commented Jun 22, 2016

UnBundle 'gorodinskiy/vim-coloresque'

and then running :PluginClean

check this: #547

@davidhan527
Copy link

@zires that seems to have worked. Thanks for the help!

@HouCoder
Copy link

@zires Problem solved 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants