Article View: nl.comp
Article #504Re: mijn mening over linux - te overhaast
From: Rob Janssen
Date: Fri, 12 Dec 1997 00:00
Date: Fri, 12 Dec 1997 00:00
242 lines
11192 bytes
11192 bytes
In <Pine.OSF.3.95.971211180733.26903C-100000@ruunat.fys.ruu.nl> Marijn Ros <ros@fys.ruu.nl> writes:
>On Thu, 11 Dec 1997, Rob Janssen wrote:
>> Ja en dan hebben veel vi commando's nog wel iets waardoor je ze makkelijk
>> kunt onthouden. WP functietoetsen hebben dat niet.
>> Toch hoorde je nooit mensen roepen dat WP zo slecht was wat dat betreft
>> (ik heb functietoetsen altijd heel gebruikersonvriendelijk gevonden), maar
>> over vi raken ze niet uitgemopperd.
>Elke toets-combinatie is er voor mij een te veel. Mar altijd nog beter dan
>naar de muis te moeten grijpen. Maar voor mij is er een belangrijk
>voordeel van de functie-toetsen voor WP en de toets-combinaties van vi (en
>emacs, wat ik nu probeer): bij WP kreeg je een mooi geheugensteuntje voor
>boven (of rond) de functie-toetsen. OK, met een prijsverschil van fl1200
>mag dat ook wel, maar toch. (Gnu emacs reference-card is 3 A4
>dubbelzijdig).
Voor "vi" had je toch ook van die handige reference cards?
Dit trof ik eens ergens aan:
All help refers to VISUAL mode, unless a preceeding colon (:)
is specified.
Note: This text is a summary intended to provide only
a basic outline.
----Invocation----
vi file ; Edit at first line of 'file'
vi file1 file2 ; Edit file1. Edit file2 via :n
vi [options] file ; As above, but with Command Line Options
Command Line Options:
+n ; Edit at line n
+ ; Edit at last line
+/pattern ; Edit at line containing 'pattern'
-R ; open file(s) in read-only mode
-c ; Use line-oriented command mode
-e ; ... restricted 'edit' mode.
-l ; Enable 'lisp' and 'showmatch' options
-wn ; Specify window size of 'n' lines
-? ; Print a summary of all command line options
----Exiting----
ZZ ; Exit visual mode, saving changes
:x ; Exit saving changes
:wq ; Write buffer, then quit.
:w ; Write buffer to original file
:w file ; Write buffer to 'file'
:w>> file ; Append to 'file'
:n,mw file ; Write lines 'n' through 'm' to 'file'
:q ; Quit out of editor
:q! ; Quit discarding changes
:e! ; Reedit file, discarding changes
----Setting Options----
:set all ; Prints all option settings
:set option ; Enables option 'option'
:set nooption ; Disables option 'option'
:set option? ; Prints current value of 'option'
:set ; Prints modified options
----Text Input----
i ; Insert before cursor
I ; Insert before first non-blank on line
a ; Append after cursor
A ; Append at end of line
o ; Open and insert at line below
O ; Open and insert at line above
;ESCape key terminates Input mode.
----Insert Mode Commands----
Control-@ ; Repeat Last Insertion
Control-W ; Erase last word entered
Control-H ; Erase last character entered
DELete or Backspace ; Same as Control-H
Control-U ; Erase entire line
Control-D ; Backtab over 'autoindent'
0Control-D ; Kill all 'autoindent'
^Control-D ; Kill 'autoindent' on current line only
Control-V ; Next character literal (to insert control codes)
----Screen Adjustment----
Control-L ; Clear and redraw screen
Control-R ; Redraw only if @ (deleted) lines
zCR ; Redraw, current line at top of page
z. ; Redraw, current line at center of page
z- ; Redraw, current line at bottom of page
/pattern/z- ; Redraw, line containint 'pattern' at bottom of page
zn. ; Redraw, set new window size of 'n' lines
Control-E ; Scroll down 1 line
Control-Y ; Scroll up 1 line
Control-F ; Scroll forward one screen
Control-B ; Scroll backward one screen
Control-D ; Scroll down half screen
Control-U ; Scroll up half screen
----Cursor Motion----
H ; Move cursor to top of page
M ; ... to middle of page
L ; ... to last line of page
+ ; ... to next line at first non-white character
- ; ... to previous line at first non-white
down-arrow or j ; ... down one line, staying in same column
up-arrow or k ; ... up one line, staying in same column
left-arrow or h ; ... to the left
right-arrow or l ; ... to the right
0 ; ... to beginning of line
^ ; ... to beginning of line (first non-white)
$ ; ... to the end of line
n| ; ... to column 'n'
Control-H ; Same as left-arrow
----File Motion----
G ; Last line of file
nG ; Line 'n' of file
/pattern ; Next line containing 'pattern'
?pattern ; Previous line containing 'pattern'
n ; Next / or ?
N ; previous / or ?
/pattern/+n ; 'n'th line after line containing 'pattern'
?pattern?-n ; 'n'th line before line containing 'pattern'
) ; Next sentence
( ; Preceding sentence
} ; Next paragraph
{ ; Preceding paragraph
]] ; Next section/function
[[ ; Preceding section/function
`` ; Previous context
'' ; Previous context at first non-white in line
----Search Patterns----
^ ; Beginning of line
$ ; End of line
. ; Any character
* ; Zero or more of previous character
[A-Z] ; Matches any character from A to Z
[abc] ; Matches a, b, or c
[^abc] ; Matches any character BUT a, b or c
\ ; escape character for literal: \ / $ . ^ [ ' & * | ~
\< ; Beginning of word
\> ; End of word
----Marking Position----
mx ; Mark current position with locater 'x'
`x ; Return to position at locater 'x'
'x ; ... at first non-white in line
----Yank and Put----
yy or Y ; Yank line to buffer
yw ; Yank word to buffer
nyy or nY ; Yank 'n' lines to buffer
p ; Put back lines below cursor
P ; Put back lines above cursor
"xy ; Yank line to buffer 'x'
"xp ; Put from buffer 'x'
----Substitution----
stext ; Substitutes 'text' for character until ESCape
S ; Substitute for entire line until ESCape
:s/X/Y/opt ; Substitute 'Y' for first occurence of 'X'
; Options: g - Change every currence in line
; c - Confirm each change
; p - Print each change (Command mode only)
& ; Repeat last :substitute command
:g/X/s//Y/opt ; Globally find the first 'X' on each line and
; substitute 'Y' for the string 'X'
----Deleting Text----
x ; Delete character under cursor
nx ; ... 'n' characters
X ; ... character before cursor
dw ; ... word
ndw ; ... 'n' words
dd ; ... entire line
dtx ; ... to 'x' in current line
D ; ... to end of line
d/pattern ; ... up to 'pattern'
d?pattern ; ... back to 'pattern'
d`x ; ... to marked location 'x'
d'x ; ... current line and to line which contains marked location 'x'
d) ; ... to end of sentence
d( ; ... to beginning of sentence
d} ; ... to end of paragraph
d{ ; ... to beginning of paragraph
d]] ; ... to end of section
d[[ ; ... to beginning of section
----Changing Text----
cw ; Change word
ncw ; ... 'n' words
cc ; ... entire line
ncc ; ... 'n' lines
C ; ... to end of current line
c/pattern ; ... up to 'pattern'
c?pattern ; ... back to 'pattern'
c`x ; ... to marked location 'x'
c'x ; ... current line and to line which contains marked location 'x'
c) ; ... to end of sentence
c( ; ... to beginning of sentence
c} ; ... to end of paragraph
c{ ; ... to beginning of paragraph
c]] ; ... to end of section
c[[ ; ... to beginning of section
rx ; Replace character with 'x'
R ; Replace all characters until ESCape is entered
----Word and Within Line Motions----
w ; Move cursor forward by one word
W ; ... including any punctuation
b ; Move cursor backward by one word
B ; ... including any punctuation
e ; Move cursor forward to end of word
E ; ... including any punctuation
fx ; Search current line (only) forward for 'x'
Fx ; Search current line (only) backward for 'x'
; ; Repeat last 'f' or 'F'
, ; Reverse of last 'f' or 'F'
----Undo----
u ; Undo last change
U ; Restore current line
"np ; Retrieve from buffer 'n' (1-9 and a-z)
"n1pu.u.u.u. ; Scan recent deletions
----Miscellaneous----
. ; Repeat previous operation
~ ; Reverse case of letter and advance one position
J ; Join lines together
<< ; Shift line left one tab position
>> ; Shift line right one tab position
:g/pattern/p ; Locate and print all occurances of 'pattern' within the file
xp ; Reverse order of two letters
dwwP ; Reverse order of two words
ddp ; Reverse order of two lines
--
+----------------------------------+--------------------------------------+
| Rob Janssen pe1chl@amsat.org | WWWhome: http://www.pe1chl.demon.nl/ |
| AMPRnet: rob@pe1chl.ampr.org | AX.25 BBS: PE1CHL@PI8WNO.#UTR.NLD.EU |
+----------------------------------+--------------------------------------+
Technical Details
Message-ID:
<EL2IHn.1F8@pe1chl>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<66k8hi$kfv$1@xenon.inbe.net> <66mqqs$ouf$1@xenon.inbe.net> <66mr8d$lt0@dinkel.civ.utwente.nl> <66nc3i$e0d@dinkel.civ.utwente.nl> <EL0oKK.LHy@pe1chl> <Pine.OSF.3.95.971211180733.26903C-100000@ruunat.fys.ruu.nl>Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit X-Google-Thread: 100a19,63a92150ba5f5d07 X-Google-Attributes: gid100a19,public X-Google-Thread: 1082b6,63a92150ba5f5d07 X-Google-Attributes: gid1082b6,public X-Google-Thread: 111c4c,63a92150ba5f5d07 X-Google-Attributes: gid111c4c,public X-Google-Thread: fb7d6,63a92150ba5f5d07 X-Google-Attributes: gidfb7d6,public From: rob@pe1chl (Rob Janssen) Subject: Re: mijn mening over linux - te overhaast Date: 1997/12/12 Message-ID: <EL2IHn.1F8@pe1chl> X-Deja-AN: 297509066 References: <66k8hi$kfv$1@xenon.inbe.net> <66mqqs$ouf$1@xenon.inbe.net> <66mr8d$lt0@dinkel.civ.utwente.nl> <66nc3i$e0d@dinkel.civ.utwente.nl> <EL0oKK.LHy@pe1chl> <Pine.OSF.3.95.971211180733.26903C-100000@ruunat.fys.ruu.nl> Reply-To: pe1chl@amsat.org X-NNTP-Posting-Host: pe1chl.demon.nl [194.159.225.177] Organization: PE1CHL Newsgroups: nl.comp,nl.comp.os.linux,be.comp.os.linux,be.comp