vim-vinegar icon indicating copy to clipboard operation
vim-vinegar copied to clipboard

Using H and L for navigation

Open superDuperCyberTechno opened this issue 8 years ago • 1 comments

Wouldn't it make sense to have h working as - and l working as <enter>? At least as alternative keybindings? Exactly as ranger does it, basically.

superDuperCyberTechno avatar Nov 15 '17 11:11 superDuperCyberTechno

Here's one method for this.

Add this function:

function! NetrwBuf()
  nmap <buffer> h -
  nmap <buffer> l <CR>
endfunction

Add this autocmd to an augroup to run for each netrw buffer

augroup FILETYPES
  autocmd FileType netrw call NetrwBuf()
augroup END

Now it behaves sort of like ranger

michaelmob avatar Aug 10 '18 22:08 michaelmob