LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-01-2004, 10:15 PM   #1
tekmorph
Member
 
Registered: Aug 2004
Location: Ohio
Distribution: Mandrake 10.0
Posts: 68

Rep: Reputation: 15
saving files in vi


Hello, I have been trying to save a cpp file in vi, all the commands I have seen don't do the trick. I always still have a cpp.swp extension. I have tried to use g++ on this file it doesn't recognize this, I don't think it should though. Also now when I ls this dir, it will not show the file when I know it's there I am looking at it right now through Nautilus...any help? thank you.
 
Old 09-01-2004, 10:38 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
The normal process would be to
<ESC>:w
to write it as such (<ESC> just for good measure,
in case you were in insert mode) ... You should
only have a swap if there were unsaved changes
and vi died.
[<ESC>:w <new-name> for renaming]


Cheers,
Tink

Last edited by Tinkster; 09-01-2004 at 10:40 PM.
 
Old 09-01-2004, 11:01 PM   #3
tekmorph
Member
 
Registered: Aug 2004
Location: Ohio
Distribution: Mandrake 10.0
Posts: 68

Original Poster
Rep: Reputation: 15
very cool tinkster, thank you. Now though after compiling my new binary filedoesn't execute, I try to run it but to no avail, any thoughts?

Last edited by tekmorph; 09-01-2004 at 11:12 PM.
 
Old 09-01-2004, 11:22 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
./<filename>

Cheers,
Tink
 
Old 09-01-2004, 11:36 PM   #5
tekmorph
Member
 
Registered: Aug 2004
Location: Ohio
Distribution: Mandrake 10.0
Posts: 68

Original Poster
Rep: Reputation: 15
( . ) that little guy sure makes alot of difference, thanks again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving app-files siggns Linux - Newbie 1 10-28-2005 03:33 PM
Saving files rj686 Linux - Software 4 10-07-2004 11:09 PM
New distro and saving files riscphree Linux - Software 1 06-13-2004 12:30 AM
Saving files Ren Red Hat 2 01-09-2004 06:58 AM
Saving files to other folder klmn1 Linux - Software 2 08-11-2003 01:28 PM


All times are GMT -5. The time now is 01:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration