Compare commits

...

285 Commits

Author SHA1 Message Date
9afe5e9cc0 patch 8.1.1036: quickfix function arguments are inconsistent
Problem:    Quickfix function arguments are inconsistent.
Solution:   Pass a list pointer to more functions. (Yegappan Lakshmanan,
            closes #4149)
2019-03-22 14:16:06 +01:00
0a2f578e22 patch 8.1.1035: prop_remove() second argument is not optional
Problem:    prop_remove() second argument is not optional.
Solution:   Fix argument count.  Use "buf" instead of "curbuf". (closes #4147)
2019-03-22 13:20:43 +01:00
2ace1bd652 patch 8.1.1034: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Merge FEAT_MOUSE_SGR into FEAT_MOUSE_XTERM / FEAT_MOUSE_TTY.
2019-03-22 12:03:30 +01:00
ba64ba0935 patch 8.1.1033: memory usage test may still fail on some systems
Problem:    Memory usage test may still fail on some systems. (Elimar
            Riesebieter)
Solution:   Increase tolerance from 1% to 3%.
2019-03-22 11:33:09 +01:00
2c519cf3bf patch 8.1.1032: warnings from clang static analyzer
Problem:    Warnings from clang static analyzer. (Yegappan Lakshmanan)
Solution:   Fix relevant warnings.
2019-03-21 21:45:34 +01:00
f7e47af776 patch 8.1.1031: memory usage test may still fail
Problem:    Memory usage test may still fail.
Solution:   Drop the unused min value. (Christian Brabandt)
2019-03-21 21:16:36 +01:00
0398e00a1b patch 8.1.1030: quickfix function arguments are inconsistent
Problem:    Quickfix function arguments are inconsistent.
Solution:   Pass a list pointer instead of info and index. (Yegappan
            Lakshmanan, closes #4135)
2019-03-21 21:12:49 +01:00
60ebd524cf patch 8.1.1029: DirectWrite doesn't take 'linespace' into account
Problem:    DirectWrite doesn't take 'linespace' into account.
Solution:   Include 'linespace' in the position. (Ken Takata, closes #4137)
2019-03-21 20:50:12 +01:00
9029b918f9 patch 8.1.1028: MS-Windows: memory leak when creating terminal fails
Problem:    MS-Windows: memory leak when creating terminal fails.
Solution:   Free the command. (Ken Takata, closes #4138)
2019-03-21 19:58:00 +01:00
08cda65ddf patch 8.1.1027: memory usage test sometimes fails
Problem:    Memory usage test sometimes fails.
Solution:   Use 80% of before.last as the lower limit. (Christian Brabandt)
2019-03-20 22:45:01 +01:00
d00e024d9f patch 8.1.1026: unused condition
Problem:    Unused condition. (Coverity)
Solution:   Remove the condition.  Also remove unused #define.
2019-03-20 21:42:20 +01:00
64c8ed366d patch 8.1.1025: checking NULL pointer after addition
Problem:    Checking NULL pointer after addition. (Coverity)
Solution:   First check for NULL, then add the column.
2019-03-20 21:18:34 +01:00
697005f2cf patch 8.1.1024: stray log calls in terminal code
Problem:    Stray log calls in terminal code. (Christian Brabandt)
Solution:   Remove the calls.
2019-03-20 20:38:44 +01:00
61be376337 patch 8.1.1023: may use NULL pointer when indexing a blob
Problem:    May use NULL pointer when indexing a blob. (Coverity)
Solution:   Break out of loop after using index on blob
2019-03-19 23:04:17 +01:00
e142a9467a patch 8.1.1022: may use NULL pointer when out of memory
Problem:    May use NULL pointer when out of memory. (Coverity)
Solution:   Check for blob_alloc() returning NULL.
2019-03-19 23:03:27 +01:00
8e9a24a127 patch 8.1.1021: pyeval() and py3eval() leak memory
Problem:    pyeval() and py3eval() leak memory.
Solution:   Do not increase the reference count twice. (Ozaki Kiichi,
            closes #4129)
2019-03-19 22:22:55 +01:00
828bff1f9b patch 8.1.1020: compiler warning for Python3 interface
Problem:    Compiler warning for Python3 interface.
Solution:   Add type cast. (Ozaki Kiichi, closes #4128, closes #4103)
2019-03-19 22:11:41 +01:00
4eefe47ea4 patch 8.1.1019: Lua: may garbage collect function reference in use
Problem:    Lua: may garbage collect function reference in use.
Solution:   Keep the function name instead of the typeval. Make luaV_setref()
            handle funcref objects. (Ozaki Kiichi, closes #4127)
2019-03-19 21:59:19 +01:00
8376c3d321 patch 8.1.1018: window cleared when entering Terminal-Normal twice
Problem:    Window cleared when entering Terminal-Normal twice. (Epheien)
Solution:   Don't cleanup scrollback when there is no postponed scrollback.
            (Christian Brabandt, closes #4126)
2019-03-19 20:50:43 +01:00
493fbe4abe patch 8.1.1017: off-by-one error in filetype detection
Problem:    Off-by-one error in filetype detection.
Solution:   Also check the last line of the file.
2019-03-17 17:16:12 +01:00
26967617a3 Update runtime files. 2019-03-17 17:13:16 +01:00
049ca59236 patch 8.1.1016: MS-Windows: No color in shell when using "!" in 'guioptions
Problem:    MS-Windows: No color in shell when using "!" in 'guioptions.
Solution:   Don't stop termcap when using a terminal window for the shell.
            (vim-jp, closes #4117)
2019-03-17 16:59:44 +01:00
647e24ba3d patch 8.1.1015: quickfix buffer shows up in list, can't get buffer number
Problem:    Quickfix buffer shows up in list, can't get buffer number.
Solution:   Make the quickfix buffer unlisted when the quickfix window is
            closed.  get the quickfix buffer number with getqflist().
            (Yegappan Lakshmanan, closes #4113)
2019-03-17 16:39:46 +01:00
38db5276cd patch 8.1.1014: MS-Windows: /analyze only defined for non-debug version
Problem:    MS-Windows: /analyze only defined for non-debug version.
Solution:   Move adding of /analyze up. (Taro Muraoka, closes #4114)
2019-03-17 15:47:25 +01:00
3b5fef6a99 patch 8.1.1013: MS-Windows: Scrolling fails when dividing the screen
Problem:    MS-Windows: Scrolling fails when dividing the screen.
Solution:   Position the cursor before calling ScrollConsoleScreenBuffer().
            (Nobuhiro Takasaki, closes #4115)
2019-03-17 14:54:53 +01:00
ab89d7ab89 patch 8.1.1012: memory leak with E461
Problem:    Memory leak with E461.
Solution:   Clear the typeval. (Dominique Pelle, closes #4111)
2019-03-17 14:43:31 +01:00
2ba4238818 patch 8.1.1011: indent from autoindent not removed from blank line
Problem:    Indent from autoindent not removed from blank line. (Daniel Hahler)
Solution:   Do not reset did_ai when text follows. (closes #4119)
2019-03-16 18:11:07 +01:00
713bf9e996 patch 8.1.1010: Lua interface leaks memory
Problem:    Lua interface leaks memory.
Solution:   Clear typeval after copying it.
2019-03-16 16:38:41 +01:00
1f271efbbb patch 8.1.1009: MS-Windows: some text is not baseline aligned
Problem:    MS-Windows: some text is not baseline aligned.
Solution:   Use bottom alignment. (Taro Muraoka, closes #4116, closes #1520)
2019-03-16 15:24:42 +01:00
0251d2d811 patch 8.1.1008: MS-Windows: HAVE_STDINT_H only defined for non-debug version
Problem:    MS-Windows: HAVE_STDINT_H only defined for non-debug version.
Solution:   Move definition of HAVE_STDINT_H up. (Taro Muraoka, closes #4109)
2019-03-14 21:37:19 +01:00
209b8e3e3b patch 8.1.1007: using closure may consume a lot of memory
Problem:    Using closure may consume a lot of memory.
Solution:   unreference items that are no longer needed. Add a test. (Ozaki
            Kiichi, closes #3961)
2019-03-14 13:43:24 +01:00
4aa47b28f4 patch 8.1.1006: repeated code in quickfix support
Problem:    Repeated code in quickfix support.
Solution:   Move code to functions. (Yegappan Lakshmanan, closes #4091)
2019-03-13 06:51:53 +01:00
55d81cd2a1 patch 8.1.1005: test fails because t_F2 is not set
Problem:    Test fails because t_F2 is not set.
Solution:   Add try-catch.
2019-03-11 08:05:50 +01:00
e165f63598 patch 8.1.1004: function "luaV_setref()" not covered with tests
Problem:    Function "luaV_setref()" not covered with tests.
Solution:   Add a test. (Dominique Pelle, closes #4089)
2019-03-10 09:48:59 +01:00
6edbbd8114 patch 8.1.1003: playing back recorded key sequence mistakes key code
Problem:    Playing back recorded key sequence mistakes key code.
Solution:   Insert a <Nop> after the <Esc>. (closes #4068)
2019-03-10 09:41:51 +01:00
cbef8e1aa1 patch 8.1.1002: "gf" does not always work when URL has a port number
Problem:    "gf" does not always work when URL has a port number. (Jakob
            Schöttl)
Solution:   When a URL is recognized also accept ":". (closes #4082)
2019-03-09 12:32:56 +01:00
8156ed3755 patch 8.1.1001: Visual area not correct when using 'cursorline'
Problem:    Visual area not correct when using 'cursorline'.
Solution:   Update w_last_cursorline also in Visual mode. (Hirohito Higashi,
            closes #4086)
2019-03-09 11:46:15 +01:00
fd731b0e31 patch 8.1.1000: indenting is off
Problem:    Indenting is off.
Solution:   Make indenting consistent and update comments. (Ozaki Kiichi,
            closes #4079)
2019-03-09 11:23:58 +01:00
9d7fdd403a patch 8.1.0999: use register one too often and not properly tested
Problem:    Use register one too often and not properly tested.
Solution:   Do not always use register one when specifying a register.
            (closes #4085)  Add more tests.
2019-03-08 09:50:52 +01:00
19a66858a5 patch 8.1.0998: getcurpos() unexpectedly changes "curswant"
Problem:    getcurpos() unexpectedly changes "curswant".
Solution:   Save and restore "curswant". (closes #4069)
2019-03-07 11:25:32 +01:00
d5a5886ce9 patch 8.1.0997: using GUI colors in vim.exe when 'termguicolors' is off
Problem:    Using GUI colors in vim.exe when 'termguicolors' is off.
Solution:   Add condition for 'termguicolors' set. (Ken Takata, closes #4078)
2019-03-07 06:40:27 +01:00
6bb8c66c8b patch 8.1.0996: a few screendump tests fail because of scrolling
Problem:    A few screendump tests fail because of scrolling.
Solution:   Update the screendumps.
2019-03-05 13:26:55 +01:00
f0fab3046c patch 8.1.0995: a getchar() call resets the reg_executing() result
Problem:    A getchar() call while executing a register resets the
            reg_executing() result.
Solution:   Save and restore reg_executing. (closes #406
2019-03-05 12:24:10 +01:00
8fcb60f961 patch 8.1.0994: relative cursor position is not calculated correctly
Problem:    Relative cursor position is not calculated correctly.
Solution:   Always set topline, also when window is one line only.
            (Robert Webb) Add more info to getwininfo() for testing.
2019-03-04 13:18:30 +01:00
772153f8d8 patch 8.1.0993: ch_read() may return garbage if terminating NL is missing
Problem:    ch_read() may return garbage if terminating NL is missing.
Solution:   Add terminating NUL. (Ozaki Kiichi, closes #4065)
2019-03-04 12:09:49 +01:00
cce713ddcc patch 8.1.0992: a :normal command resets the reg_executing() result
Problem:    A :normal command while executing a register resets the
            reg_executing() result.
Solution:   Save and restore reg_executing. (closes #4066)
2019-03-04 11:40:12 +01:00
975880b6e6 patch 8.1.0991: cannot build with a mix of features
Problem:    Cannot build with FEAT_EVAL defined and FEAT_SEARCH_EXTRA
            undefined, and with FEAT_DIFF defined and FEAT_EVAL undefined.
Solution:   Add a couple of #ifdefs. (closes #4067)
2019-03-03 14:42:11 +01:00
e21c1580b7 patch 8.1.0990: floating point exception with "%= 0" and "/= 0"
Problem:    Floating point exception with "%= 0" and "/= 0".
Solution:   Avoid dividing by zero. (Dominique Pelle, closes #4058)
2019-03-02 11:57:09 +01:00
bdace838c6 patch 8.1.0989: various small code ugliness
Problem:    Various small code ugliness.
Solution:   Remove pointless NULL checks. Fix function calls. Fix typos.
            (Dominique Pelle, closes #4060)
2019-03-02 10:13:42 +01:00
d82a81cad9 patch 8.1.0988: deleting location list buffer breaks location list window
Problem:    Deleting a location list buffer breaks location list window
            functionality.
Solution:   (Yegappan Lakshmanan, closes #4056)
2019-03-02 07:57:18 +01:00
6ef8f9eacd patch 8.1.0987: unnecessary condition in #ifdef
Problem:    Unnecessary condition in #ifdef.
Solution:   Remove using CYGWIN32. (Ken Takata)
2019-03-02 07:15:28 +01:00
ef8c956172 patch 8.1.0986: rename() is not propertly tested
Problem:    rename() is not propertly tested.
Solution:   Add tests. (Dominique Pelle, closes #4061)
2019-03-02 06:42:07 +01:00
ab350f89f9 patch 8.1.0985: crash with large number in regexp
Problem:    Crash with large number in regexp. (Kuang-che Wu)
Solution:   Check for long becoming negative int. (closes #)
2019-02-28 06:25:00 +01:00
c69efcb42f patch 8.1.0984: unnecessary #ifdefs
Problem:    Unnecessary #ifdefs.
Solution:   Remove the #ifdefs. (Ken Takata)
2019-02-27 14:12:01 +01:00
1eed532999 patch 8.1.0983: checking __CYGWIN32__ unnecessarily
Problem:    Checking __CYGWIN32__ unnecessarily.
Solution:   Remove the checks. (Ken Takata)
2019-02-26 17:03:54 +01:00
32033d2397 patch 8.1.0982: update_cursor() called twice in :shell
Problem:    update_cursor() called twice in :shell.
Solution:   Remove one of the calls. (Yasuhiro Matsumoto, closes #4039)
2019-02-25 06:28:57 +01:00
5b868a82ed patch 8.1.0981: pasting in terminal insufficiently tested
Problem:    Pasting in terminal insufficiently tested.
Solution:   Add more tests. (Dominique Pelle, closes #4040)
2019-02-25 06:11:53 +01:00
58d63a0a23 patch 8.1.0980: extend() insufficiently tested
Problem:    extend() insufficiently tested.
Solution:   Add more tests. (Dominique Pelle, closes #4040)
2019-02-25 05:56:31 +01:00
1fa8fdd611 patch 8.1.0979: compiler warning for unused functions
Problem:    Compiler warning for unused functions. (Yasuhiro Matsumoto)
Solution:   Adjust #ifdef.
2019-02-25 05:41:15 +01:00
2472ae81df patch 8.1.0978: blob not tested with Perl
Problem:    Blob not tested with Perl.
Solution:   Add more test coverage.  Fixes a crash. (Dominique Pelle,
            closes #4037)
2019-02-23 15:04:17 +01:00
0d13cce345 patch 8.1.0977: blob not tested with Ruby
Problem:    Blob not tested with Ruby.
Solution:   Add more test coverage.  fixes a crash. (Dominique Pelle,
            closes #4036)
2019-02-23 14:23:03 +01:00
e4963c543d patch 8.1.0976: dosinstall still has buffer overflow problems
Problem:    Dosinstall still has buffer overflow problems.
Solution:   Adjust  buffer sizes. (Yasuhiro Matsumoto, closes #4002)
2019-02-22 19:41:08 +01:00
c666388367 patch 8.1.0975: using STRNCPY() wrongly. Warning for uninitialized variable
Problem:    Using STRNCPY() wrongly. Warning for uninitialized variable.
Solution:   Use mch_memmove(). Initialize variable. (Yasuhiro Matsumoto,
            closes #3979)
2019-02-22 19:14:54 +01:00
882d02eeb5 patch 8.1.0974: cannot switch from terminal window to previous tabpage
Problem:    Cannot switch from terminal window to previous tabpage.
Solution:   Make CTRL-W gT move to previous tabpage.
2019-02-22 17:56:43 +01:00
cd62512c55 patch 8.1.0973: pattern with syntax error gives threee error messages
Problem:    Pattern with syntax error gives threee error messages. (Kuang-che
            Wu)
Solution:   Remove outdated internal error.  Don't fall back to other engine
            after an error.
2019-02-22 17:29:43 +01:00
72e83c1ae5 patch 8.1.0972: cannot switch from terminal window to next tabpage
Problem:    Cannot switch from terminal window to next tabpage.
Solution:   Make CTRL-W gt move to next tabpage.
2019-02-22 16:09:52 +01:00
f6b401090e Update runtime files 2019-02-22 15:24:03 +01:00
55d3bdbbe2 patch 8.1.0971: failure for selecting quoted text object moves cursor
Problem:    Failure for selecting quoted text object moves cursor.
Solution:   Restore the Visual selection on failure. (Christian Brabandt,
            closes #4024)
2019-02-22 15:04:17 +01:00
ed79d1e348 patch 8.1.0970: text properties test fails when 'encoding' is not utf-8
Problem:    Text properties test fails when 'encoding' is not utf-8.
Solution:   Compare with original value of 'encoding'. (Christian Brabandt,
            closes #3986)
2019-02-22 14:38:58 +01:00
97c2c05ead patch 8.1.0969: message written during startup is truncated
Problem:    Message written during startup is truncated.
Solution:   Restore message after truncating. (closes 3969)
2019-02-22 13:42:07 +01:00
527a2d86fb patch 8.1.0968: crash when using search pattern \%Ufffffc23
Problem:    Crash when using search pattern \%Ufffffc23.
Solution:   Limit character to INT_MAX. (closes #4009)
2019-02-21 22:28:51 +01:00
1417031cfd patch 8.1.0967: stray dependency in test Makefile
Problem:    Stray dependency in test Makefile.
Solution:   Remove it. (Masato Nishihata, closes #4018)
2019-02-21 21:50:46 +01:00
3876789b23 patch 8.1.0966: one terminal test is flaky
Problem:    One terminal test is flaky.
Solution:   Add to list of flaky tests.
2019-02-21 18:17:14 +01:00
e86ecbd922 patch 8.1.0965: search test fails
Problem:    Search test fails.
Solution:   Wait a bit longer for the 'ambiwidth' redraw.
2019-02-21 17:48:59 +01:00
353aca1215 patch 8.1.0964: cannot see in CI why a screenshot test failed
Problem:    Cannot see in CI why a screenshot test failed.
Solution:   Add info about the failure.
2019-02-21 17:05:59 +01:00
4a7d2d3b40 patch 8.1.0963: illegal memory access when using 'incsearch'
Problem:    Illegal memory access when using 'incsearch'.
Solution:   Reset highlight_match when changing text. (closes #4022)
2019-02-21 16:25:50 +01:00
d91e5dafd5 patch 8.1.0962: building with MinGW and static libs doesn't work
Problem:    Building with MinGW and static libs doesn't work. (Salman Halim)
Solution:   Add -lgcc. (Ken Takata)
2019-02-21 13:34:07 +01:00
9166838420 patch 8.1.0961: Mac: fsync may fail sometimes
Problem:    Mac: fsync may fail sometimes.
Solution:   Do not check errno. (Yee Cheng Chin, closes #4025)
2019-02-21 12:16:12 +01:00
8caa43d815 patch 8.1.0960: when using ConPTY garbage collection has undefined behavior
Problem:    When using ConPTY garbage collection has undefined behavior.
Solution:   Free the channel in a better way. (Nobuhiro Takasaki, closes #4020)
2019-02-20 22:45:06 +01:00
a25e3d0695 patch 8.1.0959: sorting large numbers is not tested
Problem:    Sorting large numbers is not tested and does not work properly.
Solution:   Add test.  Fix comparing lines with and without a number.
            (Dominique Pelle, closes #4017)
2019-02-20 22:19:05 +01:00
38f08e76ac patch 8.1.0958: compiling weird regexp pattern is very slow
Problem:    Compiling weird regexp pattern is very slow.
Solution:   When reallocating post list increase size by 50%. (Kuang-che Wu,
            closes #4012)  Make assert_inrange() accept float values.
2019-02-20 22:04:32 +01:00
3585671888 patch 8.1.0957: Mac: fsync fails on network share
Problem:    Mac: fsync fails on network share.
Solution:   Check for ENOTSUP. (Yee Cheng Chin, closes #4016)
2019-02-20 20:37:01 +01:00
b9ddda6c2d patch 8.1.0956: using context:0 in 'diffopt' does not work well
Problem:    Using context:0 in 'diffopt' does not work well.
Solution:   Make zero context do the same as one line context. (closes #4005)
2019-02-19 23:00:50 +01:00
66ae3d199f patch 8.1.0955: matchit autoload directory not in installer
Problem:    Matchit autoload directory not in installer. (Chris Morgan)
Solution:   Adjust the NSIS script. (Christian Brabandt, closes #4006)
2019-02-19 21:40:28 +01:00
0d8562a999 patch 8.1.0954: arguments of semsg() and siemsg() are not checked
Problem:    Arguments of semsg() and siemsg() are not checked.
Solution:   Add function prototype with __attribute__.
2019-02-19 21:34:05 +01:00
c9629251a6 patch 8.1.0953: a very long file is truncated at 2^31 lines
Problem:    A very long file is truncated at 2^31 lines.
Solution:   Use LONG_MAX for MAXLNUM. (Dominique Pelle, closes #4011)
2019-02-19 21:24:54 +01:00
bbd854dc57 patch 8.1.0952: compilation warnings when building the MS-Windows installer
Problem:    Compilation warnings when building the MS-Windows installer.
Solution:   Fix buffer sizes. (Yasuhiro Matsumoto, closes #3999)
2019-02-18 22:19:33 +01:00
44b443c5db patch 8.1.0951: using WIN64 even though it is never defined
Problem:    Using WIN64 even though it is never defined.
Solution:   Only use _WIN64. (Ken Takata, closes #3997)
2019-02-18 22:14:18 +01:00
14816ad6e5 patch 8.1.0950: using :python sets 'pyxversion' even when not executed
Problem:    Using :python sets 'pyxversion' even when not executed.
Solution:   Check the "skip" flag. (Shane Harper, closes #3995)
2019-02-18 22:04:56 +01:00
0472b6d149 patch 8.1.0949: MS-windows defines GUI macros different than other systems
Problem:    MS-windows defines GUI macros different than other systems.
Solution:   Swap FEAT_GUI and FEAT_GUI_MSWIN. (Hirohito Higashi, closes #3996)
2019-02-18 21:41:37 +01:00
d53931ae73 patch 8.1.0948: when built without +eval "Vim --clean" produces errors
Problem:    When built without +eval "Vim --clean" produces errors. (James
            McCoy)
Solution:   Do not enable filetype detection.
2019-02-18 21:32:28 +01:00
7dca2ebbcf patch 8.1.0947: using MSWIN before it is defined
Problem:    Using MSWIN before it is defined. (Cesar Romani)
Solution:   Move the block that uses MSWIN to below including vim.h. (Ken
            Takata)
2019-02-18 20:42:50 +01:00
c854898881 Revert change accidentally included in runtime file updates. Closes #3998. 2019-02-18 17:40:18 +01:00
b0e2da2b23 patch 8.1.0946: Coveralls is not very useful
Problem:    Coveralls is not very useful.
Solution:   Remove Coveralls badge, add badge for packages.
2019-02-17 23:26:50 +01:00
4c92e75dd4 Update runtime files. 2019-02-17 21:18:32 +01:00
a5483448cb patch 8.1.0945: internal error when using pattern with NL in the range
Problem:    Internal error when using pattern with NL in the range.
Solution:   Use an actual newline for the range. (closes #3989)  Also fix
            error message.  (Dominique Pelle)
2019-02-17 20:17:02 +01:00
c85c8fcb9f patch 8.1.0944: format of nbdbg() arguments is not checked
Problem:    Format of nbdbg() arguments is not checked.
Solution:   Add format attribute.  Fix reported problems. (Dominique Pelle,
            closes #3992)
2019-02-17 19:12:21 +01:00
749f07c0db patch 8.1.0943: still a trace of Farsi support
Problem:    Still a trace of Farsi support.
Solution:   Remove defining macros.
2019-02-17 18:59:10 +01:00
76cbe811da patch 8.1.0942: options window still checks for the multi_byte feature
Problem:    Options window still checks for the multi_byte feature.
Solution:   Remove the unnecessary check. (Dominique Pelle, closes #3990)
2019-02-17 17:53:49 +01:00
4f97475d32 patch 8.1.0941: macros for MS-Windows are inconsistent
Problem:    Macros for MS-Windows are inconsistent, using "32", "3264 and
            others.
Solution:   Use MSWIN for all MS-Windows builds.  Use FEAT_GUI_MSWIN for the
            GUI build. (Hirohito Higashi, closes #3932)
2019-02-17 17:44:42 +01:00
78d21dae9c patch 8.1.0940: MS-Windows console resizing not handled properly
Problem:    MS-Windows console resizing not handled properly.
Solution:   Handle resizing the console better. (Nobuhiro Takasaki,
            closes #3968, closes #3611)
2019-02-17 15:00:52 +01:00
3678f65d43 patch 8.1.0939: no completion for sign group names
Problem:    No completion for sign group names.
Solution:   Add completion for sign group names and buffer names. (Yegappan
            Lakshmanan, closes #3980)
2019-02-17 14:50:25 +01:00
21edde8742 patch 8.1.0938: background color is wrong in MS-Windows console
Problem:    Background color is wrong in MS-Windows console when not using VTP.
Solution:   Use g_attrCurrent. (Nobuhiro Takasaki, closes #3987)
2019-02-17 14:10:56 +01:00
f1b57ab2ab patch 8.1.0937: invalid memory access in search pattern
Problem:    Invalid memory access in search pattern. (Kuang-che Wu)
Solution:   Check for incomplete collation element. (Dominique Pelle,
            closes #3985)
2019-02-17 13:53:34 +01:00
55c77cf2ea patch 8.1.0936: may leak memory when using 'vartabstop'
Problem:    May leak memory when using 'vartabstop'. (Kuang-che Wu)
Solution:   Fix handling allocated memory for 'vartabstop'. (closes #3976)
2019-02-16 19:05:11 +01:00
8bfd9469ce patch 8.1.0935: old regexp engine may use invalid buffer
Problem:    Old regexp engine may use invalid buffer for 'iskeyword' or
            uninitialized buffer pointer. (Kuang-che Wu)
Solution:   Set rex.reg_buf when compiling the pattern. (closes #3972)
2019-02-16 18:07:57 +01:00
985079c514 patch 8.1.0934: invalid memory access in search pattern
Problem:    Invalid memory access in search pattern. (Kuang-che Wu)
Solution:   Check for incomplete equivalence class. (closes #3970)
2019-02-16 17:07:47 +01:00
6982f42f33 patch 8.1.0933: When using VTP scroll region isn't used properly
Problem:    When using VTP scroll region isn't used properly.
Solution:   Make better use of the scroll region. (Nobuhiro Takasaki,
            closes #3974)
2019-02-16 16:48:01 +01:00
14184a3133 patch 8.1.0932: Farsi support is outdated and unused
Problem:    Farsi support is outdated and unused.
Solution:   Delete the Farsi support.
2019-02-16 15:10:30 +01:00
6902c0eb27 patch 8.1.0931: vtp_working included in GUI build but unused
Problem:    vtp_working included in GUI build but unused.
Solution:   Adjust #ifdefs. (Ken Takata, closes #3971)
2019-02-16 14:07:37 +01:00
0a1b17bbec patch 8.1.0930: typo in Makefile
Problem:    Typo in Makefile.
Solution:   Change ABORT_CLFAGS to ABORT_CFLAGS. (Kuang-che Wu, closes #3977)
2019-02-16 13:45:09 +01:00
5acd987258 patch 8.1.0929: no error when requesting ConPTY but it's not available
Problem:    No error when requesting ConPTY but it's not available.
Solution:   Add an error message. (Hirohito Higashi, closes #3967)
2019-02-16 13:35:13 +01:00
d634024b90 patch 8.1.0928: stray log function call
Problem:    Stray log function call.
Solution:   Remove the log function call.
2019-02-16 00:00:28 +01:00
0059074008 patch 8.1.0927: USE_CR is never defined
Problem:    USE_CR is never defined.
Solution:   Remove usage of USE_CR. (Ken Takata, closes #3958)
2019-02-15 21:06:09 +01:00
e93e5a504f patch 8.1.0926: no test for :wnext, :wNext and :wprevious
Problem:    No test for :wnext, :wNext and :wprevious.
Solution:   Add a test. (Dominique Pelle, closes #3963)
2019-02-15 20:22:38 +01:00
5ff7df509a patch 8.1.0925: terminal scrollback test still still flaky
Problem:    Terminal scrollback test still still flaky.
Solution:   Explicitly set the shell.  Disable ruler. (Ozaki Kiichi,
            closes #3966)
2019-02-15 01:06:13 +01:00
7e841e3ce5 patch 8.1.0924: terminal scrollback test still flaky
Problem:    Terminal scrollback test still flaky.
Solution:   Wait a bit longer before running the tail command.
2019-02-15 00:26:14 +01:00
c3ef896608 patch 8.1.0923: terminal dump diff swap does not update file names
Problem:    Terminal dump diff swap does not update file names.
Solution:   Also swap the file name.  Add a test.
2019-02-15 00:16:13 +01:00
96baf02aa8 patch 8.1.0922: terminal scrollback test is flaky
Problem:    Terminal scrollback test is flaky.
Solution:   Wait a bit before running the tail command.
2019-02-14 23:49:38 +01:00
81aa0f56f8 patch 8.1.0921: terminal test sometimes fails; using memory after free
Problem:    Terminal test sometimes fails; using memory after free.
Solution:   Fee memory a bit later.  Add test to cover this.  Disable flaky
            screenshot test. (closes #3956)
2019-02-14 23:23:19 +01:00
29ae223ddc patch 8.1.0920: in Terminal-Normal mode job output messes up the window
Problem:    In Terminal-Normal mode job output messes up the window.
Solution:   Postpone scrolling and updating the buffer when in Terminal-Normal
            mode.
2019-02-14 21:22:01 +01:00
0f77d6afd5 patch 8.1.0919: compiler warnings
Problem:    Compiler warnings.
Solution:   Add type casts. (Mike Williams)
2019-02-14 20:55:09 +01:00
9b5c1fcdea patch 8.1.0918: MS-Windows: startup messages are not converted
Problem:    MS-Windows: startup messages are not converted.
Solution:   Convert messages when the current codepage differs from
            'encoding'. (Yasuhiro Matsumoto, closes #3914)
2019-02-14 14:08:04 +01:00
445e71c5ee patch 8.1.0917: double free when running out of memory
Problem:    Double free when running out of memory.
Solution:   Remove one free. (Ken Takata, closes #3955)
2019-02-14 13:43:36 +01:00
b999ba2778 patch 8.1.0916: with Python 3.7 "find_module" is not made available
Problem:    With Python 3.7 "find_module" is not made available.
Solution:   Also add "find_module" with Python 3.7. (Joel Frederico,
            closes #3954)
2019-02-14 13:28:45 +01:00
a787019518 patch 8.1.0915: fsync() may not work properly on Mac
Problem:    fsync() may not work properly on Mac.
Solution:   Use fcntl() with F_FULLFSYNC. (suggested by Justin M. Keyes)
2019-02-14 12:56:36 +01:00
5fd0f5052f patch 8.1.0914: code related to findfile() is spread out
Problem:    Code related to findfile() is spread out.
Solution:   Put findfile() related code into a new source file. (Yegappan
            Lakshmanan, closes #3934)
2019-02-13 23:13:28 +01:00
688b3983d8 patch 8.1.0913: CI crashes when running out of memory
Problem:    CI crashes when running out of memory.
Solution:   Apply 'maxmempattern' also to new regexp engine.
2019-02-13 21:47:36 +01:00
18442cbcc0 patch 8.1.0912: MS-Windows: warning for signed/unsigned
Problem:    MS-Windows: warning for signed/unsigned.
Solution:   Add type cast. (Nobuhiro Takasaki, closes #3945)
2019-02-13 21:22:12 +01:00
943e9639a9 patch 8.1.0911: tag line with Ex command cannot have extra fields
Problem:    Tag line with Ex command cannot have extra fields.
Solution:   Recognize |;" as the end of the command. (closes #2402)
2019-02-13 21:19:14 +01:00
15bbd6ec87 patch 8.1.0910: crash with tricky search pattern
Problem:    Crash with tricky search pattern. (Kuang-che Wu)
Solution:   Check for runnning out of memory. (closes #3950)
2019-02-13 20:31:50 +01:00
d9ef1b8d77 patch 8.1.0909: MS-Windows: using ConPTY even though it is not stable
Problem:    MS-Windows: using ConPTY even though it is not stable.
Solution:   When ConPTY version is unstable, prefer using winpty. (Ken Takata,
            closes #3949)
2019-02-13 19:23:10 +01:00
9403a2168d patch 8.1.0908: can't handle large value for %{nr}v in regexp
Problem:    Can't handle large value for %{nr}v in regexp. (Kuang-che Wu)
Solution:   Give an error if the value is too large. (closes #3948)
2019-02-13 18:35:06 +01:00
5382f12c91 patch 8.1.0907: CI tests on AppVeyor are failing
Problem:    CI tests on AppVeyor are failing.
Solution:   Reduce the recursiveness limit for regexp.
2019-02-13 01:18:38 +01:00
e1ed53f3f9 patch 8.1.0906: using clumsy way to get console window handle
Problem:    Using clumsy way to get console window handle.
Solution:   Use GetConsoleWindow(). (Ken Takata, closes #3940)
2019-02-12 23:12:37 +01:00
5567ad48b6 patch 8.1.0905: complicated regexp causes a crash
Problem:    Complicated regexp causes a crash. (Kuang-che Wu)
Solution:   Limit the recursiveness of addstate(). (closes #3941)
2019-02-12 23:05:46 +01:00
00f148d2f2 patch 8.1.0904: USE_LONG_FNAME never defined
Problem:    USE_LONG_FNAME never defined.
Solution:   Remove using USE_LONG_FNAME. (Ken Takata, closes #3938)
2019-02-12 22:37:27 +01:00
beb7574d6b patch 8.1.0903: struct uses more bytes than needed
Problem:    Struct uses more bytes than needed.
Solution:   Reorder members of regitem_S. (Dominique Pelle, closes #3936)
2019-02-12 22:33:00 +01:00
ff697e6cef patch 8.1.0902: incomplete set of assignment operators
Problem:    Incomplete set of assignment operators.
Solution:   Add /=, *= and %=. (Ozaki Kiichi, closes #3931)
2019-02-12 22:28:33 +01:00
57ee2b6e0b patch 8.1.0901: index in getjumplist() may be wrong
Problem:    Index in getjumplist() may be wrong. (Epheien)
Solution:   Call cleanup_jumplist() earlier. (Yegappan Lakshmanan,
            closes #3941)
2019-02-12 22:15:06 +01:00
48773f1f83 patch 8.1.0900: ConPTY many crash with 32-bit build
Problem:    ConPTY many crash with 32-bit build.
Solution:   Fix function declarations. (Ken Takata, closes #3943)
2019-02-12 21:46:46 +01:00
e0fb7d1e38 patch 8.1.0899: no need to check restricted mode for setwinvar()
Problem:    No need to check restricted mode for setwinvar().
Solution:   Remove check_restricted().
2019-02-12 20:48:10 +01:00
0ea21e41c6 patch 8.1.0898: a messed up rgb.txt can crash Vim
Problem:    A messed up rgb.txt can crash Vim. (Pavel Cheremushkin)
Solution:   Limit to 10000 entries.  Also don't retry many times when the file
            cannot be read.
2019-02-12 20:46:48 +01:00
05c00c038b patch 8.1.0897: can modify a:000 when using a reference
Problem:    Can modify a:000 when using a reference.
Solution:   Make check for locked variable stricter. (Ozaki Kiichi,
            closes #3930)
2019-02-11 22:00:11 +01:00
5a6698169d patch 8.1.0896: tests for restricted mode no run for MS-Windows GUI
Problem:    Tests for restricted mode no run for MS-Windows GUI.
Solution:   Make tests also work in MS-Windows GUI.
2019-02-11 21:45:00 +01:00
ec0f50a35e patch 8.1.0895: MS-Windows: dealing with temp name encoding not quite right
Problem:    MS-Windows: dealing with temp name encoding not quite right.
Solution:   Use more wide functions. (Ken Takata, closes #3921)
2019-02-10 23:26:13 +01:00
dce1e89be4 patch 8.1.0894: MS-Windows: resolve() does not return a reparse point
Problem:    MS-Windows: resolve() does not return a reparse point.
Solution:   Improve resolve(). (Yasuhiro Matsumoto, closes #3896)
2019-02-10 23:18:53 +01:00
3615abb693 patch 8.1.0893: terminal test is a bit flaky
Problem:    Terminal test is a bit flaky.
Solution:   Add test_terminal_no_cmd() to list of flaky tests.
2019-02-10 23:04:12 +01:00
eeb1b9c7ed patch 8.1.0892: failure when closing a window when location list is in use
Problem:    Failure when closing a window when location list is in use.
Solution:   Handle the situation gracefully. Make sure memory for 'switchbuf'
            is not freed at the wrong time. (Yegappan Lakshmanan,
            closes #3928)
2019-02-10 22:59:04 +01:00
d77aa4d22e patch 8.1.0891: substitute command inssuficiently tested
Problem:    Substitute command inssuficiently tested.
Solution:   Add more test coverage. (Dominique Pelle)
2019-02-10 22:50:14 +01:00
593864817a patch 8.1.0890: pty allocation wrong if using file for out channel
Problem:    Pty allocation wrong if using file for out channel and using null
            for in channel and null for error channel.
Solution:   Correct using use_file_for_out in condition. (Ozaki Kiichi, closes
            #3917)
2019-02-10 22:43:46 +01:00
6524068ff3 patch 8.1.0889: MS-Windows: a channel write may hang
Problem:    MS-Windows: a channel write may hang.
Solution:   Check for WriteFile() not writing anything. (Yasuhiro Matsumoto,
            closes #3920)
2019-02-10 22:23:26 +01:00
31b816042f patch 8.1.0888: the a: dict is not immutable as documented
Problem:    The a: dict is not immutable as documented.
Solution:   Make the a:dict immutable, add a test. (Ozaki Kiichi, Yasuhiro
            Matsumoto, closes #3929)
2019-02-10 22:14:27 +01:00
9474716d39 patch 8.1.0887: the 'l' flag in :subsitute is sticky
Problem:    The 'l' flag in :subsitute is sticky.
Solution:   Reset the flag. (Dominique Pelle, closes #3925)
2019-02-10 21:55:26 +01:00
b763361161 patch 8.1.0886: compiler warning for NULL pointer and condition always true
Problem:    Compiler warning for adding to NULL pointer and a condition that
            is always true.
Solution:   Check for NULL pointer before adding. Remove useless "if".
            (Friedirch, closes #3913)
2019-02-10 21:48:25 +01:00
18c5632cab patch 8.1.0885: test for restricted hangs on MS-Windows GUI
Problem:    Test for restricted hangs on MS-Windows GUI.
Solution:   Skip the test.
2019-02-09 11:13:12 +01:00
af630d4f7f patch 8.1.0884: double check for bsd systems
Problem:    Double check for bsd systems.
Solution:   Delete the old line.
2019-02-08 23:09:48 +01:00
54d6fe5e60 patch 8.1.0883: missing some changes for Ex commands
Problem:    Missing some changes for Ex commands.
Solution:   Add mising changes in header file.
2019-02-08 16:50:26 +01:00
1aa43755e2 patch 8.1.0882: checking for FEAT_MBYTE which doesn't exist anymore
Problem:    Checking for FEAT_MBYTE which doesn't exist anymore. (Christ van
            Willegen)
Solution:   Remove it.
2019-02-08 14:41:31 +01:00
8c62a08faf patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem:    Can execute shell commands in rvim through interfaces.
Solution:   Disable using interfaces in restricted mode. Allow for writing
            file with writefile(), histadd() and a few others.
2019-02-08 14:34:10 +01:00
c6ddce3f2c patch 8.1.0880: MS-Windows: inconsistent selection of winpty/conpty
Problem:    MS-Windows: inconsistent selection of winpty/conpty.
Solution:   Name option 'termwintype', use ++type argument and "term_pty" for
            term_start(). (Hirohito Higashi, closes #3915)
2019-02-08 12:47:03 +01:00
0036201a1a patch 8.1.0879: MS-Windows: temp name encoding can be wrong
Problem:    MS-Windows: temp name encoding can be wrong.
Solution:   Convert from active code page to 'encoding'. (Ken Takata,
            closes #3520, closes #1698)
2019-02-08 12:21:30 +01:00
a02e3f65c5 patch 8.1.0878: test for has('bsd') fails on some BSD systems
Problem:    Test for has('bsd') fails on some BSD systems.
Solution:   Adjust the uname match. (James McCoy, closes #3909)
2019-02-07 21:27:14 +01:00
ee8188fc74 patch 8.1.0877: new buffer used every time the quickfix window is opened
Problem:    New buffer used every time the quickfix window is opened.
Solution:   Reuse the buffer. (Yegappan Lakshmanan, closes #3902)
2019-02-05 21:23:04 +01:00
2a78b7c704 patch 8.1.0876: completion match not displayed when popup menu is not shown
Problem:    Completion match not displayed when popup menu is not shown.
Solution:   Call update_screen() when not displaying the popup menu to show
            the inserted match. (Ken Takata, Hirohito Higashi)
2019-02-05 20:12:06 +01:00
71b13e92ae patch 8.1.0875: not all errors of marks and findfile()/finddir() are tested
Problem:    Not all errors of marks and findfile()/finddir() are tested.
Solution:   Add more test coverage. (Dominique Pelle)
2019-02-04 21:14:45 +01:00
94688b8a2a Add missing matchit file. 2019-02-04 21:02:06 +01:00
9c46efd7dc patch 8.1.0874: using old style comments in new file
Problem:    Using old style comments in new file.
Solution:   Convert to // comments in new file. (Yegappan Lakshmanan)
2019-02-04 20:30:18 +01:00
970076468e patch 8.1.0873: list if distributed files does not include matchit autoload
Problem:    List if distributed files does not include the matchit autoload
            directory.
Solution:   Add the directory.
2019-02-03 23:45:30 +01:00
34a587457f patch 8.1.0872: confusing condition
Problem:    Confusing condition.
Solution:   Use "==" instead of "<=".
2019-02-03 15:28:28 +01:00
314dd79cac Update runtime files. 2019-02-03 15:27:20 +01:00
63d1fea814 patch 8.1.0871: build error when building with Ruby 2.6.0
Problem:    Build error when building with Ruby 2.6.0.
Solution:   Change argument of rb_int2big_stub(). (Android Baumann,
            closes #3899)
2019-02-03 15:18:35 +01:00
aa5df7e312 patch 8.1.0870: Vim doesn't use the new ConPTY support in Windows 10
Problem:    Vim doesn't use the new ConPTY support in Windows 10.
Solution:   Use ConPTY support, if available. (Nobuhiro Takasaki, closes #3794)
2019-02-03 14:53:10 +01:00
01a6c21691 patch 8.1.0869: Travis CI script is too complicated
Problem:    Travis CI script is too complicated.
Solution:   Add names to environments.  Move appveyor script outside of src
            directory. (Ozaki Kiichi, closes #3890)
2019-02-03 13:13:18 +01:00
889da2f243 patch 8.1.0868: crash if triggering garbage collector after a function call
Problem:    Crash if triggering garbage collector after a function call.
            (Michael Henry)
Solution:   Don't call the garbage collector right away, do it later.
            (closes #3894)
2019-02-02 14:02:30 +01:00
65951258d6 patch 8.1.0867: cannot build Python interface with Python 2.4
Problem:    Cannot build Python interface with Python 2.4. (Tom G. Christensen)
Solution:   Define PyBytes_FromStringAndSize. (Ken Takata, closes #3888)
2019-02-01 22:10:16 +01:00
1c321dcee9 patch 8.1.0866: build file dependencies are outdated
Problem:    Build file dependencies are outdated. (John Little)
Solution:   Run "make proto" and "make depend".
2019-02-01 20:42:22 +01:00
895d966e34 patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Problem:    When 'listchars' only contains "nbsp:X" it does not work.
Solution:   Set extra_check when lcs_nbsp is set. (Ralf Schandl, closes #3889)
2019-01-31 21:57:21 +01:00
375e339007 patch 8.1.0864: cannot have a local value for 'scrolloff' and 'sidescrolloff'
Problem:    Cannot have a local value for 'scrolloff' and 'sidescrolloff'.
            (Gary Holloway)
Solution:   Make 'scrolloff' and 'sidescrolloff' global-local. (mostly by
            Aron Widforss, closes #3539)
2019-01-31 18:26:10 +01:00
b3051ce82f patch 8.1.0863: cannot see what signal caused a job to end
Problem:    Cannot see what signal caused a job to end.
Solution:   Add "termsig" to job_info(). (Ozaki Kiichi, closes #3786)
2019-01-31 15:52:11 +01:00
221cd9f4dd patch 8.1.0862: no verbose version of character classes
Problem:    No verbose version of character classes.
Solution:   Add [:ident:], [:keyword:] and [:fname:]. (Ozaki Kiichi,
            closes #1373)
2019-01-31 15:34:40 +01:00
60f807b3f7 patch 8.1.0861: building with MinGW and static libc doesn't work
Problem:    Building with MinGW and static libc doesn't work.
Solution:   Change the LIB argument. (Ken Takata)
2019-01-31 14:43:19 +01:00
77255cab74 patch 8.1.0860: debug lines left in the code
Problem:    Debug lines left in the code.
Solution:   Delete the lines.
2019-01-31 14:29:42 +01:00
c45eb770a5 patch 8.1.0859: "%v" in 'errorformat' does handle multi-byte characters
Problem:    "%v" in 'errorformat' does handle multi-byte characters.
Solution:   Handle multi-byte characters. (Yegappan Lakshmanan, closes #3700)
2019-01-31 14:27:04 +01:00
ce655743ba patch 8.1.0858: 'indentkeys' and 'cinkeys' defaults are different
Problem:    'indentkeys' and 'cinkeys' defaults are different.
Solution:   Make them the same, update docs. (close #3882)
2019-01-31 14:12:57 +01:00
4b47162cce patch 8.1.0857: indent functionality is not separated
Problem:    Ignore functionality is not separated.
Solution:   Move indent functionality into a new file. (Yegappan Lakshmanan,
            closes #3886)
2019-01-31 13:48:09 +01:00
bbb5f8d4c2 patch 8.1.0856: when scrolling a window the cursorline is not always updated
Problem:    When scrolling a window other than the current one the cursorline
            highlighting is not always updated. (Jason Franklin)
Solution:   Call redraw_for_cursorline() after scrolling.  Only set
            w_last_cursorline when drawing the cursor line.  Reset the lines
            to be redrawn also when redrawing the whole window.
2019-01-31 13:22:32 +01:00
af703585a3 patch 8.1.0855: cannot build xxd with MSVC 10
Problem:    Cannot build xxd with MSVC 10.
Solution:   Move declaration to start of block.
2019-01-31 11:00:42 +01:00
d8c56a0d29 patch 8.1.0854: xxd does not work with more than 32 bit addresses
Problem:    xxd does not work with more than 32 bit addresses.
Solution:   Add support for 64 bit addresses. (Christer Jensen, closes #3791)
2019-01-30 23:02:25 +01:00
cbbd0f6578 patch 8.1.0853: options test fails on Mac
Problem:    Options test fails on Mac.
Solution:   Remove a trailing slash from $TMPDIR.
2019-01-30 22:36:18 +01:00
ed71ed37bc patch 8.1.0852: findfile() and finddir() are not properly tested
Problem:    findfile() and finddir() are not properly tested.
Solution:   Extend the test and add more. (Dominique Pelle, closes #3880)
2019-01-30 22:13:35 +01:00
8d4ce56a19 patch 8.1.0851: feedkeys() with "L" does not work properly
Problem:    feedkeys() with "L" does not work properly.
Solution:   Do not set typebuf_was_filled when using "L". (Ozaki Kiichi,
            closes #3885)
2019-01-30 22:01:40 +01:00
98ad1e17c3 patch 8.1.0850: test for 'backupskip' is not correct
Problem:    Test for 'backupskip' is not correct.
Solution:   Split the option in parts and use expand(). (Michael Soyka)
2019-01-30 21:51:27 +01:00
c07ff5c60a patch 8.1.0849: cursorline highlight is not always updated
Problem:    Cursorline highlight is not always updated.
Solution:   Set w_last_cursorline when redrawing.  Fix resetting cursor flags
            when using the popup menu.
2019-01-30 21:41:14 +01:00
b191be2f00 patch 8.1.0848: cannot build with Ruby 1.8
Problem:    Cannot build with Ruby 1.8. (Tom G. Christensen)
Solution:   Use rb-str_new2(). (Yasuhiro Matsumoto, closes #3883,
            closes #3884)
2019-01-30 21:00:12 +01:00
9172d23d05 patch 8.1.0847: may use terminal after it was cleaned up
Problem:    May use terminal after it was cleaned up.
Solution:   Use the job pointer.
2019-01-29 23:06:54 +01:00
39536dd557 patch 8.1.0846: not easy to recognize the system Vim runs on
Problem:    Not easy to recognize the system Vim runs on.
Solution:   Add more items to the features list. (Ozaki Kiichi, closes #3855)
2019-01-29 22:58:21 +01:00
2a4857a1fc patch 8.1.0845: having job_status() free the job causes problems
Problem:    Having job_status() free the job causes problems.
Solution:   Do not actually free the job or terminal yet, put it in a list and
            free it a bit later. Do not use a terminal after checking the job
            status.  (closes #3873)
2019-01-29 22:29:07 +01:00
50948e4ac2 patch 8.1.0844: when timer fails test will hang forever
Problem:    When timer fails test will hang forever.
Solution:   Use reltime() to limit waiting time. (Ozaki Kiichi, closes #3878)
2019-01-29 20:36:56 +01:00
e0de2164f6 patch 8.1.0843: memory leak when running "make test_cd"
Problem:    Memory leak when running "make test_cd".
Solution:   Free the stack element when failing. (Dominique Pelle,
            closes #3877)
2019-01-29 20:17:28 +01:00
cb908a813c patch 8.1.0842: getchar_zero test fails on MS-Windows
Problem:    getchar_zero test fails on MS-Windows.
Solution:   Disable the test for now.
2019-01-28 23:20:04 +01:00
2339fa335f patch 8.1.0841: travis config to get Lua on MacOS is too complicated
Problem:    Travis config to get Lua on MacOS is too complicated.
Solution:   Use an addons entry. (Ozaki Kiichi, closes 3876)
2019-01-28 22:59:36 +01:00
12dfc9eef1 patch 8.1.0840: getchar(0) never returns a character in the terminal
Problem:    getchar(0) never returns a character in the terminal.
Solution:   Call wait_func() at least once.
2019-01-28 22:32:58 +01:00
f58d81a187 patch 8.1.0839: when using VTP wrong colors after a color scheme change
Problem:    When using VTP wrong colors after a color scheme change.
Solution:   When VTP is active always clear after a color scheme change.
            (Nobuhiro Takasaki, closes #3872)
2019-01-28 20:19:05 +01:00
dec01206b2 patch 8.1.0838: compiler warning for type conversion
Problem:    Compiler warning for type conversion.
Solution:   Add a type cast. (Mike Williams)
2019-01-28 20:04:24 +01:00
26d982185e patch 8.1.0837: timer interrupting cursorhold and mapping not tested
Problem:    Timer interrupting cursorhold and mapping not tested.
Solution:   Add tests with timers. (Ozaki Kiichi, closes #3871)
2019-01-27 22:32:55 +01:00
346d2a359a patch 8.1.0836: user completion test can fail on MS-Windows
Problem:    User completion test can fail on MS-Windows.
Solution:   Allow for other names befor "Administrator".
2019-01-27 20:43:41 +01:00
3e9d4d85c4 patch 8.1.0835: GUI build fails on MS-Windows
Problem:    GUI build fails on MS-Windows.
Solution:   Adjust #ifdef.
2019-01-27 17:08:40 +01:00
e40b9d47bf patch 8.1.0834: GUI may wait too long before dealing with messages
Problem:    GUI may wait too long before dealing with messages.  Returning
            early may cause a mapping to time out.
Solution:   Use the waiting loop from Unix also for the GUI.
            (closes #3817, closes #3824)
2019-01-27 16:55:47 +01:00
d93090f41f patch 8.1.0833: memory leak when jumps output is filtered
Problem:    Memory leak when jumps output is filtered.
Solution:   Free the filtered name. (Dominique Pelle, closes #3869)
2019-01-27 15:07:39 +01:00
2e05009218 patch 8.1.0832: confirm() is not tested
Problem:    confirm() is not tested.
Solution:   Add a test. (Dominique Pelle, closes #3868)
2019-01-27 15:00:36 +01:00
0eb220c030 patch 8.1.0831: xxd test fails if man page has dos fileformat
Problem:    Xxd test fails if man page has dos fileformat.
Solution:   Make a copy with unix fileformat.
2019-01-27 14:41:43 +01:00
e3d0654544 patch 8.1.0830: test leaves directory behind on MS-Windows
Problem:    Test leaves directory behind on MS-Windows.
Solution:   Close buffer before deleting directory.
2019-01-27 14:29:24 +01:00
d39e275b57 patch 8.1.0829: when 'hidden' is set session creates extra buffers
Problem:    When 'hidden' is set session creates extra buffers.
Solution:   Move :badd commands to the end. (Jason Franklin)
2019-01-26 20:07:38 +01:00
6aba96dd57 patch 8.1.0828: still using FEAT_VIRTUALEDIT
Problem:    Still using FEAT_VIRTUALEDIT.
Solution:   Remove last use of FEAT_VIRTUALEDIT.
2019-01-26 17:43:21 +01:00
2a953fcf10 Updated runtime files. 2019-01-26 17:41:47 +01:00
8e59a1e127 patch 8.1.0827: missing dependency in Makefile
Problem:    Missing dependency in Makefile.
Solution:   Add dependency from autocmd.o on auto/osdef.h
2019-01-26 17:36:51 +01:00
29ddebef40 patch 8.1.0826: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_VIRTUALEDIT.  Adds about 10Kbyte to the code.
2019-01-26 17:28:26 +01:00
3e460fd8b7 patch 8.1.0825: code for autocommands is mixed with file I/O code
Problem:    Code for autocommands is mixed with file I/O code.
Solution:   Move autocommand code to a separate file. (Yegappan Lakshmanan,
            closes #3863)
2019-01-26 16:21:07 +01:00
1ecc5e4a99 patch 8.1.0824: SunOS/Solaris has a problem with ttys
Problem:    SunOS/Solaris has a problem with ttys.
Solution:   Add mch_isatty() with extra handling for SunOS. (Ozaki Kiichi,
            closes #3865)
2019-01-26 15:12:55 +01:00
203651b9b2 patch 8.1.0823: not sufficient testing of xxd
Problem:    Not sufficient testing of xxd.
Solution:   Add some more test coverage.
2019-01-26 14:11:19 +01:00
cb574f4154 patch 8.1.0822: peeking and flushing output slows down execution
Problem:    Peeking and flushing output slows down execution.
Solution:   Do not update the mode message when global_busy is set.  Do not
            flush when only peeking for a character. (Ken Takata)
2019-01-25 22:29:57 +01:00
970f5d39f2 patch 8.1.0821: xxd "usage" output and other arguments not tested
Problem:    Xxd "usage" output and other arguments not tested.
Solution:   Add a test to trigger the usage output in various ways.  Fix
            uncovered problem.
2019-01-25 21:52:17 +01:00
e295609be2 patch 8.1.0820: test for sending large data over channel sometimes fails
Problem:    Test for sending large data over channel sometimes fails.
Solution:   Handle that the job may have finished early.  Also fix that file
            changed test doesn't work in the GUI and reduce flakyness. (Ozaki
            Kiichi, closes #3861)
2019-01-25 21:01:17 +01:00
865767126e patch 8.1.0819: a failed assert with a long string is hard to read
Problem:    A failed assert with a long string is hard to read.
Solution:   Shorten the assert message.
2019-01-25 20:48:33 +01:00
240583869a patch 8.1.0818: MS-Windows: cannot send large data with ch_sendraw()
Problem:    MS-Windows: cannot send large data with ch_sendraw().
Solution:   Split write into several WriteFile() calls. (Yasuhiro Matsumoto,
            closes #3823)
2019-01-24 23:11:49 +01:00
99531a7604 patch 8.1.0817: ":=" command is not tested
Problem:    ":=" command is not tested.
Solution:   Add a test. (Dominique Pelle, closes #3859)
2019-01-24 22:42:37 +01:00
681b6bc86c patch 8.1.0816: test for 'runtimepath' in session fails on MS-Windows
Problem:    Test for 'runtimepath' in session fails on MS-Windows.
Solution:   Skip the test for now.
2019-01-24 22:23:58 +01:00
5e66b42aae patch 8.1.0815: dialog for file changed outside of Vim not tested
Problem:    Dialog for file changed outside of Vim not tested.
Solution:   Add a test.  Move FileChangedShell test.  Add 'L' flag to
            feedkeys().
2019-01-24 21:58:10 +01:00
ed18f2c03a patch 8.1.0814: :mksession cannot handle a very long 'runtimepath'
Problem:    :mksession cannot handle a very long 'runtimepath'. (Timothy
            Madden)
Solution:   Expand each part separately, instead of the whole option at once.
            (Christian Brabandt, closes #3466)
2019-01-24 20:30:52 +01:00
0566e891f7 patch 8.1.0813: FileChangedShell not sufficiently tested
Problem:    FileChangedShell not sufficiently tested.
Solution:   Add a more comprehensive test case.
2019-01-24 19:37:40 +01:00
9ba6117de6 patch 8.1.0812: Unicode 16 feature is not useful
Problem:    Unicode 16 feature is not useful and cannot be detected.
Solution:   Remove UNICODE16.
2019-01-24 18:20:17 +01:00
30276f2beb patch 8.1.0811: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_MBYTE, the final chapter.
2019-01-24 17:59:39 +01:00
264b74fa54 patch 8.1.0810: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_MBYTE, part 4.
2019-01-24 17:18:42 +01:00
a12a161b8c patch 8.1.0809: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_MBYTE, part 3.
2019-01-24 16:39:02 +01:00
091806d6f0 patch 8.1.0808: MS-Windows: build error with GUI
Problem:    MS-Windows: build error with GUI.
Solution:   Remove "static".
2019-01-24 16:27:46 +01:00
9e79ccbe9c patch 8.1.0807: session test fails on MS-Windows
Problem:    Session test fails on MS-Windows.
Solution:   Don't try creating file with illegal name.
2019-01-24 15:57:30 +01:00
fc3abf47fb patch 8.1.0806: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_MBYTE, part 2.
2019-01-24 15:54:21 +01:00
135059724f patch 8.1.0805: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_MBYTE, part 1.
2019-01-24 15:04:48 +01:00
4b9e91f0ba patch 8.1.0804: crash when setting v:errmsg to empty list
Problem:    Crash when setting v:errmsg to empty list. (Jaon Franklin)
Solution:   Separate getting value and assigning result.
2019-01-24 13:58:11 +01:00
ad36a3588d patch 8.1.0803: session file has problem with single quote in file name
Problem:    Session file has problem with single quote in file name. (Jon
            Crowe)
Solution:   Use a double quoted string.  Add a test.
2019-01-24 13:34:42 +01:00
a5be9b6248 patch 8.1.0802: negative index doesn't work for Blob
Problem:    Negative index doesn't work for Blob.
Solution:   Make it work, add a test. (closes #3856)
2019-01-24 12:31:44 +01:00
fb1199d934 patch 8.1.0801: MinGW: no hint that tests fail because of small terminal
Problem:    MinGW: no hint that tests fail because of small terminal.
Solution:   Add a rule for test1 that checks for "wrongtermsize".
            (msoyka-of-wharton)
2019-01-24 12:18:46 +01:00
4456ab527a patch 8.1.0800: may use a lot of memory when a function refers itself
Problem:    May use a lot of memory when a function creates a cyclic
            reference.
Solution:   After saving a funccal many times, invoke the garbage collector.
            (closes #3835)
2019-01-23 23:00:30 +01:00
cfc15237ab patch 8.1.0799: calling deleted function; test doesn't work on Mac
Problem:    Calling deleted function; test doesn't work on Mac.
Solution:   Wait for the function to be called before deleting it. Use a job
            to write to the pty, unless in the GUI. (Ozaki Kiichi,
            closes #3854)
2019-01-23 22:33:18 +01:00
dd29ea1805 patch 8.1.0798: changing a blob while iterating over it works strangely
Problem:    Changing a blob while iterating over it works strangely.
Solution:   Make a copy of the Blob before iterating.
2019-01-23 21:56:21 +01:00
bf821bccf1 patch 8.1.0797: error E898 is used twice
Problem:    Error E898 is used twice.
Solution:   Rename the Blob error to E899. (closes #3853)
2019-01-23 21:15:02 +01:00
31faed60bf patch 8.1.0796: MS-Windows 7: problem with named pipe on channel
Problem:    MS-Windows 7: problem with named pipe on channel.
Solution:   Put back the disconnect/connect calls. (Yasuhiro Matsumoto,
            closes #3833)
2019-01-22 23:01:40 +01:00
f88af6e675 patch 8.1.0795: cannot build without popup menu
Problem:    Cannot build without popup menu.
Solution:   Add #ifdef
2019-01-22 22:55:00 +01:00
82a12468bd patch 8.1.0794: white space before " -Ntabmove" causes problems
Problem:    White space before " -Ntabmove" causes problems.
Solution:   Skip whitespace. (Ozaki Kiichi, closes #3841)
2019-01-22 22:41:42 +01:00
0d17f0d1c0 patch 8.1.0793: incorrect error messages for functions that take a Blob
Problem:    Incorrect error messages for functions that now take a Blob
            argument.
Solution:   Adjust the error messages. (Dominique Pelle, closes #3846)
2019-01-22 22:20:38 +01:00
9e26f7d31f patch 8.1.0792: bad display if opening cmdline window from Insert completion
Problem:    Popup menu is displayed on top of the cmdline window if it is
            opened from Insert completion. (Bjorn Linse)
Solution:   Remove the popup menu.  Restore the cursor position.
            (closes #3838)
2019-01-22 22:08:09 +01:00
563bbeabcc patch 8.1.0791: a few compiler warnings on VMS
Problem:    A few compiler warnings on VMS.
Solution:   Remove type cast.  Adjust #ifdef. (Zoltan Arpadffy)
2019-01-22 21:45:40 +01:00
57a6bf0567 patch 8.1.0790: code for creating tabpages in session is too complex
Problem:    Code for creating tabpages in session is too complex.
Solution:   Simplify the code. (Jason Franklin)
2019-01-22 21:27:13 +01:00
555de4e3b2 patch 8.1.0789: sourcing a session sets v:errmsg
Problem:    Sourcing a session sets v:errmsg.
Solution:   Use "%argdel" instead of "argdel *". (Jason Franklin)
2019-01-21 23:03:49 +01:00
b2148f5864 patch 8.1.0788: cannot build with tiny features
Problem:    Cannot build with tiny features.
Solution:   Adjust #ifdefs.
2019-01-20 23:43:57 +01:00
edce7420d0 patch 8.1.0787: compiler warning for unused function
Problem:    Compiler warning for unused function. (Tony Mechelynck)
Solution:   Tune #ifdef around setjmp functions.
2019-01-20 18:39:30 +01:00
10772307c4 patch 8.1.0786: ml_get error when updating the status line
Problem:    ml_get error when updating the status line and a terminal had its
            scrollback cleared.  (Chris Patuzzo)
Solution:   Check the cursor position when drawing the status line.
            (closes #3830)
2019-01-20 18:25:54 +01:00
113e10721f patch 8.1.0785: depending on the configuration some functions are unused
Problem:    Depending on the configuration some functions are unused.
Solution:   Add more #ifdefs, remove unused functions. (Dominique Pelle,
            closes #3822)
2019-01-20 15:30:40 +01:00
1f20daa1d7 patch 8.1.0784: messy indent in if statement
Problem:    Messy indent in if statement.
Solution:   Improve structure of if statement. (Ozaki Kiichi, closes #3826)
2019-01-19 21:12:24 +01:00
63c0ccd2b6 patch 8.1.0783: compiler warning for signed/unsigned
Problem:    Compiler warning for signed/unsigned.
Solution:   Add type cast.  Change type of buffer. (Ozaki Kiichi, closes #3827)
2019-01-19 21:06:58 +01:00
2d951a486e patch 8.1.0782: Win32: cursor blinks when Vim is not active
Problem:    Win32: cursor blinks when Vim is not active.
Solution:   Remove call to setActiveWindow(). (Yasuhiro Matsumoto,
            closes #3778)
2019-01-19 19:54:20 +01:00
a502caab8b patch 8.1.0781: build error when using if_xcmdsrv.c
Problem:    Build error when using if_xcmdsrv.c.
Solution:   Add missing part of 8.1.0779.
2019-01-19 18:23:41 +01:00
e25bbc3b2b patch 8.1.0780: terminal test fails on Mac
Problem:    Terminal test fails on Mac.
Solution:   Skip the test on Mac.
2019-01-19 18:20:45 +01:00
32526b3c18 patch 8.1.0779: argument for message functions is inconsistent
Problem:    Argument for message functions is inconsistent.
Solution:   Make first argument to msg() "char *".
2019-01-19 17:43:09 +01:00
d383c92ec1 patch 8.1.0778: terminal test fails on MS-Windows
Problem:    Terminal test fails on MS-Windows.
Solution:   Temporarily skip the test on MS-Windows.  Do run it both in
            terminal and GUI on other systems.
2019-01-19 15:27:08 +01:00
b091f30bf3 patch 8.1.0777: Win32: using pipes for channel does not work well
Problem:    Win32: using pipes for channel does not work well.
Solution:   Use a larger buffer and handle overlaps. (Yasuhiro Matsumoto,
            closes #3782)
2019-01-19 14:37:00 +01:00
b2e54b0092 patch 8.1.0776: Travis does not build a version without GUI on Linux
Problem:    Travis does not build a version without GUI on Linux.
Solution:   Add an environment for tiny features without GUI.
2019-01-19 13:46:50 +01:00
2bf60b3001 patch 8.1.0775: matching too many files as zsh
Problem:    Matching too many files as zsh. (Danek Duvall)
Solution:   Be more specific with zsh filetype patterns.
2019-01-18 23:14:43 +01:00
05a2907cde patch 8.1.0774: VMS build is missing the blob file
Problem:    VMS build is missing the blob file.
Solution:   Add the blob file to the build rules. (Zoltan Arpadffy)
2019-01-18 22:59:53 +01:00
987411db9e patch 8.1.0773: not all crypt code is tested
Problem:    Not all crypt code is tested.
Solution:   Disable unused crypt code.  Add more test coverage.
2019-01-18 22:48:34 +01:00
0314236aab patch 8.1.0772: the sign_define_by_name() function is too long
Problem:    The sign_define_by_name() function is too long.
Solution:   Split it into smaller functions. (Yegappan Lakshmanan,
            closes #3819)
2019-01-18 22:01:42 +01:00
147e7d0cab patch 8.1.0771: some shell filetype patterns end in a star
Problem:    Some shell filetype patterns end in a star.
Solution:   Make sure that patterns not ending in a star are preferred.
2019-01-18 21:46:47 +01:00
1ac56c2d11 patch 8.1.0770: inconsistent use of ELAPSED_FUNC
Problem:    Inconsistent use of ELAPSED_FUNC.
Solution:   Consistently use ELAPSED_FUNC.  Also turn ELAPSED_TYPE into a
            typedef. (Ozaki Kiichi, closes #3815)
2019-01-17 22:28:22 +01:00
3020ccb113 patch 8.1.0769: :stop is covered in two tests
Problem:    :stop is covered in two tests.
Solution:   Remove Test_stop_in_terminal().  Make other test exit Vim cleanly.
            (Ozaki Kiichi, closes #3814)
2019-01-17 22:13:54 +01:00
ae654385df patch 8.1.0768: updating completions may cause the popup menu to flicker
Problem:    Updating completions may cause the popup menu to flicker.
Solution:   Avoid updating the text below the popup menu before drawing the
            popup menu.
2019-01-17 21:09:05 +01:00
c771bf9016 patch 8.1.0767: when deleting lines at the bottom signs are misplaced
Problem:    When deleting lines at the bottom signs are misplaced.
Solution:   Properly update the line number of signs at the end of a buffer
            after a delete/undo operation. (Yegappan Lakshmanan, closes #3798)
2019-01-17 17:36:45 +01:00
88c86eb751 patch 8.1.0766: various problems when using Vim on VMS
Problem:    Various problems when using Vim on VMS.
Solution:   Various fixes. Define long_long_T. (Zoltan Arpadffy)
2019-01-17 17:13:30 +01:00
4131fd5509 patch 8.1.0765: string format of a Blob can't be parsed back
Problem:    String format of a Blob can't be parsed back.
Solution:   Use 0z format.
2019-01-17 16:32:53 +01:00
6e0b6a0bec patch 8.1.0764: list of distributed files is outdated
Problem:    List of distributed files is outdated.
Solution:   Remove workshop files.  Add blob files.
2019-01-17 16:11:06 +01:00
d09091d495 Update runtime files. 2019-01-17 16:07:22 +01:00
bb1969b6ab patch 8.1.0763: nobody is using the Sun Workshop support
Problem:    Nobody is using the Sun Workshop support.
Solution:   Remove the Workshop support.
2019-01-17 15:45:25 +01:00
e40742526e patch 8.1.0762: compiler warning
Problem:    Compiler warning.
Solution:   Add type cast. (Mike Williams)
2019-01-17 14:31:14 +01:00
e299bbdf6e patch 8.1.0761: default value for brief_wait is wrong
Problem:    Default value for brief_wait is wrong.
Solution:   Make the default FALSE. (Ozaki Kiichi, closes #3812, closes #3799)
2019-01-17 14:12:02 +01:00
617d7ef046 patch 8.1.0760: no proper test for using 'termencoding'
Problem:    No proper test for using 'termencoding'.
Solution:   Add a screendump test.  Fix using double width characters in a
            screendump.
2019-01-17 13:04:30 +01:00
415 changed files with 30148 additions and 32272 deletions

View File

@ -10,54 +10,58 @@ compiler:
- gcc
env:
- BUILD=yes TEST=test COVERAGE=no FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
# ASAN build
- BUILD=yes TEST=test SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer"
- &tiny-nogui
BUILD=yes TEST=test COVERAGE=no FEATURES=tiny "CONFOPT='--disable-gui'" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
- &tiny
BUILD=yes TEST=test COVERAGE=no FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
- &asan # ASAN build
BUILD=yes TEST=test SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer"
FEATURES=huge SRCDIR=./src CHECK_AUTOCONF=no ASAN_OPTIONS="print_stacktrace=1 log_path=asan" LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/src/testdir/lsan-suppress.txt"
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
- BUILD=yes TEST="scripttests test_libvterm" COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
- &linux-huge
BUILD=yes TEST="scripttests test_libvterm" COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
- BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
- BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no
- BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
# Mac OSX build
- BUILD=yes TEST=test COVERAGE=no FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
- &unittests
BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
- &normal
BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no
- &small
BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
- &osx-huge # Mac OSX build
BUILD=yes TEST=test COVERAGE=no FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
sudo: false
# instead of a 2*2*7 matrix (2*os + 2*compiler + 7*env),
# instead of a 2*2*8 matrix (2*os + 2*compiler + 8*env),
# exclude some builds on mac os x and linux
# on mac os x "tiny" is always without GUI
# linux: 2*compiler + 5*env + mac: 2*compiler + 2*env
matrix:
exclude:
- os: osx
env: BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no
env: *tiny
- os: osx
env: BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
env: *normal
- os: osx
env: BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
env: *unittests
- os: osx
env: BUILD=yes TEST="scripttests test_libvterm" COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
env: *small
- os: osx
env: BUILD=yes TEST=test SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer"
FEATURES=huge SRCDIR=./src CHECK_AUTOCONF=no ASAN_OPTIONS="print_stacktrace=1 log_path=asan" LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/src/testdir/lsan-suppress.txt"
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
env: *linux-huge
- os: osx
env: *asan
- os: linux
compiler: clang
env: BUILD=yes TEST=test SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer"
FEATURES=huge SRCDIR=./src CHECK_AUTOCONF=no ASAN_OPTIONS="print_stacktrace=1 log_path=asan" LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/src/testdir/lsan-suppress.txt"
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
env: *asan
- os: linux
compiler: clang
env: BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
env: *unittests
- os: linux
compiler: clang
env: BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
env: *small
- os: linux
env: BUILD=yes TEST=test COVERAGE=no FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
env: *osx-huge
branches:
except:
@ -78,38 +82,90 @@ addons:
- tcl-dev
- cscope
- libgtk2.0-dev
homebrew:
packages:
- lua
update: true
before_install:
- rvm reset
# Remove /opt/python/3.x.x/bin from $PATH for using system python3.
# ("pyenv global system" doesn't seem to work.)
- if [ "$TRAVIS_OS_NAME" = "linux" ] && which python3 | grep '/opt/python/' > /dev/null; then export PATH=$(echo $PATH | sed -e "s#$(echo $(which python3) | sed -e 's#/python3$##'):##"); fi
- if [ "$COVERAGE" = "yes" ]; then pip install --user cpp-coveralls; fi
# needed for https support for coveralls
# building cffi only works with gcc, not with clang
- if [ "$COVERAGE" = "yes" ]; then CC=gcc pip install --user pyopenssl ndg-httpsclient pyasn1; fi
# Lua is not installed on Travis OSX
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export HOMEBREW_NO_AUTO_UPDATE=1; brew update; brew install lua; export LUA_PREFIX=/usr/local; fi
# Use llvm-cov instead of gcov when compiler is clang.
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CC" = "clang" ]; then ln -sf $(which llvm-cov) /home/travis/bin/gcov; fi
# Remove /opt/python/3.x.x/bin from $PATH for using system python3.
# ("pyenv global system" doesn't seem to work.)
- |
if [[ "${TRAVIS_OS_NAME}" = "linux" ]] && [[ "$(which python3)" =~ ^/opt/python/ ]]; then
export PATH=$(py3=$(which python3); echo ${PATH//${py3%/python3}:/})
fi
- |
if [[ "${COVERAGE}" = "yes" ]]; then
pip install --user cpp-coveralls
fi
# needed for https support for coveralls
# building cffi only works with gcc, not with clang
- |
if [[ "${COVERAGE}" = "yes" ]]; then
CC=gcc pip install --user pyopenssl ndg-httpsclient pyasn1
fi
# Lua is not installed on Travis OSX
- |
if [[ "${TRAVIS_OS_NAME}" = "osx" ]]; then
export LUA_PREFIX=/usr/local
fi
# Use llvm-cov instead of gcov when compiler is clang.
- |
if [[ "${TRAVIS_OS_NAME}" = "linux" ]] && [[ "${CC}" = "clang" ]]; then
ln -sf "$(which llvm-cov)" /home/travis/bin/gcov
fi
# Start virtual framebuffer to be able to test the GUI. Does not work on OS X.
before_script:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then export DISPLAY=:99.0 && sh -e /etc/init.d/xvfb start && sleep 3; fi
# Start virtual framebuffer to be able to test the GUI. Does not work on OS X.
- |
if [[ "${TRAVIS_OS_NAME}" = "linux" ]]; then
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start && sleep 3
fi
script:
- NPROC=$(getconf _NPROCESSORS_ONLN)
- if [ "$CHECK_AUTOCONF" = "yes" -a "$CC" = "gcc" ]; then make -C src autoconf; fi
- if [ "x$SHADOWOPT" != x ]; then make -C src shadow; fi
- (cd ${SRCDIR} && ./configure --with-features=$FEATURES $CONFOPT --enable-fail-if-missing && if [ "$BUILD" = "yes" ]; then make -j$NPROC; fi)
# Show Vim version and also if_xx versions.
- if [ "$BUILD" = "yes" ]; then ${SRCDIR}/vim --version; ${SRCDIR}/vim --not-a-term -u NONE -S ${SRCDIR}/testdir/if_ver-1.vim -c quit > /dev/null; ${SRCDIR}/vim --not-a-term -u NONE -S ${SRCDIR}/testdir/if_ver-2.vim -c quit > /dev/null; cat if_ver.txt; fi
- make $SHADOWOPT $TEST
- if [ -n "$ASAN_OPTIONS" ]; then for log in $(find -type f -name 'asan.*' -size +0); do asan_symbolize < "$log"; err=1; done; fi
- if [ -n "$err" ]; then exit 1; fi
- |
if [[ "${CHECK_AUTOCONF}" = "yes" ]] && [[ "${CC}" = "gcc" ]]; then
make -C src autoconf
fi
- |
if [[ -n "${SHADOWOPT}" ]]; then
make -C src shadow
fi
- |
(
cd "${SRCDIR}" \
&& ./configure --with-features=${FEATURES} ${CONFOPT} --enable-fail-if-missing
) && if [[ "${BUILD}" = "yes" ]]; then
make ${SHADOWOPT} -j${NPROC}
fi
# Show Vim version and also if_xx versions.
- |
if [[ "${BUILD}" = "yes" ]]; then
"${SRCDIR}"/vim --version
"${SRCDIR}"/vim --not-a-term -u NONE -S "${SRCDIR}"/testdir/if_ver-1.vim -c quit > /dev/null
"${SRCDIR}"/vim --not-a-term -u NONE -S "${SRCDIR}"/testdir/if_ver-2.vim -c quit > /dev/null
cat if_ver.txt
fi
- make ${SHADOWOPT} ${TEST}
- |
if [[ -n "${ASAN_OPTIONS}" ]]; then
while read log; do
asan_symbolize < "${log}"
done < <(find . -type f -name 'asan.*' -size +0)
[[ -z "${log}" ]] # exit 1 if there are ASAN logs
fi
after_success:
- if [ "$COVERAGE" = "yes" ]; then ~/.local/bin/coveralls -b ${SRCDIR} -x .xs -e ${SRCDIR}/if_perl.c -e ${SRCDIR}/xxd -e ${SRCDIR}/libvterm --encodings utf-8 latin-1 EUC-KR; fi
- if [ "$COVERAGE" = "yes" ]; then cd ${SRCDIR} && bash <(curl -s https://codecov.io/bash) ; fi
- |
if [[ "${COVERAGE}" = "yes" ]]; then
~/.local/bin/coveralls -b "${SRCDIR}" -x .xs -e "${SRCDIR}"/if_perl.c -e "${SRCDIR}"/xxd -e "${SRCDIR}"/libvterm --encodings utf-8 latin-1 EUC-KR
fi
- |
if [[ "${COVERAGE}" = "yes" ]]; then
(cd "${SRCDIR}" && bash <(curl -s https://codecov.io/bash))
fi
# vim:set sts=2 sw=2 tw=0 et:

View File

@ -7,15 +7,17 @@ SRC_ALL = \
.lgtm.yml \
.travis.yml \
appveyor.yml \
ci/appveyor.bat \
src/Make_all.mak \
src/appveyor.bat \
src/README.txt \
src/alloc.h \
src/arabic.c \
src/arabic.h \
src/ascii.h \
src/autocmd.c \
src/beval.c \
src/beval.h \
src/blob.c \
src/blowfish.c \
src/buffer.c \
src/channel.c \
@ -35,10 +37,9 @@ SRC_ALL = \
src/ex_docmd.c \
src/ex_eval.c \
src/ex_getln.c \
src/farsi.c \
src/farsi.h \
src/feature.h \
src/fileio.c \
src/findfile.c \
src/fold.c \
src/getchar.c \
src/globals.h \
@ -47,6 +48,7 @@ SRC_ALL = \
src/gui_beval.c \
src/hardcopy.c \
src/hashtab.c \
src/indent.c \
src/json.c \
src/json_test.c \
src/kword_test.c \
@ -145,7 +147,9 @@ SRC_ALL = \
src/proto.h \
src/protodef.h \
src/proto/arabic.pro \
src/proto/autocmd.pro \
src/proto/beval.pro \
src/proto/blob.pro \
src/proto/blowfish.pro \
src/proto/buffer.pro \
src/proto/channel.pro \
@ -163,14 +167,15 @@ SRC_ALL = \
src/proto/ex_docmd.pro \
src/proto/ex_eval.pro \
src/proto/ex_getln.pro \
src/proto/farsi.pro \
src/proto/fileio.pro \
src/proto/findfile.pro \
src/proto/fold.pro \
src/proto/getchar.pro \
src/proto/gui.pro \
src/proto/gui_beval.pro \
src/proto/hardcopy.pro \
src/proto/hashtab.pro \
src/proto/indent.pro \
src/proto/json.pro \
src/proto/list.pro \
src/proto/main.pro \
@ -334,8 +339,6 @@ SRC_UNIX = \
src/gui_x11_pm.h \
src/hangulin.c \
src/if_xcmdsrv.c \
src/integration.c \
src/integration.h \
src/link.sh \
src/installman.sh \
src/installml.sh \
@ -358,7 +361,6 @@ SRC_UNIX = \
src/proto/if_xcmdsrv.pro \
src/proto/os_unix.pro \
src/proto/pty.pro \
src/proto/workshop.pro \
src/pty.c \
src/testdir/Makefile \
src/testdir/unix.vim \
@ -368,10 +370,6 @@ SRC_UNIX = \
src/vimtutor \
src/gvimtutor \
src/which.sh \
src/workshop.c \
src/workshop.h \
src/wsdebug.c \
src/wsdebug.h \
src/tee/Makefile \
src/xxd/Makefile \
@ -665,6 +663,7 @@ RT_ALL = \
runtime/pack/dist/opt/matchit/plugin/matchit.vim \
runtime/pack/dist/opt/matchit/doc/matchit.txt \
runtime/pack/dist/opt/matchit/doc/tags \
runtime/pack/dist/opt/matchit/autoload/*.vim \
runtime/pack/dist/opt/shellmenu/plugin/shellmenu.vim \
runtime/pack/dist/opt/swapmouse/plugin/swapmouse.vim \
runtime/pack/dist/opt/termdebug/plugin/termdebug.vim \
@ -835,8 +834,6 @@ EXTRA = \
$(SRC_EXTRA) \
README_extra.txt \
src/VisVim/VisVim.dll \
farsi/README.txt \
farsi/fonts/*/far-* \
runtime/vimlogo.xpm \
src/tee/Makefile \
src/tee/Make_mvc.mak \

View File

@ -1,12 +1,12 @@
![Vim Logo](https://github.com/vim/vim/blob/master/runtime/vimlogo.gif)
[![Build Status](https://travis-ci.org/vim/vim.svg?branch=master)](https://travis-ci.org/vim/vim)
[![Coverage Status](https://codecov.io/gh/vim/vim/coverage.svg?branch=master)](https://codecov.io/gh/vim/vim?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/vim/vim/badge.svg?branch=master)](https://coveralls.io/github/vim/vim?branch=master)
[![Appveyor Build status](https://ci.appveyor.com/api/projects/status/o2qht2kjm02sgghk?svg=true)](https://ci.appveyor.com/project/chrisbra/vim)
[![Coverage Status](https://codecov.io/gh/vim/vim/coverage.svg?branch=master)](https://codecov.io/gh/vim/vim?branch=master)
[![Coverity Scan](https://scan.coverity.com/projects/241/badge.svg)](https://scan.coverity.com/projects/vim)
[![Language Grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/vim/vim.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/vim/vim/context:cpp)
[![Debian CI](https://badges.debian.net/badges/debian/testing/vim/version.svg)](https://buildd.debian.org/vim)
[![Packages](https://repology.org/badge/tiny-repos/vim.svg)](https://repology.org/metapackage/vim)
## What is Vim? ##

View File

@ -19,7 +19,7 @@ before_build:
- 'set INCLUDE=%INCLUDE%C:\Program Files (x86)\Windows Kits\8.1\Include\um'
build_script:
- src/appveyor.bat
- ci/appveyor.bat
test_script:
- cd src/testdir

View File

@ -7,7 +7,7 @@ cd %APPVEYOR_BUILD_FOLDER%
cd src
echo "Building MinGW 32bit console version"
set PATH=c:\msys64\mingw32\bin;%PATH%
mingw32-make.exe -f Make_ming.mak GUI=no OPTIMIZE=speed IME=yes MBYTE=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
mingw32-make.exe -f Make_ming.mak GUI=no OPTIMIZE=speed IME=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
:: Save vim.exe before Make clean, moved back below.
copy vim.exe testdir
mingw32-make.exe -f Make_ming.mak clean
@ -16,24 +16,24 @@ mingw32-make.exe -f Make_ming.mak clean
:: with specified features without python.
echo "Building MinGW 32bit GUI version"
if "%FEATURE%" == "HUGE" (
mingw32-make.exe -f Make_ming.mak OPTIMIZE=speed CHANNEL=yes GUI=yes IME=yes MBYTE=yes ICONV=yes DEBUG=no PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27 PYTHON3_VER=35 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python35 FEATURES=%FEATURE% || exit 1
mingw32-make.exe -f Make_ming.mak OPTIMIZE=speed CHANNEL=yes GUI=yes IME=yes ICONV=yes DEBUG=no PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27 PYTHON3_VER=35 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python35 FEATURES=%FEATURE% || exit 1
) ELSE (
mingw32-make.exe -f Make_ming.mak OPTIMIZE=speed GUI=yes IME=yes MBYTE=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
mingw32-make.exe -f Make_ming.mak OPTIMIZE=speed GUI=yes IME=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
)
.\gvim -u NONE -c "redir @a | ver |0put a | wq" ver_ming.txt
echo "Building MSVC 64bit console Version"
sed -e "s/\$(LINKARGS2)/\$(LINKARGS2) | sed -e 's#.*\\\\r.*##'/" Make_mvc.mak > Make_mvc2.mak
nmake -f Make_mvc2.mak CPU=AMD64 OLE=no GUI=no IME=yes MBYTE=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
nmake -f Make_mvc2.mak CPU=AMD64 OLE=no GUI=no IME=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
nmake -f Make_mvc2.mak clean
:: build MSVC huge version with python and channel support
:: GUI needs to be last, so that testing works
echo "Building MSVC 64bit GUI Version"
if "%FEATURE%" == "HUGE" (
nmake -f Make_mvc2.mak DIRECTX=yes CPU=AMD64 CHANNEL=yes OLE=no GUI=yes IME=yes MBYTE=yes ICONV=yes DEBUG=no PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 PYTHON3_VER=35 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python35-x64 FEATURES=%FEATURE% || exit 1
nmake -f Make_mvc2.mak DIRECTX=yes CPU=AMD64 CHANNEL=yes OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 PYTHON3_VER=35 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python35-x64 FEATURES=%FEATURE% || exit 1
) ELSE (
nmake -f Make_mvc2.mak CPU=AMD64 OLE=no GUI=yes IME=yes MBYTE=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
nmake -f Make_mvc2.mak CPU=AMD64 OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
)
.\gvim -u NONE -c "redir @a | ver |0put a | wq" ver_msvc.txt

View File

@ -1,2 +0,0 @@
For information about installation of Farsi fonts and Vim usage in Farsi mode,
refer to the Farsi help file by typing ":help farsi" in Vim.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -379,6 +379,8 @@ Section "$(str_section_exe)" id_section_exe
File ${VIMRT}\pack\dist\opt\matchit\doc\*.*
SetOutPath $0\pack\dist\opt\matchit\plugin
File ${VIMRT}\pack\dist\opt\matchit\plugin\*.*
SetOutPath $0\pack\dist\opt\matchit\autoload
File ${VIMRT}\pack\dist\opt\matchit\autoload\*.*
SetOutPath $0\pack\dist\opt\shellmenu\plugin
File ${VIMRT}\pack\dist\opt\shellmenu\plugin\*.*

View File

@ -10,7 +10,7 @@
# Overwrite the default translation.
# These string should be always English. Otherwise dosinst.c fails.
# These strings should be always English. Otherwise dosinst.c fails.
LangString ^SetupCaption ${LANG_DANISH} "$(^Name) Setup"
LangString ^UninstallCaption ${LANG_DANISH} "$(^Name) Uninstall"
@ -74,7 +74,7 @@ LangString str_group_plugin ${LANG_DANISH} "Opret plugin-mapper"
LangString str_desc_plugin ${LANG_DANISH} "Opret plugin-mapper. Plugin-mapper giver mulighed for at udvide Vim ved at slippe en fil i en mappen."
LangString str_section_plugin_home ${LANG_DANISH} "Private"
LangString str_desc_plugin_home ${LANG_DANISH} "Opret plugin-mapper i HOME-mappen."
LangString str_desc_plugin_home ${LANG_DANISH} "Opret plugin-mapper i HOME (hvis du har defineret et) eller Vim-installationsmappe."
LangString str_section_plugin_vim ${LANG_DANISH} "Delte"
LangString str_desc_plugin_vim ${LANG_DANISH} "Opret plugin-mapper i Vim-installationsmappe, det bruges af alle på systemet."
@ -92,9 +92,9 @@ LangString str_unsection_exe ${LANG_DANISH} "Fjern Vim-eksekverbare-/
LangString str_desc_rm_exe ${LANG_DANISH} "Fjern alle Vim-eksekverbare- og afviklingsfiler."
LangString str_ungroup_plugin ${LANG_DANISH} "Fjern plugin-mapper"
LangString str_desc_rm_plugin ${LANG_DANISH} "Fjern plugin-mapperne hvis de er tomme."
LangString str_desc_rm_plugin ${LANG_DANISH} "Fjern plugin-mapperne, hvis de er tomme."
LangString str_unsection_plugin_home ${LANG_DANISH} "Privat"
LangString str_unsection_plugin_home ${LANG_DANISH} "Private"
LangString str_desc_rm_plugin_home ${LANG_DANISH} "Fjern plugin-mapperne fra HOME-mappen."
LangString str_unsection_plugin_vim ${LANG_DANISH} "Delte"
@ -164,9 +164,9 @@ LangString str_msg_compat_defaults ${LANG_DANISH} "Vim med nogle forbedringe
LangString str_msg_compat_all ${LANG_DANISH} "Vim med alle forbedringer (indlæs vimrc_example.vim) (standard)"
LangString str_msg_keymap_title ${LANG_DANISH} " Tilknytninger "
LangString str_msg_keymap_desc ${LANG_DANISH} "&Gentilknyt nogle få taster (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F osv.)"
LangString str_msg_keymap_desc ${LANG_DANISH} "&Gentilknyt nogle få taster for Windows (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F osv.)"
LangString str_msg_keymap_default ${LANG_DANISH} "Gentilknyt ikke taster (standard)"
LangString str_msg_keymap_windows ${LANG_DANISH} "Gentilknyt nogle få taster til Windows"
LangString str_msg_keymap_windows ${LANG_DANISH} "Gentilknyt nogle få taster"
LangString str_msg_mouse_title ${LANG_DANISH} " Mus "
LangString str_msg_mouse_desc ${LANG_DANISH} "&Opførsel af højre og venstre knapper"

View File

@ -11,7 +11,7 @@
# Overwrite the default translation.
# These string should be always English. Otherwise dosinst.c fails.
# These strings should be always English. Otherwise dosinst.c fails.
LangString ^SetupCaption ${LANG_DUTCH} \
"$(^Name) Setup"
LangString ^UninstallCaption ${LANG_DUTCH} \

View File

@ -10,7 +10,7 @@
# Overwrite the default translation.
# These string should be always English. Otherwise dosinst.c fails.
# These strings should be always English. Otherwise dosinst.c fails.
LangString ^SetupCaption ${LANG_ENGLISH} \
"$(^Name) Setup"
LangString ^UninstallCaption ${LANG_ENGLISH} \

View File

@ -10,7 +10,7 @@
# Overwrite the default translation.
# These string should be always English. Otherwise dosinst.c fails.
# These strings should be always English. Otherwise dosinst.c fails.
LangString ^SetupCaption ${LANG_GERMAN} \
"$(^Name) Setup"
LangString ^UninstallCaption ${LANG_GERMAN} \

View File

@ -4,14 +4,14 @@
#
# Locale ID : 1040
# Locale Name : it
# fileencoding : latin1
# fileencoding : UTF-8
# Author : Antonio Colombo
!insertmacro MUI_LANGUAGE "Italian"
# Overwrite the default translation.
# These string should be always English. Otherwise dosinst.c fails.
# These strings should be always English. Otherwise dosinst.c fails.
LangString ^SetupCaption ${LANG_ITALIAN} \
"$(^Name) Setup"
LangString ^UninstallCaption ${LANG_ITALIAN} \
@ -48,7 +48,7 @@ LangString str_desc_old_ver ${LANG_ITALIAN} \
"Disinstalla versione/i esistente/i di Vim dal vostro sistema."
LangString str_section_exe ${LANG_ITALIAN} \
"Vim GUI (gvim.exe per Windows)"
"Vim GUI e file di supporto"
LangString str_desc_exe ${LANG_ITALIAN} \
"Vim GUI programmi e file di supporto. Questa componente è indispensabile."
@ -61,7 +61,7 @@ LangString str_section_batch ${LANG_ITALIAN} \
"Crea file di invocazione (MS-DOS) .bat"
LangString str_desc_batch ${LANG_ITALIAN} \
"Crea file di invocazione .bat per varianti di Vim nella directory \
di Windows, da utilizzare da linea di comando (MS-DOS)."
di Windows, per utilizzo da linea di comando (MS-DOS)."
LangString str_group_icons ${LANG_ITALIAN} \
"Crea icone per Vim"
@ -71,13 +71,12 @@ LangString str_desc_icons ${LANG_ITALIAN} \
LangString str_section_desktop ${LANG_ITALIAN} \
"Sul Desktop"
LangString str_desc_desktop ${LANG_ITALIAN} \
"Crea icone per programma gvim sul desktop."
"Crea icone per programma gVim sul desktop."
LangString str_section_start_menu ${LANG_ITALIAN} \
"Nella cartella del menù START"
LangString str_desc_start_menu ${LANG_ITALIAN} \
"Aggiungi Vim alle cartelle del menù START. \
Disponibile solo da Windows 95 in avanti."
"Aggiungi Vim alle cartelle del menù START."
#LangString str_section_quick_launch ${LANG_ITALIAN} \
# "Nella barra di Avvio Veloce"
@ -102,26 +101,26 @@ LangString str_desc_edit_with ${LANG_ITALIAN} \
# per applicazioni a 64-bit."
LangString str_section_vim_rc ${LANG_ITALIAN} \
"Crea Configurazione di default"
"Crea configurazione di default"
LangString str_desc_vim_rc ${LANG_ITALIAN} \
"Crea file configurazione di default (_vimrc) se non ne \
esiste già uno."
"Crea un file configurazione di default (_vimrc) se non \
ne esiste già uno."
LangString str_group_plugin ${LANG_ITALIAN} \
"Crea Directory per Plugin"
"Crea directory per plugin"
LangString str_desc_plugin ${LANG_ITALIAN} \
"Crea Directory per Plugin. Servono per aggiungere funzionalità \
a Vim aggiungendo file a una di queste directory."
"Crea directory per plugin. Consentono di aggiungere funzionalità \
a Vim mettendo file in una di queste directory."
LangString str_section_plugin_home ${LANG_ITALIAN} \
"Privato"
"Private"
LangString str_desc_plugin_home ${LANG_ITALIAN} \
"Create plugin directories in HOME directory."
"Crea directory per plugin nella directory HOME."
LangString str_section_plugin_vim ${LANG_ITALIAN} \
"Condiviso"
"Condivise"
LangString str_desc_plugin_vim ${LANG_ITALIAN} \
"Crea Directory Plugin nella directory di installazione di Vim \
"Crea directory per plugin nella directory di installazione di Vim \
per uso da parte di tutti gli utenti di questo sistema."
LangString str_section_vis_vim ${LANG_ITALIAN} \
@ -140,35 +139,29 @@ LangString str_desc_unregister ${LANG_ITALIAN} \
"Togli Vim dal Registry di configurazione sistema."
LangString str_unsection_exe ${LANG_ITALIAN} \
"Cancella programmi/file_ausiliari Vim"
"Cancella programmi/file di supporto Vim"
LangString str_desc_rm_exe ${LANG_ITALIAN} \
"Cancella tutti i programmi/file_ausiliari di Vim."
LangString str_unsection_rc ${LANG_ITALIAN} \
"Cancella file di configurazione di Vim"
LangString str_desc_rm_rc ${LANG_ITALIAN} \
"Cancella file di configurazione di Vim $vim_install_root\_vimrc. \
Da saltare se avete personalizzato il file di configurazione."
"Cancella tutti i programmi/file di supporto di Vim."
LangString str_ungroup_plugin ${LANG_ITALIAN} \
"Remove plugin directories"
"Cancella le directory per plugin"
LangString str_desc_rm_plugin ${LANG_ITALIAN} \
"Remove the plugin directories if they are empty."
"Cancella le directory per plugin se sono vuote."
LangString str_unsection_plugin_home ${LANG_ITALIAN} \
"Privato"
"Private"
LangString str_desc_rm_plugin_home ${LANG_ITALIAN} \
"Remove the plugin directories from HOME directory."
"Cancella le directory per plugin dalla directory HOME."
LangString str_unsection_plugin_vim ${LANG_ITALIAN} \
"Condiviso"
"Condivise"
LangString str_desc_rm_plugin_vim ${LANG_ITALIAN} \
"Remove the plugin directories from Vim install directory."
"Cancella le directory per plugin dalla directory di installazione di Vim."
LangString str_unsection_rootdir ${LANG_ITALIAN} \
"Remove the Vim root directory"
"Cancella la directory di installazione di Vim"
LangString str_desc_rm_rootdir ${LANG_ITALIAN} \
"Remove the Vim root directory. It contains your Vim configuration files!"
"Cancella la directory di installazione di Vim. Contiene i vostri file di configurazione!"
##############################################################################
@ -177,8 +170,8 @@ LangString str_desc_rm_rootdir ${LANG_ITALIAN} \
#LangString str_msg_too_many_ver ${LANG_ITALIAN} \
# "Trovate $vim_old_ver_count versioni di Vim sul vostro sistema.$\r$\n\
# Questo programma di installazione può gestirne solo \
# ${VIM_MAX_OLD_VER}.$\r$\n\
# Questo programma di installazione può gestire solo \
# ${VIM_MAX_OLD_VER} versioni.$\r$\n\
# Disinstallate qualche versione precedente e ricominciate."
#LangString str_msg_invalid_root ${LANG_ITALIAN} \
@ -186,7 +179,7 @@ LangString str_desc_rm_rootdir ${LANG_ITALIAN} \
# Dovrebbe terminare con $\"vim$\"."
#LangString str_msg_bin_mismatch ${LANG_ITALIAN} \
# "Incongruenza di installazione!$\r$\n$\r$\n\
# "Conflitto nella directory di installazione!$\r$\n$\r$\n\
# Cartella di installazione dev'essere $\"$vim_bin_path$\",$\r$\n\
# ma il sistema segnala invece $\"$INSTDIR$\"."
@ -196,14 +189,14 @@ LangString str_desc_rm_rootdir ${LANG_ITALIAN} \
#LangString str_msg_register_ole ${LANG_ITALIAN} \
# "Tentativo di registrazione di Vim con OLE. \
# Non ci sono messaggi che indicano se ha funzionato o no."
# Non c messaggio che indica se è riuscito o no."
#LangString str_msg_unreg_ole ${LANG_ITALIAN} \
# "Tentativo di togliere da Registry Vim con OLE. \
# Non ci sono messaggi che indicano se ha funzionato o no."
# "Tentativo di togliere dal Registry Vim con OLE. \
# Non c messaggio che indica se è riuscito o no."
#LangString str_msg_rm_start ${LANG_ITALIAN} \
# "Disinstallazione delle seguenti versioni:"
# "Disinstallazione della seguente versione:"
#LangString str_msg_rm_fail ${LANG_ITALIAN} \
# "Disinstallazione non riuscita per la seguente versione:"
@ -215,7 +208,7 @@ LangString str_desc_rm_rootdir ${LANG_ITALIAN} \
# "Non riesco a trovare programma disinstallazione nel Registry."
#LangString str_msg_no_rm_exe ${LANG_ITALIAN} \
# "Non riesco a utilizzare programma disinstallazione."
# "Non riesco a trovare programma disinstallazione."
#LangString str_msg_rm_copy_fail ${LANG_ITALIAN} \
# "Non riesco a copiare programma disinstallazione a una \
@ -238,13 +231,13 @@ LangString str_msg_rm_exe_fail ${LANG_ITALIAN} \
# "AVVISO: Non posso cancellare $\"$vim_install_root$\", non è vuota!"
LangString str_msg_uninstalling ${LANG_ITALIAN} \
"Uninstalling the old version..."
"Sto disinstallando la vecchia versione..."
LangString str_msg_registering ${LANG_ITALIAN} \
"Registering..."
"Sto aggiungendo Vim al Registry..."
LangString str_msg_unregistering ${LANG_ITALIAN} \
"Unregistering..."
"Sto togliendo Vim dal Registry..."
##############################################################################
@ -252,39 +245,39 @@ LangString str_msg_unregistering ${LANG_ITALIAN} \
##############################################################################
LangString str_vimrc_page_title ${LANG_ITALIAN} \
"Choose _vimrc settings"
"Scelta impostazioni _vimrc"
LangString str_vimrc_page_subtitle ${LANG_ITALIAN} \
"Choose the settings for enhancement, keyboard and mouse."
"Scelta impostazioni per funzionalità ulteriori, tastiera e mouse."
LangString str_msg_compat_title ${LANG_ITALIAN} \
" Vi / Vim behavior "
" comportamento come Vi / Vim "
LangString str_msg_compat_desc ${LANG_ITALIAN} \
"&Compatibility and enhancements"
"&Compatibilità e funzionalità ulteriori"
LangString str_msg_compat_vi ${LANG_ITALIAN} \
"Vi compatible"
"Compatibile con Vi"
LangString str_msg_compat_vim ${LANG_ITALIAN} \
"Vim original"
"Vim originale"
LangString str_msg_compat_defaults ${LANG_ITALIAN} \
"Vim with some enhancements (load defaults.vim)"
"Vim con alcune funzionalità ulteriori (esecuzione defaults.vim)"
LangString str_msg_compat_all ${LANG_ITALIAN} \
"Vim with all enhancements (load vimrc_example.vim) (Default)"
"Vim con tutte le funzionalità ulteriori (esecuzione vimrc_example.vim) (Default)"
LangString str_msg_keymap_title ${LANG_ITALIAN} \
" Mappings "
" Mappature "
LangString str_msg_keymap_desc ${LANG_ITALIAN} \
"&Remap a few keys for Windows (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F, etc)"
"&Rimappatura di alcuni tasti per Windows (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F, etc.)"
LangString str_msg_keymap_default ${LANG_ITALIAN} \
"Do not remap keys (Default)"
"Non effettuare rimappature di tasti (Default)"
LangString str_msg_keymap_windows ${LANG_ITALIAN} \
"Remap a few keys"
"Rimappare solo alcuni tasti"
LangString str_msg_mouse_title ${LANG_ITALIAN} \
" Mouse "
LangString str_msg_mouse_desc ${LANG_ITALIAN} \
"&Behavior of right and left buttons"
"&Comportamento dei pulsanti destro e sinistro"
LangString str_msg_mouse_default ${LANG_ITALIAN} \
"Right: popup menu, Left: visual mode (Default)"
"Destro: popup menu, Sinistro: modalità visuale (Default)"
LangString str_msg_mouse_windows ${LANG_ITALIAN} \
"Right: popup menu, Left: select mode (Windows)"
"Destro: popup menu, Sinistro: seleziona modalità (Windows)"
LangString str_msg_mouse_unix ${LANG_ITALIAN} \
"Right: extends selection, Left: visual mode (Unix)"
"Destro: estende selezione, Sinistro: modalità visuale (Unix)"

View File

@ -10,7 +10,7 @@
# Overwrite the default translation.
# These string should be always English. Otherwise dosinst.c fails.
# These strings should be always English. Otherwise dosinst.c fails.
LangString ^SetupCaption ${LANG_JAPANESE} \
"$(^Name) Setup"
LangString ^UninstallCaption ${LANG_JAPANESE} \

View File

@ -11,7 +11,7 @@
# Overwrite the default translation.
# These string should be always English. Otherwise dosinst.c fails.
# These strings should be always English. Otherwise dosinst.c fails.
LangString ^SetupCaption ${LANG_SIMPCHINESE} \
"$(^Name) Setup"
LangString ^UninstallCaption ${LANG_SIMPCHINESE} \

View File

@ -11,7 +11,7 @@
# Overwrite the default translation.
# These string should be always English. Otherwise dosinst.c fails.
# These strings should be always English. Otherwise dosinst.c fails.
LangString ^SetupCaption ${LANG_TRADCHINESE} \
"$(^Name) Setup"
LangString ^UninstallCaption ${LANG_TRADCHINESE} \

View File

@ -1,7 +1,7 @@
" Vim functions for file type detection
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2017 Dec 05
" Last Change: 2019 Jan 18
" These functions are moved here from runtime/filetype.vim to make startup
" faster.
@ -197,7 +197,7 @@ func dist#ft#FTe()
exe 'setf ' . g:filetype_euphoria
else
let n = 1
while n < 100 && n < line("$")
while n < 100 && n <= line("$")
if getline(n) =~ "^\\s*\\(<'\\|'>\\)\\s*$"
setf specman
return
@ -211,7 +211,7 @@ endfunc
" Distinguish between HTML, XHTML and Django
func dist#ft#FThtml()
let n = 1
while n < 10 && n < line("$")
while n < 10 && n <= line("$")
if getline(n) =~ '\<DTD\s\+XHTML\s'
setf xhtml
return
@ -222,13 +222,13 @@ func dist#ft#FThtml()
endif
let n = n + 1
endwhile
setf html
setf FALLBACK html
endfunc
" Distinguish between standard IDL and MS-IDL
func dist#ft#FTidl()
let n = 1
while n < 50 && n < line("$")
while n < 50 && n <= line("$")
if getline(n) =~ '^\s*import\s\+"\(unknwn\|objidl\)\.idl"'
setf msidl
return
@ -484,6 +484,10 @@ endfunc
" Called from filetype.vim and scripts.vim.
func dist#ft#SetFileTypeSH(name)
if did_filetype()
" Filetype was already detected
return
endif
if expand("<amatch>") =~ g:ft_ignore_pat
return
endif
@ -531,6 +535,10 @@ endfunc
" as used for Tcl.
" Also called from scripts.vim, thus can't be local to this script.
func dist#ft#SetFileTypeShell(name)
if did_filetype()
" Filetype was already detected
return
endif
if expand("<amatch>") =~ g:ft_ignore_pat
return
endif
@ -551,6 +559,10 @@ func dist#ft#SetFileTypeShell(name)
endfunc
func dist#ft#CSH()
if did_filetype()
" Filetype was already detected
return
endif
if exists("g:filetype_csh")
call dist#ft#SetFileTypeShell(g:filetype_csh)
elseif &shell =~ "tcsh"
@ -687,7 +699,7 @@ endfunc
func dist#ft#FTxml()
let n = 1
while n < 100 && n < line("$")
while n < 100 && n <= line("$")
let line = getline(n)
" DocBook 4 or DocBook 5.
let is_docbook4 = line =~ '<!DOCTYPE.*DocBook'
@ -713,7 +725,7 @@ endfunc
func dist#ft#FTy()
let n = 1
while n < 100 && n < line("$")
while n < 100 && n <= line("$")
let line = getline(n)
if line =~ '^\s*%'
setf yacc

View File

@ -1,35 +1,25 @@
" Vim support file to help with paste mappings and menus
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2017 Aug 30
" Last Change: 2019 Jan 27
" Define the string to use for items that are present both in Edit, Popup and
" Toolbar menu. Also used in mswin.vim and macmap.vim.
" Pasting blockwise and linewise selections is not possible in Insert and
" Visual mode without the +virtualedit feature. They are pasted as if they
" were characterwise instead. Add to that some tricks to leave the cursor in
" the right position, also for "gi".
if has("virtualedit")
let paste#paste_cmd = {'n': ":call paste#Paste()<CR>"}
let paste#paste_cmd['v'] = '"-c<Esc>' . paste#paste_cmd['n']
let paste#paste_cmd['i'] = "\<c-\>\<c-o>\"+gP"
let paste#paste_cmd = {'n': ":call paste#Paste()<CR>"}
let paste#paste_cmd['v'] = '"-c<Esc>' . paste#paste_cmd['n']
let paste#paste_cmd['i'] = "\<c-\>\<c-o>\"+gP"
func! paste#Paste()
let ove = &ve
set ve=all
normal! `^
if @+ != ''
normal! "+gP
endif
let c = col(".")
normal! i
if col(".") < c " compensate for i<ESC> moving the cursor left
normal! l
endif
let &ve = ove
endfunc
else
let paste#paste_cmd = {'n': "\"=@+.'xy'<CR>gPFx\"_2x"}
let paste#paste_cmd['v'] = '"-c<Esc>gix<Esc>' . paste#paste_cmd['n'] . '"_x'
let paste#paste_cmd['i'] = 'x<Esc>' . paste#paste_cmd['n'] . '"_s'
endif
func! paste#Paste()
let ove = &ve
set ve=all
normal! `^
if @+ != ''
normal! "+gP
endif
let c = col(".")
normal! i
if col(".") < c " compensate for i<ESC> moving the cursor left
normal! l
endif
let &ve = ove
endfunc

View File

@ -1,9 +1,9 @@
" Vim completion script
" Language: Ruby
" Maintainer: Mark Guzman <segfault@hasno.info>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Maintainer Version: 0.8.1
" Language: Ruby
" Maintainer: Mark Guzman <segfault@hasno.info>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2019 Jan 06
" ----------------------------------------------------------------------------
"
" Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com)
@ -103,7 +103,7 @@ function! s:GetBufferRubyEntity( name, type, ... )
endif
let curpos = getpos(".")
let [enum,ecol] = searchpairpos( crex, '', '\(end\|}\)', 'wr' )
let [enum,ecol] = searchpairpos( crex, '', '\(end\|}\)', 'W' )
call cursor(lastpos[1], lastpos[2])
if lnum > enum
@ -253,15 +253,27 @@ class VimRubyCompletion
# {{{ buffer analysis magic
def load_requires
custom_paths = VIM::evaluate("get(g:, 'rubycomplete_load_paths', [])")
if !custom_paths.empty?
$LOAD_PATH.concat(custom_paths).uniq!
end
buf = VIM::Buffer.current
enum = buf.line_number
nums = Range.new( 1, enum )
nums.each do |x|
ln = buf[x]
begin
eval( "require %s" % $1 ) if /.*require\s*(.*)$/.match( ln )
rescue Exception
#ignore?
if /.*require_relative\s*(.*)$/.match( ln )
eval( "require %s" % File.expand_path($1) )
elsif /.*require\s*(["'].*?["'])/.match( ln )
eval( "require %s" % $1 )
end
rescue Exception => e
dprint e.inspect
end
end
end
@ -344,8 +356,13 @@ class VimRubyCompletion
if x != cur_line
next if x == 0
ln = buf[x]
if /^\s*(module|class|def|include)\s+/.match(ln)
clscnt += 1 if $1 == "class"
is_const = false
if /^\s*(module|class|def|include)\s+/.match(ln) || is_const = /^\s*?[A-Z]([A-z]|[1-9])*\s*?[|]{0,2}=\s*?.+\s*?/.match(ln)
clscnt += 1 if /class|module/.match($1)
# We must make sure to load each constant only once to avoid errors
if is_const
ln.gsub!(/\s*?[|]{0,2}=\s*?/, '||=')
end
#dprint "\$1$1
classdef += "%s\n" % ln
classdef += "end\n" if /def\s+/.match(ln)
@ -423,7 +440,6 @@ class VimRubyCompletion
return get_buffer_entity_list( "class" )
end
def load_rails
allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails")
return if allow_rails.to_i.zero?
@ -529,7 +545,6 @@ class VimRubyCompletion
ret += ActiveRecord::ConnectionAdapters::SchemaStatements.methods
end
return ret
end
@ -587,11 +602,13 @@ class VimRubyCompletion
# {{{ main completion code
def self.preload_rails
a = VimRubyCompletion.new
require 'Thread'
Thread.new(a) do |b|
begin
b.load_rails
rescue
if VIM::evaluate("has('nvim')") == 0
require 'thread'
Thread.new(a) do |b|
begin
b.load_rails
rescue
end
end
end
a.load_rails
@ -612,7 +629,6 @@ class VimRubyCompletion
want_gems = VIM::evaluate("get(g:, 'rubycomplete_load_gemfile')")
load_gems unless want_gems.to_i.zero?
input = VIM::Buffer.current.line
cpos = VIM::Window.current.cursor[1] - 1
@ -666,6 +682,7 @@ class VimRubyCompletion
message = Regexp.quote($4)
dprint "const or cls 2 [recv: \'%s\', msg: \'%s\']" % [ receiver, message ]
load_buffer_class( receiver )
load_buffer_module( receiver )
begin
classes = eval("#{receiver}.constants")
#methods = eval("#{receiver}.methods")
@ -786,7 +803,6 @@ class VimRubyCompletion
methods += Kernel.public_methods
end
include_object = VIM::evaluate("exists('g:rubycomplete_include_object') && g:rubycomplete_include_object")
methods = clean_sel( methods, message )
methods = (methods-Object.instance_methods) if include_object == "0"
@ -829,5 +845,4 @@ let s:rubycomplete_rails_loaded = 0
call s:DefRuby()
"}}} ruby-side code
" vim:tw=78:sw=4:ts=8:et:fdm=marker:ft=vim:norl:

View File

@ -2,7 +2,7 @@
:" information about the environment of a possible bug in Vim.
:"
:" Maintainer: Bram Moolenaar <Bram@vim.org>
:" Last change: 2005 Jun 12
:" Last change: 2019 Jan 27
:"
:" To use inside Vim:
:" :so $VIMRUNTIME/bugreport.vim
@ -54,9 +54,7 @@
:endif
:set all
:set termcap
:if has("autocmd")
: au
:endif
:au
:if 1
: echo "--- Normal/Visual mode mappings ---"
:endif

View File

@ -3,6 +3,7 @@
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2018 Jan 25
if exists("current_compiler")
finish
@ -28,8 +29,8 @@ CompilerSet errorformat=
\%W%f:%l:\ warning:\ %m,
\%E%f:%l:in\ %*[^:]:\ %m,
\%E%f:%l:\ %m,
\%-C%\tfrom\ %f:%l:in\ %.%#,
\%-Z%\tfrom\ %f:%l,
\%-C%\t%\\d%#:%#\ %#from\ %f:%l:in\ %.%#,
\%-Z%\t%\\d%#:%#\ %#from\ %f:%l,
\%-Z%p^,
\%-G%.%#

View File

@ -3,6 +3,7 @@
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2018 Mar 02
if exists("current_compiler")
finish
@ -20,12 +21,12 @@ CompilerSet makeprg=rake
CompilerSet errorformat=
\%D(in\ %f),
\%\\s%#from\ %f:%l:%m,
\%\\s%#from\ %f:%l:,
\%\\s%##\ %f:%l:%m,
\%\\s%##\ %f:%l,
\%\\s%#[%f:%l:\ %#%m,
\%\\s%#%f:%l:\ %#%m,
\%\\s%#%\\d%#:%#\ %#from\ %f:%l:%m,
\%\\s%#%\\d%#:%#\ %#from\ %f:%l:,
\%\\s%##\ %f:%l:%m%\\&%.%#%\\D:%\\d%\\+:%.%#,
\%\\s%##\ %f:%l%\\&%.%#%\\D:%\\d%\\+,
\%\\s%#[%f:%l:\ %#%m%\\&%.%#%\\D:%\\d%\\+:%.%#,
\%\\s%#%f:%l:\ %#%m%\\&%.%#%\\D:%\\d%\\+:%.%#,
\%\\s%#%f:%l:,
\%m\ [%f:%l]:,
\%+Erake\ aborted!,

View File

@ -3,6 +3,7 @@
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2018 Aug 07
if exists("current_compiler")
finish
@ -23,7 +24,8 @@ CompilerSet errorformat=
\%E%.%#:in\ `load':\ %f:%l:%m,
\%E%f:%l:in\ `%*[^']':\ %m,
\%-Z\ \ \ \ \ %\\+\#\ %f:%l:%.%#,
\%E\ \ %\\d%\\+)%.%#,
\%E\ \ \ \ \ Failure/Error:\ %m,
\%E\ \ \ \ \ Failure/Error:,
\%C\ \ \ \ \ %m,
\%C%\\s%#,
\%-G%.%#

View File

@ -4,7 +4,7 @@
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" ----------------------------------------------------------------------------
" Last Change: 2019 Jan 06
if exists("current_compiler")
finish
@ -21,21 +21,21 @@ set cpo-=C
" default settings runs script normally
" add '-c' switch to run syntax check only:
"
" CompilerSet makeprg=ruby\ -wc\ $*
" CompilerSet makeprg=ruby\ -c
"
" or add '-c' at :make command line:
"
" :make -c %<CR>
"
CompilerSet makeprg=ruby\ -w\ $*
CompilerSet makeprg=ruby
CompilerSet errorformat=
\%+E%f:%l:\ parse\ error,
\%W%f:%l:\ warning:\ %m,
\%E%f:%l:in\ %*[^:]:\ %m,
\%E%f:%l:\ %m,
\%-C%\tfrom\ %f:%l:in\ %.%#,
\%-Z%\tfrom\ %f:%l,
\%-C%\t%\\d%#:%#\ %#from\ %f:%l:in\ %.%#,
\%-Z%\t%\\d%#:%#\ %#from\ %f:%l,
\%-Z%p^,
\%-G%.%#

View File

@ -3,6 +3,7 @@
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2014 Mar 23
if exists("current_compiler")
finish

View File

@ -1,7 +1,7 @@
" The default vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2017 Jun 13
" Last change: 2019 Feb 18
"
" This is loaded if no vimrc file was found.
" Except when Vim is run with "-u NONE" or "-C".
@ -90,8 +90,8 @@ if &t_Co > 2 || has("gui_running")
let c_comment_strings=1
endif
" Only do this part when compiled with support for autocommands.
if has("autocmd")
" Only do this part when Vim was compiled with the +eval feature.
if 1
" Enable file type detection.
" Use the default filetype settings, so that mail gets 'tw' set to 72,
@ -116,7 +116,7 @@ if has("autocmd")
augroup END
endif " has("autocmd")
endif
" Convenient command to see the difference between the current buffer and the
" file it was loaded from, thus the changes you made.

View File

@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 8.1. Last change: 2018 Dec 28
*autocmd.txt* For Vim version 8.1. Last change: 2019 Mar 13
VIM REFERENCE MANUAL by Bram Moolenaar
@ -311,6 +311,7 @@ Name triggered by ~
|FuncUndefined| a user function is used but it isn't defined
|SpellFileMissing| a spell file is used but it can't be found
|SourcePre| before sourcing a Vim script
|SourcePost| after sourcing a Vim script
|SourceCmd| before sourcing a Vim script |Cmd-event|
|VimResized| after the Vim window size changed
@ -620,6 +621,8 @@ CursorMoved After the cursor was moved in Normal or Visual
Not triggered when there is typeahead or when
an operator is pending.
For an example see |match-parens|.
Note: This can not be skipped with
`:noautocmd`.
Careful: This is triggered very often, don't
do anything that the user does not expect or
that is slow.
@ -1017,10 +1020,14 @@ TermResponse After the response to |t_RV| is received from
anything else that takes time is involved.
*TextChanged*
TextChanged After a change was made to the text in the
current buffer in Normal mode. That is when
|b:changedtick| has changed.
current buffer in Normal mode. That is after
|b:changedtick| has changed (also when that
happened before the TextChanged autocommand
was defined).
Not triggered when there is typeahead or when
an operator is pending.
Note: This can not be skipped with
`:noautocmd`.
Careful: This is triggered very often, don't
do anything that the user does not expect or
that is slow.
@ -1462,8 +1469,8 @@ If you want the buffer to be unmodified after changing it, reset the
instead of ":q!".
*autocmd-nested* *E218*
By default, autocommands do not nest. If you use ":e" or ":w" in an
autocommand, Vim does not execute the BufRead and BufWrite autocommands for
By default, autocommands do not nest. For example, if you use ":e" or ":w" in
an autocommand, Vim does not execute the BufRead and BufWrite autocommands for
those commands. If you do want this, use the "nested" flag for those commands
in which you want nesting. For example: >
:autocmd FileChangedShell *.c nested e!
@ -1609,5 +1616,8 @@ following command. Example: >
This will write the file without triggering the autocommands defined by the
gzip plugin.
Note that some autocommands are not triggered right away, but only later.
This specifically applies to |CursorMoved| and |TextChanged|.
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -1,4 +1,4 @@
*change.txt* For Vim version 8.1. Last change: 2018 Dec 14
*change.txt* For Vim version 8.1. Last change: 2019 Feb 05
VIM REFERENCE MANUAL by Bram Moolenaar
@ -640,11 +640,11 @@ For other systems the tmpnam() library function is used.
For the {pattern} see |pattern|.
{string} can be a literal string, or something
special; see |sub-replace-special|.
*E939*
When [range] and [count] are omitted, replace in the
current line only. When [count] is given, replace in
[count] lines, starting with the last line in [range].
When [range] is omitted start in the current line.
*E939*
[count] must be a positive number. Also see
|cmdline-ranges|.

View File

@ -1,4 +1,4 @@
*develop.txt* For Vim version 8.1. Last change: 2018 May 02
*develop.txt* For Vim version 8.1. Last change: 2019 Feb 17
VIM REFERENCE MANUAL by Bram Moolenaar
@ -355,6 +355,24 @@ OK: if (cond)
cmd;
}
When a block has one line the braces can be left out. When an if/else has
braces on one block, it usually looks better when the other block also has
braces:
OK: if (cond)
cmd;
else
cmd;
OK: if (cond)
{
cmd;
}
else
{
cmd;
cmd;
}
Use ANSI (new style) function declarations with the return type on a separate
indented line.
@ -367,10 +385,10 @@ OK: /*
*/
int
function_name(
int arg1, /* short comment about arg1 */
int arg2) /* short comment about arg2 */
int arg1, // short comment about arg1
int arg2) // short comment about arg2
{
int local; /* comment about local */
int local; // comment about local
local = arg1 * arg2;

View File

@ -1,4 +1,4 @@
*diff.txt* For Vim version 8.1. Last change: 2017 Oct 03
*diff.txt* For Vim version 8.1. Last change: 2019 Feb 27
VIM REFERENCE MANUAL by Bram Moolenaar
@ -179,8 +179,8 @@ loaded. Since Vim doesn't allow having two buffers for the same file, you
need another buffer. This command is useful: >
command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_
\ | diffthis | wincmd p | diffthis
(this is in |vimrc_example.vim|). Use ":DiffOrig" to see the differences
between the current buffer and the file it was loaded from.
(this is in |defaults.vim|). Use ":DiffOrig" to see the differences between
the current buffer and the file it was loaded from.
A buffer that is unloaded cannot be used for the diff. But it does work for
hidden buffers. You can use ":hide" to close a window without unloading the

View File

@ -1,4 +1,4 @@
*digraph.txt* For Vim version 8.1. Last change: 2018 Dec 14
*digraph.txt* For Vim version 8.1. Last change: 2019 Feb 17
VIM REFERENCE MANUAL by Bram Moolenaar
@ -59,18 +59,9 @@ conversion to be available, it might fail. For the NUL character you will see
"10". That's because NUL characters are internally represented with a NL
character. When you write the file it will become a NUL character.
When Vim was compiled without the |+multi_byte| feature, you need to specify
the character in the encoding given with 'encoding'. You might want to use
something like this: >
if has("multi_byte")
digraph oe 339
elseif &encoding == "iso-8859-15"
digraph oe 189
endif
This defines the "oe" digraph for a character that is number 339 in Unicode
and 189 in latin9 (iso-8859-15).
Example: >
digraph oe 339
This defines the "oe" digraph for a character that is number 339 in Unicode.
==============================================================================
2. Using digraphs *digraphs-use*
@ -164,8 +155,7 @@ a standard meaning:
Example: a: is ä and o: is ö
These are the RFC1345 digraphs for the one-byte characters. See the output of
":digraphs" for the others. The characters above 255 are only available when
Vim was compiled with the |+multi_byte| feature.
":digraphs" for the others.
EURO

View File

@ -1,4 +1,4 @@
*eval.txt* For Vim version 8.1. Last change: 2019 Jan 15
*eval.txt* For Vim version 8.1. Last change: 2019 Mar 02
VIM REFERENCE MANUAL by Bram Moolenaar
@ -38,7 +38,7 @@ done, the features in this document are not available. See |+eval| and
1. Variables *variables*
1.1 Variable types ~
*E712*
*E712* *E896* *E897* *E899*
There are nine types of variables:
Number A 32 or 64 bit signed number. |expr-number| *Number*
@ -107,7 +107,7 @@ To force conversion from String to Number, add zero to it: >
To avoid a leading zero to cause octal conversion, or for using a different
base, use |str2nr()|.
*TRUE* *FALSE*
*TRUE* *FALSE* *Boolean*
For boolean operators Numbers are used. Zero is FALSE, non-zero is TRUE.
You can also use |v:false| and |v:true|. When TRUE is returned from a
function it is the Number one, FALSE is the number zero.
@ -131,8 +131,8 @@ A List, Dictionary or Float is not a Number or String, thus evaluate to FALSE.
*E745* *E728* *E703* *E729* *E730* *E731* *E908* *E910* *E913*
*E974* *E975* *E976*
List, Dictionary, Funcref, Job, Channel and Blob types are not automatically
converted.
|List|, |Dictionary|, |Funcref|, |Job|, |Channel| and |Blob| types are not
automatically converted.
*E805* *E806* *E808*
When mixing Number and Float the Number is converted to Float. Otherwise
@ -633,6 +633,9 @@ Blob creation ~
A Blob can be created with a |blob-literal|: >
:let b = 0zFF00ED015DAF
Dots can be inserted between bytes (pair of hex characters) for readability,
they don't change the value: >
:let b = 0zFF00.ED01.5DAF
A blob can be read from a file with |readfile()| passing the {type} argument
set to "B", for example: >
@ -659,6 +662,16 @@ is not available it returns -1 or the default value you specify: >
:echo get(myblob, idx, 999)
Blob iteration ~
The |:for| loop executes commands for each byte of a Blob. The loop variable is
set to each byte in the Blob. Example: >
:for byte in 0z112233
: call Doit(byte)
:endfor
This calls Doit() with 0x11, 0x22 and 0x33.
Blob concatenation ~
Two blobs can be concatenated with the "+" operator: >
@ -673,6 +686,7 @@ Part of a blob ~
A part of the Blob can be obtained by specifying the first and last index,
separated by a colon in square brackets: >
:let myblob = 0z00112233
:let shortblob = myblob[1:2] " get 0z1122
:let shortblob = myblob[2:-1] " get 0z2233
Omitting the first index is similar to zero. Omitting the last index is
@ -681,8 +695,8 @@ similar to -1. >
:let shortblob = myblob[2:2] " Blob with one byte: 0z22
:let otherblob = myblob[:] " make a copy of the Blob
If the first index is beyond the last byte of the Blob or the second byte is
before the first byte, the result is an empty list. There is no error
If the first index is beyond the last byte of the Blob or the second index is
before the first index, the result is an empty Blob. There is no error
message.
If the second index is equal to or greater than the length of the list the
@ -700,12 +714,12 @@ higher index is an error.
To change a sequence of bytes the [:] notation can be used: >
let blob[1:3] = 0z445566
The length of the replaced bytes much be exactly the same as the value
The length of the replaced bytes must be exactly the same as the value
provided. *E972*
To change part of a blob you can specify the first and last byte to be
modified. The value must at least have the number of bytes in the range: >
:let blob[3:5] = [3, 4, 5]
modified. The value must have the same number of bytes in the range: >
:let blob[3:5] = 0z334455
You can also use the functions |add()|, |remove()| and |insert()|.
@ -734,7 +748,7 @@ identity is different: >
:echo blob is blob3
< 0
Making a copy of a list is done with the |copy()| function. Using [:] also
Making a copy of a Blob is done with the |copy()| function. Using [:] also
works, as explained above.
@ -789,11 +803,12 @@ Expression syntax summary, from least to most significant:
etc. As above, append ? for ignoring case, # for
matching case
expr5 is expr5 same |List| instance
expr5 isnot expr5 different |List| instance
expr5 is expr5 same |List|, |Dictionary| or |Blob| instance
expr5 isnot expr5 different |List|, |Dictionary| or |Blob|
instance
|expr5| expr6
expr6 + expr6 .. number addition or list concatenation
expr6 + expr6 .. number addition, list or blob concatenation
expr6 - expr6 .. number subtraction
expr6 . expr6 .. string concatenation
@ -958,12 +973,12 @@ Dictionary and arguments, use |get()| to get the function name: >
if get(Part1, 'name') == get(Part2, 'name')
" Part1 and Part2 refer to the same function
When using "is" or "isnot" with a |List| or a |Dictionary| this checks if the
expressions are referring to the same |List| or |Dictionary| instance. A copy
of a |List| is different from the original |List|. When using "is" without
a |List| or a |Dictionary| it is equivalent to using "equal", using "isnot"
equivalent to using "not equal". Except that a different type means the
values are different: >
Using "is" or "isnot" with a |List|, |Dictionary| or |Blob| checks whether
the expressions are referring to the same |List|, |Dictionary| or |Blob|
instance. A copy of a |List| is different from the original |List|. When
using "is" without a |List|, |Dictionary| or |Blob|, it is equivalent to
using "equal", using "isnot" equivalent to using "not equal". Except that
a different type means the values are different: >
echo 4 == '4'
1
echo 4 is '4'
@ -1008,16 +1023,16 @@ can be matched like an ordinary character. Examples:
expr5 and expr6 *expr5* *expr6*
---------------
expr6 + expr6 .. Number addition or |List| concatenation *expr-+*
expr6 - expr6 .. Number subtraction *expr--*
expr6 . expr6 .. String concatenation *expr-.*
expr6 + expr6 Number addition, |List| or |Blob| concatenation *expr-+*
expr6 - expr6 Number subtraction *expr--*
expr6 . expr6 String concatenation *expr-.*
For |Lists| only "+" is possible and then both expr6 must be a list. The
result is a new list with the two lists Concatenated.
expr7 * expr7 .. Number multiplication *expr-star*
expr7 / expr7 .. Number division *expr-/*
expr7 % expr7 .. Number modulo *expr-%*
expr7 * expr7 Number multiplication *expr-star*
expr7 / expr7 Number division *expr-/*
expr7 % expr7 Number modulo *expr-%*
For all, except ".", Strings are converted to Numbers.
For bitwise operators see |and()|, |or()| and |xor()|.
@ -1143,7 +1158,7 @@ If expr8 is a |Blob| this results in a new |Blob| with the bytes in the
indexes expr1a and expr1b, inclusive. Examples: >
:let b = 0zDEADBEEF
:let bs = b[1:2] " 0zADBE
:let bs = b[] " copy ov 0zDEADBEEF
:let bs = b[:] " copy of 0zDEADBEEF
Using expr8[expr1] or expr8[expr1a : expr1b] on a |Funcref| results in an
error.
@ -1871,7 +1886,7 @@ 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* *none-variable* *None*
v:none An empty String. Used to put an empty item in JSON. See
|json_encode()|.
When used as a number this evaluates to zero.
@ -2028,27 +2043,27 @@ v:swapcommand Normal mode command to be executed after a file has been
For ":edit +cmd file" the value is ":cmd\r".
*v:t_TYPE* *v:t_bool* *t_bool-variable*
v:t_bool Value of Boolean type. Read-only. See: |type()|
v:t_bool Value of |Boolean| type. Read-only. See: |type()|
*v:t_channel* *t_channel-variable*
v:t_channel Value of Channel type. Read-only. See: |type()|
v:t_channel Value of |Channel| type. Read-only. See: |type()|
*v:t_dict* *t_dict-variable*
v:t_dict Value of Dictionary type. Read-only. See: |type()|
v:t_dict Value of |Dictionary| type. Read-only. See: |type()|
*v:t_float* *t_float-variable*
v:t_float Value of Float type. Read-only. See: |type()|
v:t_float Value of |Float| type. Read-only. See: |type()|
*v:t_func* *t_func-variable*
v:t_func Value of Funcref type. Read-only. See: |type()|
v:t_func Value of |Funcref| type. Read-only. See: |type()|
*v:t_job* *t_job-variable*
v:t_job Value of Job type. Read-only. See: |type()|
v:t_job Value of |Job| type. Read-only. See: |type()|
*v:t_list* *t_list-variable*
v:t_list Value of List type. Read-only. See: |type()|
v:t_list Value of |List| type. Read-only. See: |type()|
*v:t_none* *t_none-variable*
v:t_none Value of None type. Read-only. See: |type()|
v:t_none Value of |None| type. Read-only. See: |type()|
*v:t_number* *t_number-variable*
v:t_number Value of Number type. Read-only. See: |type()|
v:t_number Value of |Number| type. Read-only. See: |type()|
*v:t_string* *t_string-variable*
v:t_string Value of String type. Read-only. See: |type()|
v:t_string Value of |String| type. Read-only. See: |type()|
*v:t_blob* *t_blob-variable*
v:t_blob Value of Blob type. Read-only. See: |type()|
v:t_blob Value of |Blob| type. Read-only. See: |type()|
*v:termresponse* *termresponse-variable*
v:termresponse The escape sequence returned by the terminal for the |t_RV|
@ -2496,7 +2511,10 @@ remote_read({serverid} [, {timeout}])
remote_send({server}, {string} [, {idvar}])
String send key sequence
remote_startserver({name}) none become server {name}
remove({list}, {idx} [, {end}]) any remove items {idx}-{end} from {list}
remove({list}, {idx} [, {end}]) any/List
remove items {idx}-{end} from {list}
remove({blob}, {idx} [, {end}]) Number/Blob
remove bytes {idx}-{end} from {blob}
remove({dict}, {key}) any remove entry {key} from {dict}
rename({from}, {to}) Number rename (move) file from {from} to {to}
repeat({expr}, {count}) String repeat {expr} {count} times
@ -2875,9 +2893,9 @@ assert_false({actual} [, {msg}]) *assert_false()*
"Expected False but got {actual}" is produced.
assert_inrange({lower}, {upper}, {actual} [, {msg}]) *assert_inrange()*
This asserts number values. When {actual} is lower than
{lower} or higher than {upper} an error message is added to
|v:errors|. Also see |assert-return|.
This asserts number and |Float| values. When {actual} is lower
than {lower} or higher than {upper} an error message is added
to |v:errors|. Also see |assert-return|.
When {msg} is omitted an error in the form
"Expected range {lower} - {upper}, but got {actual}" is
produced.
@ -3342,7 +3360,7 @@ ch_read({handle} [, {options}]) *ch_read()*
{only available when compiled with the |+channel| feature}
ch_readblob({handle} [, {options}]) *ch_readblob()*
Like ch_read() but reads binary data and returns a Blob.
Like ch_read() but reads binary data and returns a |Blob|.
See |channel-more|.
{only available when compiled with the |+channel| feature}
@ -3363,7 +3381,7 @@ ch_sendexpr({handle}, {expr} [, {options}]) *ch_sendexpr()*
{only available when compiled with the |+channel| feature}
ch_sendraw({handle}, {expr} [, {options}]) *ch_sendraw()*
Send string or Blob {expr} over {handle}.
Send |String| or |Blob| {expr} over {handle}.
Works like |ch_sendexpr()|, but does not encode the request or
decode the response. The caller is responsible for the
correct contents. Also does not add a newline for a channel
@ -3520,7 +3538,7 @@ complete_check() *complete_check()*
*confirm()*
confirm({msg} [, {choices} [, {default} [, {type}]]])
Confirm() offers the user a dialog, from which a choice can be
confirm() offers the user a dialog, from which a choice can be
made. It returns the number of the choice. For the first
choice this is 1.
Note: confirm() is only supported when compiled with dialog
@ -3788,7 +3806,7 @@ empty({expr}) *empty()*
- |v:false|, |v:none| and |v:null| are empty, |v:true| is not.
- A |Job| is empty when it failed to start.
- A |Channel| is empty when it is closed.
- A Blob is empty when its length is zero.
- A |Blob| is empty when its length is zero.
For a long |List| this is much faster than comparing the
length with zero.
@ -3804,8 +3822,8 @@ escape({string}, {chars}) *escape()*
*eval()*
eval({string}) Evaluate {string} and return the result. Especially useful to
turn the result of |string()| back into the original value.
This works for Numbers, Floats, Strings and composites of
them. Also works for |Funcref|s that refer to existing
This works for Numbers, Floats, Strings, Blobs and composites
of them. Also works for |Funcref|s that refer to existing
functions.
eventhandler() *eventhandler()*
@ -4043,7 +4061,7 @@ expand({expr} [, {nosuf} [, {list}]]) *expand()*
all "README" files in the current directory and below: >
:echo expand("**/README")
<
Expand() can also be used to expand variables and environment
expand() can also be used to expand variables and environment
variables that are only known in a shell. But this can be
slow, because a shell may be used to do the expansion. See
|expr-env-expand|.
@ -4117,6 +4135,9 @@ feedkeys({string} [, {mode}]) *feedkeys()*
't' Handle keys as if typed; otherwise they are handled as
if coming from a mapping. This matters for undo,
opening folds, etc.
'L' Lowlevel input. Only works for Unix or when using the
GUI. Keys are used as if they were coming from the
terminal. Other flags are not used. *E980*
'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()
@ -4943,10 +4964,16 @@ getloclist({nr} [, {what}]) *getloclist()*
If the optional {what} dictionary argument is supplied, then
returns the items listed in {what} as a dictionary. Refer to
|getqflist()| for the supported items in {what}.
If {what} contains 'filewinid', then returns the id of the
window used to display files from the location list. This
field is applicable only when called from a location list
window. See |location-list-file-window| for more details.
In addition to the items supported by |getqflist()| in {what},
the following item is supported by |getloclist()|:
filewinid id of the window used to display files
from the location list. This field is
applicable only when called from a
location list window. See
|location-list-file-window| for more
details.
getmatches() *getmatches()*
Returns a |List| with all matches previously defined by
@ -5048,6 +5075,9 @@ getqflist([{what}]) *getqflist()*
nr get information for this quickfix list; zero
means the current quickfix list and "$" means
the last quickfix list
qfbufnr number of the buffer displayed in the quickfix
window. Returns 0 if the quickfix buffer is
not present. See |quickfix-buffer|.
size number of entries in the quickfix list
title get the list title |quickfix-title|
winid get the quickfix |window-ID|
@ -5076,6 +5106,8 @@ getqflist([{what}]) *getqflist()*
items quickfix list entries. If not present, set to
an empty list.
nr quickfix list number. If not present, set to 0
qfbufnr number of the buffer displayed in the quickfix
window. If not present, set to 0.
size number of entries in the quickfix list. If not
present, set to 0.
title quickfix list title text. If not present, set
@ -5130,7 +5162,7 @@ gettabinfo([{arg}]) *gettabinfo()*
tabnr tab page number.
variables a reference to the dictionary with
tabpage-local variables
windows List of |window-ID|s in the tag page.
windows List of |window-ID|s in the tab page.
gettabvar({tabnr}, {varname} [, {def}]) *gettabvar()*
Get the value of a tab-local variable {varname} in tab page
@ -5207,6 +5239,7 @@ getwininfo([{winid}]) *getwininfo()*
tab pages is returned.
Each List item is a Dictionary with the following entries:
botline last displayed buffer line
bufnr number of buffer in the window
height window height (excluding winbar)
loclist 1 if showing a location list
@ -5216,6 +5249,7 @@ getwininfo([{winid}]) *getwininfo()*
terminal 1 if a terminal window
{only with the +terminal feature}
tabnr tab page number
topline first displayed buffer line
variables a reference to the dictionary with
window-local variables
width window width
@ -5517,7 +5551,6 @@ iconv({expr}, {from}, {to}) *iconv()*
< Note that Vim uses UTF-8 for all Unicode encodings, conversion
from/to UCS-2 is automatically changed to use UTF-8. You
cannot use UCS-2 in a string anyway, because of the NUL bytes.
{only available when compiled with the |+multi_byte| feature}
*indent()*
indent({lnum}) The result is a Number, which is indent of line {lnum} in the
@ -5699,7 +5732,11 @@ items({dict}) *items()*
Return a |List| with all the key-value pairs of {dict}. Each
|List| item is a list with two items: the key of a {dict}
entry and the value of this entry. The |List| is in arbitrary
order.
order. Also see |keys()| and |values()|.
Example: >
for [key, value] in items(mydict)
echo key . ': ' . value
endfor
job_getchannel({job}) *job_getchannel()*
Get the channel handle that {job} is using.
@ -5720,6 +5757,16 @@ job_info([{job}]) *job_info()*
"exit_cb" function to be called on exit
"stoponexit" |job-stoponexit|
Only in Unix:
"termsig" the signal which terminated the process
(See |job_stop()| for the values)
only valid when "status" is "dead"
Only in MS-Windows:
"tty_type" Type of virtual console in use.
Values are "winpty" or "conpty".
See 'termwintype'.
Without any arguments, returns a List with all Job objects.
job_setoptions({job}, {options}) *job_setoptions()*
@ -5732,6 +5779,10 @@ job_start({command} [, {options}]) *job_start()*
|:!cmd| this does not wait for the job to finish.
To start a job in a terminal window see |term_start()|.
If the job fails to start then |job_status()| on the returned
Job object results in "fail" and none of the callbacks will be
invoked.
{command} can be a String. This works best on MS-Windows. On
Unix it is split up in white-separated parts to be passed to
execvp(). Arguments in double quotes can contain white space.
@ -5883,6 +5934,8 @@ json_decode({string}) *json_decode()*
The decoding is permissive:
- A trailing comma in an array and object is ignored, e.g.
"[1, 2, ]" is the same as "[1, 2]".
- Integer keys are accepted in objects, e.g. {1:2} is the
same as {"1":2}.
- More floating point numbers are recognized, e.g. "1." for
"1.0", or "001.2" for "1.2". Special floating point values
"Infinity", "-Infinity" and "NaN" (capitalization ignored)
@ -5894,6 +5947,8 @@ json_decode({string}) *json_decode()*
- Control characters U+0000 through U+001F which are not
escaped in strings are accepted, e.g. " " (tab
character in string) for "\t".
- An empty JSON expression or made of only spaces is accepted
and results in v:none.
- Backslash in an invalid 2-character sequence escape is
ignored, e.g. "\a" is decoded as "a".
- A correct surrogate pair in JSON strings should normally be
@ -5911,18 +5966,18 @@ json_encode({expr}) *json_encode()*
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
|Number| decimal number
|Float| floating point number
Float nan "NaN"
Float inf "Infinity"
Float -inf "-Infinity"
String in double quotes (possibly null)
Funcref not possible, error
List as an array (possibly null); when
|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
|Dict| as an object (possibly null); when
used recursively: {}
Blob as an array of the individual bytes
|Blob| as an array of the individual bytes
v:false "false"
v:true "true"
v:none "null"
@ -5933,7 +5988,7 @@ json_encode({expr}) *json_encode()*
keys({dict}) *keys()*
Return a |List| with all the keys of {dict}. The |List| is in
arbitrary order.
arbitrary order. Also see |items()| and |values()|.
*len()* *E701*
len({expr}) The result is a Number, which is the length of the argument.
@ -5941,6 +5996,7 @@ len({expr}) The result is a Number, which is the length of the argument.
used, as with |strlen()|.
When {expr} is a |List| the number of items in the |List| is
returned.
When {expr} is a |Blob| the number of bytes is returned.
When {expr} is a |Dictionary| the number of entries in the
|Dictionary| is returned.
Otherwise an error is given.
@ -6025,13 +6081,9 @@ line({expr}) The result is a Number, which is the line number of the file
line(".") line number of the cursor
line("'t") line number of mark t
line("'" . marker) line number of mark marker
< *last-position-jump*
This autocommand jumps to the last known position in a file
just after opening it, if the '" mark is set: >
:au BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit'
\ | exe "normal! g`\""
\ | endif
<
To jump to the last known position when opening a file see
|last-position-jump|.
line2byte({lnum}) *line2byte()*
Return the byte count from the start of the buffer for line
@ -6473,8 +6525,10 @@ min({expr}) Return the minimum value of all items in {expr}.
*mkdir()* *E739*
mkdir({name} [, {path} [, {prot}]])
Create directory {name}.
If {path} is "p" then intermediate directories are created as
necessary. Otherwise it must be "".
If {prot} is given it is used to set the protection bits of
the new directory. The default is 0755 (rwxr-xr-x: r/w for
the user readable for others). Use 0700 to make it unreadable
@ -6483,9 +6537,17 @@ mkdir({name} [, {path} [, {prot}]])
with 0755.
Example: >
:call mkdir($HOME . "/tmp/foo/bar", "p", 0700)
< This function is not available in the |sandbox|.
There is no error if the directory already exists and the "p"
flag is passed (since patch 8.0.1708).
flag is passed (since patch 8.0.1708). However, without the
"p" option the call will fail.
The function result is a Number, which is 1 if the call was
successful or 0 if the directory creation failed or partly
failed.
Not available on all systems. To check use: >
:if exists("*mkdir")
<
@ -6766,8 +6828,7 @@ printf({fmt}, {expr1} ...) *printf()*
*printf-S*
S The text of the String argument is used. If a
precision is specified, no more display cells than the
number specified are used. Without the |+multi_byte|
feature works just like 's'.
number specified are used.
*printf-f* *E807*
f F The Float argument is converted into a string of the
@ -7294,6 +7355,9 @@ remove({list}, {idx} [, {end}]) *remove()*
Example: >
:echo "last item: " . remove(mylist, -1)
:call remove(mylist, 0, 9)
<
Use |delete()| to remove a file.
remove({blob}, {idx} [, {end}])
Without {end}: Remove the byte at {idx} from |Blob| {blob} and
return the byte.
@ -7304,13 +7368,12 @@ remove({blob}, {idx} [, {end}])
Example: >
:echo "last byte: " . remove(myblob, -1)
:call remove(mylist, 0, 9)
remove({dict}, {key})
Remove the entry from {dict} with key {key}. Example: >
:echo "removed " . remove(dict, "one")
< If there is no {key} in {dict} this is an error.
Use |delete()| to remove a file.
rename({from}, {to}) *rename()*
Rename the file by the name {from} to the name {to}. This
should also work to move files across file systems. The
@ -7333,6 +7396,9 @@ repeat({expr}, {count}) *repeat()*
resolve({filename}) *resolve()* *E655*
On MS-Windows, when {filename} is a shortcut (a .lnk file),
returns the path the shortcut points to in a simplified form.
When {filename} is a symbolic link or junction point, return
the full path to the target. If the target of junction is
removed, return {filename}.
On Unix, repeat resolving symbolic links in all path
components of {filename} and return the simplified result.
To cope with link cycles, resolving of symbolic links is
@ -8556,10 +8622,10 @@ strcharpart({src}, {start} [, {len}]) *strcharpart()*
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}.
When {col} is omitted zero is used. Otherwise it is the
screen column where to start. This matters for Tab
characters.
String {expr} occupies on the screen when it starts at {col}
(first column is zero). When {col} is omitted zero is used.
Otherwise it is the screen column where to start. This
matters for Tab characters.
The option settings of the current window are used. This
matters for anything that's displayed differently, such as
'tabstop' and 'display'.
@ -8613,13 +8679,14 @@ stridx({haystack}, {needle} [, {start}]) *stridx()*
*string()*
string({expr}) Return {expr} converted to a String. If {expr} is a Number,
Float, String or a composition of them, then the result can be
parsed back with |eval()|.
Float, String, Blob or a composition of them, then the result
can be parsed back with |eval()|.
{expr} type result ~
String 'string' (single quotes are doubled)
Number 123
Float 123.123456 or 1.123456e8
Funcref function('name')
Blob 0z00112233.44556677.8899
List [item, item]
Dictionary {key: value, key: value}
@ -9421,6 +9488,8 @@ term_start({cmd}, {options}) *term_start()*
"ansi_colors" A list of 16 color names or hex codes
defining the ANSI palette used in GUI
color modes. See |g:terminal_ansi_colors|.
"tty_type" (MS-Windows only): Specify which pty to
use. See 'termwintype' for the values.
{only available when compiled with the |+terminal| feature}
@ -9692,10 +9761,10 @@ type({expr}) The result is a Number representing the type of {expr}.
Dictionary: 4 |v:t_dict|
Float: 5 |v:t_float|
Boolean: 6 |v:t_bool| (v:false and v:true)
None 7 |v:t_none| (v:null and v:none)
Job 8 |v:t_job|
Channel 9 |v:t_channel|
Blob 10 |v:t_blob|
None: 7 |v:t_none| (v:null and v:none)
Job: 8 |v:t_job|
Channel: 9 |v:t_channel|
Blob: 10 |v:t_blob|
For backward compatibility, this method can be used: >
:if type(myvar) == type(0)
:if type(myvar) == type("")
@ -9774,7 +9843,7 @@ uniq({list} [, {func} [, {dict}]]) *uniq()* *E882*
values({dict}) *values()*
Return a |List| with all the values of {dict}. The |List| is
in arbitrary order.
in arbitrary order. Also see |items()| and |keys()|.
virtcol({expr}) *virtcol()*
@ -10118,7 +10187,7 @@ all_builtin_terms Compiled with all builtin terminals enabled.
amiga Amiga version of Vim.
arabic Compiled with Arabic support |Arabic|.
arp Compiled with ARP support (Amiga).
autocmd Compiled with autocommand support. |autocommand|
autocmd Compiled with autocommand support. (always true)
autochdir Compiled with support for 'autochdir'
autoservername Automatically enable |clientserver|
balloon_eval Compiled with |balloon-eval| support.
@ -10127,6 +10196,7 @@ beos BeOS version of Vim.
browse Compiled with |:browse| support, and browse() will
work.
browsefilter Compiled with support for |browsefilter|.
bsd Compiled on an OS in the BSD family (excluding macOS).
builtin_terms Compiled with some builtin terminals.
byte_offset Compiled with support for 'o' in 'statusline'
cindent Compiled with 'cindent' support.
@ -10137,8 +10207,10 @@ cmdline_hist Compiled with |cmdline-history| support.
cmdline_info Compiled with 'showcmd' and 'ruler' support.
comments Compiled with |'comments'| support.
compatible Compiled to be very Vi compatible.
conpty Platform where |ConPTY| can be used.
cryptv Compiled with encryption support |encryption|.
cscope Compiled with |cscope| support.
cursorbind Compiled with |'cursorbind'| (always true)
debug Compiled with "DEBUG" defined.
dialog_con Compiled with console dialog support.
dialog_gui Compiled with GUI dialog support.
@ -10150,7 +10222,7 @@ ebcdic Compiled on a machine with ebcdic character set.
emacs_tags Compiled with support for Emacs tags.
eval Compiled with expression evaluation support. Always
true, of course!
ex_extra |+ex_extra|, always true now
ex_extra |+ex_extra| (always true)
extra_search Compiled with support for |'incsearch'| and
|'hlsearch'|
farsi Compiled with Farsi support |farsi|.
@ -10179,6 +10251,7 @@ gui_running Vim is running in the GUI, or it will start soon.
gui_win32 Compiled with MS Windows Win32 GUI.
gui_win32s idem, and Win32s system being used (Windows 3.1)
hangul_input Compiled with Hangul input support. |hangul|
hpux HP-UX version of Vim.
iconv Can use iconv() for conversion.
insert_expand Compiled with support for CTRL-X expansion commands in
Insert mode.
@ -10189,6 +10262,7 @@ langmap Compiled with 'langmap' support.
libcall Compiled with |libcall()| support.
linebreak Compiled with 'linebreak', 'breakat', 'showbreak' and
'breakindent' support.
linux Linux version of Vim.
lispindent Compiled with support for lisp indenting.
listcmds Compiled with commands for the buffer list |:files|
and the argument list |arglist|.
@ -10209,7 +10283,7 @@ mouse_sgr Compiled with support for sgr mouse.
mouse_urxvt Compiled with support for urxvt mouse.
mouse_xterm Compiled with support for xterm mouse.
mouseshape Compiled with support for 'mouseshape'.
multi_byte Compiled with support for 'encoding'
multi_byte Compiled with support for 'encoding' (always true)
multi_byte_encoding 'encoding' is set to a multi-byte encoding.
multi_byte_ime Compiled with support for IME input method.
multi_lang Compiled with support for multiple languages.
@ -10239,7 +10313,7 @@ quickfix Compiled with |quickfix| support.
reltime Compiled with |reltime()| support.
rightleft Compiled with 'rightleft' support.
ruby Compiled with Ruby interface |ruby|.
scrollbind Compiled with 'scrollbind' support.
scrollbind Compiled with 'scrollbind' support. (always true)
showcmd Compiled with 'showcmd' support.
signs Compiled with |:sign| support.
smartindent Compiled with 'smartindent' support.
@ -10247,7 +10321,8 @@ spell Compiled with spell checking support |spell|.
startuptime Compiled with |--startuptime| support.
statusline Compiled with support for 'statusline', 'rulerformat'
and special formats of 'titlestring' and 'iconstring'.
sun_workshop Compiled with support for Sun |workshop|.
sun SunOS version of Vim.
sun_workshop Support for Sun |workshop| has been removed.
syntax Compiled with syntax highlighting support |syntax|.
syntax_items There are active syntax highlighting items for the
current buffer.
@ -10278,27 +10353,29 @@ user_commands User-defined commands.
vcon Win32: Virtual console support is working, can use
'termguicolors'. Also see |+vtp|.
vertsplit Compiled with vertically split windows |:vsplit|.
(always true)
vim_starting True while initial source'ing takes place. |startup|
*vim_starting*
viminfo Compiled with viminfo support.
virtualedit Compiled with 'virtualedit' option.
virtualedit Compiled with 'virtualedit' option. (always true)
visual Compiled with Visual mode. (always true)
visualextra Compiled with extra Visual mode commands. (always
true) |blockwise-operators|.
vms VMS version of Vim.
vreplace Compiled with |gR| and |gr| commands.
vreplace Compiled with |gR| and |gr| commands. (always true)
vtp Compiled for vcon support |+vtp| (check vcon to find
out if it works in the current console).
wildignore Compiled with 'wildignore' option.
wildmenu Compiled with 'wildmenu' option.
win16 old version for MS-Windows 3.1 (always False)
win16 old version for MS-Windows 3.1 (always false)
win32 Win32 version of Vim (MS-Windows 95 and later, 32 or
64 bits)
win32unix Win32 version of Vim, using Unix files (Cygwin)
win64 Win64 version of Vim (MS-Windows 64 bit).
win95 Win32 version for MS-Windows 95/98/ME (always False)
win95 Win32 version for MS-Windows 95/98/ME (always false)
winaltkeys Compiled with 'winaltkeys' option.
windows Compiled with support for more than one window.
(always true)
writebackup Compiled with 'writebackup' default on.
xfontset Compiled with X fontset support |xfontset|.
xim Compiled with X input method support |xim|.
@ -10770,9 +10847,13 @@ This does NOT work: >
When the selected range of items is partly past the
end of the list, items will be added.
*:let+=* *:let-=* *:let.=* *E734*
*:let+=* *:let-=* *:letstar=*
*:let/=* *:let%=* *:let.=* *E734*
:let {var} += {expr1} Like ":let {var} = {var} + {expr1}".
:let {var} -= {expr1} Like ":let {var} = {var} - {expr1}".
:let {var} *= {expr1} Like ":let {var} = {var} * {expr1}".
:let {var} /= {expr1} Like ":let {var} = {var} / {expr1}".
:let {var} %= {expr1} Like ":let {var} = {var} % {expr1}".
:let {var} .= {expr1} Like ":let {var} = {var} . {expr1}".
These fail if {var} was not set yet and when the type
of {var} and {expr1} don't fit the operator.
@ -11030,28 +11111,34 @@ This does NOT work: >
NOTE: The ":append" and ":insert" commands don't work
properly inside a ":while" and ":for" loop.
:for {var} in {list} *:for* *E690* *E732*
:for {var} in {object} *:for* *E690* *E732*
:endfo[r] *:endfo* *:endfor*
Repeat the commands between ":for" and ":endfor" for
each item in {list}. Variable {var} is set to the
value of each item.
When an error is detected for a command inside the
loop, execution continues after the "endfor".
Changing {list} inside the loop affects what items are
used. Make a copy if this is unwanted: >
each item in {object}. {object} can be a |List| or
a |Blob|. Variable {var} is set to the value of each
item. When an error is detected for a command inside
the loop, execution continues after the "endfor".
Changing {object} inside the loop affects what items
are used. Make a copy if this is unwanted: >
:for item in copy(mylist)
< When not making a copy, Vim stores a reference to the
next item in the list, before executing the commands
with the current item. Thus the current item can be
removed without effect. Removing any later item means
it will not be found. Thus the following example
works (an inefficient way to make a list empty): >
<
When {object} is a |List| and not making a copy, Vim
stores a reference to the next item in the |List|
before executing the commands with the current item.
Thus the current item can be removed without effect.
Removing any later item means it will not be found.
Thus the following example works (an inefficient way
to make a |List| empty): >
for item in mylist
call remove(mylist, 0)
endfor
< Note that reordering the list (e.g., with sort() or
< Note that reordering the |List| (e.g., with sort() or
reverse()) may have unexpected effects.
When {object} is a |Blob|, Vim always makes a copy to
iterate over. Unlike with |List|, modifying the
|Blob| does not affect the iteration.
:for [{var1}, {var2}, ...] in {listlist}
:endfo[r]
Like ":for" above, but each item in {listlist} must be
@ -11127,14 +11214,14 @@ This does NOT work: >
commands are skipped.
When {pattern} is omitted all errors are caught.
Examples: >
:catch /^Vim:Interrupt$/ " catch interrupts (CTRL-C)
:catch /^Vim\%((\a\+)\)\=:E/ " catch all Vim errors
:catch /^Vim\%((\a\+)\)\=:/ " catch errors and interrupts
:catch /^Vim(write):/ " catch all errors in :write
:catch /^Vim\%((\a\+)\)\=:E123/ " catch error E123
:catch /my-exception/ " catch user exception
:catch /.*/ " catch everything
:catch " same as /.*/
:catch /^Vim:Interrupt$/ " catch interrupts (CTRL-C)
:catch /^Vim\%((\a\+)\)\=:E/ " catch all Vim errors
:catch /^Vim\%((\a\+)\)\=:/ " catch errors and interrupts
:catch /^Vim(write):/ " catch all errors in :write
:catch /^Vim\%((\a\+)\)\=:E123:/ " catch error E123
:catch /my-exception/ " catch user exception
:catch /.*/ " catch everything
:catch " same as /.*/
<
Another character can be used instead of / around the
{pattern}, so long as it does not have a special

View File

@ -1,4 +1,4 @@
*farsi.txt* For Vim version 8.1. Last change: 2015 Aug 29
*farsi.txt* For Vim version 8.1. Last change: 2019 Feb 16
VIM REFERENCE MANUAL by Mortaza Ghassab Shiran
@ -9,261 +9,12 @@ Right to Left and Farsi Mapping for Vim *farsi* *Farsi*
{Vi does not have any of these commands}
*E27*
In order to use right-to-left and Farsi mapping support, it is necessary to
compile Vim with the |+farsi| feature.
Farsi support has been removed in patch 8.1.0932. At that time it was
outdated and unused.
These functions have been made by Mortaza G. Shiran <shiran@jps.net>
If you would like to bring Farsi support back, please have a look at the old
Farsi code, as it was present at the 8.1 release. It should be merged with
Arabic support using the Unicode character set.
Introduction
------------
In right-to-left oriented files the characters appear on the screen from right
to left. This kind of file is most useful when writing Farsi documents,
composing faxes or writing Farsi memos.
The commands, prompts and help files are not in Farsi, therefore the user
interface remains the standard Vi interface.
Highlights
----------
o Editing left-to-right files as in the original Vim, no change.
o Viewing and editing files in right-to-left windows. File orientation is
per window, so it is possible to view the same file in right-to-left and
left-to-right modes, simultaneously.
o Compatibility to the original Vim. Almost all features work in
right-to-left mode (see bugs below).
o Changing keyboard mapping and reverse insert modes using a single
command.
o Backing from reverse insert mode to the correct place in the file
(if possible).
o While in Farsi mode, numbers are entered from left to right. Upon entering
a none number character, that character will be inserted just into the
left of the last number.
o No special terminal with right-to-left capabilities is required. The
right-to-left changes are completely hardware independent. Only
Farsi font is necessary.
o Farsi keymapping on the command line in reverse insert mode.
o Toggling between left-to-right and right-to-left via F8 function key.
o Toggling between Farsi ISIR-3342 standard encoding and Vim Farsi via F9
function key. Since this makes sense only for the text written in
right-to-left mode, this function is also supported only in right-to-left
mode.
Farsi Fonts *farsi-fonts*
-----------
The following files are found in the subdirectories of the '$VIM/farsi/fonts'
directory:
+ far-a01.pcf X Windows fonts for Unix including Linux systems
+ far-a01.bf X Windows fonts for SunOS
+ far-a01.f16 a screen fonts for Unix including Linux systems
+ far-a01.fon a monospaced fonts for Windows NT/95/98
+ far-a01.com a screen fonts for DOS
Font Installation
-----------------
o Installation of fonts for MS Window systems (NT/95/98)
From 'Control Panel' folder, start the 'Fonts' program. Then from 'file'
menu item select 'Install New Fonts ...'. Browse and select the
'far-a01.fon', then follow the installation guide.
NOTE: several people have reported that this does not work. The solution
is unknown.
o Installation of fonts for X Window systems (Unix/Linux)
Depending on your system, copy far-a01.pcf.Z or far-a01.pcf.gz into a
directory of your choice. Change to the directory containing the Farsi
fonts and execute the following commands:
> mkfontdir
> xset +fp path_name_of_farsi_fonts_directory
o Installation of fonts for X Window systems (SunOS)
Copy far-a01.bf font into a directory of your choice.
Change to the directory containing the far-a01.fb fonts and
execute the following commands:
> fldfamily
> xset +fp path_name_of_fonts_directory
o Installation of ASCII screen fonts (Unix/Linux)
For Linux system, copy the far-a01.f16 fonts into /usr/lib/kbd/consolefonts
directory and execute the setfont program as "setfont far-a01.f16". For
other systems (e.g. SCO Unix), please refer to the fonts installation
section of your system administration manuals.
o Installation of ASCII screen fonts (DOS)
After system power on, prior to the first use of Vim, upload the Farsi
fonts by executing the far-a01.com font uploading program.
Usage
-----
Prior to starting Vim, the environment in which Vim can run in Farsi mode,
must be set. In addition to installation of Farsi fonts, following points
refer to some of the system environments, which you may need to set:
Key code mapping, loading graphic card in ASCII screen mode, setting the IO
driver in 8 bit clean mode ... .
o Setting the Farsi fonts
+ For Vim GUI set the 'guifont' to far-a01. This is done by entering
':set guifont=far-a01' in the Vim window.
You can have 'guifont' set to far-a01 by Vim during the Vim startup
by appending the ':set guifont=far-a01' into your .vimrc file
(in case of NT/95/98 platforms _vimrc).
Under the X Window environment, you can also start Vim with the
'-fn far-a01' option.
+ For Vim within a xterm, start a xterm with the Farsi fonts (e.g.
kterm -fn far-a01). Then start Vim inside the kterm.
+ For Vim under DOS, prior to the first usage of Vim, upload the Farsi
fonts by executing the far-a01.com fonts uploading program.
o Farsi Keymapping Activation
To activate the Farsi keymapping, set either 'altkeymap' or 'fkmap'.
This is done by entering ':set akm' or ':set fk' in the Vim window.
You can have 'altkeymap' or 'fkmap' set as default by appending ':set akm'
or ':set fk' in your .vimrc file or _vimrc in case of NT/95/98 platforms.
To turn off the Farsi keymapping as a default second language keymapping,
reset the 'altkeymap' by entering ':set noakm'.
o right-to-left Farsi Mode
By default Vim starts in Left-to-right mode. Following are ways to change
the window orientation:
+ Start Vim with the -F option (e.g. vim -F ...).
+ Use the F8 function key to toggle between left-to-right and right-to-left.
+ While in Left-to-right mode, enter 'set rl' in the command line ('rl' is
the abbreviation for rightleft).
+ Put the 'set rl' line in your '.vimrc' file to start Vim in
right-to-left mode permanently.
Encoding
--------
The letter encoding used is the Vim extended ISIR-3342 standard with a built
in function to convert between Vim extended ISIR-3342 and ISIR-3342 standard.
For document portability reasons, the letter encoding is kept the same across
different platforms (i.e. UNIX's, NT/95/98, MS DOS, ...).
o Keyboard
+ CTRL-_ in insert/replace modes toggles between Farsi(akm)/Latin
mode as follows:
+ CTRL-_ moves the cursor to the end of the typed text in edit mode.
+ CTRL-_ in command mode only toggles keyboard mapping between Farsi(akm)/
Latin. The Farsi text is then entered in reverse insert mode.
+ F8 - Toggles between left-to-right and right-to-left.
+ F9 - Toggles the encoding between ISIR-3342 standard and Vim extended
ISIR-3342 (supported only in right-to-left mode).
+ Keyboard mapping is based on the Iranian ISIRI-2901 standard.
Following table shows the keyboard mapping while Farsi(akm) mode set:
-------------------------------------
` 1 2 3 4 5 6 7 8 9 0 - =
<09> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20>
-------------------------------------
~ ! @ # $ % ^ & * ( ) _ +
~ <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20>
-------------------------------------
q w e r t z u i o p [ ]
<09> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20>
-------------------------------------
Q W E R T Z U I O P { }
<09> <20> <20> <20> <20> <20> <20> <20> [ ] { }
-------------------------------------
a s d f g h j k l ; ' \
<09> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20>
-------------------------------------
A S D F G H J K L : " |
<09> <20><> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20>
-------------------------------------
< y x c v b n m , . /
<09> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20>
-------------------------------------
> Y X C V B N M < > ?
<09> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20>
-------------------------------------
Note:
<09> stands for Farsi PSP (break without space)
<09> stands for Farsi PCN (for HAMZE attribute)
Restrictions
------------
o In insert/replace mode and fkmap (Farsi mode) set, CTRL-B is not
supported.
o If you change the character mapping between Latin/Farsi, the redo buffer
will be reset (emptied). That is, redo is valid and will function (using
'.') only within the mode you are in.
o While numbers are entered in Farsi mode, the redo buffer will be reset
(emptied). That is, you cannot redo the last changes (using '.') after
entering numbers.
o While in left-to-right mode and Farsi mode set, CTRL-R is not supported.
o While in right-to-left mode, the search on 'Latin' pattern does not work,
except if you enter the Latin search pattern in reverse.
o In command mode there is no support for entering numbers from left
to right and also for the sake of flexibility the keymapping logic is
restricted.
o Under the X Window environment, if you want to run Vim within a xterm
terminal emulator and Farsi mode set, you need to have an ANSI compatible
xterm terminal emulator. This is because the letter codes above 128 decimal
have certain meanings in the standard xterm terminal emulator.
Note: Under X Window environment, Vim GUI works fine in Farsi mode.
This eliminates the need of any xterm terminal emulator.
Bugs
----
While in insert/replace and Farsi mode set, if you repeatedly change the
cursor position (via cursor movement) and enter new text and then try to undo
the last change, the undo will lag one change behind. But as you continue to
undo, you will reach the original line of text. You can also use U to undo all
changes made in the current line.
For more information about the bugs refer to rileft.txt.
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -663,6 +663,15 @@ your |vimrc|: >
let rrst_dynamic_comments = 0
RESTRUCTUREDTEXT *ft-rst-plugin*
The following formatting setting are optionally available: >
setlocal expandtab shiftwidth=3 softtabstop=3 tabstop=8
To enable this behavior, set the following variable in your vimrc: >
let g:rst_style = 1
RPM SPEC *ft-spec-plugin*
Since the text for this plugin is rather long it has been put in a separate

View File

@ -1,4 +1,4 @@
*help.txt* For Vim version 8.1. Last change: 2019 Jan 01
*help.txt* For Vim version 8.1. Last change: 2019 Jan 17
VIM - main help file
k
@ -180,7 +180,6 @@ Interfaces ~
|if_ole.txt| OLE automation interface for Win32
|if_ruby.txt| Ruby interface
|debugger.txt| Interface with a debugger
|workshop.txt| Sun Visual Workshop interface
|netbeans.txt| NetBeans External Editor interface
|sign.txt| debugging signs

View File

@ -1,4 +1,4 @@
*if_perl.txt* For Vim version 8.1. Last change: 2017 Nov 24
*if_perl.txt* For Vim version 8.1. Last change: 2019 Jan 29
VIM REFERENCE MANUAL by Sven Verdoolaege
@ -192,7 +192,7 @@ VIM::Eval({expr}) Evaluates {expr} and returns (success, value) in list
and inserting line breaks.
*perl-Blob*
VIM::Blob({expr}) Return Blob literal string 0zXXXX from scalar value.
VIM::Blob({expr}) Return |Blob| literal string 0zXXXX from scalar value.
*perl-SetHeight*
Window->SetHeight({height})

View File

@ -1,4 +1,4 @@
*if_ruby.txt* For Vim version 8.1. Last change: 2018 Mar 15
*if_ruby.txt* For Vim version 8.1. Last change: 2019 Jan 29
VIM REFERENCE MANUAL by Shugo Maeda
@ -112,7 +112,7 @@ Vim::message({msg})
*ruby-blob*
Vim::blob({arg})
Return Blob literal string from {arg}.
Return |Blob| literal string from {arg}.
*ruby-set_option*
Vim::set_option({arg})

View File

@ -1,4 +1,4 @@
*indent.txt* For Vim version 8.1. Last change: 2018 Apr 04
*indent.txt* For Vim version 8.1. Last change: 2019 Feb 21
VIM REFERENCE MANUAL by Bram Moolenaar
@ -60,12 +60,13 @@ typing certain characters or commands in certain contexts. Note that this not
only triggers C-indenting. When 'indentexpr' is not empty 'indentkeys' is
used instead. The format of 'cinkeys' and 'indentkeys' is equal.
The default is "0{,0},0),:,0#,!^F,o,O,e" which specifies that indenting occurs
as follows:
The default is "0{,0},0),0],:,0#,!^F,o,O,e" which specifies that indenting
occurs as follows:
"0{" if you type '{' as the first character in a line
"0}" if you type '}' as the first character in a line
"0)" if you type ')' as the first character in a line
"0]" if you type ']' as the first character in a line
":" if you type ':' after a label or case statement
"0#" if you type '#' as the first character in a line
"!^F" if you type CTRL-F (which is not inserted)
@ -947,6 +948,11 @@ can sometimes be slow, thus it timeouts after 150 msec. If you notice the
indenting isn't correct, you can set a larger timeout in msec: >
let g:pyindent_searchpair_timeout = 500
If looking back for unclosed parenthesis is still too slow, especially during
a copy-paste operation, or if you don't need indenting inside multi-line
parentheses, you can completely disable this feature: >
let g:pyindent_disable_parentheses_indenting = 1
R *ft-r-indent*

View File

@ -1,4 +1,4 @@
*index.txt* For Vim version 8.1. Last change: 2018 Apr 19
*index.txt* For Vim version 8.1. Last change: 2019 Mar 17
VIM REFERENCE MANUAL by Bram Moolenaar
@ -17,9 +17,11 @@ to look for deleting something, use: "/delete".
2.3. Square bracket commands |[|
2.4. Commands starting with 'g' |g|
2.5. Commands starting with 'z' |z|
2.6. Operator-pending mode |operator-pending-index|
3. Visual mode |visual-index|
4. Command-line editing |ex-edit-index|
5. EX commands |ex-cmd-index|
5. Terminal-Job mode |terminal-job-index|
6. EX commands |ex-cmd-index|
For an overview of options see help.txt |option-list|.
For an overview of built-in functions see |functions|.
@ -166,6 +168,20 @@ commands in CTRL-X submode *i_CTRL-X_index*
|i_CTRL-X_s| CTRL-X s spelling suggestions
{not available when compiled without the |+insert_expand| feature}
commands in completion mode (see |popupmenu-keys|)
|complete_CTRL-E| CTRL-E stop completion and go back to original text
|complete_CTRL-Y| CTRL-Y accept selected match and stop completion
CTRL-L insert one character from the current match
<CR> insert currently selected match
<BS> delete one character and redo search
CTRL-H same as <BS>
<Up> select the previous match
<Down> select the next match
<PageUp> select a match several entries back
<PageDown> select a match several entries forward
other stop completion and insert the typed character
==============================================================================
2. Normal mode *normal-index*
@ -528,10 +544,8 @@ tag command action in Normal mode ~
|CTRL-W_CTRL-]| CTRL-W CTRL-] same as "CTRL-W ]"
|CTRL-W_CTRL-^| CTRL-W CTRL-^ same as "CTRL-W ^"
|CTRL-W_CTRL-_| CTRL-W CTRL-_ same as "CTRL-W _"
|CTRL-W_quote| CTRL-W " terminal window: paste register
|CTRL-W_+| CTRL-W + increase current window height N lines
|CTRL-W_-| CTRL-W - decrease current window height N lines
|CTRL-W_.| CTRL-W . terminal window: type CTRL-W
|CTRL-W_:| CTRL-W : same as |:|, edit a command line
|CTRL-W_<| CTRL-W < decrease current window width N columns
|CTRL-W_=| CTRL-W = make all windows the same height & width
@ -540,7 +554,6 @@ tag command action in Normal mode ~
|CTRL-W_J| CTRL-W J move current window to the very bottom
|CTRL-W_K| CTRL-W K move current window to the very top
|CTRL-W_L| CTRL-W L move current window to the far right
|CTRL-W_N| CTRL-W N terminal window: go to Terminal Normal mode
|CTRL-W_P| CTRL-W P go to preview window
|CTRL-W_R| CTRL-W R rotate windows upwards N times
|CTRL-W_S| CTRL-W S same as "CTRL-W s"
@ -570,6 +583,8 @@ tag command action in Normal mode ~
|CTRL-W_gF| CTRL-W g F edit file name under the cursor in a new
tab page and jump to the line number
following the file name.
|CTRL-W_gt| CTRL-W g t same as `gt`: go to next tab page
|CTRL-W_gT| CTRL-W g T same as `gT`: go to previous tab page
|CTRL-W_h| CTRL-W h go to Nth left window (stop at first window)
|CTRL-W_i| CTRL-W i split window and jump to declaration of
identifier under the cursor
@ -854,6 +869,17 @@ tag char note action in Normal mode ~
|z<Left>| z<Left> same as "zh"
|z<Right>| z<Right> same as "zl"
==============================================================================
2.6 Operator-pending mode *operator-pending-index*
These can be used after an operator, but before a {motion} has been entered.
tag char action in Operator-pending mode ~
-----------------------------------------------------------------------
|o_v| v force operator to work characterwise
|o_V| V force operator to work linewise
|o_CTRL-V| CTRL-V force operator to work blockwise
==============================================================================
3. Visual mode *visual-index*
@ -976,7 +1002,7 @@ Normal characters are inserted at the current cursor position.
"Completion" below refers to context-sensitive completion. It will complete
file names, tags, commands etc. as appropriate.
tag command action in Command-line editing mode ~
tag command action in Command-line editing mode ~
------------------------------------------------------------------------------
CTRL-@ not used
|c_CTRL-A| CTRL-A do completion on the pattern in front of the
@ -1066,16 +1092,37 @@ tag command action in Command-line editing mode ~
|c_<Insert>| <Insert> toggle insert/overstrike mode
|c_<LeftMouse>| <LeftMouse> cursor at mouse click
==============================================================================
5. Terminal-Job mode *terminal-job-index*
Most Normal mode commands except for window commands (|CTRL-W|) do not work in
a terminal window. Switch to Terminal-Normal mode to use them.
This assumes 'termwinkey' is not set.
tag char action in Terminal-Job mode ~
-----------------------------------------------------------------------
|t_CTRL-\_CTRL-N| CTRL-\ CTRL-N switch to Terminal-Normal mode
|t_CTRL-W_N| CTRL-W N switch to Terminal-Normal mode
|t_CTRL-W_:| CTRL-W : enter an Ex command
|t_CTRL-W_.| CTRL-W . type CTRL-W in the terminal
CTRL-W CTRL-\ send a CTRL-\ to the job in the terminal
|t_CTRL-W_quote| CTRL-W " {0-9a-z"%#*:=}
paste register in the terminal
|t_CTRL-W_CTRL-C| CTRL-W CTRL-C forcefully ends the job
|t_CTRL-W_CTRL-W| CTRL-W CTRL-W move focus to the next window
|t_CTRL-W_gt| CTRL-W gt go to next tabpage, same as `gt`
|t_CTRL-W_gT| CTRL-W gT go to previous tabpage, same as `gT`
You found it, Arthur! *holy-grail* *:smile*
==============================================================================
5. EX commands *ex-cmd-index* *:index*
6. EX commands *ex-cmd-index* *:index*
This is a brief but complete listing of all the ":" commands, without
mentioning any arguments. The optional part of the command name is inside [].
The commands are sorted on the non-optional part of their name.
tag command action ~
tag command action ~
------------------------------------------------------------------------------
|:!| :! filter lines or execute an external command
|:!!| :!! repeat last ":!" command
@ -1457,8 +1504,9 @@ tag command action ~
|:recover| :rec[over] recover a file from a swap file
|:redo| :red[o] redo one undone change
|:redir| :redi[r] redirect messages to a file or register
|:redraw| :redr[aw] force a redraw of the display
|:redrawstatus| :redraws[tatus] force a redraw of the status line(s)
|:redraw| :redr[aw] force a redraw of the display
|:redrawstatus| :redraws[tatus] force a redraw of the status line(s)
|:redrawtabline| :redrawt[abline] force a redraw of the tabline
|:registers| :reg[isters] display the contents of registers
|:resize| :res[ize] change current window height
|:retab| :ret[ab] change tab size
@ -1643,7 +1691,6 @@ tag command action ~
argument list
|:wq| :wq write to a file and quit window or Vim
|:wqall| :wqa[ll] write all changed buffers and quit Vim
|:wsverb| :ws[verb] pass the verb to workshop over IPC
|:wundo| :wu[ndo] write undo information to a file
|:wviminfo| :wv[iminfo] write to viminfo file
|:xit| :x[it] write if buffer changed and quit window or Vim

View File

@ -1,4 +1,4 @@
*insert.txt* For Vim version 8.1. Last change: 2018 Feb 10
*insert.txt* For Vim version 8.1. Last change: 2019 Jan 29
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1078,7 +1078,8 @@ that contains the List. The Dict can have these items:
leading text is changed.
If you want to suppress the warning message for an empty result, return
v:none. This is useful to implement asynchronous completion with complete().
|v:none|. This is useful to implement asynchronous completion with
|complete()|.
Other items are ignored.

View File

@ -1,4 +1,4 @@
*intro.txt* For Vim version 8.1. Last change: 2019 Jan 01
*intro.txt* For Vim version 8.1. Last change: 2019 Jan 07
VIM REFERENCE MANUAL by Bram Moolenaar
@ -268,9 +268,9 @@ In this documentation there are several references to other versions of Vi:
Vi "the original". Without further remarks this is the version
of Vi that appeared in Sun OS 4.x. ":version" returns
"Version 3.7, 6/7/85". Sometimes other versions are referred
to. Only runs under Unix. Source code only available with a
license. More information on Vi can be found through:
http://vi-editor.org [doesn't currently work...]
to. Only runs under Unix. Source code is now available under a
BSD-style license. More information on Vi can be found through:
http://ex-vi.sourceforge.net/
*Posix*
Posix From the IEEE standard 1003.2, Part 2: Shell and utilities.
Generally known as "Posix". This is a textual description of
@ -285,11 +285,10 @@ Nvi The "New" Vi. The version of Vi that comes with BSD 4.4 and FreeBSD.
Source code is freely available.
*Elvis*
Elvis Another Vi clone, made by Steve Kirkendall. Very compact but isn't
as flexible as Vim.
The version used is 2.1. It is still being developed. Source code is
freely available.
*NeoVim*
NeoVim A Vim clone. Forked the Vim source in 2014 and went a different way.
as flexible as Vim. Development has stalled, Elvis has left the
building! Source code is freely available.
*Neovim*
Neovim A Vim clone. Forked the Vim source in 2014 and went a different way.
Very much bound to github and has many more dependencies, making
development more complex and limiting portability. Code has been
refactored, resulting in patches not being exchangeable with Vim.

View File

@ -14,9 +14,6 @@ For an introduction to the most common features, see |usr_45.txt| in the user
manual.
For changing the language of messages and menus see |mlang.txt|.
{not available when compiled without the |+multi_byte| feature}
1. Getting started |mbyte-first|
2. Locale |mbyte-locale|
3. Encoding |mbyte-encoding|
@ -44,16 +41,6 @@ features. Unfortunately, every system has its own way to deal with multibyte
languages and it is quite complicated.
COMPILING
If you already have a compiled Vim program, check if the |+multi_byte| feature
is included. The |:version| command can be used for this.
If +multi_byte is not included, you should compile Vim with "normal", "big" or
"huge" features. You can further tune what features are included. See the
INSTALL files in the source directory.
LOCALE
First of all, you must make sure your current locale is set correctly. If

View File

@ -1,4 +1,4 @@
*motion.txt* For Vim version 8.1. Last change: 2018 Dec 27
*motion.txt* For Vim version 8.1. Last change: 2019 Mar 02
VIM REFERENCE MANUAL by Bram Moolenaar
@ -320,7 +320,7 @@ _ <underscore> [count] - 1 lines downward, on the first non-blank
G Goto line [count], default last line, on the first
non-blank character |linewise|. If 'startofline' not
set, keep the same column.
G is a one of |jump-motions|.
G is one of the |jump-motions|.
*<C-End>*
<C-End> Goto line [count], default last line, on the last
@ -1021,7 +1021,7 @@ These commands are not marks themselves, but jump to a mark:
A "jump" is a command that normally moves the cursor several lines away. If
you make the cursor "jump" the position of the cursor before the jump is
remembered. You can return to that position with the "''" and "``" command,
remembered. You can return to that position with the "''" and "``" commands,
unless the line containing that position was changed or deleted. The
following commands are "jump" commands: "'", "`", "G", "/", "?", "n", "N",
"%", "(", ")", "[[", "]]", "{", "}", ":s", ":tag", "L", "M", "H" and the

View File

@ -1,10 +1,10 @@
*netbeans.txt* For Vim version 8.1. Last change: 2016 Jul 15
*netbeans.txt* For Vim version 8.1. Last change: 2019 Jan 17
VIM REFERENCE MANUAL by Gordon Prieur et al.
*netbeans* *netbeans-support*
*netbeans* *NetBeans* *netbeans-support*
Vim NetBeans Protocol: a socket interface for Vim integration into an IDE.
@ -123,8 +123,18 @@ Currently the NetBeans interface is supported by Vim running in a terminal and
by gvim when it is run with one of the following GUIs: GTK, GNOME, Windows,
Athena and Motif.
If Motif support is required the user must supply XPM libraries. See
|workshop-xpm| for details on obtaining the latest version of XPM.
*netbeans-xpm*
If Motif support is required the user must supply XPM libraries.
The XPM library is required to show images within Vim with Motif or Athena.
Without it the toolbar and signs will be disabled.
The XPM library is provided by Arnaud Le Hors of the French National Institute
for Research in Computer Science and Control. It can be downloaded from
http://cgit.freedesktop.org/xorg/lib/libXpm. The current release, as of this
writing, is xpm-3.4k-solaris.tgz, which is a gzip'ed tar file. If you create
the directory /usr/local/xpm and untar the file there you can use the
uncommented lines in the Makefile without changing them. If you use another
xpm directory you will need to change the XPM_DIR in src/Makefile.
On MS-Windows:

View File

@ -1,4 +1,4 @@
*options.txt* For Vim version 8.1. Last change: 2018 Dec 27
*options.txt* For Vim version 8.1. Last change: 2019 Mar 08
VIM REFERENCE MANUAL by Bram Moolenaar
@ -354,12 +354,12 @@ files. You use this command: >
:setlocal makeprg=perlmake
You can switch back to using the global value by making the local value empty: >
:setlocal makeprg=
This only works for a string option. For a boolean option you need to use the
"<" flag, like this: >
This only works for a string option. For a number or boolean option you need
to use the "<" flag, like this: >
:setlocal autoread<
Note that for non-boolean options using "<" copies the global value to the
local value, it doesn't switch back to using the global value (that matters
when the global value changes later). You can also use: >
Note that for non-boolean and non-number options using "<" copies the global
value to the local value, it doesn't switch back to using the global value
(that matters when the global value changes later). You can also use: >
:set path<
This will make the local value of 'path' empty, so that the global value is
used. Thus it does the same as: >
@ -383,9 +383,9 @@ Setting the filetype
When the optional FALLBACK argument is present, a
later :setfiletype command will override the
'filetype'. This is to used for filetype detections
that are just a guess. |did_filetype()| will return
false after this command.
'filetype'. This is to be used for filetype
detections that are just a guess. |did_filetype()|
will return false after this command.
{not in Vi}
@ -688,20 +688,13 @@ A jump table for the options with a short description can be found at |Q_op|.
{not in Vi}
{only available when compiled with the |+farsi|
feature}
When on, the second language is Farsi. In editing mode CTRL-_ toggles
the keyboard map between Farsi and English, when 'allowrevins' set.
When off, the keyboard map toggles between Hebrew and English. This
is useful to start the Vim in native mode i.e. English (left-to-right
mode) and have default second language Farsi or Hebrew (right-to-left
mode). See |farsi.txt|.
This option was for using Farsi, which has been removed. See
|farsi.txt|.
*'ambiwidth'* *'ambw'*
'ambiwidth' 'ambw' string (default: "single")
global
{not in Vi}
{only available when compiled with the |+multi_byte|
feature}
Only effective when 'encoding' is "utf-8" or another Unicode encoding.
Tells Vim what to do with characters with East Asian Width Class
Ambiguous (such as Euro, Registered Sign, Copyright Sign, Greek
@ -1282,8 +1275,6 @@ A jump table for the options with a short description can be found at |Q_op|.
'bomb' boolean (default off)
local to buffer
{not in Vi}
{only available when compiled with the |+multi_byte|
feature}
When writing a file and the following conditions are met, a BOM (Byte
Order Mark) is prepended to the file:
- this option is on
@ -1445,8 +1436,6 @@ A jump table for the options with a short description can be found at |Q_op|.
'casemap' 'cmp' string (default: "internal,keepascii")
global
{not in Vi}
{only available when compiled with the |+multi_byte|
feature}
Specifies details about changing the case of letters. It may contain
these words, separated by a comma:
internal Use internal case mapping functions, the current
@ -1502,8 +1491,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'charconvert'* *'ccv'* *E202* *E214* *E513*
'charconvert' 'ccv' string (default "")
global
{only available when compiled with the |+multi_byte|
and |+eval| features}
{only available when compiled with the |+eval| feature}
{not in Vi}
An expression that is used for character encoding conversion. It is
evaluated when a file that is to be read or has been written has a
@ -1564,7 +1552,7 @@ A jump table for the options with a short description can be found at |Q_op|.
NOTE: This option is reset when 'compatible' is set.
*'cinkeys'* *'cink'*
'cinkeys' 'cink' string (default "0{,0},0),:,0#,!^F,o,O,e")
'cinkeys' 'cink' string (default "0{,0},0),0],:,0#,!^F,o,O,e")
local to buffer
{not in Vi}
{not available when compiled without the |+cindent|
@ -1662,7 +1650,6 @@ A jump table for the options with a short description can be found at |Q_op|.
You probably want to add this only temporarily,
possibly use BufEnter autocommands.
Only supported for GTK version 2 and later.
Only available with the |+multi_byte| feature.
*clipboard-exclude*
exclude:{pattern}
@ -2273,7 +2260,10 @@ A jump table for the options with a short description can be found at |Q_op|.
deleted only once. Also when repeating "R" with "."
and a count.
*cpo-y*
y A yank command can be redone with ".".
y A yank command can be redone with ".". Think twice if
you really want to use this, it may break some
plugins, since most people expect "." to only repeat a
change.
*cpo-Z*
Z When using "w!" while the 'readonly' option is set,
don't reset 'readonly'.
@ -2554,8 +2544,6 @@ A jump table for the options with a short description can be found at |Q_op|.
'delcombine' 'deco' boolean (default off)
global
{not in Vi}
{only available when compiled with the |+multi_byte|
feature}
If editing Unicode and this option is set, backspace and Normal mode
"x" delete each combining character on its own. When it is off (the
default) the character along with its combining characters are
@ -2632,6 +2620,9 @@ A jump table for the options with a short description can be found at |Q_op|.
context:{n} Use a context of {n} lines between a change
and a fold that contains unchanged lines.
When omitted a context of six lines is used.
When using zero the context is actually one,
since folds require a line in between, also
for a deleted line.
See |fold-diff|.
iblank Ignore changes where lines are all blank. Adds
@ -2806,16 +2797,12 @@ A jump table for the options with a short description can be found at |Q_op|.
'emoji' 'emo' boolean (default: on)
global
{not in Vi}
{only available when compiled with the |+multi_byte|
feature}
When on all Unicode emoji characters are considered to be full width.
*'encoding'* *'enc'* *E543*
'encoding' 'enc' string (default: "latin1" or value from $LANG)
global
{only available when compiled with the |+multi_byte|
feature}
{not in Vi}
Sets the character encoding used inside Vim. It applies to text in
the buffers, registers, Strings in expressions, text stored in the
@ -3018,8 +3005,6 @@ A jump table for the options with a short description can be found at |Q_op|.
*'fileencoding'* *'fenc'* *E213*
'fileencoding' 'fenc' string (default: "")
local to buffer
{only available when compiled with the |+multi_byte|
feature}
{not in Vi}
Sets the character encoding for the file of this buffer.
@ -3075,8 +3060,6 @@ A jump table for the options with a short description can be found at |Q_op|.
"ucs-bom,utf-8,default,latin1" when
'encoding' is set to a Unicode value)
global
{only available when compiled with the |+multi_byte|
feature}
{not in Vi}
This is a list of character encodings considered when starting to edit
an existing file. When a file is read, Vim tries to use the first
@ -3131,9 +3114,8 @@ A jump table for the options with a short description can be found at |Q_op|.
is read.
*'fileformat'* *'ff'*
'fileformat' 'ff' string (MS-DOS, MS-Windows, OS/2 default: "dos",
Unix default: "unix",
Macintosh default: "mac")
'fileformat' 'ff' string (MS-Windows default: "dos",
Unix, macOS default: "unix")
local to buffer
{not in Vi}
This gives the <EOL> of the current buffer, which is used for
@ -3156,9 +3138,8 @@ A jump table for the options with a short description can be found at |Q_op|.
*'fileformats'* *'ffs'*
'fileformats' 'ffs' string (default:
Vim+Vi MS-DOS, MS-Windows OS/2: "dos,unix",
Vim Unix: "unix,dos",
Vim Mac: "mac,unix,dos",
Vim+Vi MS-Windows: "dos,unix",
Vim Unix, macOS: "unix,dos",
Vi Cygwin: "unix,dos",
Vi others: "")
global
@ -3300,9 +3281,8 @@ A jump table for the options with a short description can be found at |Q_op|.
{not in Vi}
{only available when compiled with the |+rightleft|
feature}
When on, the keyboard is mapped for the Farsi character set.
Normally you would set 'allowrevins' and use CTRL-_ in insert mode to
toggle this option |i_CTRL-_|. See |farsi.txt|.
This option was for using Farsi, which has been removed. See
|farsi.txt|.
*'foldclose'* *'fcl'*
'foldclose' 'fcl' string (default "")
@ -4323,8 +4303,6 @@ A jump table for the options with a short description can be found at |Q_op|.
'imactivatefunc' 'imaf' string (default "")
global
{not in Vi}
{only available when compiled with the |+multi_byte|
feature}
This option specifies a function that will be called to
activate or deactivate the Input Method.
It is not used in the GUI.
@ -4376,8 +4354,6 @@ A jump table for the options with a short description can be found at |Q_op|.
'imcmdline' 'imc' boolean (default off)
global
{not in Vi}
{only available when compiled with the |+multi_byte|
feature}
When set the Input Method is always on when starting to edit a command
line, unless entering a search pattern (see 'imsearch' for that).
Setting this option is useful when your input method allows entering
@ -4388,8 +4364,6 @@ A jump table for the options with a short description can be found at |Q_op|.
'imdisable' 'imd' boolean (default off, on for some systems (SGI))
global
{not in Vi}
{only available when compiled with the |+multi_byte|
feature}
When set the Input Method is never used. This is useful to disable
the IM when it doesn't work properly.
Currently this option is on by default for SGI/IRIX machines. This
@ -4442,8 +4416,6 @@ A jump table for the options with a short description can be found at |Q_op|.
'imstatusfunc' 'imsf' string (default "")
global
{not in Vi}
{only available when compiled with the |+multi_byte|
feature}
This option specifies a function that is called to obtain the status
of Input Method. It must return a positive number when IME is active.
It is not used in the GUI.
@ -4604,7 +4576,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'indentkeys'* *'indk'*
'indentkeys' 'indk' string (default "0{,0},:,0#,!^F,o,O,e")
'indentkeys' 'indk' string (default "0{,0},0),0],:,0#,!^F,o,O,e")
local to buffer
{not in Vi}
{not available when compiled without the |+cindent|
@ -5188,8 +5160,6 @@ A jump table for the options with a short description can be found at |Q_op|.
*'makeencoding'* *'menc'*
'makeencoding' 'menc' string (default "")
global or local to buffer |global-local|
{only available when compiled with the |+multi_byte|
feature}
{not in Vi}
Encoding used for reading the output of external commands. When empty,
encoding is not converted.
@ -5256,8 +5226,6 @@ A jump table for the options with a short description can be found at |Q_op|.
'maxcombine' 'mco' number (default 2)
global
{not in Vi}
{only available when compiled with the |+multi_byte|
feature}
The maximum number of combining characters supported for displaying.
Only used when 'encoding' is "utf-8".
The default is OK for most languages. Hebrew may require 4.
@ -5532,8 +5500,9 @@ A jump table for the options with a short description can be found at |Q_op|.
The 'mousemodel' option is set by the |:behave| command.
*'mouseshape'* *'mouses'* *E547*
'mouseshape' 'mouses' string (default "i:beam,r:beam,s:updown,sd:cross,
m:no,ml:up-arrow,v:rightup-arrow")
'mouseshape' 'mouses' string (default "i-r:beam,s:updown,sd:udsizing,
vs:leftright,vd:lrsizing,m:no,
ml:up-arrow,v:rightup-arrow")
global
{not in Vi}
{only available when compiled with the |+mouseshape|
@ -6025,8 +5994,8 @@ A jump table for the options with a short description can be found at |Q_op|.
'printmbcharset' 'pmbcs' string (default "")
global
{not in Vi}
{only available when compiled with the |+printer|,
|+postscript| and |+multi_byte| features}
{only available when compiled with the |+printer|
and |+postscript| features}
The CJK character set to be used for CJK output from |:hardcopy|.
See |pmbcs-option|.
@ -6034,8 +6003,8 @@ A jump table for the options with a short description can be found at |Q_op|.
'printmbfont' 'pmbfn' string (default "")
global
{not in Vi}
{only available when compiled with the |+printer|,
|+postscript| and |+multi_byte| features}
{only available when compiled with the |+printer|
and |+postscript| features}
List of font names to be used for CJK output from |:hardcopy|.
See |pmbfn-option|.
@ -6587,14 +6556,18 @@ A jump table for the options with a short description can be found at |Q_op|.
*'scrolloff'* *'so'*
'scrolloff' 'so' number (default 0, set to 5 in |defaults.vim|)
global
global or local to window |global-local|
{not in Vi}
Minimal number of screen lines to keep above and below the cursor.
This will make some context visible around where you are working. If
you set it to a very large value (999) the cursor line will always be
in the middle of the window (except at the start or end of the file or
when long lines wrap).
For scrolling horizontally see 'sidescrolloff'.
After using the local value, go back the global value with one of
these two: >
setlocal scrolloff<
setlocal scrolloff=-1
< For scrolling horizontally see 'sidescrolloff'.
NOTE: This option is set to 0 when 'compatible' is set.
*'scrollopt'* *'sbo'*
@ -7149,7 +7122,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'sidescrolloff'* *'siso'*
'sidescrolloff' 'siso' number (default 0)
global
global or local to window |global-local|
{not in Vi}
The minimal number of screen columns to keep to the left and to the
right of the cursor if 'nowrap' is set. Setting this option to a
@ -7159,7 +7132,11 @@ A jump table for the options with a short description can be found at |Q_op|.
to a large value (like 999) has the effect of keeping the cursor
horizontally centered in the window, as long as one does not come too
close to the beginning of the line.
NOTE: This option is set to 0 when 'compatible' is set.
After using the local value, go back the global value with one of
these two: >
setlocal sidescrolloff<
setlocal sidescrolloff=-1
< NOTE: This option is set to 0 when 'compatible' is set.
Example: Try this together with 'sidescroll' and 'listchars' as
in the following example to never allow the cursor to move
@ -7994,8 +7971,6 @@ A jump table for the options with a short description can be found at |Q_op|.
'termencoding' 'tenc' string (default ""; with GTK+ GUI: "utf-8"; with
Macintosh GUI: "macroman")
global
{only available when compiled with the |+multi_byte|
feature}
{not in Vi}
Encoding used for the terminal. This specifies what character
encoding the keyboard produces and the display will understand. For
@ -8091,6 +8066,26 @@ A jump table for the options with a short description can be found at |Q_op|.
the size of the terminal. In that case the Vim window will be
adjusted to that size, if possible.
*'termwintype'* *'twt'*
'termwintype' 'twt' string (default "")
global
{not in Vi}
{only available when compiled with the |terminal|
feature on MS-Windows}
Specify the virtual console (pty) used when opening the terminal
window.
Possible values are:
"" use ConPTY if it is stable, winpty otherwise
"winpty" use winpty, fail if not supported
"conpty" use |ConPTY|, fail if not supported
|ConPTY| support depends on the platform. Windows 10 October 2018
Update is the first version that supports ConPTY, however it is still
considered unstable. ConPTY might become stable in the next release
of Windows 10. winpty support needs to be installed. If neither is
supported then you cannot open a terminal window.
*'terse'* *'noterse'*
'terse' boolean (default off)
global

View File

@ -1,4 +1,4 @@
*os_vms.txt* For Vim version 8.1. Last change: 2018 May 06
*os_vms.txt* For Vim version 8.1. Last change: 2019 Jan 29
VIM REFERENCE MANUAL
@ -104,6 +104,8 @@ to set up GUI fonts etc. correctly. See :help xim from Vim command prompt.
You may want to use GUI with GTK icons, then you have to download and install
GTK for OpenVMS or at least runtime shareable images - LIBGTK from
polarhome.com
Post 7.2 Vim uses GTK2+ while the last GTK on OpenVMS is 1.2.10, therefore
the GTK build is no longer available.
For more advanced questions, please send your problem to Vim on VMS mailing
list <vim-vms@polarhome.com>
@ -201,10 +203,10 @@ You can check that everything is at the right place with the :version command.
Example LOGIN.COM: >
$ define/nolog VIM RF10:[UTIL.VIM]
$ define/nolog VIM DKA0:[UTIL.VIM81]
$ vi*m :== mcr VIM:VIM.EXE
$ gv*im:== spawn/nowait/input=NLA0 mcr VIM:VIM.EXE -g -GEOMETRY 80x40
$ set disp/create/node=192.168.5.223/trans=tcpip
$ set disp/create/node=192.168.10.202/trans=tcpip
Note: This set-up should be enough, if you are working on a standalone server or
clustered environment, but if you want to use Vim as an internode editor in
@ -764,6 +766,16 @@ GNU_TOOLS.ZIP package downloadable from http://www.polarhome.com/vim/
9. VMS related changes *vms-changes*
Version 8.1
- make necessary changes to build v8.1 on VMS
Version 8.0
- solve the 100% cpu usage issue while waiting for a keystroke
- correct the VMS warnings and errors around handling the INFINITY (used in json.c)
- minor VMS port related changes
- correct the make_vms.mms file for 8.0
- fix [.TESTDIR]make_vms.mms for 8.0
Version 7.4
- Undo: VMS can not handle more than one dot in the filenames use "dir/name" -> "dir/_un_name"
add _un_ at the beginning to keep the extension

View File

@ -1,4 +1,4 @@
*pattern.txt* For Vim version 8.1. Last change: 2018 Dec 26
*pattern.txt* For Vim version 8.1. Last change: 2019 Feb 21
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1118,6 +1118,9 @@ x A single character, with no special meaning, matches itself
*[:tab:]* [:tab:] the <Tab> character
*[:escape:]* [:escape:] the <Esc> character
*[:backspace:]* [:backspace:] the <BS> character
*[:ident:]* [:ident:] identifier character (same as "\i")
*[:keyword:]* [:keyword:] keyword character (same as "\k")
*[:fname:]* [:fname:] file name character (same as "\f")
The brackets in character class expressions are additional to the
brackets delimiting a collection. For example, the following is a
plausible pattern for a UNIX filename: "[-./[:alnum:]_~]\+" That is,
@ -1132,7 +1135,7 @@ x A single character, with no special meaning, matches itself
The "Func" column shows what library function is used. The
implementation depends on the system. Otherwise:
(1) Uses islower() for ASCII and Vim builtin rules for other
characters when built with the |+multi_byte| feature.
characters.
(2) Uses Vim builtin rules
(3) As with (1) but using isupper()
*/[[=* *[==]*
@ -1208,7 +1211,7 @@ x A single character, with no special meaning, matches itself
\%u20AC Matches the character specified with up to four hexadecimal
characters.
\%U1234abcd Matches the character specified with up to eight hexadecimal
characters.
characters, up to 0x7fffffff
==============================================================================
7. Ignoring case in a pattern */ignorecase*

View File

@ -3504,7 +3504,7 @@ Example: Clear netrw's marked file list via a mapping on gu >
- Click "Add..."
- Set External Editor (adjust path as needed, include
the quotes and !.! at the end):
"c:\Program Files\Vim\vim70\gvim.exe" !.!
"c:\Program Files\Vim\vim81\gvim.exe" !.!
- Check that the filetype in the box below is
{asterisk}.{asterisk} (all files), or whatever types
you want (cec: change {asterisk} to * ; I had to
@ -3754,8 +3754,8 @@ by obtaining a copy of the latest (often developmental) netrw at:
The <netrw.vim> 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
/usr/local/share/vim/vim8x/plugin/netrwPlugin.vim
/usr/local/share/vim/vim8x/autoload/netrw.vim
(see output of :echo &rtp)
<
which is loaded automatically at startup (assuming :set nocp). If you

View File

@ -111,10 +111,9 @@ not recognized by Vim will just be converted to lower case and underscores
replaced with '-' signs.
If 'printencoding' is empty or Vim cannot find the file then it will use
'encoding' (if Vim is compiled with |+multi_byte| and it is set an 8-bit
encoding) to find the print character encoding file. If Vim is unable to find
a character encoding file then it will use the "latin1" print character
encoding file.
'encoding' (if it is set an 8-bit encoding) to find the print character
encoding file. If Vim is unable to find a character encoding file then it
will use the "latin1" print character encoding file.
When 'encoding' is set to a multi-byte encoding, Vim will try to convert
characters to the printing encoding for printing (if 'printencoding' is empty

View File

@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 8.1. Last change: 2019 Jan 09
*quickfix.txt* For Vim version 8.1. Last change: 2019 Jan 13
VIM REFERENCE MANUAL by Bram Moolenaar
@ -111,14 +111,14 @@ processing a quickfix or location list command, it will be aborted.
:[count]lne[xt][!] Same as ":cnext", except the location list for the
current window is used instead of the quickfix list.
:[count]cN[ext][!] *:cp* *:cprevious* *:cN* *:cNext*
:[count]cN[ext][!] *:cp* *:cprevious* *:cprev* *:cN* *:cNext*
:[count]cp[revious][!] Display the [count] previous error in the list that
includes a file name. If there are no file names at
all, go to the [count] previous error. See |:cc| for
[!] and 'switchbuf'.
:[count]lN[ext][!] *:lp* *:lprevious* *:lN* *:lNext*
:[count]lN[ext][!] *:lp* *:lprevious* *:lprev* *:lN* *:lNext*
:[count]lp[revious][!] Same as ":cNext" and ":cprevious", except the location
list for the current window is used instead of the
quickfix list.
@ -367,8 +367,8 @@ modify the title of a quickfix and location list respectively. Examples: >
<
*quickfix-index*
When you jump to a quickfix/location list entry using any of the quickfix
commands (e.g. |cc|, |cnext|, |cprev|, etc.), that entry becomes the currently
selected entry. The index of the currently selected entry in a
commands (e.g. |:cc|, |:cnext|, |:cprev|, etc.), that entry becomes the
currently selected entry. The index of the currently selected entry in a
quickfix/location list can be obtained using the getqflist()/getloclist()
functions. Examples: >
echo getqflist({'idx' : 0}).idx
@ -496,6 +496,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
second quickfix window. If [height] is given the
existing window will be resized to it.
*quickfix-buffer*
The window will contain a special buffer, with
'buftype' equal to "quickfix". Don't change this!
The window will have the w:quickfix_title variable set
@ -504,7 +505,11 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
status line if the value of 'statusline' is adjusted
properly. Whenever this buffer is modified by a
quickfix command or function, the |b:changedtick|
variable is incremented.
variable is incremented. You can get the number of
this buffer using the getqflist() and getloclist()
functions by passing the 'qfbufnr' item. For a
location list, this buffer is wiped out when the
location list is removed.
*:lop* *:lopen*
:lop[en] [height] Open a window to show the location list for the
@ -670,12 +675,18 @@ using these functions are below:
" get the quickfix list window id
:echo getqflist({'winid' : 0}).winid
" get the quickfix list window buffer number
:echo getqflist({'qfbufnr' : 0}).qfbufnr
" get the context of the current location list
:echo getloclist(0, {'context' : 0}).context
" get the location list window id of the third window
:echo getloclist(3, {'winid' : 0}).winid
" get the location list window buffer number of the third window
:echo getloclist(3, {'qfbufnr' : 0}).qfbufnr
" get the file window id of a location list window (winnr: 4)
:echo getloclist(4, {'filewinid' : 0}).filewinid
<

View File

@ -1,4 +1,4 @@
*quickref.txt* For Vim version 8.1. Last change: 2018 Apr 18
*quickref.txt* For Vim version 8.1. Last change: 2019 Feb 16
VIM REFERENCE MANUAL by Bram Moolenaar
@ -600,7 +600,6 @@ In Insert or Command-line mode:
Short explanation of each option: *option-list*
'aleph' 'al' ASCII code of the letter Aleph (Hebrew)
'allowrevins' 'ari' allow CTRL-_ in Insert and Command-line mode
'altkeymap' 'akm' for default second language (Farsi/Hebrew)
'ambiwidth' 'ambw' what to do with Unicode chars of ambiguous width
'antialias' 'anti' Mac OS X: use smooth, antialiased fonts
'autochdir' 'acd' change directory to the file in the current window
@ -700,7 +699,6 @@ Short explanation of each option: *option-list*
'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 <EOL>
'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
'foldenable' 'fen' set to display all folds open
@ -930,6 +928,7 @@ Short explanation of each option: *option-list*
'termwinkey' 'twk' key that precedes a Vim command in a terminal
'termwinscroll' 'twsl' max number of scrollback lines in a terminal window
'termwinsize' 'tws' size of a terminal window
'termwintype' 'twt' MS-Windows: type of pty to use for terminal window
'terse' shorten some messages
'textauto' 'ta' obsolete, use 'fileformats'
'textmode' 'tx' obsolete, use 'fileformat'

View File

@ -323,8 +323,6 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
set encoding=utf-8
scriptencoding utf-8
<
When compiled without the |+multi_byte| feature this
command is ignored.
{not in Vi}
*:scr* *:scriptnames*

View File

@ -55,8 +55,7 @@ automatic installs. Vim also needs to be compiled with |+gettext| feature for
user interface items translations to work.
After downloading an archive from RuVim project, unpack it into your
$VIMRUNTIME directory. We recommend using UTF-8 archive, if your version of
Vim is compiled with |+multi_byte| feature enabled.
$VIMRUNTIME directory. We recommend using UTF-8 archive.
In order to use the Russian documentation, make sure you have set the
'helplang' option to "ru".

View File

@ -1,4 +1,4 @@
*sign.txt* For Vim version 8.1. Last change: 2019 Jan 06
*sign.txt* For Vim version 8.1. Last change: 2019 Jan 17
VIM REFERENCE MANUAL by Gordon Prieur
@ -31,7 +31,7 @@ terminal emulator.
Signs and highlights are not useful just for debuggers. Sun's Visual
WorkShop uses signs and highlights to mark build errors and SourceBrowser
hits. Additionally, the debugger supports 8 to 10 different signs and
highlight colors. |workshop| Same for Netbeans |netbeans|.
highlight colors, see |NetBeans|.
There are two steps in using signs:
@ -43,6 +43,7 @@ There are two steps in using signs:
displayed. A defined sign can be placed several times in different lines
and files.
*sign-column*
When signs are defined for a file, Vim will automatically add a column of two
characters to display them in. When the last sign is unplaced the column
disappears again. This behavior can be changed with the 'signcolumn' option.
@ -55,7 +56,7 @@ Example to set the color: >
*sign-identifier*
Each placed sign is identified by a number called the sign identifier. This
identifier is used to jump to the sign or to remove the sign. The identifier
is assigned when placing the sign using the |sign-place| command or the
is assigned when placing the sign using the |:sign-place| command or the
|sign_place()| function. Each sign identifier should be a unique number. If
multiple placed signs use the same identifier, then jumping to or removing a
sign becomes unpredictable. To avoid overlapping identifiers, sign groups can
@ -76,6 +77,10 @@ on the same line, the attributes of the sign with the highest priority is used
independent of the sign group. The default priority for a sign is 10. The
priority is assigned at the time of placing a sign.
When the line on which the sign is placed is deleted, the sign is moved to the
next line (or the last line of the buffer, if there is no next line). When
the delete is undone the sign does not move back.
==============================================================================
2. Commands *sign-commands* *:sig* *:sign*

View File

@ -1,4 +1,4 @@
*spell.txt* For Vim version 8.1. Last change: 2018 Mar 29
*spell.txt* For Vim version 8.1. Last change: 2019 Jan 19
VIM REFERENCE MANUAL by Bram Moolenaar
@ -312,25 +312,25 @@ Exceptions:
spell file is used.
For example, with these values:
'runtimepath' is "~/.vim,/usr/share/vim70,~/.vim/after"
'runtimepath' is "~/.vim,/usr/share/vim81,~/.vim/after"
'encoding' is "iso-8859-2"
'spelllang' is "pl"
Vim will look for:
1. ~/.vim/spell/pl.iso-8859-2.spl
2. /usr/share/vim70/spell/pl.iso-8859-2.spl
2. /usr/share/vim81/spell/pl.iso-8859-2.spl
3. ~/.vim/spell/pl.iso-8859-2.add.spl
4. /usr/share/vim70/spell/pl.iso-8859-2.add.spl
4. /usr/share/vim81/spell/pl.iso-8859-2.add.spl
5. ~/.vim/after/spell/pl.iso-8859-2.add.spl
This assumes 1. is not found and 2. is found.
If 'encoding' is "latin1" Vim will look for:
1. ~/.vim/spell/pl.latin1.spl
2. /usr/share/vim70/spell/pl.latin1.spl
2. /usr/share/vim81/spell/pl.latin1.spl
3. ~/.vim/after/spell/pl.latin1.spl
4. ~/.vim/spell/pl.ascii.spl
5. /usr/share/vim70/spell/pl.ascii.spl
5. /usr/share/vim81/spell/pl.ascii.spl
6. ~/.vim/after/spell/pl.ascii.spl
This assumes none of them are found (Polish doesn't make sense when leaving
@ -577,7 +577,7 @@ When the Myspell files are updated you can merge the differences:
vimdiff xx_YY.orig.dic xx_YY.new.dic
3. Take over the changes you like in xx_YY.dic.
You may also need to change xx_YY.aff.
4. Rename xx_YY.new.dic to xx_YY.orig.dic and xx_YY.new.aff to xx_YY.new.aff.
4. Rename xx_YY.new.dic to xx_YY.orig.dic and xx_YY.new.aff to xx_YY.orig.aff.
SPELL FILE VERSIONS *E770* *E771* *E772*
@ -1582,6 +1582,10 @@ CHECKCOMPOUNDTRIPLE (Hunspell) *spell-CHECKCOMPOUNDTRIPLE*
Forbid three identical characters when compounding. Not
supported.
CHECKSHARPS (Hunspell)) *spell-CHECKSHARPS*
SS letter pair in uppercased (German) words may be upper case
sharp s (ß). Not supported.
COMPLEXPREFIXES (Hunspell) *spell-COMPLEXPREFIXES*
Enables using two prefixes. Not supported.
@ -1595,12 +1599,21 @@ COMPOUNDFIRST (Hunspell) *spell-COMPOUNDFIRST*
Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
COMPOUNDBEGIN (Hunspell) *spell-COMPOUNDBEGIN*
Words signed with COMPOUNDBEGIN may be first elements in
compound words.
Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
COMPOUNDLAST (Hunspell) *spell-COMPOUNDLAST*
Words signed with COMPOUNDLAST may be last elements in
compound words.
Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
COMPOUNDEND (Hunspell) *spell-COMPOUNDEND*
Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
Probably the same as COMPOUNDLAST
COMPOUNDMIDDLE (Hunspell) *spell-COMPOUNDMIDDLE*
Words signed with COMPOUNDMIDDLE may be middle elements in
compound words.
Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
COMPOUNDRULES (Hunspell) *spell-COMPOUNDRULES*

View File

@ -1,4 +1,4 @@
*starting.txt* For Vim version 8.1. Last change: 2018 May 05
*starting.txt* For Vim version 8.1. Last change: 2019 Feb 16
VIM REFERENCE MANUAL by Bram Moolenaar
@ -248,12 +248,18 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
changes and writing.
{not in Vi}
*-Z* *restricted-mode* *E145*
*-Z* *restricted-mode* *E145* *E981*
-Z Restricted mode. All commands that make use of an external
shell are disabled. This includes suspending with CTRL-Z,
":sh", filtering, the system() function, backtick expansion,
delete(), rename(), mkdir(), writefile(), libcall(),
job_start(), etc.
":sh", filtering, the system() function, backtick expansion
and libcall().
Also disallowed are delete(), rename(), mkdir(), job_start(),
etc.
Interfaces, such as Python, Ruby and Lua, are also disabled,
since they could be used to execute shell commands. Perl uses
the Safe module.
Note that the user may still find a loophole to execute a
shell command, it has only been made difficult.
{not in Vi}
*-g*
@ -315,9 +321,8 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
and exits.) {not in Vi}
*-F*
-F Farsi mode. Sets the 'fkmap' and 'rightleft' options on.
(Only when compiled with |+rightleft| and |+farsi| features,
otherwise Vim gives an error message and exits.) {not in Vi}
-F This was used for Farsi mode, which has been removed.
See |farsi.txt|.
*-H*
-H Hebrew mode. Sets the 'hkmap' and 'rightleft' options on.

View File

@ -1095,6 +1095,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'termwinkey' options.txt /*'termwinkey'*
'termwinscroll' options.txt /*'termwinscroll'*
'termwinsize' options.txt /*'termwinsize'*
'termwintype' options.txt /*'termwintype'*
'terse' options.txt /*'terse'*
'textauto' options.txt /*'textauto'*
'textmode' options.txt /*'textmode'*
@ -1135,6 +1136,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'twk' options.txt /*'twk'*
'tws' options.txt /*'tws'*
'twsl' options.txt /*'twsl'*
'twt' options.txt /*'twt'*
'tx' options.txt /*'tx'*
'uc' options.txt /*'uc'*
'udf' options.txt /*'udf'*
@ -1717,6 +1719,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
05.6 usr_05.txt /*05.6*
05.7 usr_05.txt /*05.7*
05.8 usr_05.txt /*05.8*
05.9 usr_05.txt /*05.9*
06.1 usr_06.txt /*06.1*
06.2 usr_06.txt /*06.2*
06.3 usr_06.txt /*06.3*
@ -2238,6 +2241,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:cp quickfix.txt /*:cp*
:cpf quickfix.txt /*:cpf*
:cpfile quickfix.txt /*:cpfile*
:cprev quickfix.txt /*:cprev*
:cprevious quickfix.txt /*:cprevious*
:cq quickfix.txt /*:cq*
:cquit quickfix.txt /*:cquit*
@ -2517,6 +2521,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:lefta windows.txt /*:lefta*
:leftabove windows.txt /*:leftabove*
:let eval.txt /*:let*
:let%= eval.txt /*:let%=*
:let+= eval.txt /*:let+=*
:let-$ eval.txt /*:let-$*
:let-& eval.txt /*:let-&*
@ -2527,6 +2532,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:let-register eval.txt /*:let-register*
:let-unpack eval.txt /*:let-unpack*
:let.= eval.txt /*:let.=*
:let/= eval.txt /*:let\/=*
:letstar= eval.txt /*:letstar=*
:lex quickfix.txt /*:lex*
:lexpr quickfix.txt /*:lexpr*
:lf quickfix.txt /*:lf*
@ -2584,6 +2591,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:lp quickfix.txt /*:lp*
:lpf quickfix.txt /*:lpf*
:lpfile quickfix.txt /*:lpfile*
:lprev quickfix.txt /*:lprev*
:lprevious quickfix.txt /*:lprevious*
:lr quickfix.txt /*:lr*
:lrewind quickfix.txt /*:lrewind*
@ -2838,6 +2846,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:redraw various.txt /*:redraw*
:redraws various.txt /*:redraws*
:redrawstatus various.txt /*:redrawstatus*
:redrawt various.txt /*:redrawt*
:redrawtabline various.txt /*:redrawtabline*
:reg change.txt /*:reg*
:registers change.txt /*:registers*
:res windows.txt /*:res*
@ -3315,8 +3325,6 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:write_a editing.txt /*:write_a*
:write_c editing.txt /*:write_c*
:write_f editing.txt /*:write_f*
:ws workshop.txt /*:ws*
:wsverb workshop.txt /*:wsverb*
:wundo undo.txt /*:wundo*
:wv starting.txt /*:wv*
:wviminfo starting.txt /*:wviminfo*
@ -3576,6 +3584,9 @@ Athena gui_x11.txt /*Athena*
B motion.txt /*B*
BeBox os_beos.txt /*BeBox*
BeOS os_beos.txt /*BeOS*
Blob eval.txt /*Blob*
Blobs eval.txt /*Blobs*
Boolean eval.txt /*Boolean*
Bram intro.txt /*Bram*
BufAdd autocmd.txt /*BufAdd*
BufCreate autocmd.txt /*BufCreate*
@ -3634,7 +3645,6 @@ CTRL-V-alternative gui_w32.txt /*CTRL-V-alternative*
CTRL-W index.txt /*CTRL-W*
CTRL-W_+ windows.txt /*CTRL-W_+*
CTRL-W_- windows.txt /*CTRL-W_-*
CTRL-W_. terminal.txt /*CTRL-W_.*
CTRL-W_: windows.txt /*CTRL-W_:*
CTRL-W_< windows.txt /*CTRL-W_<*
CTRL-W_<BS> windows.txt /*CTRL-W_<BS>*
@ -3674,7 +3684,6 @@ CTRL-W_H windows.txt /*CTRL-W_H*
CTRL-W_J windows.txt /*CTRL-W_J*
CTRL-W_K windows.txt /*CTRL-W_K*
CTRL-W_L windows.txt /*CTRL-W_L*
CTRL-W_N terminal.txt /*CTRL-W_N*
CTRL-W_P windows.txt /*CTRL-W_P*
CTRL-W_R windows.txt /*CTRL-W_R*
CTRL-W_S windows.txt /*CTRL-W_S*
@ -3689,9 +3698,11 @@ CTRL-W_c windows.txt /*CTRL-W_c*
CTRL-W_d tagsrch.txt /*CTRL-W_d*
CTRL-W_f windows.txt /*CTRL-W_f*
CTRL-W_gF windows.txt /*CTRL-W_gF*
CTRL-W_gT windows.txt /*CTRL-W_gT*
CTRL-W_g] windows.txt /*CTRL-W_g]*
CTRL-W_g_CTRL-] windows.txt /*CTRL-W_g_CTRL-]*
CTRL-W_gf windows.txt /*CTRL-W_gf*
CTRL-W_gt windows.txt /*CTRL-W_gt*
CTRL-W_g} windows.txt /*CTRL-W_g}*
CTRL-W_h windows.txt /*CTRL-W_h*
CTRL-W_i tagsrch.txt /*CTRL-W_i*
@ -3702,7 +3713,6 @@ CTRL-W_n windows.txt /*CTRL-W_n*
CTRL-W_o windows.txt /*CTRL-W_o*
CTRL-W_p windows.txt /*CTRL-W_p*
CTRL-W_q windows.txt /*CTRL-W_q*
CTRL-W_quote terminal.txt /*CTRL-W_quote*
CTRL-W_r windows.txt /*CTRL-W_r*
CTRL-W_s windows.txt /*CTRL-W_s*
CTRL-W_t windows.txt /*CTRL-W_t*
@ -3736,6 +3746,7 @@ ColorSchemePre autocmd.txt /*ColorSchemePre*
Command-line cmdline.txt /*Command-line*
Command-line-mode cmdline.txt /*Command-line-mode*
CompleteDone autocmd.txt /*CompleteDone*
ConPTY terminal.txt /*ConPTY*
Contents quickref.txt /*Contents*
Cscope if_cscop.txt /*Cscope*
CursorHold autocmd.txt /*CursorHold*
@ -3748,6 +3759,7 @@ D change.txt /*D*
DOS os_dos.txt /*DOS*
DOS-format editing.txt /*DOS-format*
DOS-format-write editing.txt /*DOS-format-write*
Dict eval.txt /*Dict*
Dictionaries eval.txt /*Dictionaries*
Dictionary eval.txt /*Dictionary*
Dictionary-function eval.txt /*Dictionary-function*
@ -4586,7 +4598,10 @@ E892 eval.txt /*E892*
E893 eval.txt /*E893*
E894 eval.txt /*E894*
E895 if_mzsch.txt /*E895*
E896 eval.txt /*E896*
E897 eval.txt /*E897*
E898 channel.txt /*E898*
E899 eval.txt /*E899*
E90 message.txt /*E90*
E901 channel.txt /*E901*
E902 channel.txt /*E902*
@ -4665,7 +4680,18 @@ E969 eval.txt /*E969*
E97 diff.txt /*E97*
E970 eval.txt /*E970*
E971 textprop.txt /*E971*
E972 eval.txt /*E972*
E973 eval.txt /*E973*
E974 eval.txt /*E974*
E975 eval.txt /*E975*
E976 eval.txt /*E976*
E977 eval.txt /*E977*
E978 eval.txt /*E978*
E979 eval.txt /*E979*
E98 diff.txt /*E98*
E980 eval.txt /*E980*
E981 starting.txt /*E981*
E982 terminal.txt /*E982*
E99 diff.txt /*E99*
EX intro.txt /*EX*
EXINIT starting.txt /*EXINIT*
@ -4769,9 +4795,11 @@ N: cmdline.txt /*N:*
N<Del> various.txt /*N<Del>*
NFA pattern.txt /*NFA*
NL-used-for-Nul pattern.txt /*NL-used-for-Nul*
NeoVim intro.txt /*NeoVim*
Neovim intro.txt /*Neovim*
NetBSD-backspace options.txt /*NetBSD-backspace*
NetBeans netbeans.txt /*NetBeans*
NetUserPass() pi_netrw.txt /*NetUserPass()*
None eval.txt /*None*
Normal intro.txt /*Normal*
Normal-mode intro.txt /*Normal-mode*
Number eval.txt /*Number*
@ -4879,6 +4907,7 @@ SessionLoadPost autocmd.txt /*SessionLoadPost*
ShellCmdPost autocmd.txt /*ShellCmdPost*
ShellFilterPost autocmd.txt /*ShellFilterPost*
SourceCmd autocmd.txt /*SourceCmd*
SourcePost autocmd.txt /*SourcePost*
SourcePre autocmd.txt /*SourcePre*
Special eval.txt /*Special*
SpellFileMissing autocmd.txt /*SpellFileMissing*
@ -4991,7 +5020,10 @@ ZZ editing.txt /*ZZ*
[:cntrl:] pattern.txt /*[:cntrl:]*
[:digit:] pattern.txt /*[:digit:]*
[:escape:] pattern.txt /*[:escape:]*
[:fname:] pattern.txt /*[:fname:]*
[:graph:] pattern.txt /*[:graph:]*
[:ident:] pattern.txt /*[:ident:]*
[:keyword:] pattern.txt /*[:keyword:]*
[:lower:] pattern.txt /*[:lower:]*
[:print:] pattern.txt /*[:print:]*
[:punct:] pattern.txt /*[:punct:]*
@ -5281,6 +5313,11 @@ beval_winid-variable eval.txt /*beval_winid-variable*
beval_winnr-variable eval.txt /*beval_winnr-variable*
binary-number eval.txt /*binary-number*
bitwise-function usr_41.txt /*bitwise-function*
blob eval.txt /*blob*
blob-identity eval.txt /*blob-identity*
blob-index eval.txt /*blob-index*
blob-literal eval.txt /*blob-literal*
blob-modification eval.txt /*blob-modification*
blockwise-examples visual.txt /*blockwise-examples*
blockwise-operators visual.txt /*blockwise-operators*
blockwise-register change.txt /*blockwise-register*
@ -5461,6 +5498,7 @@ ch_log() eval.txt /*ch_log()*
ch_logfile() eval.txt /*ch_logfile()*
ch_open() eval.txt /*ch_open()*
ch_read() eval.txt /*ch_read()*
ch_readblob() eval.txt /*ch_readblob()*
ch_readraw() eval.txt /*ch_readraw()*
ch_sendexpr() eval.txt /*ch_sendexpr()*
ch_sendraw() eval.txt /*ch_sendraw()*
@ -5820,6 +5858,7 @@ dec-mouse options.txt /*dec-mouse*
decada_members ft_ada.txt /*decada_members*
deepcopy() eval.txt /*deepcopy()*
defaults.vim starting.txt /*defaults.vim*
defaults.vim-explained usr_05.txt /*defaults.vim-explained*
definition-search tagsrch.txt /*definition-search*
definitions intro.txt /*definitions*
delete() eval.txt /*delete()*
@ -6093,7 +6132,6 @@ f motion.txt /*f*
false-variable eval.txt /*false-variable*
faq intro.txt /*faq*
farsi farsi.txt /*farsi*
farsi-fonts farsi.txt /*farsi-fonts*
farsi.txt farsi.txt /*farsi.txt*
fasm.vim syntax.txt /*fasm.vim*
fcs_choice-variable eval.txt /*fcs_choice-variable*
@ -6319,6 +6357,7 @@ ft-rmd-plugin filetype.txt /*ft-rmd-plugin*
ft-rmd-syntax syntax.txt /*ft-rmd-syntax*
ft-rrst-plugin filetype.txt /*ft-rrst-plugin*
ft-rrst-syntax syntax.txt /*ft-rrst-syntax*
ft-rst-plugin filetype.txt /*ft-rst-plugin*
ft-rst-syntax syntax.txt /*ft-rst-syntax*
ft-ruby-omni insert.txt /*ft-ruby-omni*
ft-ruby-syntax syntax.txt /*ft-ruby-syntax*
@ -7286,7 +7325,7 @@ lambda eval.txt /*lambda*
lang-variable eval.txt /*lang-variable*
language-mapping map.txt /*language-mapping*
last-pattern pattern.txt /*last-pattern*
last-position-jump eval.txt /*last-position-jump*
last-position-jump usr_05.txt /*last-position-jump*
last_buffer_nr() eval.txt /*last_buffer_nr()*
latex-syntax syntax.txt /*latex-syntax*
lc_time-variable eval.txt /*lc_time-variable*
@ -7341,6 +7380,7 @@ locale mbyte.txt /*locale*
locale-name mbyte.txt /*locale-name*
localtime() eval.txt /*localtime()*
location-list quickfix.txt /*location-list*
location-list-file-window quickfix.txt /*location-list-file-window*
location-list-window quickfix.txt /*location-list-window*
log() eval.txt /*log()*
log10() eval.txt /*log10()*
@ -7586,6 +7626,7 @@ netbeans-protocol netbeans.txt /*netbeans-protocol*
netbeans-run netbeans.txt /*netbeans-run*
netbeans-setup netbeans.txt /*netbeans-setup*
netbeans-support netbeans.txt /*netbeans-support*
netbeans-xpm netbeans.txt /*netbeans-xpm*
netbeans.txt netbeans.txt /*netbeans.txt*
netreadfixup pi_netrw.txt /*netreadfixup*
netrw pi_netrw.txt /*netrw*
@ -7952,6 +7993,7 @@ omni-sql-completion ft_sql.txt /*omni-sql-completion*
online-help helphelp.txt /*online-help*
opening-window windows.txt /*opening-window*
operator motion.txt /*operator*
operator-pending-index index.txt /*operator-pending-index*
operator-variable eval.txt /*operator-variable*
option-backslash options.txt /*option-backslash*
option-list quickref.txt /*option-list*
@ -8019,6 +8061,7 @@ peace intro.txt /*peace*
penc-option print.txt /*penc-option*
perl if_perl.txt /*perl*
perl-Append if_perl.txt /*perl-Append*
perl-Blob if_perl.txt /*perl-Blob*
perl-Buffer if_perl.txt /*perl-Buffer*
perl-Buffers if_perl.txt /*perl-Buffers*
perl-Count if_perl.txt /*perl-Count*
@ -8207,12 +8250,14 @@ quake.vim syntax.txt /*quake.vim*
quickfix quickfix.txt /*quickfix*
quickfix-6 version6.txt /*quickfix-6*
quickfix-ID quickfix.txt /*quickfix-ID*
quickfix-buffer quickfix.txt /*quickfix-buffer*
quickfix-changedtick quickfix.txt /*quickfix-changedtick*
quickfix-context quickfix.txt /*quickfix-context*
quickfix-directory-stack quickfix.txt /*quickfix-directory-stack*
quickfix-error-lists quickfix.txt /*quickfix-error-lists*
quickfix-functions usr_41.txt /*quickfix-functions*
quickfix-gcc quickfix.txt /*quickfix-gcc*
quickfix-index quickfix.txt /*quickfix-index*
quickfix-manx quickfix.txt /*quickfix-manx*
quickfix-parse quickfix.txt /*quickfix-parse*
quickfix-perl quickfix.txt /*quickfix-perl*
@ -8332,6 +8377,7 @@ rrst.vim syntax.txt /*rrst.vim*
rst.vim syntax.txt /*rst.vim*
rsync pi_netrw.txt /*rsync*
ruby if_ruby.txt /*ruby*
ruby-blob if_ruby.txt /*ruby-blob*
ruby-buffer if_ruby.txt /*ruby-buffer*
ruby-command if_ruby.txt /*ruby-command*
ruby-commands if_ruby.txt /*ruby-commands*
@ -8482,9 +8528,11 @@ shift-left-right change.txt /*shift-left-right*
shiftwidth() eval.txt /*shiftwidth()*
short-name-changed version4.txt /*short-name-changed*
showing-menus gui.txt /*showing-menus*
sign-column sign.txt /*sign-column*
sign-commands sign.txt /*sign-commands*
sign-functions usr_41.txt /*sign-functions*
sign-group sign.txt /*sign-group*
sign-identifier sign.txt /*sign-identifier*
sign-intro sign.txt /*sign-intro*
sign-priority sign.txt /*sign-priority*
sign-support sign.txt /*sign-support*
@ -8492,6 +8540,7 @@ sign.txt sign.txt /*sign.txt*
sign_define() eval.txt /*sign_define()*
sign_getdefined() eval.txt /*sign_getdefined()*
sign_getplaced() eval.txt /*sign_getplaced()*
sign_jump() eval.txt /*sign_jump()*
sign_place() eval.txt /*sign_place()*
sign_undefine() eval.txt /*sign_undefine()*
sign_unplace() eval.txt /*sign_unplace()*
@ -8531,6 +8580,7 @@ spell-CHECKCOMPOUNDDUP spell.txt /*spell-CHECKCOMPOUNDDUP*
spell-CHECKCOMPOUNDPATTERN spell.txt /*spell-CHECKCOMPOUNDPATTERN*
spell-CHECKCOMPOUNDREP spell.txt /*spell-CHECKCOMPOUNDREP*
spell-CHECKCOMPOUNDTRIPLE spell.txt /*spell-CHECKCOMPOUNDTRIPLE*
spell-CHECKSHARPS spell.txt /*spell-CHECKSHARPS*
spell-CIRCUMFIX spell.txt /*spell-CIRCUMFIX*
spell-COMMON spell.txt /*spell-COMMON*
spell-COMPLEXPREFIXES spell.txt /*spell-COMPLEXPREFIXES*
@ -8540,6 +8590,7 @@ spell-COMPOUNDEND spell.txt /*spell-COMPOUNDEND*
spell-COMPOUNDFIRST spell.txt /*spell-COMPOUNDFIRST*
spell-COMPOUNDFLAG spell.txt /*spell-COMPOUNDFLAG*
spell-COMPOUNDFORBIDFLAG spell.txt /*spell-COMPOUNDFORBIDFLAG*
spell-COMPOUNDLAST spell.txt /*spell-COMPOUNDLAST*
spell-COMPOUNDMIDDLE spell.txt /*spell-COMPOUNDMIDDLE*
spell-COMPOUNDMIN spell.txt /*spell-COMPOUNDMIN*
spell-COMPOUNDPERMITFLAG spell.txt /*spell-COMPOUNDPERMITFLAG*
@ -8775,7 +8826,14 @@ t_AL term.txt /*t_AL*
t_BD term.txt /*t_BD*
t_BE term.txt /*t_BE*
t_CS term.txt /*t_CS*
t_CTRL-W_. terminal.txt /*t_CTRL-W_.*
t_CTRL-W_: terminal.txt /*t_CTRL-W_:*
t_CTRL-W_CTRL-C terminal.txt /*t_CTRL-W_CTRL-C*
t_CTRL-W_CTRL-W terminal.txt /*t_CTRL-W_CTRL-W*
t_CTRL-W_N terminal.txt /*t_CTRL-W_N*
t_CTRL-W_gT terminal.txt /*t_CTRL-W_gT*
t_CTRL-W_gt terminal.txt /*t_CTRL-W_gt*
t_CTRL-W_quote terminal.txt /*t_CTRL-W_quote*
t_CTRL-\_CTRL-N terminal.txt /*t_CTRL-\\_CTRL-N*
t_CV term.txt /*t_CV*
t_Ce term.txt /*t_Ce*
@ -8843,6 +8901,7 @@ t_ZH term.txt /*t_ZH*
t_ZR term.txt /*t_ZR*
t_al term.txt /*t_al*
t_bc term.txt /*t_bc*
t_blob-variable eval.txt /*t_blob-variable*
t_bool-variable eval.txt /*t_bool-variable*
t_cd term.txt /*t_cd*
t_cdl version4.txt /*t_cdl*
@ -9110,6 +9169,7 @@ terminal-diffscreendump terminal.txt /*terminal-diffscreendump*
terminal-dumptest terminal.txt /*terminal-dumptest*
terminal-functions usr_41.txt /*terminal-functions*
terminal-info term.txt /*terminal-info*
terminal-job-index index.txt /*terminal-job-index*
terminal-key-codes term.txt /*terminal-key-codes*
terminal-ms-windows terminal.txt /*terminal-ms-windows*
terminal-options term.txt /*terminal-options*
@ -9134,6 +9194,7 @@ test_autochdir() eval.txt /*test_autochdir()*
test_feedinput() eval.txt /*test_feedinput()*
test_garbagecollect_now() eval.txt /*test_garbagecollect_now()*
test_ignore_error() eval.txt /*test_ignore_error()*
test_null_blob() eval.txt /*test_null_blob()*
test_null_channel() eval.txt /*test_null_channel()*
test_null_dict() eval.txt /*test_null_dict()*
test_null_job() eval.txt /*test_null_job()*
@ -9166,6 +9227,7 @@ tex.vim syntax.txt /*tex.vim*
text-functions usr_41.txt /*text-functions*
text-objects motion.txt /*text-objects*
text-objects-changed version5.txt /*text-objects-changed*
text-prop-changes textprop.txt /*text-prop-changes*
text-prop-functions textprop.txt /*text-prop-functions*
text-prop-intro textprop.txt /*text-prop-intro*
text-properties textprop.txt /*text-properties*
@ -9356,6 +9418,7 @@ v:swapchoice eval.txt /*v:swapchoice*
v:swapcommand eval.txt /*v:swapcommand*
v:swapname eval.txt /*v:swapname*
v:t_TYPE eval.txt /*v:t_TYPE*
v:t_blob eval.txt /*v:t_blob*
v:t_bool eval.txt /*v:t_bool*
v:t_channel eval.txt /*v:t_channel*
v:t_dict eval.txt /*v:t_dict*
@ -9726,12 +9789,7 @@ word-motions motion.txt /*word-motions*
wordcount() eval.txt /*wordcount()*
workbench starting.txt /*workbench*
workshop workshop.txt /*workshop*
workshop-commands workshop.txt /*workshop-commands*
workshop-compiling workshop.txt /*workshop-compiling*
workshop-configure workshop.txt /*workshop-configure*
workshop-intro workshop.txt /*workshop-intro*
workshop-support workshop.txt /*workshop-support*
workshop-xpm workshop.txt /*workshop-xpm*
workshop.txt workshop.txt /*workshop.txt*
wrap-off intro.txt /*wrap-off*
write-compiler-plugin usr_41.txt /*write-compiler-plugin*

View File

@ -1,4 +1,4 @@
*tagsrch.txt* For Vim version 8.1. Last change: 2018 May 04
*tagsrch.txt* For Vim version 8.1. Last change: 2019 Feb 25
VIM REFERENCE MANUAL by Bram Moolenaar
@ -571,7 +571,14 @@ only supported by new versions of ctags (such as Exuberant ctags).
{term} ;" The two characters semicolon and double quote. This is
interpreted by Vi as the start of a comment, which makes the
following be ignored. This is for backwards compatibility
with Vi, it ignores the following fields.
with Vi, it ignores the following fields. Example:
APP file /^static int APP;$/;" v
When {tagaddress} is not a line number or search pattern, then
{term} must be |;". Here the bar ends the command (excluding
the bar) and ;" is used to have Vi ignore the rest of the
line. Example:
APP file.c call cursor(3, 4)|;" v
{field} .. A list of optional fields. Each field has the form:
<Tab>{fieldname}:{value}
@ -606,8 +613,7 @@ ignored. (Case is ignored when 'ignorecase' is set and 'tagcase' is
The value '2' should be used then:
!_TAG_FILE_SORTED<Tab>2<Tab>{anything} ~
The other tag that Vim recognizes, but only when compiled with the
|+multi_byte| feature, is the encoding of the tags file:
The other tag that Vim recognizes is the encoding of the tags file:
!_TAG_FILE_ENCODING<Tab>utf-8<Tab>{anything} ~
Here "utf-8" is the encoding used for the tags. Vim will then convert the tag
being searched for from 'encoding' to the encoding of the tags file. And when

View File

@ -1,4 +1,4 @@
*term.txt* For Vim version 8.1. Last change: 2017 Oct 14
*term.txt* For Vim version 8.1. Last change: 2019 Jan 19
VIM REFERENCE MANUAL by Bram Moolenaar
@ -334,11 +334,15 @@ Added by Vim (there are no standard codes for these):
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|
The response is stored in |v:termresponse|
|xterm-8bit| |'ttymouse'| |xterm-codes|
t_u7 request cursor position (for xterm) *t_u7* *'t_u7'*
see |'ambiwidth'|
The response is stored in |v:termu7resp|
t_RF request terminal foreground color *t_RF* *'t_RF'*
The response is stored in |v:termrfgresp|
t_RB request terminal background color *t_RB* *'t_RB'*
The response is stored in |v:termrbgresp|
t_8f set foreground color (R, G, B) *t_8f* *'t_8f'*
|xterm-true-color|
t_8b set background color (R, G, B) *t_8b* *'t_8b'*
@ -351,7 +355,9 @@ Added by Vim (there are no standard codes for these):
t_EC set cursor color end *t_EC* *'t_EC'*
t_SH set cursor shape *t_SH* *'t_SH'*
t_RC request terminal cursor blinking *t_RC* *'t_RC'*
The response is stored in |v:termblinkresp|
t_RS request terminal cursor style *t_RS* *'t_RS'*
The response is stored in |v:termstyleresp|
t_ST save window title to stack *t_ST* *'t_ST'*
t_RT restore window title from stack *t_RT* *'t_RT'*
t_Si save icon text to stack *t_Si* *'t_Si'*

View File

@ -1,4 +1,4 @@
*terminal.txt* For Vim version 8.1. Last change: 2018 May 17
*terminal.txt* For Vim version 8.1. Last change: 2019 Feb 25
VIM REFERENCE MANUAL by Bram Moolenaar
@ -44,7 +44,7 @@ If the result is "1" you have it.
{Vi does not have any of these commands}
{only available when compiled with the |+terminal| feature}
The terminal feature requires the |+multi_byte|, |+job| and |+channel| features.
The terminal feature requires the |+job| and |+channel| features.
==============================================================================
1. Basic use *terminal-use*
@ -66,20 +66,23 @@ When the keyboard focus is in the terminal window, typed keys will be sent to
the job. This uses a pty when possible. You can click outside of the
terminal window to move keyboard focus elsewhere.
*t_CTRL-W_CTRL-W* *t_CTRL-W_:*
CTRL-W can be used to navigate between windows and other CTRL-W commands, e.g.:
CTRL-W CTRL-W move focus to the next window
CTRL-W : enter an Ex command
See |CTRL-W| for more commands.
Special in the terminal window: *CTRL-W_.* *CTRL-W_N*
Special in the terminal window: *t_CTRL-W_.* *t_CTRL-W_N*
CTRL-W . send a CTRL-W to the job in the terminal
CTRL-W CTRL-\ send a CTRL-\ to the job in the terminal
CTRL-W N go to Terminal-Normal mode, see |Terminal-mode|
CTRL-\ CTRL-N go to Terminal-Normal mode, see |Terminal-mode|
CTRL-W " {reg} paste register {reg} *CTRL-W_quote*
CTRL-W " {reg} paste register {reg} *t_CTRL-W_quote*
Also works with the = register to insert the result of
evaluating an expression.
CTRL-W CTRL-C ends the job, see below |t_CTRL-W_CTRL-C|
CTRL-W gt go to next tabpage, same as `gt` *t_CTRL-W_gt*
CTRL-W gT go to previous tabpage, same as `gT` *t_CTRL-W_gT*
See option 'termwinkey' for specifying another key instead of CTRL-W that
will work like CTRL-W. However, typing 'termwinkey' twice sends 'termwinkey'
@ -90,8 +93,8 @@ to the job. For example:
'termwinkey' . send 'termwinkey' to the job in the terminal
'termwinkey' CTRL-\ send a CTRL-\ to the job in the terminal
'termwinkey' N go to terminal Normal mode, see below
'termwinkey' CTRL-N same as CTRL-W N
'termwinkey' CTRL-C same as |t_CTRL-W_CTRL-C|
'termwinkey' CTRL-N same as CTRL-W N |t_CTRL-W_N|
'termwinkey' CTRL-C same as CTRL-W CTRL-C |t_CTRL-W_CTRL-C|
*t_CTRL-\_CTRL-N*
The special key combination CTRL-\ CTRL-N can be used to switch to Normal
mode, just like this works in any other mode.
@ -228,6 +231,9 @@ Syntax ~
for Python "++eof=exit()". Special
codes can be used like with `:map`,
e.g. "<C-Z>" for CTRL-Z.
++type={pty} (MS-Windows only): Use {pty} as the
virtual console. See 'termwintype'
for the values.
If you want to use more options use the |term_start()|
function.
@ -410,6 +416,13 @@ Just put the files somewhere in your PATH. You can set the 'winptydll' option
to point to the right file, if needed. If you have both the 32-bit and 64-bit
version, rename to winpty32.dll and winpty64.dll to match the way Vim was
build.
*ConPTY* *E982*
On more recent versions of MS-Windows 10 (beginning with the "October 2018
Update"), winpty is no longer required. On those versions, |:terminal| will use
Windows' built-in support for hosting terminal applications, "ConPTY". When
ConPTY is in use, there may be rendering artifacts regarding ambiguous-width
characters. If you encounter any such issues, install "winpty". Until the
ConPTY problems have been fixed "winpty" will be preferred.
Environment variables are used to pass information to the running job:
VIM_SERVERNAME v:servername

View File

@ -1,4 +1,4 @@
*textprop.txt* For Vim version 8.1. Last change: 2018 Dec 30
*textprop.txt* For Vim version 8.1. Last change: 2019 Jan 08
VIM REFERENCE MANUAL by Bram Moolenaar
@ -17,6 +17,7 @@ What is not working yet:
1. Introduction |text-prop-intro|
2. Functions |text-prop-functions|
3. When text changes |text-prop-changes|
{Vi does not have text properties}
@ -113,5 +114,25 @@ prop_list({lnum} [, {props}) text properties in {lnum}
prop_remove({props} [, {lnum} [, {lnum-end}]])
remove a text property
==============================================================================
3. When text changes *text-prop-changes*
Vim will do its best to keep the text properties on the text where it was
attached. When inserting or deleting text the properties after the change
will move accordingly.
When text is deleted and a text property no longer includes any text, it is
deleted. However, a text property that was defined as zero-width will remain,
unless the whole line is deleted.
When using replace mode, the text properties stay on the same character
positions, even though the characters themselves change.
When text property columns are not updated ~
- When setting the line with |setline()| or through an interface, such as Lua,
Tcl or Python.
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.1. Last change: 2019 Jan 01
*todo.txt* For Vim version 8.1. Last change: 2019 Mar 14
VIM REFERENCE MANUAL by Bram Moolenaar
@ -38,14 +38,19 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs*
-------------------- Known bugs and current work -----------------------
Valgrind error in old regexp engine when using TOhtml.
(Dominique, 2018 Dec 31, #3749)
Patch to add Farsi handling to arabic.c (Ali Gholami Rudi, 2009 May 2)
Added test, updates, June 23.
Updated for 7.4: http://litcave.rudi.ir/farsi_vim.diff
Remark from Ameretat Reith (2014 Oct 13) with patch on top.
Updated patch from Ameretat Reith, 2019 Mar 1.
Possible errors reported from fuzzer. Shadowblade #3716
a) using get_regline() without checking for NULL
b) using getcell() in libvterm without checking for NULL
Timer test doesn't work on MS-Windows console, any way to make it work?
Drop FEAT_TAG_ANYWHITE ? It should not be a compile time option.
'incsearch' with :s: (#3321)
- Get E20 when using command history to get "'<,'>s/a/b" and no Visual area
was set. (#3837)
- :s/foo using CTRL-G moves to another line, should not happen, or use the
correct line (it uses the last but one line) (Lifepillar, Aug 18, #3345)
- :s@pat/tern@ doesn't include "/" in the pattern. (Takahiro Yoshihara, #3637)
@ -66,6 +71,7 @@ Terminal debugger:
- Add option to not open the program window. It's not used when attaching to
an already running program. (M. Kelly)
- When only gdb window exists, on "quit" edit another buffer.
- Use a sign group
- Termdebug does not work when Vim was build with mzscheme: gdb hangs just
after "run". Everything else works, including communication channel. Not
initializing mzscheme avoid the problem, thus it's not some #ifdef.
@ -76,12 +82,15 @@ Terminal debugger:
with another Vim instance.
Terminal emulator window:
- GUI: When using ":set go+=!" a system() call causes the hit-enter prompt.
(#3327)
- GUI: hang until key typed. (#3530)
- When the job in the terminal doesn't use mouse events, let the scroll wheel
scroll the scrollback, like a terminal does at the shell prompt. #2490
And use modeless selection. #2962
- When Vim runs in the terminal and changes the title, the statusline needs to
be redrawn.
- GUI: When using ":set go+=!" a system() call causes the hit-enter prompt.
(#3327)
- Terminal API: Add more functionality? (Ozaki Kiichi 2018 May 13, #2907)
- GUI: hang until key typed. (#3530)
- Allow for specifying the directory, with ++cwd={dir}.
- With a vertical split only one window is updated. (Linwei, 2018 Jun 2,
#2977)
@ -96,7 +105,6 @@ Terminal emulator window:
- Win32: Redirecting output works but includes escape sequences.
- Win32: Make terminal used for :!cmd in the GUI work better. Allow for
redirection.
- Terminal API: Add more functionality? (Ozaki Kiichi 2018 May 13, #2907)
- When the job only outputs lines, we could handle resizing the terminal
better: store lines separated by line breaks, instead of screen lines,
then when the window is resized redraw those lines.
@ -106,55 +114,39 @@ Terminal emulator window:
- When 'encoding' is not utf-8, or the job is using another encoding, setup
conversions.
":function" can now silently overwrite the function from the same script.
Do the same for ":command" ?
Support for popup widows:
- Use text properties to define highlighting.
- Proposal on issue #4063
Update for German spell files: https://github.com/chrisbra/vim/compare/5e021c990f8817a50d3264782a5...3b27c92f297540761ebbd92d04fb3
(Christian Brabandt, 2018 Nov 4)
Adding "10" to 'spellsuggest' causes spell suggestions to become very slow.
(#4087)
Problem with Visual yank when 'linebreak' and 'showbreak' are set.
Patch with tests, but it's not clear how it is supposed to work. (tommm, 2018
Nov 17) Asked about this, Dec 22. Christian will have a look.
Key mapping times out when using a timer in Gvim. (Michael Henry, 2018 Sep 9,
#3417)
Add v:motion_force. (Kana Natsuno, 2008 Dec 6)
Maybe call it v:motiontype. Update in #3490.
Alternative: add the force flag to mode(), after "no".
Patch ready to include?
Does not build with MinGW out of the box:
- _stat64 is not defined, need to use "struct stat" in vim.h
- WINVER conflict, should use 0x0600 by default?
Signs:
- Use a sign group in the Termdebug plugin.
- Avoid that "sign unplace id" does a redraw right away, esp. when there is
a sequence of these commands. (Andy Stewart, 2018 Mar 16)
- Patch to right-align signs. (James Kolb (email james), 2013 Sep 23)
- Patch from Christian Brabandt to make the "buffer" argument for ":sign
place" optional. (2013 Jul 12)
Patch for 'listchars' when there is a composing character on a space.
How about when there is a double-width composing character on a space?
(Yasuhiro Matsumoto, #4046)
Test doesn't fail without patch?
Patch to add ruby cflags. (#4050, fixes #1081)
Needs modification.
Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May
13, #2910) Can't reproduce?
Patch to add blob type support. (Yasuhiro Matsumoto, 2018 Nov 26, #3638)
Should be ready to include.
Errors found with random data:
heap-buffer-overflow in alist_add (#2472)
Win32 key codes are messy. Mike Williams tried to fix that, but now old
mappings no longer work. Create a new terminal for the better solution?
Improve fallback for menu translations, to avoid having to create lots of
files that source the actual file. E.g. menu_da_de -> menu_da
Include part of #3242?
Patch to add 'p' flag to 'formatoptions'. (Tom Ryder, 2018 Dec 28)
Wait a few days for feedback.
When a terminal exit_cb closes the window, a following typed key is lost, if
it's in a mapping. (2018 Oct 6, #2302, #3522)
@ -169,59 +161,149 @@ Williams, 2018 Oct 30)
Problem with :tlmenu: Detach item added with all modes? Issue #3563.
Bug: script written with "-W scriptout" contains Key codes, while the script
read with "-s scriptin" expects escape codes. Probably "scriptout" needs to
be adjusted. (Daniel Steinberg, 2019 Feb 24, #4041)
Patch to move insert-expand code to insexpand.c. (Yegappan Lakshmanan, #4044)
Patch for larger icons in installer. (#978) Still not good.
Patch on issue #3964 to let sign column stop at the last buffer line.
(Christian Brabandt, 2019 Feb 24)
Patch to use wide font functions. (Ken Takata, 2019 Feb 18, #4000)
Patch on #4073, Andy Massimino. Is this a real problem?
Bug: "vipgw" does not put cursor back where it belongs. (Jason Franklin, 2019
Mar 5)
Patch to add blob2str() and str2blob(). (Yasuhiro Matsumoto, #4049)
Make docs clearer. Is it symmetric?
When using a timer callback vgetc_busy is reset, allowing for using input().
But in a channel callback this does not happen. We need to do something
similar to check_due_timer(). Also see #3809.
Using "5gj" starting inside a closed fold does not work on screen lines but on
text lines. (Julius Hulsmann, #4095)
Add "-once" to ":autocmd". Also add "-nested" as an alias for "nested".
(Justin M. Keyes, #4100) Syntax of -once may be strange. ++once and ++nested
is better?
C syntax: {} inside () causes following {} to be highlighted as error.
(Michalis Giannakidis, 2006 Jun 1)
Patch on #3690 to fix that "wincmd p" does not always behave properly.
(Christian Brabandt, 2018 Dec 17)
Support setting the character displayed below the last line? Neovim uses
"eob:X" in 'fillchars'.
Patch: When using %v in 'errorformat', assume the number is the screen column
not bytes, also handle multi-byte charactes. (Yegappan Lakshmanan, #3700)
Check: __attribute__((format(printf, on semsg() and siemsg(). Where was this
added?
Patch to add FOR_ALL_FRAMES. (Yegappan, 2018 Dec 11, #3686)
Patch to remove some unneeded {}. (Hirohito Higashi, #3982)
Patch for MinGW build with static libraries. (Ken Takata, 2018 Dec 16)
Make balloon_show() work outside of 'balloonexpr'? Users expect it to work:
#2948. (related to #1512?)
On Win32 it stops showing, because showState is already ShS_SHOWING.
balloon_show() does not work properly in the terminal. (Ben Jackson, 2017 Dec
20, #2481)
Also see #2352, want better control over balloon, perhaps set the position.
Should also be possible to add highlighting, like in the status line?
balloonexpr() on MS-Windows GUI doesn't handle accented chars? (nivaemail,
2018 Sep 14)
Another request: #3811.
Patch for autoconf to add -fPIC for Fedora. (#4047)
Height of quickfix window is not retained with vertical splits. (Lifepillar,
2018 Aug 24, #2998)
Patch on the issue by Hongbo Liu, 2019 Feb 19 #4013
More warnings from static analysis:
https://lgtm.com/projects/g/vim/vim/alerts/?mode=list
Patch for this: (Aron Widforss, 2018 Oct 13, #3539)
missing a test.
7 Make 'scrolloff' a global-local option, so that it can be different in the
quickfix window, for example. (Gary Holloway)
Also do 'sidescrolloff'.
Still a E315 error when using terminal. (Masato Nishihata, #3959)
Patch for ConPTY support, #3474: What is the status?
Issue #3649: Retrying the X server connection once may be insufficient.
Since patch 8.1.0615 we try reconnecting five times. Does it work?
When using 'k' in 'guioptions' gvim may open with a tiny window. (#3808)
Suggested patch on the issue.
nvo-mode mapping works on Windows, not on Linux. (#3678)
Patch to fix modify_fname() does not work well with some 'encoding's.
(Ken Takata, #4007)
Patch to make vim_getenv() work with wide API. (Ken Takata, #4008)
How to make (async) complete function depending on completion type?
Patch on #4083 to do this with an autocommand. Probably want something else,
like 'ominfunc'.
Patch to add equal field to complete items. (#3887)
When using exclusive selection and vi" that fails, cursor moves to the left.
Cursor should not move. (#4024)
Patch to fix handling long line in tags file. #4051, #4084 (Andy Massimino)
Patch to fix that executable() may fail on very long filename in MS-Windows.
(Ken Takata, 2016 Feb 1, update 2018 Oct 7, update 2019 Feb 19)
Now in pull request #4015.
Patch to be able to separately map CTRL-H and BS on Windows.
(Linwei, 2017 Jul 11, #1833)
Patch to fix encoding of messages on MS-Windows. (Yasuhiro Matsumoto, 2019 Feb
13, #3914)
Patch to fix encoding conversion in messages. (#3969)
Check that this is fixed: (ichizok)
vim --clean -X -V1 -es -c 'echo "hello"' -c quit
Incsearch test fails when locale is "C". (Dominique Pelle, #3986)
Also run all tests with C locale?
Patch to improve readability of complicated if(). (ichizok, 2019 Jan 29,
#3879)
"vat" doesn't work well on XML when the closing > is on another line.
#3927
Patch to include ARM64 support. (Leendert van Doorn, 2019 Feb 9)
Patch to fix hang when opening file where an intermediate directory is not
readable on MS-Windows. (link on #3923)
Pasting foo} causes Vim to behave weird. (John Little, 2018 Jun 17)
Related to bracketed paste. I cannot reproduce it.
Patch to add tagfunc(). Cleaned up by Christian Brabandt, 2013 Jun 22.
New update 2017 Apr 10, #1628
https://github.com/chrisbra/vim-mq-patches/blob/master/tagfunc
Updated by Andy Massimino, 2018 Feb 7:
https://github.com/andymass/vim/commit/4e3aa0a5dab96d2799567622f3f537e357aa479e
Or should we make it asynchronous?
Patch by Andy Massimino: #4010 - needs a bit more work
When 'confirm' is set a "silent q" doesn't show the prompt. It should in this
case. (Nate Peterson, 2019 Jan 31, #3892)
For "silent! q" it should not prompt and just fail.
Patch to add readdir(). (Yasuhiro Matsumoto, #2439)
Using CTRL-L to add a character to the search string doesn't work for the last
character in the file. (Smylers, 2018 Nov 17, #3620)
Suggested patch by Hirohito Higashi, 2018 Nov 18.
Using CTRL-L to add a character to the search string that contains \v,
punctiuation is repeated. (Smylers, 2018 Nov 17, #3621)
punctuation is repeated. (Smylers, 2018 Nov 17, #3621)
Using CTRL-L during search only picks up the base character, not a combining
character. (Rick, 2018 Dec 11, #3682)
":mksession" cannot handle a very long 'runtimepath'. (Timothy Madden, 21 Sep
2018, #3466) Patch from Christian, 2018 Oct 30 (with comments).
ml_get error: (Israel Chauca Fuentes, 2018 Oct 17, #3550).
Patch to convert temp file name. (Yasuhiro Matsumoto, #3520)
Not ready to include yet.
Problem with two buffers with the same name a/b, if it didn't exist before and
is created outside of Vim. (dskloetg, 2018 Jul 16, #3219)
@ -229,24 +311,33 @@ When 'sidescrolloff' is set, using "zl" to go to the end of the line, suddenly
scrolls back. Should allow for this scrolling, like 'scrolloff' does when
using CTRL-E. (Yee Cheng Chin, #3721)
We have a SourcePre autocommand event, but not SourcePost. Useful for doing
some thing after a plugin was loaded. (#3739)
Invalid memory access with old regexp engine. (Dominique Pelle, 2018 Sep 3,
#3405) Introduced by 8.0.1517, which was fixing another memory access error.
(Sep 8)
Patch to add complete_info Shougo - #3866. Ready to include.
Patch to make winnr() return the window above/below/beside a window.
(Yegappan Lakshmanan, #3993)
Patch for ConPTY support, new one: #3794 Does this work now? It should.
(Nobuhiro Takasaki)
Add function to make use of internal diff, working on two lists and returning
unified diff (list of lines).
When splitting a window with few text lines, the relative cursor position is
kept, which means part of the text isn't displayed. Better show all the text
when possible. (Dylan Lloyd, #3973)
Tag stack is incorrect after CTRL-T and then :tag. (Andy Massimino, 2019 Feb
12, #3944) With Patch for a solution (Feb 23). Needs a test.
Patch to implement 'diffref' option. (#3535)
Easier to use a 'diffmaster' option, is the extra complexity needed?
Patch to fix that bracketed paste remains after Vim exits. (2018 Oct 30, #3579)
Patch to add support for changing the current quickfix/location list indes.
(Yegappan Lakshmanan, 2018 Dec 18, #3701)
Make ":interactive !cmd" stop termcap mode, also when used in an autocommand.
(#3692)
@ -254,6 +345,19 @@ cursorline highlighting not removed after yanking in Visual mode.
(Matéo Zanibelli, 2018 Oct 30, #3578)
Patch by Christian, Oct 30.
Patch to clean up CI configs. (Ozaki Kiichi, 2019 Feb 1, #3890)
Patch to filter marks. (Marcin Szamotulski, 2019 Feb 7, #3895)
Patch to add environ(), gets a dict with all environment vars, and getenv(),
useful for environment vars that are not made of keyword chars.
(Yasuhiro Matsumoto, #2875)
Add buffer argument to undotree(). (#4001)
Patch to add optional arguments with default values.
(Andy Massimino, #3952) under development
Memory leaks in test_channel? (or is it because of fork())
Using uninitialized value in test_crypt.
Memory leak in test_terminal:
@ -266,6 +370,7 @@ Memory leak in test_terminal:
==23530== by 0x35C923: term_start (terminal.c:421)
==23530== by 0x2AFF30: mch_call_shell_terminal (os_unix.c:4377)
==23530== by 0x2B16BE: mch_call_shell (os_unix.c:5383)
Memory leak in test_alot with pyeval() (allocating partial)
gethostbyname() is old, use getaddrinfo() if available. (#3227)
@ -275,6 +380,17 @@ Patch to add match count and current index "3/44" when using "n" command.
matchaddpos() gets slow with many matches. Proposal by Rick Howe, 2018 Jul
19.
Patch to specify color for cterm=underline and cterm=undercurl, like "guisp".
Does #2405 do this?
Patch to add an interrupt() function: sets got_int. Useful in an autocommand
such as BufWritePre that checks the file name or contents.
Should make 'listchars' global-local. Local to window or to buffer?
Probably window.
Add something like 'fillchars' local to window, but allow for specifying a
highlight name. Esp. for the statusline.
Sourceforge Vim pages still have content, redirect from empty page.
Check for PHP errors. (Wayne Davison, 2018 Oct 26)
@ -296,6 +412,9 @@ Adjust windows installer explanation of behavior. (scootergrisen, #3310)
Set g:actual_curbuf when evaluating 'statusline', not just with an expression.
(Daniel Hahler, 2018 Aug 8, #3299)
Update for xim-input-style help (Tony Mechelynck, 2019 Jan 10).
Feedback from someone who uses this?
ml_get error. (Dominique Pelle, 2018 Sep 14, #3434)
Patch to use forward slash for completion even when 'shellslash' is set.
@ -314,6 +433,9 @@ Further xdiff changes:
Difference between two regexp engines: #3373
Patch to properly break CJK lines: #3875
Requires more tests. dbcs_ functions are not implemented.
Patch to add ch_listen() (Yasuhiro Matsumoto, 2018 Nov 26, #3639)
What is the practical use for this?
@ -330,6 +452,11 @@ Better name?
MS-Windows: .lnk file not resolved properly when 'encoding' is set.
(lkintact, 2018 Sep 22, #3473)
Merge checking for 'cursorline' and 'concealcursor', see neovim #9492.
Win32 key codes are messy. Mike Williams tried to fix that, but now old
mappings no longer work. Create a new terminal for the better solution?
Script generated by :mksession does not work well if there are windows with
modified buffers
change "silent only" into "silent only!"
@ -356,39 +483,18 @@ Lemonboy can reproduce (2017 Jun 5)
Also reproduced by Benjamin Doherty, 2018 Oct 4.
Simpler way: Ken Takata, Oct 6.
Height of quickfix window is not retained with vertical splits. (Lifepillar,
2018 Aug 24, #2998)
Window size is wrong when using quickfix window. (Lifepillar, 2018 Aug 24,
#2999)
Add more testing of the GTK GUI.
- gtk_test_widget_click() can be used to simulate a click in a widget.
Tests failing for "make testgui" with GTK:
- Test_setbufvar_options()
- Test_exit_callback_interval()
When using CTRL-W CR in the quickfix window, the jumplist in the opened window
is cleared, to avoid going back to the list of errors buffer (would have two
windows with it). Can we just remove the jump list entries for the quickfix
buffer?
Patch to fix that executable() may fail on very long filename in MS-Windows.
(Ken Takata, 2016 Feb 1, update 2018 Oct 7)
Patch to be able to use hex numbers with :digraph. (Lcd, 2015 Sep 6)
Update Sep 7. Update by Christian Brabandt, 2015 Sep 8, 2016 Feb 1.
Patch to be able to disable default digraphs (incomplete) (Eric Pruitt, 2018
Nov 22).
Make balloon_show() work outside of 'balloonexpr'? Users expect it to work:
#2948. (related to #1512?)
On Win32 it stops showing, because showState is already ShS_SHOWING.
balloon_show() does not work properly in the terminal. (Ben Jackson, 2017 Dec
20, #2481)
Also see #2352, want better control over balloon, perhaps set the position.
Should also be possible to add highlighting, like in the status line?
balloonexpr() on MS-Windows GUI doesn't handle accented chars? (nivaemail,
2018 Sep 14)
Try out background make plugin:
https://github.com/AndrewVos/vim-make-background
or asyncmake:
@ -413,8 +519,6 @@ behave strangely, as if there is a gap and a vertical window separator.
Make {skip} argument of searchpair() consistent with other places where we
pass an expression to evaluate. Allow passing zero for "never skip".
The 'scrolloff' option is global, make it global-local. #3195
Add an option similar to 'lazyredraw' to skip redrawing while executing a
script or function.
@ -441,22 +545,6 @@ missing: --nofork, -A , -b, -h, etc.
":au * * command" should not be allowed, only use * for event when listing or
deleting autocmds, not when adding them.
Quickfix window height is not kept with a vertical split. (Lifepillar, 2018
Jun 10, #2998)
Improve the installer for MS-Windows. There are a few alternatives:
- mui2 installer improved by Ken Takata (2018 Sep 29)
- Installer from Cream (Steve Hall).
- Modern UI 2.0 for the Nsis installer. (Guopeng Wen)
https://github.com/gpwen/vim-installer-mui2
- make it possible to do a silent install, see
http://nsis.sourceforge.net/Docs/Chapter4.html#4.12
Version from Guopeng Wen does this.
- MSI installer: https://github.com/petrkle/vim-msi/
- The one on Issue 279.
Problem: they all work slightly different (e.g. don't install vimrun.exe).
How to test that it works well for all Vim users?
Alternative manpager.vim. (Enno, 2018 Jan 5, #2529)
Delete all the specific stuff for the Borland compiler? (#3374)
@ -538,7 +626,7 @@ option_save({list}) *option_save()*
Alternatively: save and restore ALL options. Implementation needs to use
copy-on-write. Return an ID from option_save(), when
option_restore(ID) is called give an error if another option_save()
was called in the mean time, they must be balanced.
was called in the meantime, they must be balanced.
"gvim --remote" from a directory with non-word characters changes the current
directory (Paulo Marcel Coelho Arabic, 2017 Oct 30, #2266)
@ -562,8 +650,6 @@ Add script number to profile? (#3330 breaks tests).
A function defined locally and lambda's are not easily recognized.
Mention where they were defined somewhere.
CTRL-X on zero gets stuck on 0xfffffffffffffffe. (Hengyang Zhao, #2746)
Invalid range error when using BufWinLeave for closing terminal.
(Gabriel Barta, 2017 Nov 15, #2339)
@ -590,9 +676,6 @@ In an optional package the "after" directory is not scanned?
Patch for Neovim concerning restoring when closing help window. (glacambre
neovim #7431)
Default install on MS-Windows should source defaults.vim.
Ask whether to use Windows or Vim key behavior?
Patch for improving detecting Ruby on Mac in configure. (Ilya Mikhaltsou, 2017
Nov 21)
@ -813,9 +896,6 @@ When session file has name in argument list but the buffer was deleted, the
buffer is not deleted when using the session file. (#1393)
Should add the buffer in hidden state.
When an item in the quickfix list has a file name that does not exist, behave
like the item was not a match for :cnext.
Wrong diff highlighting with three files. (2016 Oct 20, #1186)
Also get E749 on exit.
Another example in #1309
@ -864,10 +944,6 @@ Implement optional arguments for functions.
call Foo(12, all = 0)
call Foo(12, 15, 0)
Change the Farsi code to work with UTF-8. Possibly combined with the Arabic
support, or similar.
Invalid read error in Farsi mode. (Dominique Pelle, 2009 Aug 2)
Add a command to take a range of lines, filter them and put the output
somewhere else. :{range}copy {dest} !cmd
@ -925,10 +1001,6 @@ Apr 23, #1653)
Window resizing with 'winfixheight': With a vertical split the height changes
anyway. (Tommy allen, 2017 Feb 21, #1502)
When adding an item to a new quickfix list make ":cnext" jump to that item.
Make a difference being at the first item and not having used :cnext at all.
(Afanasiy Fet, 2017 Jan 3)
Invalid behavior with NULL list. (Nikolai Pavlov, #768)
E.g. deepcopy(test_null_list())
@ -968,6 +1040,8 @@ sort() is not stable when using numeric/float sort (Nikolay Pavlov, 2016 Sep
- When out_cb executes :sleep, the close_cb may be invoked. (Daniel Hahler,
2016 Dec 11, #1320)
- Implement |job-term| ?
- Calling a function when receiving a "call" on a channel, using feedkeys()
does not work. It does work from a timer. (Qiming Zhao, #3852)
- Channel test fails with Motif. Sometimes kills the X11 server.
- When a message in the queue but there is no callback, drop it after a while?
Add timestamp to queued messages and callbacks with ID, remove after a
@ -984,6 +1058,10 @@ sort() is not stable when using numeric/float sort (Nikolay Pavlov, 2016 Sep
Although user could use "xterm -e 'cmd arg'".
Regexp problems:
- NFA engine can be slow for some patterns. Dominique found out that most
time is spent in addstate_here() copying the threads. Instead of copying,
let each thread point to the next one (by offset, the list is reallocated).
(Dominique Pelle, 2019 Feb 18)
- When search pattern has the base character both with and without combining
character, search fails. E.g. "รรีบ" in "การรีบรักใคร". (agguser, #2312)
- [:space:] only matches ASCII spaces. Add [:white:] for all space-like
@ -1045,9 +1123,6 @@ Add an argument to choose binary or non-binary (like readfile()), when omitted
use the current behavior.
Include the test.
Patch to add tagfunc(). Cleaned up by Christian Brabandt, 2013 Jun 22.
New update 2017 Apr 10, #1628
When 'keywordprg' starts with ":" the argument is still escaped as a shell
command argument. (Romain Lafourcade, 2016 Oct 16, #1175)
@ -1116,9 +1191,6 @@ Have a way to get the call stack, in a function and from an exception.
Second problem in #966: ins_compl_add_tv() uses get_dict_string() multiple
times, overwrites the one buffer. (Nikolay Pavlov, 2016 Aug 5)
This does not work: :set cscopequickfix=a-
(Linewi, 2015 Jul 12, #914)
Possibly wrong value for seq_cur. (Florent Fayolle, 2016 May 15, #806)
Filetype plugin for awk. (Doug Kearns, 2016 Sep 5)
@ -1570,9 +1642,6 @@ Updated spec ftplugin. (Matěj Cepl, 2013 Oct 16)
Patch to handle integer overflow. (Aaron Burrow, 2013 Dec 12)
Patch to add "ntab" item in 'listchars' to repeat first character. (Nathaniel
Braun, pragm, 2013 Oct 13) A better solution 2014 Mar 5.
7 Windows XP: When using "ClearType" for text smoothing, a column of yellow
pixels remains when typing spaces in front of a "D" ('guifont' set to
"lucida_console:h8").
@ -1659,8 +1728,6 @@ Or use expand('<sid>')?
Patch to make confirm() display colors. (Christian Brabandt, 2012 Nov 9)
Patch to remove flicker from popup menu. (Yasuhiro Matsumoto, 2013 Aug 15)
Problem with refresh:always in completion. (Tyler Wade, 2013 Mar 17)
b:undo_ftplugin cannot call a script-local function. (Boris Danilov, 2013 Jan
@ -1679,9 +1746,6 @@ Patch for :tabcloseleft, after closing a tab go to left tab. (William Bowers,
Patch to improve equivalence classes in regexp patterns.
(Christian Brabandt, 2013 Jan 16, update Jan 17)
Patch to add new regexp classes :ident:, :keyword:, :fname:.
(ichizok, 2016 Jan 12, #1373)
Patch with suggestions for starting.txt. (Tony Mechelynck, 2012 Oct 24)
But use Gnome instead of GTK?
@ -1838,6 +1902,7 @@ cleared. See test64.
Patch to make "z=" work when 'spell' is off. Does this have nasty side
effects? (Christian Brabandt, 2012 Aug 5, Update 2013 Aug 12)
Would also need to do this for spellbadword() and spellsuggest().
https://github.com/chrisbra/vim-mq-patches/blob/master/enable_spellchecking
On 64 bit MS-Windows "long" is only 32 bits, but we sometimes need to store a
64 bits value. Change all number options to use nropt_T and define it to the
@ -2126,12 +2191,6 @@ to avoid changing 'eventignore'?
Patch for displaying 0x200c and 0x200d. (Ali Gholami Rudi, 2009 May 6)
Probably needs a bit of work.
Patch to add farsi handling to arabic.c (Ali Gholami Rudi, 2009 May 2)
Added test, updates, June 23.
Updated for 7.4: http://litcave.rudi.ir/farsi_vim.diff
With modification for Tatweel character: https://dpaste.de/VmFw
Remark from Ameretat Reith (2014 Oct 13)
List of encoding aliases. (Takao Fujiwara, 2009 Jul 18)
Are they all OK? Update Jul 22.
@ -2532,8 +2591,6 @@ Autoconf problem: when checking for iconv library we may add -L/usr/local/lib,
but when compiling further tests -liconv is added without the -L argument,
that may fail (e.g., sizeof(int)). (Blaine, 2007 Aug 21)
When opening quickfix window, disable spell checking?
Problem with ".add" files when using two languages and restarting Vim. (Raul
Coronado, 2008 Oct 30)
@ -2596,7 +2653,7 @@ Windows installer: licence text should not use indent, causes bad word wrap.
Dos uninstal may delete vim.bat from the wrong directory (e.g., when someone
makes his own wrapper). Add a magic string with the version number to the
.bat file and check for it in the uninstaller. E.g.
# uninstall key: vim7.3*
# uninstall key: vim8.1*
Changes for Win32 makefile. (Mike Williams, 2007 Jan 22, Alexei Alexandrov,
2007 Feb 8)
@ -2877,9 +2934,6 @@ Small problem displaying diff filler line when opening windows with a script.
Is it allowed that 'backupext' is empty? Problems when backup is in same dir
as original file? If it's OK don't compare with 'patchmode'. (Thierry Closen)
Patch for supporting count before CR in quickfix window. (AOYAMA Shotaro, 2007
Jan 1)
Patch for adding ":lscscope". (Navdeep Parhar, 2007 Apr 26; update 2008 Apr
23)
@ -3032,8 +3086,6 @@ Awaiting updated patches:
+ 1", but that's ugly.
7 Add patch from Benoit Cerrina to integrate Vim and Perl functions
better. Now also works for Ruby (2001 Nov 10)
- Patch from Herculano de Lima Einloft Neto for better formatting of the
quickfix window (2004 dec 2)
7 When 'rightleft' is set, the search pattern should be displayed right
to left as well? See patch of Dec 26. (Nadim Shaikli)
8 Option to lock all used memory so that it doesn't get swapped to disk
@ -3051,6 +3103,35 @@ Awaiting updated patches:
and GTK by degreneir (nov 10 and nov 18).
- Patch for "paranoid mode" by Kevin Collins, March 7. Needs much more work.
Quickfix/Location List:
- Window size is wrong when using quickfix window. (Lifepillar, 2018 Aug 24,
#2999)
- When using CTRL-W CR in the quickfix window, the jumplist in the opened
window is cleared, to avoid going back to the list of errors buffer (would
have two windows with it). Can we just remove the jump list entries for
the quickfix buffer?
- Quickfix window height is not kept with a vertical split. (Lifepillar,
2018 Jun 10, #2998)
- When an item in the quickfix list has a file name that does not exist,
behave like the item was not a match for :cnext.
- When adding an item to a new quickfix list make ":cnext" jump to that
item. Make a difference being at the first item and not having used
:cnext at all. (Afanasiy Fet, 2017 Jan 3)
- This does not work: :set cscopequickfix=a-
(Linewi, 2015 Jul 12, #914)
- When opening quickfix window, disable spell checking?
- Patch for supporting count before CR in quickfix window. (AOYAMA Shotaro,
2007 Jan 1)
- Patch from Herculano de Lima Einloft Neto for better formatting of the
quickfix window (2004 dec 2)
- Amiga: When using quickfix with the Manx compiler we only get the first 25
errors. How do we get the rest?
8 The quickfix file is read without conversion, thus in 'encoding'. Add an
option to specify the encoding of the errorfile and convert it. Also for
":grep" and ":helpgrep".
More generic solution: support a filter (e.g., by calling a function).
7 Add a command that goes back to the position from before jumping to the
first quickfix location. ":cbefore"?
Vi incompatibility:
- Try new POSIX tests, made after my comments. (Geoff Clare, 2005 April 7)
@ -3138,8 +3219,6 @@ Win32 GUI known bugs:
8 The -P argument doesn't work very well with many MDI applications.
The last argument of CreateWindowEx() should be used, see MSDN docs.
Tutorial: http://win32assembly.online.fr/tut32.html
8 In eval.c, io.h is included when MSWIN32 is defined. Shouldn't this be
WIN32? Or can including io.h be moved to vim.h? (Dan Sharp)
6 Win32 GUI: With "-u NONE -U NONE" and doing "CTRL-W v" "CTRL-W o", the ":"
of ":only" is highlighted like the cursor. (Lipelis)
8 When 'encoding' is "utf-8", should use 'guifont' for both normal and wide
@ -3695,8 +3774,6 @@ Problems that will (probably) not be solved:
- In zsh, "gvim&" changes the terminal settings. This is a zsh problem.
(Jennings)
- Problem with HPterm under X: old contents of window is lost (Cosentino).
- Amiga: When using quickfix with the Manx compiler we only get the first 25
errors. How do we get the rest?
- Amiga: The ":cq" command does not always abort the Manx compiler. Why?
- Linux: A file with protection r--rw-rw- is seen readonly for others. The
access() function in GNU libc is probably wrong.
@ -4029,10 +4106,6 @@ Multi-byte characters:
8 Add an item in 'fileencodings' to check the first line of an XML file for
the encoding. <?xml version="1.0" encoding="UTF-8"?> Or "charset=UTF-8"?
For HTML look for "charset=utf-8".
8 The quickfix file is read without conversion, thus in 'encoding'. Add an
option to specify the encoding of the errorfile and convert it. Also for
":grep" and ":helpgrep".
More generic solution: support a filter (e.g., by calling a function).
8 When a file was converted from 'fileencoding' to 'encoding', a tag search
should also do this on the search pattern. (Andrzej M. Ostruszka)
8 When filtering changes the encoding 'fileencoding' may not work. E.g.,
@ -5840,8 +5913,6 @@ Various improvements:
from the 'makeprg'?
- Add %b to 'errorformat': buffer number. (Yegappan Lakshmanan / Suresh
Govindachar)
7 Add a command that goes back to the position from before jumping to the
first quickfix location. ":cbefore"?
7 Allow a window not to have a statusline. Makes it possible to use a
window as a buffer-tab selection.
8 Allow non-active windows to have a different statusline. (Yakov Lerner)

View File

@ -1,4 +1,4 @@
*undo.txt* For Vim version 8.1. Last change: 2014 May 24
*undo.txt* For Vim version 8.1. Last change: 2019 Jan 04
VIM REFERENCE MANUAL by Bram Moolenaar
@ -259,6 +259,12 @@ changed with the 'undodir' option.
When the file is encrypted, the text in the undo file is also crypted. The
same key and method is used. |encryption|
Note that text properties are not stored in the undo file. You can restore
text properties so long as a buffer is loaded, but you cannot restore them
from an undo file. Rationale: It would require the associated text property
types to be defined in exactly the same was as before, which cannot be
guaranteed.
You can also save and restore undo histories by using ":wundo" and ":rundo"
respectively:
*:wundo* *:rundo*

View File

@ -1,4 +1,4 @@
*usr_05.txt* For Vim version 8.1. Last change: 2018 Feb 20
*usr_05.txt* For Vim version 8.1. Last change: 2019 Feb 27
VIM USER MANUAL - by Bram Moolenaar
@ -11,12 +11,13 @@ Vim's capabilities. Or define your own macros.
|05.1| The vimrc file
|05.2| The example vimrc file explained
|05.3| Simple mappings
|05.4| Adding a package
|05.5| Adding a plugin
|05.6| Adding a help file
|05.7| The option window
|05.8| Often used options
|05.3| The defaults.vim file explained
|05.4| Simple mappings
|05.5| Adding a package
|05.6| Adding a plugin
|05.7| Adding a help file
|05.8| The option window
|05.9| Often used options
Next chapter: |usr_06.txt| Using syntax highlighting
Previous chapter: |usr_04.txt| Making small changes
@ -81,6 +82,95 @@ In this section we will explain the various commands used in this file. This
will give you hints about how to set up your own preferences. Not everything
will be explained though. Use the ":help" command to find out more.
>
" Get the defaults that most users want.
source $VIMRUNTIME/defaults.vim
This loads the "defaults.vim" file in the $VIMRUNTIME directory. This sets up
Vim for how most users like it. If you are one of the few that don't, then
comment out this line. The commands are explained below:
|defaults.vim-explained|
>
if has("vms")
set nobackup
else
set backup
if has('persistent_undo')
set undofile
endif
endif
This tells Vim to keep a backup copy of a file when overwriting it. But not
on the VMS system, since it keeps old versions of files already. The backup
file will have the same name as the original file with "~" added. See |07.4|
This also sets the 'undofile' option, if available. This will store the
multi-level undo information in a file. The result is that when you change a
file, exit Vim, and then edit the file again, you can undo the changes made
previously. It's a very powerful and useful feature, at the cost of storing a
file. For more information see |undo-persistence|.
The "if" command is very useful to set options
only when some condition is met. More about that in |usr_41.txt|.
>
if &t_Co > 2 || has("gui_running")
set hlsearch
endif
This switches on the 'hlsearch' option, telling Vim to highlight matches with
the last used search pattern.
>
augroup vimrcEx
au!
autocmd FileType text setlocal textwidth=78
augroup END
This makes Vim break text to avoid lines getting longer than 78 characters.
But only for files that have been detected to be plain text. There are
actually two parts here. "autocmd FileType text" is an autocommand. This
defines that when the file type is set to "text" the following command is
automatically executed. "setlocal textwidth=78" sets the 'textwidth' option
to 78, but only locally in one file.
The wrapper with "augroup vimrcEx" and "augroup END" makes it possible to
delete the autocommand with the "au!" command. See |:augroup|.
>
if has('syntax') && has('eval')
packadd! matchit
endif
This loads the "matchit" plugin if the required features are available.
It makes the |%| command more powerful. This is explained at
|matchit-install|.
==============================================================================
*05.3* The defaults.vim file explained *defaults.vim-explained*
The |defaults.vim| file is loaded when the user has no vimrc file. When you
create a new vimrc file, add this line near the top to keep using it: >
source $VIMRUNTIME/defaults.vim
Or use the vimrc_example.vim file, as explained above.
The following explains what defaults.vim is doing.
>
if exists('skip_defaults_vim')
finish
endif
Loading defaults.vim can be disabled with this command: >
let skip_defaults_vim = 1
This has to be done in the system vimrc file. See |system-vimrc|. If you
have a user vimrc this is not needed, since defaults.vim will not be loaded
automatically.
>
set nocompatible
@ -94,38 +184,19 @@ option off, thus 'nocompatible' takes care of this.
This specifies where in Insert mode the <BS> is allowed to delete the
character in front of the cursor. The three items, separated by commas, tell
Vim to delete the white space at the start of the line, a line break and the
character before where Insert mode started.
character before where Insert mode started. See 'backspace'.
>
set history=200
set autoindent
Keep 200 commands and 200 search patterns in the history. Use another number
if you want to remember fewer or more lines. See 'history'.
This makes Vim use the indent of the previous line for a newly created line.
Thus there is the same amount of white space before the new line. For example
when pressing <Enter> in Insert mode, and when using the "o" command to open a
new line.
>
if has("vms")
set nobackup
else
set backup
endif
This tells Vim to keep a backup copy of a file when overwriting it. But not
on the VMS system, since it keeps old versions of files already. The backup
file will have the same name as the original file with "~" added. See |07.4|
>
set history=50
Keep 50 commands and 50 search patterns in the history. Use another number if
you want to remember fewer or more lines.
>
set ruler
Always display the current cursor position in the lower right corner of the
Vim window.
Vim window. See 'ruler'.
>
set showcmd
@ -144,10 +215,37 @@ the "2fw" command is executed and the displayed "2f" is removed.
^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^
'showmode' 'showcmd' 'ruler'
>
set wildmenu
Display completion matches in a status line. That is when you type <Tab> and
there is more than one match. See 'wildmenu'.
>
set ttimeout
set ttimeoutlen=100
This makes typing Esc take effect more quickly. Normally Vim waits a second
to see if the Esc is the start of an escape sequence. If you have a very slow
remote connection, increase the number. See 'ttimeout'.
>
set display=truncate
Show @@@ in the last line if it is truncated, instead of hiding the whole
like. See 'display'.
>
set incsearch
Display the match for a search pattern when halfway typing it.
Display the match for a search pattern when halfway typing it. See
'incsearch'.
>
set nrformats-=octal
Do not recognize numbers starting with a zero as octal. See 'nrformats'.
>
map Q gq
@ -157,24 +255,31 @@ defines the "Q" command to do formatting with the "gq" operator. This is how
it worked before Vim 5.0. Otherwise the "Q" command starts Ex mode, but you
will not need it.
>
inoremap <C-U> <C-G>u<C-U>
CTRL-U in insert mode deletes all entered text in the current line. Use
CTRL-G u to first break undo, so that you can undo CTRL-U after inserting a
line break. Revert with ":iunmap <C-U>".
>
if has('mouse')
set mouse=a
endif
Enable using the mouse if available. See 'mouse'.
>
vnoremap _g y:exe "grep /" . escape(@", '\\/') . "/ *.c *.h"<CR>
This mapping yanks the visually selected text and searches for it in C files.
This is a complicated mapping. You can see that mappings can be used to do
quite complicated things. Still, it is just a sequence of commands that are
executed like you typed them.
You can see that a mapping can be used to do quite complicated things. Still,
it is just a sequence of commands that are executed like you typed them.
>
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
syntax on
This switches on syntax highlighting, but only if colors are available. And
the 'hlsearch' option tells Vim to highlight matches with the last used search
pattern. The "if" command is very useful to set options only when some
condition is met. More about that in |usr_41.txt|.
Enable highlighting files in color. See |syntax|.
*vimrc-filetype* >
filetype plugin indent on
@ -201,21 +306,12 @@ This switches on three very clever mechanisms:
automatically. Vim comes with these indent rules for a number of
filetypes. See |:filetype-indent-on| and 'indentexpr'.
>
autocmd FileType text setlocal textwidth=78
This makes Vim break text to avoid lines getting longer than 78 characters.
But only for files that have been detected to be plain text. There are
actually two parts here. "autocmd FileType text" is an autocommand. This
defines that when the file type is set to "text" the following command is
automatically executed. "setlocal textwidth=78" sets the 'textwidth' option
to 78, but only locally in one file.
*restore-cursor* >
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
*restore-cursor* *last-position-jump* >
autocmd BufReadPost *
\ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit'
\ | exe "normal! g`\""
\ | endif
Another autocommand. This time it is used after reading any file. The
complicated stuff after it checks if the '" mark is defined, and jumps to it
@ -224,8 +320,22 @@ from the previous line. That avoids a line getting very long.
See |line-continuation|. This only works in a Vim script file, not when
typing commands at the command-line.
>
command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
\ | wincmd p | diffthis
This adds the ":DiffOrig" command. Use this in a modified buffer to see the
differences with the file it was loaded from. See |diff| and |:DiffOrig|.
>
set nolangremap
Prevent that the langmap option applies to characters that result from a
mapping. If set (default), this may break plugins (but it's backward
compatible). See 'langremap'.
==============================================================================
*05.3* Simple mappings
*05.4* Simple mappings
A mapping enables you to bind a set of Vim commands to a single key. Suppose,
for example, that you need to surround certain words with curly braces. In
@ -272,7 +382,7 @@ The ":map" command (with no arguments) lists your current mappings. At
least the ones for Normal mode. More about mappings in section |40.1|.
==============================================================================
*05.4* Adding a package *add-package* *matchit-install*
*05.5* Adding a package *add-package* *matchit-install*
A package is a set of files that you can add to Vim. There are two kinds of
packages: optional and automatically loaded on startup.
@ -310,7 +420,7 @@ an archive or as a repository. For an archive you can follow these steps:
More information about packages can be found here: |packages|.
==============================================================================
*05.5* Adding a plugin *add-plugin* *plugin*
*05.6* Adding a plugin *add-plugin* *plugin*
Vim's functionality can be extended by adding plugins. A plugin is nothing
more than a Vim script file that is loaded automatically when Vim starts. You
@ -462,7 +572,7 @@ Further reading:
|new-filetype| How to detect a new file type.
==============================================================================
*05.6* Adding a help file *add-local-help*
*05.7* Adding a help file *add-local-help*
If you are lucky, the plugin you installed also comes with a help file. We
will explain how to install the help file, so that you can easily find help
@ -507,7 +617,7 @@ them through the tag.
For writing a local help file, see |write-local-help|.
==============================================================================
*05.7* The option window
*05.8* The option window
If you are looking for an option that does what you want, you can search in
the help files here: |options|. Another way is by using this command: >
@ -546,7 +656,7 @@ border. This is what the 'scrolloff' option does, it specifies an offset
from the window border where scrolling starts.
==============================================================================
*05.8* Often used options
*05.9* Often used options
There are an awful lot of options. Most of them you will hardly ever use.
Some of the more useful ones will be mentioned here. Don't forget you can

View File

@ -1,4 +1,4 @@
*usr_11.txt* For Vim version 8.1. Last change: 2018 Apr 13
*usr_11.txt* For Vim version 8.1. Last change: 2019 Feb 04
VIM USER MANUAL - by Bram Moolenaar
@ -120,7 +120,7 @@ the resulting files if they are what you expected.
USING A SPECIFIC SWAP FILE
If you know which swap file needs to be used, you can recover by giving the
swap file name. Vim will then finds out the name of the original file from
swap file name. Vim will then find out the name of the original file from
the swap file.
Example: >

View File

@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 8.1. Last change: 2018 Dec 18
*usr_41.txt* For Vim version 8.1. Last change: 2019 Jan 29
VIM USER MANUAL - by Bram Moolenaar
@ -771,7 +771,7 @@ System functions and manipulation of files:
systemlist() get the result of a shell command as a list
hostname() name of the system
readfile() read a file into a List of lines
writefile() write a List of lines into a file
writefile() write a List of lines or Blob into a file
Date and Time: *date-functions* *time-functions*
getftime() get last modification time of a file
@ -941,6 +941,7 @@ Testing: *test-functions*
test_override() test with Vim internal overrides
test_garbagecollect_now() free memory right now
test_ignore_error() ignore a specific error message
test_null_blob() return a null Blob
test_null_channel() return a null Channel
test_null_dict() return a null Dict
test_null_job() return a null Job
@ -958,6 +959,7 @@ Inter-process communication: *channel-functions*
ch_close() close a channel
ch_close_in() close the in part of a channel
ch_read() read a message from a channel
ch_readblob() read a Blob from a channel
ch_readraw() read a raw message from a channel
ch_sendexpr() send a JSON message over a channel
ch_sendraw() send a raw message over a channel

View File

@ -153,12 +153,6 @@ language than the text.
language, the default should work fine and you don't need to do anything. The
following is only relevant when you want to edit different languages.
Note:
Using different encodings only works when Vim was compiled to handle
it. To find out if it works, use the ":version" command and check the
output for "+multi_byte". If it's there, you are OK. If you see
"-multi_byte" you will have to find another Vim.
USING UNICODE IN THE GUI

View File

@ -1,4 +1,4 @@
*various.txt* For Vim version 8.1. Last change: 2019 Jan 08
*various.txt* For Vim version 8.1. Last change: 2019 Jan 17
VIM REFERENCE MANUAL by Bram Moolenaar
@ -82,8 +82,7 @@ g8 Print the hex values of the bytes used in the
value of 'maxcombine' doesn't matter.
Example of a character with two composing characters:
e0 b8 81 + e0 b8 b9 + e0 b9 89 ~
{not in Vi} {only when compiled with the |+multi_byte|
feature}
{not in Vi}
*8g8*
8g8 Find an illegal UTF-8 byte sequence at or after the
@ -98,8 +97,7 @@ g8 Print the hex values of the bytes used in the
Note that when the cursor is on an illegal byte or the
cursor is halfway a multi-byte character the command
won't move the cursor.
{not in Vi} {only when compiled with the |+multi_byte|
feature}
{not in Vi}
*:p* *:pr* *:print* *E749*
:[range]p[rint] [flags]
@ -440,7 +438,7 @@ N *+smartindent* |'smartindent'|
N *+startuptime* |--startuptime| argument
N *+statusline* Options 'statusline', 'rulerformat' and special
formats of 'titlestring' and 'iconstring'
m *+sun_workshop* |workshop|
m *+sun_workshop* |workshop|; no longer supported
N *+syntax* Syntax highlighting |syntax|
*+system()* Unix only: opposite of |+fork|
T *+tag_binary* binary searching in tags file |tag-binary-search|

View File

@ -1,4 +1,4 @@
*version6.txt* For Vim version 8.1. Last change: 2018 Mar 18
*version6.txt* For Vim version 8.1. Last change: 2019 Jan 17
VIM REFERENCE MANUAL by Bram Moolenaar
@ -943,7 +943,7 @@ Added the ":sign" command to define and place signs. They can be displayed
with two ASCII characters or an icon. The line after it can be highlighted.
Useful to display breakpoints and the current PC position.
Added the |:wsverb| command to execute debugger commands.
Added the :wsverb command to execute debugger commands.
Added balloon stuff: 'balloondelay' and 'ballooneval' options.

View File

@ -2378,7 +2378,7 @@ Solution: Use the msgfmt command found by configure. (Danek Duvall)
Files: src/config.mk.in, src/po/Makefile
Patch 7.4.323
Problem: Substitute() with zero width pattern breaks multi-byte character.
Problem: substitute() with zero width pattern breaks multi-byte character.
Solution: Take multi-byte character size into account. (Yukihiro Nakadaira)
Files: src/eval.c src/testdir/test69.in, src/testdir/test69.ok
@ -20311,7 +20311,7 @@ Solution: Use R for a running job and F for a finished job.
Files: src/buffer.c
Patch 8.0.0936
Problem: Mode() returns wrong value for a terminal window.
Problem: mode() returns wrong value for a terminal window.
Solution: Return 't' when typed keys go to a job.
Files: src/evalfunc.c, src/testdir/test_terminal.vim
@ -20697,7 +20697,7 @@ Solution: Add type cast. (Mike Williams)
Files: src/channel.c
Patch 8.0.1004
Problem: Matchstrpos() without a match returns too many items.
Problem: matchstrpos() without a match returns too many items.
Solution: Also remove the second item when the position is beyond the end of
the string. (Hirohito Higashi) Use an enum for the type.
Files: src/evalfunc.c, src/testdir/test_match.vim
@ -22544,7 +22544,7 @@ Files: src/ex_getln.c, src/proto/search.pro, src/search.c,
src/testdir/test_search.vim
Patch 8.0.1305
Problem: Writefile() never calls fsync().
Problem: writefile() never calls fsync().
Solution: Follow the 'fsync' option with override to enable or disable.
Files: src/fileio.c, src/evalfunc.c, runtime/doc/eval.txt, src/globals.h,
src/testdir/test_writefile.vim
@ -22732,7 +22732,7 @@ Solution: Take the winbar into account when computing the new window
Files: src/vim.h, src/window.c
Patch 8.0.1335
Problem: Writefile() using fsync() may give an error for a device.
Problem: writefile() using fsync() may give an error for a device.
(Yasuhiro Matsumoto)
Solution: Ignore fsync() failing. (closes #2373)
Files: src/evalfunc.c
@ -23618,7 +23618,7 @@ Files: src/edit.c, src/testdir/test_ins_complete.vim,
src/testdir/test_popup.vim, src/testdir/test_edit.vim
Patch 8.0.1483
Problem: Searchpair() might return an invalid value on timeout.
Problem: searchpair() might return an invalid value on timeout.
Solution: When the second search times out, do not accept a match from the
first search. (Daniel Hahler, closes #2552)
Files: src/search.c
@ -23722,7 +23722,7 @@ Files: runtime/doc/eval.txt, runtime/doc/usr_41.txt, src/Makefile,
src/testdir/Make_all.mak, src/testdir/test_jumplist.vim
Patch 8.0.1498 (after 8.0.1497)
Problem: Getjumplist() returns duplicate entries. (lacygoill)
Problem: getjumplist() returns duplicate entries. (lacygoill)
Solution: Call cleanup_jumplist(). (Yegappan Lakshmanan)
Files: src/evalfunc.c, src/mark.c, src/proto/mark.pro,
src/testdir/test_jumplist.vim
@ -23842,7 +23842,7 @@ Solution: Restore emsg_silent before executing :try. (closes #2531)
Files: src/ex_docmd.c, src/testdir/test_eval_stuff.vim
Patch 8.0.1519
Problem: Getchangelist() does not use argument as bufname().
Problem: getchangelist() does not use argument as bufname().
Solution: Use get_buf_tv(). (Yegappan Lakshmanan, closes #2641)
Files: src/evalfunc.c, src/testdir/test_changelist.vim

View File

@ -1,4 +1,4 @@
*visual.txt* For Vim version 8.1. Last change: 2017 Sep 02
*visual.txt* For Vim version 8.1. Last change: 2019 Feb 25
VIM REFERENCE MANUAL by Bram Moolenaar
@ -118,6 +118,8 @@ gn Search forward for the last used search pattern, like
E.g., "dgn" deletes the text of the next match.
If Visual mode is active, extends the selection
until the end of the next match.
Note: Unlike `n` the search direction does not depend
on the previous search command.
*gN* *v_gN*
gN Like |gn| but searches backward, like with `N`.
@ -305,8 +307,6 @@ mode.
==============================================================================
5. Blockwise operators *blockwise-operators*
{not available when compiled without the |+visualextra| feature}
Reminder: Use 'virtualedit' to be able to select blocks that start or end
after the end of a line or halfway a tab.

View File

@ -1,4 +1,4 @@
*windows.txt* For Vim version 8.1. Last change: 2018 Apr 24
*windows.txt* For Vim version 8.1. Last change: 2019 Mar 17
VIM REFERENCE MANUAL by Bram Moolenaar
@ -842,6 +842,12 @@ CTRL-W gF *CTRL-W_gF*
{not available when the |+file_in_path| feature was disabled
at compile time}
CTRL-W gt *CTRL-W_gt*
Go to next tab page, same as `gt`.
CTRL-W gT *CTRL-W_gT*
Go to previous tab page, same as `gT`.
Also see |CTRL-W_CTRL-I|: open window for an included file that includes
the keyword under the cursor.

View File

@ -1,4 +1,4 @@
*workshop.txt* For Vim version 8.1. Last change: 2013 Jul 06
*workshop.txt* For Vim version 8.1. Last change: 2019 Jan 17
VIM REFERENCE MANUAL by Gordon Prieur
@ -6,93 +6,9 @@
Sun Visual WorkShop Features *workshop* *workshop-support*
1. Introduction |workshop-intro|
2. Commands |workshop-commands|
3. Compiling vim/gvim for WorkShop |workshop-compiling|
4. Configuring gvim for a WorkShop release tree |workshop-configure|
5. Obtaining the latest version of the XPM library |workshop-xpm|
The support for WorkShop was removed in patch 8.1.0763 in January 2019.
The product has not been available for a long time and has been replaced by
|NetBeans|.
{Vi does not have any of these features}
{only available when compiled with the |+sun_workshop| feature}
==============================================================================
1. Introduction *workshop-intro*
Sun Visual WorkShop has an "Editor of Choice" feature designed to let users
debug using their favorite editors. For the 6.0 release we have added support
for gvim. A workshop debug session will have a debugging window and an editor
window (possibly others as well). The user can do many debugging operations
from the editor window, minimizing the need to switch from window to window.
The version of vim shipped with Sun Visual WorkShop 6 (also called Forte
Developer 6) is vim 5.3. The features in this release are much more reliable
than the vim/gvim shipped with Visual WorkShop. VWS users wishing to use vim
as their editor should compile these sources and install them in their
workshop release tree.
==============================================================================
2. Commands *workshop-commands*
*:ws* *:wsverb*
:ws[verb] verb Pass the verb to the verb executor
Pass the verb to a workshop function which gathers some arguments and
sends the verb and data to workshop over an IPC connection.
==============================================================================
3. Compiling vim/gvim for WorkShop *workshop-compiling*
Compiling vim with FEAT_SUN_WORKSHOP turns on all compile time flags necessary
for building a vim to work with Visual WorkShop. The features required for VWS
have been built and tested using the Sun compilers from the VWS release. They
have not been built or tested using Gnu compilers. This does not mean the
features won't build and run if compiled with gcc, just that nothing is
guaranteed with gcc!
==============================================================================
4. Configuring gvim for a WorkShop release tree *workshop-configure*
There are several assumptions which must be met in order to compile a gvim for
use with Sun Visual WorkShop 6.
o You should use the compiler in VWS rather than gcc. We have neither
built nor tested with gcc and cannot guarantee it will build properly.
o You must supply your own XPM library. See |workshop-xpm| below for
details on obtaining the latest version of XPM.
o Edit the Makefile in the src directory and uncomment the lines for Sun
Visual WorkShop. You can easily find these by searching for the string
FEAT_SUN_WORKSHOP
o We also suggest you use Motif for your gui. This will provide gvim with
the same look-and-feel as the rest of Sun Visual WorkShop.
The following configuration line can be used to configure vim to build for use
with Sun Visual WorkShop:
$ CC=cc configure --enable-workshop --enable-gui=motif \
-prefix=<VWS-install-dir>/contrib/contrib6/<vim-version>
The VWS-install-dir should be the base directory where your Sun Visual WorkShop
was installed. By default this is /opt/SUNWspro. It will normally require
root permissions to install the vim release. You will also need to change the
symlink <VWS-install-dir>/bin/gvim to point to the vim in your newly installed
directory. The <vim-version> should be a unique version string. I use "vim"
concatenated with the equivalent of version.h's VIM_VERSION_SHORT.
==============================================================================
5. Obtaining the latest version of the XPM library *workshop-xpm*
The XPM library is required to show images within Vim with Motif or Athena.
Without it the toolbar and signs will be disabled.
The XPM library is provided by Arnaud Le Hors of the French National Institute
for Research in Computer Science and Control. It can be downloaded from
http://cgit.freedesktop.org/xorg/lib/libXpm. The current release, as of this
writing, is xpm-3.4k-solaris.tgz, which is a gzip'ed tar file. If you create
the directory /usr/local/xpm and untar the file there you can use the
uncommented lines in the Makefile without changing them. If you use another
xpm directory you will need to change the XPM_DIR in src/Makefile.
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -1,6 +1,6 @@
" Vim script for Evim key bindings
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2017 Sep 20
" Last Change: 2019 Jan 27
" Don't use Vi-compatible mode.
set nocompatible
@ -49,19 +49,14 @@ if &t_Co > 2 || has("gui_running")
nohlsearch
endif
" Only do this part when compiled with support for autocommands.
if has("autocmd")
" Enable file type detection.
" Use the default filetype settings, so that mail gets 'tw' set to 72,
" 'cindent' is on in C files, etc.
" Also load indent files, to automatically do language-dependent indenting.
filetype plugin indent on
" Enable file type detection.
" Use the default filetype settings, so that mail gets 'tw' set to 72,
" 'cindent' is on in C files, etc.
" Also load indent files, to automatically do language-dependent indenting.
filetype plugin indent on
" For all text files set 'textwidth' to 78 characters.
au FileType text setlocal tw=78
endif " has("autocmd")
" For all text files set 'textwidth' to 78 characters.
au FileType text setlocal tw=78
" Add optional packages.
"

View File

@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2018 May 04
" Last Change: 2019 Feb 07
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@ -54,6 +54,9 @@ au BufNewFile,BufRead $VIMRUNTIME/doc/*.txt setf help
" Abaqus or Trasys
au BufNewFile,BufRead *.inp call dist#ft#Check_inp()
" 8th (Firth-derivative)
au BufNewFile,BufRead *.8th setf 8th
" A-A-P recipe
au BufNewFile,BufRead *.aap setf aap
@ -97,6 +100,7 @@ au BufNewFile,BufRead proftpd.conf* call s:StarSetf('apachestyle')
" Apache config file
au BufNewFile,BufRead .htaccess,*/etc/httpd/*.conf setf apache
au BufNewFile,BufRead */etc/apache2/sites-*/*.com setf apache
" XA65 MOS6510 cross assembler
au BufNewFile,BufRead *.a65 setf a65
@ -1462,9 +1466,11 @@ au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
" Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
" Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts
au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD* call dist#ft#SetFileTypeSH("bash")
au BufNewFile,BufRead .kshrc*,*.ksh call dist#ft#SetFileTypeSH("ksh")
au BufNewFile,BufRead */etc/profile,.profile*,*.sh,*.env call dist#ft#SetFileTypeSH(getline(1))
" NOTE: Patterns ending in a star are further down, these have lower priority.
au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD call dist#ft#SetFileTypeSH("bash")
au BufNewFile,BufRead .kshrc,*.ksh call dist#ft#SetFileTypeSH("ksh")
au BufNewFile,BufRead */etc/profile,.profile,*.sh,*.env call dist#ft#SetFileTypeSH(getline(1))
" Shell script (Arch Linux) or PHP file (Drupal)
au BufNewFile,BufRead *.install
@ -1474,15 +1480,16 @@ au BufNewFile,BufRead *.install
\ call dist#ft#SetFileTypeSH("bash") |
\ endif
" tcsh scripts
au BufNewFile,BufRead .tcshrc*,*.tcsh,tcsh.tcshrc,tcsh.login call dist#ft#SetFileTypeShell("tcsh")
" tcsh scripts (patterns ending in a star further below)
au BufNewFile,BufRead .tcshrc,*.tcsh,tcsh.tcshrc,tcsh.login call dist#ft#SetFileTypeShell("tcsh")
" csh scripts, but might also be tcsh scripts (on some systems csh is tcsh)
au BufNewFile,BufRead .login*,.cshrc*,csh.cshrc,csh.login,csh.logout,*.csh,.alias call dist#ft#CSH()
" (patterns ending in a start further below)
au BufNewFile,BufRead .login,.cshrc,csh.cshrc,csh.login,csh.logout,*.csh,.alias call dist#ft#CSH()
" Z-Shell script
" Z-Shell script (patterns ending in a star further below)
au BufNewFile,BufRead .zprofile,*/etc/zprofile,.zfbfmarks setf zsh
au BufNewFile,BufRead .zsh*,.zlog*,.zcompdump* call s:StarSetf('zsh')
au BufNewFile,BufRead .zshrc,.zshenv,.zlogin,.zlogout,.zcompdump setf zsh
au BufNewFile,BufRead *.zsh setf zsh
" Scheme
@ -2074,6 +2081,17 @@ au BufRead,BufNewFile *.rdf call dist#ft#Redif()
" Remind
au BufNewFile,BufRead .reminders* call s:StarSetf('remind')
" Shell scripts ending in a star
au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,,PKGBUILD* call dist#ft#SetFileTypeSH("bash")
au BufNewFile,BufRead .kshrc* call dist#ft#SetFileTypeSH("ksh")
au BufNewFile,BufRead .profile* call dist#ft#SetFileTypeSH(getline(1))
" tcsh scripts ending in a star
au BufNewFile,BufRead .tcshrc* call dist#ft#SetFileTypeShell("tcsh")
" csh scripts ending in a star
au BufNewFile,BufRead .login*,.cshrc* call dist#ft#CSH()
" Vim script
au BufNewFile,BufRead *vimrc* call s:StarSetf('vim')
@ -2101,7 +2119,8 @@ au BufNewFile,BufRead */etc/xinetd.d/* call s:StarSetf('xinetd')
" yum conf (close enough to dosini)
au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini')
" Z-Shell script
" Z-Shell script ending in a star
au BufNewFile,BufRead .zsh*,.zlog*,.zcompdump* call s:StarSetf('zsh')
au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh')

25
runtime/ftplugin/8th.vim Normal file
View File

@ -0,0 +1,25 @@
" Vim ftplugin file
" Language: 8th
" Version: any
" Last Change: 2015/11/08
" Maintainer: Ron Aaron <ron@aaron-tech.com>
" URL: https://8th-dev.com/
" Filetypes: *.8th
" NOTE: 8th allows any non-whitespace in a name, so you need to do:
" setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255
" This goes with the syntax/8th.vim file.
" Only do this when not done yet for this buffer
if exists("b:did_8thplugin")
finish
endif
" Don't load another plugin for this buffer
let b:did_8thplugin = 1
setlocal ts=2 sts=2 sw=2 et
setlocal com=s1:/*,mb:*,ex:*/,:\|,:\\
setlocal fo=tcrqol
setlocal matchpairs+=\::;
setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255
setlocal suffixesadd=.8th

31
runtime/ftplugin/bash.vim Normal file
View File

@ -0,0 +1,31 @@
" Vim filetype plugin file
" Language: bash
" Maintainer: Bram Moolenaar
" Last Changed: 2019 Jan 12
"
" This is not a real filetype plugin. It allows for someone to set 'filetype'
" to "bash" in the modeline, and gets the effect of filetype "sh" with
" b:is_bash set. Idea from Mahmode Al-Qudsi.
if exists("b:did_ftplugin")
finish
endif
let b:is_bash = 1
if exists("b:is_sh")
unlet b:is_sh
endif
if exists("b:is_kornshell")
unlet b:is_kornshell
endif
" Setting 'filetype' here directly won't work, since we are being invoked
" through an autocommand. Do it later, on the BufWinEnter event.
augroup bash_filetype
au BufWinEnter * call SetBashFt()
augroup END
func SetBashFt()
au! bash_filetype
set ft=sh
endfunc

View File

@ -3,6 +3,7 @@
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2019 Jan 06
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@ -27,7 +28,7 @@ elseif !exists("b:eruby_subtype")
let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$")
let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+')
if b:eruby_subtype == ''
let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+\%(\ze+\w\+\)\=$')
let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\|\.example\)\+$','',''),'\.\zs\w\+\%(\ze+\w\+\)\=$')
endif
if b:eruby_subtype == 'rhtml'
let b:eruby_subtype = 'html'
@ -45,7 +46,7 @@ elseif !exists("b:eruby_subtype")
endif
endif
if exists("b:eruby_subtype") && b:eruby_subtype != ''
if exists("b:eruby_subtype") && b:eruby_subtype != '' && b:eruby_subtype !=? 'eruby'
exe "runtime! ftplugin/".b:eruby_subtype.".vim ftplugin/".b:eruby_subtype."_*.vim ftplugin/".b:eruby_subtype."/*.vim"
else
runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
@ -66,6 +67,21 @@ if exists("b:match_words")
unlet b:match_words
endif
let s:cfilemap = v:version >= 704 ? maparg('<Plug><cfile>', 'c', 0, 1) : {}
if !get(s:cfilemap, 'buffer') || !s:cfilemap.expr || s:cfilemap.rhs =~# 'ErubyAtCursor()'
let s:cfilemap = {}
endif
if !has_key(s:cfilemap, 'rhs')
let s:cfilemap.rhs = "substitute(&l:inex =~# '\\<v:fname\\>' && len(expand('<cfile>')) ? eval(substitute(&l:inex, '\\<v:fname\\>', '\\=string(expand(\"<cfile>\"))', 'g')) : '', '^$', \"\\022\\006\",'')"
endif
let s:ctagmap = v:version >= 704 ? maparg('<Plug><ctag>', 'c', 0, 1) : {}
if !get(s:ctagmap, 'buffer') || !s:ctagmap.expr || s:ctagmap.rhs =~# 'ErubyAtCursor()'
let s:ctagmap = {}
endif
let s:include = &l:include
let s:path = &l:path
let s:suffixesadd = &l:suffixesadd
runtime! ftplugin/ruby.vim ftplugin/ruby_*.vim ftplugin/ruby/*.vim
let b:did_ftplugin = 1
@ -80,6 +96,15 @@ if exists("b:match_words")
let s:match_words = b:match_words . ',' . s:match_words
endif
if len(s:include)
let &l:include = s:include
endif
let &l:path = s:path . (s:path =~# ',$\|^$' ? '' : ',') . &l:path
let &l:suffixesadd = s:suffixesadd . (s:suffixesadd =~# ',$\|^$' ? '' : ',') . &l:suffixesadd
exe 'cmap <buffer><script><expr> <Plug><cfile> ErubyAtCursor() ? ' . maparg('<Plug><cfile>', 'c') . ' : ' . s:cfilemap.rhs
exe 'cmap <buffer><script><expr> <Plug><ctag> ErubyAtCursor() ? ' . maparg('<Plug><ctag>', 'c') . ' : ' . get(s:ctagmap, 'rhs', '"\022\027"')
unlet s:cfilemap s:ctagmap s:include s:path s:suffixesadd
" Change the browse dialog on Win32 to show mainly eRuby-related files
if has("gui_win32")
let b:browsefilter="eRuby Files (*.erb, *.rhtml)\t*.erb;*.rhtml\n" . s:browsefilter
@ -99,4 +124,9 @@ let b:undo_ftplugin = "setl cms< "
let &cpo = s:save_cpo
unlet s:save_cpo
function! ErubyAtCursor() abort
let groups = map(['erubyBlock', 'erubyComment', 'erubyExpression', 'erubyOneLiner'], 'hlID(v:val)')
return !empty(filter(synstack(line('.'), col('.')), 'index(groups, v:val) >= 0'))
endfunction
" vim: nowrap sw=2 sts=2 ts=8:

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: man
" Maintainer: SungHyun Nam <goweol@gmail.com>
" Last Change: 2018 Jul 25
" Last Change: 2019 Jan 22
" To make the ":Man" command available before editing a manual page, source
" this script from your startup vimrc file.
@ -206,10 +206,10 @@ func <SID>GetPage(cmdmods, ...)
let $MANWIDTH = ''
endif
" Remove blank lines from top and bottom.
while getline(1) =~ '^\s*$'
while line('$') > 1 && getline(1) =~ '^\s*$'
silent keepj norm! ggdd
endwhile
while getline('$') =~ '^\s*$'
while line('$') > 1 && getline('$') =~ '^\s*$'
silent keepj norm! Gdd
endwhile
1

16
runtime/ftplugin/mma.vim Normal file
View File

@ -0,0 +1,16 @@
" Vim filetype plugin file
" Language: Mathematica
" Maintainer: Ian Ford <ianf@wolfram.com>
" Last Change: 22 January 2019
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
finish
endif
" Don't load another plugin for this buffer
let b:did_ftplugin = 1
let b:undo_ftplugin = "setlocal commentstring<"
setlocal commentstring=\(*%s*\)

View File

@ -30,7 +30,7 @@ setlocal formatoptions+=tcroql
"
" More sophisticated indentation rules should be revisted in the future.
if !exists("g:rst_style") || g:rst_style != 0
if exists("g:rst_style") && g:rst_style != 0
setlocal expandtab shiftwidth=3 softtabstop=3 tabstop=8
endif

View File

@ -2,8 +2,8 @@
" Language: Ruby
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" ----------------------------------------------------------------------------
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2019 Jan 06
if (exists("b:did_ftplugin"))
finish
@ -44,19 +44,12 @@ endif
setlocal formatoptions-=t formatoptions+=croql
setlocal include=^\\s*\\<\\(load\\>\\\|require\\>\\\|autoload\\s*:\\=[\"']\\=\\h\\w*[\"']\\=,\\)
setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'\%(\.rb\)\=$','.rb','')
setlocal suffixesadd=.rb
if exists("&ofu") && has("ruby")
setlocal omnifunc=rubycomplete#Complete
endif
" To activate, :set ballooneval
if has('balloon_eval') && exists('+balloonexpr')
setlocal balloonexpr=RubyBalloonexpr()
endif
" TODO:
"setlocal define=^\\s*def
@ -69,7 +62,7 @@ endif
function! s:query_path(root) abort
let code = "print $:.join %q{,}"
if &shell =~# 'sh'
if &shell =~# 'sh' && empty(&shellxquote)
let prefix = 'env PATH='.shellescape($PATH).' '
else
let prefix = ''
@ -141,44 +134,54 @@ if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
\ "All Files (*.*)\t*.*\n"
endif
let b:undo_ftplugin = "setl fo< inc< inex< sua< def< com< cms< path< tags< kp<"
let b:undo_ftplugin = "setl inc= sua= path= tags= fo< com< cms< kp="
\."| unlet! b:browsefilter b:match_ignorecase b:match_words b:match_skip"
\."| if exists('&ofu') && has('ruby') | setl ofu< | endif"
\."| if has('balloon_eval') && exists('+bexpr') | setl bexpr< | endif"
if get(g:, 'ruby_recommended_style', 1)
setlocal shiftwidth=2 softtabstop=2 expandtab
let b:undo_ftplugin .= ' | setl sw< sts< et<'
endif
" To activate, :set ballooneval
if exists('+balloonexpr') && get(g:, 'ruby_balloonexpr')
setlocal balloonexpr=RubyBalloonexpr()
let b:undo_ftplugin .= "| setl bexpr="
endif
function! s:map(mode, flags, map) abort
let from = matchstr(a:map, '\S\+')
if empty(mapcheck(from, a:mode))
exe a:mode.'map' '<buffer>'.(a:0 ? a:1 : '') a:map
exe a:mode.'map' '<buffer>' a:map
let b:undo_ftplugin .= '|sil! '.a:mode.'unmap <buffer> '.from
endif
endfunction
cmap <buffer><script><expr> <Plug><cword> substitute(RubyCursorIdentifier(),'^$',"\022\027",'')
cmap <buffer><script><expr> <Plug><ctag> substitute(RubyCursorTag(),'^$',"\022\027",'')
cmap <buffer><script><expr> <Plug><cfile> substitute(RubyCursorFile(),'^$',"\022\006",'')
let b:undo_ftplugin .= "| sil! cunmap <buffer> <Plug><cword>| sil! cunmap <buffer> <Plug><cfile>"
let b:undo_ftplugin .= "| sil! cunmap <buffer> <Plug><ctag>| sil! cunmap <buffer> <Plug><cfile>"
if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps")
nmap <buffer><script> <SID>: :<C-U>
nmap <buffer><script> <SID>c: :<C-U><C-R>=v:count ? v:count : ''<CR>
nnoremap <silent> <buffer> [m :<C-U>call <SID>searchsyn('\<def\>','rubyDefine','b','n')<CR>
nnoremap <silent> <buffer> ]m :<C-U>call <SID>searchsyn('\<def\>','rubyDefine','','n')<CR>
nnoremap <silent> <buffer> [M :<C-U>call <SID>searchsyn('\<end\>','rubyDefine','b','n')<CR>
nnoremap <silent> <buffer> ]M :<C-U>call <SID>searchsyn('\<end\>','rubyDefine','','n')<CR>
xnoremap <silent> <buffer> [m :<C-U>call <SID>searchsyn('\<def\>','rubyDefine','b','v')<CR>
xnoremap <silent> <buffer> ]m :<C-U>call <SID>searchsyn('\<def\>','rubyDefine','','v')<CR>
xnoremap <silent> <buffer> [M :<C-U>call <SID>searchsyn('\<end\>','rubyDefine','b','v')<CR>
xnoremap <silent> <buffer> ]M :<C-U>call <SID>searchsyn('\<end\>','rubyDefine','','v')<CR>
nnoremap <silent> <buffer> [m :<C-U>call <SID>searchsyn('\<def\>',['rubyDefine'],'b','n')<CR>
nnoremap <silent> <buffer> ]m :<C-U>call <SID>searchsyn('\<def\>',['rubyDefine'],'','n')<CR>
nnoremap <silent> <buffer> [M :<C-U>call <SID>searchsyn('\<end\>',['rubyDefine'],'b','n')<CR>
nnoremap <silent> <buffer> ]M :<C-U>call <SID>searchsyn('\<end\>',['rubyDefine'],'','n')<CR>
xnoremap <silent> <buffer> [m :<C-U>call <SID>searchsyn('\<def\>',['rubyDefine'],'b','v')<CR>
xnoremap <silent> <buffer> ]m :<C-U>call <SID>searchsyn('\<def\>',['rubyDefine'],'','v')<CR>
xnoremap <silent> <buffer> [M :<C-U>call <SID>searchsyn('\<end\>',['rubyDefine'],'b','v')<CR>
xnoremap <silent> <buffer> ]M :<C-U>call <SID>searchsyn('\<end\>',['rubyDefine'],'','v')<CR>
nnoremap <silent> <buffer> [[ :<C-U>call <SID>searchsyn('\<\%(class\<Bar>module\)\>','rubyModule\<Bar>rubyClass','b','n')<CR>
nnoremap <silent> <buffer> ]] :<C-U>call <SID>searchsyn('\<\%(class\<Bar>module\)\>','rubyModule\<Bar>rubyClass','','n')<CR>
nnoremap <silent> <buffer> [] :<C-U>call <SID>searchsyn('\<end\>','rubyModule\<Bar>rubyClass','b','n')<CR>
nnoremap <silent> <buffer> ][ :<C-U>call <SID>searchsyn('\<end\>','rubyModule\<Bar>rubyClass','','n')<CR>
xnoremap <silent> <buffer> [[ :<C-U>call <SID>searchsyn('\<\%(class\<Bar>module\)\>','rubyModule\<Bar>rubyClass','b','v')<CR>
xnoremap <silent> <buffer> ]] :<C-U>call <SID>searchsyn('\<\%(class\<Bar>module\)\>','rubyModule\<Bar>rubyClass','','v')<CR>
xnoremap <silent> <buffer> [] :<C-U>call <SID>searchsyn('\<end\>','rubyModule\<Bar>rubyClass','b','v')<CR>
xnoremap <silent> <buffer> ][ :<C-U>call <SID>searchsyn('\<end\>','rubyModule\<Bar>rubyClass','','v')<CR>
nnoremap <silent> <buffer> [[ :<C-U>call <SID>searchsyn('\<\%(class\<Bar>module\)\>',['rubyModule','rubyClass'],'b','n')<CR>
nnoremap <silent> <buffer> ]] :<C-U>call <SID>searchsyn('\<\%(class\<Bar>module\)\>',['rubyModule','rubyClass'],'','n')<CR>
nnoremap <silent> <buffer> [] :<C-U>call <SID>searchsyn('\<end\>',['rubyModule','rubyClass'],'b','n')<CR>
nnoremap <silent> <buffer> ][ :<C-U>call <SID>searchsyn('\<end\>',['rubyModule','rubyClass'],'','n')<CR>
xnoremap <silent> <buffer> [[ :<C-U>call <SID>searchsyn('\<\%(class\<Bar>module\)\>',['rubyModule','rubyClass'],'b','v')<CR>
xnoremap <silent> <buffer> ]] :<C-U>call <SID>searchsyn('\<\%(class\<Bar>module\)\>',['rubyModule','rubyClass'],'','v')<CR>
xnoremap <silent> <buffer> [] :<C-U>call <SID>searchsyn('\<end\>',['rubyModule','rubyClass'],'b','v')<CR>
xnoremap <silent> <buffer> ][ :<C-U>call <SID>searchsyn('\<end\>',['rubyModule','rubyClass'],'','v')<CR>
let b:undo_ftplugin = b:undo_ftplugin
\."| sil! exe 'unmap <buffer> [[' | sil! exe 'unmap <buffer> ]]' | sil! exe 'unmap <buffer> []' | sil! exe 'unmap <buffer> ]['"
@ -204,19 +207,18 @@ if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps")
\."| sil! exe 'xunmap <buffer> iM' | sil! exe 'xunmap <buffer> aM'"
endif
call s:map('c', '', '<C-R><C-W> <Plug><cword>')
call s:map('c', '', '<C-R><C-F> <Plug><cfile>')
cmap <buffer><script><expr> <SID>tagzv &foldopen =~# 'tag' ? '<Bar>norm! zv' : ''
call s:map('n', '<silent>', '<C-]> <SID>:exe v:count1."tag <Plug><cword>"<SID>tagzv<CR>')
call s:map('n', '<silent>', 'g<C-]> <SID>:exe "tjump <Plug><cword>"<SID>tagzv<CR>')
call s:map('n', '<silent>', 'g] <SID>:exe "tselect <Plug><cword>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W>] <SID>:exe v:count1."stag <Plug><cword>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W><C-]> <SID>:exe v:count1."stag <Plug><cword>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W>g<C-]> <SID>:exe "stjump <Plug><cword>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W>g] <SID>:exe "stselect <Plug><cword>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W>} <SID>:exe v:count1."ptag <Plug><cword>"<CR>')
call s:map('n', '<silent>', '<C-W>g} <SID>:exe "ptjump <Plug><cword>"<CR>')
call s:map('n', '<silent>', '<C-]> <SID>:exe v:count1."tag <Plug><ctag>"<SID>tagzv<CR>')
call s:map('n', '<silent>', 'g<C-]> <SID>:exe "tjump <Plug><ctag>"<SID>tagzv<CR>')
call s:map('n', '<silent>', 'g] <SID>:exe "tselect <Plug><ctag>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W>] <SID>:exe v:count1."stag <Plug><ctag>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W><C-]> <SID>:exe v:count1."stag <Plug><ctag>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W>g<C-]> <SID>:exe "stjump <Plug><ctag>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W>g] <SID>:exe "stselect <Plug><ctag>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W>} <SID>:exe v:count1."ptag <Plug><ctag>"<CR>')
call s:map('n', '<silent>', '<C-W>g} <SID>:exe "ptjump <Plug><ctag>"<CR>')
call s:map('n', '<silent>', 'gf <SID>c:find <Plug><cfile><CR>')
call s:map('n', '<silent>', '<C-W>f <SID>c:sfind <Plug><cfile><CR>')
@ -288,12 +290,13 @@ function! s:searchsyn(pattern, syn, flags, mode) abort
norm! gv
endif
let i = 0
call map(a:syn, 'hlID(v:val)')
while i < cnt
let i = i + 1
let line = line('.')
let col = col('.')
let pos = search(a:pattern,'W'.a:flags)
while pos != 0 && s:synname() !~# a:syn
while pos != 0 && index(a:syn, s:synid()) < 0
let pos = search(a:pattern,'W'.a:flags)
endwhile
if pos == 0
@ -303,8 +306,8 @@ function! s:searchsyn(pattern, syn, flags, mode) abort
endwhile
endfunction
function! s:synname() abort
return synIDattr(synID(line('.'),col('.'),0),'name')
function! s:synid() abort
return synID(line('.'),col('.'),0)
endfunction
function! s:wrap_i(back,forward) abort
@ -349,6 +352,10 @@ function! RubyCursorIdentifier() abort
return stripped == '' ? expand("<cword>") : stripped
endfunction
function! RubyCursorTag() abort
return substitute(RubyCursorIdentifier(), '^[$@]*', '', '')
endfunction
function! RubyCursorFile() abort
let isfname = &isfname
try
@ -360,8 +367,9 @@ function! RubyCursorFile() abort
let pre = matchstr(strpart(getline('.'), 0, col('.')-1), '.*\f\@<!')
let post = matchstr(strpart(getline('.'), col('.')), '\f\@!.*')
let ext = getline('.') =~# '^\s*\%(require\%(_relative\)\=\|autoload\)\>' && cfile !~# '\.rb$' ? '.rb' : ''
if s:synname() ==# 'rubyConstant'
if s:synid() ==# hlID('rubyConstant')
let cfile = substitute(cfile,'\.\w\+[?!=]\=$','','')
let cfile = substitute(cfile,'^::','','')
let cfile = substitute(cfile,'::','/','g')
let cfile = substitute(cfile,'\(\u\+\)\(\u\l\)','\1_\2', 'g')
let cfile = substitute(cfile,'\(\l\|\d\)\(\u\)','\1_\2', 'g')

View File

@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: Text
" Maintainer: David Barnett <daviebdawg+vim@gmail.com>
" Last Change: 2014 Jul 09
" Last Change: 2019 Jan 10
if exists('b:did_ftplugin')
finish
@ -12,6 +12,7 @@ let b:undo_ftplugin = 'setlocal comments< commentstring<'
" We intentionally don't set formatoptions-=t since text should wrap as text.
" Pseudo comment leaders to indent bulleted lists.
setlocal comments=fb:-,fb:*
" Pseudo comment leaders to indent bulleted lists with '-' and '*'. And allow
" for Mail quoted text with '>'.
setlocal comments=fb:-,fb:*,n:>
setlocal commentstring=

View File

@ -3,6 +3,7 @@
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2019 Jan 06
if exists("b:did_indent")
finish
@ -12,7 +13,7 @@ runtime! indent/ruby.vim
unlet! b:did_indent
setlocal indentexpr=
if exists("b:eruby_subtype")
if exists("b:eruby_subtype") && b:eruby_subtype != '' && b:eruby_subtype !=# 'eruby'
exe "runtime! indent/".b:eruby_subtype.".vim"
else
runtime! indent/html.vim
@ -47,7 +48,11 @@ set cpo&vim
function! GetErubyIndent(...)
" The value of a single shift-width
let sw = shiftwidth()
if exists('*shiftwidth')
let sw = shiftwidth()
else
let sw = &sw
endif
if a:0 && a:1 == '.'
let v:lnum = line('.')
@ -91,6 +96,7 @@ function! GetErubyIndent(...)
let ind = ind + sw
endif
if line !~# '^\s*<%' && line =~# '%>\s*$' && line !~# '^\s*end\>'
\ && synID(v:lnum, match(cline, '\S') + 1, 1) != hlID('htmlEndTag')
let ind = ind - sw
endif
if cline =~# '^\s*[-=]\=%>\s*$'

View File

@ -2,7 +2,7 @@
" Language: Python
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Original Author: David Bustos <bustos@caltech.edu>
" Last Change: 2013 Jul 9
" Last Change: 2019 Feb 21
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@ -53,58 +53,68 @@ function GetPythonIndent(lnum)
return 0
endif
" searchpair() can be slow sometimes, limit the time to 100 msec or what is
" put in g:pyindent_searchpair_timeout
let searchpair_stopline = 0
let searchpair_timeout = get(g:, 'pyindent_searchpair_timeout', 150)
" If the previous line is inside parenthesis, use the indent of the starting
" line.
" Trick: use the non-existing "dummy" variable to break out of the loop when
" going too far back.
call cursor(plnum, 1)
let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbW',
\ "line('.') < " . (plnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'",
\ searchpair_stopline, searchpair_timeout)
if parlnum > 0
let plindent = indent(parlnum)
let plnumstart = parlnum
else
" Identing inside parentheses can be very slow, regardless of the searchpair()
" timeout, so let the user disable this feature if he doesn't need it
let disable_parentheses_indenting = get(g:, "pyindent_disable_parentheses_indenting", 0)
if disable_parentheses_indenting == 1
let plindent = indent(plnum)
let plnumstart = plnum
endif
else
" searchpair() can be slow sometimes, limit the time to 150 msec or what is
" put in g:pyindent_searchpair_timeout
let searchpair_stopline = 0
let searchpair_timeout = get(g:, 'pyindent_searchpair_timeout', 150)
" If the previous line is inside parenthesis, use the indent of the starting
" line.
" Trick: use the non-existing "dummy" variable to break out of the loop when
" going too far back.
let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbW',
\ "line('.') < " . (plnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'",
\ searchpair_stopline, searchpair_timeout)
if parlnum > 0
let plindent = indent(parlnum)
let plnumstart = parlnum
else
let plindent = indent(plnum)
let plnumstart = plnum
endif
" When inside parenthesis: If at the first line below the parenthesis add
" two 'shiftwidth', otherwise same as previous line.
" i = (a
" + b
" + c)
call cursor(a:lnum, 1)
let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW',
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'",
\ searchpair_stopline, searchpair_timeout)
if p > 0
if p == plnum
" When the start is inside parenthesis, only indent one 'shiftwidth'.
let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW',
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'",
\ searchpair_stopline, searchpair_timeout)
if pp > 0
return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : shiftwidth())
" When inside parenthesis: If at the first line below the parenthesis add
" two 'shiftwidth', otherwise same as previous line.
" i = (a
" + b
" + c)
call cursor(a:lnum, 1)
let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW',
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'",
\ searchpair_stopline, searchpair_timeout)
if p > 0
if p == plnum
" When the start is inside parenthesis, only indent one 'shiftwidth'.
let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW',
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'",
\ searchpair_stopline, searchpair_timeout)
if pp > 0
return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : shiftwidth())
endif
return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (shiftwidth() * 2))
endif
return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (shiftwidth() * 2))
if plnumstart == p
return indent(plnum)
endif
return plindent
endif
if plnumstart == p
return indent(plnum)
endif
return plindent
endif

View File

@ -1,8 +1,10 @@
" Vim indent file
" Language: Ruby
" Maintainer: Nikolai Weibull <now at bitwi.se>
" Maintainer: Andrew Radev <andrey.radev@gmail.com>
" Previous Maintainer: Nikolai Weibull <now at bitwi.se>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2019 Jan 06
" 0. Initialization {{{1
" =================
@ -18,6 +20,11 @@ if !exists('g:ruby_indent_access_modifier_style')
let g:ruby_indent_access_modifier_style = 'normal'
endif
if !exists('g:ruby_indent_assignment_style')
" Possible values: "variable", "hanging"
let g:ruby_indent_assignment_style = 'hanging'
endif
if !exists('g:ruby_indent_block_style')
" Possible values: "expression", "do"
let g:ruby_indent_block_style = 'expression'
@ -42,28 +49,27 @@ set cpo&vim
" 1. Variables {{{1
" ============
" Regex of syntax group names that are or delimit strings/symbols or are comments.
let s:syng_strcom = '\<ruby\%(Regexp\|RegexpDelimiter\|RegexpEscape' .
\ '\|Symbol\|String\|StringDelimiter\|StringEscape\|ASCIICode' .
\ '\|Interpolation\|InterpolationDelimiter\|NoInterpolation\|Comment\|Documentation\)\>'
" Regex of syntax group names that are strings.
" Syntax group names that are strings.
let s:syng_string =
\ '\<ruby\%(String\|Interpolation\|NoInterpolation\|StringEscape\)\>'
\ ['String', 'Interpolation', 'InterpolationDelimiter', 'NoInterpolation', 'StringEscape']
" Regex of syntax group names that are strings or documentation.
let s:syng_stringdoc =
\'\<ruby\%(String\|Interpolation\|NoInterpolation\|StringEscape\|Documentation\)\>'
" Syntax group names that are strings or documentation.
let s:syng_stringdoc = s:syng_string + ['Documentation']
" Syntax group names that are or delimit strings/symbols/regexes or are comments.
let s:syng_strcom = s:syng_stringdoc +
\ ['Regexp', 'RegexpDelimiter', 'RegexpEscape',
\ 'Symbol', 'StringDelimiter', 'ASCIICode', 'Comment']
" Expression used to check whether we should skip a match with searchpair().
let s:skip_expr =
\ "synIDattr(synID(line('.'),col('.'),1),'name') =~ '".s:syng_strcom."'"
\ 'index(map('.string(s:syng_strcom).',"hlID(''ruby''.v:val)"), synID(line("."),col("."),1)) >= 0'
" Regex used for words that, at the start of a line, add a level of indent.
let s:ruby_indent_keywords =
\ '^\s*\zs\<\%(module\|class\|if\|for' .
\ '\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure\|rescue' .
\ '\|\%(public\|protected\|private\)\=\s*def\):\@!\>' .
\ '\|\%(\K\k*[!?]\?\)\=\s*def\):\@!\>' .
\ '\|\%([=,*/%+-]\|<<\|>>\|:\s\)\s*\zs' .
\ '\<\%(if\|for\|while\|until\|case\|unless\|begin\):\@!\>'
@ -77,7 +83,7 @@ let s:ruby_deindent_keywords =
let s:end_start_regex =
\ '\C\%(^\s*\|[=,*/%+\-|;{]\|<<\|>>\|:\s\)\s*\zs' .
\ '\<\%(module\|class\|if\|for\|while\|until\|case\|unless\|begin' .
\ '\|\%(public\|protected\|private\)\=\s*def\):\@!\>' .
\ '\|\%(\K\k*[!?]\?\)\=\s*def\):\@!\>' .
\ '\|\%(^\|[^.:@$]\)\@<=\<do:\@!\>'
" Regex that defines the middle-match for the 'end' keyword.
@ -142,31 +148,562 @@ let s:block_continuation_regex = '^\s*[^])}\t ].*'.s:block_regex
" Regex that describes a leading operator (only a method call's dot for now)
let s:leading_operator_regex = '^\s*[.]'
" 2. Auxiliary Functions {{{1
" 2. GetRubyIndent Function {{{1
" =========================
function! GetRubyIndent(...) abort
" 2.1. Setup {{{2
" ----------
let indent_info = {}
" The value of a single shift-width
if exists('*shiftwidth')
let indent_info.sw = shiftwidth()
else
let indent_info.sw = &sw
endif
" For the current line, use the first argument if given, else v:lnum
let indent_info.clnum = a:0 ? a:1 : v:lnum
let indent_info.cline = getline(indent_info.clnum)
" Set up variables for restoring position in file. Could use clnum here.
let indent_info.col = col('.')
" 2.2. Work on the current line {{{2
" -----------------------------
let indent_callback_names = [
\ 's:AccessModifier',
\ 's:ClosingBracketOnEmptyLine',
\ 's:BlockComment',
\ 's:DeindentingKeyword',
\ 's:MultilineStringOrLineComment',
\ 's:ClosingHeredocDelimiter',
\ 's:LeadingOperator',
\ ]
for callback_name in indent_callback_names
" Decho "Running: ".callback_name
let indent = call(function(callback_name), [indent_info])
if indent >= 0
" Decho "Match: ".callback_name." indent=".indent." info=".string(indent_info)
return indent
endif
endfor
" 2.3. Work on the previous line. {{{2
" -------------------------------
" Special case: we don't need the real s:PrevNonBlankNonString for an empty
" line inside a string. And that call can be quite expensive in that
" particular situation.
let indent_callback_names = [
\ 's:EmptyInsideString',
\ ]
for callback_name in indent_callback_names
" Decho "Running: ".callback_name
let indent = call(function(callback_name), [indent_info])
if indent >= 0
" Decho "Match: ".callback_name." indent=".indent." info=".string(indent_info)
return indent
endif
endfor
" Previous line number
let indent_info.plnum = s:PrevNonBlankNonString(indent_info.clnum - 1)
let indent_info.pline = getline(indent_info.plnum)
let indent_callback_names = [
\ 's:StartOfFile',
\ 's:AfterAccessModifier',
\ 's:ContinuedLine',
\ 's:AfterBlockOpening',
\ 's:AfterHangingSplat',
\ 's:AfterUnbalancedBracket',
\ 's:AfterLeadingOperator',
\ 's:AfterEndKeyword',
\ 's:AfterIndentKeyword',
\ ]
for callback_name in indent_callback_names
" Decho "Running: ".callback_name
let indent = call(function(callback_name), [indent_info])
if indent >= 0
" Decho "Match: ".callback_name." indent=".indent." info=".string(indent_info)
return indent
endif
endfor
" 2.4. Work on the MSL line. {{{2
" --------------------------
let indent_callback_names = [
\ 's:PreviousNotMSL',
\ 's:IndentingKeywordInMSL',
\ 's:ContinuedHangingOperator',
\ ]
" Most Significant line based on the previous one -- in case it's a
" contination of something above
let indent_info.plnum_msl = s:GetMSL(indent_info.plnum)
for callback_name in indent_callback_names
" Decho "Running: ".callback_name
let indent = call(function(callback_name), [indent_info])
if indent >= 0
" Decho "Match: ".callback_name." indent=".indent." info=".string(indent_info)
return indent
endif
endfor
" }}}2
" By default, just return the previous line's indent
" Decho "Default case matched"
return indent(indent_info.plnum)
endfunction
" 3. Indenting Logic Callbacks {{{1
" ============================
function! s:AccessModifier(cline_info) abort
let info = a:cline_info
" If this line is an access modifier keyword, align according to the closest
" class declaration.
if g:ruby_indent_access_modifier_style == 'indent'
if s:Match(info.clnum, s:access_modifier_regex)
let class_lnum = s:FindContainingClass()
if class_lnum > 0
return indent(class_lnum) + info.sw
endif
endif
elseif g:ruby_indent_access_modifier_style == 'outdent'
if s:Match(info.clnum, s:access_modifier_regex)
let class_lnum = s:FindContainingClass()
if class_lnum > 0
return indent(class_lnum)
endif
endif
endif
return -1
endfunction
function! s:ClosingBracketOnEmptyLine(cline_info) abort
let info = a:cline_info
" If we got a closing bracket on an empty line, find its match and indent
" according to it. For parentheses we indent to its column - 1, for the
" others we indent to the containing line's MSL's level. Return -1 if fail.
let col = matchend(info.cline, '^\s*[]})]')
if col > 0 && !s:IsInStringOrComment(info.clnum, col)
call cursor(info.clnum, col)
let closing_bracket = info.cline[col - 1]
let bracket_pair = strpart('(){}[]', stridx(')}]', closing_bracket) * 2, 2)
if searchpair(escape(bracket_pair[0], '\['), '', bracket_pair[1], 'bW', s:skip_expr) > 0
if closing_bracket == ')' && col('.') != col('$') - 1
let ind = virtcol('.') - 1
elseif g:ruby_indent_block_style == 'do'
let ind = indent(line('.'))
else " g:ruby_indent_block_style == 'expression'
let ind = indent(s:GetMSL(line('.')))
endif
endif
return ind
endif
return -1
endfunction
function! s:BlockComment(cline_info) abort
" If we have a =begin or =end set indent to first column.
if match(a:cline_info.cline, '^\s*\%(=begin\|=end\)$') != -1
return 0
endif
return -1
endfunction
function! s:DeindentingKeyword(cline_info) abort
let info = a:cline_info
" If we have a deindenting keyword, find its match and indent to its level.
" TODO: this is messy
if s:Match(info.clnum, s:ruby_deindent_keywords)
call cursor(info.clnum, 1)
if searchpair(s:end_start_regex, s:end_middle_regex, s:end_end_regex, 'bW',
\ s:end_skip_expr) > 0
let msl = s:GetMSL(line('.'))
let line = getline(line('.'))
if s:IsAssignment(line, col('.')) &&
\ strpart(line, col('.') - 1, 2) !~ 'do'
" assignment to case/begin/etc, on the same line
if g:ruby_indent_assignment_style == 'hanging'
" hanging indent
let ind = virtcol('.') - 1
else
" align with variable
let ind = indent(line('.'))
endif
elseif g:ruby_indent_block_style == 'do'
" align to line of the "do", not to the MSL
let ind = indent(line('.'))
elseif getline(msl) =~ '=\s*\(#.*\)\=$'
" in the case of assignment to the MSL, align to the starting line,
" not to the MSL
let ind = indent(line('.'))
else
" align to the MSL
let ind = indent(msl)
endif
endif
return ind
endif
return -1
endfunction
function! s:MultilineStringOrLineComment(cline_info) abort
let info = a:cline_info
" If we are in a multi-line string or line-comment, don't do anything to it.
if s:IsInStringOrDocumentation(info.clnum, matchend(info.cline, '^\s*') + 1)
return indent(info.clnum)
endif
return -1
endfunction
function! s:ClosingHeredocDelimiter(cline_info) abort
let info = a:cline_info
" If we are at the closing delimiter of a "<<" heredoc-style string, set the
" indent to 0.
if info.cline =~ '^\k\+\s*$'
\ && s:IsInStringDelimiter(info.clnum, 1)
\ && search('\V<<'.info.cline, 'nbW') > 0
return 0
endif
return -1
endfunction
function! s:LeadingOperator(cline_info) abort
" If the current line starts with a leading operator, add a level of indent.
if s:Match(a:cline_info.clnum, s:leading_operator_regex)
return indent(s:GetMSL(a:cline_info.clnum)) + a:cline_info.sw
endif
return -1
endfunction
function! s:EmptyInsideString(pline_info) abort
" If the line is empty and inside a string (the previous line is a string,
" too), use the previous line's indent
let info = a:pline_info
let plnum = prevnonblank(info.clnum - 1)
let pline = getline(plnum)
if info.cline =~ '^\s*$'
\ && s:IsInStringOrComment(plnum, 1)
\ && s:IsInStringOrComment(plnum, strlen(pline))
return indent(plnum)
endif
return -1
endfunction
function! s:StartOfFile(pline_info) abort
" At the start of the file use zero indent.
if a:pline_info.plnum == 0
return 0
endif
return -1
endfunction
function! s:AfterAccessModifier(pline_info) abort
let info = a:pline_info
if g:ruby_indent_access_modifier_style == 'indent'
" If the previous line was a private/protected keyword, add a
" level of indent.
if s:Match(info.plnum, s:indent_access_modifier_regex)
return indent(info.plnum) + info.sw
endif
elseif g:ruby_indent_access_modifier_style == 'outdent'
" If the previous line was a private/protected/public keyword, add
" a level of indent, since the keyword has been out-dented.
if s:Match(info.plnum, s:access_modifier_regex)
return indent(info.plnum) + info.sw
endif
endif
return -1
endfunction
" Example:
"
" if foo || bar ||
" baz || bing
" puts "foo"
" end
"
function! s:ContinuedLine(pline_info) abort
let info = a:pline_info
let col = s:Match(info.plnum, s:ruby_indent_keywords)
if s:Match(info.plnum, s:continuable_regex) &&
\ s:Match(info.plnum, s:continuation_regex)
if col > 0 && s:IsAssignment(info.pline, col)
if g:ruby_indent_assignment_style == 'hanging'
" hanging indent
let ind = col - 1
else
" align with variable
let ind = indent(info.plnum)
endif
else
let ind = indent(s:GetMSL(info.plnum))
endif
return ind + info.sw + info.sw
endif
return -1
endfunction
function! s:AfterBlockOpening(pline_info) abort
let info = a:pline_info
" If the previous line ended with a block opening, add a level of indent.
if s:Match(info.plnum, s:block_regex)
if g:ruby_indent_block_style == 'do'
" don't align to the msl, align to the "do"
let ind = indent(info.plnum) + info.sw
else
let plnum_msl = s:GetMSL(info.plnum)
if getline(plnum_msl) =~ '=\s*\(#.*\)\=$'
" in the case of assignment to the msl, align to the starting line,
" not to the msl
let ind = indent(info.plnum) + info.sw
else
let ind = indent(plnum_msl) + info.sw
endif
endif
return ind
endif
return -1
endfunction
function! s:AfterLeadingOperator(pline_info) abort
" If the previous line started with a leading operator, use its MSL's level
" of indent
if s:Match(a:pline_info.plnum, s:leading_operator_regex)
return indent(s:GetMSL(a:pline_info.plnum))
endif
return -1
endfunction
function! s:AfterHangingSplat(pline_info) abort
let info = a:pline_info
" If the previous line ended with the "*" of a splat, add a level of indent
if info.pline =~ s:splat_regex
return indent(info.plnum) + info.sw
endif
return -1
endfunction
function! s:AfterUnbalancedBracket(pline_info) abort
let info = a:pline_info
" If the previous line contained unclosed opening brackets and we are still
" in them, find the rightmost one and add indent depending on the bracket
" type.
"
" If it contained hanging closing brackets, find the rightmost one, find its
" match and indent according to that.
if info.pline =~ '[[({]' || info.pline =~ '[])}]\s*\%(#.*\)\=$'
let [opening, closing] = s:ExtraBrackets(info.plnum)
if opening.pos != -1
if opening.type == '(' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0
if col('.') + 1 == col('$')
return indent(info.plnum) + info.sw
else
return virtcol('.')
endif
else
let nonspace = matchend(info.pline, '\S', opening.pos + 1) - 1
return nonspace > 0 ? nonspace : indent(info.plnum) + info.sw
endif
elseif closing.pos != -1
call cursor(info.plnum, closing.pos + 1)
normal! %
if s:Match(line('.'), s:ruby_indent_keywords)
return indent('.') + info.sw
else
return indent(s:GetMSL(line('.')))
endif
else
call cursor(info.clnum, info.col)
end
endif
return -1
endfunction
function! s:AfterEndKeyword(pline_info) abort
let info = a:pline_info
" If the previous line ended with an "end", match that "end"s beginning's
" indent.
let col = s:Match(info.plnum, '\%(^\|[^.:@$]\)\<end\>\s*\%(#.*\)\=$')
if col > 0
call cursor(info.plnum, col)
if searchpair(s:end_start_regex, '', s:end_end_regex, 'bW',
\ s:end_skip_expr) > 0
let n = line('.')
let ind = indent('.')
let msl = s:GetMSL(n)
if msl != n
let ind = indent(msl)
end
return ind
endif
end
return -1
endfunction
function! s:AfterIndentKeyword(pline_info) abort
let info = a:pline_info
let col = s:Match(info.plnum, s:ruby_indent_keywords)
if col > 0
call cursor(info.plnum, col)
let ind = virtcol('.') - 1 + info.sw
" TODO: make this better (we need to count them) (or, if a searchpair
" fails, we know that something is lacking an end and thus we indent a
" level
if s:Match(info.plnum, s:end_end_regex)
let ind = indent('.')
elseif s:IsAssignment(info.pline, col)
if g:ruby_indent_assignment_style == 'hanging'
" hanging indent
let ind = col + info.sw - 1
else
" align with variable
let ind = indent(info.plnum) + info.sw
endif
endif
return ind
endif
return -1
endfunction
function! s:PreviousNotMSL(msl_info) abort
let info = a:msl_info
" If the previous line wasn't a MSL
if info.plnum != info.plnum_msl
" If previous line ends bracket and begins non-bracket continuation decrease indent by 1.
if s:Match(info.plnum, s:bracket_switch_continuation_regex)
" TODO (2016-10-07) Wrong/unused? How could it be "1"?
return indent(info.plnum) - 1
" If previous line is a continuation return its indent.
" TODO: the || s:IsInString() thing worries me a bit.
elseif s:Match(info.plnum, s:non_bracket_continuation_regex) || s:IsInString(info.plnum, strlen(line))
return indent(info.plnum)
endif
endif
return -1
endfunction
function! s:IndentingKeywordInMSL(msl_info) abort
let info = a:msl_info
" If the MSL line had an indenting keyword in it, add a level of indent.
" TODO: this does not take into account contrived things such as
" module Foo; class Bar; end
let col = s:Match(info.plnum_msl, s:ruby_indent_keywords)
if col > 0
let ind = indent(info.plnum_msl) + info.sw
if s:Match(info.plnum_msl, s:end_end_regex)
let ind = ind - info.sw
elseif s:IsAssignment(getline(info.plnum_msl), col)
if g:ruby_indent_assignment_style == 'hanging'
" hanging indent
let ind = col + info.sw - 1
else
" align with variable
let ind = indent(info.plnum_msl) + info.sw
endif
endif
return ind
endif
return -1
endfunction
function! s:ContinuedHangingOperator(msl_info) abort
let info = a:msl_info
" If the previous line ended with [*+/.,-=], but wasn't a block ending or a
" closing bracket, indent one extra level.
if s:Match(info.plnum_msl, s:non_bracket_continuation_regex) && !s:Match(info.plnum_msl, '^\s*\([\])}]\|end\)')
if info.plnum_msl == info.plnum
let ind = indent(info.plnum_msl) + info.sw
else
let ind = indent(info.plnum_msl)
endif
return ind
endif
return -1
endfunction
" 4. Auxiliary Functions {{{1
" ======================
function! s:IsInRubyGroup(groups, lnum, col) abort
let ids = map(copy(a:groups), 'hlID("ruby".v:val)')
return index(ids, synID(a:lnum, a:col, 1)) >= 0
endfunction
" Check if the character at lnum:col is inside a string, comment, or is ascii.
function s:IsInStringOrComment(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_strcom
function! s:IsInStringOrComment(lnum, col) abort
return s:IsInRubyGroup(s:syng_strcom, a:lnum, a:col)
endfunction
" Check if the character at lnum:col is inside a string.
function s:IsInString(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_string
function! s:IsInString(lnum, col) abort
return s:IsInRubyGroup(s:syng_string, a:lnum, a:col)
endfunction
" Check if the character at lnum:col is inside a string or documentation.
function s:IsInStringOrDocumentation(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_stringdoc
function! s:IsInStringOrDocumentation(lnum, col) abort
return s:IsInRubyGroup(s:syng_stringdoc, a:lnum, a:col)
endfunction
" Check if the character at lnum:col is inside a string delimiter
function s:IsInStringDelimiter(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name') == 'rubyStringDelimiter'
function! s:IsInStringDelimiter(lnum, col) abort
return s:IsInRubyGroup(['StringDelimiter'], a:lnum, a:col)
endfunction
function! s:IsAssignment(str, pos) abort
return strpart(a:str, 0, a:pos - 1) =~ '=\s*$'
endfunction
" Find line above 'lnum' that isn't empty, in a comment, or in a string.
function s:PrevNonBlankNonString(lnum)
function! s:PrevNonBlankNonString(lnum) abort
let in_block = 0
let lnum = prevnonblank(a:lnum)
while lnum > 0
@ -191,10 +728,9 @@ function s:PrevNonBlankNonString(lnum)
endfunction
" Find line above 'lnum' that started the continuation 'lnum' may be part of.
function s:GetMSL(lnum)
function! s:GetMSL(lnum) abort
" Start on the line we're at and use its indent.
let msl = a:lnum
let msl_body = getline(msl)
let lnum = s:PrevNonBlankNonString(a:lnum - 1)
while lnum > 0
" If we have a continuation line, or we're in a string, use line as MSL.
@ -291,14 +827,13 @@ function s:GetMSL(lnum)
endif
endif
let msl_body = getline(msl)
let lnum = s:PrevNonBlankNonString(lnum - 1)
endwhile
return msl
endfunction
" Check if line 'lnum' has more opening brackets than closing ones.
function s:ExtraBrackets(lnum)
function! s:ExtraBrackets(lnum) abort
let opening = {'parentheses': [], 'braces': [], 'brackets': []}
let closing = {'parentheses': [], 'braces': [], 'brackets': []}
@ -360,7 +895,7 @@ function s:ExtraBrackets(lnum)
return [rightmost_opening, rightmost_closing]
endfunction
function s:Match(lnum, regex)
function! s:Match(lnum, regex) abort
let line = getline(a:lnum)
let offset = match(line, '\C'.a:regex)
let col = offset + 1
@ -380,7 +915,7 @@ endfunction
" Locates the containing class/module's definition line, ignoring nested classes
" along the way.
"
function! s:FindContainingClass()
function! s:FindContainingClass() abort
let saved_position = getpos('.')
while searchpair(s:end_start_regex, s:end_middle_regex, s:end_end_regex, 'bW',
@ -396,297 +931,6 @@ function! s:FindContainingClass()
return 0
endfunction
" 3. GetRubyIndent Function {{{1
" =========================
function GetRubyIndent(...)
" 3.1. Setup {{{2
" ----------
" The value of a single shift-width
let sw = shiftwidth()
" For the current line, use the first argument if given, else v:lnum
let clnum = a:0 ? a:1 : v:lnum
" Set up variables for restoring position in file. Could use clnum here.
let vcol = col('.')
" 3.2. Work on the current line {{{2
" -----------------------------
" Get the current line.
let line = getline(clnum)
let ind = -1
" If this line is an access modifier keyword, align according to the closest
" class declaration.
if g:ruby_indent_access_modifier_style == 'indent'
if s:Match(clnum, s:access_modifier_regex)
let class_line = s:FindContainingClass()
if class_line > 0
return indent(class_line) + sw
endif
endif
elseif g:ruby_indent_access_modifier_style == 'outdent'
if s:Match(clnum, s:access_modifier_regex)
let class_line = s:FindContainingClass()
if class_line > 0
return indent(class_line)
endif
endif
endif
" If we got a closing bracket on an empty line, find its match and indent
" according to it. For parentheses we indent to its column - 1, for the
" others we indent to the containing line's MSL's level. Return -1 if fail.
let col = matchend(line, '^\s*[]})]')
if col > 0 && !s:IsInStringOrComment(clnum, col)
call cursor(clnum, col)
let bs = strpart('(){}[]', stridx(')}]', line[col - 1]) * 2, 2)
if searchpair(escape(bs[0], '\['), '', bs[1], 'bW', s:skip_expr) > 0
if line[col-1]==')' && col('.') != col('$') - 1
let ind = virtcol('.') - 1
elseif g:ruby_indent_block_style == 'do'
let ind = indent(line('.'))
else " g:ruby_indent_block_style == 'expression'
let ind = indent(s:GetMSL(line('.')))
endif
endif
return ind
endif
" If we have a =begin or =end set indent to first column.
if match(line, '^\s*\%(=begin\|=end\)$') != -1
return 0
endif
" If we have a deindenting keyword, find its match and indent to its level.
" TODO: this is messy
if s:Match(clnum, s:ruby_deindent_keywords)
call cursor(clnum, 1)
if searchpair(s:end_start_regex, s:end_middle_regex, s:end_end_regex, 'bW',
\ s:end_skip_expr) > 0
let msl = s:GetMSL(line('.'))
let line = getline(line('.'))
if strpart(line, 0, col('.') - 1) =~ '=\s*$' &&
\ strpart(line, col('.') - 1, 2) !~ 'do'
" assignment to case/begin/etc, on the same line, hanging indent
let ind = virtcol('.') - 1
elseif g:ruby_indent_block_style == 'do'
" align to line of the "do", not to the MSL
let ind = indent(line('.'))
elseif getline(msl) =~ '=\s*\(#.*\)\=$'
" in the case of assignment to the MSL, align to the starting line,
" not to the MSL
let ind = indent(line('.'))
else
" align to the MSL
let ind = indent(msl)
endif
endif
return ind
endif
" If we are in a multi-line string or line-comment, don't do anything to it.
if s:IsInStringOrDocumentation(clnum, matchend(line, '^\s*') + 1)
return indent('.')
endif
" If we are at the closing delimiter of a "<<" heredoc-style string, set the
" indent to 0.
if line =~ '^\k\+\s*$'
\ && s:IsInStringDelimiter(clnum, 1)
\ && search('\V<<'.line, 'nbW') > 0
return 0
endif
" If the current line starts with a leading operator, add a level of indent.
if s:Match(clnum, s:leading_operator_regex)
return indent(s:GetMSL(clnum)) + sw
endif
" 3.3. Work on the previous line. {{{2
" -------------------------------
" Find a non-blank, non-multi-line string line above the current line.
let lnum = s:PrevNonBlankNonString(clnum - 1)
" If the line is empty and inside a string, use the previous line.
if line =~ '^\s*$' && lnum != prevnonblank(clnum - 1)
return indent(prevnonblank(clnum))
endif
" At the start of the file use zero indent.
if lnum == 0
return 0
endif
" Set up variables for the previous line.
let line = getline(lnum)
let ind = indent(lnum)
if g:ruby_indent_access_modifier_style == 'indent'
" If the previous line was a private/protected keyword, add a
" level of indent.
if s:Match(lnum, s:indent_access_modifier_regex)
return indent(lnum) + sw
endif
elseif g:ruby_indent_access_modifier_style == 'outdent'
" If the previous line was a private/protected/public keyword, add
" a level of indent, since the keyword has been out-dented.
if s:Match(lnum, s:access_modifier_regex)
return indent(lnum) + sw
endif
endif
if s:Match(lnum, s:continuable_regex) && s:Match(lnum, s:continuation_regex)
return indent(s:GetMSL(lnum)) + sw + sw
endif
" If the previous line ended with a block opening, add a level of indent.
if s:Match(lnum, s:block_regex)
let msl = s:GetMSL(lnum)
if g:ruby_indent_block_style == 'do'
" don't align to the msl, align to the "do"
let ind = indent(lnum) + sw
elseif getline(msl) =~ '=\s*\(#.*\)\=$'
" in the case of assignment to the msl, align to the starting line,
" not to the msl
let ind = indent(lnum) + sw
else
let ind = indent(msl) + sw
endif
return ind
endif
" If the previous line started with a leading operator, use its MSL's level
" of indent
if s:Match(lnum, s:leading_operator_regex)
return indent(s:GetMSL(lnum))
endif
" If the previous line ended with the "*" of a splat, add a level of indent
if line =~ s:splat_regex
return indent(lnum) + sw
endif
" If the previous line contained unclosed opening brackets and we are still
" in them, find the rightmost one and add indent depending on the bracket
" type.
"
" If it contained hanging closing brackets, find the rightmost one, find its
" match and indent according to that.
if line =~ '[[({]' || line =~ '[])}]\s*\%(#.*\)\=$'
let [opening, closing] = s:ExtraBrackets(lnum)
if opening.pos != -1
if opening.type == '(' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0
if col('.') + 1 == col('$')
return ind + sw
else
return virtcol('.')
endif
else
let nonspace = matchend(line, '\S', opening.pos + 1) - 1
return nonspace > 0 ? nonspace : ind + sw
endif
elseif closing.pos != -1
call cursor(lnum, closing.pos + 1)
normal! %
if s:Match(line('.'), s:ruby_indent_keywords)
return indent('.') + sw
else
return indent(s:GetMSL(line('.')))
endif
else
call cursor(clnum, vcol)
end
endif
" If the previous line ended with an "end", match that "end"s beginning's
" indent.
let col = s:Match(lnum, '\%(^\|[^.:@$]\)\<end\>\s*\%(#.*\)\=$')
if col > 0
call cursor(lnum, col)
if searchpair(s:end_start_regex, '', s:end_end_regex, 'bW',
\ s:end_skip_expr) > 0
let n = line('.')
let ind = indent('.')
let msl = s:GetMSL(n)
if msl != n
let ind = indent(msl)
end
return ind
endif
end
let col = s:Match(lnum, s:ruby_indent_keywords)
if col > 0
call cursor(lnum, col)
let ind = virtcol('.') - 1 + sw
" TODO: make this better (we need to count them) (or, if a searchpair
" fails, we know that something is lacking an end and thus we indent a
" level
if s:Match(lnum, s:end_end_regex)
let ind = indent('.')
endif
return ind
endif
" 3.4. Work on the MSL line. {{{2
" --------------------------
" Set up variables to use and search for MSL to the previous line.
let p_lnum = lnum
let lnum = s:GetMSL(lnum)
" If the previous line wasn't a MSL.
if p_lnum != lnum
" If previous line ends bracket and begins non-bracket continuation decrease indent by 1.
if s:Match(p_lnum, s:bracket_switch_continuation_regex)
return ind - 1
" If previous line is a continuation return its indent.
" TODO: the || s:IsInString() thing worries me a bit.
elseif s:Match(p_lnum, s:non_bracket_continuation_regex) || s:IsInString(p_lnum,strlen(line))
return ind
endif
endif
" Set up more variables, now that we know we wasn't continuation bound.
let line = getline(lnum)
let msl_ind = indent(lnum)
" If the MSL line had an indenting keyword in it, add a level of indent.
" TODO: this does not take into account contrived things such as
" module Foo; class Bar; end
if s:Match(lnum, s:ruby_indent_keywords)
let ind = msl_ind + sw
if s:Match(lnum, s:end_end_regex)
let ind = ind - sw
endif
return ind
endif
" If the previous line ended with [*+/.,-=], but wasn't a block ending or a
" closing bracket, indent one extra level.
if s:Match(lnum, s:non_bracket_continuation_regex) && !s:Match(lnum, '^\s*\([\])}]\|end\)')
if lnum == p_lnum
let ind = msl_ind + sw
else
let ind = msl_ind
endif
return ind
endif
" }}}2
return ind
endfunction
" }}}1
let &cpo = s:cpo_save

View File

@ -3,10 +3,11 @@
" Maintainer: Christian Brabandt <cb@256bit.org>
" Original Author: Nikolai Weibull <now@bitwi.se>
" Previous Maintainer: Peter Aronoff <telemachus@arpinum.org>
" Latest Revision: 2018-03-26
" Latest Revision: 2019-02-02
" License: Vim (see :h license)
" Repository: https://github.com/chrisbra/vim-sh-indent
" Changelog:
" 20190201 - Better check for closing if sections
" 20180724 - make check for zsh syntax more rigid (needs word-boundaries)
" 20180326 - better support for line continuation
" 20180325 - better detection of function definitions
@ -59,6 +60,7 @@ function! s:indent_value(option)
endfunction
function! GetShIndent()
let curline = getline(v:lnum)
let lnum = prevnonblank(v:lnum - 1)
if lnum == 0
return 0
@ -72,7 +74,7 @@ function! GetShIndent()
" Check contents of previous lines
if line =~ '^\s*\%(if\|then\|do\|else\|elif\|case\|while\|until\|for\|select\|foreach\)\>' ||
\ (&ft is# 'zsh' && line =~ '\<\%(if\|then\|do\|else\|elif\|case\|while\|until\|for\|select\|foreach\)\>')
if line !~ '\<\%(fi\|esac\|done\|end\)\>\s*\%(#.*\)\=$'
if !s:is_end_expression(line)
let ind += s:indent_value('default')
endif
elseif s:is_case_label(line, pnum)
@ -90,7 +92,10 @@ function! GetShIndent()
endif
elseif s:end_block(line) && !s:start_block(line)
let ind -= s:indent_value('default')
elseif pnum != 0 && s:is_continuation_line(pline) && !s:end_block(getline(v:lnum))
elseif pnum != 0 &&
\ s:is_continuation_line(pline) &&
\ !s:end_block(curline) &&
\ !s:is_end_expression(curline)
" only add indent, if line and pline is in the same block
let i = v:lnum
let ind2 = indent(s:find_continued_lnum(pnum))
@ -106,8 +111,15 @@ function! GetShIndent()
let pine = line
" Check content of current line
let line = getline(v:lnum)
if line =~ '^\s*\%(then\|do\|else\|elif\|fi\|done\|end\)\>' || s:end_block(line)
let line = curline
" Current line is a endif line, so get indent from start of "if condition" line
" TODO: should we do the same for other "end" lines?
if curline =~ '^\s*\%(fi\)\s*\%(#.*\)\=$'
let previous_line = search('if.\{-\};\s*then\s*\%(#.*\)\=$', 'bnW')
if previous_line > 0
let ind = indent(previous_line)
endif
elseif line =~ '^\s*\%(then\|do\|else\|elif\|done\|end\)\>' || s:end_block(line)
let ind -= s:indent_value('default')
elseif line =~ '^\s*esac\>' && s:is_case_empty(getline(v:lnum - 1))
let ind -= s:indent_value('default')
@ -210,8 +222,8 @@ endfunction
function! s:is_here_doc(line)
if a:line =~ '^\w\+$'
let here_pat = '<<-\?'. s:escape(a:line). '\$'
return search(here_pat, 'bnW') > 0
let here_pat = '<<-\?'. s:escape(a:line). '\$'
return search(here_pat, 'bnW') > 0
endif
return 0
endfunction
@ -256,5 +268,9 @@ function! s:is_comment(line)
return a:line =~ '^\s*#'
endfunction
function! s:is_end_expression(line)
return a:line =~ '\<\%(fi\|esac\|done\|end\)\>\s*\%(#.*\)\=$'
endfunction
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@ -1,9 +1,11 @@
" Language: xml
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
" Last Changed: Dec 07th, 2018
" Last Changed: Jan 28, 2019
" Maintainer: Christian Brabandt <cb@256bit.org>
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
" Last Change:
" 20190128 - Make sure to find previous tag
" https://github.com/chrisbra/vim-xml-ftplugin/issues/4
" 20181116 - Fix indentation when tags start with a colon or an underscore
" https://github.com/vim/vim/pull/926
" 20181022 - Do not overwrite indentkeys setting
@ -88,15 +90,16 @@ endfun
fun! XmlIndentGet(lnum, use_syntax_check)
" Find a non-empty line above the current line.
let plnum = prevnonblank(a:lnum - 1)
" Find previous line with a tag (regardless whether open or closed)
let ptag = search('.\{-}<[/:A-Z_a-z]', 'bnw')
" Hit the start of the file, use zero indent.
if plnum == 0
return 0
endif
let syn_name = ''
" Find previous line with a tag (regardless whether open or closed,
" but always start restrict the match to a line before the current one
let ptag_pattern = '\%(.\{-}<[/:A-Z_a-z]\)'. '\%(\&\%<'. line('.').'l\)'
let ptag = search(ptag_pattern, 'bnw')
let syn_name = ''
if a:use_syntax_check
let check_lnum = <SID>XmlIndentSynCheck(plnum)
let check_alnum = <SID>XmlIndentSynCheck(a:lnum)

View File

@ -368,6 +368,95 @@ let g:menutrans_spell_change_ARG_to = 'Ændr\ "%s"\ til'
let g:menutrans_spell_add_ARG_to_word_list = 'Tilføj\ "%s"\ til\ ordliste'
let g:menutrans_spell_ignore_ARG = 'Ignorer "%s"'
" Forsøg på at oversætte netrw-menuen
menut Help<tab><F1> Hjælp<tab><F1>
" -Sep1-
menut Go\ Up\ Directory<tab>- \ mappe\ op<tab>-
menut Apply\ Special\ Viewer<tab>x Anvend\ speciel\ fremviser<tab>x
menut Bookmarks\ and\ History Bogmærker\ og\ historik<tab>:echo "(disabled)"
menut Bookmark\ Current\ Directory<tab>mb Sæt\ bogmærke\ for\ nuværende\ mappe<tab>mb
menut Goto\ Prev\ Dir\ (History)<tab>u \ til\ forrige\ mappe\ (historik)<tab>u
menut Goto\ Next\ Dir\ (History)<tab>U \ til\ næste\ mappe\ (historik)<tab>U
menut List<tab>qb Oplist<tab>qb
menut Browsing\ Control Gennemgangskontol
menut Horizontal\ Split<tab>o Vandret\ opdeling<tab>o
menut Vertical\ Split<tab>v Lodret\ opdeling<tab>v
menut New\ Tab<tab>t Nyt\ faneblad<tab>t
menut Preview<tab>p Forhåndsvis<tab>p
menut Edit\ File\ Hiding\ List<tab><ctrl-h> Rediger\ liste\ til\ filskjulning
menut Edit\ Sorting\ Sequence<tab>S Rediger\ sorteringssekvens<tab>S
menut Quick\ Hide/Unhide\ Dot\ Files<tab>gh Hurtig\ skjul/vis\ punktum-filer<tab>gh
menut Refresh\ Listing<tab><ctrl-l> Genopfrisk\ oplistning<tab>\<c-l> ikke sikker det med \ er korrekt
menut Settings/Options<tab>:NetrwSettings Indstillinger/valgmuligheder<tab>
menut Delete\ File/Directory<tab>D Slet\ fil/mappe<tab>D
menut Edit\ File/Dir Rediger\ fil/mappe
menut Create\ New\ File<tab>% Opret\ ny\ fil<tab>%
menut In\ Current\ Window<tab><cr> I\ nuværende\ vindue<tab>
menut Preview\ File/Directory<tab>p Forhåndsvis\ fil/mappe<tab>p
menut In\ Previous\ Window<tab>P I\ forrige\ vindue<tab>P
menut In\ New\ Window<tab>o I\ nyt\ vindue<tab>o
menut In\ New\ Tab<tab>t I\ nyt\ faneblad<tab>t
menut In\ New\ Vertical\ Window<tab>v I\ nyt\ lodret\ vindue<tab>v
menut Explore Gennemse
menut Directory\ Name Mappenavn<tab>:Explore
menut Filenames\ Matching\ Pattern\ (curdir\ only)<tab>:Explore\ */ test29<tab>:Explore */
menut Filenames\ Matching\ Pattern\ (+subdirs)<tab>:Explore\ **/ test30<tab>:Explore **/
menut Files\ Containing\ String\ Pattern\ (curdir\ only)<tab>:Explore\ *// test31<tab>:Explore *//
menut Files\ Containing\ String\ Pattern\ (+subdirs)<tab>:Explore\ **// test32<tab>:Explore **//
menut Next\ Match<tab>:Nexplore Næste\ match<tab>:Nexplore<cr>
menut Prev\ Match<tab>:Pexplore Forrige\ match<tab>:Pexplore<cr>
menut Make\ Subdirectory<tab>d Opret\ undermappe<tab>d
menut Marked\ Files Mærkede\ filer
menut Mark\ File<tab>mf Mærk\ fil<tab>mf
menut Mark\ Files\ by\ Regexp<tab>mr Mærk\ filer\ efter\ regulært\ udtrk<tab>mr
menut Hide-Show-List\ Control<tab>a test38<tab>a
menut Copy\ To\ Target<tab>mc Kopiér\ til\ mål<tab>mc
menut Delete<tab>D Slet<tab>D
menut Diff<tab>md Diff<tab>md
menut Edit<tab>me Rediger<tab>me
menut Exe\ Cmd<tab>mx test43<tab>mx
menut Move\ To\ Target<tab>mm Flyt\ til\ mål<tab>mm
menut Obtain<tab>O Indhent<tab>O
menut Print<tab>mp Udskriv<tab>mp
menut Replace<tab>R Erstat<tab>R
menut Set\ Target<tab>mt Sæt\ mål<tab>mt
menut Tag<tab>mT test49<tab>mT
menut Zip/Unzip/Compress/Uncompress<tab>mz Zip/unzip/komprimér/udpak<tab>mz
menut Obtain\ File<tab>O Indhent\ fil<tab>O
menut Style Stile
menut Listing Oplisting
menut thin<tab>i tynd
menut long<tab>i lang
menut wide<tab>i bred
menut tree<tab>i træ
menut Normal-Hide-Show Normal-skjul-vis
menut Show\ All<tab>a Vis\ alle<tab>
menut Normal<tab>a Normal<tab>
menut Hidden\ Only<tab>a Kun\ skulte<tab>
menut Reverse\ Sorting\ Order<tab> Omvendt\ sorteringsrækkefølge
menut Sorting\ Method Sorteringsmetode
menut Name<tab>s Navn
menut Time<tab>s Tidspunkt
menut Size<tab>s Størrelse
menut Exten<tab>s Endelse
menut Rename\ File/Directory<tab>R Omdøb\ fil/mappe<tab>R
menut Set\ Current\ Directory<tab>c Sæt\ nuværende\ mappe<tab>c
menut History Historik
menut Targets Mål
let &cpo = s:keepcpo
unlet s:keepcpo

View File

@ -2,7 +2,7 @@
" You can also use this as a start for your own set of menus.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2018 May 17
" Last Change: 2019 Jan 27
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
" in all modes and avoid side effects from mappings defined by the user.
@ -856,17 +856,15 @@ an 70.300 &Window.&New<Tab>^Wn <C-W>n
an 70.310 &Window.S&plit<Tab>^Ws <C-W>s
an 70.320 &Window.Sp&lit\ To\ #<Tab>^W^^ <C-W><C-^>
an 70.330 &Window.Split\ &Vertically<Tab>^Wv <C-W>v
if has("vertsplit")
an <silent> 70.332 &Window.Split\ File\ E&xplorer :call MenuExplOpen()<CR>
if !exists("*MenuExplOpen")
fun MenuExplOpen()
if @% == ""
20vsp .
else
exe "20vsp " . s:FnameEscape(expand("%:p:h"))
endif
endfun
endif
an <silent> 70.332 &Window.Split\ File\ E&xplorer :call MenuExplOpen()<CR>
if !exists("*MenuExplOpen")
fun MenuExplOpen()
if @% == ""
20vsp .
else
exe "20vsp " . s:FnameEscape(expand("%:p:h"))
endif
endfun
endif
an 70.335 &Window.-SEP1- <Nop>
an 70.340 &Window.&Close<Tab>^Wc :confirm close<CR>

View File

@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2018 May 15
" Last Change: 2019 Feb 08
" If there already is an option window, jump to that one.
let buf = bufnr('option-window')
@ -395,11 +395,9 @@ endif
call <SID>Header("syntax, highlighting and spelling")
call append("$", "background\t\"dark\" or \"light\"; the background color brightness")
call <SID>OptionG("bg", &bg)
if has("autocmd")
call append("$", "filetype\ttype of file; triggers the FileType event when set")
call append("$", "\t(local to buffer)")
call <SID>OptionL("ft")
endif
call append("$", "filetype\ttype of file; triggers the FileType event when set")
call append("$", "\t(local to buffer)")
call <SID>OptionL("ft")
if has("syntax")
call append("$", "syntax\tname of syntax highlighting used")
call append("$", "\t(local to buffer)")
@ -454,10 +452,8 @@ if has("statusline")
endif
call append("$", "equalalways\tmake all windows the same size when adding/removing windows")
call <SID>BinOptionG("ea", &ea)
if has("vertsplit")
call append("$", "eadirection\tin which direction 'equalalways' works: \"ver\", \"hor\" or \"both\"")
call <SID>OptionG("ead", &ead)
endif
call append("$", "eadirection\tin which direction 'equalalways' works: \"ver\", \"hor\" or \"both\"")
call <SID>OptionG("ead", &ead)
call append("$", "winheight\tminimal number of lines used for the current window")
call append("$", " \tset wh=" . &wh)
call append("$", "winminheight\tminimal number of lines used for any window")
@ -465,15 +461,13 @@ call append("$", " \tset wmh=" . &wmh)
call append("$", "winfixheight\tkeep the height of the window")
call append("$", "\t(local to window)")
call <SID>BinOptionL("wfh")
if has("vertsplit")
call append("$", "winfixwidth\tkeep the width of the window")
call append("$", "\t(local to window)")
call <SID>BinOptionL("wfw")
call append("$", "winwidth\tminimal number of columns used for the current window")
call append("$", " \tset wiw=" . &wiw)
call append("$", "winminwidth\tminimal number of columns used for any window")
call append("$", " \tset wmw=" . &wmw)
endif
call append("$", "winwidth\tminimal number of columns used for the current window")
call append("$", " \tset wiw=" . &wiw)
call append("$", "winminwidth\tminimal number of columns used for any window")
call append("$", " \tset wmw=" . &wmw)
call append("$", "helpheight\tinitial height of the help window")
call append("$", " \tset hh=" . &hh)
if has("quickfix")
@ -490,22 +484,16 @@ call append("$", "\tto a buffer")
call <SID>OptionG("swb", &swb)
call append("$", "splitbelow\ta new window is put below the current one")
call <SID>BinOptionG("sb", &sb)
if has("vertsplit")
call append("$", "splitright\ta new window is put right of the current one")
call <SID>BinOptionG("spr", &spr)
endif
if has("scrollbind")
call append("$", "scrollbind\tthis window scrolls together with other bound windows")
call append("$", "\t(local to window)")
call <SID>BinOptionL("scb")
call append("$", "scrollopt\t\"ver\", \"hor\" and/or \"jump\"; list of options for 'scrollbind'")
call <SID>OptionG("sbo", &sbo)
endif
if has("cursorbind")
call append("$", "cursorbind\tthis window's cursor moves together with other bound windows")
call append("$", "\t(local to window)")
call <SID>BinOptionL("crb")
endif
call append("$", "splitright\ta new window is put right of the current one")
call <SID>BinOptionG("spr", &spr)
call append("$", "scrollbind\tthis window scrolls together with other bound windows")
call append("$", "\t(local to window)")
call <SID>BinOptionL("scb")
call append("$", "scrollopt\t\"ver\", \"hor\" and/or \"jump\"; list of options for 'scrollbind'")
call <SID>OptionG("sbo", &sbo)
call append("$", "cursorbind\tthis window's cursor moves together with other bound windows")
call append("$", "\t(local to window)")
call <SID>BinOptionL("crb")
if has("terminal")
call append("$", "termwinsize\tsize of a terminal window")
call append("$", "\t(local to window)")
@ -515,6 +503,10 @@ if has("terminal")
call <SID>OptionL("twk")
call append("$", "termwinscroll\tmax number of lines to keep for scrollback in a terminal window")
call append("$", "\t(local to window)")
if has('win32')
call append("$", "termwintype\ttype of pty to use for a terminal window")
call <SID>OptionG("twt", &twt)
endif
call <SID>OptionL("twsl")
if exists("&winptydll")
call append("$", "winptydll\tname of the winpty dynamic library")
@ -693,12 +685,10 @@ if has("printer")
call append("$", "printencoding\tencoding used to print the PostScript file for :hardcopy")
call <SID>OptionG("penc", &penc)
endif
if has("multi_byte")
call append("$", "printmbcharset\tthe CJK character set to be used for CJK output from :hardcopy")
call <SID>OptionG("pmbcs", &pmbcs)
call append("$", "printmbfont\tlist of font names to be used for CJK output from :hardcopy")
call <SID>OptionG("pmbfn", &pmbfn)
endif
call append("$", "printmbcharset\tthe CJK character set to be used for CJK output from :hardcopy")
call <SID>OptionG("pmbcs", &pmbcs)
call append("$", "printmbfont\tlist of font names to be used for CJK output from :hardcopy")
call <SID>OptionG("pmbfn", &pmbfn)
endif
call <SID>Header("messages and info")
@ -1004,11 +994,9 @@ call <SID>BinOptionL("eol")
call append("$", "fixendofline\tfixes missing end-of-line at end of text file")
call append("$", "\t(local to buffer)")
call <SID>BinOptionL("fixeol")
if has("multi_byte")
call append("$", "bomb\tprepend a Byte Order Mark to the file")
call append("$", "\t(local to buffer)")
call <SID>BinOptionL("bomb")
endif
call append("$", "bomb\tprepend a Byte Order Mark to the file")
call append("$", "\t(local to buffer)")
call <SID>BinOptionL("bomb")
call append("$", "fileformat\tend-of-line format: \"dos\", \"unix\" or \"mac\"")
call append("$", "\t(local to buffer)")
call <SID>OptionL("ff")
@ -1105,12 +1093,10 @@ if has("wildmenu")
call append("$", "wildmenu\tcommand-line completion shows a list of matches")
call <SID>BinOptionG("wmnu", &wmnu)
endif
if has("vertsplit")
call append("$", "cedit\tkey used to open the command-line window")
call <SID>OptionG("cedit", &cedit)
call append("$", "cmdwinheight\theight of the command-line window")
call <SID>OptionG("cwh", &cwh)
endif
call append("$", "cedit\tkey used to open the command-line window")
call <SID>OptionG("cedit", &cedit)
call append("$", "cmdwinheight\theight of the command-line window")
call <SID>OptionG("cwh", &cwh)
call <SID>Header("executing external commands")
@ -1262,44 +1248,38 @@ if has("xim")
endif
if has("multi_byte")
call <SID>Header("multi-byte characters")
call append("$", "encoding\tcharacter encoding used in Vim: \"latin1\", \"utf-8\"")
call append("$", "\t\"euc-jp\", \"big5\", etc.")
call <SID>OptionG("enc", &enc)
call append("$", "fileencoding\tcharacter encoding for the current file")
call append("$", "\t(local to buffer)")
call <SID>OptionL("fenc")
call append("$", "fileencodings\tautomatically detected character encodings")
call <SID>OptionG("fencs", &fencs)
call append("$", "termencoding\tcharacter encoding used by the terminal")
call <SID>OptionG("tenc", &tenc)
call append("$", "charconvert\texpression used for character encoding conversion")
call <SID>OptionG("ccv", &ccv)
call append("$", "delcombine\tdelete combining (composing) characters on their own")
call <SID>BinOptionG("deco", &deco)
call append("$", "maxcombine\tmaximum number of combining (composing) characters displayed")
call <SID>OptionG("mco", &mco)
if has("xim") && has("gui_gtk")
call append("$", "imactivatekey\tkey that activates the X input method")
call <SID>OptionG("imak", &imak)
endif
call append("$", "ambiwidth\twidth of ambiguous width characters")
call <SID>OptionG("ambw", &ambw)
call append("$", "emoji\temoji characters are full width")
call <SID>BinOptionG("emo", &emo)
call <SID>Header("multi-byte characters")
call append("$", "encoding\tcharacter encoding used in Vim: \"latin1\", \"utf-8\"")
call append("$", "\t\"euc-jp\", \"big5\", etc.")
call <SID>OptionG("enc", &enc)
call append("$", "fileencoding\tcharacter encoding for the current file")
call append("$", "\t(local to buffer)")
call <SID>OptionL("fenc")
call append("$", "fileencodings\tautomatically detected character encodings")
call <SID>OptionG("fencs", &fencs)
call append("$", "termencoding\tcharacter encoding used by the terminal")
call <SID>OptionG("tenc", &tenc)
call append("$", "charconvert\texpression used for character encoding conversion")
call <SID>OptionG("ccv", &ccv)
call append("$", "delcombine\tdelete combining (composing) characters on their own")
call <SID>BinOptionG("deco", &deco)
call append("$", "maxcombine\tmaximum number of combining (composing) characters displayed")
call <SID>OptionG("mco", &mco)
if has("xim") && has("gui_gtk")
call append("$", "imactivatekey\tkey that activates the X input method")
call <SID>OptionG("imak", &imak)
endif
call append("$", "ambiwidth\twidth of ambiguous width characters")
call <SID>OptionG("ambw", &ambw)
call append("$", "emoji\temoji characters are full width")
call <SID>BinOptionG("emo", &emo)
call <SID>Header("various")
if has("virtualedit")
call append("$", "virtualedit\twhen to use virtual editing: \"block\", \"insert\" and/or \"all\"")
call <SID>OptionG("ve", &ve)
endif
if has("autocmd")
call append("$", "eventignore\tlist of autocommand events which are to be ignored")
call <SID>OptionG("ei", &ei)
endif
call append("$", "virtualedit\twhen to use virtual editing: \"block\", \"insert\" and/or \"all\"")
call <SID>OptionG("ve", &ve)
call append("$", "eventignore\tlist of autocommand events which are to be ignored")
call <SID>OptionG("ei", &ei)
call append("$", "loadplugins\tload plugin scripts when starting up")
call <SID>BinOptionG("lpl", &lpl)
call append("$", "exrc\tenable reading .vimrc/.exrc/.gvimrc in the current directory")

View File

@ -0,0 +1,754 @@
" matchit.vim: (global plugin) Extended "%" matching
" autload script of matchit plugin, see ../plugin/matchit.vim
" Last Change: 2019 Jan 28
let s:last_mps = ""
let s:last_words = ":"
let s:patBR = ""
let s:save_cpo = &cpo
set cpo&vim
" Auto-complete mappings: (not yet "ready for prime time")
" TODO Read :help write-plugin for the "right" way to let the user
" specify a key binding.
" let g:match_auto = '<C-]>'
" let g:match_autoCR = '<C-CR>'
" if exists("g:match_auto")
" execute "inoremap " . g:match_auto . ' x<Esc>"=<SID>Autocomplete()<CR>Pls'
" endif
" if exists("g:match_autoCR")
" execute "inoremap " . g:match_autoCR . ' <CR><C-R>=<SID>Autocomplete()<CR>'
" endif
" if exists("g:match_gthhoh")
" execute "inoremap " . g:match_gthhoh . ' <C-O>:call <SID>Gthhoh()<CR>'
" endif " gthhoh = "Get the heck out of here!"
let s:notslash = '\\\@1<!\%(\\\\\)*'
function s:RestoreOptions()
" In s:CleanUp(), :execute "set" restore_options .
let restore_options = ""
if get(b:, 'match_ignorecase', &ic) != &ic
let restore_options .= (&ic ? " " : " no") . "ignorecase"
let &ignorecase = b:match_ignorecase
endif
if &ve != ''
let restore_options = " ve=" . &ve . restore_options
set ve=
endif
return restore_options
endfunction
function matchit#Match_wrapper(word, forward, mode) range
let restore_options = s:RestoreOptions()
" If this function was called from Visual mode, make sure that the cursor
" is at the correct end of the Visual range:
if a:mode == "v"
execute "normal! gv\<Esc>"
elseif a:mode == "o" && mode(1) !~# '[vV]'
exe "norm! v"
endif
" In s:CleanUp(), we may need to check whether the cursor moved forward.
let startpos = [line("."), col(".")]
" Use default behavior if called with a count.
if v:count
exe "normal! " . v:count . "%"
return s:CleanUp(restore_options, a:mode, startpos)
end
" First step: if not already done, set the script variables
" s:do_BR flag for whether there are backrefs
" s:pat parsed version of b:match_words
" s:all regexp based on s:pat and the default groups
if !exists("b:match_words") || b:match_words == ""
let match_words = ""
elseif b:match_words =~ ":"
let match_words = b:match_words
else
" Allow b:match_words = "GetVimMatchWords()" .
execute "let match_words =" b:match_words
endif
" Thanks to Preben "Peppe" Guldberg and Bram Moolenaar for this suggestion!
if (match_words != s:last_words) || (&mps != s:last_mps)
\ || exists("b:match_debug")
let s:last_mps = &mps
" quote the special chars in 'matchpairs', replace [,:] with \| and then
" append the builtin pairs (/*, */, #if, #ifdef, #ifndef, #else, #elif,
" #endif)
let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") .
\ '\/\*:\*\/,#\s*if\%(n\=def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>'
" s:all = pattern with all the keywords
let match_words = match_words . (strlen(match_words) ? "," : "") . default
let s:last_words = match_words
if match_words !~ s:notslash . '\\\d'
let s:do_BR = 0
let s:pat = match_words
else
let s:do_BR = 1
let s:pat = s:ParseWords(match_words)
endif
let s:all = substitute(s:pat, s:notslash . '\zs[,:]\+', '\\|', 'g')
" Just in case there are too many '\(...)' groups inside the pattern, make
" sure to use \%(...) groups, so that error E872 can be avoided
let s:all = substitute(s:all, '\\(', '\\%(', 'g')
let s:all = '\%(' . s:all . '\)'
if exists("b:match_debug")
let b:match_pat = s:pat
endif
" Reconstruct the version with unresolved backrefs.
let s:patBR = substitute(match_words.',',
\ s:notslash.'\zs[,:]*,[,:]*', ',', 'g')
let s:patBR = substitute(s:patBR, s:notslash.'\zs:\{2,}', ':', 'g')
endif
" Second step: set the following local variables:
" matchline = line on which the cursor started
" curcol = number of characters before match
" prefix = regexp for start of line to start of match
" suffix = regexp for end of match to end of line
" Require match to end on or after the cursor and prefer it to
" start on or before the cursor.
let matchline = getline(startpos[0])
if a:word != ''
" word given
if a:word !~ s:all
echohl WarningMsg|echo 'Missing rule for word:"'.a:word.'"'|echohl NONE
return s:CleanUp(restore_options, a:mode, startpos)
endif
let matchline = a:word
let curcol = 0
let prefix = '^\%('
let suffix = '\)$'
" Now the case when "word" is not given
else " Find the match that ends on or after the cursor and set curcol.
let regexp = s:Wholematch(matchline, s:all, startpos[1]-1)
let curcol = match(matchline, regexp)
" If there is no match, give up.
if curcol == -1
return s:CleanUp(restore_options, a:mode, startpos)
endif
let endcol = matchend(matchline, regexp)
let suf = strlen(matchline) - endcol
let prefix = (curcol ? '^.*\%' . (curcol + 1) . 'c\%(' : '^\%(')
let suffix = (suf ? '\)\%' . (endcol + 1) . 'c.*$' : '\)$')
endif
if exists("b:match_debug")
let b:match_match = matchstr(matchline, regexp)
let b:match_col = curcol+1
endif
" Third step: Find the group and single word that match, and the original
" (backref) versions of these. Then, resolve the backrefs.
" Set the following local variable:
" group = colon-separated list of patterns, one of which matches
" = ini:mid:fin or ini:fin
"
" Now, set group and groupBR to the matching group: 'if:endif' or
" 'while:endwhile' or whatever. A bit of a kluge: s:Choose() returns
" group . "," . groupBR, and we pick it apart.
let group = s:Choose(s:pat, matchline, ",", ":", prefix, suffix, s:patBR)
let i = matchend(group, s:notslash . ",")
let groupBR = strpart(group, i)
let group = strpart(group, 0, i-1)
" Now, matchline =~ prefix . substitute(group,':','\|','g') . suffix
if s:do_BR " Do the hard part: resolve those backrefs!
let group = s:InsertRefs(groupBR, prefix, group, suffix, matchline)
endif
if exists("b:match_debug")
let b:match_wholeBR = groupBR
let i = matchend(groupBR, s:notslash . ":")
let b:match_iniBR = strpart(groupBR, 0, i-1)
endif
" Fourth step: Set the arguments for searchpair().
let i = matchend(group, s:notslash . ":")
let j = matchend(group, '.*' . s:notslash . ":")
let ini = strpart(group, 0, i-1)
let mid = substitute(strpart(group, i,j-i-1), s:notslash.'\zs:', '\\|', 'g')
let fin = strpart(group, j)
"Un-escape the remaining , and : characters.
let ini = substitute(ini, s:notslash . '\zs\\\(:\|,\)', '\1', 'g')
let mid = substitute(mid, s:notslash . '\zs\\\(:\|,\)', '\1', 'g')
let fin = substitute(fin, s:notslash . '\zs\\\(:\|,\)', '\1', 'g')
" searchpair() requires that these patterns avoid \(\) groups.
let ini = substitute(ini, s:notslash . '\zs\\(', '\\%(', 'g')
let mid = substitute(mid, s:notslash . '\zs\\(', '\\%(', 'g')
let fin = substitute(fin, s:notslash . '\zs\\(', '\\%(', 'g')
" Set mid. This is optimized for readability, not micro-efficiency!
if a:forward && matchline =~ prefix . fin . suffix
\ || !a:forward && matchline =~ prefix . ini . suffix
let mid = ""
endif
" Set flag. This is optimized for readability, not micro-efficiency!
if a:forward && matchline =~ prefix . fin . suffix
\ || !a:forward && matchline !~ prefix . ini . suffix
let flag = "bW"
else
let flag = "W"
endif
" Set skip.
if exists("b:match_skip")
let skip = b:match_skip
elseif exists("b:match_comment") " backwards compatibility and testing!
let skip = "r:" . b:match_comment
else
let skip = 's:comment\|string'
endif
let skip = s:ParseSkip(skip)
if exists("b:match_debug")
let b:match_ini = ini
let b:match_tail = (strlen(mid) ? mid.'\|' : '') . fin
endif
" Fifth step: actually start moving the cursor and call searchpair().
" Later, :execute restore_cursor to get to the original screen.
let view = winsaveview()
call cursor(0, curcol + 1)
if skip =~ 'synID' && !(has("syntax") && exists("g:syntax_on"))
let skip = "0"
else
execute "if " . skip . "| let skip = '0' | endif"
endif
let sp_return = searchpair(ini, mid, fin, flag, skip)
let final_position = "call cursor(" . line(".") . "," . col(".") . ")"
" Restore cursor position and original screen.
call winrestview(view)
normal! m'
if sp_return > 0
execute final_position
endif
return s:CleanUp(restore_options, a:mode, startpos, mid.'\|'.fin)
endfun
" Restore options and do some special handling for Operator-pending mode.
" The optional argument is the tail of the matching group.
fun! s:CleanUp(options, mode, startpos, ...)
if strlen(a:options)
execute "set" a:options
endif
" Open folds, if appropriate.
if a:mode != "o"
if &foldopen =~ "percent"
normal! zv
endif
" In Operator-pending mode, we want to include the whole match
" (for example, d%).
" This is only a problem if we end up moving in the forward direction.
elseif (a:startpos[0] < line(".")) ||
\ (a:startpos[0] == line(".") && a:startpos[1] < col("."))
if a:0
" Check whether the match is a single character. If not, move to the
" end of the match.
let matchline = getline(".")
let currcol = col(".")
let regexp = s:Wholematch(matchline, a:1, currcol-1)
let endcol = matchend(matchline, regexp)
if endcol > currcol " This is NOT off by one!
call cursor(0, endcol)
endif
endif " a:0
endif " a:mode != "o" && etc.
return 0
endfun
" Example (simplified HTML patterns): if
" a:groupBR = '<\(\k\+\)>:</\1>'
" a:prefix = '^.\{3}\('
" a:group = '<\(\k\+\)>:</\(\k\+\)>'
" a:suffix = '\).\{2}$'
" a:matchline = "123<tag>12" or "123</tag>12"
" then extract "tag" from a:matchline and return "<tag>:</tag>" .
fun! s:InsertRefs(groupBR, prefix, group, suffix, matchline)
if a:matchline !~ a:prefix .
\ substitute(a:group, s:notslash . '\zs:', '\\|', 'g') . a:suffix
return a:group
endif
let i = matchend(a:groupBR, s:notslash . ':')
let ini = strpart(a:groupBR, 0, i-1)
let tailBR = strpart(a:groupBR, i)
let word = s:Choose(a:group, a:matchline, ":", "", a:prefix, a:suffix,
\ a:groupBR)
let i = matchend(word, s:notslash . ":")
let wordBR = strpart(word, i)
let word = strpart(word, 0, i-1)
" Now, a:matchline =~ a:prefix . word . a:suffix
if wordBR != ini
let table = s:Resolve(ini, wordBR, "table")
else
let table = ""
let d = 0
while d < 10
if tailBR =~ s:notslash . '\\' . d
let table = table . d
else
let table = table . "-"
endif
let d = d + 1
endwhile
endif
let d = 9
while d
if table[d] != "-"
let backref = substitute(a:matchline, a:prefix.word.a:suffix,
\ '\'.table[d], "")
" Are there any other characters that should be escaped?
let backref = escape(backref, '*,:')
execute s:Ref(ini, d, "start", "len")
let ini = strpart(ini, 0, start) . backref . strpart(ini, start+len)
let tailBR = substitute(tailBR, s:notslash . '\zs\\' . d,
\ escape(backref, '\\&'), 'g')
endif
let d = d-1
endwhile
if exists("b:match_debug")
if s:do_BR
let b:match_table = table
let b:match_word = word
else
let b:match_table = ""
let b:match_word = ""
endif
endif
return ini . ":" . tailBR
endfun
" Input a comma-separated list of groups with backrefs, such as
" a:groups = '\(foo\):end\1,\(bar\):end\1'
" and return a comma-separated list of groups with backrefs replaced:
" return '\(foo\):end\(foo\),\(bar\):end\(bar\)'
fun! s:ParseWords(groups)
let groups = substitute(a:groups.",", s:notslash.'\zs[,:]*,[,:]*', ',', 'g')
let groups = substitute(groups, s:notslash . '\zs:\{2,}', ':', 'g')
let parsed = ""
while groups =~ '[^,:]'
let i = matchend(groups, s:notslash . ':')
let j = matchend(groups, s:notslash . ',')
let ini = strpart(groups, 0, i-1)
let tail = strpart(groups, i, j-i-1) . ":"
let groups = strpart(groups, j)
let parsed = parsed . ini
let i = matchend(tail, s:notslash . ':')
while i != -1
" In 'if:else:endif', ini='if' and word='else' and then word='endif'.
let word = strpart(tail, 0, i-1)
let tail = strpart(tail, i)
let i = matchend(tail, s:notslash . ':')
let parsed = parsed . ":" . s:Resolve(ini, word, "word")
endwhile " Now, tail has been used up.
let parsed = parsed . ","
endwhile " groups =~ '[^,:]'
let parsed = substitute(parsed, ',$', '', '')
return parsed
endfun
" TODO I think this can be simplified and/or made more efficient.
" TODO What should I do if a:start is out of range?
" Return a regexp that matches all of a:string, such that
" matchstr(a:string, regexp) represents the match for a:pat that starts
" as close to a:start as possible, before being preferred to after, and
" ends after a:start .
" Usage:
" let regexp = s:Wholematch(getline("."), 'foo\|bar', col(".")-1)
" let i = match(getline("."), regexp)
" let j = matchend(getline("."), regexp)
" let match = matchstr(getline("."), regexp)
fun! s:Wholematch(string, pat, start)
let group = '\%(' . a:pat . '\)'
let prefix = (a:start ? '\(^.*\%<' . (a:start + 2) . 'c\)\zs' : '^')
let len = strlen(a:string)
let suffix = (a:start+1 < len ? '\(\%>'.(a:start+1).'c.*$\)\@=' : '$')
if a:string !~ prefix . group . suffix
let prefix = ''
endif
return prefix . group . suffix
endfun
" No extra arguments: s:Ref(string, d) will
" find the d'th occurrence of '\(' and return it, along with everything up
" to and including the matching '\)'.
" One argument: s:Ref(string, d, "start") returns the index of the start
" of the d'th '\(' and any other argument returns the length of the group.
" Two arguments: s:Ref(string, d, "foo", "bar") returns a string to be
" executed, having the effect of
" :let foo = s:Ref(string, d, "start")
" :let bar = s:Ref(string, d, "len")
fun! s:Ref(string, d, ...)
let len = strlen(a:string)
if a:d == 0
let start = 0
else
let cnt = a:d
let match = a:string
while cnt
let cnt = cnt - 1
let index = matchend(match, s:notslash . '\\(')
if index == -1
return ""
endif
let match = strpart(match, index)
endwhile
let start = len - strlen(match)
if a:0 == 1 && a:1 == "start"
return start - 2
endif
let cnt = 1
while cnt
let index = matchend(match, s:notslash . '\\(\|\\)') - 1
if index == -2
return ""
endif
" Increment if an open, decrement if a ')':
let cnt = cnt + (match[index]=="(" ? 1 : -1) " ')'
let match = strpart(match, index+1)
endwhile
let start = start - 2
let len = len - start - strlen(match)
endif
if a:0 == 1
return len
elseif a:0 == 2
return "let " . a:1 . "=" . start . "| let " . a:2 . "=" . len
else
return strpart(a:string, start, len)
endif
endfun
" Count the number of disjoint copies of pattern in string.
" If the pattern is a literal string and contains no '0' or '1' characters
" then s:Count(string, pattern, '0', '1') should be faster than
" s:Count(string, pattern).
fun! s:Count(string, pattern, ...)
let pat = escape(a:pattern, '\\')
if a:0 > 1
let foo = substitute(a:string, '[^'.a:pattern.']', "a:1", "g")
let foo = substitute(a:string, pat, a:2, "g")
let foo = substitute(foo, '[^' . a:2 . ']', "", "g")
return strlen(foo)
endif
let result = 0
let foo = a:string
let index = matchend(foo, pat)
while index != -1
let result = result + 1
let foo = strpart(foo, index)
let index = matchend(foo, pat)
endwhile
return result
endfun
" s:Resolve('\(a\)\(b\)', '\(c\)\2\1\1\2') should return table.word, where
" word = '\(c\)\(b\)\(a\)\3\2' and table = '-32-------'. That is, the first
" '\1' in target is replaced by '\(a\)' in word, table[1] = 3, and this
" indicates that all other instances of '\1' in target are to be replaced
" by '\3'. The hard part is dealing with nesting...
" Note that ":" is an illegal character for source and target,
" unless it is preceded by "\".
fun! s:Resolve(source, target, output)
let word = a:target
let i = matchend(word, s:notslash . '\\\d') - 1
let table = "----------"
while i != -2 " There are back references to be replaced.
let d = word[i]
let backref = s:Ref(a:source, d)
" The idea is to replace '\d' with backref. Before we do this,
" replace any \(\) groups in backref with :1, :2, ... if they
" correspond to the first, second, ... group already inserted
" into backref. Later, replace :1 with \1 and so on. The group
" number w+b within backref corresponds to the group number
" s within a:source.
" w = number of '\(' in word before the current one
let w = s:Count(
\ substitute(strpart(word, 0, i-1), '\\\\', '', 'g'), '\(', '1')
let b = 1 " number of the current '\(' in backref
let s = d " number of the current '\(' in a:source
while b <= s:Count(substitute(backref, '\\\\', '', 'g'), '\(', '1')
\ && s < 10
if table[s] == "-"
if w + b < 10
" let table[s] = w + b
let table = strpart(table, 0, s) . (w+b) . strpart(table, s+1)
endif
let b = b + 1
let s = s + 1
else
execute s:Ref(backref, b, "start", "len")
let ref = strpart(backref, start, len)
let backref = strpart(backref, 0, start) . ":". table[s]
\ . strpart(backref, start+len)
let s = s + s:Count(substitute(ref, '\\\\', '', 'g'), '\(', '1')
endif
endwhile
let word = strpart(word, 0, i-1) . backref . strpart(word, i+1)
let i = matchend(word, s:notslash . '\\\d') - 1
endwhile
let word = substitute(word, s:notslash . '\zs:', '\\', 'g')
if a:output == "table"
return table
elseif a:output == "word"
return word
else
return table . word
endif
endfun
" Assume a:comma = ",". Then the format for a:patterns and a:1 is
" a:patterns = "<pat1>,<pat2>,..."
" a:1 = "<alt1>,<alt2>,..."
" If <patn> is the first pattern that matches a:string then return <patn>
" if no optional arguments are given; return <patn>,<altn> if a:1 is given.
fun! s:Choose(patterns, string, comma, branch, prefix, suffix, ...)
let tail = (a:patterns =~ a:comma."$" ? a:patterns : a:patterns . a:comma)
let i = matchend(tail, s:notslash . a:comma)
if a:0
let alttail = (a:1 =~ a:comma."$" ? a:1 : a:1 . a:comma)
let j = matchend(alttail, s:notslash . a:comma)
endif
let current = strpart(tail, 0, i-1)
if a:branch == ""
let currpat = current
else
let currpat = substitute(current, s:notslash . a:branch, '\\|', 'g')
endif
while a:string !~ a:prefix . currpat . a:suffix
let tail = strpart(tail, i)
let i = matchend(tail, s:notslash . a:comma)
if i == -1
return -1
endif
let current = strpart(tail, 0, i-1)
if a:branch == ""
let currpat = current
else
let currpat = substitute(current, s:notslash . a:branch, '\\|', 'g')
endif
if a:0
let alttail = strpart(alttail, j)
let j = matchend(alttail, s:notslash . a:comma)
endif
endwhile
if a:0
let current = current . a:comma . strpart(alttail, 0, j-1)
endif
return current
endfun
fun! matchit#Match_debug()
let b:match_debug = 1 " Save debugging information.
" pat = all of b:match_words with backrefs parsed
amenu &Matchit.&pat :echo b:match_pat<CR>
" match = bit of text that is recognized as a match
amenu &Matchit.&match :echo b:match_match<CR>
" curcol = cursor column of the start of the matching text
amenu &Matchit.&curcol :echo b:match_col<CR>
" wholeBR = matching group, original version
amenu &Matchit.wh&oleBR :echo b:match_wholeBR<CR>
" iniBR = 'if' piece, original version
amenu &Matchit.ini&BR :echo b:match_iniBR<CR>
" ini = 'if' piece, with all backrefs resolved from match
amenu &Matchit.&ini :echo b:match_ini<CR>
" tail = 'else\|endif' piece, with all backrefs resolved from match
amenu &Matchit.&tail :echo b:match_tail<CR>
" fin = 'endif' piece, with all backrefs resolved from match
amenu &Matchit.&word :echo b:match_word<CR>
" '\'.d in ini refers to the same thing as '\'.table[d] in word.
amenu &Matchit.t&able :echo '0:' . b:match_table . ':9'<CR>
endfun
" Jump to the nearest unmatched "(" or "if" or "<tag>" if a:spflag == "bW"
" or the nearest unmatched "</tag>" or "endif" or ")" if a:spflag == "W".
" Return a "mark" for the original position, so that
" let m = MultiMatch("bW", "n") ... call winrestview(m)
" will return to the original position. If there is a problem, do not
" move the cursor and return {}, unless a count is given, in which case
" go up or down as many levels as possible and again return {}.
" TODO This relies on the same patterns as % matching. It might be a good
" idea to give it its own matching patterns.
fun! matchit#MultiMatch(spflag, mode)
let restore_options = s:RestoreOptions()
let startpos = [line("."), col(".")]
" save v:count1 variable, might be reset from the restore_cursor command
let level = v:count1
if a:mode == "o" && mode(1) !~# '[vV]'
exe "norm! v"
endif
" First step: if not already done, set the script variables
" s:do_BR flag for whether there are backrefs
" s:pat parsed version of b:match_words
" s:all regexp based on s:pat and the default groups
" This part is copied and slightly modified from matchit#Match_wrapper().
if !exists("b:match_words") || b:match_words == ""
let match_words = ""
" Allow b:match_words = "GetVimMatchWords()" .
elseif b:match_words =~ ":"
let match_words = b:match_words
else
execute "let match_words =" b:match_words
endif
if (match_words != s:last_words) || (&mps != s:last_mps) ||
\ exists("b:match_debug")
let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") .
\ '\/\*:\*\/,#\s*if\%(n\=def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>'
let s:last_mps = &mps
let match_words = match_words . (strlen(match_words) ? "," : "") . default
let s:last_words = match_words
if match_words !~ s:notslash . '\\\d'
let s:do_BR = 0
let s:pat = match_words
else
let s:do_BR = 1
let s:pat = s:ParseWords(match_words)
endif
let s:all = '\%(' . substitute(s:pat, '[,:]\+', '\\|', 'g') . '\)'
if exists("b:match_debug")
let b:match_pat = s:pat
endif
" Reconstruct the version with unresolved backrefs.
let s:patBR = substitute(match_words.',',
\ s:notslash.'\zs[,:]*,[,:]*', ',', 'g')
let s:patBR = substitute(s:patBR, s:notslash.'\zs:\{2,}', ':', 'g')
endif
" Second step: figure out the patterns for searchpair()
" and save the screen, cursor position, and 'ignorecase'.
" - TODO: A lot of this is copied from matchit#Match_wrapper().
" - maybe even more functionality should be split off
" - into separate functions!
let openlist = split(s:pat . ',', s:notslash . '\zs:.\{-}' . s:notslash . ',')
let midclolist = split(',' . s:pat, s:notslash . '\zs,.\{-}' . s:notslash . ':')
call map(midclolist, {-> split(v:val, s:notslash . ':')})
let closelist = []
let middlelist = []
call map(midclolist, {i,v -> [extend(closelist, v[-1 : -1]),
\ extend(middlelist, v[0 : -2])]})
call map(openlist, {i,v -> v =~# s:notslash . '\\|' ? '\%(' . v . '\)' : v})
call map(middlelist, {i,v -> v =~# s:notslash . '\\|' ? '\%(' . v . '\)' : v})
call map(closelist, {i,v -> v =~# s:notslash . '\\|' ? '\%(' . v . '\)' : v})
let open = join(openlist, ',')
let middle = join(middlelist, ',')
let close = join(closelist, ',')
if exists("b:match_skip")
let skip = b:match_skip
elseif exists("b:match_comment") " backwards compatibility and testing!
let skip = "r:" . b:match_comment
else
let skip = 's:comment\|string'
endif
let skip = s:ParseSkip(skip)
let view = winsaveview()
" Third step: call searchpair().
" Replace '\('--but not '\\('--with '\%(' and ',' with '\|'.
let openpat = substitute(open, '\%(' . s:notslash . '\)\@<=\\(', '\\%(', 'g')
let openpat = substitute(openpat, ',', '\\|', 'g')
let closepat = substitute(close, '\%(' . s:notslash . '\)\@<=\\(', '\\%(', 'g')
let closepat = substitute(closepat, ',', '\\|', 'g')
let middlepat = substitute(middle, '\%(' . s:notslash . '\)\@<=\\(', '\\%(', 'g')
let middlepat = substitute(middlepat, ',', '\\|', 'g')
if skip =~ 'synID' && !(has("syntax") && exists("g:syntax_on"))
let skip = '0'
else
try
execute "if " . skip . "| let skip = '0' | endif"
catch /^Vim\%((\a\+)\)\=:E363/
" We won't find anything, so skip searching, should keep Vim responsive.
return {}
endtry
endif
mark '
while level
if searchpair(openpat, middlepat, closepat, a:spflag, skip) < 1
call s:CleanUp(restore_options, a:mode, startpos)
return {}
endif
let level = level - 1
endwhile
" Restore options and return a string to restore the original position.
call s:CleanUp(restore_options, a:mode, startpos)
return view
endfun
" Search backwards for "if" or "while" or "<tag>" or ...
" and return "endif" or "endwhile" or "</tag>" or ... .
" For now, this uses b:match_words and the same script variables
" as matchit#Match_wrapper() . Later, it may get its own patterns,
" either from a buffer variable or passed as arguments.
" fun! s:Autocomplete()
" echo "autocomplete not yet implemented :-("
" if !exists("b:match_words") || b:match_words == ""
" return ""
" end
" let startpos = matchit#MultiMatch("bW")
"
" if startpos == ""
" return ""
" endif
" " - TODO: figure out whether 'if' or '<tag>' matched, and construct
" " - the appropriate closing.
" let matchline = getline(".")
" let curcol = col(".") - 1
" " - TODO: Change the s:all argument if there is a new set of match pats.
" let regexp = s:Wholematch(matchline, s:all, curcol)
" let suf = strlen(matchline) - matchend(matchline, regexp)
" let prefix = (curcol ? '^.\{' . curcol . '}\%(' : '^\%(')
" let suffix = (suf ? '\).\{' . suf . '}$' : '\)$')
" " Reconstruct the version with unresolved backrefs.
" let patBR = substitute(b:match_words.',', '[,:]*,[,:]*', ',', 'g')
" let patBR = substitute(patBR, ':\{2,}', ':', "g")
" " Now, set group and groupBR to the matching group: 'if:endif' or
" " 'while:endwhile' or whatever.
" let group = s:Choose(s:pat, matchline, ",", ":", prefix, suffix, patBR)
" let i = matchend(group, s:notslash . ",")
" let groupBR = strpart(group, i)
" let group = strpart(group, 0, i-1)
" " Now, matchline =~ prefix . substitute(group,':','\|','g') . suffix
" if s:do_BR
" let group = s:InsertRefs(groupBR, prefix, group, suffix, matchline)
" endif
" " let g:group = group
"
" " - TODO: Construct the closing from group.
" let fake = "end" . expand("<cword>")
" execute startpos
" return fake
" endfun
" Close all open structures. "Get the heck out of here!"
" fun! s:Gthhoh()
" let close = s:Autocomplete()
" while strlen(close)
" put=close
" let close = s:Autocomplete()
" endwhile
" endfun
" Parse special strings as typical skip arguments for searchpair():
" s:foo becomes (current syntax item) =~ foo
" S:foo becomes (current syntax item) !~ foo
" r:foo becomes (line before cursor) =~ foo
" R:foo becomes (line before cursor) !~ foo
fun! s:ParseSkip(str)
let skip = a:str
if skip[1] == ":"
if skip[0] == "s"
let skip = "synIDattr(synID(line('.'),col('.'),1),'name') =~? '" .
\ strpart(skip,2) . "'"
elseif skip[0] == "S"
let skip = "synIDattr(synID(line('.'),col('.'),1),'name') !~? '" .
\ strpart(skip,2) . "'"
elseif skip[0] == "r"
let skip = "strpart(getline('.'),0,col('.'))=~'" . strpart(skip,2). "'"
elseif skip[0] == "R"
let skip = "strpart(getline('.'),0,col('.'))!~'" . strpart(skip,2). "'"
endif
endif
return skip
endfun
let &cpo = s:save_cpo
unlet s:save_cpo
" vim:sts=2:sw=2:et:

View File

@ -1,13 +1,13 @@
*matchit.txt* Extended "%" matching
For instructions on installing this file, type
:help matchit-install
`:help matchit-install`
inside Vim.
For Vim version 6.3. Last change: 2018 Dec 31
For Vim version 8.1. Last change: 2019 Jan 28
VIM REFERENCE MANUAL by Benji Fisher
VIM REFERENCE MANUAL by Benji Fisher et al
*matchit* *matchit.vim*
@ -69,12 +69,8 @@ for how to specify matching patterns.
MODES: *matchit-modes* *matchit-v_%* *matchit-o_%*
Mostly, % and related motions (|g%| and |[%| and |]%|) work just like built-in
|motion| commands in |Operator-pending| and |Visual| modes. However, you
cannot make these motions |linewise| or |characterwise|, since the |:omap|s
that define them start with "v" in order to make the default behavior
inclusive. (See |o_v|.) In other words, "dV%" will not work. The
work-around is to go through Visual mode: "V%d" will work.
Mostly, % and related motions (|g%| and |[%| and |]%|) should just work like built-in
|motion| commands in |Operator-pending| and |Visual| modes (as of 8.1.648)
LANGUAGES: *matchit-languages*
@ -386,16 +382,10 @@ try to respond to reports of bugs that cause real problems. If it does not
cause serious problems, or if there is a work-around, a bug may sit there for
a while. Moral: if a bug (known or not) bothers you, let me know.
The various |:vmap|s defined in the script (%, |g%|, |[%|, |]%|, |a%|) may
have undesired effects in Select mode |Select-mode-mapping|. At least, if you
want to replace the selection with any character in "ag%[]" there will be a
pause of |'updatetime'| first. E.g., "yV%" would normally work linewise, but
the plugin mapping makes it characterwise.
It would be nice if "\0" were recognized as the entire pattern. That is, it
would be nice if "foo:\end\0" had the same effect as "\(foo\):\end\1". I may
try to implement this in a future version. (This is not so easy to arrange as
you might think!)
==============================================================================
vim:tw=78:fo=tcq2:
vim:tw=78:fo=tcq2:ft=help:

View File

@ -1,13 +1,13 @@
" matchit.vim: (global plugin) Extended "%" matching
" Last Change: 2018 Dec 31
" Maintainer: Benji Fisher PhD <benji@member.AMS.org>
" Version: 1.13.3, for Vim 6.3+
" Fix from Fernando Torres included.
" Improvement from Ken Takata included.
" URL: http://www.vim.org/script.php?script_id=39
" Maintainer: Christian Brabandt
" Version: 1.15
" Last Change: 2019 Jan 28
" Repository: https://github.com/chrisbra/matchit
" Previous URL:http://www.vim.org/script.php?script_id=39
" Previous Maintainer: Benji Fisher PhD <benji@member.AMS.org>
" Documentation:
" The documentation is in a separate file, matchit.txt .
" The documentation is in a separate file: ../doc/matchit.txt .
" Credits:
" Vim editor by Bram Moolenaar (Thanks, Bram!)
@ -38,789 +38,55 @@
" work but extend it.
" Allow user to prevent loading and prevent duplicate loading.
if exists("loaded_matchit") || &cp
if exists("g:loaded_matchit") || &cp
finish
endif
let loaded_matchit = 1
let s:last_mps = ""
let s:last_words = ":"
let s:patBR = ""
let g:loaded_matchit = 1
let s:save_cpo = &cpo
set cpo&vim
nnoremap <silent> % :<C-U>call <SID>Match_wrapper('',1,'n') <CR>
nnoremap <silent> g% :<C-U>call <SID>Match_wrapper('',0,'n') <CR>
vnoremap <silent> % :<C-U>call <SID>Match_wrapper('',1,'v') <CR>m'gv``
vnoremap <silent> g% :<C-U>call <SID>Match_wrapper('',0,'v') <CR>m'gv``
onoremap <silent> % v:<C-U>call <SID>Match_wrapper('',1,'o') <CR>
onoremap <silent> g% v:<C-U>call <SID>Match_wrapper('',0,'o') <CR>
nnoremap <silent> <Plug>(MatchitNormalForward) :<C-U>call matchit#Match_wrapper('',1,'n')<CR>
nnoremap <silent> <Plug>(MatchitNormalBackward) :<C-U>call matchit#Match_wrapper('',0,'n')<CR>
vnoremap <silent> <Plug>(MatchitVisualForward) :<C-U>call matchit#Match_wrapper('',1,'v')<CR>m'gv``
vnoremap <silent> <Plug>(MatchitVisualBackward) :<C-U>call matchit#Match_wrapper('',0,'v')<CR>m'gv``
onoremap <silent> <Plug>(MatchitOperationForward) :<C-U>call matchit#Match_wrapper('',1,'o')<CR>
onoremap <silent> <Plug>(MatchitOperationBackward) :<C-U>call matchit#Match_wrapper('',0,'o')<CR>
nmap <silent> % <Plug>(MatchitNormalForward)
nmap <silent> g% <Plug>(MatchitNormalBackward)
xmap <silent> % <Plug>(MatchitVisualForward)
xmap <silent> g% <Plug>(MatchitVisualBackward)
omap <silent> % <Plug>(MatchitOperationForward)
omap <silent> g% <Plug>(MatchitOperationBackward)
" Analogues of [{ and ]} using matching patterns:
nnoremap <silent> [% :<C-U>call <SID>MultiMatch("bW", "n") <CR>
nnoremap <silent> ]% :<C-U>call <SID>MultiMatch("W", "n") <CR>
vmap [% <Esc>[%m'gv``
vmap ]% <Esc>]%m'gv``
" vnoremap <silent> [% :<C-U>call <SID>MultiMatch("bW", "v") <CR>m'gv``
" vnoremap <silent> ]% :<C-U>call <SID>MultiMatch("W", "v") <CR>m'gv``
onoremap <silent> [% v:<C-U>call <SID>MultiMatch("bW", "o") <CR>
onoremap <silent> ]% v:<C-U>call <SID>MultiMatch("W", "o") <CR>
nnoremap <silent> <Plug>(MatchitNormalMultiBackward) :<C-U>call matchit#MultiMatch("bW", "n")<CR>
nnoremap <silent> <Plug>(MatchitNormalMultiForward) :<C-U>call matchit#MultiMatch("W", "n")<CR>
vnoremap <silent> <Plug>(MatchitVisualMultiBackward) :<C-U>call matchit#MultiMatch("bW", "n")<CR>m'gv``
vnoremap <silent> <Plug>(MatchitVisualMultiForward) :<C-U>call matchit#MultiMatch("W", "n")<CR>m'gv``
onoremap <silent> <Plug>(MatchitOperationMultiBackward) :<C-U>call matchit#MultiMatch("bW", "o")<CR>
onoremap <silent> <Plug>(MatchitOperationMultiForward) :<C-U>call matchit#MultiMatch("W", "o")<CR>
nmap <silent> [% <Plug>(MatchitNormalMultiBackward)
nmap <silent> ]% <Plug>(MatchitNormalMultiForward)
xmap <silent> [% <Plug>(MatchitVisualMultiBackward)
xmap <silent> ]% <Plug>(MatchitVisualMultiForward)
omap <silent> [% <Plug>(MatchitOperationMultiBackward)
omap <silent> ]% <Plug>(MatchitOperationMultiForward)
" text object:
vmap a% <Esc>[%v]%
" Auto-complete mappings: (not yet "ready for prime time")
" TODO Read :help write-plugin for the "right" way to let the user
" specify a key binding.
" let g:match_auto = '<C-]>'
" let g:match_autoCR = '<C-CR>'
" if exists("g:match_auto")
" execute "inoremap " . g:match_auto . ' x<Esc>"=<SID>Autocomplete()<CR>Pls'
" endif
" if exists("g:match_autoCR")
" execute "inoremap " . g:match_autoCR . ' <CR><C-R>=<SID>Autocomplete()<CR>'
" endif
" if exists("g:match_gthhoh")
" execute "inoremap " . g:match_gthhoh . ' <C-O>:call <SID>Gthhoh()<CR>'
" endif " gthhoh = "Get the heck out of here!"
let s:notslash = '\\\@<!\%(\\\\\)*'
function! s:Match_wrapper(word, forward, mode) range
" In s:CleanUp(), :execute "set" restore_options .
let restore_options = ""
if exists("b:match_ignorecase") && b:match_ignorecase != &ic
let restore_options .= (&ic ? " " : " no") . "ignorecase"
let &ignorecase = b:match_ignorecase
endif
if &ve != ''
let restore_options = " ve=" . &ve . restore_options
set ve=
endif
" If this function was called from Visual mode, make sure that the cursor
" is at the correct end of the Visual range:
if a:mode == "v"
execute "normal! gv\<Esc>"
endif
" In s:CleanUp(), we may need to check whether the cursor moved forward.
let startline = line(".")
let startcol = col(".")
" Use default behavior if called with a count.
if v:count
exe "normal! " . v:count . "%"
return s:CleanUp(restore_options, a:mode, startline, startcol)
end
" First step: if not already done, set the script variables
" s:do_BR flag for whether there are backrefs
" s:pat parsed version of b:match_words
" s:all regexp based on s:pat and the default groups
"
if !exists("b:match_words") || b:match_words == ""
let match_words = ""
" Allow b:match_words = "GetVimMatchWords()" .
elseif b:match_words =~ ":"
let match_words = b:match_words
else
execute "let match_words =" b:match_words
endif
" Thanks to Preben "Peppe" Guldberg and Bram Moolenaar for this suggestion!
if (match_words != s:last_words) || (&mps != s:last_mps)
\ || exists("b:match_debug")
let s:last_mps = &mps
" The next several lines were here before
" BF started messing with this script.
" quote the special chars in 'matchpairs', replace [,:] with \| and then
" append the builtin pairs (/*, */, #if, #ifdef, #else, #elif, #endif)
" let default = substitute(escape(&mps, '[$^.*~\\/?]'), '[,:]\+',
" \ '\\|', 'g').'\|\/\*\|\*\/\|#if\>\|#ifdef\>\|#else\>\|#elif\>\|#endif\>'
let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") .
\ '\/\*:\*\/,#\s*if\%(def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>'
" s:all = pattern with all the keywords
let match_words = match_words . (strlen(match_words) ? "," : "") . default
let s:last_words = match_words
if match_words !~ s:notslash . '\\\d'
let s:do_BR = 0
let s:pat = match_words
else
let s:do_BR = 1
let s:pat = s:ParseWords(match_words)
endif
let s:all = substitute(s:pat, s:notslash . '\zs[,:]\+', '\\|', 'g')
let s:all = '\%(' . s:all . '\)'
" let s:all = '\%(' . substitute(s:all, '\\\ze[,:]', '', 'g') . '\)'
if exists("b:match_debug")
let b:match_pat = s:pat
endif
" Reconstruct the version with unresolved backrefs.
let s:patBR = substitute(match_words.',',
\ s:notslash.'\zs[,:]*,[,:]*', ',', 'g')
let s:patBR = substitute(s:patBR, s:notslash.'\zs:\{2,}', ':', 'g')
endif
" Second step: set the following local variables:
" matchline = line on which the cursor started
" curcol = number of characters before match
" prefix = regexp for start of line to start of match
" suffix = regexp for end of match to end of line
" Require match to end on or after the cursor and prefer it to
" start on or before the cursor.
let matchline = getline(startline)
if a:word != ''
" word given
if a:word !~ s:all
echohl WarningMsg|echo 'Missing rule for word:"'.a:word.'"'|echohl NONE
return s:CleanUp(restore_options, a:mode, startline, startcol)
endif
let matchline = a:word
let curcol = 0
let prefix = '^\%('
let suffix = '\)$'
" Now the case when "word" is not given
else " Find the match that ends on or after the cursor and set curcol.
let regexp = s:Wholematch(matchline, s:all, startcol-1)
let curcol = match(matchline, regexp)
" If there is no match, give up.
if curcol == -1
return s:CleanUp(restore_options, a:mode, startline, startcol)
endif
let endcol = matchend(matchline, regexp)
let suf = strlen(matchline) - endcol
let prefix = (curcol ? '^.*\%' . (curcol + 1) . 'c\%(' : '^\%(')
let suffix = (suf ? '\)\%' . (endcol + 1) . 'c.*$' : '\)$')
endif
if exists("b:match_debug")
let b:match_match = matchstr(matchline, regexp)
let b:match_col = curcol+1
endif
" Third step: Find the group and single word that match, and the original
" (backref) versions of these. Then, resolve the backrefs.
" Set the following local variable:
" group = colon-separated list of patterns, one of which matches
" = ini:mid:fin or ini:fin
"
" Now, set group and groupBR to the matching group: 'if:endif' or
" 'while:endwhile' or whatever. A bit of a kluge: s:Choose() returns
" group . "," . groupBR, and we pick it apart.
let group = s:Choose(s:pat, matchline, ",", ":", prefix, suffix, s:patBR)
let i = matchend(group, s:notslash . ",")
let groupBR = strpart(group, i)
let group = strpart(group, 0, i-1)
" Now, matchline =~ prefix . substitute(group,':','\|','g') . suffix
if s:do_BR " Do the hard part: resolve those backrefs!
let group = s:InsertRefs(groupBR, prefix, group, suffix, matchline)
endif
if exists("b:match_debug")
let b:match_wholeBR = groupBR
let i = matchend(groupBR, s:notslash . ":")
let b:match_iniBR = strpart(groupBR, 0, i-1)
endif
" Fourth step: Set the arguments for searchpair().
let i = matchend(group, s:notslash . ":")
let j = matchend(group, '.*' . s:notslash . ":")
let ini = strpart(group, 0, i-1)
let mid = substitute(strpart(group, i,j-i-1), s:notslash.'\zs:', '\\|', 'g')
let fin = strpart(group, j)
"Un-escape the remaining , and : characters.
let ini = substitute(ini, s:notslash . '\zs\\\(:\|,\)', '\1', 'g')
let mid = substitute(mid, s:notslash . '\zs\\\(:\|,\)', '\1', 'g')
let fin = substitute(fin, s:notslash . '\zs\\\(:\|,\)', '\1', 'g')
" searchpair() requires that these patterns avoid \(\) groups.
let ini = substitute(ini, s:notslash . '\zs\\(', '\\%(', 'g')
let mid = substitute(mid, s:notslash . '\zs\\(', '\\%(', 'g')
let fin = substitute(fin, s:notslash . '\zs\\(', '\\%(', 'g')
" Set mid. This is optimized for readability, not micro-efficiency!
if a:forward && matchline =~ prefix . fin . suffix
\ || !a:forward && matchline =~ prefix . ini . suffix
let mid = ""
endif
" Set flag. This is optimized for readability, not micro-efficiency!
if a:forward && matchline =~ prefix . fin . suffix
\ || !a:forward && matchline !~ prefix . ini . suffix
let flag = "bW"
else
let flag = "W"
endif
" Set skip.
if exists("b:match_skip")
let skip = b:match_skip
elseif exists("b:match_comment") " backwards compatibility and testing!
let skip = "r:" . b:match_comment
else
let skip = 's:comment\|string'
endif
let skip = s:ParseSkip(skip)
if exists("b:match_debug")
let b:match_ini = ini
let b:match_tail = (strlen(mid) ? mid.'\|' : '') . fin
endif
" Fifth step: actually start moving the cursor and call searchpair().
" Later, :execute restore_cursor to get to the original screen.
let restore_cursor = virtcol(".") . "|"
normal! g0
let restore_cursor = line(".") . "G" . virtcol(".") . "|zs" . restore_cursor
normal! H
let restore_cursor = "normal!" . line(".") . "Gzt" . restore_cursor
execute restore_cursor
call cursor(0, curcol + 1)
" normal! 0
" if curcol
" execute "normal!" . curcol . "l"
" endif
if skip =~ 'synID' && !(has("syntax") && exists("g:syntax_on"))
let skip = '0'
else
execute "if " . skip . "| let skip = '0' | endif"
endif
let sp_return = searchpair(ini, mid, fin, flag, skip)
let final_position = "call cursor(" . line(".") . "," . col(".") . ")"
" Restore cursor position and original screen.
execute restore_cursor
normal! m'
if sp_return > 0
execute final_position
endif
return s:CleanUp(restore_options, a:mode, startline, startcol, mid.'\|'.fin)
endfun
" Restore options and do some special handling for Operator-pending mode.
" The optional argument is the tail of the matching group.
fun! s:CleanUp(options, mode, startline, startcol, ...)
if strlen(a:options)
execute "set" a:options
endif
" Open folds, if appropriate.
if a:mode != "o"
if &foldopen =~ "percent"
normal! zv
endif
" In Operator-pending mode, we want to include the whole match
" (for example, d%).
" This is only a problem if we end up moving in the forward direction.
elseif (a:startline < line(".")) ||
\ (a:startline == line(".") && a:startcol < col("."))
if a:0
" Check whether the match is a single character. If not, move to the
" end of the match.
let matchline = getline(".")
let currcol = col(".")
let regexp = s:Wholematch(matchline, a:1, currcol-1)
let endcol = matchend(matchline, regexp)
if endcol > currcol " This is NOT off by one!
call cursor(0, endcol)
endif
endif " a:0
endif " a:mode != "o" && etc.
return 0
endfun
" Example (simplified HTML patterns): if
" a:groupBR = '<\(\k\+\)>:</\1>'
" a:prefix = '^.\{3}\('
" a:group = '<\(\k\+\)>:</\(\k\+\)>'
" a:suffix = '\).\{2}$'
" a:matchline = "123<tag>12" or "123</tag>12"
" then extract "tag" from a:matchline and return "<tag>:</tag>" .
fun! s:InsertRefs(groupBR, prefix, group, suffix, matchline)
if a:matchline !~ a:prefix .
\ substitute(a:group, s:notslash . '\zs:', '\\|', 'g') . a:suffix
return a:group
endif
let i = matchend(a:groupBR, s:notslash . ':')
let ini = strpart(a:groupBR, 0, i-1)
let tailBR = strpart(a:groupBR, i)
let word = s:Choose(a:group, a:matchline, ":", "", a:prefix, a:suffix,
\ a:groupBR)
let i = matchend(word, s:notslash . ":")
let wordBR = strpart(word, i)
let word = strpart(word, 0, i-1)
" Now, a:matchline =~ a:prefix . word . a:suffix
if wordBR != ini
let table = s:Resolve(ini, wordBR, "table")
else
" let table = "----------"
let table = ""
let d = 0
while d < 10
if tailBR =~ s:notslash . '\\' . d
" let table[d] = d
let table = table . d
else
let table = table . "-"
endif
let d = d + 1
endwhile
endif
let d = 9
while d
if table[d] != "-"
let backref = substitute(a:matchline, a:prefix.word.a:suffix,
\ '\'.table[d], "")
" Are there any other characters that should be escaped?
let backref = escape(backref, '*,:')
execute s:Ref(ini, d, "start", "len")
let ini = strpart(ini, 0, start) . backref . strpart(ini, start+len)
let tailBR = substitute(tailBR, s:notslash . '\zs\\' . d,
\ escape(backref, '\\&'), 'g')
endif
let d = d-1
endwhile
if exists("b:match_debug")
if s:do_BR
let b:match_table = table
let b:match_word = word
else
let b:match_table = ""
let b:match_word = ""
endif
endif
return ini . ":" . tailBR
endfun
" Input a comma-separated list of groups with backrefs, such as
" a:groups = '\(foo\):end\1,\(bar\):end\1'
" and return a comma-separated list of groups with backrefs replaced:
" return '\(foo\):end\(foo\),\(bar\):end\(bar\)'
fun! s:ParseWords(groups)
let groups = substitute(a:groups.",", s:notslash.'\zs[,:]*,[,:]*', ',', 'g')
let groups = substitute(groups, s:notslash . '\zs:\{2,}', ':', 'g')
let parsed = ""
while groups =~ '[^,:]'
let i = matchend(groups, s:notslash . ':')
let j = matchend(groups, s:notslash . ',')
let ini = strpart(groups, 0, i-1)
let tail = strpart(groups, i, j-i-1) . ":"
let groups = strpart(groups, j)
let parsed = parsed . ini
let i = matchend(tail, s:notslash . ':')
while i != -1
" In 'if:else:endif', ini='if' and word='else' and then word='endif'.
let word = strpart(tail, 0, i-1)
let tail = strpart(tail, i)
let i = matchend(tail, s:notslash . ':')
let parsed = parsed . ":" . s:Resolve(ini, word, "word")
endwhile " Now, tail has been used up.
let parsed = parsed . ","
endwhile " groups =~ '[^,:]'
let parsed = substitute(parsed, ',$', '', '')
return parsed
endfun
" TODO I think this can be simplified and/or made more efficient.
" TODO What should I do if a:start is out of range?
" Return a regexp that matches all of a:string, such that
" matchstr(a:string, regexp) represents the match for a:pat that starts
" as close to a:start as possible, before being preferred to after, and
" ends after a:start .
" Usage:
" let regexp = s:Wholematch(getline("."), 'foo\|bar', col(".")-1)
" let i = match(getline("."), regexp)
" let j = matchend(getline("."), regexp)
" let match = matchstr(getline("."), regexp)
fun! s:Wholematch(string, pat, start)
let group = '\%(' . a:pat . '\)'
let prefix = (a:start ? '\(^.*\%<' . (a:start + 2) . 'c\)\zs' : '^')
let len = strlen(a:string)
let suffix = (a:start+1 < len ? '\(\%>'.(a:start+1).'c.*$\)\@=' : '$')
if a:string !~ prefix . group . suffix
let prefix = ''
endif
return prefix . group . suffix
endfun
" No extra arguments: s:Ref(string, d) will
" find the d'th occurrence of '\(' and return it, along with everything up
" to and including the matching '\)'.
" One argument: s:Ref(string, d, "start") returns the index of the start
" of the d'th '\(' and any other argument returns the length of the group.
" Two arguments: s:Ref(string, d, "foo", "bar") returns a string to be
" executed, having the effect of
" :let foo = s:Ref(string, d, "start")
" :let bar = s:Ref(string, d, "len")
fun! s:Ref(string, d, ...)
let len = strlen(a:string)
if a:d == 0
let start = 0
else
let cnt = a:d
let match = a:string
while cnt
let cnt = cnt - 1
let index = matchend(match, s:notslash . '\\(')
if index == -1
return ""
endif
let match = strpart(match, index)
endwhile
let start = len - strlen(match)
if a:0 == 1 && a:1 == "start"
return start - 2
endif
let cnt = 1
while cnt
let index = matchend(match, s:notslash . '\\(\|\\)') - 1
if index == -2
return ""
endif
" Increment if an open, decrement if a ')':
let cnt = cnt + (match[index]=="(" ? 1 : -1) " ')'
" let cnt = stridx('0(', match[index]) + cnt
let match = strpart(match, index+1)
endwhile
let start = start - 2
let len = len - start - strlen(match)
endif
if a:0 == 1
return len
elseif a:0 == 2
return "let " . a:1 . "=" . start . "| let " . a:2 . "=" . len
else
return strpart(a:string, start, len)
endif
endfun
" Count the number of disjoint copies of pattern in string.
" If the pattern is a literal string and contains no '0' or '1' characters
" then s:Count(string, pattern, '0', '1') should be faster than
" s:Count(string, pattern).
fun! s:Count(string, pattern, ...)
let pat = escape(a:pattern, '\\')
if a:0 > 1
let foo = substitute(a:string, '[^'.a:pattern.']', "a:1", "g")
let foo = substitute(a:string, pat, a:2, "g")
let foo = substitute(foo, '[^' . a:2 . ']', "", "g")
return strlen(foo)
endif
let result = 0
let foo = a:string
let index = matchend(foo, pat)
while index != -1
let result = result + 1
let foo = strpart(foo, index)
let index = matchend(foo, pat)
endwhile
return result
endfun
" s:Resolve('\(a\)\(b\)', '\(c\)\2\1\1\2') should return table.word, where
" word = '\(c\)\(b\)\(a\)\3\2' and table = '-32-------'. That is, the first
" '\1' in target is replaced by '\(a\)' in word, table[1] = 3, and this
" indicates that all other instances of '\1' in target are to be replaced
" by '\3'. The hard part is dealing with nesting...
" Note that ":" is an illegal character for source and target,
" unless it is preceded by "\".
fun! s:Resolve(source, target, output)
let word = a:target
let i = matchend(word, s:notslash . '\\\d') - 1
let table = "----------"
while i != -2 " There are back references to be replaced.
let d = word[i]
let backref = s:Ref(a:source, d)
" The idea is to replace '\d' with backref. Before we do this,
" replace any \(\) groups in backref with :1, :2, ... if they
" correspond to the first, second, ... group already inserted
" into backref. Later, replace :1 with \1 and so on. The group
" number w+b within backref corresponds to the group number
" s within a:source.
" w = number of '\(' in word before the current one
let w = s:Count(
\ substitute(strpart(word, 0, i-1), '\\\\', '', 'g'), '\(', '1')
let b = 1 " number of the current '\(' in backref
let s = d " number of the current '\(' in a:source
while b <= s:Count(substitute(backref, '\\\\', '', 'g'), '\(', '1')
\ && s < 10
if table[s] == "-"
if w + b < 10
" let table[s] = w + b
let table = strpart(table, 0, s) . (w+b) . strpart(table, s+1)
endif
let b = b + 1
let s = s + 1
else
execute s:Ref(backref, b, "start", "len")
let ref = strpart(backref, start, len)
let backref = strpart(backref, 0, start) . ":". table[s]
\ . strpart(backref, start+len)
let s = s + s:Count(substitute(ref, '\\\\', '', 'g'), '\(', '1')
endif
endwhile
let word = strpart(word, 0, i-1) . backref . strpart(word, i+1)
let i = matchend(word, s:notslash . '\\\d') - 1
endwhile
let word = substitute(word, s:notslash . '\zs:', '\\', 'g')
if a:output == "table"
return table
elseif a:output == "word"
return word
else
return table . word
endif
endfun
" Assume a:comma = ",". Then the format for a:patterns and a:1 is
" a:patterns = "<pat1>,<pat2>,..."
" a:1 = "<alt1>,<alt2>,..."
" If <patn> is the first pattern that matches a:string then return <patn>
" if no optional arguments are given; return <patn>,<altn> if a:1 is given.
fun! s:Choose(patterns, string, comma, branch, prefix, suffix, ...)
let tail = (a:patterns =~ a:comma."$" ? a:patterns : a:patterns . a:comma)
let i = matchend(tail, s:notslash . a:comma)
if a:0
let alttail = (a:1 =~ a:comma."$" ? a:1 : a:1 . a:comma)
let j = matchend(alttail, s:notslash . a:comma)
endif
let current = strpart(tail, 0, i-1)
if a:branch == ""
let currpat = current
else
let currpat = substitute(current, s:notslash . a:branch, '\\|', 'g')
endif
while a:string !~ a:prefix . currpat . a:suffix
let tail = strpart(tail, i)
let i = matchend(tail, s:notslash . a:comma)
if i == -1
return -1
endif
let current = strpart(tail, 0, i-1)
if a:branch == ""
let currpat = current
else
let currpat = substitute(current, s:notslash . a:branch, '\\|', 'g')
endif
if a:0
let alttail = strpart(alttail, j)
let j = matchend(alttail, s:notslash . a:comma)
endif
endwhile
if a:0
let current = current . a:comma . strpart(alttail, 0, j-1)
endif
return current
endfun
vmap <silent> <Plug>(MatchitVisualTextObject) <Plug>(MatchitVisualMultiBackward)o<Plug>(MatchitVisualMultiForward)
xmap a% <Plug>(MatchitVisualTextObject)
" Call this function to turn on debugging information. Every time the main
" script is run, buffer variables will be saved. These can be used directly
" or viewed using the menu items below.
if !exists(":MatchDebug")
command! -nargs=0 MatchDebug call s:Match_debug()
command! -nargs=0 MatchDebug call matchit#Match_debug()
endif
fun! s:Match_debug()
let b:match_debug = 1 " Save debugging information.
" pat = all of b:match_words with backrefs parsed
amenu &Matchit.&pat :echo b:match_pat<CR>
" match = bit of text that is recognized as a match
amenu &Matchit.&match :echo b:match_match<CR>
" curcol = cursor column of the start of the matching text
amenu &Matchit.&curcol :echo b:match_col<CR>
" wholeBR = matching group, original version
amenu &Matchit.wh&oleBR :echo b:match_wholeBR<CR>
" iniBR = 'if' piece, original version
amenu &Matchit.ini&BR :echo b:match_iniBR<CR>
" ini = 'if' piece, with all backrefs resolved from match
amenu &Matchit.&ini :echo b:match_ini<CR>
" tail = 'else\|endif' piece, with all backrefs resolved from match
amenu &Matchit.&tail :echo b:match_tail<CR>
" fin = 'endif' piece, with all backrefs resolved from match
amenu &Matchit.&word :echo b:match_word<CR>
" '\'.d in ini refers to the same thing as '\'.table[d] in word.
amenu &Matchit.t&able :echo '0:' . b:match_table . ':9'<CR>
endfun
" Jump to the nearest unmatched "(" or "if" or "<tag>" if a:spflag == "bW"
" or the nearest unmatched "</tag>" or "endif" or ")" if a:spflag == "W".
" Return a "mark" for the original position, so that
" let m = MultiMatch("bW", "n") ... execute m
" will return to the original position. If there is a problem, do not
" move the cursor and return "", unless a count is given, in which case
" go up or down as many levels as possible and again return "".
" TODO This relies on the same patterns as % matching. It might be a good
" idea to give it its own matching patterns.
fun! s:MultiMatch(spflag, mode)
if !exists("b:match_words") || b:match_words == ""
return ""
end
let restore_options = ""
if exists("b:match_ignorecase") && b:match_ignorecase != &ic
let restore_options .= (&ic ? " " : " no") . "ignorecase"
let &ignorecase = b:match_ignorecase
endif
let startline = line(".")
let startcol = col(".")
" First step: if not already done, set the script variables
" s:do_BR flag for whether there are backrefs
" s:pat parsed version of b:match_words
" s:all regexp based on s:pat and the default groups
" This part is copied and slightly modified from s:Match_wrapper().
let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") .
\ '\/\*:\*\/,#\s*if\%(def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>'
" Allow b:match_words = "GetVimMatchWords()" .
if b:match_words =~ ":"
let match_words = b:match_words
else
execute "let match_words =" b:match_words
endif
if (match_words != s:last_words) || (&mps != s:last_mps) ||
\ exists("b:match_debug")
let s:last_words = match_words
let s:last_mps = &mps
let match_words = match_words . (strlen(match_words) ? "," : "") . default
if match_words !~ s:notslash . '\\\d'
let s:do_BR = 0
let s:pat = match_words
else
let s:do_BR = 1
let s:pat = s:ParseWords(match_words)
endif
let s:all = '\%(' . substitute(s:pat . (strlen(s:pat) ? "," : "") . default,
\ '[,:]\+', '\\|', 'g') . '\)'
if exists("b:match_debug")
let b:match_pat = s:pat
endif
endif
" Second step: figure out the patterns for searchpair()
" and save the screen, cursor position, and 'ignorecase'.
" - TODO: A lot of this is copied from s:Match_wrapper().
" - maybe even more functionality should be split off
" - into separate functions!
let cdefault = (s:pat =~ '[^,]$' ? "," : "") . default
let open = substitute(s:pat . cdefault,
\ s:notslash . '\zs:.\{-}' . s:notslash . ',', '\\),\\(', 'g')
let open = '\(' . substitute(open, s:notslash . '\zs:.*$', '\\)', '')
let close = substitute(s:pat . cdefault,
\ s:notslash . '\zs,.\{-}' . s:notslash . ':', '\\),\\(', 'g')
let close = substitute(close, '^.\{-}' . s:notslash . ':', '\\(', '') . '\)'
if exists("b:match_skip")
let skip = b:match_skip
elseif exists("b:match_comment") " backwards compatibility and testing!
let skip = "r:" . b:match_comment
else
let skip = 's:comment\|string'
endif
let skip = s:ParseSkip(skip)
" save v:count1 variable, might be reset from the restore_cursor command
let level = v:count1
let restore_cursor = virtcol(".") . "|"
normal! g0
let restore_cursor = line(".") . "G" . virtcol(".") . "|zs" . restore_cursor
normal! H
let restore_cursor = "normal!" . line(".") . "Gzt" . restore_cursor
execute restore_cursor
" Third step: call searchpair().
" Replace '\('--but not '\\('--with '\%(' and ',' with '\|'.
let openpat = substitute(open, '\(\\\@<!\(\\\\\)*\)\@<=\\(', '\\%(', 'g')
let openpat = substitute(openpat, ',', '\\|', 'g')
let closepat = substitute(close, '\(\\\@<!\(\\\\\)*\)\@<=\\(', '\\%(', 'g')
let closepat = substitute(closepat, ',', '\\|', 'g')
if skip =~ 'synID' && !(has("syntax") && exists("g:syntax_on"))
let skip = '0'
else
try
execute "if " . skip . "| let skip = '0' | endif"
catch /^Vim\%((\a\+)\)\=:E363/
" We won't find anything, so skip searching, should keep Vim responsive.
return
endtry
endif
mark '
while level
if searchpair(openpat, '', closepat, a:spflag, skip) < 1
call s:CleanUp(restore_options, a:mode, startline, startcol)
return ""
endif
let level = level - 1
endwhile
" Restore options and return a string to restore the original position.
call s:CleanUp(restore_options, a:mode, startline, startcol)
return restore_cursor
endfun
" Search backwards for "if" or "while" or "<tag>" or ...
" and return "endif" or "endwhile" or "</tag>" or ... .
" For now, this uses b:match_words and the same script variables
" as s:Match_wrapper() . Later, it may get its own patterns,
" either from a buffer variable or passed as arguments.
" fun! s:Autocomplete()
" echo "autocomplete not yet implemented :-("
" if !exists("b:match_words") || b:match_words == ""
" return ""
" end
" let startpos = s:MultiMatch("bW")
"
" if startpos == ""
" return ""
" endif
" " - TODO: figure out whether 'if' or '<tag>' matched, and construct
" " - the appropriate closing.
" let matchline = getline(".")
" let curcol = col(".") - 1
" " - TODO: Change the s:all argument if there is a new set of match pats.
" let regexp = s:Wholematch(matchline, s:all, curcol)
" let suf = strlen(matchline) - matchend(matchline, regexp)
" let prefix = (curcol ? '^.\{' . curcol . '}\%(' : '^\%(')
" let suffix = (suf ? '\).\{' . suf . '}$' : '\)$')
" " Reconstruct the version with unresolved backrefs.
" let patBR = substitute(b:match_words.',', '[,:]*,[,:]*', ',', 'g')
" let patBR = substitute(patBR, ':\{2,}', ':', "g")
" " Now, set group and groupBR to the matching group: 'if:endif' or
" " 'while:endwhile' or whatever.
" let group = s:Choose(s:pat, matchline, ",", ":", prefix, suffix, patBR)
" let i = matchend(group, s:notslash . ",")
" let groupBR = strpart(group, i)
" let group = strpart(group, 0, i-1)
" " Now, matchline =~ prefix . substitute(group,':','\|','g') . suffix
" if s:do_BR
" let group = s:InsertRefs(groupBR, prefix, group, suffix, matchline)
" endif
" " let g:group = group
"
" " - TODO: Construct the closing from group.
" let fake = "end" . expand("<cword>")
" execute startpos
" return fake
" endfun
" Close all open structures. "Get the heck out of here!"
" fun! s:Gthhoh()
" let close = s:Autocomplete()
" while strlen(close)
" put=close
" let close = s:Autocomplete()
" endwhile
" endfun
" Parse special strings as typical skip arguments for searchpair():
" s:foo becomes (current syntax item) =~ foo
" S:foo becomes (current syntax item) !~ foo
" r:foo becomes (line before cursor) =~ foo
" R:foo becomes (line before cursor) !~ foo
fun! s:ParseSkip(str)
let skip = a:str
if skip[1] == ":"
if skip[0] == "s"
let skip = "synIDattr(synID(line('.'),col('.'),1),'name') =~? '" .
\ strpart(skip,2) . "'"
elseif skip[0] == "S"
let skip = "synIDattr(synID(line('.'),col('.'),1),'name') !~? '" .
\ strpart(skip,2) . "'"
elseif skip[0] == "r"
let skip = "strpart(getline('.'),0,col('.'))=~'" . strpart(skip,2). "'"
elseif skip[0] == "R"
let skip = "strpart(getline('.'),0,col('.'))!~'" . strpart(skip,2). "'"
endif
endif
return skip
endfun
let &cpo = s:save_cpo
unlet s:save_cpo
" vim:sts=2:sw=2:
" vim:sts=2:sw=2:et:

View File

@ -17,10 +17,10 @@ ftp://ftp.gnu.org/gnu/aspell/dict/. Most go under the GPL or LGPL copyright.
GENERATING .SPL FILES
This involves downloading the files from the OpenOffice.org server, applying a
This involves downloading the files from the github server, applying a
patch and running Vim to generate the .spl file. To do this all in one go use
the Aap program (www.a-a-p.org). It's simple to install, it only requires
Python.
Python (http://www.a-a-p.org/download.html)
Before generating spell files, verify your system has the required locale
support. Source the check_locales.vim script to find out. If something is
@ -29,7 +29,7 @@ missing, see LOCALE below.
You can also do it manually:
1. Fetch the right spell file from:
http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
https://github.com/LibreOffice/dictionaries
2. Unzip the archive:
unzip LL_RR.zip
@ -56,12 +56,11 @@ Now you understand why I prefer using the Aap recipe :-).
MAINTAINING A LANGUAGE
Every language should have a maintainer. His tasks are to track the changes
in the OpenOffice.org spell files and make updated patches. Words that
haven't been added/removed from the OpenOffice lists can also be handled by
the patches.
in the spell files and make updated patches. Words that haven't been
added/removed from the LibreOffice lists can also be handled by the patches.
It is important to keep the version of the .dic and .aff files that you
started with. When OpenOffice brings out new versions of these files you can
started with. When LibreOffice brings out new versions of these files you can
find out what changed and take over these changes in your patch. When there
are very many changes you can do it the other way around: re-apply the changes
for Vim to the new versions of the .dic and .aff files.
@ -79,20 +78,25 @@ This procedure should work well:
aren't really words, they mess up the suggestions (English has this
problem). You can use the "fixdup.vim" Vim script to find duplicate words.
3. Make the diff file. "aap diff" will do this for you. If a diff would be
3. Include needed parts from the aspell phonetic dictionary to the aff files. For
example add the relevant SAL lines to the .aff file (this is needed to make good
suggestions). The aspell dictionaries can be found here:
https://ftp.gnu.org/gnu/aspell/dict/0index.html
4. Make the diff file. "aap diff" will do this for you. If a diff would be
too big you might consider writing a Vim script to do systematic changes.
Do check that someone else can reproduce building the spell file. Send the
result to Bram for inclusion in the distribution. Bram will generate the
.spl file and upload it to the ftp server (if he can't generate it you will
have to send him the .spl file too).
4. When OpenOffice makes a new zip file available you need to update the
5. When OpenOffice makes a new zip file available you need to update the
patch. "aap check" should do most of the work for you: if there are
changes the .new.dic and .new.aff files will appear. You can now figure
out the differences with .orig.dic and .orig.aff, adjust the .dic and .aff
files and finally move the .new.dic to .orig.dic and .new.aff to .orig.aff.
5. Repeat step 4. regularly.
6. Repeat step 5. regularly.
LOCALE

Some files were not shown because too many files have changed in this diff Show More