Compare commits

...

235 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
351 changed files with 26900 additions and 24145 deletions

View File

@ -10,58 +10,58 @@ compiler:
- gcc
env:
- BUILD=yes TEST=test COVERAGE=no FEATURES=tiny "CONFOPT='--disable-gui'" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
- 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=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
env: *tiny
- os: osx
env: BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no
env: *normal
- os: osx
env: BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
env: *unittests
- os: osx
env: BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
env: *small
- 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: *linux-huge
- 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: *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:
@ -82,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,13 +7,14 @@ 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 \
@ -36,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 \
@ -48,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 \
@ -146,6 +147,7 @@ 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 \
@ -165,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 \
@ -660,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 \
@ -830,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

@ -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

@ -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
@ -699,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'
@ -725,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

@ -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

@ -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: 2019 Jan 11
*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.
@ -1023,6 +1026,8 @@ TextChanged After a change was made to the text in the
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.
@ -1464,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!
@ -1611,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 21
*eval.txt* For Vim version 8.1. Last change: 2019 Mar 02
VIM REFERENCE MANUAL by Bram Moolenaar
@ -662,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: >
@ -686,7 +696,7 @@ similar to -1. >
:let otherblob = myblob[:] " make a copy of the Blob
If the first index is beyond the last byte of the Blob or the second index is
before the first byte, the result is an empty list. There is no error
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
@ -793,8 +803,9 @@ 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, list or blob concatenation
@ -962,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'
@ -1012,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()|.
@ -2500,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
@ -2879,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.
@ -3524,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
@ -4047,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|.
@ -4121,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()
@ -4947,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
@ -5052,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|
@ -5080,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
@ -5134,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
@ -5211,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
@ -5220,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
@ -5521,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
@ -5728,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()*
@ -5740,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.
@ -6038,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
@ -6486,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
@ -6496,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")
<
@ -6779,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
@ -7307,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.
@ -7317,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
@ -7346,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
@ -8569,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'.
@ -9435,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}
@ -9706,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("")
@ -10132,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.
@ -10141,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.
@ -10151,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.
@ -10164,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|.
@ -10193,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.
@ -10203,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|.
@ -10223,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.
@ -10253,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.
@ -10261,6 +10321,7 @@ 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 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
@ -10292,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|.
@ -10784,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.
@ -11044,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
@ -11141,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 @@
*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: 2019 Jan 17
*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

View File

@ -1,4 +1,4 @@
*insert.txt* For Vim version 8.1. Last change: 2019 Jan 11
*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

@ -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,4 +1,4 @@
*options.txt* For Vim version 8.1. Last change: 2019 Jan 16
*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}
@ -2557,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
@ -2635,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
@ -2809,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
@ -3021,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.
@ -3078,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
@ -3134,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
@ -3159,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
@ -3303,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 "")
@ -4326,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.
@ -4379,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
@ -4391,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
@ -4445,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.
@ -4607,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|
@ -5191,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.
@ -5259,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.
@ -5535,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|
@ -6028,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|.
@ -6037,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|.
@ -6590,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'*
@ -7152,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
@ -7162,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
@ -7997,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
@ -8094,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: 2019 Jan 18
*os_vms.txt* For Vim version 8.1. Last change: 2019 Jan 29
VIM REFERENCE MANUAL
@ -104,8 +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, thefore
the GTK build is no longer available.
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>
@ -772,9 +772,9 @@ Version 8.1
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
- 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"

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

