nvim: Switch lightspeed to flash
Flash.nvim provides a very tasty remote editing functionality which lightspeed does not. Otherwise it behaves *mostly* the same. For now, I have the flash search label functionality activated (default) but if it is annoying I will turn it off (It injects labels into the normal neovim search. So if you search a word and want to go directly there, you just press the label key as part of the search and it jumps there. This might be problematic if I quickly type something that does not exist but it picks up a non-existent letter as label instead.) Otherwise, the remote editing functionality is activated by <operator>r<label><movement>, such as `yr<label>iw` to yank inside a word somewhere else and stay at the current position. Similarly for example `cr<label>$` to change from the label to the end of the line and then jump back to the original position and so on.
This commit is contained in:
parent
4c5d18d7e4
commit
572f7b29a4
1 changed files with 48 additions and 2 deletions
|
@ -44,7 +44,53 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- jump between letters with improved fFtT quicksearch, mimics sneak
|
-- jump between letters with improved fFtT quicksearch, mimics sneak
|
||||||
{ "ggandor/lightspeed.nvim", event = "BufEnter" },
|
{
|
||||||
|
"folke/flash.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"s",
|
||||||
|
mode = { "n", "x", "o" },
|
||||||
|
function()
|
||||||
|
require("flash").jump()
|
||||||
|
end,
|
||||||
|
desc = "Flash",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"S",
|
||||||
|
mode = { "n", "x", "o" },
|
||||||
|
function()
|
||||||
|
require("flash").treesitter()
|
||||||
|
end,
|
||||||
|
desc = "Flash Treesitter",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"r",
|
||||||
|
mode = "o",
|
||||||
|
function()
|
||||||
|
require("flash").remote()
|
||||||
|
end,
|
||||||
|
desc = "Remote Flash",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"R",
|
||||||
|
mode = { "o", "x" },
|
||||||
|
function()
|
||||||
|
require("flash").treesitter_search()
|
||||||
|
end,
|
||||||
|
desc = "Treesitter Search",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<c-s>",
|
||||||
|
mode = { "c" },
|
||||||
|
function()
|
||||||
|
require("flash").toggle()
|
||||||
|
end,
|
||||||
|
desc = "Toggle Flash Search",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
-- personal dict improvements for git sync
|
-- personal dict improvements for git sync
|
||||||
{ "micarmst/vim-spellsync", event = "VeryLazy" },
|
{ "micarmst/vim-spellsync", event = "VeryLazy" },
|
||||||
|
@ -152,5 +198,5 @@ return {
|
||||||
-- try to avoid putting files in util buffers, e.g. filetree, aerial, undotree, ..
|
-- try to avoid putting files in util buffers, e.g. filetree, aerial, undotree, ..
|
||||||
{ "stevearc/stickybuf.nvim", config = true },
|
{ "stevearc/stickybuf.nvim", config = true },
|
||||||
-- make it a little less painful to open really big (>2mb) files by disabling features
|
-- make it a little less painful to open really big (>2mb) files by disabling features
|
||||||
{ "LunarVim/bigfile.nvim", lazy = false },
|
-- { "LunarVim/bigfile.nvim", lazy = false },
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue