![]() ![]() To set hlsearch off, you can use "short-form" (unless you have another function that starts with "noh" in command mode): :noh. What's nice about this is g* and g# will still work like "normal" * and #. " remap `*`/`#` to search forwards/backwards (resp.) To highlight word without moving cursor, plop " highlight reg. OBS: Notice that in this version we have "CountWord" command at the end nnoremap :let '\').'\>':set hls:CountWord Selecting word with mouse and counting occurrences at once: " Bellow we set a command "CountWord" and a mapping to count wordĬommand! -nargs=0 CountWord :call CountWordFunction() Select word by clickin on it set mouse=a "Enables mouse clickīonus: CountWordFunction fun! CountWordFunction() I also have these mappings to enable and disable "highligh search enabled by default ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |