From 7566335e069d9fc18143ec6fe2e1504a792d6273 Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Sat, 30 Jan 2016 00:17:28 +0900 Subject: [PATCH 01/11] start to catch up project --- catchup-7.4.1194.md | 73 +++ en/autocmd.txt | 21 +- en/change.txt | 74 ++- en/cmdline.txt | 7 +- en/develop.txt | 53 ++- en/editing.txt | 25 +- en/eval.txt | 450 ++++++++++++++++-- en/filetype.txt | 5 +- en/fold.txt | 23 +- en/hangulin.txt | 51 +- en/help.txt | 12 +- en/if_lua.txt | 110 ++++- en/if_mzsch.txt | 27 +- en/if_perl.txt | 10 +- en/if_pyth.txt | 22 +- en/if_ruby.txt | 61 ++- en/if_tcl.txt | 24 +- en/index.txt | 19 +- en/insert.txt | 37 +- en/map.txt | 39 +- en/mlang.txt | 10 +- en/netbeans.txt | 13 +- en/options.txt | 321 ++++++++++--- en/os_os2.txt | 214 +-------- en/pattern.txt | 22 +- en/pi_netrw.txt | 1094 +++++++++++++++++++++++++++++++------------ en/quickfix.txt | 2 +- en/quickref.txt | 20 +- en/repeat.txt | 40 +- en/spell.txt | 10 +- en/syntax.txt | 161 +++++-- en/tagsrch.txt | 31 +- en/term.txt | 34 +- en/usr_02.txt | 257 +++++++--- en/usr_03.txt | 13 +- en/usr_29.txt | 3 +- en/usr_41.txt | 17 +- en/usr_43.txt | 8 +- en/various.txt | 12 +- en/vi_diff.txt | 2 +- en/windows.txt | 148 ++++-- 41 files changed, 2601 insertions(+), 974 deletions(-) create mode 100644 catchup-7.4.1194.md diff --git a/catchup-7.4.1194.md b/catchup-7.4.1194.md new file mode 100644 index 000000000..cee943daa --- /dev/null +++ b/catchup-7.4.1194.md @@ -0,0 +1,73 @@ +# 7.4.1194 に追いつくプロジェクト + +ここらでいっちょ最新に追いつこうぜ、というプロジェクト。最低限、新機能のド +キュメントを未翻訳のままでも、日本語ファイルに組み入れてしまう。 + +最近Vim本体の更新が激しいので、多少のズレはでてしまうが、まずは気にせず1194を +ターゲットにする。 + +## 流れ + +1. 英語ファイルを全部更新 (終わった!) +2. 1の差分を見ながら、日本語ファイルに英文のまま反映 (最低限の目標) +3. 2の差分を翻訳 (できたらココまでやりたい) +4. このファイルを削除 + +## ファイル一覧 + +### 未作業 + +追いついたファイルは、下記の一覧から削除し、適切なセクションへ移動 + + doc/autocmd.jax + doc/change.jax + doc/cmdline.jax + doc/develop.jax + doc/editing.jax + doc/eval.jax + doc/filetype.jax + doc/fold.jax + doc/hangulin.jax + doc/help.jax + doc/if_lua.jax + doc/if_mzsch.jax + doc/if_perl.jax + doc/if_pyth.jax + doc/if_ruby.jax + doc/if_tcl.jax + doc/index.jax + doc/insert.jax + doc/map.jax + doc/mlang.jax + doc/netbeans.jax + doc/options.jax + doc/os_os2.jax + doc/pattern.jax + doc/pi_netrw.jax + doc/quickfix.jax + doc/quickref.jax + doc/repeat.jax + doc/spell.jax + doc/syntax.jax + doc/tagsrch.jax + doc/term.jax + doc/usr_02.jax + doc/usr_03.jax + doc/usr_29.jax + doc/usr_41.jax + doc/usr_43.jax + doc/various.jax + doc/vi_diff.jax + doc/windows.jax + +### 英文だけは反映済み + +まだない + +### 完訳! + +まだない + +### その他/深い事情があって断念したもの + +まだない diff --git a/en/autocmd.txt b/en/autocmd.txt index 18d47d9f7..4de5b1619 100644 --- a/en/autocmd.txt +++ b/en/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 7.4. Last change: 2014 Aug 22 +*autocmd.txt* For Vim version 7.4. Last change: 2015 Dec 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -506,6 +506,8 @@ ColorScheme After loading a color scheme. |:colorscheme| CompleteDone After Insert mode completion is done. Either when something was completed or abandoning completion. |ins-completion| + The |v:completed_item| variable contains + information about the completed item. *CursorHold* CursorHold When the user doesn't press a key for the time @@ -520,6 +522,11 @@ CursorHold When the user doesn't press a key for the time operator. While recording the CursorHold event is not triggered. |q| + ** + Internally the autocommand is triggered by the + key. In an expression mapping + |getchar()| may see this character. + Note: Interactive commands cannot be used for this event. There is no hit-enter prompt, the screen is updated directly (when needed). @@ -952,6 +959,13 @@ WinLeave Before leaving a window. If the window to be ============================================================================== 6. Patterns *autocmd-patterns* *{pat}* +The {pat} argument can be a comma separated list. This works as if the +command was given with each pattern separately. Thus this command: > + :autocmd BufRead *.txt,*.info set et +Is equivalent to: > + :autocmd BufRead *.txt set et + :autocmd BufRead *.info set et + The file pattern {pat} is tested for a match against the file name in one of two ways: 1. When there is no '/' in the pattern, Vim checks for a match against only @@ -1058,7 +1072,7 @@ Instead of a pattern buffer-local autocommands use one of these forms: Examples: > :au CursorHold echo 'hold' :au CursorHold echo 'hold' - :au CursorHold echo 'hold' + :au BufNewFile * au CursorHold echo 'hold' All the commands for autocommands also work with buffer-local autocommands, simply use the special string instead of the pattern. Examples: > @@ -1117,6 +1131,9 @@ name! :aug[roup] {name} Define the autocmd group name for the following ":autocmd" commands. The name "end" or "END" selects the default group. + To avoid confusion, the name should be + different from existing {event} names, as this + most likely will not do what you intended. *:augroup-delete* *E367* :aug[roup]! {name} Delete the autocmd group {name}. Don't use diff --git a/en/change.txt b/en/change.txt index 3a8107ecd..ac1b8b686 100644 --- a/en/change.txt +++ b/en/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 7.4. Last change: 2015 Sep 06 +*change.txt* For Vim version 7.4. Last change: 2016 Jan 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -416,9 +416,14 @@ CTRL-X Subtract [count] from the number or alphabetic additional [count] (so effectively creating a [count] decrementing sequence). {not in Vi} -The CTRL-A and CTRL-X commands work for (signed) decimal numbers, unsigned -octal and hexadecimal numbers and alphabetic characters. This depends on the -'nrformats' option. +The CTRL-A and CTRL-X commands can work for: +- signed and unsigned decimal numbers +- unsigned binary, octal and hexadecimal numbers +- alphabetic characters + +This depends on the 'nrformats' option: +- When 'nrformats' includes "bin", Vim assumes numbers starting with '0b' or + '0B' are binary. - When 'nrformats' includes "octal", Vim considers numbers starting with a '0' to be octal, unless the number includes a '8' or '9'. Other numbers are decimal and may have a preceding minus sign. @@ -433,8 +438,8 @@ octal and hexadecimal numbers and alphabetic characters. This depends on the index. For decimals a leading negative sign is considered for incrementing/ -decrementing, for octal and hex values, it won't be considered. -To ignore the sign Visually select the number before using CTRL-A or CTRL-X. +decrementing, for binary, octal and hex values, it won't be considered. To +ignore the sign Visually select the number before using CTRL-A or CTRL-X. For numbers with leading zeros (including all octal and hexadecimal numbers), Vim preserves the number of characters in the number when possible. CTRL-A on @@ -447,6 +452,10 @@ octal number. Note that when 'nrformats' includes "octal", decimal numbers with leading zeros cause mistakes, because they can be confused with octal numbers. +Note similarly, when 'nrformats' includes "bin", binary numbers with a leading +'0x' or '0X' can be interpreted as hexadecimal rather than binary since '0b' +are valid hexadecimal digits. + The CTRL-A command is very useful in a macro. Example: Use the following steps to make a numbered list. @@ -863,6 +872,36 @@ either the first or second pattern in parentheses did not match, so either :s/\([ab]\)\|\([cd]\)/\1x/g modifies "a b c d" to "ax bx x x" < + *:sc* *:sce* *:scg* *:sci* *:scI* *:scl* *:scp* *:sg* *:sgc* + *:sge* *:sgi* *:sgI* *:sgl* *:sgn* *:sgp* *:sgr* *:sI* *:si* + *:sic* *:sIc* *:sie* *:sIe* *:sIg* *:sIl* *:sin* *:sIn* *:sIp* + *:sip* *:sIr* *:sir* *:sr* *:src* *:srg* *:sri* *:srI* *:srl* + *:srn* *:srp* +2-letter and 3-letter :substitute commands ~ + + List of :substitute commands + | c e g i I n p l r + | c :sc :sce :scg :sci :scI :scn :scp :scl --- + | e + | g :sgc :sge :sg :sgi :sgI :sgn :sgp :sgl :sgr + | i :sic :sie --- :si :siI :sin :sip --- :sir + | I :sIc :sIe :sIg :sIi :sI :sIn :sIp :sIl :sIr + | n + | p + | l + | r :src --- :srg :sri :srI :srn :srp :srl :sr + +Exceptions: + :scr is `:scriptnames` + :se is `:set` + :sig is `:sign` + :sil is `:silent` + :sn is `:snext` + :sp is `:split` + :sl is `:sleep` + :sre is `:srewind` + + Substitute with an expression *sub-replace-expression* *sub-replace-\=* *s/\=* When the substitute string starts with "\=" the remainder is interpreted as an @@ -968,7 +1007,7 @@ inside of strings can change! Also see 'softtabstop' option. > :reg[isters] {arg} Display the contents of the numbered and named registers that are mentioned in {arg}. For example: > - :dis 1a + :reg 1a < to display registers '1' and 'a'. Spaces are allowed in {arg}. {not in Vi} @@ -1706,7 +1745,7 @@ Vim has a sorting function and a sorting command. The sorting function can be found here: |sort()|, |uniq()|. *:sor* *:sort* -:[range]sor[t][!] [i][u][r][n][x][o] [/{pattern}/] +:[range]sor[t][!] [b][f][i][n][o][r][u][x] [/{pattern}/] Sort lines in [range]. When no range is given all lines are sorted. @@ -1714,10 +1753,18 @@ found here: |sort()|, |uniq()|. With [i] case is ignored. + Options [n][f][x][o][b] are mutually exclusive. + With [n] sorting is done on the first decimal number in the line (after or inside a {pattern} match). One leading '-' is included in the number. + With [f] sorting is done on the Float in the line. + The value of Float is determined similar to passing + the text (after or inside a {pattern} match) to + str2float() function. This option is available only + if Vim was compiled with Floating point support. + With [x] sorting is done on the first hexadecimal number in the line (after or inside a {pattern} match). A leading "0x" or "0X" is ignored. @@ -1726,10 +1773,13 @@ found here: |sort()|, |uniq()|. With [o] sorting is done on the first octal number in the line (after or inside a {pattern} match). - With [u] only keep the first of a sequence of - identical lines (ignoring case when [i] is used). - Without this flag, a sequence of identical lines - will be kept in their original order. + With [b] sorting is done on the first binary number in + the line (after or inside a {pattern} match). + + With [u] (u stands for unique) only keep the first of + a sequence of identical lines (ignoring case when [i] + is used). Without this flag, a sequence of identical + lines will be kept in their original order. Note that leading and trailing white space may cause lines to be different. diff --git a/en/cmdline.txt b/en/cmdline.txt index 619717102..818667876 100644 --- a/en/cmdline.txt +++ b/en/cmdline.txt @@ -1,4 +1,4 @@ -*cmdline.txt* For Vim version 7.4. Last change: 2015 Sep 25 +*cmdline.txt* For Vim version 7.4. Last change: 2015 Dec 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -101,6 +101,11 @@ CTRL-E or *c_CTRL-E* *c_* *c_End* *c_* Move the cursor to the position of the mouse click. + *c_* + Paste the contents of the clipboard (for X11 the primary + selection). This is similar to using CTRL-R *, but no CR + characters are inserted between lines. + CTRL-H *c_* *c_CTRL-H* *c_BS* Delete the character in front of the cursor (see |:fixdel| if your key does not do what you want). diff --git a/en/develop.txt b/en/develop.txt index 6e6feb32d..34ff38d15 100644 --- a/en/develop.txt +++ b/en/develop.txt @@ -1,4 +1,4 @@ -*develop.txt* For Vim version 7.4. Last change: 2014 Mar 27 +*develop.txt* For Vim version 7.4. Last change: 2016 Jan 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -166,12 +166,27 @@ This list is not complete. Look in the source code for more examples. MAKING CHANGES *style-changes* The basic steps to make changes to the code: -1. Adjust the documentation. Doing this first gives you an impression of how +1. Get the code from github. That makes it easier to keep your changed + version in sync with the main code base (it may be a while before your + changes will be included). You do need to spend some time learning git, + it's not the most user friendly tool. +2. Adjust the documentation. Doing this first gives you an impression of how your changes affect the user. -2. Make the source code changes. -3. Check ../doc/todo.txt if the change affects any listed item. -4. Make a patch with "diff -c" against the unmodified code and docs. -5. Make a note about what changed and include it with the patch. +3. Make the source code changes. +4. Check ../doc/todo.txt if the change affects any listed item. +5. Make a patch with "git diff". You can also create a pull request on + github, but it's the diff that matters. +6. Make a note about what changed, preferably mentioning the problem and the + solution. Send an email to the vim-dev maillist with an explanation and + include the diff. Or create a pull request on github. + + +C COMPILER *style-compiler* + +The minimal C compiler version supported is C89, also known as ANSI C. +Later standards don't add much and C89 is the widest supported. + +One restriction that this implies: no // comments, only /* comments */. USE OF COMMON FUNCTIONS *style-functions* @@ -197,7 +212,7 @@ NAMES *style-names* Function names can not be more than 31 characters long (because of VMS). -Don't use "delete" as a variable name, C++ doesn't like it. +Don't use "delete" or "this" as a variable name, C++ doesn't like it. Because of the requirement that Vim runs on as many systems as possible, we need to avoid using names that are already defined by the system. This is a @@ -288,6 +303,24 @@ OK: do a = 1; while (cond); +Wrong: if (cond) { + cmd; + cmd; + } else { + cmd; + cmd; + } + +OK: if (cond) + { + cmd; + cmd; + } + else + { + cmd; + cmd; + } Functions start with: @@ -299,9 +332,9 @@ OK: /* * Return value explanation. */ int - function_name(arg1, arg2) - int arg1; /* short comment about arg1 */ - int arg2; /* short comment about arg2 */ + function_name( + int arg1, /* short comment about arg1 */ + int arg2) /* short comment about arg2 */ { int local; /* comment about local */ diff --git a/en/editing.txt b/en/editing.txt index 5666e68b5..a1d0e14c5 100644 --- a/en/editing.txt +++ b/en/editing.txt @@ -1,4 +1,4 @@ -*editing.txt* For Vim version 7.4. Last change: 2015 Aug 25 +*editing.txt* For Vim version 7.4. Last change: 2016 Jan 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -78,7 +78,9 @@ g CTRL-G Prints the current position of the cursor in five than one position on the screen ( or special character), both the "real" column and the screen column are shown, separated with a dash. - See also 'ruler' option. {not in Vi} + Also see the 'ruler' option and the |wordcount()| + function. + {not in Vi} *v_g_CTRL-G* {Visual}g CTRL-G Similar to "g CTRL-G", but Word, Character, Line, and @@ -637,6 +639,7 @@ list of the current window. :0argadd x x a b c :1argadd x a x b c :$argadd x a b c x + And after the last one: :+2argadd y a b c x y There is no check for duplicates, it is possible to add a file to the argument list twice. @@ -1105,10 +1108,10 @@ The names can be in upper- or lowercase. the last file in the argument list has not been edited. See |:confirm| and 'confirm'. {not in Vi} -:q[uit]! Quit without writing, also when currently visible - buffers have changes. Does not exit when this is the - last window and there is a changed hidden buffer. - In this case, the first changed hidden buffer becomes +:q[uit]! Quit without writing, also when the current buffer has + changes. If this is the last window and there is a + modified hidden buffer, the current buffer is + abandoned and the first changed hidden buffer becomes the current buffer. Use ":qall!" to exit always. @@ -1456,6 +1459,16 @@ using zip, "[blowfish]" when using blowfish, etc. When writing an undo file, the same key and method will be used for the text in the undo file. |persistent-undo|. +To test for blowfish support you can use these conditions: > + has('crypt-blowfish') + has('crypt-blowfish2') +This works since Vim 7.4.1099 while blowfish support was added earlier. +Thus the condition failing doesn't mean blowfish is not supported. You can +test for blowfish with: > + v:version >= 703 +And for blowfish2 with: > + v:version > 704 || (v:version == 704 && has('patch401')) +< *E817* *E818* *E819* *E820* When encryption does not work properly, you would be able to write your text to a file and never be able to read it back. Therefore a test is performed to diff --git a/en/eval.txt b/en/eval.txt index 5f4f5e61a..959098abb 100644 --- a/en/eval.txt +++ b/en/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.4. Last change: 2015 Jun 26 +*eval.txt* For Vim version 7.4. Last change: 2016 Jan 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -68,14 +68,16 @@ the Number. Examples: Number 0 --> String "0" ~ Number -1 --> String "-1" ~ *octal* -Conversion from a String to a Number is done by converting the first digits -to a number. Hexadecimal "0xf9" and Octal "017" numbers are recognized. If -the String doesn't start with digits, the result is zero. Examples: +Conversion from a String to a Number is done by converting the first digits to +a number. Hexadecimal "0xf9", Octal "017", and Binary "0b10" numbers are +recognized. If the String doesn't start with digits, the result is zero. +Examples: String "456" --> Number 456 ~ String "6bar" --> Number 6 ~ String "foo" --> Number 0 ~ String "0xf1" --> Number 241 ~ String "0100" --> Number 64 ~ + String "0b101" --> Number 5 ~ String "-8" --> Number -8 ~ String "+8" --> Number 0 ~ @@ -101,6 +103,9 @@ When mixing Number and Float the Number is converted to Float. Otherwise there is no automatic conversion of Float. You can use str2float() for String to Float, printf() for Float to String and float2nr() for Float to Number. + *E891* *E892* *E893* *E894* +When expecting a Float a Number can also be used, but nothing else. + *E706* *sticky-type-checking* You will get an error if you try to change the type of a variable. You need to |:unlet| it first to avoid this error. String and Number are considered @@ -865,13 +870,13 @@ expr1'th single byte from expr8. expr8 is used as a String, expr1 as a Number. This doesn't recognize multi-byte encodings, see |byteidx()| for an alternative. -Index zero gives the first character. This is like it works in C. Careful: -text column numbers start with one! Example, to get the character under the +Index zero gives the first byte. This is like it works in C. Careful: +text column numbers start with one! Example, to get the byte under the cursor: > :let c = getline(".")[col(".") - 1] If the length of the String is less than the index, the result is an empty -String. A negative index always results in an empty string (reason: backwards +String. A negative index always results in an empty string (reason: backward compatibility). Use [-1:] to get the last byte. If expr8 is a |List| then it results the item at index expr1. See |list-index| @@ -917,6 +922,11 @@ just above, except that indexes out of range cause an error. Examples: > Using expr8[expr1] or expr8[expr1a : expr1b] on a |Funcref| results in an error. +Watch out for confusion between a namespace and a variable followed by a colon +for a sublist: > + mylist[n:] " uses variable n + mylist[s:] " uses namespace s:, error! + expr8.name entry in a |Dictionary| *expr-entry* @@ -1330,6 +1340,12 @@ v:cmdbang Set like v:cmdarg for a file read/write command. When a "!" can only be used in autocommands. For user commands || can be used. + *v:completed_item* *completed_item-variable* +v:completed_item + |Dictionary| containing the |complete-items| for the most + recently completed word after |CompleteDone|. The + |Dictionary| is empty if the completion failed. + *v:count* *count-variable* v:count The count given for the last Normal mode command. Can be used to get the count before a mapping. Read-only. Example: > @@ -1373,6 +1389,15 @@ v:errmsg Last given error message. It's allowed to set this variable. : ... handle error < "errmsg" also works, for backwards compatibility. + *v:errors* *errors-variable* +v:errors Errors found by assert functions, such as |assert_true()|. + This is a list of strings. + The assert functions append an item when an assert fails. + To remove old results make it empty: > + :let v:errors = [] +< If v:errors is set to anything but a list it is made an empty + list by the assert function. + *v:exception* *exception-variable* v:exception The value of the exception most recently caught and not finished. See also |v:throwpoint| and |throw-variables|. @@ -1384,6 +1409,13 @@ v:exception The value of the exception most recently caught and not :endtry < Output: "caught oops". + *v:false* *false-variable* +v:false A Number with value zero. Used to put "false" in JSON. See + |jsonencode()|. + When used as a string this evaluates to "false". > + echo v:false +< false ~ + *v:fcs_reason* *fcs_reason-variable* v:fcs_reason The reason why the |FileChangedShell| event was triggered. Can be used in an autocommand to decide what to do and/or what @@ -1460,9 +1492,11 @@ v:foldstart Used for 'foldtext': first line of closed fold. v:hlsearch Variable that indicates whether search highlighting is on. Setting it makes sense only if 'hlsearch' is enabled which requires |+extra_search|. Setting this variable to zero acts - the like |:nohlsearch| command, setting it to one acts like > + like the |:nohlsearch| command, setting it to one acts like > let &hlsearch = &hlsearch -< +< Note that the value is restored when returning from a + function. |function-search-undo|. + *v:insertmode* *insertmode-variable* v:insertmode Used for the |InsertEnter| and |InsertChange| autocommand events. Values: @@ -1515,6 +1549,22 @@ v:mouse_col Column number for a mouse click obtained with |getchar()|. This is the screen column number, like with |virtcol()|. The value is zero when there was no mouse button click. + *v:none* *none-variable* +v:none An empty String. Used to put an empty item in JSON. See + |jsonencode()|. + When used as a number this evaluates to zero. + When used as a string this evaluates to "none". > + echo v:none +< none ~ + + *v:null* *null-variable* +v:null An empty String. Used to put "null" in JSON. See + |jsonencode()|. + When used as a number this evaluates to zero. + When used as a string this evaluates to "null". > + echo v:null +< null ~ + *v:oldfiles* *oldfiles-variable* v:oldfiles List of file names that is loaded from the |viminfo| file on startup. These are the files that Vim remembers marks for. @@ -1680,6 +1730,12 @@ v:throwpoint The point where the exception most recently caught and not :endtry < Output: "Exception from test.vim, line 2" + *v:true* *true-variable* +v:true A Number with value one. Used to put "true" in JSON. See + |jsonencode()|. + When used as a string this evaluates to "true". > + echo v:true +< true ~ *v:val* *val-variable* v:val Value of the current item of a |List| or |Dictionary|. Only valid while evaluating the expression used with |map()| and @@ -1720,15 +1776,22 @@ USAGE RESULT DESCRIPTION ~ abs( {expr}) Float or Number absolute value of {expr} acos( {expr}) Float arc cosine of {expr} add( {list}, {item}) List append {item} to |List| {list} +alloc_fail( {id}, {countdown}, {repeat}) + none make memory allocation fail and( {expr}, {expr}) Number bitwise AND append( {lnum}, {string}) Number append {string} below line {lnum} append( {lnum}, {list}) Number append lines {list} below line {lnum} argc() Number number of files in the argument list argidx() Number current index in the argument list -arglistid( [{winnr}, [ {tabnr}]]) +arglistid( [{winnr} [, {tabnr}]]) Number argument list id argv( {nr}) String {nr} entry of the argument list argv( ) List the argument list +assert_equal( {exp}, {act} [, {msg}]) none assert {exp} equals {act} +assert_exception({error} [, {msg}]) none assert {error} is in v:exception +assert_fails( {cmd} [, {error}]) none assert {cmd} fails +assert_false( {actual} [, {msg}]) none assert {actual} is false +assert_true( {actual} [, {msg}]) none assert {actual} is true asin( {expr}) Float arc sine of {expr} atan( {expr}) Float arc tangent of {expr} atan2( {expr}, {expr}) Float arc tangent of {expr1} / {expr2} @@ -1757,6 +1820,8 @@ complete_add( {expr}) Number add completion match complete_check() Number check for key typed during completion confirm( {msg} [, {choices} [, {default} [, {type}]]]) Number number of choice picked by user +connect( {address}, {mode} [, {callback}]) + Number open a channel copy( {expr}) any make a shallow copy of {expr} cos( {expr}) Float cosine of {expr} cosh( {expr}) Float hyperbolic cosine of {expr} @@ -1768,7 +1833,7 @@ cursor( {lnum}, {col} [, {off}]) Number move cursor to {lnum}, {col}, {off} cursor( {list}) Number move cursor to position in {list} deepcopy( {expr} [, {noref}]) any make a full copy of {expr} -delete( {fname}) Number delete file {fname} +delete( {fname} [, {flags}]) Number delete the file or directory {fname} did_filetype() Number TRUE if FileType autocommand event used diff_filler( {lnum}) Number diff filler lines about {lnum} diff_hlID( {lnum}, {col}) Number diff highlighting at {lnum}/{col} @@ -1814,12 +1879,13 @@ getbufvar( {expr}, {varname} [, {def}]) any variable {varname} in buffer {expr} getchar( [expr]) Number get one character from the user getcharmod( ) Number modifiers for the last typed character +getcharsearch() Dict last character search getcmdline() String return the current command-line getcmdpos() Number return cursor position in command-line getcmdtype() String return current command-line type getcmdwintype() String return current command-line window type getcurpos() List position of the cursor -getcwd() String the current working directory +getcwd( [{winnr} [, {tabnr}]]) String get the current working directory getfontname( [{name}]) String name of font being used getfperm( {fname}) String file permissions of file {fname} getfsize( {fname}) Number size in bytes of file {fname} @@ -1850,7 +1916,8 @@ globpath( {path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]]) String do glob({expr}) for all dirs in {path} has( {feature}) Number TRUE if feature {feature} supported has_key( {dict}, {key}) Number TRUE if {dict} has entry {key} -haslocaldir() Number TRUE if current window executed |:lcd| +haslocaldir( [{winnr} [, {tabnr}]]) + Number TRUE if the window executed |:lcd| hasmapto( {what} [, {mode} [, {abbr}]]) Number TRUE if mapping to {what} exists histadd( {history},{item}) String add an item to a history @@ -1877,6 +1944,8 @@ isdirectory( {directory}) Number TRUE if {directory} is a directory islocked( {expr}) Number TRUE if {expr} is locked items( {dict}) List key-value pairs in {dict} join( {list} [, {sep}]) String join {list} items into one String +jsondecode( {string}) any decode JSON +jsonencode( {expr}) String encode JSON keys( {dict}) List keys in {dict} len( {expr}) Number the length of {expr} libcall( {lib}, {func}, {arg}) String call {func} in library {lib} with {arg} @@ -1918,6 +1987,7 @@ nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum} nr2char( {expr}[, {utf8}]) String single char with ASCII/UTF8 value {expr} or( {expr}, {expr}) Number bitwise OR pathshorten( {expr}) String shorten directory names in a path +perleval( {expr}) any evaluate |Perl| expression pow( {x}, {y}) Float {x} to the power of {y} prevnonblank( {lnum}) Number line nr of non-blank line <= {lnum} printf( {fmt}, {expr1}...) String format text @@ -1959,10 +2029,15 @@ searchpairpos( {start}, {middle}, {end} [, {flags} [, {skip} [...]]]) List search for other end of start/end pair searchpos( {pattern} [, {flags} [, {stopline} [, {timeout}]]]) List search for {pattern} +sendexpr( {handle}, {expr} [, {callback}]) + any send {expr} over JSON channel {handle} +sendraw( {handle}, {string} [, {callback}]) + any send {string} over raw channel {handle} server2client( {clientid}, {string}) Number send reply string serverlist() String get a list of available servers setbufvar( {expr}, {varname}, {val}) set {varname} in buffer {expr} to {val} +setcharsearch( {dict}) Dict set character search from {dict} setcmdpos( {pos}) Number set cursor position in command-line setline( {lnum}, {line}) Number set line {lnum} to {line} setloclist( {nr}, {list}[, {action}]) @@ -2051,6 +2126,7 @@ winrestcmd() String returns command to restore window sizes winrestview( {dict}) none restore view of current window winsaveview() Dict save view of current window winwidth( {nr}) Number width of window {nr} +wordcount() Dict get byte/char/word statistics writefile( {list}, {fname} [, {flags}]) Number write list of lines to file {fname} xor( {expr}, {expr}) Number bitwise XOR @@ -2093,6 +2169,13 @@ add({list}, {expr}) *add()* Use |insert()| to add an item at another position. +alloc_fail({id}, {countdown}, {repeat}) *alloc_fail()* + This is for testing: If the memory allocation with {id} is + called, then decrement {countdown}, and when it reaches zero + let memory allocation fail {repeat} times. When {repeat} is + smaller than one it fails one time. + + and({expr}, {expr}) *and()* Bitwise AND on the two arguments. The arguments are converted to a number. A List, Dict or Float argument causes an error. @@ -2144,6 +2227,55 @@ argv([{nr}]) The result is the {nr}th file in the argument list of the < Without the {nr} argument a |List| with the whole |arglist| is returned. + *assert_equal()* +assert_equal({expected}, {actual} [, {msg}]) + When {expected} and {actual} are not equal an error message is + added to |v:errors|. + There is no automatic conversion, the String "4" is different + from the Number 4. And the number 4 is different from the + Float 4.0. The value of 'ignorecase' is not used here, case + always matters. + When {msg} is omitted an error in the form "Expected + {expected} but got {actual}" is produced. + Example: > + assert_equal('foo', 'bar') +< Will result in a string to be added to |v:errors|: + test.vim line 12: Expected 'foo' but got 'bar' ~ + +assert_exception({error} [, {msg}]) *assert_exception()* + When v:exception does not contain the string {error} an error + message is added to |v:errors|. + This can be used to assert that a command throws an exception. + Using the error number, followed by a colon, avoids problems + with translations: > + try + commandthatfails + call assert_false(1, 'command should have failed') + catch + call assert_exception('E492:') + endtry + +assert_fails({cmd} [, {error}]) *assert_fails()* + Run {cmd} and add an error message to |v:errors| if it does + NOT produce an error. + When {error} is given it must match |v:errmsg|. + +assert_false({actual} [, {msg}]) *assert_false()* + When {actual} is not false an error message is added to + |v:errors|, like with |assert_equal()|. + A value is false when it is zero. When "{actual}" is not a + number the assert fails. + When {msg} is omitted an error in the form "Expected False but + got {actual}" is produced. + +assert_true({actual} [, {msg}]) *assert_true()* + When {actual} is not true an error message is added to + |v:errors|, like with |assert_equal()|. + A value is true when it is a non-zero number. When {actual} + is not a number the assert fails. + When {msg} is omitted an error in the form "Expected True but + got {actual}" is produced. + asin({expr}) *asin()* Return the arc sine of {expr} measured in radians, as a |Float| in the range of [-pi/2, pi/2]. @@ -2534,6 +2666,18 @@ confirm({msg} [, {choices} [, {default} [, {type}]]]) don't fit, a vertical layout is used anyway. For some systems the horizontal layout is always used. +connect({address}, {mode} [, {callback}]) *connect()* + Open a channel to {address}. See |channel|. + + {address} has the form "hostname:port", e.g., + "localhost:8765". + + {mode} is either "json" or "raw". See |channel-mode| for the + meaning. + + {callback} is a function that handles received messages on the + channel. See |channel-callback|. + *copy()* copy({expr}) Make a copy of {expr}. For Numbers and Strings this isn't different from using {expr} directly. @@ -2663,10 +2807,20 @@ deepcopy({expr}[, {noref}]) *deepcopy()* *E698* {noref} set to 1 will fail. Also see |copy()|. -delete({fname}) *delete()* - Deletes the file by the name {fname}. The result is a Number, - which is 0 if the file was deleted successfully, and non-zero - when the deletion failed. +delete({fname} [, {flags}]) *delete()* + Without {flags} or with {flags} empty: Deletes the file by the + name {fname}. This also works when {fname} is a symbolic link. + + When {flags} is "d": Deletes the directory by the name + {fname}. This fails when directory {fname} is not empty. + + When {flags} is "rf": Deletes the directory by the name + {fname} and everything in it, recursively. BE CAREFUL! + A symbolic link itself is deleted, not what it points to. + + The result is a Number, which is 0 if the delete operation was + successful and -1 when the deletion failed or partly failed. + Use |remove()| to delete an item from a |List|. To delete a line from the buffer use |:delete|. Use |:exe| when the line number is in a variable. @@ -2706,6 +2860,7 @@ empty({expr}) *empty()* Return the Number 1 if {expr} is empty, zero otherwise. A |List| or |Dictionary| is empty when it does not have any items. A Number is empty when its value is zero. + |v:false|, |v:none| and |v:null| are empty, |v:true| is not. For a long |List| this is much faster than comparing the length with zero. @@ -2997,6 +3152,11 @@ feedkeys({string} [, {mode}]) *feedkeys()* if coming from a mapping. This matters for undo, opening folds, etc. 'i' Insert the string instead of appending (see above). + 'x' Execute commands until typeahead is empty. This is + similar to using ":normal!". You can call feedkeys() + several times without 'x' and then one time with 'x' + (possibly with an empty {string}) to execute all the + typeahead. Return value is always 0. filereadable({file}) *filereadable()* @@ -3353,6 +3513,26 @@ getcharmod() *getcharmod()* character itself are obtained. Thus Shift-a results in "A" without a modifier. +getcharsearch() *getcharsearch()* + Return the current character search information as a {dict} + with the following entries: + + char character previously used for a character + search (|t|, |f|, |T|, or |F|); empty string + if no character search has been performed + forward direction of character search; 1 for forward, + 0 for backward + until type of character search; 1 for a |t| or |T| + character search, 0 for an |f| or |F| + character search + + This can be useful to always have |;| and |,| search + forward/backward regardless of the direction of the previous + character search: > + :nnoremap ; getcharsearch().forward ? ';' : ',' + :nnoremap , getcharsearch().forward ? ',' : ';' +< Also see |setcharsearch()|. + getcmdline() *getcmdline()* Return the current command-line. Only works when the command line is being edited, thus requires use of |c_CTRL-\_e| or @@ -3392,7 +3572,7 @@ getcmdwintype() *getcmdwintype()* *getcurpos()* getcurpos() Get the position of the cursor. This is like getpos('.'), but includes an extra item in the list: - [bufnum, lnum, col, off, curswant] + [bufnum, lnum, col, off, curswant] ~ The "curswant" number is the preferred column when moving the cursor vertically. This can be used to save and restore the cursor position: > @@ -3401,8 +3581,16 @@ getcurpos() Get the position of the cursor. This is like getpos('.'), but call setpos('.', save_cursor) < *getcwd()* -getcwd() The result is a String, which is the name of the current +getcwd([{winnr} [, {tabnr}]]) + The result is a String, which is the name of the current working directory. + Without arguments, for the current window. + + With {winnr} return the local current directory of this window + in the current tab page. + With {winnr} and {tabnr} return the local current directory of + the window in the specified tab page. + Return an empty string if the arguments are invalid. getfsize({fname}) *getfsize()* The result is a Number, which is the size in bytes of the @@ -3466,7 +3654,8 @@ getftype({fname}) *getftype()* getftype("/home") < Note that a type such as "link" will only be returned on systems that support it. On some systems only "dir" and - "file" are returned. + "file" are returned. On MS-Windows a symbolic link to a + directory returns "dir" instead of "link". *getline()* getline({lnum} [, {end}]) @@ -3690,7 +3879,9 @@ glob2regpat({expr}) *glob2regpat()* if filename =~ glob2regpat('Make*.mak') < This is equivalent to: > if filename =~ '^Make.*\.mak$' -< +< When {expr} is an empty string the result is "^$", match an + empty string. + *globpath()* globpath({path}, {expr} [, {nosuf} [, {list} [, {allinks}]]]) Perform glob() on all directories in {path} and concatenate @@ -3738,9 +3929,15 @@ has_key({dict}, {key}) *has_key()* The result is a Number, which is 1 if |Dictionary| {dict} has an entry with key {key}. Zero otherwise. -haslocaldir() *haslocaldir()* - The result is a Number, which is 1 when the current - window has set a local path via |:lcd|, and 0 otherwise. +haslocaldir([{winnr} [, {tabnr}]]) *haslocaldir()* + The result is a Number, which is 1 when the window has set a + local path via |:lcd|, and 0 otherwise. + + Without arguments use the current window. + With {winnr} use this window in the current tab page. + With {winnr} and {tabnr} use the window in the specified tab + page. + Return 0 if the arguments are invalid. hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()* The result is a Number, which is 1 if there is a mapping that @@ -4070,6 +4267,48 @@ join({list} [, {sep}]) *join()* converted into a string like with |string()|. The opposite function is |split()|. +jsondecode({string}) *jsondecode()* + This parses a JSON formatted string and returns the equivalent + in Vim values. See |jsonencode()| for the relation between + JSON and Vim values. + The decoding is permissive: + - A trailing comma in an array and object is ignored. + - An empty item in an array, two commas with nothing or white + space in between, results in v:none. + - When an object member name is not a string it is converted + to a string. E.g. the number 123 is used as the string + "123". + - More floating point numbers are recognized, e.g. "1." for + "1.0". + The result must be a valid Vim type: + - An empty object member name is not allowed. + - Duplicate object member names are not allowed. + +jsonencode({expr}) *jsonencode()* + Encode {expr} as JSON and return this as a string. + The encoding is specified in: + https://tools.ietf.org/html/rfc7159.html + Vim values are converted as follows: + Number decimal number + Float floating point number + String in double quotes (possibly null) + Funcref not possible, error + List as an array (possibly null); when + used recursively: [] + Dict as an object (possibly null); when + used recursively: {} + v:false "false" + v:true "true" + v:none nothing + v:null "null" + Note that using v:none is permitted, although the JSON + standard does not allow empty items. This can be useful for + omitting items in an array: + [0,,,,,5] ~ + This is much more efficient than: + [0,null,null,null,null,5] ~ + But a strict JSON parser will not accept it. + keys({dict}) *keys()* Return a |List| with all the keys of {dict}. The |List| is in arbitrary order. @@ -4397,7 +4636,7 @@ match({expr}, {pat}[, {start}[, {count}]]) *match()* done like 'magic' is set and 'cpoptions' is empty. *matchadd()* *E798* *E799* *E801* -matchadd({group}, {pattern}[, {priority}[, {id}]]) +matchadd({group}, {pattern}[, {priority}[, {id} [, {dict}]]]) Defines a pattern to be highlighted in the current window (a "match"). It will be highlighted with {group}. Returns an identification number (ID), which can be used to delete the @@ -4405,6 +4644,8 @@ matchadd({group}, {pattern}[, {priority}[, {id}]]) Matching is case sensitive and magic, unless case sensitivity or magicness are explicitly overridden in {pattern}. The 'magic', 'smartcase' and 'ignorecase' options are not used. + The "Conceal" value is special, it causes the match to be + concealed. The optional {priority} argument assigns a priority to the match. A match with a high priority will have its @@ -4422,9 +4663,18 @@ matchadd({group}, {pattern}[, {priority}[, {id}]]) message will appear and the match will not be added. An ID is specified as a positive integer (zero excluded). IDs 1, 2 and 3 are reserved for |:match|, |:2match| and |:3match|, - respectively. If the {id} argument is not specified, + respectively. If the {id} argument is not specified or -1, |matchadd()| automatically chooses a free ID. + The optional {dict} argument allows for further custom + values. Currently this is used to specify a match specific + conceal character that will be shown for |hl-Conceal| + highlighted matches. The dict can have the following members: + + conceal Special character to show instead of the + match (only for |hl-Conceal| highlighed + matches, see |:syn-cchar|) + The number of matches is not limited, as it is the case with the |:match| commands. @@ -4438,7 +4688,7 @@ matchadd({group}, {pattern}[, {priority}[, {id}]]) available from |getmatches()|. All matches can be deleted in one operation by |clearmatches()|. -matchaddpos({group}, {pos}[, {priority}[, {id}]]) *matchaddpos()* +matchaddpos({group}, {pos}[, {priority}[, {id}[, {dict}]]]) *matchaddpos()* Same as |matchadd()|, but requires a list of positions {pos} instead of a pattern. This command is faster than |matchadd()| because it does not require to handle regular expressions and @@ -4647,6 +4897,17 @@ pathshorten({expr}) *pathshorten()* < ~/.v/a/myfile.vim ~ It doesn't matter if the path exists or not. +perleval({expr}) *perleval()* + Evaluate Perl expression {expr} in scalar context and return + its result converted to Vim data structures. If value can't be + converted, it is returned as a string Perl representation. + Note: If you want an array or hash, {expr} must return a + reference to it. + Example: > + :echo perleval('[1 .. 4]') +< [1, 2, 3, 4] + {only available when compiled with the |+perl| feature} + pow({x}, {y}) *pow()* Return the power of {x} to the exponent {y} as a |Float|. {x} and {y} must evaluate to a |Float| or a |Number|. @@ -5144,14 +5405,15 @@ search({pattern} [, {flags} [, {stopline} [, {timeout}]]]) *search()* move. No error message is given. {flags} is a String, which can contain these character flags: - 'b' search backward instead of forward - 'c' accept a match at the cursor position + 'b' search Backward instead of forward + 'c' accept a match at the Cursor position 'e' move to the End of the match 'n' do Not move the cursor - 'p' return number of matching sub-pattern (see below) - 's' set the ' mark at the previous location of the cursor - 'w' wrap around the end of the file - 'W' don't wrap around the end of the file + 'p' return number of matching sub-Pattern (see below) + 's' Set the ' mark at the previous location of the cursor + 'w' Wrap around the end of the file + 'W' don't Wrap around the end of the file + 'z' start searching at the cursor column instead of zero If neither 'w' or 'W' is given, the 'wrapscan' option applies. If the 's' flag is supplied, the ' mark is set, only if the @@ -5159,6 +5421,12 @@ search({pattern} [, {flags} [, {stopline} [, {timeout}]]]) *search()* flag. 'ignorecase', 'smartcase' and 'magic' are used. + + When the 'z' flag is not given, searching always starts in + column zero and then matches before the cursor are skipped. + When the 'c' flag is present in 'cpo' the next search starts + after the match. Without the 'c' flag the next search starts + one column further. When the {stopline} argument is given then the search stops after searching this line. This is useful to restrict the @@ -5345,6 +5613,23 @@ searchpos({pattern} [, {flags} [, {stopline} [, {timeout}]]]) *searchpos()* < In this example "submatch" is 2 when a lowercase letter is found |/\l|, 3 when an uppercase letter is found |/\u|. +sendexpr({handle}, {expr} [, {callback}]) *sendexpr()* + Send {expr} over JSON channel {handle}. See |channel-use|. + + When {callback} is given returns immediately. Without + {callback} waits for a JSON response and returns the decoded + expression. When there is an error or timeout returns an + empty string. + + When {callback} is zero no response is expected. + Otherwise {callback} must be a Funcref or the name of a + function. It is called when the response is received. See + |channel-callback|. + +sendraw({handle}, {string} [, {callback}]) *sendraw()* + Send {string} over raw channel {handle}. See |channel-raw|. + Works like |sendexpr()|, but does not decode the response. + server2client( {clientid}, {string}) *server2client()* Send a reply string to {clientid}. The most recent {clientid} that sent a string can be retrieved with expand(""). @@ -5378,6 +5663,26 @@ setbufvar({expr}, {varname}, {val}) *setbufvar()* :call setbufvar("todo", "myvar", "foobar") < This function is not available in the |sandbox|. +setcharsearch({dict}) *setcharsearch()* + Set the current character search information to {dict}, + which contains one or more of the following entries: + + char character which will be used for a subsequent + |,| or |;| command; an empty string clears the + character search + forward direction of character search; 1 for forward, + 0 for backward + until type of character search; 1 for a |t| or |T| + character search, 0 for an |f| or |F| + character search + + This can be useful to save/restore a user's character search + from a script: > + :let prevsearch = getcharsearch() + :" Perform a command which clobbers user's search + :call setcharsearch(prevsearch) +< Also see |getcharsearch()|. + setcmdpos({pos}) *setcmdpos()* Set the cursor position in the command line to byte position {pos}. The first position is 1. @@ -5627,18 +5932,8 @@ shellescape({string} [, {special}]) *shellescape()* shiftwidth() *shiftwidth()* Returns the effective value of 'shiftwidth'. This is the 'shiftwidth' value unless it is zero, in which case it is the - 'tabstop' value. To be backwards compatible in indent - plugins, use this: > - if exists('*shiftwidth') - func s:sw() - return shiftwidth() - endfunc - else - func s:sw() - return &sw - endfunc - endif -< And then use s:sw() instead of &sw. + 'tabstop' value. This function was introduced with patch + 7.3.694 in 2012, everybody should have it by now. simplify({filename}) *simplify()* @@ -5699,6 +5994,13 @@ sort({list} [, {func} [, {dict}]]) *sort()* *E702* strtod() function to parse numbers, Strings, Lists, Dicts and Funcrefs will be considered as being 0). + When {func} is given and it is 'N' then all items will be + sorted numerical. This is like 'n' but a string containing + digits will be used as the number they represent. + + When {func} is given and it is 'f' then all items will be + sorted numerical. All values must be a Number or a Float. + When {func} is a |Funcref| or a function name, this function is called to compare items. The function is invoked with two items as argument and must return zero if they are equal, 1 or @@ -5800,7 +6102,8 @@ split({expr} [, {pattern} [, {keepempty}]]) *split()* :let words = split(getline('.'), '\W\+') < To split a string in individual characters: > :for c in split(mystring, '\zs') -< If you want to keep the separator you can also use '\zs': > +< If you want to keep the separator you can also use '\zs' at + the end of the pattern: > :echo split('abc:def:ghi', ':\zs') < ['abc:', 'def:', 'ghi'] ~ Splitting a table where the first element can be empty: > @@ -5839,12 +6142,14 @@ str2float( {expr}) *str2float()* str2nr( {expr} [, {base}]) *str2nr()* Convert string {expr} to a number. - {base} is the conversion base, it can be 8, 10 or 16. + {base} is the conversion base, it can be 2, 8, 10 or 16. When {base} is omitted base 10 is used. This also means that a leading zero doesn't cause octal conversion to be used, as with the default String to Number conversion. When {base} is 16 a leading "0x" or "0X" is ignored. With a - different base the result will be zero. + different base the result will be zero. Similarly, when + {base} is 8 a leading "0" is ignored, and when {base} is 2 a + leading "0b" or "0B" is ignored. Text after the number is silently ignored. @@ -5856,6 +6161,24 @@ strchars({expr} [, {skipcc}]) *strchars()* When {skipcc} set to 1, Composing characters are ignored. Also see |strlen()|, |strdisplaywidth()| and |strwidth()|. + + {skipcc} is only available after 7.4.755. For backward + compatibility, you can define a wrapper function: > + if has("patch-7.4.755") + function s:strchars(str, skipcc) + return strchars(a:str, a:skipcc) + endfunction + else + function s:strchars(str, skipcc) + if a:skipcc + return strlen(substitute(a:str, ".", "x", "g")) + else + return strchars(a:str) + endif + endfunction + endif +< + strdisplaywidth({expr}[, {col}]) *strdisplaywidth()* The result is a Number, which is the number of display cells String {expr} occupies on the screen when it starts at {col}. @@ -6042,6 +6365,9 @@ synID({lnum}, {col}, {trans}) *synID()* {col} is 1 for the leftmost column, {lnum} is 1 for the first line. 'synmaxcol' applies, in a longer line zero is returned. + Note that when the position is after the last character, + that's where the cursor can be in Insert mode, synID() returns + zero. When {trans} is non-zero, transparent items are reduced to the item that they reveal. This is useful when wanting to know @@ -6351,6 +6677,8 @@ type({expr}) The result is a Number, depending on the type of {expr}: List: 3 Dictionary: 4 Float: 5 + Boolean: 6 (v:false and v:true) + None 7 (v:null and v:none) To avoid the magic numbers it should be used this way: > :if type(myvar) == type(0) :if type(myvar) == type("") @@ -6358,6 +6686,8 @@ type({expr}) The result is a Number, depending on the type of {expr}: :if type(myvar) == type([]) :if type(myvar) == type({}) :if type(myvar) == type(0.0) + :if type(myvar) == type(v:false) + :if type(myvar) == type(v:none undofile({name}) *undofile()* Return the name of the undo file that would be used for a file @@ -6603,6 +6933,28 @@ winwidth({nr}) *winwidth()* : exe "normal 50\|" :endif < +wordcount() *wordcount()* + The result is a dictionary of byte/chars/word statistics for + the current buffer. This is the same info as provided by + |g_CTRL-G| + The return value includes: + bytes Number of bytes in the buffer + chars Number of chars in the buffer + words Number of words in the buffer + cursor_bytes Number of bytes before cursor position + (not in Visual mode) + cursor_chars Number of chars before cursor position + (not in Visual mode) + cursor_words Number of words before cursor position + (not in Visual mode) + visual_bytes Number of bytes visually selected + (only in Visual mode) + visual_chars Number of chars visually selected + (only in Visual mode) + visual_words Number of chars visually selected + (only in Visual mode) + + *writefile()* writefile({list}, {fname} [, {flags}]) Write |List| {list} to file {fname}. Each list item is @@ -7446,7 +7798,7 @@ This does NOT work: > From Vim version 4.5 until 5.0, every Ex command in between the ":if" and ":endif" is ignored. These two commands were just to allow for future expansions in a - backwards compatible way. Nesting was allowed. Note + backward compatible way. Nesting was allowed. Note that any ":else" or ":elseif" was ignored, the "else" part was not executed either. diff --git a/en/filetype.txt b/en/filetype.txt index 540ebb476..11ccdc505 100644 --- a/en/filetype.txt +++ b/en/filetype.txt @@ -1,4 +1,4 @@ -*filetype.txt* For Vim version 7.4. Last change: 2015 Nov 28 +*filetype.txt* For Vim version 7.4. Last change: 2015 Dec 06 VIM REFERENCE MANUAL by Bram Moolenaar @@ -581,6 +581,9 @@ q Same as ":quit" To enable folding use this: > let g:ft_man_folding_enable = 1 +If you do not like the default folding, use an autocommand to add your desired +folding style instead. For example: > + autocmd FileType man setlocal foldmethod=indent foldenable PDF *ft-pdf-plugin* diff --git a/en/fold.txt b/en/fold.txt index 20017d353..96e46f5a1 100644 --- a/en/fold.txt +++ b/en/fold.txt @@ -1,4 +1,4 @@ -*fold.txt* For Vim version 7.4. Last change: 2013 Dec 04 +*fold.txt* For Vim version 7.4. Last change: 2016 Jan 02 VIM REFERENCE MANUAL by Bram Moolenaar @@ -97,9 +97,9 @@ These are the conditions with which the expression is evaluated: lowest. "=" use fold level from the previous line "a1", "a2", .. add one, two, .. to the fold level of the previous - line + line, use the result for the current line "s1", "s2", .. subtract one, two, .. from the fold level of the - previous line + previous line, use the result for the next line "<1", "<2", .. a fold with this level ends at this line ">1", ">2", .. a fold with this level starts at this line @@ -122,6 +122,18 @@ method can be very slow! Try to avoid the "=", "a" and "s" return values, since Vim often has to search backwards for a line for which the fold level is defined. This can be slow. +An example of using "a1" and "s1": For a multi-line C comment, a line +containing "/*" would return "a1" to start a fold, and a line containing "*/" +would return "s1" to end the fold after that line: > + if match(thisline, '/\*') >= 0 + return 'a1' + elseif match(thisline, '\*/') >= 0 + return 's1' + else + return '=' + endif +However, this won't work for single line comments, strings, etc. + |foldlevel()| can be useful to compute a fold level relative to a previous fold level. But note that foldlevel() may return -1 if the level is not known yet. And it returns the level at the start of the line, while a fold might @@ -573,8 +585,9 @@ what you type! When using an operator, a closed fold is included as a whole. Thus "dl" deletes the whole closed fold under the cursor. -For Ex commands the range is adjusted to always start at the first line of a -closed fold and end at the last line of a closed fold. Thus this command: > +For Ex commands that work on buffer lines the range is adjusted to always +start at the first line of a closed fold and end at the last line of a closed +fold. Thus this command: > :s/foo/bar/g when used with the cursor on a closed fold, will replace "foo" with "bar" in all lines of the fold. diff --git a/en/hangulin.txt b/en/hangulin.txt index 79ebff110..99ce6fded 100644 --- a/en/hangulin.txt +++ b/en/hangulin.txt @@ -1,11 +1,8 @@ -*hangulin.txt* For Vim version 7.4. Last change: 2009 Jun 24 +*hangulin.txt* For Vim version 7.4. Last change: 2015 Nov 24 VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam -NOTE: The |+hangul_input| feature is scheduled to be removed. If you want to -keep it, please send a message to the Vim user maillist. - Introduction *hangul* ------------ @@ -17,7 +14,8 @@ Compile ------- Next is a basic option. You can add any other configure option. > - ./configure --with-x --enable-multibyte --enable-fontset --enable-hangulinput + ./configure --with-x --enable-multibyte --enable-hangulinput \ + --disable-xim And you should check feature.h. If |+hangul_input| feature is enabled by configure, you can select more options such as keyboard type, 2 bulsik @@ -26,18 +24,21 @@ or 3 bulsik. You can find keywords like next in there. > #define HANGUL_DEFAULT_KEYBOARD 2 #define ESC_CHG_TO_ENG_MODE /* #define X_LOCALE */ - /* #define SLOW_XSERVER */ Environment variables --------------------- -You should set LANG variable to Korean locale such as ko or ko_KR.euc. +You should set LANG variable to Korean locale such as ko, ko_KR.eucKR +or ko_KR.UTF-8. If you set LC_ALL variable, it should be set to Korean locale also. VIM resource ------------ -You should add nexts to your global vimrc ($HOME/.vimrc). > +You may want to set 'encoding' and 'fileencodings'. +Next are examples: > - :set fileencoding=korea + :set encoding=euc-kr + :set encoding=utf-8 + :set fileencodings=ucs-bom,utf-8,cp949,euc-kr,latin1 Keyboard -------- @@ -52,8 +53,16 @@ If both are set, VIM_KEYBOARD has higher priority. Hangul Fonts ------------ -You can set text font using $HOME/.Xdefaults or in your gvimrc file. -But to use Hangul, you should set 'guifontset' in your vimrc. +If you use GTK version of GVIM, you should set 'guifont' and 'guifontwide'. +For example: > + set guifont=Courier\ 12 + set guifontwide=NanumGothicCoding\ 12 + +If you use Motif or Athena version of GVIM, you should set 'guifontset' in +your vimrc. You can set fontset in the .Xdefaults file. + +$HOME/.gvimrc: > + set guifontset=english_font,hangul_font $HOME/.Xdefaults: > Vim.font: english_font @@ -66,40 +75,38 @@ $HOME/.Xdefaults: > *international: True Vim*fontList: english_font;hangul_font: -$HOME/.gvimrc: > - set guifontset=english_font,hangul_font - attention! the , (comma) or ; (semicolon) And there should be no ':set guifont'. If it exists, then Gvim ignores ':set guifontset'. It means VIM runs without fontset supporting. So, you can see only English. Hangul does not be correctly displayed. -After 'fontset' feature is enabled, VIM does not allow using 'font'. +After 'fontset' feature is enabled, VIM does not allow using english +font only in 'font' setting for syntax. For example, if you use > :set guifontset=eng_font,your_font in your .gvimrc, then you should do for syntax > :hi Comment guifg=Cyan font=another_eng_font,another_your_font If you just do > :hi Comment font=another_eng_font -then you can see a GOOD error message. Be careful! +then you can see a error message. Be careful! hangul_font width should be twice than english_font width. Unsupported Feature ------------------- -Johab font not yet supported. And I don't have any plan. -If you really want to use johab font, you can use the -hanguldraw.c in gau package. +We don't support Johab font. +We don't support Hanja input. +And We don't have any plan to support them. -Hanja input not yet supported. And I don't have any plan. -If you really want to input hanja, just use VIM with hanterm. +If you really need such features, you can use console version of VIM with a +capable terminal emulator. Bug or Comment -------------- Send comments, patches and suggestions to: - Chi-Deok Hwang SungHyun Nam + Chi-Deok Hwang <...> vim:tw=78:ts=8:ft=help:norl: diff --git a/en/help.txt b/en/help.txt index 64de957bf..23ad1dc9a 100644 --- a/en/help.txt +++ b/en/help.txt @@ -1,4 +1,4 @@ -*help.txt* For Vim version 7.4. Last change: 2015 Jun 21 +*help.txt* For Vim version 7.4. Last change: 2016 Jan 10 VIM - main help file k @@ -10,14 +10,14 @@ Close this window: Use ":q". 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). + 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* + Prepend something to specify the context: *help-context* + WHAT PREPEND EXAMPLE ~ - Normal mode command (nothing) :help x + Normal mode command :help x Visual mode command v_ :help v_u Insert mode command i_ :help i_ Command-line command : :help :quit @@ -25,6 +25,8 @@ Get specific help: It is possible to go directly to whatever you want help Vim command argument - :help -r Option ' :help 'textwidth' Regular expression / :help /[ + See |help-summary| for more contexts and an explanation. + Search for help: Type ":help word", then hit CTRL-D to see matching help entries for "word". Or use ":helpgrep word". |:helpgrep| diff --git a/en/if_lua.txt b/en/if_lua.txt index 3d7cf2c8e..e6b8e6804 100644 --- a/en/if_lua.txt +++ b/en/if_lua.txt @@ -1,4 +1,4 @@ -*if_lua.txt* For Vim version 7.4. Last change: 2012 Jun 29 +*if_lua.txt* For Vim version 7.4. Last change: 2015 Oct 16 VIM REFERENCE MANUAL by Luis Carvalho @@ -10,9 +10,11 @@ The Lua Interface to Vim *lua* *Lua* 2. The vim module |lua-vim| 3. List userdata |lua-list| 4. Dict userdata |lua-dict| -5. Buffer userdata |lua-buffer| -6. Window userdata |lua-window| -7. The luaeval function |lua-luaeval| +5. Funcref userdata |lua-funcref| +6. Buffer userdata |lua-buffer| +7. Window userdata |lua-window| +8. The luaeval function |lua-luaeval| +9. Dynamic loading |lua-dynamic| {Vi does not have any of these commands} @@ -110,9 +112,31 @@ input range are stored in "vim.firstline" and "vim.lastline" respectively. The module also includes routines for buffer, window, and current line queries, Vim evaluation and command execution, and others. - vim.list() Returns an empty list (see |List|). - - vim.dict() Returns an empty dictionary (see |Dictionary|). + vim.list([arg]) Returns an empty list or, if "arg" is a Lua + table with numeric keys 1, ..., n (a + "sequence"), returns a list l such that l[i] = + arg[i] for i = 1, ..., n (see |List|). + Non-numeric keys are not used to initialize + the list. See also |lua-eval| for conversion + rules. Example: > + :lua t = {math.pi, false, say = 'hi'} + :echo luaeval('vim.list(t)') + :" [3.141593, 0], 'say' is ignored +< + vim.dict([arg]) Returns an empty dictionary or, if "arg" is a + Lua table, returns a dict d such that d[k] = + arg[k] for all string keys k in "arg" (see + |Dictionary|). Number keys are converted to + strings. Keys that are not strings are not + used to initialize the dictionary. See also + |lua-eval| for conversion rules. Example: > + :lua t = {math.pi, false, say = 'hi'} + :echo luaeval('vim.dict(t)') + :" {'say': 'hi'}, numeric keys ignored +< + vim.funcref({name}) Returns a Funcref to function {name} (see + |Funcref|). It is equivalent to Vim's + "function". NOT IMPLEMENTED YET vim.buffer([arg]) If "arg" is a number, returns buffer with number "arg" in the buffer list or, if "arg" @@ -131,9 +155,9 @@ Vim evaluation and command execution, and others. vim.type({arg}) Returns the type of {arg}. It is equivalent to Lua's "type" function, but returns "list", - "dict", "buffer", or "window" if {arg} is a - list, dictionary, buffer, or window, - respectively. Examples: > + "dict", "funcref", "buffer", or "window" if + {arg} is a list, dictionary, funcref, buffer, + or window, respectively. Examples: > :lua l = vim.list() :lua print(type(l), vim.type(l)) :" userdata list @@ -229,7 +253,40 @@ Examples: < ============================================================================== -5. Buffer userdata *lua-buffer* +5. Funcref userdata *lua-funcref* + +Funcref userdata represent funcref variables in Vim. Funcrefs that were +defined with a "dict" attribute need to be obtained as a dictionary key +in order to have "self" properly assigned to the dictionary (see examples +below.) A funcref "f" has the following properties: + +Properties +---------- + o "#f" is the name of the function referenced by "f" + o "f(...)" calls the function referenced by "f" (with arguments) + +Examples: +> + :function I(x) + : return a:x + : endfunction + :let R = function('I') + :lua i1 = vim.funcref('I') + :lua i2 = vim.eval('R') + :lua print(#i1, #i2) -- both 'I' + :lua print(i1, i2, #i2(i1) == #i1(i2)) + :function Mylen() dict + : return len(self.data) + : endfunction + :let mydict = {'data': [0, 1, 2, 3]} + :lua d = vim.eval('mydict'); d.len = vim.funcref('Mylen') + :echo mydict.len() + :lua l = d.len -- assign d as 'self' + :lua print(l()) +< + +============================================================================== +6. Buffer userdata *lua-buffer* Buffer userdata represent vim buffers. A buffer userdata "b" has the following properties and methods: @@ -281,7 +338,7 @@ Examples: < ============================================================================== -6. Window userdata *lua-window* +7. Window userdata *lua-window* Window objects represent vim windows. A window userdata "w" has the following properties and methods: @@ -313,7 +370,7 @@ Examples: < ============================================================================== -7. The luaeval function *lua-luaeval* *lua-eval* +8. The luaeval function *lua-luaeval* *lua-eval* The (dual) equivalent of "vim.eval" for passing Lua values to Vim is "luaeval". "luaeval" takes an expression string and an optional argument and @@ -325,7 +382,13 @@ returns the result of the expression. It is semantically equivalent in Lua to: return chunk(arg) -- return typval end < -Note that "_A" receives the argument to "luaeval". Examples: > +Note that "_A" receives the argument to "luaeval". Lua numbers, strings, and +list, dict, and funcref userdata are converted to their Vim respective types, +while Lua booleans are converted to numbers. An error is thrown if conversion +of any of the remaining Lua types, including userdata other than lists, dicts, +and funcrefs, is attempted. + +Examples: > :echo luaeval('math.pi') :lua a = vim.list():add('newlist') @@ -337,5 +400,24 @@ Note that "_A" receives the argument to "luaeval". Examples: > :echo Rand(1,10) +============================================================================== +9. Dynamic loading *lua-dynamic* + +On MS-Windows and Unix the Lua library can be loaded dynamically. The +|:version| output then includes |+lua/dyn|. + +This means that Vim will search for the Lua DLL or shared library file only +when needed. When you don't use the Lua interface you don't need it, thus +you can use Vim without this file. + +On MS-Windows to use the Lua interface the Lua DLL must be in your search path. +In a console window type "path" to see what directories are used. The version +of the DLL must match the Lua version Vim was compiled with. + +On Unix the 'luadll' option can be used to specify the Lua shared library file +instead of DYNAMIC_LUA_DLL file what was specified at compile time. The +version of the shared library must match the Lua version Vim was compiled with. + + ============================================================================== vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/en/if_mzsch.txt b/en/if_mzsch.txt index b42570a75..90954d0b4 100644 --- a/en/if_mzsch.txt +++ b/en/if_mzsch.txt @@ -1,4 +1,4 @@ -*if_mzsch.txt* For Vim version 7.4. Last change: 2012 Dec 17 +*if_mzsch.txt* For Vim version 7.4. Last change: 2016 Jan 24 VIM REFERENCE MANUAL by Sergey Khorev @@ -13,6 +13,7 @@ The MzScheme Interface to Vim *mzscheme* *MzScheme* 5. mzeval() Vim function |mzscheme-mzeval| 6. Using Function references |mzscheme-funcref| 7. Dynamic loading |mzscheme-dynamic| +8. MzScheme setup |mzscheme-setup| {Vi does not have any of these commands} @@ -264,7 +265,7 @@ directly from Scheme. For instance: > < ============================================================================== -7. Dynamic loading *mzscheme-dynamic* *E815* +7. Dynamic loading *mzscheme-dynamic* *E815* On MS-Windows the MzScheme libraries can be loaded dynamically. The |:version| output then includes |+mzscheme/dyn|. @@ -272,6 +273,9 @@ output then includes |+mzscheme/dyn|. This means that Vim will search for the MzScheme DLL files only when needed. When you don't use the MzScheme interface you don't need them, thus you can use Vim without these DLL files. +NOTE: Newer version of MzScheme (Racket) require earlier (trampolined) +initialisation via scheme_main_setup. So Vim always loads the MzScheme DLL at +startup if possible. To use the MzScheme interface the MzScheme DLLs must be in your search path. In a console window type "path" to see what directories are used. @@ -282,5 +286,24 @@ For MzScheme version 209 they will be "libmzsch209_000.dll" and command, look for -DDYNAMIC_MZSCH_DLL="something" and -DDYNAMIC_MZGC_DLL="something" in the "Compilation" info. +For example, if MzScheme (Racket) is installed at C:\Racket63, you may need +to set the environment variable as the following: > + + PATH=%PATH%;C:\Racket63\lib + PLTCOLLECTS=C:\Racket63\collects + PLTCONFIGDIR=C:\Racket63\etc +< +============================================================================== +8. MzScheme setup *mzscheme-setup* *E895* + +Vim requires "racket/base" module for if_mzsch core (fallback to "scheme/base" +if it doesn't exist), "r5rs" module for test and "raco ctool" command for +building Vim. If MzScheme did not have them, you can install them with +MzScheme's raco command: +> + raco pkg install scheme-lib # scheme/base module + raco pkg install r5rs-lib # r5rs module + raco pkg install cext-lib # raco ctool command +< ====================================================================== vim:tw=78:ts=8:sts=4:ft=help:norl: diff --git a/en/if_perl.txt b/en/if_perl.txt index 7be5f06f6..c73eb610f 100644 --- a/en/if_perl.txt +++ b/en/if_perl.txt @@ -1,4 +1,4 @@ -*if_perl.txt* For Vim version 7.4. Last change: 2013 Oct 05 +*if_perl.txt* For Vim version 7.4. Last change: 2015 Oct 16 VIM REFERENCE MANUAL by Sven Verdoolaege @@ -290,5 +290,13 @@ The name of the DLL must match the Perl version Vim was compiled with. Currently the name is "perl512.dll". That is for Perl 5.12. To know for sure edit "gvim.exe" and search for "perl\d*.dll\c". + +Unix ~ + +The 'perldll' option can be used to specify the Perl shared library file +instead of DYNAMIC_PERL_DLL file what was specified at compile time. The +version of the shared library must match the Perl version Vim was compiled +with. + ============================================================================== vim:tw=78:ts=8:ft=help:norl: diff --git a/en/if_pyth.txt b/en/if_pyth.txt index 4ed8eac74..cc47beb27 100644 --- a/en/if_pyth.txt +++ b/en/if_pyth.txt @@ -1,4 +1,4 @@ -*if_pyth.txt* For Vim version 7.4. Last change: 2014 Jul 23 +*if_pyth.txt* For Vim version 7.4. Last change: 2015 Nov 10 VIM REFERENCE MANUAL by Paul Moore @@ -679,20 +679,26 @@ functions to evaluate Python expressions and pass their values to VimL. ============================================================================== 9. Dynamic loading *python-dynamic* -On MS-Windows the Python library can be loaded dynamically. The |:version| -output then includes |+python/dyn|. +On MS-Windows and Unix the Python library can be loaded dynamically. The +|:version| output then includes |+python/dyn| or |+python3/dyn|. -This means that Vim will search for the Python DLL file only when needed. -When you don't use the Python interface you don't need it, thus you can use -Vim without this DLL file. +This means that Vim will search for the Python DLL or shared library file only +when needed. When you don't use the Python interface you don't need it, thus +you can use Vim without this file. -To use the Python interface the Python DLL must be in your search path. In a -console window type "path" to see what directories are used. +On MS-Windows to use the Python interface the Python DLL must be in your search +path. In a console window type "path" to see what directories are used. The name of the DLL must match the Python version Vim was compiled with. Currently the name is "python24.dll". That is for Python 2.4. To know for sure edit "gvim.exe" and search for "python\d*.dll\c". +On Unix the 'pythondll' or 'pythonthreedll' option can be used to specify the +Python shared library file instead of DYNAMIC_PYTHON_DLL or +DYNAMIC_PYTHON3_DLL file what were specified at compile time. The version of +the shared library must match the Python 2.x or Python 3 version Vim was +compiled with. + ============================================================================== 10. Python 3 *python3* diff --git a/en/if_ruby.txt b/en/if_ruby.txt index 4084181f9..b0f802998 100644 --- a/en/if_ruby.txt +++ b/en/if_ruby.txt @@ -1,4 +1,4 @@ -*if_ruby.txt* For Vim version 7.4. Last change: 2015 Feb 22 +*if_ruby.txt* For Vim version 7.4. Last change: 2015 Dec 03 VIM REFERENCE MANUAL by Shugo Maeda @@ -7,9 +7,9 @@ The Ruby Interface to Vim *ruby* *Ruby* 1. Commands |ruby-commands| -2. The VIM module |ruby-vim| -3. VIM::Buffer objects |ruby-buffer| -4. VIM::Window objects |ruby-window| +2. The Vim module |ruby-vim| +3. Vim::Buffer objects |ruby-buffer| +4. Vim::Window objects |ruby-window| 5. Global variables |ruby-globals| 6. Dynamic loading |ruby-dynamic| @@ -47,7 +47,7 @@ Example Vim script: > ruby << EOF class Garnet def initialize(s) - @buffer = VIM::Buffer.current + @buffer = Vim::Buffer.current vimputs(s) end def vimputs(s) @@ -74,19 +74,19 @@ Example Vim script: > Executing Ruby commands is not possible in the |sandbox|. ============================================================================== -2. The VIM module *ruby-vim* +2. The Vim module *ruby-vim* -Ruby code gets all of its access to vim via the "VIM" module. +Ruby code gets all of its access to vim via the "Vim" module. -Overview > +Overview: > print "Hello" # displays a message - VIM.command(cmd) # execute an Ex command - num = VIM::Window.count # gets the number of windows - w = VIM::Window[n] # gets window "n" - cw = VIM::Window.current # gets the current window - num = VIM::Buffer.count # gets the number of buffers - b = VIM::Buffer[n] # gets buffer "n" - cb = VIM::Buffer.current # gets the current buffer + Vim.command(cmd) # execute an Ex command + num = Vim::Window.count # gets the number of windows + w = Vim::Window[n] # gets window "n" + cw = Vim::Window.current # gets the current window + num = Vim::Buffer.count # gets the number of buffers + b = Vim::Buffer[n] # gets buffer "n" + cb = Vim::Buffer.current # gets the current buffer w.height = lines # sets the window height w.cursor = [row, col] # sets the window cursor position pos = w.cursor # gets an array [row, col] @@ -96,29 +96,29 @@ Overview > b[n] = str # sets a line in the buffer b.delete(n) # deletes a line b.append(n, str) # appends a line after n - line = VIM::Buffer.current.line # gets the current line - num = VIM::Buffer.current.line_number # gets the current line number - VIM::Buffer.current.line = "test" # sets the current line number + line = Vim::Buffer.current.line # gets the current line + num = Vim::Buffer.current.line_number # gets the current line number + Vim::Buffer.current.line = "test" # sets the current line number < Module Functions: *ruby-message* -VIM::message({msg}) +Vim::message({msg}) Displays the message {msg}. *ruby-set_option* -VIM::set_option({arg}) +Vim::set_option({arg}) Sets a vim option. {arg} can be any argument that the ":set" command accepts. Note that this means that no spaces are allowed in the argument! See |:set|. *ruby-command* -VIM::command({cmd}) +Vim::command({cmd}) Executes Ex command {cmd}. *ruby-evaluate* -VIM::evaluate({expr}) +Vim::evaluate({expr}) Evaluates {expr} using the vim internal expression evaluator (see |expression|). Returns the expression result as: - a Integer if the Vim expression evaluates to a number @@ -129,9 +129,9 @@ VIM::evaluate({expr}) Dictionaries and lists are recursively expanded. ============================================================================== -3. VIM::Buffer objects *ruby-buffer* +3. Vim::Buffer objects *ruby-buffer* -VIM::Buffer objects represent vim buffers. +Vim::Buffer objects represent vim buffers. Class Methods: @@ -159,9 +159,9 @@ line_number Returns the number of the current line if the buffer is active. ============================================================================== -4. VIM::Window objects *ruby-window* +4. Vim::Window objects *ruby-window* -VIM::Window objects represent vim windows. +Vim::Window objects represent vim windows. Class Methods: @@ -199,6 +199,8 @@ This means that Vim will search for the Ruby DLL file or shared library only when needed. When you don't use the Ruby interface you don't need it, thus you can use Vim even though this library file is not on your system. +MS-Windows ~ + You need to install the right version of Ruby for this to work. You can find the package to download from: http://www.garbagecollect.jp/ruby/mswin32/en/download/release.html @@ -216,5 +218,12 @@ and comment-out the check for _MSC_VER. You may also need to rename the include directory name to match the version, strangely for Ruby 1.9.3 the directory is called 1.9.1. +Unix ~ + +The 'rubydll' option can be used to specify the Ruby shared library file +instead of DYNAMIC_RUBY_DLL file what was specified at compile time. The +version of the shared library must match the Ruby version Vim was compiled +with. + ============================================================================== vim:tw=78:ts=8:ft=help:norl: diff --git a/en/if_tcl.txt b/en/if_tcl.txt index d6726a354..4d02233f0 100644 --- a/en/if_tcl.txt +++ b/en/if_tcl.txt @@ -1,4 +1,4 @@ -*if_tcl.txt* For Vim version 7.4. Last change: 2012 Aug 02 +*if_tcl.txt* For Vim version 7.4. Last change: 2016 Jan 01 VIM REFERENCE MANUAL by Ingo Wilken @@ -515,19 +515,29 @@ startup file (usually "~/.vimrc" on Unix): ============================================================================== 9. Dynamic loading *tcl-dynamic* -On MS-Windows the Tcl library can be loaded dynamically. The |:version| -output then includes |+tcl/dyn|. +On MS-Windows and Unix the Tcl library can be loaded dynamically. The +|:version| output then includes |+tcl/dyn|. -This means that Vim will search for the Tcl DLL file only when needed. When -you don't use the Tcl interface you don't need it, thus you can use Vim -without this DLL file. +This means that Vim will search for the Tcl DLL or shared library file only +when needed. When you don't use the Tcl interface you don't need it, thus you +can use Vim without this file. + + +MS-Windows ~ To use the Tcl interface the Tcl DLL must be in your search path. In a console window type "path" to see what directories are used. The name of the DLL must match the Tcl version Vim was compiled with. -Currently the name is "tcl83.dll". That is for Tcl 8.3. To know for sure +Currently the name is "tcl86.dll". That is for Tcl 8.6. To know for sure edit "gvim.exe" and search for "tcl\d*.dll\c". + +Unix ~ + +The 'tcldll' option can be used to specify the Tcl shared library file instead +of DYNAMIC_TCL_DLL file what was specified at compile time. The version of +the shared library must match the Tcl version Vim was compiled with. + ============================================================================== vim:tw=78:ts=8:ft=help:norl: diff --git a/en/index.txt b/en/index.txt index ded50d0e6..d23edd019 100644 --- a/en/index.txt +++ b/en/index.txt @@ -1,4 +1,4 @@ -*index.txt* For Vim version 7.4. Last change: 2015 Sep 08 +*index.txt* For Vim version 7.4. Last change: 2016 Jan 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1055,7 +1055,7 @@ tag command action in Command-line editing mode ~ |c_| toggle insert/overstrike mode |c_| cursor at mouse click -You found it, Arthur! *holy-grail* +You found it, Arthur! *holy-grail* *:smile* ============================================================================== 5. EX commands *ex-cmd-index* *:index* @@ -1176,7 +1176,7 @@ tag command action ~ |:cpfile| :cpf[ile] go to last error in previous file |:cquit| :cq[uit] quit Vim with an error code |:crewind| :cr[ewind] go to the specified error, default first one -|:cscope| :cs[cope] execute cscope command +|:cscope| :cs[cope] execute cscope command |:cstag| :cst[ag] use cscope to jump to a tag |:cunmap| :cu[nmap] like ":unmap" but for Command-line mode |:cunabbrev| :cuna[bbrev] like ":unabbrev" but for Command-line mode @@ -1297,7 +1297,7 @@ tag command action ~ |:lcd| :lc[d] change directory locally |:lchdir| :lch[dir] change directory locally |:lclose| :lcl[ose] close location window -|:lcscope| :lcs[cope] like ":cscope" but uses location list +|:lcscope| :lcs[cope] like ":cscope" but uses location list |:ldo| :ld[o] execute command in valid location list entries |:lfdo| :lfd[o] execute command in each file in location list |:left| :le[ft] left align lines @@ -1351,7 +1351,7 @@ tag command action ~ |:marks| :marks list all marks |:match| :mat[ch] define a match to highlight |:menu| :me[nu] enter a new menu item -|:menutranslate| :menut[ranslate] add a menu translation item +|:menutranslate| :menut[ranslate] add a menu translation item |:messages| :mes[sages] view previously displayed messages |:mkexrc| :mk[exrc] write current mappings and settings to a file |:mksession| :mks[ession] write session info to a file @@ -1495,6 +1495,7 @@ tag command action ~ |:smap| :smap like ":map" but for Select mode |:smapclear| :smapc[lear] remove all mappings for Select mode |:smenu| :sme[nu] add menu for Select mode +|:smile| :smi[le] make the user happy |:snext| :sn[ext] split window and go to next file in the argument list |:sniff| :sni[ff] send request to sniff @@ -1517,7 +1518,7 @@ tag command action ~ |:stop| :st[op] suspend the editor or escape to a shell |:stag| :sta[g] split window and jump to a tag |:startinsert| :star[tinsert] start Insert mode -|:startgreplace| :startg[replace] start Virtual Replace mode +|:startgreplace| :startg[replace] start Virtual Replace mode |:startreplace| :startr[eplace] start Replace mode |:stopinsert| :stopi[nsert] stop Insert mode |:stjump| :stj[ump] do ":tjump" and split window @@ -1538,14 +1539,14 @@ tag command action ~ |:tabdo| :tabdo execute command in each tab page |:tabedit| :tabe[dit] edit a file in a new tab page |:tabfind| :tabf[ind] find file in 'path', edit it in a new tab page -|:tabfirst| :tabfir[st] got to first tab page -|:tablast| :tabl[ast] got to last tab page +|:tabfirst| :tabfir[st] go to first tab page +|:tablast| :tabl[ast] go to last tab page |:tabmove| :tabm[ove] move tab page to other position |:tabnew| :tabnew edit a file in a new tab page |:tabnext| :tabn[ext] go to next tab page |:tabonly| :tabo[nly] close all tab pages except the current one |:tabprevious| :tabp[revious] go to previous tab page -|:tabrewind| :tabr[ewind] got to first tab page +|:tabrewind| :tabr[ewind] go to first tab page |:tabs| :tabs list the tab pages and what they contain |:tab| :tab create new tab when opening new window |:tag| :ta[g] jump to tag diff --git a/en/insert.txt b/en/insert.txt index 2a114bc09..787d6115a 100644 --- a/en/insert.txt +++ b/en/insert.txt @@ -1,4 +1,4 @@ -*insert.txt* For Vim version 7.4. Last change: 2014 Aug 04 +*insert.txt* For Vim version 7.4. Last change: 2015 Sep 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -81,9 +81,11 @@ CTRL-W Delete the word before the cursor (see |i_backspacing| about joining lines). See the section "word motions", |word-motions|, for the definition of a word. *i_CTRL-U* -CTRL-U Delete all entered characters in the current line (see - |i_backspacing| about joining lines). - +CTRL-U Delete all entered characters before the cursor in the current + line. If there are no newly entered characters and + 'backspace' is not empty, delete all characters before the + cursor in the current line. + See |i_backspacing| about joining lines. *i_CTRL-I* *i_* *i_Tab* or CTRL-I Insert a tab. If the 'expandtab' option is on, the equivalent number of spaces is inserted (use CTRL-V to @@ -150,7 +152,7 @@ CTRL-R CTRL-R {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-R* CTRL-R a results in "ac". CTRL-R CTRL-R a results in "ab^Hc". < Options 'textwidth', 'formatoptions', etc. still apply. If - you also want to avoid these, use "r", see below. + you also want to avoid these, use CTRL-R CTRL-O, see below. The '.' register (last inserted text) is still inserted as typed. {not in Vi} @@ -375,6 +377,9 @@ CTRL-O execute one command, return to Insert mode *i_CTRL-O* CTRL-\ CTRL-O like CTRL-O but don't move the cursor *i_CTRL-\_CTRL-O* CTRL-L when 'insertmode' is set: go to Normal mode *i_CTRL-L* CTRL-G u break undo sequence, start new change *i_CTRL-G_u* +CTRL-G U don't break undo with next left/right cursor *i_CTRL-G_U* + movement (but only if the cursor stays + within same the line) ----------------------------------------------------------------------- Note: If the cursor keys take you out of Insert mode, check the 'noesckeys' @@ -414,6 +419,28 @@ that, with CTRL-O u. Another example: > This breaks undo at each line break. It also expands abbreviations before this. +An example for using CTRL-G U: > + + inoremap U + inoremap U + inoremap col('.') == match(getline('.'), '\S') + 1 ? + \ repeat('U', col('.') - 1) : + \ (col('.') < match(getline('.'), '\S') ? + \ repeat('U', match(getline('.'), '\S') + 0) : + \ repeat('U', col('.') - 1 - match(getline('.'), '\S'))) + inoremap repeat('U', col('$') - col('.')) + inoremap ( ()U + +This makes it possible to use the cursor keys in Insert mode, without breaking +the undo sequence and therefore using |.| (redo) will work as expected. +Also entering a text like (with the "(" mapping from above): > + + Lorem ipsum (dolor + +will be repeatable by the |.|to the expected + + Lorem ipsum (dolor) + Using CTRL-O splits undo: the text typed before and after it is undone separately. If you want to avoid this (e.g., in a mapping) you might be able to use CTRL-R = |i_CTRL-R|. E.g., to call a function: > diff --git a/en/map.txt b/en/map.txt index 3ac8e5db9..4e7a784fa 100644 --- a/en/map.txt +++ b/en/map.txt @@ -1,4 +1,4 @@ -*map.txt* For Vim version 7.4. Last change: 2014 Jun 02 +*map.txt* For Vim version 7.4. Last change: 2016 Jan 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -483,7 +483,7 @@ internal code is written to the script file. 1.6 SPECIAL CHARACTERS *:map-special-chars* - *map_backslash* + *map_backslash* *map-backslash* Note that only CTRL-V is mentioned here as a special character for mappings and abbreviations. When 'cpoptions' does not contain 'B', a backslash can also be used like CTRL-V. The <> notation can be fully used then |<>|. But @@ -494,21 +494,21 @@ To map a backslash, or use a backslash literally in the {rhs}, the special sequence "" can be used. This avoids the need to double backslashes when using nested mappings. - *map_CTRL-C* + *map_CTRL-C* *map-CTRL-C* Using CTRL-C in the {lhs} is possible, but it will only work when Vim is waiting for a key, not when Vim is busy with something. When Vim is busy CTRL-C interrupts/breaks the command. When using the GUI version on MS-Windows CTRL-C can be mapped to allow a Copy command to the clipboard. Use CTRL-Break to interrupt Vim. - *map_space_in_lhs* + *map_space_in_lhs* *map-space_in_lhs* To include a space in {lhs} precede it with a CTRL-V (type two CTRL-Vs for each space). - *map_space_in_rhs* + *map_space_in_rhs* *map-space_in_rhs* If you want a {rhs} that starts with a space, use "". To be fully Vi compatible (but unreadable) don't use the |<>| notation, precede {rhs} with a single CTRL-V (you have to type CTRL-V two times). - *map_empty_rhs* + *map_empty_rhs* *map-empty-rhs* You can create an empty {rhs} by typing nothing after a single CTRL-V (you have to type CTRL-V two times). Unfortunately, you cannot do this in a vimrc file. @@ -583,7 +583,7 @@ Upper and lowercase differences are ignored. It is not possible to put a comment after these commands, because the '"' character is considered to be part of the {lhs} or {rhs}. - *map_bar* + *map_bar* *map-bar* Since the '|' character is used to separate a map command from the next command, you will have to do something special to include a '|' in {rhs}. There are three methods: @@ -601,7 +601,7 @@ When 'b' is present in 'cpoptions', "\|" will be recognized as a mapping ending in a '\' and then another command. This is Vi compatible, but illogical when compared to other commands. - *map_return* + *map_return* *map-return* When you have a mapping that contains an Ex command, you need to put a line terminator after it to have it executed. The use of is recommended for this (see |<>|). Example: > @@ -923,9 +923,11 @@ Examples: ({CURSOR} is where you type a non-keyword character) > < "test;;" is not expanded "test ;;" is expanded to "test " -To avoid the abbreviation in insert mode: Type part of the abbreviation, exit -insert mode with , re-enter insert mode with "a" and type the rest. Or -type CTRL-V before the character after the abbreviation. +To avoid the abbreviation in Insert mode: Type CTRL-V before the character +that would trigger the abbreviation. E.g. CTRL-V . Or type part of +the abbreviation, exit insert mode with , re-enter insert mode with "a" +and type the rest. + To avoid the abbreviation in Command-line mode: Type CTRL-V twice somewhere in the abbreviation to avoid it to be replaced. A CTRL-V in front of a normal character is mostly ignored otherwise. @@ -1283,6 +1285,8 @@ completion can be enabled: -complete=custom,{func} custom completion, defined via {func} -complete=customlist,{func} custom completion, defined via {func} +Note: That some completion methods might expand environment variables. + Custom completion *:command-completion-custom* *:command-completion-customlist* @@ -1354,6 +1358,19 @@ Possible attributes are: Note that -range=N and -count=N are mutually exclusive - only one should be specified. + *E889* *:command-addr* +It is possible that the special characters in the range like ., $ or % which +by default correspond to the current line, last line and the whole buffer, +relate to arguments, (loaded) buffers, windows or tab pages. + +Possible values are: + -addr=lines Range of lines (this is the default) + -addr=arguments Range for arguments + -addr=buffers Range for buffers (also not loaded buffers) + -addr=loaded_buffers Range for loaded buffers + -addr=windows Range for windows + -addr=tabs Range for tab pages + Special cases *:command-bang* *:command-bar* *:command-register* *:command-buffer* There are some special cases as well: diff --git a/en/mlang.txt b/en/mlang.txt index eb95660d0..808bc61d4 100644 --- a/en/mlang.txt +++ b/en/mlang.txt @@ -1,4 +1,4 @@ -*mlang.txt* For Vim version 7.4. Last change: 2012 Jan 15 +*mlang.txt* For Vim version 7.4. Last change: 2016 Jan 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -97,13 +97,15 @@ If you used the self-installing .exe file, message translations should work already. Otherwise get the libintl.dll file if you don't have it yet: http://sourceforge.net/projects/gettext +Or: + https://mlocati.github.io/gettext-iconv-windows/ This also contains tools xgettext, msgformat and others. libintl.dll should be placed in same directory with (g)vim.exe, or some -place where PATH environment value describe. Message files (vim.mo) -have to be placed in "$VIMRUNTIME/lang/xx/LC_MESSAGES", where "xx" is the -abbreviation of the language (mostly two letters). +place where PATH environment value describe. Vim also finds libintl-8.dll. +Message files (vim.mo) have to be placed in "$VIMRUNTIME/lang/xx/LC_MESSAGES", +where "xx" is the abbreviation of the language (mostly two letters). If you write your own translations you need to generate the .po file and convert it to a .mo file. You need to get the source distribution and read diff --git a/en/netbeans.txt b/en/netbeans.txt index e0ac2bf82..7c549a9d5 100644 --- a/en/netbeans.txt +++ b/en/netbeans.txt @@ -1,10 +1,10 @@ -*netbeans.txt* For Vim version 7.4. Last change: 2012 Jan 26 +*netbeans.txt* For Vim version 7.4. Last change: 2016 Jan 27 VIM REFERENCE MANUAL by Gordon Prieur et al. - *socket-interface* *netbeans* *netbeans-support* + *netbeans* *netbeans-support* Vim NetBeans Protocol: a socket interface for Vim integration into an IDE. @@ -306,7 +306,12 @@ bufID Buffer number. A message may be either for a specific buffer or generic. Generic messages use a bufID of zero. NOTE: this buffer ID is assigned by the IDE, it is not Vim's buffer number. The bufID must be a sequentially rising number, - starting at one. + starting at one. When the 'switchbuf' option is set to + "usetab" and the "bufID" buffer is not found in the current + tab page, the netbeans commands and functions that set this + buffer as the current buffer will jump to the first open + window that contains this buffer in other tab pages instead of + replacing the buffer in the current window. seqno The IDE uses a sequence number for Commands and Functions. A Reply must use the sequence number of the Function that it is @@ -470,7 +475,7 @@ raise Bring the editor to the foreground. New in version 2.1. removeAnno serNum - Remove a previously place annotation for this buffer. + Remove a previously placed annotation for this buffer. "serNum" is the same number used in addAnno. save Save the buffer when it was modified. The other side of the diff --git a/en/options.txt b/en/options.txt index 845878a37..0efbc8d64 100644 --- a/en/options.txt +++ b/en/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.4. Last change: 2014 Sep 09 +*options.txt* For Vim version 7.4. Last change: 2016 Jan 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -50,9 +50,19 @@ achieve special effects. These options come in three forms: :se[t] {option}&vi Reset option to its Vi default value. {not in Vi} :se[t] {option}&vim Reset option to its Vim default value. {not in Vi} -:se[t] all& Set all options, except terminal options, to their - default value. The values of 'term', 'lines' and - 'columns' are not changed. {not in Vi} +:se[t] all& Set all options to their default value. The values of + these options are not changed: + all terminal options, starting with t_ + 'columns' + 'cryptmethod' + 'encoding' + 'key' + 'lines' + 'term' + 'ttymouse' + 'ttytype' + Warning: This may have a lot of side effects. + {not in Vi} *:set-args* *E487* *E521* :se[t] {option}={value} or @@ -683,6 +693,9 @@ A jump table for the options with a short description can be found at |Q_op|. "single": Use the same width as characters in US-ASCII. This is expected by most users. "double": Use twice the width of ASCII characters. + "auto": Use obtained width from system. + {only for Win NT/2K systems, currently} + *E834* *E835* The value "double" cannot be used if 'listchars' or 'fillchars' contains a character that would be double width. @@ -706,6 +719,10 @@ A jump table for the options with a short description can be found at |Q_op|. compiled with the |+termresponse| feature and if |t_u7| is set to the escape sequence to request cursor position report. + On some systems, we can use width for a character which defined by + font design. If you use such a system try "auto" for this option. + It will give you more nice result for a font which you select. + *'antialias'* *'anti'* *'noantialias'* *'noanti'* 'antialias' 'anti' boolean (default: off) global @@ -786,7 +803,8 @@ A jump table for the options with a short description can be found at |Q_op|. line. When 'smartindent' or 'cindent' is on the indent is changed in a different way. - The 'autoindent' option is reset when the 'paste' option is set. + The 'autoindent' option is reset when the 'paste' option is set and + restored when 'paste' is reset. {small difference from Vi: After the indent is deleted when typing or , the cursor position when moving up or down is after the deleted indent; Vi puts the cursor somewhere in the deleted indent}. @@ -1124,6 +1142,47 @@ A jump table for the options with a short description can be found at |Q_op|. expression evaluates to a |List| this is equal to using each List item as a string and putting "\n" in between them. + *'belloff'* *'bo'* +'belloff' 'bo' string (default "") + global + {not in Vi} + Specifies for which events the bell will not be rung. It is a comma + separated list of items. For each item that is present, the bell + will be silenced. This is most useful to specify specific events in + insert mode to be silenced. + + item meaning when present ~ + all All events. + backspace When hitting or and deleting results in an + error. + cursor Fail to move around using the cursor keys or + / in |Insert-mode|. + complete Error occurred when using |i_CTRL-X_CTRL-K| or + |i_CTRL-X_CTRL-T|. + copy Cannot copy char from insert mode using |i_CTRL-Y| or + |i_CTRL-E|. + ctrlg Unknown Char after in Insert mode. + error Other Error occurred (e.g. try to join last line) + (mostly used in |Normal-mode| or |Cmdline-mode|). + esc hitting in |Normal-mode|. + ex In |Visual-mode|, hitting |Q| results in an error. + hangul Error occurred when using hangul input. + insertmode Pressing in 'insertmode'. + lang Calling the beep module for Lua/Mzscheme/TCL. + mess No output available for |g<|. + showmatch Error occurred for 'showmatch' function. + operator Empty region error |cpo-E|. + register Unknown register after in |Insert-mode|. + shell Bell from shell output |:!|. + spell Error happened on spell suggest. + wildmode More matches in |cmdline-completion| available + (depends on the 'wildmode' setting). + + This is most useful, to fine tune when in insert mode the bell should + be rung. For normal mode and ex commands, the bell is often rung to + indicate that an error occurred. It can be silenced by adding the + "error" keyword. + *'binary'* *'bin'* *'nobinary'* *'nobin'* 'binary' 'bin' boolean (default off) local to buffer @@ -1196,7 +1255,7 @@ A jump table for the options with a short description can be found at |Q_op|. break if 'linebreak' is on. Only works for ASCII and also for 8-bit characters when 'encoding' is an 8-bit encoding. - *'breakindent'* *'bri'* + *'breakindent'* *'bri'* *'nobreakindent'* *'nobri'* 'breakindent' 'bri' boolean (default off) local to window {not in Vi} @@ -1316,6 +1375,9 @@ A jump table for the options with a short description can be found at |Q_op|. nofile only: The buffer name is fixed, it is not handled like a file name. It is not modified in response to a |:cd| command. + both: When using ":e bufname" and already editing "bufname" + the buffer is made empty and autocommands are + triggered as usual for |:edit|. *E676* "acwrite" implies that the buffer name is not related to a file, like "nofile", but it will be written. Thus, in contrast to "nofile" and @@ -1816,6 +1878,14 @@ A jump table for the options with a short description can be found at |Q_op|. completion in the preview window. Only works in combination with "menu" or "menuone". + noinsert Do not insert any text for a match until the user selects + a match from the menu. Only works in combination with + "menu" or "menuone". No effect if "longest" is present. + + noselect Do not select a match in the menu, force the user to + select one from the menu. Only works in combination with + "menu" or "menuone". + *'concealcursor'* *'cocu'* 'concealcursor' 'cocu' string (default: "") @@ -2660,15 +2730,16 @@ A jump table for the options with a short description can be found at |Q_op|. local to buffer {not in Vi} When writing a file and this option is off and the 'binary' option - is on, no will be written for the last line in the file. This - option is automatically set when starting to edit a new file, unless - the file does not have an for the last line in the file, in - which case it is reset. Normally you don't have to set or reset this - option. When 'binary' is off the value is not used when writing the - file. When 'binary' is on it is used to remember the presence of a - for the last line in the file, so that when you write the file - the situation from the original file can be kept. But you can change - it if you want to. + is on, or 'fixeol' option is off, no will be written for the + last line in the file. This option is automatically set or reset when + starting to edit a new file, depending on whether file has an + for the last line in the file. Normally you don't have to set or + reset this option. + When 'binary' is off and 'fixeol' is on the value is not used when + writing the file. When 'binary' is on or 'fixeol' is off it is used + to remember the presence of a for the last line in the file, so + that when you write the file the situation from the original file can + be kept. But you can change it if you want to. *'equalalways'* *'ea'* *'noequalalways'* *'noea'* 'equalalways' 'ea' boolean (default on) @@ -2709,7 +2780,8 @@ A jump table for the options with a short description can be found at |Q_op|. makes a difference for error messages, the bell will be used always for a lot of errors without a message (e.g., hitting in Normal mode). See 'visualbell' on how to make the bell behave like a beep, - screen flash or do nothing. + screen flash or do nothing. See 'belloff' to finetune when to ring the + bell. *'errorfile'* *'ef'* 'errorfile' 'ef' string (Amiga default: "AztecC.Err", @@ -2771,6 +2843,8 @@ A jump table for the options with a short description can be found at |Q_op|. . Spaces are used in indents with the '>' and '<' commands and when 'autoindent' is on. To insert a real tab when 'expandtab' is on, use CTRL-V. See also |:retab| and |ins-expandtab|. + This option is reset when the 'paste' option is set and restored when + the 'paste' option is reset. NOTE: This option is reset when 'compatible' is set. *'exrc'* *'ex'* *'noexrc'* *'noex'* @@ -2948,8 +3022,8 @@ A jump table for the options with a short description can be found at |Q_op|. 2. If a is found and 'fileformats' includes "unix", 'fileformat' is set to "unix". Note that when a is found without a preceding , "unix" is preferred over "dos". - 3. If 'fileformat' has not yet been set, and if 'fileformats' - includes "mac", 'fileformat' is set to "mac". + 3. If 'fileformat' has not yet been set, and if a is found, and + if 'fileformats' includes "mac", 'fileformat' is set to "mac". This means that "mac" is only chosen when: "unix" is not present or no is found in the file, and "dos" is not present or no is found in the file. @@ -3053,6 +3127,17 @@ A jump table for the options with a short description can be found at |Q_op|. fold:c Folded |hl-Folded| diff:c DiffDelete |hl-DiffDelete| + *'fixendofline'* *'fixeol'* *'nofixendofline'* *'nofixeol'* +'fixendofline' 'fixeol' boolean (default on) + local to buffer + {not in Vi} + When writing a file and this option is on, at the end of file + will be restored if missing. Turn this option off if you want to + preserve the situation from the original file. + When the 'binary' option is set the value of this option doesn't + matter. + See the 'endofline' option. + *'fkmap'* *'fk'* *'nofkmap'* *'nofk'* 'fkmap' 'fk' boolean (default off) *E198* global @@ -3334,7 +3419,7 @@ A jump table for the options with a short description can be found at |Q_op|. modeline, see |sandbox-option|. That stops the option from working, since changing the buffer text is not allowed. - *'fsync'* *'fs'* + *'fsync'* *'fs'* *'nofsync'* *'nofs'* 'fsync' 'fs' boolean (default on) global {not in Vi} @@ -3417,7 +3502,8 @@ A jump table for the options with a short description can be found at |Q_op|. the height of the cursor can be changed. This can be done by specifying a block cursor, or a percentage for a vertical or horizontal cursor. - For a console the 't_SI' and 't_EI' escape sequences are used. + For a console the 't_SI', 't_SR', and 't_EI' escape sequences are + used. The option is a comma separated list of parts. Each part consist of a mode-list and an argument-list: @@ -3747,6 +3833,9 @@ A jump table for the options with a short description can be found at |Q_op|. 'F' Add a footer. Only for Motif. See |gui-footer|. + 'C' Remove caption (title) bar. Support Win32 only. + + *'guipty'* *'noguipty'* 'guipty' boolean (default on) global @@ -4030,7 +4119,7 @@ A jump table for the options with a short description can be found at |Q_op|. global Ignore case in search patterns. Also used when searching in the tags file. - Also see 'smartcase'. + Also see 'smartcase' and 'tagcase'. Can be overruled by using "\c" or "\C" in the pattern, see |/ignorecase|. @@ -4410,6 +4499,8 @@ A jump table for the options with a short description can be found at |Q_op|. '*', '"' and '|' (so that CTRL-] on a command finds the help for that command). When the 'lisp' option is on the '-' character is always included. + This option also influences syntax highlighting, unless the syntax + uses |:syn-iskeyword|. NOTE: This option is set to the Vi default value when 'compatible' is set and to the Vim default value when 'compatible' is reset. @@ -4524,12 +4615,14 @@ A jump table for the options with a short description can be found at |Q_op|. feature} This option allows switching your keyboard into a special language mode. When you are typing text in Insert mode the characters are - inserted directly. When in command mode the 'langmap' option takes + inserted directly. When in Normal mode the 'langmap' option takes care of translating these special characters to the original meaning of the key. This means you don't have to change the keyboard mode to be able to execute Normal mode commands. This is the opposite of the 'keymap' option, where characters are mapped in Insert mode. + Also consider setting 'langnoremap' to avoid 'langmap' applies to + characters resulting from a mapping. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. @@ -4585,6 +4678,18 @@ A jump table for the options with a short description can be found at |Q_op|. :source $VIMRUNTIME/menu.vim < Warning: This deletes all menus that you defined yourself! + *'langnoremap'* *'lnr'* *'nolangnoremap'* *'nolnr'* +'langnoremap' 'lnr' boolean (default off) + global + {not in Vi} + {only available when compiled with the |+langmap| + feature} + When on, setting 'langmap' does not apply to characters resulting from + a mapping. This basically means, if you noticed that setting + 'langmap' disables some of your mappings, try setting this option. + This option defaults to off for backwards compatibility. Set it on if + that works for you to avoid mappings to break. + *'laststatus'* *'ls'* 'laststatus' 'ls' number (default 1) global @@ -4754,6 +4859,17 @@ A jump table for the options with a short description can be found at |Q_op|. Note that using the "-u NONE" and "--noplugin" command line arguments reset this option. |-u| |--noplugin| + *'luadll'* +'luadll' string (default depends on the build) + global + {not in Vi} + {only available when compiled with the |+lua/dyn| + feature} + Specifies the name of the Lua shared library. The default is + DYNAMIC_LUA_DLL, which was specified at compile time. + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. + *'macatsui'* *'nomacatsui'* 'macatsui' boolean (default on) global @@ -4915,8 +5031,11 @@ A jump table for the options with a short description can be found at |Q_op|. {not in Vi} Maximum amount of memory in Kbyte to use for all buffers together. The maximum usable value is about 2000000 (2 Gbyte). Use this to work - without a limit. On 64 bit machines higher values might work. But - hey, do you really need more than 2 Gbyte for text editing? + without a limit. + On 64 bit machines higher values might work. But hey, do you really + need more than 2 Gbyte for text editing? Keep in mind that text is + stored in the swap file, one can edit files > 2 Gbyte anyay. We do + need the memory to store undo info. Also see 'maxmem'. *'menuitems'* *'mis'* @@ -5190,7 +5309,7 @@ A jump table for the options with a short description can be found at |Q_op|. Negative or zero value means no thread scheduling. *'nrformats'* *'nf'* -'nrformats' 'nf' string (default "octal,hex") +'nrformats' 'nf' string (default "bin,octal,hex") local to buffer {not in Vi} This defines what bases Vim will consider for numbers when using the @@ -5204,6 +5323,9 @@ A jump table for the options with a short description can be found at |Q_op|. hex If included, numbers starting with "0x" or "0X" will be considered to be hexadecimal. Example: Using CTRL-X on "0x100" results in "0x0ff". + bin If included, numbers starting with "0b" or "0B" will be + considered to be binary. Example: Using CTRL-X on + "0b1000" subtracts one, resulting in "0b0111". Numbers which simply begin with a digit in the range 1-9 are always considered decimal. This also happens for numbers that are not recognized as octal or hex. @@ -5322,19 +5444,21 @@ A jump table for the options with a short description can be found at |Q_op|. When the 'paste' option is switched on (also when it was already on): - mapping in Insert mode and Command-line mode is disabled - abbreviations are disabled - - 'textwidth' is set to 0 - - 'wrapmargin' is set to 0 - 'autoindent' is reset - - 'smartindent' is reset - - 'softtabstop' is set to 0 + - 'expandtab' is reset + - 'formatoptions' is used like it is empty - 'revins' is reset - 'ruler' is reset - 'showmatch' is reset - - 'formatoptions' is used like it is empty + - 'smartindent' is reset + - 'smarttab' is reset + - 'softtabstop' is set to 0 + - 'textwidth' is set to 0 + - 'wrapmargin' is set to 0 These options keep their value, but their effect is disabled: - - 'lisp' - - 'indentexpr' - 'cindent' + - 'indentexpr' + - 'lisp' NOTE: When you start editing another file while the 'paste' option is on, settings from the modelines or autocommands may change the settings again, causing trouble when pasting text. You might want to @@ -5455,6 +5579,17 @@ A jump table for the options with a short description can be found at |Q_op|. < Replace the ';' with a ':' or whatever separator is used. Note that this doesn't work when $INCL contains a comma or white space. + *'perldll'* +'perldll' string (default depends on the build) + global + {not in Vi} + {only available when compiled with the |+perl/dyn| + feature} + Specifies the name of the Perl shared library. The default is + DYNAMIC_PERL_DLL, which was specified at compile time. + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. + *'preserveindent'* *'pi'* *'nopreserveindent'* *'nopi'* 'preserveindent' 'pi' boolean (default off) local to buffer @@ -5581,6 +5716,27 @@ A jump table for the options with a short description can be found at |Q_op|. Insert mode completion. When zero as much space as available is used. |ins-completion-menu|. + *'pythondll'* +'pythondll' string (default depends on the build) + global + {not in Vi} + {only available when compiled with the |+python/dyn| + feature} + Specifies the name of the Python 2.x shared library. The default is + DYNAMIC_PYTHON_DLL, which was specified at compile time. + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. + + *'pythonthreedll'* +'pythonthreedll' string (default depends on the build) + global + {not in Vi} + {only available when compiled with the |+python3/dyn| + feature} + Specifies the name of the Python 3 shared library. The default is + DYNAMIC_PYTHON3_DLL, which was specified at compile time. + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. *'quoteescape'* *'qe'* 'quoteescape' 'qe' string (default "\") @@ -5627,6 +5783,10 @@ A jump table for the options with a short description can be found at |Q_op|. Note that when using the NFA engine and the pattern contains something that is not supported the pattern will not match. This is only useful for debugging the regexp engine. + Using automatic selection enables Vim to switch the engine, if the + default engine becomes too costly. E.g., when the NFA engine uses too + many states. This should prevent Vim from hanging on a combination of + a complex pattern with long text. *'relativenumber'* *'rnu'* *'norelativenumber'* *'nornu'* 'relativenumber' 'rnu' boolean (default off) @@ -5763,7 +5923,9 @@ A jump table for the options with a short description can be found at |Q_op|. Inserting characters in Insert mode will work backwards. See "typing backwards" |ins-reverse|. This option can be toggled with the CTRL-_ command in Insert mode, when 'allowrevins' is set. - NOTE: This option is reset when 'compatible' or 'paste' is set. + NOTE: This option is reset when 'compatible' is set. + This option is reset when 'paste' is set and restored when 'paste' is + reset. *'rightleft'* *'rl'* *'norightleft'* *'norl'* 'rightleft' 'rl' boolean (default off) @@ -5795,6 +5957,17 @@ A jump table for the options with a short description can be found at |Q_op|. This is useful for languages such as Hebrew, Arabic and Farsi. The 'rightleft' option must be set for 'rightleftcmd' to take effect. + *'rubydll'* +'rubydll' string (default: depends on the build) + global + {not in Vi} + {only available when compiled with the |+ruby/dyn| + feature} + Specifies the name of the Ruby shared library. The default is + DYNAMIC_RUBY_DLL, which was specified at compile time. + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. + *'ruler'* *'ru'* *'noruler'* *'noru'* 'ruler' 'ru' boolean (default off) global @@ -5819,7 +5992,8 @@ A jump table for the options with a short description can be found at |Q_op|. separated with a dash. For an empty line "0-1" is shown. For an empty buffer the line number will also be zero: "0,0-1". - This option is reset when the 'paste' option is set. + This option is reset when 'paste' is set and restored when 'paste' is + reset. If you don't want to see the ruler all the time but want to know where you are, use "g CTRL-G" |g_CTRL-G|. NOTE: This option is reset when 'compatible' is set. @@ -6372,6 +6546,7 @@ A jump table for the options with a short description can be found at |Q_op|. c don't give |ins-completion-menu| messages. For example, "-- XXX completion (YYY)", "match 1 of 2", "The only match", "Pattern not found", "Back at original", etc. + q use "recording" instead of "recording @a" This gives you the opportunity to avoid that a change between buffers requires you to hit , but still gives as useful a message as @@ -6458,7 +6633,9 @@ A jump table for the options with a short description can be found at |Q_op|. jump is only done if the match can be seen on the screen. The time to show the match can be set with 'matchtime'. A Beep is given if there is no match (no matter if the match can be - seen or not). This option is reset when the 'paste' option is set. + seen or not). + This option is reset when 'paste' is set and restored when 'paste' is + reset. When the 'm' flag is not included in 'cpoptions', typing a character will immediately move the cursor back to where it belongs. See the "sm" field in 'guicursor' for setting the cursor shape and @@ -6567,8 +6744,9 @@ A jump table for the options with a short description can be found at |Q_op|. mapping: ":inoremap # X^H#", where ^H is entered with CTRL-V CTRL-H. When using the ">>" command, lines starting with '#' are not shifted right. - NOTE: 'smartindent' is reset when 'compatible' is set. When 'paste' - is set smart indenting is disabled. + NOTE: 'smartindent' is reset when 'compatible' is set. + This option is reset when 'paste' is set and restored when 'paste' is + reset. *'smarttab'* *'sta'* *'nosmarttab'* *'nosta'* 'smarttab' 'sta' boolean (default off) @@ -6584,6 +6762,8 @@ A jump table for the options with a short description can be found at |Q_op|. What gets inserted (a or spaces) depends on the 'expandtab' option. Also see |ins-expandtab|. When 'expandtab' is not set, the number of spaces is minimized by using s. + This option is reset when 'paste' is set and restored when 'paste' is + reset. NOTE: This option is reset when 'compatible' is set. *'softtabstop'* *'sts'* @@ -6598,7 +6778,8 @@ A jump table for the options with a short description can be found at |Q_op|. commands like "x" still work on the actual characters. When 'sts' is zero, this feature is off. When 'sts' is negative, the value of 'shiftwidth' is used. - 'softtabstop' is set to 0 when the 'paste' option is set. + 'softtabstop' is set to 0 when the 'paste' option is set and restored + when 'paste' is reset. See also |ins-expandtab|. When 'expandtab' is not set, the number of spaces is minimized by using s. The 'L' flag in 'cpoptions' changes how tabs are used when 'list' is @@ -6675,7 +6856,8 @@ A jump table for the options with a short description can be found at |Q_op|. the two-letter, lower case region name. You can use more than one region by listing them: "en_us,en_ca" supports both US and Canadian English, but not words specific for Australia, New Zealand or Great - Britain. + Britain. (Note: currently en_au and en_nz dictionaries are older than + en_ca, en_gb and en_us). If the name "cjk" is included East Asian characters are excluded from spell checking. This is useful when editing text that also has Asian words. @@ -6919,7 +7101,7 @@ A jump table for the options with a short description can be found at |Q_op|. become empty. This will make a group like the following disappear completely from the statusline when none of the flags are set. > :set statusline=...%(\ [%M%R%H]%)... -< +< *g:actual_curbuf* Beware that an expression is evaluated each and every time the status line is displayed. The current buffer and current window will be set temporarily to that of the window (and buffer) whose statusline is @@ -7045,6 +7227,7 @@ A jump table for the options with a short description can be found at |Q_op|. split If included, split the current window before loading a buffer for a |quickfix| command that display errors. Otherwise: do not split, use current window. + vsplit Just like "split" but split vertically. newtab Like "split", but open a new tab page. Overrules "split" when both are present. @@ -7175,19 +7358,22 @@ A jump table for the options with a short description can be found at |Q_op|. < [The whitespace before and after the '0' must be a single ] When a binary search was done and no match was found in any of the - files listed in 'tags', and 'ignorecase' is set or a pattern is used + files listed in 'tags', and case is ignored or a pattern is used instead of a normal tag name, a retry is done with a linear search. Tags in unsorted tags files, and matches with different case will only be found in the retry. If a tag file indicates that it is case-fold sorted, the second, - linear search can be avoided for the 'ignorecase' case. Use a value - of '2' in the "!_TAG_FILE_SORTED" line for this. A tag file can be - case-fold sorted with the -f switch to "sort" in most unices, as in - the command: "sort -f -o tags tags". For "Exuberant ctags" version - 5.x or higher (at least 5.5) the --sort=foldcase switch can be used - for this as well. Note that case must be folded to uppercase for this - to work. + linear search can be avoided when case is ignored. Use a value of '2' + in the "!_TAG_FILE_SORTED" line for this. A tag file can be case-fold + sorted with the -f switch to "sort" in most unices, as in the command: + "sort -f -o tags tags". For "Exuberant ctags" version 5.x or higher + (at least 5.5) the --sort=foldcase switch can be used for this as + well. Note that case must be folded to uppercase for this to work. + + By default, tag searches are case-sensitive. Case is ignored when + 'ignorecase' is set and 'tagcase' is "followic", or when 'tagcase' is + "ignore". When 'tagbsearch' is off, tags searching is slower when a full match exists, but faster when no full match exists. Tags in unsorted tags @@ -7199,6 +7385,16 @@ A jump table for the options with a short description can be found at |Q_op|. command-line completion and ":help"). {Vi: always uses binary search in some versions} + *'tagcase'* *'tc'* +'tagcase' 'tc' string (default "followic") + global or local to buffer |global-local| + {not in Vi} + This option specifies how case is handled when searching the tags + file: + followic Follow the 'ignorecase' option + ignore Ignore case + match Match case + *'taglength'* *'tl'* 'taglength' 'tl' number (default 0) global @@ -7253,6 +7449,17 @@ A jump table for the options with a short description can be found at |Q_op|. Resetting this option is useful when using a ":tag" command in a mapping which should not change the tagstack. + *'tcldll'* +'tcldll' string (default depends on the build) + global + {not in Vi} + {only available when compiled with the |+tcl/dyn| + feature} + Specifies the name of the Tcl shared library. The default is + DYNAMIC_TCL_DLL, which was specified at compile time. + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. + *'term'* *E529* *E530* *E531* 'term' string (default is $TERM, if that fails: in the GUI: "builtin_gui" @@ -7301,14 +7508,12 @@ A jump table for the options with a short description can be found at |Q_op|. the GUI it only applies to the keyboard ( 'encoding' is used for the display). Except for the Mac when 'macatsui' is off, then 'termencoding' should be "macroman". - In the Win32 console version the default value is the console codepage - when it differs from the ANSI codepage. *E617* Note: This does not apply to the GTK+ 2 GUI. After the GUI has been successfully initialized, 'termencoding' is forcibly set to "utf-8". Any attempts to set a different value will be rejected, and an error message is shown. - For the Win32 GUI 'termencoding' is not used for typed characters, + For the Win32 GUI and console versions 'termencoding' is not used, because the Win32 system always passes Unicode characters. When empty, the same encoding is used as for the 'encoding' option. This is the normal value. @@ -7358,8 +7563,10 @@ A jump table for the options with a short description can be found at |Q_op|. {not in Vi} Maximum width of text that is being inserted. A longer line will be broken after white space to get this width. A zero value disables - this. 'textwidth' is set to 0 when the 'paste' option is set. When - 'textwidth' is zero, 'wrapmargin' may be used. See also + this. + 'textwidth' is set to 0 when the 'paste' option is set and restored + when 'paste' is reset. + When 'textwidth' is zero, 'wrapmargin' may be used. See also 'formatoptions' and |ins-textwidth|. When 'formatexpr' is set it will be used to break the line. NOTE: This option is set to 0 when 'compatible' is set. @@ -7898,9 +8105,9 @@ A jump table for the options with a short description can be found at |Q_op|. % When included, save and restore the buffer list. If Vim is started with a file name argument, the buffer list is not restored. If Vim is started without a file name argument, the - buffer list is restored from the viminfo file. Buffers - without a file name and buffers for help files are not written - to the viminfo file. + buffer list is restored from the viminfo file. Quickfix + ('buftype'), unlisted ('buflisted'), unnamed and buffers on + removable media (|viminfo-r|) are not saved. When followed by a number, the number specifies the maximum number of buffers that are stored. Without a number all buffers are stored. @@ -8381,6 +8588,8 @@ A jump table for the options with a short description can be found at |Q_op|. Options that add a margin, such as 'number' and 'foldcolumn', cause the text width to be further reduced. This is Vi compatible. When 'textwidth' is non-zero, this option is not used. + This option is set to 0 when 'paste' is set and restored when 'paste' + is reset. See also 'formatoptions' and |ins-textwidth|. {Vi: works differently and less usefully} diff --git a/en/os_os2.txt b/en/os_os2.txt index 231d7d102..53bb79927 100644 --- a/en/os_os2.txt +++ b/en/os_os2.txt @@ -1,221 +1,13 @@ -*os_os2.txt* For Vim version 7.4. Last change: 2007 Apr 22 +*os_os2.txt* For Vim version 7.4. Last change: 2015 Dec 31 VIM REFERENCE MANUAL by Paul Slootman *os2* *OS2* *OS/2* -This file contains the particularities for the OS/2 version of Vim. +This file used to contain the particularities for the OS/2 version of Vim. -At present there is no native PM version of the GUI version of Vim: The OS/2 -version is a console application. However, there is now a Win32s-compatible -GUI version, which should be usable by owners of Warp 4 (which supports -Win32s) in a Win-OS/2 session. The notes in this file refer to the native -console version. +The OS/2 support was removed in patch 7.4.1008. -NOTE - -This OS/2 port works well for me and a couple of other OS/2 users; however, -since I haven't had much feedback, that either means no (OS/2-specific) bugs -exist (besides the ones mentioned below), or no one has yet created a -situation in which any bugs are apparent. File I/O in Dos and Unix mode, -binary mode, and FAT handling all seem to work well, which would seem to be -the most likely places for trouble. - -A known problem is that files opened by Vim are inherited by other programs -that are started via a shell escape from within Vim. This specifically means -that Vim won't be able to remove the swap file(s) associated with buffers open -at the time the other program was started, until the other program is stopped. -At that time, the swap file may be removed, but if Vim could not do that the -first time, it won't be removed at all. You'll get warnings that some other -Vim session may be editing the file when you start Vim up again on that file. -This can be reproduced with ":!start epm". Now quit Vim, and start Vim again -with the file that was in the buffer at the time epm was started. I'm working -on this! - -A second problem is that Vim doesn't understand the situation when using it -when accessing the OS/2 system via the network, e.g. using telnet from a Unix -system, and then starting Vim. The problem seems to be that OS/2 =sometimes= -recognizes function / cursor keys, and tries to convert those to the -corresponding OS/2 codes generated by the "normal" PC keyboard. I've been -testing a workaround (mapping the OS/2 codes to the correct functions), but so -far I can't say anything conclusive (this is on Warp 3, by the way). In the -meantime any help will be appreciated. - - -PREREQUISITES - -To run Vim, you need the emx runtime environment (at least rev. 0.9b). This -is generally available as (ask Archie about it): - - emxrt.zip emx runtime package - -I've included a copy of emx.dll, which should be copied to one of the -directories listed in your LIBPATH. Emx is GPL'ed, but the emx.dll library is -not (read COPYING.EMX to find out what that means to you). - -This emx.dll is from the emxfix04.zip package, which unfortunately has a bug, -eh, I mean a POSIX feature, in select(). Versions of Vim before 3.27 will -appear to hang when starting (actually, while processing vimrc). Hit a -couple of times until Vim starts working if this happens. Next, get an up to -date version of Vim! - - -HELP AND VIMRC FILE - -If you unpack the archive that Vim came in and run Vim directly from where it -was unpacked, Vim should be able to find the runtime files and your .vimrc -without any settings. - -If you put the runtime files separately from the binary, the VIM environment -variable is used to find the location of the help files and the system .vimrc. -Place an entry such as this in CONFIG.SYS: > - - SET VIM=c:/local/lib/vim - -Put your .vimrc and your other Vim files in this directory. Copy the runtime -directory to this directory. Each version of Vim has its own runtime -directory. It will be called something like "c:/local/lib/vim/vim54". Thus -you get a tree of Vim files like this: - c:/local/lib/vim/.vimrc - c:/local/lib/vim/vim54/filetype.vim - c:/local/lib/vim/vim54/doc/help.txt - etc. - -Note: .vimrc may also be called _vimrc to accommodate those who have chosen to -install OS/2 on a FAT file system. Vim first tries to find .vimrc and if that -fails, looks for _vimrc in the same place. The existence of a .vimrc or -_vimrc file influences the 'compatible' options, which can have unexpected side -effects. See |'compatible'|. - -If you're using network drives with OS/2, then you can install Vim on a -network drive (including .vimrc; this is then called the "system" vimrc file), -and then use a personal copy of .vimrc (the "user" vimrc file). This should be -located in a directory indicated by the HOME environment variable. - - -ENVIRONMENT VARIABLES IN FILE NAMES - -This HOME environment variable is also used when using ~ in file names, so -":e ~/textfile" will edit the file "textfile" in the directory referred to by -HOME. Additionally you can use other environment variables in file names, as -in ":n $SRC/*.c". - -The HOME environment variable is also used to locate the .viminfo file -(see |viminfo-file|). There is no support yet for .viminfo on FAT file -systems yet, sorry. You could try the -i startup flag (as in "vim -i -$HOME/_viminfo") however. - -If the HOME environment variable is not set, the value "C:/" is used as a -default. - - -BACKSLASHES - -Using slashes ('/') and backslashes ('\') can be a bit of a problem (see -|dos-backslash| for more explanation), but in almost all cases Vim does "The -Right Thing". Vim itself uses backslashes in file names, but will happily -accept forward slashes if they are entered (in fact, sometimes that works -better!). - - -TEMP FILES - -Temporary files (for filtering) are put in the first directory in the next -list that exists and where a file can be created: - $TMP - $TEMP - C:\TMP - C:\TEMP - current directory - - -TERMINAL SETTING - - *os2ansi* -Use "os2ansi" as the TERM environment variable (or don't set it at all, as the -default is the correct value). You can set term to os2ansi in the .vimrc, in -case you need TERM to be a different value for other applications. The -problem is that OS/2 ANSI emulation is quite limited (it doesn't have insert / -delete line, for example). - -If you want to use a different value for TERM (because of other programs, for -example), make sure that the termcap entry for that TERM value has the -appropriate key mappings. The termcap.dat distributed with emx does not always -have them. Here are some suitable values to add to the termcap entry of your -choice; these allow the cursor keys and the named function keys (such as -pagedown) to work. - - :ku=\316H:kd=\316P:kl=\316K:kr=\316M:%i=\316t:#4=\316s:\ - :kD=\316S:kI=\316R:kN=\316Q:kP=\316I:kh=\316G:@7=\316O:\ - :k1=\316;:k2=\316<:k3=\316=:k4=\316>:k5=\316?:k6=\316@:\ - :k7=\316A:k8=\316B:k9=\316C:k;=\316D: - - -Paul Slootman - - -43 LINE WINDOW - -A suggestion from Steven Tryon, on how to run Vim in a bigger window: - -When I call Vim from an OS/2 WPS application such as PMMail it comes up -in the default 25-line mode. To get a more useful window size I make -my external editor "vimbig.cmd" which in turn calls "vimbig2.cmd". -Brute force and awkwardness, perhaps, but it works. - -vimbig.cmd: > - @echo off - start "Vi Improved" /f vimbig2.cmd %1 %2 %3 %4 - -vimbig2.cmd: > - @echo off - mode 80,43 - vim.exe %1 %2 %3 %4 - exit -< - -CLIPBOARD ACCESS (provided by Alexander Wagner) - -Vim for OS/2 has no direct access to the system clipboard. To enable access -anyway you need an additional tool which gives you access to the clipboard -from within a vio application. The freeware package clipbrd.zip by Stefan -Gruendel can be used for this purpose. You might download the package -including precompiled binaries and all sources from: - http://www.os2site.com/sw/util/clipboard/index.html - http://download.uni-hd.de/ftp/pub/os2/pmtools/ - -Installation of this package is straight forward: just put the two executables -that come with this package into a directory within your PATH for Vim should -be able to call them from whatever directory you are working. - -To copy text from the clipboard to your Vim session you can use the :r -command. Simply call clipbrd.exe from within Vim in the following way: > - - :r !clipbrd -r - -To copy text from Vim to the system clipboard just mark the text in the usual -vim-manner and call: > - - :!clipbrd -w - -which will write your selection right into OS/2's clipboard. - -For ease of use you might want to add some maps for these commands. E.g. to -use F11 to paste the clipboard into Vim and F12 to copy selected text to the -clipboard you would use: > - - if has("os2") - imap :r !clipbrd -ri - vmap :!clipbrd -w - else - imap "*pi - vmap "*y - endif - -This will ensure that only on OS/2 clipbrd is called whereas on other -platforms vims build in mechanism is used. (To enable this functions on every -load of Vim place the above lines in your .vimrc.) - vim:tw=78:ts=8:ft=help:norl: diff --git a/en/pattern.txt b/en/pattern.txt index 322811b7c..2a3d2c482 100644 --- a/en/pattern.txt +++ b/en/pattern.txt @@ -1,4 +1,4 @@ -*pattern.txt* For Vim version 7.4. Last change: 2014 Sep 06 +*pattern.txt* For Vim version 7.4. Last change: 2016 Jan 03 VIM REFERENCE MANUAL by Bram Moolenaar @@ -59,6 +59,8 @@ explanations are in chapter 27 |usr_27.txt|. *n* n Repeat the latest "/" or "?" [count] times. + If the cursor doesn't move the search is repeated with + count + 1. |last-pattern| {Vi: no count} *N* @@ -391,8 +393,8 @@ Use of "\M" makes the pattern after it be interpreted as if 'nomagic' is used. Use of "\v" means that in the pattern after it all ASCII characters except '0'-'9', 'a'-'z', 'A'-'Z' and '_' have a special meaning. "very magic" -Use of "\V" means that in the pattern after it only the backslash has a -special meaning. "very nomagic" +Use of "\V" means that in the pattern after it only the backslash and the +terminating character (/ or ?) has a special meaning. "very nomagic" Examples: after: \v \m \M \V matches ~ @@ -400,6 +402,7 @@ after: \v \m \M \V matches ~ $ $ $ \$ matches end-of-line . . \. \. matches any character * * \* \* any number of the previous atom + ~ ~ \~ \~ latest substitute string () \(\) \(\) \(\) grouping into an atom | \| \| \| separating alternatives \a \a \a \a alphabetic character @@ -478,6 +481,7 @@ More explanation and examples below, follow the links. |/\%v| \%23v \%23v in virtual column 23 |/zero-width| Character classes {not in Vi}: */character-classes* + magic nomagic matches ~ |/\i| \i \i identifier character (see 'isident' option) |/\I| \I \I like "\i", but excluding digits |/\k| \k \k keyword character (see 'iskeyword' option) @@ -508,6 +512,7 @@ Character classes {not in Vi}: */character-classes* class with end-of-line included (end of character classes) + magic nomagic matches ~ |/\e| \e \e |/\t| \t \t |/\r| \r \r @@ -533,6 +538,7 @@ Character classes {not in Vi}: */character-classes* |/\Z| \Z \Z ignore differences in Unicode "combining characters". Useful when searching voweled Hebrew or Arabic text. + magic nomagic matches ~ |/\m| \m \m 'magic' on for the following chars in the pattern |/\M| \M \M 'magic' off for the following chars in the pattern |/\v| \v \v the following chars in the pattern are "very magic" @@ -1058,7 +1064,10 @@ x A single character, with no special meaning, matches itself *E769* When the ']' is not there Vim will not give an error message but assume no collection is used. Useful to search for '['. However, you - do get E769 for internal searching. + do get E769 for internal searching. And be aware that in a + `:substitute` command the whole command becomes the pattern. E.g. + ":s/[/x/" searches for "[/x" and replaces it with nothing. It does + not search for "[" and replaces it with "x"! If the sequence begins with "^", it matches any single character NOT in the collection: "[^xyz]" matches anything but 'x', 'y' and 'z'. @@ -1093,7 +1102,10 @@ x A single character, with no special meaning, matches itself plausible pattern for a UNIX filename: "[-./[:alnum:]_~]\+" That is, a list of at least one character, each of which is either '-', '.', '/', alphabetic, numeric, '_' or '~'. - These items only work for 8-bit characters. + These items only work for 8-bit characters, except [:lower:] and + [:upper:] also work for multi-byte characters when using the new + regexp engine. In the future these items may work for multi-byte + characters. */[[=* *[==]* - An equivalence class. This means that characters are matched that have almost the same meaning, e.g., when ignoring accents. This diff --git a/en/pi_netrw.txt b/en/pi_netrw.txt index 32f576af6..3ca221f0f 100644 --- a/en/pi_netrw.txt +++ b/en/pi_netrw.txt @@ -1,4 +1,4 @@ -*pi_netrw.txt* For Vim version 7.4. Last change: 2014 May 13 +*pi_netrw.txt* For Vim version 7.4. Last change: 2015 Oct 31 ------------------------------------------------ NETRW REFERENCE MANUAL by Charles E. Campbell @@ -6,7 +6,7 @@ Author: Charles E. Campbell (remove NOSPAM from Campbell's email first) -Copyright: Copyright (C) 1999-2014 Charles E Campbell *netrw-copyright* +Copyright: Copyright (C) 1999-2015 Charles E Campbell *netrw-copyright* The VIM LICENSE applies to the files in this package, including netrw.vim, pi_netrw.txt, netrwFileHandlers.vim, netrwSettings.vim, and syntax/netrw.vim. Like anything else that's free, netrw.vim and its @@ -18,9 +18,10 @@ Copyright: Copyright (C) 1999-2014 Charles E Campbell *netrw-copyright* software. Use at your own risk! + *netrw* *dav* *ftp* *netrw-file* *rcp* *scp* *davs* *http* *netrw.vim* *rsync* *sftp* - *fetch* *netrw* *network* + *fetch* *network* ============================================================================== 1. Contents *netrw-contents* {{{1 @@ -57,7 +58,7 @@ Copyright: Copyright (C) 1999-2014 Charles E Campbell *netrw-copyright* Changing To A Bookmarked Directory..................|netrw-gb| Changing To A Predecessor Directory.................|netrw-u| Changing To A Successor Directory...................|netrw-U| - Customizing Browsing With A User Function...........|netrw-x| + Customizing Browsing With A Special Handler.........|netrw-x| Deleting Bookmarks..................................|netrw-mB| Deleting Files Or Directories.......................|netrw-D| Directory Exploring Commands........................|netrw-explore| @@ -76,7 +77,9 @@ Copyright: Copyright (C) 1999-2014 Charles E Campbell *netrw-copyright* Unmarking Files.....................................|netrw-mF| Marking Files By QuickFix List......................|netrw-qF| Marking Files By Regular Expression.................|netrw-mr| - Marked Files: Arbitrary Command.....................|netrw-mx| + Marked Files: Arbitrary Shell Command...............|netrw-mx| + Marked Files: Arbitrary Shell Command, En Bloc......|netrw-mX| + Marked Files: Arbitrary Vim Command.................|netrw-mv| Marked Files: Compression And Decompression.........|netrw-mz| Marked Files: Copying...............................|netrw-mc| Marked Files: Diff..................................|netrw-md| @@ -209,6 +212,7 @@ EXTERNAL APPLICATIONS AND PROTOCOLS *netrw-externapp* {{{2 rsync: *g:netrw_rsync_cmd* = "rsync -a" scp: *g:netrw_scp_cmd* = "scp -q" sftp: *g:netrw_sftp_cmd* = "sftp" + file: *g:netrw_file_cmd* = "elinks" or "links" *g:netrw_http_xcmd* : the option string for http://... protocols are specified via this variable and may be independently overridden. By @@ -346,7 +350,7 @@ settings are described below, in |netrw-browser-options|, and in per-buffer basis (supports plain :Nw ) *g:netrw_bufsettings* the settings that netrw buffers have - (default) noma nomod nonu nowrap ro nobl + (default) noma nomod nonu nowrap ro nobl *g:netrw_chgwin* specifies a window number where subsequent file edits will take place. (also see |netrw-C|) @@ -363,7 +367,12 @@ settings are described below, in |netrw-browser-options|, and in fun! MyFuncRef() endfun let g:Netrw_funcref= function("MyFuncRef") + < + *g:Netrw_UserMaps* specifies a function or |List| of functions which can + be used to set up user-specified maps and functionality. + See |netrw-usermaps| + *g:netrw_ftp* if it doesn't exist, use default ftp =0 use default ftp (uid password) =1 use alternate ftp method (user uid password) @@ -399,18 +408,26 @@ settings are described below, in |netrw-browser-options|, and in be available (see |netrw-gx|) *g:netrw_uid* (ftp) user-id, retained on a per-vim-session basis - *s:netrw_passwd* (ftp) password, retained on a per-vim-session basis + *s:netrw_passwd* (ftp) password, retained on a per-vim-session basis *g:netrw_preview* =0 (default) preview window shown in a horizontally split window =1 preview window shown in a vertically split window. Also affects the "previous window" (see |netrw-P|) in the same way. + The |g:netrw_alto| variable may be used to provide + additional splitting control: + g:netrw_preview g:netrw_alto result + 0 0 |:aboveleft| + 0 1 |:belowright| + 1 0 |:topleft| + 1 1 |:botright| + To control sizing, see |g:netrw_winsize| *g:netrw_scpport* = "-P" : option to use to set port for scp *g:netrw_sshport* = "-p" : option to use to set port for ssh - *g:netrw_sepchr* =\0xff + *g:netrw_sepchr* =\0xff =\0x01 for enc == euc-jp (and perhaps it should be for others, too, please let me know) Separates priority codes from filenames internally. @@ -430,7 +447,7 @@ settings are described below, in |netrw-browser-options|, and in lines that o/s's ftp "provides" on transfers =0 force normal ftp behavior (no trailing line removal) - *g:netrw_cygwin* =1 assume scp under windows is from cygwin. Also + *g:netrw_cygwin* =1 assume scp under windows is from cygwin. Also permits network browsing to use ls with time and size sorting (default if windows) =0 assume Windows' scp accepts windows-style paths @@ -681,6 +698,16 @@ your <.vimrc> customization file: > filetype plugin indent on endif < +By also including the following lines in your .vimrc, one may have netrw +immediately activate when using [g]vim without any filenames, showing the +current directory: > + + " Augroup VimStartup: + augroup VimStartup + au! + au VimEnter * if expand("%") == "" | e . | endif + augroup END +< ============================================================================== 6. Transparent Remote File Editing *netrw-transparent* {{{1 @@ -838,7 +865,7 @@ variables listed below, and may be modified by the user. g:netrw_http_cmd var ="fetch -o" if fetch is available g:netrw_http_cmd var ="wget -O" else if wget is available g:netrw_http_put_cmd var ="curl -T" - g:netrw_list_cmd var ="ssh USEPORT HOSTNAME ls -Fa" + |g:netrw_list_cmd| var ="ssh USEPORT HOSTNAME ls -Fa" g:netrw_rcp_cmd var ="rcp" g:netrw_rsync_cmd var ="rsync -a" g:netrw_scp_cmd var ="scp -q" @@ -1042,6 +1069,10 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2 < Causes Netrw to issue help Netrw will enter the directory or read the file |netrw-cr| Netrw will attempt to remove the file/directory |netrw-del| + Edit file hiding list |netrw-ctrl-h| + Causes Netrw to refresh the directory listing |netrw-ctrl-l| + Browse using a gvim server |netrw-ctrl-r| + Shrink/expand a netrw/explore window |netrw-c-tab| - Makes Netrw go up one directory |netrw--| a Toggles between normal display, |netrw-a| hiding (suppress display of files matching g:netrw_list_hide) @@ -1051,23 +1082,28 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2 d Make a directory |netrw-d| D Attempt to remove the file(s)/directory(ies) |netrw-D| gb Go to previous bookmarked directory |netrw-gb| + gd Force treatment as directory |netrw-gd| + gf Force treatment as file |netrw-gf| gh Quick hide/unhide of dot-files |netrw-gh| - Edit file hiding list |netrw-ctrl-h| + gn Make top of tree the directory below the cursor |netrw-gn| i Cycle between thin, long, wide, and tree listings |netrw-i| - Causes Netrw to refresh the directory listing |netrw-ctrl-l| mb Bookmark current directory |netrw-mb| mc Copy marked files to marked-file target directory |netrw-mc| md Apply diff to marked files (up to 3) |netrw-md| me Place marked files on arg list and edit them |netrw-me| mf Mark a file |netrw-mf| + mF Unmark files |netrw-mF| + mg Apply vimgrep to marked files |netrw-mg| mh Toggle marked file suffices' presence on hiding list |netrw-mh| mm Move marked files to marked-file target directory |netrw-mm| mp Print marked files |netrw-mp| - mr Mark files satisfying a shell-style |regexp| |netrw-mr| + mr Mark files using a shell-style |regexp| |netrw-mr| mt Current browsing directory becomes markfile target |netrw-mt| mT Apply ctags to marked files |netrw-mT| mu Unmark all marked files |netrw-mu| + mv Apply arbitrary vim command to marked files |netrw-mv| mx Apply arbitrary shell command to marked files |netrw-mx| + mX Apply arbitrary shell command to marked files en bloc|netrw-mX| mz Compress/decompress marked files |netrw-mz| o Enter the file/directory under the cursor in a new |netrw-o| browser window. A horizontal split is used. @@ -1076,8 +1112,9 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2 P Browse in the previously used window |netrw-P| qb List bookmarked directories and history |netrw-qb| qf Display information on file |netrw-qf| + qF Mark files using a quickfix list |netrw-qF| r Reverse sorting order |netrw-r| - R Rename the designed file(s)/directory(ies) |netrw-R| + R Rename the designated file(s)/directory(ies) |netrw-R| s Select sorting style: by name, time, or file size |netrw-s| S Specify suffix priority for name-sorting |netrw-S| t Enter the file/directory under the cursor in a new tab|netrw-t| @@ -1099,7 +1136,7 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2 mouse <2-leftmouse> (gvim only) when: * in a netrw-selected file, AND - * |g:netrw_retmap| == 1 AND + * |g:netrw_retmap| == 1 AND * the user doesn't already have a <2-leftmouse> mapping defined before netrw is autoloaded, then a double clicked leftmouse button will return @@ -1117,7 +1154,7 @@ QUICK REFERENCE: COMMANDS *netrw-explore-cmds* *netrw-browse-cmds* {{{2 :Ntree....................................................|netrw-ntree| :Explore[!] [dir] Explore directory of current file......|netrw-explore| :Hexplore[!] [dir] Horizontal Split & Explore.............|netrw-explore| - :Lexplore [dir] Left Explorer Toggle...................|netrw-explore| + :Lexplore[!] [dir] Left Explorer Toggle...................|netrw-explore| :Nexplore[!] [dir] Vertical Split & Explore...............|netrw-explore| :Pexplore[!] [dir] Vertical Split & Explore...............|netrw-explore| :Rexplore Return to Explorer.....................|netrw-explore| @@ -1125,19 +1162,45 @@ QUICK REFERENCE: COMMANDS *netrw-explore-cmds* *netrw-browse-cmds* {{{2 :Texplore[!] [dir] Tab & Explore..........................|netrw-explore| :Vexplore[!] [dir] Vertical Split & Explore...............|netrw-explore| -BOOKMARKING A DIRECTORY *netrw-mb* *netrw-bookmark* *netrw-bookmarks* {{{2 +BOOKMARKING A DIRECTORY *netrw-mb* *netrw-bookmark* *netrw-bookmarks* {{{2 -One may easily "bookmark" a directory by using > +One may easily "bookmark" the currently browsed directory by using > mb < + *.netrwbook* Bookmarks are retained in between sessions in a $HOME/.netrwbook file, and are kept in sorted order. +If there are marked files and/or directories, mb will add them to the bookmark +list. + +*netrw-:NetrwMB* +Addtionally, one may use :NetrwMB to bookmark files or directories. > + + :NetrwMB[!] [files/directories] + +< No bang: enters files/directories into Netrw's bookmark system + + No argument and in netrw buffer: + if there are marked files : bookmark marked files + otherwise : bookmark file/directory under cursor + No argument and not in netrw buffer: bookmarks current open file + Has arguments : |glob()|s each arg and bookmarks them + + With bang: deletes files/directories from Netrw's bookmark system + +The :NetrwMB command is available outside of netrw buffers (once netrw has been +invoked in the session). + +The file ".netrwbook" holds bookmarks when netrw (and vim) is not active. By +default, its stored on the first directory on the user's |'runtimepath'|. + Related Topics: |netrw-gb| how to return (go) to a bookmark |netrw-mB| how to delete bookmarks |netrw-qb| how to list bookmarks + |g:netrw_home| controls where .netrwbook is kept BROWSING *netrw-cr* {{{2 @@ -1163,7 +1226,7 @@ horizontally or vertically, respectively. When the option is set to three, a When using the gui (gvim), one may select a file by pressing the button. In addition, if - *|g:netrw_retmap| == 1 AND (its default value is 0) + * |g:netrw_retmap| == 1 AND (its default value is 0) * in a netrw-selected file, AND * the user doesn't already have a <2-leftmouse> mapping defined before netrw is loaded @@ -1181,19 +1244,20 @@ The price for such re-use is that when changes are made (such as new files are introduced into a directory), the listing may become out-of-date. One may always refresh directory listing buffers by pressing ctrl-L (see |netrw-ctrl-l|). - *:netrw-s-cr* Squeezing the Current Tree-Listing Directory~ When the tree listing style is enabled (see |netrw-i|) and one is using gvim, then the mapping may be used to squeeze (close) the directory currently containing the cursor. - -Related topics: |netrw-o| |netrw-p| |netrw-P| |netrw-t| |netrw-v| -Associated setting variables: |g:netrw_browse_split| |g:netrw_fastbrowse| - |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd| - |g:netrw_ftp_timelist_cmd| |g:netrw_ssh_cmd| - |g:netrw_ssh_browse_reject| |g:netrw_use_noswf| +Related topics: + |netrw-ctrl-r| |netrw-o| |netrw-p| + |netrw-P| |netrw-t| |netrw-v| +Associated setting variables: + |g:netrw_browse_split| |g:netrw_fastbrowse| + |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd| + |g:netrw_ftp_timelist_cmd| |g:netrw_ssh_browse_reject| + |g:netrw_ssh_cmd| |g:netrw_use_noswf| BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o* *netrw-horiz* {{{2 @@ -1207,12 +1271,14 @@ cursor at the top. Associated setting variables: |g:netrw_alto| |g:netrw_winsize| -Related Actions |netrw-cr| |netrw-p| |netrw-t| |netrw-v| +Related topics: + |netrw-ctrl-r| |netrw-o| |netrw-p| + |netrw-P| |netrw-t| |netrw-v| Associated setting variables: |g:netrw_alto| control above/below splitting |g:netrw_winsize| control initial sizing -BROWSING WITH A NEW TAB *netrw-t* +BROWSING WITH A NEW TAB *netrw-t* {{{2 Normally one enters a file or directory using the . The "t" map allows one to open a new window holding the new directory listing or file in @@ -1220,7 +1286,9 @@ a new tab. If you'd like to have the new listing in a background tab, use |gT|. -Related Actions |netrw-cr| |netrw-o| |netrw-p| |netrw-v| +Related topics: + |netrw-ctrl-r| |netrw-o| |netrw-p| + |netrw-P| |netrw-t| |netrw-v| Associated setting variables: |g:netrw_winsize| control initial sizing @@ -1236,13 +1304,30 @@ cursor at the left. There is only one tree listing buffer; using "v" on a displayed subdirectory will split the screen, but the same buffer will be shown twice. -Related Actions: |netrw-cr| |netrw-o| |netrw-t| |netrw-v| +Related topics: + |netrw-ctrl-r| |netrw-o| |netrw-p| + |netrw-P| |netrw-t| |netrw-v| Associated setting variables: |g:netrw_altv| control right/left splitting |g:netrw_winsize| control initial sizing -CHANGE LISTING STYLE (THIN LONG WIDE TREE) *netrw-i* {{{2 +BROWSING USING A GVIM SERVER *netrw-ctrl-r* {{{2 + +One may keep a browsing gvim separate from the gvim being used to edit. +Use the map on a file (not a directory) in the netrw browser, and it +will use a gvim server (see |g:netrw_servername|). Subsequent use of +(see |netrw-cr|) will re-use that server for editing files. + +Related topics: + |netrw-ctrl-r| |netrw-o| |netrw-p| + |netrw-P| |netrw-t| |netrw-v| +Associated setting variables: + |g:netrw_servername| : sets name of server + |g:netrw_browse_split| : controls how will open files + + +CHANGE LISTING STYLE (THIN LONG WIDE TREE) *netrw-i* {{{2 The "i" map cycles between the thin, long, wide, and tree listing formats. @@ -1267,7 +1352,7 @@ name. One may make a preferred listing style your default; see |g:netrw_liststyle|. As an example, by putting the following line in your .vimrc, > - let g:netrw_liststyle= 4 + let g:netrw_liststyle= 3 the tree style will become your default listing style. One typical way to use the netrw tree display is to: > @@ -1318,18 +1403,25 @@ list (unless |g:netrw_dirhistmax| is zero; by default, it's ten). With the the opposite, see |netrw-U|. The "u" map also accepts counts to go back in the history several slots. -For your convenience, |netrw-qb| lists the history number which can be -re-used in that count. +For your convenience, qb (see |netrw-qb|) lists the history number which may +be used in that count. + *.netrwhist* See |g:netrw_dirhistmax| for how to control the quantity of history stack -slots. +slots. The file ".netrwhist" holds history when netrw (and vim) is not +active. By default, its stored on the first directory on the user's +|'runtimepath'|. + +Related Topics: + |netrw-U| changing to a successor directory + |g:netrw_home| controls where .netrwhist is kept CHANGING TO A SUCCESSOR DIRECTORY *netrw-U* *netrw-downdir* {{{2 With the "U" map, one can change to a later directory (successor). This map is the opposite of the "u" map. (see |netrw-u|) Use the -q map to list both the bookmarks and history. (see |netrw-qb|) +qb map to list both the bookmarks and history. (see |netrw-qb|) The "U" map also accepts counts to go forward in the history several slots. @@ -1337,7 +1429,7 @@ See |g:netrw_dirhistmax| for how to control the quantity of history stack slots. -CHANGING TREE TOP *netrw-ntree* *:Ntree* +CHANGING TREE TOP *netrw-ntree* *:Ntree* *netrw-gn* {{{2 One may specify a new tree top for tree listings using > @@ -1347,30 +1439,34 @@ Without a "dirname", the current line is used (and any leading depth information is elided). With a "dirname", the specified directory name is used. +The "gn" map will take the word below the cursor and use that for +changing the top of the tree listing. -NETRW CLEAN *netrw-clean* *:NetrwClean* -With :NetrwClean one may easily remove netrw from one's home directory; +NETRW CLEAN *netrw-clean* *:NetrwClean* {{{2 + +With NetrwClean one may easily remove netrw from one's home directory; more precisely, from the first directory on your |'runtimepath'|. -With :NetrwClean!, netrw will remove netrw from all directories on your -|'runtimepath'|. +With NetrwClean!, netrw will attempt to remove netrw from all directories on +your |'runtimepath'|. Of course, you have to have write/delete permissions +correct to do this. With either form of the command, netrw will first ask for confirmation that the removal is in fact what you want to do. If netrw doesn't have permission to remove a file, it will issue an error message. *netrw-gx* -CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler* {{{2 +CUSTOMIZING BROWSING WITH A SPECIAL HANDLER *netrw-x* *netrw-handler* {{{2 (also see |netrw_filehandler|) Certain files, such as html, gif, jpeg, (word/office) doc, etc, files, are -best seen with a special handler (ie. a tool provided with your computer). -Netrw allows one to invoke such special handlers by: > +best seen with a special handler (ie. a tool provided with your computer's +operating system). Netrw allows one to invoke such special handlers by: > * when Exploring, hit the "x" key * when editing, hit gx with the cursor atop the special filename -< (not available if the |g:netrw_nogx| variable exists) +< (latter not available if the |g:netrw_nogx| variable exists) Netrw determines which special handler by the following method: @@ -1379,14 +1475,14 @@ Netrw determines which special handler by the following method: :let g:netrw_browsex_viewer= "kfmclient exec" < or > - :let g:netrw_browsex_viewer= "gnome-open" + :let g:netrw_browsex_viewer= "xdg-open" < - If g:netrw_browsex_viewer == '-', then netrwFileHandler() will be - invoked first (see |netrw_filehandler|). + If g:netrw_browsex_viewer == '-', then netrwFileHandlers#Invoke() will be + used instead (see |netrw_filehandler|). * for Windows 32 or 64, the url and FileProtocolHandler dlls are used. * for Gnome (with gnome-open): gnome-open is used. - * for KDE (with kfmclient) : kfmclient is used. + * for KDE (with kfmclient) : kfmclient is used * for Mac OS X : open is used. * otherwise the netrwFileHandler plugin is used. @@ -1395,17 +1491,31 @@ appropriate application to use to "handle" these files. Such things as OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps, *.eps) can be handled. +The gx mapping extends to all buffers; apply "gx" while atop a word and netrw +will apply a special handler to it (like "x" works when in a netrw buffer). +One may also use visual mode (see |visual-start|) to select the text that the +special handler will use. Normally gx uses expand("") to pick up the +text under the cursor; one may change what |expand()| uses via the +|g:netrw_gx| variable. Alternatively, one may select the text to be used by +gx via first making a visual selection (see |visual-block|). + +Associated setting variables: + |g:netrw_gx| control how gx picks up the text under the cursor + |g:netrw_nogx| prevent gx map while editing + *netrw_filehandler* -The "x" map applies a function to a file, based on its extension. Of course, -the handler function must exist for it to be called! +When |g:netrw_browsex_viewer| exists and is "-", then netrw will attempt to +handle the special file with a vim function. The "x" map applies a function +to a file, based on its extension. Of course, the handler function must exist +for it to be called! > - Ex. mypgm.html x -> - NFH_html("scp://user@host/some/path/mypgm.html") -< -Users may write their own netrw File Handler functions to support more -suffixes with special handling. See for -examples on how to make file handler functions. As an example: > + Ex. mypgm.html x -> NFH_html("scp://user@host/some/path/mypgm.html") + +< Users may write their own netrw File Handler functions to + support more suffixes with special handling. See + for examples on how to make + file handler functions. As an example: > " NFH_suffix(filename) fun! NFH_suffix(filename) @@ -1439,7 +1549,14 @@ DELETING BOOKMARKS *netrw-mB* {{{2 To delete a bookmark, use > {cnt}mB -< + +If there are marked files, then mB will remove them from the +bookmark list. + +Alternatively, one may use :NetrwMB! (see |netrw-:NetrwMB|). > + + :NetrwMB! [files/directories] + Related Topics: |netrw-gb| how to return (go) to a bookmark |netrw-mb| how to make a bookmark @@ -1498,11 +1615,11 @@ DIRECTORY EXPLORATION COMMANDS {{{2 :[N]Explore[!] [dir]... Explore directory of current file *:Explore* :[N]Hexplore[!] [dir]... Horizontal Split & Explore *:Hexplore* - :Rexplore ... Return to/from Explorer *:Rexplore* + :[N]Lexplore[!] [dir]... Left Explorer Toggle *:Lexplore* :[N]Sexplore[!] [dir]... Split&Explore current file's directory *:Sexplore* - :Texplore [dir]... Tab & Explore *:Texplore* :[N]Vexplore[!] [dir]... Vertical Split & Explore *:Vexplore* - :Lexplore [dir]... Left Explorer Toggle *:Lexplore* + :Texplore [dir]... Tab & Explore *:Texplore* + :Rexplore ... Return to/from Explorer *:Rexplore* Used with :Explore **/pattern : (also see |netrw-starstar|) :Nexplore............. go to next matching file *:Nexplore* @@ -1511,54 +1628,77 @@ DIRECTORY EXPLORATION COMMANDS {{{2 *netrw-:Explore* :Explore will open the local-directory browser on the current file's directory (or on directory [dir] if specified). The window will be - split only if the file has been modified, otherwise the browsing - window will take over that window. Normally the splitting is taken - horizontally. + split only if the file has been modified and |'hidden'| is not set, + otherwise the browsing window will take over that window. Normally + the splitting is taken horizontally. Also see: |netrw-:Rexplore| :Explore! is like :Explore, but will use vertical splitting. - *netrw-:Lexplore* -:Lexplore [dir] toggles an Explorer window on the left hand side - of the current tab It will open a netrw window on the current - directory if [dir] is omitted; a :Lexplore [dir] will show - the specified directory in the left-hand side browser display - no matter from which window the command is issued. By default, - :Lexplore will change an uninitialized |g:netrw_chgwin| to 2; - edits will thus be preferentially made in window#2. - Also see: |netrw-C|| |g:netrw_chgwin| |g:netrw_winsize| - |netrw-p| |netrw-P|| |g:netrw_browse_split| - *netrw-:Sexplore* -:Sexplore will always split the window before invoking the local-directory - browser. As with Explore, the splitting is normally done - horizontally. -:Sexplore! [dir] is like :Sexplore, but the splitting will be done vertically. + *netrw-:Hexplore* :Hexplore [dir] does an :Explore with |:belowright| horizontal splitting. :Hexplore! [dir] does an :Explore with |:aboveleft| horizontal splitting. - *netrw-:Vexplore* -:Vexplore [dir] does an :Explore with |:leftabove| vertical splitting. -:Vexplore! [dir] does an :Explore with |:rightbelow| vertical splitting. + + *netrw-:Lexplore* +:[N]Lexplore [dir] toggles a full height Explorer window on the left hand side + of the current tab. It will open a netrw window on the current + directory if [dir] is omitted; a :Lexplore [dir] will show the + specified directory in the left-hand side browser display no matter + from which window the command is issued. + + By default, :Lexplore will change an uninitialized |g:netrw_chgwin| + to 2; edits will thus preferentially be made in window#2. + + The [N] specifies a |g:netrw_winsize| just for the new :Lexplore + window. + + Those who like this method often also often like tree style displays; + see |g:netrw_liststyle|. + + Also see: |netrw-C| |g:netrw_browse_split| |g:netrw_wiw| + |netrw-p| |netrw-P| |g:netrw_chgwin| + |netrw-c-tab| |g:netrw_winsize| + +:[N]Lexplore! is like :Lexplore, except that the full-height Explorer window + will open on the right hand side and an uninitialized |g:netrw_chgwin| + will be set to 1. + + *netrw-:Sexplore* +:[N]Sexplore will always split the window before invoking the local-directory + browser. As with Explore, the splitting is normally done + horizontally. +:[N]Sexplore! [dir] is like :Sexplore, but the splitting will be done vertically. + *netrw-:Texplore* :Texplore [dir] does a |:tabnew| before generating the browser window -By default, these commands use the current file's directory. However, one may -explicitly provide a directory (path) to use. + *netrw-:Vexplore* +:[N]Vexplore [dir] does an :Explore with |:leftabove| vertical splitting. +:[N]Vexplore! [dir] does an :Explore with |:rightbelow| vertical splitting. + +The optional parameters are: -The [N] will override |g:netrw_winsize| to specify the quantity of rows and/or -columns the new explorer window should have. + [N]: This parameter will override |g:netrw_winsize| to specify the quantity of + rows and/or columns the new explorer window should have. + Otherwise, the |g:netrw_winsize| variable, if it has been specified by the + user, is used to control the quantity of rows and/or columns new + explorer windows should have. -Otherwise, the |g:netrw_winsize| variable, if it has been specified by the -user, is used to control the quantity of rows and/or columns new explorer -windows should have. + [dir]: By default, these explorer commands use the current file's directory. + However, one may explicitly provide a directory (path) to use instead; + ie. > + :Explore /some/path +< *netrw-:Rexplore* -:Rexplore This command is a little different from the others as it doesn't - necessarily open an Explorer window. +:Rexplore This command is a little different from the other Explore commands + as it doesn't necessarily open an Explorer window. Return to Explorer~ - When one edits a file, for example by pressing when the - cursor is atop a file in a netrw browser window, :Rexplore will - return the display to that of the last netrw browser display - in that window. + When one edits a file using netrw which can occur, for example, + when pressing while the cursor is atop a filename in a netrw + browser window, a :Rexplore issued while editing that file will + return the display to that of the last netrw browser display in + that window. Return from Explorer~ Conversely, when one is editing a directory, issuing a :Rexplore @@ -1571,11 +1711,11 @@ windows should have. Also see: |g:netrw_alto| |g:netrw_altv| |g:netrw_winsize| -*netrw-star* *netrw-starpat* *netrw-starstar* *netrw-starstarpat* -EXPLORING WITH STARS AND PATTERNS +*netrw-star* *netrw-starpat* *netrw-starstar* *netrw-starstarpat* *netrw-grep* +EXPLORING WITH STARS AND PATTERNS {{{2 When Explore, Sexplore, Hexplore, or Vexplore are used with one of the -following four styles, Explore generates a list of files which satisfy +following four patterns Explore generates a list of files which satisfy the request. > */filepat files in current directory which satisfy filepat @@ -1597,7 +1737,7 @@ will clear the explore list. If your console or gui produces recognizable shift-up or shift-down sequences, then you'll likely find using shift-downarrow and shift-uparrow convenient. -They're mapped by netrw: +They're mapped by netrw as follows: == Nexplore, and == Pexplore. @@ -1678,7 +1818,7 @@ Related topics: |netrw-s| |netrw-S| Associated setting variables: |g:netrw_sort_sequence| |g:netrw_sort_options| -EXECUTING FILE UNDER CURSOR VIA SYSTEM() *netrw-X* +EXECUTING FILE UNDER CURSOR VIA SYSTEM() *netrw-X* {{{2 Pressing X while the cursor is atop an executable file will yield a prompt using the filename asking for any arguments. Upon pressing a [return], netrw @@ -1769,18 +1909,19 @@ Associated topics: |netrw-a| |netrw-ctrl-h| |netrw-mh| Netrw provides a helper function 'netrw_gitignore#Hide()' that, when used with |g:netrw_list_hide| automatically hides all git-ignored files. -'netrw_gitignore#Hide' searches for patterns in the following files: +'netrw_gitignore#Hide' searches for patterns in the following files: > + './.gitignore' './.git/info/exclude' global gitignore file: `git config --global core.excludesfile` system gitignore file: `git config --system core.excludesfile` - +< Files that do not exist, are ignored. Git-ignore patterns are taken from existing files, and converted to patterns for hiding files. For example, if you had '*.log' in your '.gitignore' file, it would be converted to '.*\.log'. -To use this function, simply assign it's output to |g:netrw_list_hide| option. +To use this function, simply assign its output to |g:netrw_list_hide| option. > Example: let g:netrw_list_hide= netrw_gitignore#Hide() Git-ignored files are hidden in Netrw. @@ -1790,7 +1931,7 @@ To use this function, simply assign it's output to |g:netrw_list_hide| option. Example: g:netrw_list_hide= netrw_gitignore#Hide() . '.*\.swp$' Combining 'netrw_gitignore#Hide' with custom patterns. - +< IMPROVING BROWSING *netrw-listhack* *netrw-ssh-hack* {{{2 @@ -1926,7 +2067,7 @@ Associated setting variable: |g:netrw_keepdir| MARKING FILES *netrw-:MF* *netrw-mf* {{{2 (also see |netrw-mr|) -Netrw has several ways of marking files: +Netrw provides several ways to mark files: * One may mark files with the cursor atop a filename and then pressing "mf". @@ -1949,6 +2090,8 @@ The following netrw maps make use of marked files: |netrw-a| Hide marked files/directories |netrw-D| Delete marked files/directories + |netrw-mb| Append marked files to bookmarks + |netrw-mB| Delete marked files from bookmarks |netrw-mc| Copy marked files to target |netrw-md| Apply vimdiff to marked files |netrw-me| Edit marked files @@ -1958,7 +2101,9 @@ The following netrw maps make use of marked files: |netrw-mp| Print marked files |netrw-mt| Set target for |netrw-mm| and |netrw-mc| |netrw-mT| Generate tags using marked files + |netrw-mv| Apply vim command to marked files |netrw-mx| Apply shell command to marked files + |netrw-mX| Apply shell command to marked files, en bloc |netrw-mz| Compress/Decompress marked files |netrw-O| Obtain marked files |netrw-R| Rename marked files @@ -1982,13 +2127,13 @@ If the mouse is enabled and works with your vim, you may use to mark one or more files. You may mark multiple files by dragging the shifted leftmouse. (see |netrw-mouse|) -*markfilelist* *global_markfilelist* *local_markfilelist* + *markfilelist* *global_markfilelist* *local_markfilelist* All marked files are entered onto the global marked file list; there is only -one such list. In addition, every netrw buffer also has its own local marked -file list; since netrw buffers are associated with specific directories, this -means that each directory has its own local marked file list. The various -commands which operate on marked files use one or the other of the marked file -lists. +one such list. In addition, every netrw buffer also has its own buffer-local +marked file list; since netrw buffers are associated with specific +directories, this means that each directory has its own local marked file +list. The various commands which operate on marked files use one or the other +of the marked file lists. Known Problem: if one is using tree mode (|g:netrw_liststyle|) and several directories have files with the same name, then marking such a file will @@ -1998,19 +2143,18 @@ is unlikely to be fixed. UNMARKING FILES *netrw-mF* {{{2 - (also see |netrw-mf|) + (also see |netrw-mf|, |netrw-mu|) -This command will unmark all files in the current buffer. One may also use -mf (|netrw-mf|) on a specific file to unmark just that file. +The "mF" command will unmark all files in the current buffer. One may also use +mf (|netrw-mf|) on a specific, already marked, file to unmark just that file. -MARKING FILES BY QUICKFIX LIST *netrw-qF* +MARKING FILES BY QUICKFIX LIST *netrw-qF* {{{2 (also see |netrw-mf|) -One may convert the |quickfix-error-lists| into a marked file list using -"qF". You may then proceed with commands such as me (|netrw-me|) to -edit them. Quickfix error lists are generated, for example, by calls -to |:vimgrep|. +One may convert |quickfix-error-lists| into a marked file list using "qF". +You may then proceed with commands such as me (|netrw-me|) to edit them. +Quickfix error lists are generated, for example, by calls to |:vimgrep|. MARKING FILES BY REGULAR EXPRESSION *netrw-mr* {{{2 @@ -2024,7 +2168,23 @@ future I may make it possible to use |regexp|s instead of glob()-style expressions (yet-another-option). -MARKED FILES: ARBITRARY COMMAND *netrw-mx* {{{2 +MARKED FILES, ARBITRARY VIM COMMAND *netrw-mv* {{{2 + (See |netrw-mf| and |netrw-mr| for how to mark files) + (uses the local marked-file list) + +The "mv" map causes netrw to execute an arbitrary vim command on each file on +the local marked file list, individually: + + * 1split + * sil! keepalt e file + * run vim command + * sil! keepalt wq! + +A prompt, "Enter vim command: ", will be issued to elicit the vim command +you wish used. + + +MARKED FILES, ARBITRARY SHELL COMMAND *netrw-mx* {{{2 (See |netrw-mf| and |netrw-mr| for how to mark files) (uses the local marked-file list) @@ -2033,6 +2193,37 @@ command to be applied to all marked files. All "%"s in the command will be substituted with the name of each marked file in turn. If no "%"s are in the command, then the command will be followed by a space and a marked filename. +Example: + (mark files) + mx + Enter command: cat + + The result is a series of shell commands: + cat 'file1' + cat 'file2' + ... + + +MARKED FILES, ARBITRARY SHELL COMMAND, EN BLOC *netrw-mX* {{{2 + (See |netrw-mf| and |netrw-mr| for how to mark files) + (uses the global marked-file list) + +Upon activation of the 'mX' map, netrw will query the user for some (external) +command to be applied to all marked files on the global marked file list. The +"en bloc" means that one command will be executed on all the files at once: > + + command files + +This approach is useful, for example, to select files and make a tarball: > + + (mark files) + mX + Enter command: tar cf mynewtarball.tar +< +The command that will be run with this example: + + tar cf mynewtarball.tar 'file1' 'file2' ... + MARKED FILES: COMPRESSION AND DECOMPRESSION *netrw-mz* {{{2 (See |netrw-mf| and |netrw-mr| for how to mark files) @@ -2046,6 +2237,10 @@ that's "gzip". For decompression, netrw provides a |Dictionary| of suffices and their associated decompressing utilities; see |g:netrw_decompress|. +Remember that one can mark multiple files by regular expression +(see |netrw-mr|); this is particularly useful to facilitate compressing and +decompressing a large number of files. + Associated setting variables: |g:netrw_compress| |g:netrw_decompress| MARKED FILES: COPYING *netrw-mc* {{{2 @@ -2056,7 +2251,16 @@ Select a target directory with mt (|netrw-mt|). Then change directory, select file(s) (see |netrw-mf|), and press "mc". The copy is done from the current window (where one does the mf) to the target. -Associated setting variable: |g:netrw_localcopycmd| |g:netrw_ssh_cmd| +If one does not have a target directory set with |netrw-mt|, then netrw +will query you for a directory to copy to. + +One may also copy directories and their contents (local only) to a target +directory. + +Associated setting variables: + |g:netrw_localcopycmd| + |g:netrw_localcopydircmd| + |g:netrw_ssh_cmd| MARKED FILES: DIFF *netrw-md* {{{2 (See |netrw-mf| and |netrw-mr| for how to mark files) @@ -2069,7 +2273,7 @@ MARKED FILES: EDITING *netrw-me* {{{2 (See |netrw-mf| and |netrw-mr| for how to mark files) (uses the global marked file list) -This command will place the marked files on the |arglist| and commence +The "me" command will place the marked files on the |arglist| and commence editing them. One may return the to explorer window with |:Rexplore|. (use |:n| and |:p| to edit next and previous files in the arglist) @@ -2077,26 +2281,33 @@ MARKED FILES: GREP *netrw-mg* {{{2 (See |netrw-mf| and |netrw-mr| for how to mark files) (uses the global marked file list) -This command will apply |:vimgrep| to the marked files. +The "mg" command will apply |:vimgrep| to the marked files. The command will ask for the requested pattern; one may then enter: > /pattern/[g][j] ! /pattern/[g][j] pattern < -In the cases of "j" option usage as shown above, "mg" will winnow the current -marked file list to just those possessing the specified pattern. -Thus, one may use > - mr ...file-pattern - mg ..contents-pattern -to have a marked file list satisfying the file-pattern but containing the -desried contents-pattern. +With /pattern/, editing will start with the first item on the |quickfix| list +that vimgrep sets up (see |:copen|, |:cnext|, |:cprevious|). The |:vimgrep| +command is in use, so without 'g' each line is added to quickfix list only +once; with 'g' every match is included. + +With /pattern/j, "mg" will winnow the current marked file list to just those +marked files also possessing the specified pattern. Thus, one may use > + + mr ...file-pattern... + mg /pattern/j +< +to have a marked file list satisfying the file-pattern but also restricted to +files containing some desired pattern. + MARKED FILES: HIDING AND UNHIDING BY SUFFIX *netrw-mh* {{{2 (See |netrw-mf| and |netrw-mr| for how to mark files) (uses the local marked file list) -This command extracts the suffices of the marked files and toggles their +The "mh" command extracts the suffices of the marked files and toggles their presence on the hiding list. Please note that marking the same suffix this way multiple times will result in the suffix's presence being toggled for each file (so an even quantity of marked files having the same suffix @@ -2125,16 +2336,16 @@ MARKED FILES: PRINTING *netrw-mp* {{{2 (See |netrw-mf| and |netrw-mr| for how to mark files) (uses the local marked file list) -Netrw will apply the |:hardcopy| command to marked files. What it does -is open each file in a one-line window, execute hardcopy, then close the -one-line window. +When "mp" is used, netrw will apply the |:hardcopy| command to marked files. +What netrw does is open each file in a one-line window, execute hardcopy, then +close the one-line window. MARKED FILES: SOURCING *netrw-ms* {{{2 (See |netrw-mf| and |netrw-mr| for how to mark files) (uses the local marked file list) -Netrw will source the marked files (using vim's |:source| command) +With "ms", netrw will source the marked files (using vim's |:source| command) MARKED FILES: SETTING THE TARGET DIRECTORY *netrw-mt* {{{2 @@ -2148,7 +2359,7 @@ Set the marked file copy/move-to target (see |netrw-mc| and |netrw-mm|): * Also, if the cursor is in the banner, then the netrw window's currently displayed directory is used for the copy/move-to target. Unless the target already is the current directory. In which case, - remove the target. + typing "mf" clears the target. * However, if the cursor is atop a directory name, then that directory is used for the copy/move-to target @@ -2157,9 +2368,12 @@ Set the marked file copy/move-to target (see |netrw-mc| and |netrw-mm|): This command uses ||, so spaces in the directory name are permitted without escaping. -There is only one copy/move-to target per vim session; ie. the target is a -script variable (see |s:var|) and is shared between all netrw windows (in an -instance of vim). + * With mouse-enabled vim or with gvim, one may select a target by using + + +There is only one copy/move-to target at a time in a vim session; ie. the +target is a script variable (see |s:var|) and is shared between all netrw +windows (in an instance of vim). When using menus and gvim, netrw provides a "Targets" entry which allows one to pick a target from the list of bookmarks and history. @@ -2196,7 +2410,7 @@ edit the desired file and go to the tag. Associated setting variables: |g:netrw_ctags| |g:netrw_ssh_cmd| -MARKED FILES: TARGET DIRECTORY USING BOOKMARKS *netrw-Tb* {{{2 +MARKED FILES: TARGET DIRECTORY USING BOOKMARKS *netrw-Tb* {{{2 Sets the marked file copy/move-to target. @@ -2214,7 +2428,7 @@ Related topics: Moving files to target.............................|netrw-mm| -MARKED FILES: TARGET DIRECTORY USING HISTORY *netrw-Th* {{{2 +MARKED FILES: TARGET DIRECTORY USING HISTORY *netrw-Th* {{{2 Sets the marked file copy/move-to target. @@ -2233,9 +2447,13 @@ Related topics: MARKED FILES: UNMARKING *netrw-mu* {{{2 - (See |netrw-mf| and |netrw-mr| for how to mark files) + (See |netrw-mf|, |netrw-mF|) + +The "mu" mapping will unmark all currently marked files. This command differs +from "mF" as the latter only unmarks files in the current directory whereas +"mu" will unmark global and all buffer-local marked files. +(see |netrw-mF|) -The "mu" mapping will unmark all currently marked files. *netrw-browser-settings* NETRW BROWSER VARIABLES *netrw-browser-options* *netrw-browser-var* {{{2 @@ -2269,15 +2487,13 @@ your browsing preferences. (see also: |netrw-settings|) *g:netrw_banner* enable/suppress the banner =0: suppress the banner =1: banner is enabled (default) - NOTE: suppressing the banner is a new feature - which may cause problems. *g:netrw_bannerbackslash* if this variable exists and is not zero, the banner will be displayed with backslashes rather than forward slashes. *g:netrw_browse_split* when browsing, will open the file by: - =0: re-using the same window + =0: re-using the same window (default) =1: horizontally splitting the window first =2: vertically splitting the window first =3: open file in new tab @@ -2285,10 +2501,19 @@ your browsing preferences. (see also: |netrw-settings|) Note that |g:netrw_preview| may be used to get vertical splitting instead of horizontal splitting. + =[servername,tab-number,window-number] + Given a |List| such as this, a remote server + named by the "servername" will be used for + editing. It will also use the specified tab + and window numbers to perform editing + (see |clientserver|, |netrw-ctrl-r|) + This option does not affect |:Lexplore| + windows. Related topics: - |netrw-cr| |netrw-C| - |g:netrw_alto| |g:netrw_altv| + |g:netrw_alto| |g:netrw_altv| + |netrw-C| |netrw-cr| + |netrw-ctrl-r| *g:netrw_browsex_viewer* specify user's preference for a viewer: > "kfmclient exec" @@ -2321,7 +2546,7 @@ your browsing preferences. (see also: |netrw-settings|) tags *g:netrw_cursor* = 2 (default) - This option controls the use of the + This option controls the use of the |'cursorline'| (cul) and |'cursorcolumn'| (cuc) settings by netrw: @@ -2385,7 +2610,7 @@ your browsing preferences. (see also: |netrw-settings|) versus speed. *g:netrw_ffkeep* (default: doesn't exist) - If this variable exists and is zero, then + If this variable exists and is zero, then netrw will not do a save and restore for |'fileformat'|. @@ -2428,6 +2653,11 @@ your browsing preferences. (see also: |netrw-settings|) These characters in directory names are escaped before applying glob() + *g:netrw_gx* ="" + This option controls how gx (|netrw-gx|) picks + up the text under the cursor. See |expand()| + for possibilities. + *g:netrw_hide* Controlled by the "a" map (see |netrw-a|) =0 : show all =1 : show not-hidden files @@ -2447,10 +2677,22 @@ your browsing preferences. (see also: |netrw-settings|) The current browsing directory is contained in b:netrw_curdir (also see |netrw-c|) + *g:netrw_keepj* ="keepj" (default) netrw attempts to keep the + |:jumps| table unaffected. + ="" netrw will not use |:keepjumps| with + exceptions only for the + saving/restoration of position. + *g:netrw_list_cmd* command for listing remote directories default: (if ssh is executable) "ssh HOSTNAME ls -FLa" + *g:netrw_list_cmd_options* If this variable exists, then its contents are + appended to the g:netrw_list_cmd. For + example, use "2>/dev/null" to get rid of banner + messages on unix systems. + + *g:netrw_liststyle* Set the default listing style: = 0: thin listing (one file per line) = 1: long listing (one file per line with time @@ -2468,7 +2710,7 @@ your browsing preferences. (see also: |netrw-settings|) Examples: let g:netrw_list_hide= '.*\.swp$' - let g:netrw_list_hide= netrw_gitignore#Hide().'.*\.swp$' + let g:netrw_list_hide= netrw_gitignore#Hide().'.*\.swp$' default: "" *g:netrw_localcopycmd* ="cp" Linux/Unix/MacOS/Cygwin @@ -2476,6 +2718,11 @@ your browsing preferences. (see also: |netrw-settings|) Copies marked files (|netrw-mf|) to target directory (|netrw-mt|, |netrw-mc|) + *g:netrw_localcopydircmd* ="cp -R" Linux/Unix/MacOS/Cygwin + ="xcopy /e /c /h/ /i /k" Windows + Copies directories to target directory. + (|netrw-mc|, |netrw-mt|) + *g:netrw_localmkdir* command for making a local directory default: "mkdir" @@ -2499,7 +2746,7 @@ your browsing preferences. (see also: |netrw-settings|) default: "ssh USEPORT HOSTNAME mkdir" *g:netrw_mousemaps* =1 (default) enables mouse buttons while - browsing to: + browsing to: leftmouse : open file/directory shift-leftmouse : mark file middlemouse : same as P @@ -2511,6 +2758,11 @@ your browsing preferences. (see also: |netrw-settings|) evaluation will be suppressed (see |'ballooneval'|) + *g:netrw_usetab* if this variable exists and is non-zero, then + the map supporting shrinking/expanding a + Lexplore or netrw window will be enabled. + (see |netrw-c-tab|) + *g:netrw_remote_mkdir* command for making a remote directory via ftp (also see |g:netrw_mkdir_cmd|) default: "mkdir" @@ -2543,7 +2795,12 @@ your browsing preferences. (see also: |netrw-settings|) *g:netrw_rmf_cmd* command for removing remote softlinks default: "ssh USEPORT HOSTNAME rm -f" - *g:netrw_sort_by* sort by "name", "time", or "size" + *g:netrw_servername* use this variable to provide a name for + |netrw-ctrl-r| to use for its server. + default: "NETRWSERVER" + + *g:netrw_sort_by* sort by "name", "time", "size", or + "exten". default: "name" *g:netrw_sort_direction* sorting direction: "normal" or "reverse" @@ -2655,6 +2912,10 @@ your browsing preferences. (see also: |netrw-settings|) take effect, for example). default: 50 (for 50%) + *g:netrw_wiw* =1 specifies the minimum window width to use + when shrinking a netrw/Lexplore window + (see |netrw-c-tab|). + *g:netrw_xstrlen* Controls how netrw computes string lengths, including multi-byte characters' string length. (thanks to N Weibull, T Mechelynck) @@ -2700,7 +2961,7 @@ help on what each of the variables do. ============================================================================== -OBTAINING A FILE *netrw-O* {{{2 +OBTAINING A FILE *netrw-obtain* *netrw-O* {{{2 If there are no marked files: @@ -2730,8 +2991,8 @@ Related topics: * To automatically make the currently browsed directory the current directory, see |g:netrw_keepdir|. - *netrw-createfile* -OPEN A NEW FILE IN NETRW'S CURRENT DIRECTORY *netrw-%* + *netrw-newfile* *netrw-createfile* +OPEN A NEW FILE IN NETRW'S CURRENT DIRECTORY *netrw-%* {{{2 To open a new file in netrw's current directory, press "%". This map will query the user for a new filename; an empty file by that name will @@ -2744,9 +3005,9 @@ PREVIEW WINDOW *netrw-p* *netrw-preview* {{{2 One may use a preview window by using the "p" key when the cursor is atop the desired filename to be previewed. The display will then split to show both -the browser (where the cursor will remain) and the file (see |:pedit|). -By default, the split will be taken horizontally; one may use vertical -splitting if one has set |g:netrw_preview| first. +the browser (where the cursor will remain) and the file (see |:pedit|). By +default, the split will be taken horizontally; one may use vertical splitting +if one has set |g:netrw_preview| first. An interesting set of netrw settings is: > @@ -2755,16 +3016,20 @@ An interesting set of netrw settings is: > let g:netrw_winsize = 30 These will: + 1. Make vertical splitting the default for previewing files 2. Make the default listing style "tree" 3. When a vertical preview window is opened, the directory listing will use only 30% of the columns available; the rest of the window is used for the preview window. -Also see: |g:netrw_chgwin| |netrw-P| + Related: if you like this idea, you may also find :Lexplore + (|netrw-:Lexplore|) or |g:netrw_chgwin| of interest +Also see: |g:netrw_chgwin| |netrw-P| |'previewwindow'| -PREVIOUS WINDOW *netrw-P* *netrw-prvwin* {{{2 + +PREVIOUS WINDOW *netrw-P* *netrw-prvwin* {{{2 To edit a file or directory in the previously used (last accessed) window (see :he |CTRL-W_p|), press a "P". If there's only one window, then the one window @@ -2786,7 +3051,7 @@ Associated setting variables: Also see: |g:netrw_chgwin| |netrw-p| -REFRESHING THE LISTING *netrw-ctrl-l* *netrw-ctrl_l* {{{2 +REFRESHING THE LISTING *netrw-refresh* *netrw-ctrl-l* *netrw-ctrl_l* {{{2 To refresh either a local or remote directory listing, press ctrl-l () or hit the when atop the ./ directory entry in the listing. One may also @@ -2806,17 +3071,37 @@ RENAMING FILES OR DIRECTORIES *netrw-move* *netrw-rename* *netrw-R* {{{2 If there are no marked files: (see |netrw-mf|) - Renaming/moving files and directories involves moving the cursor to the + Renaming files and directories involves moving the cursor to the file/directory to be moved (renamed) and pressing "R". You will then be - queried for where you want the file/directory to be moved. You may select + queried for what you want the file/directory to be renamed to You may select a range of lines with the "V" command (visual selection), and then - pressing "R". + press "R"; you will be queried for each file as to what you want it + renamed to. If there are marked files: (see |netrw-mf|) Marked files will be renamed (moved). You will be queried as above in order to specify where you want the file/directory to be moved. + If you answer a renaming query with a "s/frompattern/topattern/", then + subsequent files on the marked file list will be renamed by taking each + name, applying that substitute, and renaming each file to the result. + As an example : > + + mr [query: reply with *.c] + R [query: reply with s/^\(.*\)\.c$/\1.cpp/] +< + This example will mark all *.c files and then rename them to *.cpp + files. + + The ctrl-X character has special meaning for renaming files: > + + : a single ctrl-x tells netrw to ignore the portion of the response + lying between the last '/' and the ctrl-x. + + : a pair of contiguous ctrl-x's tells netrw to ignore any + portion of the string preceding the double ctrl-x's. +< WARNING:~ Note that moving files is a dangerous operation; copies are safer. That's @@ -2824,13 +3109,13 @@ If there are marked files: (see |netrw-mf|) the copy fails and the delete does not, you may lose the file. Use at your own risk. -The g:netrw_rename_cmd variable is used to implement renaming. By default its -value is: +The g:netrw_rename_cmd variable is used to implement remote renaming. By +default its value is: ssh HOSTNAME mv One may rename a block of files and directories by selecting them with -the V (|linewise-visual|). +V (|linewise-visual|) when using thin style SELECTING SORTING STYLE *netrw-s* *netrw-sort* {{{2 @@ -2843,25 +3128,112 @@ Related topics: |netrw-r| |netrw-S| Associated setting variables: |g:netrw_sort_by| |g:netrw_sort_sequence| -SETTING EDITING WINDOW *netrw-C* {{{2 +SETTING EDITING WINDOW *netrw-editwindow* *netrw-C* *netrw-:NetrwC* {{{2 -One may select a netrw window for editing with the "C" mapping, or by setting -g:netrw_chgwin to the selected window number. Subsequent selection of a file -to edit (|netrw-cr|) will use that window. +One may select a netrw window for editing with the "C" mapping, using the +:NetrwC [win#] command, or by setting |g:netrw_chgwin| to the selected window +number. Subsequent selection of a file to edit (|netrw-cr|) will use that +window. + + * C : by itself, will select the current window holding a netrw buffer + for editing via |netrw-cr|. The C mapping is only available while in + netrw buffers. + + * [count]C : the count will be used as the window number to be used + for subsequent editing via |netrw-cr|. - * C by itself, will select the current window for editing via - |netrw-cr| + * :NetrwC will set |g:netrw_chgwin| to the current window + + * :NetrwC win# will set |g:netrw_chgwin| to the specified window + number - * [count]C the count will be used as the window number to be used - for editing via |netrw-cr|. Using > let g:netrw_chgwin= -1 -will restore the default editing behavior (ie. use the current window). +will restore the default editing behavior +(ie. editing will use the current window). Related topics: |netrw-cr| |g:netrw_browse_split| Associated setting variables: |g:netrw_chgwin| +SHRINKING OR EXPANDING A NETRW OR LEXPLORE WINDOW *netrw-c-tab* {{{2 + +The key will toggle a netrw or |:Lexplore| window's width, +but only if |g:netrw_usetab| exists and is non-zero (and, of course, +only if your terminal supports differentiating from a plain +). + + * If the current window is a netrw window, toggle its width + (between |g:netrw_wiw| and its original width) + + * Else if there is a |:Lexplore| window in the current tab, toggle + its width + + * Else bring up a |:Lexplore| window + +If |g:netrw_usetab| exists or is zero, or if there is a pre-existing mapping +for , then the will not be mapped. One may map something other +than a , too: (but you'll still need to have had g:netrw_usetab set) > + + nmap (whatever) NetrwShrink +< +Related topics: |:Lexplore| +Associated setting variable: |g:netrw_usetab| + + +USER SPECIFIED MAPS *netrw-usermaps* {{{1 + +One may make customized user maps. Specify a variable, |g:Netrw_UserMaps|, +to hold a |List| of lists of keymap strings and function names: > + + [["keymap-sequence","ExampleUserMapFunc"],...] +< +When netrw is setting up maps for a netrw buffer, if |g:Netrw_UserMaps| +exists, then the internal function netrw#UserMaps(islocal) is called. +This function goes through all the entries in the |g:Netrw_UserMaps| list: + + * sets up maps: > + nno KEYMAP-SEQUENCE + :call s:UserMaps(islocal,"ExampleUserMapFunc") +< * refreshes if result from that function call is the string + "refresh" + * if the result string is not "", then that string will be + executed (:exe result) + * if the result is a List, then the above two actions on results + will be taken for every string in the result List + +The user function is passed one argument; it resembles > + + fun! ExampleUserMapFunc(islocal) +< +where a:islocal is 1 if its a local-directory system call or 0 when +remote-directory system call. + +Use netrw#Expose("varname") to access netrw-internal (script-local) + variables. +Use netrw#Modify("varname",newvalue) to change netrw-internal variables. +Use netrw#Call("funcname"[,args]) to call a netrw-internal function with + specified arguments. + +Example: Get a copy of netrw's marked file list: > + + let netrwmarkfilelist= netrw#Expose("netrwmarkfilelist") +< +Example: Modify the value of netrw's marked file list: > + + call netrw#Modify("netrwmarkfilelist",[]) +< +Example: Clear netrw's marked file list via a mapping on gu > + " ExampleUserMap: {{{2 + fun! ExampleUserMap(islocal) + call netrw#Modify("netrwmarkfilelist",[]) + call netrw#Modify('netrwmarkfilemtch_{bufnr("%")}',"") + let retval= ["refresh"] + return retval + endfun + let g:Netrw_UserMaps= [["gu","ExampleUserMap"]] +< + 10. Problems and Fixes *netrw-problems* {{{1 (This section is likely to grow as I get feedback) @@ -3036,6 +3408,7 @@ Associated setting variables: |g:netrw_chgwin| The first one (|g:netrw_ssh_cmd|) is the most important; most of the others will use the string in g:netrw_ssh_cmd by default. + *netrw-p9* *netrw-ml_get* P9. I'm browsing, changing directory, and bang! ml_get errors appear and I have to kill vim. Any way around this? @@ -3062,6 +3435,14 @@ Associated setting variables: |g:netrw_chgwin| P11. I want to have two windows; a thin one on the left and my editing window on the right. How may I accomplish this? + You probably want netrw running as in a side window. If so, you + will likely find that ":[N]Lexplore" does what you want. The + optional "[N]" allows you to select the quantity of columns you + wish the |:Lexplore|r window to start with (see |g:netrw_winsize| + for how this parameter works). + + Previous solution: + * Put the following line in your <.vimrc>: let g:netrw_altv = 1 * Edit the current directory: :e . @@ -3075,6 +3456,7 @@ Associated setting variables: |g:netrw_chgwin| in the browser window and then press the to select the file. + *netrw-p12* P12. My directory isn't sorting correctly, or unwanted letters are appearing in the listed filenames, or things aren't lining @@ -3107,7 +3489,7 @@ Associated setting variables: |g:netrw_chgwin| "let g:netrw_scp_cmd = "d:\\dev\\putty\\PSCP.exe" < *netrw-p14* - P14. I'd would like to speed up writes using Nwrite and scp/ssh + P14. I would like to speed up writes using Nwrite and scp/ssh style connections. How? (Thomer M. Gil) Try using ssh's ControlMaster and ControlPath (see the ssh_config @@ -3152,18 +3534,121 @@ Associated setting variables: |g:netrw_chgwin| to open a swap file. (romainl) It looks like you are starting Vim from a protected - directory. Start if from your $HOME or another writable + directory. Start netrw from your $HOME or other writable directory. + *netrw-p17* + P17. Netrw is closing buffers on its own. + What steps will reproduce the problem? + 1. :Explore, navigate directories, open a file + 2. :Explore, open another file + 3. Buffer opened in step 1 will be closed. o + What is the expected output? What do you see instead? + I expect both buffers to exist, but only the last one does. + + (Lance) Problem is caused by "set autochdir" in .vimrc. + (drchip) I am able to duplicate this problem with |'acd'| set. + It appears that the buffers are not exactly closed; + a ":ls!" will show them (although ":ls" does not). + + *netrw-P18* + P18. How to locally edit a file that's only available via + another server accessible via ssh? + See http://stackoverflow.com/questions/12469645/ + "Using Vim to Remotely Edit A File on ServerB Only + Accessible From ServerA" + + *netrw-P19* + P19. How do I get numbering on in directory listings? + With |g:netrw_bufsettings|, you can control netrw's buffer + settings; try putting > + let g:netrw_bufsettings="noma nomod nu nobl nowrap ro nornu" +< in your .vimrc. If you'd like to have relative numbering + instead, try > + let g:netrw_bufsettings="noma nomod nonu nobl nowrap ro rnu" +< + *netrw-P20* + P20. How may I have gvim start up showing a directory listing? + Try putting the following code snippet into your .vimrc: > + augroup VimStartup + au! + au VimEnter * if expand("%") == "" && argc() == 0 && + \ (v:servername =~ 'GVIM\d*' || v:servername == "") + \ | e . | endif + augroup END +< You may use Lexplore instead of "e" if you're so inclined. + This snippet assumes that you have client-server enabled + (ie. a "huge" vim version). + + *netrw-P21* + P21. I've made a directory (or file) with an accented character, but + netrw isn't letting me enter that directory/read that file: + + Its likely that the shell or o/s is using a different encoding + than you have vim (netrw) using. A patch to vim supporting + "systemencoding" may address this issue in the future; for + now, just have netrw use the proper encoding. For example: > + + au FileType netrw set enc=latin1 +< + *netrw-P22* + P22. I get an error message when I try to copy or move a file: + + **error** (netrw) tried using g:netrw_localcopycmd; it doesn't work! + + What's wrong? + + Netrw uses several system level commands to do things (see + + |g:netrw_localcopycmd|, |g:netrw_localmovecmd|, + |g:netrw_localrmdir|, |g:netrw_mkdir_cmd|). + + You may need to adjust the default commands for one or more of + these commands by setting them properly in your .vimrc. Another + source of difficulty is that these commands use vim's local + directory, which may not be the same as the browsing directory + shown by netrw (see |g:netrw_keepdir|). + + ============================================================================== 11. Debugging Netrw Itself *netrw-debug* {{{1 -The script is typically available as something like: +Step 1: check that the problem you've encountered hasn't already been resolved +by obtaining a copy of the latest (often developmental) netrw at: + + http://www.drchip.org/astronaut/vim/index.html#NETRW + +The script is typically installed on systems as something like: > /usr/local/share/vim/vim7x/plugin/netrwPlugin.vim /usr/local/share/vim/vim7x/autoload/netrw.vim + (see output of :echo &rtp) +< +which is loaded automatically at startup (assuming :set nocp). If you +installed a new netrw, then it will be located at > + + $HOME/.vim/plugin/netrwPlugin.vim + $HOME/.vim/autoload/netrw.vim +< +Step 2: assuming that you've installed the latest version of netrw, +check that your problem is really due to netrw. Create a file +called netrw.vimrc with the following contents: > + + set nocp + so $HOME/.vim/plugin/netrwPlugin.vim +< +Then run netrw as follows: > + + vim -u netrw.vimrc --noplugins [some path here] < -which is loaded automatically at startup (assuming :set nocp). +Perform whatever netrw commands you need to, and check that the problem is +still present. This procedure sidesteps any issues due to personal .vimrc +settings and other plugins. If the problem does not appear, then you need +to determine what setting in your .vimrc is causing the conflict with netrw +or which plugin. + +Step 3: If the problem still is present, then get a debugging trace from +netrw: 1. Get the script, available as: @@ -3192,7 +3677,8 @@ which is loaded automatically at startup (assuming :set nocp). 3. Then bring up vim and attempt to evoke the problem by doing a transfer or doing some browsing. A set of messages should appear concerning the steps that took in attempting to - read/write your file over the network in a separate tab. + read/write your file over the network in a separate tab or + server vim window. To save the file, use > @@ -3207,14 +3693,122 @@ which is loaded automatically at startup (assuming :set nocp). debugging trace is due to which command. Please send that information to 's maintainer along - with the o/s you're using and vim version you're using + with the o/s you're using and the vim version that you're using (see |:version|) > NdrOchip at ScampbellPfamily.AbizM - NOSPAM < ============================================================================== 12. History *netrw-history* {{{1 - v152: Apr 08, 2014 * uses the |'noswapfile'| option (requires + v154: Feb 26, 2015 * (Yuri Kanivetsky) reported a situation where + a file was not treated properly as a file + due to g:netrw_keepdir == 1 + Mar 25, 2015 * (requested by Ben Friz) one may now sort by + extension + Mar 28, 2015 * (requested by Matt Brooks) netrw has a lot + of buffer-local mappings; however, some + plugins (such as vim-surround) set up + conflicting mappings that cause vim to wait. + The "" modifier has been included + with most of netrw's mappings to avoid that + delay. + Jun 26, 2015 * |netrw-gn| mapping implemted + * :Ntree NotADir resulted in having + the tree listing expand in the error messages + window. Fixed. + Jun 29, 2015 * Attempting to delete a file remotely caused + an error with "keepsol" mentioned; fixed. + Jul 08, 2015 * Several changes to keep the |:jumps| table + correct when working with + |g:netrw_fastbrowse| set to 2 + * wide listing with accented characters fixed + (using %-S instead of %-s with a |printf()| + Jul 13, 2015 * (Daniel Hahler) CheckIfKde() could be true + but kfmclient not installed. Changed order + in netrw#BrowseX(): checks if kde and + kfmclient, then will use xdg-open on a unix + system (if xdg-open is executable) + Aug 11, 2015 * (McDonnell) tree listing mode wouldn't + select a file in a open subdirectory. + * (McDonnell) when multiple subdirectories + were concurrently open in tree listing + mode, a ctrl-L wouldn't refresh properly. + * The netrw:target menu showed duplicate + entries + Oct 13, 2015 * (mattn) provided an exception to handle + windows with shellslash set but no shell + Oct 23, 2015 * if g:netrw_usetab and now used + to control whether NetrwShrink is used + (see |netrw-c-tab|) + v153: May 13, 2014 * added another |g:netrw_ffkeep| usage {{{2 + May 14, 2014 * changed s:PerformListing() so that it + always sets ft=netrw for netrw buffers + (ie. even when syntax highlighting is + off, not available, etc) + May 16, 2014 * introduced the |netrw-ctrl-r| functionality + May 17, 2014 * introduced the |netrw-:NetrwMB| functionality + * mb and mB (|netrw-mb|, |netrw-mB|) will + add/remove marked files from bookmark list + May 20, 2014 * (Enno Nagel) reported that :Lex + wasn't working. Fixed. + May 26, 2014 * restored test to prevent leftmouse window + resizing from causing refresh. + (see s:NetrwLeftmouse()) + * fixed problem where a refresh caused cursor + to go just under the banner instead of + staying put + May 28, 2014 * (László Bimba) provided a patch for opening + the |:Lexplore| window 100% high, optionally + on the right, and will work with remote + files. + May 29, 2014 * implemented :NetrwC (see |netrw-:NetrwC|) + Jun 01, 2014 * Removed some "silent"s from commands used + to implemented scp://... and pscp://... + directory listing. Permits request for + password to appear. + Jun 05, 2014 * (Enno Nagel) reported that user maps "/" + caused problems with "b" and "w", which + are mapped (for wide listings only) to + skip over files rather than just words. + Jun 10, 2014 * |g:netrw_gx| introduced to allow users to + override default "" with the gx + (|netrw-gx|) map + Jun 11, 2014 * gx (|netrw-gx|), with |'autowrite'| set, + will write modified files. s:NetrwBrowseX() + will now save, turn off, and restore the + |'autowrite'| setting. + Jun 13, 2014 * added visual map for gx use + Jun 15, 2014 * (Enno Nagel) reported that with having hls + set and wide listing style in use, that the + b and w maps caused unwanted highlighting. + Jul 05, 2014 * |netrw-mv| and |netrw-mX| commands included + Jul 09, 2014 * |g:netrw_keepj| included, allowing optional + keepj + Jul 09, 2014 * fixing bugs due to previous update + Jul 21, 2014 * (Bruno Sutic) provided an updated + netrw_gitignore.vim + Jul 30, 2014 * (Yavuz Yetim) reported that editing two + remote files of the same name caused the + second instance to have a "temporary" + name. Fixed: now they use the same buffer. + Sep 18, 2014 * (Yasuhiro Matsumoto) provided a patch which + allows scp and windows local paths to work. + Oct 07, 2014 * gx (see |netrw-gx|) when atop a directory, + will now do |gf| instead + Nov 06, 2014 * For cygwin: cygstart will be available for + netrw#BrowseX() to use if its executable. + Nov 07, 2014 * Began support for file://... urls. Will use + |g:netrw_file_cmd| (typically elinks or links) + Dec 02, 2014 * began work on having mc (|netrw-mc|) copy + directories. Works for linux machines, + cygwin+vim, but not for windows+gvim. + Dec 02, 2014 * in tree mode, netrw was not opening + directories via symbolic links. + Dec 02, 2014 * added resolved link information to + thin and tree modes + Dec 30, 2014 * (issue#231) |:ls| was not showing + remote-file buffers reliably. Fixed. + v152: Apr 08, 2014 * uses the |'noswapfile'| option (requires {{{2 vim 7.4 with patch 213) * (Enno Nagel) turn |'rnu'| off in netrw buffers. @@ -3240,7 +3834,7 @@ which is loaded automatically at startup (assuming :set nocp). chgwin window. May 09, 2014 * SavePosn was "saving filename under cursor" from a non-netrw window when using :Rex. - v151: Jan 22, 2014 * extended :Rexplore to return to buffer + v151: Jan 22, 2014 * extended :Rexplore to return to buffer {{{2 prior to Explore or editing a directory * (Ken Takata) netrw gave error when clipboard was disabled. Sol'n: Placed @@ -3287,7 +3881,7 @@ which is loaded automatically at startup (assuming :set nocp). and it also handles Window's shares * Fixed |netrw-d| command when applied with ftp * https: support included for netrw#NetRead() - v150: Jul 12, 2013 * removed a "keepalt" to allow ":e #" to + v150: Jul 12, 2013 * removed a "keepalt" to allow ":e #" to {{{2 return to the netrw directory listing Jul 13, 2013 * (Jonas Diemer) suggested changing a to . @@ -3342,7 +3936,7 @@ which is loaded automatically at startup (assuming :set nocp). style, with a previous window open, that the wrong directory was being used to open a file. Fixed. (P21) - v149: Apr 18, 2013 * in wide listing format, now have maps for + v149: Apr 18, 2013 * in wide listing format, now have maps for {{{2 w and b to move to next/previous file Apr 26, 2013 * one may now copy files in the same directory; netrw will issue requests for @@ -3356,133 +3950,9 @@ which is loaded automatically at startup (assuming :set nocp). requested by Paul Domaskis. Jul 03, 2013 * Explore now avoids splitting when a buffer will be hidden. - v148: Apr 16, 2013 * changed Netrw's Style menu to allow direct + v148: Apr 16, 2013 * changed Netrw's Style menu to allow direct {{{2 choice of listing style, hiding style, and sorting style - v147: Nov 24, 2012 * (James McCoy) Even with g:netrw_dirhistmax - at zero, the .vim/ directory would be - created to support history/bookmarks. I've - gone over netrw to suppress history and - bookmarking when g:netrw_dirhistmax is zero. - For instance, the menus will display - (disabled) when attempts to use - bookmarks/history are made. - Nov 29, 2012 * (Kim Jang-hwan) reported that with - g:Align_xstrlen set to 3 that the cursor was - moved (linewise) after invocation. This - problem also afflicted netrw. - (see |g:netrw_xstrlen|) Fixed. - Jan 21, 2013 * (mattn) provided a patch to insert some - endifs needed with the code implementing - |netrw-O|. - Jan 24, 2013 * (John Szakmeister) found that remote file - editing resulted in filetype options being - overwritten by NetrwOptionRestore(). I - moved filetype detect from NetrwGetFile() - to NetrwOptionRestore. - Feb 17, 2013 * (Yukhiro Nakadaira) provided a patch - correcting some syntax errors. - Feb 28, 2013 * (Ingo Karkat) provided a patch preventing - receipt of an |E95| when revisiting a - file://... style url. - Mar 18, 2013 * (Gary Johnson) pointed out that changing - cedit to caused problems with visincr; - the cedit setting is now bypassed in netrw too. - Apr 02, 2013 * (Paul Domaskis) reported an undefined - variable error (s:didstarstar) was - occurring. It is now defined at - initialization. - * included additional sanity checking for the - marked file functions. - * included |netrw-qF| and special "j" option - handling for |netrw-mg| - Apr 12, 2013 * |netrw-u| and |netrw-U| now handle counts - * the former mapping for "T" has been removed; - in its place are new maps, |netrw-Tb| and |netrw-Th|. - * the menu now supports a "Targets" entry for - easier target selection. (see |netrw-mt|) - * (Paul Domaskis) reported some problems with - moving/copying files under Windows' gvim - (ie. not cygwin). Fixed. - * (Paul Mueller) provided a patch to get - start and rundll working via |netrw-gx| - by bypassing the user's |'shellslash'| option. - v146: Oct 20, 2012 * (David Kotchan) reported that under Windows, - directories named with unusual characters - such as "#" or "$" were not being listed - properly. - * (Kenny Lee) reported that the buffer list - was being populated by netrw buffers. - Netrw will now |:bwipe| netrw buffers - upon editing a file if g:netrw_fastbrowse - is zero and its not in tree listing style. - * fixed a bug with s:NetrwInit() that - prevented initialization with |Lists| and - |Dictionaries|. - * |netrw-mu| now unmarks marked-file lists - v145: Apr 05, 2012 * moved some command from a g:netrw_local_... - format to g:netwr_local... format - * included some NOTE level messages about - commands that aren't executable - * |g:netrw_errorlvl| (default: NOTE=0) - option introduced - May 18, 2012 * (Ilya Dogolazky) a scenario where a - |g:netrw_fastbrowse| of zero did not - have a local directory refreshed fixed. - Jul 10, 2012 * (Donatas) |netrw-gb| wasn't working due - to an incorrectly used variable. - Aug 09, 2012 * (Bart Baker) netrw was doubling - of entries after a split. - * (code by Takahiro Yoshihara) implemented - |g:netrw_dynamic_maxfilenamelen| - Aug 31, 2012 * (Andrew Wong) netrw refresh overwriting - the yank buffer. - v144: Mar 12, 2012 * when |CTRL-W_s| or |CTRL-W_v| are used, - or their wincmd equivalents, on a netrw - buffer, the netrw's w: variables were - not copied over. Fixed. - Mar 13, 2012 * nbcd_curpos_{bufnr('%')} was commented - out, and was mistakenly used during - RestorePosn. Unfortunately, I'm not - sure why it was commented out, so this - "fix" may re-introduce an earlier problem. - Mar 21, 2012 * included s:rexposn internally to make - :Rex return the cursor to the same pos'n - upon restoration of netrw buffer - Mar 27, 2012 * (sjbesse) s:NetrwGetFile() needs to remove - "/" from the netrw buffer's usual |'isk'| - in order to allow "filetype detect" to work - properly for scripts. - v143: Jun 01, 2011 * |g:netrw_winsize| will accept a negative - number; the absolute value of it will then - be used to specify lines/columns instead of - a percentage. - Jul 05, 2011 * the "d" map now supports mkdir via ftp - See |netrw-d| and |g:netrw_remote_mkdir| - Jul 11, 2011 * Changed Explore!, Sexplore!, and Vexplore - to use a percentage of |winwidth()| instead - of a percentage of |winheight()|. - Jul 11, 2011 * included support for https://... I'm just - beginning to test this, however. - Aug 01, 2011 * changed RestoreOptions to also restore - cursor position in netrw buffers. - Aug 12, 2011 * added a note about "%" to the balloon - Aug 30, 2011 * if |g:netrw_nobeval| exists, then balloon - evaluation is suppressed. - Aug 31, 2011 * (Benjamin R Haskell) provided a patch that - implements non-standard port handling for - files opened via the remote browser. - Aug 31, 2011 * Fixed a **//pattern Explorer bug - Sep 15, 2011 * (reported by Francesco Campana) netrw - now permits the "@" to be part of the - user id (if there's an @ that appears - to the right). - Nov 21, 2011 * New option: |g:netrw_ftp_options| - Dec 07, 2011 * (James Sinclair) provided a fix handling - attempts to use a uid and password when - they weren't defined. This affected - NetWrite (NetRead already had that fix). - ============================================================================== 13. Todo *netrw-todo* {{{1 diff --git a/en/quickfix.txt b/en/quickfix.txt index 9858d4eb7..3d42337c4 100644 --- a/en/quickfix.txt +++ b/en/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 7.4. Last change: 2015 Sep 08 +*quickfix.txt* For Vim version 7.4. Last change: 2016 Jan 21 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/en/quickref.txt b/en/quickref.txt index eef588135..8450cdd89 100644 --- a/en/quickref.txt +++ b/en/quickref.txt @@ -1,4 +1,4 @@ -*quickref.txt* For Vim version 7.4. Last change: 2014 Aug 06 +*quickref.txt* For Vim version 7.4. Last change: 2015 Nov 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -620,6 +620,7 @@ Short explanation of each option: *option-list* 'balloondelay' 'bdlay' delay in mS before a balloon may pop up 'ballooneval' 'beval' switch on balloon evaluation 'balloonexpr' 'bexpr' expression to show in balloon +'belloff' 'bo' do not ring the bell for these reasons 'binary' 'bin' read/write/edit file in binary mode 'bioskey' 'biosk' MS-DOS: use bios calls for input characters 'bomb' prepend a Byte Order Mark to the file @@ -696,6 +697,7 @@ Short explanation of each option: *option-list* 'fileignorecase' 'fic' ignore case when using file names 'filetype' 'ft' type of file, used for autocommands 'fillchars' 'fcs' characters to use for displaying special items +'fixendofline' 'fixeol' make sure last line in file has 'fkmap' 'fk' Farsi keyboard mapping 'foldclose' 'fcl' close a fold when the cursor leaves it 'foldcolumn' 'fdc' width of the column used to indicate folds @@ -710,10 +712,10 @@ Short explanation of each option: *option-list* 'foldnestmax' 'fdn' maximum fold depth 'foldopen' 'fdo' for which commands a fold will be opened 'foldtext' 'fdt' expression used to display for a closed fold +'formatexpr' 'fex' expression used with "gq" command 'formatlistpat' 'flp' pattern used to recognize a list header 'formatoptions' 'fo' how automatic formatting is to be done 'formatprg' 'fp' name of external program used with "gq" command -'formatexpr' 'fex' expression used with "gq" command 'fsync' 'fs' whether to invoke fsync() after file write 'gdefault' 'gd' the ":substitute" flag 'g' is default on 'grepformat' 'gfm' format of 'grepprg' output @@ -732,15 +734,15 @@ Short explanation of each option: *option-list* 'helplang' 'hlg' preferred help languages 'hidden' 'hid' don't unload buffer when it is |abandon|ed 'highlight' 'hl' sets highlighting mode for various occasions -'hlsearch' 'hls' highlight matches with last search pattern 'history' 'hi' number of command-lines that are remembered 'hkmap' 'hk' Hebrew keyboard mapping 'hkmapp' 'hkp' phonetic Hebrew keyboard mapping +'hlsearch' 'hls' highlight matches with last search pattern 'icon' let Vim set the text of the window icon 'iconstring' string to use for the Vim icon text 'ignorecase' 'ic' ignore case in search patterns -'imactivatekey' 'imak' key that activates the X input method 'imactivatefunc' 'imaf' function to enable/disable the X input method +'imactivatekey' 'imak' key that activates the X input method 'imcmdline' 'imc' use IM when starting to edit a command line 'imdisable' 'imd' do not use the IM in any mode 'iminsert' 'imi' use :lmap or IM in Insert mode @@ -764,6 +766,7 @@ Short explanation of each option: *option-list* 'keywordprg' 'kp' program to use for the "K" command 'langmap' 'lmap' alphabetic characters for other language mode 'langmenu' 'lm' language to be used for the menus +'langnoremap' 'lnr' do not apply 'langmap' to mapped characters 'laststatus' 'ls' tells when last window has status lines 'lazyredraw' 'lz' don't redraw while executing macros 'linebreak' 'lbr' wrap long lines at a blank @@ -774,6 +777,7 @@ Short explanation of each option: *option-list* 'list' show and 'listchars' 'lcs' characters for displaying in list mode 'loadplugins' 'lpl' load plugin scripts when starting up +'luadll' name of the Lua dynamic library 'macatsui' Mac GUI: use ATSUI text drawing 'magic' changes special characters in search patterns 'makeef' 'mef' name of the errorfile for ":make" @@ -813,6 +817,7 @@ Short explanation of each option: *option-list* 'patchexpr' 'pex' expression used to patch a file 'patchmode' 'pm' keep the oldest version of a file 'path' 'pa' list of directories searched with "gf" et.al. +'perldll' name of the Perl dynamic library 'preserveindent' 'pi' preserve the indent structure when reindenting 'previewheight' 'pvh' height of the preview window 'previewwindow' 'pvw' identifies the preview window @@ -825,6 +830,8 @@ Short explanation of each option: *option-list* 'printmbfont' 'pmbfn' font names to be used for CJK output of :hardcopy 'printoptions' 'popt' controls the format of :hardcopy output 'pumheight' 'ph' maximum height of the popup menu +'pythondll' name of the Python 2 dynamic library +'pythonthreedll' name of the Python 3 dynamic library 'quoteescape' 'qe' escape characters used in a string 'readonly' 'ro' disallow writing the buffer 'redrawtime' 'rdt' timeout for 'hlsearch' and |:match| highlighting @@ -837,6 +844,7 @@ Short explanation of each option: *option-list* 'revins' 'ri' inserting characters will work backwards 'rightleft' 'rl' window is right-to-left oriented 'rightleftcmd' 'rlc' commands for which editing works right-to-left +'rubydll' name of the Ruby dynamic library 'ruler' 'ru' show cursor line and column in the status line 'rulerformat' 'ruf' custom format for the ruler 'runtimepath' 'rtp' list of directories used for runtime files @@ -892,14 +900,16 @@ Short explanation of each option: *option-list* 'switchbuf' 'swb' sets behavior when switching to another buffer 'synmaxcol' 'smc' maximum column to find syntax items 'syntax' 'syn' syntax to be loaded for current buffer -'tabstop' 'ts' number of spaces that in file uses 'tabline' 'tal' custom format for the console tab pages line 'tabpagemax' 'tpm' maximum number of tab pages for |-p| and "tab all" +'tabstop' 'ts' number of spaces that in file uses 'tagbsearch' 'tbs' use binary searching in tags files +'tagcase' 'tc' how to handle case when searching in tags files 'taglength' 'tl' number of significant characters for a tag 'tagrelative' 'tr' file names in tag file are relative 'tags' 'tag' list of file names used by the tag command 'tagstack' 'tgst' push tags onto the tag stack +'tcldll' name of the Tcl dynamic library 'term' name of the terminal 'termbidi' 'tbidi' terminal takes care of bi-directionality 'termencoding' 'tenc' character encoding used by the terminal diff --git a/en/repeat.txt b/en/repeat.txt index af3a5182a..b3132a900 100644 --- a/en/repeat.txt +++ b/en/repeat.txt @@ -1,4 +1,4 @@ -*repeat.txt* For Vim version 7.4. Last change: 2015 Apr 13 +*repeat.txt* For Vim version 7.4. Last change: 2016 Jan 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -109,7 +109,13 @@ To abort this type CTRL-C twice. q{0-9a-zA-Z"} Record typed characters into register {0-9a-zA-Z"} (uppercase to append). The 'q' command is disabled while executing a register, and it doesn't work inside - a mapping and |:normal|. {Vi: no recording} + a mapping and |:normal|. + + Note: If the register being used for recording is also + used for |y| and |p| the result is most likely not + what is expected, because the put will paste the + recorded macro and the yank will overwrite the + recorded macro. {Vi: no recording} q Stops recording. (Implementation note: The 'q' that stops recording is not stored in the register, unless @@ -477,16 +483,44 @@ Additionally, these commands can be used: finish Finish the current script or user function and come back to debug mode for the command after the one that sourced or called it. + *>bt* + *>backtrace* + *>where* + backtrace Show the call stacktrace for current debugging session. + bt + where + *>frame* + frame N Goes to N bactrace level. + and - signs make movement + relative. E.g., ":frame +3" goes three frames up. + *>up* + up Goes one level up from call stacktrace. + *>down* + down Goes one level down from call stacktrace. About the additional commands in debug mode: - There is no command-line completion for them, you get the completion for the normal Ex commands only. -- You can shorten them, up to a single character: "c", "n", "s" and "f". +- You can shorten them, up to a single character, unless more then one command + starts with the same letter. "f" stands for "finish", use "fr" for "frame". - Hitting will repeat the previous one. When doing another command, this is reset (because it's not clear what you want to repeat). - When you want to use the Ex command with the same name, prepend a colon: ":cont", ":next", ":finish" (or shorter). +The backtrace shows the hierarchy of function calls, e.g.: + >bt ~ + 3 function One[3] ~ + 2 Two[3] ~ + ->1 Three[3] ~ + 0 Four ~ + line 1: let four = 4 ~ + +The "->" points to the current frame. Use "up", "down" and "frame N" to +select another frame. + +In the current frame you can evaluate the local function variables. There is +no way to see the command at the current line yet. + DEFINING BREAKPOINTS *:breaka* *:breakadd* diff --git a/en/spell.txt b/en/spell.txt index 5a802a29f..3442a0011 100644 --- a/en/spell.txt +++ b/en/spell.txt @@ -1,4 +1,4 @@ -*spell.txt* For Vim version 7.4. Last change: 2014 Sep 19 +*spell.txt* For Vim version 7.4. Last change: 2016 Jan 08 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1386,6 +1386,14 @@ the item name. Case is always ignored. The Hunspell feature to use three arguments and flags is not supported. + *spell-NOCOMPOUNDSUGS* +This item indicates that using compounding to make suggestions is not a good +idea. Use this when compounding is used with very short or one-character +words. E.g. to make numbers out of digits. Without this flag creating +suggestions would spend most time trying all kind of weird compound words. + + NOCOMPOUNDSUGS ~ + *spell-SYLLABLE* The SYLLABLE item defines characters or character sequences that are used to count the number of syllables in a word. Example: diff --git a/en/syntax.txt b/en/syntax.txt index d475660a3..45d4a08c4 100644 --- a/en/syntax.txt +++ b/en/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 7.4. Last change: 2014 Sep 27 +*syntax.txt* For Vim version 7.4. Last change: 2016 Jan 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -211,7 +211,8 @@ thing. These are then linked to a highlight group that specifies the color. A syntax group name doesn't specify any color or attributes itself. The name for a highlight or syntax group must consist of ASCII letters, digits -and the underscore. As a regexp: "[a-zA-Z0-9_]*" +and the underscore. As a regexp: "[a-zA-Z0-9_]*". However, Vim does not give +an error when using other characters. To be able to allow each user to pick his favorite set of colors, there must be preferred names for highlight groups that are common for many languages. @@ -421,18 +422,19 @@ and last line to be converted. Example, using the last set Visual area: > *:TOhtml* :[range]TOhtml The ":TOhtml" command is defined in a standard plugin. This command will source |2html.vim| for you. When a - range is given, set |g:html_start_line| and - |g:html_end_line| to the start and end of the range, - respectively. Default range is the entire buffer. - - If the current window is part of a |diff|, unless - |g:html_diff_one_file| is set, :TOhtml will convert - all windows which are part of the diff in the current - tab and place them side-by-side in a element - in the generated HTML. With |g:html_line_ids| you can - jump to lines in specific windows with (for example) - #W1L42 for line 42 in the first diffed window, or - #W3L87 for line 87 in the third. + range is given, this command sets |g:html_start_line| + and |g:html_end_line| to the start and end of the + range, respectively. Default range is the entire + buffer. + + If the current window is part of a |diff|, unless + |g:html_diff_one_file| is set, :TOhtml will convert + all windows which are part of the diff in the current + tab and place them side-by-side in a
element + in the generated HTML. With |g:html_line_ids| you can + jump to lines in specific windows with (for example) + #W1L42 for line 42 in the first diffed window, or + #W3L87 for line 87 in the third. Examples: > @@ -746,6 +748,22 @@ and UTF-32 instead, use: > Note that documents encoded in either UTF-32 or UTF-16 have known compatibility problems with some major browsers. + *g:html_font* +Default: "monospace" +You can specify the font or fonts used in the converted document using +g:html_font. If this option is set to a string, then the value will be +surrounded with single quotes. If this option is set to a list then each list +item is surrounded by single quotes and the list is joined with commas. Either +way, "monospace" is added as the fallback generic family name and the entire +result used as the font family (using CSS) or font face (if not using CSS). +Examples: > + + " font-family: 'Consolas', monospace; + :let g:html_font = "Consolas" + + " font-family: 'DejaVu Sans Mono', 'Consolas', monospace; + :let g:html_font = ["DejaVu Sans Mono", "Consolas"] +< *convert-to-XML* *convert-to-XHTML* *g:html_use_xhtml* Default: 0. When 0, generate standard HTML 4.01 (strict when possible). @@ -1063,7 +1081,8 @@ CPP *cpp.vim* *ft-cpp-syntax* Most of things are same as |ft-c-syntax|. Variable Highlight ~ -cpp_no_c11 don't highlight C++11 standard items +cpp_no_cpp11 don't highlight C++11 standard items +cpp_no_cpp14 don't highlight C++14 standard items CSH *csh.vim* *ft-csh-syntax* @@ -1128,6 +1147,16 @@ to standard by placing this in your vimrc file: > :let enforce_freedesktop_standard = 1 +DIFF *diff.vim* + +The diff highlighting normally finds translated headers. This can be slow if +there are very long lines in the file. To disable translations: > + + :let diff_translations = 0 + +Also see |diff-slow|. + + DIRCOLORS *dircolors.vim* *ft-dircolors-syntax* The dircolors utility highlighting definition has one option. It exists to @@ -1409,34 +1438,27 @@ form, then > :let fortran_fixed_source=1 in your .vimrc prior to the :syntax on command. -If the form of the source code depends upon the file extension, then it is -most convenient to set fortran_free_source in a ftplugin file. For more -information on ftplugin files, see |ftplugin|. For example, if all your -fortran files with an .f90 extension are written in free source form and the -rest in fixed source form, add the following code to your ftplugin file > - let s:extfname = expand("%:e") - if s:extfname ==? "f90" - let fortran_free_source=1 - unlet! fortran_fixed_source - else - let fortran_fixed_source=1 - unlet! fortran_free_source - endif -Note that this will work only if the "filetype plugin indent on" command -precedes the "syntax on" command in your .vimrc file. +If the form of the source code depends, in a non-standard way, upon the file +extension, then it is most convenient to set fortran_free_source in a ftplugin +file. For more information on ftplugin files, see |ftplugin|. Note that this +will work only if the "filetype plugin indent on" command precedes the "syntax +on" command in your .vimrc file. When you edit an existing fortran file, the syntax script will assume free source form if the fortran_free_source variable has been set, and assumes fixed source form if the fortran_fixed_source variable has been set. If neither of these variables have been set, the syntax script attempts to -determine which source form has been used by examining the first five columns -of the first 250 lines of your file. If no signs of free source form are -detected, then the file is assumed to be in fixed source form. The algorithm -should work in the vast majority of cases. In some cases, such as a file that -begins with 250 or more full-line comments, the script may incorrectly decide -that the fortran code is in fixed form. If that happens, just add a -non-comment statement beginning anywhere in the first five columns of the -first twenty five lines, save (:w) and then reload (:e!) the file. +determine which source form has been used by examining the file extension +using conventions common to the ifort, gfortran, Cray, NAG, and PathScale +compilers (.f, .for, .f77 for fixed-source, .f90, .f95, .f03, .f08 for +free-source). If none of this works, then the script examines the first five +columns of the first 500 lines of your file. If no signs of free source form +are detected, then the file is assumed to be in fixed source form. The +algorithm should work in the vast majority of cases. In some cases, such as a +file that begins with 500 or more full-line comments, the script may +incorrectly decide that the fortran code is in fixed form. If that happens, +just add a non-comment statement beginning anywhere in the first five columns +of the first twenty five lines, save (:w) and then reload (:e!) the file. Tabs in fortran files ~ Tabs are not recognized by the Fortran standards. Tabs are not a good idea in @@ -3220,7 +3242,8 @@ improve screen updating rates (see |:syn-sync| for more on this). > The g:vimsyn_embed option allows users to select what, if any, types of embedded script highlighting they wish to have. > - g:vimsyn_embed == 0 : don't embed any scripts + g:vimsyn_embed == 0 : don't support any embedded scripts + g:vimsyn_embed =~ 'l' : support embedded lua g:vimsyn_embed =~ 'm' : support embedded mzscheme g:vimsyn_embed =~ 'p' : support embedded perl g:vimsyn_embed =~ 'P' : support embedded python @@ -3238,6 +3261,7 @@ Some folding is now supported with syntax/vim.vim: > g:vimsyn_folding == 0 or doesn't exist: no syntax-based folding g:vimsyn_folding =~ 'a' : augroups g:vimsyn_folding =~ 'f' : fold functions + g:vimsyn_folding =~ 'l' : fold lua script g:vimsyn_folding =~ 'm' : fold mzscheme script g:vimsyn_folding =~ 'p' : fold perl script g:vimsyn_folding =~ 'P' : fold python script @@ -3311,6 +3335,32 @@ must not click outside of the pixel strings, but feel free to improve it. It will look much better with a font in a quadratic cell size, e.g. for X: > :set guifont=-*-clean-medium-r-*-*-8-*-*-*-*-80-* + +YAML *yaml.vim* *ft-yaml-syntax* + + *g:yaml_schema* *b:yaml_schema* +A YAML schema is a combination of a set of tags and a mechanism for resolving +non-specific tags. For user this means that YAML parser may, depending on +plain scalar contents, treat plain scalar (which can actually be only string +and nothing else) as a value of the other type: null, boolean, floating-point, +integer. `g:yaml_schema` option determines according to which schema values +will be highlighted specially. Supported schemas are + +Schema Description ~ +failsafe No additional highlighting. +json Supports JSON-style numbers, booleans and null. +core Supports more number, boolean and null styles. +pyyaml In addition to core schema supports highlighting timestamps, + but there are some differences in what is recognized as + numbers and many additional boolean values not present in core + schema. + +Default schema is `core`. + +Note that schemas are not actually limited to plain scalars, but this is the +only difference between schemas defined in YAML specification and the only +difference defined in the syntax file. + ============================================================================== 5. Defining a syntax *:syn-define* *E410* @@ -3388,6 +3438,32 @@ SPELL CHECKING *:syn-spell* To activate spell checking the 'spell' option must be set. +SYNTAX ISKEYWORD SETTING *:syn-iskeyword* + +:sy[ntax] iskeyword [clear | {option}] + This defines the keyword characters. It's like the 'iskeyword' option + for but only applies to syntax highlighting. + + clear: Syntax specific iskeyword setting is disabled and the + buffer-local 'iskeyword' setting is used. + {option} Set the syntax 'iskeyword' option to a new value. + + Example: > + :syntax iskeyword @,48-57,192-255,$,_ +< + This would set the syntax specific iskeyword option to include all + alphabetic characters, plus the numeric characters, all accented + characters and also includes the "_" and the "$". + + If no argument is given, the current value will be output. + + Setting this option influences what |/\k| matches in syntax patterns + and also determines where |:syn-keyword| will be checked for a new + match. + + It is recommended when writing syntax files, to use this command + to the correct value for the specific syntax language and not change + the 'iskeyword' option. DEFINING KEYWORDS *:syn-keyword* @@ -3419,6 +3495,7 @@ DEFINING KEYWORDS *:syn-keyword* isn't, the keyword will never be recognized. Multi-byte characters can also be used. These do not have to be in 'iskeyword'. + See |:syn-iskeyword| for defining syntax specific iskeyword settings. A keyword always has higher priority than a match or region, the keyword is used if more than one item matches. Keywords do not nest @@ -3662,6 +3739,7 @@ Whether or not it is actually concealed depends on the value of the 'conceallevel' option. The 'concealcursor' option is used to decide whether concealable items in the current line are displayed unconcealed to be able to edit the line. +Another way to conceal text with with |matchadd()|. concealends *:syn-concealends* @@ -4108,7 +4186,7 @@ example, for instance, can be done like this: > As can be seen here, the \z actually does double duty. In the start pattern, it marks the "\(\I\i*\)" sub-expression as external; in the end pattern, it -changes the \1 back-reference into an external reference referring to the +changes the \z1 back-reference into an external reference referring to the first external sub-expression in the start pattern. External references can also be used in skip patterns: > :syn region foo start="start \(\I\i*\)" skip="not end \z1" end="end \z1" @@ -4637,6 +4715,8 @@ ctermbg={color-nr} *highlight-ctermbg* Note that for some color terminals these names may result in the wrong colors! + You can also use "NONE" to remove the color. + *:hi-normal-cterm* When setting the "ctermfg" or "ctermbg" colors for the Normal group, these will become the colors used for the non-highlighted text. @@ -5065,6 +5145,7 @@ This will set the "w:current_syntax" variable to "foo". The value of restoring "b:current_syntax", since the syntax files do set "b:current_syntax". The value set by the syntax file is assigned to "w:current_syntax". +Note: This resets the 'spell', 'spellcapcheck' and 'spellfile' options. Once a window has its own syntax, syntax commands executed from other windows on the same buffer (including :syntax clear) have no effect. Conversely, diff --git a/en/tagsrch.txt b/en/tagsrch.txt index 06c983860..86a00f409 100644 --- a/en/tagsrch.txt +++ b/en/tagsrch.txt @@ -85,11 +85,13 @@ changed, to avoid confusion when using ":tnext". It is changed when using ":tag {ident}". The ignore-case matches are not found for a ":tag" command when the -'ignorecase' option is off. They are found when a pattern is used (starting -with a "/") and for ":tselect", also when 'ignorecase' is off. Note that -using ignore-case tag searching disables binary searching in the tags file, -which causes a slowdown. This can be avoided by fold-case sorting the tag -file. See the 'tagbsearch' option for an explanation. +'ignorecase' option is off and 'tagcase' is "followic" or when 'tagcase' is +"match". They are found when a pattern is used (starting with a "/") and for +":tselect", also when 'ignorecase' is off and 'tagcase' is "followic" or when +'tagcase' is "match". Note that using ignore-case tag searching disables +binary searching in the tags file, which causes a slowdown. This can be +avoided by fold-case sorting the tag file. See the 'tagbsearch' option for an +explanation. ============================================================================== 2. Tag stack *tag-stack* *tagstack* *E425* @@ -440,12 +442,13 @@ file "tags". It can also be used to access a common tags file. The next file in the list is not used when: - A matching static tag for the current buffer has been found. - A matching global tag has been found. -This also depends on the 'ignorecase' option. If it is off, and the tags file -only has a match without matching case, the next tags file is searched for a -match with matching case. If no tag with matching case is found, the first -match without matching case is used. If 'ignorecase' is on, and a matching -global tag with or without matching case is found, this one is used, no -further tags files are searched. +This also depends on whether case is ignored. Case is ignored when +'ignorecase' is set and 'tagcase' is "followic", or when 'tagcase' is +"ignore". If case is not ignored, and the tags file only has a match without +matching case, the next tags file is searched for a match with matching case. +If no tag with matching case is found, the first match without matching case +is used. If case is ignored, and a matching global tag with or without +matching case is found, this one is used, no further tags files are searched. When a tag file name starts with "./", the '.' is replaced with the path of the current file. This makes it possible to use a tags file in the directory @@ -579,8 +582,10 @@ that indicates if the file was sorted. When this line is found, Vim uses binary searching for the tags file: !_TAG_FILE_SORTED1{anything} ~ -A tag file may be case-fold sorted to avoid a linear search when 'ignorecase' -is on. See 'tagbsearch' for details. The value '2' should be used then: +A tag file may be case-fold sorted to avoid a linear search when case is +ignored. (Case is ignored when 'ignorecase' is set and 'tagcase' is +"followic", or when 'tagcase' is "ignore".) See 'tagbsearch' for details. +The value '2' should be used then: !_TAG_FILE_SORTED2{anything} ~ The other tag that Vim recognizes, but only when compiled with the diff --git a/en/term.txt b/en/term.txt index d2dd54706..a56813ac0 100644 --- a/en/term.txt +++ b/en/term.txt @@ -1,4 +1,4 @@ -*term.txt* For Vim version 7.4. Last change: 2014 May 13 +*term.txt* For Vim version 7.4. Last change: 2015 Nov 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -224,10 +224,11 @@ The options are listed below. The associated termcap code is always equal to the last two characters of the option name. Only one termcap code is required: Cursor motion, 't_cm'. -The options 't_da', 't_db', 't_ms', 't_xs' represent flags in the termcap. -When the termcap flag is present, the option will be set to "y". But any -non-empty string means that the flag is set. An empty string means that the -flag is not set. 't_CS' works like this too, but it isn't a termcap flag. +The options 't_da', 't_db', 't_ms', 't_xs', 't_xn' represent flags in the +termcap. When the termcap flag is present, the option will be set to "y". +But any non-empty string means that the flag is set. An empty string means +that the flag is not set. 't_CS' works like this too, but it isn't a termcap +flag. OUTPUT CODES option meaning ~ @@ -281,6 +282,9 @@ OUTPUT CODES t_vs cursor very visible *t_vs* *'t_vs'* *t_xs* *'t_xs'* t_xs if non-empty, standout not erased by overwriting (hpterm) + *t_xn* *'t_xn'* + t_xn if non-empty, writing a character at the last screen cell + does not cause scrolling t_ZH italics mode *t_ZH* *'t_ZH'* t_ZR italics end *t_ZR* *'t_ZR'* @@ -290,12 +294,15 @@ Added by Vim (there are no standard codes for these): t_WP set window position (Y, X) in pixels *t_WP* *'t_WP'* t_WS set window size (height, width) in characters *t_WS* *'t_WS'* t_SI start insert mode (bar cursor shape) *t_SI* *'t_SI'* - t_EI end insert mode (block cursor shape) *t_EI* *'t_EI'* + t_SR start replace mode (underline cursor shape) *t_SR* *'t_SR'* + t_EI end insert or replace mode (block cursor shape) *t_EI* *'t_EI'* |termcap-cursor-shape| t_RV request terminal version string (for xterm) *t_RV* *'t_RV'* |xterm-8bit| |v:termresponse| |'ttymouse'| |xterm-codes| t_u7 request cursor position (for xterm) *t_u7* *'t_u7'* see |'ambiwidth'| + t_RB request terminal background color *t_RB* *'t_RB'* + see |'ambiwidth'| KEY CODES Note: Use the <> form if possible @@ -410,7 +417,7 @@ adjust the various t_ codes. This avoids the problem that the xterm can produce different codes, depending on the mode it is in (8-bit, VT102, VT220, etc.). The result is that codes like are no longer needed. Note: This is only done on startup. If the xterm options are changed after -Vim has started, the escape sequences may not be recognized any more. +Vim has started, the escape sequences may not be recognized anymore. *xterm-resize* Window resizing with xterm only works if the allowWindowOps resource is @@ -434,13 +441,16 @@ If one of these is not available, 't_Sb' and 't_Sf' are used. 't_me' is used to reset to the default colors. *termcap-cursor-shape* *termcap-cursor-color* -When Vim enters Insert mode the 't_SI' escape sequence is sent. When leaving -Insert mode 't_EI' is used. But only if both are defined. This can be used -to change the shape or color of the cursor in Insert mode. These are not -standard termcap/terminfo entries, you need to set them yourself. +When Vim enters Insert mode the 't_SI' escape sequence is sent. When Vim +enters Replace mode the 't_SR' escape sequence is sent if it is set, otherwise +'t_SI' is sent. When leaving Insert mode or Replace mode 't_EI' is used. This +can be used to change the shape or color of the cursor in Insert or Replace +mode. These are not standard termcap/terminfo entries, you need to set them +yourself. Example for an xterm, this changes the color of the cursor: > if &term =~ "xterm" let &t_SI = "\]12;purple\x7" + let &t_SR = "\]12;red\x7" let &t_EI = "\]12;blue\x7" endif NOTE: When Vim exits the shape for Normal mode will remain. The shape from @@ -842,7 +852,7 @@ Mouse clicks can be mapped. The codes for mouse clicks are: The X1 and X2 buttons refer to the extra buttons found on some mice. The 'Microsoft Explorer' mouse has these buttons available to the right thumb. -Currently X1 and X2 only work on Win32 environments. +Currently X1 and X2 only work on Win32 and X11 environments. Examples: > :noremap diff --git a/en/usr_02.txt b/en/usr_02.txt index da6364045..a3e9bf3c8 100644 --- a/en/usr_02.txt +++ b/en/usr_02.txt @@ -1,4 +1,4 @@ -*usr_02.txt* For Vim version 7.4. Last change: 2015 Apr 12 +*usr_02.txt* For Vim version 7.4. Last change: 2016 Jan 16 VIM USER MANUAL - by Bram Moolenaar @@ -408,7 +408,15 @@ original version of the file. Everything you always wanted to know can be found in the Vim help files. Don't be afraid to ask! - To get generic help use this command: > + +If you know what you are looking for, it is usually easier to search for it +using the help system, instead of using Google. Because the subjects follow +a certain style guide. + +Also the help has the advantage of belonging to your particular Vim version. +You won't see help for commands added later. These would not work for you. + +To get generic help use this command: > :help @@ -482,7 +490,7 @@ example, use the following command: > :help 'number' -The table with all mode prefixes can be found here: |help-context|. +The table with all mode prefixes can be found below: |help-summary|. Special keys are enclosed in angle brackets. To find help on the up-arrow key in Insert mode, for instance, use this command: > @@ -499,64 +507,191 @@ You can use the error ID at the start to find help about it: > Summary: *help-summary* > - :help -< Gives you very general help. Scroll down to see a list of all - helpfiles, including those added locally (i.e. not distributed - with Vim). > - :help user-toc.txt -< Table of contents of the User Manual. > - :help :subject -< Ex-command "subject", for instance the following: > - :help :help -< Help on getting help. > - :help abc -< normal-mode command "abc". > - :help CTRL-B -< Control key in Normal mode. > - :help i_abc - :help i_CTRL-B -< The same in Insert mode. > - :help v_abc - :help v_CTRL-B -< The same in Visual mode. > - :help c_abc - :help c_CTRL-B -< The same in Command-line mode. > - :help 'subject' -< Option 'subject'. > - :help subject() -< Function "subject". > - :help -subject -< Command-line argument "-subject". > - :help +subject -< Compile-time feature "+subject". > - :help /* -< Regular expression item "*" > - :help EventName -< Autocommand event "EventName". > - :help digraphs.txt -< The top of the helpfile "digraph.txt". - Similarly for any other helpfile. > - :help pattern -< Find a help tag starting with "pattern". Repeat for - others. > - :help pattern -< See all possible help tag matches "pattern" at once. > - :helpgrep pattern -< Search the whole text of all help files for pattern "pattern". - Jumps to the first match. Jump to other matches with: > - :cn -< next match > - :cprev - :cN -< previous match > - :cfirst - :clast -< first or last match > - :copen - :cclose -< open/close the quickfix window; press to jump - to the item under the cursor + +1) Use Ctrl-D after typing a topic and let Vim show all available topics. + Or press Tab to complete: > + :help some +< More information on how to use the help: > + :help helphelp + +2) Follow the links in bars to related help. You can go from the detailed + help to the user documentation, which describes certain commands more from + a user perspective and less detailed. E.g. after: > + :help pattern.txt +< You can see the user guide topics |03.9| and |usr_27.txt| in the + introduction. + +3) Options are enclosed in single apostrophes. To go to the help topic for the + list option: > + :help 'list' +< If you only know you are looking for a certain option, you can also do: > + :help options.txt +< to open the help page which describes all option handling and then search + using regular expressions, e.g. textwidth. + Certain options have their own namespace, e.g.: > + :help cpo- +< for the corresponding flag of the 'cpoptions' settings, substitute + by a specific flag, e.g.: > + :help cpo-; +< And for the guioption flags: > + :help go- + +4) Normal mode commands do not have a prefix. To go to the help page for the + "gt" command: > + :help gt + +5) Insert mode commands start with i_. Help for deleting a word: > + :help i_CTRL-W + +6) Visual mode commands start with v_. Help for jumping to the other side of + the Visual area: > + :help v_o + +7) Command line editing and arguments start with c_. Help for using the + command argument %: > + :help c_% + +8) Ex-commands always start with ":", so to go to the :s command help: > + :help :s + +9) Commands specifically for debugging start with ">". To go to to the help + for the "cont" debug command: > + :help >cont + +10) Key combinations. They usually start with a single letter indicating + the mode for which they can be used. E.g.: > + :help i_CTRL-X +< takes you to the family of Ctrl-X commands for insert mode which can be + used to auto complete different things. Note, that certain keys will + always be written the same, e.g. Control will always be CTRL. + For normal mode commands there is no prefix and the topic is available at + :h CTRL-. E.g. > + :help CTRL-W +< In contrast > + :help c_CTRL-R +< will describe what the Ctrl-R does when entering commands in the Command + line and > + :help v_Ctrl-A +< talks about incrementing numbers in visual mode and > + :help g_CTRL-A +< talks about the g command (e.g. you have to press "g" then ). + Here the "g" stand for the normal command "g" which always expects a second + key before doing something similar to the commands starting with "z" + +11) Regexp items always start with /. So to get help for the "\+" quantifier + in Vim regexes: > + :help /\+ +< If you need to know everything about regular expressions, start reading + at: > + :help pattern.txt + +12) Registers always start with "quote". To find out about the special ":" + register: > + :help quote: + +13) Vim Script (VimL) is available at > + :help eval.txt +< Certain aspects of the language are available at :h expr-X where "X" is a + single letter. E.g. > + :help expr-! +< will take you to the topic describing the "!" (Not) operator for + VimScript. + Also important is > + :help function-list +< to find a short description of all functions available. Help topics for + VimL functions always include the "()", so: > + :help append() +< talks about the append VimL function rather than how to append text in the + current buffer. + +14) Mappings are talked about in the help page :h |map.txt|. Use > + :help mapmode-i +< to find out about the |:imap| command. Also use :map-topic + to find out about certain subtopics particular for mappings. e.g: > + :help :map-local +< for buffer-local mappings or > + :help map-bar +< for how the '|' is handled in mappings. + +15) Command definitions are talked about :h command-topic, so use > + :help command-bar +< to find out about the '!' argument for custom commands. + +16) Window management commands always start with CTRL-W, so you find the + corresponding help at :h CTRL-W_letter. E.g. > + :help CTRL-W_p +< for moving the previous accessed window. You can also access > + :help windows.txt +< and read your way through if you are looking for window handling + commands. + +17) Use |:helpgrep| to search in all help pages (and also of any installed + plugins). See |:helpgrep| for how to use it. + To search for a topic: > + :helpgrep topic +< This takes you to the first match. To go to the next one: > + :cnext +< All matches are available in the quickfix window which can be opened + with: > + :copen +< Move around to the match you like and press Enter to jump to that help. + +18) The user manual. This describes help topics for beginners in a rather + friendly way. Start at |usr_toc.txt| to find the table of content (as you + might have guessed): > + :help usr_toc.txt +< Skim over the contents to find interesting topics. The "Digraphs" and + "Entering special characters" items are in chapter 24, so to go to that + particular help page: > + :help usr_24.txt +< Also if you want to access a certain chapter in the help, the chapter + number can be accessed directly like this: > + :help 10.1 +< goes to chapter 10.1 in |usr_10.txt| and talks about recording macros. + +19) Highlighting groups. Always start with hl-groupname. E.g. > + :help hl-WarningMsg +< talks about the WarningMsg highlighting group. + +20) Syntax highlighting is namespaced to :syn-topic e.g. > + :help :syn-conceal +< talks about the conceal argument for the :syn command. + +21) Quickfix commands usually start with :c while location list commands + usually start with :l + +22) Autocommand events can be found by their name: > + :help BufWinLeave +< To see all possible events: > + :help autocommands-events + +23) Command-line switches always start with "-". So for the help of the -f + command switch of Vim use: > + :help -f + +24) Optional features always start with "+". To find out about the + conceal feature use: > + :help +conceal + +25) Documentation for included filetype specific functionality is usually + available in the form ft--. So > + :help ft-c-syntax +< talks about the C syntax file and the option it provides. Sometimes, + additional sections for omni completion > + :help ft-php-omni +< or filetype plugins > + :help ft-tex-plugin +< are available. + +26) Error and Warning codes can be looked up directly in the help. So > + :help E297 +< takes you exactly to the description of the swap error message and > + :help W10 +< talks about the warning "Changing a readonly file". + Sometimes however, those error codes are not described, but rather are + listed at the Vim command that usually causes this. So: > + :help E128 +< takes you to the |:function| command ============================================================================== diff --git a/en/usr_03.txt b/en/usr_03.txt index 8cbcf13a1..4f72214bb 100644 --- a/en/usr_03.txt +++ b/en/usr_03.txt @@ -1,4 +1,4 @@ -*usr_03.txt* For Vim version 7.4. Last change: 2006 Jun 21 +*usr_03.txt* For Vim version 7.4. Last change: 2016 Jan 05 VIM USER MANUAL - by Bram Moolenaar @@ -57,8 +57,11 @@ paragraph, much faster than using "l". "b" does the same in the other direction. A word ends at a non-word character, such as a ".", "-" or ")". To change -what Vim considers to be a word, see the 'iskeyword' option. - It is also possible to move by white-space separated WORDs. This is not a +what Vim considers to be a word, see the 'iskeyword' option. If you try this +out in the help directly, 'iskeyword' needs to be reset for the examples to +work: > + :set iskeyword& +It is also possible to move by white-space separated WORDs. This is not a word in the normal sense, that's why the uppercase is used. The commands for moving by WORDs are also uppercase, as this figure shows: @@ -410,8 +413,8 @@ in "the" use: > /the\> The "\>" item is a special marker that only matches at the end of a word. -Similarly "\<" only matches at the begin of a word. Thus to search for the -word "the" only: > +Similarly "\<" only matches at the beginning of a word. Thus to search for +the word "the" only: > /\ diff --git a/en/usr_29.txt b/en/usr_29.txt index f13cd3a40..dc71e71dd 100644 --- a/en/usr_29.txt +++ b/en/usr_29.txt @@ -255,7 +255,8 @@ function. RELATED ITEMS -You can set 'ignorecase' to make case in tag names be ignored. +To make case in tag names be ignored, you can set 'ignorecase' while leaving +'tagcase' as "followic", or set 'tagcase' to "ignore". The 'tagbsearch' option tells if the tags file is sorted or not. The default is to assume a sorted tags file, which makes a tags search a lot faster, but diff --git a/en/usr_41.txt b/en/usr_41.txt index 28bdbad89..9f2442e9b 100644 --- a/en/usr_41.txt +++ b/en/usr_41.txt @@ -1,4 +1,4 @@ -*usr_41.txt* For Vim version 7.4. Last change: 2014 Aug 16 +*usr_41.txt* For Vim version 7.4. Last change: 2016 Jan 28 VIM USER MANUAL - by Bram Moolenaar @@ -888,6 +888,19 @@ Mappings: *mapping-functions* maparg() get rhs of a mapping wildmenumode() check if the wildmode is active +Testing: *test-functions* + assert_equal() assert that two expressions values are equal + assert_false() assert that an expression is false + assert_true() assert that an expression is true + +Inter-process communication: + connect() open a channel + disconnect() close a channel + sendexpr() send a JSON message over a channel + sendraw() send a raw message over a channel + jsonencode() encode an expression to a JSON string + jsondecode() decode a JSON string to Vim types + Various: *various-functions* mode() get current editing mode visualmode() last visual mode used @@ -916,8 +929,10 @@ Various: *various-functions* luaeval() evaluate Lua expression mzeval() evaluate |MzScheme| expression + perleval() evaluate Perl expression (|+perl|) py3eval() evaluate Python expression (|+python3|) pyeval() evaluate Python expression (|+python|) + wordcount() get byte/word/char count of buffer ============================================================================== *41.7* Defining a function diff --git a/en/usr_43.txt b/en/usr_43.txt index 6eaa9c14a..8f0820fbf 100644 --- a/en/usr_43.txt +++ b/en/usr_43.txt @@ -1,4 +1,4 @@ -*usr_43.txt* For Vim version 7.4. Last change: 2008 Dec 28 +*usr_43.txt* For Vim version 7.4. Last change: 2015 Oct 23 VIM USER MANUAL - by Bram Moolenaar @@ -46,6 +46,7 @@ three-line comment. You do this with only two steps: setlocal softtabstop=4 noremap c o/**************/ + let b:undo_ftplugin = "setl softtabstop< | unmap c" Try editing a C file. You should notice that the 'softtabstop' option is set to 4. But when you edit another file it's reset to the default zero. That is @@ -60,6 +61,11 @@ buffer. This works with any mapping command: ":map!", ":vmap", etc. The || in the mapping is replaced with the value of the "maplocalleader" variable. +The line to set b:undo_ftplugin is for when the filetype is set to another +value. In that case you will want to undo your preferences. The +b:undo_ftplugin variable is executed as a command. Watch out for characters +with a special meaning inside a string, such as a backslash. + You can find examples for filetype plugins in this directory: > $VIMRUNTIME/ftplugin/ diff --git a/en/various.txt b/en/various.txt index 4ad328773..d338d9b96 100644 --- a/en/various.txt +++ b/en/various.txt @@ -1,4 +1,4 @@ -*various.txt* For Vim version 7.4. Last change: 2014 Aug 06 +*various.txt* For Vim version 7.4. Last change: 2016 Jan 27 VIM REFERENCE MANUAL by Bram Moolenaar @@ -319,6 +319,7 @@ N *+builtin_terms* some terminals builtin |builtin-terms| B *++builtin_terms* maximal terminals builtin |builtin-terms| N *+byte_offset* support for 'o' flag in 'statusline' option, "go" and ":goto" commands. +m *+channel* inter process communication |channel| N *+cindent* |'cindent'|, C indenting N *+clientserver* Unix and Win32: Remote invocation |clientserver| *+clipboard* |clipboard| support @@ -647,6 +648,7 @@ K Run a program to lookup the keyword under the g CTRL-A Only when Vim was compiled with MEM_PROFILING defined (which is very rare): print memory usage statistics. Only useful for debugging Vim. + For incrementing in Visual mode see |v_g_CTRL-A|. ============================================================================== 2. Using Vim like less or more *less* @@ -665,4 +667,12 @@ highlighting. The "h" key will give you a short overview of the available commands. +If you want to set options differently when using less, define the +LessInitFunc in your vimrc, for example: > + + func LessInitFunc() + set nocursorcolumn nocursorline + endfunc +< + vim:tw=78:ts=8:ft=help:norl: diff --git a/en/vi_diff.txt b/en/vi_diff.txt index aadbf9b41..2a7bbe467 100644 --- a/en/vi_diff.txt +++ b/en/vi_diff.txt @@ -1,4 +1,4 @@ -*vi_diff.txt* For Vim version 7.4. Last change: 2013 Aug 22 +*vi_diff.txt* For Vim version 7.4. Last change: 2015 Nov 01 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/en/windows.txt b/en/windows.txt index cc3659df7..f6e0a1fd0 100644 --- a/en/windows.txt +++ b/en/windows.txt @@ -1,4 +1,4 @@ -*windows.txt* For Vim version 7.4. Last change: 2014 Mar 25 +*windows.txt* For Vim version 7.4. Last change: 2015 Nov 14 VIM REFERENCE MANUAL by Bram Moolenaar @@ -263,28 +263,57 @@ left of the Vim window. Closing a window ---------------- +:q[uit] +:{count}q[uit] CTRL-W q *CTRL-W_q* CTRL-W CTRL-Q *CTRL-W_CTRL-Q* -:q[uit] Quit current window. When quitting the last window (not - counting a help window), exit Vim. - When 'hidden' is set, and there is only one window for the - current buffer, it becomes hidden. - When 'hidden' is not set, and there is only one window for the - current buffer, and the buffer was changed, the command fails. - (Note: CTRL-Q does not work on all terminals) - -:q[uit]! Quit current window. If this was the last window for a buffer, - any changes to that buffer are lost. When quitting the last - window (not counting help windows), exit Vim. The contents of - the buffer are lost, even when 'hidden' is set. + Without {count}: Quit the current window. If {count} is + given quit the {count} window. + When quitting the last window (not counting a help window), + exit Vim. + + When 'hidden' is set, and there is only one window for the + current buffer, it becomes hidden. When 'hidden' is not set, + and there is only one window for the current buffer, and the + buffer was changed, the command fails. + + (Note: CTRL-Q does not work on all terminals). + + If [count] is greater than the last window number the last + window will be closed: > + :1quit " quit the first window + :$quit " quit the last window + :9quit " quit the last window + " if there are less than 9 windows opened + :-quit " quit the previews window + :+quit " quit the next window + :+2quit " quit the second next window +< +:q[uit]! +:{count}q[uit]! + Without {count}: Quit the current window. If {count} is + given quit the {count} window. + + If this was the last window for a buffer, any changes to that + buffer are lost. When quitting the last window (not counting + help windows), exit Vim. The contents of the buffer are lost, + even when 'hidden' is set. + +:clo[se][!] +:{count}clo[se][!] CTRL-W c *CTRL-W_c* *:clo* *:close* -:clo[se][!] Close current window. When the 'hidden' option is set, or - when the buffer was changed and the [!] is used, the buffer - becomes hidden (unless there is another window editing it). + Without {count}: Close the current window. If {count} is + given close the {count} window. + + When the 'hidden' option is set, or when the buffer was + changed and the [!] is used, the buffer becomes hidden (unless + there is another window editing it). + When there is only one window in the current tab page and there is another tab page, this closes the current tab page. |tab-page|. + This command fails when: *E444* - There is only one window on the screen. - When 'hidden' is not set, [!] is not used, the buffer has @@ -298,14 +327,19 @@ CTRL-W CTRL-C *CTRL-W_CTRL-C* command. *:hide* -:hid[e] Quit current window, unless it is the last window on the - screen. The buffer becomes hidden (unless there is another - window editing it or 'bufhidden' is "unload" or "delete"). +:hid[e] +:{count}hid[e] + Quit the current window, unless it is the last window on the + screen. For {count} see |:quit| command. + + The buffer becomes hidden (unless there is another window + editing it or 'bufhidden' is "unload", "delete" or "wipe"). If the window is the last one in the current tab page the tab - page is closed. |tab-page| - The value of 'hidden' is irrelevant for this command. - Changes to the buffer are not written and won't get lost, so - this is a "safe" command. + page is closed. |tab-page| + + The value of 'hidden' is irrelevant for this command. Changes + to the buffer are not written and won't get lost, so this is a + "safe" command. :hid[e] {cmd} Execute {cmd} with 'hidden' is set. The previous value of 'hidden' is restored after {cmd} has been executed. @@ -314,12 +348,16 @@ CTRL-W CTRL-C *CTRL-W_CTRL-C* < This will edit "Makefile", and hide the current buffer if it has any changes. +:on[ly][!] +:{count}on[ly][!] CTRL-W o *CTRL-W_o* *E445* CTRL-W CTRL-O *CTRL-W_CTRL-O* *:on* *:only* -:on[ly][!] Make the current window the only one on the screen. All other - windows are closed. + Make the current window the only one on the screen. All other + windows are closed. For {count} see |:quit| command. + When the 'hidden' option is set, all buffers in closed windows become hidden. + When 'hidden' is not set, and the 'autowrite' option is set, modified buffers are written. Otherwise, windows that have buffers that are modified are not removed, unless the [!] is @@ -660,8 +698,9 @@ can also get to them with the buffer list commands, like ":bnext". 8. Do a command in all buffers or windows *list-repeat* *:windo* -:windo {cmd} Execute {cmd} in each window. - It works like doing this: > +:[range]windo {cmd} Execute {cmd} in each window or if [range] is given + only in windows for which the window number lies in + the [range]. It works like doing this: > CTRL-W t :{cmd} CTRL-W w @@ -680,8 +719,10 @@ can also get to them with the buffer list commands, like ":bnext". |:cfdo| and |:lfdo| *:bufdo* -:bufdo[!] {cmd} Execute {cmd} in each buffer in the buffer list. - It works like doing this: > +:[range]bufdo[!] {cmd} Execute {cmd} in each buffer in the buffer list or if + [range] is given only for buffers for which their + buffer numer is in the [range]. It works like doing + this: > :bfirst :{cmd} :bnext @@ -728,18 +769,21 @@ the buffer. The result is that all buffers will use the 'encoding' encoding CTRL-W ] *CTRL-W_]* *CTRL-W_CTRL-]* CTRL-W CTRL-] Split current window in two. Use identifier under cursor as a - tag and jump to it in the new upper window. Make new window N - high. + tag and jump to it in the new upper window. + In Visual mode uses the Visually selected text as a tag. + Make new window N high. *CTRL-W_g]* CTRL-W g ] Split current window in two. Use identifier under cursor as a tag and perform ":tselect" on it in the new upper window. + In Visual mode uses the Visually selected text as a tag. Make new window N high. *CTRL-W_g_CTRL-]* CTRL-W g CTRL-] Split current window in two. Use identifier under cursor as a - tag and perform ":tjump" on it in the new upper window. Make - new window N high. + tag and perform ":tjump" on it in the new upper window. + In Visual mode uses the Visually selected text as a tag. + Make new window N high. CTRL-W f *CTRL-W_f* *CTRL-W_CTRL-F* CTRL-W CTRL-F Split current window in two. Edit file name under cursor. @@ -944,9 +988,10 @@ A buffer can also be unlisted. This means it exists, but it is not in the list of buffers. |unlisted-buffer| -:files[!] *:files* -:buffers[!] *:buffers* *:ls* -:ls[!] Show all buffers. Example: +:files[!] [flags] *:files* +:buffers[!] [flags] *:buffers* *:ls* +:ls[!] [flags] + Show all buffers. Example: 1 #h "/test/text" line 1 ~ 2u "asdf" line 0 ~ @@ -956,8 +1001,8 @@ list of buffers. |unlisted-buffer| (the term "unlisted" is a bit confusing then...). Each buffer has a unique number. That number will not change, - so you can always go to a specific buffer with ":buffer N" or - "N CTRL-^", where N is the buffer number. + thus you can always go to a specific buffer with ":buffer N" + or "N CTRL-^", where N is the buffer number. Indicators (chars in the same column are mutually exclusive): u an unlisted buffer (only displayed when [!] is used) @@ -972,6 +1017,21 @@ list of buffers. |unlisted-buffer| + a modified buffer x a buffer with read errors + [flags] can be a combination of the following characters, + which restrict the buffers to be listed: + + modified buffers + - buffers with 'modifiable' off + = readonly buffers + a active buffers + u unlisted buffers (overrides the "!") + h hidden buffers + x buffers with a read error + % current buffer + # alternate buffer + Combining flags means they are "and"ed together, e.g.: + h+ hidden buffers which are modified + a+ active buffers which are modified + *:bad* *:badd* :bad[d] [+lnum] {fname} Add file name {fname} to the buffer list, without loading it. @@ -991,7 +1051,11 @@ list of buffers. |unlisted-buffer| Actually, the buffer isn't completely deleted, it is removed from the buffer list |unlisted-buffer| and option values, variables and mappings/abbreviations for the buffer are - cleared. + cleared. Examples: > + :.,$-bdelete " delete buffers from the current one to + " last but one + :%bdelete " delete all buffers +< :bdelete[!] {bufname} *E93* *E94* Like ":bdelete[!] [N]", but buffer given by name. Note that a @@ -1015,7 +1079,11 @@ list of buffers. |unlisted-buffer| Like |:bdelete|, but really delete the buffer. Everything related to the buffer is lost. All marks in this buffer become invalid, option settings are lost, etc. Don't use this - unless you know what you are doing. + unless you know what you are doing. Examples: > + :.+,$bwipeout " wipe out all buffers after the current + " one + :%bwipeout " wipe out all buffers +< :[N]bun[load][!] *:bun* *:bunload* *E515* :bun[load][!] [N] From 6abb671ee16684a6d1ff6181ebee76ed43fb85cb Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Sat, 30 Jan 2016 12:02:29 +0900 Subject: [PATCH 02/11] complete vi_diff.jax MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * キャッチアップ完了 * ファイル全体の見直し完了 * 一部翻訳表現の修正 * スペーシングの修正 --- catchup-7.4.1194.md | 3 ++- doc/vi_diff.jax | 18 ++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/catchup-7.4.1194.md b/catchup-7.4.1194.md index cee943daa..52201cdf5 100644 --- a/catchup-7.4.1194.md +++ b/catchup-7.4.1194.md @@ -57,7 +57,6 @@ doc/usr_41.jax doc/usr_43.jax doc/various.jax - doc/vi_diff.jax doc/windows.jax ### 英文だけは反映済み @@ -66,6 +65,8 @@ ### 完訳! + doc/vi_diff.jax + まだない ### その他/深い事情があって断念したもの diff --git a/doc/vi_diff.jax b/doc/vi_diff.jax index ceb39d869..c2696985b 100644 --- a/doc/vi_diff.jax +++ b/doc/vi_diff.jax @@ -1,4 +1,4 @@ -*vi_diff.txt* For Vim バージョン 7.4. Last change: 2013 Aug 22 +*vi_diff.txt* For Vim バージョン 7.4. Last change: 2015 Nov 01 VIMリファレンスマニュアル by Bram Moolenaar @@ -79,12 +79,11 @@ Vim で編集できるファイルの制限はかなり少ないです。 {Vi: < ります。またスワップファイル|swap-file|の為のディス クの空き容量にも制限されます。 *E75* -ファイルのパスの長さ Unix と Win32: 1024 文字か 256 文字(もしくはシステム - がサポートしている長さ分だけ) -ファイル名の長さ Unix と Win32: 1024 文字か 256 文字 +ファイルのパスの長さ Unix と Win32: 1024 文字、それ以外は 256 文字 + (もしくはシステムがサポートしている長さ分だけ) 展開されたオプションの文字列の長さ - Unix と Win32: 1024 文字か 256 文字 -表示される最大の長さ Unix と Win32: 1024 文字か 256 文字 + Unix と Win32: 1024 文字、それ以外は 256 文字 +表示される最大の長さ Unix と Win32: 1024 文字、それ以外は 255 文字 マッピングでの lhs の最大の長さ 50 文字 異なるハイライトの種類の数: 30000以上 @@ -153,7 +152,6 @@ Vi との互換性 |'compatible'| 'undolevels' オプションでセットしてください(初期値 1000)。'undolevels' を0にセットすると Vi 互換のアンドゥになります。-1 にセットするとアン ドゥできないようになります。 - あるバッファに対する変更をすべてアンドゥした場合は、バッファは何も変更 されていないと見なされます。つまり なしで :q で終了させることがで きます。 @@ -275,7 +273,6 @@ Vi との互換性 |'compatible'| するのに使うことができ、Shift キーを押しながら右/左矢印キーを押すと前/ 後に一つの単語移動することができます。CTRL-B/CTRL-E はコマンドラインの 初め/終わりに移動するのに使うことができます。 - |cmdline-history| コマンドラインは記録されます。上/下矢印キーを使うことで前のコマンドラ インを呼び出すことができます。'history' オプションで覚えておく行数を設 @@ -315,8 +312,8 @@ Vi との互換性 |'compatible'| |i_CTRL-X_CTRL-L| すべての行 |i_CTRL-X_CTRL-]| タグファイルにある単語 |i_CTRL-X_CTRL-D| マクロ定義 - |i_CTRL-X_CTRL-O| オムニ補完: ファイルタイプに特化した賢い補完 - など。 + |i_CTRL-X_CTRL-O| オムニ補完: ファイルタイプなどに特化した + 賢い補完 長い行のサポート |'wrap'| |'linebreak'| 'wrap' オプションがオフであれば、長い行は折り返されずに行の一部分だけが @@ -349,6 +346,7 @@ Vi との互換性 |'compatible'| ります。 これはftp, http, sshなど越しのリモートファイルにも機能します。 zipとtarのアーカイブもブラウズすることができます。|tar| |zip| + 編集-コンパイル-編集 をスピードアップする |quickfix| |:make| コマンドを使うことでコンパイルしてから初めのエラーにジャンプす ることができます。コンパイラのエラーメッセージが書かれたファイルを解析 From 9da00cd6288021d28629dc295afc086ed1a36fbe Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Sat, 30 Jan 2016 12:32:28 +0900 Subject: [PATCH 03/11] complete files which have small lines to change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 10行未満の変更で済むファイルを、完訳しました --- catchup-7.4.1194.md | 10 +++++----- doc/cmdline.jax | 7 ++++++- doc/filetype.jax | 5 ++++- doc/quickfix.jax | 2 +- doc/usr_29.jax | 3 ++- doc/usr_43.jax | 8 +++++++- 6 files changed, 25 insertions(+), 10 deletions(-) diff --git a/catchup-7.4.1194.md b/catchup-7.4.1194.md index 52201cdf5..059048de7 100644 --- a/catchup-7.4.1194.md +++ b/catchup-7.4.1194.md @@ -21,11 +21,9 @@ doc/autocmd.jax doc/change.jax - doc/cmdline.jax doc/develop.jax doc/editing.jax doc/eval.jax - doc/filetype.jax doc/fold.jax doc/hangulin.jax doc/help.jax @@ -44,7 +42,6 @@ doc/os_os2.jax doc/pattern.jax doc/pi_netrw.jax - doc/quickfix.jax doc/quickref.jax doc/repeat.jax doc/spell.jax @@ -53,9 +50,7 @@ doc/term.jax doc/usr_02.jax doc/usr_03.jax - doc/usr_29.jax doc/usr_41.jax - doc/usr_43.jax doc/various.jax doc/windows.jax @@ -65,6 +60,11 @@ ### 完訳! + doc/cmdline.jax + doc/filetype.jax + doc/quickfix.jax + doc/usr_29.jax + doc/usr_43.jax doc/vi_diff.jax まだない diff --git a/doc/cmdline.jax b/doc/cmdline.jax index 16b7709f8..c3b76458d 100644 --- a/doc/cmdline.jax +++ b/doc/cmdline.jax @@ -1,4 +1,4 @@ -*cmdline.txt* For Vim バージョン 7.4. Last change: 2015 Sep 25 +*cmdline.txt* For Vim バージョン 7.4. Last change: 2015 Dec 17 VIMリファレンスマニュアル by Bram Moolenaar @@ -95,6 +95,11 @@ CTRL-E または *c_CTRL-E* *c_* *c_End* *c_* カーソルをマウスでクリックした所へ移動する + *c_* + クリップボード(X11 ではプライマリ選択)の内容を貼り付ける。これ + は CTRL-R * を使った動作に似ているが、行間に CR は挿入されな + い。 + CTRL-H *c_* *c_CTRL-H* *c_BS* カーソル前の文字を削除する ( キーが思い通り働かないときは |:fixdel| を参照)。 diff --git a/doc/filetype.jax b/doc/filetype.jax index d23e24fe6..7a8fc8f30 100644 --- a/doc/filetype.jax +++ b/doc/filetype.jax @@ -1,4 +1,4 @@ -*filetype.txt* For Vim バージョン 7.4. Last change: 2015 Nov 28 +*filetype.txt* For Vim バージョン 7.4. Last change: 2015 Dec 06 VIMリファレンスマニュアル by Bram Moolenaar @@ -574,6 +574,9 @@ q ":quit" と同じ 折畳を有効にするにはこの変数を使う: > let g:ft_man_folding_enable = 1 +もしデフォルトの折畳が好みではないのなら、代わりに autocommand を使って望んだ +折畳スタイルを追加できる。例: > + autocmd FileType man setlocal foldmethod=indent foldenable PDF *ft-pdf-plugin* diff --git a/doc/quickfix.jax b/doc/quickfix.jax index ff8f80495..49c907d30 100644 --- a/doc/quickfix.jax +++ b/doc/quickfix.jax @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim バージョン 7.4. Last change: 2015 Sep 08 +*quickfix.txt* For Vim バージョン 7.4. Last change: 2016 Jan 21 VIMリファレンスマニュアル by Bram Moolenaar diff --git a/doc/usr_29.jax b/doc/usr_29.jax index 9c62dd92f..687c94eb5 100644 --- a/doc/usr_29.jax +++ b/doc/usr_29.jax @@ -258,7 +258,8 @@ CTRL-] を使うとカーソルの下にある識別子の定義にジャンプ 関連項目 -------- -タグ名の大文字と小文字を無視したい場合は 'ignorecase' をオンに設定してくださ +タグ名の大文字と小文字を無視する場合には、'tagcase' を "ignore" に設定する +か、'tagcase' を "followic" のまま変更せず 'ignorecase' をオンに設定してくださ い。 'tagbsearch' オプションにはタグファイルがソートされているかどうかを設定しま diff --git a/doc/usr_43.jax b/doc/usr_43.jax index 623c896a0..02714622e 100644 --- a/doc/usr_43.jax +++ b/doc/usr_43.jax @@ -1,4 +1,4 @@ -*usr_43.txt* For Vim バージョン 7.4. Last change: 2008 Dec 28 +*usr_43.txt* For Vim バージョン 7.4. Last change: 2015 Oct 23 VIM USER MANUAL - by Bram Moolenaar @@ -45,6 +45,7 @@ C プログラムやシェルスクリプトなどの特定の種類のファイ setlocal softtabstop=4 noremap c o/**************/ + let b:undo_ftplugin = "setl softtabstop< | unmap c" そして、C ファイルを開いてみてください。'softtabstop' オプションが 4 に設定さ れていますね。しかし、他のファイルを開くと初期設定の 0 にリセットされます。そ @@ -58,6 +59,11 @@ C プログラムやシェルスクリプトなどの特定の種類のファイ ":map!" や ":vmap" などの他のマップコマンドでも同様です。マップの中の || は "maplocalleader" 変数の値で置き換えられます。 +b:undo_ftplugin を設定する行はファイルタイプを別の値に設定されていたときのため +に用います。このケースではあなたが望む方法でundoしたいでしょう。 +b:undo_ftplugin 変数はコマンドとして実行されます。そのため中の文字は、バック +スラッシュのように特別な意味を持つものがあるので、気をつけてください。 + ファイルタイププラグインの例はこのディレクトリで探すことができます: > $VIMRUNTIME/ftplugin/ From 3529585b668609eb828e0c8281f8a3f0ae3598de Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Sat, 30 Jan 2016 13:09:54 +0900 Subject: [PATCH 04/11] impose english text into japanese MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit お試しで英語のまま日本語文章に当てはめ中。 100行を超えないものだけを対象とする予定。 作業過程で、一部翻訳してしまったところもある。 --- catchup-7.4.1194.md | 11 +++---- doc/autocmd.jax | 21 +++++++++++-- doc/change.jax | 75 +++++++++++++++++++++++++++++++++++++-------- doc/develop.jax | 54 ++++++++++++++++++++++++++------ doc/editing.jax | 23 +++++++++++--- 5 files changed, 148 insertions(+), 36 deletions(-) diff --git a/catchup-7.4.1194.md b/catchup-7.4.1194.md index 059048de7..ee028c39c 100644 --- a/catchup-7.4.1194.md +++ b/catchup-7.4.1194.md @@ -19,10 +19,6 @@ 追いついたファイルは、下記の一覧から削除し、適切なセクションへ移動 - doc/autocmd.jax - doc/change.jax - doc/develop.jax - doc/editing.jax doc/eval.jax doc/fold.jax doc/hangulin.jax @@ -56,7 +52,10 @@ ### 英文だけは反映済み -まだない + doc/autocmd.jax + doc/change.jax + doc/develop.jax + doc/editing.jax ### 完訳! @@ -67,8 +66,6 @@ doc/usr_43.jax doc/vi_diff.jax -まだない - ### その他/深い事情があって断念したもの まだない diff --git a/doc/autocmd.jax b/doc/autocmd.jax index c3efec3b6..f69507b65 100644 --- a/doc/autocmd.jax +++ b/doc/autocmd.jax @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim バージョン 7.4. Last change: 2014 Aug 22 +*autocmd.txt* For Vim バージョン 7.4. Last change: 2015 Dec 05 VIMリファレンスマニュアル by Bram Moolenaar @@ -514,6 +514,8 @@ ColorScheme カラースキームを読み込んだ後。 |:colorscheme| *CompleteDone* CompleteDone 挿入モード補完が完了したとき。補完が実行されて も中止されても発行される。 |ins-completion| + The |v:completed_item| variable contains + information about the completed item. *CursorHold* CursorHold 'updatetime' の時間の間、ユーザーがキーを押さ @@ -529,6 +531,11 @@ CursorHold 'updatetime' の時間の間、ユーザーがキーを押さ い。 レコーディングの最中にはCursorHoldイベントは発 生しない。|q| + ** + Internally the autocommand is triggered by the + key. In an expression mapping + |getchar()| may see this character. + Note: このイベントには対話的なコマンドは使えな いことに注意。「続けるには」プロンプトは現れず、 スクリーンは必要に応じて直接更新される。 @@ -942,6 +949,13 @@ WinLeave ウィンドウを離れる前。次に入るウィンドウで他の ============================================================================== 6. パターン *autocmd-patterns* *{pat}* +The {pat} argument can be a comma separated list. This works as if the +command was given with each pattern separately. Thus this command: > + :autocmd BufRead *.txt,*.info set et +Is equivalent to: > + :autocmd BufRead *.txt set et + :autocmd BufRead *.info set et + ファイルパターン {pat} がファイル名とマッチするかどうかは、2通りの方法で調べら れる。 1. パターンに '/' が含まれないとき: Vimはファイル名の後ろの部分からのみマッチ @@ -1045,7 +1059,7 @@ Note: パスの途中だけにマッチさせ、ルートディレクトリに 例: > :au CursorHold echo 'hold' :au CursorHold echo 'hold' - :au CursorHold echo 'hold' + :au BufNewFile * au CursorHold echo 'hold' 自動コマンドに対するコマンドは全てバッファローカルな自動コマンドに対しても機能 する。パターンの代わりに特別な文字列を使う。例: > @@ -1104,6 +1118,9 @@ Note: パスの途中だけにマッチさせ、ルートディレクトリに :aug[roup] {name} 後に続くコマンド ":autocmd" のためのグループ名 を定義する。{name} を "end" や "END" にすると 既定のグループが選ばれる。 + To avoid confusion, the name should be + different from existing {event} names, as this + most likely will not do what you intended. *:augroup-delete* *E367* :aug[roup]! {name} 自動コマンドのグループ {name} を削除する。その diff --git a/doc/change.jax b/doc/change.jax index 6adfdb56c..3414eb944 100644 --- a/doc/change.jax +++ b/doc/change.jax @@ -1,4 +1,4 @@ -*change.txt* For Vim バージョン 7.4. Last change: 2015 Sep 06 +*change.txt* For Vim バージョン 7.4. Last change: 2016 Jan 19 VIMリファレンスマニュアル by Bram Moolenaar @@ -404,8 +404,14 @@ CTRL-X カーソルの下または後の数字またはアルファベット される (そのため効果的に [count] ごとに減少する配列を 作ることができる)。 {Vi にはない} -コマンド CTRL-A と CTRL-X は(符号付)10進数と符号なし8進/16進数、アルファベッ -トに対し機能する。この動作はオプション 'nrformats' に依存する。 +The CTRL-A and CTRL-X commands can work for: +- signed and unsigned decimal numbers +- unsigned binary, octal and hexadecimal numbers +- alphabetic characters + +This depends on the 'nrformats' option: +- When 'nrformats' includes "bin", Vim assumes numbers starting with '0b' or + '0B' are binary. - 'nrformats' が "octal" を含むときは、Vimは '0' で始まり、'8' や '9' を含まな い数字を8進数として取り扱う。他の数は10進数とみなされ、マイナス符号が付いて もよい。カーソルが数の上にあれば、コマンドはその数に適用される。そうでなけれ @@ -418,9 +424,9 @@ CTRL-X カーソルの下または後の数字またはアルファベット を変更する。これはアルファベットのインデックスつきのリストを作るときに便利で ある。 -10進数では先頭の負の符号は増加/減少に対して考慮される。8進数と16進数では考慮さ -れない。 -符号を無視するには CTRL-A または CTRL-X を使う前に数字をビジュアル選択する。 +10進数では先頭の負の符号は増加/減少に対して考慮される。しかし2進数、8進数およ +び16進数では考慮されない。符号を無視するには CTRL-A または CTRL-X を使う前に数 +字をビジュアル選択する。 ゼロから始まる数 (全ての8進数、16進数を含む) に対して、Vimはできる限りその数の 文字数を保とうとする。"0077" 上で CTRL-A を使うと "0100" となり、"0x100" 上で @@ -432,6 +438,10 @@ CTRL-X を使うと "0x0ff" となる。 Note: 'nrformats' が "octal" を含んでいるとき、0で始まる10進数は、8進数と区別 しづらいため、意図しない結果になる可能性がある。 +Note similarly, when 'nrformats' includes "bin", binary numbers with a leading +'0x' or '0X' can be interpreted as hexadecimal rather than binary since '0b' +are valid hexadecimal digits. + コマンド CTRL-A はマクロ内でたいへん便利である。例: 番号付きリストを作るには、 次の方法を使う。 @@ -836,6 +846,36 @@ NOTE: 以前のバージョンでは CTRL-V が特別に扱われていた。こ :s/\([ab]\)\|\([cd]\)/\1x/g "a b c d" を "ax bx x x" に置換 < + *:sc* *:sce* *:scg* *:sci* *:scI* *:scl* *:scp* *:sg* *:sgc* + *:sge* *:sgi* *:sgI* *:sgl* *:sgn* *:sgp* *:sgr* *:sI* *:si* + *:sic* *:sIc* *:sie* *:sIe* *:sIg* *:sIl* *:sin* *:sIn* *:sIp* + *:sip* *:sIr* *:sir* *:sr* *:src* *:srg* *:sri* *:srI* *:srl* + *:srn* *:srp* +2-letter and 3-letter :substitute commands ~ + + List of :substitute commands + | c e g i I n p l r + | c :sc :sce :scg :sci :scI :scn :scp :scl --- + | e + | g :sgc :sge :sg :sgi :sgI :sgn :sgp :sgl :sgr + | i :sic :sie --- :si :siI :sin :sip --- :sir + | I :sIc :sIe :sIg :sIi :sI :sIn :sIp :sIl :sIr + | n + | p + | l + | r :src --- :srg :sri :srI :srn :srp :srl :sr + +Exceptions: + :scr is `:scriptnames` + :se is `:set` + :sig is `:sign` + :sil is `:silent` + :sn is `:snext` + :sp is `:split` + :sl is `:sleep` + :sre is `:srewind` + + 式で置換する *sub-replace-expression* *sub-replace-\=* *s/\=* @@ -939,7 +979,7 @@ NOTE: 以前のバージョンでは CTRL-V が特別に扱われていた。こ :reg[isters] {arg} {arg} に指定された名前付きレジスタおよび番号付きレジス タを表示する。例: > - :dis 1a + :reg 1a < レジスタ '1' と 'a' が表示される。{arg} の中では空白を 用いてよい。 {Vi にはない} @@ -1647,7 +1687,7 @@ Vimはソート関数とソートコマンドを備えている。ソート関 |uniq()| を参照。 *:sor* *:sort* -:[range]sor[t][!] [i][u][r][n][x][o] [/{pattern}/] +:[range]sor[t][!] [b][f][i][n][o][r][u][x] [/{pattern}/] [range]の行をソートする。範囲が指定されない場合は全行 をソートする。 @@ -1655,10 +1695,18 @@ Vimはソート関数とソートコマンドを備えている。ソート関 [i]をつけると大文字・小文字を区別しない。 + Options [n][f][x][o][b] are mutually exclusive. + [n]をつけると行の({pattern}のマッチの後ろまたは内側 の)最初の10進数の数字でソートする。 数字が '-' で始まる場合、マイナスとみなされる。 + With [f] sorting is done on the Float in the line. + The value of Float is determined similar to passing + the text (after or inside a {pattern} match) to + str2float() function. This option is available only + if Vim was compiled with Floating point support. + [x]をつけると行の({pattern}のマッチの後ろまたは内側 の)最初の16進数の数字でソートする。"0x" と "0X" は無視 される。 @@ -1667,10 +1715,13 @@ Vimはソート関数とソートコマンドを備えている。ソート関 [o]をつけると行の({pattern}のマッチの後ろまたは内側 の)最初の8進数の数字でソートする。 - [u]をつけると連続する同一行の最初の行だけを残す。 - ([i]がつくと大文字・小文字を無視する) - このフラグがつかない場合、連続する同一行はそのままの順 - 序で残される。 + With [b] sorting is done on the first binary number in + the line (after or inside a {pattern} match). + + [u]をつけると (u は unique=「一意の」という意味に基づ + く) 連続する同一行の最初の行だけを残す。([i]がつくと大 + 文字・小文字を無視する) このフラグがつかない場合、連続 + する同一行はそのままの順序で残される。 Note: 行頭に行末の空白があると異なる行とみなされる。 /pattern/が指定され、フラグ[r]がない場合は{pattern}に diff --git a/doc/develop.jax b/doc/develop.jax index 33416848c..50aace1dc 100644 --- a/doc/develop.jax +++ b/doc/develop.jax @@ -1,4 +1,4 @@ -*develop.txt* For Vim バージョン 7.4. Last change: 2014 Mar 27 +*develop.txt* For Vim バージョン 7.4. Last change: 2016 Jan 19 VIMリファレンスマニュアル by Bram Moolenaar @@ -168,13 +168,28 @@ Vimのソースコードに変更を加える際、守るべきルールがあ MAKING CHANGES *style-changes* コードに変更を加える基本的なステップは: -1. ドキュメントを調整する。最初にこれをやることで、あなたの行う変更がユーザー +1. Get the code from github. That makes it easier to keep your changed + version in sync with the main code base (it may be a while before your + changes will be included). You do need to spend some time learning git, + it's not the most user friendly tool. +2. ドキュメントを調整する。最初にこれをやることで、あなたの行う変更がユーザー に与える影響について、おおまかな印象をもつことができる。 -2. ソースコードに変更を加える。 -3. 変更がリストされた項目に影響を与えていないか、../doc/todo.txtをチェックす +3. ソースコードに変更を加える。 +4. 変更がリストされた項目に影響を与えていないか、../doc/todo.txtをチェックす る。 -4. 無修正のコードとドキュメントに対するパッチを、"diff -c" によって得る。 -5. 変更に関する注意書きを作り、パッチに含める。 +5. Make a patch with "git diff". You can also create a pull request on + github, but it's the diff that matters. +6. Make a note about what changed, preferably mentioning the problem and the + solution. Send an email to the vim-dev maillist with an explanation and + include the diff. Or create a pull request on github. + + +C COMPILER *style-compiler* + +The minimal C compiler version supported is C89, also known as ANSI C. +Later standards don't add much and C89 is the widest supported. + +One restriction that this implies: no // comments, only /* comments */. USE OF COMMON FUNCTIONS *style-functions* @@ -200,7 +215,7 @@ NAMES *style-names* 関数の名前に31文字より長い名前は使えない。(VMSのために) -"delete" という名前の変数を使わないこと。C++で問題となる。 +"delete" や "this" という名前の変数を使わないこと。C++で問題となる。 Vimができる限り多くのシステム上で走るという必要上、システムによってすでに定義 されている名前を使うことは避けねばならない。これは、問題となることが知られて @@ -290,6 +305,25 @@ OK: do a = 1; while (cond); +間違い: if (cond) { + cmd; + cmd; + } else { + cmd; + cmd; + } + +OK: if (cond) + { + cmd; + cmd; + } + else + { + cmd; + cmd; + } + 関数は次のようにして始める: @@ -303,9 +337,9 @@ OK: /* * 戻り値の説明。 */ int - function_name(arg1, arg2) - int arg1; /* short comment about arg1 */ - int arg2; /* short comment about arg2 */ + function_name( + int arg1, /* short comment about arg1 */ + int arg2) /* short comment about arg2 */ { int local; /* comment about local */ diff --git a/doc/editing.jax b/doc/editing.jax index 52d0f672d..3d079ab32 100644 --- a/doc/editing.jax +++ b/doc/editing.jax @@ -1,4 +1,4 @@ -*editing.txt* For Vim バージョン 7.4. Last change: 2015 Aug 25 +*editing.txt* For Vim バージョン 7.4. Last change: 2016 Jan 17 VIMリファレンスマニュアル by Bram Moolenaar @@ -78,6 +78,7 @@ g CTRL-G カーソルの現在の位置を、列、行、単語、文字、バ 例えば、タブ幅 'tabstop' が8のとき、行頭の の次 では「実際」の列番号は2、画面上の列番号は9となり、 "1-8" と表示される}。オプション 'ruler' も参照。 + オプション 'ruler' と |wordcount()| 関数も参照。 {Vi にはない} *v_g_CTRL-G* @@ -627,6 +628,7 @@ Vim の開始時に複数のファイル名を与えると、それらは引数 :0argadd x x a b c :1argadd x a x b c :$argadd x a b c x + 最後の1つの後に: :+2argadd y a b c x y 重複検査はないので、1個のファイルを引数リストに2回加え ることもできる。 @@ -1097,10 +1099,11 @@ MS-DOSとMS-Windowsでは、デバイスは名前から判断される: コマンド |:confirm| やオプション 'confirm' を参照。 {Vi にはない} -:q[uit]! 現在、可視なバッファに変更点があっても書き込みをせずに - 終了する。最後のウィンドウかつ隠れバッファに変更点があ - ると終了しない。この場合、最初の変更点がある隠れバッフ - ァはカレントバッファになる。 +:q[uit]! 現在のバッファに変更点があっても、書き込まずにVimを終 + 了する。そのウィンドウが最後の1つで、変更点のある隠し + バッファがある場合には、終了せずにカレントバッファを破 + 棄したあとで、最初の変更点がある隠しバッファを新たな現 + 在のバッファとする。 必ず終了するにはコマンド ":qall!" を使うこと。 :cq[uit] 書き込みをせずに必ず終了し、エラーコードを返す。コマン @@ -1436,6 +1439,16 @@ Note: メモリ内のテキストは暗号化されない。ユーザーがテ アンドゥファイルが保存されるとき、同じキーとメソッドがアンドゥファイル内のテキ ストに適用される。|persistent-undo|。 +To test for blowfish support you can use these conditions: > + has('crypt-blowfish') + has('crypt-blowfish2') +This works since Vim 7.4.1099 while blowfish support was added earlier. +Thus the condition failing doesn't mean blowfish is not supported. You can +test for blowfish with: > + v:version >= 703 +And for blowfish2 with: > + v:version > 704 || (v:version == 704 && has('patch401')) +< *E817* *E818* *E819* *E820* 暗号化が正しく機能しないと、保存したファイルが後で読めなくなってしまう。そのた め、暗号化が期待したとおりに機能しているかどうかを確認するための検査が実行され From 4d91254a782a90d672e746a45bc70e1f11cbd8b6 Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Sat, 30 Jan 2016 15:53:55 +0900 Subject: [PATCH 05/11] more impose english text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 変更が100行未満のファイルについては完了した 一部、旧訳と新原文を併記したままの箇所がある --- catchup-7.4.1194.md | 34 +++++++++++++------------- doc/fold.jax | 28 +++++++++++++++------ doc/hangulin.jax | 53 ++++++++++++++++++++++------------------ doc/help.jax | 13 ++++++---- doc/if_mzsch.jax | 27 +++++++++++++++++++-- doc/if_perl.jax | 11 +++++++-- doc/if_pyth.jax | 25 ++++++++++++------- doc/if_ruby.jax | 59 ++++++++++++++++++++++++++------------------- doc/if_tcl.jax | 20 +++++++++++---- doc/index.jax | 9 ++++--- doc/insert.jax | 36 +++++++++++++++++++++++---- doc/map.jax | 39 +++++++++++++++++++++--------- doc/mlang.jax | 13 ++++++---- doc/netbeans.jax | 11 ++++++--- doc/pattern.jax | 22 +++++++++++++---- doc/quickref.jax | 20 +++++++++++---- doc/repeat.jax | 39 ++++++++++++++++++++++++++++-- doc/spell.jax | 10 +++++++- doc/tagsrch.jax | 25 +++++++++++++++++++ doc/term.jax | 32 ++++++++++++++++++------ doc/usr_03.jax | 11 ++++++--- doc/usr_41.jax | 17 ++++++++++++- doc/various.jax | 12 ++++++++- 23 files changed, 416 insertions(+), 150 deletions(-) diff --git a/catchup-7.4.1194.md b/catchup-7.4.1194.md index ee028c39c..6f75d201c 100644 --- a/catchup-7.4.1194.md +++ b/catchup-7.4.1194.md @@ -20,47 +20,47 @@ 追いついたファイルは、下記の一覧から削除し、適切なセクションへ移動 doc/eval.jax + doc/if_lua.jax + doc/options.jax + doc/os_os2.jax + doc/pi_netrw.jax + doc/syntax.jax + doc/usr_02.jax + doc/windows.jax + +### 英文だけは反映済み + + doc/autocmd.jax + doc/change.jax + doc/develop.jax + doc/editing.jax doc/fold.jax doc/hangulin.jax - doc/help.jax - doc/if_lua.jax doc/if_mzsch.jax doc/if_perl.jax doc/if_pyth.jax doc/if_ruby.jax doc/if_tcl.jax - doc/index.jax doc/insert.jax doc/map.jax - doc/mlang.jax doc/netbeans.jax - doc/options.jax - doc/os_os2.jax doc/pattern.jax - doc/pi_netrw.jax doc/quickref.jax doc/repeat.jax doc/spell.jax - doc/syntax.jax doc/tagsrch.jax doc/term.jax - doc/usr_02.jax doc/usr_03.jax doc/usr_41.jax doc/various.jax - doc/windows.jax - -### 英文だけは反映済み - - doc/autocmd.jax - doc/change.jax - doc/develop.jax - doc/editing.jax ### 完訳! doc/cmdline.jax doc/filetype.jax + doc/help.jax + doc/index.jax + doc/mlang.jax doc/quickfix.jax doc/usr_29.jax doc/usr_43.jax diff --git a/doc/fold.jax b/doc/fold.jax index 25afd6e92..206a1c3dd 100644 --- a/doc/fold.jax +++ b/doc/fold.jax @@ -1,4 +1,4 @@ -*fold.txt* For Vim バージョン 7.4. Last change: 2013 Dec 04 +*fold.txt* For Vim バージョン 7.4. Last change: 2016 Jan 02 VIMリファレンスマニュアル by Bram Moolenaar @@ -94,8 +94,10 @@ Cではプリプロセッサ行を無視するために "#" を使用する。 -1 折畳レベルを未定義とし、対象行の直前か直後の行のうち低 い方を、対象行のレベルとする。 "=" 直前の行と同じレベルを使用する - "a1", "a2", .. 直前の行のレベルを+1, +2して設定する - "s1", "s2", .. 直前の行のレベルを-1, -2して設定する + "a1", "a2", .. 直前の行のレベルを+1, +2して、結果を現在の行に適用す + る。 + "s1", "s2", .. 直前の行のレベルを-1, -2して、結果を現在の行に適用す + る。 "<1", "<2", .. 指定したレベルの折畳を対象行で終了する ">1", ">2", .. 指定したレベルの折畳を対象行から開始する @@ -117,6 +119,18 @@ NOTE: 各行について式評価が実行されるので、この折畳方式 折畳レベルが定義された行が見つかるまで戻って、幾度も検索を行わなければならない からだ。これは動作が遅くなることがある。 +An example of using "a1" and "s1": For a multi-line C comment, a line +containing "/*" would return "a1" to start a fold, and a line containing "*/" +would return "s1" to end the fold after that line: > + if match(thisline, '/\*') >= 0 + return 'a1' + elseif match(thisline, '\*/') >= 0 + return 's1' + else + return '=' + endif +However, this won't work for single line comments, strings, etc. + フォールドレベルを調べるには|foldlevel()|を使うのが便利である。レベルがわから ないときは-1を返すことに注意すること。フォールドがその行で終わっているときには 行頭のレベルを返す。 @@ -555,11 +569,11 @@ zk カーソルより上方の折畳へ移動する。閉じられた折畳が1 オペレータを使用したときには、閉じた折畳は全体が含まれる。だから "dl" はカーソ ルの下の閉じた折畳の全体を削除してしまう。 -Exコマンドでは、開始位置と終了位置が折畳のそれに常に合わせられてしまう。 -だから次のコマンド: > +バッファの行に作用するExコマンドの作用範囲は、開始位置と終了位置ともに閉じられ +た折畳のそれらへ、それぞれ補正される。よって以下のコマンドを: > :s/foo/bar/g -カーソルを閉じた折畳に置いて実行すると、折畳内の全ての行にある "foo" が "bar" -へ置き換えられてしまう。 +閉じた折畳へカーソルを合わせて実行すると、折畳内の全ての行にある "foo" が +"bar"へ置き換えられてしまう。 これは|:folddoopen|と|:folddoclosed|に対してはあてはまらない。 (同一セッション中で)以前に編集したバッファに対しては、最後の折畳設定が再び使用 diff --git a/doc/hangulin.jax b/doc/hangulin.jax index 335a24bdc..7cb4ba9b4 100644 --- a/doc/hangulin.jax +++ b/doc/hangulin.jax @@ -1,10 +1,7 @@ -*hangulin.txt* For Vim バージョン 7.4. Last change: 2009 Jun 24 +*hangulin.txt* For Vim バージョン 7.4. Last change: 2015 Nov 24 - VIMリファレンスマニュアル by Chi-Deok Hwang and Sung-Hyun Nam - -NOTE: |+hangul_input| 機能は削除されることが予定されています。これの存続を望む -方は Vim ユーザーメーリングリストにメッセージを送ってください。 + VIMリファレンスマニュアル by Chi-Deok Hwang and Sung-Hyun Nam イントロダクション *hangul* @@ -18,7 +15,8 @@ NOTE: |+hangul_input| 機能は削除されることが予定されています 次のオプションは最低限の指定であり、他の configure オプションを追加することも できます。 > - ./configure -with-x --enable-multibyte --enable-fontset --enable-hangulinput + ./configure --with-x --enable-multibyte --enable-hangulinput \ + --disable-xim そして、|+hangul_input| 機能が configure によって有効になっているかどうか、 feature.h をチェックすべきです。そして、他のオプションも選択することができます。 @@ -28,18 +26,21 @@ feature.h をチェックすべきです。そして、他のオプションも #define HANGUL_DEFAULT_KEYBOARD 2 #define ESC_CHG_TO_ENG_MODE /* #define X_LOCALE */ - /* #define SLOW_XSERVER */ 環境変数 -------- -LANG 変数を、ko や ko_KR.euc のような韓国語ロケールに指定する必要があります。 +LANG 変数を、ko, ko_KR.euckR および ko_KR.UTF-8 のような韓国語ロケールに指定す +る必要があります。 LC_ALL 変数をセットしている場合は、それも韓国語ロケールである必要があります。 VIM リソース ------------ -次の行を vimrc ($HOME/.vimrc) に加えてください。 > +You may want to set 'encoding' and 'fileencodings'. +Next are examples: > - :set fileencoding=korea + :set encoding=euc-kr + :set encoding=utf-8 + :set fileencodings=ucs-bom,utf-8,cp949,euc-kr,latin1 キーボード ---------- @@ -55,9 +56,16 @@ VIM_KEYBOARD か HANGUL_KEYBOARD_TYPE 環境変数を使うことによって、 ハングル・フォント ------------------ -$HOME/.Xdefaults か、ユーザーの .gvimrc でテキストのフォントを設定することがで -きます。しかし、ハングルを使うには、vimrc で 'guifontset' を設定する必要があり -ます。 +If you use GTK version of GVIM, you should set 'guifont' and 'guifontwide'. +For example: > + set guifont=Courier\ 12 + set guifontwide=NanumGothicCoding\ 12 + +If you use Motif or Athena version of GVIM, you should set 'guifontset' in +your vimrc. You can set fontset in the .Xdefaults file. + +$HOME/.gvimrc: > + set guifontset=english_font,hangul_font $HOME/.Xdefaults: > Vim.font: english_font @@ -70,9 +78,6 @@ $HOME/.Xdefaults: > *international: True Vim*fontList: english_font;hangul_font: -$HOME/.gvimrc: > - set guifontset=english_font,hangul_font - 注意! , (コンマ) か ; (セミコロン)です。 そして ':set guifont' が設定されていてはいけません。もし設定されていると GVim @@ -80,8 +85,9 @@ $HOME/.gvimrc: > で動作することになり、英語の文字だけが見えることになり、ハングルは正しくは表示 されなくなります。 -'fontset' 機能が有効にされた後では、Vim では 'font' は使えなくなります。例えば、 -もし .gvimrc で次のようにしている場合は: > +After 'fontset' feature is enabled, VIM does not allow using english +font only in 'font' setting for syntax. +例えば、もし .gvimrc で次のようにしている場合は: > :set guifontset=eng_font,your_font 構文ハイライトの指定では次のようにする必要があります: > :hi Comment guifg=Cyan font=another_eng_font,another_your_font @@ -93,17 +99,18 @@ $HOME/.gvimrc: > サポートされていない機能 ------------------------ -Johab フォントはサポートされていませんし、予定もありません。どうしても johab -フォントが使いたい場合は、gau パッケージの hanguldraw.c を使うことができます。 +Johab フォントはサポートしていません。 +Hanja フォントはサポートしていません。 +それらをサポートする予定は一切ありません。 -Hanja 入力はまだサポートされていませんし、予定もありません。どうしても Hanja -を入力したい場合は、hanterm で Vim を使ってください。 +もしも本当にそれらの機能が必要ならば、それらをサポートした端末エミュレータ上で +コンソールバージョンのVimを使ってください。 バグ・コメント -------------- コメント、パッチ、提案などはこちらに: - Chi-Deok Hwang SungHyun Nam + Chi-Deok Hwang <...> vim:tw=78:ts=8:ft=help:norl: diff --git a/doc/help.jax b/doc/help.jax index 830883ca3..474902d90 100644 --- a/doc/help.jax +++ b/doc/help.jax @@ -1,4 +1,4 @@ -*help.txt* For Vim バージョン 7.4. Last change: 2015 Jun 21 +*help.txt* For Vim バージョン 7.4. Last change: 2016 Jan 10 VIM - メインヘルプファイル k @@ -11,13 +11,14 @@ マウスでジャンプ: ":set mouse=a" と入力してマウスを有効にしてください (xterm or GUI で利用可)。タグ (例: |bars|) をマウスの左ボ タンでダブルクリックすると、項目にジャンプできます。 - 元の場所に戻る: CTRL-T or CTRL-O を押す。 + 元の場所に戻る: CTRL-T or CTRL-O を押す。繰り返すと更に戻れます。 項目を指定する: |:help| コマンドに項目を指定することで、その項目を直ちに - 表示できます。調べたい項目の種類を指定することもできます。 - *help-context* + 表示できます。修飾子を先行入力することで、調べたい項目の種 + 類を指定することもできます: *help-context* + 種類 修飾子 例 ~ - ノーマルモードコマンド (無し) :help x + ノーマルモードコマンド :help x ビジュアルモードコマンド v_ :help v_u 挿入モードコマンド i_ :help i_ コマンドラインコマンド : :help :quit @@ -25,6 +26,8 @@ Vim の起動引数 - :help -r オプション ' :help 'textwidth' 正規表現 / :help /[ + その他の種類については |help-summary| を参照してください。 + ヘルプを検索する: ":help word" とタイプしてから CTRL-D を押すと "word" に マッチするヘルプ項目の一覧が表示されます。 もしくは ":helpgrep word" を使ってください。 |:helpgrep| diff --git a/doc/if_mzsch.jax b/doc/if_mzsch.jax index 9c4056559..c08b565c2 100644 --- a/doc/if_mzsch.jax +++ b/doc/if_mzsch.jax @@ -1,4 +1,4 @@ -*if_mzsch.txt* For Vim バージョン 7.4. Last change: 2012 Dec 17 +*if_mzsch.txt* For Vim バージョン 7.4. Last change: 2016 Jan 24 VIMリファレンスマニュアル by Sergey Khorev @@ -13,6 +13,7 @@ Vim の MzScheme インターフェイス *mzscheme* *MzScheme* 5. mzeval() Vim 関数 |mzscheme-mzeval| 6. 関数参照を使う |mzscheme-funcref| 7. 動的ローディング |mzscheme-dynamic| +8. MzSchemeのセットアップ |mzscheme-setup| {Vi にはこれらのコマンドはありません} @@ -268,7 +269,7 @@ Scheme から直接呼び出せます。例: > < ============================================================================== -7. 動的ローディング *mzscheme-dynamic* *E815* +7. 動的ローディング *mzscheme-dynamic* *E815* MS-Windows では MzScheme ライブラリを動的に読み込むことが可能です。これを行う と |:version| の出力に |+mzscheme/dyn| が含まれるようになります。 @@ -276,6 +277,9 @@ MS-Windows では MzScheme ライブラリを動的に読み込むことが可 この場合、Vim は必要なときだけ MzScheme の DLL ファイルを検索するようになりま す。MzScheme インターフェイスを使わないときは DLL を必要としないので、DLL な しで Vim を使うことができます。 +NOTE: Newer version of MzScheme (Racket) require earlier (trampolined) +initialisation via scheme_main_setup. So Vim always loads the MzScheme DLL at +startup if possible. MzScheme インターフェイスを使うには MzScheme の DLL が検索パス内に存在しなけ ればなりません。コンソールウィンドウで "path" とタイプすると、どのディレクト @@ -287,5 +291,24 @@ DLL の名前は Vim をコンパイルした時の MzScheme のバージョン を見て、コンパイル情報から -DDYNAMIC_MZSCH_DLL="なんらか" と -DDYNAMIC_MZGC_DLL="なんらか" を探してください。 +For example, if MzScheme (Racket) is installed at C:\Racket63, you may need +to set the environment variable as the following: > + + PATH=%PATH%;C:\Racket63\lib + PLTCOLLECTS=C:\Racket63\collects + PLTCONFIGDIR=C:\Racket63\etc +< +============================================================================== +8. MzScheme setup *mzscheme-setup* *E895* + +Vim requires "racket/base" module for if_mzsch core (fallback to "scheme/base" +if it doesn't exist), "r5rs" module for test and "raco ctool" command for +building Vim. If MzScheme did not have them, you can install them with +MzScheme's raco command: +> + raco pkg install scheme-lib # scheme/base module + raco pkg install r5rs-lib # r5rs module + raco pkg install cext-lib # raco ctool command + ====================================================================== vim:tw=78:ts=8:sts=4:ft=help:norl: diff --git a/doc/if_perl.jax b/doc/if_perl.jax index e782b7d4e..4b2e9fcd3 100644 --- a/doc/if_perl.jax +++ b/doc/if_perl.jax @@ -1,4 +1,4 @@ -*if_perl.txt* For Vim バージョン 7.4. Last change: 2013 Oct 05 +*if_perl.txt* For Vim バージョン 7.4. Last change: 2015 Oct 16 VIMリファレンスマニュアル by Sven Verdoolaege @@ -296,6 +296,13 @@ DLLの名前はVimをコンパイルした時のPerlのバージョンに一致 現在その名前は "perl512.dll" です。これはPerl5.12用です。これを確かめるには、 "gvim.exe" を開き、"perl\d*.dll\c" を検索してください。 -============================================================================== +Unix ~ + +The 'perldll' option can be used to specify the Perl shared library file +instead of DYNAMIC_PERL_DLL file what was specified at compile time. The +version of the shared library must match the Perl version Vim was compiled +with. + +============================================================================== vim:tw=78:ts=8:ft=help:norl: diff --git a/doc/if_pyth.jax b/doc/if_pyth.jax index c5c6b25eb..ff719a73c 100644 --- a/doc/if_pyth.jax +++ b/doc/if_pyth.jax @@ -1,4 +1,4 @@ -*if_pyth.txt* For Vim バージョン 7.4. Last change: 2014 Jul 23 +*if_pyth.txt* For Vim バージョン 7.4. Last change: 2015 Nov 10 VIMリファレンスマニュアル by Paul Moore @@ -667,21 +667,28 @@ vim.Function オブジェクト *python-Function* ============================================================================== 9. 動的ローディング *python-dynamic* -MS-WindowsではPythonライブラリを動的に読み込むことが可能です。これを行うと -|:version| の出力に |+python/dyn| が含まれるようになります。 +MS-Windows と UNIX では Python ライブラリを動的に読み込むことが可能です。これ +を行うと |:version| の出力に |+python/dyn| もしくは |+python3/dyn| が含まれる +ようになります。 -この場合、Vimは必要なときだけPythonのDLLファイルを検索します。Pythonインター -フェイスを使わないときはDLLを必要としないので、DLLなしでVimを使うことができま -す。 +この場合、Vimは必要なときだけPythonのDLLファイル、もしくは共有ライブラリファイ +ルを検索します。Pythonインターフェイスを使わないときはDLLを必要としないので、 +DLLなしでVimを使うことができます。 -Pythonインターフェイスを使うにはPythonのDLLが検索パス内に存在しなければなりま -せん。コンソールウィンドウで "path" とタイプすると、どのディレクトリが検索パス -となるか表示することができます。 +WindowsでPythonインターフェイスを使うには、PythonのDLLが検索パス内に存在しなけ +ればなりません。コンソールウィンドウで "path" とタイプすると、どのディレクトリ +が検索パスとなるか表示することができます。 DLLの名前はVimをコンパイルした時のPythonのバージョンに一致しなければなりませ ん。現在その名前は "python24.dll" です。これはPython2.4用です。これを確かめる には、"gvim.exe" を開き、"python\d*.dll\c" を検索してください。 +On Unix the 'pythondll' or 'pythonthreedll' option can be used to specify the +Python shared library file instead of DYNAMIC_PYTHON_DLL or +DYNAMIC_PYTHON3_DLL file what were specified at compile time. The version of +the shared library must match the Python 2.x or Python 3 version Vim was +compiled with. + ============================================================================== 10. Python 3 *python3* diff --git a/doc/if_ruby.jax b/doc/if_ruby.jax index abc5ecf9a..8f7397f31 100644 --- a/doc/if_ruby.jax +++ b/doc/if_ruby.jax @@ -1,4 +1,4 @@ -*if_ruby.txt* For Vim バージョン 7.4. Last change: 2015 Feb 22 +*if_ruby.txt* For Vim バージョン 7.4. Last change: 2015 Dec 03 VIM リファレンスマニュアル by Shugo Maeda @@ -7,9 +7,9 @@ Rubyインターフェイス *ruby* *Ruby* 1. コマンド |ruby-commands| -2. VIMモジュール |ruby-vim| -3. VIM::Buffer オブジェクト |ruby-buffer| -4. VIM::Window オブジェクト |ruby-window| +2. Vimモジュール |ruby-vim| +3. Vim::Buffer オブジェクト |ruby-buffer| +4. Vim::Window オブジェクト |ruby-window| 5. グローバル変数 |ruby-globals| 6. 動的ローディング |ruby-dynamic| @@ -48,7 +48,7 @@ Vimスクリプトの例: > ruby << EOF class Garnet def initialize(s) - @buffer = VIM::Buffer.current + @buffer = Vim::Buffer.current vimputs(s) end def vimputs(s) @@ -74,19 +74,19 @@ Vimスクリプトの例: > |sandbox|環境内ではRubyコマンドを実行できない。 ============================================================================== -2. VIMモジュール *ruby-vim* +2. Vimモジュール *ruby-vim* -Rubyのコードは全てのVimへのアクセスをVIMモジュール経由で行う。 +Rubyのコードは全てのVimへのアクセスをVimモジュール経由で行う。 概要 > print "Hello" # メッセージを表示する - VIM.command(cmd) # Exコマンドを実行する - num = VIM::Window.count # ウィンドウ数を取得する - w = VIM::Window[n] # ウィンドウ n を取得する - cw = VIM::Window.current # 現在のウィンドウを取得する - num = VIM::Buffer.count # バッファ数を取得する - b = VIM::Buffer[n] # バッファ n を取得する - cb = VIM::Buffer.current # 現在のバッファを取得する + Vim.command(cmd) # Exコマンドを実行する + num = Vim::Window.count # ウィンドウ数を取得する + w = Vim::Window[n] # ウィンドウ n を取得する + cw = Vim::Window.current # 現在のウィンドウを取得する + num = Vim::Buffer.count # バッファ数を取得する + b = Vim::Buffer[n] # バッファ n を取得する + cb = Vim::Buffer.current # 現在のバッファを取得する w.height = lines # ウィンドウの高さ(行数)を設定する w.cursor = [row, col] # ウィンドウのカーソル位置を設定する pos = w.cursor # カーソルの位置を配列で受け取る @@ -96,29 +96,29 @@ Rubyのコードは全てのVimへのアクセスをVIMモジュール経由で b[n] = str # バッファの行の内容を変更する b.delete(n) # 行を削除する b.append(n, str) # n行目の直後に行を追加する - line = VIM::Buffer.current.line # カレント行を取得する - num = VIM::Buffer.current.line_number # カレント行の行番号を取得する - VIM::Buffer.current.line = "test" # カレント行を設定する + line = Vim::Buffer.current.line # カレント行を取得する + num = Vim::Buffer.current.line_number # カレント行の行番号を取得する + Vim::Buffer.current.line = "test" # カレント行を設定する < モジュール関数: *ruby-message* -VIM::message({msg}) +Vim::message({msg}) メッセージ{msg}を表示する。 *ruby-set_option* -VIM::set_option({arg}) +Vim::set_option({arg}) Vimのオプションを設定する。{arg}は ":set" コマンドが受け付けるものであ れば何でも良い。引数の中では空白文字が使えないことに注意。|:set|を参 照。 *ruby-command* -VIM::command({cmd}) +Vim::command({cmd}) Exコマンド{cmd}を実行する。 *ruby-evaluate* -VIM::evaluate({expr}) +Vim::evaluate({expr}) Vim内部の実行エンジンを使ってスクリプト{expr}を実行評価する (|expression|参照)。実行結果は次のように返される: - Vimの実行結果が number の場合は Integer @@ -129,9 +129,9 @@ VIM::evaluate({expr}) 辞書とリストは再帰的に展開される。 ============================================================================== -3. VIM::Buffer オブジェクト *ruby-buffer* +3. Vim::Buffer オブジェクト *ruby-buffer* -オブジェクトVIM::BufferはVimのバッファを表す。 +オブジェクトVim::BufferはVimのバッファを表す。 クラスメソッド: @@ -156,9 +156,9 @@ line = {str} そのバッファがアクティブなら、カレント行を line_number そのバッファがアクティブなら、カレント行の行番号を返す。 ============================================================================== -4. VIM::Window オブジェクト *ruby-window* +4. Vim::Window オブジェクト *ruby-window* -VIM::Window オブジェクトはVimのウィンドウを表現している。 +Vim::Window オブジェクトはVimのウィンドウを表現している。 クラスメソッド: @@ -195,6 +195,8 @@ MS-WindowsとUnixではRubyライブラリを動的に読み込むことが可 る。Rubyインターフェイスを使わないのであればそれらは必要ではないので、ライブラ リファイルがシステムに無くてもVimを使うことができる。 +MS-Windows ~ + これが動作するためには Ruby の適切なバージョンがインストールされている必要があ る。次の場所からパッケージをダウンロードできる: http://www.garbagecollect.jp/ruby/mswin32/en/download/release.html @@ -213,5 +215,12 @@ _MSC_VER のチェックをコメントアウトする必要があるだろう また、インクルードディレクトリの名前をバージョンと同じ名前に変更する必要もある かもしれない。不思議なことに Ruby 1.9.3 のディレクトリは 1.9.1 となっている。 +Unix ~ + +The 'rubydll' option can be used to specify the Ruby shared library file +instead of DYNAMIC_RUBY_DLL file what was specified at compile time. The +version of the shared library must match the Ruby version Vim was compiled +with. + ============================================================================== vim:tw=78:ts=8:ft=help:norl: diff --git a/doc/if_tcl.jax b/doc/if_tcl.jax index ba0083804..948bb1789 100644 --- a/doc/if_tcl.jax +++ b/doc/if_tcl.jax @@ -1,4 +1,4 @@ -*if_tcl.txt* For Vim バージョン 7.4. Last change: 2012 Aug 02 +*if_tcl.txt* For Vim バージョン 7.4. Last change: 2016 Jan 01 VIMリファレンスマニュアル by Ingo Wilken @@ -511,11 +511,14 @@ Unixマシンでは "~/.vimrc.tcl" など)に入れておき、スタートア ============================================================================== 9. 動的ローディング *tcl-dynamic* -MS-WindowsではTclライブラリを動的に読み込むことが可能である。これを行うと -|:version|の出力に|+tcl/dyn|が含まれるようになる。 +MS-WindowsとUNIXではTclライブラリを動的に読み込むことが可能である。これを行う +と |:version| の出力に |+tcl/dyn| が含まれるようになる。 -この場合、Vimは必要なときだけTclのDLLファイルを検索する。Tclインターフェ -イスを使わないときはDLLを必要としないので、DLLなしでVimを使うことができる。 +この場合、Vimは必要なときだけTclのDLLファイルや共有ライブラリファイルを検索す +る。Tclインターフェイスを使わないときはこれらは不要なので、それらのファイルが +無くてもVimを使うことができる。 + +MS-Windows ~ Tclインターフェイスを使うにはTclのDLLが検索パス内に存在しなければならない。 コンソールウィンドウで "path" とタイプすると、どのディレクトリが検索パスとなる @@ -525,5 +528,12 @@ DLLの名前はVimをコンパイルした時のTclのバージョンに一致 現在その名前は "tcl83.dll" である。これはTcl8.3用である。これを確かめるには、 "gvim.exe" を開き、"tcl\d*.dll\c" を検索する。 + +Unix ~ + +The 'tcldll' option can be used to specify the Tcl shared library file instead +of DYNAMIC_TCL_DLL file what was specified at compile time. The version of +the shared library must match the Tcl version Vim was compiled with. + ============================================================================== vim:tw=78:ts=8:ft=help:norl: diff --git a/doc/index.jax b/doc/index.jax index 8061931d8..6a62bdc4b 100644 --- a/doc/index.jax +++ b/doc/index.jax @@ -1,4 +1,4 @@ -*index.txt* For Vim バージョン 7.4. Last change: 2015 Sep 08 +*index.txt* For Vim バージョン 7.4. Last change: 2016 Jan 19 VIMリファレンスマニュアル by Bram Moolenaar @@ -1071,7 +1071,7 @@ Note: 1 = カーソル移動コマンド 2 = アンドゥ/リドゥ可能 |c_| 挿入モード/置換モードを変更 |c_| カーソルをマウスクリック位置へ移動 -You found it, Arthur! *holy-grail* +ついに見つけたんだね、セイバー! *holy-grail* *:smile* ============================================================================== 5. EX コマンド *ex-cmd-index* *:index* @@ -1398,7 +1398,7 @@ You found it, Arthur! *holy-grail* |:marks| :marks すべてのマークを表示 |:match| :mat[ch] 指定したパターンの文字を強調表示する |:menu| :me[nu] 新しいメニュー項目を追加 -|:menutranslate| :menut[ranslate] 翻訳したメニュー項目を追加する +|:menutranslate| :menut[ranslate] 翻訳したメニュー項目を追加する |:messages| :mes[sages] 直前に表示されたメッセージの表示 |:mkexrc| :mk[exrc] 現在のマップと設定をファイルに書き出す |:mksession| :mks[ession] セッション情報をファイルに書き出す @@ -1555,6 +1555,7 @@ You found it, Arthur! *holy-grail* |:smap| :smap ":map" と同様。選択モード用 |:smapclear| :smapc[lear] 選択モードのすべてのマップを削除する |:smenu| :sme[nu] 選択モードのメニューを追加する +|:smile| :smi[le] ユーザーを幸せにする |:snext| :sn[ext] ウィンドウを分割して引数リストの次のファイルを 開く |:sniff| :sni[ff] sniffにリクエストを送信する @@ -1577,7 +1578,7 @@ You found it, Arthur! *holy-grail* |:stop| :st[op] Vimをサスペンドする |:stag| :sta[g] ウィンドウを分割して、タグへジャンプする |:startinsert| :star[tinsert] 挿入モードを開始する -|:startgreplace| :startg[replace] 仮想置換モードを開始する +|:startgreplace| :startg[replace] 仮想置換モードを開始する |:startreplace| :startr[eplace] 置換モードを開始する |:stopinsert| :stopi[nsert] 挿入モードを終了する |:stjump| :stj[ump] ウィンドウを分割して、":tjump" を実行 diff --git a/doc/insert.jax b/doc/insert.jax index b3824b3fb..f873b13c5 100644 --- a/doc/insert.jax +++ b/doc/insert.jax @@ -1,4 +1,4 @@ -*insert.txt* For Vim バージョン 7.4. Last change: 2014 Aug 04 +*insert.txt* For Vim バージョン 7.4. Last change: 2015 Sep 15 VIMリファレンスマニュアル by Bram Moolenaar @@ -79,9 +79,10 @@ CTRL-W カーソルの前にある単語を削除する(行同士の連結に |i_backspacing|参照)。単語の定義については "word motions" の節 |word-motions|を参照。 *i_CTRL-U* -CTRL-U 現在の行の入力済み文字全部を削除する(行同士の連結については - |i_backspacing|参照)。 - +CTRL-U 現在の行のカーソルの前に入力された文字を全部削除する。新しく入 + 力した文字が無く 'backspace' が空ではない時は、カーソル前の全 + ての文字を削除する。 + 行同士の連結については |i_backspacing| を参照。 *i_CTRL-I* *i_* *i_Tab* or CTRL-I タブを挿入する。'expandtab' オプションが設定されていれば、同じ 数の空白文字が挿入される(展開を避けるためにはCTRL-V を使 @@ -360,7 +361,10 @@ CTRL-G CTRL-J 1行下の、挿入開始位置と同じ列へ移動 *i_CTRL- CTRL-O 1つコマンドを実行して、挿入モードに戻る *i_CTRL-O* CTRL-\ CTRL-O CTRL-O と同様だがカーソルを移動させない *i_CTRL-\_CTRL-O* CTRL-L 'insertmode' がオンのとき: ノーマルモードへ *i_CTRL-L* -CTRL-G u undo で元に戻す地点を新たに設定 *i_CTRL-G_u* +CTRL-G u undo で元に戻す地点を新たに設定 *i_CTRL-G_u* +CTRL-G U don't break undo with next left/right cursor *i_CTRL-G_U* + movement (but only if the cursor stays + within same the line) ----------------------------------------------------------------------- Note: カーソルキーを押した時に挿入モードから抜けてしまったら、'noesckeys' オプ @@ -398,6 +402,28 @@ CTRL-G u を使う例: > これは改行ごとに undo を分割する。また、それを行う前に短縮入力の展開も行う。 +An example for using CTRL-G U: > + + inoremap U + inoremap U + inoremap col('.') == match(getline('.'), '\S') + 1 ? + \ repeat('U', col('.') - 1) : + \ (col('.') < match(getline('.'), '\S') ? + \ repeat('U', match(getline('.'), '\S') + 0) : + \ repeat('U', col('.') - 1 - match(getline('.'), '\S'))) + inoremap repeat('U', col('$') - col('.')) + inoremap ( ()U + +This makes it possible to use the cursor keys in Insert mode, without breaking +the undo sequence and therefore using |.| (redo) will work as expected. +Also entering a text like (with the "(" mapping from above): > + + Lorem ipsum (dolor + +will be repeatable by the |.|to the expected + + Lorem ipsum (dolor) + CTRL-O は undo 位置を分割する。つまり、その前後に入力したテキストが別々にundo されるようになる。これを避けたい場合(マッピングの中などで)は CTRL-R = |i_CTRL-R| が使えるだろう。例: 関数を呼ぶ: > diff --git a/doc/map.jax b/doc/map.jax index 1220138ea..f680ce474 100644 --- a/doc/map.jax +++ b/doc/map.jax @@ -1,4 +1,4 @@ -*map.txt* For Vim バージョン 7.4. Last change: 2014 Jun 02 +*map.txt* For Vim バージョン 7.4. Last change: 2016 Jan 10 VIMリファレンスマニュアル by Bram Moolenaar @@ -485,7 +485,7 @@ Note: ビジュアルモードのマップでは "'<" マークが使えます 1.6 特殊文字 *:map-special-chars* - *map_backslash* + *map_backslash* *map-backslash* Note: このドキュメントでは、マップや短縮入力を定義するときに、CTRL-V だけが特 殊な文字として触れられていますが、'cpoptions' が 'B' を含んでいない場合は、 バックスラッシュも CTRL-V と同様の特殊な働きをします。|<>| 表記も問題なく使用 @@ -496,7 +496,7 @@ Note: このドキュメントでは、マップや短縮入力を定義する 合は、特別文字 "" を使います。マップを入れ子にした場合などにバックス ラッシュを二重にする必要がなくなります。 - *map_CTRL-C* + *map_CTRL-C* *map-CTRL-C* CTRL-C を {lhs} で使うことはできますが、それは Vim がキー入力を待機中のときだ け機能します。Vim がビジー状態 (何かを実行中) のときは機能しません。Vim がビ ジー状態の場合、CTRL-C は実行中のコマンドを中断します。 @@ -504,14 +504,14 @@ MS-Windows の GUI 環境では、CTRL-C にマップすることができるの ドにコピーする機能を割り当てることができます。Vim の動作を中断するには CTRL-Break を使います。 - *map_space_in_lhs* + *map_space_in_lhs* *map-space_in_lhs* {lhs} に空白文字を含めるには CTRL-V を前置してください (空白文字の前で CTRL-V を二度押しで入力)。 - *map_space_in_rhs* + *map_space_in_rhs* *map-space_in_rhs* {rhs} を空白文字で開始するには "" を使ってください。Vi との互換性を完全 に保ちたい場合は |<>| 表記を使わずに、{rhs} の直前に CTRL-V (CTRL-V を二度押し で入力)を前置してください。 - *map_empty_rhs* + *map_empty_rhs* *map-empty-rhs* CTRL-V を1つだけ入力した後に (CTRL-Vを2度押しで入力) 何も入力しないことで空の {rhs} を作ることもできます。残念ながらvimrcファイル内ではこの方法は使用できま せん。 @@ -583,7 +583,7 @@ Note: 変数 "mapleader" はマップを定義するときに使用されます マップコマンドでは '"' (ダブルクォート) も {lhs} や {rhs} の一部と見なされるた め、マップコマンドの後ろにコメントを置くことはできません。 - *map_bar* + *map_bar* *map-bar* '|' 文字は、マップコマンドと次のコマンドを分けるために使われるので、'|' 文字を {rhs} に含めるには特殊な方法が必要です。 次の3つの方法があります: @@ -601,7 +601,7 @@ Note: 変数 "mapleader" はマップを定義するときに使用されます 後に、別のコマンドが続いているとみなされます。これは Vi 互換ですが、他のコマン ドの場合を考えるとあまり論理的ではありません。 - *map_return* + *map_return* *map-return* マップに Ex コマンドを含める場合、そのコマンドラインを実行するために改行文字を 挿入する必要があります。これには を使うことが推奨されています(参照|<>|)。 例: > @@ -906,9 +906,11 @@ non-id マッチした場所の前がタブ、行頭、挿入を開始した < "test;;" は展開されません "test ;;" は "test " に展開されます -挿入モードで短縮入力の展開を避けるには、短縮入力の一部を入力してから挿入モード -を で抜け、再度挿入モードに "a" で入って残りを入力します。もしくは、 -CTRL-V を押してから短縮入力の後の文字を入力します。 +挿入モードで短縮入力の展開を避けるには、短縮入力を発動する可能性のある文字を入 +力する前に CTRL-V を押します。 例:CTRL-V もしくは短縮入力の一部を入力 +してから挿入モードを で抜け、再度挿入モードに "a" で入って残りを入力しま +す。 + コマンドラインモードで短縮入力の展開を避けるには、短縮入力の文字の途中でCTRL-V を入力します (CTRL-V を2度押し)。展開されなかった場合、普通の文字の前のCTRL-V は普通は無視されます。 @@ -1266,6 +1268,8 @@ script2.vimを実行すると "None" が表示されます。期待した結果 -complete=custom,{func} {func}によるユーザー定義の補完 -complete=customlist,{func} {func}によるユーザー定義の補完 +Note: That some completion methods might expand environment variables. + ユーザー定義の補完 *:command-completion-custom* *:command-completion-customlist* @@ -1332,6 +1336,19 @@ script2.vimを実行すると "None" が表示されます。期待した結果 Note: -range=Nと-count=Nは相互に排他的であるということに注意してください。どち らか一方のみを指定することができます。 + *E889* *:command-addr* +It is possible that the special characters in the range like ., $ or % which +by default correspond to the current line, last line and the whole buffer, +relate to arguments, (loaded) buffers, windows or tab pages. + +Possible values are: + -addr=lines Range of lines (this is the default) + -addr=arguments Range for arguments + -addr=buffers Range for buffers (also not loaded buffers) + -addr=loaded_buffers Range for loaded buffers + -addr=windows Range for windows + -addr=tabs Range for tab pages + 特殊なケース *:command-bang* *:command-bar* *:command-register* *:command-buffer* diff --git a/doc/mlang.jax b/doc/mlang.jax index 5bdae99ae..6a6c680ef 100644 --- a/doc/mlang.jax +++ b/doc/mlang.jax @@ -1,4 +1,4 @@ -*mlang.txt* For Vim バージョン 7.4. Last change: 2012 Jan 15 +*mlang.txt* For Vim バージョン 7.4. Last change: 2016 Jan 16 VIMリファレンスマニュアル by Bram Moolenaar @@ -93,16 +93,19 @@ Vimはシステム環境からロケール(地域情報)を判定する。ほと MS-WINDOWSでのメッセージ翻訳 *win32-gettext* インストーラを利用した場合には、既にメッセージの翻訳が動作している。動作しない -のであればlibintl.dllを別途入手する必要がある: > +のであればlibintl.dllを別途入手する必要がある: http://sourceforge.net/projects/gettext +Or: + https://mlocati.github.io/gettext-iconv-windows/ これにはxgettext, msgformatその他のツールも含まれている。 libintl.dllは(g)vim.exeと同じディレクトリか、環境変数PATHに示されたディレクト -リのどれかに置く必要がある。メッセージファイル(vim.mo)は -"$VIMRUNTIME/lang/xx/LC_MESSAGES" に置かなければならない。"xx" はその言語名の -省略形(ほとんどの場合2文字)に置き換えて考える。 +リのどれかに置く必要がある。libintl.dll が見つからない場合、Vim は +libintl-8.dll を読み込もうとする。メッセージファイル(vim.mo)は +"$VIMRUNTIME/lang/xx/LC_MESSAGES" に置かなければならない。"xx" はその言語名 +の省略形(ほとんどの場合2文字)に置き換えて考える。 独自の翻訳を書く場合には.poファイルを作成しそれを.moファイルに変換する必要があ る。そのためにはVimのソースを取得してファイル "src/po/README.txt" を読む必要が diff --git a/doc/netbeans.jax b/doc/netbeans.jax index e7dc0b446..d507ab40a 100644 --- a/doc/netbeans.jax +++ b/doc/netbeans.jax @@ -1,10 +1,10 @@ -*netbeans.txt* For Vim バージョン 7.4. Last change: 2012 Jan 26 +*netbeans.txt* For Vim バージョン 7.4. Last change: 2016 Jan 27 VIMリファレンスマニュアル by Gordon Prieur et al. - *socket-interface* *netbeans* *netbeans-support* + *netbeans* *netbeans-support* Vim NetBeans プロトコル: Vim と IDE を統合するためのソケットインターフェイス @@ -305,7 +305,12 @@ bufID バッファ ID。メッセージは特定のバッファ向けの場合 場合もあります。全体用のメッセージは bufID 0 を使います。 NOTE: このバッファ ID は IDE によって割り当てられるもので、 Vim のバッファ番号とは異なります。bufID は連続して増加する番 - 号で、1 から始まります。 + 号で、1 から始まります。 When the 'switchbuf' option is set to + "usetab" and the "bufID" buffer is not found in the current + tab page, the netbeans commands and functions that set this + buffer as the current buffer will jump to the first open + window that contains this buffer in other tab pages instead of + replacing the buffer in the current window. seqno IDE が Vim にコマンド・関数を発行するときつけられる連続する番 号です。応答は、その元メッセージと同じシーケンス番号を使わねば diff --git a/doc/pattern.jax b/doc/pattern.jax index 96b71fc8c..a01286a41 100644 --- a/doc/pattern.jax +++ b/doc/pattern.jax @@ -1,4 +1,4 @@ -*pattern.txt* For Vim バージョン 7.4. Last change: 2014 Sep 06 +*pattern.txt* For Vim バージョン 7.4. Last change: 2016 Jan 03 VIMリファレンスマニュアル by Bram Moolenaar @@ -58,6 +58,8 @@ *n* n 最後の "/" か "?" を [count] 回繰り返します。 + If the cursor doesn't move the search is repeated with + count + 1. |last-pattern| {Vi: カウントの前置を受け付けません} *N* @@ -390,8 +392,8 @@ NFA エンジンが選択され、未実装の機能が使用され、パター "\v" を使うと、それ以降の、'0'-'9'、'a'-'z'、'A'-'Z'、'_'、以外のすべての ASCII 文字は特別な意味を持ちます。 "very magic" -"\V" を使うと、それ以降はバックスラッシュだけが特別な意味を持ちます。 -"very nomagic" +"\V" を使うと、それ以降はバックスラッシュと終端文字 (/ や ?) だけが特別な意味 +を持ちます。 "very nomagic" 例: after: \v \m \M \V マッチするもの ~ @@ -399,6 +401,7 @@ after: \v \m \M \V マッチするもの ~ $ $ $ \$ 行末 . . \. \. 何か 1 文字 * * \* \* 直前のアトムの繰り返し + ~ ~ \~ \~ 直近の置換文字列 () \(\) \(\) \(\) グループ化してアトムにする | \| \| \| 選択の区切り \a \a \a \a 英字 @@ -477,6 +480,7 @@ after: \v \m \M \V マッチするもの ~ |/\%v| \%23v \%23v 23列目 (表示単位) |/zero-width| 文字クラス {Vi にはありません}: */character-classes* + magic nomagic matches ~ |/\i| \i \i 識別子文字 (オプション 'isident' を参照) |/\I| \I \I "\i" と同じですが、数字は除外します |/\k| \k \k キーワード文字 (オプション 'iskeyword' を参照) @@ -507,6 +511,7 @@ after: \v \m \M \V マッチするもの ~ マッチします。 (文字クラスここまで) + magic nomagic matches ~ |/\e| \e \e |/\t| \t \t |/\r| \r \r @@ -532,6 +537,7 @@ after: \v \m \M \V マッチするもの ~ |/\Z| \Z \Z Unicodeの合成文字かどうかを無視します。 ヘブライ語やアラビア語で母音を検索するときに便利です。 + magic nomagic matches ~ |/\m| \m \m 以降のパターン文字を 'magic' がオンの状態で処理します |/\M| \M \M 以降のパターン文字を 'magic' がオフの状態で処理します |/\v| \v \v 以降のパターン文字を "very magic" で処理します @@ -1046,7 +1052,10 @@ x 特別な意味のない文字は、その文字自身とマッチします *E769* ']' がない場合、Vim はエラーを表示せず、コレクションが使われているので はないと判断します。'[' を検索するときに便利です。しかし、Vim 内部での - 検索では E769 のエラーがでます。 + 検索では E769 のエラーがでます。 And be aware that in a + `:substitute` command the whole command becomes the pattern. E.g. + ":s/[/x/" searches for "[/x" and replaces it with nothing. It does + not search for "[" and replaces it with "x"! コレクション文字列の先頭が "^" の場合、 コレクションに含まれている文字 以外の文字がマッチします。"[^xyz]" は 'x'、'y'、'z' 以外の文字にマッチ @@ -1079,7 +1088,10 @@ x 特別な意味のない文字は、その文字自身とマッチします す。たとえば、"[-./[:alnum:]_~]\+" は、UNIX のファイル名として妥当な パターンです。このパターンは、'-'、'.'、'/'、英数字、'_'、'~'、のど の文字の組合せでも、1 文字以上の文字列にマッチします。 - これらのものは、8 ビット文字のみマッチします。 + These items only work for 8-bit characters, except [:lower:] and + [:upper:] also work for multi-byte characters when using the new + regexp engine. In the future these items may work for multi-byte + characters. */[[=* *[==]* - 等価クラス。これはその文字とほぼ同じ文字にマッチします。例えば、アク セントを無視するなど。これは Unicode、latin1、latin9 でのみ機能しま diff --git a/doc/quickref.jax b/doc/quickref.jax index 77ae9ccd2..524d38bde 100644 --- a/doc/quickref.jax +++ b/doc/quickref.jax @@ -1,4 +1,4 @@ -*quickref.txt* For Vim バージョン 7.4. Last change: 2014 Aug 06 +*quickref.txt* For Vim バージョン 7.4. Last change: 2015 Nov 10 VIMリファレンスマニュアル by Bram Moolenaar @@ -635,6 +635,7 @@ 'balloondelay' 'bdlay' バルーンウィンドウが出るまでの遅延時間(ms) 'ballooneval' 'beval' バルーン評価のON/OFF 'balloonexpr' 'bexpr' バルーンウィンドウに表示する式 +'belloff' 'bo' do not ring the bell for these reasons 'binary' 'bin' バイナリモードで、読み/書き/編集する 'bioskey' 'biosk' MS-DOS専用: 文字入力にbiosコールを使う 'bomb' ファイルの先頭にBOMを付加する @@ -713,6 +714,7 @@ 'fileignorecase' 'fic' ファイル名の大文字と小文字を区別するかどうか 'filetype' 'ft' オートコマンドで使うファイルタイプ名 'fillchars' 'fcs' 特殊な表示に使う文字 +'fixendofline' 'fixeol' make sure last line in file has 'fkmap' 'fk' ペルシア語のキーボードマッピング 'foldclose' 'fcl' カーソル下以外の折畳みを閉じる 'foldcolumn' 'fdc' 折畳みを示すのに使う列幅 @@ -727,10 +729,10 @@ 'foldnestmax' 'fdn' 折畳みの深さの制限 'foldopen' 'fdo' 折畳みを開くことのできるコマンド 'foldtext' 'fdt' 閉じた折畳みの表示に使う式 +'formatexpr' 'fex' |gq|で使う式 'formatlistpat' 'flp' リストのヘッダを認識するためのパターン 'formatoptions' 'fo' 自動整形の動作定義 'formatprg' 'fp' |gq|で使う外部プログラム -'formatexpr' 'fex' |gq|で使う式 'fsync' 'fs' ファイルを書き込んだ後に fsync() を呼ぶかどうか 'gdefault' 'gd' |:substitute|で "g" を既定で有効にする 'grepformat' 'gfm' 'grepprg' の出力の書式 @@ -749,15 +751,15 @@ 'helplang' 'hlg' 優先するヘルプ用の言語 'hidden' 'hid' バッファが|abandon|(捨て)られても破棄しない 'highlight' 'hl' 様々な対象に対する強調表示モードの設定 -'hlsearch' 'hls' 最後に検索したパターンを強調表示する 'history' 'hi' コマンドライン履歴の記録数 'hkmap' 'hk' ヘブライ語のキーボードマッピング 'hkmapp' 'hkp' 発音に即したヘブライ語のキーボードマッピング +'hlsearch' 'hls' 最後に検索したパターンを強調表示する 'icon' Vimのアイコン表示でテキストを変更するようにする 'iconstring' Vimのアイコン表示に使用するテキスト 'ignorecase' 'ic' 検索パターンで大文字と小文字を区別しない -'imactivatekey' 'imak' X のインプットメソッドをオンにするキー 'imactivatefunc' 'imaf' X のインプットメソッドをオン/オフにする関数 +'imactivatekey' 'imak' X のインプットメソッドをオンにするキー 'imcmdline' 'imc' コマンドライン入力時にIMを有効にする 'imdisable' 'imd' どのモードでもIMを使わない 'iminsert' 'imi' 挿入モードで|:lmap|やIMを使う @@ -781,6 +783,7 @@ 'keywordprg' 'kp' |K|で使う外部プログラム 'langmap' 'lmap' 他の言語モードでの文字 'langmenu' 'lm' メニュー表示用言語 +'langnoremap' 'lnr' do not apply 'langmap' to mapped characters 'laststatus' 'ls' 最下ウィンドウにいつステータス行を表示するか 'lazyredraw' 'lz' マクロ実行中に表示を更新しない 'linebreak' 'lbr' 長い行を空白で折り返す @@ -791,6 +794,7 @@ 'list' を表示する 'listchars' 'lcs' 'list' オン時に使う文字 'loadplugins' 'lpl' 起動時にプラグインスクリプトを読み込む +'luadll' name of the Lua dynamic library 'macatsui' Mac GUI: ATSUI テキスト描画を使う 'magic' 検索パターン内の特殊文字を変更する 'makeef' 'mef' |:make|用のエラーファイル @@ -830,6 +834,7 @@ 'patchexpr' 'pex' パッチを適用するための式 'patchmode' 'pm' 最初のバージョンを保全する 'path' 'pa' |gf|などでファイルを検索するディレクトリのリスト +'perldll' name of the Perl dynamic library 'preserveindent' 'pi' 再インデント時にインデントの構造を保つ 'previewheight' 'pvh' プレビューウィンドウの高さ 'previewwindow' 'pvw' プレビューウィンドウかどうか @@ -842,6 +847,8 @@ 'printmbfont' 'pmbfn' |:hardcopy|の出力に使われるフォント名 'printoptions' 'popt' |:hardcopy|の出力をコントロールする 'pumheight' 'ph' ポップアップメニューの高さの最大値 +'pythondll' name of the Python 2 dynamic library +'pythonthreedll' name of the Python 3 dynamic library 'quoteescape' 'qe' 文字列中に使われるエスケープ文字 'readonly' 'ro' バッファの書き込みを制限する 'redrawtime' 'rdt' 'hlsearch' と |:match| のハイライトのタイムアウト @@ -854,6 +861,7 @@ 'revins' 'ri' 挿入モードで入力方向が逆になる 'rightleft' 'rl' "右から左" 指向のウィンドウ 'rightleftcmd' 'rlc' "右から左" に入力するコマンド +'rubydll' name of the Ruby dynamic library 'ruler' 'ru' ステータスラインにカーソルが位置する場所を表示する 'rulerformat' 'ruf' 'ruler' 用のフォーマット 'runtimepath' 'rtp' ランタイムファイル用のディレクトリのリスト @@ -909,14 +917,16 @@ 'switchbuf' 'swb' バッファ切替え時の動作 'synmaxcol' 'sws' この桁までしか構文アイテムを探さない 'syntax' 'syn' カレントバッファの構文強調表示の定義 -'tabstop' 'ts' の表示幅 'tabline' 'tal' コンソールのタブページラインのカスタムフォーマット 'tabpagemax' 'tpm' タブページの最大数。|-p|と "tab all" に使われる。 +'tabstop' 'ts' の表示幅 'tagbsearch' 'tbs' タグファイル内の検索にバイナリサーチを使う +'tagcase' 'tc' how to handle case when searching in tags files 'taglength' 'tl' タグ名はこの文字数までしか意味を持たない 'tagrelative' 'tr' タグファイル内のファイル名が相対的になる 'tags' 'tag' タグコマンドで使うファイルのリスト 'tagstack' 'tgst' タグスタックにタグをプッシュする +'tcldll' name of the Tcl dynamic library 'term' ターミナルの名前 'termbidi' 'tbidi' ターミナルが双方向性を持っている 'termencoding' 'tenc' ターミナルが使用する文字コード diff --git a/doc/repeat.jax b/doc/repeat.jax index 5c0a4887a..9666b14aa 100644 --- a/doc/repeat.jax +++ b/doc/repeat.jax @@ -1,4 +1,4 @@ -*repeat.txt* For Vim バージョン 7.4. Last change: 2015 Apr 13 +*repeat.txt* For Vim バージョン 7.4. Last change: 2016 Jan 16 VIMリファレンスマニュアル by Bram Moolenaar @@ -110,7 +110,13 @@ Ex モード中で "global" を使い、そのコマンドに ":visual" を指 q{0-9a-zA-Z"} タイプした文字をレジスタ{0-9a-zA-Z"}にレコーディングす る(大文字なら追記)。レジスタを実行中は 'q' コマンドは 無効化される。マッピングや |:normal| の中でも機能しな - い。{Vi: レコーディングはない} + い。 + + Note: If the register being used for recording is also + used for |y| and |p| the result is most likely not + what is expected, because the put will paste the + recorded macro and the yank will overwrite the + recorded macro. {Vi: no recording} q レコーディングを終了する。(実装のメモ: レコーディング を終了する 'q' は、それがマッピングの結果であってもレ @@ -458,15 +464,44 @@ NOTE: デバッグモードは未完成である。デバッグはVimの動作 *>finish* finish 実行中のスクリプトやユーザー関数を終了し呼び出し元でデ バッグモードに戻る。 + *>bt* + *>backtrace* + *>where* + backtrace Show the call stacktrace for current debugging session. + bt + where + *>frame* + frame N Goes to N bactrace level. + and - signs make movement + relative. E.g., ":frame +3" goes three frames up. + *>up* + up Goes one level up from call stacktrace. + *>down* + down Goes one level down from call stacktrace. デバッグモードのコマンドについて: - 補完はできない。通常のExコマンドのみ補完できる。 - 次の一文字に省略すことができる: "c", "n", "s" そして "f"。 +- コマンド名は、他のコマンドが同じ文字で始まらないところまで省略できる。 + "f" は "finish" なるので "frame" を省略するには "fr" を用いる。 - を押すと前回のものを繰り返す。関係ないコマンドを使うとリセットされる (どうすべきかがわかりにくいため)。 - 同じ名前のExコマンドを使うにはコロンを付けること: ":cont", ":next", ":finish" (省略時も) +The backtrace shows the hierarchy of function calls, e.g.: + >bt ~ + 3 function One[3] ~ + 2 Two[3] ~ + ->1 Three[3] ~ + 0 Four ~ + line 1: let four = 4 ~ + +The "->" points to the current frame. Use "up", "down" and "frame N" to +select another frame. + +In the current frame you can evaluate the local function variables. There is +no way to see the command at the current line yet. + ブレークポイントの定義 ---------------------- diff --git a/doc/spell.jax b/doc/spell.jax index f4b762d17..0a77791c5 100644 --- a/doc/spell.jax +++ b/doc/spell.jax @@ -1,4 +1,4 @@ -*spell.txt* For Vim バージョン 7.4. Last change: 2014 Sep 19 +*spell.txt* For Vim バージョン 7.4. Last change: 2016 Jan 08 VIMリファレンスマニュアル by Bram Moolenaar @@ -1389,6 +1389,14 @@ the item name. Case is always ignored. The Hunspell feature to use three arguments and flags is not supported. + *spell-NOCOMPOUNDSUGS* +This item indicates that using compounding to make suggestions is not a good +idea. Use this when compounding is used with very short or one-character +words. E.g. to make numbers out of digits. Without this flag creating +suggestions would spend most time trying all kind of weird compound words. + + NOCOMPOUNDSUGS ~ + *spell-SYLLABLE* The SYLLABLE item defines characters or character sequences that are used to count the number of syllables in a word. Example: diff --git a/doc/tagsrch.jax b/doc/tagsrch.jax index c5d6c309a..ead835383 100644 --- a/doc/tagsrch.jax +++ b/doc/tagsrch.jax @@ -82,6 +82,15 @@ CTRL-]はtelnetの標準エスケープキーである。タグにジャンプ すること。これは ":tnext" を使うときの混乱を避けるためである。優先度のリストは ":tag {ident}" を使ったときに変化する。 +The ignore-case matches are not found for a ":tag" command when the +'ignorecase' option is off and 'tagcase' is "followic" or when 'tagcase' is +"match". They are found when a pattern is used (starting with a "/") and for +":tselect", also when 'ignorecase' is off and 'tagcase' is "followic" or when +'tagcase' is "match". Note that using ignore-case tag searching disables +binary searching in the tags file, which causes a slowdown. This can be +avoided by fold-case sorting the tag file. See the 'tagbsearch' option for an +explanation. +{参考用の旧訳: 'ignorecase' オプションがオフになっているときの ":tag" コマンドでは、大文字、 小文字を区別しないマッチは見つからない。'ignorecase' がオフになっていても、 ("/" で始まる) パターンを使用し、かつ ":tselect" を使ったときには見つけること @@ -89,6 +98,7 @@ CTRL-]はtelnetの標準エスケープキーである。タグにジャンプ ができなくなるため処理が遅くなる、ということに注意すること。これはタグファイル を大文字と小文字を区別せずにソートすることで回避できる。'tagbsearch' オプショ ンの説明も参照のこと。 +:旧訳ここまで} ============================================================================== 2. タグスタック *tag-stack* *tagstack* *E425* @@ -431,12 +441,21 @@ Emacs タグファイルの行は非常に長くなることがある。Vim は 以下のようなときは、リストの次のファイルを使わない: - 現在のバッファに対するstaticタグが見つかった場合。 - globalタグが見つかった場合。 +This also depends on whether case is ignored. Case is ignored when +'ignorecase' is set and 'tagcase' is "followic", or when 'tagcase' is +"ignore". If case is not ignored, and the tags file only has a match without +matching case, the next tags file is searched for a match with matching case. +If no tag with matching case is found, the first match without matching case +is used. If case is ignored, and a matching global tag with or without +matching case is found, this one is used, no further tags files are searched. +{参考用の旧訳: これらは 'ignorecase' オプションに依存する。もしオフにしてあり、tagsファイルに 大文字小文字が一致するタグがない場合、一致するタグを次のtagsファイルで検索す る。もし一致するタグが見つからなければ、大文字小文字を無視して最初にマッチした ものが使われる。もし 'ignorecase' がオンの場合、大文字小文字の区別なく、global タグが見つかった時点でそのタグが使用され、それ以降のtagsファイルは検索されな い。 +:旧訳ここまで} タグファイル名が "./" で始まるとき、'.' は現在のファイルのパスで置き換えられ る。これにより、現在のファイルがあるディレクトリのtagsファイルを使用することが @@ -565,9 +584,15 @@ tagsファイルの先頭行には、 た場合には、Vimはtagsファイルに対して二分検索を使用する: !_TAG_FILE_SORTED1{anything} ~ +A tag file may be case-fold sorted to avoid a linear search when case is +ignored. (Case is ignored when 'ignorecase' is set and 'tagcase' is +"followic", or when 'tagcase' is "ignore".) See 'tagbsearch' for details. +The value '2' should be used then: +{参考用の旧訳: 'ignorecase' がonのときに線形検索を避けるために、大文字と小文字を区別せずにタ グファイルがソートされることがある。詳細は 'tagbsearch' を参照。そのときは '2' が使われる: +:旧訳ここまで} !_TAG_FILE_SORTED2{anything} ~ Vimが認識するもう1つのタグはタグファイルのエンコーディングを指定するものであ diff --git a/doc/term.jax b/doc/term.jax index 8c89fd7d6..1f7127de9 100644 --- a/doc/term.jax +++ b/doc/term.jax @@ -1,4 +1,4 @@ -*term.txt* For Vim バージョン 7.4. Last change: 2014 May 13 +*term.txt* For Vim バージョン 7.4. Last change: 2015 Nov 24 VIMリファレンスマニュアル by Bram Moolenaar @@ -224,10 +224,10 @@ termcap コードに対応するオプションを設定することによって るオプション名の最後の2文字が等しくなっています。絶対に必要な termcap コードは カーソルを移動させる 't_cm' の1つだけです。 -オプション 't_da', 't_db', 't_ms', 't_xs' は termcap におけるフラグに対応して -います。termcap にこれらのフラグが存在すると、対応するオプションに "y" が設定 -されます。空でない文字列を設定するとオンになり、空文字列を設定するとオフになり -ます。't_CS' もこれと同様ですが、termcap フラグではありません。 +オプション 't_da', 't_db', 't_ms', 't_xs', 't_xn' は termcap におけるフラグに +対応しています。termcap にこれらのフラグが存在すると、対応するオプションに "y" +が設定されます。空でない文字列を設定するとオンになり、空文字列を設定するとオフ +になります。't_CS' もこれと同様ですが、termcap フラグではありません。 出力コード option 意味 ~ @@ -282,6 +282,9 @@ termcap コードに対応するオプションを設定することによって t_vs カーソル強調表示 *t_vs* *'t_vs'* *t_xs* *'t_xs'* t_xs 空でない場合は強調が上書きによって消されない(hpterm) + *t_xn* *'t_xn'* + t_xn if non-empty, writing a character at the last screen cell + does not cause scrolling t_ZH 斜体モード *t_ZH* *'t_ZH'* t_ZR 斜体終了 *t_ZR* *'t_ZR'* @@ -291,12 +294,15 @@ Vim 独自のもの (標準的なコードはないもの): t_WP ウィンドウ位置 (Y, X) をピクセルで指定 *t_WP* *'t_WP'* t_WS ウィンドウサイズ (height, width) を文字数で指定 *t_WS* *'t_WS'* t_SI 挿入モード開始 (バー型のカーソル) *t_SI* *'t_SI'* - t_EI 挿入モード終了(ブロック型カーソル) *t_EI* *'t_EI'* + t_SR start replace mode (underline cursor shape) *t_SR* *'t_SR'* + t_EI 挿入または置換モード終了(ブロック型カーソル) *t_EI* *'t_EI'* |termcap-cursor-shape| t_RV 端末バージョン文字列を要求 (xterm 用) *t_RV* *'t_RV'* |xterm-8bit| |v:termresponse| |'ttymouse'| |xterm-codes| t_u7 カーソル位置を要求 (xterm 用) *t_u7* *'t_u7'* |'ambiwidth'| 参照。 + t_RB request terminal background color *t_RB* *'t_RB'* + see |'ambiwidth'| キーコード Note: 可能なかぎり <> 形式を使ってください。 @@ -412,7 +418,8 @@ Note t_so と t_mrについて: termcap に "so" エントリがない場合は るという問題に対応することができます。そのため、 のようなコードは必要なく なります。 Note: これは起動時にのみ行われます。Vim が起動した後で xterm のオプションが変 -更された場合は、これらのエスケープシーケンスは認識されなくなる可能性があります。 +更された場合は、これらのエスケープシーケンスはそれ以降、認識されなくなる可能性 +があります。 *xterm-resize* xterm でのウィンドウサイズ変更はリソース allowWindowOps が有効なときのみ動作し @@ -436,13 +443,22 @@ allow-window-pos にチェックが入っているはずです。 ます。 *termcap-cursor-shape* *termcap-cursor-color* +When Vim enters Insert mode the 't_SI' escape sequence is sent. When Vim +enters Replace mode the 't_SR' escape sequence is sent if it is set, otherwise +'t_SI' is sent. When leaving Insert mode or Replace mode 't_EI' is used. This +can be used to change the shape or color of the cursor in Insert or Replace +mode. These are not standard termcap/terminfo entries, you need to set them +yourself. +{参考用の旧訳: 挿入モードに入るとき、エスケープシーケンス 't_SI' が送られます。挿入モードを抜 けるときは 't_EI' が送られます。ただし、両方が定義されているときのみです。これ を利用して、挿入モードにおけるカーソルの形や色を変えることができます。これらは 標準的な termcap/terminfo エントリではないので、自分で設定する必要があります。 +:旧訳ここまで} 以下は xterm でカーソルの色を変える例です: > if &term =~ "xterm" let &t_SI = "\]12;purple\x7" + let &t_SR = "\]12;red\x7" let &t_EI = "\]12;blue\x7" endif NOTE: Vim を終了するとき、ノーマルモードでのカーソル設定がそのまま残ります。 @@ -835,7 +851,7 @@ sysmouse は、コンパイル時に |+mouse_sysmouse| 機能が有効化され X1 ボタンと X2 ボタンは、ある種のマウスについている4番目、5番目のボタンのこと です。'Microsoft Explorer' マウスの場合、これらのボタンは右親指の位置について -います。現在のところ、X1 と X2 は Win32 環境でのみ機能します。 +います。現在のところ、X1 と X2 は Win32 と X11 環境でのみ機能します。 例: > :noremap diff --git a/doc/usr_03.jax b/doc/usr_03.jax index b36b1e1ce..0b70f117f 100644 --- a/doc/usr_03.jax +++ b/doc/usr_03.jax @@ -1,4 +1,4 @@ -*usr_03.txt* For Vim バージョン 7.4. Last change: 2006 Jun 21 +*usr_03.txt* For Vim バージョン 7.4. Last change: 2016 Jan 05 VIM USER MANUAL - by Bram Moolenaar @@ -55,7 +55,10 @@ ルールで動きます。 単語は "." や "-"、")" といったアルファベット以外の文字で区切られます。Vimが何 -を単語とみなすかは、'iskeyword' オプションの設定で変更できます。 +を単語とみなすかは、'iskeyword' オプションの設定で変更できます。 If you try +this out in the help directly, 'iskeyword' needs to be reset for the examples +to work: > + :set iskeyword& 空白を区切りとした単語(WORD)を移動することもできます。これは普段意識する単語 (word)とは若干違うため、大文字を使っています。WORD単位で動くコマンドは全部大 文字です。図で示すと次の通りです。 @@ -398,8 +401,8 @@ CTRL-Dコマンドは窓を半分だけ下げます。つまりテキストが /the\> "\>" というのは特別なマーカーで、単語がここで終わっている時だけヒットします。 -同じように "\<" は単語がここで始まっている時にだけヒットします。つまり、"the" -という単語だけを探したい場合は、次のようにします。 > +同じように "\<" は単語の始まりにだけヒットします。つまり、"the" という単語だけ +を探したい場合は、次のようにします。 > /\ diff --git a/doc/usr_41.jax b/doc/usr_41.jax index db30338ab..6ce10f90f 100644 --- a/doc/usr_41.jax +++ b/doc/usr_41.jax @@ -1,4 +1,4 @@ -*usr_41.txt* For Vim バージョン 7.4. Last change: 2014 Aug 16 +*usr_41.txt* For Vim バージョン 7.4. Last change: 2016 Jan 28 VIM USER MANUAL - by Bram Moolenaar @@ -866,6 +866,19 @@ Vimサーバー: *server-functions* maparg() マップのrhs(展開結果)を得る wildmenumode() wildmodeが有効かどうかをチェック +Testing: *test-functions* + assert_equal() assert that two expressions values are equal + assert_false() assert that an expression is false + assert_true() assert that an expression is true + +Inter-process communication: + connect() open a channel + disconnect() close a channel + sendexpr() send a JSON message over a channel + sendraw() send a raw message over a channel + jsonencode() encode an expression to a JSON string + jsondecode() decode a JSON string to Vim types + その他: *various-functions* mode() 現在の編集モードを得る visualmode() 最後に使われたビジュアルモードの種類 @@ -894,8 +907,10 @@ Vimサーバー: *server-functions* luaeval() Luaの式を評価する mzeval() |MzScheme| の式を評価する + perleval() evaluate Perl expression (|+perl|) py3eval() Pythonの式を評価する (|+python3|) pyeval() Pythonの式を評価する (|+python|) + wordcount() get byte/word/char count of buffer ============================================================================== *41.7* 関数を定義する diff --git a/doc/various.jax b/doc/various.jax index 9652cefab..319db1b86 100644 --- a/doc/various.jax +++ b/doc/various.jax @@ -1,4 +1,4 @@ -*various.txt* For Vim バージョン 7.4. Last change: 2014 Aug 06 +*various.txt* For Vim バージョン 7.4. Last change: 2016 Jan 27 VIM リファレンスマニュアル by Bram Moolenaar @@ -320,6 +320,7 @@ N *+browse* |:browse| コマンド N *+builtin_terms* 幾つかの組み込み端末 |builtin-terms| B *++builtin_terms* 全部の組み込み端末 |builtin-terms| N *+byte_offset* 'statusline'の'o'フラグ、|go|、|:goto|をサポート +m *+channel* inter process communication |channel| N *+cindent* |'cindent'|, C言語インデント N *+clientserver* UnixとWin32: リモート呼び出し |clientserver| *+clipboard* |clipboard|サポート @@ -646,6 +647,7 @@ K カーソル位置のキーワードを調べるためのプログラムを g CTRL-A MEM_PROFILING を define して Vim をコンパイルしたとき み使えます (通常は使いません)。メモリ使用量の統計を表 示します。Vim をデバッグするときなどに使います。 + For incrementing in Visual mode see |v_g_CTRL-A|. ============================================================================== 2. less、more の代わりに Vim を使う *less* @@ -663,4 +665,12 @@ less のコマンドをシミュレートするためのマップを設定しま "h" キーを押すと使用できるコマンドのショートヘルプが表示されます。 +If you want to set options differently when using less, define the +LessInitFunc in your vimrc, for example: > + + func LessInitFunc() + set nocursorcolumn nocursorline + endfunc +< + vim:tw=78:ts=8:ft=help:norl: From c1f24c21aba57c1316a33ff2f4fb3d95a2b3190b Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Sat, 30 Jan 2016 16:55:08 +0900 Subject: [PATCH 06/11] imports english for three large files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit if_lua.jax は普通 os_os2.jax は消すだけ eval.jax は地獄 --- catchup-7.4.1194.md | 10 +- doc/eval.jax | 423 ++++++++++++++++++++++++++++++++++++++++---- doc/if_lua.jax | 110 ++++++++++-- doc/os_os2.jax | 199 +-------------------- 4 files changed, 489 insertions(+), 253 deletions(-) diff --git a/catchup-7.4.1194.md b/catchup-7.4.1194.md index 6f75d201c..c831d43b1 100644 --- a/catchup-7.4.1194.md +++ b/catchup-7.4.1194.md @@ -19,10 +19,7 @@ 追いついたファイルは、下記の一覧から削除し、適切なセクションへ移動 - doc/eval.jax - doc/if_lua.jax doc/options.jax - doc/os_os2.jax doc/pi_netrw.jax doc/syntax.jax doc/usr_02.jax @@ -30,12 +27,16 @@ ### 英文だけは反映済み +以上は変更点が100行未満なので、翻訳しやすいはず。 + doc/autocmd.jax doc/change.jax doc/develop.jax doc/editing.jax + doc/eval.jax doc/fold.jax doc/hangulin.jax + doc/if_lua.jax doc/if_mzsch.jax doc/if_perl.jax doc/if_pyth.jax @@ -54,6 +55,8 @@ doc/usr_41.jax doc/various.jax +こっから先は100行超えるので、嫌。 + ### 完訳! doc/cmdline.jax @@ -61,6 +64,7 @@ doc/help.jax doc/index.jax doc/mlang.jax + doc/os_os2.jax doc/quickfix.jax doc/usr_29.jax doc/usr_43.jax diff --git a/doc/eval.jax b/doc/eval.jax index 946b1fec2..8a963561d 100644 --- a/doc/eval.jax +++ b/doc/eval.jax @@ -1,4 +1,4 @@ -*eval.txt* For Vim バージョン 7.4. Last change: 2015 Jun 26 +*eval.txt* For Vim バージョン 7.4. Last change: 2016 Jan 28 VIMリファレンスマニュアル by Bram Moolenaar @@ -66,12 +66,14 @@ Funcref 関数への参照 |Funcref|。 数値 -1 --> 文字列 "-1" ~ *octal* 文字列から数値への変換は最初の数字を用いて数値に変換する。16進表記 "0xf9" や -8進表記 "017" も認識される。文字列が数字で始まらない場合結果は0となる。例: +8進表記 "017"、2進数表記の "0b10" も認識される。文字列が数字で始まらない場合結 +果は0となる。例: 文字列 "456" --> 数値 456 ~ 文字列 "6bar" --> 数値 6 ~ 文字列 "foo" --> 数値 0 ~ 文字列 "0xf1" --> 数値 241 ~ 文字列 "0100" --> 数値 64 ~ + String "0b101" --> Number 5 ~ 文字列 "-8" --> 数値 -8 ~ 文字列 "+8" --> 数値 0 ~ @@ -97,6 +99,9 @@ empty()を使用して次のようにする。 > 動的な変換は存在しない。文字列から浮動小数点数へは str2float() を使い、浮動小 数点数から文字列へは printf() を、浮動小数点数から数値へは float2nr() を使う。 + *E891* *E892* *E893* *E894* +When expecting a Float a Number can also be used, but nothing else. + *E706* *sticky-type-checking* 変数の型を変えようとするとエラーになる。このエラーを避けるには、まず|:unlet|す る必要がある。しかし文字列と数値は同値であると見なされる。同じく、浮動小数点数 @@ -836,9 +841,9 @@ expr8 がマルチバイト文字列である場合、この値は単なるバ とはならないかもしれないことに注意。マルチバイト文字列に対する代替方法は |byteidx()| を参照。 -インデックスが0の場合、先頭のキャラクタが得られることに注意。これはC言語のよう -に働く。注意:カラム番号は1から始まる。例えばカーソルの下の文字を得るためには、 -次のようにする必要がある: > +インデックスが0の場合、先頭のバイトが得られることに注意。これはC言語のように働 +く。注意:カラム番号は1から始まる。例えばカーソルの下のバイトを得るためには、次 +のようにする必要がある: > :let c = getline(".")[col(".") - 1] 文字列の長さよりも大きなインデックスが指定された場合、結果は空文字列になる。負 @@ -885,6 +890,11 @@ expr8がリストならば、インデックスexpr1aとexpr1bの間の要素か |Funcref|に対してexpr8[expr1]やexpr8[expr1a : expr1b]を使うとエラーになる。 +Watch out for confusion between a namespace and a variable followed by a colon +for a sublist: > + mylist[n:] " uses variable n + mylist[s:] " uses namespace s:, error! + expr8.name 辞書|Dictionary|の要素 *expr-entry* @@ -1284,6 +1294,12 @@ v:cmdbang v:cmdargと同じく読み書きコマンドを実行したとき設 0となる。Note オートコマンドの中でのみ利用可能なことに注意。 ユーザー定義コマンドでは||を使えば同じことができる。 + *v:completed_item* *completed_item-variable* +v:completed_item + |Dictionary| containing the |complete-items| for the most + recently completed word after |CompleteDone|. The + |Dictionary| is empty if the completion failed. + *v:count* *count-variable* v:count 最後に実行されたノーマルモードコマンドに渡されたコマンドの実行 回数を返す。読出し専用。使用例: > @@ -1327,6 +1343,15 @@ v:errmsg 最後に表示されたエラーメッセージ。この変数は代 : ... < また "errmsg" は、以前の版のVimとの互換性の為に動作する。 + *v:errors* *errors-variable* +v:errors Errors found by assert functions, such as |assert_true()|. + This is a list of strings. + The assert functions append an item when an assert fails. + To remove old results make it empty: > + :let v:errors = [] +< If v:errors is set to anything but a list it is made an empty + list by the assert function. + *v:exception* *exception-variable* v:exception 最も直近に捕捉され、まだ終了していない例外の値。 |v:throwpoint|と|throw-variables|を参照。 @@ -1338,6 +1363,13 @@ v:exception 最も直近に捕捉され、まだ終了していない例外の :endtry < 出力: "caught oops". + *v:false* *false-variable* +v:false A Number with value zero. Used to put "false" in JSON. See + |jsonencode()|. + When used as a string this evaluates to "false". > + echo v:false +< false ~ + *v:fcs_reason* *fcs_reason-variable* v:fcs_reason |FileChangedShell|イベントが発生した理由。オートコマンドの中で 何をすべきかやv:fcs_choiceに何を代入すべきかを決めるために使う。 @@ -1418,7 +1450,9 @@ v:hlsearch 検索による強調表示がオンになっているかどうかを |:nohlsearch|コマンドを実行することと同様に働き、1に設定するこ とは以下と同様に働く > let &hlsearch = &hlsearch -< +< Note that the value is restored when returning from a + function. |function-search-undo|. + *v:insertmode* *insertmode-variable* v:insertmode オートコマンドイベント|InsertEnter|と|InsertChange|用。 値は次のどれか: @@ -1468,6 +1502,22 @@ v:mouse_col |getchar()|でマウスクリックイベントを取得したとき 桁番号が代入されている。|virtcol()|と同じく画面上の桁番号。マ ウスがクリックされていないときは0となる。 + *v:none* *none-variable* +v:none An empty String. Used to put an empty item in JSON. See + |jsonencode()|. + When used as a number this evaluates to zero. + When used as a string this evaluates to "none". > + echo v:none +< none ~ + + *v:null* *null-variable* +v:null An empty String. Used to put "null" in JSON. See + |jsonencode()|. + When used as a number this evaluates to zero. + When used as a string this evaluates to "null". > + echo v:null +< null ~ + *v:oldfiles* *oldfiles-variable* v:oldfiles 起動時に |viminfo| から読み込まれたファイルの名前のリスト。 これらはマークを記憶しているファイルである。リストの長さの上限 @@ -1632,6 +1682,12 @@ v:throwpoint 最も直近に捕捉されてまだ終了していない例外が :endtry < 出力: "Exception from test.vim, line 2" + *v:true* *true-variable* +v:true A Number with value one. Used to put "true" in JSON. See + |jsonencode()|. + When used as a string this evaluates to "true". > + echo v:true +< true ~ *v:val* *val-variable* v:val 辞書|Dictionary|の現在の要素の値。|map()|と|filter()|で使わ れる式を評価している最中のみ有効。 @@ -1672,15 +1728,22 @@ v:windowid X11 ベースの GUI を使っているとき、もしくは端末の abs( {expr}) 浮動小数点数または数値 {expr}の絶対値 acos( {expr}) 浮動小数点数 {expr}のアークコサイン add( {list}, {item}) リスト {item}をリスト{list}に追加する +alloc_fail( {id}, {countdown}, {repeat}) + none make memory allocation fail and( {expr}, {expr}) 数値 ビット論理積 append( {lnum}, {string}) 数値 {string}を{lnum}行目に付け加える append( {lnum}, {list}) 数値 行{list}を{lnum}行目に付け加える argc() 数値 引数内のファイルの数 argidx() 数値 引数リスト内の現在のインデックス -arglistid( [{winnr}, [ {tabnr}]]) +arglistid( [{winnr} [, {tabnr}]]) 数値 引数リストID argv( {nr}) 文字列 引数の第{nr}番目 argv( ) リスト 引数リスト +assert_equal( {exp}, {act} [, {msg}]) none assert {exp} equals {act} +assert_exception({error} [, {msg}]) none assert {error} is in v:exception +assert_fails( {cmd} [, {error}]) none assert {cmd} fails +assert_false( {actual} [, {msg}]) none assert {actual} is false +assert_true( {actual} [, {msg}]) none assert {actual} is true asin( {expr}) 浮動小数点数 {expr}のアークサイン atan( {expr}) 浮動小数点数 {expr}のアークタンジェント atan2( {expr}, {expr}) 浮動小数点数 {expr1} / {expr2} のアークタン @@ -1711,6 +1774,8 @@ complete_add( {expr}) 数値 補完候補を追加する complete_check() 数値 補完中に押されたキーをチェックする confirm( {msg} [, {choices} [, {default} [, {type}]]]) 数値 ユーザーへの選択肢と番号 +connect( {address}, {mode} [, {callback}]) + Number open a channel copy( {expr}) 任意 {expr}の浅いコピーを作る cos( {expr}) 浮動小数点数 {expr} の余弦(コサイン) cosh( {expr}) 浮動小数点数 {expr}のハイパボリックコサイン @@ -1722,7 +1787,7 @@ cursor( {lnum}, {col} [, {off}]) 数値 カーソルを{lnum}, {col}, {off}へ移動 cursor( {list}) 数値 カーソルを{list}の位置へ移動 deepcopy( {expr} [, {noref}]) 任意 {expr}の完全なコピーを作る -delete( {fname}) 数値 ファイル{fname}を消す +delete( {fname} [, {flags}]) 数値 ファイルやディレクトリ{fname}を消す did_filetype() 数値 FileTypeのautocommandが実行されたか? diff_filler( {lnum}) 数値 差分モードで{lnum}に挿入された行 diff_hlID( {lnum}, {col}) 数値 差分モードで{lnum}/{col}位置の強調 @@ -1768,12 +1833,15 @@ getbufline( {expr}, {lnum} [, {end}]) リスト バッファ{expr}の{lnum}から{end}行目 getbufvar( {expr}, {varname} [, {def}]) 任意 バッファ{expr}の変数 {varname} +getchar( [expr]) Number get one character from the user +getcharmod( ) Number modifiers for the last typed character +getcharsearch() Dict last character search getcmdline() 文字列 現在のコマンドラインを取得 getcmdpos() 数値 コマンドラインのカーソル位置を取得 getcmdtype() 文字列 現在のコマンドラインの種類を取得 getcmdwintype() 文字列 現在のコマンドラインウィンドウの種類 getcurpos() リスト カーソルの位置 -getcwd() 文字列 現在の作業ディレクトリ +getcwd( [{winnr} [, {tabnr}]]) 文字列 現在の作業ディレクトリを取得 getfontname( [{name}]) 文字列 使用しているフォントの名前 getfperm( {fname}) 文字列 ファイル{fname}の許可属性を取得 getfsize( {fname}) 数値 ファイル{fname}のバイト数を取得 @@ -1805,7 +1873,8 @@ globpath( {path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]]) glob({expr})を行う has( {feature}) 数値 機能{feature}がサポートならばTRUE has_key( {dict}, {key}) 数値 {dict}が要素{key}を持つならTRUE -haslocaldir() 数値 現在のウィンドウで|:lcd|が実行された +haslocaldir( [{winnr} [, {tabnr}]]) + 数値 現在のウィンドウで|:lcd|が実行された ならTRUE hasmapto( {what} [, {mode} [, {abbr}]]) 数値 {what}へのマッピングが存在するならTRUE @@ -1833,6 +1902,8 @@ isdirectory( {directory}) 数値 {directory}がディレクトリならばTRUE islocked( {expr}) 数値 {expr}がロックされているならTRUE items( {dict}) リスト {dict}のキーと値のペアを取得 join( {list} [, {sep}]) 文字列 {list}の要素を連結して文字列にする +jsondecode( {string}) any decode JSON +jsonencode( {expr}) String encode JSON keys( {dict}) リスト {dict}のキーを取得 len( {expr}) 数値 {expr}の長さを取得 libcall( {lib}, {func}, {arg} 文字列 ライブラリ{lib}の関数{func}をコール @@ -1875,6 +1946,7 @@ nextnonblank( {lnum}) 数値 {lnum}行目以降で空行でない行の行番 nr2char( {expr}[, {utf8}]) 文字列 ASCII/UTF8コード{expr}で示される文字 or( {expr}, {expr}) 数値 ビット論理和 pathshorten( {expr}) 文字列 path内の短縮したディレクトリ名 +perleval( {expr}) any evaluate |Perl| expression pow( {x}, {y}) 浮動小数点数 {x} の {y} 乗 prevnonblank( {lnum}) 数値 {lnum}行目以前の空行でない行の行番号 printf( {fmt}, {expr1}...) 文字列 文字列を組み立てる @@ -1916,11 +1988,16 @@ searchpairpos( {start}, {middle}, {end} [, {flags} [, {skip} [...]]]) リスト 開始/終端のペアの他方を検索 searchpos( {pattern} [, {flags} [, {stopline} [, {timeout}]]]) リスト {pattern}を検索 +sendexpr( {handle}, {expr} [, {callback}]) + any send {expr} over JSON channel {handle} +sendraw( {handle}, {string} [, {callback}]) + any send {string} over raw channel {handle} server2client( {clientid}, {string}) 数値 返信文字列を送信する serverlist() 文字列 利用可能なサーバーのリストを取得 setbufvar( {expr}, {varname}, {val}) バッファ{expr}内の変数{varname}に{val} をセット +setcharsearch( {dict}) Dict set character search from {dict} setcmdpos( {pos}) 数値 コマンドライン内のカーソル位置を設定 setline( {lnum}, {line}) 数値 行{lnum}に{line}(文字列)をセット setloclist( {nr}, {list}[, {action}]) @@ -2015,6 +2092,7 @@ winrestcmd() 文字列 ウィンドウサイズを復元するコマンド winrestview( {dict}) なし 現在のウィンドウのビューを復元 winsaveview() 辞書 現在のウィンドウのビューを保存 winwidth( {nr}) 数値 ウィンドウ{nr}の幅を取得 +wordcount() Dict get byte/char/word statistics writefile( {list}, {fname} [, {flags}]) 数値 行のリストをファイル{fname}に書き込む xor( {expr}, {expr}) 数値 ビット排他的論理和 @@ -2108,6 +2186,55 @@ argv([{nr}]) 結果は引数リスト内の、{nr}番目のファイル。|argli < 引数{nr}が指定されなかった場合は、引数リスト|arglist|全体を 返す。 + *assert_equal()* +assert_equal({expected}, {actual} [, {msg}]) + When {expected} and {actual} are not equal an error message is + added to |v:errors|. + There is no automatic conversion, the String "4" is different + from the Number 4. And the number 4 is different from the + Float 4.0. The value of 'ignorecase' is not used here, case + always matters. + When {msg} is omitted an error in the form "Expected + {expected} but got {actual}" is produced. + Example: > + assert_equal('foo', 'bar') +< Will result in a string to be added to |v:errors|: + test.vim line 12: Expected 'foo' but got 'bar' ~ + +assert_exception({error} [, {msg}]) *assert_exception()* + When v:exception does not contain the string {error} an error + message is added to |v:errors|. + This can be used to assert that a command throws an exception. + Using the error number, followed by a colon, avoids problems + with translations: > + try + commandthatfails + call assert_false(1, 'command should have failed') + catch + call assert_exception('E492:') + endtry + +assert_fails({cmd} [, {error}]) *assert_fails()* + Run {cmd} and add an error message to |v:errors| if it does + NOT produce an error. + When {error} is given it must match |v:errmsg|. + +assert_false({actual} [, {msg}]) *assert_false()* + When {actual} is not false an error message is added to + |v:errors|, like with |assert_equal()|. + A value is false when it is zero. When "{actual}" is not a + number the assert fails. + When {msg} is omitted an error in the form "Expected False but + got {actual}" is produced. + +assert_true({actual} [, {msg}]) *assert_true()* + When {actual} is not true an error message is added to + |v:errors|, like with |assert_equal()|. + A value is true when it is a non-zero number. When {actual} + is not a number the assert fails. + When {msg} is omitted an error in the form "Expected True but + got {actual}" is produced. + asin({expr}) *asin()* {expr} の逆正弦 (アークサイン) をラジアンで返す。 値は [-pi/2, pi/2] の範囲の浮動小数点数 (|Float|)。 @@ -2479,6 +2606,18 @@ confirm({msg} [, {choices} [, {default} [, {type}]]]) は、垂直配置が使われる。幾つかのシステムでは常に水平配置が使わ れる。 +connect({address}, {mode} [, {callback}]) *connect()* + Open a channel to {address}. See |channel|. + + {address} has the form "hostname:port", e.g., + "localhost:8765". + + {mode} is either "json" or "raw". See |channel-mode| for the + meaning. + + {callback} is a function that handles received messages on the + channel. See |channel-callback|. + *copy()* copy({expr}) {expr}のコピーを作る。数値と文字列の場合は、{expr}そのものとコ ピーの間に違いはない。 @@ -2600,10 +2739,20 @@ deepcopy({expr}[, {noref}]) *deepcopy()* *E698* 要素があると、{noref}が1の場合は失敗する。 |copy()|も参照。 -delete({fname}) *delete()* - {fname}という名前のファイルを削除する。戻り値は数値で、削除に - 成功したら0、失敗したら0以外が返る。 - リスト|List|から要素を削除するには|remove()|を使う。 +delete({fname} [, {flags}]) *delete()* + Without {flags} or with {flags} empty: Deletes the file by the + name {fname}. This also works when {fname} is a symbolic link. + + When {flags} is "d": Deletes the directory by the name + {fname}. This fails when directory {fname} is not empty. + + When {flags} is "rf": Deletes the directory by the name + {fname} and everything in it, recursively. BE CAREFUL! + A symbolic link itself is deleted, not what it points to. + + The result is a Number, which is 0 if the delete operation was + successful and -1 when the deletion failed or partly failed. + バッファから行を削除するには|:delete|を使う。行番号が変数に入っ ている場合は|:exe|を使う。 @@ -2638,6 +2787,7 @@ empty({expr}) *empty()* {expr}が空なら1を、そうでなければ0を返す。 リスト|List|または辞書|Dictionary|は要素を1個も持たないとき空 とみなされる。数値は値が0のとき空とみなされる。 + |v:false|, |v:none| and |v:null| are empty, |v:true| is not. 長いリストに対しては長さを0と比較するよりこちらの方がずっと高 速である。 @@ -2918,6 +3068,11 @@ feedkeys({string} [, {mode}]) *feedkeys()* マッピングから展開されたかのように扱われる。これは undoや折り畳みの展開などで違いが現れる。 'i' 追加する代わりに文字を挿入する。(上記参照) + 'x' Execute commands until typeahead is empty. This is + similar to using ":normal!". You can call feedkeys() + several times without 'x' and then one time with 'x' + (possibly with an empty {string}) to execute all the + typeahead. 戻り値は常に0。 *filereadable()* @@ -3264,6 +3419,26 @@ getcharmod() *getcharmod()* 文字自身に含まれていない修飾キーのみ取得できる。つまり、 Shift-aは修飾キーなしの "A" となる。 +getcharsearch() *getcharsearch()* + Return the current character search information as a {dict} + with the following entries: + + char character previously used for a character + search (|t|, |f|, |T|, or |F|); empty string + if no character search has been performed + forward direction of character search; 1 for forward, + 0 for backward + until type of character search; 1 for a |t| or |T| + character search, 0 for an |f| or |F| + character search + + This can be useful to always have |;| and |,| search + forward/backward regardless of the direction of the previous + character search: > + :nnoremap ; getcharsearch().forward ? ';' : ',' + :nnoremap , getcharsearch().forward ? ',' : ';' +< Also see |setcharsearch()|. + getcmdline() *getcmdline()* 現在のコマンドラインの内容を取得する。コマンドラインを編集して いるときのみ動作する。つまり|c_CTRL-\_e|または|c_CTRL-R_=|を使っ @@ -3301,7 +3476,7 @@ getcmdwintype() *getcmdwintype()* *getcurpos()* getcurpos() カーソルの位置を返す。これは getpos('.') に似ているが、追加の 情報を含む: - [bufnum, lnum, col, off, curswant] + [bufnum, lnum, col, off, curswant] ~ "curswant" は縦方向移動の優先的列番号である。 次のようにしてカーソル位置の保存と復元ができる: > let save_cursor = getcurpos() @@ -3309,7 +3484,16 @@ getcurpos() カーソルの位置を返す。これは getpos('.') に似てい call setpos('.', save_cursor) < *getcwd()* -getcwd() 結果は文字列で、現在のディレクトリ名。 +getcwd([{winnr} [, {tabnr}]]) + The result is a String, which is the name of the current + working directory. + Without arguments, for the current window. + + With {winnr} return the local current directory of this window + in the current tab page. + With {winnr} and {tabnr} return the local current directory of + the window in the specified tab page. + Return an empty string if the arguments are invalid. getfsize({fname}) *getfsize()* 結果は数値で、{fname}で指定されるファイルのサイズをバイト単位 @@ -3368,6 +3552,8 @@ getftype({fname}) *getftype()* getftype("/home") < Note "link" などの種別はそれをサポートしているシステムでのみ返 される。"dir" と "file" しか返らないシステムもある。 + On MS-Windows a symbolic link to a + directory returns "dir" instead of "link". *getline()* getline({lnum} [, {end}]) @@ -3629,10 +3815,15 @@ has_key({dict}, {key}) *has_key()* 結果は数値で、辞書|Dictionary| {dict}がキー{key}の要素を持つな ら1、持たないなら0となる。 -haslocaldir() *haslocaldir()* - 結果は数値でカレントウィンドウが|:lcd|によってローカルなカレン - トディレクトリを持つようセットされているなら1、そうでないなら - 0となる。 +haslocaldir([{winnr} [, {tabnr}]]) *haslocaldir()* + 結果は数値でウィンドウが|:lcd|によってローカルなカレントディレ + クトリを持つようセットされているなら1、そうでないなら0となる。 + + Without arguments use the current window. + With {winnr} use this window in the current tab page. + With {winnr} and {tabnr} use the window in the specified tab + page. + Return 0 if the arguments are invalid. hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()* 結果は数値。右辺側(マップした先)の一部分に{what}を含むマッピン @@ -3949,6 +4140,48 @@ join({list} [, {sep}]) *join()* |string()|を使ったときと同じようにして文字列に変換される。 この逆を行う関数は|split()|である。 +jsondecode({string}) *jsondecode()* + This parses a JSON formatted string and returns the equivalent + in Vim values. See |jsonencode()| for the relation between + JSON and Vim values. + The decoding is permissive: + - A trailing comma in an array and object is ignored. + - An empty item in an array, two commas with nothing or white + space in between, results in v:none. + - When an object member name is not a string it is converted + to a string. E.g. the number 123 is used as the string + "123". + - More floating point numbers are recognized, e.g. "1." for + "1.0". + The result must be a valid Vim type: + - An empty object member name is not allowed. + - Duplicate object member names are not allowed. + +jsonencode({expr}) *jsonencode()* + Encode {expr} as JSON and return this as a string. + The encoding is specified in: + https://tools.ietf.org/html/rfc7159.html + Vim values are converted as follows: + Number decimal number + Float floating point number + String in double quotes (possibly null) + Funcref not possible, error + List as an array (possibly null); when + used recursively: [] + Dict as an object (possibly null); when + used recursively: {} + v:false "false" + v:true "true" + v:none nothing + v:null "null" + Note that using v:none is permitted, although the JSON + standard does not allow empty items. This can be useful for + omitting items in an array: + [0,,,,,5] ~ + This is much more efficient than: + [0,null,null,null,null,5] ~ + But a strict JSON parser will not accept it. + keys({dict}) *keys()* {dict}の全キーからなるリストを返す。リストの順序は不定である。 @@ -4259,7 +4492,7 @@ match({expr}, {pat}[, {start}[, {count}]]) *match()* 'magic' をオン、'cpoptions' を空にした状態で行われる。 *matchadd()* *E798* *E799* *E801* -matchadd({group}, {pattern}[, {priority}[, {id}]]) +matchadd({group}, {pattern}[, {priority}[, {id} [, {dict}]]]) カレントウィンドウで強調表示するパターンを定義する。このパター ンのことを「マッチ」と呼ぶ。構文グループ {group}で強調する。戻 り値は、マッチを識別する ID である。|matchdelete()|でこの ID @@ -4267,6 +4500,8 @@ matchadd({group}, {pattern}[, {priority}[, {id}]]) パターンは大文字小文字を区別し、magic (|/magic|) として解釈さ れる ({pattern} の中で明示的に変更しない限り)。オプションの 'magic'、'smartcase'、'ignorecase' は使用されない。 + The "Conceal" value is special, it causes the match to be + concealed. 省略可能な引数 {priority} はマッチの優先度を指定する。優先度が 高いマッチは、より低いマッチの強調を上書きする。優先度は整数で @@ -4280,8 +4515,17 @@ matchadd({group}, {pattern}[, {priority}[, {id}]]) すでに使われていたら、エラーメッセージが表示され、そのマッチは 登録されない。ID は正の整数を指定する(ゼロは除く)。ID 1, 2, 3 は |:match|, |:2match|, |:3match| 用に予約されている。{id} が - 指定されないときは、|matchadd()| が自動的に空いている ID を取 - 得する。 + 指定されないか -1 のときは、|matchadd()| が自動的に空いている + ID を取得する。 + + The optional {dict} argument allows for further custom + values. Currently this is used to specify a match specific + conceal character that will be shown for |hl-Conceal| + highlighted matches. The dict can have the following members: + + conceal Special character to show instead of the + match (only for |hl-Conceal| highlighed + matches, see |:syn-cchar|) コマンド |:match| と異なり、マッチの個数に上限はない。 @@ -4295,7 +4539,7 @@ matchadd({group}, {pattern}[, {priority}[, {id}]]) |getmatches()| で取得できる。全てのマッチを削除するのは |clearmatches()| 一発でできる。 -matchaddpos({group}, {pos}[, {priority}[, {id}]]) *matchaddpos()* +matchaddpos({group}, {pos}[, {priority}[, {id}[, {dict}]]]) *matchaddpos()* |matchadd()| と同じだが、パターンを指定するのではなく、位置の リスト {pos} を指定する。このコマンドは正規表現を扱う必要もな く、画面更新のためにバッファ行の境界を設定するため、 @@ -4502,6 +4746,17 @@ pathshorten({expr}) *pathshorten()* < ~/.v/a/myfile.vim ~ パスが実際に存在するかどうかは関係ない。 +perleval({expr}) *perleval()* + Evaluate Perl expression {expr} in scalar context and return + its result converted to Vim data structures. If value can't be + converted, it is returned as a string Perl representation. + Note: If you want an array or hash, {expr} must return a + reference to it. + Example: > + :echo perleval('[1 .. 4]') +< [1, 2, 3, 4] + {only available when compiled with the |+perl| feature} + pow({x}, {y}) *pow()* {x} の {y} 乗を |Float| で返す。{x} と {y} は |Float| または |Number| に評価されなければならない。 @@ -4954,13 +5209,14 @@ search({pattern} [, {flags} [, {stopline} [, {timeout}]]]) *search()* {flags} は以下のフラグ文字からなる文字列 'b' 後方(上方)に検索する - 'c' カーソル位置のマッチを受け入れる + 'c' カーソル位置のマッチを受け入れる 'e' マッチの末尾へ移動する 'n' カーソルを移動させない 'p' 部分パターン(後述)のマッチの番号を返す 's' 以前のカーソル位置をマーク ' に記録する 'w' ファイルの末尾で循環する 'W' ファイルの末尾で循環しない + 'z' start searching at the cursor column instead of zero 'w' と 'W' の両方とも指定されない場合は 'wrapscan' が適用され る。 @@ -4969,6 +5225,12 @@ search({pattern} [, {flags} [, {stopline} [, {timeout}]]]) *search()* 'ignorecase', 'smartcase', 'magic' が適用される。 + When the 'z' flag is not given, searching always starts in + column zero and then matches before the cursor are skipped. + When the 'c' flag is present in 'cpo' the next search starts + after the match. Without the 'c' flag the next search starts + one column further. + 引数{stopline}が指定されたときはこの行を検索した後で検索を停止 する。これは検索する行を制限するために有用である。例: > let match = search('(', 'b', line("w0")) @@ -5143,6 +5405,23 @@ searchpos({pattern} [, {flags} [, {stopline} [, {timeout}]]]) *searchpos()* < この例において、"submatch" は小文字|/\l|が見つかったとき2とな り、大文字|/\u|が見つかったとき3となる。 +sendexpr({handle}, {expr} [, {callback}]) *sendexpr()* + Send {expr} over JSON channel {handle}. See |channel-use|. + + When {callback} is given returns immediately. Without + {callback} waits for a JSON response and returns the decoded + expression. When there is an error or timeout returns an + empty string. + + When {callback} is zero no response is expected. + Otherwise {callback} must be a Funcref or the name of a + function. It is called when the response is received. See + |channel-callback|. + +sendraw({handle}, {string} [, {callback}]) *sendraw()* + Send {string} over raw channel {handle}. See |channel-raw|. + Works like |sendexpr()|, but does not decode the response. + server2client( {clientid}, {string}) *server2client()* {clientid}に返信文字列を送る。最後に文字列を送った{clientid}は expand("")で取得できる。 @@ -5176,6 +5455,26 @@ setbufvar({expr}, {varname}, {val}) *setbufvar()* :call setbufvar("todo", "myvar", "foobar") < サンドボックスの中ではこの関数は使用できない。 +setcharsearch({dict}) *setcharsearch()* + Set the current character search information to {dict}, + which contains one or more of the following entries: + + char character which will be used for a subsequent + |,| or |;| command; an empty string clears the + character search + forward direction of character search; 1 for forward, + 0 for backward + until type of character search; 1 for a |t| or |T| + character search, 0 for an |f| or |F| + character search + + This can be useful to save/restore a user's character search + from a script: > + :let prevsearch = getcharsearch() + :" Perform a command which clobbers user's search + :call setcharsearch(prevsearch) +< Also see |getcharsearch()|. + setcmdpos({pos}) *setcmdpos()* コマンドラインの{pos}バイトの位置へカーソルを移動する。 {pos}は1から始まる。 @@ -5413,17 +5712,8 @@ shellescape({string} [, {special}]) *shellescape()* shiftwidth() *shiftwidth()* 実際に使用される 'shiftwidth' の値を返す。'shiftwidth' がゼロ 以外の場合はその値が返る。ゼロの場合は 'tabstop' の値が返る。 - インデントプラグインで後方互換性を保つには次のようにする: > - if exists('*shiftwidth') - func s:sw() - return shiftwidth() - endfunc - else - func s:sw() - return &sw - endfunc - endif -< そして、&sw の代わりに s:sw() を使う。 + この関数は2012年のパッチ 7.3.694 で導入されたので、現在では皆 + 使えるようになっているに違いない。 simplify({filename}) *simplify()* @@ -5481,6 +5771,13 @@ sort({list} [, {func} [, {dict}]]) *sort()* *E702* 細: 数値の読み込みには strtod() 関数が使われる。文字列、リス ト、辞書、関数参照は 0 として扱われる)。 + When {func} is given and it is 'N' then all items will be + sorted numerical. This is like 'n' but a string containing + digits will be used as the number they represent. + + When {func} is given and it is 'f' then all items will be + sorted numerical. All values must be a Number or a Float. + {func}に|Funcref|または関数名を指定すると、その関数を使って要 素を比較する。その関数は2つの要素を引数として受け取り、それら が等しいときは0、1番目の引数を2番目より後にするなら1以上、1番 @@ -5580,7 +5877,7 @@ split({expr} [, {pattern} [, {keepempty}]]) *split()* < 文字列を各文字に分割するには: > :for c in split(mystring, '\zs') < 区切り文字を削除せず、そのままにしておきたい場合は、'\zs' を - 使えばよい: > + パターンの最後で使う: > :echo split('abc:def:ghi', ':\zs') < ['abc:', 'def:', 'ghi'] ~ 最初の要素が空であるかもしれないテーブルを分割するには: > @@ -5618,12 +5915,14 @@ str2float( {expr}) *str2float()* str2nr( {expr} [, {base}]) *str2nr()* 文字列{expr}を数値に変換する。 - {base}は変換の底。8、10、16のいずれか。 + {base}は変換の底。2、8、10、16のいずれか。 {base}を省略すると10となる。そのため、文字列の先頭に0があると き、デフォルトの文字列・数値変換とは異なり、8進数とは解釈され ない。 {base}が16のとき、文字列の先頭の "0x" と "0X" は無視される。そ - れ以外の底の場合は0となる。 + れ以外の底の場合は0となる。 Similarly, when + {base} is 8 a leading "0" is ignored, and when {base} is 2 a + leading "0b" or "0B" is ignored. 数値の後のテキストは暗黙に無視される。 strchars({expr} [, {skipcc}]) *strchars()* @@ -5634,6 +5933,24 @@ strchars({expr} [, {skipcc}]) *strchars()* {訳注: 基底文字と結合文字をまとめて1としてカウントする} |strlen()|, |strdisplaywidth()|, |strwidth()| も参照。 + + {skipcc} is only available after 7.4.755. For backward + compatibility, you can define a wrapper function: > + if has("patch-7.4.755") + function s:strchars(str, skipcc) + return strchars(a:str, a:skipcc) + endfunction + else + function s:strchars(str, skipcc) + if a:skipcc + return strlen(substitute(a:str, ".", "x", "g")) + else + return strchars(a:str) + endif + endfunction + endif +< + strdisplaywidth({expr}[, {col}]) *strdisplaywidth()* 結果は数値で、文字列 {expr} が {col} で始まる時のスクリーン上 での表示セル幅を返す。 @@ -5818,6 +6135,9 @@ synID({lnum}, {col}, {trans}) *synID()* 最左のカラムを指定するには{col}に1を、最初の行を指定するには {line}に1を指定する。'synmaxcol' が適用され、長すぎる行では0が 返ってくる。 + Note that when the position is after the last character, + that's where the cursor can be in Insert mode, synID() returns + zero. {trans}が非ゼロならば、透過属性のアイテムは省略され、実際に表 示されているアイテムが評価対象になる。これは実際に有効になって @@ -6116,6 +6436,8 @@ type({expr}) {expr}の型を示す数値を返す: リスト: 3 辞書: 4 浮動小数点数: 5 + Boolean: 6 (v:false and v:true) + None 7 (v:null and v:none) マジックナンバーを使わずに、次のような使い方をすべきである: > :if type(myvar) == type(0) :if type(myvar) == type("") @@ -6123,6 +6445,8 @@ type({expr}) {expr}の型を示す数値を返す: :if type(myvar) == type([]) :if type(myvar) == type({}) :if type(myvar) == type(0.0) + :if type(myvar) == type(v:false) + :if type(myvar) == type(v:none undofile({name}) *undofile()* {name} という名前のファイルの保存時に使用されるアンドゥファイ @@ -6360,6 +6684,27 @@ winwidth({nr}) *winwidth()* : exe "normal 50\|" :endif < +wordcount() *wordcount()* + The result is a dictionary of byte/chars/word statistics for + the current buffer. This is the same info as provided by + |g_CTRL-G| + The return value includes: + bytes Number of bytes in the buffer + chars Number of chars in the buffer + words Number of words in the buffer + cursor_bytes Number of bytes before cursor position + (not in Visual mode) + cursor_chars Number of chars before cursor position + (not in Visual mode) + cursor_words Number of words before cursor position + (not in Visual mode) + visual_bytes Number of bytes visually selected + (only in Visual mode) + visual_chars Number of chars visually selected + (only in Visual mode) + visual_words Number of chars visually selected + (only in Visual mode) + *writefile()* writefile({list}, {fname} [, {flags}]) |List| {list}をファイル{fname}に書き込む。リストの各要素は改行 diff --git a/doc/if_lua.jax b/doc/if_lua.jax index e3517d8a4..83e4755d6 100644 --- a/doc/if_lua.jax +++ b/doc/if_lua.jax @@ -1,4 +1,4 @@ -*if_lua.txt* For Vim バージョン 7.4. Last change: 2012 Jun 29 +*if_lua.txt* For Vim バージョン 7.4. Last change: 2015 Oct 16 VIMリファレンスマニュアル by Luis Carvalho @@ -10,9 +10,11 @@ Vim の Lua インターフェイス *lua* *Lua* 2. vim モジュール |lua-vim| 3. List ユーザーデータ |lua-list| 4. Dict ユーザーデータ |lua-dict| -5. バッファユーザーデータ |lua-buffer| -6. ウィンドウユーザーデータ |lua-window| -7. luaeval 関数 |lua-luaeval| +5. Funcref userdata |lua-funcref| +6. バッファユーザーデータ |lua-buffer| +7. ウィンドウユーザーデータ |lua-window| +8. luaeval 関数 |lua-luaeval| +9. Dynamic loading |lua-dynamic| {Vi にはこれらのコマンドはありません} @@ -110,9 +112,31 @@ Lua からは "vim" モジュールを使って Vim を操作します。範囲 バッファ操作、ウィンドウ操作、現在行の取得、Vim 式評価、Vim コマンド実行、など のルーチンが含まれています。 - vim.list() 空のリストを返す (|List| 参照)。 - - vim.dict() 空の辞書を返す (|Dictionary| 参照)。 + vim.list([arg]) Returns an empty list or, if "arg" is a Lua + table with numeric keys 1, ..., n (a + "sequence"), returns a list l such that l[i] = + arg[i] for i = 1, ..., n (see |List|). + Non-numeric keys are not used to initialize + the list. See also |lua-eval| for conversion + rules. Example: > + :lua t = {math.pi, false, say = 'hi'} + :echo luaeval('vim.list(t)') + :" [3.141593, 0], 'say' is ignored +< + vim.dict([arg]) Returns an empty dictionary or, if "arg" is a + Lua table, returns a dict d such that d[k] = + arg[k] for all string keys k in "arg" (see + |Dictionary|). Number keys are converted to + strings. Keys that are not strings are not + used to initialize the dictionary. See also + |lua-eval| for conversion rules. Example: > + :lua t = {math.pi, false, say = 'hi'} + :echo luaeval('vim.dict(t)') + :" {'say': 'hi'}, numeric keys ignored +< + vim.funcref({name}) Returns a Funcref to function {name} (see + |Funcref|). It is equivalent to Vim's + "function". NOT IMPLEMENTED YET vim.buffer([arg]) "arg" が数値ならバッファリストの "arg" 番の バッファを返す。"arg" が文字列ならフルパスか @@ -131,9 +155,9 @@ Lua からは "vim" モジュールを使って Vim を操作します。範囲 vim.type({arg}) {arg} の型を返す。これは Lua の "type" 関数と 同じようなものですが、{arg} がリスト、辞書、 - バッファ、ウィンドウのときに、 "list"、 - "dict"、"buffer"、"window" をそれぞれ返しま - す。例: > + 関数参照、バッファ、ウィンドウのときに、 + "list"、"dict"、"funcref"、"buffer"、"window" + をそれぞれ返します。例: > :lua l = vim.list() :lua print(type(l), vim.type(l)) :" userdata list @@ -226,7 +250,40 @@ list ユーザーデータと同様、dict ユーザーデータは vim の辞 < ============================================================================== -5. バッファユーザーデータ *lua-buffer* +5. Funcref userdata *lua-funcref* + +Funcref userdata represent funcref variables in Vim. Funcrefs that were +defined with a "dict" attribute need to be obtained as a dictionary key +in order to have "self" properly assigned to the dictionary (see examples +below.) A funcref "f" has the following properties: + +Properties +---------- + o "#f" is the name of the function referenced by "f" + o "f(...)" calls the function referenced by "f" (with arguments) + +Examples: +> + :function I(x) + : return a:x + : endfunction + :let R = function('I') + :lua i1 = vim.funcref('I') + :lua i2 = vim.eval('R') + :lua print(#i1, #i2) -- both 'I' + :lua print(i1, i2, #i2(i1) == #i1(i2)) + :function Mylen() dict + : return len(self.data) + : endfunction + :let mydict = {'data': [0, 1, 2, 3]} + :lua d = vim.eval('mydict'); d.len = vim.funcref('Mylen') + :echo mydict.len() + :lua l = d.len -- assign d as 'self' + :lua print(l()) +< + +============================================================================== +6. バッファユーザーデータ *lua-buffer* バッファユーザーデータは Vim のバッファを表します。バッファユーザーデータ "b" は以下のプロパティとメソッドを持っています: @@ -277,7 +334,7 @@ list ユーザーデータと同様、dict ユーザーデータは vim の辞 < ============================================================================== -6. ウィンドウユーザーデータ *lua-window* +7. ウィンドウユーザーデータ *lua-window* ウィンドウオブジェクトは Vim のウィンドウを表します。ウィンドウユーザーデータ "w" は以下のプロパティとメソッドを持っています: @@ -309,7 +366,7 @@ list ユーザーデータと同様、dict ユーザーデータは vim の辞 < ============================================================================== -7. luaeval 関数 *lua-luaeval* *lua-eval* +8. luaeval 関数 *lua-luaeval* *lua-eval* "luaeval" は "vim.eval" と対となる関数で Lua の値を Vim に渡すことができます。 "luaeval" は式文字列と任意の引数を受け取り、式の結果を返します。意味的には次の @@ -321,7 +378,13 @@ Lua コードと同じです: return chunk(arg) -- return typval end < -Note "_A" には "luaeval" の引数が渡されます。例: > +Note "_A" には "luaeval" の引数が渡されます。 Lua numbers, strings, and +list, dict, and funcref userdata are converted to their Vim respective types, +while Lua booleans are converted to numbers. An error is thrown if conversion +of any of the remaining Lua types, including userdata other than lists, dicts, +and funcrefs, is attempted. + +例: > :echo luaeval('math.pi') :lua a = vim.list():add('newlist') @@ -333,5 +396,24 @@ Note "_A" には "luaeval" の引数が渡されます。例: > :echo Rand(1,10) +============================================================================== +9. Dynamic loading *lua-dynamic* + +On MS-Windows and Unix the Lua library can be loaded dynamically. The +|:version| output then includes |+lua/dyn|. + +This means that Vim will search for the Lua DLL or shared library file only +when needed. When you don't use the Lua interface you don't need it, thus +you can use Vim without this file. + +On MS-Windows to use the Lua interface the Lua DLL must be in your search path. +In a console window type "path" to see what directories are used. The version +of the DLL must match the Lua version Vim was compiled with. + +On Unix the 'luadll' option can be used to specify the Lua shared library file +instead of DYNAMIC_LUA_DLL file what was specified at compile time. The +version of the shared library must match the Lua version Vim was compiled with. + + ============================================================================== vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/doc/os_os2.jax b/doc/os_os2.jax index fca599bea..f278f613c 100644 --- a/doc/os_os2.jax +++ b/doc/os_os2.jax @@ -1,4 +1,4 @@ -*os_os2.txt* For Vim バージョン 7.4. Last change: 2007 Apr 22 +*os_os2.txt* For Vim バージョン 7.4. Last change: 2015 Dec 31 VIMリファレンスマニュアル by Paul Slootman @@ -7,202 +7,7 @@ *os2* *OS2* *OS/2* このファイルはVimのOS/2バージョンの詳細について述べている。 -現在のところ、VimのGUIバージョンのネイティブPMは存在しない: OS/2バージョンはコ -ンソールアプリケーションである。しかしながら、Warp4(Win32sをサポートしている) -のユーザーならば、Win-OS/2セッションで使用できるWin32s互換のGUIバージョンが存 -在する。このファイルではネイティブのコンソールバージョンについて言及する。 +OS/2 サポートはパッチ 7.4.1008 で削除された。 -注意 ~ - -このOS/2への移植版や、私 {訳注: 筆者Paul Slootman} や、何人かのOS/2ユーザーに -とってはちゃんと動作する;しかしフィードバックは少ししかもらえてないので、(OS/2 -特有の)バグがまったく(以下で言及するものを加えても)無いか、バグが現れるような -状況にまだ誰も至っていないのか、のどちらかである。DosとUnixモードでのファイル -入出力、バイナリモード、FATの取り扱いなどは、トラブルになっても良さそうだが、 -全て正しく動いている。 - -知られている問題の一つは、Vimによって開かれたファイルが、Vimのシェルエスケープ -経由で起動されたプログラムによって、継承されてしまうことである。これは特に、そ -の時実行されていたほかのプログラムがあると、そのプログラムが終了するまで、Vim -がバッファに関連付けられたスワップファイルを消すことができないことを意味する。 -スワップファイルを消す時に、Vimは消去に失敗してしまうので結局消すことができな -い。そのファイルに対して再びVimセッションを開始しようとすると、警告メッセージ -を受け取ることになる。これは ":!start epm" とすると再現できる。Vimを一度終了し、 -epmをスタートした時に編集していたファイルを開いてみよう。いま、これの修正を試 -みている。 - -2つ目の問題は、OS/2システムをUnixに対してtelnetしてVimを起動したように、ネット -ワーク経由で使用している状況を、Vimが検出できないことにある。OS/2が「時々」 -ファンクションやカーソルキーを認識し、対応する普通のPCのキーボードから生成され -るOS/2のコードへ変換することから、生じる問題のようである。既に幾つか実験はして -いる(OS/2コードを正しい機能にマッピングしたり)が、最終的なことは何も言えない -(余談だがこれはWarp 3で起こる)。そのうち正しく理解されるだろう。 - - -必要条件 ~ - -Vimを実行するために、emxのランタイム環境が必要になる(最新版は0.9b)。大体次の名 -前で存在する(それについてArchieに聞け {訳注: 本当?}): - - emxrt.zip emx runtime package - -LIBPATHに示されるディレクトリのどれかに置くべき、emx.dllのコピーを同梱してあ -る。EmxはGPLに基づき配布されるが、emx.dllライブラリはそうではない(どういう意味 -かはCOPYING.EMXを参照すればわかる)。 - -このemx.dllは、emxfix04.zipパッケージの中にあったもので、残念なことにPOSIXの機 -能であるselect()にバグ持ちである。Vimの3.27よりも古いバージョンは起動する時に -ハングしてしまう(正確にはvimrcの読み込み中)。これが起こってしまうと、Vimが起動 -するまでに何回かを叩くことになる。そんときゃVimを更新したほうが良い。 - - -ヘルプとVIMRCファイル ~ - -手に入れたVimのアーカイブを解凍し、解凍した場所からVimを直接起動すれば、Vimは -ランタイムに必要になるファイルや.vimrcを見つけることができるので、特に設定は要 -らない。 - -ランタイムファイルをバイナリとは別の場所に置くならば、環境変数VIMがヘルプファ -イルやシステムの .vimrc の場所を見つけるのに使用される。次のようなエントリを -CONFIG.SYSに書く: > - - SET VIM=c:/local/lib/vim - -このディレクトリに.vimrcファイルと、その他のVim用ファイルを置く。runtimeディレ -クトリをこのディレクトリにコピーする。Vimはバージョン毎に独自のruntimeディレク -トリを持っている。それは "c:/local/lib/vim/vim54" のように呼ばれる。これでこの -ようなVimのツリーができあがる: - c:/local/lib/vim/.vimrc - c:/local/lib/vim/vim54/filetype.vim - c:/local/lib/vim/vim54/doc/help.txt - etc. - -Note: OS/2をFATファイルシステムにインストールした場合に対応するため、.vimrc -ファイルは_vimrcでも構わない。Vimはまず.vimrcを探し、それに失敗したら同じ場所 -で_vimrcを探す。.vimrcもしくは_vimrcの存在が 'compatible' オプションに影響を与 -え、思わぬ副作用を生むことがある。|'compatible'| 参照。 - -OS/2でネットワークドライバを使用するならば、ネットワークドライブにVimをインス -トールすることができ(.vimrcファイルを含めて; これを「システム」vimrcファイルと -言う)、個人的な.vimrcのコピーを使う(これが「ユーザー」vimrcファイル)。ユーザー -vimrcファイルは環境変数HOMEに示されるディレクトリに置く。 - - -ファイル名内の環境変数 ~ - -環境変数HOMEは、ファイル名のなかで~が使用されたときにも使われ、":e ~/textfile" -はHOMEによって示されるディレクトリにある "textfile" を編集することになる。さら -にその他の環境変数も、":n $SRC/*.c" のようにファイル名の中に使用することができ -る。 - -環境変数HOMEha.viminfoファイルの位置を指定するのにも使われる(|viminfo-file|参 -照)。FATファイルシステム上に.viminfoを置くことには、申し訳ないがまだ対応してい -ない。しかし、-iの起動フラグ("vim -i $HOME/_viminfo" のように)を試すことはでき -る。 - -環境変数HOMEが指定されていない場合は、デフォルトとして "C:/" が使用される。 - - -バックスラッシュ ~ - -スラッシュ('/')とバックスラッシュ('\')を使うと、ちょっとした問題がある(詳しい -説明は|dos-backslash|)が、Vimはほとんどの場合「正しい」判断をする。Vim自身も -ファイル名にバックスラッシュを使うが、しかし幸いにも入力されれば普通のスラッ -シュも受け付ける(実際、そうしたほうが都合が良い事がある)。 - - -一時ファイル ~ - -一時ファイル(フィルタリング用)は次に示すディレクトリで、ファイルを作成できた最 -初のディレクトリに置かれる: - $TMP - $TEMP - C:\TMP - C:\TEMP - 現在のディレクトリ - - -端末設定 ~ - - *os2ansi* -環境変数TERMには "os2ansi" を用いる(もしくは何もしない、デフォルトで正しく設定 -される)。他のアプリケーション用にTERMを別の値に設定しなければならない時には、 -.vimrcの中で端末としてos2ansiを設定することができる。OS/2のANSIエミュレーショ -ンにはかなり制限があることは問題である(例えば行単位での挿入や削除が無い)。 - -もしも(別のプログラムを使用しているとかで) TERMとして別の値を使いたいならば、 -TERMに設定する値が、termcapに適切なキーマッピングを持つエントリとして含まれて -いるか確認する。emxと一緒に配布されるtermcap.datが常にあるとは限らない。選択し -たtermcapエントリに付け加えるのに適当な値の幾つかがこれである; これらはカーソ -ルキーや、名前つき機能キー(pagedownとか)が効くようにしている。 - - :ku=\316H:kd=\316P:kl=\316K:kr=\316M:%i=\316t:#4=\316s:\ - :kD=\316S:kI=\316R:kN=\316Q:kP=\316I:kh=\316G:@7=\316O:\ - :k1=\316;:k2=\316<:k3=\316=:k4=\316>:k5=\316?:k6=\316@:\ - :k7=\316A:k8=\316B:k9=\316C:k;=\316D: - - -Paul Slootman - - -43行ウィンドウ ~ - -Steven Tryonが提案した、大きなウィンドウでVimを起動する方法: - -PMMailのようなOS/2 WPSのアプリケーションからVimを起動する時には、デフォルトの -25行モードで起動する。快適なウィンドウサイズで使うために、独自の拡張エディタを -"vimbig.cmd" として定義し、'vimbig2.cmd" を呼ぶようにする。多分、かなり強引な -方法だけど、でもちゃんと動く。 - -vimbig.cmd: > - @echo off - start "Vi Improved" /f vimbig2.cmd %1 %2 %3 %4 - -vimbig2.cmd: > - @echo off - mode 80,43 - vim.exe %1 %2 %3 %4 - exit -< - -クリップボードを使う (Alexander Wagnerの提供) - -OS/2版のVimはシステムのクリップボードに直接アクセスできない。クリップボードを -使うにはほかのアプリケーションを経由する必要がある。これには Stefan Gruendel -によるフリーソフトのパッケージ clipbrd.zip が使える。コンパイルされたバイナリ -と全てのソースがここからダウンロードできる: - http://www.os2site.com/sw/util/clipboard/index.html - http://download.uni-hd.de/ftp/pub/os2/pmtools/ - -このパッケージのインストールは、パッケージに入っている二つの実行可能ファイルを -Vimから呼び出せるようにPATHが通ったディレクトリに置くだけである。 - -クリップボードからVimにコピーするには :r コマンドを使う。次のようにして -clipbrd.exeを呼び出すだけだ: > - - :r !clipbrd -r - -Vimからシステムのクリップボードにコピーするには普通にテキストを選択して次の -ようにする: > - - :!clipbrd -w - -これで選択したものをOS/2のクリップボードに書き込める。 - -簡単に使えるようにこれらのコマンドをマッピングしておくとよい。例えばクリップ -ボードからVimに貼り付けるのに F11 を使い、選択したテキストをクリップボードにコ -ピーするのに F12 を使うなら: > - - if has("os2") - imap :r !clipbrd -ri - vmap :!clipbrd -w - else - imap "*pi - vmap "*y - endif - -これはOS/2では clipbrd を使い他のプラットフォームではVimの機能を使う。(この -機能をいつも有効にしておくには .vimrc に上記の内容を書いておく) - vim:tw=78:ts=8:ft=help:norl: From 0f2b6c39bb64ad85970c3a99105995071c9020c7 Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Sat, 30 Jan 2016 16:57:56 +0900 Subject: [PATCH 07/11] fix doc --- catchup-7.4.1194.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/catchup-7.4.1194.md b/catchup-7.4.1194.md index c831d43b1..49addb180 100644 --- a/catchup-7.4.1194.md +++ b/catchup-7.4.1194.md @@ -33,10 +33,9 @@ doc/change.jax doc/develop.jax doc/editing.jax - doc/eval.jax doc/fold.jax doc/hangulin.jax - doc/if_lua.jax + doc/if_lua.jax # 100行超えたけど、内容的に大したことない doc/if_mzsch.jax doc/if_perl.jax doc/if_pyth.jax @@ -57,6 +56,8 @@ こっから先は100行超えるので、嫌。 + doc/eval.jax + ### 完訳! doc/cmdline.jax From d77bd19c47da96182aab4be133dea29c58fe97c6 Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Sat, 30 Jan 2016 17:51:52 +0900 Subject: [PATCH 08/11] more impose english --- catchup-7.4.1194.md | 6 +- doc/options.jax | 18 +++- doc/syntax.jax | 159 +++++++++++++++++++++------ doc/usr_02.jax | 257 +++++++++++++++++++++++++++++++++----------- doc/windows.jax | 156 +++++++++++++++++++-------- 5 files changed, 451 insertions(+), 145 deletions(-) diff --git a/catchup-7.4.1194.md b/catchup-7.4.1194.md index 49addb180..a671f4f62 100644 --- a/catchup-7.4.1194.md +++ b/catchup-7.4.1194.md @@ -21,9 +21,6 @@ doc/options.jax doc/pi_netrw.jax - doc/syntax.jax - doc/usr_02.jax - doc/windows.jax ### 英文だけは反映済み @@ -50,6 +47,7 @@ doc/spell.jax doc/tagsrch.jax doc/term.jax + doc/usr_02.jax # 行数は多いけど、まとまった書き換えで、楽そう doc/usr_03.jax doc/usr_41.jax doc/various.jax @@ -57,6 +55,8 @@ こっから先は100行超えるので、嫌。 doc/eval.jax + doc/syntax.jax + doc/windows.jax ### 完訳! diff --git a/doc/options.jax b/doc/options.jax index 31a7a95d7..794f4a4ec 100644 --- a/doc/options.jax +++ b/doc/options.jax @@ -1,4 +1,4 @@ -*options.txt* For Vim バージョン 7.4. Last change: 2014 Sep 09 +*options.txt* For Vim バージョン 7.4. Last change: 2016 Jan 19 VIMリファレンスマニュアル by Bram Moolenaar @@ -71,9 +71,19 @@ Vimには、特別な働きをさせるための多くの内部変数とスイ :se[t] {option}&vi オプションをViの既定値に設定する。 {Vi にはない} :se[t] {option}&vim オプションをVimの既定値に設定する。 {Vi にはない} -:se[t] all& ターミナルオプション以外の全てのオプションを既定値に設 - 定する。オプション 'term', 'lines' と 'columns' の値は - 変更されない。 {Vi にはない} +:se[t] all& 全てのオプションを規定値に設定する。ただし以下のオプ + ションについては変更しない。 + t_ で始まる端末用のオプション全部 + 'columns' + 'cryptmethod' + 'encoding' + 'key' + 'lines' + 'term' + 'ttymouse' + 'ttytype' + 警告: これにはたくさんの副作用があるだろう。 + {Vi にはない} *:set-args* *E487* *E521* :se[t] {option}={value} または diff --git a/doc/syntax.jax b/doc/syntax.jax index 845f4facb..03c8177ac 100644 --- a/doc/syntax.jax +++ b/doc/syntax.jax @@ -1,4 +1,4 @@ -*syntax.txt* For Vim バージョン 7.4. Last change: 2014 Sep 27 +*syntax.txt* For Vim バージョン 7.4. Last change: 2016 Jan 28 VIMリファレンスマニュアル by Bram Moolenaar @@ -210,7 +210,8 @@ NOTE: 長い行があって表示が遅く、構文ハイライトをオフに プそれ自体は、色や属性を指定するものではない。 ハイライトや構文グループの名前はASCII文字、数字、アンダースコアだけでつけなけ -ればならない。正規表現では: "[a-zA-Z0-9_]*" +ればならない。正規表現では: "[a-zA-Z0-9_]*" しかしそれ以外の文字を使ってもVim +はエラーを出力しない。 各ユーザーが好みの色セットを使用できるように、多くの言語に共通するハイライトグ ループには優先名が与えられている。推奨されているグループ名は以下のとおり(構文 @@ -723,6 +724,22 @@ UTF-8 を使用するが、代わりに UTF-16 や UTF-32 を使うようにす Note: UTF-32 か UTF-16 でエンコードされたドキュメントはいくつかのメジャーブラ ウザで互換性の問題があることが知られている。 + *g:html_font* +Default: "monospace" +You can specify the font or fonts used in the converted document using +g:html_font. If this option is set to a string, then the value will be +surrounded with single quotes. If this option is set to a list then each list +item is surrounded by single quotes and the list is joined with commas. Either +way, "monospace" is added as the fallback generic family name and the entire +result used as the font family (using CSS) or font face (if not using CSS). +Examples: > + + " font-family: 'Consolas', monospace; + :let g:html_font = "Consolas" + + " font-family: 'DejaVu Sans Mono', 'Consolas', monospace; + :let g:html_font = ["DejaVu Sans Mono", "Consolas"] +< *convert-to-XML* *convert-to-XHTML* *g:html_use_xhtml* 初期設定: 0 0 なら、標準 HTML 4.01 を生成する (可能なら strict)。 @@ -1038,7 +1055,8 @@ CPP *cpp.vim* *ft-cpp-syntax* 大部分は |ft-c-syntax| と同じ。 変数 強調表示 ~ -cpp_no_c11 C++11 標準のアイテムを強調表示しない +cpp_no_cpp11 C++11 標準のアイテムを強調表示しない +cpp_no_cpp14 C++14 標準のアイテムを強調表示しない CSH *csh.vim* *ft-csh-syntax* @@ -1102,6 +1120,16 @@ iniファイルをハイライトする。ただし次をvimrcファイルに書 :let enforce_freedesktop_standard = 1 +DIFF *diff.vim* + +The diff highlighting normally finds translated headers. This can be slow if +there are very long lines in the file. To disable translations: > + + :let diff_translations = 0 + +Also see |diff-slow|. + + DIRCOLORS *dircolors.vim* *ft-dircolors-syntax* dircolorsユーティリティ用のハイライト定義には、Slackware GNU/Linuxディストリ @@ -1380,22 +1408,28 @@ Fortran のソースコードには固定形式と自由形式が有る。形式 :let fortran_fixed_source=1 これも.vimrcでコマンド:syntaxを実行する前に行う必要がある。 -ソースコードの形式がファイル拡張子によって決定できる場合には、ftpluginファイル -の1つでfortran_free_sourceを設定すると便利になる。ftpluginファイルについての詳 -細は|ftplugin|を参照のこと。例えば、拡張子.f90を持つファイルについては全て自由 -形式として扱い、それ以外のものは固定形式とする場合には、次のコードをftplugin -ファイルに記述すれば良い。 > - let s:extfname = expand("%:e") - if s:extfname ==? "f90" - let fortran_free_source=1 - unlet! fortran_fixed_source - else - let fortran_fixed_source=1 - unlet! fortran_free_source - endif -これは.vimrcで "syntax on" より前に "filetype plugin indent on" が書かれていな -いと機能しないことに注意。 - +If the form of the source code depends, in a non-standard way, upon the file +extension, then it is most convenient to set fortran_free_source in a ftplugin +file. For more information on ftplugin files, see |ftplugin|. Note that this +will work only if the "filetype plugin indent on" command precedes the "syntax +on" command in your .vimrc file. + +When you edit an existing fortran file, the syntax script will assume free +source form if the fortran_free_source variable has been set, and assumes +fixed source form if the fortran_fixed_source variable has been set. If +neither of these variables have been set, the syntax script attempts to +determine which source form has been used by examining the file extension +using conventions common to the ifort, gfortran, Cray, NAG, and PathScale +compilers (.f, .for, .f77 for fixed-source, .f90, .f95, .f03, .f08 for +free-source). If none of this works, then the script examines the first five +columns of the first 500 lines of your file. If no signs of free source form +are detected, then the file is assumed to be in fixed source form. The +algorithm should work in the vast majority of cases. In some cases, such as a +file that begins with 500 or more full-line comments, the script may +incorrectly decide that the fortran code is in fixed form. If that happens, +just add a non-comment statement beginning anywhere in the first five columns +of the first twenty five lines, save (:w) and then reload (:e!) the file. +{参考用の旧訳: 既存のFortranファイルを編集する時には、変数fortran_free_sourceが設定されていれ ば構文ファイルは自由形式のソースであると仮定し、変数fortran_fixed_sourceが設定 されていれば固定形式のソースであると仮定する。どちらも設定されていないときに @@ -1406,6 +1440,7 @@ Fortran のソースコードには固定形式と自由形式が有る。形式 るようなファイルでは、構文ファイルが固定形式コードであると誤った判断をしてしま うだろう。そのような場合には、ファイルの先頭250行の行頭5桁のどこかに、コメント 以外の命令文を追加し、ファイルの保存 (:w) そして再読込 (:e!) を行えば良い。 +:旧訳ここまで} Fortranファイル内のタブ文字 ~ 標準のFortranではタブ文字は認識されない。固定桁位置での境界を必要とする固定形 @@ -3105,6 +3140,7 @@ g:vimsyn_embed オプションは、どの外部スクリプト言語の埋め 定する。 > g:vimsyn_embed == 0 : どのスクリプトの埋め込みも対応しない + g:vimsyn_embed =~ 'l' : 埋め込み lua をサポート g:vimsyn_embed =~ 'm' : 埋め込み mzscheme をサポート g:vimsyn_embed =~ 'p' : 埋め込み perl をサポート g:vimsyn_embed =~ 'P' : 埋め込み python をサポート @@ -3121,6 +3157,7 @@ syntax/vim.vim によって折り畳みが可能である: > g:vimsyn_folding == 0 または変数が存在しない: 構文ベースの折り畳みはしない g:vimsyn_folding =~ 'a' : augroups g:vimsyn_folding =~ 'f' : 関数を折り畳む + g:vimsyn_folding =~ 'l' : lua スクリプトを折り畳む g:vimsyn_folding =~ 'm' : mzscheme スクリプトを折り畳む g:vimsyn_folding =~ 'p' : perl スクリプトを折り畳む g:vimsyn_folding =~ 'P' : python スクリプトを折り畳む @@ -3196,6 +3233,31 @@ xpm.vimは編集中のXPMファイルの内容から、動的に構文要素を :set guifont=-*-clean-medium-r-*-*-8-*-*-*-*-80-* +YAML *yaml.vim* *ft-yaml-syntax* + + *g:yaml_schema* *b:yaml_schema* +A YAML schema is a combination of a set of tags and a mechanism for resolving +non-specific tags. For user this means that YAML parser may, depending on +plain scalar contents, treat plain scalar (which can actually be only string +and nothing else) as a value of the other type: null, boolean, floating-point, +integer. `g:yaml_schema` option determines according to which schema values +will be highlighted specially. Supported schemas are + +Schema Description ~ +failsafe No additional highlighting. +json Supports JSON-style numbers, booleans and null. +core Supports more number, boolean and null styles. +pyyaml In addition to core schema supports highlighting timestamps, + but there are some differences in what is recognized as + numbers and many additional boolean values not present in core + schema. + +Default schema is `core`. + +Note that schemas are not actually limited to plain scalars, but this is the +only difference between schemas defined in YAML specification and the only +difference defined in the syntax file. + ============================================================================== 5. 構文を定義する *:syn-define* *E410* @@ -3271,6 +3333,32 @@ xpm.vimは編集中のXPMファイルの内容から、動的に構文要素を スペルチェックを有効化するにはオプション 'spell' をオンにしなければな らない。 +SYNTAX ISKEYWORD SETTING *:syn-iskeyword* + +:sy[ntax] iskeyword [clear | {option}] + This defines the keyword characters. It's like the 'iskeyword' option + for but only applies to syntax highlighting. + + clear: Syntax specific iskeyword setting is disabled and the + buffer-local 'iskeyword' setting is used. + {option} Set the syntax 'iskeyword' option to a new value. + + Example: > + :syntax iskeyword @,48-57,192-255,$,_ +< + This would set the syntax specific iskeyword option to include all + alphabetic characters, plus the numeric characters, all accented + characters and also includes the "_" and the "$". + + If no argument is given, the current value will be output. + + Setting this option influences what |/\k| matches in syntax patterns + and also determines where |:syn-keyword| will be checked for a new + match. + + It is recommended when writing syntax files, to use this command + to the correct value for the specific syntax language and not change + the 'iskeyword' option. キーワードの定義 *:syn-keyword* @@ -3302,6 +3390,7 @@ xpm.vimは編集中のXPMファイルの内容から、動的に構文要素を ワードは認識されない。 マルチバイト文字を使うこともできる。マルチバイト文字は 'iskeyword' に 含まれている必要はない。 + See |:syn-iskeyword| for defining syntax specific iskeyword settings. キーワードは常にマッチやリージョンより優先される。キーワードは一要素以 上マッチしたとき使われる。キーワードは入れ子にならなく、それ以外のもの @@ -3537,6 +3626,7 @@ conceal *conceal* *:syn-conceal* 際に Conceal 表示されるかどうかは 'conceallevel' オプションの設定に依存する。 現在行のアイテムを Conceal 表示するかどうかは 'concealcursor' オプションで制御 できる (行の編集を妨げないようにするため)。 +Another way to conceal text with with |matchadd()|. concealends *:syn-concealends* @@ -3956,7 +4046,7 @@ skipパターンも "\n" を含んでよい。ただし次の行の最初の文 :syn region hereDoc start="<<\z(\I\i*\)" end="^\z1$" このように、\zは2つの役割を果たす。startパターンにおいては正規表現の一部 -"\(\I\i*\)" をexternalとしてマークする。endパターンでは\1によってstartパターン +"\(\I\i*\)" をexternalとしてマークする。endパターンでは\z1によってstartパターン 中の最初のマークされた部分への外部参照とする。外部参照はskipパターン中でも使え る: > :syn region foo start="start \(\I\i*\)" skip="not end \z1" end="end \z1" @@ -4443,21 +4533,23 @@ ctermbg={color-nr} *highlight-ctermbg* 14 3* Yellow, LightYellow 15 7* White - "NR-16" の下の番号は16色ターミナル('t_Co' が16以上のもの)用である。 - "NR-8" の下の番号は8色ターミナル('t_Co' が16未満のもの)用である。 - '*' はctermfgにbold属性がセットされることを意味している。"linux" - など多くの8色ターミナルでは明るい色になる。ただし背景色には適用さ - れない。'*' がないものはbold属性なしになる。他の方法でbold属性をつ - けたいなら引数 "cterm=" を "ctermfg=" や "ctermbg=" の後に書くこ - と。または色名の代わりに番号を使うこと。 + "NR-16" の下の番号は16色ターミナル('t_Co' が16以上のもの)用である。 + "NR-8" の下の番号は8色ターミナル('t_Co' が16未満のもの)用である。 + '*' はctermfgにbold属性がセットされることを意味している。"linux" + など多くの8色ターミナルでは明るい色になる。ただし背景色には適用さ + れない。'*' がないものはbold属性なしになる。他の方法でbold属性をつ + けたいなら引数 "cterm=" を "ctermfg=" や "ctermbg=" の後に書くこ + と。または色名の代わりに番号を使うこと。 + + 色名の大文字・小文字は無視される。 + 16色ansiスタイルターミナル(xtermを含む)ではNR-8の列の番号が使われ + ることに注意。ここで '*' は 'add 8' という意味になる。つまりBlueが + 12に、DarkGrayが8になる。 - 色名の大文字・小文字は無視される。 - 16色ansiスタイルターミナル(xtermを含む)ではNR-8の列の番号が使われ - ることに注意。ここで '*' は 'add 8' という意味になる。つまりBlueが - 12に、DarkGrayが8になる。 + カラーターミナルによっては、色名を使うと間違った色で表示される場合 + もあることに注意。 - カラーターミナルによっては、色名を使うと間違った色で表示される場合 - もあることに注意。 + You can also use "NONE" to remove the color. *:hi-normal-cterm* Normalグループに対して "ctermfg" や "ctermbg" を設定すると、これらはハ @@ -4866,6 +4958,7 @@ types.vim: *.[ch] 更されない。"b:current_syntax" は構文ファイルによって変更されるが、 "b:current_syntax" を一時的に保存・復元することで値が変わらないようになってい る。構文ファイルによって設定された値が "w:current_syntax" に代入される。 +Note: This resets the 'spell', 'spellcapcheck' and 'spellfile' options. ウィンドウの独自構文が定義されると、同じバッファの他のウィンドウで実行された構 文コマンド (:syntax clear を含む) が影響しなくなる。逆に、そのウィンドウで実行 diff --git a/doc/usr_02.jax b/doc/usr_02.jax index 63f1090f0..4156b7682 100644 --- a/doc/usr_02.jax +++ b/doc/usr_02.jax @@ -1,4 +1,4 @@ -*usr_02.txt* For Vim バージョン 7.4. Last change: 2015 Apr 12 +*usr_02.txt* For Vim バージョン 7.4. Last change: 2016 Jan 16 VIM USER MANUAL - by Bram Moolenaar @@ -404,6 +404,14 @@ Vim を終了したくない場合は、":e!" コマンドでオリジナルの 知りたいことは何でも Vim のヘルプで調べることができます。どんどん調べてくださ い! + +If you know what you are looking for, it is usually easier to search for it +using the help system, instead of using Google. Because the subjects follow +a certain style guide. + +Also the help has the advantage of belonging to your particular Vim version. +You won't see help for commands added later. These would not work for you. + 次のコマンドでヘルプの総合案内が表示されます: > :help @@ -472,7 +480,7 @@ Vim にはオプションがたくさんあり、それを設定することで :help 'number' -モードのプレフィクス一覧は |help-context| を参照してください。 +モードのプレフィクス一覧は |help-summary| を参照してください。 特殊キー不等号で囲んで表記します。例えば、挿入モードの上矢印キーのヘルプを見る には次のコマンドを使います: > @@ -489,65 +497,192 @@ Vim にはオプションがたくさんあり、それを設定することで 概要: *help-summary* > - :help -< 一般的なヘルプを表示します。下へスクロールすると、全てのヘルプ - ファイルの一覧を表示します。ここには独自に追加された、Vim標準 - には添付されていないヘルプファイルも含まれます。 > - :help user-toc.txt -< ユーザーマニュアルの目次を表示します。 > - :help :subject -< Exコマンド "subject" のヘルプ。例えば次のようなもの: > - :help :help -< ヘルプの探し方のヘルプ。 > - :help abc -< ノーマルモードコマンド "abc" のヘルプ。 > - :help CTRL-B -< ノーマルモードコマンドにおけるキーのヘルプ。 > - :help i_abc - :help i_CTRL-B -< 挿入モードにおける特定のキーのヘルプ。 > - :help v_abc - :help v_CTRL-B -< ビジュアルモードにおける特定のキーのヘルプ。 > - :help c_abc - :help c_CTRL-B -< コマンドラインモードにおける特定のキーのヘルプ。 > - :help 'subject' -< オプション 'subject' のヘルプ。 > - :help subject() -< 関数 "subject" のヘルプ。 > - :help -subject -< コマンドライン引数 "-subject" のヘルプ。 > - :help +subject -< コンパイル時機能 "+subject" のヘルプ。 > - :help /* -< 正規表現 "*" のヘルプ。 > - :help EventName -< 自動コマンドイベント "EventName" のヘルプ。 > - :help digraphs.txt -< ヘルプファイル "digraph.txt" のトップ。 - 他のヘルプファイルについても同様。 > - :help pattern -< "pattern" で始まるヘルプタグを検索。を繰り返し押すと他の - 候補を検索する。 > - :help pattern -< "pattern" にマッチするヘルプタグを全て表示する。 > - :helpgrep pattern -< 全ヘルプファイルの全テキストからパターン "pattern" を検索し、 - 最初のマッチへジャンプする。他のマッチへジャンプするには以下の - コマンドを使う: > - :cn -< 次のマッチへ > - :cprev - :cN -< 前のマッチへ > - :cfirst - :clast -< 最初/最後のマッチへ > - :copen - :cclose -< quickfixウィンドウを開く/閉じる。quickfixウィンドウで - を押すと、カーソル下の要素へジャンプする。 + +1) Use Ctrl-D after typing a topic and let Vim show all available topics. + Or press Tab to complete: > + :help some +< More information on how to use the help: > + :help helphelp + +2) Follow the links in bars to related help. You can go from the detailed + help to the user documentation, which describes certain commands more from + a user perspective and less detailed. E.g. after: > + :help pattern.txt +< You can see the user guide topics |03.9| and |usr_27.txt| in the + introduction. + +3) Options are enclosed in single apostrophes. To go to the help topic for the + list option: > + :help 'list' +< If you only know you are looking for a certain option, you can also do: > + :help options.txt +< to open the help page which describes all option handling and then search + using regular expressions, e.g. textwidth. + Certain options have their own namespace, e.g.: > + :help cpo- +< for the corresponding flag of the 'cpoptions' settings, substitute + by a specific flag, e.g.: > + :help cpo-; +< And for the guioption flags: > + :help go- + +4) Normal mode commands do not have a prefix. To go to the help page for the + "gt" command: > + :help gt + +5) Insert mode commands start with i_. Help for deleting a word: > + :help i_CTRL-W + +6) Visual mode commands start with v_. Help for jumping to the other side of + the Visual area: > + :help v_o + +7) Command line editing and arguments start with c_. Help for using the + command argument %: > + :help c_% + +8) Ex-commands always start with ":", so to go to the :s command help: > + :help :s + +9) Commands specifically for debugging start with ">". To go to to the help + for the "cont" debug command: > + :help >cont + +10) Key combinations. They usually start with a single letter indicating + the mode for which they can be used. E.g.: > + :help i_CTRL-X +< takes you to the family of Ctrl-X commands for insert mode which can be + used to auto complete different things. Note, that certain keys will + always be written the same, e.g. Control will always be CTRL. + For normal mode commands there is no prefix and the topic is available at + :h CTRL-. E.g. > + :help CTRL-W +< In contrast > + :help c_CTRL-R +< will describe what the Ctrl-R does when entering commands in the Command + line and > + :help v_Ctrl-A +< talks about incrementing numbers in visual mode and > + :help g_CTRL-A +< talks about the g command (e.g. you have to press "g" then ). + Here the "g" stand for the normal command "g" which always expects a second + key before doing something similar to the commands starting with "z" + +11) Regexp items always start with /. So to get help for the "\+" quantifier + in Vim regexes: > + :help /\+ +< If you need to know everything about regular expressions, start reading + at: > + :help pattern.txt + +12) Registers always start with "quote". To find out about the special ":" + register: > + :help quote: + +13) Vim Script (VimL) is available at > + :help eval.txt +< Certain aspects of the language are available at :h expr-X where "X" is a + single letter. E.g. > + :help expr-! +< will take you to the topic describing the "!" (Not) operator for + VimScript. + Also important is > + :help function-list +< to find a short description of all functions available. Help topics for + VimL functions always include the "()", so: > + :help append() +< talks about the append VimL function rather than how to append text in the + current buffer. + +14) Mappings are talked about in the help page :h |map.txt|. Use > + :help mapmode-i +< to find out about the |:imap| command. Also use :map-topic + to find out about certain subtopics particular for mappings. e.g: > + :help :map-local +< for buffer-local mappings or > + :help map-bar +< for how the '|' is handled in mappings. + +15) Command definitions are talked about :h command-topic, so use > + :help command-bar +< to find out about the '!' argument for custom commands. + +16) Window management commands always start with CTRL-W, so you find the + corresponding help at :h CTRL-W_letter. E.g. > + :help CTRL-W_p +< for moving the previous accessed window. You can also access > + :help windows.txt +< and read your way through if you are looking for window handling + commands. + +17) Use |:helpgrep| to search in all help pages (and also of any installed + plugins). See |:helpgrep| for how to use it. + To search for a topic: > + :helpgrep topic +< This takes you to the first match. To go to the next one: > + :cnext +< All matches are available in the quickfix window which can be opened + with: > + :copen +< Move around to the match you like and press Enter to jump to that help. + +18) The user manual. This describes help topics for beginners in a rather + friendly way. Start at |usr_toc.txt| to find the table of content (as you + might have guessed): > + :help usr_toc.txt +< Skim over the contents to find interesting topics. The "Digraphs" and + "Entering special characters" items are in chapter 24, so to go to that + particular help page: > + :help usr_24.txt +< Also if you want to access a certain chapter in the help, the chapter + number can be accessed directly like this: > + :help 10.1 +< goes to chapter 10.1 in |usr_10.txt| and talks about recording macros. + +19) Highlighting groups. Always start with hl-groupname. E.g. > + :help hl-WarningMsg +< talks about the WarningMsg highlighting group. + +20) Syntax highlighting is namespaced to :syn-topic e.g. > + :help :syn-conceal +< talks about the conceal argument for the :syn command. + +21) Quickfix commands usually start with :c while location list commands + usually start with :l + +22) Autocommand events can be found by their name: > + :help BufWinLeave +< To see all possible events: > + :help autocommands-events + +23) Command-line switches always start with "-". So for the help of the -f + command switch of Vim use: > + :help -f + +24) Optional features always start with "+". To find out about the + conceal feature use: > + :help +conceal + +25) Documentation for included filetype specific functionality is usually + available in the form ft--. So > + :help ft-c-syntax +< talks about the C syntax file and the option it provides. Sometimes, + additional sections for omni completion > + :help ft-php-omni +< or filetype plugins > + :help ft-tex-plugin +< are available. + +26) Error and Warning codes can be looked up directly in the help. So > + :help E297 +< takes you exactly to the description of the swap error message and > + :help W10 +< talks about the warning "Changing a readonly file". + Sometimes however, those error codes are not described, but rather are + listed at the Vim command that usually causes this. So: > + :help E128 +< takes you to the |:function| command + ============================================================================== diff --git a/doc/windows.jax b/doc/windows.jax index a7c03bf6e..114a39fd0 100644 --- a/doc/windows.jax +++ b/doc/windows.jax @@ -1,4 +1,4 @@ -*windows.txt* For Vim バージョン 7.4. Last change: 2014 Mar 25 +*windows.txt* For Vim バージョン 7.4. Last change: 2015 Nov 14 VIMリファレンスマニュアル by Bram Moolenaar @@ -274,31 +274,58 @@ CTRL-W ^ ":split #" と同じ。つまり、ウィンドウを2つに分割し ウィンドウを閉じる ------------------ +:q[uit] +:{count}q[uit] CTRL-W q *CTRL-W_q* CTRL-W CTRL-Q *CTRL-W_CTRL-Q* -:q[uit] カレントウィンドウを終了する。最後のウィンドウ(ヘルプウィンド - ウを除く)を終了すると Vim が終了する。 'hidden' オプションが - セットされていて、かつ、カレントバッファを表示しているウィンド - ウが 1つしかない場合は、そのバッファは隠れ状態(hidden)となる。 - 'hidden' オプションがセットされていなくて、カレントバッファを - 表示しているウィンドウが1つしかなくて、かつ、そのバッファが編 - 集中の場合は、このコマンドは失敗する。 (Note: CTRL-Q は全ての - 端末で動作しない。) - -:q[uit]! カレントウィンドウを終了する。このウィンドウがバッファを表示し - ている最後のウィンドウの場合、このバッファに対する変更は全て失 - われる。最後のウィンドウ(ヘルプウィンドウを除く)を終了すると - Vim が終了する。たとえ 'hidden' オプションがセットされていたと - しても、バッファ内容は失われる。 - + Without {count}: Quit the current window. If {count} is + given quit the {count} window. + + 最後のウィンドウ(ヘルプウィンドウを除く)を終了すると Vim が終 + 了する。 + + 'hidden' オプションがセットされていて、かつカレントバッファを + 表示しているウィンドウが 1つしかない場合は、そのバッファは隠れ + 状態(hidden)となる。'hidden' オプションがセットされていなく + て、カレントバッファを表示しているウィンドウが1つしかなくて、 + かつ、そのバッファが編集中の場合は、このコマンドは失敗する。 + + (Note: CTRL-Q は全ての端末で動作するわけではない。) + + If [count] is greater than the last window number the last + window will be closed: > + :1quit " quit the first window + :$quit " quit the last window + :9quit " quit the last window + " if there are less than 9 windows opened + :-quit " quit the previews window + :+quit " quit the next window + :+2quit " quit the second next window +< +:q[uit]! +:{count}q[uit]! + Without {count}: Quit the current window. If {count} is + given quit the {count} window. + + このウィンドウがバッファを表示している最後のウィンドウの場合、 + このバッファに対する変更は全て失われる。最後のウィンドウ(ヘル + プウィンドウを除く)を終了するとVim が終了する。たとえ 'hidden' + オプションがセットされていたとしても、バッファ内容は失われる。 + +:clo[se][!] +:{count}clo[se][!] CTRL-W c *CTRL-W_c* *:clo* *:close* -:clo[se][!] カレントウィンドウを閉じる。'hidden' オプションがセットされて - いる時、または、バッファが変更されていて[!]を使用した時は、( - バッファが他のウィンドウで編集中でなければ)バッファは隠れ状態 - (hidden)になる。 + Without {count}: Close the current window. If {count} is + given close the {count} window. + + 'hidden' オプションがセットされている時、または、バッファが変 + 更されていて[!]を使用した時は、(バッファが他のウィンドウで編集 + 中でなければ)バッファは隠れ状態(hidden)になる。 + カレントタブページにウィンドウが1つしかなく、他にタブページが あるとき、このコマンドを実行するとカレントタブページが閉じる。 |tab-page| + このコマンドは以下の場合に失敗する: *E444* - スクリーン上に1つのウィンドウしかない時 - 'hidden' がセットされていなくて、[!]を使用せず、バッファが変 @@ -313,15 +340,21 @@ CTRL-W CTRL-C *CTRL-W_CTRL-C* しない。 *:hide* -:hid[e] カレントウィンドウがスクリーン上の最後のウィンドウでなければ、 - カレントウィンドウを終了する。 (他のウィンドウがバッファを編集 - していなく、かつ 'bufhidden' の値が "unloaded" か "delete" で - ないならば)そのバッファは隠れ状態(hidden)となる。 - そのウィンドウがカレントタブページで最後のウィンドウであるなら - ばタブページも閉じる。|tab-page| - 'hidden' の値はこのコマンドには無関係である。 - バッファへの変更は保存されず、失われることもないため、このコマ - ンドは「安全な」コマンドである。 +:hid[e] +:{count}hid[e] + カレントウィンドウがスクリーン上の最後のウィンドウでなければ、 + カレントウィンドウを終了する。 {count} については |:quit| コマ + ンドを参照。 + + (他のウィンドウがバッファを編集していなく、かつ 'bufhidden' の + 値が "unloaded", "delete", "wipe" のいずれでもないならば)その + バッファは隠れ状態(hidden)となる。そのウィンドウがカレントタブ + ページで最後のウィンドウであるならばタブページも閉じる。 + |tab-page| + + 'hidden' の値はこのコマンドには無関係である。バッファへの変更 + は保存されず、失われることもないため、このコマンドは「安全な」 + コマンドである。 :hid[e] {cmd} {cmd} を実行し、同時に 'hidden' をセットする。{cmd} が実行され た後に 'hidden' の以前の値が復旧される。 @@ -330,12 +363,17 @@ CTRL-W CTRL-C *CTRL-W_CTRL-C* これはカレントバッファに変更があっても、それを隠しバッファに し、"Makefile" を編集する。 +:on[ly][!] +:{count}on[ly][!] CTRL-W o *CTRL-W_o* *E445* CTRL-W CTRL-O *CTRL-W_CTRL-O* *:on* *:only* -:on[ly][!] カレントウィンドウをスクリーン上にある唯一のウィンドウにする。 - 他の全てのウィンドウは閉じられる。 + カレントウィンドウをスクリーン上にある唯一のウィンドウにする。 + 他の全てのウィンドウは閉じられる。 {count} については |:quit| + コマンドを参照。 + 'hidden' オプションがセットされていれば、閉じられた全てのバッ ファは隠れ状態(hidden)となる。 + 'hidden' オプションがセットされておらず、'autowrite' オプショ ンがセットされている場合は、編集中のバッファは保存される。さも なければ、編集中のバッファを表示しているウィンドウは閉じられる @@ -683,8 +721,9 @@ Note: ":next" は例外である。なぜならこのコマンドは Vi との ============================================================================== 8. 全てのバッファ/ウィンドウに対してコマンド実行 *list-repeat* *:windo* -:windo[!] {cmd} 各ウィンドウに対して {cmd} を実行する。 - これは次のようにするのと同じ動作をする: > +:[range]windo[!] {cmd} 各ウィンドウに対して {cmd} を実行する。[range]が指定さ + れた場合には、指定された範囲の番号のウィンドウが操作対 + 象となる。これは次のようにするのと同じ動作をする: > CTRL-W t :{cmd} CTRL-W w @@ -704,8 +743,10 @@ Note: ":next" は例外である。なぜならこのコマンドは Vi との |:lfdo|も参照。 *:bufdo* -:bufdo[!] {cmd} {cmd} をバッファリスト内の各バッファに対して実行。 - これは次のようにするのと同じ動作をする: > +:[range]bufdo[!] {cmd} {cmd} をバッファリスト内の各バッファに対して実行する。 + [range]が指定された場合は、指定された範囲の番号の + バッファが操作対象となる。これは次のようにするのと同じ + 動作をする: > :bfirst :{cmd} :bnext @@ -752,18 +793,23 @@ Note: ":next" は例外である。なぜならこのコマンドは Vi との CTRL-W ] *CTRL-W_]* *CTRL-W_CTRL-]* CTRL-W CTRL-] カレントウィンドウを2つに分割する。カーソル位置の識別子をタグ - として使用し、新しくできた上側のウィンドウでタグに移動する。新 - しいウィンドウの高さはNとなる。 + として使用し、新しくできた上側のウィンドウでタグに移動する。 + In Visual mode uses the Visually selected text as a tag. + 新しいウィンドウの高さは N となる。 *CTRL-W_g]* CTRL-W g ] カレントウィンドウを2つに分割する。カーソル位置の識別子をタグ として使用し、新しくできた上側のウィンドウで ":tselect" を実行 - する。新しいウィンドウの高さはNとなる。 + する。 + In Visual mode uses the Visually selected text as a tag. + 新しいウィンドウの高さは N となる。 *CTRL-W_g_CTRL-]* CTRL-W g CTRL-] カレントウィンドウを2つに分割する。カーソル位置の識別子をタグ として使用し、新しくできた上側のウィンドウで ":tjump" を実行す - る。新しいウィンドウの高さはNとなる。 + る。 + In Visual mode uses the Visually selected text as a tag. + 新しいウィンドウの高さはNとなる。 CTRL-W f *CTRL-W_f* *CTRL-W_CTRL-F* CTRL-W CTRL-F カレントウィンドウを2つに分割する。カーソル位置のファイル名を @@ -965,9 +1011,10 @@ CTRL-W g } *CTRL-W_g}* バッファはリストから除かれることもある。これは、存在しているがバッファのリスト 内にはないことを意味する。|unlisted-buffer| -:files[!] *:files* -:buffers[!] *:buffers* *:ls* -:ls[!] 全バッファを表示。例: +:files[!] [flags] *:files* +:buffers[!] [flags] *:buffers* *:ls* +:ls[!] [flags] + 全バッファを表示。例: 1 #h "/test/text" line 1 ~ 2u "asdf" line 0 ~ @@ -993,6 +1040,21 @@ CTRL-W g } *CTRL-W_g}* + 変更のあるバッファ x 読み込みエラーのあるバッファ + [flags] can be a combination of the following characters, + which restrict the buffers to be listed: + + modified buffers + - buffers with 'modifiable' off + = readonly buffers + a active buffers + u unlisted buffers (overrides the "!") + h hidden buffers + x buffers with a read error + % current buffer + # alternate buffer + Combining flags means they are "and"ed together, e.g.: + h+ hidden buffers which are modified + a+ active buffers which are modified + *:bad* *:badd* :bad[d] [+lnum] {fname} ファイル名 {fname} をバッファリストに追加する。ただし、メモリ @@ -1012,7 +1074,10 @@ CTRL-W g } *CTRL-W_g}* し示している最も最近のエントリが使用される。 実際は、バッファは完全に削除されていない。バッファリストから削 除され |unlisted-buffer|、バッファに対するオプションの値、変数、 - マッピング・略語が消去される。 + マッピング・略語が消去される。 Examples: > + :.,$-bdelete " delete buffers from the current one to + " last but one + :%bdelete " delete all buffers :bdelete[!] {bufname} *E93* *E94* ":bdelete[!] [N]" と同様だが、バッファを名前で指定する。数字が @@ -1036,7 +1101,10 @@ CTRL-W g } *CTRL-W_g}* |:bdelete| に似ているが、本当にバッファを削除する。このバッ ファに関するすべてが失われる。例えば、このバッファ中のすべての マークが無効になり、オプション設定が失われるなど。このことの意 - 味がわからなければ使わないこと。 + 味がわからなければ使わないこと。 Examples: > + :.+,$bwipeout " wipe out all buffers after the current + " one + :%bwipeout " wipe out all buffers :[N]bun[load][!] *:bun* *:bunload* *E515* :bun[load][!] [N] From 95bc5b3e966470685dac793d2721507ee5d044e1 Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Sat, 30 Jan 2016 17:52:53 +0900 Subject: [PATCH 09/11] remove changes of +kaoriya MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 間違えてコミットしちゃってた。ごめんなさい (;´∀`) --- en/options.txt | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/en/options.txt b/en/options.txt index 0efbc8d64..a5e6fff45 100644 --- a/en/options.txt +++ b/en/options.txt @@ -693,9 +693,6 @@ A jump table for the options with a short description can be found at |Q_op|. "single": Use the same width as characters in US-ASCII. This is expected by most users. "double": Use twice the width of ASCII characters. - "auto": Use obtained width from system. - {only for Win NT/2K systems, currently} - *E834* *E835* The value "double" cannot be used if 'listchars' or 'fillchars' contains a character that would be double width. @@ -719,10 +716,6 @@ A jump table for the options with a short description can be found at |Q_op|. compiled with the |+termresponse| feature and if |t_u7| is set to the escape sequence to request cursor position report. - On some systems, we can use width for a character which defined by - font design. If you use such a system try "auto" for this option. - It will give you more nice result for a font which you select. - *'antialias'* *'anti'* *'noantialias'* *'noanti'* 'antialias' 'anti' boolean (default: off) global @@ -3833,9 +3826,6 @@ A jump table for the options with a short description can be found at |Q_op|. 'F' Add a footer. Only for Motif. See |gui-footer|. - 'C' Remove caption (title) bar. Support Win32 only. - - *'guipty'* *'noguipty'* 'guipty' boolean (default on) global From ba2e3555eb01c87fc54e3b00a7843e659d6e3e42 Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Sat, 30 Jan 2016 18:33:26 +0900 Subject: [PATCH 10/11] impose english to options.jax MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 場所が多くてキツかった… --- catchup-7.4.1194.md | 2 +- doc/options.jax | 310 +++++++++++++++++++++++++++++++++++++------- 2 files changed, 263 insertions(+), 49 deletions(-) diff --git a/catchup-7.4.1194.md b/catchup-7.4.1194.md index a671f4f62..235a380a2 100644 --- a/catchup-7.4.1194.md +++ b/catchup-7.4.1194.md @@ -19,7 +19,6 @@ 追いついたファイルは、下記の一覧から削除し、適切なセクションへ移動 - doc/options.jax doc/pi_netrw.jax ### 英文だけは反映済み @@ -55,6 +54,7 @@ こっから先は100行超えるので、嫌。 doc/eval.jax + doc/options.jax doc/syntax.jax doc/windows.jax diff --git a/doc/options.jax b/doc/options.jax index 794f4a4ec..6fe584545 100644 --- a/doc/options.jax +++ b/doc/options.jax @@ -837,7 +837,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる オプション 'smartindent' かオプション 'cindent' がオンのときは、インデ ントの方法は違ってくる。 - オプション 'paste' がオンのときは 'autoindent' はオフになる。 + The 'autoindent' option is reset when the 'paste' option is set and + restored when 'paste' is reset. {Vi との微妙な違い: または を打ち込んでインデントが削除され た後、上下に移動した後のカーソル位置は削除されたインデントの後ろになる。 Viでは削除されたインデントの中のどこかになる} @@ -1202,6 +1203,47 @@ Note 1番目の形式では、行全体がオプション指定に使われる 価した結果がリスト|List|になる場合は、そのリストの各要素を文字列とし、 それらの間に "\n" を置くのと同じことになる。 + *'belloff'* *'bo'* +'belloff' 'bo' string (default "") + global + {not in Vi} + Specifies for which events the bell will not be rung. It is a comma + separated list of items. For each item that is present, the bell + will be silenced. This is most useful to specify specific events in + insert mode to be silenced. + + item meaning when present ~ + all All events. + backspace When hitting or and deleting results in an + error. + cursor Fail to move around using the cursor keys or + / in |Insert-mode|. + complete Error occurred when using |i_CTRL-X_CTRL-K| or + |i_CTRL-X_CTRL-T|. + copy Cannot copy char from insert mode using |i_CTRL-Y| or + |i_CTRL-E|. + ctrlg Unknown Char after in Insert mode. + error Other Error occurred (e.g. try to join last line) + (mostly used in |Normal-mode| or |Cmdline-mode|). + esc hitting in |Normal-mode|. + ex In |Visual-mode|, hitting |Q| results in an error. + hangul Error occurred when using hangul input. + insertmode Pressing in 'insertmode'. + lang Calling the beep module for Lua/Mzscheme/TCL. + mess No output available for |g<|. + showmatch Error occurred for 'showmatch' function. + operator Empty region error |cpo-E|. + register Unknown register after in |Insert-mode|. + shell Bell from shell output |:!|. + spell Error happened on spell suggest. + wildmode More matches in |cmdline-completion| available + (depends on the 'wildmode' setting). + + This is most useful, to fine tune when in insert mode the bell should + be rung. For normal mode and ex commands, the bell is often rung to + indicate that an error occurred. It can be silenced by adding the + "error" keyword. + *'binary'* *'bin'* *'nobinary'* *'nobin'* 'binary' 'bin' 切替 (既定ではオフ) バッファについてローカル @@ -1277,7 +1319,7 @@ Note 1番目の形式では、行全体がオプション指定に使われる て表示されるかを、このオプションで指定する。これが機能するのはASCIIと 8bit文字( 'encoding' が8bitエンコーディングのとき)だけである。 - *'breakindent'* *'bri'* + *'breakindent'* *'bri'* *'nobreakindent'* *'nobri'* 'breakindent' 'bri' 切替 (既定ではオフ) ウィンドウについてローカル {Vi にはない} @@ -1392,6 +1434,9 @@ Note 1番目の形式では、行全体がオプション指定に使われる い)。 nofile だけは、 バッファ名は固定され、ファイル名のようには扱われない。 |:cd| の結果としてバッファ名が変わることはない。 + both: When using ":e bufname" and already editing "bufname" + the buffer is made empty and autocommands are + triggered as usual for |:edit|. *E676* "acwrite" は "nofile" と同様にバッファ名がファイルと関係していないこと を意味するが、"nofile" と違って保存される。すなわち、"nofile" と @@ -1891,6 +1936,14 @@ Note 1番目の形式では、行全体がオプション指定に使われる ウィンドウに表示する。"menu" または "menuone" と組み合わせ たときのみ有効。 + noinsert Do not insert any text for a match until the user selects + a match from the menu. Only works in combination with + "menu" or "menuone". No effect if "longest" is present. + + noselect Do not select a match in the menu, force the user to + select one from the menu. Only works in combination with + "menu" or "menuone". + *'concealcursor'* *'cocu'* 'concealcursor' 'cocu' 文字列 (既定では: "") @@ -2729,15 +2782,31 @@ Note 1番目の形式では、行全体がオプション指定に使われる 'endofline' 'eol' 切替 (既定ではオン) バッファについてローカル {Vi にはない} + When writing a file and this option is off and the 'binary' option + is on, or 'fixeol' option is off, no will be written for the + last line in the file. This option is automatically set or reset when + starting to edit a new file, depending on whether file has an + for the last line in the file. Normally you don't have to set or + reset this option. + {参考用の旧訳: ファイルを書き込むときに、このオプションがオフでオプション 'binary' が オンならば、ファイルの最終行に が書き込まれない。このオプション はファイルの編集を始めるときには自動的にオンになる。ただし編集を始めた ファイルの最終行に がないときにはオフになる。普通はユーザーがこ のオプションを設定する必要はない。'binary' がオフのときはこのオプショ - ンは使われない。'binary' がオンのときは、ファイルの最終行に が - あったかどうかを復元するためにこのオプションが使われる。そのため、ユー - ザーがファイルを書き込むときに元のファイルの状態を保つことができるし、 - 変更することもできる。 + ンは使われない。 + :旧訳ここまで} + When 'binary' is off and 'fixeol' is on the value is not used when + writing the file. When 'binary' is on or 'fixeol' is off it is used + to remember the presence of a for the last line in the file, so + that when you write the file the situation from the original file can + be kept. But you can change it if you want to. + {参考用の旧訳: + 'binary' がオンのときは、ファイルの最終行に があったかどうかを復 + 元するためにこのオプションが使われる。そのため、ユーザーがファイルを書 + き込むときに元のファイルの状態を保つことができるし、変更することもでき + る。 + :旧訳ここまで} *'equalalways'* *'ea'* *'noequalalways'* *'noea'* 'equalalways' 'ea' 切替 (既定ではオン) @@ -2778,8 +2847,7 @@ Note 1番目の形式では、行全体がオプション指定に使われる くのエラー (例えばノーマルモードで を打ち込んだとき) については ベルは常に使用される。ベルをビープ音にしたり、画面フラッシュにしたり、 無効にしたりするためには、オプション 'visualbell' を参照。 - 安全上の理由から、このオプションをモードライン|modeline|やサンドボック - ス|sandbox|の中で設定することはできない。 + See 'belloff' to finetune when to ring the bell. *'errorfile'* *'ef'* 'errorfile' 'ef' 文字列 (Amigaでの既定値: "AztecC.Err", @@ -2842,6 +2910,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる オンのときのインデントでも空白を使う。'expandtab' がオンのときに本当の タブを挿入するには、CTRL-V を使うこと。|:retab| と |ins-expandtab| も参照。 + This option is reset when the 'paste' option is set and restored when + the 'paste' option is reset. NOTE: このオプションは、'compatible' がオンのときはオフになるので注意。 *'exrc'* *'ex'* *'noexrc'* *'noex'* @@ -3017,8 +3087,9 @@ Note 1番目の形式では、行全体がオプション指定に使われる 2. 改行に が使われていて、かつ 'fileformats' が "unix" を含むな ら、'fileformat' は "unix" になる。 Note があって、その前に がないと、"dos" より "unix" が優先的に使われることに注意。 - 3. 'fileformat' がまだ設定されておらず、'fileformats' に "mac" が含 - まれているときは、'fileformat' は "mac" に設定される。 + 3. 'fileformat' がまだ設定されておらず、ファイル内に1つ が見つ + かり(訳注:後ろにが続かない)、'fileformats' に "mac" が含まれ + ているときは、'fileformat' は "mac" に設定される。 つまり "mac" が選択されるのは: "unix" が含まれていないか がファイルに無い、そして "dos" が含まれていないか がファイルに無いときである。 @@ -3124,6 +3195,17 @@ Note 1番目の形式では、行全体がオプション指定に使われる fold:文字 Folded |hl-Folded| diff:文字 DiffDelete |hl-DiffDelete| + *'fixendofline'* *'fixeol'* *'nofixendofline'* *'nofixeol'* +'fixendofline' 'fixeol' boolean (default on) + local to buffer + {not in Vi} + When writing a file and this option is on, at the end of file + will be restored if missing. Turn this option off if you want to + preserve the situation from the original file. + When the 'binary' option is set the value of this option doesn't + matter. + See the 'endofline' option. + *'fkmap'* *'fk'* *'nofkmap'* *'nofk'* 'fkmap' 'fk' 切替 (既定ではオフ) *E198* グローバル @@ -3422,7 +3504,7 @@ Note 1番目の形式では、行全体がオプション指定に使われる ドボックスの中ではバッファテキストの変更は許可されていないので、このオ プションは機能しない。 - *'fsync'* *'fs'* + *'fsync'* *'fs'* *'nofsync'* *'nofs'* 'fsync' 'fs' 切替 (既定ではオン) グローバル {Vi にはない} @@ -3505,7 +3587,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる 能する。MSDOSやWin32コンソールではカーソルの高さだけを変更する。これは ブロックカーソルを指定する、または垂直・水平方向のパーセンテージを指定 することで行う。 - コンソール上ではエスケープシーケンス 't_SI' と 't_EI' が使われる。 + コンソール上ではエスケープシーケンス 't_SI', 't_SR' 及び 't_EI' が使わ + れる。 値はコンマ区切りのキーワードのリストである。リストは部門別に分かれてお り、各部門はモードリストと引数リストからなる。 @@ -4137,7 +4220,7 @@ Note 1番目の形式では、行全体がオプション指定に使われる グローバル 検索パターンにおいて大文字と小文字を区別しない。タグファイル内の検索に も適用される。 - オプション 'smartcase' も参照。 + オプション 'smartcase' と 'tagcase' も参照。 パターン内で "\c" や "\C" を使うことで、この設定を上書きできる。 |/ignorecase| を参照。 @@ -4536,6 +4619,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる ド上で CTRL-] を入力したときにそのコマンドについてのヘルプにジャンプで きるようにするため)。 'lisp' がオンのときは、文字 '-' は常に含まれる。 + This option also influences syntax highlighting, unless the syntax + uses |:syn-iskeyword|. NOTE: このオプションは、オプション 'compatible' がオンのときはViの既定 値に、オフのときはVimの既定値になるので注意すること。 @@ -4653,11 +4738,13 @@ Note 1番目の形式では、行全体がオプション指定に使われる 有効} このオプションでは、ユーザーのキーボードを特別な言語モードに切り替えら れるようにする。 挿入モードで文字を入力しているときは、文字は直接入力 - される。しかしコマンドモードではオプション 'langmap' により、入力され + される。しかしノーマルモードではオプション 'langmap' により、入力され た特別な文字をキー本来の文字に変換する。つまりノーマルモードコマンドを - 実行するためにキーボードモードを変更しなくともよいということである。こ - のオプションは 'keymap' と正反対のものである。'keymap' は挿入モードで - マッピングを行う。 + 実行するためにキーボードモードを変更しなくともよいということである。 + このオプションは 'keymap' と正反対のものである。'keymap' は挿入モード + でマッピングを行う。 + Also consider setting 'langnoremap' to avoid 'langmap' applies to + characters resulting from a mapping. このオプションはセキュリティ上の理由で、|modeline| からや |sandbox| の 中で設定することはできない。 @@ -4716,6 +4803,18 @@ Note 1番目の形式では、行全体がオプション指定に使われる < 警告: こうすると、ユーザー自身の定義したメニューも含む、全てのメニュー がいったん削除される! + *'langnoremap'* *'lnr'* *'nolangnoremap'* *'nolnr'* +'langnoremap' 'lnr' boolean (default off) + global + {not in Vi} + {only available when compiled with the |+langmap| + feature} + When on, setting 'langmap' does not apply to characters resulting from + a mapping. This basically means, if you noticed that setting + 'langmap' disables some of your mappings, try setting this option. + This option defaults to off for backwards compatibility. Set it on if + that works for you to avoid mappings to break. + *'laststatus'* *'ls'* 'laststatus' 'ls' 数値 (既定では 1) グローバル @@ -4885,6 +4984,17 @@ Note 1番目の形式では、行全体がオプション指定に使われる Note コマンドライン引数 "-u NONE" または "--noplugin" によってこのオプ ションをオフにできることに注意 |-u| |--noplugin|。 + *'luadll'* +'luadll' string (default depends on the build) + global + {not in Vi} + {only available when compiled with the |+lua/dyn| + feature} + Specifies the name of the Lua shared library. The default is + DYNAMIC_LUA_DLL, which was specified at compile time. + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. + *'macatsui'* *'nomacatsui'* 'macatsui' 切替 (既定ではオン) グローバル @@ -5041,9 +5151,11 @@ Note 1番目の形式では、行全体がオプション指定に使われる {Vi にはない} 全てのバッファで使用するメモリの合計の最大値 (キロバイト単位)。このオ プションの最大値は約 2000000 (2 ギガバイト)である。限界を設けないとき - にはこの値に設定すること。64 ビットマシンではもっと高くしても動作する - かもしれない。けれど、本当にテキストの編集に 2 ギガバイト以上も必要で - すか? + にはこの値に設定すること。 + 64 ビットマシンではもっと高くしても動作するかもしれない。けれど、本当 + にテキストの編集に 2 ギガバイト以上も必要ですか? Keep in mind that + text is stored in the swap file, one can edit files > 2 Gbyte anyay. + We do need the memory to store undo info. 'maxmem' も参照。 *'menuitems'* *'mis'* @@ -5312,7 +5424,7 @@ Note 1番目の形式では、行全体がオプション指定に使われる 負または0にするとスレッドのスケジューリングを行わなくなる。 *'nrformats'* *'nf'* -'nrformats' 'nf' 文字列 (既定では "octal,hex") +'nrformats' 'nf' string (default "bin,octal,hex") バッファについてローカル {Vi にはない} テキスト内の数をコマンド CTRL-A や CTRL-X で増減させるとき、 Vimに何を @@ -5325,6 +5437,9 @@ Note 1番目の形式では、行全体がオプション指定に使われる "007" の上で CTRL-A を使うと "010" となる。 hex これが含まれると、"0x" や "0X" で始まる数は16進数として認識さ れる。例: "0x100" の上で CTRL-X を使うと "0x0ff" となる。 + bin If included, numbers starting with "0b" or "0B" will be + considered to be binary. Example: Using CTRL-X on + "0b1000" subtracts one, resulting in "0b0111". 1 から 9 の数字で始まる数は、常に10進数として認識される。8進数または16 進数として認識されない数も10進数として認識される。 @@ -5444,19 +5559,21 @@ Note 1番目の形式では、行全体がオプション指定に使われる 'paste' がオンのときは、以下のように設定が変わる。 - 挿入モードとコマンドラインモードでのマッピングが無効になる - 略語展開が無効になる - - 'textwidth' が 0 になる - - 'wrapmargin' が 0 になる - 'autoindent' がオフになる - - 'smartindent' がオフになる - - 'softtabstop' が 0 になる + - 'expandtab' is reset + - 'formatoptions' が空のときのような動作になる - 'revins' がオフになる - 'ruler' がオフになる - 'showmatch' がオフになる - - 'formatoptions' が空のときのような動作になる + - 'smartindent' がオフになる + - 'smarttab' is reset + - 'softtabstop' が 0 になる + - 'textwidth' が 0 になる + - 'wrapmargin' が 0 になる 以下のオプションの値に変化はないが、働きは無効になる。 - - 'lisp' - - 'indentexpr' - 'cindent' + - 'indentexpr' + - 'lisp' NOTE: 'paste' がオンのときに別のファイルの編集を始めると、モードライン や autocommand によって設定が再び変わり、貼り付け時に問題が起きること があるので注意。そのときは 'paste' を再びオンにするとよいだろう。 @@ -5580,6 +5697,17 @@ Note 1番目の形式では、行全体がオプション指定に使われる < 文字 ';' を ':' または指定可能な区切り文字で置換する。 Note この方法 は、$INCL がコンマや空白を含んでいるときには使えないので注意。 + *'perldll'* +'perldll' string (default depends on the build) + global + {not in Vi} + {only available when compiled with the |+perl/dyn| + feature} + Specifies the name of the Perl shared library. The default is + DYNAMIC_PERL_DLL, which was specified at compile time. + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. + *'preserveindent'* *'pi'* *'nopreserveindent'* *'nopi'* 'preserveindent' 'pi' 切替 (既定ではオフ) バッファについてローカル @@ -5707,6 +5835,27 @@ Note 1番目の形式では、行全体がオプション指定に使われる 0 のときはスペースの許す限り多く表示される。 |ins-completion-menu| + *'pythondll'* +'pythondll' string (default depends on the build) + global + {not in Vi} + {only available when compiled with the |+python/dyn| + feature} + Specifies the name of the Python 2.x shared library. The default is + DYNAMIC_PYTHON_DLL, which was specified at compile time. + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. + + *'pythonthreedll'* +'pythonthreedll' string (default depends on the build) + global + {not in Vi} + {only available when compiled with the |+python3/dyn| + feature} + Specifies the name of the Python 3 shared library. The default is + DYNAMIC_PYTHON3_DLL, which was specified at compile time. + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. *'quoteescape'* *'qe'* 'quoteescape' 'qe' 文字列 (既定では "\") @@ -5751,6 +5900,10 @@ Note 1番目の形式では、行全体がオプション指定に使われる 2 NFA エンジン Note: NFA エンジンを使う設定のときは、サポートされていないパターンを使 うと、そのパターンはマッチしない。これは正規表現エンジンのデバッグ用。 + Using automatic selection enables Vim to switch the engine, if the + default engine becomes too costly. E.g., when the NFA engine uses too + many states. This should prevent Vim from hanging on a combination of + a complex pattern with long text. *'relativenumber'* *'rnu'* *'norelativenumber'* *'nornu'* 'relativenumber' 'rnu' 切替 (既定ではオフ) @@ -5885,8 +6038,10 @@ Note 1番目の形式では、行全体がオプション指定に使われる 挿入モードでの文字の挿入が通常と逆向きになる。"typing backwards" を参 照 |ins-reverse|。このオプションは、オプション 'allowrevins' がオンな らば挿入モードでコマンド CTRL-_ を使うことで切り替えられる。 - NOTE: このオプションは、オプション 'compatible' または 'paste' がオン - のときはオフになるので注意。 + NOTE: このオプションは、オプション 'compatible' がオンのときはオフにな + るので注意。 + This option is reset when 'paste' is set and restored when 'paste' is + reset. *'rightleft'* *'rl'* *'norightleft'* *'norl'* 'rightleft' 'rl' 切替 (既定ではオフ) @@ -5916,6 +6071,17 @@ Note 1番目の形式では、行全体がオプション指定に使われる これはヘブライ語、アラビア語、ペルシア語などの言語で便利である。 オプション 'rightleft' を設定しないと 'rightleftcmd' は効果がない。 + *'rubydll'* +'rubydll' string (default: depends on the build) + global + {not in Vi} + {only available when compiled with the |+ruby/dyn| + feature} + Specifies the name of the Ruby shared library. The default is + DYNAMIC_RUBY_DLL, which was specified at compile time. + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. + *'ruler'* *'ru'* *'noruler'* *'noru'* 'ruler' 'ru' 切替 (既定ではオフ) グローバル @@ -5940,7 +6106,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる の列数が、ダッシュで区切られて両方表示される。 空行では "0-1" と表示される。 空のバッファでは行数も0になり、 "0,0-1" と表示される。 - このオプションは、'paste' がオンのときはオフになる。 + This option is reset when 'paste' is set and restored when 'paste' is + reset. ルーラーを常に表示したくはないが、テキスト内のどこにいるのか知りたいと きは、コマンド "g CTRL-G" を使うこと |g_CTRL-G|。 NOTE: このオプションは、オプション 'compatible' がオンのときはオフに @@ -6508,6 +6675,7 @@ Note 1番目の形式では、行全体がオプション指定に使われる c |ins-completion-menu| 関連のメッセージを表示しない。例えば、 "-- XXX補完 (YYY)"、"1 番目の該当 (全該当 2 個中)"、"唯一の該 当"、"パターンは見つかりませんでした"、"始めに戻る"、など。 + q use "recording" instead of "recording @a" このオプションはバッファを変更するとき を打ち込むのを避ける機 会を提供する。が、表示の余裕がある限り有益なメッセージを表示する。 @@ -6594,7 +6762,9 @@ Note 1番目の形式では、行全体がオプション指定に使われる チした括弧が画面上に見えているときのみジャンプする。マッチを表示する時 間はオプション 'matchtime' で設定できる。 マッチする閉じ括弧がないときは、ビープ音が鳴る (マッチが見えても見えな - くても)。このオプションは、'paste' がオンのときはオフになる。 + くても)。 + This option is reset when 'paste' is set and restored when 'paste' is + reset. 'cpoptions' にフラグ 'm' が含まれていないときは、ジャンプ中に文字を入 力するとカーソルがすぐに元の場所に戻る。 マッチの表示時のカーソルの形状や点滅方法については、'guicursor' の @@ -6702,8 +6872,9 @@ Note 1番目の形式では、行全体がオプション指定に使われる ここで ^H は CTRL-V CTRL-H と打ち込むと入力される。 コマンド ">>" を使ったとき、'#' で始まる行は右に移動しない。 NOTE: 'smartindent' は、'compatible' がオンのときはオフに設定されるの - で注意。また 'paste' がオンのときは高度なインデントは使えないことも注 - 意。 + で注意。 + This option is reset when 'paste' is set and restored when 'paste' is + reset. *'smarttab'* *'sta'* *'nosmarttab'* *'nosta'* 'smarttab' 'sta' 切替 (既定ではオフ) @@ -6719,6 +6890,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる 挿入される文字 (タブ文字または空白) は 'expandtab' によって変わる。 |ins-expandtab| も参照。'expandtab' がオフのときは、 を打ち込む と空白の数が最小になる {訳注: できる限り空白をタブ文字で置き換える}。 + This option is reset when 'paste' is set and restored when 'paste' is + reset. NOTE: このオプションは、オプション 'compatible' がオンのときはオフにな るので注意。 @@ -6734,7 +6907,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる 作する。 'sts' がゼロならこの機能は無効になる。 'sts' がマイナスなら 'shiftwidth' の値が使われる。 - このオプションは、'paste' がオンのときは 0 になる。 + 'softtabstop' is set to 0 when the 'paste' option is set and restored + when 'paste' is reset. |ins-expandtab| も参照。'expandtab' がオフのときは、 を打ち込むと 空白の数が最小になる {訳注: できる限り空白をタブ文字で置き換える}。 'cpoptions' にフラグ 'L' を含めると、'list' がオンのとき、タブの扱い方 @@ -6813,6 +6987,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる 小文字で2文字の地域名である。複数の地域名を列挙することもできる: "en_us, en_ca" とすると US 英語とカナダ英語の両方に対応する。しかし オーストラリア、ニュージーランド、英国に固有の単語には対応しない。 + (Note: currently en_au and en_nz dictionaries are older than en_ca, + en_gb and en_us). "cjk" という名前が含まれる場合は、東アジアの文字はスペルチェックから除 外される。これは、アジアの文字を含むようなテキストを編集する際に便利で ある。 @@ -7058,7 +7234,7 @@ Note 1番目の形式では、行全体がオプション指定に使われる 全体が空になる。これにより、次のようなグループは、フラグがどれも設定さ れていないときは全く表示されない。 > :set statusline=...%(\ [%M%R%H]%)... -< +< *g:actual_curbuf* 気を付けてほしいのは、expression はステータス行が表示されるたびに評価 されるということだ。あるバッファまたはウィンドウのステータス行が描画さ れている最中は、一時的にそのバッファまたはウィンドウがカレントバッファ @@ -7190,6 +7366,7 @@ Note 1番目の形式では、行全体がオプション指定に使われる を分割する。 含まれていないときは、分割はされない。カレントウィンド ウが使われる。 + vsplit Just like "split" but split vertically. newtab "split" と同様だが、新しいタブページを開く。"split" と 両方指定された場合はこちらが優先される。 @@ -7319,12 +7496,20 @@ Note 1番目の形式では、行全体がオプション指定に使われる < ['0' の前後の余白は、単一の でなければならない] 二分探索が完了し、'tags' で列挙されたどのファイルからもマッチが見つか - らなかった場合、'ignorecase' がオンであるか、もしくはその検索がタグ名 - による検索ではなくパターンによる検索であれば、線形探索を使って検索が再 - 試行される。 + らなかった場合、かつ大文字小文字が無視される場合、もしくはその検索がタ + グ名による検索ではなくパターンによる検索であれば、線形探索を使って検索 + が再試行される。 整列されていないタグファイル内のタグや、大文字と小文字の違いのあるマッ チは、再試行でのみ見つかるだろう。 + If a tag file indicates that it is case-fold sorted, the second, + linear search can be avoided when case is ignored. Use a value of '2' + in the "!_TAG_FILE_SORTED" line for this. A tag file can be case-fold + sorted with the -f switch to "sort" in most unices, as in the command: + "sort -f -o tags tags". For "Exuberant ctags" version 5.x or higher + (at least 5.5) the --sort=foldcase switch can be used for this as + well. Note that case must be folded to uppercase for this to work. + {参考用の旧訳: タグファイルが大文字・小文字を無視して整列されていることを示しているな ら、'ignorecase' のための線形探索はしなくてもよくなる。それには "!_TAG_FILE_SORTED" 行の値として '2' を使う。ほとんどの Unix では @@ -7333,6 +7518,11 @@ Note 1番目の形式では、行全体がオプション指定に使われる tags tags"。"Exuberant ctags" のバージョン 5.x 以降 (少なくとも 5.5 以 降) ではオプション --sort=foldcase をつけることでこれと同様のことがで きる。Note: これが機能するために文字は大文字にまとめられる。 + :旧訳ここまで} + + By default, tag searches are case-sensitive. Case is ignored when + 'ignorecase' is set and 'tagcase' is "followic", or when 'tagcase' is + "ignore". 'tagbsearch' がオフの場合、完全なマッチがあるときはタグの検索はより遅 くなるが、完全なマッチがないときは検索はより速くなる。整列されていない @@ -7345,6 +7535,16 @@ Note 1番目の形式では、行全体がオプション指定に使われる ばコマンドライン補完や ":help") には影響しない。 {Vi: バージョンによっては常に二分探索を使う} + *'tagcase'* *'tc'* +'tagcase' 'tc' string (default "followic") + global or local to buffer |global-local| + {not in Vi} + This option specifies how case is handled when searching the tags + file: + followic Follow the 'ignorecase' option + ignore Ignore case + match Match case + *'taglength'* *'tl'* 'taglength' 'tl' 数値 (既定では 0) グローバル @@ -7402,6 +7602,17 @@ Note 1番目の形式では、行全体がオプション指定に使われる このオプションをオンにするのは、":tag" をマッピング内で使っていて、タ グスタックを変更すべきでないときに便利である。 + *'tcldll'* +'tcldll' string (default depends on the build) + global + {not in Vi} + {only available when compiled with the |+tcl/dyn| + feature} + Specifies the name of the Tcl shared library. The default is + DYNAMIC_TCL_DLL, which was specified at compile time. + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. + *'term'* *E529* *E530* *E531* 'term' 文字列 (既定では $TERM、それが失敗したら GUI版では: "builtin_gui" @@ -7450,14 +7661,12 @@ Note 1番目の形式では、行全体がオプション指定に使われる イが理解できるかを指定する。GUI版ではキーボードにのみ適用される (ディ スプレイにはオプション 'encoding' が使われる)。Macで 'macatsui' がオフ になっているときは例外で、'termencoding' は "macroman" になる。 - Win32 のコンソール版では、コンソールのコードページがANSIコードページで - ないなら場合、その値が既定値となる。 *E617* Note: これはGTK+ 2 GUIには適用されない。GUIの初期化に成功した後で強制 的に 'termencoding' が "utf-8" に設定される。 これを他の値に設定しようとしても失敗し、エラーメッセージが表示される。 - Win32 GUIでは 'termencoding' は入力された文字に対しては適用されない。 - Win32では常にUnicode文字が渡されるからである。 + Win32 GUIとコンソールでは 'termencoding' は使用されない。Win32では常に + Unicode文字が渡されるからである。 空のときは、'encoding' で指定されたエンコーディングが使われる。これが 通常の値である。 'termencoding' と 'encoding' の組み合わせが全て正しいわけではない。 @@ -7505,9 +7714,11 @@ Note 1番目の形式では、行全体がオプション指定に使われる バッファについてローカル {Vi にはない} 入力されているテキストの最大幅。行がそれより長くなると、この幅を超えな - いように空白の後で改行される。値を 0 に設定すると無効になる。オプショ - ン 'textwidth' が 0 のときは、'wrapmargin' が使われる場合がある。 - 'formatoptions' と |ins-textwidth| を参照。 + いように空白の後で改行される。値を 0 に設定すると無効になる。 + 'textwidth' is set to 0 when the 'paste' option is set and restored + when 'paste' is reset. + オプション 'textwidth' が 0 のときは、'wrapmargin' が使われる場合があ + る。'formatoptions' と |ins-textwidth| を参照。 'formatexpr' が設定されている場合、その値を使って改行される。 NOTE: このオプションは、オプション 'compatible' がオンのときは 0 にな るので注意。 @@ -8050,8 +8261,9 @@ Note 1番目の形式では、行全体がオプション指定に使われる % これが含まれると、バッファリストを保存・復元する。Vimの起動時 にファイル名が引数に含まれていると、バッファリストは復元されな い。 Vimの起動時にファイル名が引数に含まれていないと、バッファ - リストが viminfo ファイルから復元される。ファイル名のないバッ - ファとヘルプ用バッファは、viminfo ファイルには書き込まれない。 + リストが viminfo ファイルから復元される。 Quickfix + ('buftype'), unlisted ('buflisted'), unnamed and buffers on + removable media (|viminfo-r|) are not saved. このフラグの後に続けて数値を書くと、保存されるバッファ数の最大 値を指定することができる。数値が書かれていない場合、全てのバッ ファが保存される。 @@ -8525,6 +8737,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる 'number' や 'foldcolumn' など幅をとるオプションを使用していると、テキ ストの幅がこの値より少なくなる。これはVi互換の動作である。 オプション 'textwidth' が非0 のときは、このオプションは使われない。 + This option is set to 0 when 'paste' is set and restored when 'paste' + is reset. 'formatoptions' と |ins-textwidth| も参照。 {Vi: 少し不便な、違った動 作をする} From ab82c4b2bfa7870a94c179f8cfbf06e1851fdcd6 Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Sat, 30 Jan 2016 20:23:06 +0900 Subject: [PATCH 11/11] finish to impose english texts --- catchup-7.4.1194.md | 11 +- doc/pi_netrw.jax | 1028 +++++++++++++++++++++++++++++++------------ 2 files changed, 756 insertions(+), 283 deletions(-) diff --git a/catchup-7.4.1194.md b/catchup-7.4.1194.md index 235a380a2..37c26ee69 100644 --- a/catchup-7.4.1194.md +++ b/catchup-7.4.1194.md @@ -9,18 +9,12 @@ ## 流れ 1. 英語ファイルを全部更新 (終わった!) -2. 1の差分を見ながら、日本語ファイルに英文のまま反映 (最低限の目標) +2. 1の差分を見ながら、日本語ファイルに英文のまま反映 (最低限の目標:終わった!) 3. 2の差分を翻訳 (できたらココまでやりたい) 4. このファイルを削除 ## ファイル一覧 -### 未作業 - -追いついたファイルは、下記の一覧から削除し、適切なセクションへ移動 - - doc/pi_netrw.jax - ### 英文だけは反映済み 以上は変更点が100行未満なので、翻訳しやすいはず。 @@ -46,7 +40,7 @@ doc/spell.jax doc/tagsrch.jax doc/term.jax - doc/usr_02.jax # 行数は多いけど、まとまった書き換えで、楽そう + doc/usr_02.jax # 行数は多いけど、まとまった書き換えで、楽そう doc/usr_03.jax doc/usr_41.jax doc/various.jax @@ -55,6 +49,7 @@ doc/eval.jax doc/options.jax + doc/pi_netrw.jax # 地獄 doc/syntax.jax doc/windows.jax diff --git a/doc/pi_netrw.jax b/doc/pi_netrw.jax index aa010ee40..27492490b 100644 --- a/doc/pi_netrw.jax +++ b/doc/pi_netrw.jax @@ -1,4 +1,4 @@ -*pi_netrw.txt* For Vim バージョン 7.4. Last change: 2014 May 13 +*pi_netrw.txt* For Vim バージョン 7.4. Last change: 2015 Oct 31 ------------------------------------------------ NETRW REFERENCE MANUAL by Charles E. Campbell @@ -6,7 +6,7 @@ Author: Charles E. Campbell (remove NOSPAM from Campbell's email first) -Copyright: Copyright (C) 1999-2014 Charles E Campbell *netrw-copyright* +Copyright: Copyright (C) 1999-2015 Charles E Campbell *netrw-copyright* The VIM LICENSE applies to the files in this package, including netrw.vim, pi_netrw.txt, netrwFileHandlers.vim, netrwSettings.vim, and syntax/netrw.vim. Like anything else that's free, netrw.vim and its @@ -20,7 +20,7 @@ Copyright: Copyright (C) 1999-2014 Charles E Campbell *netrw-copyright* *dav* *ftp* *netrw-file* *rcp* *scp* *davs* *http* *netrw.vim* *rsync* *sftp* - *fetch* *netrw* *network* + *fetch* *network* ============================================================================== 1. 目次 *netrw-contents* {{{1 @@ -57,7 +57,7 @@ Copyright: Copyright (C) 1999-2014 Charles E Campbell *netrw-copyright* ブックマークしたディレクトリに移動..................|netrw-gb| 前方のディレクトリに移動............................|netrw-u| 後方のディレクトリに移動............................|netrw-U| - ユーザー定義関数でブラウジングをカスタマイズ........|netrw-x| + 特殊ハンドラでブラウジングをカスタマイズ............|netrw-x| ブックマークの削除..................................|netrw-mB| ファイル/ディレクトリの削除.........................|netrw-D| ディレクトリ探査コマンド............................|netrw-explore| @@ -76,7 +76,9 @@ Copyright: Copyright (C) 1999-2014 Charles E Campbell *netrw-copyright* ファイルのマークを外す..............................|netrw-mF| QuickFix リストを使ってファイルをマークする.........|netrw-qF| 正規表現を使ってファイルをマークする................|netrw-mr| - マークファイル: 任意のコマンド......................|netrw-mx| + マークファイル: シュルコマンド......................|netrw-mx| + Marked Files: Arbitrary Shell Command, En Bloc......|netrw-mX| + Marked Files: Arbitrary Vim Command.................|netrw-mv| マークファイル: 圧縮と伸長..........................|netrw-mz| マークファイル: コピー..............................|netrw-mc| マークファイル: Diff................................|netrw-md| @@ -193,22 +195,23 @@ scp や ftp 以外のプロトコルもサポートされています。次の 外部プログラムとプロトコル *netrw-externapp* {{{2 - プロトコル 変数 初期設定 - -------- ---------------- ------------- - dav: *g:netrw_dav_cmd* = "cadaver" if cadaver があるなら - dav: g:netrw_dav_cmd = "curl -o" elseif curl があるなら - fetch: *g:netrw_fetch_cmd* = "fetch -o" if fetch があるなら - ftp: *g:netrw_ftp_cmd* = "ftp" - http: *g:netrw_http_cmd* = "elinks" if elinks があるなら - http: g:netrw_http_cmd = "links" elseif links があるなら - http: g:netrw_http_cmd = "curl" elseif curl があるなら - http: g:netrw_http_cmd = "wget" elseif wget があるなら - http: g:netrw_http_cmd = "fetch" elseif fetch があるなら + プロトコル 変数 初期設定 + -------- ---------------- ------------- + dav: *g:netrw_dav_cmd* = "cadaver" if cadaver があるなら + dav: g:netrw_dav_cmd = "curl -o" elseif curl があるなら + fetch: *g:netrw_fetch_cmd* = "fetch -o" if fetch があるなら + ftp: *g:netrw_ftp_cmd* = "ftp" + http: *g:netrw_http_cmd* = "elinks" if elinks があるなら + http: g:netrw_http_cmd = "links" elseif links があるなら + http: g:netrw_http_cmd = "curl" elseif curl があるなら + http: g:netrw_http_cmd = "wget" elseif wget があるなら + http: g:netrw_http_cmd = "fetch" elseif fetch があるなら http: *g:netrw_http_put_cmd* = "curl -T" - rcp: *g:netrw_rcp_cmd* = "rcp" - rsync: *g:netrw_rsync_cmd* = "rsync -a" - scp: *g:netrw_scp_cmd* = "scp -q" - sftp: *g:netrw_sftp_cmd* = "sftp" + rcp: *g:netrw_rcp_cmd* = "rcp" + rsync: *g:netrw_rsync_cmd* = "rsync -a" + scp: *g:netrw_scp_cmd* = "scp -q" + sftp: *g:netrw_sftp_cmd* = "sftp" + file: *g:netrw_file_cmd* = "elinks" or "links" *g:netrw_http_xcmd* : http://... プロトコルで使用するオプションはこの 変数で指定できます。コマンドに合わせて設定を変更してください。初期設定 @@ -360,7 +363,12 @@ Netrw にはたくさんの変数が用意されていて、好きなように fun! MyFuncRef() endfun let g:Netrw_funcref= function("MyFuncRef") + < + *g:Netrw_UserMaps* specifies a function or |List| of functions which can + be used to set up user-specified maps and functionality. + See |netrw-usermaps| + *g:netrw_ftp* 変数が存在しない場合はデフォルト ftp 使用 =0 デフォルト ftp を使う (uid password) =1 ftp の別方式を使う (user uid password) @@ -399,6 +407,14 @@ Netrw にはたくさんの変数が用意されていて、好きなように *g:netrw_preview* =0 (初期設定) プレビューウィンドウを水平分割で表示する =1 プレビューウィンドウを垂直分割で表示する。 "直前のウィンドウ" (|netrw-P|参照) にも作用します。 + The |g:netrw_alto| variable may be used to provide + additional splitting control: + g:netrw_preview g:netrw_alto result + 0 0 |:aboveleft| + 0 1 |:belowright| + 1 0 |:topleft| + 1 1 |:botright| + To control sizing, see |g:netrw_winsize| *g:netrw_scpport* = "-P" : scp のポート番号を設定するためのオプション *g:netrw_sshport* = "-p" : ssh のポート番号を設定するためのオプション @@ -663,6 +679,16 @@ ftp でパスワードが必要なときは Vim の組み込み関数 |inputsecr filetype plugin indent on endif < +By also including the following lines in your .vimrc, one may have netrw +immediately activate when using [g]vim without any filenames, showing the +current directory: > + + " Augroup VimStartup: + augroup VimStartup + au! + au VimEnter * if expand("%") == "" | e . | endif + augroup END +< ============================================================================== 6. 透過的なリモートファイル編集 *netrw-transparent* {{{1 @@ -818,7 +844,7 @@ netrw は複数のプロトコルをサポートしています。それぞれ g:netrw_http_cmd 変数 ="fetch -o" if fetch があるなら g:netrw_http_cmd 変数 ="wget -O" else if wget があるなら g:netrw_http_put_cmd 変数 ="curl -T" - g:netrw_list_cmd 変数 ="ssh USEPORT HOSTNAME ls -Fa" + |g:netrw_list_cmd| 変数 ="ssh USEPORT HOSTNAME ls -Fa" g:netrw_rcp_cmd 変数 ="rcp" g:netrw_rsync_cmd 変数 ="rsync -a" g:netrw_scp_cmd 変数 ="scp -q" @@ -1017,6 +1043,10 @@ QUICK HELP *netrw-quickhelp* {{{2 < Netrw のヘルプを開く ディレクトリに移動、またはファイルを開く |netrw-cr| ファイル/ディレクトリを削除する |netrw-del| + 隠しファイルのパターンを編集する |netrw-ctrl-h| + 最新の情報に更新する |netrw-ctrl-l| + Browse using a gvim server |netrw-ctrl-r| + Shrink/expand a netrw/explore window |netrw-c-tab| - 一つ上のディレクトリに移動する |netrw--| a 隠しファイルの表示を切り替える |netrw-a| 通常表示 @@ -1027,15 +1057,17 @@ QUICK HELP *netrw-quickhelp* {{{2 d ディレクトリを作成する |netrw-d| D ファイル/ディレクトリ(複数可)を削除する |netrw-D| gb 前のブックマークされたディレクトリに移動 |netrw-gb| + gd Force treatment as directory |netrw-gd| + gf Force treatment as file |netrw-gf| gh ドットファイルの表示/非表示を切り替える |netrw-gh| - 隠しファイルのパターンを編集する |netrw-ctrl-h| i 表示方法を切り替える (thin, long, wide, tree) |netrw-i| - 最新の情報に更新する |netrw-ctrl-l| mb カレントディレクトリをブックマークする |netrw-mb| mc マークしたファイルをターゲットディレクトリにコピー |netrw-mc| md マークしたファイルの差分を表示する (3ファイルまで) |netrw-md| me マークしたファイルを引数リストに入れ編集する |netrw-me| mf ファイルをマークする |netrw-mf| + mF Unmark files |netrw-mF| + mg Apply vimgrep to marked files |netrw-mg| mh マークしたファイルの拡張子を隠しリストに登録/解除 |netrw-mh| mm マークしたファイルをターゲットディレクトリに移動 |netrw-mm| mp マークしたファイルを印刷する |netrw-mp| @@ -1043,7 +1075,9 @@ QUICK HELP *netrw-quickhelp* {{{2 mt 表示中のディレクトリをターゲットディレクトリにする |netrw-mt| mT マークしたファイルに対して ctags を実行 |netrw-mT| mu すべてのマークを解除する |netrw-mu| + mv Apply arbitrary vim command to marked files |netrw-mv| mx マークしたファイルに対して任意のシェルコマンドを実行 |netrw-mx| + mX Apply arbitrary shell command to marked files en bloc|netrw-mX| mz マークしたファイルを圧縮/伸長する |netrw-mz| o カーソル位置のファイル/ディレクトリを |netrw-o| 新しいウィンドウで開く。水平分割。 @@ -1052,6 +1086,7 @@ QUICK HELP *netrw-quickhelp* {{{2 P 直前に使用していたウィンドウで開く |netrw-P| qb ブックマークと履歴の一覧を表示する |netrw-qb| qf ファイル情報を表示する |netrw-qf| + qF Mark files using a quickfix list |netrw-qF| r ソート順を逆にする |netrw-r| R ファイル/ディレクトリ(複数可)の名前を変える |netrw-R| s ソート方法を変える: name, time, file size |netrw-s| @@ -1073,8 +1108,8 @@ QUICK HELP *netrw-quickhelp* {{{2 |netrw-P| 参照 (gvim only) 選択したファイル/ディレクトリを削除する。 <2-leftmouse> (gvim only) 使用できる条件: - * netrw からファイルを開いたとき - * |g:netrw_retmap| == 1 + * netrw からファイルを開いたとき (かつ) + * |g:netrw_retmap| == 1 (かつ) * netrw がロードされた時点で <2-leftmouse> に対する マップが定義されていない netrw ブラウザウィンドウに戻る。|g:netrw_retmap|参照。 @@ -1091,7 +1126,7 @@ QUICK HELP *netrw-quickhelp* {{{2 :Ntree....................................................|netrw-ntree| :Explore[!] [dir] カレントファイルのディレクトリを開く...|netrw-explore| :Hexplore[!] [dir] 水平分割 & Explore.....................|netrw-explore| - :Lexplore [dir] 左エクスプローラー切り替え.............|netrw-explore| + :Lexplore[!] [dir] 左エクスプローラー切り替え.............|netrw-explore| :Nexplore[!] [dir] 垂直分割 & Explore.....................|netrw-explore| :Pexplore[!] [dir] 垂直分割 & Explore.....................|netrw-explore| :Rexplore Explorer に戻る........................|netrw-explore| @@ -1101,17 +1136,44 @@ QUICK HELP *netrw-quickhelp* {{{2 ディレクトリをブックマークする {{{2 *netrw-mb* *netrw-bookmark* *netrw-bookmarks* -次のコマンドでディレクトリをブックマークできます > + +次のコマンドで現在見ているディレクトリをブックマークできます > mb < + *.netrwbook* ブックマークは $HOME/.netrwbook に保存されます。ブックマークは常にソートされま す。 +If there are marked files and/or directories, mb will add them to the bookmark +list. + +*netrw-:NetrwMB* +Addtionally, one may use :NetrwMB to bookmark files or directories. > + + :NetrwMB[!] [files/directories] + +< No bang: enters files/directories into Netrw's bookmark system + + No argument and in netrw buffer: + if there are marked files : bookmark marked files + otherwise : bookmark file/directory under cursor + No argument and not in netrw buffer: bookmarks current open file + Has arguments : |glob()|s each arg and bookmarks them + + With bang: deletes files/directories from Netrw's bookmark system + +The :NetrwMB command is available outside of netrw buffers (once netrw has been +invoked in the session). + +The file ".netrwbook" holds bookmarks when netrw (and vim) is not active. By +default, its stored on the first directory on the user's |'runtimepath'|. + 関連項目: |netrw-gb| ブックマークに戻る (移動する) |netrw-mB| ブックマークを削除する |netrw-qb| ブックマークを一覧表示する + |g:netrw_home| controls where .netrwbook is kept ブラウジング *netrw-cr* {{{2 @@ -1134,7 +1196,7 @@ QUICK HELP *netrw-quickhelp* {{{2 gui (gvim) では (左クリック) でファイルを選択できます。また、 - *|g:netrw_retmap| == 1 (初期設定は0) + * |g:netrw_retmap| == 1 (初期設定は0) * netrw からファイルを開いたとき * netrw がロードされた時点で <2-leftmouse> に対するマップが定義されていない @@ -1155,11 +1217,14 @@ gui (gvim) では (左クリック) でファイルを選択でき ルが置かれているディレクトリを閉じることができます。 -関連トピック: |netrw-o| |netrw-p| |netrw-P| |netrw-t| |netrw-v| -関連設定: |g:netrw_browse_split| |g:netrw_fastbrowse| - |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd| - |g:netrw_ftp_timelist_cmd| |g:netrw_ssh_cmd| - |g:netrw_ssh_browse_reject| |g:netrw_use_noswf| +関連トピック: + |netrw-ctrl-r| |netrw-o| |netrw-p| + |netrw-P| |netrw-t| |netrw-v| +関連設定: + |g:netrw_browse_split| |g:netrw_fastbrowse| + |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd| + |g:netrw_ftp_timelist_cmd| |g:netrw_ssh_browse_reject| + |g:netrw_ssh_cmd| |g:netrw_use_noswf| 水平分割ウィンドウを使ったブラウジング *netrw-o* *netrw-horiz* {{{2 @@ -1172,19 +1237,23 @@ gui (gvim) では (左クリック) でファイルを選択でき 関連設定: |g:netrw_alto| |g:netrw_winsize| -関連アクション |netrw-cr| |netrw-p| |netrw-t| |netrw-v| +関連トピック: + |netrw-ctrl-r| |netrw-o| |netrw-p| + |netrw-P| |netrw-t| |netrw-v| 関連設定変数: |g:netrw_alto| 分割の方向 (上/下) を制御 |g:netrw_winsize| 初期サイズを制御 -タブを使ったブラウジング *netrw-t* +タブを使ったブラウジング *netrw-t* {{{2 でファイル/ディレクトリを開くことができますが、代わりに "t" マップを使え ばそれを新しいタブで開くことができます。 バックグラウンドタブで新しく開きたい場合は |gT| を使います。 -関連アクション |netrw-cr| |netrw-o| |netrw-p| |netrw-v| +関連トピック: + |netrw-ctrl-r| |netrw-o| |netrw-p| + |netrw-P| |netrw-t| |netrw-v| 関連設定変数: |g:netrw_winsize| 初期サイズを制御 @@ -1199,11 +1268,29 @@ gui (gvim) では (左クリック) でファイルを選択でき 一つのディレクトリには一つのバッファが使われます。"v" で表示済みのサブディレク トリを開くとウィンドウは分割されますが、同じバッファが再び表示されます。 -関連アクション: |netrw-cr| |netrw-o| |netrw-t| |netrw-v| +関連トピック: + |netrw-ctrl-r| |netrw-o| |netrw-p| + |netrw-P| |netrw-t| |netrw-v| 関連設定変数: |g:netrw_altv| 分割の方向 (右/左) を制御 |g:netrw_winsize| 初期サイズを制御 + +BROWSING USING A GVIM SERVER *netrw-ctrl-r* {{{2 + +One may keep a browsing gvim separate from the gvim being used to edit. +Use the map on a file (not a directory) in the netrw browser, and it +will use a gvim server (see |g:netrw_servername|). Subsequent use of +(see |netrw-cr|) will re-use that server for editing files. + +Related topics: + |netrw-ctrl-r| |netrw-o| |netrw-p| + |netrw-P| |netrw-t| |netrw-v| +Associated setting variables: + |g:netrw_servername| : sets name of server + |g:netrw_browse_split| : controls how will open files + + 一覧表示スタイル変更 (THIN LONG WIDE TREE) *netrw-i* {{{2 (細 長 広 ツリー) @@ -1229,7 +1316,7 @@ tree 形式ではトップディレクトリに続いてファイル/ディレ デフォルトの表示スタイルを変更できます。(|g:netrw_liststyle|) 参照。 例えば、次の行を .vimrc に書くと: > - let g:netrw_liststyle= 4 + let g:netrw_liststyle= 3 ツリー形式の表示スタイルがデフォルトで使用されます。 ツリー形式を使う典型的な方法は以下の通りです: > @@ -1280,15 +1367,23 @@ Note: |netrw-qb| はブックマークと履歴を両方表示します。履歴 リに移動できます。反対に移動したい場合は |netrw-U| を参照。 "u" マップはカウントを指定することができ、履歴の特定の位置に戻ることができま -す。|netrw-qb| の一覧で表示される履歴の番号はこのカウントとして使えます。 +す。qb (|netrw-qb|を参照) の一覧で表示される履歴の番号はこのカウントとして使え +ます。 -履歴の量を制御するには |g:netrw_dirhistmax| を参照。 + *.netrwhist* +履歴の量を制御するには |g:netrw_dirhistmax| を参照。 The file ".netrwhist" +holds history when netrw (and vim) is not active. By default, its stored on +the first directory on the user's |'runtimepath'|. + +Related Topics: + |netrw-U| changing to a successor directory + |g:netrw_home| controls where .netrwhist is kept 次のディレクトリに進む *netrw-U* *netrw-downdir* {{{2 "U" マップを使用すると、次のディレクトリに移動できます。このマップは "u" マッ -プの反対です (|netrw-u|参照)。q マップを使用するとブックマークと履歴の一覧を表 +プの反対です (|netrw-u|参照)。qb マップを使用するとブックマークと履歴の一覧を表 示できます (|netrw-qb|参照)。 "U" マップはカウントを指定することができ、履歴の特定の位置に進むことができま @@ -1297,7 +1392,7 @@ Note: |netrw-qb| はブックマークと履歴を両方表示します。履歴 履歴の量を制御するには |g:netrw_dirhistmax| を参照。 -ツリーのトップを変更する *netrw-ntree* *:Ntree* +ツリーのトップを変更する *netrw-ntree* *:Ntree* *netrw-gn* {{{2 ツリー表示のツリーのトップを変更するには次のコマンドを使います > @@ -1307,20 +1402,24 @@ Note: |netrw-qb| はブックマークと履歴を両方表示します。履歴 る)。 "dirname" を指定した場合、指定された名前が使われます。 +The "gn" map will take the word below the cursor and use that for +changing the top of the tree listing. + -NETRW CLEAN *netrw-clean* *:NetrwClean* +NETRW CLEAN *netrw-clean* *:NetrwClean* {{{2 -:NetrwClean を使うと、ホームディレクトリから netrw を削除できます。正確には、 +NetrwClean を使うと、ホームディレクトリから netrw を削除できます。正確には、 |'runtimepath'| の最初のディレクトリから削除します。 -:NetrwClean! を使うと、|'runtimepath'| のすべてのディレクトリから netrw を削除 -できます。 +NetrwClean! を使うと、|'runtimepath'| のすべてのディレクトリから netrw を削除 +しようと試みます。 Of course, you have to have write/delete permissions +correct to do this. どちらのコマンドも、本当に削除していいかどうかを確認するダイアログが最初に表示 されます。ファイルを削除する権限がない場合はエラーメッセージが表示されます。 *netrw-gx* -ユーザー定義関数でブラウジングをカスタマイズ *netrw-x* *netrw-handler* {{{2 +特殊ハンドラででブラウジングをカスタマイズ *netrw-x* *netrw-handler* {{{2 (|netrw_filehandler|も参照) html, gif, jpeg, (word/office) doc などのファイルは専用ハンドラ (コンピュータ @@ -1329,7 +1428,7 @@ Netrw ではそのような専用ハンドラの呼び出しをサポートし * ファイル一覧表示中に "x" キーを押す * ファイルを開いているときに、ファイル名の上で gx を押す -< (|g:netrw_nogx| が設定されている場合は使えません) +< (後ろは |g:netrw_nogx| が設定されている場合は使えません) Netrw は次の方法で専用ハンドラを決定します: @@ -1338,10 +1437,10 @@ Netrw は次の方法で専用ハンドラを決定します: :let g:netrw_browsex_viewer= "kfmclient exec" < or > - :let g:netrw_browsex_viewer= "gnome-open" + :let g:netrw_browsex_viewer= "xdg-open" < - g:netrw_browsex_viewer が '-' のときは netrwFileHandler() が最初に呼ばれま - す (|netrw_filehandler|参照)。 + g:netrw_browsex_viewer が '-' のときは netrwFileHandler#Invoke() が最初に呼 + ばれます (|netrw_filehandler|参照)。 * Windows 32 or 64 では、url と FileProtocolHandler dll が使われます。 * Gnome (with gnome-open): gnome-open が使われます。 @@ -1353,16 +1452,31 @@ Netrw は次の方法で専用ハンドラを決定します: れます。例えば OpenOffice (*.sfx)、画像表示 (*.jpg, *.gif, etc)、PostScript (*.ps, *.eps) などに対応可能です。 +The gx mapping extends to all buffers; apply "gx" while atop a word and netrw +will apply a special handler to it (like "x" works when in a netrw buffer). +One may also use visual mode (see |visual-start|) to select the text that the +special handler will use. Normally gx uses expand("") to pick up the +text under the cursor; one may change what |expand()| uses via the +|g:netrw_gx| variable. Alternatively, one may select the text to be used by +gx via first making a visual selection (see |visual-block|). + +Associated setting variables: + |g:netrw_gx| control how gx picks up the text under the cursor + |g:netrw_nogx| prevent gx map while editing + *netrw_filehandler* -"x" マップはファイルの拡張子に応じて関数を呼び出します。ただし、あらかじめハン -ドラ関数を定義しておく必要があります。 +When |g:netrw_browsex_viewer| exists and is "-", then netrw will attempt to +handle the special file with a vim function. "x" マップはファイルの拡張子に応 +じて関数を呼び出します。ただし、あらかじめハンドラ関数を定義しておく必要があり +ます。 > + 例: mypgm.html x -> NFH_html("scp://user@host/some/path/mypgm.html") 例: mypgm.html x -> NFH_html("scp://user@host/some/path/mypgm.html") < -拡張子ごとのハンドラ関数を自分で定義できます。関数のサンプルは - を参照してください。例: > + 拡張子ごとのハンドラ関数を自分で定義できます。関数のサンプルは + を参照してください。例: > " NFH_suffix(filename) " NFH_拡張子(ファイル名) @@ -1395,6 +1509,13 @@ Netrw は次の方法で専用ハンドラを決定します: {cnt}mB < +If there are marked files, then mB will remove them from the +bookmark list. + +Alternatively, one may use :NetrwMB! (see |netrw-:NetrwMB|). > + + :NetrwMB! [files/directories] + 関連項目: |netrw-gb| ブックマークに戻る (移動する) |netrw-mb| ブックマークを設定する @@ -1454,12 +1575,12 @@ g:netrw_rmdir_cmd によるディレクトリの削除が失敗した場合は :[N]Explore[!] [dir]... カレントファイルのディレクトリを開く *:Explore* :[N]Hexplore[!] [dir]... 水平分割で開く *:Hexplore* - :Rexplore ... エクスプローラーに/から戻る *:Rexplore* + :[N]Lexplore[!] [dir]... 左エクスプローラーを切り替える *:Lexplore* :[N]Sexplore[!] [dir]... カレントファイルのディレクトリを分割 *:Sexplore* して開く - :Texplore [dir]... タブで開く *:Texplore* :[N]Vexplore[!] [dir]... 垂直分割で開く *:Vexplore* - :Lexplore [dir]... 左エクスプローラーを切り替える *:Lexplore* + :Texplore [dir]... タブで開く *:Texplore* + :Rexplore ... エクスプローラーに/から戻る *:Rexplore* :Explore **/pattern で開いたときに使うコマンド : (|netrw-starstar|参照) :Nexplore............. 次のファイルに移動 *:Nexplore* @@ -1468,50 +1589,76 @@ g:netrw_rmdir_cmd によるディレクトリの削除が失敗した場合は *netrw-:Explore* :Explore は、ローカルディレクトリブラウザを開始してカレントファイルのディレク トリ (または [dir] で指定されたディレクトリ) を開きます。編集中の - ファイルに未保存の変更がある場合は新しいウィンドウを作成します。そう - でない場合は同じウィンドウを使用します。通常、ウィンドウの分割は水平 - 分割です。 + ファイルに未保存の変更があり 'hidden' が設定されていない場合は新しい + ウィンドウを作成します。そうでない場合は同じウィンドウを使用します。 + 通常、ウィンドウの分割は水平分割です。 |netrw-:Rexplore| も参照。 :Explore! は、:Explore と同じですが、ウィンドウを垂直分割します。 + + *netrw-:Hexplore* +:Hexplore [dir] は、|:belowright| 水平分割を使って :Explore を実行します。 +:Hexplore! [dir] は、|:aboveleft| 水平分割を使って :Explore を実行します。 + *netrw-:Lexplore* :Lexplore [dir] 現在のタブの左側に、エクスプローラーウィンドウを開いたり閉じた りします。 [dir] を省略したときは現在のディレクトリを開きます。 :Lexplore [dir] は、どのウィンドウで実行したかに関係なく、タブの左側 - でブラウザを開き、指定されたディレクトリを表示します。初期設定では、 - :Lexplore は未初期化の |g:netrw_chgwin| を 2 に設定します。つまり - ファイルを開くときには 2 番目のウィンドウが使われるようになります。 - 参照: |netrw-C|| |g:netrw_chgwin| |g:netrw_winsize| - |netrw-p| |netrw-P|| |g:netrw_browse_split| + でブラウザを開き、指定されたディレクトリを表示します。 + + 初期設定では、:Lexplore は未初期化の |g:netrw_chgwin| を 2 に設定しま + す。つまりファイルを開くときには 2 番目のウィンドウが使われるようにな + ります。 + + The [N] specifies a |g:netrw_winsize| just for the new :Lexplore + window. + + Those who like this method often also often like tree style displays; + see |g:netrw_liststyle|. + + Also see: |netrw-C| |g:netrw_browse_split| |g:netrw_wiw| + |netrw-p| |netrw-P| |g:netrw_chgwin| + |netrw-c-tab| |g:netrw_winsize| + +:[N]Lexplore! is like :Lexplore, except that the full-height Explorer window + will open on the right hand side and an uninitialized |g:netrw_chgwin| + will be set to 1. + *netrw-:Sexplore* -:Sexplore は、常に新しいウィンドウを作成してローカルディレクトリブラウザを開始 - します。Explore と同様、通常はウィンドウは水平分割されます。 -:Sexplore! [dir] は、:Sexplore と同じですが、ウィンドウを垂直分割します。 - *netrw-:Hexplore* -:Hexplore [dir] は、|:belowright| 水平分割を使って :Explore を実行します。 -:Hexplore! [dir] は、|:aboveleft| 水平分割を使って :Explore を実行します。 +:[N]Sexplore は、常に新しいウィンドウを作成してローカルディレクトリブラウザを + 開始します。Explore と同様、通常はウィンドウは水平分割されます。 +:[N}Sexplore! [dir] は、:Sexplore と同じですが、ウィンドウを垂直分割します。 + + *netrw-:Texplore* +:Texplore [dir] は、ブラウザウィンドウを作成する前に |:tabnew| を実行します。 + *netrw-:Vexplore* :Vexplore [dir] は、|:leftabove| 垂直分割を使って :Explore を実行します。 :Vexplore! [dir] は、|:rightbelow| 垂直分割を使って :Explore を実行します。 - *netrw-:Texplore* -:Texplore [dir] は、ブラウザウィンドウを作成する前に |:tabnew| を実行します。 -引数を指定しなかった場合、これらのコマンドはカレントファイルのディレクトリを開 -きます。明示的にディレクトリ (path) を指定することもできます。 +The optional parameters are: -[N] は新しいエクスプローラーウィンドウの幅/高さを指定します。これは -|g:netrw_winsize| よりも優先されます。 + [N]: This parameter will override |g:netrw_winsize| to specify the quantity of + rows and/or columns the new explorer window should have. + Otherwise, the |g:netrw_winsize| variable, if it has been specified by the + user, is used to control the quantity of rows and/or columns new + explorer windows should have. -幅指定がない場合は、|g:netrw_winsize| 変数が (設定されているなら)、新しいエク -スプローラーウィンドウの幅/高さとして使用されます。 + [dir]: By default, these explorer commands use the current file's directory. + However, one may explicitly provide a directory (path) to use instead; + ie. > + :Explore /some/path +< *netrw-:Rexplore* :Rexplore このコマンドは他のコマンドとは少し違い、あらかじめエクスプローラー ウィンドウを開いてからでないと使えません。 エクスプローラーに戻る~ - 例えば netrw ブラウザ上でファイルの上で を押してファイルを開い - たとき、:Rexplore を使うと、そのウィンドウで最後に表示していた - netrw ブラウザの画面に戻ることができます。 + When one edits a file using netrw which can occur, for example, + when pressing while the cursor is atop a filename in a netrw + browser window, a :Rexplore issued while editing that file will + return the display to that of the last netrw browser display in + that window. エクスプローラーから戻る~ 逆に、ディレクトリを開いているとき、:Rexplore を使うと、そのウィン @@ -1523,8 +1670,8 @@ g:netrw_rmdir_cmd によるディレクトリの削除が失敗した場合は 参照: |g:netrw_alto| |g:netrw_altv| |g:netrw_winsize| -*netrw-star* *netrw-starpat* *netrw-starstar* *netrw-starstarpat* -スターとパターンを使った探索 +*netrw-star* *netrw-starpat* *netrw-starstar* *netrw-starstarpat* *netrw-grep* +スターとパターンを使った探索 {{{2 Explore, Sexplore, Hexplore, Vexplore それぞれのコマンドで、次のようなパターン が使われた場合、Explore はそれにマッチするようなファイルのリストを生成します。 @@ -1623,7 +1770,7 @@ For Unix: > 関連設定: |g:netrw_sort_sequence| |g:netrw_sort_options| -カーソル位置のファイルを system() で実行する *netrw-X* +カーソル位置のファイルを system() で実行する *netrw-X* {{{2 実行ファイルの上で X を押すと引数を入力するためのプロンプトが表示されます。そ こで [return] を押すと、netrw はそのコマンドと引数で |system()| を実行します。 @@ -1706,19 +1853,20 @@ netrw にはヘルパ関数の 'netrw_gitignore#Hide()' が用意されていま |g:netrw_list_hide| と一緒に使うことで git の隠しファイルを自動的に隠すことが できます。 -'netrw_gitignore#Hide' はこれらのファイルにあるパターンを検索します: +'netrw_gitignore#Hide' はこれらのファイルにあるパターンを検索します: > + './.gitignore' './.git/info/exclude' global gitignore file: `git config --global core.excludesfile` system gitignore file: `git config --system core.excludesfile` - +< 存在しないファイルは無視されます。 git の隠しファイルのパターンは存在するファイルから取られ、隠しファイル設定のパ ターンに変換されます。例えば、'.gitignore' に '*.log' があったとすると、それは '.*\.log' に変換されます。 この関数を使うには、単にその返り値を |g:netrw_list_hide| オプションに代入しま -す。 +す。 > 例: let g:netrw_list_hide= netrw_gitignore#Hide() netrw で git の隠しファイルをすべて隠す。 @@ -1729,7 +1877,7 @@ git の隠しファイルのパターンは存在するファイルから取ら 例: g:netrw_list_hide= netrw_gitignore#Hide() . '.*\.swp$' 'netrw_gitignore#Hide' と独自のパターンを組み合わせる。 - +< ブラウジングを改善する *netrw-listhack* *netrw-ssh-hack* {{{2 @@ -1865,7 +2013,7 @@ g:netrw_keepdir が 1 のときは netrw のブラウジングディレクトリ ファイルをマークする *netrw-:MF* *netrw-mf* {{{2 (|netrw-mr|も参照) -netrw にはファイルをマークする方法がいくつかあります: +netrw はファイルをマークする方法をいくつか提供しています: * カーソルをファイル名の上に移動して "mf" を押す。 @@ -1886,6 +2034,8 @@ netrw にはファイルをマークする方法がいくつかあります: |netrw-a| ファイル/ディレクトリを隠す |netrw-D| ファイル/ディレクトリを削除する + |netrw-mb| Append marked files to bookmarks + |netrw-mB| Delete marked files from bookmarks |netrw-mc| ファイルをターゲットディレクトリにコピーする |netrw-md| マークしたファイルに vimdiff を適用する |netrw-me| マークしたファイルを開く @@ -1895,7 +2045,9 @@ netrw にはファイルをマークする方法がいくつかあります: |netrw-mp| マークしたファイル印刷する |netrw-mt| |netrw-mm| または |netrw-mc| 用のターゲットを設定する |netrw-mT| マークしたファイルのタグを生成する + |netrw-mv| Apply vim command to marked files |netrw-mx| マークしたファイルにシェルコマンドを適用する + |netrw-mX| Apply shell command to marked files, en bloc |netrw-mz| マークしたファイルを圧縮/伸長する |netrw-O| マークしたファイルを取得する |netrw-R| マークしたファイルの名前を変更する @@ -1917,13 +2069,13 @@ netrw にはファイルをマークする方法がいくつかあります: す。Shift を押したままマウスの左ボタンでドラッグすることで複数のファイルをマー クすることもできます。 (|netrw-mouse| 参照) -*markfilelist* *global_markfilelist* *local_markfilelist* + *markfilelist* *global_markfilelist* *local_markfilelist* マークされたすべてのファイルはグローバルマークファイルリストに記録されます。グ -ローバルリストは一つだけ存在します。さらに、すべての netrw バッファはローカル -マークファイルリストを持っています。netrw バッファは特定のディレクトリと結びつ -いているので、ディレクトリごとにローカルマークファイルリストが存在することにな -ります。マークされたファイルに対する操作はグローバル、またはローカルのマーク -ファイルリストに作用します。 +ローバルリストは一つだけ存在します。さらに、すべての netrw バッファは +バッファローカルマークファイルリストを持っています。netrw バッファは特定の +ディレクトリと結びついているので、ディレクトリごとにローカルマークファイルリス +トが存在することになります。マークされたファイルに対する操作はグローバル、また +はローカルのマークファイルリストに作用します。 既知の問題: ツリー表示モード (|g:netrw_liststyle|) で表示していて、複数のディ レクトリが同じ名前のファイルを持っているとき、そのどれかのファイルをマークする @@ -1933,14 +2085,14 @@ netrw にはファイルをマークする方法がいくつかあります: ファイルのマークを外す *netrw-mF* {{{2 - (|netrw-mf| も参照) + (|netrw-mf|, |netrw-mu| も参照) -このコマンドを使うとカレントバッファ内のすべてのファイルのマークを外すことがで -きます。ファイルごとに個別にマークを外したい場合は mf (|netrw-mf|) を使いま +"mF" コマンドを使うとカレントバッファ内のすべてのファイルのマークを外すことが +できます。ファイルごとに個別にマークを外したい場合は mf (|netrw-mf|) を使いま す。 -QUICKFIX リストを使ってファイルをマークする *netrw-qF* +QUICKFIX リストを使ってファイルをマークする *netrw-qF* {{{2 (|netrw-mf| も参照) |quickfix-error-lists| のファイルをマークするには "qF" を使います。続けて me @@ -1959,7 +2111,23 @@ regexp: " というプロンプトが表示されるので、例えば *.c$ の を使えるようにする予定です (また別のオプションで)。 -マークファイル: 任意のコマンド *netrw-mx* {{{2 +MARKED FILES, ARBITRARY VIM COMMAND *netrw-mv* {{{2 + (See |netrw-mf| and |netrw-mr| for how to mark files) + (uses the local marked-file list) + +The "mv" map causes netrw to execute an arbitrary vim command on each file on +the local marked file list, individually: + + * 1split + * sil! keepalt e file + * run vim command + * sil! keepalt wq! + +A prompt, "Enter vim command: ", will be issued to elicit the vim command +you wish used. + + +マークファイル: 任意のシェルコマンド *netrw-mx* {{{2 (マークの設定方法は |netrw-mf| と |netrw-mr| を参照) (ローカルマークファイルリスト使用) @@ -1968,6 +2136,37 @@ regexp: " というプロンプトが表示されるので、例えば *.c$ の べての "%" は実行ごとにファイル名に置換されます。"%" が無い場合はコマンドの後 ろにスペースとファイル名が付けられます。 +Example: + (mark files) + mx + Enter command: cat + + The result is a series of shell commands: + cat 'file1' + cat 'file2' + ... + + +MARKED FILES, ARBITRARY SHELL COMMAND, EN BLOC *netrw-mX* {{{2 + (See |netrw-mf| and |netrw-mr| for how to mark files) + (uses the global marked-file list) + +Upon activation of the 'mX' map, netrw will query the user for some (external) +command to be applied to all marked files on the global marked file list. The +"en bloc" means that one command will be executed on all the files at once: > + + command files + +This approach is useful, for example, to select files and make a tarball: > + + (mark files) + mX + Enter command: tar cf mynewtarball.tar +< +The command that will be run with this example: + + tar cf mynewtarball.tar 'file1' 'file2' ... + マークファイル: 圧縮と伸長 *netrw-mz* {{{2 (マークの設定方法は |netrw-mf| と |netrw-mr| を参照) @@ -1980,6 +2179,10 @@ regexp: " というプロンプトが表示されるので、例えば *.c$ の 伸長には、拡張子と伸長コマンドを関連付けた |Dictionary| が使われます。 |g:netrw_decompress| 参照。 +Remember that one can mark multiple files by regular expression +(see |netrw-mr|); this is particularly useful to facilitate compressing and +decompressing a large number of files. + 関連設定: |g:netrw_compress| |g:netrw_decompress| マークファイル: コピー *netrw-mc* {{{2 @@ -1990,7 +2193,16 @@ mt (|netrw-mt|) でコピー先ディレクトリを選択し、ファイルの 動し、mf (|netrw-mf|) でファイルを選択し、"mc" を押します。カレントウィンドウ (mf を実行した場所) からターゲットディレクトリへ、ファイルがコピーされます。 -関連設定: |g:netrw_localcopycmd| |g:netrw_ssh_cmd| +If one does not have a target directory set with |netrw-mt|, then netrw +will query you for a directory to copy to. + +One may also copy directories and their contents (local only) to a target +directory. + +Associated setting variables: + |g:netrw_localcopycmd| + |g:netrw_localcopydircmd| + |g:netrw_ssh_cmd| マークファイル: DIFF *netrw-md* {{{2 (マークの設定方法は |netrw-mf| と |netrw-mr| を参照) @@ -2003,15 +2215,15 @@ mt (|netrw-mt|) でコピー先ディレクトリを選択し、ファイルの (マークの設定方法は |netrw-mf| と |netrw-mr| を参照) (グローバルマークファイルリスト使用) -このコマンドはマークされたファイルを |arglist| に設定し、編集を開始します。 -|:Rexplore| でエクスプローラーウィンドウに戻ることができます。 +この "me" コマンドはマークされたファイルを |arglist| に設定し、編集を開始しま +す。|:Rexplore| でエクスプローラーウィンドウに戻ることができます。 (引数リスト内の次のファイル、前のファイルを開くには |:n| と |:p| を使う) マークファイル: GREP *netrw-mg* {{{2 (マークの設定方法は |netrw-mf| と |netrw-mr| を参照) (グローバルマークファイルリスト使用) -マークされたファイルに対して |:vimgrep| を適用します。 +"mg" コマンドはマークされたファイルに対して |:vimgrep| を適用します。 検索パターンを入力するためのプロンプトが表示されます。次の形式で入力してくださ い: > @@ -2019,22 +2231,28 @@ mt (|netrw-mt|) でコピー先ディレクトリを選択し、ファイルの ! /pattern/[g][j] pattern < -"j" オプションを指定すると、現在のマーク済みファイルに対してパターンが適用され -ます。 -つまり、次のように連続して実行すると > - mr ...ファイルパターン - mg ..コンテンツパターン -ファイルパターンにマッチして、その中身がコンテンツパターンにマッチしたものを -マークすることができます。 +With /pattern/, editing will start with the first item on the |quickfix| list +that vimgrep sets up (see |:copen|, |:cnext|, |:cprevious|). The |:vimgrep| +command is in use, so without 'g' each line is added to quickfix list only +once; with 'g' every match is included. + +With /pattern/j, "mg" will winnow the current marked file list to just those +marked files also possessing the specified pattern. Thus, one may use > + + mr ...file-pattern... + mg /pattern/j +< +to have a marked file list satisfying the file-pattern but also restricted to +files containing some desired pattern. 拡張子による表示/非表示 *netrw-mh* {{{2 (マークの設定方法は |netrw-mf| と |netrw-mr| を参照) (ローカルマークファイルリスト使用) -このコマンドは、マークされたファイルの拡張子を隠しリストに追加、または削除しま -す。Note: 同じ拡張子のファイルが複数選択されていた場合はファイルの数だけ追加と -削除が繰り返されます (つまり、同じ拡張子のファイルが偶数個選択されている場合は -それを選択しなかったのと同じ)。 +この "mh" コマンドは、マークされたファイルの拡張子を隠しリストに追加、または削 +除します。Note: 同じ拡張子のファイルが複数選択されていた場合はファイルの数だけ +追加と削除が繰り返されます (つまり、同じ拡張子のファイルが偶数個選択されている +場合はそれを選択しなかったのと同じ)。 関連項目: |netrw-a| |g:netrw_list_hide| @@ -2058,16 +2276,17 @@ mt (|netrw-mt|) で移動先ディレクトリを選択し、ファイルのあ (マークの設定方法は |netrw-mf| と |netrw-mr| を参照) (ローカルマークファイルリスト使用) -マークされたファイルに対して |:hardcopy| コマンドを実行します。具体的には、そ -れぞれのファイルを一行のウィンドウで開いて、hardcopy を実行し、一行ウィンドウ -を閉じます。 +"mp" コマンドが使われるとnetrwはマークされたファイルに対して |:hardcopy| コマ +ンドを実行します。具体的には、それぞれのファイルを一行のウィンドウで開いて、 +hardcopy を実行し、一行ウィンドウを閉じます。 マークファイル: スクリプト実行 *netrw-ms* {{{2 (マークの設定方法は |netrw-mf| と |netrw-mr| を参照) (ローカルマークファイルリスト使用) -マークされたファイルをスクリプト実行します (Vimの|:source|コマンド使用) +"ms" を使うとnetrwはマークされたファイルをスクリプト実行します (Vimの|:source| +コマンド使用) マークファイル: ターゲットディレクトリを設定する *netrw-mt* {{{2 @@ -2080,8 +2299,8 @@ mt (|netrw-mt|) で移動先ディレクトリを選択し、ファイルのあ * カーソルがバナーの上にある場合も、netrw ウィンドウに表示されているディレク トリがターゲットとして設定されます。 - ターゲットがすでにカレントディレクトリになっている場合は、ターゲットが解除 - されます。 + Unless the target already is the current directory. In which case, + typing "mf" clears the target. * カーソルがディレクトリの上にある場合は、そのディレクトリがターゲットとして 設定されます。 @@ -2090,6 +2309,9 @@ mt (|netrw-mt|) で移動先ディレクトリを選択し、ファイルのあ このコマンドは || を使うので、ディレクトリ名のスペースはエスケープ しなくても構いません。 + * With mouse-enabled vim or with gvim, one may select a target by using + + ターゲットは Vim セッションで一つしか設定できません。ターゲットはスクリプト変 数 (|s:var|参照) で管理されており、(Vim のインスタンスごとの) すべての netrw ウィンドウで共有されます。 @@ -2127,7 +2349,7 @@ netrw によって url が開かれ、タグに移動できます。 関連設定: |g:netrw_ctags| |g:netrw_ssh_cmd| -マークファイル: ブックマークを使ったターゲットディレクトリ *netrw-Tb* {{{2 +マークファイル: ブックマークを使ったターゲットディレクトリ *netrw-Tb* {{{2 ファイルコピー/移動のターゲットを設定する。 @@ -2164,9 +2386,12 @@ netrw によって url が開かれ、タグに移動できます。 マークファイル: マーク解除 *netrw-mu* {{{2 - (マークの設定方法は |netrw-mf| と |netrw-mr| を参照) + (|netrw-mf| と |netrw-mr| を参照) -"mu" マップを使うと現在設定されているすべてのマークが解除されます。 +"mu" マップを使うと現在設定されているすべてのマークが解除されます。 This +command differs from "mF" as the latter only unmarks files in the current +directory whereas "mu" will unmark global and all buffer-local marked files. +(see |netrw-mF|) *netrw-browser-settings* @@ -2202,21 +2427,32 @@ netrw ブラウザの各種設定は変数で管理されていて、それを *g:netrw_banner* バナーの表示を切り替える =0: バナーを表示しない =1: バナーを表示する (初期設定) - NOTE: バナー非表示は新しい機能なので問題が起こ - るかもしれません。 + + *g:netrw_bannerbackslash* if this variable exists and is not zero, the + banner will be displayed with backslashes + rather than forward slashes. *g:netrw_browse_split* ブラウザで を押してファイルを開くとき: - =0: 同じウィンドウを使う + =0: 同じウィンドウを使う (デフォルト) =1: ウィンドウを水平分割する =2: ウィンドウを垂直分割する =3: 新しいタブで開く =4: "P" で開く (以前のウィンドウで開く) Note: |g:netrw_preview| を使うと (水平分割 から変更して) 垂直分割にできます。 + =[servername,tab-number,window-number] + Given a |List| such as this, a remote server + named by the "servername" will be used for + editing. It will also use the specified tab + and window numbers to perform editing + (see |clientserver|, |netrw-ctrl-r|) + This option does not affect |:Lexplore| + windows. 関連項目: - |netrw-cr| |netrw-C| - |g:netrw_alto| |g:netrw_altv| + |g:netrw_alto| |g:netrw_altv| + |netrw-C| |netrw-cr| + |netrw-ctrl-r| *g:netrw_browsex_viewer* ユーザー指定のビューア: > "kfmclient exec" @@ -2348,6 +2584,11 @@ netrw ブラウザの各種設定は変数で管理されていて、それを 設定された文字がディレクトリ名に使われていたら glob() を適用する前にエスケープされる。 + *g:netrw_gx* ="" + This option controls how gx (|netrw-gx|) picks + up the text under the cursor. See |expand()| + for possibilities. + *g:netrw_hide* "a" マップを制御する (|netrw-a| 参照) =0 : すべて表示 =1 : 非隠しファイルを表示 @@ -2365,10 +2606,22 @@ netrw ブラウザの各種設定は変数で管理されていて、それを 現在のブラウジングディレクトリはb:netrw_curdir に保存されます。 (|netrw-c| 参照) + *g:netrw_keepj* ="keepj" (default) netrw attempts to keep the + |:jumps| table unaffected. + ="" netrw will not use |:keepjumps| with + exceptions only for the + saving/restoration of position. + *g:netrw_list_cmd* リモートディレクトリのファイル一覧取得コマンド 初期設定: (sshがあるなら) "ssh HOSTNAME ls -FLa" + *g:netrw_list_cmd_options* If this variable exists, then its contents are + appended to the g:netrw_list_cmd. For + example, use "2>/dev/null" to get rid of banner + messages on unix systems. + + *g:netrw_liststyle* デフォルトのファイル一覧表示スタイル: = 0: thin listing (一行に一つのファイル) = 1: long listing (一行に一つのファイル、タイ @@ -2386,7 +2639,7 @@ netrw ブラウザの各種設定は変数で管理されていて、それを 例: let g:netrw_list_hide= '.*\.swp$' - let g:netrw_list_hide= netrw_gitignore#Hide().'.*\.swp$' + let g:netrw_list_hide= netrw_gitignore#Hide().'.*\.swp$' 初期設定: "" *g:netrw_localcopycmd* ="cp" Linux/Unix/MacOS/Cygwin @@ -2394,10 +2647,14 @@ netrw ブラウザの各種設定は変数で管理されていて、それを マークされたファイル (|netrw-mf|) をターゲット ディレクトリにコピー (|netrw-mt|, |netrw-mc|) + *g:netrw_localcopydircmd* ="cp -R" Linux/Unix/MacOS/Cygwin + ="xcopy /e /c /h/ /i /k" Windows + Copies directories to target directory. + (|netrw-mc|, |netrw-mt|) + *g:netrw_localmkdir* ローカルディレクトリ作成コマンド 初期設定: "mkdir" - *g:netrw_localmovecmd* ="mv" Linux/Unix/MacOS/Cygwin ="move" Windows マークされたファイル (|netrw-mf|) をターゲット @@ -2430,6 +2687,11 @@ netrw ブラウザの各種設定は変数で管理されていて、それを この変数を定義するとバルーン評価は抑制される。 (参照 |'ballooneval'|) + *g:netrw_usetab* if this variable exists and is non-zero, then + the map supporting shrinking/expanding a + Lexplore or netrw window will be enabled. + (see |netrw-c-tab|) + *g:netrw_remote_mkdir* ftp 経由でのリモートディレクトリ作成コマンド (|g:netrw_mkdir_cmd| も参照) 初期設定: "mkdir" @@ -2464,7 +2726,12 @@ netrw ブラウザの各種設定は変数で管理されていて、それを *g:netrw_rmf_cmd* リモートのソフトリンク削除コマンド 初期設定: "ssh USEPORT HOSTNAME rm -f" - *g:netrw_sort_by* ソートの種類 ("name" or "time" or "size") + *g:netrw_servername* use this variable to provide a name for + |netrw-ctrl-r| to use for its server. + default: "NETRWSERVER" + + *g:netrw_sort_by* sort by "name", "time", "size", or + "exten". 初期設定: "name" *g:netrw_sort_direction* ソートの順序: "normal" or "reverse" @@ -2576,6 +2843,10 @@ netrw ブラウザの各種設定は変数で管理されていて、それを |'equalalways'| が機能するなど)。 初期設定: 50 (50%) + *g:netrw_wiw* =1 specifies the minimum window width to use + when shrinking a netrw/Lexplore window + (see |netrw-c-tab|). + *g:netrw_xstrlen* マルチバイト文字列の長さを計算する方法を指定す る。 (thanks to N Weibull, T Mechelynck) =0: Vim の組み込み関数 strlen() を使う @@ -2616,7 +2887,7 @@ NetrwSettings.vim プラグインのコマンド > ============================================================================== -ファイルを取得する *netrw-O* {{{2 +ファイルを取得する *netrw-obtain* *netrw-O* {{{2 マークされたファイルがない場合: @@ -2648,8 +2919,8 @@ NetrwSettings.vim プラグインのコマンド > 合は: |g:netrw_keepdir| 参照。 - *netrw-createfile* -NETRW のカレントディレクトリで新しいファイルを作成する *netrw-%* + *netrw-newfile* *netrw-createfile* +NETRW のカレントディレクトリで新しいファイルを作成する *netrw-%* {{{2 netrw のカレントディレクトリで新しいファイルを作成するには "%" を押します。 ファイル名を入力するためのプロンプトが表示されます。指定した名前の空のファイル @@ -2672,16 +2943,20 @@ netrw を次のように設定すると便利かもしれません: > let g:netrw_winsize = 30 これは: + 1. ファイルのプレビューを垂直分割で開く。 2. デフォルトの一覧表示スタイルを "tree" にする。 3. 垂直分割でプレビューウィンドウを開いたときに、ディレクトリの一覧表 示ウィンドウは列の幅の 30% しか使わないので、残りの領域をプレビュー ウィンドウの表示に使用できる。 -参照: |g:netrw_chgwin| |netrw-P| + Related: if you like this idea, you may also find :Lexplore + (|netrw-:Lexplore|) or |g:netrw_chgwin| of interest + +参照: |g:netrw_chgwin| |netrw-P| |'previewwindow'| -以前のウィンドウ *netrw-P* *netrw-prvwin* {{{2 +以前のウィンドウ *netrw-P* *netrw-prvwin* {{{2 ファイル/ディレクトリを以前の (最後にアクセスした) ウィンドウ (:he |CTRL-W_p|) で開くには、"P" を押します。ウィンドウが一つしかない場合は、新しいウィンドウが @@ -2702,7 +2977,7 @@ netrw を次のように設定すると便利かもしれません: > 参照: |g:netrw_chgwin| |netrw-p| -一覧を更新する *netrw-ctrl-l* *netrw-ctrl_l* {{{2 +一覧を更新する *netrw-refresh* *netrw-ctrl-l* *netrw-ctrl_l* {{{2 ローカル/リモートのディレクトリのファイル一覧は、ctrl-l () を押すか、一覧 の ./ の上で を押すことで更新できます。":e ." でローカルディレクトリを更 @@ -2724,13 +2999,33 @@ netrw を次のように設定すると便利かもしれません: > 移動 (名前変更) したいファイル/ディレクトリにカーソルを移動して "R" を押し ます。プロンプトが表示されるのでファイル/ディレクトリの移動先を入力してく ださい。"V" コマンド (ビジュアル選択) で複数の行を選択して "R" を使うこと - もできます。 + もできます。 ; you will be queried for each file as to what you want it + renamed to. マークされたファイルがある場合: (|netrw-mf| 参照) マークされたファイルを移動 (名前変更) します。プロンプトが表示されるので ファイル/ディレクトリの移動先を入力してください。 + If you answer a renaming query with a "s/frompattern/topattern/", then + subsequent files on the marked file list will be renamed by taking each + name, applying that substitute, and renaming each file to the result. + As an example : > + + mr [query: reply with *.c] + R [query: reply with s/^\(.*\)\.c$/\1.cpp/] +< + This example will mark all *.c files and then rename them to *.cpp + files. + + The ctrl-X character has special meaning for renaming files: > + + : a single ctrl-x tells netrw to ignore the portion of the response + lying between the last '/' and the ctrl-x. + + : a pair of contiguous ctrl-x's tells netrw to ignore any + portion of the string preceding the double ctrl-x's. +< 警告:~ Note: ファイルの移動はコピーと比べて危険です。なぜなら、リモートのファイル @@ -2738,8 +3033,8 @@ netrw を次のように設定すると便利かもしれません: > が失敗して削除が成功するとファイルが失われます。 自己責任で使ってください。 -g:netrw_rename_cmd 変数で名前変更のコマンドを指定できます。初期設定は次のとお -り: +g:netrw_rename_cmd 変数でリモートの名前変更のコマンドを指定できます。初期設定 +は次のとおり: ssh HOSTNAME mv @@ -2757,7 +3052,8 @@ V (|linewise-visual|) で選択することで複数のファイル/ディレク 関連設定: |g:netrw_sort_by| |g:netrw_sort_sequence| -ファイルを開くウィンドウを指定する *netrw-C* {{{2 +ファイルを開くウィンドウを指定する {{{2 + *netrw-editwindow* *netrw-C* *netrw-:NetrwC* ファイルを開くウィンドウを指定するには、netrw ウィンドウで "C" マップを押す か、g:netrw_chgwin にウィンドウ番号を設定します。ファイルを開く (|netrw-cr|) @@ -2768,14 +3064,99 @@ V (|linewise-visual|) で選択することで複数のファイル/ディレク * [count]C カウントを指定すると |netrw-cr| でファイルを開くときに指定 された番号のウィンドウが使用されます。 + + * :NetrwC will set |g:netrw_chgwin| to the current window + + * :NetrwC win# will set |g:netrw_chgwin| to the specified window + number + 次のように設定すると > let g:netrw_chgwin= -1 -デフォルトの動作に戻すことができます (つまり、カレントウィンドウを使う)。 +デフォルトの動作に戻すことができます +(つまり、カレントウィンドウを使う)。 関連項目: |netrw-cr| |g:netrw_browse_split| 関連設定: |g:netrw_chgwin| +SHRINKING OR EXPANDING A NETRW OR LEXPLORE WINDOW *netrw-c-tab* {{{2 + +The key will toggle a netrw or |:Lexplore| window's width, +but only if |g:netrw_usetab| exists and is non-zero (and, of course, +only if your terminal supports differentiating from a plain +). + + * If the current window is a netrw window, toggle its width + (between |g:netrw_wiw| and its original width) + + * Else if there is a |:Lexplore| window in the current tab, toggle + its width + + * Else bring up a |:Lexplore| window + +If |g:netrw_usetab| exists or is zero, or if there is a pre-existing mapping +for , then the will not be mapped. One may map something other +than a , too: (but you'll still need to have had g:netrw_usetab set) > + + nmap (whatever) NetrwShrink +< +Related topics: |:Lexplore| +Associated setting variable: |g:netrw_usetab| + + +USER SPECIFIED MAPS *netrw-usermaps* {{{1 + +One may make customized user maps. Specify a variable, |g:Netrw_UserMaps|, +to hold a |List| of lists of keymap strings and function names: > + + [["keymap-sequence","ExampleUserMapFunc"],...] +< +When netrw is setting up maps for a netrw buffer, if |g:Netrw_UserMaps| +exists, then the internal function netrw#UserMaps(islocal) is called. +This function goes through all the entries in the |g:Netrw_UserMaps| list: + + * sets up maps: > + nno KEYMAP-SEQUENCE + :call s:UserMaps(islocal,"ExampleUserMapFunc") +< * refreshes if result from that function call is the string + "refresh" + * if the result string is not "", then that string will be + executed (:exe result) + * if the result is a List, then the above two actions on results + will be taken for every string in the result List + +The user function is passed one argument; it resembles > + + fun! ExampleUserMapFunc(islocal) +< +where a:islocal is 1 if its a local-directory system call or 0 when +remote-directory system call. + +Use netrw#Expose("varname") to access netrw-internal (script-local) + variables. +Use netrw#Modify("varname",newvalue) to change netrw-internal variables. +Use netrw#Call("funcname"[,args]) to call a netrw-internal function with + specified arguments. + +Example: Get a copy of netrw's marked file list: > + + let netrwmarkfilelist= netrw#Expose("netrwmarkfilelist") +< +Example: Modify the value of netrw's marked file list: > + + call netrw#Modify("netrwmarkfilelist",[]) +< +Example: Clear netrw's marked file list via a mapping on gu > + " ExampleUserMap: {{{2 + fun! ExampleUserMap(islocal) + call netrw#Modify("netrwmarkfilelist",[]) + call netrw#Modify('netrwmarkfilemtch_{bufnr("%")}',"") + let retval= ["refresh"] + return retval + endfun + let g:Netrw_UserMaps= [["gu","ExampleUserMap"]] +< + 10. 問題と対策 *netrw-problems* {{{1 (何かフィードバックがあればこの項に追加していきます) @@ -2944,6 +3325,7 @@ V (|linewise-visual|) で選択することで複数のファイル/ディレク 最初の変数 (|g:netrw_ssh_cmd|) が一番重要です。他の変数は g:netrw_ssh_cmd の文字列を使って初期値が設定されます。 + *netrw-p9* *netrw-ml_get* P9. ブラウザでディレクトリを変更するとなんか変になる。ml_get エラーが 表示されて、vim を kill するしかなくなる。どうすればいいの? @@ -2969,6 +3351,14 @@ V (|linewise-visual|) で選択することで複数のファイル/ディレク P11. ウィンドウを二分割して、左の細いウィンドウをブラウザ表示に、右の ウィンドウをファイル編集用にしたいんだけど、どうすればいいの? + You probably want netrw running as in a side window. If so, you + will likely find that ":[N]Lexplore" does what you want. The + optional "[N]" allows you to select the quantity of columns you + wish the |:Lexplore|r window to start with (see |g:netrw_winsize| + for how this parameter works). + + Previous solution: + * <.vimrc> に次の設定を書く: let g:netrw_altv = 1 * カレントディレクトリを ":e ." で開く @@ -3061,15 +3451,117 @@ V (|linewise-visual|) で選択することで複数のファイル/ディレク か。 $HOME やその他の書き込み可能なディレクトリで Vim を起動して ください。 + *netrw-p17* + P17. Netrw is closing buffers on its own. + What steps will reproduce the problem? + 1. :Explore, navigate directories, open a file + 2. :Explore, open another file + 3. Buffer opened in step 1 will be closed. o + What is the expected output? What do you see instead? + I expect both buffers to exist, but only the last one does. + + (Lance) Problem is caused by "set autochdir" in .vimrc. + (drchip) I am able to duplicate this problem with |'acd'| set. + It appears that the buffers are not exactly closed; + a ":ls!" will show them (although ":ls" does not). + + *netrw-P18* + P18. How to locally edit a file that's only available via + another server accessible via ssh? + See http://stackoverflow.com/questions/12469645/ + "Using Vim to Remotely Edit A File on ServerB Only + Accessible From ServerA" + + *netrw-P19* + P19. How do I get numbering on in directory listings? + With |g:netrw_bufsettings|, you can control netrw's buffer + settings; try putting > + let g:netrw_bufsettings="noma nomod nu nobl nowrap ro nornu" +< in your .vimrc. If you'd like to have relative numbering + instead, try > + let g:netrw_bufsettings="noma nomod nonu nobl nowrap ro rnu" +< + *netrw-P20* + P20. How may I have gvim start up showing a directory listing? + Try putting the following code snippet into your .vimrc: > + augroup VimStartup + au! + au VimEnter * if expand("%") == "" && argc() == 0 && + \ (v:servername =~ 'GVIM\d*' || v:servername == "") + \ | e . | endif + augroup END +< You may use Lexplore instead of "e" if you're so inclined. + This snippet assumes that you have client-server enabled + (ie. a "huge" vim version). + + *netrw-P21* + P21. I've made a directory (or file) with an accented character, but + netrw isn't letting me enter that directory/read that file: + + Its likely that the shell or o/s is using a different encoding + than you have vim (netrw) using. A patch to vim supporting + "systemencoding" may address this issue in the future; for + now, just have netrw use the proper encoding. For example: > + + au FileType netrw set enc=latin1 +< + *netrw-P22* + P22. I get an error message when I try to copy or move a file: + + **error** (netrw) tried using g:netrw_localcopycmd; it doesn't work! + + What's wrong? + + Netrw uses several system level commands to do things (see + + |g:netrw_localcopycmd|, |g:netrw_localmovecmd|, + |g:netrw_localrmdir|, |g:netrw_mkdir_cmd|). + + You may need to adjust the default commands for one or more of + these commands by setting them properly in your .vimrc. Another + source of difficulty is that these commands use vim's local + directory, which may not be the same as the browsing directory + shown by netrw (see |g:netrw_keepdir|). + + ============================================================================== 11. Netrw をデバッグする *netrw-debug* {{{1 +Step 1: check that the problem you've encountered hasn't already been resolved +by obtaining a copy of the latest (often developmental) netrw at: + + http://www.drchip.org/astronaut/vim/index.html#NETRW + スクリプトはたいていは次のような場所にあります: > /usr/local/share/vim/vim7x/plugin/netrwPlugin.vim /usr/local/share/vim/vim7x/autoload/netrw.vim < -スクリプトは起動時に自動的にロードされます (:set nocp を想定)。 +which is loaded automatically at startup (assuming :set nocp). If you +installed a new netrw, then it will be located at > + + $HOME/.vim/plugin/netrwPlugin.vim + $HOME/.vim/autoload/netrw.vim +< +Step 2: assuming that you've installed the latest version of netrw, +check that your problem is really due to netrw. Create a file +called netrw.vimrc with the following contents: > + + set nocp + so $HOME/.vim/plugin/netrwPlugin.vim +< +Then run netrw as follows: > + + vim -u netrw.vimrc --noplugins [some path here] +< +Perform whatever netrw commands you need to, and check that the problem is +still present. This procedure sidesteps any issues due to personal .vimrc +settings and other plugins. If the problem does not appear, then you need +to determine what setting in your .vimrc is causing the conflict with netrw +or which plugin. + +Step 3: If the problem still is present, then get a debugging trace from +netrw: 1. スクリプトを入手してください: @@ -3097,7 +3589,8 @@ V (|linewise-visual|) で選択することで複数のファイル/ディレク 3. Vim を起動して、ネットワークファイルを開いたりブラウジングしたりし て問題を再現してください。 がネットワーク上のファイルを - 読み込んだり書き込んだりする過程が別のタブに出力されます。 + 読み込んだり書き込んだりする過程が別のタブか、サーバーVimのウィンド + ウに出力されます。 出力をファイルに保存するには次のようにします > @@ -3119,7 +3612,115 @@ V (|linewise-visual|) で選択することで複数のファイル/ディレク ============================================================================== 12. 変更履歴 *netrw-history* {{{1 - v152: Apr 08, 2014 * uses the |'noswapfile'| option (requires + v154: Feb 26, 2015 * (Yuri Kanivetsky) reported a situation where + a file was not treated properly as a file + due to g:netrw_keepdir == 1 + Mar 25, 2015 * (requested by Ben Friz) one may now sort by + extension + Mar 28, 2015 * (requested by Matt Brooks) netrw has a lot + of buffer-local mappings; however, some + plugins (such as vim-surround) set up + conflicting mappings that cause vim to wait. + The "" modifier has been included + with most of netrw's mappings to avoid that + delay. + Jun 26, 2015 * |netrw-gn| mapping implemted + * :Ntree NotADir resulted in having + the tree listing expand in the error messages + window. Fixed. + Jun 29, 2015 * Attempting to delete a file remotely caused + an error with "keepsol" mentioned; fixed. + Jul 08, 2015 * Several changes to keep the |:jumps| table + correct when working with + |g:netrw_fastbrowse| set to 2 + * wide listing with accented characters fixed + (using %-S instead of %-s with a |printf()| + Jul 13, 2015 * (Daniel Hahler) CheckIfKde() could be true + but kfmclient not installed. Changed order + in netrw#BrowseX(): checks if kde and + kfmclient, then will use xdg-open on a unix + system (if xdg-open is executable) + Aug 11, 2015 * (McDonnell) tree listing mode wouldn't + select a file in a open subdirectory. + * (McDonnell) when multiple subdirectories + were concurrently open in tree listing + mode, a ctrl-L wouldn't refresh properly. + * The netrw:target menu showed duplicate + entries + Oct 13, 2015 * (mattn) provided an exception to handle + windows with shellslash set but no shell + Oct 23, 2015 * if g:netrw_usetab and now used + to control whether NetrwShrink is used + (see |netrw-c-tab|) + v153: May 13, 2014 * added another |g:netrw_ffkeep| usage {{{2 + May 14, 2014 * changed s:PerformListing() so that it + always sets ft=netrw for netrw buffers + (ie. even when syntax highlighting is + off, not available, etc) + May 16, 2014 * introduced the |netrw-ctrl-r| functionality + May 17, 2014 * introduced the |netrw-:NetrwMB| functionality + * mb and mB (|netrw-mb|, |netrw-mB|) will + add/remove marked files from bookmark list + May 20, 2014 * (Enno Nagel) reported that :Lex + wasn't working. Fixed. + May 26, 2014 * restored test to prevent leftmouse window + resizing from causing refresh. + (see s:NetrwLeftmouse()) + * fixed problem where a refresh caused cursor + to go just under the banner instead of + staying put + May 28, 2014 * (László Bimba) provided a patch for opening + the |:Lexplore| window 100% high, optionally + on the right, and will work with remote + files. + May 29, 2014 * implemented :NetrwC (see |netrw-:NetrwC|) + Jun 01, 2014 * Removed some "silent"s from commands used + to implemented scp://... and pscp://... + directory listing. Permits request for + password to appear. + Jun 05, 2014 * (Enno Nagel) reported that user maps "/" + caused problems with "b" and "w", which + are mapped (for wide listings only) to + skip over files rather than just words. + Jun 10, 2014 * |g:netrw_gx| introduced to allow users to + override default "" with the gx + (|netrw-gx|) map + Jun 11, 2014 * gx (|netrw-gx|), with |'autowrite'| set, + will write modified files. s:NetrwBrowseX() + will now save, turn off, and restore the + |'autowrite'| setting. + Jun 13, 2014 * added visual map for gx use + Jun 15, 2014 * (Enno Nagel) reported that with having hls + set and wide listing style in use, that the + b and w maps caused unwanted highlighting. + Jul 05, 2014 * |netrw-mv| and |netrw-mX| commands included + Jul 09, 2014 * |g:netrw_keepj| included, allowing optional + keepj + Jul 09, 2014 * fixing bugs due to previous update + Jul 21, 2014 * (Bruno Sutic) provided an updated + netrw_gitignore.vim + Jul 30, 2014 * (Yavuz Yetim) reported that editing two + remote files of the same name caused the + second instance to have a "temporary" + name. Fixed: now they use the same buffer. + Sep 18, 2014 * (Yasuhiro Matsumoto) provided a patch which + allows scp and windows local paths to work. + Oct 07, 2014 * gx (see |netrw-gx|) when atop a directory, + will now do |gf| instead + Nov 06, 2014 * For cygwin: cygstart will be available for + netrw#BrowseX() to use if its executable. + Nov 07, 2014 * Began support for file://... urls. Will use + |g:netrw_file_cmd| (typically elinks or links) + Dec 02, 2014 * began work on having mc (|netrw-mc|) copy + directories. Works for linux machines, + cygwin+vim, but not for windows+gvim. + Dec 02, 2014 * in tree mode, netrw was not opening + directories via symbolic links. + Dec 02, 2014 * added resolved link information to + thin and tree modes + Dec 30, 2014 * (issue#231) |:ls| was not showing + remote-file buffers reliably. Fixed. + v152: Apr 08, 2014 * uses the |'noswapfile'| option (requires {{{2 vim 7.4 with patch 213) * (Enno Nagel) turn |'rnu'| off in netrw buffers. @@ -3145,7 +3746,7 @@ V (|linewise-visual|) で選択することで複数のファイル/ディレク chgwin window. May 09, 2014 * SavePosn was "saving filename under cursor" from a non-netrw window when using :Rex. - v151: Jan 22, 2014 * extended :Rexplore to return to buffer + v151: Jan 22, 2014 * extended :Rexplore to return to buffer {{{2 prior to Explore or editing a directory * (Ken Takata) netrw gave error when clipboard was disabled. Sol'n: Placed @@ -3192,7 +3793,7 @@ V (|linewise-visual|) で選択することで複数のファイル/ディレク and it also handles Window's shares * Fixed |netrw-d| command when applied with ftp * https: support included for netrw#NetRead() - v150: Jul 12, 2013 * removed a "keepalt" to allow ":e #" to + v150: Jul 12, 2013 * removed a "keepalt" to allow ":e #" to {{{2 return to the netrw directory listing Jul 13, 2013 * (Jonas Diemer) suggested changing a to . @@ -3247,7 +3848,7 @@ V (|linewise-visual|) で選択することで複数のファイル/ディレク style, with a previous window open, that the wrong directory was being used to open a file. Fixed. (P21) - v149: Apr 18, 2013 * in wide listing format, now have maps for + v149: Apr 18, 2013 * in wide listing format, now have maps for {{{2 w and b to move to next/previous file Apr 26, 2013 * one may now copy files in the same directory; netrw will issue requests for @@ -3261,132 +3862,9 @@ V (|linewise-visual|) で選択することで複数のファイル/ディレク requested by Paul Domaskis. Jul 03, 2013 * Explore now avoids splitting when a buffer will be hidden. - v148: Apr 16, 2013 * changed Netrw's Style menu to allow direct + v148: Apr 16, 2013 * changed Netrw's Style menu to allow direct {{{2 choice of listing style, hiding style, and sorting style - v147: Nov 24, 2012 * (James McCoy) Even with g:netrw_dirhistmax - at zero, the .vim/ directory would be - created to support history/bookmarks. I've - gone over netrw to suppress history and - bookmarking when g:netrw_dirhistmax is zero. - For instance, the menus will display - (disabled) when attempts to use - bookmarks/history are made. - Nov 29, 2012 * (Kim Jang-hwan) reported that with - g:Align_xstrlen set to 3 that the cursor was - moved (linewise) after invocation. This - problem also afflicted netrw. - (see |g:netrw_xstrlen|) Fixed. - Jan 21, 2013 * (mattn) provided a patch to insert some - endifs needed with the code implementing - |netrw-O|. - Jan 24, 2013 * (John Szakmeister) found that remote file - editing resulted in filetype options being - overwritten by NetrwOptionRestore(). I - moved filetype detect from NetrwGetFile() - to NetrwOptionRestore. - Feb 17, 2013 * (Yukhiro Nakadaira) provided a patch - correcting some syntax errors. - Feb 28, 2013 * (Ingo Karkat) provided a patch preventing - receipt of an |E95| when revisiting a - file://... style url. - Mar 18, 2013 * (Gary Johnson) pointed out that changing - cedit to caused problems with visincr; - the cedit setting is now bypassed in netrw too. - Apr 02, 2013 * (Paul Domaskis) reported an undefined - variable error (s:didstarstar) was - occurring. It is now defined at - initialization. - * included additional sanity checking for the - marked file functions. - * included |netrw-qF| and special "j" option - handling for |netrw-mg| - Apr 12, 2013 * |netrw-u| and |netrw-U| now handle counts - * the former mapping for "T" has been removed; - in its place are new maps, |netrw-Tb| and |netrw-Th|. - * the menu now supports a "Targets" entry for - easier target selection. (see |netrw-mt|) - * (Paul Domaskis) reported some problems with - moving/copying files under Windows' gvim - (ie. not cygwin). Fixed. - * (Paul Mueller) provided a patch to get - start and rundll working via |netrw-gx| - by bypassing the user's |'shellslash'| option. - v146: Oct 20, 2012 * (David Kotchan) reported that under Windows, - directories named with unusual characters - such as "#" or "$" were not being listed - properly. - * (Kenny Lee) reported that the buffer list - was being populated by netrw buffers. - Netrw will now |:bwipe| netrw buffers - upon editing a file if g:netrw_fastbrowse - is zero and its not in tree listing style. - * fixed a bug with s:NetrwInit() that - prevented initialization with |Lists| and - |Dictionaries|. - * |netrw-mu| now unmarks marked-file lists - v145: Apr 05, 2012 * moved some command from a g:netrw_local_... - format to g:netwr_local... format - * included some NOTE level messages about - commands that aren't executable - * |g:netrw_errorlvl| (default: NOTE=0) - option introduced - May 18, 2012 * (Ilya Dogolazky) a scenario where a - |g:netrw_fastbrowse| of zero did not - have a local directory refreshed fixed. - Jul 10, 2012 * (Donatas) |netrw-gb| wasn't working due - to an incorrectly used variable. - Aug 09, 2012 * (Bart Baker) netrw was doubling - of entries after a split. - * (code by Takahiro Yoshihara) implemented - |g:netrw_dynamic_maxfilenamelen| - Aug 31, 2012 * (Andrew Wong) netrw refresh overwriting - the yank buffer. - v144: Mar 12, 2012 * when |CTRL-W_s| or |CTRL-W_v| are used, - or their wincmd equivalents, on a netrw - buffer, the netrw's w: variables were - not copied over. Fixed. - Mar 13, 2012 * nbcd_curpos_{bufnr('%')} was commented - out, and was mistakenly used during - RestorePosn. Unfortunately, I'm not - sure why it was commented out, so this - "fix" may re-introduce an earlier problem. - Mar 21, 2012 * included s:rexposn internally to make - :Rex return the cursor to the same pos'n - upon restoration of netrw buffer - Mar 27, 2012 * (sjbesse) s:NetrwGetFile() needs to remove - "/" from the netrw buffer's usual |'isk'| - in order to allow "filetype detect" to work - properly for scripts. - v143: Jun 01, 2011 * |g:netrw_winsize| will accept a negative - number; the absolute value of it will then - be used to specify lines/columns instead of - a percentage. - Jul 05, 2011 * the "d" map now supports mkdir via ftp - See |netrw-d| and |g:netrw_remote_mkdir| - Jul 11, 2011 * Changed Explore!, Sexplore!, and Vexplore - to use a percentage of |winwidth()| instead - of a percentage of |winheight()|. - Jul 11, 2011 * included support for https://... I'm just - beginning to test this, however. - Aug 01, 2011 * changed RestoreOptions to also restore - cursor position in netrw buffers. - Aug 12, 2011 * added a note about "%" to the balloon - Aug 30, 2011 * if |g:netrw_nobeval| exists, then balloon - evaluation is suppressed. - Aug 31, 2011 * (Benjamin R Haskell) provided a patch that - implements non-standard port handling for - files opened via the remote browser. - Aug 31, 2011 * Fixed a **//pattern Explorer bug - Sep 15, 2011 * (reported by Francesco Campana) netrw - now permits the "@" to be part of the - user id (if there's an @ that appears - to the right). - Nov 21, 2011 * New option: |g:netrw_ftp_options| - Dec 07, 2011 * (James Sinclair) provided a fix handling - attempts to use a uid and password when - they weren't defined. This affected - NetWrite (NetRead already had that fix). ==============================================================================