From dcc2b80b5266c453ccc4b6497bafef23c6e21941 Mon Sep 17 00:00:00 2001 From: z3rOR0ne Date: Wed, 7 Sep 2022 01:43:27 -0700 Subject: [PATCH] :sparkles: Added better keybindings to neovim --- nvim/lua/keybindings.lua | 8 +++++++- nvim_custom_keys.txt | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/nvim/lua/keybindings.lua b/nvim/lua/keybindings.lua index 887c85fa..f506001a 100644 --- a/nvim/lua/keybindings.lua +++ b/nvim/lua/keybindings.lua @@ -15,7 +15,13 @@ keymap('n', '', ':tabnext', {}) keymap('n', '', ':wincmd h', {}) keymap('n', '', ':wincmd l', {}) -- open fzf -keymap('n', '', ':Files', {}) +vim.cmd[[nnoremap fzf :silent :Files]] + +-- open ripgrep +vim.cmd[[nnoremap rg :silent :Rg]] + +-- invoke Neoformat +vim.cmd[[nnoremap nf :silent :Neoformat]] -- Toggle NERDCommenter with Ctrl + c vim.cmd[[:map NERDCommenterToggle]] diff --git a/nvim_custom_keys.txt b/nvim_custom_keys.txt index be1e0ee7..e3d2626d 100644 --- a/nvim_custom_keys.txt +++ b/nvim_custom_keys.txt @@ -94,6 +94,10 @@ I only really use this for muliple commenting out of lines NORMAL MODE +nf Simply typing this in NORMAL MODE will invoke Neoformat, simply hit enter afterwards +fzf Simply typing this in NORMAL MODE will invoke FuzzyFileFinder, simply hit enter afterwards +rg Simply typing this in NORMAL MODE will invoke RipGrep, simply hit enter afterwards + CTRL + x removes highlighting from previous search results CTRL + c Comment out line (use in conjunction with CTRL + V for multiple lines)