How to run Vim commands from Terminal
问题 My questions is one that I haven't seen answered, the usual question is how to run certain commands to a file. My question is how to run Vim commands or functions, from outside Vim (i.e. Terminal), these wouldn't affect any file, just Vim itself. Is this is even possible? If so, how? If this is not possible like this, is there a way to go into Vim, run a command automatically, and then exit when that ends? Or run another command and then exit? Thanks for your help! 回答1: Use vim --cmd 'Command