nvim-word-highlight is a neovim plugin to highlight current word under the cursor in the file. If the current word is an existing file path it can be opened directly via a key shortcut.
- vim-plug
call plug#begin() Plug 'elfenpiff/nvim-word-highlight' call plug#end()
After the installation the current word should be highlighted in the current
buffer. If it is an existing local path the file can be opened with <leader> a
.
- open the file under the cursor.
nnoremap <leader>a :OpenPathUnderCursor<CR>
-
word highlight by defining
NvimWordHighlight
.hi NvimWordHighlight guifg=green guibg=none gui=bold
-
path highlight by defining 'NvimWordHighlightPath'.
hi NvimWordHighlightPath guifg=blue guibg=none gui=bold