- viエディタ、初級編6(man,help)
- viエディタのマニュアル
viエディタのマニュアルは、「man vi」で呼び出すとviコマンドの使い方の説明が表示されます。
また、viは、現在vimのエイリアスになっています。
例 manコマンドで表示されるviの説明
VIM(1) VIM(1)
NAME
vim - Vi IMproved, a programmers text editor
SYNOPSIS
vim [options] [file ..]
vim [options] -
vim [options] -t tag
vim [options] -q [errorfile]
ex
view
gvim gview evim eview
rvim rview rgvim rgview
DESCRIPTION
Vim is a text editor that is upwards compatible to Vi. It can be used
to edit all kinds of plain text. It is especially useful for editing
programs.
There are a lot of enhancements above Vi: multi level undo, multi win-
dows and buffers, syntax highlighting, command line editing, filename
:
viエディタの操作方法を知りたい場合、viエディタを起動したあと、コマンドモードにて以下の操作をして下さい。また、F1キーを押してヘルプ画面が出る設定になっていることもあります。
$ vi tmp.txt # viエディタを起動
画面がリフレッシュされて、ファイルの内容が表示されたら、コマンドモードの状態で
「:help (enter)」
: help
vi操作のヘルプが開きます。
help.txt* For Vim version 7.0. Last change: 2006 Jun 16
VIM - main help file
k
Move around: Use the cursor keys, or "h" to go left, h l
"j" to go down, "k" to go up, "l" to go right. j
Close this window: Use ":q".
Get out of Vim: Use ":qa!" (careful, all changes are lost!).
Jump to a subject: Position the cursor on a tag (e.g. |bars|) and hit CTRL-].
With the mouse: ":set mouse=a" to enable the mouse (in xterm or GUI).
Double-click the left mouse button on a tag, e.g. |bars|.
Jump back: Type CTRL-T or CTRL-O (repeat to go further back).
Get specific help: It is possible to go directly to whatever you want help
on, by giving an argument to the |:help| command.
It is possible to further specify the context:
*help-context*
WHAT PREPEND EXAMPLE ~
Normal mode command (nothing) :help x
help.txt [ヘルプ][RO] 1,1 先頭
abcdef
tmp.txt 2,1 20%
"help.txt" [読込専用] 214L, 7883C
help画面の終了は、「:q (enter)」です。これで、viの編集画面に戻れます。
ヘルプ画面で編集モードになっていることもありますので、「esc」キーを押したあとに「:q (enter)」の操作をする方が安全です。
なお、 vi のtutorもあります。日本語表記なのでこちらの方が見やすいかもしれません。
$ vimtutor
0 件のコメント:
コメントを投稿