Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 01-09-2007, 09:58 AM   #1 (permalink)
ma
 
Newb Techie

Join Date: Mar 2006

Posts: 23

ma

Default where are files created by VIM located?

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

Ma
ma is offline  
Old 01-09-2007, 11:37 AM   #2 (permalink)
 
Banned

Join Date: Sep 2005

Posts: 5,191

The General

Default

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
The General is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On