Vim: read modeline after opening the file?
问题 I work on a variety of projects and many of them set file-specific vim settings. I have been asked to not have modelines set in .vimrc; is there a way after loading the file to load the modelines settings? So if I open tmp.c with vim: int main(int argc, char* argv[]) { return 0; } /* vim: set expandtab tabstop=4 : */ Is there a command I can run to set the stuff in the modeline? Just doing :set modeline after it is open doesn't do anything. 回答1: After :set modeline , reload your buffer with