diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index b6edc4c4d8..ef0282848f 100644 --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -1711,7 +1711,8 @@ fun! s:NetrwOptionsSafe(islocal) if &cpo =~ 'a' | call s:NetrwSetSafeSetting("&cpo",substitute(&cpo,'a','','g')) | endif if &cpo =~ 'A' | call s:NetrwSetSafeSetting("&cpo",substitute(&cpo,'A','','g')) | endif setl fo=nroql2 - call s:NetrwSetSafeSetting("&go","begmr") + " call s:NetrwSetSafeSetting("&go","begmr") + if &go =~ '\ca' | call s:NetrwSetSafeSetting("&go",substitute(&go,'\ca','','g')) | endif call s:NetrwSetSafeSetting("&l:hid",0) call s:NetrwSetSafeSetting("&l:im",0) setl isk+=@ isk+=* isk+=/ diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 7a53f17a78..de74ee891e 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1232,6 +1232,13 @@ Example: > This prevents having the autocommands defined twice (e.g., after sourcing the vimrc file again). + *FileExplorer* +There is one group that is recognized by Vim: FileExplorer. If this group +exists Vim assumes that editing a directory is possible and will trigger a +plugin that lists the files in that directory. This is used by the |netrw| +plugin. This allows you to do: > + browse edit + ============================================================================== 9. Executing autocommands *autocmd-execute* diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index 4700af41b7..0e7e461a61 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1183,7 +1183,8 @@ If you want to always use ":confirm", set the 'confirm' option. |:diffsplit|, |:diffpatch|, |:pedit|, |:redir|, |:source|, |:update|, |:visual|, |:vsplit|, and |:qall| if 'confirm' is set. - {only in Win32 GUI} + {only in Win32 GUI, in console `browse edit` works + if the FileExplorer autocommand group exists} When ":browse" is not possible you get an error message. If {command} doesn't support browsing, the {command} is executed without a dialog. diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index d9ecdb40de..ff0b88d0a8 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1307,7 +1307,7 @@ A string constant accepts these special characters: \U.... same as \u but allows up to 8 hex numbers. \b backspace \e escape -\f formfeed +\f formfeed 0x0C \n newline \r return \t tab @@ -2313,7 +2313,7 @@ ceil({expr}) Float round {expr} up changenr() Number current change number chanclose({id}[, {stream}]) Number Closes a channel or one of its streams chansend({id}, {data}) Number Writes {data} to channel -char2nr({expr}[, {utf8}]) Number ASCII/UTF8 value of first char in {expr} +char2nr({expr}[, {utf8}]) Number ASCII/UTF-8 value of first char in {expr} charidx({string}, {idx} [, {countcc}]) Number char index of byte {idx} in {string} cindent({lnum}) Number C indent for line {lnum} @@ -2544,7 +2544,7 @@ mode([expr]) String current editing mode msgpackdump({list} [, {type}]) List/Blob dump objects to msgpack msgpackparse({data}) List parse msgpack to a list of objects nextnonblank({lnum}) Number line nr of non-blank line >= {lnum} -nr2char({expr}[, {utf8}]) String single char with ASCII/UTF8 value {expr} +nr2char({expr}[, {utf8}]) String single char with ASCII/UTF-8 value {expr} nvim_...({args}...) any call nvim |api| functions or({expr}, {expr}) Number bitwise OR pathshorten({expr}) String shorten directory names in a path @@ -2680,7 +2680,7 @@ stdioopen({dict}) Number open stdio in a headless instance. stdpath({what}) String/List returns the standard path(s) for {what} str2float({expr} [, {quoted}]) Float convert String to Float str2list({expr} [, {utf8}]) List convert each character of {expr} to - ASCII/UTF8 value + ASCII/UTF-8 value str2nr({expr} [, {base} [, {quoted}]]) Number convert String to Number strchars({expr} [, {skipcc}]) Number character length of the String {expr} @@ -6345,8 +6345,8 @@ list2str({list} [, {utf8}]) *list2str()* < |str2list()| does the opposite. When {utf8} is omitted or zero, the current 'encoding' is used. - With {utf8} is 1, always return utf-8 characters. - With utf-8 composing characters work as expected: > + When {utf8} is TRUE, always return UTF-8 characters. + With UTF-8 composing characters work as expected: > list2str([97, 769]) returns "á" < localtime() *localtime()* @@ -7007,7 +7007,8 @@ nr2char({expr} [, {utf8}]) *nr2char()* nr2char(32) returns " " < Example for "utf-8": > nr2char(300) returns I with bow character -< UTF-8 encoding is always used, {utf8} option has no effect, +< When {utf8} is TRUE, always return UTF-8 characters. + UTF-8 encoding is always used, {utf8} option has no effect, and exists only for backwards-compatibility. Note that a NUL character in the file is specified with nr2char(10), because NULs are represented with newline @@ -8973,8 +8974,8 @@ str2list({string} [, {utf8}]) *str2list()* < |list2str()| does the opposite. When {utf8} is omitted or zero, the current 'encoding' is used. - With {utf8} set to TRUE, always treat the String as utf-8 - characters. With utf-8 composing characters are handled + When {utf8} is TRUE, always treat the String as UTF-8 + characters. With UTF-8 composing characters are handled properly: > str2list("á") returns [97, 769] @@ -10987,7 +10988,7 @@ text... literal then the items also cannot be changed: > const ll = [1, 2, 3] let ll[1] = 5 " Error! -< Nested references are not locked: > +< Nested references are not locked: > let lvar = ['a'] const lconst = [0, lvar] let lconst[0] = 2 " Error! diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index a23ae3fb76..42a9993c8c 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -501,7 +501,7 @@ One command, :DiffGitCached, is provided to show a diff of the current commit in the preview window. It is equivalent to calling "git diff --cached" plus any arguments given to the command. -GPROF +GPROF *ft-gprof-plugin* The gprof filetype plugin defines a mapping to jump from a function entry in the gprof flat profile or from a function entry in the call graph diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index 2baf3a247f..9b23c93e74 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -312,7 +312,6 @@ notation meaning equivalent decimal value(s) ~ tab CTRL-I 9 *tab* *Tab* *linefeed* linefeed CTRL-J 10 (used for ) - formfeed CTRL-L 12 *formfeed* carriage return CTRL-M 13 *carriage-return* same as ** same as ** diff --git a/runtime/doc/mbyte.txt b/runtime/doc/mbyte.txt index a6c797a860..02c4ae70dd 100644 --- a/runtime/doc/mbyte.txt +++ b/runtime/doc/mbyte.txt @@ -663,7 +663,7 @@ This file explains what characters are available in UTF-8 and CP1255 encodings, and what the keymaps are to get those characters: glyph encoding keymap ~ -Char utf-8 cp1255 hebrew hebrewp name ~ +Char UTF-8 cp1255 hebrew hebrewp name ~ א 0x5d0 0xe0 t a 'alef ב 0x5d1 0xe1 c b bet ג 0x5d2 0xe2 d g gimel @@ -716,11 +716,11 @@ Vowel marks and special punctuation: ױ 0x5f1 0xd5 VY VY vav-yod ײ 0x5f2 0xd6 YY YY yod-yod -The following are only available in utf-8 +The following are only available in UTF-8 Cantillation marks: glyph -Char utf-8 hebrew name +Char UTF-8 hebrew name ב֑ 0x591 C: etnahta ב֒ 0x592 Cs segol ב֓ 0x593 CS shalshelet @@ -803,7 +803,7 @@ ASCII. On MS-Windows UTF-16 is also used (previously UCS-2), which uses internally. Vim has comprehensive UTF-8 support. It works well in: -- xterm with utf-8 support enabled +- xterm with UTF-8 support enabled - MS-Windows GUI - several other platforms @@ -814,14 +814,14 @@ a space to fill the gap. *bom-bytes* When reading a file a BOM (Byte Order Mark) can be used to recognize the Unicode encoding: - EF BB BF utf-8 - FE FF utf-16 big endian - FF FE utf-16 little endian - 00 00 FE FF utf-32 big endian - FF FE 00 00 utf-32 little endian + EF BB BF UTF-8 + FE FF UTF-16 big endian + FF FE UTF-16 little endian + 00 00 FE FF UTF-32 big endian + FF FE 00 00 UTF-32 little endian -Utf-8 is the recommended encoding. Note that it's difficult to tell utf-16 -and utf-32 apart. Utf-16 is often used on MS-Windows, utf-32 is not +UTF-8 is the recommended encoding. Note that it's difficult to tell UTF-16 +and UTF-32 apart. UTF-16 is often used on MS-Windows, UTF-32 is not widespread as file format. @@ -890,8 +890,8 @@ TYPING UTF-8 *utf-8-typing* If you are using X-Windows, you should find an input method that supports utf-8. -If your system does not provide support for typing utf-8, you can use the -'keymap' feature. This allows writing a keymap file, which defines a utf-8 +If your system does not provide support for typing UTF-8, you can use the +'keymap' feature. This allows writing a keymap file, which defines a UTF-8 character as a sequence of ASCII characters. See |mbyte-keymap|. If everything else fails, you can type any character as four hex bytes: > diff --git a/runtime/doc/print.txt b/runtime/doc/print.txt index d9320ad315..f54d0429a6 100644 --- a/runtime/doc/print.txt +++ b/runtime/doc/print.txt @@ -690,7 +690,7 @@ There are a couple of points to bear in mind: ============================================================================== 8. Formfeed Characters *printing-formfeed* -By default Vim does not do any special processing of |formfeed| control +By default Vim does not do any special processing of formfeed control characters. Setting the 'printoptions' formfeed item will make Vim recognize formfeed characters and continue printing the current line at the beginning of the first line on a new page. The use of formfeed characters provides diff --git a/runtime/filetype.vim b/runtime/filetype.vim index fe0073f16b..c86ca9646b 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar -" Last Change: 2021 Sep 21 +" Last Change: 2021 Oct 03 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -2004,14 +2004,15 @@ au BufNewFile,BufRead *.ws[fc] setf wsh " XHTML au BufNewFile,BufRead *.xhtml,*.xht setf xhtml -" X Pixmap (dynamically sets colors, use BufEnter to make it work better) -au BufEnter *.xpm +" X Pixmap (dynamically sets colors, this used to trigger on BufEnter to make +" it work better, but that breaks setting 'filetype' manually) +au BufNewFile,BufRead *.xpm \ if getline(1) =~ "XPM2" | \ setf xpm2 | \ else | \ setf xpm | \ endif -au BufEnter *.xpm2 setf xpm2 +au BufNewFile,BufRead *.xpm2 setf xpm2 " XFree86 config au BufNewFile,BufRead XF86Config diff --git a/runtime/ftplugin/spec.vim b/runtime/ftplugin/spec.vim index ce00021a69..75eebec56a 100644 --- a/runtime/ftplugin/spec.vim +++ b/runtime/ftplugin/spec.vim @@ -18,8 +18,8 @@ if !exists("no_plugin_maps") && !exists("no_spec_maps") endif endif -if !hasmapto("call SpecChangelog(\"\")") - noremap