How do you open a file from within Vim?
问题 I know how to open a file in vim from a terminal command line ( vim fileName ). What I can't figure out is how to open a file when I'm already within Vim. I tried :r fileName , but that appears to read (or append) the file into the unsaved buffer I have open. It creates a new file, because when I try to write it with :w , it asks for a filename. 回答1: :e <filename> or :Ex <directory> lets you browse for the file from the given directory. :Ex on its own will open the pwd. :enew will create an