Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Highlighter()
- let word_cursor = expand('<cword>')
- redir => output
- try
- silent execute '%s/\<'.word_cursor.'\>//gn'
- catch /^Vim\%((\a\+)\)\=:E486/
- return
- endtry
- redir END
- if str2nr(split(output)[0]) > 1
- execute printf('match IncSearch /\<%s\>/', word_cursor)
- endif
- endfunction
Add Comment
Please, Sign In to add comment