From: Gil Andre <gandre@arkeia.com>
To: blinux-list@redhat.com
Subject: Re: info about vi on the net
Date: Thu, 19 Sep 2002 18:48:05 +0200 [thread overview]
Message-ID: <20020919184805.47181edb.gandre@arkeia.com> (raw)
In-Reply-To: <00ba01c25ff4$b98a4220$3ea0a6d8@scottscomp>
[-- Attachment #1: Type: text/plain, Size: 1274 bytes --]
Scott,
If you are using "vim" (do check my last message), try hitting
the Escape and enter the following command:
:set ruler
(Don't forget the ":" in front of the "set" command!!!)
This should display more relevant information to you, especially
the "-- INSERT --" signal when you are trying to enter text. If
you need something easier to use than "vi", please try to install
"nano" -- it's the GNU clone of "pico" (try this as well) and a
very, very simple editor to learn, as all commands are displayed
on the last two lines of the screen.
If you'd like to learn vi, just start by using the reference text
attached to this email. It's fairly short, but, I hope, informative.
On Thu, 19 Sep 2002 09:41:03 -0600, Scott wrote:
> I don't really like the editor because it doesn't have commands at the
> botom to get me out of trouble if some thing were to happen on accident say
> I hit escape one too many times and I get thrown in the command mode instead
> of the insert mode. However I have learned a few things and this quick
> reference is what I need for the time being as I just trying to configure
> the system.
Hope this helps!
Best Regards,
--
Gil Andre ___ Technical writer ___ Arkeia Corporation
email: gandre@arkeia.com | web: http://www.arkeia.com
[-- Attachment #2: vim_summary.txt --]
[-- Type: application/octet-stream, Size: 2482 bytes --]
vi quick reference
Text version of the PostScript file:
ftp://ftp.cs.colorado.edu/users/tor/saclass/vi-reference.ps
Each command should be entered EXACTLY as entered in this
file: "vi" takes upper- and lower-case letters into account.
MOVEMENT BY CHARACTER
h left
l right
j down
k up
(under vim, you can also use the arrow keys of the keyboard)
MOVEMENT BY LINE
[n]G Goto line [n]
:[n] Goto line [n]
0 First position on line
$ Last position on line
^ First, non-white character on line
_ First, non-white character on line
+ First, non-white character on next line
- First, non-white character on previous line
MOVEMENT BY SCREEN
Ctrl+F Scroll forward one screen
Ctrl+B Scroll backward one screen
Ctrl+D Scroll forward half a screen
CTRL+U Scroll backward half a screen
L Goto bottom of screen
z[Enter] Position line with cursor on top of screen
z. Position line with cursor at middle of screen
MISCELLANEOUS MOVEMENT
f[c] Forward to character [c]
F[c] Backward to character [c]
w Move to next word
b Move to previous word
) Next sentence (based on punctuation)
( Previous sentence (based on punctuation)
% Goto matching parenthesis
EDITING TEXT
a Append after cursor
A Append at end of line
i Insert text at cursor (also [insert] key in vim)
o Open line below cursor
O Open line above cursor
d[n] Delete [n] char
dd Delete entire line (line can be pasted -- see below)
D Delete from cursor until end of line
d$ Delete from cursor until end of line
u Undo (vim allows for multiple undo)
x Delete character under cursor
p paste deleted text after cursor
P Paste deleted text before cursor
SEARCH AND REPLACE TEXT
/[text] Search [text]
n Search again forward
N Search again backward
Replacing text is done with the following:
:%s/search/replace/gc
Where:
: Starts the command
%s %s indicates the search is to be over the whole text
search is the text to be searched (don't forget the slashes)
replace is the text which will replace search (don't forget the slashes)
gc is for "global" and "confirm" options respectively.
FILE OPERATIONS
:w Write file to disk
:q Quit vi
:wq Write, then quit
:q! Quit without writing
:e Edit (load) file from disk (with auto-path-completion by [tab])
MISCELLANEOUS OPERATIONS (VIM ONLY)
:set ru Set ruler (more information under vim)
Ctrl+w Window operation (vim ONLY). Press Ctrl+w the one of the following:
n New window
c Close current window
up (arrow key) goto the previous window
down (arrow key) goto the next window
next prev parent reply other threads:[~ UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
Scott B. Berry
` Henry Yen
` Jude DaShiell
` Scott B. Berry
` Jude DaShiell
` Jude DaShiell
` John
` Gil Andre
` Scott B. Berry
` Gil Andre [this message]
` Hans Zoebelein
` John
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020919184805.47181edb.gandre@arkeia.com \
--to=gandre@arkeia.com \
--cc=blinux-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).