I remapped my hjkl keys to ijkl, but in netrw, "i" switches view styles.

How to change this? Is it possible to change this?

2 Answers 2


If you want your cursor to move left when pressing i in the built-in file browser netrw, then try adding the following code in your $MYVIMRC file :

augroup netrw_mapping
    autocmd filetype netrw call NetrwMapping()
augroup END

function! NetrwMapping()
    noremap <buffer> i h

The reason why your custom mapping didn't have the expected result, is probably because netrw set up mappings that are local to the buffer (using the <buffer> option), which means they override your global mappings.

The previous code adds an autocommand that automatically calls a function whenever you enter a buffer whose filetype is netrw. The function then sets up your mapping using the <buffer> option, which means it should be able to override the local mapping previously done by netrw.

I found the workaround from this post.


A simpler solution is to put your config in .vim/after/ftplugin/netrw.vim:

noremap <buffer> i h

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.