Skip to content

Commit

Permalink
Merge pull request #424 from tomtomjhj/direct-map
Browse files Browse the repository at this point in the history
Map <Return> and <Backspace> directly to <Plug> commands
  • Loading branch information
lambdalisue authored May 16, 2022
2 parents ab237a1 + 4fc7b83 commit 20fbe73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autoload/fern/mapping/node.vim
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ function! fern#mapping#node#init(disable_default_mappings) abort
if !a:disable_default_mappings
nmap <buffer><nowait> <F5> <Plug>(fern-action-reload)
nmap <buffer><nowait> <C-m> <Plug>(fern-action-enter)
nmap <buffer><nowait> <Return> <Plug>(fern-action-enter)
nmap <buffer><nowait> <C-h> <Plug>(fern-action-leave)
nmap <buffer><nowait> <Backspace> <Plug>(fern-action-leave)
nmap <buffer><nowait> l <Plug>(fern-action-expand)
nmap <buffer><nowait> h <Plug>(fern-action-collapse)
nmap <buffer><nowait> i <Plug>(fern-action-reveal)
nmap <buffer><nowait> <Return> <C-m>
nmap <buffer><nowait> <Backspace> <C-h>
endif
endfunction

Expand Down
1 change: 1 addition & 0 deletions autoload/fern/mapping/open.vim
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function! fern#mapping#open#init(disable_default_mappings) abort
if !a:disable_default_mappings
nmap <buffer><nowait> <C-m> <Plug>(fern-action-open-or-enter)
nmap <buffer><nowait> <Return> <Plug>(fern-action-open-or-enter)
nmap <buffer><nowait> l <Plug>(fern-action-open-or-expand)
nmap <buffer><nowait> s <Plug>(fern-action-open:select)
nmap <buffer><nowait> e <Plug>(fern-action-open)
Expand Down

0 comments on commit 20fbe73

Please sign in to comment.