blob: 67b0d70c99a5daff34a5e8647d004bf57a183887 (
plain)
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
39
40
41
42
43
44
45
|
(import-macros {: map!} :nvrc.macro.keymap)
(import-macros {: setv!} :nvrc.macro.set)
(map! [n] :<space> "" "")
(setv! mapleader " ")
(map! [n :silent] :<leader>fe ":NvimTreeToggle <cr>")
(map! [n :silent] :<leader>ft ":NvimTreeFocus <cr>")
(map! [n :silent] :<leader>/
":lua require('Comment.api').toggle_current_linewise() <cr>")
(map! [v :silent] :<leader>/
":lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode()) <cr>")
(map! [n :silent] :<leader>ff ":Telescope find_files <cr>")
(map! [n :silent] :<leader>fc ":Telescope grep_string <cr>")
(map! [n :silent] :<leader>fs ":Telescope live_grep <cr>")
(map! [n :silent] :<leader>fa
":Telescope find_files follow=true no_ignore=true hidden=true <cr>")
(map! [n :silent] :<leader>fb ":Telescope buffers <cr>")
(map! [n :silent] :<leader>gc ":Telescope git_commits <cr>")
(map! [n :silent] :<leader>gs ":Telescope git_status <cr>")
(map! [n] :f :<plug>Lightspeed_f)
(map! [n] :F :<plug>Lightspeed_F)
(map! [n] :t :<plug>Lightspeed_t)
(map! [n] :T :<plug>Lightspeed_T)
(map! [n :silent] :<leader>rm ":TZMinimalist <cr>")
(map! [n :silent] :<leader>rf ":TZFocus <cr>")
(map! [n :silent] :<leader>ra ":TZAtaraxis <cr>")
(map! [t] :jk "<C-\\><C-n>")
(map! [t :silent] :JK "<C-\\><C-n> :lua require ('nvrc.utils').close_buf() <cr>")
(map! [n :silent] :<leader>tl ":Telescope terms <cr>")
; FIXME This opens on top of existing vertical/horizontal term
(map! [n :silent] :<leader>th ":execute 15 .. 'new +terminal' | let b:term_type = 'hori' <cr>")
(map! [n :silent] :<leader>tv ":execute 'vnew +terminal' | let b:term_type = 'vert' <cr>")
(map! [n :silent] :<leader>tn ":execute 'terminal' | let b:term_type = 'wind' <cr>")
(map! [n :silent] :<leader>q ":lua require('nvrc.utils').close_buf() <cr>")
(map! [n :silent] :<leader>ya ":%y+ <cr>")
(map! [n :silent] :<leader>bn ":enew <cr>")
(map! [n :silent] :<leader>wn ":tabnew <cr>")
(map! [n :silent] :<leader>lt ":set nu! <cr>")
|