开发者

Apply vimrc changes without restarting

开发者 https://www.devze.com 2023-01-23 02:11 出处:网络
How can I have changes in my vimrc take effect without resta开发者_如何学Crting VIM?You can just source it, like this:

How can I have changes in my vimrc take effect without resta开发者_如何学Crting VIM?


You can just source it, like this:

:so ~/.vimrc

Also, for convenience, it usually gets mapped to something quicker to type:

nmap <silent> <leader>sv :so $MYVIMRC<CR>

And then of course, it would be nice to open vimrc a little quicker:

nmap <silent> <leader>ev :e $MYVIMRC<CR>


You can automate this by creating an autocmd that sources the .vimrc file every time it is saved:

autocmd BufWritePost .vimrc so %


If you are editing it,just type:

:so %
0

精彩评论

暂无评论...
验证码 换一张
取 消