where are files created by VIM located?

Status
Not open for further replies.

ma

Baseband Member
Messages
23
If I created a document with vim eg. vim document2.txt , where is it stored by default?

Ma
 
If you do vim document2.txt then the file will be in your present working directory (run pwd to display the location of your present working directory).

So for instance, if you just open a terminal as normal user and run vim document2.txt then it will most likely be in your home directory. You can also use absolute or relative paths. For instance vim /home/ted/stuff/document2.txt would be an absolute path, or if you are already in your home directory, you can do vim stuff/document2.txt

I've always created the file before I edit it, because I hate the whole :sav thing, I'd rather just make the edits and press SHIFT+ZZ.

To create a file touch /path/to/filename
 
Status
Not open for further replies.
Back
Top Bottom