-
Notifications
You must be signed in to change notification settings - Fork 0
/
keymap.lua
38 lines (29 loc) · 892 Bytes
/
keymap.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
local Keys = {}
local function map(mode, lhs, rhs)
vim.keymap.set(mode, lhs, rhs, { silent = true })
end
-- Ref: https://github.com/slydragonn/dotfiles/blob/main/.config/nvim/lua/slydragonn/maps.lua
function Keys.nerdtree()
map("n", "ff", "<CMD>NERDTreeToggle<CR>")
end
function Keys.neoformat()
map("n", "<F7>", "<CMD>Neoformat<CR>")
end
function Keys.leaderf()
map("n", "<C-p>", "<CMD>Leaderf file<CR>")
map("n", "<C-i>", "<CMD>Leaderf mru<CR>")
map("n", "<C-e>", "<CMD>Leaderf mru<CR>")
map("n", "<C-f>", "<CMD>Leaderf function<CR>")
map("n", "<F2>", "<CMD>Leaderf filetype<CR>")
end
function Keys.nerdcommenter()
map("n", "ci", "<Plug>NERDCommenterInvert<CR>")
map("v", "ci", "<Plug>NERDCommenterInvert")
end
function Keys.ctrlsf()
map("n", "<Leader>f", "<Plug>CtrlSFCCwordPath<CR>")
end
function Keys.tagbar()
map("n", "tt", "<CMD>TagbarToggle<CR>")
end
return Keys