@ -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 @@
*spell.txt* For Vim version 8.1. Last change: 2019 Jan 09
*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
@ -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*
@ -2518,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-&*
@ -2528,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*
@ -3639,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>*
@ -3679,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*
@ -3694,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*
@ -3707,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*
@ -3741,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*
@ -4592,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*
@ -4680,6 +4689,9 @@ 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*
@ -5008,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:]*
@ -5843,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()*
@ -6116,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*
@ -6342,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*
@ -7309,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*
@ -7977,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*
@ -8233,6 +8250,7 @@ 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*
@ -8562,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*
@ -8571,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*
@ -8806,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*
@ -9142,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*

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 @@
*todo.txt* For Vim version 8.1. Last change: 2019 Jan 17
*todo.txt* For Vim version 8.1. Last change: 2019 Mar 14
VIM REFERENCE MANUAL by Bram Moolenaar
@ -38,15 +38,19 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs*
-------------------- Known bugs and current work -----------------------
Blob: the string form can't be parsed back. Use 0z00112233.44556677 ?
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.
Make msg() and msg_attr() also use "char *" intead of "char_u *"?
Timer test doesn't work on MS-Windows console, any way to make it work?
Feature to possibly graduate: FEAT_MBYTE
Integrate EBCDIC feature, use 'encoding' == "ebcdic" ?
Or drop EBCDIC?
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)
@ -67,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.
@ -77,15 +82,15 @@ Terminal debugger:
with another Vim instance.
Terminal emulator window:
- 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)
- 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
- Allow for specifying the directory, with ++cwd={dir}.
- With a vertical split only one window is updated. (Linwei, 2018 Jun 2,
#2977)
@ -109,56 +114,35 @@ Terminal emulator window:
- When 'encoding' is not utf-8, or the job is using another encoding, setup
conversions.
Patch with updates for VMS. (Zoltan Arpadffy, 2019 Jan 14)
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.
Patch to deal with signs at the end of the buffer when lines are deleted.
(Yegappan Lakshmanan, #3798)
Key mapping times out when using a timer in Gvim. (Michael Henry, 2018 Sep 9,
#3417)
Another report, with reproduction steps. (#3799)
Is this fixed by 8.1.0761?
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?
Patch to remove flicker from popup menu. (Yasuhiro Matsumoto, 2013 Aug 15)
When redrawing for updating the popup menu, don't redraw the part when the new
popup menu will be displayed?
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?
js_decode() does not handle infinity properly. (Dominique Pelle, 2019 Jan 10,
#3788)
Signs:
- screen not redrawn correctly. (Dominique Pelle, 2019 Jan 14, #3803)
- 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 add ruby cflags. (#4050, fixes #1081)
Needs modification.
Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May
13, #2910) Can't reproduce?
Merge checking for 'cursorline' and 'concealcursor', see neovim #9492.
Patch to not call setActiveWindow. Yasuhiro Matsumoto, 2019 Jan 8, #3778)
Errors found with random data:
heap-buffer-overflow in alist_add (#2472)
Patch for xxd to make it work with 64 bit numbers. (Christer Jense, 2019 Jan
11, #3791)
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?
@ -177,18 +161,48 @@ 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 remove some unneeded {}. (Hirohito Higashi, #3982)
Make balloon_show() work outside of 'balloonexpr'? Users expect it to work:
#2948. (related to #1512?)
@ -201,57 +215,95 @@ balloonexpr() on MS-Windows GUI doesn't handle accented chars? (nivaemail,
2018 Sep 14)
Another request: #3811.
Patch to add FOR_ALL_FRAMES. (Yegappan, 2018 Dec 11, #3686)
Patch for autoconf to add -fPIC for Fedora. (#4047)
Patch for MinGW build with static libraries. (Ken Takata, 2018 Dec 16)
Patch to add new regexp classes :ident:, :keyword:, :fname:.
(ichizok, 2016 Jan 12, #1373)
Patch to add "termsig" - signal that caused job to end. (Ozaki Kiichi, 2019
Jan 10, #3786)
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, new one: #3794 Does this work now?
(Nobuhiro Takasaki)
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)
@ -263,9 +315,24 @@ 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?
@ -278,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:
@ -290,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)
@ -299,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)
@ -341,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?
@ -357,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!"
@ -383,24 +483,13 @@ 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
@ -430,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.
@ -458,9 +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)
Alternative manpager.vim. (Enno, 2018 Jan 5, #2529)
Delete all the specific stuff for the Borland compiler? (#3374)
@ -812,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
@ -863,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
@ -924,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())
@ -967,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
@ -983,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
@ -1044,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)
@ -1115,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)
@ -1829,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
@ -2117,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.
@ -2523,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)
@ -2587,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)
@ -2868,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)
@ -3023,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
@ -3042,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)
@ -3129,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
@ -3686,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.
@ -4020,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.,
@ -5831,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 @@
*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: 2019 Jan 12
*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

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

@ -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]

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: 2019 Jan 11
*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`.

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,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

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

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,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

@ -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

View File

@ -1,5 +1,5 @@
*** de_19.orig.aff Thu Aug 25 11:22:08 2005
--- de_19.aff Thu Sep 29 11:43:46 2005
*** de_19.orig.aff 2019-01-19 18:45:26.468520305 +0100
--- de_19.aff 2019-01-19 18:45:26.472520278 +0100
***************
*** 3,4 ****
--- 3,21 ----
@ -501,8 +501,8 @@
+ SAL ZUR<55>CK^^ ZURIK
+ SAL ZUVER^^ ZUFA # x
+ SAL Z Z
*** de_19.orig.dic Thu Aug 25 11:22:08 2005
--- de_19.dic Sat Jan 7 12:32:09 2006
*** de_19.orig.dic 2019-01-19 18:45:26.468520305 +0100
--- de_19.dic 2019-01-19 18:45:26.476520252 +0100
***************
*** 76258,76259 ****
zynismusf<73>rdernd/A

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
#
# Since there is a big discussion about whether to use the old or the new
# spelling rules, both have been included.
# "de": all possible words allowed
# "de": new German spelling
# "de_de": old and new German spelling
# "de_19": old German spelling
# "de_20": new German spelling
@ -21,14 +21,21 @@ DE_REGIONS = de_$*REGIONS
SPELLDIR = ..
FILES = de_$*(REGIONS).aff de_$*(REGIONS).dic
ZIPFILE_DE = de_DE_comb.zip
ZIPFILE_19 = de_OLDSPELL.zip
ZIPFILE_20 = de_DE_neu.zip
ZIPFILE_AT = de_DE.zip
ZIPFILE_CH = de_CH.zip
ZIPFILES = $ZIPFILE_DE $ZIPFILE_19 $ZIPFILE_20 $ZIPFILE_AT $ZIPFILE_CH
# The de_20 is the same as de_DE dictionary and only uses the
# new revised orthography
FILE_DE_AFF = de_DE_frami.aff
FILE_DE_DIC = de_DE_frami.dic
FILE_20_AFF = de_DE_frami.aff
FILE_20_DIC = de_DE_frami.dic
FILE_AT_AFF = de_AT_frami.aff
FILE_AT_DIC = de_AT_frami.dic
FILE_CH_AFF = de_CH_frami.aff
FILE_CH_DIC = de_CH_frami.dic
#ZIPFILES = $ZIPFILE_DE $ZIPFILE_20 $ZIPFILE_AT $ZIPFILE_CH
ZIPFILE_19 = de_OLDSPELL.zip # unmaintained
DICT_FILES = $FILE_20_AFF $FILE_20_DIC $FILE_AT_AFF $FILE_AT_DIC $FILE_CH_AFF $FILE_CH_DIC
READMES = README_de_$*(REGIONS).txt
READMES = README_de_DE_frami.txt README_extension_owner.txt
all: $SPELLDIR/de.latin1.spl $SPELLDIR/de.utf-8.spl ../README_de.txt
@ -41,46 +48,39 @@ $SPELLDIR/de.utf-8.spl : $FILES
$VIM -u NONE -e -c "mkspell! $SPELLDIR/de $DE_REGIONS" -c q
../README_de.txt: $READMES
:print de_DE (combined) >! $target
:cat README_de_DE.txt >> $target
:fetch $READMES
:print de_DE_frami.txt >! $target
:cat README_de_DE_frami.txt >> $target
:print =================================================== >>$target
:print de_19 (old) >> $target
:cat README_de_19.txt >> $target
:print =================================================== >>$target
:print de_20 (new) >> $target
:cat README_de_20.txt >> $target
:print =================================================== >>$target
:print de_AT (Austria) >> $target
:cat README_de_AT.txt >> $target
:print =================================================== >>$target
:print de_CH (Swiss) >> $target
:cat README_de_CH.txt >> $target
:print extension_owner >> $target
:cat README_extension_owner.txt >> $target
#
# Fetching the files from the OpenOffice.org site.
# Fetching the files from the LibreOffices github repository.
# The OLDSPELL file comes from elsewhere
#
OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
OODIR = https://github.com/LibreOffice/dictionaries/raw/master/de
DEDIR = http://www.j3e.de/myspell
:attr {fetch = $OODIR/%file%} $ZIPFILES
:attr {fetch = $OODIR/%file%} $DICT_FILES
:attr {fetch = $OODIR/%file%} $READMES
:attr {fetch = $DEDIR/%file%} $ZIPFILE_19
# The files don't depend on the .zip file so that we can delete it.
# Only download the zip file if the targets don't exist.
de_DE.aff de_DE.dic: {buildcheck=}
:assertpkg unzip patch
:fetch $ZIPFILE_DE
:sys $UNZIP $ZIPFILE_DE
:delete $ZIPFILE_DE
:move de_DE_comb.aff de_DE.aff
:move de_DE_comb.dic de_DE.dic
:move README_de_DE_comb.txt README_de_DE.txt
de_DE.aff de_DE.dic de_20.aff de_20.dic: {buildcheck=}
:assertpkg patch
:fetch $FILE_DE_AFF
:fetch $FILE_DE_DIC
:move de_DE_frami.aff de_DE.aff
:move de_DE_frami.dic de_DE.dic
@if not os.path.exists('de_DE.orig.aff'):
:copy de_DE.aff de_DE.orig.aff
@if not os.path.exists('de_DE.orig.dic'):
:copy de_DE.dic de_DE.orig.dic
@if os.path.exists('de_DE.diff'):
:sys patch <de_DE.diff
:copy de_DE.aff de_20.aff
:copy de_DE.dic de_20.dic
de_19.aff de_19.dic: {buildcheck=}
:assertpkg unzip patch
@ -89,8 +89,6 @@ de_19.aff de_19.dic: {buildcheck=}
:delete $ZIPFILE_19
:move de_OLDSPELL.aff de_19.aff
:move de_OLDSPELL.dic de_19.dic
# there is no README file
:print There is no README file for the old spelling >!README_de_19.txt
@if not os.path.exists('de_19.orig.aff'):
:copy de_19.aff de_19.orig.aff
@if not os.path.exists('de_19.orig.dic'):
@ -98,54 +96,12 @@ de_19.aff de_19.dic: {buildcheck=}
@if os.path.exists('de_19.diff'):
:sys patch <de_19.diff
de_20.aff de_20.dic: {buildcheck=}
:assertpkg unzip patch
:fetch $ZIPFILE_20
:sys $UNZIP $ZIPFILE_20
:delete $ZIPFILE_20
:move de_DE_neu.aff de_20.aff
:move de_DE_neu.dic de_20.dic
:move README_de_DE_neu.txt README_de_20.txt
@if not os.path.exists('de_20.orig.aff'):
:copy de_20.aff de_20.orig.aff
@if not os.path.exists('de_20.orig.dic'):
:copy de_20.dic de_20.orig.dic
@if os.path.exists('de_20.diff'):
:sys patch <de_20.diff
# The de_AT.dic is included in de_DE.zip. We rename the files and concatenate
# them. Complication is that de_AT.dic is missing a newline at the end.
# And the de_DE.dic file is used for something else.
de_AT.aff de_AT.dic: {buildcheck=}
:assertpkg unzip patch
# Move de_DE files out of the way.
@if os.path.exists('de_DE.aff'):
:move de_DE.aff de_DE.temp.aff
@if os.path.exists('de_DE.dic'):
:move de_DE.dic de_DE.temp.dic
@if os.path.exists('README_de_DE.txt'):
:move README_de_DE.txt README_de_DE.temp.txt
:fetch $ZIPFILE_AT
:sys $UNZIP $ZIPFILE_AT
:delete $ZIPFILE_AT
:print >>de_AT.dic
# delete the first line, the word count
:sys $VIM -u NONE de_DE.dic -e -c 1delete -c wq
:cat de_DE.dic >>de_AT.dic
:delete de_DE.dic
:move de_DE.aff de_AT.aff
:move README_de_DE.txt README_de_AT.txt
@if os.path.exists('de_DE.temp.aff'):
:move de_DE.temp.aff de_DE.aff
@if os.path.exists('de_DE.temp.dic'):
:move de_DE.temp.dic de_DE.dic
@if os.path.exists('README_de_DE.temp.txt'):
:move README_de_DE.temp.txt README_de_DE.txt
:assertpkg patch
:fetch $FILE_AT_AFF
:fetch $FILE_AT_DIC
:move $FILE_AT_AFF de_AT.aff
:move $FILE_AT_DIC de_AT.dic
@if not os.path.exists('de_AT.orig.aff'):
:copy de_AT.aff de_AT.orig.aff
@if not os.path.exists('de_AT.orig.dic'):
@ -154,10 +110,11 @@ de_AT.aff de_AT.dic: {buildcheck=}
:sys patch <de_AT.diff
de_CH.aff de_CH.dic: {buildcheck=}
:assertpkg unzip patch
:fetch $ZIPFILE_CH
:sys $UNZIP $ZIPFILE_CH
:delete $ZIPFILE_CH
:assertpkg patch
:fetch $FILE_CH_AFF
:fetch $FILE_CH_DIC
:move $FILE_CH_AFF de_CH.aff
:move $FILE_CH_DIC de_CH.dic
@if not os.path.exists('de_CH.orig.aff'):
:copy de_CH.aff de_CH.orig.aff
@if not os.path.exists('de_CH.orig.dic'):
@ -174,12 +131,11 @@ diff:
:sys {force} diff -a -C 1 de_DE.orig.dic de_DE.dic >>de_DE.diff
:sys {force} diff -a -C 1 de_19.orig.aff de_19.aff >de_19.diff
:sys {force} diff -a -C 1 de_19.orig.dic de_19.dic >>de_19.diff
:sys {force} diff -a -C 1 de_20.orig.aff de_20.aff >de_20.diff
:sys {force} diff -a -C 1 de_20.orig.dic de_20.dic >>de_20.diff
:sys {force} diff -a -C 1 de_AT.orig.aff de_AT.aff >de_AT.diff
:sys {force} diff -a -C 1 de_AT.orig.dic de_AT.dic >>de_AT.diff
:sys {force} diff -a -C 1 de_CH.orig.aff de_CH.aff >de_CH.diff
:sys {force} diff -a -C 1 de_CH.orig.dic de_CH.dic >>de_CH.diff
:copy de_DE.diff de_20.diff
# Check for updated OpenOffice spell files. When there are changes the
@ -187,36 +143,24 @@ diff:
check:
:assertpkg unzip patch
:fetch $ZIPFILES
:mkdir tmp
:cd tmp
:fetch $ZIPFILE_19
:fetch $DICT_FILES
@try:
# Do the _AT one first, it overwrites the _DE files.
:sys $UNZIP ../$ZIPFILE_AT
:print >>de_AT.dic
# delete the first line, the word count
:sys ../$VIM -u NONE de_DE.dic -e -c 1delete -c wq
:cat de_DE.dic >>de_AT.dic
:delete de_DE.dic
:move de_DE.aff de_AT.aff
:move README_de_DE.txt README_de_AT.txt
:sys $UNZIP ../$ZIPFILE_DE
:move de_DE_comb.aff de_DE.aff
:move de_DE_comb.dic de_DE.dic
:move README_de_DE_comb.txt README_de_DE.txt
:mkdir tmp
:cd tmp
:sys $UNZIP ../$ZIPFILE_19
:copy ../*.aff .
:copy ../*.dic .
:move de_OLDSPELL.aff de_19.aff
:move de_OLDSPELL.dic de_19.dic
# there is no README file
:print There is no README file for the old spelling >!README_de_19.txt
:sys $UNZIP ../$ZIPFILE_20
:move de_DE_neu.aff de_20.aff
:move de_DE_neu.dic de_20.dic
:move README_de_DE_neu.txt README_de_20.txt
:sys $UNZIP ../$ZIPFILE_CH
:move de_DE_frami.aff de_DE.aff
:move de_DE_frami.dic de_DE.dic
:move de_AT_frami.dic de_AT.dic
:move de_AT_frami.aff de_AT.aff
:move de_CH_frami.dic de_CH.dic
:move de_CH_frami.aff de_CH.aff
:copy de_DE.dic de_20.dic
:copy de_DE.aff de_20.aff
@import stat
@for nm in ['de_DE', 'de_19', 'de_20', 'de_AT', 'de_CH']:
@ -225,12 +169,8 @@ check:
@if os.stat('d')[stat.ST_SIZE] > 0:
:copy $(nm).$ext ../$(nm).new.$ext
:sys {force} diff ../README_$(nm).txt README_$(nm).txt >d
@if os.stat('d')[stat.ST_SIZE] > 0:
:copy README_$(nm).txt ../README_$(nm).new.txt
@finally:
:cd ..
:delete {r}{f}{q} tmp
:delete $ZIPFILES
# vim: set sts=4 sw=4 :

View File

@ -15,6 +15,9 @@ while lnum <= line('$')
continue " don't increment lnum, it's already at the next word
endif
endif
if lnum%1000 == 0
echon "\r Processing line ".lnum. printf(" [ %02d%%]", lnum*100/line('$'))
endif
let lnum += 1
endwhile

335
runtime/syntax/8th.vim Normal file
View File

@ -0,0 +1,335 @@
" Vim syntax file
" Language: 8th
" Version: 19.01d
" Maintainer: Ron Aaron <ron@aaron-tech.com>
" URL: https://8th-dev.com/
" Filetypes: *.8th
" NOTE: You should also have the ftplugin/8th.vim file to set 'isk'
if version < 600
syntax clear
finish
elseif exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
syn clear
" Synchronization method
syn sync ccomment
syn sync maxlines=100
syn case match
syn match eighthColonName "\S\+" contained
syn match eighthColonDef ":\s\+\S\+" contains=eighthColonName
" new words
syn match eighthClasses "\<\S\+:" contained
syn match eighthClassWord "\<\S\+:.\+" contains=eighthClasses
syn keyword eighthEndOfColonDef ; i;
syn keyword eighthDefine var var,
" Built in words
com! -nargs=+ Builtin syn keyword eighthBuiltin <args>
"Builtin ^ < <# <#> = > - -- ,# ; ;; ! ??? / . .# ' () @ * */ \
Builtin ! G:! #! G:#! ## G:## #> G:#> #if G:#if ' G:' ( G:( (* G:(* (:) G:(:) (code) G:(code) (getc) G:(getc)
Builtin (gets) G:(gets) (interp) G:(interp) (needs) G:(needs) (putc) G:(putc) (puts) G:(puts) (putslim) G:(putslim)
Builtin (say) G:(say) (stat) G:(stat) ) G:) +listener G:+listener +ref G:+ref ,# G:,# -- G:-- -----BEGIN G:-----BEGIN
Builtin -Inf G:-Inf -Inf? G:-Inf? -listener G:-listener -ref G:-ref -rot G:-rot . G:. .# G:.# .needs G:.needs
Builtin .r G:.r .s G:.s .stats G:.stats .ver G:.ver .with G:.with 0; G:0; 2dip G:2dip 2drop G:2drop
Builtin 2dup G:2dup 2over G:2over 2swap G:2swap 3drop G:3drop 4drop G:4drop 8thdt? G:8thdt? 8thver? G:8thver?
Builtin : G:: ; G:; ;; G:;; ;;; G:;;; ;then G:;then ;with G:;with <# G:<# <#> G:<#> >clip G:>clip >json G:>json
Builtin >kind G:>kind >n G:>n >r G:>r >s G:>s ?: G:?: ??? G:??? @ G:@ Inf G:Inf Inf? G:Inf? NaN G:NaN
Builtin NaN? G:NaN? SED-CHECK G:SED-CHECK SED: G:SED: SED: G:SED: \ G:\ ` G:` `` G:`` actor: G:actor:
Builtin again G:again ahead G:ahead and G:and appname G:appname apropos G:apropos argc G:argc args G:args
Builtin array? G:array? assert G:assert base G:base bi G:bi bits G:bits break G:break break? G:break?
Builtin build? G:build? buildver? G:buildver? bye G:bye c# G:c# c/does G:c/does case G:case caseof G:caseof
Builtin chdir G:chdir clip> G:clip> clone G:clone clone-shallow G:clone-shallow cold G:cold compat-level G:compat-level
Builtin compile G:compile compile? G:compile? conflict G:conflict const G:const container? G:container?
Builtin cr G:cr curlang G:curlang curry G:curry curry: G:curry: decimal G:decimal defer: G:defer: deg>rad G:deg>rad
Builtin depth G:depth die G:die dip G:dip drop G:drop dstack G:dstack dump G:dump dup G:dup dup? G:dup?
Builtin else G:else enum: G:enum: eval G:eval eval! G:eval! eval0 G:eval0 execnull G:execnull expect G:expect
Builtin extra! G:extra! extra@ G:extra@ false G:false fnv G:fnv fourth G:fourth free G:free func: G:func:
Builtin getc G:getc getcwd G:getcwd getenv G:getenv gets G:gets handler G:handler header G:header help G:help
Builtin hex G:hex i: G:i: i; G:i; if G:if if; G:if; isa? G:isa? items-used G:items-used jcall G:jcall
Builtin jclass G:jclass jmethod G:jmethod json-nesting G:json-nesting json-pretty G:json-pretty json-throw G:json-throw
Builtin json> G:json> k32 G:k32 keep G:keep l: G:l: last G:last lib G:lib libbin G:libbin libc G:libc
Builtin listener@ G:listener@ literal G:literal locals: G:locals: lock G:lock lock-to G:lock-to locked? G:locked?
Builtin log G:log log-async G:log-async log-task G:log-task log-time G:log-time log-time-local G:log-time-local
Builtin long-days G:long-days long-months G:long-months loop G:loop loop- G:loop- map? G:map? mark G:mark
Builtin mark? G:mark? memfree G:memfree mobile? G:mobile? n# G:n# name>os G:name>os name>sem G:name>sem
Builtin ndrop G:ndrop needs G:needs new G:new next-arg G:next-arg nip G:nip noop G:noop not G:not ns G:ns
Builtin ns: G:ns: ns>ls G:ns>ls ns>s G:ns>s ns? G:ns? null G:null null; G:null; null? G:null? number? G:number?
Builtin off G:off on G:on onexit G:onexit only G:only op! G:op! or G:or os G:os os-names G:os-names
Builtin os>long-name G:os>long-name os>name G:os>name over G:over p: G:p: pack G:pack parse G:parse
Builtin parsech G:parsech parseln G:parseln parsews G:parsews pick G:pick poke G:poke pool-clear G:pool-clear
Builtin prior G:prior private G:private process-args G:process-args prompt G:prompt public G:public
Builtin putc G:putc puts G:puts putslim G:putslim quote G:quote r! G:r! r> G:r> r@ G:r@ rad>deg G:rad>deg
Builtin rand G:rand rand-pcg G:rand-pcg rand-pcg-seed G:rand-pcg-seed randbuf G:randbuf randbuf-pcg G:randbuf-pcg
Builtin rdrop G:rdrop recurse G:recurse recurse-stack G:recurse-stack ref@ G:ref@ reg! G:reg! reg@ G:reg@
Builtin regbin@ G:regbin@ remaining-args G:remaining-args repeat G:repeat reset G:reset roll G:roll
Builtin rop! G:rop! rot G:rot rpick G:rpick rroll G:rroll rstack G:rstack rswap G:rswap rusage G:rusage
Builtin s>ns G:s>ns same? G:same? scriptdir G:scriptdir scriptfile G:scriptfile sem G:sem sem-post G:sem-post
Builtin sem-rm G:sem-rm sem-wait G:sem-wait sem-wait? G:sem-wait? sem>name G:sem>name semi-throw G:semi-throw
Builtin set-wipe G:set-wipe setenv G:setenv settings! G:settings! settings![] G:settings![] settings@ G:settings@
Builtin settings@? G:settings@? settings@[] G:settings@[] sh G:sh sh$ G:sh$ short-days G:short-days
Builtin short-months G:short-months sleep G:sleep space G:space stack-check G:stack-check stack-size G:stack-size
Builtin step G:step string? G:string? struct: G:struct: swap G:swap syslang G:syslang sysregion G:sysregion
Builtin tab-hook G:tab-hook tell-conflict G:tell-conflict tempdir G:tempdir tempfilename G:tempfilename
Builtin then G:then third G:third throw G:throw thrownull G:thrownull times G:times tlog G:tlog tri G:tri
Builtin true G:true tuck G:tuck type-check G:type-check typeassert G:typeassert unlock G:unlock unpack G:unpack
Builtin until G:until until! G:until! var G:var var, G:var, while G:while while! G:while! with: G:with:
Builtin words G:words words-like G:words-like words/ G:words/ xchg G:xchg xor G:xor >auth HTTP:>auth
Builtin sh I:sh tpush I:tpush trace-word I:trace-word call JSONRPC:call auth-string OAuth:auth-string
Builtin gen-nonce OAuth:gen-nonce params OAuth:params call SOAP:call ! a:! + a:+ - a:- 2each a:2each
Builtin 2map a:2map 2map+ a:2map+ 2map= a:2map= = a:= >map a:>map @ a:@ @@ a:@@ bsearch a:bsearch clear a:clear
Builtin close a:close diff a:diff dot a:dot each a:each each-slice a:each-slice exists? a:exists? filter a:filter
Builtin generate a:generate group a:group indexof a:indexof insert a:insert intersect a:intersect join a:join
Builtin len a:len map a:map map+ a:map+ map= a:map= mean a:mean mean&variance a:mean&variance new a:new
Builtin op a:op op! a:op! op= a:op= open a:open pop a:pop push a:push qsort a:qsort randeach a:randeach
Builtin reduce a:reduce reduce+ a:reduce+ rev a:rev shift a:shift shuffle a:shuffle slice a:slice slice+ a:slice+
Builtin slide a:slide sort a:sort union a:union when a:when when! a:when! x a:x x-each a:x-each xchg a:xchg
Builtin y a:y zip a:zip 8thdir app:8thdir asset app:asset atrun app:atrun atrun app:atrun atrun app:atrun
Builtin basedir app:basedir current app:current datadir app:datadir exename app:exename isgui app:isgui
Builtin main app:main oncrash app:oncrash orientation app:orientation pid app:pid restart app:restart
Builtin resumed app:resumed shared? app:shared? standalone app:standalone subdir app:subdir suspended app:suspended
Builtin sysquit app:sysquit (here) asm:(here) >n asm:>n avail asm:avail c, asm:c, here! asm:here! n> asm:n>
Builtin used asm:used w, asm:w, ! b:! + b:+ / b:/ = b:= >base64 b:>base64 >hex b:>hex >mpack b:>mpack
Builtin @ b:@ append b:append base64> b:base64> bit! b:bit! bit@ b:bit@ clear b:clear compress b:compress
Builtin conv b:conv each b:each each-slice b:each-slice expand b:expand fill b:fill getb b:getb hex> b:hex>
Builtin len b:len mem> b:mem> move b:move mpack-date b:mpack-date mpack-ignore b:mpack-ignore mpack> b:mpack>
Builtin new b:new op b:op rev b:rev search b:search shmem b:shmem slice b:slice splice b:splice ungetb b:ungetb
Builtin writable b:writable xor b:xor +block bc:+block .blocks bc:.blocks add-block bc:add-block block-hash bc:block-hash
Builtin block@ bc:block@ first-block bc:first-block hash bc:hash last-block bc:last-block load bc:load
Builtin new bc:new save bc:save set-sql bc:set-sql validate bc:validate validate-block bc:validate-block
Builtin add bloom:add filter bloom:filter in? bloom:in? accept bt:accept ch! bt:ch! ch@ bt:ch@ connect bt:connect
Builtin disconnect bt:disconnect err? bt:err? leconnect bt:leconnect lescan bt:lescan listen bt:listen
Builtin on? bt:on? read bt:read scan bt:scan service? bt:service? services? bt:services? write bt:write
Builtin * c:* * c:* + c:+ + c:+ = c:= = c:= >ri c:>ri >ri c:>ri abs c:abs abs c:abs arg c:arg arg c:arg
Builtin conj c:conj conj c:conj im c:im n> c:n> new c:new new c:new re c:re >aes128gcm cr:>aes128gcm
Builtin >aes256gcm cr:>aes256gcm >cp cr:>cp >cpe cr:>cpe >decrypt cr:>decrypt >edbox cr:>edbox >encrypt cr:>encrypt
Builtin >nbuf cr:>nbuf >rsabox cr:>rsabox >uuid cr:>uuid CBC cr:CBC CFB cr:CFB CTR cr:CTR ECB cr:ECB
Builtin GCM cr:GCM OFB cr:OFB aad? cr:aad? aes128box-sig cr:aes128box-sig aes128gcm> cr:aes128gcm>
Builtin aes256box-sig cr:aes256box-sig aes256gcm> cr:aes256gcm> aesgcm cr:aesgcm blakehash cr:blakehash
Builtin chacha20box-sig cr:chacha20box-sig chachapoly cr:chachapoly cipher! cr:cipher! cipher@ cr:cipher@
Builtin cp> cr:cp> cpe> cr:cpe> decrypt cr:decrypt decrypt+ cr:decrypt+ decrypt> cr:decrypt> dh-genkey cr:dh-genkey
Builtin dh-secret cr:dh-secret dh-sign cr:dh-sign dh-verify cr:dh-verify ebox-sig cr:ebox-sig ecc-genkey cr:ecc-genkey
Builtin ecc-secret cr:ecc-secret ecc-sign cr:ecc-sign ecc-verify cr:ecc-verify edbox-sig cr:edbox-sig
Builtin edbox> cr:edbox> encrypt cr:encrypt encrypt+ cr:encrypt+ encrypt> cr:encrypt> ensurekey cr:ensurekey
Builtin err? cr:err? gcm-tag-size cr:gcm-tag-size genkey cr:genkey hash cr:hash hash! cr:hash! hash+ cr:hash+
Builtin hash>b cr:hash>b hash>s cr:hash>s hash@ cr:hash@ hmac cr:hmac hotp cr:hotp iv? cr:iv? mode cr:mode
Builtin mode@ cr:mode@ randkey cr:randkey restore cr:restore root-certs cr:root-certs rsa_decrypt cr:rsa_decrypt
Builtin rsa_encrypt cr:rsa_encrypt rsa_sign cr:rsa_sign rsa_verify cr:rsa_verify rsabox-sig cr:rsabox-sig
Builtin rsabox> cr:rsabox> rsagenkey cr:rsagenkey save cr:save sbox-sig cr:sbox-sig sha1-hmac cr:sha1-hmac
Builtin shard cr:shard tag? cr:tag? totp cr:totp totp-epoch cr:totp-epoch totp-time-step cr:totp-time-step
Builtin unshard cr:unshard uuid cr:uuid uuid> cr:uuid> validate-pgp-sig cr:validate-pgp-sig (.hebrew) d:(.hebrew)
Builtin (.islamic) d:(.islamic) + d:+ +day d:+day +hour d:+hour +min d:+min +msec d:+msec - d:- .hebrew d:.hebrew
Builtin .islamic d:.islamic .time d:.time / d:/ = d:= >fixed d:>fixed >hebepoch d:>hebepoch >msec d:>msec
Builtin >unix d:>unix >ymd d:>ymd Adar d:Adar Adar2 d:Adar2 Adar2 d:Adar2 Av d:Av Elul d:Elul Fri d:Fri
Builtin Heshvan d:Heshvan Iyar d:Iyar Kislev d:Kislev Mon d:Mon Nissan d:Nissan Sat d:Sat Shevat d:Shevat
Builtin Sivan d:Sivan Sun d:Sun Tammuz d:Tammuz Tevet d:Tevet Thu d:Thu Tishrei d:Tishrei Tue d:Tue
Builtin Wed d:Wed adjust-dst d:adjust-dst between d:between d. d:d. dawn d:dawn days-in-hebrew-year d:days-in-hebrew-year
Builtin displaying-hebrew d:displaying-hebrew do-dawn d:do-dawn do-dusk d:do-dusk do-rise d:do-rise
Builtin doy d:doy dst? d:dst? dstquery d:dstquery dstzones? d:dstzones? dusk d:dusk elapsed-timer d:elapsed-timer
Builtin elapsed-timer-seconds d:elapsed-timer-seconds first-dow d:first-dow fixed> d:fixed> fixed>dow d:fixed>dow
Builtin fixed>hebrew d:fixed>hebrew fixed>islamic d:fixed>islamic format d:format hanukkah d:hanukkah
Builtin hebrew-epoch d:hebrew-epoch hebrew>fixed d:hebrew>fixed hebrewtoday d:hebrewtoday hmonth-name d:hmonth-name
Builtin islamic.epoch d:islamic.epoch islamic>fixed d:islamic>fixed islamictoday d:islamictoday join d:join
Builtin last-day-of-hebrew-month d:last-day-of-hebrew-month last-dow d:last-dow last-month d:last-month
Builtin last-week d:last-week last-year d:last-year latitude d:latitude longitude d:longitude longitude d:longitude
Builtin msec d:msec msec> d:msec> new d:new next-dow d:next-dow next-month d:next-month next-week d:next-week
Builtin next-year d:next-year number>hebrew d:number>hebrew omer d:omer parse d:parse pesach d:pesach
Builtin prev-dow d:prev-dow purim d:purim rosh-chodesh? d:rosh-chodesh? rosh-hashanah d:rosh-hashanah
Builtin shavuot d:shavuot start-timer d:start-timer sunrise d:sunrise taanit-esther d:taanit-esther
Builtin ticks d:ticks ticks/sec d:ticks/sec timer d:timer tisha-beav d:tisha-beav tzadjust d:tzadjust
Builtin unix> d:unix> updatetz d:updatetz year@ d:year@ ymd d:ymd ymd> d:ymd> yom-haatsmaut d:yom-haatsmaut
Builtin yom-kippur d:yom-kippur add-func db:add-func bind db:bind close db:close col db:col col[] db:col[]
Builtin col{} db:col{} err? db:err? errmsg db:errmsg exec db:exec exec-cb db:exec-cb key db:key mysql? db:mysql?
Builtin odbc? db:odbc? open db:open open? db:open? prepare db:prepare query db:query query-all db:query-all
Builtin rekey db:rekey sqlerrmsg db:sqlerrmsg bp dbg:bp except-task@ dbg:except-task@ go dbg:go line-info dbg:line-info
Builtin prompt dbg:prompt stop dbg:stop trace dbg:trace trace-enter dbg:trace-enter trace-leave dbg:trace-leave
Builtin abspath f:abspath append f:append associate f:associate atime f:atime canwrite? f:canwrite?
Builtin chmod f:chmod close f:close copy f:copy copydir f:copydir create f:create ctime f:ctime dir? f:dir?
Builtin dname f:dname eachbuf f:eachbuf eachline f:eachline enssep f:enssep eof? f:eof? err? f:err?
Builtin exists? f:exists? flush f:flush fname f:fname getb f:getb getc f:getc getline f:getline getmod f:getmod
Builtin glob f:glob glob-nocase f:glob-nocase include f:include launch f:launch link f:link link> f:link>
Builtin link? f:link? mkdir f:mkdir mmap f:mmap mmap-range f:mmap-range mmap-range? f:mmap-range? mtime f:mtime
Builtin mv f:mv open f:open open-ro f:open-ro popen f:popen print f:print read f:read relpath f:relpath
Builtin rglob f:rglob rm f:rm rmdir f:rmdir seek f:seek sep f:sep show f:show size f:size slurp f:slurp
Builtin stderr f:stderr stdin f:stdin stdout f:stdout tell f:tell times f:times trash f:trash ungetb f:ungetb
Builtin ungetc f:ungetc unzip f:unzip unzip-entry f:unzip-entry watch f:watch write f:write writen f:writen
Builtin zip+ f:zip+ zip@ f:zip@ zipentry f:zipentry zipnew f:zipnew zipopen f:zipopen zipsave f:zipsave
Builtin bold font:bold face? font:face? glyph-path font:glyph-path glyph-pos font:glyph-pos info font:info
Builtin italic font:italic ls font:ls measure font:measure new font:new pixels font:pixels pixels? font:pixels?
Builtin points font:points points? font:points? styles font:styles styles? font:styles? underline font:underline
Builtin +child g:+child +kind g:+kind +path g:+path -child g:-child /path g:/path >img g:>img >progress g:>progress
Builtin add-items g:add-items adjustwidth g:adjustwidth allow-orient g:allow-orient arc g:arc arc2 g:arc2
Builtin autohide g:autohide back g:back bezier g:bezier bg g:bg bg? g:bg? bounds g:bounds bounds? g:bounds?
Builtin box-label g:box-label btn-font g:btn-font bubble g:bubble button-size g:button-size buttons-visible g:buttons-visible
Builtin c-text g:c-text callout g:callout center g:center child g:child clear g:clear clearpath g:clearpath
Builtin clr>n g:clr>n coleven g:coleven colordlg g:colordlg colwidth g:colwidth connectededges g:connectededges
Builtin contrasting g:contrasting cp g:cp curmouse? g:curmouse? default-font g:default-font deselect-row g:deselect-row
Builtin dismiss g:dismiss do g:do draw-fitted-text g:draw-fitted-text draw-text g:draw-text draw-text-at g:draw-text-at
Builtin each g:each edit-on-double-click g:edit-on-double-click editable g:editable editdlg g:editdlg
Builtin empty-text g:empty-text enable g:enable enabled? g:enabled? fade g:fade fb-files g:fb-files
Builtin fcolor g:fcolor fg g:fg fg? g:fg? file-filter g:file-filter file-name g:file-name filedlg g:filedlg
Builtin fill g:fill fillall g:fillall fit-text g:fit-text flex! g:flex! focus g:focus fontdlg g:fontdlg
Builtin forward g:forward fullscreen g:fullscreen get-lasso-items g:get-lasso-items get-tab g:get-tab
Builtin getclr g:getclr getfont g:getfont getimage g:getimage getpath g:getpath getroot g:getroot gradient g:gradient
Builtin gui? g:gui? handle g:handle headerheight g:headerheight hide g:hide image g:image image-at g:image-at
Builtin invalidate g:invalidate ix? g:ix? justify g:justify keyinfo g:keyinfo l-text g:l-text laf g:laf
Builtin laf! g:laf! laf? g:laf? len g:len line-width g:line-width lineto g:lineto list+ g:list+ list- g:list-
Builtin loadcontent g:loadcontent localize g:localize m! g:m! m@ g:m@ menu-font g:menu-font menu-update g:menu-update
Builtin menuenabled g:menuenabled mouse? g:mouse? mousepos? g:mousepos? moveto g:moveto msgdlg g:msgdlg
Builtin multi g:multi name g:name named-skin g:named-skin new g:new new-laf g:new-laf next g:next obj g:obj
Builtin on g:on on? g:on? ontop g:ontop oshandle g:oshandle outlinethickness g:outlinethickness panel-size g:panel-size
Builtin panel-size? g:panel-size? parent g:parent path g:path path>s g:path>s pie g:pie pix! g:pix!
Builtin pop g:pop popmenu g:popmenu pos? g:pos? prev g:prev propval! g:propval! propval@ g:propval@
Builtin push g:push qbezier g:qbezier quit g:quit r-text g:r-text readonly g:readonly rect g:rect refresh g:refresh
Builtin restore g:restore root g:root root-item-visible g:root-item-visible rotate g:rotate rowheight g:rowheight
Builtin rrect g:rrect s>path g:s>path save g:save say g:say scale g:scale scolor g:scolor scrollthickness g:scrollthickness
Builtin sectionenable g:sectionenable select! g:select! select@ g:select@ selected-rows g:selected-rows
Builtin set-lasso g:set-lasso set-long-press g:set-long-press set-popup-font g:set-popup-font set-range g:set-range
Builtin set-swipe g:set-swipe set-value g:set-value setcursor g:setcursor setfont g:setfont setheader g:setheader
Builtin sethtml g:sethtml setimage g:setimage setname g:setname setroot g:setroot settab g:settab show g:show
Builtin show-line-numbers g:show-line-numbers show-pct g:show-pct showmenu g:showmenu showtooltip g:showtooltip
Builtin size g:size size? g:size? skin g:skin skin-class g:skin-class stackix g:stackix state g:state
Builtin state? g:state? stepsize g:stepsize stroke g:stroke stroke-fill g:stroke-fill style g:style
Builtin tabname g:tabname text g:text text-box-style g:text-box-style text? g:text? textcolor g:textcolor
Builtin textsize g:textsize timer! g:timer! timer@ g:timer@ toback g:toback tofront g:tofront toggle-row g:toggle-row
Builtin tooltip g:tooltip top g:top transition g:transition translate g:translate tree-open g:tree-open
Builtin triangle g:triangle update g:update updateitems g:updateitems url g:url user g:user user! g:user!
Builtin vertical g:vertical view g:view visible? g:visible? vpos! g:vpos! vpos@ g:vpos@ waitcursor g:waitcursor
Builtin winding g:winding xy g:xy xy? g:xy? +edge gr:+edge +edge+w gr:+edge+w +node gr:+node connect gr:connect
Builtin edges gr:edges m! gr:m! m@ gr:m@ neighbors gr:neighbors new gr:new node-edges gr:node-edges
Builtin nodes gr:nodes traverse gr:traverse + h:+ clear h:clear len h:len new h:new peek h:peek pop h:pop
Builtin push h:push unique h:unique arm? hw:arm? camera hw:camera camera-fmt hw:camera-fmt camera-img hw:camera-img
Builtin camera? hw:camera? cpu? hw:cpu? device? hw:device? displays? hw:displays? displaysize? hw:displaysize?
Builtin err? hw:err? gpio hw:gpio gpio! hw:gpio! gpio-mmap hw:gpio-mmap gpio@ hw:gpio@ i2c hw:i2c i2c! hw:i2c!
Builtin i2c!reg hw:i2c!reg i2c@ hw:i2c@ i2c@reg hw:i2c@reg isround? hw:isround? iswatch? hw:iswatch?
Builtin mac? hw:mac? mem? hw:mem? poll hw:poll sensor hw:sensor start hw:start stop hw:stop fetch-full imap:fetch-full
Builtin fetch-uid-mail imap:fetch-uid-mail login imap:login new imap:new select-inbox imap:select-inbox
Builtin >file img:>file copy img:copy crop img:crop data img:data desat img:desat fill img:fill filter img:filter
Builtin flip img:flip from-svg img:from-svg new img:new pix! img:pix! pix@ img:pix@ qr-gen img:qr-gen
Builtin qr-parse img:qr-parse rotate img:rotate scale img:scale scroll img:scroll size img:size countries iso:countries
Builtin find loc:find sort loc:sort ! m:! !? m:!? + m:+ +? m:+? - m:- @ m:@ @? m:@? @@ m:@@ clear m:clear
Builtin data m:data each m:each exists? m:exists? iter m:iter iter-all m:iter-all keys m:keys len m:len
Builtin map m:map new m:new op! m:op! open m:open vals m:vals xchg m:xchg ! mat:! * mat:* + mat:+ = mat:=
Builtin @ mat:@ col mat:col data mat:data det mat:det dim? mat:dim? get-n mat:get-n ident mat:ident
Builtin m. mat:m. minor mat:minor n* mat:n* new mat:new row mat:row same-size? mat:same-size? trans mat:trans
Builtin ! n:! * n:* */ n:*/ + n:+ +! n:+! - n:- / n:/ /mod n:/mod 1+ n:1+ 1- n:1- < n:< = n:= > n:>
Builtin BIGE n:BIGE BIGPI n:BIGPI E n:E PI n:PI ^ n:^ abs n:abs acos n:acos acos n:acos asin n:asin
Builtin asin n:asin atan n:atan atan n:atan atan2 n:atan2 band n:band between n:between bfloat n:bfloat
Builtin bic n:bic bint n:bint binv n:binv bnot n:bnot bor n:bor bxor n:bxor ceil n:ceil clamp n:clamp
Builtin cmp n:cmp comb n:comb cos n:cos cosd n:cosd exp n:exp expmod n:expmod float n:float floor n:floor
Builtin fmod n:fmod frac n:frac gcd n:gcd int n:int invmod n:invmod kind? n:kind? lcm n:lcm ln n:ln
Builtin max n:max median n:median min n:min mod n:mod neg n:neg odd? n:odd? perm n:perm prime? n:prime?
Builtin quantize n:quantize quantize! n:quantize! r+ n:r+ range n:range rot32l n:rot32l rot32r n:rot32r
Builtin round n:round round2 n:round2 running-variance n:running-variance running-variance-finalize n:running-variance-finalize
Builtin sgn n:sgn shl n:shl shr n:shr sin n:sin sind n:sind sqr n:sqr sqrt n:sqrt tan n:tan tand n:tand
Builtin trunc n:trunc ~= n:~= ! net:! >url net:>url @ net:@ DGRAM net:DGRAM INET4 net:INET4 INET6 net:INET6
Builtin PROTO_TCP net:PROTO_TCP PROTO_UDP net:PROTO_UDP STREAM net:STREAM accept net:accept addrinfo>o net:addrinfo>o
Builtin again? net:again? alloc-and-read net:alloc-and-read alloc-buf net:alloc-buf bind net:bind browse net:browse
Builtin close net:close connect net:connect err>s net:err>s err? net:err? get net:get getaddrinfo net:getaddrinfo
Builtin getpeername net:getpeername head net:head ifaces? net:ifaces? listen net:listen net-socket net:net-socket
Builtin opts net:opts port-is-ssl? net:port-is-ssl? post net:post proxy! net:proxy! read net:read recvfrom net:recvfrom
Builtin s>url net:s>url sendto net:sendto server net:server setsockopt net:setsockopt socket net:socket
Builtin tlshello net:tlshello url> net:url> user-agent net:user-agent wait net:wait write net:write
Builtin MAX ns:MAX cast ptr:cast len ptr:len pack ptr:pack unpack ptr:unpack unpack_orig ptr:unpack_orig
Builtin + q:+ clear q:clear len q:len new q:new notify q:notify overwrite q:overwrite peek q:peek pick q:pick
Builtin pop q:pop push q:push shift q:shift size q:size slide q:slide throwing q:throwing wait q:wait
Builtin ++match r:++match +/ r:+/ +match r:+match / r:/ @ r:@ err? r:err? len r:len match r:match new r:new
Builtin rx r:rx str r:str ! s:! * s:* + s:+ - s:- / s:/ /scripts s:/scripts <+ s:<+ = s:= =ic s:=ic
Builtin >base64 s:>base64 >ucs2 s:>ucs2 @ s:@ append s:append base64> s:base64> clear s:clear cmp s:cmp
Builtin cmpi s:cmpi compress s:compress days! s:days! each s:each eachline s:eachline expand s:expand
Builtin fill s:fill fmt s:fmt gershayim s:gershayim globmatch s:globmatch hexupr s:hexupr insert s:insert
Builtin intl s:intl intl! s:intl! lang s:lang lc s:lc len s:len lsub s:lsub ltrim s:ltrim map s:map
Builtin months! s:months! new s:new replace s:replace replace! s:replace! rev s:rev rsearch s:rsearch
Builtin rsub s:rsub rtrim s:rtrim script? s:script? search s:search size s:size slice s:slice strfmap s:strfmap
Builtin strfmt s:strfmt trim s:trim tsub s:tsub uc s:uc ucs2> s:ucs2> utf8? s:utf8? zt s:zt close sio:close
Builtin enum sio:enum open sio:open opts! sio:opts! opts@ sio:opts@ read sio:read write sio:write new smtp:new
Builtin send smtp:send apply-filter snd:apply-filter devices? snd:devices? end-record snd:end-record
Builtin filter snd:filter formats? snd:formats? freq snd:freq gain snd:gain gain? snd:gain? len snd:len
Builtin loop snd:loop mix snd:mix new snd:new pause snd:pause play snd:play played snd:played rate snd:rate
Builtin record snd:record seek snd:seek stop snd:stop stopall snd:stopall unmix snd:unmix volume snd:volume
Builtin volume? snd:volume? + st:+ . st:. clear st:clear len st:len ndrop st:ndrop new st:new op! st:op!
Builtin peek st:peek pick st:pick pop st:pop push st:push roll st:roll shift st:shift size st:size
Builtin slide st:slide swap st:swap throwing st:throwing >buf struct:>buf arr> struct:arr> buf struct:buf
Builtin buf> struct:buf> byte struct:byte double struct:double field! struct:field! field@ struct:field@
Builtin float struct:float ignore struct:ignore int struct:int long struct:long struct; struct:struct;
Builtin word struct:word ! t:! @ t:@ assign t:assign curtask t:curtask def-queue t:def-queue def-stack t:def-stack
Builtin done? t:done? err! t:err! err? t:err? getq t:getq guitask t:guitask handler t:handler kill t:kill
Builtin list t:list main t:main name! t:name! name@ t:name@ notify t:notify pop t:pop priority t:priority
Builtin push t:push push< t:push< q-notify t:q-notify q-wait t:q-wait qlen t:qlen result t:result task t:task
Builtin task-n t:task-n task-stop t:task-stop wait t:wait ! w:! @ w:@ alias: w:alias: cb w:cb deprecate w:deprecate
Builtin exec w:exec exec? w:exec? ffifail w:ffifail find w:find forget w:forget is w:is undo w:undo
Builtin >s xml:>s >txt xml:>txt parse xml:parse parse-html xml:parse-html parse-stream xml:parse-stream
Builtin getmsg[] zmq:getmsg[] sendmsg[] zmq:sendmsg[]
" numbers
syn keyword eighthMath decimal hex base@ base!
syn match eighthInteger '\<-\=[0-9.]*[0-9.]\+\>'
" recognize hex and binary numbers, the '$' and '%' notation is for eighth
syn match eighthInteger '\<\$\x*\x\+\>' " *1* --- dont't mess
syn match eighthInteger '\<\x*\d\x*\>' " *2* --- this order!
syn match eighthInteger '\<%[0-1]*[0-1]\+\>'
syn match eighthInteger "\<'.\>"
" Strings
syn region eighthString start=+\.\?\"+ skip=+"+ end=+$+
syn keyword jsonNull null
syn keyword jsonBool /\(true\|false\)/
syn region eighthString start=/\<"/ end=/"\>/
syn match jsonObjEntry /"\"[^"]\+\"\ze\s*:/
"syn region jsonObject start=/{/ end=/}/ contained contains=jsonObjEntry,jsonArray,jsonObject, jsonBool, eighthString
"syn region jsonArray start=/\[/ end=/\]/ contained contains=jsonArray,jsonObject, jsonBool, eighthString
" Include files
" syn match eighthInclude '\<\(libinclude\|include\|needs\)\s\+\S\+'
syn region eighthComment start="\zs\\" end="$" contains=eighthTodo
" Define the default highlighting.
if !exists("did_eighth_syntax_inits")
let did_eighth_syntax_inits=1
" The default methods for highlighting. Can be overriden later.
hi def link eighthTodo Todo
hi def link eighthOperators Operator
hi def link eighthMath Number
hi def link eighthInteger Number
hi def link eighthStack Special
hi def link eighthFStack Special
hi def link eighthSP Special
hi def link eighthColonDef Define
hi def link eighthColonName Operator
hi def link eighthEndOfColonDef Define
hi def link eighthDefine Define
hi def link eighthDebug Debug
hi def link eighthCharOps Character
hi def link eighthConversion String
hi def link eighthForth Statement
hi def link eighthVocs Statement
hi def link eighthString String
hi def link eighthComment Comment
hi def link eighthClassDef Define
hi def link eighthEndOfClassDef Define
hi def link eighthObjectDef Define
hi def link eighthEndOfObjectDef Define
hi def link eighthInclude Include
hi def link eighthBuiltin Define
hi def link eighthClasses Define
hi def link eighthClassWord Keyword
hi def link jsonObject Delimiter
hi def link jsonObjEntry Label
hi def link jsonArray Special
hi def link jsonNull Function
hi def link jsonBool Boolean
endif
let b:current_syntax = "8th"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ts=8:sw=4:nocindent:smartindent:

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2018 Sep 21
" Last Change: 2019 Feb 11
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@ -342,7 +342,7 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
syn keyword cConstant EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK EMSGSIZE
syn keyword cConstant EMULTIHOP ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS ENODATA
syn keyword cConstant ENODEV ENOENT ENOEXEC ENOLCK ENOLINK ENOMEM ENOMSG ENOPROTOOPT ENOSPC ENOSR
syn keyword cConstant ENOSTR ENOSYS ENOTCONN ENOTDIR ENOTEMPTY ENOTRECOVERABLE ENOTSOCK ENOTSUP
syn keyword cConstant ENOSTR ENOSYS ENOTBLK ENOTCONN ENOTDIR ENOTEMPTY ENOTRECOVERABLE ENOTSOCK ENOTSUP
syn keyword cConstant ENOTTY ENXIO EOPNOTSUPP EOVERFLOW EOWNERDEAD EPERM EPIPE EPROTO
syn keyword cConstant EPROTONOSUPPORT EPROTOTYPE ERANGE EROFS ESPIPE ESRCH ESTALE ETIME ETIMEDOUT
syn keyword cConstant ETXTBSY EWOULDBLOCK EXDEV

View File

@ -3,7 +3,7 @@
" Maintainer: Debian Vim Maintainers
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
" Last Change: 2018 Oct 30
" Last Change: 2019 Jan 26
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
" Standard syntax initialization
@ -14,7 +14,7 @@ endif
" Case doesn't matter for us
syn case ignore
let s:urgency='urgency=\(low\|medium\|high\|critical\)\( [^[:space:],][^,]*\)\='
let s:urgency='urgency=\(low\|medium\|high\|emergency\|critical\)\( [^[:space:],][^,]*\)\='
let s:binNMU='binary-only=yes'
" Define some common expressions we can use later on

View File

@ -1,8 +1,9 @@
" Vim syntax file
" Language: Makefile
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
" URL: http://www.fleiner.com/vim/syntax/make.vim
" Last Change: 2015 Feb 28
" Maintainer: Roland Hieber <rohieb+vim-iR0jGdkV@rohieb.name>
" Previous Maintainer: Claudio Fleiner <claudio@fleiner.com>
" URL: https://github.com/vim/vim/syntax/make.vim
" Last Change: 2019 Feb 08
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@ -64,7 +65,7 @@ syn match makeCmdNextLine "\\\n."he=e-1 contained
" Statements / Functions (GNU make)
syn match makeStatement contained "(\(subst\|abspath\|addprefix\|addsuffix\|and\|basename\|call\|dir\|error\|eval\|filter-out\|filter\|findstring\|firstword\|flavor\|foreach\|if\|info\|join\|lastword\|notdir\|or\|origin\|patsubst\|realpath\|shell\|sort\|strip\|suffix\|value\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1
syn match makeStatement contained "(\(abspath\|addprefix\|addsuffix\|and\|basename\|call\|dir\|error\|eval\|file\|filter-out\|filter\|findstring\|firstword\|flavor\|foreach\|guile\|if\|info\|join\|lastword\|notdir\|or\|origin\|patsubst\|realpath\|shell\|sort\|strip\|subst\|suffix\|value\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1
" Comment
if exists("make_microsoft")

View File

@ -3,7 +3,7 @@
" Language: SPEC: Build/install scripts for Linux RPM packages
" Maintainer: Igor Gnatenko i.gnatenko.brain@gmail.com
" Former Maintainer: Donovan Rebbechi elflord@panix.com (until March 2014)
" Last Change: Sat Apr 9 15:30 2016 Filip Szymański
" Last Change: 2019 Feb 12
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@ -86,9 +86,9 @@ syn region specSectionMacroBracketArea oneline matchgroup=specSectionMacro start
"%% Files Section %%
"TODO %config valid parameters: missingok\|noreplace
"TODO %verify valid parameters: \(not\)\= \(md5\|atime\|...\)
syn region specFilesArea matchgroup=specSection start='^%[Ff][Ii][Ll][Ee][Ss]\>' skip='%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|verify\|ghost\)\>' end='^%[a-zA-Z]'me=e-2 contains=specFilesOpts,specFilesDirective,@specListedFiles,specComment,specCommandSpecial,specMacroIdentifier
syn region specFilesArea matchgroup=specSection start='^%[Ff][Ii][Ll][Ee][Ss]\>' skip='%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|license\|verify\|ghost\)\>' end='^%[a-zA-Z]'me=e-2 contains=specFilesOpts,specFilesDirective,@specListedFiles,specComment,specCommandSpecial,specMacroIdentifier
"tip: remember to include new itens in specFilesArea above
syn match specFilesDirective contained '%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|verify\|ghost\)\>'
syn match specFilesDirective contained '%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|license\|verify\|ghost\)\>'
"valid options for certain section headers
syn match specDescriptionOpts contained '\s-[ln]\s*\a'ms=s+1,me=e-1

View File

@ -99,7 +99,7 @@ NOTE: As you go through this tutor, do not try to memorize, learn by usage.
1. Move the cursor to the first line below marked --->.
2. To make the first line the same as the second, move the cursor on top
of the first character AFTER where the text is to be inserted.
of the character BEFORE which the text is to be inserted.
3. Press i and type in the necessary additions.

View File

@ -1,5 +1,5 @@
===============================================================================
= V <EFBFBD> t e j t e v t u t o r i a l u V I M - Verze 1.5 =
= V <EFBFBD> t e j t e v t u t o r i a l u V I M - Verze 1.5 =
===============================================================================
Vim je velmi v<EFBFBD>konn<EFBFBD> editor, kter<EFBFBD> m<EFBFBD> p<EFBFBD><EFBFBD>li<EFBFBD> mnoho p<EFBFBD><EFBFBD>kaz<EFBFBD> na to, aby
@ -18,7 +18,7 @@
nau<EFBFBD>en<EFBFBD>. Pokud si jen <EFBFBD>te<EFBFBD> text, p<EFBFBD><EFBFBD>kazy zapomene<EFBFBD>!
Nyn<EFBFBD> se p<EFBFBD>esv<EFBFBD>d<EFBFBD>te, <EFBFBD>e Caps-Lock NEN<EFBFBD> stla<EFBFBD>en<EFBFBD> a n<EFBFBD>kolikr<EFBFBD>t stiskn<EFBFBD>te
kl<EFBFBD>vesu j aby se kurzor posunul natolik, <EFBFBD>e lekce 1.1 zapln<EFBFBD> celou
kl<EFBFBD>vesu j aby se kurzor posunul natolik, <EFBFBD>e lekce 1.1 zapln<EFBFBD> celou
obrazovku.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekce 1.1: POHYB KURZORU

View File

@ -1,5 +1,5 @@
===============================================================================
= V <20> t e j t e v t u t o r i a l u V I M - Verze 1.5 =
= V <20> t e j t e v t u t o r i a l u V I M - Verze 1.5 =
===============================================================================
Vim je velmi v<>konn<6E> editor, kter<65> m<> p<><70>li<6C> mnoho p<><70>kaz<61> na to, aby
@ -18,7 +18,7 @@
nau<61>en<65>. Pokud si jen <20>te<74> text, p<><70>kazy zapomene<6E>!
Nyn<79> se p<>esv<73>d<EFBFBD>te, <20>e Caps-Lock NEN<45> stla<6C>en<65> a n<>kolikr<6B>t stiskn<6B>te
kl<6B>vesu j aby se kurzor posunul natolik, <20>e lekce 1.1 zapln<6C> celou
kl<6B>vesu j aby se kurzor posunul natolik, <20>e lekce 1.1 zapln<6C> celou
obrazovku.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekce 1.1: POHYB KURZORU

View File

@ -1,5 +1,5 @@
===============================================================================
= V í t e j t e v t u t o r i a l u V I M - Verze 1.5 =
= V í t e j t e v t u t o r i a l u V I M - Verze 1.5 =
===============================================================================
Vim je velmi výkonný editor, který má příliš mnoho příkazů na to, aby
@ -18,7 +18,7 @@
naučení. Pokud si jen čteš text, příkazy zapomeneš!
Nyní se přesvědčte, že Caps-Lock NENÍ stlačený a několikrát stiskněte
klávesu j aby se kurzor posunul natolik, že lekce 1.1 zaplní celou
klávesu j aby se kurzor posunul natolik, že lekce 1.1 zaplní celou
obrazovku.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekce 1.1: POHYB KURZORU

View File

@ -967,6 +967,6 @@ BEM
<20>ndret til Vim af Bram Moolenaar.
Oversat til dansk af scootergrisen.
Oversat af scootergrisen.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -967,6 +967,6 @@ BEMÆRK: Fuldførelse virker til mange kommandoer. Prøv blot at trykke på
Ændret til Vim af Bram Moolenaar.
Oversat til dansk af scootergrisen.
Oversat af scootergrisen.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -846,7 +846,7 @@ NOTE: 1
6. ":set xxx" <20>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD>פ<EFBFBD><D7A4><EFBFBD><EFBFBD>ȥ<EFBFBD><C8A5>ץ<EFBFBD><D7A5><EFBFBD><EFBFBD><EFBFBD> "xxx" <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EAA4B5><EFBFBD>
'ic' 'ignorecase' <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8><EFBFBD>ζ<EFBFBD><CEB6>̤<EFBFBD><CCA4>ʤ<EFBFBD>
'is' 'incsearch' <09><><EFBFBD><EFBFBD><EFBFBD>ե졼<D5A5><ECA1BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʬ<EFBFBD>ޥå<DEA5><C3A5><EFBFBD><EFBFBD>Ƥ<EFBFBD><C6A4><EFBFBD><EFBFBD><EFBFBD>ʬ<EFBFBD><CAAC>ɽ<EFBFBD><C9BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
'hls' 'hlsearch' <09>ޥå<DEA5><C3A5><EFBFBD><EFBFBD><EFBFBD>٤<EFBFBD><D9A4><EFBFBD>Ĵɽ<C4B4><C9BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
'hls' 'hlsearch' <09>ޥå<DEA5><C3A5><EFBFBD><EFBFBD><EFBFBD>٤Ƥ<EFBFBD><EFBFBD><EFBFBD>Ĵɽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Ĺ<><C4B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɤ<EFBFBD><C9A4><EFBFBD><EFBFBD>Υ<EFBFBD><CEA5>ץ<EFBFBD><D7A5><EFBFBD><EFBFBD><EFBFBD>̾<EFBFBD>Ǥ<EFBFBD><C7A4><EFBFBD><EFBFBD>ѤǤ<D1A4><C7A4>ޤ<EFBFBD><DEA4><EFBFBD>
7. <20><><EFBFBD>ץ<EFBFBD><D7A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD><CCB5><EFBFBD>ˤ<EFBFBD><CBA4><EFBFBD><EFBFBD>ˤ<EFBFBD> "no" <20><><EFBFBD><EFBFBD>Ϳ<EFBFBD><CDBF><EFBFBD>ޤ<EFBFBD>: :set noic
@ -969,8 +969,9 @@ NOTE:
Modified for Vim by Bram Moolenaar.
<20><><EFBFBD>ܸ<EFBFBD><DCB8><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ٹ<EFBFBD> <mattn.jp@gmail.com>
<EFBFBD>ƽ<EFBFBD> ¼<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>Ϻ <koron.kaoriya@gmail.com>
<20><><EFBFBD>ܸ<EFBFBD><DCB8><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ٹ<EFBFBD> <mattn.jp@gmail.com>
vim-jp<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <https://github.com/vim-jp/lang-ja>
<20>ƽ<EFBFBD> ¼<><C2BC> <20><>Ϻ <koron.kaoriya@gmail.com>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vi:set ts=8 sts=4 sw=4 tw=78:

View File

@ -846,7 +846,7 @@ NOTE: 1
6. ":set xxx" <20>ƃ^<5E>C<EFBFBD>v<EFBFBD><76><EFBFBD><EFBFBD><EFBFBD>ƃI<C683>v<EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD> "xxx" <20><><EFBFBD>ݒ肳<DD92><E882B3><EFBFBD><EFBFBD><EFBFBD>B
'ic' 'ignorecase' <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɑ<C991><E595B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̋<EFBFBD><CC8B>ʂ<EFBFBD><CA82>Ȃ<EFBFBD>
'is' 'incsearch' <09><><EFBFBD><EFBFBD><EFBFBD>t<EFBFBD><74><EFBFBD>[<5B>Y<EFBFBD>ɕ<EFBFBD><C995><EFBFBD><EFBFBD>}<7D>b<EFBFBD>`<60><><EFBFBD>Ă<EFBFBD><C482><EFBFBD><E99594><EFBFBD><EFBFBD><EFBFBD>\<5C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
'hls' 'hlsearch' <09>}<7D>b<EFBFBD>`<60><><EFBFBD><EFBFBD>ׂ<EFBFBD><D782><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\<5C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
'hls' 'hlsearch' <09>}<7D>b<EFBFBD>`<60><><EFBFBD><EFBFBD>ׂĂ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\<5C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD>Z<EFBFBD><5A><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD>ǂ<EFBFBD><C782><EFBFBD><EFBFBD>̃I<CC83>v<EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ł<EFBFBD><C582>g<EFBFBD>p<EFBFBD>ł<EFBFBD><C582>܂<EFBFBD><DC82>B
7. <20>I<EFBFBD>v<EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD>𖳌<EFBFBD><F096B38C>ɂ<EFBFBD><C982><EFBFBD><EFBFBD>ɂ<EFBFBD> "no" <20><><EFBFBD>t<EFBFBD>^<5E><><EFBFBD>܂<EFBFBD>: :set noic
@ -969,8 +969,9 @@ NOTE:
Modified for Vim by Bram Moolenaar.
<20><><EFBFBD>{<7B><><EFBFBD><EFBFBD> <20><><EFBFBD>{ <20>׍O <mattn.jp@gmail.com>
<EFBFBD>ďC <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Y <koron.kaoriya@gmail.com>
<20><><EFBFBD>{<7B><><EFBFBD><EFBFBD> <20><><EFBFBD>{ <20>׍O <mattn.jp@gmail.com>
vim-jp<6A>`<60>[<5B><> <https://github.com/vim-jp/lang-ja>
<20>ďC <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Y <koron.kaoriya@gmail.com>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vi:set ts=8 sts=4 sw=4 tw=78:

View File

@ -846,7 +846,7 @@ NOTE: 1つの検索コマンドだけ大文字小文字の区別をやめたい
6. ":set xxx" とタイプするとオプション "xxx" が設定される。
'ic' 'ignorecase' 検索時に大文字小文字の区別しない
'is' 'incsearch' 検索フレーズに部分マッチしている部分を表示する
'hls' 'hlsearch' マッチするすべを強調表示する
'hls' 'hlsearch' マッチするすべを強調表示する
長い方、短い方、どちらのオプション名でも使用できます。
7. オプションを無効にするには "no" を付与します: :set noic
@ -969,8 +969,9 @@ NOTE: 補完は多くのコマンドで動作します。そして CTRL-D と <T
Modified for Vim by Bram Moolenaar.
日本語訳 松本 泰弘 <mattn.jp@gmail.com>
監修 村岡 太郎 <koron.kaoriya@gmail.com>
日本語訳 松本 泰弘 <mattn.jp@gmail.com>
vim-jpチーム <https://github.com/vim-jp/lang-ja>
監修 村岡 太郎 <koron.kaoriya@gmail.com>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vi:set ts=8 sts=4 sw=4 tw=78:

View File

@ -100,7 +100,7 @@
1. Ga met de cursor naar de eerste regel verderop met --->.
2. Maak de eerste regel gelijk aan de tweede. Zet daarvoor de cursor op
de plaats waar tekst moet worden ingevoegd.
het karakter waarvoor tekst moet worden ingevoegd.
3. Tik i en daarna de nodige aanvullingen.

View File

@ -100,7 +100,7 @@
1. Ga met de cursor naar de eerste regel verderop met --->.
2. Maak de eerste regel gelijk aan de tweede. Zet daarvoor de cursor op
de plaats waar tekst moet worden ingevoegd.
het karakter waarvoor tekst moet worden ingevoegd.
3. Tik i en daarna de nodige aanvullingen.

View File

@ -99,7 +99,7 @@ NOTE: As you go through this tutor, do not try to memorize, learn by usage.
1. Move the cursor to the first line below marked --->.
2. To make the first line the same as the second, move the cursor on top
of the first character AFTER where the text is to be inserted.
of the character BEFORE which the text is to be inserted.
3. Press i and type in the necessary additions.

View File

@ -1,7 +1,7 @@
" An example for a vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2017 Sep 20
" Last change: 2019 Jan 26
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
@ -9,7 +9,8 @@
" for MS-DOS and Win32: $VIM\_vimrc
" for OpenVMS: sys$login:.vimrc
" When started as "evim", evim.vim will already have done these settings.
" When started as "evim", evim.vim will already have done these settings, bail
" out.
if v:progname =~? "evim"
finish
endif
@ -31,23 +32,13 @@ if &t_Co > 2 || has("gui_running")
set hlsearch
endif
" Only do this part when compiled with support for autocommands.
if has("autocmd")
" Put these in an autocmd group, so that we can delete them easily.
augroup vimrcEx
" Put these in an autocmd group, so that we can delete them easily.
augroup vimrcEx
au!
" For all text files set 'textwidth' to 78 characters.
autocmd FileType text setlocal textwidth=78
augroup END
else
set autoindent " always set autoindenting on
endif " has("autocmd")
augroup END
" Add optional packages.
"

View File

@ -31,7 +31,7 @@
# define STRICT
#endif
#define INC_OLE2 // WIN32, get ole2 from windows.h
#define INC_OLE2 // MS-Windows, get ole2 from windows.h
/* Visual Studio 2005 has 'deprecated' many of the standard CRT functions */
#if defined(_MSC_VER) && _MSC_VER >= 1400

View File

@ -405,7 +405,7 @@ DEFINES = $(DEFINES) -DFEAT_CSCOPE
!endif
!if ("$(GUI)"=="yes")
DEFINES = $(DEFINES) -DFEAT_GUI_W32 -DFEAT_CLIPBOARD
DEFINES = $(DEFINES) -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD
!if ("$(DEBUG)"=="yes")
TARGET = gvimd.exe
!else
@ -525,6 +525,7 @@ vimwinmain = \
vimobj = \
$(OBJDIR)\arabic.obj \
$(OBJDIR)\autocmd.obj \
$(OBJDIR)\blowfish.obj \
$(OBJDIR)\buffer.obj \
$(OBJDIR)\charset.obj \
@ -541,12 +542,13 @@ vimobj = \
$(OBJDIR)\ex_docmd.obj \
$(OBJDIR)\ex_eval.obj \
$(OBJDIR)\ex_getln.obj \
$(OBJDIR)\farsi.obj \
$(OBJDIR)\fileio.obj \
$(OBJDIR)\findfile.obj \
$(OBJDIR)\fold.obj \
$(OBJDIR)\getchar.obj \
$(OBJDIR)\hardcopy.obj \
$(OBJDIR)\hashtab.obj \
$(OBJDIR)\indent.obj \
$(OBJDIR)\json.obj \
$(OBJDIR)\list.obj \
$(OBJDIR)\main.obj \

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