azabiong / vim-highlighter

Highlight words and expressions
MIT License
226 stars 9 forks source link

Visual Mode remap #20

Closed sevehub closed 1 year ago

sevehub commented 1 year ago

This works well when I need to highlight a single word with a predefined color. nnoremap <silent><leader>h1 :8 Hi+<CR>

How can I have a similar remap for a range in visual mode? I've tried: xnoremap <silent><leader>h1 :8 Hi+x<CR> but I get "invalid range" error.

Any ideas?

sevehub commented 1 year ago

Found it. xnoremap <silent><leader>h1 <esc>:8 Hi+x<CR>

I close the issue.

azabiong commented 1 year ago

Awesome! 👍