diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-10-30 14:37:44 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-10-30 14:37:44 +0100 |
commit | a0f849ee40cbea3c889345256786b640b0becca2 (patch) | |
tree | 9f4d1e0604da8b8ad06da6288b77d2f3d3615f45 /runtime/doc | |
parent | e7d1376b636e6c758196c3542bd2c1053f9edb75 (diff) | |
download | vim-git-a0f849ee40cbea3c889345256786b640b0becca2.tar.gz |
Update runtime files.
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/change.txt | 32 | ||||
-rw-r--r-- | runtime/doc/pi_netrw.txt | 378 | ||||
-rw-r--r-- | runtime/doc/syntax.txt | 8 | ||||
-rw-r--r-- | runtime/doc/tags | 52 | ||||
-rw-r--r-- | runtime/doc/todo.txt | 47 | ||||
-rw-r--r-- | runtime/doc/usr_43.txt | 8 |
6 files changed, 448 insertions, 77 deletions
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 3a8107ecd..d1fcb5d53 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/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: 2015 Oct 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -863,6 +863,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 diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt index 5e629aaf4..8d867837f 100644 --- a/runtime/doc/pi_netrw.txt +++ b/runtime/doc/pi_netrw.txt @@ -1,4 +1,4 @@ -*pi_netrw.txt* For Vim version 7.4. Last change: 2015 Jan 05 +*pi_netrw.txt* For Vim version 7.4. Last change: 2015 Oct 30 ------------------------------------------------ NETRW REFERENCE MANUAL by Charles E. Campbell @@ -367,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) @@ -1064,9 +1069,10 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2 < <F1> Causes Netrw to issue help <cr> Netrw will enter the directory or read the file |netrw-cr| <del> Netrw will attempt to remove the file/directory |netrw-del| - <c-h> Edit file hiding list |netrw-ctrl-h| - <c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l| - <c-r> Browse using a gvim server |netrw-ctrl-r| + <c-h> Edit file hiding list |netrw-ctrl-h| + <c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l| + <c-r> Browse using a gvim server |netrw-ctrl-r| + <c-tab> 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) @@ -1079,6 +1085,7 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2 gd Force treatment as directory |netrw-gd| gf Force treatment as file |netrw-gf| gh Quick hide/unhide of dot-files |netrw-gh| + gn Make top of tree the directory below the cursor |netrw-gn| i Cycle between thin, long, wide, and tree listings |netrw-i| mb Bookmark current directory |netrw-mb| mc Copy marked files to marked-file target directory |netrw-mc| @@ -1107,7 +1114,7 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2 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| @@ -1176,10 +1183,10 @@ Addtionally, one may use :NetrwMB to bookmark files or 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 + 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: globs them individually and bookmarks them + Has arguments : |glob()|s each arg and bookmarks them With bang: deletes files/directories from Netrw's bookmark system @@ -1396,8 +1403,8 @@ 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 @@ -1414,7 +1421,7 @@ 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. @@ -1422,7 +1429,7 @@ See |g:netrw_dirhistmax| for how to control the quantity of history stack slots. -CHANGING TREE TOP *netrw-ntree* *:Ntree* {{{2 +CHANGING TREE TOP *netrw-ntree* *:Ntree* *netrw-gn* {{{2 One may specify a new tree top for tree listings using > @@ -1432,14 +1439,18 @@ 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* {{{2 -With :NetrwClean one may easily remove netrw from one's home directory; +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 @@ -1456,6 +1467,7 @@ 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 < (latter not available if the |g:netrw_nogx| variable exists) + Netrw determines which special handler by the following method: * if |g:netrw_browsex_viewer| exists, then it will be used to attempt to @@ -1631,19 +1643,23 @@ DIRECTORY EXPLORATION COMMANDS {{{2 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 + 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 like tree style displays; + + Those who like this method often also often like tree style displays; see |g:netrw_liststyle|. - Also see: |netrw-C| |g:netrw_chgwin| |g:netrw_winsize| - |netrw-p| |netrw-P| |g:netrw_browse_split| + 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 open on the right hand side and an uninitialized |g:netrw_chgwin| will be set to 1. *netrw-:Sexplore* @@ -2127,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* {{{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 @@ -2157,14 +2172,17 @@ 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 execute an arbitrary vim command on each file -on the local marked file list, individually: +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) @@ -2196,13 +2214,13 @@ command to be applied to all marked files on the global marked file list. The command files -It is useful, for example, to select files and make a tarball: +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 in this example: +< +The command that will be run with this example: tar cf mynewtarball.tar 'file1' 'file2' ... @@ -2255,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) @@ -2263,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 -desired 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 @@ -2311,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 @@ -2343,6 +2368,9 @@ Set the marked file copy/move-to target (see |netrw-mc| and |netrw-mm|): This command uses |<q-args>|, so spaces in the directory name are permitted without escaping. + * With mouse-enabled vim or with gvim, one may select a target by using + <c-leftmouse> + 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). @@ -2419,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 @@ -2726,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 <tab> 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" @@ -2762,7 +2799,8 @@ your browsing preferences. (see also: |netrw-settings|) |netrw-ctrl-r| to use for its server. default: "NETRWSERVER" - *g:netrw_sort_by* sort by "name", "time", or "size" + *g:netrw_sort_by* sort by "name", "time", "size", or + "exten". default: "name" *g:netrw_sort_direction* sorting direction: "normal" or "reverse" @@ -2874,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) @@ -2919,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: @@ -2949,7 +2991,7 @@ Related topics: * To automatically make the currently browsed directory the current directory, see |g:netrw_keepdir|. - *netrw-createfile* + *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 @@ -2981,10 +3023,13 @@ These will: 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 @@ -3006,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 (<c-l>) or hit the <cr> when atop the ./ directory entry in the listing. One may also @@ -3026,11 +3071,12 @@ 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|) @@ -3048,6 +3094,14 @@ If there are marked files: (see |netrw-mf|) This example will mark all *.c files and then rename them to *.cpp files. + The ctrl-X character has special meaning for renaming files: > + + <c-x> : a single ctrl-x tells netrw to ignore the portion of the response + lying between the last '/' and the ctrl-x. + + <c-x><c-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 @@ -3055,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 @@ -3074,18 +3128,19 @@ Related topics: |netrw-r| |netrw-S| Associated setting variables: |g:netrw_sort_by| |g:netrw_sort_sequence| -SETTING EDITING WINDOW *netrw-C* *netrw-:NetrwC* {{{2 +SETTING EDITING WINDOW *netrw-editwindow* *netrw-C* *netrw-:NetrwC* {{{2 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 +: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 for editing via - |netrw-cr| + * 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 editing via |netrw-cr|. + * [count]C : the count will be used as the window number to be used + for subsequent editing via |netrw-cr|. * :NetrwC will set |g:netrw_chgwin| to the current window @@ -3094,12 +3149,91 @@ window. 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 <c-tab> 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 <c-tab> from a plain +<tab>). + + * 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 <c-tab>, then the <tab> will not be mapped. One may map something other +than a <c-tab>, too: (but you'll still need to have had g:netrw_usetab set) > + + nmap <unique> (whatever) <Plug>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 <buffer> <silent> 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) @@ -3274,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? @@ -3300,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 Lexplorer 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 . @@ -3313,6 +3456,7 @@ Associated setting variables: |g:netrw_chgwin| <leftmouse> in the browser window and then press the <middlemouse> 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 @@ -3390,7 +3534,7 @@ 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* @@ -3414,6 +3558,58 @@ Associated setting variables: |g:netrw_chgwin| "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<cp>; 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 @@ -3504,6 +3700,46 @@ netrw: ============================================================================== 12. History *netrw-history* {{{1 + 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 "<nowait>" 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 <c-tab> 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 diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 1e3ea90d2..0e71a39e8 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 7.4. Last change: 2015 Sep 29 +*syntax.txt* For Vim version 7.4. Last change: 2015 Oct 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1081,7 +1081,7 @@ 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 CSH *csh.vim* *ft-csh-syntax* @@ -3248,7 +3248,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 @@ -3266,6 +3267,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 diff --git a/runtime/doc/tags b/runtime/doc/tags index 75fd0bb3a..9b2a73b35 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -2714,6 +2714,14 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* :rviminfo starting.txt /*:rviminfo* :s change.txt /*:s* :s% change.txt /*:s%* +:sI change.txt /*:sI* +:sIc change.txt /*:sIc* +:sIe change.txt /*:sIe* +:sIg change.txt /*:sIg* +:sIl change.txt /*:sIl* +:sIn change.txt /*:sIn* +:sIp change.txt /*:sIp* +:sIr change.txt /*:sIr* :sN windows.txt /*:sN* :sNext windows.txt /*:sNext* :s\= change.txt /*:s\\=* @@ -2745,6 +2753,13 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* :sbr windows.txt /*:sbr* :sbrewind windows.txt /*:sbrewind* :sbuffer windows.txt /*:sbuffer* +:sc change.txt /*:sc* +:scI change.txt /*:scI* +:sce change.txt /*:sce* +:scg change.txt /*:scg* +:sci change.txt /*:sci* +:scl change.txt /*:scl* +:scp change.txt /*:scp* :scr repeat.txt /*:scr* :scripte repeat.txt /*:scripte* :scriptencoding repeat.txt /*:scriptencoding* @@ -2778,8 +2793,20 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* :sfind windows.txt /*:sfind* :sfir windows.txt /*:sfir* :sfirst windows.txt /*:sfirst* +:sg change.txt /*:sg* +:sgI change.txt /*:sgI* +:sgc change.txt /*:sgc* +:sge change.txt /*:sge* +:sgi change.txt /*:sgi* +:sgl change.txt /*:sgl* +:sgn change.txt /*:sgn* +:sgp change.txt /*:sgp* +:sgr change.txt /*:sgr* :sh various.txt /*:sh* :shell various.txt /*:shell* +:si change.txt /*:si* +:sic change.txt /*:sic* +:sie change.txt /*:sie* :sig sign.txt /*:sig* :sign sign.txt /*:sign* :sign-define sign.txt /*:sign-define* @@ -2794,6 +2821,9 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* :silent various.txt /*:silent* :sim gui_w32.txt /*:sim* :simalt gui_w32.txt /*:simalt* +:sin change.txt /*:sin* +:sip change.txt /*:sip* +:sir change.txt /*:sir* :sl various.txt /*:sl* :sla windows.txt /*:sla* :slast windows.txt /*:slast* @@ -2838,8 +2868,16 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* :split_f windows.txt /*:split_f* :spr windows.txt /*:spr* :sprevious windows.txt /*:sprevious* +:sr change.txt /*:sr* +:srI change.txt /*:srI* +:src change.txt /*:src* :sre windows.txt /*:sre* :srewind windows.txt /*:srewind* +:srg change.txt /*:srg* +:sri change.txt /*:sri* +:srl change.txt /*:srl* +:srn change.txt /*:srn* +:srp change.txt /*:srp* :st starting.txt /*:st* :sta windows.txt /*:sta* :stag windows.txt /*:stag* @@ -5942,6 +5980,7 @@ g0 motion.txt /*g0* g8 various.txt /*g8* g: eval.txt /*g:* g:NetrwTopLvlMenu pi_netrw.txt /*g:NetrwTopLvlMenu* +g:Netrw_UserMaps pi_netrw.txt /*g:Netrw_UserMaps* g:Netrw_corehandler pi_netrw.txt /*g:Netrw_corehandler* g:Netrw_funcref pi_netrw.txt /*g:Netrw_funcref* g:ada#Comment ft_ada.txt /*g:ada#Comment* @@ -6104,8 +6143,10 @@ g:netrw_uid pi_netrw.txt /*g:netrw_uid* g:netrw_use_errorwindow pi_netrw.txt /*g:netrw_use_errorwindow* g:netrw_use_noswf pi_netrw.txt /*g:netrw_use_noswf* g:netrw_use_nt_rcp pi_netrw.txt /*g:netrw_use_nt_rcp* +g:netrw_usetab pi_netrw.txt /*g:netrw_usetab* g:netrw_win95ftp pi_netrw.txt /*g:netrw_win95ftp* g:netrw_winsize pi_netrw.txt /*g:netrw_winsize* +g:netrw_wiw pi_netrw.txt /*g:netrw_wiw* g:netrw_xstrlen pi_netrw.txt /*g:netrw_xstrlen* g:sh_isk syntax.txt /*g:sh_isk* g:sh_noisk syntax.txt /*g:sh_noisk* @@ -7064,6 +7105,10 @@ netrw-D pi_netrw.txt /*netrw-D* netrw-O pi_netrw.txt /*netrw-O* netrw-P pi_netrw.txt /*netrw-P* netrw-P18 pi_netrw.txt /*netrw-P18* +netrw-P19 pi_netrw.txt /*netrw-P19* +netrw-P20 pi_netrw.txt /*netrw-P20* +netrw-P21 pi_netrw.txt /*netrw-P21* +netrw-P22 pi_netrw.txt /*netrw-P22* netrw-R pi_netrw.txt /*netrw-R* netrw-S pi_netrw.txt /*netrw-S* netrw-Tb pi_netrw.txt /*netrw-Tb* @@ -7083,6 +7128,7 @@ netrw-browser-settings pi_netrw.txt /*netrw-browser-settings* netrw-browser-var pi_netrw.txt /*netrw-browser-var* netrw-browsing pi_netrw.txt /*netrw-browsing* netrw-c pi_netrw.txt /*netrw-c* +netrw-c-tab pi_netrw.txt /*netrw-c-tab* netrw-cadaver pi_netrw.txt /*netrw-cadaver* netrw-chgup pi_netrw.txt /*netrw-chgup* netrw-clean pi_netrw.txt /*netrw-clean* @@ -7104,6 +7150,7 @@ netrw-dir pi_netrw.txt /*netrw-dir* netrw-dirlist pi_netrw.txt /*netrw-dirlist* netrw-downdir pi_netrw.txt /*netrw-downdir* netrw-edithide pi_netrw.txt /*netrw-edithide* +netrw-editwindow pi_netrw.txt /*netrw-editwindow* netrw-ex pi_netrw.txt /*netrw-ex* netrw-explore pi_netrw.txt /*netrw-explore* netrw-explore-cmds pi_netrw.txt /*netrw-explore-cmds* @@ -7119,6 +7166,7 @@ netrw-getftype pi_netrw.txt /*netrw-getftype* netrw-gf pi_netrw.txt /*netrw-gf* netrw-gh pi_netrw.txt /*netrw-gh* netrw-gitignore pi_netrw.txt /*netrw-gitignore* +netrw-gn pi_netrw.txt /*netrw-gn* netrw-gp pi_netrw.txt /*netrw-gp* netrw-grep pi_netrw.txt /*netrw-grep* netrw-gx pi_netrw.txt /*netrw-gx* @@ -7164,12 +7212,14 @@ netrw-mv pi_netrw.txt /*netrw-mv* netrw-mx pi_netrw.txt /*netrw-mx* netrw-mz pi_netrw.txt /*netrw-mz* netrw-netrc pi_netrw.txt /*netrw-netrc* +netrw-newfile pi_netrw.txt /*netrw-newfile* netrw-nexplore pi_netrw.txt /*netrw-nexplore* netrw-noload pi_netrw.txt /*netrw-noload* netrw-nread pi_netrw.txt /*netrw-nread* netrw-ntree pi_netrw.txt /*netrw-ntree* netrw-nwrite pi_netrw.txt /*netrw-nwrite* netrw-o pi_netrw.txt /*netrw-o* +netrw-obtain pi_netrw.txt /*netrw-obtain* netrw-options pi_netrw.txt /*netrw-options* netrw-p pi_netrw.txt /*netrw-p* netrw-p1 pi_netrw.txt /*netrw-p1* @@ -7211,6 +7261,7 @@ netrw-quickmaps pi_netrw.txt /*netrw-quickmaps* netrw-r pi_netrw.txt /*netrw-r* netrw-read pi_netrw.txt /*netrw-read* netrw-ref pi_netrw.txt /*netrw-ref* +netrw-refresh pi_netrw.txt /*netrw-refresh* netrw-rename pi_netrw.txt /*netrw-rename* netrw-reverse pi_netrw.txt /*netrw-reverse* netrw-rexplore pi_netrw.txt /*netrw-rexplore* @@ -7237,6 +7288,7 @@ netrw-transparent pi_netrw.txt /*netrw-transparent* netrw-u pi_netrw.txt /*netrw-u* netrw-updir pi_netrw.txt /*netrw-updir* netrw-urls pi_netrw.txt /*netrw-urls* +netrw-usermaps pi_netrw.txt /*netrw-usermaps* netrw-userpass pi_netrw.txt /*netrw-userpass* netrw-v pi_netrw.txt /*netrw-v* netrw-var pi_netrw.txt /*netrw-var* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 573dc42bb..74f025dfd 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.4. Last change: 2015 Oct 13 +*todo.txt* For Vim version 7.4. Last change: 2015 Oct 30 VIM REFERENCE MANUAL by Bram Moolenaar @@ -83,18 +83,48 @@ work. (ZyX, 2013 Sep 28) Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15) +Netrw update. (Charles 2015 Oct 23) + +Patch to use local value of 'errorformat' in :cexpr. (Christian Brabandt, +2015 Oct 16) Only do this for :lexpr ? + +Update Oracle syntax file from: +https://github.com/chrisbra/vim-sqloracle-syntax/blob/master/syntax/sqloracle.vim + ":cd C:\Windows\System32\drivers\etc*" does not work, even though the directory exists. (Sergio Gallelli, 2013 Dec 29) +Updated syntax files. (Charles Campbell, 2015 Oct 19) + +Patch to include .desktop files in the distribution. PR #455. + +Better changelog syntax file. (Martin Florian, 2015 Oct 25) + +Better readline syntax file. (Raphael Bazaud, 2015 Oct 25) + +English spell checking has an error. Updating doesn't work. +(Dominique Pelle, 2015 Oct 15) +Hint for new URL: Christian Brabandt, 2015 Oct 15. +But that file looks old. + Using ":windo" to set options in all windows has the side effect that it changes the window layout and the current window. Make a variant that saves and restores. Use in the matchparen plugin. Perhaps we can use ":silent window"? +Patch for documentation mistakes. (Hirohito Higashi, 2015 Oct 22) + Illegal memory access, requires ASAN to see. (Dominique Pelle, 2015 Jul 28) Gvim: when both Tab and CTRL-I are mapped, use CTRL-I not for Tab. +Patch for yaml indent, #458. + +Patch for Python to add isatty, readable, etc. (PR #464) + +Patch to add options for specifying dll names. (Kazuki Sakamoto, 2015 Oct 16) +PR #452 Check if it's secure (can't set from modeline). + Unexpected delay when using CTRL-O u. It's not timeoutlen. (Gary Johnson, 2015 Aug 28) @@ -112,6 +142,12 @@ wrong name. (Aram, 2014 Nov 7) Vim 7.4. Can't recognize the $ProgramFiles(x86) environment variable. Recognize it specifically? First try with the parens, then without. +Patch to add 'tagcase' option, whether to ignore case for tags. +(Gary Johnson, 2015 Oct 17) + +Patch to fix "." after CTRL-A in Visual block mode. (Ozaki Kiichi, 2015 Oct +24) + Value returned by virtcol() changes depending on how lines wrap. This is inconsistent with the documentation. @@ -145,6 +181,8 @@ wildcards. Add a ":nowild" command modifier? (ZyX, 2015 March 4) Proposal to make options.txt easier to read. (Arnaud Decara, 2015 Aug 5) Update Aug 14. +Crash in :cnext on MS-Windows. (Ben Fritz, 2015 Oct 27) + Patch for problem with restoring screen on Windows. (Nobuhiro Takasaki, 2015 Sep 10) @@ -199,6 +237,9 @@ Doesn't work completely (Dominique Orban) Patch to add a "literal" argument to bufnr(). (Olaf Dabrunz, 2015 Aug 4) +Cannot execute the shell when it's in a directory with a space. +Issue #459. + When a session file is created and there are "nofile" buffers, these are not filled. Need to trigger BufReadCmd autocommands. Also handle deleting the initial empty buffer better. (ZyX, 2015 March 8) @@ -300,6 +341,10 @@ them: ":repeats". Patch for glob(), adding slash to normal files. (Ingo Karkat, 2014 Dec 22) +When entering and leaving the preview window autocommands are triggered, but +these may not work well. Perhaps set a flag to indicate that the preview +window is involved? (John Otter, 2015 Oct 27) + Using "." to repeat an Ex command puts that command in history. Probably should not happen. If the command is the result of a mapping it's not put in history either. (Jacob Niehus, 2014 Nov 2) diff --git a/runtime/doc/usr_43.txt b/runtime/doc/usr_43.txt index 6eaa9c14a..8f0820fbf 100644 --- a/runtime/doc/usr_43.txt +++ b/runtime/doc/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 <buffer> <LocalLeader>c o/**************<CR><CR>/<Esc> + let b:undo_ftplugin = "setl softtabstop< | unmap <buffer> <LocalLeader>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 |<LocalLeader>| 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/ |