From c7924022ba5369d16e4857059c6b289276ab57e6 Mon Sep 17 00:00:00 2001
From: Hau Nguyen
Use both \
and ;
as leader key:
vim.keymap.set("n", ";", "<leader>", { remap = true })
-vim.keymap.set("n", "'", "<leader>", { remap = true })
- Search multiple words:
:/\vword1|word2|word3
@@ -102,22 +97,43 @@ vim.keymap.set(
- Keymap for plugin (sync with dotfiles):
+Use both \
and ;
as leader key:
vim.keymap.set("n", "<leader>f", ":FZF<CR>")
-vim.keymap.set("n", "<leader>rg", ":FZFRg<CR>")
-vim.keymap.set("n", "<leader>cm", ":FZFCommands<CR>")
-vim.keymap.set("n", "<C-n>", ":NvimTreeToggle<CR>")
-vim.keymap.set("n", "<leader>n", ":NvimTreeFindFile<CR>")
-vim.keymap.set("n", "<leader>tr", ":lua MiniTrailspace.trim()<CR>")
+ vim.keymap.set("n", ";", "<Leader>", { remap = true })
+vim.keymap.set("n", "'", "<Leader>", { remap = true })
+vim.keymap.set("n", "q", ":q<CR>")
<Leader>
prefix: prefer global keymap
+ <Space>
prefix: prefer lsp keymap, for coding of
+ course :D
+
+ With + ibhagwan/fzf-lua: +
<Leader>f
: find files<Leader>rg
: grep files<Space>s
: find lsp symbols+ With + nvim-tree/nvim-tree.lua, inside nvim-tree: +
+<C-n>
: toggle<Leader>n
: locate filea
: created
: deleter
: rename+ With + hrsh7th/nvim-cmp: +
+<C-Space>
: trigger completion+ With + lewis6991/gitsigns.nvim: +
]c
, [c
: next/previous git change+ With + echasnovski/mini.nvim +
sr
: replace surround<Leader>tr
: trim trailing whitespace+ With + neovim/nvim-lspconfig +
gd
: go to definitiongr
: go to referencesK
: hover<Space>gd
: go to definition<Space>k
: hover<F2>
: rename<space>f
: format<space>ca
: code action<Space>ca
: code action<Space>gr
: go to references<Space>f
: format