π eyeliner.nvim
Move faster with unique f
/F
indicators for each word on the line. Like quick-scope, but in Lua.
eyeliner-demo.mov
The orange letters indicate the unique letter in the word that you can jump to with f
/F
right away.
Blue letters indicate that there is no unique letter in the word, but you can get to it with f
/F
and then a repeat with ;
.
Installation
Requirement: Neovim >= 0.7.0
Using vim-plug:
Plug 'jinh0/eyeliner.nvim'
Using packer.nvim:
use 'jinh0/eyeliner.nvim'
Show highlights only after keypress
If you prefer to have eyeliner's highlights shown only after you press f
/F
/t
/T
, set highlight_on_key
to true
in the setup function.
In Lua:
use {
'jinh0/eyeliner.nvim',
config = function()
require'eyeliner'.setup {
highlight_on_key = true
}
end
}
Demo
eyeliner-demo-keypress.mov
Customize highlight colors
You can customize the highlight colors and styles with the EyelinerPrimary
and EyelinerSecondary
highlight groups.
For instance, if you wanted to make eyeliner.nvim more subtle by only using bold and underline, with no color,
In Vimscript:
highlight EyelinerPrimary gui=underline,bold
highlight EyelinerSecondary gui=underline
In Lua:
vim.api.nvim_set_hl(0, 'EyelinerPrimary', { bold = true, underline = true })
vim.api.nvim_set_hl(0, 'EyelinerSecondary', { underline = true })
If you want to set a custom color:
In Vimscript:
highlight EyelinerPrimary guifg=#000000 gui=underline,bold
highlight EyelinerSecondary guifg=#ffffff gui=underline
In Lua:
vim.api.nvim_set_hl(0, 'EyelinerPrimary', { fg='#000000', bold = true, underline = true })
vim.api.nvim_set_hl(0, 'EyelinerSecondary', { fg='#ffffff', underline = true })
Update highlights when the colorscheme is changed
In Vimscript:
autocmd ColorScheme * :highlight EyelinerPrimary ...
In Lua:
vim.api.nvim_create_autocmd('ColorScheme', {
pattern = '*',
callback = function()
vim.api.nvim_set_hl(0, 'EyelinerPrimary', { bold = true, underline = true })
end,
})
Commands
Enable/disable/toggle:
:EyelinerEnable
:EyelinerDisable
:EyelinerToggle