summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/autocmd.txt18
-rw-r--r--runtime/doc/eval.txt48
-rw-r--r--runtime/doc/options.txt41
-rw-r--r--runtime/doc/syntax.txt8
-rw-r--r--runtime/doc/tags15
-rw-r--r--runtime/doc/todo.txt47
-rw-r--r--runtime/doc/various.txt5
-rw-r--r--runtime/syntax/colortest.vim11
-rw-r--r--runtime/tutor/tutor.ja.euc612
-rw-r--r--runtime/tutor/tutor.ja.sjis612
-rw-r--r--src/Makefile8
-rw-r--r--src/configure.in2
-rw-r--r--src/edit.c2
-rw-r--r--src/eval.c148
-rw-r--r--src/ex_cmds.c2
-rw-r--r--src/ex_cmds.h6
-rw-r--r--src/globals.h1
-rw-r--r--src/hardcopy.c7
-rw-r--r--src/option.c31
-rw-r--r--src/option.h5
-rw-r--r--src/proto/window.pro2
-rw-r--r--src/quickfix.c30
-rw-r--r--src/screen.c212
-rw-r--r--src/structs.h1
-rw-r--r--src/syntax.c8
-rw-r--r--src/version.h4
26 files changed, 1259 insertions, 627 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 2ca301ba32..4899648bf2 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -1,4 +1,4 @@
-*autocmd.txt* For Vim version 7.0aa. Last change: 2006 Feb 18
+*autocmd.txt* For Vim version 7.0aa. Last change: 2006 Feb 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -284,8 +284,8 @@ Name triggered by ~
|WinEnter| after entering another window
|WinLeave| before leaving a window
-|TabEnterPost| after entering another tab page
-|TabLeavePre| before leaving a tab page
+|TabEnter| after entering another tab page
+|TabLeave| before leaving a tab page
|CmdwinEnter| after entering the command-line window
|CmdwinLeave| before leaving the command-line window
@@ -706,14 +706,14 @@ Syntax When the 'syntax' option has been set.
where this option was set, and <amatch> for
the new value of 'syntax'.
See |:syn-on|.
- *TabEnterPost*
-TabEnterPost Just after entering a tab page. |tab-page|
+ *TabEnter*
+TabEnter Just after entering a tab page. |tab-page|
Before triggering the WinEnter and BufEnter
events.
- *TabLeavePre*
-TabLeavePre Just before leaving a tab page. |tab-page|
- BufLeave and WinLeave events will have been
- triggered first.
+ *TabLeave*
+TabLeave Just before leaving a tab page. |tab-page|
+ A WinLeave event will have been triggered
+ first.
*TermChanged*
TermChanged After the value of 'term' has changed. Useful
for re-loading the syntax file to update the
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 9bad529eb6..474f863323 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.0aa. Last change: 2006 Feb 18
+*eval.txt* For Vim version 7.0aa. Last change: 2006 Feb 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1690,8 +1690,11 @@ synIDattr( {synID}, {what} [, {mode}])
String attribute {what} of syntax ID {synID}
synIDtrans( {synID}) Number translated syntax ID of {synID}
system( {expr} [, {input}]) String output of shell command/filter {expr}
-tabpage( [{expr}]) Number number of current tab page
-taglist( {expr}) List list of tags matching {expr}
+tabpagebuflist( [{arg}]) List list of buffer numbers in tab page
+tabpagenr( [{arg}]) Number number of current or last tab page
+tabpagewinnr( {tabarg}[, {arg}])
+ Number number of current window in tab page
+taglist( {expr}) List list of tags matching {expr}
tagfiles() List tags files used
tempname() String name for a temporary file
tolower( {expr}) String the String {expr} switched to lowercase
@@ -3861,10 +3864,12 @@ searchpair({start}, {middle}, {end} [, {flags} [, {skip}]])
Search for the match of a nested start-end pair. This can be
used to find the "endif" that matches an "if", while other
if/endif pairs in between are ignored.
- The search starts at the cursor. If a match is found, the
- cursor is positioned at it and the line number is returned.
- If no match is found 0 or -1 is returned and the cursor
- doesn't move. No error message is given.
+ The search starts at the cursor. The default is to search
+ forward, include 'b' in {flags} to search backward.
+ If a match is found, the cursor is positioned at it and the
+ line number is returned. If no match is found 0 or -1 is
+ returned and the cursor doesn't move. No error message is
+ given.
{start}, {middle} and {end} are patterns, see |pattern|. They
must not contain \( \) pairs. Use of \%( \) is allowed. When
@@ -4448,7 +4453,21 @@ system({expr} [, {input}]) *system()* *E677*
Use |:checktime| to force a check.
-tabpagenr([{arg}]) *tabpagenr()*
+tabpagebuflist([{arg}]) *tabpagebuflist()*
+ The result is a List, where each item is the number of the
+ buffer associated with each window in the current tab page.
+ {arg} specifies the number of tab page to be used. When
+ omitted the current tab page is used.
+ When {arg} is invalid the number zero is returned.
+ To get a list of all buffers in all tabs use this: >
+ tablist = []
+ for i in range(tabpagenr('$'))
+ call extend(tablist, tabpagebuflist(i + 1))
+ endfor
+< Note that a buffer may appear in more than one window.
+
+
+tabpagenr([{arg}]) *tabpagenr()*
The result is a Number, which is the number of the current
tab page. The first tab page has number 1.
When the optional argument is "$", the number of the last tab
@@ -4456,6 +4475,19 @@ tabpagenr([{arg}]) *tabpagenr()*
The number can be used with the |:tab| command.
+tabpagewinnr({tabarg}, [{arg}]) *tabpagewinnr()*
+ Like |winnr()| but for tab page {arg}.
+ {tabarg} specifies the number of tab page to be used.
+ {arg} is used like with |winnr()|:
+ - When omitted the current window number is returned. This is
+ the window which will be used when going to this tab page.
+ - When "$" the number of windows is returned.
+ - When "#" the previous window nr is returned.
+ Useful examples: >
+ tabpagewinnr(1) " current window of tab page 1
+ tabpagewinnr(4, '$') " number of windows in tab page 4
+< When {tabarg} is invalid zero is returned.
+
taglist({expr}) *taglist()*
Returns a list of tags matching the regular expression {expr}.
Each list item is a dictionary with at least the following
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index c17074c2d5..53b9899a6a 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 7.0aa. Last change: 2006 Feb 18
+*options.txt* For Vim version 7.0aa. Last change: 2006 Feb 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -4614,7 +4614,7 @@ A jump table for the options with a short description can be found at |Q_op|.
{only available when compiled with the |+linebreak|
feature}
Minimal number of columns to use for the line number. Only relevant
- when the 'number' option is set.
+ when the 'number' option is set or printint lines with a line number.
Since one space is always between the number and the text, there is
one less character for the number itself.
The value is the minimum width. A bigger width is used when needed to
@@ -5680,6 +5680,21 @@ A jump table for the options with a short description can be found at |Q_op|.
NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.
+ *'showtabline'* *'stal'*
+'showtabline' 'stal' number (default 1)
+ global
+ {not in Vi}
+ {not available when compiled without the +windows
+ feature}
+ The value of this option specifies when the line with tab page labels
+ will be displayed:
+ 0: never
+ 1: only if there are at least two tab pages
+ 2: always
+ This is both for the GUI and non-GUI implementation of the tab pages
+ line.
+ See |tab-page| for more information about tab pages.
+
*'sidescroll'* *'ss'*
'sidescroll' 'ss' number (default 0)
global
@@ -6235,17 +6250,25 @@ A jump table for the options with a short description can be found at |Q_op|.
Only normal file name characters can be used, "/\*?[|<>" are illegal.
*'tabline'* *'tal'*
-'tabline' 'tal' number (default 1)
+'tabline' 'tal' string (default empty)
global
{not in Vi}
{not available when compiled without the +windows
feature}
- The value of this option specifies when the line with tab page labels
- will be displayed:
- 0: never
- 1: only if there are at least two tab pages
- 2: always
- |tab-page|
+ When nonempty, this option determines the content of the tab pages
+ line at the top of the Vim window. When empty Vim will use a default
+ tab pages line. |tab-page|
+
+ The tab pages line only appears as specified with the 'showtabline'
+ option and only when there is no GUI implementation for tabs.
+
+ The value is evaluated like with 'statusline'. You can use
+ |tabpagenr()|, |tabpagewinnr()| and |tabpagebuflist()| to figure out
+ the text to be displayed.
+
+ Keep in mind that only one of the tab pages is the current one, others
+ are invisible and you can't jump to their windows.
+
*'tabstop'* *'ts'*
'tabstop' 'ts' number (default 8)
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index ff3b7f9ad2..d839e251cd 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 7.0aa. Last change: 2006 Feb 16
+*syntax.txt* For Vim version 7.0aa. Last change: 2006 Feb 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -4020,6 +4020,12 @@ StatusLine status line of current window
StatusLineNC status lines of not-current windows
Note: if this is equal to "StatusLine" Vim will use "^^^" in
the status line of the current window.
+ *hl-TabLine*
+TabLine tab pages line, not active tab page label
+ *hl-TabLineFill*
+TabLineFill tab pages line, where there are no labels
+ *hl-TabLineSel*
+TabLineSel tab pages line, active tab page label
*hl-Title*
Title titles for output from ":set all", ":autocmd" etc.
*hl-Visual*
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 514ca293d2..517c4dd764 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -718,6 +718,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'showfulltag' options.txt /*'showfulltag'*
'showmatch' options.txt /*'showmatch'*
'showmode' options.txt /*'showmode'*
+'showtabline' options.txt /*'showtabline'*
'shq' options.txt /*'shq'*
'si' options.txt /*'si'*
'sidescroll' options.txt /*'sidescroll'*
@@ -758,6 +759,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'ssop' options.txt /*'ssop'*
'st' options.txt /*'st'*
'sta' options.txt /*'sta'*
+'stal' options.txt /*'stal'*
'startofline' options.txt /*'startofline'*
'statusline' options.txt /*'statusline'*
'stl' options.txt /*'stl'*
@@ -2646,6 +2648,10 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:tabclose tabpage.txt /*:tabclose*
:tabe tabpage.txt /*:tabe*
:tabedit tabpage.txt /*:tabedit*
+:tabf tabpage.txt /*:tabf*
+:tabfind tabpage.txt /*:tabfind*
+:tabn tabpage.txt /*:tabn*
+:tabnew tabpage.txt /*:tabnew*
:tabo tabpage.txt /*:tabo*
:tabonly tabpage.txt /*:tabonly*
:tabs tabpage.txt /*:tabs*
@@ -4098,8 +4104,8 @@ TCL if_tcl.txt /*TCL*
TERM starting.txt /*TERM*
TTpro-telnet syntax.txt /*TTpro-telnet*
Tab intro.txt /*Tab*
-TabEnterPost autocmd.txt /*TabEnterPost*
-TabLeavePre autocmd.txt /*TabLeavePre*
+TabEnter autocmd.txt /*TabEnter*
+TabLeave autocmd.txt /*TabLeave*
Tcl if_tcl.txt /*Tcl*
TermChanged autocmd.txt /*TermChanged*
TermResponse autocmd.txt /*TermResponse*
@@ -5515,6 +5521,9 @@ hl-SpellLocal syntax.txt /*hl-SpellLocal*
hl-SpellRare syntax.txt /*hl-SpellRare*
hl-StatusLine syntax.txt /*hl-StatusLine*
hl-StatusLineNC syntax.txt /*hl-StatusLineNC*
+hl-TabLine syntax.txt /*hl-TabLine*
+hl-TabLineFill syntax.txt /*hl-TabLineFill*
+hl-TabLineSel syntax.txt /*hl-TabLineSel*
hl-Title syntax.txt /*hl-Title*
hl-Tooltip syntax.txt /*hl-Tooltip*
hl-User1 syntax.txt /*hl-User1*
@@ -6949,7 +6958,9 @@ tab-page-intro tabpage.txt /*tab-page-intro*
tab-page-other tabpage.txt /*tab-page-other*
tabpage tabpage.txt /*tabpage*
tabpage.txt tabpage.txt /*tabpage.txt*
+tabpagebuflist() eval.txt /*tabpagebuflist()*
tabpagenr() eval.txt /*tabpagenr()*
+tabpagewinnr() eval.txt /*tabpagewinnr()*
tag tagsrch.txt /*tag*
tag-! tagsrch.txt /*tag-!*
tag-any-white tagsrch.txt /*tag-any-white*
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 4c65d1df99..94218ec275 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.0aa. Last change: 2006 Feb 18
+*todo.txt* For Vim version 7.0aa. Last change: 2006 Feb 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,6 +30,50 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
+'tabline' documentation with an example; esp for the highlighting
+
+P_INSECURE should be remembered for local option values separately.
+
+Completion: <Up> and <Down> don't insert completion, <PageUp> and <PageDown>
+shouldn't either.
+
+Completion: case sensitiveness when typing BS: make it an option?
+
+Completion: When back at the original word behave like after BS.
+
+Completion: When to get out of the BS state when the user keeps on typing?
+
+TabLineMod, TabLineModSel hl when a buffer is modified in a tab.
+Command(s) to reorder tabs? ":tabmove N".
+Open new tab by double click in tab line.
+"gT", ":tpNext" and ":tpprev" to go to previous tab?
+":tab" -> ":tpnext".
+":tab" or ":tabpage" modifier to open new window in new tab.
+ E.g., ":tab help gt"
+ Keep a few commands as shortcuts:
+ :tpnew :tab new
+ :tpedit -
+ :tpclose :tab close
+ :tponly :tab only
+ :tpnext -
+ :tpprevious -
+ :tpNext -
+ :tplast -
+ :tpfirst -
+ ":tab!" to open it at the end, ":0tab" to open at the start.
+ ":tab split" opens tab with window same as current window.
+ ":tpsplit" would split the tab with all its windows.
+Option to put tab line at the left or right? Need an option to specify its
+witdh. It's like a separate window with ":tabs" output.
+ :tabdo ":tabdo windo cmd" should also work
+
+Add an argument to search functions to stop at a certain line number.
+ search('{', 'b', line('w0'))
+ search('{', '', line('w$'))
+Also start at a specified position?
+
+undo could remember the '< and '> marks.
+
Support WINDOW TABS. Works like several pages, each with their own split
windows. Let's call them "tab pages".
- line at top of frame with tabs.
@@ -103,6 +147,7 @@ closing it, executing the command and re-opening it (at the same position).
all. (Gautam Iyer)
Mac unicode patch (Da Woon Jung):
+- configuration option for platform: i386, ppc or both.
- selecting proportional font breaks display
- UTF-8 text causes display problems. Font replacement causes this.
- Command-key mappings do not work. (Alan Schmitt)
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index a7cb74348a..05908d0761 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -1,4 +1,4 @@
-*various.txt* For Vim version 7.0aa. Last change: 2006 Jan 08
+*various.txt* For Vim version 7.0aa. Last change: 2006 Feb 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -94,7 +94,8 @@ g8 Print the hex values of the bytes used in the
*:nu* *:number*
:[range]nu[mber] [count] [flags]
Same as :print, but precede each line with its line
- number. (See also 'highlight' option).
+ number. (See also 'highlight' and 'numberwidth'
+ option).
See |ex-flags| for [flags].
*:#*
diff --git a/runtime/syntax/colortest.vim b/runtime/syntax/colortest.vim
index 0b59fa180f..377eba98fe 100644
--- a/runtime/syntax/colortest.vim
+++ b/runtime/syntax/colortest.vim
@@ -1,7 +1,7 @@
" Vim script for testing colors
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Contributors: Rafael Garcia-Suarez, Charles Campbell
-" Last Change: 2006 Feb 16
+" Last Change: 2006 Feb 20
" edit this file, then do ":source %", and check if the colors match
@@ -54,11 +54,12 @@
" Open this file in a window if it isn't edited yet.
" Use the current window if it's empty.
-if &mod || line('$') != 1 || getline(1) != ''
- new
-endif
if expand('%:p') != expand('<sfile>:p')
- exe "edit " . expand('<sfile>')
+ if &mod || line('$') != 1 || getline(1) != ''
+ exe "new " . expand('<sfile>')
+ else
+ exe "edit " . expand('<sfile>')
+ endif
endif
syn clear
diff --git a/runtime/tutor/tutor.ja.euc b/runtime/tutor/tutor.ja.euc
index 02753d75d0..f043e42f2c 100644
--- a/runtime/tutor/tutor.ja.euc
+++ b/runtime/tutor/tutor.ja.euc
@@ -1,25 +1,26 @@
===============================================================================
-= V I M 教 本 (チュートリアル) へ よ う こ そ - Version 1.5 =
+= V I M 教 本 (チュートリアル) へ よ う こ そ - Version 1.7 =
===============================================================================
- Vim は、このチュートリアルで説明するには多すぎる程のコマンドを備えた
- 非常に強力なエディターです。このチュートリアルは、あなたが Vim
- を万能エディターとして使いこなせるようになるのに十分なコマンドについて
- 説明をするようなっています。
+ Vim は、このチュートリアルで説明するには多すぎる程のコマンドを備えた非常
+ に強力なエディターです。このチュートリアルは、あなたが Vim を万能エディ
+ ターとして使いこなせるようになるのに十分なコマンドについて説明をするよう
+ なっています。
- チュートリアルを完了するのに必要な時間は、覚えたコマンドを試すのにどれ
- だけ時間を使うのかにもよりますが、およそ25〜30分です。
+ チュートリアルを完了するのに必要な時間は、覚えたコマンドを試すのにどれだ
+ け時間を使うのかにもよりますが、およそ25から30分です。
- 学ぶコマンドにはこの文章を変更するものもあります。練習を始める前にコ
- ピーを作成しましょう("vimtutor"したならば、既にコピーされています)。
+ ATTENTION:
+ 以下の練習用コマンドにはこの文章を変更するものもあります。練習を始める前
+ にコピーを作成しましょう("vimtutor"したならば、既にコピーされています)。
- このチュートリアルが、使うことで覚えられる仕組みになっていることを、心
- しておかなければなりません。正しく学習するにはコマンドを実際に試さなけ
- ればならないのです。文章を読んだだけならば、きっと忘れてしまいます!。
+ このチュートリアルが、使うことで覚えられる仕組みになっていることを、心し
+ ておかなければなりません。正しく学習するにはコマンドを実際に試さなければ
+ ならないのです。文章を読んだだけならば、きっと忘れてしまいます!。
- さぁ、Capsロック(Shift-Lock)キーが押されていないことを確認した後、
- 画面にレッスン1.1 が全部表示されるところまで、j キーを押してカーソルを
- 移動しましょう。
+ さぁ、Capsロック(Shift-Lock)キーが押されていないことを確認した後、画面に
+ レッスン1.1 が全部表示されるところまで、j キーを押してカーソルを移動しま
+ しょう。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
レッスン 1.1: カーソルの移動
@@ -33,15 +34,15 @@
1. 移動に慣れるまで、スクリーンでカーソル移動させましょう。
2. 下へのキー(j)を押しつづけると、連続して移動できます。
----> これで次のレッスンに移動する方法がわかりましたね。
+ これで次のレッスンに移動する方法がわかりましたね。
3. 下へのキーを使って、レッスン1.2 に移動しましょう。
-NOTE: 何をタイプしているか判らなくなったら、<ESC>を押してノーマルモードにしま
- す。それから入力しようとしていたコマンドを再入力しましょう。
+Note: 何をタイプしているか判らなくなったら、<ESC>を押してノーマルモードにし
+ ます。それから入力しようとしていたコマンドを再入力しましょう。
-NOTE: カーソルキーでも移動できます。しかし hjkl を使用することに一度慣れてしま
- えば、はるかに速く移動することができるでしょう。
+Note: カーソルキーでも移動できます。しかし hjkl に一度慣れてしまえば、はるか
+ に速く移動することができるでしょう。いやマジで!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
レッスン 1.2: VIM の起動と終了
@@ -52,27 +53,27 @@ NOTE: カーソルキーでも移動できます。しかし hjkl を使用することに一度慣れてしま
1. <ESC>キーを押しましょう。(確実にノーマルモードにするため)
2. 次のようにタイプ: :q! <ENTER>
+ これにより編集した内容を保存せずにエディタが終了します。
----> これにより編集した内容を保存せずにエディタが終了します。
- 編集内容を保存して終了するときは次のようにタイプします:
- :wq <ENTER>
-
- 3. シェルプロンプトからチュートリアルを始めるにはコマンドをタイプします。
+ 3. シェルプロンプトが出てきたら、このチュートリアルを始める為ににコマンド
+ をタイプします。
そのコマンドは: vimtutor <ENTER>
- 通常はこうでしょう: vim tutor <ENTER>
-
----> 'vim' は Vim エディタの起動を、'tutor' は編集したいファイルを意味します。
4. これまでのステップを覚え自信がついたならば、ステップ 1 から 3 までを実
- 際に試して、Vim を1度終了してから再び起動しましょう。それからレッスン
- 1.3までカーソルを移動させましょう。
+ 際に試して、Vim を1度終了してから再び起動しましょう。
+
+NOTE: :q! <ENTER> は全ての変更を破棄します。レッスンにて変更をファイルに保
+ 存する方法についても勉強していきましょう。
+
+ 5. 1.3までカーソルを移動させましょう。
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
レッスン 1.3: テキスト編集 - 削除
** ノーマルモードにてカーソルの下の文字を削除するには x を押します **
- 1. 以下の ---> と記されたされた行にカーソルを移動しましょう。
+ 1. 以下の ---> と示された行にカーソルを移動しましょう。
2. 間違いを修正するために、削除する最初の文字までカーソルを移動します。
@@ -82,7 +83,7 @@ NOTE: カーソルキーでも移動できます。しかし hjkl を使用することに一度慣れてしま
---> その ううさぎ は つつきき を こええてて とびはねたた
- 5. 行が正しくなったら、レッスン 1.4 に移りましょう。
+ 5. 行が正しくなったら、レッスン 1.4 へ進みましょう。
NOTE: 全てのレッスンを通じて、覚えようとするのではなく実際にやってみましょう。
@@ -95,15 +96,15 @@ NOTE: 全てのレッスンを通じて、覚えようとするのではなく実際にやってみましょう。
** ノーマルモードにてテキストを挿入するには i を押します **
- 1. 以下の ---> と記されたされた最初の行にカーソルを移動しましょう。
+ 1. 以下の ---> と示された最初の行にカーソルを移動しましょう。
- 2. 1行目を2行目と同じ様にするために、テキストを挿入しなければならない位
- 置の次の文字にカーソルを移動します。
+ 2. 1行目を2行目と同じ様にするために、テキストを挿入しなければならない位置
+ の次の文字にカーソルを移動します。
3. i キーを押してから、追加が必要な文字をタイプしましょう。
- 4. 間違いを修正したら <ESC> を押してコマンドモードに戻り、正しい文に
- なる様にステップ 2 から 4 を繰り返しましょう。
+ 4. 間違いを修正したら <ESC> を押してコマンドモードに戻り、正しい文になる様
+ にステップ 2 から 4 を繰り返しましょう。
---> この には 足りない テキスト ある。
---> この 行 には 幾つか 足りない テキスト が ある。
@@ -113,6 +114,52 @@ NOTE: 全てのレッスンを通じて、覚えようとするのではなく実際にやってみましょう。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ レッスン 1.5: テキスト編集 - 追加
+
+
+ ** テキスト追加するには A を押しましょう **
+
+ 1. 以下の ---> と示された最初の行にカーソルを移動しましょう。
+ カーソルがその文字上にあってもかまいません。
+
+ 2. 追加が必要な場所で A をタイプしましょう。
+
+ 3. テキストを追加し終えたら、 <ESC> を押してノーマルモードに戻りましょう。
+
+ 4. 2行目の ---> と示された場所へ移動し、ステップ 2 から 3 繰り返して文法を
+ 修正しましょう。
+
+---> ここには間違ったテキストがあり
+ ここには間違ったテキストがあります。
+---> ここにも間違ったテキス
+ ここにも間違ったテキストがあります。
+
+ 5. テキストの追加が軽快になってきたらレッスン 1.6 へ進みましょう。
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ レッスン 1.6: ファイルの編集
+
+
+ ** ファイルを保存して終了するには :wq とタイプします **
+
+ !! NOTE: 以下のステップを実行する前に、まず全体を読んでください!!
+
+ 1. レッスン 1.2 でやったように :q! をタイプして、このチュートリアルを終了
+ します。
+
+ 2. シェルプロンプトでこのコマンドをタイプします: vim tutor <ENTER>
+ 'vim'が Vim エディタを起動するコマンド、'tutor' は編集したいファイルの
+ 名前です。変更してもよいファイルを使いましょう。
+
+ 3. 前のレッスンで学んだように、テキストを挿入、削除します。
+
+ 4. 変更をファイルに保存します: :wq <ENTER>
+
+ 5. vimtutor を再度起動し、以下の要約へ進みましょう。
+
+ 6. 以上のステップを読んで理解した上でこれを実行しましょう。
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
レッスン 1 要約
@@ -127,14 +174,14 @@ NOTE: 全てのレッスンを通じて、覚えようとするのではなく実際にやってみましょう。
4. カーソルの下の文字を削除するには、ノーマルモードで x とタイプします。
5. カーソルの位置に文字を挿入するには、ノーマルモードで i とタイプします。
- i テキストのタイプ <ESC>
+ i テキストのタイプ <ESC> カーソル位置に追加
+ A テキストの追加 <ESC> 行末に追加
-NOTE: <ESC> キーを押すとノーマルモードに移行します。その際、間違ったり入力途中
- のコマンドを取り消すことができます。
+NOTE: <ESC> キーを押すとノーマルモードに移行します。その際、間違ったり入力途
+ 中のコマンドを取り消すことができます。
さて、続けてレッスン 2 を始めましょう。
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
レッスン 2.1: 削除コマンド
@@ -143,7 +190,7 @@ NOTE: <ESC> キーを押すとノーマルモードに移行します。その際、間違ったり入力途中
1. ノーマルモードであることを確認するために <ESC> を押しましょう。
- 2. 以下の ---> と記されたされた行にカーソルを移動しましょう。
+ 2. 以下の ---> と示された行にカーソルを移動しましょう。
3. 消したい単語の先頭にカーソルを移動しましょう。
@@ -154,7 +201,7 @@ NOTE: <ESC> キーを押すとノーマルモードに移行します。その際、間違ったり入力途中
---> この 文 紙 には いくつかの たのしい 必要のない 単語 が 含まれて います。
- 5. 3 から 4 までを文が正しくなるまで繰り返し、レッスン 2.2 に移りましょう。
+ 5. 3 から 4 までを文が正しくなるまで繰り返し、レッスン 2.2 へ進みましょう。
@@ -166,7 +213,7 @@ NOTE: <ESC> キーを押すとノーマルモードに移行します。その際、間違ったり入力途中
1. ノーマルモードであることを確認するのに <ESC> を押しましょう。
- 2. 以下の ---> と記されたされた行にカーソルを移動しましょう。
+ 2. 以下の ---> と示された行にカーソルを移動しましょう。
3. 正しい文の末尾へカーソルを移動しましょう(最初の . の後です)。
@@ -175,77 +222,123 @@ NOTE: <ESC> キーを押すとノーマルモードに移行します。その際、間違ったり入力途中
---> 誰かがこの行の最後を2度タイプしました。 2度タイプしました。
- 5. どういうことか理解するために、レッスン 2.3 へ移りましょう。
+ 5. どういうことか理解するために、レッスン 2.3 へ進みましょう。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Lesson 2.3: コマンドと目的語
+ レッスン 2.3: オペレータとモーション
+
+ 多くのコマンドはオペレータとモーションからテキストに変更を加ます。
+ 削除コマンド d のオペレータは次の様になっています:
- 削除コマンド d の形式は次の様になっています:
+ d モーション
- [回数] d 目的語 もしくは d [回数] 目的語
それぞれ:
- 回数 - そのコマンドを何回繰り返すか(省略可能, 省略した時は =1)。
- d - 削除コマンド。
- 目的語 - 何に対して働きかけるか(以下に挙げます)。
+ d - 削除コマンド。
+ モーション - 何に対して働きかけるか(以下に挙げます)。
- 目的語一覧:
+ オペレータの一部一覧:
w - カーソル位置から空白を含む単語の末尾まで。
e - カーソル位置から空白を含まない単語の末尾まで。
$ - カーソル位置から行末まで。
-NOTE: 冒険したい人は、ノーマルモードにてコマンドなしに目的語を押して
+ つまり de とタイプすると、カーソル位置から単語の終わりまでを削除します。
+
+NOTE: 冒険したい人は、ノーマルモードにてコマンドなしにモーションを押して
みましょう。カーソルが目的語一覧で示される位置に移動するはずです。
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ レッスン 2.4: モーションにカウントを使用する
+
+
+ ** 何回も行いたい繰り返しのモーションの前に数値をタイプします。 **
+
+ 1. 以下の ---> と示された業の先頭にカーソルを移動します。
+
+ 2. 2dw をタイプして単語2つ分移動します。
+
+ 3. 3e をタイプして3つ目の単語の終端に移動します。
+
+ 4. 0 (ゼロ)をタイプして行頭に移動します。
+
+ 5. ステップ 2 と 3 を違う数値と使って繰り返します。
+
+---> This is just a line with words you can move around in.
+
+ 6. レッスン 2.5 に進みましょう。
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- レッスン 2.4: それ以外の形のコマンド
+ レッスン 2.5: より多くを削除するためにカウントを使用する
+
+
+ ** オペレータとカウントをタイプすると、その操作が複数回繰り返されます。 **
+
+ 既述の削除のオペレータとモーションの組み合わせにカウントを追加することで、
+ より多くの削除が行えます:
+ d 数値 モーション
+
+ 1. ---> と示された行の行頭部分にカーソルを移動しましょう。
+
+ 2. UPPER CASE の単語2つを 2dw とタイプして削除します。
+
+ 3. UPPER CASE という連続した単語を、1つのコマンドと異なるカウントを指定し、
+ ステップ 1 と 2 を繰り返します。
+
+---> このABC DE行のFGHI JK LMN OP単語はQ RS TUV綺麗になった。
+
+NOTE: オペレータ d とモーションの間にカウントを使った場合、オペレータのない
+ 場合のモーションのように動作します。
+ 例: 3dw と d3w は同等で、3w を削除します。
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ レッスン 2.6: 行の操作
+
+ ** 行全体を削除するには dd とタイプします **
- ** 行全体を削除するには dd とタイプしましょう **
+ 行全体を削除する頻度が多いので、Viのデザイナーは行の削除を d の2回タイプと
+ いう簡単なものに決めました。
- 行全体の削除は頻繁に行なう作業なので、Vim の設計者は行を削除するのには、
- 単に列内にて2回 d をタイプする方が簡単だろうと判断しました。
+ 1. 以下の句の2行目にカーソルを移動します。
+ 2. dd とタイプして行を削除します。
+ 3. さらに4行目に移動します。
+ 4. 2dd とタイプして2行を削除します。
- 1. 下にある一連のフレーズの2行目にカーソルを移動しましょう。
- 2. dd とタイプして行を削除しましょう。
- 3. では4行目に移動してみましょう。
- 4. 2dd とタイプして2行削除してみましょう。
- (回数-コマンド-目的語 の形式を思い出しましょう)
+---> 1) バラは赤い、
+---> 2) つまらないものは楽しい、
+---> 3) スミレは青い、
+---> 4) 私は車をもっている、
+---> 5) 時計が時刻を告げる、
+---> 6) 砂糖は甘い
+---> 7) オマエモナー
- 1) バラは赤い、
- 2) つまらないものは楽しい、
- 3) スミレは青い、
- 4) 私は車をもっている、
- 5) 時計が時刻を告げる、
- 6) 砂糖は甘い
- 7) オマエモナー
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- レッスン 2.5: やり直しコマンド
+ レッスン 2.7: やり直しコマンド
** 最後のコマンドを取り消すには u を押します。U は行全体の取消です。 **
- 1. 以下の ---> と記されたされた行にカーソルを移動し、最初の間違いにカーソル
- を移動しましょう。
+ 1. 以下の ---> と示された行にカーソルを移動し、最初の間違いにカーソ
+ ルを移動しましょう。
2. x をタイプしていらない先頭の文字を削除しましょう。
3. さぁ、u をタイプして最後に実行したコマンドを取り消しましょう。
4. 今度は、x を使用して誤りを全て修正しましょう。
5. 大文字の U をタイプして、行を元の状態に戻しましょう。
6. u をタイプして直前の U コマンドを取消しましょう。
- 7. ではコマンドを再実行するのに CTRL-R (CTRL を押したまま R を打つ)を
- 数回タイプしてみましょう(取消の取消)。
+ 7. ではコマンドを再実行するのに CTRL-R (CTRL を押したまま R を打つ)を数回
+ タイプしてみましょう(取消の取消)。
---> このの行のの間違いを修正々し、後でそれらの修正をを取消しまますす。
- 8. これはとても便利なコマンドです。さぁレッスン 2 要約に移りましょう。
+ 8. これはとても便利なコマンドです。さぁレッスン 2 要約へ進みましょう。
@@ -255,24 +348,24 @@ NOTE: 冒険したい人は、ノーマルモードにてコマンドなしに目的語を押して
1. カーソル位置から単語の末尾までを削除するには dw とタイプします。
-
2. カーソル位置から行の末尾までを削除するには d$ とタイプします。
-
3. 行全体を削除するには dd とタイプします。
- 4. ノーマルモードでのコマンド形式は
+ 4. モーションを繰り返すには数値を付与します: 2w
+ 5. 変更に用いるコマンドの形式は
+ オペレータ [数値] モーション
- [回数] コマンド 目的語 もしくは コマンド [回数] 目的語
それぞれ:
- 回数 - そのコマンド