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

Already on GitHub? Sign in to your account

Use invhlsearch instead of nohlsearch #256

Merged
merged 1 commit into from Jan 1, 2013
Commits on Dec 22, 2012
  1. Use invhlsearch instead of nohlsearch

    johntyree committed Dec 22, 2012
    This command toggles the highlight state, allowing the user to turn it off and
    on as desired without it automatically turning back on.
    
    I found it very annoying that some random command would set the search pattern
    to something common like `\s\+` and suddenly my entire Vim session would be
    highlighted. `<leader>/` turned if off but any kind of search related motion (or
    running the command again, for example) would turn it back on again.
    
    If the user turns off search highlighting, they probably don't want it to
    immediately turn back on. If they do, it's as easy as `<leader>/` again.