@@ -12,7 +12,7 @@ local core_map = {
12
12
[" n|n" ] = map_cmd (" nzzzv" ):with_noremap ():with_desc (" edit: Next search result" ),
13
13
[" n|N" ] = map_cmd (" Nzzzv" ):with_noremap ():with_desc (" edit: Prev search result" ),
14
14
[" n|J" ] = map_cmd (" mzJ`z" ):with_noremap ():with_desc (" edit: Join next line" ),
15
- [" n|<Esc>" ] = map_cmd ( " <Cmd> noh<CR> " ):with_noremap ():with_silent ():with_desc (" edit: Clear search highlight" ),
15
+ [" n|<Esc>" ] = map_cr ( " noh" ):with_noremap ():with_silent ():with_desc (" edit: Clear search highlight" ),
16
16
[" n|<C-h>" ] = map_cmd (" <C-w>h" ):with_noremap ():with_desc (" window: Focus left" ),
17
17
[" n|<C-l>" ] = map_cmd (" <C-w>l" ):with_noremap ():with_desc (" window: Focus right" ),
18
18
[" n|<C-j>" ] = map_cmd (" <C-w>j" ):with_noremap ():with_desc (" window: Focus down" ),
@@ -25,17 +25,17 @@ local core_map = {
25
25
[" n|<A-]>" ] = map_cr (" vertical resize +5" ):with_silent ():with_desc (" window: Resize +5 vertically" ),
26
26
[" n|<A-;>" ] = map_cr (" resize -2" ):with_silent ():with_desc (" window: Resize -2 horizontally" ),
27
27
[" n|<A-'>" ] = map_cr (" resize +2" ):with_silent ():with_desc (" window: Resize +2 horizontally" ),
28
- [" n|<C-q>" ] = map_cmd ( " :wq<CR> " ):with_desc (" edit: Save file and quit" ),
29
- [" n|<A-S-q>" ] = map_cmd ( " :q!<CR> " ):with_desc (" edit: Force quit" ),
28
+ [" n|<C-q>" ] = map_cr ( " wq " ):with_desc (" edit: Save file and quit" ),
29
+ [" n|<A-S-q>" ] = map_cr ( " q! " ):with_desc (" edit: Force quit" ),
30
30
[" n|<leader>o" ] = map_cr (" setlocal spell! spelllang=en_us" ):with_desc (" edit: Toggle spell check" ),
31
31
[" n|+" ] = map_cmd (" <C-a>" ):with_noremap ():with_silent ():with_desc (" edit: Increment" ),
32
32
[" n|-" ] = map_cmd (" <C-x>" ):with_noremap ():with_silent ():with_desc (" edit: Decrement" ),
33
33
[" n|<C-a>" ] = map_cmd (" gg0vG$" ):with_noremap ():with_silent ():with_desc (" edit: Select all" ),
34
- [" n|tn " ] = map_cmd (" <Cmd>tabnew<CR> " ):with_noremap ():with_silent ():with_desc (" tab: Create a new tab " ),
35
- [" n|tk " ] = map_cmd ( " <Cmd>tabnext<CR> " ):with_noremap ():with_silent ():with_desc (" tab: Move to next tab" ),
36
- [" n|tj " ] = map_cmd ( " <Cmd>tabprevious<CR> " ):with_noremap ():with_silent ():with_desc (" tab: Move to previous tab" ),
37
- [" n|to " ] = map_cmd ( " <Cmd>tabonly<CR> " ):with_noremap ():with_silent ():with_desc (" tab: Only keep current tab" ),
38
- [" n|<leader><leader>x " ] = map_cmd ( " <Cmd>!chmod +x %<CR> " ):with_silent ():with_desc (" file: chmod +x current file " ),
34
+ [" x|<C-a> " ] = map_cmd (" <Esc>gg0vG$ " ):with_noremap ():with_silent ():with_desc (" edit: Select all " ),
35
+ [" n|tn " ] = map_cr ( " tabnew " ):with_noremap ():with_silent ():with_desc (" tab: Create a new tab" ),
36
+ [" n|tk " ] = map_cr ( " tabnext " ):with_noremap ():with_silent ():with_desc (" tab: Move to next tab" ),
37
+ [" n|tj " ] = map_cr ( " tabprevious " ):with_noremap ():with_silent ():with_desc (" tab: Move to previous tab" ),
38
+ [" n|to " ] = map_cr ( " tabonly " ):with_noremap (): with_silent ():with_desc (" tab: Only keep current tab " ),
39
39
-- Insert mode
40
40
[" i|<C-u>" ] = map_cmd (" <C-G>u<C-U>" ):with_noremap ():with_desc (" edit: Delete previous block" ),
41
41
[" i|<C-b>" ] = map_cmd (" <Left>" ):with_noremap ():with_desc (" edit: Move cursor to left" ),
@@ -60,10 +60,3 @@ local core_map = {
60
60
}
61
61
62
62
bind .nvim_load_mapping (core_map )
63
-
64
- vim .api .nvim_set_keymap (
65
- " n" ,
66
- " <leader><leader>s" ,
67
- " <Cmd>%s/\\ <<C-r><C-w>\\ >/<C-r><C-w>/gI<Left><Left><Left>" ,
68
- { noremap = true , silent = true , nowait = true , desc = " edit: Start replacment mode of current word" }
69
- )
0 commit comments