Where is .vimrc located when using Bash on Windows? I'm trying to add settings to make Bash on Windows suitable for vim use and to allow performing git diff/merge, etc. with custom settings, i.e., ignore whitespace.
Use vim --version | grep vimrc
to find it.
For me its
see stackoverflow link
This will edit your vimrc in the current window
:e $MYVIMRC
This will reload your vimrc after you've saved your changes
:source $MYVIMRC
This will configure two shortcuts that edit and reload your vimrc
Pressing \e in normal mode will edit your vimrc in a split window. Pressing \s will reload vimrc to apply your changes
let mapleader="\\"
nnoremap <leader>e :vsplit $MYVIMRC<cr>
nnoremap <leader>s :source $MYVIMRC<cr>
Reference
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With