Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some fern.vim keybindings don't work. #462

Closed
therealmaass opened this issue Dec 22, 2022 · 2 comments
Closed

Some fern.vim keybindings don't work. #462

therealmaass opened this issue Dec 22, 2022 · 2 comments

Comments

@therealmaass
Copy link

Hello

I recently switched to fern.vim and playing a bit around since then. There are 2 keybindings that don't work on my setup: mark files and toggle hide files. I checked if i have double assigned bindings (with :map command) but couldnt find some.
I use nvim v0.8.1

These are my fern.vim bindings:

 " Custom settings and mappings.
let g:fern#disable_default_mappings = 1

noremap <silent> <Leader>f :Fern . -drawer -reveal=% -toggle -width=35<CR><C-w>=

function! FernInit() abort
  nmap <buffer><expr>
        \ <Plug>(fern-my-open-expand-collapse)
        \ fern#smart#leaf(
        \   "\<Plug>(fern-action-open:select)",
        \   "\<Plug>(fern-action-expand)",
        \   "\<Plug>(fern-action-collapse)",
        \ )
"  nmap <buffer> <CR> <Plug>(fern-my-open-expand-collapse)
  nmap <buffer> o <Plug>(fern-my-open-expand-collapse)
  nmap <buffer> <2-LeftMouse> <Plug>(fern-my-open-expand-collapse)
  nmap <buffer> n <Plug>(fern-action-new-path)
  nmap <buffer> d <Plug>(fern-action-remove)
  nmap <buffer> m <Plug>(fern-action-move)
  nmap <buffer> M <Plug>(fern-action-rename)
  nmap <buffer> z <Plug>(fern-action-hidden-toggle)
  nmap <buffer> r <Plug>(fern-action-reload)
  nmap <buffer> - <Plug>(fern-action-mark-toggle)
  nmap <buffer> b <Plug>(fern-action-open:split)
  nmap <buffer> v <Plug>(fern-action-open:vsplit)
  nmap <buffer><nowait> h <Plug>(fern-action-leave)
  nmap <buffer><nowait> l <Plug>(fern-action-enter)
endfunction

augroup FernGroup
  autocmd!
  autocmd FileType fern call FernInit()
augroup END

Maybe someone has a glue!

thanks

@lambdalisue
Copy link
Owner

lambdalisue commented Dec 22, 2022

Wrong name. The correct ones are

  • fern-action-hidden:toggle
  • fern-action-mark:toggle

@therealmaass
Copy link
Author

@lambdalisue thank you. now it works. Keep up the great work and have nice holidays!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants