Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 587 Bytes

reload-vim-config.md

File metadata and controls

17 lines (13 loc) · 587 Bytes

Reload vimrc File Without Restarting

To reload the vimrc file you are editing a single time, use:

:so %

To configure vim to auto-reload every time it is saved, add this to your vimrc file

" auto-reload vimrc when saving
augroup vimrc     " Source vim configuration upon save
  autocmd! BufWritePost jima.vimrc source % | echom "Reloaded " . $MYVIMRC | redraw
  autocmd! BufWritePost $MYVIMRC source % | echom "Reloaded " . $MYVIMRC | redraw
  autocmd! BufWritePost $MYGVIMRC if has('gui_running') | so % | echom "Reloaded " . $MYGVIMRC | endif | redraw
augroup END