LinuxQuestions.org
Review your favorite Linux distribution.
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 03-20-2012, 09:48 AM   #1
fxbszj
LQ Newbie
 
Registered: Dec 2011
Distribution: Fedora,RHEL5.4
Posts: 5

Rep: Reputation: Disabled
VI can't edit documents


I just installed Redhat, but I found VI editor can't edit documents. When I press the backspace key, it can't delete any word, just move the cursor. Also I can't write any word.

What should I do now?
Thank you!
 
Old 03-20-2012, 10:03 AM   #2
konsolelover
Member
 
Registered: Jul 2011
Location: 127.0.0.1
Distribution: Arch, Ubuntu 11.04
Posts: 78

Rep: Reputation: 3
Quote:
Originally Posted by fxbszj View Post
I just installed Redhat, but I found VI editor can't edit documents. When I press the backspace key, it can't delete any word, just move the cursor. Also I can't write any word.

What should I do now?
Thank you!
To delete characters use 'x' and 'X' keys. You can't directly insert in Vi . You need to go into insert mode by pressing 'i' key.
ps: I hope that you're familiar with Vi

Last edited by konsolelover; 03-20-2012 at 10:10 AM.
 
Old 03-20-2012, 11:51 AM   #3
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,252

Rep: Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685
Quote:
What should I do now?
Search for a VI tutorial to learn how to use it.
 
Old 03-20-2012, 11:57 AM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
Quote:
Originally Posted by fxbszj View Post
I just installed Redhat, but I found VI editor can't edit documents. When I press the backspace key, it can't delete any word, just move the cursor. Also I can't write any word.

What should I do now?
Thank you!
You're in command mode (key presses tell it to do special things, like string search, copy, paste, etc). Press 'i' to go to insert mode, then you can type and backspace like normal. When you're done, press the Esc key to go back to command mode.

As grail said, find a VI tutorial online, it has a bit of a learning curve.
 
1 members found this post helpful.
Old 03-20-2012, 07:18 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
You may find this useful http://www.vim.org/docs.php
Note that on Linux vi is often aliased to run vim, which stands for Vi IMproved.

There are loads of vi help guides; try this to start http://www.cs.colostate.edu/helpdocs/vi.html

IOW, all vi cmds should work in vim, but in vim you will get extra cmds/capabilities, inc syntax highlighting
 
  


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
Cannot edit blog comment from Android… edit box freezes as it is starting Kenny_Strawn LQ Suggestions & Feedback 3 01-05-2011 07:26 PM
Documents saved as MS Word documents Raggety Linux - Software 2 01-14-2009 03:16 PM
how can I view and edit "Documents to Go" documents in Linux? izquierdista Linux - Software 7 08-30-2007 08:58 AM
help to edit Edit my bootloader's config file from kernel prompt jagdishpandey Linux - Kernel 5 07-03-2007 07:59 AM
Cant edit root's documents mattp Linux - Software 2 10-10-2005 02:15 AM


All times are GMT -5. The time now is 10:35 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration