From a6ce243d82528d0c0d826442009f21e9505f701f Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Mon, 15 Dec 2025 20:11:45 +0100 Subject: [PATCH] [Keybinds] Func to arrow-func migrate regex keybind --- nvim/lua/keybinds.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nvim/lua/keybinds.lua b/nvim/lua/keybinds.lua index cd9f75a..56dc0ff 100755 --- a/nvim/lua/keybinds.lua +++ b/nvim/lua/keybinds.lua @@ -81,6 +81,11 @@ keymap.set( opts("setup python script") ) +-- Migrate from function to const-arrow function (js) +keymap.set("n", "fs", ":%s/\\v(async )@ /g", opts("Migrate to const-arrow func (sync)")) +keymap.set("n", "fa", ":%s/async function \\(.*\\) (\\(.*\\)) /const \\1 = async (\\2) => /g", opts("Migrate to const-arrow func (async)")) + + -- select all keymap.set("n", "a", "ggVG", opts("select all"))