vim-illuminate jump explanation
This commit is contained in:
parent
80e3241a66
commit
ed0bd3cc06
|
@ -273,6 +273,17 @@ return {
|
|||
'neo-tree',
|
||||
},
|
||||
},
|
||||
-- looks weird but is useful: put your cursor on a word and other occurences
|
||||
-- of the word in your buffer will be highlighted. You can then use
|
||||
-- '[[' and ']]' to go to the next or previous occurence.
|
||||
--
|
||||
-- Try it:
|
||||
--
|
||||
-- word #### word ###########
|
||||
-- ############## word ######
|
||||
-- #### word #### word word #
|
||||
--
|
||||
-- (It might not work with comments)
|
||||
keys = {
|
||||
{ ']]', desc = 'Next Reference' },
|
||||
{ '[[', desc = 'Prev Reference' },
|
||||
|
@ -280,6 +291,7 @@ return {
|
|||
config = function(_, opts)
|
||||
require('illuminate').configure(opts)
|
||||
|
||||
-- only magic follows
|
||||
local function map(key, dir, buffer)
|
||||
vim.keymap.set('n', key, function()
|
||||
require('illuminate')['goto_' .. dir .. '_reference'](false)
|
||||
|
|
Loading…
Reference in New Issue