A Neovim plugin written in Lua.
Highlight character(s) in line when press keyboard f
t
F
T
.
-
-- Lua require('lazy').setup({ '0x00-ketsu/eft.nvim', lazy = true, config = function() require('eft').setup { -- your configuration comes here -- or leave it empty to use the default settings -- refer to the configuration section below }, end })
-
-- Lua use { '0x00-ketsu/eft.nvim', config = function() require('eft').setup { -- your configuration comes here -- or leave it empty to use the default settings -- refer to the configuration section below }, end }
Following defaults:
local eft = require('eft')
eft.setup(
{
ignore_case = false, -- true: case insensitive
-- Do not change subitem order of highlights
highlights = {
{
name = 'EftChar', -- name of highlight
allow_space = true, -- true: highlight for space
color = { -- color for highlight
gui = 'bold,underline',
guifg = 'Orange',
}
},
{
name = 'EftSubChar',
allow_space = false,
color = {
gui = 'bold,underline',
guifg = 'Gray',
}
}
}
}
)
-- Normal mode
vim.api.nvim_set_keymap('n', 'f', '<CMD>lua require("eft.action").eft_f()<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('n', 'F', '<CMD>lua require("eft.action").eft_F()<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('n', 't', '<CMD>lua require("eft.action").eft_t()<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('n', 'T', '<CMD>lua require("eft.action").eft_T()<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('n', ';', '<CMD>lua require("eft.action").eft_repeat()<CR>', {noremap = true, silent = true})
-- Visual mode
vim.api.nvim_set_keymap('x', 'f', '<CMD>lua require("eft.action").eft_f()<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('x', 'F', '<CMD>lua require("eft.action").eft_F()<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('x', 't', '<CMD>lua require("eft.action").eft_t()<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('x', 'T', '<CMD>lua require("eft.action").eft_T()<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('x', ';', '<CMD>lua require("eft.action").eft_repeat()<CR>', {noremap = true, silent = true})
MIT