Easily jump to any character
By pressing t
+ character
, all the matching characters from the cursor's position till the last visible line will be highlighted with a teleport character
, meaning that pressing this new character will jump to that position.
Same applies for T
(backwards).
Lets say your cursor is here _
, and you press tc
to highlight all the c
characters starting from this line.
You could then easily jump to any highlighted character by pressing the highlighted key.
Same thing could be accomplished backwards by pressing T{char}
.
(pressing qq
will turn the highlights off)
- In this v0, you'll just need to install the plugin and then call the setup function. Currently the keymaps are set to
t
,T
andqq
by default
require("teleport"):setup()
-- Keymaps --
vim.keymap.set("n", "t", ":Teleport forwards<cr>", { noremap = true })
vim.keymap.set("n", "T", ":Teleport backwards<cr>", { noremap = true })
vim.keymap.set("n", "qq", ":TeleportExit<cr>", { noremap = true })
- Support custom mappings
- Change highlights colors dynamically
- Currently there are 55 possible highlights, meaning that jumping to a character that appears more than 55 times will not be possible unless you come closer to it. Will work on this to support infinite highlights
- If there's only one occurence, we could jump straight to it