[Keybinds] Func to arrow-func migrate regex keybind
This commit is contained in:
@@ -81,6 +81,11 @@ keymap.set(
|
||||
opts("setup python script")
|
||||
)
|
||||
|
||||
-- Migrate from function to const-arrow function (js)
|
||||
keymap.set("n", "<leader><leader>fs", ":%s/\\v(async )@<!function (.*) \\((.*)\\) /const \\2 = (\\3) => /g<CR>", opts("Migrate to const-arrow func (sync)"))
|
||||
keymap.set("n", "<leader><leader>fa", ":%s/async function \\(.*\\) (\\(.*\\)) /const \\1 = async (\\2) => /g<CR>", opts("Migrate to const-arrow func (async)"))
|
||||
|
||||
|
||||
-- select all
|
||||
keymap.set("n", "<leader>a", "ggVG", opts("select all"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user