Vi: Difference between revisions

204 bytes added ,  9 years ago
m
Category:Vim Script
m (:2,5s/old/new/)
m (Category:Vim Script)
 
(One intermediate revision by the same user not shown)
Line 2:
It is the [[wp:Category:Unix text editors|standard-editor]] on most Unix-systems.
 
The current versions have almost everything you can expect from an modern editor: <br>
scripting, macro-recording, tags, syntax-coloring, UTF-8, Unicode, GUI etc.
 
However, the basic concept is quite old, e.g. it also has an '''ex'''-mode <br>
Line 10:
 
There are several variants:
* [[BusyBox]] - includes a tiny vi clone
* [[wp:Elvis (text editor)|Elvis]]
* [[wp:nvi|nvi]] - "new vi"
* [[wp:vile (editor)|vile]] - "VI Like Emacs"
* [[wp:Vim (text editor)|vim]] - "viVI-improvedImproved" Website: [http://www.vim.org VIMvim.org] current version: Vim 7.4.507 (2013-07)
** current version: Vim 7.4.507 (2013-07)
** See also [[:Category:Vim Script]]
 
 
==VI-Quickreference==
==Command-Summary==
 
'''Usage:''' vi file.txt
 
The bottom screen-row is used as a statusline, and for entering commands.
 
There is a "normal" mode that acts as command-mode, and an insert-mode:
Line 27 ⟶ 31:
ESC - abort command, i.e. end insert-mode, and return to normal/commandmode.
 
h j k l - move cursor: left/down/up/right ( use with count: "5k" movemoves 5 lines up )
Cursor The cursor-keys should work as well
w b - move cursor one word forward / backward (with count: "3w" movemoves 5 words forward )
G - Goto last line ( "33G" goto line 33 )
/abc - find text "abc"
n - find next match
 
x - delete character ( use with count: "5x" deletes 5 char )
dd - delete line ( use with count: "2dd" deletes 2 lines )
p P - paste: insert previously deleted text at/before the current position
u - undo
r R - replace single char / enter Replace-mode (like insert, but overwrites)
Line 43 ⟶ 47:
: is the prefix for commands:
 
:help - show help-pages
:set ruler - toggle display of current line-number in status-line
 
:r file2.txt - read: insert contents of file2.txt at current position
Line 55 ⟶ 59:
:q - quit ( :q! to force it. Combined: ":wq!" )
</pre>
<small>( Also, look for "vi reference mug" :)</small>
 
 
[[Category:Editor]]
Anonymous user