Skip to content

Commit 20fbe73

Browse files
authored
Merge pull request #424 from tomtomjhj/direct-map
Map <Return> and <Backspace> directly to <Plug> commands
2 parents ab237a1 + 4fc7b83 commit 20fbe73

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

autoload/fern/mapping/node.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ function! fern#mapping#node#init(disable_default_mappings) abort
2121
if !a:disable_default_mappings
2222
nmap <buffer><nowait> <F5> <Plug>(fern-action-reload)
2323
nmap <buffer><nowait> <C-m> <Plug>(fern-action-enter)
24+
nmap <buffer><nowait> <Return> <Plug>(fern-action-enter)
2425
nmap <buffer><nowait> <C-h> <Plug>(fern-action-leave)
26+
nmap <buffer><nowait> <Backspace> <Plug>(fern-action-leave)
2527
nmap <buffer><nowait> l <Plug>(fern-action-expand)
2628
nmap <buffer><nowait> h <Plug>(fern-action-collapse)
2729
nmap <buffer><nowait> i <Plug>(fern-action-reveal)
28-
nmap <buffer><nowait> <Return> <C-m>
29-
nmap <buffer><nowait> <Backspace> <C-h>
3030
endif
3131
endfunction
3232

autoload/fern/mapping/open.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ function! fern#mapping#open#init(disable_default_mappings) abort
4545
4646
if !a:disable_default_mappings
4747
nmap <buffer><nowait> <C-m> <Plug>(fern-action-open-or-enter)
48+
nmap <buffer><nowait> <Return> <Plug>(fern-action-open-or-enter)
4849
nmap <buffer><nowait> l <Plug>(fern-action-open-or-expand)
4950
nmap <buffer><nowait> s <Plug>(fern-action-open:select)
5051
nmap <buffer><nowait> e <Plug>(fern-action-open)

0 commit comments

Comments
 (0)