LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-09-2004, 01:10 AM   #1
ss100
LQ Newbie
 
Registered: Dec 2004
Location: areepparampu
Posts: 17

Rep: Reputation: 0
doubt abt vi editor


hello all,

i am a new user to linux.

here i am using vi editor for writing C pgms. the red hat linux 9.0 is using here.

i feel very diffult with vi editor since i don't know all the options. hw i get all the options. i try for --help but didn,t get any.

ok please.. tell me what ar the options for cut and paste some documents in vi editor? how i select the document?cut and paste

thank you all
 
Old 12-09-2004, 01:21 AM   #2
RandomLinuxNewb
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 101

Rep: Reputation: 15
vi Commands

Try that out seems to have a good run down of the common stuff.
 
Old 12-09-2004, 01:43 AM   #3
ss100
LQ Newbie
 
Registered: Dec 2004
Location: areepparampu
Posts: 17

Original Poster
Rep: Reputation: 0
one more doubt?

after saving a file and quiting from vi editor, why the 'filename.swp ' files are obtained? is there any problem with the commands that i give?

ie, when trying to open the same file in the next time, the editor shows some dodumentations and give options for recover(R), Edit(E), Read only( ) etc? why this happens.

i will be greatfull if u give an answer.
thankyou
 
Old 12-10-2004, 02:17 AM   #4
RandomLinuxNewb
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 101

Rep: Reputation: 15
I've only had that happen when I exited vi incorretly. The .swp files are auto backups that vi is making for you incase you crash the program or are working remotely and get disconnected.
 
Old 12-11-2004, 04:59 AM   #5
obashir
LQ Newbie
 
Registered: Nov 2002
Location: Loughborough, UK
Distribution: Redhat 9, Fedora, Yellow Dog
Posts: 29

Rep: Reputation: 15
Hi,

If you are using a graphical frontend (Gnome or KDE), you can use any other GUI based text editor. Gedit for Gnome, my personal favourite is kwrite on KDE as it does syntax highlighting for you as well.

If you are on Debian, the console based text editor "nano" is a delight. However I have not yet looked around for a nano type editor for redhat.

Regards

OMAR.
 
Old 12-11-2004, 01:56 PM   #6
winsnomore
Member
 
Registered: May 2004
Location: USA
Distribution: #1 PCLinuxOS -- for laughs -> Ubuntu, Suse, Mepis
Posts: 315

Rep: Reputation: 31
nano is pos ..
vi is fine ..it's a modal editor better suited to some dispostions than nano ( a rather dumb hack .. where commands make NO sense)
or emacs .. large executable and steep learing curve though great for variety of uses.

in the terms of vi .. it's yank and put .. "<buff-name><number of lines>yy will yank and <buf-name>p will put .

so

"a10yy will yank 10 lines and put into buffer a .. and
ap will put the buffer a where the cursor is.
 
Old 12-11-2004, 05:56 PM   #7
obashir
LQ Newbie
 
Registered: Nov 2002
Location: Loughborough, UK
Distribution: Redhat 9, Fedora, Yellow Dog
Posts: 29

Rep: Reputation: 15
Hi,

Editors are generally personal preferences. After having to use vi on a restricted console for a few weeks, I have become quite acustomed to it and find myself using it even while working on Gnome.

For those who are not comfortable with remembering commands, nano may be a reasonable alternative. I discovered pico on my old redhat 7.3 boxes. Pico is very similar to nano. If interested in a simple editor, it can be extracted from the pine rpm. More info and rpm at

http://www.washington.edu/pine/

Regards

OMAR.
 
  


Reply



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
abt drwxrwsr-x gururaj Linux - Security 5 11-06-2005 06:23 PM
question abt xine woodland56 Linux - Software 5 10-15-2005 06:11 PM
Question abt glibc 2.3.3 ugenn Linux - Software 0 06-04-2004 03:54 AM
Doubt in Pattern matching and vi editor.. suriyamohan Linux - General 2 08-19-2003 05:03 AM
learn abt cookies anoop_chandran Linux - General 1 11-25-2001 03:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:40 AM.

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
Open Source Consulting | Domain Registration