S
S
Sergey Burduzha2017-09-18 23:45:38
vim
Sergey Burduzha, 2017-09-18 23:45:38

How to apply saved settings in vim without closing the terminal?

What I do is change the file, type :wq, then close and reopen the terminal, but that's just awkward.
I realized that if you change the file and enter :source <file name> then the settings will be applied, only my php.ini turns red after that.
Thank you for your response

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nekipelov, 2017-09-19
@serii81

Put this code at the top of your .vimrc file:

"" auto reload after modification
augroup reload_vimrc " {
    autocmd!
    autocmd BufWritePost .vimrc source .vimrc
augroup END " }

and each time the file is written, the source .vimrc command will be executed .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question