Compare commits

...

210 Commits

Author SHA1 Message Date
Bram Moolenaar
373c65104e patch 8.2.1036: popupwin test fails sometimes
Problem:    Popupwin test fails sometimes.
Solution:   Use WaitForAssert() instead of a sleep.
2020-06-22 19:24:23 +02:00
Bram Moolenaar
7633fe595e patch 8.2.1035: setreg() does not always clear the register
Problem:    setreg() does not always clear the register.
Solution:   Clear the register if the dict argument is empty. (Andy Massimino,
            closes #3370)
2020-06-22 19:10:56 +02:00
Bram Moolenaar
38041da1c2 patch 8.2.1034: compiler warning for uninitialized variables
Problem:    Compiler warning for uninitialized variables.
Solution:   Add initializations. (John Marriott)
2020-06-21 22:17:18 +02:00
Bram Moolenaar
73fef33014 Update runtime files 2020-06-21 22:12:03 +02:00
Bram Moolenaar
8d9437968b patch 8.2.1033: not easy to read the test time in the test output
Problem:    Not easy to read the test time in the test output.
Solution:   Align the times.  Make slow tests bold.
2020-06-21 20:39:37 +02:00
Bram Moolenaar
7fe875583b patch 8.2.1032: error message for declaring a variable cannot be translated
Problem:    Error message for declaring a variable cannot be translated.
Solution:   Enclose in _().  Make environment variable a separate message.
2020-06-21 20:38:28 +02:00
Bram Moolenaar
f5433fbfe4 patch 8.2.1031: build failure with Perl5.32
Problem:    Build failure with Perl5.32.
Solution:   Define a few more functions. (Felix Yan, closes #6310)
2020-06-21 20:06:54 +02:00
Bram Moolenaar
da58134eed patch 8.2.1030: reducing size of a terminal window may cause a crash
Problem:    Reducing size of a terminal window may cause a crash.
Solution:   Make sure the row and column don't become negative. (closes #6273)
2020-06-21 17:57:32 +02:00
Bram Moolenaar
23c5527373 patch 8.2.1029: Vim9: cannot chain function calls with -> at line start
Problem:    Vim9: cannot chain function calls with -> at line start.
Solution:   Peek ahead for a following line starting with "->". (closes #6306)
2020-06-21 16:58:13 +02:00
Bram Moolenaar
e55b1c098d patch 8.2.1028: Vim9: no error for declaring buffer, window, etc. variable
Problem:    Vim9: no error for declaring buffer, window, etc. variable.
Solution:   Give an error.  Unify the error messages.
2020-06-21 15:52:59 +02:00
Bram Moolenaar
820ffa567c patch 8.2.1027: GUI: multi-byte characters do not work in a terminal
Problem:    GUI: multi-byte characters do not work in a terminal.
Solution:   Do not assume a key is one byte. (closes #6304)
2020-06-21 15:09:14 +02:00
Bram Moolenaar
a3b7fdc1bb patch 8.2.1026: Vim9: cannot break the line after "->"
Problem:    Vim9: cannot break the line after "->".
Solution:   Check for a continuation line after "->", "[" and ".".  Ignore
            trailing white space.
2020-06-21 14:12:17 +02:00
Bram Moolenaar
8c524f76eb patch 8.2.1025: tabpage menu and tabline not sufficiently tested
Problem:    Tabpage menu and tabline not sufficiently tested.
Solution:   Add tests. (Yegappan Lakshmanan, closes #6307)
2020-06-21 13:23:45 +02:00
Bram Moolenaar
6797966dfc patch 8.2.1024: Vim9: no error for using "let g:var = val"
Problem:    Vim9: no error for using "let g:var = val".
Solution:   Add an error.
2020-06-20 22:50:47 +02:00
Bram Moolenaar
0cb5bcf583 patch 8.2.1023: Vim9: redefining a function uses a new index every time
Problem:    Vim9: redefining a function uses a new index every time.
Solution:   When redefining a function clear the contents and re-use the
            index.
2020-06-20 18:19:09 +02:00
Bram Moolenaar
845e0ee594 patch 8.2.1022: various parts of code not covered by tests
Problem:    Various parts of code not covered by tests.
Solution:   Add more tests. (Yegappan Lakshmanan, closes #6300)
2020-06-20 16:05:32 +02:00
Bram Moolenaar
a190548e91 patch 8.2.1021: Ruby interface not tested enough
Problem:    Ruby interface not tested enough.
Solution:   Add a couple more tests. (Dominique Pellé, closes #6301)
2020-06-20 16:00:25 +02:00
Bram Moolenaar
b326edf5b3 patch 8.2.1020: popupwin test fails in the GUI
Problem:    Popupwin test fails in the GUI.
Solution:   Send GUI byte sequence for <C-S-a>.
2020-06-20 15:03:38 +02:00
Bram Moolenaar
ef6746f637 patch 8.2.1019: mapping <M-S-a> does not work in the GUI
Problem:    Mapping <M-S-a> does not work in the GUI.
Solution:   Move the logic to remove the shift modifier to
            may_remove_shift_modifier() and also use it in the GUI.
2020-06-20 14:43:23 +02:00
Bram Moolenaar
280b0dc815 patch 8.2.1018: typo in enum value
Problem:    Typo in enum value. (James McCoy)
Solution:   Fix the typo.
2020-06-20 13:29:03 +02:00
Bram Moolenaar
1089374130 patch 8.2.1017: Appveyor output doesn't show MinGW console features
Problem:    Appveyor output doesn't show MinGW console features.
Solution:   List the features of the console build.
2020-06-19 22:37:47 +02:00
Bram Moolenaar
7e380030c1 patch 8.2.1016: Vim9: test fails when channel feature is missing
Problem:    Vim9: test fails when channel feature is missing.
Solution:   Process an :if command when skipping
2020-06-19 22:35:44 +02:00
Bram Moolenaar
20298ce679 patch 8.2.1015: popup filter gets key with modifier prepended
Problem:    Popup filter gets key with modifier prepended when using
            modifyOtherKeys.
Solution:   Remove the shift modifier when it is included in the key, also
            when the Alt or Meta modifier is used.
2020-06-19 21:46:52 +02:00
Bram Moolenaar
1e0b7b11db patch 8.2.1014: using "name" for a string result is confusing
Problem:    Using "name" for a string result is confusing.
Solution:   Rename to "end".
2020-06-19 19:30:53 +02:00
Bram Moolenaar
ec9b017b87 patch 8.2.1013: channel tests can be a bit flaky
Problem:    Channel tests can be a bit flaky.
Solution:   Set the g:test_is_flaky flag in SetUp().
2020-06-19 19:10:59 +02:00
Bram Moolenaar
3b74b6b4bb patch 8.2.1012: Vim9: cannot declare single character script variables
Problem:    Vim9: cannot declare single character script variables.
Solution:   Don't see "b:", "s:", etc. as namespace.  Fix item size of
            sn_var_vals.
2020-06-19 19:01:43 +02:00
Bram Moolenaar
c785b9a7f4 patch 8.2.1011: Vim9: some code not tested
Problem:    Vim9: some code not tested.
Solution:   Add a few more test cases.  Reorder checks for clearer error.
            Remove unreachable code.
2020-06-19 18:34:15 +02:00
Bram Moolenaar
128d307963 patch 8.2.1010: build failure in libvterm with debug enabled
Problem:    Build failure in libvterm with debug enabled. (John Little)
Solution:   Use "->" instead of ".".
2020-06-19 17:20:41 +02:00
Bram Moolenaar
c5b1c20b6b patch 8.2.1009: Vim9: some failures not checked for
Problem:    Vim9: some failures not checked for.
Solution:   Add test cases.  Remove unused code.
2020-06-18 22:43:27 +02:00
Bram Moolenaar
0779fab297 patch 8.2.1008: Vim9: no test for disassambling newly added instructions
Problem:    Vim9: no test for disassambling newly added instructions.
Solution:   Add a function and check disassembly.
2020-06-18 22:18:18 +02:00
Bram Moolenaar
c8cb883015 patch 8.2.1007: completion doesn't work after ":r ++arg !"
Problem:    Completion doesn't work after ":r ++arg !".
Solution:   Skip over "++arg". (Christian Brabandt, closes #6275,
            closes #6258)
2020-06-18 21:14:30 +02:00
Bram Moolenaar
efd8855594 patch 8.2.1006: Vim9: require unnecessary return statement
Problem:    Vim9: require unnecessary return statement.
Solution:   Improve the use of the had_return flag. (closes #6270)
2020-06-18 20:50:10 +02:00
Bram Moolenaar
9b68c82b7c patch 8.2.1005: Vim9: using TRUE/FALSE/MAYBE for ctx_skip is confusing
Problem:    Vim9: using TRUE/FALSE/MAYBE for ctx_skip is confusing.
Solution:   Use an enum value.
2020-06-18 19:31:08 +02:00
Bram Moolenaar
511feec6f0 patch 8.2.1004: line numbers below filler lines not always updated
Problem:    Line numbers below filler lines not always updated.
Solution:   Don't break out of the win_line() loop too early. (Christian
            Brabandt, closes #6294, closes #6138)
2020-06-18 19:15:27 +02:00
Bram Moolenaar
865af6b990 patch 8.2.1003: Vim9: return type of sort() is too generic
Problem:    Vim9: return type of sort() is too generic.
Solution:   Get type from the first argument. (closes #6292)
2020-06-18 18:45:49 +02:00
Bram Moolenaar
ceb2e77510 patch 8.2.1002: test may fail when run directly
Problem:    Test may fail when run directly.
Solution:   Check if g:run_nr exists. (Christian Brabandt, closes #6285)
2020-06-18 18:33:59 +02:00
Bram Moolenaar
72abcf42d4 patch 8.2.1001: Vim9: crash with nested "if" and assignment
Problem:    Vim9: crash with nested "if" and assignment.
Solution:   Skip more of the assignment.  Do not set ctx_skip when code is
            reachable.
2020-06-18 18:26:24 +02:00
Bram Moolenaar
158ea175a9 patch 8.2.1000: get error when leaving Ex mode with :visual
Problem:    Get error when leaving Ex mode with :visual and a CmdLineEnter
            autocommand was used.
Solution:   Reset ex_pressedreturn. (closes #6293)
2020-06-18 17:28:39 +02:00
Bram Moolenaar
2f03e5a0a9 patch 8.2.0999: moving to next sentence gets stuck on quote
Problem:    Moving to next sentence gets stuck on quote.
Solution:   When moving to the next sentence doesn't result in moving, advance
            a character and try again. (closes #6291)
2020-06-18 15:33:25 +02:00
Bram Moolenaar
3d9207ad2f patch 8.2.0998: not all tag code is tested
Problem:    Not all tag code is tested.
Solution:   Add a few more test cases. (Yegappan Lakshmanan, closes #6284)
2020-06-17 22:58:35 +02:00
Bram Moolenaar
856c1110c1 patch 8.2.0997: cannot execute a register containing line continuation
Problem:    Cannot execute a register containing line continuation.
Solution:   Concatenate lines where needed. (Yegappan Lakshmanan,
            closes #6272)
2020-06-17 21:47:23 +02:00
Bram Moolenaar
40a019f157 patch 8.2.0996: using "aucmdwin" in win_gettype() is not ideal
Problem:    Using "aucmdwin" in win_gettype() is not ideal.
Solution:   Rename to "autocmd".
2020-06-17 21:41:35 +02:00
Bram Moolenaar
e17f8817a1 patch 8.2.0995: insufficient testing for the readdir() sort option
Problem:    Insufficient testing for the readdir() sort option.
Solution:   Add a few more tests. (Christian Brabandt, closes #6278)
2020-06-17 20:30:44 +02:00
Bram Moolenaar
9bb3eb3e02 patch 8.2.0994: Vim9: missing function causes compilation error
Problem:    Vim9: missing function causes compilation error.
Solution:   Call test function indirectly.
2020-06-17 20:03:36 +02:00
Bram Moolenaar
f7d267ef20 patch 8.2.0993: Vim9 script test fails with normal features
Problem:    Vim9 script test fails with normal features.
Solution:   Use :func instead of :def for now.
2020-06-17 12:04:54 +02:00
Bram Moolenaar
101f4810e2 patch 8.2.0992: Vim9: crash when using :import in the Vim command
Problem:    Vim9: crash when using :import in the Vim command.
Solution:   Give an error when using :import outside of a script.
            (closes #6271)
2020-06-16 23:18:51 +02:00
Bram Moolenaar
0fe937fd86 patch 8.2.0991: cannot get window type for autocmd and preview window
Problem:    Cannot get window type for autocmd and preview window.
Solution:   Add types to win_gettype(). (Yegappan Lakshmanan, closes #6277)
2020-06-16 22:42:04 +02:00
Bram Moolenaar
a1bc6f1293 patch 8.2.0990: Using duplicate error number
Problem:    Using duplicate error number.
Solution:   Use an unused error number.  Add a test for it.
2020-06-16 22:27:39 +02:00
Bram Moolenaar
a6e8bf2d89 patch 8.2.0989: crash after resizing a terminal window
Problem:    Crash after resizing a terminal window. (August Masquelier)
Solution:   Add check for valid row in libvterm. (closes #6273)
2020-06-16 20:58:07 +02:00
Bram Moolenaar
84cf6bd81b patch 8.2.0988: getting directory contents is always case sorted
Problem:    Getting directory contents is always case sorted.
Solution:   Add sort options and v:collate. (Christian Brabandt, closes #6229)
2020-06-16 20:03:43 +02:00
Bram Moolenaar
9af78769ee patch 8.2.0987: Vim9: cannot assign to [var; var]
Problem:    Vim9: cannot assign to [var; var].
Solution:   Assign rest of items to a list.
2020-06-16 11:34:42 +02:00
Bram Moolenaar
c70222d12a patch 8.2.0986: MS-Windows: functions test fails
Problem:    MS-Windows: functions test fails.
Solution:   Only simplify ///path on Unix.
2020-06-15 23:18:12 +02:00
Bram Moolenaar
fdcbe3c3fe patch 8.2.0985: simplify() does not remove slashes from "///path"
Problem:    Simplify() does not remove slashes from "///path".
Solution:   Reduce > 2 slashes to one. (closes #6263)
2020-06-15 21:41:56 +02:00
Bram Moolenaar
ab176ce982 patch 8.2.0984: not using previous window when closing a shell popup window
Problem:    Not using previous window when closing a shell popup window.
Solution:   Use "prevwin" if it was set. (closes #6267)
2020-06-15 21:19:08 +02:00
Bram Moolenaar
ad72350360 patch 8.2.0983: SConstruct file type not recognized
Problem:    SConstruct file type not recognized.
Solution:   Use python for SConstruct files. (Roland Hieber)
2020-06-15 20:24:58 +02:00
Bram Moolenaar
b340baed9f patch 8.2.0982: insufficient testing for reading/writing files
Problem:    Insufficient testing for reading/writing files.
Solution:   Add more tests. (Yegappan Lakshmanan, closes #6257)
            Add "ui_delay" to test_override() and use it for the CTRL-O test.
2020-06-15 19:51:56 +02:00
Bram Moolenaar
47a519a933 patch 8.2.0981: Vim9: cannot compile "[var, var] = list"
Problem:    Vim9: cannot compile "[var, var] = list".
Solution:   Implement list assignment.
2020-06-14 23:05:10 +02:00
Bram Moolenaar
a65d8b5bb9 patch 8.2.0980: raku file extension not recognized
Problem:    Raku file extension not recognized. (Steven Penny)
Solution:   Recognize .raku and .rakumod. (closes #6255)
2020-06-14 20:04:32 +02:00
Bram Moolenaar
65e0d77a66 Update runtime files 2020-06-14 17:29:55 +02:00
Bram Moolenaar
8e20f75e58 patch 8.2.0979: a couple of screendump tests fail
Problem:    A couple of screendump tests fail.
Solution:   Do not redraw when clearing t_8u.
2020-06-14 16:43:47 +02:00
Bram Moolenaar
0c8059e0b6 patch 8.2.0978: leaking memory in termcodes test
Problem:    Leaking memory in termcodes test.
Solution:   Set t_8u with set_option_value().
2020-06-14 15:35:58 +02:00
Bram Moolenaar
8dff4cbf6d patch 8.2.0977: t_8u is made empty for the wrong terminals
Problem:    t_8u is made empty for the wrong terminals. (Dominique Pelle)
Solution:   Invert the check for TPR_YES. (closes #6254)
2020-06-14 14:34:16 +02:00
Bram Moolenaar
df7df59d85 patch 8.2.0976: some 'cpoptions' not tested
Problem:    Some 'cpoptions' not tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes #6253)
2020-06-14 13:50:55 +02:00
Bram Moolenaar
984dddbef4 patch 8.2.0975: Vim9: script variable does not accept optional s: prefix
Problem:    Vim9: script variable does not accept optional s: prefix.
Solution:   Adjust the accepted syntax.
2020-06-14 12:50:24 +02:00
Bram Moolenaar
f3decc5830 patch 8.2.0974: Vim9: memory leak when script var has wrong type
Problem:    Vim9: memory leak when script var has wrong type.
Solution:   Free the variable name.
2020-06-13 19:56:38 +02:00
Bram Moolenaar
34db91f7a4 patch 8.2.0973: Vim9: type is not checked when assigning to a script variable
Problem:    Vim9: type is not checked when assigning to a script variable.
Solution:   Check the type.
2020-06-13 19:00:10 +02:00
Bram Moolenaar
c82a5b5da5 patch 8.2.0972: Vim9 script variable declarations need a type
Problem:    Vim9 script variable declarations need a type.
Solution:   Make "let var: type" declare a script-local variable.
2020-06-13 18:09:19 +02:00
Bram Moolenaar
142499de33 patch 8.2.0971: build with tiny features fails
Problem:    Build with tiny features fails.
Solution:   Add #ifdef.
2020-06-13 16:39:31 +02:00
Bram Moolenaar
0c0eddd3dd patch 8.2.0970: terminal properties are not available in Vim script
Problem:    Terminal properties are not available in Vim script.
Solution:   Add the terminalprops() function.
2020-06-13 15:47:25 +02:00
Bram Moolenaar
4a021dfbee patch 8.2.0969: assert_equal() output for dicts is hard to figure out
Problem:    Assert_equal() output for dicts is hard to figure out.
Solution:   Only show the different items.
2020-06-13 15:13:38 +02:00
Bram Moolenaar
c9630d2658 patch 8.2.0968: no proper testing of the 'cpoptions' flags
Problem:    No proper testing of the 'cpoptions' flags.
Solution:   Add tests. (Yegappan Lakshmanan, closes #6251)
2020-06-13 13:20:48 +02:00
Bram Moolenaar
71ccd03ee8 patch 8.2.0967: unnecessary type casts for vim_strnsave()
Problem:    Unnecessary type casts for vim_strnsave().
Solution:   Remove the type casts.
2020-06-12 22:59:11 +02:00
Bram Moolenaar
722e505d1a patch 8.2.0966: 'shortmess' flag "n" not used in two places
Problem:    'shortmess' flag "n" not used in two places.
Solution:   Make use of the "n" flag consistent. (Nick Jensen, closes #6245,
            closes #6244)
2020-06-12 22:31:00 +02:00
Bram Moolenaar
5055c56cfb patch 8.2.0965: has_funcundefined() is not used
Problem:    Has_funcundefined() is not used.
Solution:   Delete the function. (Dominique Pellé, closes #6242)
2020-06-12 22:15:31 +02:00
Bram Moolenaar
37d1673ce0 patch 8.2.0964: TextYankPost does not provide info about Visual selection
Problem:    TextYankPost does not provide info about Visual selection.
Solution:   Add the 'visual' key in v:event. (closes #6249)
2020-06-12 22:09:01 +02:00
Bram Moolenaar
6c6be9e88d patch 8.2.0963: number increment/decrement does not work with 'virtualedit'
Problem:    Number increment/decrement does not work with 'virtualedit'.
Solution:   Handle coladd changing. (Christian Brabandt, closes #6240,
            closes #923)
2020-06-12 20:19:44 +02:00
Bram Moolenaar
f6e020b122 patch 8.2.0962: terminal test sometimes hangs on Travis
Problem:    Terminal test sometimes hangs on Travis.
Solution:   Do show output for this test temporarily.
2020-06-12 20:11:55 +02:00
Bram Moolenaar
ec68028604 patch 8.2.0961: MS-Windows: no completion for locales
Problem:    MS-Windows: no completion for locales.
Solution:   Use the directories in $VIMRUNTIME/lang to complete locales.
            (Christian Brabandt, closes 36248)
2020-06-12 19:35:32 +02:00
Bram Moolenaar
9721fb4ea3 patch 8.2.0960: cannot use :import in legacy Vim script
Problem:    Cannot use :import in legacy Vim script.
Solution:   Support :import in any Vim script.
2020-06-11 23:10:46 +02:00
Bram Moolenaar
00e260bb6c patch 8.2.0959: using 'quickfixtextfunc' is a bit slow
Problem:    Using 'quickfixtextfunc' is a bit slow.
Solution:   Process a list of entries. (Yegappan Lakshmanan, closes #6234)
2020-06-11 19:35:52 +02:00
Bram Moolenaar
1de5f7c81d patch 8.2.0958: not sufficient testing for buffer writing
Problem:    Not sufficient testing for buffer writing.
Solution:   Add a few tests. (Yegappan Lakshmanan, closes #6238)
2020-06-11 19:22:43 +02:00
Bram Moolenaar
2d4070d3b0 patch 8.2.0957: compiler warning for uninitialized variable
Problem:    Compiler warning for uninitialized variable. (Tony Mechelynck)
Solution:   Initialize one variable.
2020-06-11 12:30:13 +02:00
Bram Moolenaar
e0ebeda4d8 patch 8.2.0956: spell test fails
Problem:    Spell test fails.
Solution:   Add missing change the spell checking.
2020-06-10 22:17:58 +02:00
Bram Moolenaar
215f49c4d7 patch 8.2.0955: build fails
Problem:    Build fails.
Solution:   Add missing struct change.
2020-06-10 22:12:04 +02:00
Bram Moolenaar
f1f0ff9557 patch 8.2.0954: not all desktop files are recognized
Problem:    Not all desktop files are recognized.
Solution:   Add the *.directory pattern. (Eisuke Kawashima, closes #3317)
2020-06-10 22:07:52 +02:00
Bram Moolenaar
362b44bd4a patch 8.2.0953: spell checking doesn't work for CamelCased words
Problem:    Spell checking doesn't work for CamelCased words.
Solution:   Add the "camel" value in the new option 'spelloptions'.
            (closes #1235)
2020-06-10 21:47:00 +02:00
Bram Moolenaar
be5ee8686a patch 8.2.0952: no simple way to interrupt Vim
Problem:    No simple way to interrupt Vim.
Solution:   Add the SigUSR1 autocommand, triggered by SIGUSR1. (Jacob Hayes,
            closes #1718)
2020-06-10 20:56:58 +02:00
Bram Moolenaar
6ba24d8763 patch 8.2.0951: search stat test has leftover from debugging
Problem:    Search stat test has leftover from debugging.
Solution:   Remove line that writes a file. (Christian Brabandt, closes #6224)
2020-06-10 20:21:09 +02:00
Bram Moolenaar
13b8205b44 patch 8.2.0950: tagjump test fails
Problem:    Tagjump test fails.
Solution:   Adjust expected text of the prompt.
2020-06-10 17:13:48 +02:00
Bram Moolenaar
ea1233fccf patch 8.2.0949: strptime() does not use DST
Problem:    Strptime() does not use DST.
Solution:   Set the tm_isdst field to -1. (Tomáš Janoušek, closes #6230)
2020-06-10 16:54:13 +02:00
Bram Moolenaar
d281b7c227 patch 8.2.0948: spell test fails
Problem:    Spell test fails.
Solution:   Adjust expected text of the prompt.
2020-06-10 16:39:32 +02:00
Bram Moolenaar
ab54032f29 patch 8.2.0947: readdirex() doesn't handle broken link properly
Problem:    Readdirex() doesn't handle broken link properly.
Solution:   Small fixes to readdirex(). (Christian Brabandt, closes #6226,
            closes #6213)
2020-06-10 15:55:36 +02:00
Bram Moolenaar
eebd555733 patch 8.2.0946: cannot use "q" to cancel a number prompt
Problem:    Cannot use "q" to cancel a number prompt.
Solution:   Recognize "q" instead of ignoring it.
2020-06-10 15:45:57 +02:00
Bram Moolenaar
152e79e94b patch 8.2.0945: cannot use "z=" when 'spell' is off
Problem:    Cannot use "z=" when 'spell' is off.
Solution:   Make "z=" work even when 'spell' is off. (Christian Brabandt,
            Gary Johnson, closes #6227)
2020-06-10 15:32:08 +02:00
Bram Moolenaar
253ea9fa42 patch 8.2.0944: xxd test leaves file behind
Problem:    Xxd test leaves file behind.
Solution:   Delete the file "XXDfile". (Christian Brabandt, closes #6228)
2020-06-10 14:21:20 +02:00
Bram Moolenaar
32ee627750 patch 8.2.0943: displaying ^M or ^J depends on current buffer
Problem:    Displaying ^M or ^J depends on current buffer.
Solution:   Pass the displayed buffer to transchar(). (closes #6225)
2020-06-10 14:16:49 +02:00
Bram Moolenaar
0e390f40e9 patch 8.2.0942: expanding to local dir after homedir keeps "~/"
Problem:    Expanding to local dir after homedir keeps "~/".
Solution:   Adjust modify_fname(). (Christian Brabandt, closes #6205,
            closes #5979)
2020-06-10 13:12:28 +02:00
Bram Moolenaar
517f00f788 patch 8.2.0941: detecting terminal properties is unstructured
Problem:    Detecting terminal properties is unstructured.
Solution:   Add a table with terminal properties.  Set properties when a
            terminal is detected.
2020-06-10 12:15:51 +02:00
Bram Moolenaar
0ca8b5ba7b patch 8.2.0940: build failure with tiny features
Problem:    Build failure with tiny features.
Solution:   Add #ifdef.  Add UNUSED.  A bit more cleaning up.
2020-06-09 21:35:36 +02:00
Bram Moolenaar
218cb0fb62 patch 8.2.0939: checking for term escape sequences is long and confusing
Problem:    checking for term escape sequences is long and confusing
Solution:   Refactor code into separate functions.
2020-06-09 21:26:36 +02:00
Bram Moolenaar
59de417b90 patch 8.2.0938: NFA regexp uses tolower ()to compare ignore-case
Problem:    NFA regexp uses tolower() to compare ignore-case. (Thayne McCombs)
Solution:   Use utf_fold() when possible. (ref. neovim #12456)
2020-06-09 19:34:54 +02:00
Bram Moolenaar
dcf59c37d0 patch 8.2.0937: asan failure in the flatten() test
Problem:    Asan failure in the flatten() test.
Solution:   Free the flattened list.
2020-06-09 17:30:04 +02:00
Bram Moolenaar
a45551a535 patch 8.2.0936: some terminals misinterpret the code for getting cursor style
Problem:    Some terminals misinterpret the code for getting cursor style.
Solution:   Send a sequence to the terminal and check the result. (IWAMOTO
            Kouichi, closes #2126)  Merged with current code.
2020-06-09 15:57:37 +02:00
Bram Moolenaar
077a1e670a patch 8.2.0935: flattening a list with existing code is slow
Problem:    Flattening a list with existing code is slow.
Solution:   Add flatten(). (Mopp, closes #3676)
2020-06-08 20:50:43 +02:00
Bram Moolenaar
ec98e93a82 patch 8.2.0934: lhelpgrep twice in help window doesn't jump to the help topic
Problem:    Running lhelpgrep twice in a help window doesn't jump to the help
            topic.
Solution:   Check whether any window with the location list is present.
            (Yegappan Lakshmanan, closes #6215)
2020-06-08 19:35:59 +02:00
Bram Moolenaar
7ba5a7eff3 patch 8.2.0933: 'quickfixtextfunc' does not get window ID of location list
Problem:    'quickfixtextfunc' does not get window ID of location list.
Solution:   Add "winid" to the dict argument. (Yegappan Lakshmanan,
            closes #6222)
2020-06-08 19:20:27 +02:00
Bram Moolenaar
f154f3ab2c patch 8.2.0932: missspelling spelllang
Problem:    Missspelling spelllang.
Solution:   Add an "l". (Dominique Pelle)
2020-06-08 18:54:49 +02:00
Bram Moolenaar
6938e27abd patch 8.2.0931: some remarks about BeOS remain
Problem:    Some remarks about BeOS remain.
Solution:   Remove BeOS remarks from the help and other files. (Emir Sari,
            closes #6221)
2020-06-07 22:23:19 +02:00
Bram Moolenaar
b5e18f29fa patch 8.2.0930: script filetype detection trips over env -S argument
Problem:    Script filetype detection trips over env -S argument.
Solution:   Remove "-S" and "--ignore-environment". (closes #5013)
            Add tests.
2020-06-07 21:58:54 +02:00
Bram Moolenaar
cc613031b9 patch 8.2.0929: v:register is not cleared after an operator was executed
Problem:    v:register is not cleared after an operator was executed.
Solution:   Clear v:register after finishing an operator (Andy Massimino,
            closes #5305)
2020-06-07 21:31:18 +02:00
Bram Moolenaar
acc2240640 Update runtime files 2020-06-07 21:07:18 +02:00
Bram Moolenaar
df44a27b53 patch 8.2.0928: many type casts are used for vim_strnsave()
Problem:    Many type casts are used for vim_strnsave().
Solution:   Make the length argument size_t instead of int. (Ken Takata,
            closes #5633)  Remove some type casts.
2020-06-07 20:49:05 +02:00
Bram Moolenaar
da84ac2a6f patch 8.2.0927: some sshconfig and ssdhconfig files are not recognized
Problem:    Some sshconfig and ssdhconfig files are not recognized.
Solution:   Add filetype patterns.
2020-06-07 20:07:43 +02:00
Bram Moolenaar
951a2fb1b8 patch 8.2.0926: cmdline test fails on Appveyor
Problem:    Cmdline test fails on Appveyor.
Solution:   Add CR to the commands. (Naruhiko Nishino, closes #6220)
2020-06-07 19:38:10 +02:00
Bram Moolenaar
1f1fd44ef7 patch 8.2.0925: getcompletion() does not return command line arguments
Problem:    Getcompletion() does not return command line arguments.
Solution:   Add the "cmdline" option. (Shougo, closes #1140)
2020-06-07 18:45:14 +02:00
Bram Moolenaar
bb861e293e patch 8.2.0924: cannot save and restore a register properly
Problem:    Cannot save and restore a register properly.
Solution:   Add getreginfo() and make setreg() accept a dictionary. (Andy
            Massimino, closes #3370)
2020-06-07 18:16:36 +02:00
Bram Moolenaar
c82dd86084 patch 8.2.0923: cmdline test is slow
Problem:    Cmdline test is slow.
Solution:   Use WaitForAssert().
2020-06-07 17:30:33 +02:00
Bram Moolenaar
48af321a33 patch 8.2.0922: search test fails
Problem:    Search test fails.
Solution:   Remove failure tests for calls that no longer fail.
2020-06-07 17:20:02 +02:00
Bram Moolenaar
4fdb8bd054 patch 8.2.0921: CTRL-W T in cmdline window causes trouble
Problem:    CTRL-W T in cmdline window causes trouble.
Solution:   Disallow CTRL-W T in the cmdline window.  Add more tests.
            (Naruhiko Nishino, closes #6219)
2020-06-07 17:03:21 +02:00
Bram Moolenaar
5b157fe2ed patch 8.2.0920: writing viminfo fails with a circular reference
Problem:    Writing viminfo fails with a circular reference.
Solution:   Use copyID to detect the cycle. (closes #6217)
2020-06-07 16:08:08 +02:00
Bram Moolenaar
673fc3e23f patch 8.2.0919: merging modifier for modifyOtherKeys is done twice
Problem:    Merging modifier for modifyOtherKeys is done twice.
Solution:   Remove the merging done in vgetc().
2020-06-07 15:46:11 +02:00
Bram Moolenaar
a9c0104947 patch 8.2.0918: duplicate code for evaluating expression argument
Problem:    Duplicate code for evaluating expression argument.
Solution:   Merge the code and make the use more flexible.
2020-06-07 14:50:50 +02:00
Bram Moolenaar
e928366de5 patch 8.2.0917: quickfix entries do not suport a "note" type
Problem:    Quickfix entries do not suport a "note" type.
Solution:   Add support for "note". (partly by Yegappan Lakshmanan,
            closes #5527, closes #6216)
2020-06-07 14:10:47 +02:00
Bram Moolenaar
975a880a13 patch 8.2.0916: mapping with partly modifyOtherKeys code does not work
Problem:    Mapping with partly modifyOtherKeys code does not work.
Solution:   If there is no mapping with a separate modifier include the
            modifier in the key and then try mapping again. (closes #6200)
2020-06-06 22:36:24 +02:00
Bram Moolenaar
adc17a5f9d patch 8.2.0915: search() cannot skip over matches like searchpair() can
Problem:    Search() cannot skip over matches like searchpair() can.
Solution:   Add an optional "skip" argument. (Christian Brabandt, closes #861)
2020-06-06 18:37:51 +02:00
Bram Moolenaar
d8df304c59 patch 8.2.0914: MS-Windows: cannot specify a "modified by" text
Problem:    MS-Windows: cannot specify a "modified by" text.
Solution:   Add MODIFIED_BY in the MSVC build file.  (Chen Lei, closes #1275)
2020-06-06 16:18:46 +02:00
Bram Moolenaar
439c036ed0 patch 8.2.0913: code for resetting v:register is duplicated
Problem:    Code for resetting v:register is duplicated.
Solution:   Add reset_reg_var().
2020-06-06 15:58:03 +02:00
Bram Moolenaar
11f1ffd182 patch 8.2.0912: a few test cases for CJK formatting are disabled
Problem:    A few test cases for CJK formatting are disabled.
Solution:   Fix the tests and enable them. (closes #6212)
2020-06-06 15:23:26 +02:00
Bram Moolenaar
9b7cce28d5 patch 8.2.0911: crash when opening a buffer for the cmdline window fails
Problem:    Crash when opening a buffer for the cmdline window fails. (Chris
            Barber)
Solution:   Check do_ecmd() succeeds.  Reset got_int if "q" was used at the
            more prompt. (closes #6211)
2020-06-06 15:14:08 +02:00
Bram Moolenaar
87fda407f8 Also fix the patch number. 2020-06-06 13:25:31 +02:00
Bram Moolenaar
fe712ced6e Fix duplicated code that only appears in git. 2020-06-06 13:17:59 +02:00
Bram Moolenaar
8f1dde5021 patch 8.2.0910: Vim is not reproducibly buildable
Problem:    Vim is not reproducibly buildable.
Solution:   Use the $SOURCE_DATE_EPOCH environment variable in configure.
            (James McCoy, closes #513)  Give a warning about using it.
2020-06-05 23:16:29 +02:00
Bram Moolenaar
002bc79991 patch 8.2.0909: cannot go back to the previous local directory
Problem:    Cannot go back to the previous local directory.
Solution:   Add "tcd -" and "lcd -". (Yegappan Lakshmanan, closes #4362)
2020-06-05 22:33:42 +02:00
Bram Moolenaar
3fffa97159 patch 8.2.0908: crash when changing the function table while listing it
Problem:    Crash when changing the function table while listing it.
Solution:   Bail out when the function table changes. (closes #6209)
2020-06-05 21:06:10 +02:00
Bram Moolenaar
07188fc5ef patch 8.2.0907: when using :global clipboard isn't set correctly
Problem:    When using :global clipboard isn't set correctly.
Solution:   Set "clip_unnamed_saved" instead of "clip_unnamed". (Christian
            Brabandt, closes #6203, closes #6198)
2020-06-05 20:03:16 +02:00
Bram Moolenaar
ea563cc22b patch 8.2.0906: when setting 'termguicolors' SpellBad is no longer red
Problem:    When setting 'termguicolors' SpellBad is no longer red.
Solution:   Only use the RGB guisp color for cterm when using the "underline"
            or "undercurl" attributes to avoid the background color to be
            cleared. Also make t_8u empty when the termresponse indicates a
            real xterm. (closes #6207)
2020-06-05 19:36:57 +02:00
Bram Moolenaar
e0c3c3d6cb patch 8.2.0905: test coverage could be better
Problem:    Test coverage could be better.
Solution:   Add a couple of tests. (Dominique Pelle, closes #6202)
2020-06-04 22:46:04 +02:00
Bram Moolenaar
46cd43bda1 patch 8.2.0904: assuming modifyOtherKeys for rhs of mapping
Problem:    Assuming modifyOtherKeys for rhs of mapping.
Solution:   Ignore seenModifyOtherKeys for mapped characters. (closes #6200)
2020-06-04 22:22:11 +02:00
Bram Moolenaar
852ea366d6 patch 8.2.0903: comparing WINVER does not work correctly
Problem:    comparing WINVER does not work correctly.
Solution:   Use arithmethic expansion. (Ozaki Kiichi, closes #6197)
2020-06-04 21:32:49 +02:00
Bram Moolenaar
442a85369f patch 8.2.0902: using searchcount() in 'statusline' causes an error
Problem:    Using searchcount() in 'statusline' causes an error.
Solution:   Avoid saving/restoring the search patten recursively.
            (closes #6194)
2020-06-04 20:56:09 +02:00
Bram Moolenaar
e52702f003 patch 8.2.0901: formatting CJK text isn't optimal
Problem:    Formatting CJK text isn't optimal.
Solution:   Properly break CJK lines. (closes #3875)
2020-06-04 18:22:13 +02:00
Bram Moolenaar
9155825b24 patch 8.2.0900: function list test fails on MS-Windows
Problem:    Function list test fails on MS-Windows.
Solution:   Make sure the fileformat is "unix"
2020-06-04 17:19:05 +02:00
Bram Moolenaar
30cc44a97f patch 8.2.0899: assert_equalfile() does not give a hint about the difference
Problem:    Assert_equalfile() does not give a hint about the difference.
Solution:   Display the last seen text.
2020-06-04 16:52:40 +02:00
Bram Moolenaar
6b0e528368 patch 8.2.0898: missing help for a function goes unnoticed
Problem:    Missing help for a function goes unnoticed.
Solution:   Add a test. (Gary Johnson)
2020-06-04 15:52:25 +02:00
Bram Moolenaar
ebacddbc16 patch 8.2.0897: list of functions in patched version is outdated
Problem:    List of functions in patched version is outdated.
Solution:   Update the function lists only.
2020-06-04 15:22:21 +02:00
Bram Moolenaar
14681627f3 patch 8.2.0896: crash when calling searchcount() with a string
Problem:    Crash when calling searchcount() with a string.
Solution:   Check the argument is a dict. (closes #6192)
2020-06-03 22:57:39 +02:00
Bram Moolenaar
408c23b079 patch 8.2.0895: :mkspell output does not mention the tree type
Problem:    :mkspell output does not mention the tree type.
Solution:   Back out increasing the limits, it has no effect.  Mention the
            tree being compressed.  Only give a message once per second.
2020-06-03 22:15:45 +02:00
Bram Moolenaar
59f88fbf24 patch 8.2.0894: :mkspell can take very long if the word count is high
Problem:    :mkspell can take very long if the word count is high.
Solution:   Use long to avoid negative numbers.  Increase the limits by 20% if
            the compression did not have effect.
2020-06-03 20:51:11 +02:00
Bram Moolenaar
fb517bac23 patch 8.2.0893: assert_equalfile() does not take a third argument
Problem:    Assert_equalfile() does not take a third argument.
Solution:   Implement the third argument. (Gary Johnson)
2020-06-03 19:55:35 +02:00
Bram Moolenaar
c5acc0f7fe patch 8.2.0892: ubsan warns for undefined behavior
Problem:    Ubsan warns for undefined behavior.
Solution:   Use unsigned instead of signed variable. (Dominique Pelle,
            closes #6193)
2020-06-03 18:55:38 +02:00
Bram Moolenaar
cc836556d9 patch 8.2.0891: clang warns for invalid conversion
Problem:    Clang warns for invalid conversion.
Solution:   Use zero instead of INVALCOLOR.
2020-06-03 10:04:49 +02:00
Bram Moolenaar
1e5f8f6d65 patch 8.2.0890: no color in terminal window when 'termguicolor' is set
Problem:    No color in terminal window when 'termguicolor' is set.
Solution:   Clear the underline color. (closes #6186)
2020-06-02 23:18:24 +02:00
Bram Moolenaar
791fb1bcda patch 8.2.0889: using old style comments
Problem:    Using old style comments.
Solution:   Use // comments. (Yegappan Lakshmanan, closes #6190)
2020-06-02 22:24:36 +02:00
Bram Moolenaar
441d60efd8 patch 8.2.0888: readdirex() returns size -2 for a directory
Problem:    Readdirex() returns size -2 for a directory.
Solution:   Add missing "else". (Ken Takata, closes #6185)
2020-06-02 22:19:50 +02:00
Bram Moolenaar
57f75a5a36 patch 8.2.0887: searchcount().exact_match is 1 right after a match
Problem:    Searchcount().exact_match is 1 right after a match.
Solution:   Use LT_POS() instead of LTOREQ_POS(). (closes #6189)
2020-06-02 22:06:21 +02:00
Bram Moolenaar
c17e66c5c0 patch 8.2.0886: cannot use octal numbers in scriptversion 4
Problem:    Cannot use octal numbers in scriptversion 4.
Solution:   Add the "0o" notation. (Ken Takata, closes #5304)
2020-06-02 21:38:22 +02:00
Bram Moolenaar
3ac498c8a1 patch 8.2.0885: "make shadow" does not link new lua test dir
Problem:    "make shadow" does not link new lua test dir.
Solution:   Also link testdir/testluaplugin. (Elimar Riesebieter)
2020-06-02 20:25:36 +02:00
Bram Moolenaar
ea6561af92 patch 8.2.0884: searchcount() test fails on slower systems
Problem:    Searchcount() test fails on slower systems.
Solution:   Set a longer timeout.
2020-06-01 21:32:45 +02:00
Bram Moolenaar
5fbf3bc3f9 patch 8.2.0883: memory leak in test 49
Problem:    Memory leak in test 49.
Solution:   Free "sfile" from the exception.
2020-06-01 21:13:11 +02:00
Bram Moolenaar
48b1c21809 patch 8.2.0882: leaking memory when using reduce()
Problem:    Leaking memory when using reduce().
Solution:   Free the intermediate value.
2020-06-01 20:11:02 +02:00
Bram Moolenaar
d6a77f95ee patch 8.2.0881: compiler warning for argument type
Problem:    Compiler warning for argument type.
Solution:   Add type cast. (Mike Williams)
2020-06-01 19:14:12 +02:00
Bram Moolenaar
109aece79d patch 8.2.0880: leaking memory when using searchcount()
Problem:    Leaking memory when using searchcount().
Solution:   Free the last used search pattern.
2020-06-01 19:08:54 +02:00
Bram Moolenaar
f9ca08e95f patch 8.2.0879: compiler warning for unused function argument
Problem:    Compiler warning for unused function argument.
Solution:   Add UNUSED.
2020-06-01 18:56:03 +02:00
Bram Moolenaar
85629985b7 patch 8.2.0878: no reduce() function
Problem:    No reduce() function.
Solution:   Add a reduce() function. (closes #5481)
2020-06-01 18:39:20 +02:00
Bram Moolenaar
e8f5ec0d30 patch 8.2.0877: cannot get the search statistics
Problem:    Cannot get the search statistics.
Solution:   Add the searchcount() function. (Fujiwara Takuya, closes #4446)
2020-06-01 17:28:35 +02:00
Bram Moolenaar
950587242c patch 8.2.0876: :pwd does not give a hint about the scope of the directory
Problem:    :pwd does not give a hint about the scope of the directory
Solution:   Make ":verbose pwd" show the scope. (Takuya Fujiwara, closes #5469)
2020-06-01 16:26:19 +02:00
Bram Moolenaar
6c9ba04280 patch 8.2.0875: getting attributes for directory entries is slow
Problem:    Getting attributes for directory entries is slow.
Solution:   Add readdirex(). (Ken Takata, closes #5619)
2020-06-01 16:09:41 +02:00
Bram Moolenaar
d14fd5285e patch 8.2.0874: signals test is a bit flaky
Problem:    Signals test is a bit flaky.
Solution:   Flush the XautoOut file.  Delete files that may be left behind
            from a failure. (Dominique Pelle, closes #6179)
2020-06-01 15:05:19 +02:00
Bram Moolenaar
2891459b81 patch 8.2.0873: a .jl file can be sawfish (lisp) or Julia
Problem:    A .jl file can be sawfish (lisp) or Julia.
Solution:   Do not recognize *.jl as lisp, since it might be Julia.
            (closes #6178)
2020-06-01 14:43:59 +02:00
Bram Moolenaar
f15c8b6eb3 patch 8.2.0872: XIM code is mixed with multi-byte code
Problem:    XIM code is mixed with multi-byte code.
Solution:   Move the XIM code to a separate file. (Yegappan Lakshmanan,
            closes #6177)
2020-06-01 14:34:43 +02:00
Bram Moolenaar
f17e7ea67a patch 8.2.0871: cannot use getmarklist() as a method
Problem:    Cannot use getmarklist() as a method.
Solution:   Make getmarklist() work as a method.  Add one to the column
            number to match getpos(). (Yegappan Lakshmanan, closes #6176)
2020-06-01 14:14:44 +02:00
Bram Moolenaar
ad772a63ec patch 8.2.0870: MS-Windows: Control keys don't work in the GUI
Problem:    MS-Windows: Control keys don't work in the GUI.
Solution:   Don't set seenModifyOtherKeys for now. (Yasuhiro Matsumoto,
            closes #6175)
2020-06-01 14:07:49 +02:00
Bram Moolenaar
858ba06d5f patch 8.2.0869: it is not possible to customize the quickfix window contents
Problem:    It is not possible to customize the quickfix window contents.
Solution:   Add 'quickfixtextfunc'. (Yegappan Lakshmanan, closes #5465)
2020-05-31 23:11:59 +02:00
Bram Moolenaar
2245ae18e3 patch 8.2.0868: trim() always trims both ends
Problem:    trim() always trims both ends.
Solution:   Add an argument to only trim the beginning or end. (Yegappan
            Lakshmanan, closes #6126)
2020-05-31 22:20:36 +02:00
Bram Moolenaar
fccd93f091 patch 8.2.0867: using \{xxx} for encoding a modifier is not nice
Problem:    Using \{xxx} for encoding a modifier is not nice.
Solution:   Use \<*xxx> instead, since it's the same as \<xxx> but producing a
            different code.
2020-05-31 22:06:51 +02:00
Bram Moolenaar
494e9069cb patch 8.2.0866: not enough tests for buffer writing
Problem:    Not enough tests for buffer writing.
Solution:   Add more tests. Use CheckRunVimInTerminal in more places.
            (Yegappan Lakshmanan, closes #6167)
2020-05-31 21:28:02 +02:00
Bram Moolenaar
e35a52aee7 patch 8.2.0865: syntax foldlevel is taken from the start of the line
Problem:    Syntax foldlevel is taken from the start of the line.
Solution:   Add ":syn foldlevel" to be able to use the minimal foldlevel in
            the line. (Brad King, closes #6087)
2020-05-31 19:48:53 +02:00
Bram Moolenaar
d881b516da patch 8.2.0864: pragmas are indented all the way to the left
Problem:    Pragmas are indented all the way to the left.
Solution:   Add an option to indent progmas like normal code. (Max Rumpf,
            closes #5468)
2020-05-31 17:49:30 +02:00
Bram Moolenaar
e023e88bed patch 8.2.0863: cannot set a separate color for underline/undercurl
Problem:    Cannot set a separate color for underline/undercurl.
Solution:   Add the t_AU and t_8u termcap codes. (Timur Celik, closes #6011)
2020-05-31 16:42:30 +02:00
Bram Moolenaar
b10090928c patch 8.2.0862: ":term ++curwin" makes the current buffer hidden
Problem:    ":term ++curwin" makes the current buffer hidden. (Harm te
            Hennepe)
Solution:   Do not hide the current buffer. (closes #6170)
2020-05-31 16:04:42 +02:00
Bram Moolenaar
cfb4b47de0 patch 8.2.0861: cannot easily get all the current marks
Problem:    Cannot easily get all the current marks.
Solution:   Add getmarklist(). (Yegappan Lakshmanan, closes #6032)
2020-05-31 15:41:57 +02:00
Bram Moolenaar
aaad995f83 patch 8.2.0860: cannot use CTRL-A and CTRL-X on unsigned numbers
Problem:    Cannot use CTRL-A and CTRL-X on unsigned numbers.
Solution:   Add "unsigned" to 'nrformats'. (Naruhiko Nishino, closes #6144)
2020-05-31 15:08:59 +02:00
Bram Moolenaar
f09715bc5c patch 8.2.0859: no Turkish translation of the manual
Problem:    No Turkish translation of the manual.
Solution:   Add Turkish translations. (Emir Sarı, closes #5641)
2020-05-31 14:25:22 +02:00
Bram Moolenaar
788fbb4707 patch 8.2.0858: not easy to require Lua modules
Problem:    Not easy to require Lua modules.
Solution:   Improve use of Lua path. (Prabir Shrestha, closes #6098)
2020-05-31 14:08:12 +02:00
Bram Moolenaar
5cd1cb9ff9 patch 8.2.0857: GTK cell height can be a pixel too much
Problem:    GTK cell height can be a pixel too much.
Solution:   Subtract 3 instead of 1 when rounding. (closes #6168)
2020-05-31 13:53:04 +02:00
Bram Moolenaar
928eec649b patch 8.2.0856: CTRL-S stops output
Problem:    CTRL-S stops output.
Solution:   Invert the IXON flag. (closes #6166)
2020-05-31 13:09:47 +02:00
Bram Moolenaar
ebe9d34aa0 patch 8.2.0855: GUI tests fail because the test doesn't use a modifier
Problem:    GUI tests fail because the test doesn't use a modifier.
Solution:   Add "\{xxx}" to be able to encode a modifier.
2020-05-30 21:52:54 +02:00
Bram Moolenaar
363d6148df patch 8.2.0854: xxd cannot show offset as a decimal number
Problem:    Xxd cannot show offset as a decimal number.
Solution:   Add the "-d" flag. (Aapo Rantalainen, closes #5616
2020-05-30 20:50:25 +02:00
Bram Moolenaar
ca70c07b72 patch 8.2.0853: ml_delete() often called with FALSE argument
Problem:    ml_delete() often called with FALSE argument.
Solution:   Use ml_delete_flags(x, ML_DEL_MESSAGE) when argument is TRUE.
2020-05-30 20:30:46 +02:00
Bram Moolenaar
d6cd5ffade patch 8.2.0852: cannot map CTRL-S on some systems
Problem:    Cannot map CTRL-S on some systems.
Solution:   Do not use CTRL-S for flow control.
2020-05-30 20:05:02 +02:00
Bram Moolenaar
f4ae6b245a patch 8.2.0851: can't distinguish <M-a> from accented "a" in the GUI
Problem:    Can't distinguish <M-a> from accented "a" in the GUI.
Solution:   Use another way to make mapping <C-bslash> work. (closes #6163)
2020-05-30 19:52:46 +02:00
Bram Moolenaar
95da136142 patch 8.2.0850: MS-Windows: exepath() works different from cmd.exe
Problem:    MS-Windows: exepath() works different from cmd.exe.
Solution:   Make exepath() work better on MS-Windows. (closes #6115)
2020-05-30 18:37:55 +02:00
Bram Moolenaar
041c7107f2 patch 8.2.0849: BeOS code is not maintained and probably unused
Problem:    BeOS code is not maintained and probably unused.
Solution:   Remove the BeOS code. (Emir Sari, closes #5817)
2020-05-30 18:14:57 +02:00
Bram Moolenaar
06b7b58455 patch 8.2.0848: MS-Windows: the Windows terminal code has some flaws
Problem:    MS-Windows: the Windows terminal code has some flaws.
Solution:   Do not redraw the right edge of the screen.  Remove the background
            color trick.  Flush the screen output buffer often.  (Nobuhiro
            Takasaki, #5546)
2020-05-30 17:49:25 +02:00
Bram Moolenaar
367d59e6ba patch 8.2.0847: typval related code is spread out
Problem:    Typval related code is spread out.
Solution:   Move code to new typval.c file. (Yegappan Lakshmanan, closes #6093)
2020-05-30 17:06:14 +02:00
Bram Moolenaar
d5c2c7763d patch 8.2.0846: build failure with small features
Problem:    Build failure with small features.
Solution:   Add #ifdef.
2020-05-30 16:17:33 +02:00
Bram Moolenaar
87be9be1db patch 8.2.0845: text properties crossing lines not handled correctly
Problem:    Text properties crossing lines not handled correctly.
Solution:   When joining lines merge text properties if possible.
            (Axel Forsman, closes #5839, closes #5683)
2020-05-30 15:32:02 +02:00
Bram Moolenaar
a9d4b84d97 patch 8.2.0844: text properties crossing lines not handled correctly
Problem:    Text properties crossing lines not handled correctly.
Solution:   When saving for undo include an extra line when needed and do not
            adjust properties when undoing. (Axel Forsman, closes #5875)
2020-05-30 14:46:52 +02:00
Bram Moolenaar
0016fd2e29 patch 8.2.0843: filetype elm not detected
Problem:    Filetype elm not detected.
Solution:   Recognize *.elm files. (closes #6157)
2020-05-30 13:15:14 +02:00
Bram Moolenaar
208534d9ae patch 8.2.0842: MS-Windows: channel tests fail
Problem:    MS-Windows: channel tests fail.
Solution:   Adjust #ifdefs. (closes #6162)
2020-05-30 13:07:39 +02:00
Bram Moolenaar
823654bc06 patch 8.2.0841: 'verbose' value 16 causes duplicate output
Problem:    'verbose' value 16 causes duplicate output.
Solution:   Combine levels 15 and 16 into one message. (Christian Brabandt,
            closes #6153)
2020-05-29 23:03:09 +02:00
Bram Moolenaar
6cb0726215 patch 8.2.0840: search match count wrong when only match is in fold
Problem:    Search match count wrong when only match is in fold.
Solution:   Update search stats when in a closed fold. (Christian Brabandt,
            closes #6160, closes #6152)
2020-05-29 22:49:43 +02:00
Bram Moolenaar
b42c0d5427 patch 8.2.0839: dropping modifier when putting a character back in typeahead
Problem:    Dropping modifier when putting a character back in typeahead.
Solution:   Add modifier to ins_char_typebuf(). (closes #6158)
2020-05-29 22:41:41 +02:00
Bram Moolenaar
09307e3bc1 patch 8.2.0838: MS-Windows: compiler warning for uninitialized variables
Problem:    MS-Windows: compiler warning for uninitialized variables.
Solution:   Initialize variables.
2020-05-29 21:42:55 +02:00
Bram Moolenaar
b60db8ba14 patch 8.2.0837: compiler warning for value set but not used
Problem:    Compiler warning for value set but not used.
Solution:   Move variable inside #ifdef.
2020-05-29 21:38:42 +02:00
Bram Moolenaar
14798ab9a5 patch 8.2.0836: not all :cdo output is visible
Problem:    Not all :cdo output is visible.
Solution:   Reset 'shortmess' temporarily. (Yegappan Lakshmanan, closes #6155)
2020-05-28 21:30:11 +02:00
Bram Moolenaar
c998370562 patch 8.2.0835: Motif: mapping <C-bslash> still doesn't work
Problem:    Motif: mapping <C-bslash> still doesn't work.
Solution:   Accept CSI for K_SPECIAL.  Do not apply CTRL to the character
            early.  (closes #6150)
2020-05-28 21:03:53 +02:00
Bram Moolenaar
3f65c66df9 patch 8.2.0834: :drop command in terminal popup causes problems
Problem:    :drop command in terminal popup causes problems.
Solution:   Check for using a popup window. (closes #6151)
2020-05-27 23:15:16 +02:00
Bram Moolenaar
ca5bc74607 patch 8.2.0833: mapping <C-bslash> doesn't work in the GUI
Problem:    Mapping <C-bslash> doesn't work in the GUI.
Solution:   Reset seenModifyOtherKeys when starting the GUI. (closes #6150)
2020-05-27 22:08:34 +02:00
Bram Moolenaar
a55ba06f69 patch 8.2.0832: compiler warning for uninitialized variable
Problem:    Compiler warning for uninitialized variable. (Tony Mechelynck)
Solution:   Add initial value.
2020-05-27 21:29:04 +02:00
314 changed files with 18429 additions and 7693 deletions

View File

@@ -133,6 +133,7 @@ SRC_ALL = \
src/textobject.c \ src/textobject.c \
src/textprop.c \ src/textprop.c \
src/time.c \ src/time.c \
src/typval.c \
src/ui.c \ src/ui.c \
src/undo.c \ src/undo.c \
src/usercmd.c \ src/usercmd.c \
@@ -156,6 +157,7 @@ SRC_ALL = \
src/testdir/*.py \ src/testdir/*.py \
src/testdir/lsan-suppress.txt \ src/testdir/lsan-suppress.txt \
src/testdir/sautest/autoload/*.vim \ src/testdir/sautest/autoload/*.vim \
src/testdir/testluaplugin/lua/testluaplugin/*.lua \
src/testdir/check.vim \ src/testdir/check.vim \
src/testdir/gui_init.vim \ src/testdir/gui_init.vim \
src/testdir/gui_preinit.vim \ src/testdir/gui_preinit.vim \
@@ -285,6 +287,7 @@ SRC_ALL = \
src/proto/textobject.pro \ src/proto/textobject.pro \
src/proto/textprop.pro \ src/proto/textprop.pro \
src/proto/time.pro \ src/proto/time.pro \
src/proto/typval.pro \
src/proto/ui.pro \ src/proto/ui.pro \
src/proto/undo.pro \ src/proto/undo.pro \
src/proto/usercmd.pro \ src/proto/usercmd.pro \
@@ -347,6 +350,7 @@ SRC_ALL = \
src/libvterm/t/29state_fallback.test \ src/libvterm/t/29state_fallback.test \
src/libvterm/t/30state_pen.test \ src/libvterm/t/30state_pen.test \
src/libvterm/t/31state_rep.test \ src/libvterm/t/31state_rep.test \
src/libvterm/t/32state_flow.test \
src/libvterm/t/60screen_ascii.test \ src/libvterm/t/60screen_ascii.test \
src/libvterm/t/61screen_unicode.test \ src/libvterm/t/61screen_unicode.test \
src/libvterm/t/62screen_damage.test \ src/libvterm/t/62screen_damage.test \
@@ -415,6 +419,7 @@ SRC_UNIX = \
src/gui_gtk_x11.c \ src/gui_gtk_x11.c \
src/gui_gtk_res.xml \ src/gui_gtk_res.xml \
src/gui_motif.c \ src/gui_motif.c \
src/gui_xim.c \
src/gui_xmdlg.c \ src/gui_xmdlg.c \
src/gui_xmebw.c \ src/gui_xmebw.c \
src/gui_xmebw.h \ src/gui_xmebw.h \
@@ -438,6 +443,7 @@ SRC_UNIX = \
src/proto/gui_gtk_x11.pro \ src/proto/gui_gtk_x11.pro \
src/proto/gui_gtk_gresources.pro \ src/proto/gui_gtk_gresources.pro \
src/proto/gui_motif.pro \ src/proto/gui_motif.pro \
src/proto/gui_xim.pro \
src/proto/gui_xmdlg.pro \ src/proto/gui_xmdlg.pro \
src/proto/gui_x11.pro \ src/proto/gui_x11.pro \
src/proto/if_xcmdsrv.pro \ src/proto/if_xcmdsrv.pro \
@@ -670,10 +676,6 @@ SRC_EXTRA = \
src/Make_mint.mak \ src/Make_mint.mak \
src/infplist.xml \ src/infplist.xml \
src/link.390 \ src/link.390 \
src/os_beos.c \
src/os_beos.h \
src/os_beos.rsrc \
src/proto/os_beos.pro \
src/os_mint.h \ src/os_mint.h \
src/os_vms_fix.com \ src/os_vms_fix.com \
src/toolbar.phi \ src/toolbar.phi \
@@ -970,6 +972,8 @@ LANG_GEN = \
runtime/doc/*-pl.UTF-8.1 \ runtime/doc/*-pl.UTF-8.1 \
runtime/doc/*-ru.1 \ runtime/doc/*-ru.1 \
runtime/doc/*-ru.UTF-8.1 \ runtime/doc/*-ru.UTF-8.1 \
runtime/doc/*-tr.1 \
runtime/doc/*-tr.UTF-8.1 \
runtime/lang/README.txt \ runtime/lang/README.txt \
runtime/lang/menu_*.vim \ runtime/lang/menu_*.vim \
runtime/keymap/README.txt \ runtime/keymap/README.txt \

View File

@@ -13,9 +13,6 @@ src/if_sniff.* Interface to SNiFF. If you don't know what SNiFF is,
src/os_amiga.* Files for the Amiga port. src/os_amiga.* Files for the Amiga port.
src/gui_beos.*
src/os_beos.* Files for the BeOS port.
src/os_msdos.* src/os_msdos.*
src/os_dos.* Files for the MS-DOS port. src/os_dos.* Files for the MS-DOS port.

View File

@@ -8,6 +8,7 @@ cd src
echo "Building MinGW 32bit console version" echo "Building MinGW 32bit console version"
set PATH=c:\msys64\mingw32\bin;%PATH% set PATH=c:\msys64\mingw32\bin;%PATH%
mingw32-make.exe -f Make_ming.mak GUI=no OPTIMIZE=speed IME=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
.\vim -u NONE -c "redir @a | ver |0put a | wq" ver_ming.txt
:: Save vim.exe before Make clean, moved back below. :: Save vim.exe before Make clean, moved back below.
copy vim.exe testdir copy vim.exe testdir
mingw32-make.exe -f Make_ming.mak clean mingw32-make.exe -f Make_ming.mak clean
@@ -20,13 +21,14 @@ if "%FEATURE%" == "HUGE" (
) ELSE ( ) ELSE (
mingw32-make.exe -f Make_ming.mak OPTIMIZE=speed GUI=yes IME=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 .\gvim -u NONE -c "redir @a | ver |0put a | wq" ver_ming_gui.txt
:: Filter out the progress bar from the build log :: Filter out the progress bar from the build log
sed -e "s/@<<$/@<< | sed -e 's#.*\\\\r.*##'/" Make_mvc.mak > Make_mvc2.mak sed -e "s/@<<$/@<< | sed -e 's#.*\\\\r.*##'/" Make_mvc.mak > Make_mvc2.mak
echo "Building MSVC 64bit console Version" echo "Building MSVC 64bit console Version"
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 CPU=AMD64 OLE=no GUI=no IME=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
:: The executable is not used
nmake -f Make_mvc2.mak clean nmake -f Make_mvc2.mak clean
:: build MSVC huge version with python and channel support :: build MSVC huge version with python and channel support
@@ -43,6 +45,8 @@ if "%FEATURE%" == "HUGE" (
move /Y testdir\vim.exe . move /Y testdir\vim.exe .
echo "version output MinGW" echo "version output MinGW"
type ver_ming.txt type ver_ming.txt
echo "version output MinGW GUI"
type ver_ming_gui.txt
echo "version output MVC" echo "version output MVC"
type ver_msvc.txt type ver_msvc.txt
cd .. cd ..

View File

@@ -141,6 +141,7 @@ DOCS = \
usr_43.txt \ usr_43.txt \
usr_44.txt \ usr_44.txt \
usr_45.txt \ usr_45.txt \
usr_46.txt \
usr_90.txt \ usr_90.txt \
usr_toc.txt \ usr_toc.txt \
various.txt \ various.txt \
@@ -282,6 +283,7 @@ HTMLS = \
usr_43.html \ usr_43.html \
usr_44.html \ usr_44.html \
usr_45.html \ usr_45.html \
usr_46.html \
usr_90.html \ usr_90.html \
usr_toc.html \ usr_toc.html \
various.html \ various.html \
@@ -317,7 +319,11 @@ CONVERTED = \
evim-ru.UTF-8.1 \ evim-ru.UTF-8.1 \
vimdiff-ru.UTF-8.1 \ vimdiff-ru.UTF-8.1 \
vimtutor-ru.UTF-8.1 \ vimtutor-ru.UTF-8.1 \
xxd-ru.UTF-8.1 xxd-ru.UTF-8.1 \
vim-tr.UTF-8.1 \
evim-tr.UTF-8.1 \
vimdiff-tr.UTF-8.1 \
vimtutor-tr.UTF-8.1
.SUFFIXES: .SUFFIXES:
.SUFFIXES: .c .o .txt .html .SUFFIXES: .c .o .txt .html
@@ -509,3 +515,15 @@ vimtutor-ru.UTF-8.1: vimtutor-ru.1
xxd-ru.UTF-8.1: xxd-ru.1 xxd-ru.UTF-8.1: xxd-ru.1
iconv -f KOI8-R -t utf-8 $< >$@ iconv -f KOI8-R -t utf-8 $< >$@
vim-tr.UTF-8.1: vim-tr.1
iconv -f latin5 -t utf-8 $< >$@
evim-tr.UTF-8.1: evim-tr.1
iconv -f latin5 -t utf-8 $< >$@
vimdiff-tr.UTF-8.1: vimdiff-tr.1
iconv -f latin5 -t utf-8 $< >$@
vimtutor-tr.UTF-8.1: vimtutor-tr.1
iconv -f latin5 -t utf-8 $< >$@

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 8.2. Last change: 2020 Jan 26 *autocmd.txt* For Vim version 8.2. Last change: 2020 Jun 10
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -380,6 +380,7 @@ Name triggered by ~
info info
|User| to be used in combination with ":doautocmd" |User| to be used in combination with ":doautocmd"
|SigUSR1| after the SIGUSR1 signal has been detected
The alphabetical list of autocommand events: *autocmd-events-abc* The alphabetical list of autocommand events: *autocmd-events-abc*
@@ -1153,11 +1154,14 @@ TextYankPost After text has been yanked or deleted in the
register. register.
regtype Type of the register, see regtype Type of the register, see
|getregtype()|. |getregtype()|.
visual True if the operation is
performed on a |Visual| area.
Not triggered when |quote_| is used nor when Not triggered when |quote_| is used nor when
called recursively. called recursively.
It is not allowed to change the buffer text, It is not allowed to change the buffer text,
see |textlock|. see |textlock|.
{only when compiled with the +eval feature} {only when compiled with the +eval feature}
*User* *User*
User Never executed automatically. To be used for User Never executed automatically. To be used for
autocommands that are only executed with autocommands that are only executed with
@@ -1166,6 +1170,15 @@ User Never executed automatically. To be used for
used while there are no matching autocommands, used while there are no matching autocommands,
you will get an error. If you don't want you will get an error. If you don't want
that, define a dummy autocommand yourself. that, define a dummy autocommand yourself.
*SigUSR1*
SigUSR1 After the SIGUSR1 signal has been detected.
Could be used if other ways of notifying Vim
are not feasible. E.g. to check for the
result of a build that takes a long time, or
when a motion sensor is triggered.
{only on Unix}
*UserGettingBored* *UserGettingBored*
UserGettingBored When the user presses the same key 42 times. UserGettingBored When the user presses the same key 42 times.
Just kidding! :-) Just kidding! :-)

View File

@@ -1,4 +1,4 @@
*change.txt* For Vim version 8.2. Last change: 2020 Apr 26 *change.txt* For Vim version 8.2. Last change: 2020 Jun 04
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1688,6 +1688,10 @@ B When joining lines, don't insert a space between two multi-byte
characters. Overruled by the 'M' flag. characters. Overruled by the 'M' flag.
1 Don't break a line after a one-letter word. It's broken before it 1 Don't break a line after a one-letter word. It's broken before it
instead (if possible). instead (if possible).
] Respect textwidth rigorously. With this flag set, no line can be
longer than textwidth, unless line-break-prohibition rules make this
impossible. Mainly for CJK scripts and works only if 'encoding' is
"utf-8".
j Where it makes sense, remove a comment leader when joining lines. For j Where it makes sense, remove a comment leader when joining lines. For
example, joining: example, joining:
int i; // the index ~ int i; // the index ~

View File

@@ -1,4 +1,4 @@
*channel.txt* For Vim version 8.2. Last change: 2019 Dec 07 *channel.txt* For Vim version 8.2. Last change: 2020 Jun 01
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1235,8 +1235,8 @@ If you want to type input for the job in a Vim window you have a few options:
- Use a terminal window. This works well if what you type goes directly to - Use a terminal window. This works well if what you type goes directly to
the job and the job output is directly displayed in the window. the job and the job output is directly displayed in the window.
See |terminal-window|. See |terminal-window|.
- Use a prompt window. This works well when entering a line for the job in Vim - Use a window with a prompt buffer. This works well when entering a line for
while displaying (possibly filtered) output from the job. the job in Vim while displaying (possibly filtered) output from the job.
A prompt buffer is created by setting 'buftype' to "prompt". You would A prompt buffer is created by setting 'buftype' to "prompt". You would
normally only do that in a newly created buffer. normally only do that in a newly created buffer.
@@ -1270,5 +1270,46 @@ Any command that starts Insert mode, such as "a", "i", "A" and "I", will move
the cursor to the last line. "A" will move to the end of the line, "I" to the the cursor to the last line. "A" will move to the end of the line, "I" to the
start of the line. start of the line.
Here is an example for Unix. It starts a shell in the background and prompts
for the next shell command. Output from the shell is displayed above the
prompt. >
" Create a channel log so we can see what happens.
call ch_logfile('logfile', 'w')
" Function handling a line of text has been typed.
func TextEntered(text)
" Send the text to a shell with Enter appended.
call ch_sendraw(g:shell_job, a:text .. "\n")
endfunc
" Function handling output from the shell: Added above the prompt.
func GotOutput(channel, msg)
call append(line("$") - 1, "- " . a:msg)
endfunc
" Function handling the shell exist: close the window.
func JobExit(job, status)
quit!
endfunc
" Start a shell in the background.
let shell_job = job_start(["/bin/sh"], #{
\ out_cb: function('GotOutput'),
\ err_cb: function('GotOutput'),
\ exit_cb: function('JobExit'),
\ })
let shell_ch = job_getchannel(shell_job)
new
set buftype=prompt
let buf = bufnr('')
call prompt_setcallback(buf, function("TextEntered"))
eval prompt_setprompt(buf, "shell command: ")
" start accepting shell commands
startinsert
<
vim:tw=78:ts=8:noet:ft=help:norl: vim:tw=78:ts=8:noet:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*editing.txt* For Vim version 8.2. Last change: 2020 May 12 *editing.txt* For Vim version 8.2. Last change: 2020 Jun 05
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1326,6 +1326,10 @@ present in 'cpoptions' and "!" is not used in the command.
*:tch* *:tchdir* *:tch* *:tchdir*
:tch[dir][!] Same as |:tcd|. :tch[dir][!] Same as |:tcd|.
*:tcd-*
:tcd[!] - Change to the previous current directory, before the
last ":tcd {path}" command.
*:lc* *:lcd* *:lc* *:lcd*
:lc[d][!] {path} Like |:cd|, but only set the current directory when :lc[d][!] {path} Like |:cd|, but only set the current directory when
the cursor is in the current window. The current the cursor is in the current window. The current
@@ -1335,9 +1339,28 @@ present in 'cpoptions' and "!" is not used in the command.
*:lch* *:lchdir* *:lch* *:lchdir*
:lch[dir][!] Same as |:lcd|. :lch[dir][!] Same as |:lcd|.
*:lcd-*
:lcd[!] - Change to the previous current directory, before the
last ":lcd {path}" command.
*:pw* *:pwd* *E187* *:pw* *:pwd* *E187*
:pw[d] Print the current directory name. :pw[d] Print the current directory name.
Also see |getcwd()|. Also see |getcwd()|.
*:pwd-verbose*
When 'verbose' is non-zero, |:pwd| will also display
what scope the current directory was set. Example: >
" Set by :cd
:verbose pwd
[global] /path/to/current
" Set by :lcd
:verbose pwd
[window] /path/to/current
" Set by :tcd
:verbose pwd
[tabpage] /path/to/current
So long as no |:lcd| or |:tcd| command has been used, all windows share the So long as no |:lcd| or |:tcd| command has been used, all windows share the
same current directory. Using a command to jump to another window doesn't same current directory. Using a command to jump to another window doesn't

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 8.2. Last change: 2020 May 25 *eval.txt* For Vim version 8.2. Last change: 2020 Jun 17
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -95,15 +95,17 @@ the Number. Examples:
Number -1 --> String "-1" ~ Number -1 --> String "-1" ~
*octal* *octal*
Conversion from a String to a Number is done by converting the first digits to Conversion from a String to a Number is done by converting the first digits to
a number. Hexadecimal "0xf9", Octal "017", and Binary "0b10" numbers are a number. Hexadecimal "0xf9", Octal "017" or "0o17", and Binary "0b10"
recognized (NOTE: when using |scriptversion-4| octal is not recognized). If numbers are recognized (NOTE: when using |scriptversion-4| octal with a
the String doesn't start with digits, the result is zero. leading "0" is not recognized). If the String doesn't start with digits, the
result is zero.
Examples: Examples:
String "456" --> Number 456 ~ String "456" --> Number 456 ~
String "6bar" --> Number 6 ~ String "6bar" --> Number 6 ~
String "foo" --> Number 0 ~ String "foo" --> Number 0 ~
String "0xf1" --> Number 241 ~ String "0xf1" --> Number 241 ~
String "0100" --> Number 64 ~ String "0100" --> Number 64 ~
String "0o100" --> Number 64 ~
String "0b101" --> Number 5 ~ String "0b101" --> Number 5 ~
String "-8" --> Number -8 ~ String "-8" --> Number -8 ~
String "+8" --> Number 0 ~ String "+8" --> Number 0 ~
@@ -1264,7 +1266,7 @@ number number constant *expr-number*
*hex-number* *octal-number* *binary-number* *hex-number* *octal-number* *binary-number*
Decimal, Hexadecimal (starting with 0x or 0X), Binary (starting with 0b or 0B) Decimal, Hexadecimal (starting with 0x or 0X), Binary (starting with 0b or 0B)
and Octal (starting with 0). and Octal (starting with 0, 0o or 0O).
*floating-point-format* *floating-point-format*
Floating point numbers can be written in two forms: Floating point numbers can be written in two forms:
@@ -1353,6 +1355,9 @@ A string constant accepts these special characters:
To use the double quote character it must be escaped: "<M-\">". To use the double quote character it must be escaped: "<M-\">".
Don't use <Char-xxxx> to get a utf-8 character, use \uxxxx as Don't use <Char-xxxx> to get a utf-8 character, use \uxxxx as
mentioned above. mentioned above.
\<*xxx> Like \<xxx> but prepends a modifier instead of including it in the
character. E.g. "\<C-w>" is one character 0x17 while "\<*C-w>" is four
bytes: 3 for the CTRL modifier and then character "W".
Note that "\xff" is stored as the byte 255, which may be invalid in some Note that "\xff" is stored as the byte 255, which may be invalid in some
encodings. Use "\u00ff" to store character 255 according to the current value encodings. Use "\u00ff" to store character 255 according to the current value
@@ -1528,6 +1533,7 @@ An internal variable is explicitly destroyed with the ":unlet" command
Using a name that is not an internal variable or refers to a variable that has Using a name that is not an internal variable or refers to a variable that has
been destroyed results in an error. been destroyed results in an error.
*variable-scope*
There are several name spaces for variables. Which one is to be used is There are several name spaces for variables. Which one is to be used is
specified by what is prepended: specified by what is prepended:
@@ -1546,7 +1552,9 @@ delete all script-local variables: >
:for k in keys(s:) :for k in keys(s:)
: unlet s:[k] : unlet s:[k]
:endfor :endfor
<
Note: in Vim9 script this is different, see |vim9-scopes|.
*buffer-variable* *b:var* *b:* *buffer-variable* *b:var* *b:*
A variable name that is preceded with "b:" is local to the current buffer. A variable name that is preceded with "b:" is local to the current buffer.
Thus you can have several "b:foo" variables, one for each buffer. Thus you can have several "b:foo" variables, one for each buffer.
@@ -1737,6 +1745,14 @@ v:cmdbang Set like v:cmdarg for a file read/write command. When a "!"
was used the value is 1, otherwise it is 0. Note that this was used the value is 1, otherwise it is 0. Note that this
can only be used in autocommands. For user commands |<bang>| can only be used in autocommands. For user commands |<bang>|
can be used. can be used.
*v:collate* *collate-variable*
v:collate The current locale setting for collation order of the runtime
environment. This allows Vim scripts to be aware of the
current locale encoding. Technical: it's the value of
LC_COLLATE. When not using a locale the value is "C".
This variable can not be set directly, use the |:language|
command.
See |multi-lang|.
*v:completed_item* *completed_item-variable* *v:completed_item* *completed_item-variable*
v:completed_item v:completed_item
@@ -2189,7 +2205,8 @@ v:termresponse The escape sequence returned by the terminal for the |t_RV|
'c', with only digits and ';' in between. 'c', with only digits and ';' in between.
When this option is set, the TermResponse autocommand event is When this option is set, the TermResponse autocommand event is
fired, so that you can react to the response from the fired, so that you can react to the response from the
terminal. terminal. You can use |terminalprops()| to see what Vim
figured out about the terminal.
The response from a new xterm is: "<Esc>[> Pp ; Pv ; Pc c". Pp The response from a new xterm is: "<Esc>[> Pp ; Pv ; Pc c". Pp
is the terminal type: 0 for vt100 and 1 for vt220. Pv is the is the terminal type: 0 for vt100 and 1 for vt220. Pv is the
patch level (since this was introduced in patch 95, it's patch level (since this was introduced in patch 95, it's
@@ -2319,11 +2336,12 @@ argidx() Number current index in the argument list
arglistid([{winnr} [, {tabnr}]]) Number argument list id arglistid([{winnr} [, {tabnr}]]) Number argument list id
argv({nr} [, {winid}]) String {nr} entry of the argument list argv({nr} [, {winid}]) String {nr} entry of the argument list
argv([-1, {winid}]) List the argument list argv([-1, {winid}]) List the argument list
asin({expr}) Float arc sine of {expr}
assert_beeps({cmd}) Number assert {cmd} causes a beep assert_beeps({cmd}) Number assert {cmd} causes a beep
assert_equal({exp}, {act} [, {msg}]) assert_equal({exp}, {act} [, {msg}])
Number assert {exp} is equal to {act} Number assert {exp} is equal to {act}
assert_equalfile({fname-one}, {fname-two}) assert_equalfile({fname-one}, {fname-two} [, {msg}])
Number assert file contents is equal Number assert file contents are equal
assert_exception({error} [, {msg}]) assert_exception({error} [, {msg}])
Number assert {error} is in v:exception Number assert {error} is in v:exception
assert_fails({cmd} [, {error} [, {msg}]]) assert_fails({cmd} [, {error} [, {msg}]])
@@ -2340,7 +2358,6 @@ assert_notmatch({pat}, {text} [, {msg}])
Number assert {pat} not matches {text} Number assert {pat} not matches {text}
assert_report({msg}) Number report a test failure assert_report({msg}) Number report a test failure
assert_true({actual} [, {msg}]) Number assert {actual} is true assert_true({actual} [, {msg}]) Number assert {actual} is true
asin({expr}) Float arc sine of {expr}
atan({expr}) Float arc tangent of {expr} atan({expr}) Float arc tangent of {expr}
atan2({expr1}, {expr2}) Float arc tangent of {expr1} / {expr2} atan2({expr1}, {expr2}) Float arc tangent of {expr1} / {expr2}
balloon_gettext() String current text in the balloon balloon_gettext() String current text in the balloon
@@ -2431,12 +2448,12 @@ executable({expr}) Number 1 if executable {expr} exists
execute({command}) String execute {command} and get the output execute({command}) String execute {command} and get the output
exepath({expr}) String full path of the command {expr} exepath({expr}) String full path of the command {expr}
exists({expr}) Number |TRUE| if {expr} exists exists({expr}) Number |TRUE| if {expr} exists
extend({expr1}, {expr2} [, {expr3}])
List/Dict insert items of {expr2} into {expr1}
exp({expr}) Float exponential of {expr} exp({expr}) Float exponential of {expr}
expand({expr} [, {nosuf} [, {list}]]) expand({expr} [, {nosuf} [, {list}]])
any expand special keywords in {expr} any expand special keywords in {expr}
expandcmd({expr}) String expand {expr} like with `:edit` expandcmd({expr}) String expand {expr} like with `:edit`
extend({expr1}, {expr2} [, {expr3}])
List/Dict insert items of {expr2} into {expr1}
feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer
filereadable({file}) Number |TRUE| if {file} is a readable file filereadable({file}) Number |TRUE| if {file} is a readable file
filewritable({file}) Number |TRUE| if {file} is a writable file filewritable({file}) Number |TRUE| if {file} is a writable file
@@ -2446,6 +2463,7 @@ finddir({name} [, {path} [, {count}]])
String find directory {name} in {path} String find directory {name} in {path}
findfile({name} [, {path} [, {count}]]) findfile({name} [, {path} [, {count}]])
String find file {name} in {path} String find file {name} in {path}
flatten({list} [, {maxdepth}]) List flatten {list} up to {maxdepth} levels
float2nr({expr}) Number convert Float {expr} to a Number float2nr({expr}) Number convert Float {expr} to a Number
floor({expr}) Float round {expr} down floor({expr}) Float round {expr} down
fmod({expr1}, {expr2}) Float remainder of {expr1} / {expr2} fmod({expr1}, {expr2}) Float remainder of {expr1} / {expr2}
@@ -2494,14 +2512,16 @@ getjumplist([{winnr} [, {tabnr}]])
getline({lnum}) String line {lnum} of current buffer getline({lnum}) String line {lnum} of current buffer
getline({lnum}, {end}) List lines {lnum} to {end} of current buffer getline({lnum}, {end}) List lines {lnum} to {end} of current buffer
getloclist({nr} [, {what}]) List list of location list items getloclist({nr} [, {what}]) List list of location list items
getmarklist([{expr}]) List list of global/local marks
getmatches([{win}]) List list of current matches getmatches([{win}]) List list of current matches
getmousepos() Dict last known mouse position getmousepos() Dict last known mouse position
getpid() Number process ID of Vim getpid() Number process ID of Vim
getpos({expr}) List position of cursor, mark, etc. getpos({expr}) List position of cursor, mark, etc.
getqflist([{what}]) List list of quickfix items getqflist([{what}]) List list of quickfix items
getreg([{regname} [, 1 [, {list}]]]) getreg([{regname} [, 1 [, {list}]]])
String or List contents of register String or List contents of a register
getregtype([{regname}]) String type of register getreginfo([{regname}]) Dict information about a register
getregtype([{regname}]) String type of a register
gettabinfo([{expr}]) List list of tab pages gettabinfo([{expr}]) List list of tab pages
gettabvar({nr}, {varname} [, {def}]) gettabvar({nr}, {varname} [, {def}])
any variable {varname} in tab {nr} or {def} any variable {varname} in tab {nr} or {def}
@@ -2530,8 +2550,8 @@ histadd({history}, {item}) Number add an item to a history
histdel({history} [, {item}]) Number remove an item from a history histdel({history} [, {item}]) Number remove an item from a history
histget({history} [, {index}]) String get the item {index} from a history histget({history} [, {index}]) String get the item {index} from a history
histnr({history}) Number highest index of a history histnr({history}) Number highest index of a history
hlexists({name}) Number |TRUE| if highlight group {name} exists
hlID({name}) Number syntax ID of highlight group {name} hlID({name}) Number syntax ID of highlight group {name}
hlexists({name}) Number |TRUE| if highlight group {name} exists
hostname() String name of the machine Vim is running on hostname() String name of the machine Vim is running on
iconv({expr}, {from}, {to}) String convert encoding of {expr} iconv({expr}, {from}, {to}) String convert encoding of {expr}
indent({lnum}) Number indent of line {lnum} indent({lnum}) Number indent of line {lnum}
@@ -2631,16 +2651,16 @@ popup_findpreview() Number get window ID of preview popup window
popup_getoptions({id}) Dict get options of popup window {id} popup_getoptions({id}) Dict get options of popup window {id}
popup_getpos({id}) Dict get position of popup window {id} popup_getpos({id}) Dict get position of popup window {id}
popup_hide({id}) none hide popup menu {id} popup_hide({id}) none hide popup menu {id}
popup_list() List get a list of window IDs of al popups popup_list() List get a list of window IDs of all popups
popup_locate({row}, {col}) Number get window ID of popup at position popup_locate({row}, {col}) Number get window ID of popup at position
popup_menu({what}, {options}) Number create a popup window used as a menu popup_menu({what}, {options}) Number create a popup window used as a menu
popup_move({id}, {options}) none set position of popup window {id} popup_move({id}, {options}) none set position of popup window {id}
popup_notification({what}, {options}) popup_notification({what}, {options})
Number create a notification popup window Number create a notification popup window
popup_show({id}) none unhide popup window {id}
popup_setoptions({id}, {options}) popup_setoptions({id}, {options})
none set options for popup window {id} none set options for popup window {id}
popup_settext({id}, {text}) none set the text of popup window {id} popup_settext({id}, {text}) none set the text of popup window {id}
popup_show({id}) none unhide popup window {id}
pow({x}, {y}) Float {x} to the power of {y} pow({x}, {y}) Float {x} to the power of {y}
prevnonblank({lnum}) Number line nr of non-blank line <= {lnum} prevnonblank({lnum}) Number line nr of non-blank line <= {lnum}
printf({fmt}, {expr1}...) String format text printf({fmt}, {expr1}...) String format text
@@ -2665,15 +2685,20 @@ prop_type_get([{name} [, {props}]])
prop_type_list([{props}]) List get list of property types prop_type_list([{props}]) List get list of property types
pum_getpos() Dict position and size of pum if visible pum_getpos() Dict position and size of pum if visible
pumvisible() Number whether popup menu is visible pumvisible() Number whether popup menu is visible
pyeval({expr}) any evaluate |Python| expression
py3eval({expr}) any evaluate |python3| expression py3eval({expr}) any evaluate |python3| expression
pyeval({expr}) any evaluate |Python| expression
pyxeval({expr}) any evaluate |python_x| expression pyxeval({expr}) any evaluate |python_x| expression
rand([{expr}]) Number get pseudo-random number rand([{expr}]) Number get pseudo-random number
range({expr} [, {max} [, {stride}]]) range({expr} [, {max} [, {stride}]])
List items from {expr} to {max} List items from {expr} to {max}
readdir({dir} [, {expr}]) List file names in {dir} selected by {expr} readdir({dir} [, {expr} [, {dict}]])
List file names in {dir} selected by {expr}
readdirex({dir} [, {expr} [, {dict}]])
List file info in {dir} selected by {expr}
readfile({fname} [, {type} [, {max}]]) readfile({fname} [, {type} [, {max}]])
List get list of lines from file {fname} List get list of lines from file {fname}
reduce({object}, {func} [, {initial}])
any reduce {object} using {func}
reg_executing() String get the executing register name reg_executing() String get the executing register name
reg_recording() String get the recording register name reg_recording() String get the recording register name
reltime([{start} [, {end}]]) List get time value reltime([{start} [, {end}]]) List get time value
@@ -2707,15 +2732,16 @@ screencol() Number current cursor column
screenpos({winid}, {lnum}, {col}) Dict screen row and col of a text character screenpos({winid}, {lnum}, {col}) Dict screen row and col of a text character
screenrow() Number current cursor row screenrow() Number current cursor row
screenstring({row}, {col}) String characters at screen position screenstring({row}, {col}) String characters at screen position
search({pattern} [, {flags} [, {stopline} [, {timeout}]]]) search({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]])
Number search for {pattern} Number search for {pattern}
searchcount([{options}]) Dict get or update search stats
searchdecl({name} [, {global} [, {thisblock}]]) searchdecl({name} [, {global} [, {thisblock}]])
Number search for variable declaration Number search for variable declaration
searchpair({start}, {middle}, {end} [, {flags} [, {skip} [...]]]) searchpair({start}, {middle}, {end} [, {flags} [, {skip} [...]]])
Number search for other end of start/end pair Number search for other end of start/end pair
searchpairpos({start}, {middle}, {end} [, {flags} [, {skip} [...]]]) searchpairpos({start}, {middle}, {end} [, {flags} [, {skip} [...]]])
List search for other end of start/end pair List search for other end of start/end pair
searchpos({pattern} [, {flags} [, {stopline} [, {timeout}]]]) searchpos({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]])
List search for {pattern} List search for {pattern}
server2client({clientid}, {string}) server2client({clientid}, {string})
Number send reply string Number send reply string
@@ -2789,9 +2815,9 @@ str2list({expr} [, {utf8}]) List convert each character of {expr} to
ASCII/UTF8 value ASCII/UTF8 value
str2nr({expr} [, {base} [, {quoted}]]) str2nr({expr} [, {base} [, {quoted}]])
Number convert String to Number Number convert String to Number
strchars({expr} [, {skipcc}]) Number character length of the String {expr}
strcharpart({str}, {start} [, {len}]) strcharpart({str}, {start} [, {len}])
String {len} characters of {str} at {start} String {len} characters of {str} at {start}
strchars({expr} [, {skipcc}]) Number character length of the String {expr}
strdisplaywidth({expr} [, {col}]) Number display length of the String {expr} strdisplaywidth({expr} [, {col}]) Number display length of the String {expr}
strftime({format} [, {time}]) String format time with a specified format strftime({format} [, {time}]) String format time with a specified format
strgetchar({str}, {index}) Number get char {index} from {str} strgetchar({str}, {index}) Number get char {index} from {str}
@@ -2824,8 +2850,8 @@ systemlist({expr} [, {input}]) List output of shell command/filter {expr}
tabpagebuflist([{arg}]) List list of buffer numbers in tab page tabpagebuflist([{arg}]) List list of buffer numbers in tab page
tabpagenr([{arg}]) Number number of current or last tab page tabpagenr([{arg}]) Number number of current or last tab page
tabpagewinnr({tabarg} [, {arg}]) Number number of current window in tab page tabpagewinnr({tabarg} [, {arg}]) Number number of current window in tab page
taglist({expr} [, {filename}]) List list of tags matching {expr}
tagfiles() List tags files used tagfiles() List tags files used
taglist({expr} [, {filename}]) List list of tags matching {expr}
tan({expr}) Float tangent of {expr} tan({expr}) Float tangent of {expr}
tanh({expr}) Float hyperbolic tangent of {expr} tanh({expr}) Float hyperbolic tangent of {expr}
tempname() String name for a temporary file tempname() String name for a temporary file
@@ -2849,15 +2875,16 @@ term_gettty({buf}, [{input}]) String get the tty name of a terminal
term_list() List get the list of terminal buffers term_list() List get the list of terminal buffers
term_scrape({buf}, {row}) List get row of a terminal screen term_scrape({buf}, {row}) List get row of a terminal screen
term_sendkeys({buf}, {keys}) none send keystrokes to a terminal term_sendkeys({buf}, {keys}) none send keystrokes to a terminal
term_setapi({buf}, {expr}) none set |terminal-api| function name prefix
term_setansicolors({buf}, {colors}) term_setansicolors({buf}, {colors})
none set ANSI palette in GUI color mode none set ANSI palette in GUI color mode
term_setapi({buf}, {expr}) none set |terminal-api| function name prefix
term_setkill({buf}, {how}) none set signal to stop job in terminal term_setkill({buf}, {how}) none set signal to stop job in terminal
term_setrestore({buf}, {command}) none set command to restore terminal term_setrestore({buf}, {command}) none set command to restore terminal
term_setsize({buf}, {rows}, {cols}) term_setsize({buf}, {rows}, {cols})
none set the size of a terminal none set the size of a terminal
term_start({cmd} [, {options}]) Number open a terminal window and run a job term_start({cmd} [, {options}]) Number open a terminal window and run a job
term_wait({buf} [, {time}]) Number wait for screen to be updated term_wait({buf} [, {time}]) Number wait for screen to be updated
terminalprops() Dict properties of the terminal
test_alloc_fail({id}, {countdown}, {repeat}) test_alloc_fail({id}, {countdown}, {repeat})
none make memory allocation fail none make memory allocation fail
test_autochdir() none enable 'autochdir' during startup test_autochdir() none enable 'autochdir' during startup
@@ -2874,16 +2901,16 @@ test_null_job() Job null value for testing
test_null_list() List null value for testing test_null_list() List null value for testing
test_null_partial() Funcref null value for testing test_null_partial() Funcref null value for testing
test_null_string() String null value for testing test_null_string() String null value for testing
test_unknown() any unknown value for testing
test_void() any void value for testing
test_option_not_set({name}) none reset flag indicating option was set test_option_not_set({name}) none reset flag indicating option was set
test_override({expr}, {val}) none test with Vim internal overrides test_override({expr}, {val}) none test with Vim internal overrides
test_refcount({expr}) Number get the reference count of {expr} test_refcount({expr}) Number get the reference count of {expr}
test_scrollbar({which}, {value}, {dragging}) test_scrollbar({which}, {value}, {dragging})
none scroll in the GUI for testing none scroll in the GUI for testing
test_setmouse({row}, {col}) none set the mouse position for testing test_setmouse({row}, {col}) none set the mouse position for testing
test_srand_seed([seed]) none set seed for testing srand()
test_settime({expr}) none set current time for testing test_settime({expr}) none set current time for testing
test_srand_seed([seed]) none set seed for testing srand()
test_unknown() any unknown value for testing
test_void() any void value for testing
timer_info([{id}]) List information about timers timer_info([{id}]) List information about timers
timer_pause({id}, {pause}) none pause or unpause a timer timer_pause({id}, {pause}) none pause or unpause a timer
timer_start({time}, {callback} [, {options}]) timer_start({time}, {callback} [, {options}])
@@ -2894,7 +2921,8 @@ tolower({expr}) String the String {expr} switched to lowercase
toupper({expr}) String the String {expr} switched to uppercase toupper({expr}) String the String {expr} switched to uppercase
tr({src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr} tr({src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr}
to chars in {tostr} to chars in {tostr}
trim({text} [, {mask}]) String trim characters in {mask} from {text} trim({text} [, {mask} [, {dir}]])
String trim characters in {mask} from {text}
trunc({expr}) Float truncate Float {expr} trunc({expr}) Float truncate Float {expr}
type({name}) Number type of variable {name} type({name}) Number type of variable {name}
undofile({name}) String undo file name for {name} undofile({name}) String undo file name for {name}
@@ -4034,7 +4062,7 @@ executable({expr}) *executable()*
On MS-Windows the ".exe", ".bat", etc. can optionally be On MS-Windows the ".exe", ".bat", etc. can optionally be
included. Then the extensions in $PATHEXT are tried. Thus if included. Then the extensions in $PATHEXT are tried. Thus if
"foo.exe" does not exist, "foo.exe.bat" can be found. If "foo.exe" does not exist, "foo.exe.bat" can be found. If
$PATHEXT is not set then ".exe;.com;.bat;.cmd" is used. A dot $PATHEXT is not set then ".com;.exe;.bat;.cmd" is used. A dot
by itself can be used in $PATHEXT to try using the name by itself can be used in $PATHEXT to try using the name
without an extension. When 'shell' looks like a Unix shell, without an extension. When 'shell' looks like a Unix shell,
then the name is also tried without adding an extension. then the name is also tried without adding an extension.
@@ -4385,7 +4413,7 @@ feedkeys({string} [, {mode}]) *feedkeys()*
script continues. script continues.
Note that if you manage to call feedkeys() while Note that if you manage to call feedkeys() while
executing commands, thus calling it recursively, then executing commands, thus calling it recursively, then
all typehead will be consumed by the last call. all typeahead will be consumed by the last call.
'!' When used with 'x' will not end Insert mode. Can be '!' When used with 'x' will not end Insert mode. Can be
used in a test when a timer is set to exit Insert mode used in a test when a timer is set to exit Insert mode
a little later. Useful for testing CursorHoldI. a little later. Useful for testing CursorHoldI.
@@ -4421,7 +4449,7 @@ filewritable({file}) *filewritable()*
directory, and we can write to it, the result is 2. directory, and we can write to it, the result is 2.
Can also be used as a |method|: > Can also be used as a |method|: >
GetName()->filewriteable() GetName()->filewritable()
filter({expr1}, {expr2}) *filter()* filter({expr1}, {expr2}) *filter()*
@@ -4502,6 +4530,25 @@ findfile({name} [, {path} [, {count}]]) *findfile()*
Can also be used as a |method|: > Can also be used as a |method|: >
GetName()->findfile() GetName()->findfile()
flatten({list} [, {maxdepth}]) *flatten()*
Flatten {list} up to {maxdepth} levels. Without {maxdepth}
the result is a |List| without nesting, as if {maxdepth} is
a very large number.
The {list} is changed in place, make a copy first if you do
not want that.
*E900*
{maxdepth} means how deep in nested lists changes are made.
{list} is not modified when {maxdepth} is 0.
{maxdepth} must be positive number.
If there is an error the number zero is returned.
Example: >
:echo flatten([1, [2, [3, 4]], 5])
< [1, 2, 3, 4, 5] >
:echo flatten([1, [2, [3, 4]], 5], 1)
< [1, 2, [3, 4], 5]
float2nr({expr}) *float2nr()* float2nr({expr}) *float2nr()*
Convert {expr} to a Number by omitting the part after the Convert {expr} to a Number by omitting the part after the
decimal point. decimal point.
@@ -5100,6 +5147,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
behave :behave suboptions behave :behave suboptions
color color schemes color color schemes
command Ex command (and arguments) command Ex command (and arguments)
cmdline |cmdline-completion| result
compiler compilers compiler compilers
cscope |:cscope| suboptions cscope |:cscope| suboptions
diff_buffer |:diffget| and |:diffput| completion diff_buffer |:diffget| and |:diffput| completion
@@ -5130,14 +5178,19 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
user user names user user names
var user variables var user variables
If {pat} is an empty string, then all the matches are returned. If {pat} is an empty string, then all the matches are
Otherwise only items matching {pat} are returned. See returned. Otherwise only items matching {pat} are returned.
|wildcards| for the use of special characters in {pat}. See |wildcards| for the use of special characters in {pat}.
If the optional {filtered} flag is set to 1, then 'wildignore' If the optional {filtered} flag is set to 1, then 'wildignore'
is applied to filter the results. Otherwise all the matches is applied to filter the results. Otherwise all the matches
are returned. The 'wildignorecase' option always applies. are returned. The 'wildignorecase' option always applies.
If {type} is "cmdline", then the |cmdline-completion| result is
returned. For example, to complete the possible values after
a ":call" command: >
echo getcompletion('call ', 'cmdline')
<
If there are no matches, an empty list is returned. An If there are no matches, an empty list is returned. An
invalid value for {type} produces an error. invalid value for {type} produces an error.
@@ -5362,6 +5415,27 @@ getloclist({nr} [, {what}]) *getloclist()*
|location-list-file-window| for more |location-list-file-window| for more
details. details.
getmarklist([{expr}] *getmarklist()*
Without the {expr} argument returns a |List| with information
about all the global marks. |mark|
If the optional {expr} argument is specified, returns the
local marks defined in buffer {expr}. For the use of {expr},
see |bufname()|.
Each item in the retuned List is a |Dict| with the following:
name - name of the mark prefixed by "'"
pos - a |List| with the position of the mark:
[bufnum, lnum, col, off]
Refer to |getpos()| for more information.
file - file name
Refer to |getpos()| for getting information about a specific
mark.
Can also be used as a |method|: >
GetBufnr()->getmarklist()
getmatches([{win}]) *getmatches()* getmatches([{win}]) *getmatches()*
Returns a |List| with all matches previously defined for the Returns a |List| with all matches previously defined for the
current window by |matchadd()| and the |:match| commands. current window by |matchadd()| and the |:match| commands.
@@ -5401,7 +5475,7 @@ getmousepos() *getmousepos()*
"screenrow" and "screencol" are valid, the others are zero. "screenrow" and "screencol" are valid, the others are zero.
When on the status line below a window or the vertical When on the status line below a window or the vertical
separater right of a window, the "line" and "column" values separator right of a window, the "line" and "column" values
are zero. are zero.
When the position is after the text then "column" is the When the position is after the text then "column" is the
@@ -5484,8 +5558,9 @@ getqflist([{what}]) *getqflist()*
id get information for the quickfix list with id get information for the quickfix list with
|quickfix-ID|; zero means the id for the |quickfix-ID|; zero means the id for the
current list or the list specified by "nr" current list or the list specified by "nr"
idx index of the current entry in the quickfix idx get information for the quickfix entry at this
list specified by 'id' or 'nr'. index in the list specified by 'id' or 'nr'.
If set to zero, then uses the current entry.
See |quickfix-index| See |quickfix-index|
items quickfix list entries items quickfix list entries
lines parse a list of lines using 'efm' and return lines parse a list of lines using 'efm' and return
@@ -5521,7 +5596,7 @@ getqflist([{what}]) *getqflist()*
If not present, set to "". If not present, set to "".
id quickfix list ID |quickfix-ID|. If not id quickfix list ID |quickfix-ID|. If not
present, set to 0. present, set to 0.
idx index of the current entry in the list. If not idx index of the quickfix entry in the list. If not
present, set to 0. present, set to 0.
items quickfix list entries. If not present, set to items quickfix list entries. If not present, set to
an empty list. an empty list.
@@ -5563,6 +5638,31 @@ getreg([{regname} [, 1 [, {list}]]]) *getreg()*
Can also be used as a |method|: > Can also be used as a |method|: >
GetRegname()->getreg() GetRegname()->getreg()
getreginfo([{regname}]) *getreginfo()*
Returns detailed information about register {regname} as a
Dictionary with the following entries:
regcontents List of lines contained in register
{regname}, like
|getreg|({regname}, 1, 1).
regtype the type of register {regname}, as in
|getregtype()|.
isunnamed Boolean flag, v:true if this register
is currently pointed to by the unnamed
register.
points_to for the unnamed register, gives the
single letter name of the register
currently pointed to (see |quotequote|).
For example, after deleting a line
with `dd`, this field will be "1",
which is the register that got the
deleted text.
If {regname} is invalid or not set, an empty Dictionary
will be returned.
If {regname} is not specified, |v:register| is used.
Can also be used as a |method|: >
GetRegname()->getreginfo()
getregtype([{regname}]) *getregtype()* getregtype([{regname}]) *getregtype()*
The result is a String, which is type of register {regname}. The result is a String, which is type of register {regname}.
@@ -5670,8 +5770,8 @@ getwininfo([{winid}]) *getwininfo()*
Returns information about windows as a List with Dictionaries. Returns information about windows as a List with Dictionaries.
If {winid} is given Information about the window with that ID If {winid} is given Information about the window with that ID
is returned. If the window does not exist the result is an is returned, as a List with one item. If the window does not
empty list. exist the result is an empty list.
Without {winid} information about all the windows in all the Without {winid} information about all the windows in all the
tab pages is returned. tab pages is returned.
@@ -6191,10 +6291,11 @@ inputlist({textlist}) *inputlist()*
displayed, one string per line. The user will be prompted to displayed, one string per line. The user will be prompted to
enter a number, which is returned. enter a number, which is returned.
The user can also select an item by clicking on it with the The user can also select an item by clicking on it with the
mouse. For the first string 0 is returned. When clicking mouse, if the mouse is enabled in the command line ('mouse' is
above the first item a negative number is returned. When "a" or includes "c"). For the first string 0 is returned.
clicking on the prompt one more than the length of {textlist} When clicking above the first item a negative number is
is returned. returned. When clicking on the prompt one more than the
length of {textlist} is returned.
Make sure {textlist} has less than 'lines' entries, otherwise Make sure {textlist} has less than 'lines' entries, otherwise
it won't work. It's a good idea to put the entry number at it won't work. It's a good idea to put the entry number at
the start of the string. And put a prompt in the first item. the start of the string. And put a prompt in the first item.
@@ -6916,7 +7017,7 @@ mapset({mode}, {abbr}, {dict}) *mapset()*
call mapset('n', 0, save_map) call mapset('n', 0, save_map)
< Note that if you are going to replace a map in several modes, < Note that if you are going to replace a map in several modes,
e.g. with `:map!`, you need to save the mapping for all of e.g. with `:map!`, you need to save the mapping for all of
them, since they can differe. them, since they can differ.
match({expr}, {pat} [, {start} [, {count}]]) *match()* match({expr}, {pat} [, {start} [, {count}]]) *match()*
@@ -7813,11 +7914,12 @@ rand([{expr}]) *rand()* *random*
:echo rand(seed) :echo rand(seed)
:echo rand(seed) % 16 " random number 0 - 15 :echo rand(seed) % 16 " random number 0 - 15
< <
*readdir()* readdir({directory} [, {expr} [, {dict}]]) *readdir()*
readdir({directory} [, {expr}])
Return a list with file and directory names in {directory}. Return a list with file and directory names in {directory}.
You can also use |glob()| if you don't need to do complicated You can also use |glob()| if you don't need to do complicated
things, such as limiting the number of matches. things, such as limiting the number of matches.
The list will be sorted (case sensitive), see the {dict}
argument below for changing the sort order.
When {expr} is omitted all entries are included. When {expr} is omitted all entries are included.
When {expr} is given, it is evaluated to check what to do: When {expr} is given, it is evaluated to check what to do:
@@ -7827,6 +7929,7 @@ readdir({directory} [, {expr}])
added to the list. added to the list.
If {expr} results in 1 then this entry will be added If {expr} results in 1 then this entry will be added
to the list. to the list.
The entries "." and ".." are always excluded.
Each time {expr} is evaluated |v:val| is set to the entry name. Each time {expr} is evaluated |v:val| is set to the entry name.
When {expr} is a function the name is passed as the argument. When {expr} is a function the name is passed as the argument.
For example, to get a list of files ending in ".txt": > For example, to get a list of files ending in ".txt": >
@@ -7834,6 +7937,26 @@ readdir({directory} [, {expr}])
< To skip hidden and backup files: > < To skip hidden and backup files: >
readdir(dirname, {n -> n !~ '^\.\|\~$'}) readdir(dirname, {n -> n !~ '^\.\|\~$'})
< The optional {dict} argument allows for further custom
values. Currently this is used to specify if and how sorting
should be performed. The dict can have the following members:
sort How to sort the result returned from the system.
Valid values are:
"none" do not sort (fastest method)
"case" sort case sensitive (byte value of
each character, technically, using
strcmp()) (default)
"icase" sort case insensitive (technically
using strcasecmp())
"collate" sort using the collation order
of the "POSIX" or "C" |locale|
(technically using strcoll())
Other values are silently ignored.
For example, to get a list of all files in the current
directory without sorting the individual entries: >
readdir('.', '1', #{sort: 'none'})
< If you want to get a directory tree: > < If you want to get a directory tree: >
function! s:tree(dir) function! s:tree(dir)
return {a:dir : map(readdir(a:dir), return {a:dir : map(readdir(a:dir),
@@ -7844,6 +7967,66 @@ readdir({directory} [, {expr}])
< <
Can also be used as a |method|: > Can also be used as a |method|: >
GetDirName()->readdir() GetDirName()->readdir()
<
readdirex({directory} [, {expr} [, {dict}]]) *readdirex()*
Extended version of |readdir()|.
Return a list of Dictionaries with file and directory
information in {directory}.
This is useful if you want to get the attributes of file and
directory at the same time as getting a list of a directory.
This is much faster than calling |readdir()| then calling
|getfperm()|, |getfsize()|, |getftime()| and |getftype()| for
each file and directory especially on MS-Windows.
The list will by default be sorted by name (case sensitive),
the sorting can be changed by using the optional {dict}
argument, see |readdir()|.
The Dictionary for file and directory information has the
following items:
group Group name of the entry. (Only on Unix)
name Name of the entry.
perm Permissions of the entry. See |getfperm()|.
size Size of the entry. See |getfsize()|.
time Timestamp of the entry. See |getftime()|.
type Type of the entry.
On Unix, almost same as |getftype()| except:
Symlink to a dir "linkd"
Other symlink "link"
On MS-Windows:
Normal file "file"
Directory "dir"
Junction "junction"
Symlink to a dir "linkd"
Other symlink "link"
Other reparse point "reparse"
user User name of the entry's owner. (Only on Unix)
On Unix, if the entry is a symlink, the Dictionary includes
the information of the target (except the "type" item).
On MS-Windows, it includes the information of the symlink
itself because of performance reasons.
When {expr} is omitted all entries are included.
When {expr} is given, it is evaluated to check what to do:
If {expr} results in -1 then no further entries will
be handled.
If {expr} results in 0 then this entry will not be
added to the list.
If {expr} results in 1 then this entry will be added
to the list.
The entries "." and ".." are always excluded.
Each time {expr} is evaluated |v:val| is set to a Dictionary
of the entry.
When {expr} is a function the entry is passed as the argument.
For example, to get a list of files ending in ".txt": >
readdirex(dirname, {e -> e.name =~ '.txt$'})
<
For example, to get a list of all files in the current
directory without sorting the individual entries: >
readdirex(dirname, '1', #{sort: 'none'})
<
Can also be used as a |method|: >
GetDirName()->readdirex()
< <
*readfile()* *readfile()*
readfile({fname} [, {type} [, {max}]]) readfile({fname} [, {type} [, {max}]])
@@ -7882,6 +8065,26 @@ readfile({fname} [, {type} [, {max}]])
Can also be used as a |method|: > Can also be used as a |method|: >
GetFileName()->readfile() GetFileName()->readfile()
reduce({object}, {func} [, {initial}]) *reduce()* *E998*
{func} is called for every item in {object}, which can be a
|List| or a |Blob|. {func} is called with two arguments: the
result so far and current item. After processing all items
the result is returned.
{initial} is the initial result. When omitted, the first item
in {object} is used and {func} is first called for the second
item. If {initial} is not given and {object} is empty no
result can be computed, an E998 error is given.
Examples: >
echo reduce([1, 3, 5], { acc, val -> acc + val })
echo reduce(['x', 'y'], { acc, val -> acc .. val }, 'a')
echo reduce(0z1122, { acc, val -> 2 * acc + val })
<
Can also be used as a |method|: >
echo mylist->reduce({ acc, val -> acc + val }, 0)
reg_executing() *reg_executing()* reg_executing() *reg_executing()*
Returns the single letter name of the register being executed. Returns the single letter name of the register being executed.
Returns an empty string when no register is being executed. Returns an empty string when no register is being executed.
@@ -8257,8 +8460,9 @@ screenstring({row}, {col}) *screenstring()*
Can also be used as a |method|: > Can also be used as a |method|: >
GetRow()->screenstring(col) GetRow()->screenstring(col)
<
search({pattern} [, {flags} [, {stopline} [, {timeout}]]]) *search()* *search()*
search({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]])
Search for regexp pattern {pattern}. The search starts at the Search for regexp pattern {pattern}. The search starts at the
cursor position (you can use |cursor()| to set it). cursor position (you can use |cursor()| to set it).
@@ -8306,6 +8510,15 @@ search({pattern} [, {flags} [, {stopline} [, {timeout}]]]) *search()*
giving the argument. giving the argument.
{only available when compiled with the |+reltime| feature} {only available when compiled with the |+reltime| feature}
If the {skip} expression is given it is evaluated with the
cursor positioned on the start of a match. If it evaluates to
non-zero this match is skipped. This can be used, for
example, to skip a match in a comment or a string.
{skip} can be a string, which is evaluated as an expression, a
function reference or a lambda.
When {skip} is omitted or empty, every match is accepted.
When evaluating {skip} causes an error the search is aborted
and -1 returned.
*search()-sub-match* *search()-sub-match*
With the 'p' flag the returned value is one more than the With the 'p' flag the returned value is one more than the
first sub-match in \(\). One if none of them matched but the first sub-match in \(\). One if none of them matched but the
@@ -8347,6 +8560,128 @@ search({pattern} [, {flags} [, {stopline} [, {timeout}]]]) *search()*
Can also be used as a |method|: > Can also be used as a |method|: >
GetPattern()->search() GetPattern()->search()
searchcount([{options}]) *searchcount()*
Get or update the last search count, like what is displayed
without the "S" flag in 'shortmess'. This works even if
'shortmess' does contain the "S" flag.
This returns a Dictionary. The dictionary is empty if the
previous pattern was not set and "pattern" was not specified.
key type meaning ~
current |Number| current position of match;
0 if the cursor position is
before the first match
exact_match |Boolean| 1 if "current" is matched on
"pos", otherwise 0
total |Number| total count of matches found
incomplete |Number| 0: search was fully completed
1: recomputing was timed out
2: max count exceeded
For {options} see further down.
To get the last search count when |n| or |N| was pressed, call
this function with `recompute: 0` . This sometimes returns
wrong information because |n| and |N|'s maximum count is 99.
If it exceeded 99 the result must be max count + 1 (100). If
you want to get correct information, specify `recompute: 1`: >
" result == maxcount + 1 (100) when many matches
let result = searchcount(#{recompute: 0})
" Below returns correct result (recompute defaults
" to 1)
let result = searchcount()
<
The function is useful to add the count to |statusline|: >
function! LastSearchCount() abort
let result = searchcount(#{recompute: 0})
if empty(result)
return ''
endif
if result.incomplete ==# 1 " timed out
return printf(' /%s [?/??]', @/)
elseif result.incomplete ==# 2 " max count exceeded
if result.total > result.maxcount &&
\ result.current > result.maxcount
return printf(' /%s [>%d/>%d]', @/,
\ result.current, result.total)
elseif result.total > result.maxcount
return printf(' /%s [%d/>%d]', @/,
\ result.current, result.total)
endif
endif
return printf(' /%s [%d/%d]', @/,
\ result.current, result.total)
endfunction
let &statusline .= '%{LastSearchCount()}'
" Or if you want to show the count only when
" 'hlsearch' was on
" let &statusline .=
" \ '%{v:hlsearch ? LastSearchCount() : ""}'
<
You can also update the search count, which can be useful in a
|CursorMoved| or |CursorMovedI| autocommand: >
autocmd CursorMoved,CursorMovedI *
\ let s:searchcount_timer = timer_start(
\ 200, function('s:update_searchcount'))
function! s:update_searchcount(timer) abort
if a:timer ==# s:searchcount_timer
call searchcount(#{
\ recompute: 1, maxcount: 0, timeout: 100})
redrawstatus
endif
endfunction
<
This can also be used to count matched texts with specified
pattern in the current buffer using "pattern": >
" Count '\<foo\>' in this buffer
" (Note that it also updates search count)
let result = searchcount(#{pattern: '\<foo\>'})
" To restore old search count by old pattern,
" search again
call searchcount()
<
{options} must be a Dictionary. It can contain:
key type meaning ~
recompute |Boolean| if |TRUE|, recompute the count
like |n| or |N| was executed.
otherwise returns the last
computed result (when |n| or
|N| was used when "S" is not
in 'shortmess', or this
function was called).
(default: |TRUE|)
pattern |String| recompute if this was given
and different with |@/|.
this works as same as the
below command is executed
before calling this function >
let @/ = pattern
< (default: |@/|)
timeout |Number| 0 or negative number is no
timeout. timeout milliseconds
for recomputing the result
(default: 0)
maxcount |Number| 0 or negative number is no
limit. max count of matched
text while recomputing the
result. if search exceeded
total count, "total" value
becomes `maxcount + 1`
(default: 0)
pos |List| `[lnum, col, off]` value
when recomputing the result.
this changes "current" result
value. see |cursor()|, |getpos()
(default: cursor's position)
searchdecl({name} [, {global} [, {thisblock}]]) *searchdecl()* searchdecl({name} [, {global} [, {thisblock}]]) *searchdecl()*
Search for the declaration of {name}. Search for the declaration of {name}.
@@ -8467,7 +8802,8 @@ searchpairpos({start}, {middle}, {end} [, {flags} [, {skip}
< <
See |match-parens| for a bigger and more useful example. See |match-parens| for a bigger and more useful example.
searchpos({pattern} [, {flags} [, {stopline} [, {timeout}]]]) *searchpos()* *searchpos()*
searchpos({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]])
Same as |search()|, but returns a |List| with the line and Same as |search()|, but returns a |List| with the line and
column position of the match. The first element of the |List| column position of the match. The first element of the |List|
is the line number and the second element is the byte index of is the line number and the second element is the byte index of
@@ -8817,6 +9153,11 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
nr list number in the quickfix stack; zero nr list number in the quickfix stack; zero
means the current quickfix list and "$" means means the current quickfix list and "$" means
the last quickfix list. the last quickfix list.
quickfixtextfunc
function to get the text to display in the
quickfix window. Refer to
|quickfix-window-function| for an explanation
of how to write the function and an example.
title quickfix list title text. See |quickfix-title| title quickfix list title text. See |quickfix-title|
Unsupported keys in {what} are ignored. Unsupported keys in {what} are ignored.
If the "nr" item is not present, then the current quickfix list If the "nr" item is not present, then the current quickfix list
@@ -8845,8 +9186,8 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
setreg({regname}, {value} [, {options}]) setreg({regname}, {value} [, {options}])
Set the register {regname} to {value}. Set the register {regname} to {value}.
If {regname} is "" or "@", the unnamed register '"' is used. If {regname} is "" or "@", the unnamed register '"' is used.
{value} may be any value returned by |getreg()|, including {value} may be any value returned by |getreg()| or
a |List|. |getreginfo()|, including a |List| or |Dict|.
If {options} contains "a" or {regname} is upper case, If {options} contains "a" or {regname} is upper case,
then the value is appended. then the value is appended.
{options} can also contain a register type specification: {options} can also contain a register type specification:
@@ -8873,9 +9214,13 @@ setreg({regname}, {value} [, {options}])
:call setreg(v:register, @*) :call setreg(v:register, @*)
:call setreg('*', @%, 'ac') :call setreg('*', @%, 'ac')
:call setreg('a', "1\n2\n3", 'b5') :call setreg('a', "1\n2\n3", 'b5')
:call setreg('"', { 'points_to': 'a'})
< This example shows using the functions to save and restore a < This example shows using the functions to save and restore a
register: > register: >
:let var_a = getreginfo()
:call setreg('a', var_a)
< or:
:let var_a = getreg('a', 1, 1) :let var_a = getreg('a', 1, 1)
:let var_amode = getregtype('a') :let var_amode = getregtype('a')
.... ....
@@ -9041,7 +9386,9 @@ simplify({filename}) *simplify()*
Unix) are not resolved. If the first path component in Unix) are not resolved. If the first path component in
{filename} designates the current directory, this will be {filename} designates the current directory, this will be
valid for the result as well. A trailing path separator is valid for the result as well. A trailing path separator is
not removed either. not removed either. On Unix "//path" is unchanged, but
"///path" is simplified to "/path" (this follows the Posix
standard).
Example: > Example: >
simplify("./dir/.././/file/") == "./file/" simplify("./dir/.././/file/") == "./file/"
< Note: The combination "dir/.." is only removed if "dir" is < Note: The combination "dir/.." is only removed if "dir" is
@@ -9236,9 +9583,8 @@ spellbadword([{sentence}])
echo spellbadword("the quik brown fox") echo spellbadword("the quik brown fox")
< ['quik', 'bad'] ~ < ['quik', 'bad'] ~
The spelling information for the current window is used. The The spelling information for the current window and the value
'spell' option must be set and the value of 'spelllang' is of 'spelllang' are used.
used.
Can also be used as a |method|: > Can also be used as a |method|: >
GetText()->spellbadword() GetText()->spellbadword()
@@ -9263,8 +9609,7 @@ spellsuggest({word} [, {max} [, {capital}]])
although it may appear capitalized. although it may appear capitalized.
The spelling information for the current window is used. The The spelling information for the current window is used. The
'spell' option must be set and the values of 'spelllang' and values of 'spelllang' and 'spellsuggest' are used.
'spellsuggest' are used.
Can also be used as a |method|: > Can also be used as a |method|: >
GetWord()->spellsuggest() GetWord()->spellsuggest()
@@ -9412,8 +9757,8 @@ str2nr({expr} [, {base} [, {quoted}]]) *str2nr()*
< <
When {base} is 16 a leading "0x" or "0X" is ignored. With a When {base} is 16 a leading "0x" or "0X" is ignored. With a
different base the result will be zero. Similarly, when different base the result will be zero. Similarly, when
{base} is 8 a leading "0" is ignored, and when {base} is 2 a {base} is 8 a leading "0", "0o" or "0O" is ignored, and when
leading "0b" or "0B" is ignored. {base} is 2 a leading "0b" or "0B" is ignored.
Text after the number is silently ignored. Text after the number is silently ignored.
Can also be used as a |method|: > Can also be used as a |method|: >
@@ -10091,6 +10436,41 @@ tempname() *tempname()* *temp-file-name*
term_ functions are documented here: |terminal-function-details| term_ functions are documented here: |terminal-function-details|
terminalprops() *terminalprops()*
Returns a dictionary with properties of the terminal that Vim
detected from the response to |t_RV| request. See
|v:termresponse| for the response itself. If |v:termresponse|
is empty most values here will be 'u' for unknown.
cursor_style wether sending |t_RS| works **
cursor_blink_mode wether sending |t_RC| works **
underline_rgb whether |t_8u| works **
mouse mouse type supported
** value 'u' for unknown, 'y' for yes, 'n' for no
If the |+termresponse| feature is missing then the result is
an empty dictionary.
If "cursor_style" is 'y' then |t_RS| will be sent to request the
current cursor style.
If "cursor_blink_mode" is 'y' then |t_RC| will be sent to
request the cursor blink status.
"cursor_style" and "cursor_blink_mode" are also set if |t_u7|
is not empty, Vim will detect the working of sending |t_RS|
and |t_RC| on startup.
When "underline_rgb" is not 'y', then |t_8u| will be made empty.
This avoids sending it to xterm, which would clear the colors.
For "mouse" the value 'u' is unknown
Also see:
- 'ambiwidth' - detected by using |t_u7|.
- |v:termstyleresp| and |v:termblinkresp| for the response to
|t_RS| and |t_RC|.
test_ functions are documented here: |test-functions-details| test_ functions are documented here: |test-functions-details|
@@ -10222,13 +10602,22 @@ tr({src}, {fromstr}, {tostr}) *tr()*
Can also be used as a |method|: > Can also be used as a |method|: >
GetText()->tr(from, to) GetText()->tr(from, to)
trim({text} [, {mask}]) *trim()* trim({text} [, {mask} [, {dir}]]) *trim()*
Return {text} as a String where any character in {mask} is Return {text} as a String where any character in {mask} is
removed from the beginning and end of {text}. removed from the beginning and/or end of {text}.
If {mask} is not given, {mask} is all characters up to 0x20, If {mask} is not given, {mask} is all characters up to 0x20,
which includes Tab, space, NL and CR, plus the non-breaking which includes Tab, space, NL and CR, plus the non-breaking
space character 0xa0. space character 0xa0.
This code deals with multibyte characters properly.
The optional {dir} argument specifies where to remove the
characters:
0 remove from the beginning and end of {text}
1 remove only at the beginning of {text}
2 remove only at the end of {text}
When omitted both ends are trimmed.
This function deals with multibyte characters properly.
Examples: > Examples: >
echo trim(" some text ") echo trim(" some text ")
@@ -10236,7 +10625,9 @@ trim({text} [, {mask}]) *trim()*
echo trim(" \r\t\t\r RESERVE \t\n\x0B\xA0") . "_TAIL" echo trim(" \r\t\t\r RESERVE \t\n\x0B\xA0") . "_TAIL"
< returns "RESERVE_TAIL" > < returns "RESERVE_TAIL" >
echo trim("rm<Xrm<>X>rrm", "rm<>") echo trim("rm<Xrm<>X>rrm", "rm<>")
< returns "Xrm<>X" (characters in the middle are not removed) < returns "Xrm<>X" (characters in the middle are not removed) >
echo trim(" vim ", " ", 2)
< returns " vim"
Can also be used as a |method|: > Can also be used as a |method|: >
GetText()->trim() GetText()->trim()
@@ -10475,7 +10866,10 @@ win_getid([{win} [, {tab}]]) *win_getid()*
win_gettype([{nr}]) *win_gettype()* win_gettype([{nr}]) *win_gettype()*
Return the type of the window: Return the type of the window:
"autocmd" autocommand window. Temporary window
used to execute autocommands.
"popup" popup window |popup| "popup" popup window |popup|
"preview" preview window |preview-window|
"command" command-line window |cmdwin| "command" command-line window |cmdwin|
(empty) normal window (empty) normal window
"unknown" window {nr} not found "unknown" window {nr} not found
@@ -11436,6 +11830,9 @@ like this: >
:call filename#funcname() :call filename#funcname()
These functions are always global, in Vim9 script "g:" needs to be used: >
:call g:filename#funcname()
When such a function is called, and it is not defined yet, Vim will search the When such a function is called, and it is not defined yet, Vim will search the
"autoload" directories in 'runtimepath' for a script file called "autoload" directories in 'runtimepath' for a script file called
"filename.vim". For example "~/.vim/autoload/filename.vim". That file should "filename.vim". For example "~/.vim/autoload/filename.vim". That file should
@@ -11447,7 +11844,11 @@ then define the function like this: >
The file name and the name used before the # in the function must match The file name and the name used before the # in the function must match
exactly, and the defined function must have the name exactly as it will be exactly, and the defined function must have the name exactly as it will be
called. called. In Vim9 script the "g:" prefix must be used: >
function g:filename#funcname()
or for a compiled function: >
def g:filename#funcname()
It is possible to use subdirectories. Every # in the function name works like It is possible to use subdirectories. Every # in the function name works like
a path separator. Thus when calling a function: > a path separator. Thus when calling a function: >
@@ -11530,6 +11931,9 @@ This does NOT work: >
============================================================================== ==============================================================================
7. Commands *expression-commands* 7. Commands *expression-commands*
Note: in Vim9 script `:let` is used for variable declaration, not assignment.
An assignment leaves out the `:let` command. |vim9-declaration|
:let {var-name} = {expr1} *:let* *E18* :let {var-name} = {expr1} *:let* *E18*
Set internal variable {var-name} to the result of the Set internal variable {var-name} to the result of the
expression {expr1}. The variable will get the type expression {expr1}. The variable will get the type
@@ -11752,12 +12156,14 @@ text...
s: script-local variables s: script-local variables
l: local function variables l: local function variables
v: Vim variables. v: Vim variables.
This does not work in Vim9 script. |vim9-declaration|
:let List the values of all variables. The type of the :let List the values of all variables. The type of the
variable is indicated before the value: variable is indicated before the value:
<nothing> String <nothing> String
# Number # Number
* Funcref * Funcref
This does not work in Vim9 script. |vim9-declaration|
:unl[et][!] {name} ... *:unlet* *:unl* *E108* *E795* :unl[et][!] {name} ... *:unlet* *:unl* *E108* *E795*
Remove the internal variable {name}. Several variable Remove the internal variable {name}. Several variable
@@ -13352,13 +13758,16 @@ instead of failing in mysterious ways.
< <
*scriptversion-4* > *scriptversion-4* >
:scriptversion 4 :scriptversion 4
< Numbers with a leading zero are not recognized as octal. With the < Numbers with a leading zero are not recognized as octal. "0o" or "0O"
is still recognized as octal. With the
previous version you get: > previous version you get: >
echo 017 " displays 15 echo 017 " displays 15 (octal)
echo 018 " displays 18 echo 0o17 " displays 15 (octal)
echo 018 " displays 18 (decimal)
< with script version 4: > < with script version 4: >
echo 017 " displays 17 echo 017 " displays 17 (decimal)
echo 018 " displays 18 echo 0o17 " displays 15 (octal)
echo 018 " displays 18 (decimal)
< Also, it is possible to use single quotes inside numbers to make them < Also, it is possible to use single quotes inside numbers to make them
easier to read: > easier to read: >
echo 1'000'000 echo 1'000'000

48
runtime/doc/evim-tr.1 Normal file
View File

@@ -0,0 +1,48 @@
.TH EVIM 1 "16 <20>ubat 2002"
.SH AD
evim \- kolay Vim, bir dosyay<61> Vim ile herhangi bir kip olmadan d<>zenleyin
.SH <EFBFBD>ZET
.br
.B evim
[se<73>enekler] [dosya ..]
.br
.B eview
.SH TANIM
.B eVim,
.B Vim'i
ba<EFBFBD>lat<EFBFBD>r ve onu herhangi bir kipsiz d<>zenleyici gibi davranmas<61>n<EFBFBD> sa<73>lar.
Bu bildi<64>iniz Vim'dir, ancak bir t<>kla ve yaz d<>zenleyicisi gibi <20>al<61><6C><EFBFBD>r.
Bir <20>rnek vermek gerekirse MS-Windows <20>zerindeki Not Defteri gibi d<><64><EFBFBD>n<EFBFBD>n.
.B eVim
men<EFBFBD>lere ve ara<72> <20>ubuklar<61>na eri<72>im sa<73>layabilmeniz i<>in grafik arabirimde <20>al<61><6C><EFBFBD>r.
.PP
Yaln<EFBFBD>zca Vim ile normal bi<62>imde <20>al<61><6C>amayan ki<6B>ilerin kullan<61>m<EFBFBD> i<>indir.
Dosya d<>zenleme i<>i <20>ok daha verimsiz olacakt<6B>r.
.PP
.B eview'<27>n
ayn<EFBFBD>s<EFBFBD>d<EFBFBD>r, ancak saltokunur kipte ba<62>lar. evim \-R ile de ba<62>lat<61>labilir.
.PP
Vim hakk<6B>nda ayr<79>nt<6E>l<EFBFBD> bilgi i<>in: vim(1)
.PP
Do<EFBFBD>rudan metin giri<72>ini sa<73>layabilmek i<>in 'insertmode' se<73>ene<6E>i a<><61>l<EFBFBD>r.
.br
E<EFBFBD>lemlemeler Kopyala ve Yap<61><70>t<EFBFBD>r MS-Windows ile ayn<79> olacak bi<62>imde ayarlan<61>r.
CTRL-X metni keser, CTRL-C metni kopyalar ve CTRL-V metni yap<61><70>t<EFBFBD>r<EFBFBD>r.
CTRL-V'nin orijinal i<>levi i<>in CTRL-Q kullan<61>n.
.SH SE<EFBFBD>ENEKLER
Bilgi i<>in: vim(1).
.SH DOSYALAR
.TP 15
/usr/local/lib/vim/evim.vim
eVim'i ilklendirmek i<>in kullan<61>lan betik.
.SH NAM-I D<EFBFBD><EFBFBD>ER
Nam-<2D> di<64>er "Lastik <20>izmeliler i<>in Vim" (Gumbies, Monty Python).
eVim'i kullan<61>rken bir mendili al<61>p iki ucundan birer d<><64><EFBFBD>m yapman<61>z
ve kafan<61>za takman<61>z beklenir.
.SH AYRICA BAKINIZ
vim(1)
.SH YAZAR
.B Vim'in
b<EFBFBD>y<EFBFBD>k <20>o<EFBFBD>unlu<6C>u Bram Moolenaar taraf<61>ndan ba<62>kalar<61>n<EFBFBD>n kayda de<64>er
yard<EFBFBD>mlar<EFBFBD>yla yaz<61>lm<6C><6D>t<EFBFBD>r.
Ek bilgi i<>in Yard<72>m/Te<54>ekk<6B>rler men<65>s<EFBFBD>ne bak<61>n.

View File

@@ -0,0 +1,48 @@
.TH EVIM 1 "16 Şubat 2002"
.SH AD
evim \- kolay Vim, bir dosyayı Vim ile herhangi bir kip olmadan düzenleyin
.SH ÖZET
.br
.B evim
[seçenekler] [dosya ..]
.br
.B eview
.SH TANIM
.B eVim,
.B Vim'i
başlatır ve onu herhangi bir kipsiz düzenleyici gibi davranmasını sağlar.
Bu bildiğiniz Vim'dir, ancak bir tıkla ve yaz düzenleyicisi gibi çalışır.
Bir örnek vermek gerekirse MS-Windows üzerindeki Not Defteri gibi düşünün.
.B eVim
menülere ve araç çubuklarına erişim sağlayabilmeniz için grafik arabirimde çalışır.
.PP
Yalnızca Vim ile normal biçimde çalışamayan kişilerin kullanımı içindir.
Dosya düzenleme işi çok daha verimsiz olacaktır.
.PP
.B eview'ün
aynısıdır, ancak saltokunur kipte başlar. evim \-R ile de başlatılabilir.
.PP
Vim hakkında ayrıntılı bilgi için: vim(1)
.PP
Doğrudan metin girişini sağlayabilmek için 'insertmode' seçeneği açılır.
.br
Eşlemlemeler Kopyala ve Yapıştır MS-Windows ile aynı olacak biçimde ayarlanır.
CTRL-X metni keser, CTRL-C metni kopyalar ve CTRL-V metni yapıştırır.
CTRL-V'nin orijinal işlevi için CTRL-Q kullanın.
.SH SEÇENEKLER
Bilgi için: vim(1).
.SH DOSYALAR
.TP 15
/usr/local/lib/vim/evim.vim
eVim'i ilklendirmek için kullanılan betik.
.SH NAM-I DİĞER
Nam-ı diğer "Lastik Çizmeliler için Vim" (Gumbies, Monty Python).
eVim'i kullanırken bir mendili alıp iki ucundan birer düğüm yapmanız
ve kafanıza takmanız beklenir.
.SH AYRICA BAKINIZ
vim(1)
.SH YAZAR
.B Vim'in
büyük çoğunluğu Bram Moolenaar tarafından başkalarının kayda değer
yardımlarıyla yazılmıştır.
Ek bilgi için Yardım/Teşekkürler menüsüne bakın.

View File

@@ -1,4 +1,4 @@
*gui_x11.txt* For Vim version 8.2. Last change: 2019 May 05 *gui_x11.txt* For Vim version 8.2. Last change: 2020 Jun 05
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -356,6 +356,9 @@ need to set those up in some sort of gtkrc file. You'll have to refer
to the GTK documentation, however little there is, on how to do this. to the GTK documentation, however little there is, on how to do this.
See http://developer.gnome.org/doc/API/2.0/gtk/gtk-Resource-Files.html See http://developer.gnome.org/doc/API/2.0/gtk/gtk-Resource-Files.html
for more information. for more information.
*gtk3-slow*
If you are using GTK3 and Vim appears to be slow, try setting the environment
variable $GDK_RENDERING to "image".
Tooltip Colors ~ Tooltip Colors ~

View File

@@ -570,9 +570,15 @@ The examples below assume a 'shiftwidth' of 4.
with "#" does not work. with "#" does not work.
PN When N is non-zero recognize C pragmas, and indent them like any
other code; does not concern other preprocessor directives.
When N is zero (default): don't recognize C pragmas, treating
them like every other preprocessor directive.
The defaults, spelled out in full, are: The defaults, spelled out in full, are:
cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,N0,E0,ps,ts,is,+s, cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,N0,E0,ps,ts,is,+s,
c3,C0,/0,(2s,us,U0,w0,W0,k0,m0,j0,J0,)20,*70,#0 c3,C0,/0,(2s,us,U0,w0,W0,k0,m0,j0,J0,)20,*70,#0,P0
Vim puts a line in column 1 if: Vim puts a line in column 1 if:
- It starts with '#' (preprocessor directives), if 'cinkeys' contains '#0'. - It starts with '#' (preprocessor directives), if 'cinkeys' contains '#0'.

View File

@@ -1,4 +1,4 @@
*index.txt* For Vim version 8.2. Last change: 2020 May 26 *index.txt* For Vim version 8.2. Last change: 2020 May 31
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -85,7 +85,7 @@ tag char action in Insert mode ~
|i_CTRL-R_CTRL-P| CTRL-R CTRL-P {register} |i_CTRL-R_CTRL-P| CTRL-R CTRL-P {register}
insert the contents of a register literally insert the contents of a register literally
and fix indent. and fix indent.
CTRL-S (used for terminal control flow) CTRL-S not used or used for terminal control flow
|i_CTRL-T| CTRL-T insert one shiftwidth of indent in current |i_CTRL-T| CTRL-T insert one shiftwidth of indent in current
line line
|i_CTRL-U| CTRL-U delete all entered characters in the current |i_CTRL-U| CTRL-U delete all entered characters in the current
@@ -220,9 +220,9 @@ tag char note action in Normal mode ~
|CTRL-N| CTRL-N 1 same as "j" |CTRL-N| CTRL-N 1 same as "j"
|CTRL-O| CTRL-O 1 go to N older entry in jump list |CTRL-O| CTRL-O 1 go to N older entry in jump list
|CTRL-P| CTRL-P 1 same as "k" |CTRL-P| CTRL-P 1 same as "k"
CTRL-Q (used for terminal control flow) CTRL-Q not used, or used for terminal control flow
|CTRL-R| CTRL-R 2 redo changes which were undone with 'u' |CTRL-R| CTRL-R 2 redo changes which were undone with 'u'
CTRL-S (used for terminal control flow) CTRL-S not used, or used for terminal control flow
|CTRL-T| CTRL-T jump to N older Tag in tag list |CTRL-T| CTRL-T jump to N older Tag in tag list
|CTRL-U| CTRL-U scroll N lines Upwards (default: half a |CTRL-U| CTRL-U scroll N lines Upwards (default: half a
screen) screen)
@@ -828,7 +828,7 @@ tag char note action in Normal mode ~
|zD| zD delete folds recursively |zD| zD delete folds recursively
|zE| zE eliminate all folds |zE| zE eliminate all folds
|zF| zF create a fold for N lines |zF| zF create a fold for N lines
|zG| zG temporarily mark word as good spelled word |zG| zG temporarily mark word as correctly spelled
|zH| zH when 'wrap' off scroll half a screenwidth |zH| zH when 'wrap' off scroll half a screenwidth
to the right to the right
|zL| zL when 'wrap' off scroll half a screenwidth |zL| zL when 'wrap' off scroll half a screenwidth
@@ -837,7 +837,7 @@ tag char note action in Normal mode ~
|zN| zN set 'foldenable' |zN| zN set 'foldenable'
|zO| zO open folds recursively |zO| zO open folds recursively
|zR| zR set 'foldlevel' to the deepest fold |zR| zR set 'foldlevel' to the deepest fold
|zW| zW temporarily mark word as bad spelled word |zW| zW temporarily mark word as incorrectly spelled
|zX| zX re-apply 'foldlevel' |zX| zX re-apply 'foldlevel'
|z^| z^ cursor on line N (default line above |z^| z^ cursor on line N (default line above
window), otherwise like "z-" window), otherwise like "z-"
@@ -849,7 +849,7 @@ tag char note action in Normal mode ~
position the cursor at the end (right side) position the cursor at the end (right side)
of the screen of the screen
|zf| zf{motion} create a fold for Nmove text |zf| zf{motion} create a fold for Nmove text
|zg| zg permanently mark word as good spelled word |zg| zg permanently mark word as correctly spelled
|zh| zh when 'wrap' off scroll screen N characters |zh| zh when 'wrap' off scroll screen N characters
to the right to the right
|zi| zi toggle 'foldenable' |zi| zi toggle 'foldenable'
@@ -870,7 +870,7 @@ tag char note action in Normal mode ~
|zuW| zuW undo |zW| |zuW| zuW undo |zW|
|zuG| zuG undo |zG| |zuG| zuG undo |zG|
|zv| zv open enough folds to view the cursor line |zv| zv open enough folds to view the cursor line
|zw| zw permanently mark word as bad spelled word |zw| zw permanently mark word as incorrectly spelled
|zx| zx re-apply 'foldlevel' and do "zv" |zx| zx re-apply 'foldlevel' and do "zv"
|zz| zz redraw, cursor line at center of window |zz| zz redraw, cursor line at center of window
|z<Left>| z<Left> same as "zh" |z<Left>| z<Left> same as "zh"
@@ -1056,7 +1056,7 @@ tag command action in Command-line editing mode ~
|c_CTRL-R_CTRL-O| CTRL-R CTRL-O {regname} |c_CTRL-R_CTRL-O| CTRL-R CTRL-O {regname}
insert the contents of a register or object insert the contents of a register or object
under the cursor literally under the cursor literally
CTRL-S (used for terminal control flow) CTRL-S not used, or used for terminal control flow
|c_CTRL-T| CTRL-T previous match when 'incsearch' is active |c_CTRL-T| CTRL-T previous match when 'incsearch' is active
|c_CTRL-U| CTRL-U remove all characters |c_CTRL-U| CTRL-U remove all characters
|c_CTRL-V| CTRL-V insert next non-digit literally, insert three |c_CTRL-V| CTRL-V insert next non-digit literally, insert three

View File

@@ -1,4 +1,4 @@
*intro.txt* For Vim version 8.2. Last change: 2019 Nov 11 *intro.txt* For Vim version 8.2. Last change: 2020 May 30
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -121,14 +121,16 @@ http://www.vim.org/maillist.php
Bug reports: *bugs* *bug-reports* *bugreport.vim* Bug reports: *bugs* *bug-reports* *bugreport.vim*
There are two ways to report bugs, both work: There are three ways to report bugs:
1. Send bug reports to: Vim Developers <vim-dev@vim.org> 1. Open an issue on GitHub: https://github.com/vim/vim/issues
The text will be forwarded to the vim-dev maillist.
2. For issues with runtime files, look in the header for an email address or
any other way to report it to the maintainer.
3. Send bug reports to: Vim Developers <vim-dev@vim.org>
This is a maillist, you need to become a member first and many people will This is a maillist, you need to become a member first and many people will
see the message. If you don't want that, e.g. because it is a security see the message. If you don't want that, e.g. because it is a security
issue, send it to <bugs@vim.org>, this only goes to the Vim maintainer issue, send it to <bugs@vim.org>, this only goes to the Vim maintainer
(that's Bram). (that's Bram).
2. Open an issue on GitHub: https://github.com/vim/vim/issues
The text will be forwarded to the vim-dev maillist.
Please be brief; all the time that is spent on answering mail is subtracted Please be brief; all the time that is spent on answering mail is subtracted
from the time that is spent on improving Vim! Always give a reproducible from the time that is spent on improving Vim! Always give a reproducible

View File

@@ -1,4 +1,4 @@
*mlang.txt* For Vim version 8.2. Last change: 2019 May 05 *mlang.txt* For Vim version 8.2. Last change: 2020 Jun 16
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -37,6 +37,7 @@ use of "-" and "_".
:lan[guage] mes[sages] :lan[guage] mes[sages]
:lan[guage] cty[pe] :lan[guage] cty[pe]
:lan[guage] tim[e] :lan[guage] tim[e]
:lan[guage] col[late]
Print the current language (aka locale). Print the current language (aka locale).
With the "messages" argument the language used for With the "messages" argument the language used for
messages is printed. Technical: LC_MESSAGES. messages is printed. Technical: LC_MESSAGES.
@@ -44,15 +45,19 @@ use of "-" and "_".
character encoding is printed. Technical: LC_CTYPE. character encoding is printed. Technical: LC_CTYPE.
With the "time" argument the language used for With the "time" argument the language used for
strftime() is printed. Technical: LC_TIME. strftime() is printed. Technical: LC_TIME.
With the "collate" argument the language used for
collation order is printed. Technical: LC_COLLATE.
Without argument all parts of the locale are printed Without argument all parts of the locale are printed
(this is system dependent). (this is system dependent).
The current language can also be obtained with the The current language can also be obtained with the
|v:lang|, |v:ctype| and |v:lc_time| variables. |v:lang|, |v:ctype|, |v:collate| and |v:lc_time|
variables.
:lan[guage] {name} :lan[guage] {name}
:lan[guage] mes[sages] {name} :lan[guage] mes[sages] {name}
:lan[guage] cty[pe] {name} :lan[guage] cty[pe] {name}
:lan[guage] tim[e] {name} :lan[guage] tim[e] {name}
:lan[guage] col[late] {name}
Set the current language (aka locale) to {name}. Set the current language (aka locale) to {name}.
The locale {name} must be a valid locale on your The locale {name} must be a valid locale on your
system. Some systems accept aliases like "en" or system. Some systems accept aliases like "en" or
@@ -72,7 +77,10 @@ use of "-" and "_".
With the "time" argument the language used for time With the "time" argument the language used for time
and date messages is set. This affects strftime(). and date messages is set. This affects strftime().
This sets $LC_TIME. This sets $LC_TIME.
Without an argument both are set, and additionally With the "collate" argument the language used for the
collation order is set. This affects sorting of
characters. This sets $LC_COLLATE.
Without an argument all are set, and additionally
$LANG is set. $LANG is set.
When compiled with the |+float| feature the LC_NUMERIC When compiled with the |+float| feature the LC_NUMERIC
value will always be set to "C", so that floating value will always be set to "C", so that floating

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 8.2. Last change: 2020 May 03 *options.txt* For Vim version 8.2. Last change: 2020 Jun 10
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -5232,7 +5232,7 @@ A jump table for the options with a short description can be found at |Q_op|.
< If your terminal can't overrule the mouse events going to the < If your terminal can't overrule the mouse events going to the
application, use: > application, use: >
:set mouse=nvi :set mouse=nvi
< The you can press ":", select text for the system, and press Esc to go < Then you can press ":", select text for the system, and press Esc to go
back to Vim using the mouse events. back to Vim using the mouse events.
In |defaults.vim| "nvi" is used if the 'term' option is not matching In |defaults.vim| "nvi" is used if the 'term' option is not matching
"xterm". "xterm".
@@ -5427,6 +5427,15 @@ A jump table for the options with a short description can be found at |Q_op|.
bin If included, numbers starting with "0b" or "0B" will be bin If included, numbers starting with "0b" or "0B" will be
considered to be binary. Example: Using CTRL-X on considered to be binary. Example: Using CTRL-X on
"0b1000" subtracts one, resulting in "0b0111". "0b1000" subtracts one, resulting in "0b0111".
unsigned If included, numbers are recognized as unsigned. Thus a
leading dash or negative sign won't be considered as part of
the number. Examples:
Using CTRL-X on "2020" in "9-2020" results in "9-2019"
(without "unsigned" it would become "9-2021").
Using CTRL-A on "2020" in "9-2020" results in "9-2021"
(without "unsigned" it would become "9-2019").
Using CTRL-X on "0" or CTRL-A on "18446744073709551615"
(2^64 - 1) has no effect, overflow is prevented.
Numbers which simply begin with a digit in the range 1-9 are always Numbers which simply begin with a digit in the range 1-9 are always
considered decimal. This also happens for numbers that are not considered decimal. This also happens for numbers that are not
recognized as octal or hex. recognized as octal or hex.
@@ -5889,6 +5898,21 @@ A jump table for the options with a short description can be found at |Q_op|.
'pyxversion' has no effect. The pyx* functions and commands are 'pyxversion' has no effect. The pyx* functions and commands are
always the same as the compiled version. always the same as the compiled version.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'quickfixtextfunc'* *'qftf'*
'quickfixtextfunc' 'qftf' string (default "")
global
{only available when compiled with the |+quickfix|
feature}
This option specifies a function to be used to get the text to display
in the quickfix and location list windows. This can be used to
customize the information displayed in the quickfix or location window
for each entry in the corresponding quickfix or location list. See
|quickfix-window-function| for an explanation of how to write the
function and an example.
This option cannot be set from a |modeline| or in the |sandbox|, for This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons. security reasons.
@@ -7081,6 +7105,16 @@ A jump table for the options with a short description can be found at |Q_op|.
up to the first character that is not an ASCII letter or number and up to the first character that is not an ASCII letter or number and
not a dash. Also see |set-spc-auto|. not a dash. Also see |set-spc-auto|.
*'spelloptions'* *'spo'*
'spelloptions' 'spo' string (default "")
local to buffer
{not available when compiled without the |+syntax|
feature}
A comma separated list of options for spell checking:
camel When a word is CamelCased, assume "Cased" is a
separate word: every upper-case character in a word
that comes after a lower case character indicates the
start of a new word.
*'spellsuggest'* *'sps'* *'spellsuggest'* *'sps'*
'spellsuggest' 'sps' string (default "best") 'spellsuggest' 'sps' string (default "best")
@@ -7672,7 +7706,6 @@ A jump table for the options with a short description can be found at |Q_op|.
'term' string (default is $TERM, if that fails: 'term' string (default is $TERM, if that fails:
in the GUI: "builtin_gui" in the GUI: "builtin_gui"
on Amiga: "amiga" on Amiga: "amiga"
on BeOS: "beos-ansi"
on Haiku: "xterm" on Haiku: "xterm"
on Mac: "mac-ansi" on Mac: "mac-ansi"
on MiNT: "vt52" on MiNT: "vt52"
@@ -8331,7 +8364,9 @@ A jump table for the options with a short description can be found at |Q_op|.
>= 12 Every executed function. >= 12 Every executed function.
>= 13 When an exception is thrown, caught, finished, or discarded. >= 13 When an exception is thrown, caught, finished, or discarded.
>= 14 Anything pending in a ":finally" clause. >= 14 Anything pending in a ":finally" clause.
>= 15 Every executed Ex command (truncated at 200 characters). >= 15 Every executed Ex command from a script (truncated at 200
characters).
>= 16 Every executed Ex command
This option can also be set with the "-V" argument. See |-V|. This option can also be set with the "-V" argument. See |-V|.
This option is also set by the |:verbose| command. This option is also set by the |:verbose| command.
@@ -8521,8 +8556,6 @@ A jump table for the options with a short description can be found at |Q_op|.
*'virtualedit'* *'ve'* *'virtualedit'* *'ve'*
'virtualedit' 've' string (default "") 'virtualedit' 've' string (default "")
global global
{not available when compiled without the
|+virtualedit| feature}
A comma separated list of these words: A comma separated list of these words:
block Allow virtual editing in Visual block mode. block Allow virtual editing in Visual block mode.
insert Allow virtual editing in Insert mode. insert Allow virtual editing in Insert mode.

View File

@@ -1,320 +1,13 @@
*os_beos.txt* For Vim version 8.2. Last change: 2016 Mar 28 *os_beos.txt* For Vim version 8.2. Last change: 2020 Jun 07
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
*BeOS* *BeBox* *beos* *BeOS* *BeBox*
This is a port of Vim 5.1 to the BeOS Preview Release 2 (also known as PR2) This file used to contain particularities for the BeOS port of Vim.
or later.
This file contains the particularities for the BeBox/BeOS version of Vim. For The BeOS support was removed in patch 8.2.0849.
matters not discussed in this file, Vim behaves very much like the Unix
|os_unix.txt| version.
1. General |beos-general|
2. Compiling Vim |beos-compiling|
3. Timeout in the Terminal |beos-timeout|
4. Unicode vs. Latin1 |beos-unicode|
5. The BeOS GUI |beos-gui|
6. The $VIM directory |beos-vimdir|
7. Drag & Drop |beos-dragndrop|
8. Single Launch vs. Multiple
Launch |beos-launch|
9. Fonts |beos-fonts|
10. The meta key modifier |beos-meta|
11. Mouse key mappings |beos-mouse|
12. Color names |beos-colors|
13. Compiling with Perl |beos-perl|
1. General *beos-general*
The default syntax highlighting mostly works with different foreground colors
to highlight items. This works best if you set your Terminal window to a
darkish background and light letters. Some middle-grey background (for
instance (r,g,b)=(168,168,168)) with black letters also works nicely. If you
use the default light background and dark letters, it may look better to
simply reverse the notion of foreground and background color settings. To do
this, add this to your .vimrc file (where <Esc> may need to be replaced with
the escape character): >
:if &term == "beos-ansi"
: set t_AB=<Esc>[3%dm
: set t_AF=<Esc>[4%dm
:endif
2. Compiling Vim *beos-compiling*
From the Advanced Access Preview Release (AAPR) on, Vim can be configured with
the standard configure script. To get the compiler and its flags right, use
the following command-line in the shell (you can cut and paste it in one go):
CC=$BE_C_COMPILER CFLAGS="$BE_DEFAULT_C_FLAGS -O7" \
./configure --prefix=/boot/home/config
$BE_C_COMPILER is usually "mwcc", $BE_DEFAULT_C_FLAGS is usually "-I- -I."
When configure has run, and you wish to enable GUI support, you must edit the
config.mk file so that the lines with GUI_xxx refer to $(BEOSGUI_xxx) instead
of $(NONE_xxx).
Alternatively you can make this change in the Makefile; it will have a
more permanent effect. Search for "NONE_".
After compilation you need to add the resources to the binary. Add the
following few lines near the end (before the line with "exit $exit_value") of
the link.sh script to do this automatically.
rmattr BEOS:TYPE vim
copyres os_beos.rsrc vim
mimeset vim
Also, create a dummy file "strip":
#!/bin/sh
mimeset $1
exit 0
You will need it when using "make install" to install Vim.
Now type "make" to compile Vim, then "make install" to install it.
If you want to install Vim by hand, you must copy Vim to $HOME/config/bin, and
create a bunch of symlinks to it ({g,r,rg}{vim,ex,view}). Furthermore you must
copy Vim's configuration files to $HOME/config/share/vim:
vim-5.0s/{*.vim,doc,syntax}. For completeness, you should also copy the nroff
manual pages to $HOME/config/man/man1. Don't forget ctags/ctags and xxd/xxd!
Obviously, you need the unlimited linker to actually link Vim. See
http://www.metrowerks.com for purchasing the CodeWarrior compiler for BeOS.
There are currently no other linkers that can do the job.
This won't be able to include the Perl or Python interfaces even if
you have the appropriate files installed. |beos-perl|
3. Timeout in the Terminal *beos-timeout*
Because some POSIX/UNIX features are still missing[1], there is no direct OS
support for read-with-timeout in the Terminal. This would mean that you cannot
use :mappings of more than one character, unless you also :set notimeout.
|'timeout'|
To circumvent this problem, I added a workaround to provide the necessary
input with timeout by using an extra thread which reads ahead one character.
As a side effect, it also makes Vim recognize when the Terminal window
resizes.
Function keys are not supported in the Terminal since they produce very
indistinctive character sequences.
These problems do not exist in the GUI.
[1]: there is no select() on file descriptors; also the termios VMIN and VTIME
settings do not seem to work properly. This has been the case since DR7 at
least and still has not been fixed as of PR2.
*beos-unicode*
4. Unicode vs. Latin1 *beos-utf8*
BeOS uses Unicode and UTF-8 for text strings (16-bit characters encoded to
8-bit characters). Vim assumes ISO-Latin1 or other 8-bit character codes.
This does not produce the desired results for non-ASCII characters. Try the
command :digraphs to see. If they look messed up, use :set isprint=@ to
(slightly) improve the display of ISO-Latin1 characters 128-255. This works
better in the GUI, depending on which font you use (below).
You may also use the /boot/bin/xtou command to convert UTF-8 files from (xtou
-f iso1 filename) or to (xtou -t iso1 filename) ISO-Latin1 characters.
5. The BeOS GUI *beos-gui*
The BeOS GUI is no longer included. It was not maintained for a while and
most likely didn't work. If you want to work on this: get the Vim 6.x version
and merge it back in.
6. The $VIM directory *beos-vimdir*
$VIM is the symbolic name for the place where Vim's support files are stored.
The default value for $VIM is set at compile time and can be determined with >
:version
The normal value is /boot/home/config/share/vim. If you don't like it you can
set the VIM environment variable to override this, or set 'helpfile' in your
.vimrc: >
:if version >= 500
: set helpfile=~/vim/vim54/doc/help.txt
: syntax on
:endif
7. Drag & Drop *beos-dragndrop*
You can drop files and directories on either the Vim icon (starts a new Vim
session, unless you use the File Types application to set Vim to be "Single
Launch") or on the Vim window (starts editing the files). Dropping a folder
sets Vim's current working directory. |:cd| |:pwd| If you drop files or
folders with either SHIFT key pressed, Vim changes directory to the folder
that contains the first item dropped. When starting Vim, there is no need to
press shift: Vim behaves as if you do.
Files dropped set the current argument list. |argument-list|
8. Single Launch vs. Multiple Launch *beos-launch*
As distributed Vim's Application Flags (as seen in the FileTypes preference)
are set to Multiple Launch. If you prefer, you can set them to Single Launch
instead. Attempts to start a second copy of Vim will cause the first Vim to
open the files instead. This works from the Tracker but also from the command
line. In the latter case, non-file (option) arguments are not supported.
NB: Only the GUI version has a BApplication (and hence Application Flags).
This section does not apply to the GUI-less version, should you compile one.
9. Fonts *beos-fonts*
Set fonts with >
:set guifont=Courier10_BT/Roman/10
where the first part is the font family, the second part the style, and the
third part the size. You can use underscores instead of spaces in family and
style.
Best results are obtained with monospaced fonts (such as Courier). Vim
attempts to use all fonts in B_FIXED_SPACING mode but apparently this does not
work for proportional fonts (despite what the BeBook says).
Vim also tries to use the B_ISO8859_1 encoding, also known as ISO Latin 1.
This also does not work for all fonts. It does work for Courier, but not for
ProFontISOLatin1/Regular (strangely enough). You can verify this by giving the >
:digraphs
command, which lists a bunch of characters with their ISO Latin 1 encoding.
If, for instance, there are "box" characters among them, or the last character
isn't a dotted-y, then for this font the encoding does not work.
If the font you specify is unavailable, you get the system fixed font.
Standard fixed-width system fonts are:
ProFontISOLatin1/Regular
Courier10_BT/Roman
Courier10_BT/Italic
Courier10_BT/Bold
Courier10_BT/Bold_Italic
Standard proportional system fonts are:
Swis721_BT/Roman
Swis721_BT/Italic
Swis721_BT/Bold
Swis721_BT/Bold_Italic
Dutch801_Rm_BT/Roman
Dutch801_Rm_BT/Italic
Dutch801_Rm_BT/Bold
Dutch801_Rm_BT/Bold_Italic
Baskerville/Roman
Baskerville/Italic
Baskerville/Bold
Baskerville/Bold_Italic
SymbolProp_BT/Regular
Try some of them, just for fun.
10. The meta key modifier *beos-meta*
The META key modifier is obtained by the left or right OPTION keys. This is
because the ALT (aka COMMAND) keys are not passed to applications.
11. Mouse key mappings *beos-mouse*
Vim calls the various mouse buttons LeftMouse, MiddleMouse and RightMouse. If
you use the default Mouse preference settings these names indeed correspond to
reality. Vim uses this mapping:
Button 1 -> LeftMouse,
Button 2 -> RightMouse,
Button 3 -> MiddleMouse.
If your mouse has fewer than 3 buttons you can provide your own mapping from
mouse clicks with modifier(s) to other mouse buttons. See the swapmouse
package for an example: |gui-mouse-mapping|
$VIMRUNTIME/pack/dist/opt/swapmouse/plugin/swapmouse.vim
12. Color names *beos-colors*
Vim has a number of color names built-in. Additional names are read from the
file $VIMRUNTIME/rgb.txt, if present. This file is basically the color
database from X. Names used from this file are cached for efficiency.
13. Compiling with Perl *beos-perl*
Compiling with Perl support enabled is slightly tricky. The Metrowerks
compiler has some strange ideas where to search for include files. Since
several include files with Perl have the same names as some Vim header
files, the wrong ones get included. To fix this, run the following Perl
script while in the vim-5.0/src directory: >
preproc.pl > perl.h
#!/bin/env perl
# Simple #include expander, just good enough for the Perl header files.
use strict;
use IO::File;
use Config;
sub doinclude
{
my $filename = $_[0];
my $fh = new IO::File($filename, "r");
if (defined $fh) {
print "/* Start of $filename */\n";
while (<$fh>) {
if (/^#include "(.*)"/) {
doinclude($1);
print "/* Back in $filename */\n";
} else {
print $_;
}
}
print "/* End of $filename */\n";
undef $fh;
} else {
print "/* Cannot open $filename */\n";
print "#include \"$filename\"\n";
}
}
chdir $Config{installarchlib}."/CORE";
doinclude "perl.h";
It expands the "perl.h" header file, using only other Perl header files.
Now you can configure & make Vim with the --enable-perlinterp option.
Be warned though that this adds about 616 kilobytes to the size of Vim!
Without Perl, Vim with default features and GUI is about 575K, with Perl
it is about 1191K.
-Olaf Seibert
[Note: these addresses no longer work:]
<rhialto@polder.ubc.kun.nl>
http://polder.ubc.kun.nl/~rhialto/be
vim:tw=78:ts=8:noet:ft=help:norl: vim:tw=78:ts=8:noet:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*os_vms.txt* For Vim version 8.2. Last change: 2019 Jan 29 *os_vms.txt* For Vim version 8.2. Last change: 2020 Jun 07
VIM REFERENCE MANUAL VIM REFERENCE MANUAL
@@ -432,7 +432,6 @@ Terminal entry not found in termcap
builtin_gui builtin_gui
builtin_riscos builtin_riscos
builtin_amiga builtin_amiga
builtin_beos-ansi
builtin_ansi builtin_ansi
builtin_vt320 builtin_vt320
builtin_vt52 builtin_vt52

View File

@@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 8.2. Last change: 2020 Jan 06 *quickfix.txt* For Vim version 8.2. Last change: 2020 May 31
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -15,6 +15,7 @@ This subject is introduced in section |30.1| of the user manual.
7. The error format |error-file-format| 7. The error format |error-file-format|
8. The directory stack |quickfix-directory-stack| 8. The directory stack |quickfix-directory-stack|
9. Specific error file formats |errorformats| 9. Specific error file formats |errorformats|
10. Customizing the quickfix window |quickfix-window-function|
The quickfix commands are not available when the |+quickfix| feature was The quickfix commands are not available when the |+quickfix| feature was
disabled at compile time. disabled at compile time.
@@ -1374,7 +1375,11 @@ Basic items
%v virtual column number (finds a number representing %v virtual column number (finds a number representing
screen column of the error (1 <tab> == 8 screen screen column of the error (1 <tab> == 8 screen
columns)) columns))
%t error type (finds a single character) %t error type (finds a single character):
e - error message
w - warning message
i - info message
n - note message
%n error number (finds a number) %n error number (finds a number)
%m error message (finds a string) %m error message (finds a string)
%r matches the "rest" of a single-line file message %O/P/Q %r matches the "rest" of a single-line file message %O/P/Q
@@ -1445,6 +1450,7 @@ prefixes are:
%E start of a multi-line error message %E start of a multi-line error message
%W start of a multi-line warning message %W start of a multi-line warning message
%I start of a multi-line informational message %I start of a multi-line informational message
%N start of a multi-line note message
%A start of a multi-line message (unspecified type) %A start of a multi-line message (unspecified type)
%> for next line start with current pattern again |efm-%>| %> for next line start with current pattern again |efm-%>|
%C continuation of a multi-line message %C continuation of a multi-line message
@@ -1921,6 +1927,67 @@ error messages into a format that quickfix mode will understand. See the
start of the file about how to use it. (This script is deprecated, see start of the file about how to use it. (This script is deprecated, see
|compiler-perl|.) |compiler-perl|.)
=============================================================================
10. Customizing the quickfix window *quickfix-window-function*
The default format for the lines displayed in the quickfix window and location
list window is:
<filename>|<lnum> col <col>|<text>
The values displayed in each line correspond to the "bufnr", "lnum", "col" and
"text" fields returned by the |getqflist()| function.
For some quickfix/location lists, the displayed text need to be customized.
For example, if only the filename is present for a quickfix entry, then the
two "|" field separator characters after the filename are not needed. Another
use case is to customize the path displayed for a filename. By default, the
complete path (which may be too long) is displayed for files which are not
under the current directory tree. The file path may need to be simplified to a
common parent directory.
The displayed text can be customized by setting the 'quickfixtextfunc' option
to a Vim function. This function will be called with a dict argument and
should return a List of strings to be displayed in the quickfix or location
list window. The dict argument will have the following fields:
quickfix set to 1 when called for a quickfix list and 0 when called for
a location list.
winid for a location list, set to the id of the window with the
location list. For a quickfix list, set to 0. Can be used in
getloclist() to get the location list entry.
id quickfix or location list identifier
start_idx index of the first entry for which text should be returned
end_idx index of the last entry for which text should be returned
The function should return a single line of text to display in the quickfix
window for each entry from start_idx to end_idx. The function can obtain
information about the entries using the |getqflist()| function and specifying
the quickfix list identifier "id". For a location list, getloclist() function
can be used with the 'winid' argument.
If a quickfix or location list specific customization is needed, then the
'quickfixtextfunc' attribute of the list can be set using the |setqflist()| or
|setloclist()| function. This overrides the global 'quickfixtextfunc' option.
The example below displays the list of old files (|v:oldfiles|) in a quickfix
window. As there is no line, column number and error text information
associated with each entry, the 'quickfixtextfunc' function returns only the
filename.
Example: >
" create a quickfix list from v:oldfiles
call setqflist([], ' ', {'lines' : v:oldfiles, 'efm' : '%f',
\ 'quickfixtextfunc' : 'QfOldFiles'})
func QfOldFiles(info)
" get information about a range of quickfix entries
let items = getqflist({'id' : a:info.id, 'items' : 1}).items
let l = []
for idx in range(a:info.start_idx - 1, a:info.end_idx - 1)
" use the simplified file name
call add(l, fnamemodify(bufname(items[idx].bufnr), ':p:.'))
endfor
return l
endfunc
<
vim:tw=78:ts=8:noet:ft=help:norl: vim:tw=78:ts=8:noet:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 8.2. Last change: 2020 Jan 17 *quickref.txt* For Vim version 8.2. Last change: 2020 Jun 10
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -851,6 +851,7 @@ Short explanation of each option: *option-list*
'pythonthreedll' name of the Python 3 dynamic library 'pythonthreedll' name of the Python 3 dynamic library
'pythonthreehome' name of the Python 3 home directory 'pythonthreehome' name of the Python 3 home directory
'pyxversion' 'pyx' Python version used for pyx* commands 'pyxversion' 'pyx' Python version used for pyx* commands
'quickfixtextfunc' 'qftf' function for the text in the quickfix window
'quoteescape' 'qe' escape characters used in a string 'quoteescape' 'qe' escape characters used in a string
'readonly' 'ro' disallow writing the buffer 'readonly' 'ro' disallow writing the buffer
'redrawtime' 'rdt' timeout for 'hlsearch' and |:match| highlighting 'redrawtime' 'rdt' timeout for 'hlsearch' and |:match| highlighting
@@ -909,6 +910,7 @@ Short explanation of each option: *option-list*
'spellcapcheck' 'spc' pattern to locate end of a sentence 'spellcapcheck' 'spc' pattern to locate end of a sentence
'spellfile' 'spf' files where |zg| and |zw| store words 'spellfile' 'spf' files where |zg| and |zw| store words
'spelllang' 'spl' language(s) to do spell checking for 'spelllang' 'spl' language(s) to do spell checking for
'spelloptions' 'spo' options for spell checking
'spellsuggest' 'sps' method(s) used to suggest spelling corrections 'spellsuggest' 'sps' method(s) used to suggest spelling corrections
'splitbelow' 'sb' new window from split is below the current one 'splitbelow' 'sb' new window from split is below the current one
'splitright' 'spr' new window is put right of the current one 'splitright' 'spr' new window is put right of the current one

View File

@@ -163,6 +163,11 @@ q Stops recording. (Implementation note: The 'q' that
result of evaluating the expression is executed as an result of evaluating the expression is executed as an
Ex command. Ex command.
Mappings are not recognized in these commands. Mappings are not recognized in these commands.
When the |line-continuation| character (\) is present
at the beginning of a line in a linewise register,
then it is combined with the previous line. This is
useful for yanking and executing parts of a Vim
script.
Future: Will execute the register for each line in the Future: Will execute the register for each line in the
address range. address range.

View File

@@ -1,4 +1,4 @@
*spell.txt* For Vim version 8.2. Last change: 2019 Aug 16 *spell.txt* For Vim version 8.2. Last change: 2020 Jun 10
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -215,6 +215,9 @@ When there is a line break right after a sentence the highlighting of the next
line may be postponed. Use |CTRL-L| when needed. Also see |set-spc-auto| for line may be postponed. Use |CTRL-L| when needed. Also see |set-spc-auto| for
how it can be set automatically when 'spelllang' is set. how it can be set automatically when 'spelllang' is set.
The 'spelloptions' option has a few more flags that influence the way spell
checking works.
Vim counts the number of times a good word is encountered. This is used to Vim counts the number of times a good word is encountered. This is used to
sort the suggestions: words that have been seen before get a small bonus, sort the suggestions: words that have been seen before get a small bonus,
words that have been seen often get a bigger bonus. The COMMON item in the words that have been seen often get a bigger bonus. The COMMON item in the

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 8.2. Last change: 2020 Feb 29 *syntax.txt* For Vim version 8.2. Last change: 2020 Jun 01
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1214,11 +1214,13 @@ DESKTOP *desktop.vim* *ft-desktop-syntax*
Primary goal of this syntax file is to highlight .desktop and .directory files Primary goal of this syntax file is to highlight .desktop and .directory files
according to freedesktop.org standard: according to freedesktop.org standard:
http://standards.freedesktop.org/desktop-entry-spec/latest/ https://specifications.freedesktop.org/desktop-entry-spec/latest/
But actually almost none implements this standard fully. Thus it will To highlight nonstandard extensions that does not begin with X-, set >
highlight all Unix ini files. But you can force strict highlighting according let g:desktop_enable_nonstd = 1
to standard by placing this in your vimrc file: > Note that this may cause wrong highlight.
:let enforce_freedesktop_standard = 1 To highlight KDE-reserved features, set >
let g:desktop_enable_kde = 1
g:desktop_enable_kde follows g:desktop_enable_nonstd if not supplied
DIFF *diff.vim* DIFF *diff.vim*
@@ -3636,6 +3638,26 @@ DEFINING CASE *:syn-case* *E390*
:sy[ntax] case :sy[ntax] case
Show either "syntax case match" or "syntax case ignore" (translated). Show either "syntax case match" or "syntax case ignore" (translated).
DEFINING FOLDLEVEL *:syn-foldlevel*
:sy[ntax] foldlevel [start | minimum]
This defines how the foldlevel of a line is computed when using
foldmethod=syntax (see |fold-syntax| and |:syn-fold|):
start: Use level of item containing start of line.
minimum: Use lowest local-minimum level of items on line.
The default is 'start'. Use 'minimum' to search a line horizontally
for the lowest level contained on the line that is followed by a
higher level. This produces more natural folds when syntax items
may close and open horizontally within a line.
:sy[ntax] foldlevel
Show either "syntax foldlevel start" or "syntax foldlevel minimum".
{not meaningful when Vim was compiled without |+folding| feature}
SPELL CHECKING *:syn-spell* SPELL CHECKING *:syn-spell*
:sy[ntax] spell [toplevel | notoplevel | default] :sy[ntax] spell [toplevel | notoplevel | default]
@@ -4099,6 +4121,8 @@ This will make each {} block form one fold.
The fold will start on the line where the item starts, and end where the item The fold will start on the line where the item starts, and end where the item
ends. If the start and end are within the same line, there is no fold. ends. If the start and end are within the same line, there is no fold.
The 'foldnestmax' option limits the nesting of syntax folds. The 'foldnestmax' option limits the nesting of syntax folds.
See |:syn-foldlevel| to control how the foldlevel of a line is computed
from its syntax items.
{not available when Vim was compiled without |+folding| feature} {not available when Vim was compiled without |+folding| feature}
@@ -4857,7 +4881,12 @@ term={attr-list} *attr-list* *highlight-term* *E418*
have the same effect. have the same effect.
"undercurl" is a curly underline. When "undercurl" is not possible "undercurl" is a curly underline. When "undercurl" is not possible
then "underline" is used. In general "undercurl" and "strikethrough" then "underline" is used. In general "undercurl" and "strikethrough"
is only available in the GUI. The color is set with |highlight-guisp|. are only available in the GUI and some terminals. The color is set
with |highlight-guisp| or |highlight-ctermul|. You can try these
termcap entries to make undercurl work in a terminal: >
let &t_Cs = "\e[4:3m"
let &t_Ce = "\e[4:0m"
start={term-list} *highlight-start* *E422* start={term-list} *highlight-start* *E422*
stop={term-list} *term-list* *highlight-stop* stop={term-list} *term-list* *highlight-stop*
@@ -4901,6 +4930,10 @@ cterm={attr-list} *highlight-cterm*
ctermfg={color-nr} *highlight-ctermfg* *E421* ctermfg={color-nr} *highlight-ctermfg* *E421*
ctermbg={color-nr} *highlight-ctermbg* ctermbg={color-nr} *highlight-ctermbg*
ctermul={color-nr} *highlight-ctermul*
These give the foreground (ctermfg), background (ctermbg) and
underline (ctermul) color to use in the terminal.
The {color-nr} argument is a color number. Its range is zero to The {color-nr} argument is a color number. Its range is zero to
(not including) the number given by the termcap entry "Co". (not including) the number given by the termcap entry "Co".
The actual color with this number depends on the type of terminal The actual color with this number depends on the type of terminal
@@ -4978,11 +5011,11 @@ ctermbg={color-nr} *highlight-ctermbg*
needs to reset the color when exiting. This is done with the "op" needs to reset the color when exiting. This is done with the "op"
termcap entry |t_op|. If this doesn't work correctly, try setting the termcap entry |t_op|. If this doesn't work correctly, try setting the
't_op' option in your .vimrc. 't_op' option in your .vimrc.
*E419* *E420* *E419* *E420* *E453*
When Vim knows the normal foreground and background colors, "fg" and When Vim knows the normal foreground, background and underline colors,
"bg" can be used as color names. This only works after setting the "fg", "bg" and "ul" can be used as color names. This only works after
colors for the Normal group and for the MS-Windows console. Example, setting the colors for the Normal group and for the MS-Windows
for reverse video: > console. Example, for reverse video: >
:highlight Visual ctermfg=bg ctermbg=fg :highlight Visual ctermfg=bg ctermbg=fg
< Note that the colors are used that are valid at the moment this < Note that the colors are used that are valid at the moment this
command are given. If the Normal group colors are changed later, the command are given. If the Normal group colors are changed later, the

View File

@@ -810,6 +810,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'pyx' options.txt /*'pyx'* 'pyx' options.txt /*'pyx'*
'pyxversion' options.txt /*'pyxversion'* 'pyxversion' options.txt /*'pyxversion'*
'qe' options.txt /*'qe'* 'qe' options.txt /*'qe'*
'qftf' options.txt /*'qftf'*
'quickfixtextfunc' options.txt /*'quickfixtextfunc'*
'quote motion.txt /*'quote* 'quote motion.txt /*'quote*
'quoteescape' options.txt /*'quoteescape'* 'quoteescape' options.txt /*'quoteescape'*
'rdt' options.txt /*'rdt'* 'rdt' options.txt /*'rdt'*
@@ -913,11 +915,13 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'spellcapcheck' options.txt /*'spellcapcheck'* 'spellcapcheck' options.txt /*'spellcapcheck'*
'spellfile' options.txt /*'spellfile'* 'spellfile' options.txt /*'spellfile'*
'spelllang' options.txt /*'spelllang'* 'spelllang' options.txt /*'spelllang'*
'spelloptions' options.txt /*'spelloptions'*
'spellsuggest' options.txt /*'spellsuggest'* 'spellsuggest' options.txt /*'spellsuggest'*
'spf' options.txt /*'spf'* 'spf' options.txt /*'spf'*
'spl' options.txt /*'spl'* 'spl' options.txt /*'spl'*
'splitbelow' options.txt /*'splitbelow'* 'splitbelow' options.txt /*'splitbelow'*
'splitright' options.txt /*'splitright'* 'splitright' options.txt /*'splitright'*
'spo' options.txt /*'spo'*
'spr' options.txt /*'spr'* 'spr' options.txt /*'spr'*
'sps' options.txt /*'sps'* 'sps' options.txt /*'sps'*
'sr' options.txt /*'sr'* 'sr' options.txt /*'sr'*
@@ -956,10 +960,12 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
't_&8' term.txt /*'t_&8'* 't_&8' term.txt /*'t_&8'*
't_8b' term.txt /*'t_8b'* 't_8b' term.txt /*'t_8b'*
't_8f' term.txt /*'t_8f'* 't_8f' term.txt /*'t_8f'*
't_8u' term.txt /*'t_8u'*
't_@7' term.txt /*'t_@7'* 't_@7' term.txt /*'t_@7'*
't_AB' term.txt /*'t_AB'* 't_AB' term.txt /*'t_AB'*
't_AF' term.txt /*'t_AF'* 't_AF' term.txt /*'t_AF'*
't_AL' term.txt /*'t_AL'* 't_AL' term.txt /*'t_AL'*
't_AU' term.txt /*'t_AU'*
't_BD' term.txt /*'t_BD'* 't_BD' term.txt /*'t_BD'*
't_BE' term.txt /*'t_BE'* 't_BE' term.txt /*'t_BE'*
't_CS' term.txt /*'t_CS'* 't_CS' term.txt /*'t_CS'*
@@ -1922,6 +1928,10 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
45.3 usr_45.txt /*45.3* 45.3 usr_45.txt /*45.3*
45.4 usr_45.txt /*45.4* 45.4 usr_45.txt /*45.4*
45.5 usr_45.txt /*45.5* 45.5 usr_45.txt /*45.5*
46.1 usr_46.txt /*46.1*
46.2 usr_46.txt /*46.2*
46.3 usr_46.txt /*46.3*
46.? usr_46.txt /*46.?*
8g8 various.txt /*8g8* 8g8 various.txt /*8g8*
90.1 usr_90.txt /*90.1* 90.1 usr_90.txt /*90.1*
90.2 usr_90.txt /*90.2* 90.2 usr_90.txt /*90.2*
@@ -2587,6 +2597,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:lbuffer quickfix.txt /*:lbuffer* :lbuffer quickfix.txt /*:lbuffer*
:lc editing.txt /*:lc* :lc editing.txt /*:lc*
:lcd editing.txt /*:lcd* :lcd editing.txt /*:lcd*
:lcd- editing.txt /*:lcd-*
:lch editing.txt /*:lch* :lch editing.txt /*:lch*
:lchdir editing.txt /*:lchdir* :lchdir editing.txt /*:lchdir*
:lcl quickfix.txt /*:lcl* :lcl quickfix.txt /*:lcl*
@@ -2894,6 +2905,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:put change.txt /*:put* :put change.txt /*:put*
:pw editing.txt /*:pw* :pw editing.txt /*:pw*
:pwd editing.txt /*:pwd* :pwd editing.txt /*:pwd*
:pwd-verbose editing.txt /*:pwd-verbose*
:py if_pyth.txt /*:py* :py if_pyth.txt /*:py*
:py3 if_pyth.txt /*:py3* :py3 if_pyth.txt /*:py3*
:py3do if_pyth.txt /*:py3do* :py3do if_pyth.txt /*:py3do*
@@ -3197,6 +3209,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:syn-file-remarks syntax.txt /*:syn-file-remarks* :syn-file-remarks syntax.txt /*:syn-file-remarks*
:syn-files syntax.txt /*:syn-files* :syn-files syntax.txt /*:syn-files*
:syn-fold syntax.txt /*:syn-fold* :syn-fold syntax.txt /*:syn-fold*
:syn-foldlevel syntax.txt /*:syn-foldlevel*
:syn-include syntax.txt /*:syn-include* :syn-include syntax.txt /*:syn-include*
:syn-iskeyword syntax.txt /*:syn-iskeyword* :syn-iskeyword syntax.txt /*:syn-iskeyword*
:syn-keepend syntax.txt /*:syn-keepend* :syn-keepend syntax.txt /*:syn-keepend*
@@ -3277,6 +3290,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:tags tagsrch.txt /*:tags* :tags tagsrch.txt /*:tags*
:tc if_tcl.txt /*:tc* :tc if_tcl.txt /*:tc*
:tcd editing.txt /*:tcd* :tcd editing.txt /*:tcd*
:tcd- editing.txt /*:tcd-*
:tch editing.txt /*:tch* :tch editing.txt /*:tch*
:tchdir editing.txt /*:tchdir* :tchdir editing.txt /*:tchdir*
:tcl if_tcl.txt /*:tcl* :tcl if_tcl.txt /*:tcl*
@@ -3878,10 +3892,12 @@ E101 diff.txt /*E101*
E102 diff.txt /*E102* E102 diff.txt /*E102*
E103 diff.txt /*E103* E103 diff.txt /*E103*
E104 digraph.txt /*E104* E104 digraph.txt /*E104*
E1042 vim9.txt /*E1042*
E105 mbyte.txt /*E105* E105 mbyte.txt /*E105*
E107 eval.txt /*E107* E107 eval.txt /*E107*
E108 eval.txt /*E108* E108 eval.txt /*E108*
E109 eval.txt /*E109* E109 eval.txt /*E109*
E1094 vim9.txt /*E1094*
E11 cmdline.txt /*E11* E11 cmdline.txt /*E11*
E110 eval.txt /*E110* E110 eval.txt /*E110*
E111 eval.txt /*E111* E111 eval.txt /*E111*
@@ -4249,6 +4265,7 @@ E448 various.txt /*E448*
E449 eval.txt /*E449* E449 eval.txt /*E449*
E45 message.txt /*E45* E45 message.txt /*E45*
E452 eval.txt /*E452* E452 eval.txt /*E452*
E453 syntax.txt /*E453*
E455 print.txt /*E455* E455 print.txt /*E455*
E456 print.txt /*E456* E456 print.txt /*E456*
E457 print.txt /*E457* E457 print.txt /*E457*
@@ -4723,6 +4740,7 @@ E897 eval.txt /*E897*
E898 channel.txt /*E898* E898 channel.txt /*E898*
E899 eval.txt /*E899* E899 eval.txt /*E899*
E90 message.txt /*E90* E90 message.txt /*E90*
E900 eval.txt /*E900*
E901 channel.txt /*E901* E901 channel.txt /*E901*
E902 channel.txt /*E902* E902 channel.txt /*E902*
E903 channel.txt /*E903* E903 channel.txt /*E903*
@@ -4829,6 +4847,7 @@ E994 eval.txt /*E994*
E995 eval.txt /*E995* E995 eval.txt /*E995*
E996 eval.txt /*E996* E996 eval.txt /*E996*
E997 popup.txt /*E997* E997 popup.txt /*E997*
E998 eval.txt /*E998*
E999 repeat.txt /*E999* E999 repeat.txt /*E999*
EX intro.txt /*EX* EX intro.txt /*EX*
EXINIT starting.txt /*EXINIT* EXINIT starting.txt /*EXINIT*
@@ -5049,6 +5068,7 @@ SessionLoad-variable starting.txt /*SessionLoad-variable*
SessionLoadPost autocmd.txt /*SessionLoadPost* SessionLoadPost autocmd.txt /*SessionLoadPost*
ShellCmdPost autocmd.txt /*ShellCmdPost* ShellCmdPost autocmd.txt /*ShellCmdPost*
ShellFilterPost autocmd.txt /*ShellFilterPost* ShellFilterPost autocmd.txt /*ShellFilterPost*
SigUSR1 autocmd.txt /*SigUSR1*
SourceCmd autocmd.txt /*SourceCmd* SourceCmd autocmd.txt /*SourceCmd*
SourcePost autocmd.txt /*SourcePost* SourcePost autocmd.txt /*SourcePost*
SourcePre autocmd.txt /*SourcePre* SourcePre autocmd.txt /*SourcePre*
@@ -5440,20 +5460,7 @@ bars help.txt /*bars*
base_font_name_list mbyte.txt /*base_font_name_list* base_font_name_list mbyte.txt /*base_font_name_list*
basic.vim syntax.txt /*basic.vim* basic.vim syntax.txt /*basic.vim*
beep options.txt /*beep* beep options.txt /*beep*
beos-colors os_beos.txt /*beos-colors* beos os_beos.txt /*beos*
beos-compiling os_beos.txt /*beos-compiling*
beos-dragndrop os_beos.txt /*beos-dragndrop*
beos-fonts os_beos.txt /*beos-fonts*
beos-general os_beos.txt /*beos-general*
beos-gui os_beos.txt /*beos-gui*
beos-launch os_beos.txt /*beos-launch*
beos-meta os_beos.txt /*beos-meta*
beos-mouse os_beos.txt /*beos-mouse*
beos-perl os_beos.txt /*beos-perl*
beos-timeout os_beos.txt /*beos-timeout*
beos-unicode os_beos.txt /*beos-unicode*
beos-utf8 os_beos.txt /*beos-utf8*
beos-vimdir os_beos.txt /*beos-vimdir*
better-python-interface version7.txt /*better-python-interface* better-python-interface version7.txt /*better-python-interface*
beval_bufnr-variable eval.txt /*beval_bufnr-variable* beval_bufnr-variable eval.txt /*beval_bufnr-variable*
beval_col-variable eval.txt /*beval_col-variable* beval_col-variable eval.txt /*beval_col-variable*
@@ -5792,6 +5799,7 @@ coding-style develop.txt /*coding-style*
col() eval.txt /*col()* col() eval.txt /*col()*
coldfusion.vim syntax.txt /*coldfusion.vim* coldfusion.vim syntax.txt /*coldfusion.vim*
collapse tips.txt /*collapse* collapse tips.txt /*collapse*
collate-variable eval.txt /*collate-variable*
color-xterm syntax.txt /*color-xterm* color-xterm syntax.txt /*color-xterm*
coloring syntax.txt /*coloring* coloring syntax.txt /*coloring*
colortest.vim syntax.txt /*colortest.vim* colortest.vim syntax.txt /*colortest.vim*
@@ -6332,6 +6340,7 @@ filetype.txt filetype.txt /*filetype.txt*
filetypedetect-changed version6.txt /*filetypedetect-changed* filetypedetect-changed version6.txt /*filetypedetect-changed*
filetypes filetype.txt /*filetypes* filetypes filetype.txt /*filetypes*
filewritable() eval.txt /*filewritable()* filewritable() eval.txt /*filewritable()*
filler-lines windows.txt /*filler-lines*
filter change.txt /*filter* filter change.txt /*filter*
filter() eval.txt /*filter()* filter() eval.txt /*filter()*
find-manpage usr_12.txt /*find-manpage* find-manpage usr_12.txt /*find-manpage*
@@ -6354,6 +6363,7 @@ fixed-7.1 version7.txt /*fixed-7.1*
fixed-7.2 version7.txt /*fixed-7.2* fixed-7.2 version7.txt /*fixed-7.2*
fixed-7.3 version7.txt /*fixed-7.3* fixed-7.3 version7.txt /*fixed-7.3*
fixed-7.4 version7.txt /*fixed-7.4* fixed-7.4 version7.txt /*fixed-7.4*
flatten() eval.txt /*flatten()*
flexwiki.vim syntax.txt /*flexwiki.vim* flexwiki.vim syntax.txt /*flexwiki.vim*
float-e eval.txt /*float-e* float-e eval.txt /*float-e*
float-functions usr_41.txt /*float-functions* float-functions usr_41.txt /*float-functions*
@@ -6910,6 +6920,7 @@ getjumplist() eval.txt /*getjumplist()*
getlatestvimscripts-install pi_getscript.txt /*getlatestvimscripts-install* getlatestvimscripts-install pi_getscript.txt /*getlatestvimscripts-install*
getline() eval.txt /*getline()* getline() eval.txt /*getline()*
getloclist() eval.txt /*getloclist()* getloclist() eval.txt /*getloclist()*
getmarklist() eval.txt /*getmarklist()*
getmatches() eval.txt /*getmatches()* getmatches() eval.txt /*getmatches()*
getmousepos() eval.txt /*getmousepos()* getmousepos() eval.txt /*getmousepos()*
getpid() eval.txt /*getpid()* getpid() eval.txt /*getpid()*
@@ -6917,6 +6928,7 @@ getpos() eval.txt /*getpos()*
getqflist() eval.txt /*getqflist()* getqflist() eval.txt /*getqflist()*
getqflist-examples quickfix.txt /*getqflist-examples* getqflist-examples quickfix.txt /*getqflist-examples*
getreg() eval.txt /*getreg()* getreg() eval.txt /*getreg()*
getreginfo() eval.txt /*getreginfo()*
getregtype() eval.txt /*getregtype()* getregtype() eval.txt /*getregtype()*
getscript pi_getscript.txt /*getscript* getscript pi_getscript.txt /*getscript*
getscript-autoinstall pi_getscript.txt /*getscript-autoinstall* getscript-autoinstall pi_getscript.txt /*getscript-autoinstall*
@@ -6987,6 +6999,7 @@ gstar pattern.txt /*gstar*
gt tabpage.txt /*gt* gt tabpage.txt /*gt*
gtk-css gui_x11.txt /*gtk-css* gtk-css gui_x11.txt /*gtk-css*
gtk-tooltip-colors gui_x11.txt /*gtk-tooltip-colors* gtk-tooltip-colors gui_x11.txt /*gtk-tooltip-colors*
gtk3-slow gui_x11.txt /*gtk3-slow*
gu change.txt /*gu* gu change.txt /*gu*
gugu change.txt /*gugu* gugu change.txt /*gugu*
gui gui.txt /*gui* gui gui.txt /*gui*
@@ -7115,6 +7128,7 @@ highlight-changed version4.txt /*highlight-changed*
highlight-cterm syntax.txt /*highlight-cterm* highlight-cterm syntax.txt /*highlight-cterm*
highlight-ctermbg syntax.txt /*highlight-ctermbg* highlight-ctermbg syntax.txt /*highlight-ctermbg*
highlight-ctermfg syntax.txt /*highlight-ctermfg* highlight-ctermfg syntax.txt /*highlight-ctermfg*
highlight-ctermul syntax.txt /*highlight-ctermul*
highlight-default syntax.txt /*highlight-default* highlight-default syntax.txt /*highlight-default*
highlight-font syntax.txt /*highlight-font* highlight-font syntax.txt /*highlight-font*
highlight-groups syntax.txt /*highlight-groups* highlight-groups syntax.txt /*highlight-groups*
@@ -8549,6 +8563,7 @@ quickfix-title quickfix.txt /*quickfix-title*
quickfix-valid quickfix.txt /*quickfix-valid* quickfix-valid quickfix.txt /*quickfix-valid*
quickfix-window quickfix.txt /*quickfix-window* quickfix-window quickfix.txt /*quickfix-window*
quickfix-window-ID quickfix.txt /*quickfix-window-ID* quickfix-window-ID quickfix.txt /*quickfix-window-ID*
quickfix-window-function quickfix.txt /*quickfix-window-function*
quickfix.txt quickfix.txt /*quickfix.txt* quickfix.txt quickfix.txt /*quickfix.txt*
quickref quickref.txt /*quickref* quickref quickref.txt /*quickref*
quickref.txt quickref.txt /*quickref.txt* quickref.txt quickref.txt /*quickref.txt*
@@ -8599,6 +8614,7 @@ read-messages insert.txt /*read-messages*
read-only-share editing.txt /*read-only-share* read-only-share editing.txt /*read-only-share*
read-stdin version5.txt /*read-stdin* read-stdin version5.txt /*read-stdin*
readdir() eval.txt /*readdir()* readdir() eval.txt /*readdir()*
readdirex() eval.txt /*readdirex()*
readfile() eval.txt /*readfile()* readfile() eval.txt /*readfile()*
readline.vim syntax.txt /*readline.vim* readline.vim syntax.txt /*readline.vim*
recording repeat.txt /*recording* recording repeat.txt /*recording*
@@ -8607,6 +8623,7 @@ recovery recover.txt /*recovery*
recursive_mapping map.txt /*recursive_mapping* recursive_mapping map.txt /*recursive_mapping*
redo undo.txt /*redo* redo undo.txt /*redo*
redo-register undo.txt /*redo-register* redo-register undo.txt /*redo-register*
reduce() eval.txt /*reduce()*
ref intro.txt /*ref* ref intro.txt /*ref*
reference intro.txt /*reference* reference intro.txt /*reference*
reference_toc help.txt /*reference_toc* reference_toc help.txt /*reference_toc*
@@ -8771,6 +8788,7 @@ search-offset pattern.txt /*search-offset*
search-pattern pattern.txt /*search-pattern* search-pattern pattern.txt /*search-pattern*
search-range pattern.txt /*search-range* search-range pattern.txt /*search-range*
search-replace change.txt /*search-replace* search-replace change.txt /*search-replace*
searchcount() eval.txt /*searchcount()*
searchdecl() eval.txt /*searchdecl()* searchdecl() eval.txt /*searchdecl()*
searchforward-variable eval.txt /*searchforward-variable* searchforward-variable eval.txt /*searchforward-variable*
searchpair() eval.txt /*searchpair()* searchpair() eval.txt /*searchpair()*
@@ -8861,11 +8879,13 @@ slow-terminal term.txt /*slow-terminal*
socket-interface channel.txt /*socket-interface* socket-interface channel.txt /*socket-interface*
sort() eval.txt /*sort()* sort() eval.txt /*sort()*
sorting change.txt /*sorting* sorting change.txt /*sorting*
sound-functions usr_41.txt /*sound-functions*
sound_clear() eval.txt /*sound_clear()* sound_clear() eval.txt /*sound_clear()*
sound_playevent() eval.txt /*sound_playevent()* sound_playevent() eval.txt /*sound_playevent()*
sound_playfile() eval.txt /*sound_playfile()* sound_playfile() eval.txt /*sound_playfile()*
sound_stop() eval.txt /*sound_stop()* sound_stop() eval.txt /*sound_stop()*
soundfold() eval.txt /*soundfold()* soundfold() eval.txt /*soundfold()*
source-vim9-script usr_46.txt /*source-vim9-script*
space intro.txt /*space* space intro.txt /*space*
spec-customizing pi_spec.txt /*spec-customizing* spec-customizing pi_spec.txt /*spec-customizing*
spec-how-to-use-it pi_spec.txt /*spec-how-to-use-it* spec-how-to-use-it pi_spec.txt /*spec-how-to-use-it*
@@ -9129,10 +9149,12 @@ t_%i term.txt /*t_%i*
t_&8 term.txt /*t_&8* t_&8 term.txt /*t_&8*
t_8b term.txt /*t_8b* t_8b term.txt /*t_8b*
t_8f term.txt /*t_8f* t_8f term.txt /*t_8f*
t_8u term.txt /*t_8u*
t_@7 term.txt /*t_@7* t_@7 term.txt /*t_@7*
t_AB term.txt /*t_AB* t_AB term.txt /*t_AB*
t_AF term.txt /*t_AF* t_AF term.txt /*t_AF*
t_AL term.txt /*t_AL* t_AL term.txt /*t_AL*
t_AU term.txt /*t_AU*
t_BD term.txt /*t_BD* t_BD term.txt /*t_BD*
t_BE term.txt /*t_BE* t_BE term.txt /*t_BE*
t_CS term.txt /*t_CS* t_CS term.txt /*t_CS*
@@ -9504,6 +9526,7 @@ terminal-unix terminal.txt /*terminal-unix*
terminal-use terminal.txt /*terminal-use* terminal-use terminal.txt /*terminal-use*
terminal-window terminal.txt /*terminal-window* terminal-window terminal.txt /*terminal-window*
terminal.txt terminal.txt /*terminal.txt* terminal.txt terminal.txt /*terminal.txt*
terminalprops() eval.txt /*terminalprops()*
terminfo term.txt /*terminfo* terminfo term.txt /*terminfo*
termresponse-variable eval.txt /*termresponse-variable* termresponse-variable eval.txt /*termresponse-variable*
test-functions usr_41.txt /*test-functions* test-functions usr_41.txt /*test-functions*
@@ -9560,6 +9583,7 @@ text-prop-changes textprop.txt /*text-prop-changes*
text-prop-functions textprop.txt /*text-prop-functions* text-prop-functions textprop.txt /*text-prop-functions*
text-prop-intro textprop.txt /*text-prop-intro* text-prop-intro textprop.txt /*text-prop-intro*
text-properties textprop.txt /*text-properties* text-properties textprop.txt /*text-properties*
text-property-functions usr_41.txt /*text-property-functions*
textlock eval.txt /*textlock* textlock eval.txt /*textlock*
textprop textprop.txt /*textprop* textprop textprop.txt /*textprop*
textprop.txt textprop.txt /*textprop.txt* textprop.txt textprop.txt /*textprop.txt*
@@ -9679,6 +9703,7 @@ usr_42.txt usr_42.txt /*usr_42.txt*
usr_43.txt usr_43.txt /*usr_43.txt* usr_43.txt usr_43.txt /*usr_43.txt*
usr_44.txt usr_44.txt /*usr_44.txt* usr_44.txt usr_44.txt /*usr_44.txt*
usr_45.txt usr_45.txt /*usr_45.txt* usr_45.txt usr_45.txt /*usr_45.txt*
usr_46.txt usr_46.txt /*usr_46.txt*
usr_90.txt usr_90.txt /*usr_90.txt* usr_90.txt usr_90.txt /*usr_90.txt*
usr_toc.txt usr_toc.txt /*usr_toc.txt* usr_toc.txt usr_toc.txt /*usr_toc.txt*
utf-8 mbyte.txt /*utf-8* utf-8 mbyte.txt /*utf-8*
@@ -9700,6 +9725,7 @@ v:charconvert_from eval.txt /*v:charconvert_from*
v:charconvert_to eval.txt /*v:charconvert_to* v:charconvert_to eval.txt /*v:charconvert_to*
v:cmdarg eval.txt /*v:cmdarg* v:cmdarg eval.txt /*v:cmdarg*
v:cmdbang eval.txt /*v:cmdbang* v:cmdbang eval.txt /*v:cmdbang*
v:collate eval.txt /*v:collate*
v:completed_item eval.txt /*v:completed_item* v:completed_item eval.txt /*v:completed_item*
v:count eval.txt /*v:count* v:count eval.txt /*v:count*
v:count1 eval.txt /*v:count1* v:count1 eval.txt /*v:count1*
@@ -9898,6 +9924,7 @@ val-variable eval.txt /*val-variable*
valgrind debug.txt /*valgrind* valgrind debug.txt /*valgrind*
values() eval.txt /*values()* values() eval.txt /*values()*
var-functions usr_41.txt /*var-functions* var-functions usr_41.txt /*var-functions*
variable-scope eval.txt /*variable-scope*
variables eval.txt /*variables* variables eval.txt /*variables*
various various.txt /*various* various various.txt /*various*
various-cmds various.txt /*various-cmds* various-cmds various.txt /*various-cmds*
@@ -9971,11 +9998,15 @@ vim.vim syntax.txt /*vim.vim*
vim7 version7.txt /*vim7* vim7 version7.txt /*vim7*
vim8 version8.txt /*vim8* vim8 version8.txt /*vim8*
vim9 vim9.txt /*vim9* vim9 vim9.txt /*vim9*
vim9-declaration vim9.txt /*vim9-declaration*
vim9-declarations usr_46.txt /*vim9-declarations*
vim9-differences vim9.txt /*vim9-differences* vim9-differences vim9.txt /*vim9-differences*
vim9-export vim9.txt /*vim9-export* vim9-export vim9.txt /*vim9-export*
vim9-import vim9.txt /*vim9-import* vim9-import vim9.txt /*vim9-import*
vim9-rationale vim9.txt /*vim9-rationale* vim9-rationale vim9.txt /*vim9-rationale*
vim9-scopes vim9.txt /*vim9-scopes*
vim9-script vim9.txt /*vim9-script* vim9-script vim9.txt /*vim9-script*
vim9-script-intro usr_46.txt /*vim9-script-intro*
vim9-types vim9.txt /*vim9-types* vim9-types vim9.txt /*vim9-types*
vim9.txt vim9.txt /*vim9.txt* vim9.txt vim9.txt /*vim9.txt*
vim9script vim9.txt /*vim9script* vim9script vim9.txt /*vim9script*

View File

@@ -322,6 +322,7 @@ OUTPUT CODES *terminal-output-codes*
t_ZR italics end *t_ZR* *'t_ZR'* t_ZR italics end *t_ZR* *'t_ZR'*
Added by Vim (there are no standard codes for these): Added by Vim (there are no standard codes for these):
t_AU set underline color (ANSI) *t_AU* *'t_AU'*
t_Ce undercurl end *t_Ce* *'t_Ce'* t_Ce undercurl end *t_Ce* *'t_Ce'*
t_Cs undercurl mode *t_Cs* *'t_Cs'* t_Cs undercurl mode *t_Cs* *'t_Cs'*
t_Te strikethrough end *t_Te* *'t_Te'* t_Te strikethrough end *t_Te* *'t_Te'*
@@ -350,6 +351,7 @@ Added by Vim (there are no standard codes for these):
|xterm-true-color| |xterm-true-color|
t_8b set background color (R, G, B) *t_8b* *'t_8b'* t_8b set background color (R, G, B) *t_8b* *'t_8b'*
|xterm-true-color| |xterm-true-color|
t_8u set underline color (R, G, B) *t_8u* *'t_8u'*
t_BE enable bracketed paste mode *t_BE* *'t_BE'* t_BE enable bracketed paste mode *t_BE* *'t_BE'*
|xterm-bracketed-paste| |xterm-bracketed-paste|
t_BD disable bracketed paste mode *t_BD* *'t_BD'* t_BD disable bracketed paste mode *t_BD* *'t_BD'*

View File

@@ -1,4 +1,4 @@
*terminal.txt* For Vim version 8.2. Last change: 2020 May 24 *terminal.txt* For Vim version 8.2. Last change: 2020 Jun 06
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -113,7 +113,8 @@ sent to the job running in the terminal. For example, to make F1 switch
to Terminal-Normal mode: > to Terminal-Normal mode: >
tnoremap <F1> <C-W>N tnoremap <F1> <C-W>N
You can use Esc, but you need to make sure it won't cause other keys to You can use Esc, but you need to make sure it won't cause other keys to
break (cursor keys start with an Esc, so they may break): > break (cursor keys start with an Esc, so they may break), this probably only
works in the GUI: >
tnoremap <Esc> <C-W>N tnoremap <Esc> <C-W>N
set notimeout ttimeout timeoutlen=100 set notimeout ttimeout timeoutlen=100

View File

@@ -1,4 +1,4 @@
*testing.txt* For Vim version 8.2. Last change: 2020 Apr 10 *testing.txt* For Vim version 8.2. Last change: 2020 Jun 15
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -165,6 +165,10 @@ test_override({name}, {val}) *test_override()*
terminals terminals
no_wait_return set the "no_wait_return" flag. Not restored no_wait_return set the "no_wait_return" flag. Not restored
with "ALL". with "ALL".
ui_delay time in msec to use in ui_delay(); overrules a
wait time of up to 3 seconds for messages
term_props reset all terminal properties when the version
string is detected
ALL clear all overrides ({val} is not used) ALL clear all overrides ({val} is not used)
"starting" is to be used when a test should behave like "starting" is to be used when a test should behave like
@@ -263,9 +267,8 @@ assert_equal({expected}, {actual} [, {msg}])
Can also be used as a |method|: > Can also be used as a |method|: >
mylist->assert_equal([1, 2, 3]) mylist->assert_equal([1, 2, 3])
< *assert_equalfile()* < *assert_equalfile()*
assert_equalfile({fname-one}, {fname-two}) assert_equalfile({fname-one}, {fname-two} [, {msg}])
When the files {fname-one} and {fname-two} do not contain When the files {fname-one} and {fname-two} do not contain
exactly the same text an error message is added to |v:errors|. exactly the same text an error message is added to |v:errors|.
Also see |assert-return|. Also see |assert-return|.
@@ -276,7 +279,6 @@ assert_equalfile({fname-one}, {fname-two})
Can also be used as a |method|: > Can also be used as a |method|: >
GetLog()->assert_equalfile('expected.log') GetLog()->assert_equalfile('expected.log')
assert_exception({error} [, {msg}]) *assert_exception()* assert_exception({error} [, {msg}]) *assert_exception()*
When v:exception does not contain the string {error} an error When v:exception does not contain the string {error} an error
message is added to |v:errors|. Also see |assert-return|. message is added to |v:errors|. Also see |assert-return|.

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.2. Last change: 2020 May 26 *todo.txt* For Vim version 8.2. Last change: 2020 Jun 21
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -40,12 +40,17 @@ browser use: https://github.com/vim/vim/issues/1234
Include src/po/vim.pot ? Include src/po/vim.pot ?
See if resizing a terminal can be fixed.
Vim9 script: Vim9 script:
Making everything work: Making everything work:
- Error for "g:var: string = 'value'"
- Make func()->append('$') work - value is last argument, not first. #6305
- possible memory leak in test_vim9_func through compile_nested_function. - possible memory leak in test_vim9_func through compile_nested_function.
- memory leaks in test_vim9_expr - memory leaks in test_vim9_expr
- memory leaks in test_vim9_script - memory leaks in test_vim9_script
- Test that a script-local function in Vim9 script cannot be deleted. - more return types depending on the first argument, like sort().
- Check that when sourcing a Vim9 script, only the global items can be used.
- Make "true" and "false" work in vim9script - Make "true" and "false" work in vim9script
- Test that a function defined inside a :def function is local to that - Test that a function defined inside a :def function is local to that
function, g: functions can be defined and script-local functions cannot be function, g: functions can be defined and script-local functions cannot be
@@ -53,7 +58,6 @@ Making everything work:
- make 0 == 'string' fail on the script level, like inside :def. - make 0 == 'string' fail on the script level, like inside :def.
- Check that when using a user function name without prefix, it does not find - Check that when using a user function name without prefix, it does not find
a global function. Prefixing g: is required. a global function. Prefixing g: is required.
- Compile: let [var, var] = expr
- Compile: for [key, value] in items(map) - Compile: for [key, value] in items(map)
- Assignment to dict doesn't work: - Assignment to dict doesn't work:
let ret: dict<string> = #{} let ret: dict<string> = #{}
@@ -73,6 +77,7 @@ Making everything work:
(Ben Jackson, #5671) (Ben Jackson, #5671)
Can we share the code from ex_let_const() between direct execution and Can we share the code from ex_let_const() between direct execution and
compiling? compiling?
- Implement "as Name" in "import Item as Name from ..."
- Disallow unlet for local/script/imported vars - Disallow unlet for local/script/imported vars
- Make "++nr" work. - Make "++nr" work.
- Make closures work: - Make closures work:
@@ -85,13 +90,14 @@ Making everything work:
New syntax and functionality: New syntax and functionality:
Improve error checking: Improve error checking:
- "echo Func()" is an error if Func() does not return anything. - "echo Func()" is an error if Func() does not return anything.
Test:
- Using a Vim9 autoload script (functions must be global).
Also: Also:
- For range: make table of first ASCII character with flag to quickly check if - For range: make table of first ASCII character with flag to quickly check if
it can be a Vim9 command. E.g. "+" can, but "." can't. it can be a Vim9 command. E.g. "+" can, but "." can't.
- better implementation for partial and tests for that. - better implementation for partial and tests for that.
- Make "g:imported = Export.exported" work in Vim9 script. - Make "g:imported = Export.exported" work in Vim9 script.
- Make Foo.Bar() work to call the dict function. (#5676) - Make Foo.Bar() work to call the dict function. (#5676)
- Check that import in legacy script works and puts item in s:
- Error in any command in "vim9script" aborts sourcing. - Error in any command in "vim9script" aborts sourcing.
- Find a way to test expressions in legacy and Vim9 script without duplication - Find a way to test expressions in legacy and Vim9 script without duplication
- Fix memory leaks for test_vim9_disassemble, test_vim9_expr, test_vim9_script - Fix memory leaks for test_vim9_disassemble, test_vim9_expr, test_vim9_script
@@ -128,7 +134,6 @@ Further improvements:
- compile "expr" and "call" expression of a channel in channel_exe_cmd()? - compile "expr" and "call" expression of a channel in channel_exe_cmd()?
Popup windows: Popup windows:
- Can put focus in another window using API and "drop". (#6077)
- With some sequence get get hidden finished terminal buffer. (#5768) - With some sequence get get hidden finished terminal buffer. (#5768)
Cannot close popup terminal (#5744) Cannot close popup terminal (#5744)
Buffer can't be wiped, gets status "aF". (#5764) Buffer can't be wiped, gets status "aF". (#5764)
@@ -154,8 +159,6 @@ Popup windows:
- Figure out the size and position better if wrapping inserts indent - Figure out the size and position better if wrapping inserts indent
Text properties: Text properties:
- Patch to fix that split / join does not update properties properly (Axel
Forsman, #5839) Alternative: #5875.
- :goto does not go to the right place when test properties are present. - :goto does not go to the right place when test properties are present.
(#5930) (#5930)
- "cc" does not call inserted_bytes(). (Axel Forsman, #5763) - "cc" does not call inserted_bytes(). (Axel Forsman, #5763)
@@ -197,6 +200,7 @@ Terminal debugger:
with another Vim instance. with another Vim instance.
Terminal emulator window: Terminal emulator window:
- No support for underline color, t_8u.
- When started with ":terminal ++close" and the shell exits but there is a - When started with ":terminal ++close" and the shell exits but there is a
background process, the window remains open, because the channel still background process, the window remains open, because the channel still
exists (and output still shows). Perhaps close the window when an explicit exists (and output still shows). Perhaps close the window when an explicit
@@ -236,10 +240,27 @@ Terminal emulator window:
conversions. conversions.
Error numbers available: Error numbers available:
E453, E454, E489, E610, E611, E653, E856, E857, E861, E900 E489, E610, E611, E653, E856
Patch to fix that typval related code is spread out. (Yegappan Lakshmanan, Remove SPACE_IN_FILENAME ? It is only used for completion.
#6093)
Patch to use collaction based sorting. (Christian Brabandt, #6229)
Can we detect true color support? https://gist.github.com/XVilka/8346728
Try setting a color then request the current color, like using t_u7.
Check out PR #543 (Roland Puntaier).
Patch for multi-byte characters in langmap and applying a mapping on them.
(Christian Brabandt, 2015 Jun 12, update July 25)
Is this the right solution? Need to cleanup langmap behavior:
- in vgetorpeek() apply langmap to the typeahead buffer and put the result in
a copy-buffer, only when langmap is appropriate for the current mode. Then
check for mapping and let gotchars() work on the copy-buffer.
- Remove LANGMAP_ADJUST() in other parts of the code. Make sure the mode is
covered by the above change.
So that replaying the register doesn't use keymap/langmap and still does the
same thing.
Also see #737: langmap not applied to replaying recording.
Buffer autocommands are a bit inconsistent. Add a separate set of Buffer autocommands are a bit inconsistent. Add a separate set of
autocommands for the buffer lifecycle: autocommands for the buffer lifecycle:
@@ -250,39 +271,14 @@ autocommands for the buffer lifecycle:
BufIsRenamed (after buffer ID gets another name) BufIsRenamed (after buffer ID gets another name)
The buffer list and windows are locked, no changes possible The buffer list and windows are locked, no changes possible
How about removing Atari MiNT support?
src/Make_mint.mak, src/os_mint.h, matches with __MINT__
Patch to make :q work with local arglist. (Christian Brabandt, #6286)
Patch to fix drawing error with DirectX. (James Grant, #5688) Patch to fix drawing error with DirectX. (James Grant, #5688)
Causes flicker on resizing. Causes flicker on resizing. Workaround from Ken Takata.
How about only setting the attribute when part of the Vim window is offscreen?
Patch to support ipv6 for channel. (Ozaki Kiichi, #5893)
Patch to explain use of "%" in :!. (David Briscoe, #5591)
Patch to improve Windows terminal support. (Nobuhiro Takasaki, #5546)
Ready to include.
Patch to improve use of Lua path. (Prabir Shrestha, #6098)
Patch to make exepath() work better on MS-Windows. (#6115)
Patch to add "-d" to xxd. (#5616)
Patch for the Haiku port: #5961
Patch to add Turkish manual. (Emir Sarı, #5641)
Patch to add lua sleep function. (Prabir Shrestha, #6057)
Alternative: use vim.call and vim.fn: #6063
Patch to add getmarklist() (Yegappan, #6032)
Patch to support different color for undercurl in cterm.
(Timur Celik, #6011)
Patch to support cindent option to handle pragmas differently.
(Max Rumpf, #5468)
Patch to add ":syn foldlevel" to use fold level further down the line.
(Brad King, 2016 Oct 19, update 2017 Jan 30, now in #6087)
File marks merging has duplicates since 7.4.1925. (Ingo Karkat, #5733) File marks merging has duplicates since 7.4.1925. (Ingo Karkat, #5733)
@@ -293,27 +289,21 @@ Motif: Build on Ubuntu can't enter any text in dialog text fields.
Running test_gui and test_gui_init with Motif sometimes kills the window Running test_gui and test_gui_init with Motif sometimes kills the window
manager. Problem with Motif? manager. Problem with Motif?
Patch to add :argdedupe. (Nir Lichtman, #6235)
:map output does not clear the reset of the command line. :map output does not clear the reset of the command line.
(#5623, also see #5962) (#5623, also see #5962)
Patch to properly break CJK lines: Anton Kochkov, #3875 Problem with auto-formatting - inserting space and putting cursor before added
Flag in 'formatoptions' is not used in the tests. character. (#6154)
Patch to add 'vtp' option. (#5344)
Needs better docs. Is there a better name?
Patch to add argument to trim() to only trim start or end of a string.
(Yegappan, #6126)
undo result wrong: Masato Nishihata, #4798 undo result wrong: Masato Nishihata, #4798
Patch for Template string: #4491. New pull: #4634
Ready to include? Review the code.
When 'lazyredraw' is set sometimes the title is not updated. When 'lazyredraw' is set sometimes the title is not updated.
(Jason Franklin, 2020 Feb 3) Looks like a race condition. (Jason Franklin, 2020 Feb 3) Looks like a race condition.
Patch to delete BeOS code. (#5817) Anyone who wants to keep it? Regexp to search for duplicate lines does not work correctly:
/\(^.*\n\)\1 (Chris Morgan, #6239)
With bash ":make" does not set v:shell_error. Possible solution: set With bash ":make" does not set v:shell_error. Possible solution: set
'shellpipe' to "2>&1| tee %s; exit ${PIPESTATUS[0]}" #5994 'shellpipe' to "2>&1| tee %s; exit ${PIPESTATUS[0]}" #5994
@@ -340,21 +330,21 @@ Get BufDelete without preceding BufNew. (Paul Jolly, #5694)
BufWinenter event not fired when saving unnamed buffer. (Paul Jolly, #5655) BufWinenter event not fired when saving unnamed buffer. (Paul Jolly, #5655)
Another spurious BufDelete. (Dani Dickstein, #5701) Another spurious BufDelete. (Dani Dickstein, #5701)
Patch to add function to return the text used in the quickfix window.
(Yegappan, #5465)
Patch to add readdirex() (Ken Takata, #5619)
Wrong error when using local arglist. (Harm te Hennepe, #6133) Wrong error when using local arglist. (Harm te Hennepe, #6133)
Request to support <Cmd> in mappings, similar to how Neovim does this. Request to support <Cmd> in mappings, similar to how Neovim does this.
(Daniel Hahler, #4784) (Daniel Hahler, #4784)
Test loose_clipboard() by selecting text before suspending.
Undo puts cursor in wrong line after "cG<Esc>" undo. Undo puts cursor in wrong line after "cG<Esc>" undo.
:unmap <c-n> gives error but does remove the mapping. (Antony Scriven, 2019 :unmap <c-n> gives error but does remove the mapping. (Antony Scriven, 2019
Dec 19) Dec 19)
Patch to add an option to enable/disable VTP. (Nobuhiro Takasaki, #5344)
Should have three values: empty, "off", "on". Name it 'winterm'?
Patch to fix session file when using multiple tab pages. (Jason Franklin, 2019 Patch to fix session file when using multiple tab pages. (Jason Franklin, 2019
May 20) May 20)
Also put :argadd commands at the start for all buffers, so that their order Also put :argadd commands at the start for all buffers, so that their order
@@ -365,9 +355,6 @@ Also #5326: netrw buffers are not restored.
When 'backupdir' has a path ending in double slash (meaning: use full path of When 'backupdir' has a path ending in double slash (meaning: use full path of
the file) combined with 'patchmode' the file name is wrong. (#5791) the file) combined with 'patchmode' the file name is wrong. (#5791)
Patch to make ":verbose pwd" show the scope of the directory. (Takuya
Fujiwara, #5469)
Completion mixes results from the current buffer with tags and other files. Completion mixes results from the current buffer with tags and other files.
Happens when typing CTRL-N while still searching for results. E.g., type "b_" Happens when typing CTRL-N while still searching for results. E.g., type "b_"
in terminal.c and then CTRL-N twice. in terminal.c and then CTRL-N twice.
@@ -377,19 +364,13 @@ Should do current file first and not split it up when more results are found.
Undo history wrong when ":next file" re-uses a buffer. (#5426) Undo history wrong when ":next file" re-uses a buffer. (#5426)
ex_next() should pass flag to do_argfile(), then to do_ecmd(). ex_next() should pass flag to do_argfile(), then to do_ecmd().
Patch to add "note" type to quickfix. (#5527) Missing tests. Help for ":argadd fname" says that if "fname" is already in the argument list
that entry is used. But instead it's always added. (#6210)
Add flag AL_FIND_ADD, if there is one argument find it in the list.
Adding "10" to 'spellsuggest' causes spell suggestions to become very slow. Adding "10" to 'spellsuggest' causes spell suggestions to become very slow.
(#4087) (#4087)
FR: add search_status(), the current values displayed for search (current
match, total matches). (#5631)
Patch to provide search stats in a variable, so that it can be used in the
statusline. (Fujiwara Takuya, #4446)
Patch for ambiguous width characters in libvterm on MS-Windows 10.
(Nobuhiro Takasaki, #4411)
behavior of i_CTRl-R_CTRL-R differs from documentation. (Paul Desmond Parker, behavior of i_CTRl-R_CTRL-R differs from documentation. (Paul Desmond Parker,
#5771) #5771)
@@ -397,10 +378,15 @@ behavior of i_CTRl-R_CTRL-R differs from documentation. (Paul Desmond Parker,
goes to any buffer, and then :bnext skips help buffers, since they are goes to any buffer, and then :bnext skips help buffers, since they are
unlisted. (#4478) unlisted. (#4478)
Patch to include reduce() function. (#5481) Patch for Template string: #4634
Copies the text twice, not very efficient. Requires a separate implementation
for Vim9 script, compiling the string parts and expressions.
Statusline highlighting error, off by one. (#5599) Statusline highlighting error, off by one. (#5599)
":find" with 'path' set to "data*" does not find files, while completion does
find them. (Max Kukartsev, #6218)
Enable 'termbidi' if $VTE_VERSION >= 5703 ? Enable 'termbidi' if $VTE_VERSION >= 5703 ?
Universal solution to detect if t_RS is working, using cursor position. Universal solution to detect if t_RS is working, using cursor position.
@@ -415,6 +401,9 @@ support combining characters. (Charles Campbell) Also #4687
"--cleanFOO" does not result in an error. (#5537) "--cleanFOO" does not result in an error. (#5537)
Output from assert_equalfile() doesn't give a hint about what's different.
Assuming the files are text, print the line with the difference.
Add "t" action to settagstack(): truncate and add new entries. (#5405) Add "t" action to settagstack(): truncate and add new entries. (#5405)
When 'relativenumber' is set the line just below a diff change doesn't get When 'relativenumber' is set the line just below a diff change doesn't get
@@ -434,7 +423,7 @@ When using :packadd files under "later" are not used, which is inconsistent
with packages under "start". (xtal8, #1994) with packages under "start". (xtal8, #1994)
Patch to add new motion ]( and ]{. (Yasuhiro Matsumoto, #5320) Patch to add new motion ]( and ]{. (Yasuhiro Matsumoto, #5320)
Or make "v" prefix work? Better: use the "z" prefix. or ]t) and [t(.
Modeless selection doesn't work in gvim. (#4783) Modeless selection doesn't work in gvim. (#4783)
Caused by patch 8.1.1534. Caused by patch 8.1.1534.
@@ -442,8 +431,7 @@ Caused by patch 8.1.1534.
Visual highlight not removed when 'dipslay' is "lastline" and line doesn't Visual highlight not removed when 'dipslay' is "lastline" and line doesn't
fit. (Kevin Lawler, #4457) fit. (Kevin Lawler, #4457)
Patch to add per-tabpage and per-window previous directory: "lcd -" and "tcd Current position in the changelist should be local to the buffer. (#2173)
-". (Yegappan Lakshmanan, #4362)
Does not build with MinGW out of the box: Does not build with MinGW out of the box:
- _stat64 is not defined, need to use "struct stat" in vim.h - _stat64 is not defined, need to use "struct stat" in vim.h
@@ -455,14 +443,6 @@ Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May
Display messed up with matchparen, wrapping and scrolling. (#5638) Display messed up with matchparen, wrapping and scrolling. (#5638)
Patch to configure BUILD_DATE for reproducible builds. (James McCoy, #513)
Patch to add MODIFIED_BY to MSVC build file. (Chen Lei, 2016 Nov 24, #1275)
Patch to support "0o" for octal numbers. (Ken Takata, #5304)
Patch to enable IXON, avoid that CTRL-S stops terminal output. (#5775)
When getting a focus event halfway a mapping this aborts the mapping. E.g. When getting a focus event halfway a mapping this aborts the mapping. E.g.
when "qq" is mapped and after the first "q" the mouse is moved outside of the when "qq" is mapped and after the first "q" the mouse is moved outside of the
gvim window (with focus follows mouse), then the K_FOCUSLOST key is put in the gvim window (with focus follows mouse), then the K_FOCUSLOST key is put in the
@@ -491,21 +471,12 @@ Can be used to update highlighting. #3127 #5181
Incorrect formatting with autoindent. (Sebastian Gniazdowski, #4909) Incorrect formatting with autoindent. (Sebastian Gniazdowski, #4909)
Patch to add the :bvimgrep command. (Christian Brabandt, 2014 Nov 12) Patch to add the :bvimgrep command. (Christian Brabandt, 2014 Nov 12)
Updated 2016 Jun 10, #858 Update 2017 Mar 28: use <buffer> Updated 2016 Jun 10, #858 Update 2017 Mar 28: use <buffer>.
Better use ":bufgrep" ?
Errors found with random data: Errors found with random data:
heap-buffer-overflow in alist_add (#2472) heap-buffer-overflow in alist_add (#2472)
Patch to support CamelCase for spell checking: See a lower-to-upper case
change as a word boundary. (btucker-MPCData, 2016 Nov 6, #1235)
patch for 'spellcamelcase' option: spellcheck each CamelCased word.
(Ben Tucker, 2016 Dec 2)
Patch to add {skip} argument to search(). (Christian Brabandt, 2016 Feb 24)
Update 2016 Jun 10, #861
Patch to add "cmdline" completion to getcompletion(). (Shougo, Oct 1, #1140)
Improve fallback for menu translations, to avoid having to create lots of 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 files that source the actual file. E.g. menu_da_de -> menu_da
Include part of #3242? Include part of #3242?
@@ -521,18 +492,6 @@ Added tests (James McCoy, 2016 Aug 3, #958). Still needs more work.
window 2. User expects 10 to be added to size of window 2. (Daniel Steinberg, window 2. User expects 10 to be added to size of window 2. (Daniel Steinberg,
#5443) #5443)
Patch for multi-byte characters in langmap and applying a mapping on them.
(Christian Brabandt, 2015 Jun 12, update July 25)
Is this the right solution? Need to cleanup langmap behavior:
- in vgetorpeek() apply langmap to the typeahead buffer and put the result in
a copy-buffer, only when langmap is appropriate for the current mode. Then
check for mapping and let gotchars() work on the copy-buffer.
- Remove LANGMAP_ADJUST() in other parts of the code. Make sure the mode is
covered by the above change.
So that replaying the register doesn't use keymap/langmap and still does the
same thing. Remarks on PR #543 (Roland Puntaier).
Also see #737: langmap not applied to replaying recording.
Would be nice to set tab-local values for 'diffexpr' and 'diffopt'. Use Would be nice to set tab-local values for 'diffexpr' and 'diffopt'. Use
t:diffexpr_option t:diffopt_option? (#4782) t:diffexpr_option t:diffopt_option? (#4782)
@@ -562,10 +521,10 @@ Give a few examples. (#4288)
Opening a file with --remote-tab-silent that matches 'wildignore' does not Opening a file with --remote-tab-silent that matches 'wildignore' does not
work, results in (E479: No match". (#4610) work, results in (E479: No match". (#4610)
Patch for this (Tristan Konolige, #1011, only adds the option, no implem.):
7 Add an option to add one pixel column to the character width? Lucida 7 Add an option to add one pixel column to the character width? Lucida
Console italic is wider than the normal font ("d" overlaps with next char). Console italic is wider than the normal font ("d" overlaps with next char).
Opposite of 'linespace': 'columnspace'. Opposite of 'linespace': 'columnspace'.
Patch for this (Tristan Konolige, #1011, only added the option, no implem.)
Bug: script written with "-W scriptout" contains Key codes, while the script Bug: script written with "-W scriptout" contains Key codes, while the script
read with "-s scriptin" expects escape codes. Probably "scriptout" needs to read with "-s scriptin" expects escape codes. Probably "scriptout" needs to
@@ -618,10 +577,6 @@ Should we include some part of pull request #4505, not increment changedtick
in some cases? E.g. for ":write" when the changed flag was already off, the in some cases? E.g. for ":write" when the changed flag was already off, the
buffer didn't change at all. buffer didn't change at all.
Patch to add getreginfo() and setreg() with an option to set the unnamed
register "", So that registers can be saved and fully restored.
(Andy Massimino, 2018 Aug 24, #3370)
Line numbers in profile are off when function was defined with ":execute". Line numbers in profile are off when function was defined with ":execute".
(Daniel Hahler, #4511) (Daniel Hahler, #4511)
@@ -642,9 +597,6 @@ C syntax: {} inside () causes following {} to be highlighted as error.
Check: __attribute__((format(printf, on semsg() and siemsg(). Where was this Check: __attribute__((format(printf, on semsg() and siemsg(). Where was this
added? added?
Patch to add a flatten() function. #3676. Check that the doc explains the
maxdepth argument (applies to the input "recursiveness").
Add test for urxvt mouse codes. Also test that mouse coordinates can be Add test for urxvt mouse codes. Also test that mouse coordinates can be
negative. (see #4326) negative. (see #4326)
@@ -715,11 +667,6 @@ punctuation is repeated. (Smylers, 2018 Nov 17, #3621)
ml_get error: (Israel Chauca Fuentes, 2018 Oct 17, #3550). ml_get error: (Israel Chauca Fuentes, 2018 Oct 17, #3550).
Patch to add more info to OptionSet. Should mention what triggered the change
":set", ":setlocal", ":setglobal", "modeline"; and the old global value.
#4118. Proposed implementation: 2019 Mar 27.
Updated 2019 May 25.
Using single wide base character with double wide composing character gives Using single wide base character with double wide composing character gives
drawing errors. Fill up the base character? (Dominique, #4328) drawing errors. Fill up the base character? (Dominique, #4328)
@@ -770,26 +717,13 @@ Neovim uses "eob:X" in 'fillchars'.
Sourceforge Vim pages still have content, redirect from empty page. Sourceforge Vim pages still have content, redirect from empty page.
Check for PHP errors. (Wayne Davison, 2018 Oct 26) Check for PHP errors. (Wayne Davison, 2018 Oct 26)
Patch to support ":tag <tagkind> <tagname>". (emmrk, 2018 May 7, #2871)
Use something like ":tag {kind}/{tagname}".
Not ready to include.
Problem with Visual yank when 'linebreak' and 'showbreak' are set. 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 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. Nov 17) Asked about this, Dec 22. Christian will have a look.
Patch for larger icons in installer. (#978) Still not good.
Patch to fix that using "5gj" starting inside a closed fold does not work on Patch to fix that using "5gj" starting inside a closed fold does not work on
screen lines but on text lines. (Julius Hulsmann, #4095) Lacks a test. screen lines but on text lines. (Julius Hulsmann, #4095) Lacks a test.
Patch to implement 'diffref' option. (#3535)
Easier to use a 'diffmaster' option, is the extra complexity needed?
Not ready to include.
Patch to specify color for cterm=underline and cterm=undercurl, like "guisp".
Patch #2405 does something like this, but in the wrong way.
home_replace() uses $HOME instead of "homedir". (Cesar Martins, 2018 Aug 9) home_replace() uses $HOME instead of "homedir". (Cesar Martins, 2018 Aug 9)
When the status line uses term_gettitle(), it does not get updated when the When the status line uses term_gettitle(), it does not get updated when the
@@ -817,7 +751,7 @@ Further xdiff changes:
Difference between two regexp engines: #3373 Difference between two regexp engines: #3373
Patch to add ch_listen() (Yasuhiro Matsumoto, 2018 Nov 26, #3639) Patch to add ch_listen() (Yasuhiro Matsumoto, 2018 Nov 26, #3639)
What is the practical use for this? What is the practical use for this? Need an example.
When the last line wraps, selecting with the mouse below that line only When the last line wraps, selecting with the mouse below that line only
includes the first screen line. (2018 Aug 23, #3368) includes the first screen line. (2018 Aug 23, #3368)
@@ -841,8 +775,6 @@ when adding a sign for every quickfix entry. (#4557)
Win32 key codes are messy. Mike Williams tried to fix that, but now old 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? mappings no longer work. Create a new terminal for the better solution?
Patch to "fix" 'visualbell'. Add option to set delay? (#1789)
Script generated by :mksession does not work well if there are windows with Script generated by :mksession does not work well if there are windows with
modified buffers modified buffers
change "silent only" into "silent only!" change "silent only" into "silent only!"
@@ -932,9 +864,6 @@ deleting autocmds, not when adding them.
Alternative manpager.vim. (Enno, 2018 Jan 5, #2529) Alternative manpager.vim. (Enno, 2018 Jan 5, #2529)
Delete all the specific stuff for the Borland compiler? (#3374)
Patch in #3377 (Thomas Dziedzic)
With 'foldmethod' "indent" and appending an empty line, what follows isn't With 'foldmethod' "indent" and appending an empty line, what follows isn't
included in the existing fold. Deleting the empty line and undo fixes it. included in the existing fold. Deleting the empty line and undo fixes it.
(Oleg Koshovetc, 2018 Jul 15, #3214) (Oleg Koshovetc, 2018 Jul 15, #3214)
@@ -1099,6 +1028,7 @@ The ":move" command does not honor closed folds. (Ryan Lue, #2351)
Patch to fix increment/decrement not working properly when 'virtualedit' is Patch to fix increment/decrement not working properly when 'virtualedit' is
set. (Hirohito Higashi, 2016 Aug 1, #923) set. (Hirohito Higashi, 2016 Aug 1, #923)
Was this fixed?
Cannot copy modeless selection when cursor is inside it. (lkintact, #2300) Cannot copy modeless selection when cursor is inside it. (lkintact, #2300)
@@ -1168,8 +1098,6 @@ Or is this not an actual problem?
Better TeX indent file. (Christian Brabandt, 2017 May 3) Better TeX indent file. (Christian Brabandt, 2017 May 3)
Patch to use a separate code for BS on Windows. (Linwei, #1823)
Use gvimext.dll from the nightly build? (Issue #249) Use gvimext.dll from the nightly build? (Issue #249)
'synmaxcol' works with bytes instead of screen cells. (Llandon, 2017 May 31, 'synmaxcol' works with bytes instead of screen cells. (Llandon, 2017 May 31,
@@ -1278,13 +1206,6 @@ Implement named arguments for functions:
Add a command to take a range of lines, filter them and put the output Add a command to take a range of lines, filter them and put the output
somewhere else. :{range}copy {dest} !cmd somewhere else. :{range}copy {dest} !cmd
Patch to fix that empty first tab is not in session.
(Hirohito Higashi, 2016 Nov 25, #1282)
Patch to fix escaping of job arguments. (Yasuhiro Matsumoto, 2016 Oct 5)
Update Oct 14: https://gist.github.com/mattn/d47e7d3bfe5ade4be86062b565a4bfca
Update Aug 2017: #1954
The TermResponse event is not triggered when a plugin has set 'eventignore' to The TermResponse event is not triggered when a plugin has set 'eventignore' to
"all". Netrw does this. (Gary Johnson, 2017 Jan 24) "all". Netrw does this. (Gary Johnson, 2017 Jan 24)
Postpone the event until 'eventignore' is reset. Postpone the event until 'eventignore' is reset.
@@ -1448,11 +1369,6 @@ Undo message is not always properly displayed. Patch by Ken Takata, 2013 oct
3. Doesn't work properly according to Yukihiro Nakadaira. 3. Doesn't work properly according to Yukihiro Nakadaira.
Also see #1635. Also see #1635.
Patch for systemlist(), add empty item. (thinca, Sep 30, #1135)
Add an argument to choose binary or non-binary (like readfile()), when omitted
use the current behavior.
Include the test.
When 'keywordprg' starts with ":" the argument is still escaped as a shell When 'keywordprg' starts with ":" the argument is still escaped as a shell
command argument. (Romain Lafourcade, 2016 Oct 16, #1175) command argument. (Romain Lafourcade, 2016 Oct 16, #1175)
@@ -1462,9 +1378,6 @@ Probably list of keystrokes, with some annotations for mode changes.
Could store in logfile to be able to analyse it with an external command. Could store in logfile to be able to analyse it with an external command.
E.g. to see when's the last time a plugin command was used. E.g. to see when's the last time a plugin command was used.
execute() cannot be used with command completion. (Daniel Hahler, 2016 Oct 1,
#1141)
cmap using execute() has side effects. (Killthemule, 2016 Aug 17, #983) cmap using execute() has side effects. (Killthemule, 2016 Aug 17, #983)
:map X may print invalid data. (Nikolay Pavlov, 2017 Jul 3, #1816) :map X may print invalid data. (Nikolay Pavlov, 2017 Jul 3, #1816)
@@ -1477,9 +1390,6 @@ synced. (Ryan Carney, 2016 Sep 14)
Syntax highlighting for messages with RFC3339 timestamp (#946) Syntax highlighting for messages with RFC3339 timestamp (#946)
Did maintainer reply? Did maintainer reply?
Patch to avoid problem with special characters in file name.
(Shougo, 2016 Sept 19, #1099) Not finished?
ml_get errors when reloading file. (Chris Desjardins, 2016 Apr 19) ml_get errors when reloading file. (Chris Desjardins, 2016 Apr 19)
Also with latest version. Also with latest version.
@@ -1498,9 +1408,6 @@ the system encoding (usually utf-8).
MS-Windows: use WS_HIDE instead of SW_SHOWMINNOACTIVE in os_win32.c? MS-Windows: use WS_HIDE instead of SW_SHOWMINNOACTIVE in os_win32.c?
Otherwise task flickers in taskbar. Otherwise task flickers in taskbar.
Should make ":@r" handle line continuation. (Cesar Romani, 2016 Jun 26)
Also for ":@.".
Repeating 'opfunc' in a function only works once. (Tarmean, 2016 Jul 15, #925) Repeating 'opfunc' in a function only works once. (Tarmean, 2016 Jul 15, #925)
Have a way to get the call stack, in a function and from an exception. Have a way to get the call stack, in a function and from an exception.
@@ -1515,8 +1422,6 @@ Filetype plugin for awk. (Doug Kearns, 2016 Sep 5)
Patch to improve map documentation. Issue #799. Patch to improve map documentation. Issue #799.
Patch for syntax folding optimization. (Shougo, 2016 Sep 6, #1045)
We can use '. to go to the last change in the current buffer, but how about We can use '. to go to the last change in the current buffer, but how about
the last change in any buffer? Can we use ', (, is next to .)? the last change in any buffer? Can we use ', (, is next to .)?
@@ -1573,11 +1478,6 @@ Mechelynck) Perhaps use exists("::tearoff") to check?
Use vim.vim syntax highlighting for help file examples, but without ":" in Use vim.vim syntax highlighting for help file examples, but without ":" in
'iskeyword' for syntax. 'iskeyword' for syntax.
Patch to make "%:h:h" return "." instead of the full path.
(Coot, 2016 Jan 24, #592)
Remove SPACE_IN_FILENAME ? What could possibly go wrong?
When command names are very long :command output is difficult to read. Use a When command names are very long :command output is difficult to read. Use a
maximum for the column width? (#871) maximum for the column width? (#871)
Patcy by varmanishant, 2016 Jun 18, #876 Patcy by varmanishant, 2016 Jun 18, #876
@@ -2172,11 +2072,6 @@ Vim using lots of memory when joining lines. (John Little, 2010 Dec 3)
BT regexp engine: After trying a \@> match and failing, submatches are not BT regexp engine: After trying a \@> match and failing, submatches are not
cleared. See test64. 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 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 64 bits value. Change all number options to use nropt_T and define it to the
right type. right type.
@@ -2195,9 +2090,6 @@ doesn't jump to the correct line with :cfirst. (ZyX, 2011 Sep 18)
Behavior of i" and a" text objects isn't logical. (Ben Fritz, 2013 Nov 19) Behavior of i" and a" text objects isn't logical. (Ben Fritz, 2013 Nov 19)
maparg() does not show the <script> flag. When temporarily changing a
mapping, how to restore the script ID?
Bug in try/catch: return with invalid compare throws error that isn't caught. Bug in try/catch: return with invalid compare throws error that isn't caught.
(ZyX, 2011 Jan 26) (ZyX, 2011 Jan 26)
@@ -4978,9 +4870,6 @@ Win32 GUI:
GUI: GUI:
8 Make inputdialog() work for Photon, Amiga.
- <C--> cannot be mapped. Should be possible to recognize this as a
normal "-" with the Ctrl modifier.
7 Implement ":popup" for other systems than Windows. 7 Implement ":popup" for other systems than Windows.
8 Implement ":tearoff" for other systems than Win32 GUI. 8 Implement ":tearoff" for other systems than Win32 GUI.
6 Implement ":untearoff": hide a torn-off menu. 6 Implement ":untearoff": hide a torn-off menu.

View File

@@ -211,7 +211,7 @@ will automatically delete it:
- The flag that the file was modified is not set. - The flag that the file was modified is not set.
- The process is not running. - The process is not running.
You can programatically deal with this situation with the |FileChangedShell| You can programmatically deal with this situation with the |FileChangedShell|
autocommand event. autocommand event.

View File

@@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 8.2. Last change: 2020 Mar 15 *usr_41.txt* For Vim version 8.2. Last change: 2020 Jun 13
VIM USER MANUAL - by Bram Moolenaar VIM USER MANUAL - by Bram Moolenaar
@@ -41,6 +41,12 @@ prefer. And you can use any colon command in it (commands that start with a
specific file type. A complicated macro can be defined by a separate Vim specific file type. A complicated macro can be defined by a separate Vim
script file. You can think of other uses yourself. script file. You can think of other uses yourself.
If you are familiar with Python, you can find a comparison between
Python and Vim script here, with pointers to other documents:
https://gist.github.com/yegappan/16d964a37ead0979b05e655aa036cad0
And if you are familiar with Javascript:
https://w0rp.com/blog/post/vim-script-for-the-javascripter/
Let's start with a simple example: > Let's start with a simple example: >
:let i = 1 :let i = 1
@@ -93,6 +99,8 @@ and the value of the variable i. Since i is one, this will print:
Then there is the ":let i += 1" command. This does the same thing as Then there is the ":let i += 1" command. This does the same thing as
":let i = i + 1". This adds one to the variable i and assigns the new value ":let i = i + 1". This adds one to the variable i and assigns the new value
to the same variable. to the same variable.
Note: this is how it works in legacy Vim script, which is what we discuss in
this file. In Vim9 script it's a bit different, see |usr_46.txt|.
The example was given to explain the commands, but would you really want to The example was given to explain the commands, but would you really want to
make such a loop, it can be written much more compact: > make such a loop, it can be written much more compact: >
@@ -631,6 +639,7 @@ List manipulation: *list-functions*
deepcopy() make a full copy of a List deepcopy() make a full copy of a List
filter() remove selected items from a List filter() remove selected items from a List
map() change each List item map() change each List item
reduce() reduce a List to a value
sort() sort a List sort() sort a List
reverse() reverse the order of a List reverse() reverse the order of a List
uniq() remove copies of repeated adjacent items uniq() remove copies of repeated adjacent items
@@ -644,6 +653,7 @@ List manipulation: *list-functions*
min() minimum value in a List min() minimum value in a List
count() count number of times a value appears in a List count() count number of times a value appears in a List
repeat() repeat a List multiple times repeat() repeat a List multiple times
flatten() flatten a List
Dictionary manipulation: *dict-functions* Dictionary manipulation: *dict-functions*
get() get an entry without an error for a wrong key get() get an entry without an error for a wrong key
@@ -687,6 +697,7 @@ Floating point computation: *float-functions*
sinh() hyperbolic sine sinh() hyperbolic sine
cosh() hyperbolic cosine cosh() hyperbolic cosine
tanh() hyperbolic tangent tanh() hyperbolic tangent
isinf() check for infinity
isnan() check for not a number isnan() check for not a number
Other computation: *bitwise-function* Other computation: *bitwise-function*
@@ -695,6 +706,8 @@ Other computation: *bitwise-function*
or() bitwise OR or() bitwise OR
xor() bitwise XOR xor() bitwise XOR
sha256() SHA-256 hash sha256() SHA-256 hash
rand() get a pseudo-random number
srand() initialize seed used by rand()
Variables: *var-functions* Variables: *var-functions*
type() type of a variable type() type of a variable
@@ -724,6 +737,7 @@ Cursor and mark position: *cursor-functions* *mark-functions*
getcurpos() get position of the cursor getcurpos() get position of the cursor
getpos() get position of cursor, mark, etc. getpos() get position of cursor, mark, etc.
setpos() set position of cursor, mark, etc. setpos() set position of cursor, mark, etc.
getmarklist() list of global/local marks
byte2line() get line number at a specific byte count byte2line() get line number at a specific byte count
line2byte() byte count at a specific line line2byte() byte count at a specific line
diff_filler() get the number of filler lines above a line diff_filler() get the number of filler lines above a line
@@ -743,6 +757,7 @@ Working with text in the current buffer: *text-functions*
prevnonblank() find previous non-blank line prevnonblank() find previous non-blank line
search() find a match for a pattern search() find a match for a pattern
searchpos() find a match for a pattern searchpos() find a match for a pattern
searchcount() get number of matches before/after the cursor
searchpair() find the other end of a start/skip/end searchpair() find the other end of a start/skip/end
searchpairpos() find the other end of a start/skip/end searchpairpos() find the other end of a start/skip/end
searchdecl() search for the declaration of a name searchdecl() search for the declaration of a name
@@ -790,6 +805,7 @@ System functions and manipulation of files:
hostname() name of the system hostname() name of the system
readfile() read a file into a List of lines readfile() read a file into a List of lines
readdir() get a List of file names in a directory readdir() get a List of file names in a directory
readdirex() get a List of file information in a directory
writefile() write a List of lines or Blob into a file writefile() write a List of lines or Blob into a file
Date and Time: *date-functions* *time-functions* Date and Time: *date-functions* *time-functions*
@@ -826,9 +842,11 @@ Buffers, windows and the argument list:
listener_remove() remove a listener callback listener_remove() remove a listener callback
win_findbuf() find windows containing a buffer win_findbuf() find windows containing a buffer
win_getid() get window ID of a window win_getid() get window ID of a window
win_gettype() get type of window
win_gotoid() go to window with ID win_gotoid() go to window with ID
win_id2tabwin() get tab and window nr from window ID win_id2tabwin() get tab and window nr from window ID
win_id2win() get window nr from window ID win_id2win() get window nr from window ID
win_splitmove() move window to a split of another window
getbufinfo() get a list with buffer information getbufinfo() get a list with buffer information
gettabinfo() get a list with tab page information gettabinfo() get a list with tab page information
getwininfo() get a list with window information getwininfo() get a list with window information
@@ -905,6 +923,7 @@ Interactive: *interactive-functions*
getchar() get a character from the user getchar() get a character from the user
getcharmod() get modifiers for the last typed character getcharmod() get modifiers for the last typed character
getmousepos() get last known mouse position getmousepos() get last known mouse position
echoraw() output characters as-is
feedkeys() put characters in the typeahead queue feedkeys() put characters in the typeahead queue
input() get a line from the user input() get a line from the user
inputlist() let the user pick an entry from a list inputlist() let the user pick an entry from a list
@@ -946,6 +965,7 @@ Mappings and Menus: *mapping-functions*
hasmapto() check if a mapping exists hasmapto() check if a mapping exists
mapcheck() check if a matching mapping exists mapcheck() check if a matching mapping exists
maparg() get rhs of a mapping maparg() get rhs of a mapping
mapset() restore a mapping
menu_info() get information about a menu item menu_info() get information about a menu item
wildmenumode() check if the wildmode is active wildmenumode() check if the wildmode is active
@@ -966,11 +986,13 @@ Testing: *test-functions*
test_autochdir() enable 'autochdir' during startup test_autochdir() enable 'autochdir' during startup
test_override() test with Vim internal overrides test_override() test with Vim internal overrides
test_garbagecollect_now() free memory right now test_garbagecollect_now() free memory right now
test_garbagecollect_soon() set a flag to free memory soon
test_getvalue() get value of an internal variable test_getvalue() get value of an internal variable
test_ignore_error() ignore a specific error message test_ignore_error() ignore a specific error message
test_null_blob() return a null Blob test_null_blob() return a null Blob
test_null_channel() return a null Channel test_null_channel() return a null Channel
test_null_dict() return a null Dict test_null_dict() return a null Dict
test_null_function() return a null Funcref
test_null_job() return a null Job test_null_job() return a null Job
test_null_list() return a null List test_null_list() return a null List
test_null_partial() return a null Partial function test_null_partial() return a null Partial function
@@ -980,6 +1002,10 @@ Testing: *test-functions*
test_feedinput() add key sequence to input buffer test_feedinput() add key sequence to input buffer
test_option_not_set() reset flag indicating option was set test_option_not_set() reset flag indicating option was set
test_scrollbar() simulate scrollbar movement in the GUI test_scrollbar() simulate scrollbar movement in the GUI
test_refcount() return an expression's reference count
test_srand_seed() set the seed value for srand()
test_unknown() return a value with unknown type
test_void() return a value with void type
Inter-process communication: *channel-functions* Inter-process communication: *channel-functions*
ch_canread() check if there is something to read ch_canread() check if there is something to read
@@ -991,8 +1017,8 @@ Inter-process communication: *channel-functions*
ch_readraw() read a raw message from a channel ch_readraw() read a raw message from a channel
ch_sendexpr() send a JSON message over a channel ch_sendexpr() send a JSON message over a channel
ch_sendraw() send a raw message over a channel ch_sendraw() send a raw message over a channel
ch_evalexpr() evaluates an expression over channel ch_evalexpr() evaluate an expression over channel
ch_evalraw() evaluates a raw string over channel ch_evalraw() evaluate a raw string over channel
ch_status() get status of a channel ch_status() get status of a channel
ch_getbufnr() get the buffer number of a channel ch_getbufnr() get the buffer number of a channel
ch_getjob() get the job associated with a channel ch_getjob() get the job associated with a channel
@@ -1048,6 +1074,7 @@ Terminal window: *terminal-functions*
term_setkill() set signal to stop job in a terminal term_setkill() set signal to stop job in a terminal
term_setrestore() set command to restore a terminal term_setrestore() set command to restore a terminal
term_setsize() set the size of a terminal term_setsize() set the size of a terminal
term_setapi() set terminal JSON API function name prefix
Popup window: *popup-window-functions* Popup window: *popup-window-functions*
popup_create() create popup centered in the screen popup_create() create popup centered in the screen
@@ -1066,9 +1093,13 @@ Popup window: *popup-window-functions*
popup_close() close one popup popup_close() close one popup
popup_clear() close all popups popup_clear() close all popups
popup_filter_menu() select from a list of items popup_filter_menu() select from a list of items
popup_filter_yesno() blocks until 'y' or 'n' is pressed popup_filter_yesno() block until 'y' or 'n' is pressed
popup_getoptions() get current options for a popup popup_getoptions() get current options for a popup
popup_getpos() get actual position and size of a popup popup_getpos() get actual position and size of a popup
popup_findinfo() get window ID for popup info window
popup_findpreview() get window ID for popup preview window
popup_list() get list of all popup window IDs
popup_locate() get popup window ID from its screen position
Timers: *timer-functions* Timers: *timer-functions*
timer_start() create a timer timer_start() create a timer
@@ -1088,8 +1119,27 @@ Prompt Buffer: *promptbuffer-functions*
prompt_setinterrupt() set interrupt callback for a buffer prompt_setinterrupt() set interrupt callback for a buffer
prompt_setprompt() set the prompt text for a buffer prompt_setprompt() set the prompt text for a buffer
Text Properties: *text-property-functions*
prop_add() attach a property at a position
prop_clear() remove all properties from a line or lines
prop_find() search for a property
prop_list() return a list of all properties in a line
prop_remove() remove a property from a line
prop_type_add() add/define a property type
prop_type_change() change properties of a type
prop_type_delete() remove a text property type
prop_type_get() return the properties of a type
prop_type_list() return a list of all property types
Sound: *sound-functions*
sound_clear() stop playing all sounds
sound_playevent() play an event's sound
sound_playfile() play a sound file
sound_stop() stop playing a sound
Various: *various-functions* Various: *various-functions*
mode() get current editing mode mode() get current editing mode
state() get current busy state
visualmode() last visual mode used visualmode() last visual mode used
exists() check if a variable, function, etc. exists exists() check if a variable, function, etc. exists
has() check if a feature is supported in Vim has() check if a feature is supported in Vim
@@ -1098,6 +1148,10 @@ Various: *various-functions*
did_filetype() check if a FileType autocommand was used did_filetype() check if a FileType autocommand was used
eventhandler() check if invoked by an event handler eventhandler() check if invoked by an event handler
getpid() get process ID of Vim getpid() get process ID of Vim
getimstatus() check if IME status is active
interrupt() interrupt script execution
windowsversion() get MS-Windows version
terminalprops() properties of the terminal
libcall() call a function in an external library libcall() call a function in an external library
libcallnr() idem, returning a number libcallnr() idem, returning a number
@@ -1106,6 +1160,7 @@ Various: *various-functions*
undotree() return the state of the undo tree undotree() return the state of the undo tree
getreg() get contents of a register getreg() get contents of a register
getreginfo() get information about a register
getregtype() get type of a register getregtype() get type of a register
setreg() set contents and type of a register setreg() set contents and type of a register
reg_executing() return the name of the register being executed reg_executing() return the name of the register being executed
@@ -1115,12 +1170,14 @@ Various: *various-functions*
wordcount() get byte/word/char count of buffer wordcount() get byte/word/char count of buffer
luaeval() evaluate Lua expression luaeval() evaluate |Lua| expression
mzeval() evaluate |MzScheme| expression mzeval() evaluate |MzScheme| expression
perleval() evaluate Perl expression (|+perl|) perleval() evaluate Perl expression (|+perl|)
py3eval() evaluate Python expression (|+python3|) py3eval() evaluate Python expression (|+python3|)
pyeval() evaluate Python expression (|+python|) pyeval() evaluate Python expression (|+python|)
pyxeval() evaluate |python_x| expression pyxeval() evaluate |python_x| expression
rubyeval() evaluate |Ruby| expression
debugbreak() interrupt a program being debugged debugbreak() interrupt a program being debugged
============================================================================== ==============================================================================

View File

@@ -1,8 +1,8 @@
*usr_45.txt* For Vim version 8.2. Last change: 2008 Nov 15 *usr_45.txt* For Vim version 8.2. Last change: 2020 Jun 11
VIM USER MANUAL - by Bram Moolenaar VIM USER MANUAL - by Bram Moolenaar
Select your language Select your language (locale)
The messages in Vim can be given in several languages. This chapter explains The messages in Vim can be given in several languages. This chapter explains
@@ -15,7 +15,7 @@ in various languages is explained.
|45.4| Editing files with a different encoding |45.4| Editing files with a different encoding
|45.5| Entering language text |45.5| Entering language text
Next chapter: |usr_90.txt| Installing Vim Next chapter: |usr_46.txt| Write plugins using Vim9 script
Previous chapter: |usr_44.txt| Your own syntax highlighted Previous chapter: |usr_44.txt| Your own syntax highlighted
Table of contents: |usr_toc.txt| Table of contents: |usr_toc.txt|
@@ -408,6 +408,6 @@ Don't type the spaces. See |i_CTRL-V_digit| for the details.
============================================================================== ==============================================================================
Next chapter: |usr_90.txt| Installing Vim Next chapter: |usr_46.txt| Write plugins using Vim9 script
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:

192
runtime/doc/usr_46.txt Normal file
View File

@@ -0,0 +1,192 @@
*usr_46.txt* For Vim version 8.2. Last change: 2020 Jun 14
VIM USER MANUAL - by Bram Moolenaar
Write plugins using Vim9 script
The Vim9 script language is used for writing plugins, especially larger ones
that use multiple files. This chapter explains how to split up a plugin into
modules, import and export items and keep the rest local.
|46.1| Introduction
|46.2| Variable declarations
|46.3| Functions and types
|46.?| Using a Vim9 script from legacy script
Next chapter: |usr_90.txt| Installing Vim
Previous chapter: |usr_45.txt| Select your language (locale)
Table of contents: |usr_toc.txt|
==============================================================================
*46.1* Introduction *vim9-script-intro*
Vim9 script was designed to make it easier to write large Vim scripts. It
looks more like other script languages, especially Typescript. Also,
functions are compiled into instructions that can be executed quickly. This
makes Vim9 script a lot faster, up to a 100 times.
The basic idea is that a script file has items that are private, only used
inside the script file, and items that are exported, used outside of the
script file. The exported items can then be used by scripts that import them.
That makes very clear what is defined where.
Let's start with an example, a script that exports one function and has one
private function: >
vim9script " This indicates a Vim9 script file,
export def GetMessage(): string
let result = ''
...
result = GetPart(count)
...
return result
enddef
def GetPart(nr: number): string
if nr == 4
return 'yes'
else
return 'no'
endif
enddef
The `vim9script` command must be the very first command in the file. Without
it Vim will assume legacy script syntax.
The `export def GetMessage(): string` line starts with `export`, meaning that
this function can be imported and called by other scripts. The line
`def GetPart(...` does not start with `export`, this is a script-local
function, it can only be used inside this script file.
In the `export def GetMessage(): string` line you will notice the colon and
the return type. Vim9 functions, defined with `def`, require specifying the
type of arguments and the return type. That way Vim can compile the code
efficiently. The GetPart function defines an argument "nr" of type "number".
Notice that the assignment `result = GetPart(count)` does not use the `let`
command. That is explained in the next section.
==============================================================================
*46.2* Variable declarations *vim9-declarations*
In Vim9 script variables are declared once with a `:let` or `:const` command.
Assigning a value is done without `:let` and it is not possible to `:unlet`
the variable.
In most cases you will want to declare the variable and initialize it at the
same time: >
let myText = 'some text'
...
myText = 'other text'
The type of the variable will be inferred from the expression. In this case
it is a string. If you initialize with a number, then the type is number: >
let myNumber = 1234
...
myNumber = 0
If you try to assign a string to this variable, you will get an error: >
let myNumber = 'this fails!'
In the rare case you want a variable that can take values of any type, you
have to specify the type: >
let myVar: any = 1234
myVar = 'text also works'
You can also declare a variable without assigning a value. In that case Vim
will initialize it to zero or empty: >
let word: string
if condition
word = 'yes'
else
word = 'no'
endif
Although it's shorter to do: >
let word = condition ? 'yes' : 'no'
==============================================================================
*46.3* Functions and types
Legacy Vim script does have type checking, but this happens at runtime, when
the code is executed. And it's permissive, often a computation gives an
unexpected value instead of reporting an error. Thus you can define a
function and think it's fine, but see a problem only later when it is called: >
let s:collected = ''
func ExtendAndReturn(add)
let s:collected += a:add
return s:collected
endfunc
Can you spot the error? Try this: >
echo ExtendAndReturn('text')
And you'll see zero. Why? Because in legacy Vim script "+=" will convert the
arguments to numbers, and any string without a number results in zero!
With `:def` the type checking happens when compiling the function. For that
you need to specify the argument types and the return type. Also notice that
the argument is used without the "a:" prefix: >
let s:collected = ''
def ExtendAndReturn(add: string): string
s:collected += add
return s:collected
enddef
defcompile
Here we use `:defcompile` to do the compilation right away, without it the
compilation would happen when the function is called. Vim will tell you what
you did wrong: >
E1013: type mismatch, expected number but got string
Vim9 script is strict, it uses the "+" operator only for numbers and floats.
For string concatenation ".." must be used. This avoids mistakes and avoids
the automatic conversion that gave a surprising result above. So you change
the first line of the function to: >
s:collected ..= add
And now it works.
If the function does not return anything, just leave out the return type: >
def ReportResult(result: string)
echo 'The result is: ' .. result
enddef
This is also checked, if you try to return a value you'll get an error.
In case you don't care about types or have a function that does work with
multiple types, you can use the "any" type: >
def Store(key: string, value: any)
resultDict[key] = value
enddef
==============================================================================
*46.?* Using a Vim9 script from legacy script *source-vim9-script*
In some cases you have a legacy Vim script where you want to use items from a
Vim9 script. For example in your .vimrc you want to initialize a plugin. The
best way to do this is to use `:import`. For example: >
import Init as NiceInit from 'myNicePlugin.vim'
call NiceInit('today')
This finds the exported function "Init" in the Vim9 script file and makes it
available as script-local item "NiceInit". `:import` always uses the script
namespace, even when "s:" is not given. If "myNicePlugin.vim" was already
sourced it is not sourced again.
Besides avoiding putting any items in the global namespace (where name clashes
can cause unexpected errors), this also means the script is sourced only once,
no matter how many times items from it are imported.
In some cases, e.g. for testing, you may just want to source the Vim9 script.
That is OK, but then only global items will be available. The Vim9 script
will have to make sure to use a unique name for these global items. Example: >
source ~/.vim/extra/myNicePlugin.vim
call g:NicePluginTest()
==============================================================================
Next chapter: |usr_90.txt| Installing Vim
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*usr_90.txt* For Vim version 8.2. Last change: 2008 Sep 10 *usr_90.txt* For Vim version 8.2. Last change: 2020 Jun 11
VIM USER MANUAL - by Bram Moolenaar VIM USER MANUAL - by Bram Moolenaar
@@ -15,7 +15,7 @@ upgrading to a new version is done.
|90.4| Common installation issues |90.4| Common installation issues
|90.5| Uninstalling Vim |90.5| Uninstalling Vim
Previous chapter: |usr_45.txt| Select your language Previous chapter: |usr_46.txt| Write plugins using Vim9 script
Table of contents: |usr_toc.txt| Table of contents: |usr_toc.txt|
============================================================================== ==============================================================================

View File

@@ -1,4 +1,4 @@
*usr_toc.txt* For Vim version 8.2. Last change: 2019 May 24 *usr_toc.txt* For Vim version 8.2. Last change: 2020 Jun 15
VIM USER MANUAL - by Bram Moolenaar VIM USER MANUAL - by Bram Moolenaar
@@ -42,7 +42,8 @@ Tuning Vim
|usr_42.txt| Add new menus |usr_42.txt| Add new menus
|usr_43.txt| Using filetypes |usr_43.txt| Using filetypes
|usr_44.txt| Your own syntax highlighted |usr_44.txt| Your own syntax highlighted
|usr_45.txt| Select your language |usr_45.txt| Select your language (locale)
|usr_46.txt| Write plugins using Vim9 script
Making Vim Run Making Vim Run
|usr_90.txt| Installing Vim |usr_90.txt| Installing Vim
@@ -339,6 +340,12 @@ Make Vim work as you like it.
|45.4| Editing files with a different encoding |45.4| Editing files with a different encoding
|45.5| Entering language text |45.5| Entering language text
|usr_46.txt| Write plugins using Vim9 script
|46.1| Introduction
|46.2| Variable declarations
|46.3| Functions and types
|46.?| Using a Vim9 script from legacy script
============================================================================== ==============================================================================
Making Vim Run ~ Making Vim Run ~

View File

@@ -1,4 +1,4 @@
*various.txt* For Vim version 8.2. Last change: 2020 Apr 13 *various.txt* For Vim version 8.2. Last change: 2020 May 30
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -251,14 +251,20 @@ g8 Print the hex values of the bytes used in the
it to append a Vim command. See |:bar|. it to append a Vim command. See |:bar|.
If {cmd} contains "%" it is expanded to the current If {cmd} contains "%" it is expanded to the current
file name. Special characters are not escaped, use file name, "#" is expanded to the alternate file name.
quotes to avoid their special meaning: > Special characters in the file name are not escaped,
use quotes to avoid their special meaning: >
:!ls "%" :!ls "%"
< If the file name contains a "$" single quotes might < If the file name contains a "$" then single quotes
work better (but a single quote causes trouble): > might work better, but this only works if the file
name does not contain a single quote: >
:!ls '%' :!ls '%'
< This should always work, but it's more typing: > < This should always work, but it's more typing: >
:exe "!ls " . shellescape(expand("%")) :exe "!ls " . shellescape(expand("%"))
< To get a literal "%" or "#" prepend it with a
backslash. For example, to list all files starting
with "%": >
:!ls \%*
< <
A newline character ends {cmd}, what follows is A newline character ends {cmd}, what follows is
interpreted as a following ":" command. However, if interpreted as a following ":" command. However, if
@@ -464,7 +470,7 @@ B *+vartabs* Variable-width tabstops. |'vartabstop'|
N *+viminfo* |'viminfo'| N *+viminfo* |'viminfo'|
*+vertsplit* Vertically split windows |:vsplit|; Always enabled *+vertsplit* Vertically split windows |:vsplit|; Always enabled
since 8.0.1118. since 8.0.1118.
N *+virtualedit* |'virtualedit'| N *+virtualedit* |'virtualedit'| Always enabled since 8.1.826.
T *+visual* Visual mode |Visual-mode| Always enabled since 7.4.200. T *+visual* Visual mode |Visual-mode| Always enabled since 7.4.200.
T *+visualextra* extra Visual mode commands |blockwise-operators| T *+visualextra* extra Visual mode commands |blockwise-operators|
T *+vreplace* |gR| and |gr| T *+vreplace* |gR| and |gr|

View File

@@ -1,4 +1,4 @@
*version8.txt* For Vim version 8.2. Last change: 2020 Feb 04 *version8.txt* For Vim version 8.2. Last change: 2020 Jun 08
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30777,7 +30777,7 @@ Solution: Use a double quoted string. Add a test.
Files: src/ex_docmd.c, src/testdir/test_mksession.vim Files: src/ex_docmd.c, src/testdir/test_mksession.vim
Patch 8.1.0804 Patch 8.1.0804
Problem: Crash when setting v:errmsg to empty list. (Jaon Franklin) Problem: Crash when setting v:errmsg to empty list. (Jason Franklin)
Solution: Separate getting value and assigning result. Solution: Separate getting value and assigning result.
Files: src/eval.c, src/testdir/test_eval_stuff.vim Files: src/eval.c, src/testdir/test_eval_stuff.vim
@@ -33684,8 +33684,8 @@ Solution: Also change the textprop implementation.
Files: src/textprop.c Files: src/textprop.c
Patch 8.1.1279 Patch 8.1.1279
Problem: Cannot set 'spellang' to "sr@latin". (Bojan Stipic) Problem: Cannot set 'spelllang' to "sr@latin". (Bojan Stipic)
Solution: Allow using '@' in 'spellang'. (closes #4342) Solution: Allow using '@' in 'spelllang'. (closes #4342)
Files: src/option.c, src/testdir/gen_opt_test.vim Files: src/option.c, src/testdir/gen_opt_test.vim
Patch 8.1.1280 Patch 8.1.1280

View File

@@ -1,4 +1,4 @@
*vi_diff.txt* For Vim version 8.2. Last change: 2019 Dec 17 *vi_diff.txt* For Vim version 8.2. Last change: 2020 Jun 07
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -135,7 +135,6 @@ Support for different systems.
- Amiga (500, 1000, 1200, 2000, 3000, 4000, ...). - Amiga (500, 1000, 1200, 2000, 3000, 4000, ...).
- MS-Windows - MS-Windows
- VMS - VMS
- BeOS
- Macintosh - Macintosh
- IBM OS/390 - IBM OS/390
Note that on some systems features need to be disabled to reduce Note that on some systems features need to be disabled to reduce
@@ -162,7 +161,7 @@ Graphical User Interface (GUI). |gui|
define your own menus. Better support for CTRL/SHIFT/ALT keys in define your own menus. Better support for CTRL/SHIFT/ALT keys in
combination with special keys and mouse. Supported for various combination with special keys and mouse. Supported for various
platforms, such as X11 (with Motif and Athena interfaces), GTK, Win32 platforms, such as X11 (with Motif and Athena interfaces), GTK, Win32
(Windows 95 and later), BeOS, Amiga and Macintosh. (Windows XP and later), Amiga and Macintosh.
Multiple windows and buffers. |windows.txt| Multiple windows and buffers. |windows.txt|
Vim can split the screen into several windows, each editing a Vim can split the screen into several windows, each editing a

544
runtime/doc/vim-tr.1 Normal file
View File

@@ -0,0 +1,544 @@
.TH VIM 1 "11 Nisan 2006"
.SH AD
vim \- Vi IMproved, bir programc<6D>n<EFBFBD>n metin d<>zenleyicisi
.SH <EFBFBD>ZET
.br
.B vim
[se<73>enekler] [dosya ..]
.br
.B vim
[se<73>enekler] \-
.br
.B vim
[se<73>enekler] \-t etiket
.br
.B vim
[se<73>enekler] \-q [hatadosyas<61>]
.PP
.br
.B ex
.br
.B view
.br
.B gvim
.B gview
.B evim
.B eview
.br
.B rvim
.B rview
.B rgvim
.B rgview
.SH TANIM
.B Vim,
Vi ile yukar<61>ya do<64>ru uyumlu olan bir metin d<>zenleyicisidir.
Her t<>r d<>z metni d<>zenlemede kullan<61>labilir.
<EFBFBD>zellikle programlar<61> d<>zenlemede yararl<72>d<EFBFBD>r.
.PP
Vi <20>zerine yap<61>lm<6C><6D> bir<69>ok geli<6C>tirme ve iyile<6C>tirmeyi i<>erir:
<EFBFBD>ok d<>zeyli geri alma, <20>oklu pencereler ve arabellekler, s<>zdizim vurgulama,
komut sat<61>r<EFBFBD> d<>zenleme, dosya ad<61> tamamlama, <20>evrimi<6D>i yard<72>m, g<>rsel se<73>im vb.
.B Vim
ve Vi aras<61>ndaki de<64>i<EFBFBD>ikliklerin bir <20>zeti i<>in ":help vi_diff.txt"
dosyas<EFBFBD>na bir g<>z at<61>n.
.PP
.B Vim'i
<EFBFBD>al<EFBFBD><EFBFBD>t<EFBFBD>r<EFBFBD>rken gerekli olan yard<72>m<EFBFBD>n <20>o<EFBFBD>u <20>evrimi<6D>i yard<72>m sisteminden elde
edilebilir. Bunun i<>in ":help" komutunu kullanabilirsiniz.
A<EFBFBD>a<EFBFBD><EFBFBD>da <20>EVR<56>M<EFBFBD><4D><EFBFBD> YARDIM b<>l<EFBFBD>m<EFBFBD>ne bak<61>n.
.PP
Genelde
.B Vim
tek bir dosyay<61> d<>zenlemek i<>in <20>u komutla <20>al<61><6C>t<EFBFBD>r<EFBFBD>l<EFBFBD>r:
.PP
vim dosya
.PP
Biraz daha a<>acak olursak:
.PP
vim [se<73>enekler] [dosyalistesi]
.PP
E<EFBFBD>er dosya listesi sa<73>lanmam<61><6D>sa, d<>zenleyici bo<62> bir arabellek a<>ar.
Bunun d<><64><EFBFBD>nda a<>a<EFBFBD><61>daki d<>rt se<73>enekten bir tanesi de bir veya birden <20>ok
dosyay<EFBFBD> d<>zenlemek i<>in kullan<61>labilir.
.TP 12
dosya ..
Dosya adlar<61>n<EFBFBD>n bir listesi.
Bunlardan ilki ekrana getirilip arabelle<6C>e y<>klenir.
<EFBFBD>mle<EFBFBD> arabelle<6C>in ilk sat<61>r<EFBFBD>nda konumland<6E>r<EFBFBD>l<EFBFBD>r.
Di<EFBFBD>er dosyalara ":next" komutu ile ge<67>ebilirsiniz.
Ad<EFBFBD> tire ile ba<62>layan bir dosyay<61> d<>zenlemek i<>in dosya listesinin ba<62><61>na
"\-\-" koyun.
.TP
\-
D<EFBFBD>zenlenecek dosya stdin'den okunur. Komutlar bir tty olmas<61> gereken
stderr'den okunur.
.TP
\-t {etiket}
D<EFBFBD>zenlenecek dosya ve bu dosyan<61>n ba<62>lang<6E><67> imle<6C> konumu bir "etiket"e
dayan<EFBFBD>r, bir t<>r b<>rakt<6B><74><EFBFBD>n<EFBFBD>z konumu belirten bir ayra<72> gibi.
Etiket dosyas<61>nda {etiket} aran<61>r, ili<6C>kin dosya <20>u anki dosya olur ve
ili<EFBFBD>kin komut <20>al<61><6C>t<EFBFBD>r<EFBFBD>l<EFBFBD>r.
Bu genelde C programlar<61> i<>in kullan<61>l<EFBFBD>r, {etiket} bu durumda bir i<>lev
olabilir.
Bunun sonucunda bu i<>levi i<>eren dosya o anki dosya olur ve imle<6C> bu
i<EFBFBD>levin ba<62>lang<6E>c<EFBFBD>na konumland<6E>r<EFBFBD>l<EFBFBD>r.
Ek bilgi i<>in: ":help tag\-commands".
.TP
\-q [hatadosyas<61>]
H<EFBFBD>zl<EFBFBD> d<>zelt kipinde ba<62>lat
[hatadosyas<61>] okunur ve ilk hata g<>r<EFBFBD>nt<6E>lenir.
E<EFBFBD>er [hatadosyas<61>] sa<73>lanmazsa, dosya ad<61> 'errorfile' se<73>ene<6E>inden al<61>n<EFBFBD>r
(<28>ntan<61>ml<6D> olarak Amiga i<>in "AztecC.Err", di<64>er sistemlerde "errors.err").
Sonraki hatalara ":cn" komutu ile ge<67>ilebilir.
Ek bilgi i<>in: ":help quickfix".
.PP
.B Vim
girilen komutun ad<61>na g<>re de<64>i<EFBFBD>ik bi<62>imde davran<61>r (<28>al<61><6C>t<EFBFBD>r<EFBFBD>labilir h<>l<EFBFBD>
ayn<EFBFBD> dosya olarak kalabilir).
.TP 10
vim
"Normal" kip, standart <20>al<61><6C>ma bi<62>imi.
.TP
ex
Ex kipinde ba<62>lat.
"\-e" de<64>i<EFBFBD>keni ile de ba<62>lat<61>labilir.
Normal kipe ":vi" komutu ile ge<67>ilebilir.
.TP
view
Saltokunur kipte ba<62>lat. Bu kipte dosya yaz<61>m<EFBFBD>na izin verilmez.
"\-R" de<64>i<EFBFBD>keni ile de ba<62>lat<61>labilir.
.TP
gvim gview
Grafik arabirim s<>r<EFBFBD>m<EFBFBD>.
Yeni bir pencere a<>ar.
"\-g" de<64>i<EFBFBD>keni ile de ba<62>lat<61>labilir.
.TP
evim eview
Kolay kipte ba<62>lat<61>lan grafik arabirim s<>r<EFBFBD>m<EFBFBD>.
Yeni bir pencere a<>ar.
"\-y" de<64>i<EFBFBD>keni ile de ba<62>lat<61>labilir.
.TP
rvim rview rgvim rgview
Yukar<EFBFBD>daki ile ayn<79>, ancak s<>n<EFBFBD>rlamalar i<>erir. Kabuk komutlar<61>
<EFBFBD>al<EFBFBD><EFBFBD>t<EFBFBD>r<EFBFBD>lamaz veya
.B Vim
ask<EFBFBD>ya al<61>namaz.
"\-Z" de<64>i<EFBFBD>keni ile de ba<62>lat<61>labilir.
.SH SE<EFBFBD>ENEKLER
Se<EFBFBD>enekler bir s<>ra g<>zetmeksizin dosya adlar<61>ndan <20>nce veya sonra
kullan<EFBFBD>labilir.
Herhangi bir de<64>i<EFBFBD>ken i<>ermeyen se<73>enekler bir tirenin ard<72>nda s<>ralanabilir.
.TP 12
+[num]
<EFBFBD>lk dosya i<>in imle<6C> "num" sat<61>r<EFBFBD>nda konumland<6E>r<EFBFBD>lacakt<6B>r.
E<EFBFBD>er "num" eksikse imle<6C> en son sat<61>rda ba<62>lar.
.TP
+/{dizge}
<EFBFBD>lk dosya i<>in imle<6C> {dizgi}'nin ilk e<>le<6C>mesinin oldu<64>u sat<61>rda
konumland<EFBFBD>r<EFBFBD>lacakt<EFBFBD>r.
Kullan<EFBFBD>labilir arama dizgileri i<>in ":help search\-pattern" yaz<61>n.
.TP
+{komut}
.TP
\-c {komut}
<EFBFBD>lk dosya okunduktan sonra {komut} <20>al<61><6C>t<EFBFBD>r<EFBFBD>l<EFBFBD>r.
{komut} bir Ex komutu olarak i<>letilir.
E<EFBFBD>er {komut} bo<62>luk i<>eriyorsa <20>ift t<>rnak i<>erisine al<61>nmal<61>d<EFBFBD>r (bu
kullan<EFBFBD>lan kabu<62>a ba<62>l<EFBFBD>d<EFBFBD>r).
<EFBFBD>rnek: Vim "+set si" main.c
.br
Not: 10 taneye kadar "+" veya "\-c" komutu kullanabilirsiniz.
.TP
\-S {dosya}
<EFBFBD>lk dosya okunduktan sonra {dosya} kaynak al<61>n<EFBFBD>r.
\-c "source {dosya}" bu komutun e<>de<64>eridir.
{dosya}, '\-' ile ba<62>layamaz.
E<EFBFBD>er {dosya} sa<73>lanmazsa "Session.vim" kullan<61>l<EFBFBD>r (yaln<6C>zca \-S son
de<EFBFBD>i<EFBFBD>ken olarak kullan<61>ld<6C><64><EFBFBD>nda i<>e yarar).
.TP
\-\-cmd {komut}
"\-c" komutu gibi, ancak komut herhangi bir vimrc dosyas<61>n<EFBFBD> i<>letmeden
<EFBFBD>nce <20>al<61><6C>t<EFBFBD>r<EFBFBD>l<EFBFBD>r.
"\-c" komutundan ba<62><61>ms<6D>z olarak bu komutlardan 10 taneye kadar
<EFBFBD>al<EFBFBD><EFBFBD>t<EFBFBD>rabilirsiniz.
.TP
\-A
E<EFBFBD>er
.B Vim
sa<EFBFBD>dan sola yaz<61>lan dosyalar<61> ve Arap<61>a klavye dizilimini kullanabilmesi i<>in
ARAP<EFBFBD>A deste<74>i ile derlenmi<6D>e bu se<73>enek
.B Vim'i
Arap<EFBFBD>a kipinde ba<62>lat<61>r ('arabic' se<73>ene<6E>i a<><61>l<EFBFBD>r). Aksi durumda
.B Vim
hata verip <20><>kar.
.TP
\-b
<EFBFBD>kili kip.
Bir <20>al<61><6C>t<EFBFBD>r<EFBFBD>labiliri veya ikili dosyay<61> d<>zenlemeye olanacak sa<73>layacak
birka<EFBFBD> se<73>enek ayarlan<61>r.
.TP
\-C
Uyumlu kip. 'compatible' se<73>ene<6E>ini ayarlar.
Bu kipte
.B Vim
bir .vimrc dosyas<61> var olsa bile genelde Vi gibi davran<61>r.
.TP
\-d
Kar<EFBFBD><EFBFBD>la<EFBFBD>t<EFBFBD>rma kipinde ba<62>lat.
Bir, iki, <20><> veya d<>rt adet dosya ad<61> de<64>i<EFBFBD>keni olmal<61>d<EFBFBD>r.
.B Vim
b<EFBFBD>t<EFBFBD>n dosyalar<61> yan yana a<>ar ve aralar<61>ndaki de<64>i<EFBFBD>iklikleri g<>sterir.
vimdiff(1) gibi <20>al<61><6C><EFBFBD>r.
.TP
\-d {ayg<79>t}
{ayg<79>t}'<27> bir u<>birim olarak kullanmak i<>in a<>ar.
Yaln<EFBFBD>zca Amiga'da <20>al<61><6C><EFBFBD>r.
<EFBFBD>rnek:
"\-d con:20/30/600/150".
.TP
\-D
Hata ay<61>klama kipi. Bir beti<74>in ilk komutunu <20>al<61><6C>t<EFBFBD>r<EFBFBD>rken hata ay<61>klama
kipine ge<67>er.
.TP
\-e
.B Vim'i
Ex kipinde ba<62>lat<61>r, "ex" <20>al<61><6C>t<EFBFBD>r<EFBFBD>labiliri ile ayn<79> i<>levi g<>r<EFBFBD>r.
.TP
\-E
.B Vim'i
geli<EFBFBD>tirilmi<EFBFBD> Ex kipinde ba<62>lat<61>r, "exim" <20>al<61><6C>t<EFBFBD>r<EFBFBD>labiliri ile ayn<79>
i<EFBFBD>levi g<>r<EFBFBD>r.
.TP
\-f
<EFBFBD>nplan. Grafik arabirim s<>r<EFBFBD>m<EFBFBD> i<>in
.B Vim
ba<EFBFBD>lad<EFBFBD><EFBFBD><EFBFBD> kabuktan ayr<79>lmayacak ve kendisini <20>atallamayacakt<6B>r.
Amiga'da,
.B Vim
yeni bir pencere a<>mak i<>in yeniden ba<62>lat<61>lmaz.
Bu se<73>enek
.B Vim
d<EFBFBD>zenleme oturumunun bitmesini bekleyecek bir program taraf<61>ndan
ba<EFBFBD>lat<EFBFBD>ld<EFBFBD><EFBFBD><EFBFBD>nda kullan<61>lmal<61>d<EFBFBD>r (<28>rn. mail).
Amiga'da ":sh" ve ":!" komutlar<61> <20>al<61><6C>mayacakt<6B>r.
.TP
\-\-nofork
<EFBFBD>nplan. Grafik arabirim s<>r<EFBFBD>m<EFBFBD> i<>in
.B Vim
ba<EFBFBD>lad<EFBFBD><EFBFBD><EFBFBD> kabuktan ayr<79>lmayacak ve kendisini <20>atallamayacakt<6B>r.
.TP
\-F
E<EFBFBD>er
.B Vim
sa<EFBFBD>dan sola yaz<61>lan dosyalar<61> ve Fars<72>a klavye dizilimini kullanabilmesi i<>in
FKMAP deste<74>i ile derlenmi<6D>se, bu se<73>enek
.B Vim'i
Fars<EFBFBD>a kipinde ba<62>lat<61>r ('fkmap' ve 'rightleft' se<73>enekleri a<><61>l<EFBFBD>r).
Aksi durumda
.B Vim
hata verip <20><>kar.
.TP
\-g
E<EFBFBD>er
.B Vim
grafik arabirim deste<74>i ile derlenmi<6D>se bu se<73>enek grafik arabirimi <20>al<61><6C>t<EFBFBD>r<EFBFBD>r.
E<EFBFBD>er grafik arabirim deste<74>i eklenmemi<6D>se
.B Vim
hata verir ve <20><>kar.
.TP
\-h
Komut sat<61>r<EFBFBD> de<64>i<EFBFBD>kenleri ve se<73>enekleri <20>zerine biraz yard<72>m sa<73>lar.
Bu komuttan sonra
.B Vim
<EFBFBD><EFBFBD>kar.
.TP
\-H
E<EFBFBD>er
.B Vim
sa<EFBFBD>dan sola yaz<61>lan dosyalar<61> ve <20>branca klavye dizilimini kullanabilmesi i<>in
RIGHTLEFT deste<74>i ile derlenmi<6D>se, bu se<73>enek
.B Vim'i
<EFBFBD>branca kipinde ba<62>lat<61>r ('hkmap' ve 'rightleft' se<73>enekleri a<><61>l<EFBFBD>r).
Aksi durumda
.B Vim
hata verir ve <20><>kar.
.TP
\-i {viminfo}
<EFBFBD>ntan<EFBFBD>ml<EFBFBD> "~/.viminfo" dosyas<61> yerine kullan<61>lacak olan viminfo dosyas<61>n<EFBFBD>
belirtmek i<>in kullan<61>l<EFBFBD>r.
Bu komut ayn<79> zamanda viminfo kullan<61>m<EFBFBD>n<EFBFBD> atlamak i<>in de kullan<61>labilir.
Bunun i<>in dosya ad<61> yerine "NONE" vermeniz yeterlidir.
.TP
\-L
\-r ile ayn<79>.
.TP
\-l
Lisp kipi.
Bu de<64>i<EFBFBD>ken 'lisp' ve 'showmatch' se<73>eneklerini a<>ar.
.TP
\-m
Dosya yazma se<73>ene<6E>i kapal<61>d<EFBFBD>r.
\'write' se<73>ene<6E>ini s<>f<EFBFBD>rlar.
Arabelle<EFBFBD>i h<>l<EFBFBD> de<64>i<EFBFBD>tirebilirsiniz, ancak dosyay<61> yazmak olanakl<6B> de<64>ildir.
.TP
\-M
De<EFBFBD>i<EFBFBD>ikliklere izin verilmez. 'modifiable' ve 'write' se<73>enekleri kapat<61>l<EFBFBD>r,
b<EFBFBD>ylece de<64>i<EFBFBD>iklik yap<61>lamaz ve dosyalar yaz<61>lamaz.
Bu se<73>enekleri yeniden a<><61>p de<64>i<EFBFBD>iklik yapmay<61> etkinle<6C>tirebilirsiniz.
.TP
\-N
Uyumsuz kip. 'no-compatible' se<73>ene<6E>ini s<>f<EFBFBD>rlar.
Bu se<73>enekle birlikte
.B Vim
biraz daha d<>zg<7A>nce <20>al<61><6C><EFBFBD>r, ancak bir .vimrc dosyas<61> olmamas<61>na ra<72>men
Vi ile daha az uyumludur.
.TP
\-n
Bir takas dosyas<61> kullan<61>lmaz.
<EFBFBD><EFBFBD>kme sonras<61> kurtarma olanakl<6B> olmayacakt<6B>r.
E<EFBFBD>er <20>ok yava<76> bir ortamda dosya <20>al<61><6C><EFBFBD>yorsan<61>z (<28>rn. disket) yararl<72> olabilir.
":set uc=0" ile de yap<61>labilir.
Geri almak i<>in ":set uc=200" yap<61>n.
.TP
\-nb
NetBeans i<>in bir d<>zenleyici sunucusu olur. Ayr<79>nt<6E>lar i<>in belgelere bak<61>n.
.TP
\-o[N]
N say<61>da pencereyi <20>st <20>ste a<>ar.
N verilmezse, her dosya i<>in bir pencere a<>ar.
.TP
\-O[N]
N say<61>da pencereyi yan yana a<>ar.
N verilmezse, her dosya i<>in bir pencere a<>ar.
.TP
\-p[N]
N say<61>da sekme a<>ar.
N verilmezse, her dosya i<>in bir sekme a<>ar.
.TP
\-R
Saltokunur kip.
\'readonly' se<73>ene<6E>i a<><61>l<EFBFBD>r.
Arabelle<EFBFBD>i h<>l<EFBFBD> de<64>i<EFBFBD>tirebilirsiniz, ancak yanl<6E><6C>l<EFBFBD>kla dosyan<61>n <20>zerine
yazmaktan sizi korur.
Dosyan<EFBFBD>n <20>zerine yazmak istemiyorsan<61>z, Ex komutuna bir <20>nlem imi ekleyin,
<EFBFBD>rn. ":w!".
\-R se<73>ene<6E>i ayn<79> zamanda \-n se<73>ene<6E>ini de uygular (yukar<61>da bak<61>n).
\'readonly' se<73>ene<6E>i ":set noro" ile s<>f<EFBFBD>rlanabilir.
Ek bilgi i<>in: ":help 'readonly'".
.TP
\-r
Takas dosyalar<61>n<EFBFBD> i<>erdikleri kurtarma bilgilerini g<>sterecek bi<62>imde listeler.
.TP
\-r {dosya}
Kurtarma kipi.
<EFBFBD><EFBFBD>km<EFBFBD><EFBFBD> bir d<>zenleme oturumunu takas dosyas<61>n<EFBFBD> kullanarak kurtar<61>r.
Takas dosyas<61> dosya ile ayn<79> ada iye olup sonuna ".swp" eklenmi<6D>tir.
Ek bilgi i<>in: ":help recovery".
.TP
\-s
Sessiz kip. Yaln<6C>zca "Ex" olarak ba<62>lat<61>ld<6C><64><EFBFBD>nda veya "\-e" se<73>ene<6E>i
"\-s" se<73>ene<6E>inden <20>nce verildi<64>inde <20>al<61><6C><EFBFBD>r.
.TP
\-s {betikgir}
{betikgir} betik dosyas<61> okunur.
Dosyadaki karakterler onlar<61> siz girmi<6D>siniz gibi kabul edilir.
Ayn<EFBFBD>s<EFBFBD> ":source! {betikgir}" komutu ile de ger<65>ekle<6C>tirilebilir.
E<EFBFBD>er dosyan<61>n sonuna d<>zenleyici <20><>kmadan <20>nce gelinirse, sonraki karakterler
klavyeden okunur.
.TP
\-T {u<>birim}
.B Vim'e
kulland<EFBFBD><EFBFBD><EFBFBD>n<EFBFBD>z u<>birimin ad<61>n<EFBFBD> s<>yler.
Yaln<EFBFBD>zca kendili<6C>inden okunamazsa gereklidir.
.B Vim'in
tan<EFBFBD>d<EFBFBD><EFBFBD><EFBFBD> bir u<>birim olmal<61>d<EFBFBD>r veya termcap veya terminfo dosyas<61>nda
tan<EFBFBD>ml<EFBFBD> olmal<61>d<EFBFBD>r.
.TP
\-u {vimrc}
<EFBFBD>lklendirme i<>in {vimrc} dosyas<61>ndaki komutlar<61> kullan.
Di<EFBFBD>er t<>m ilklendirmeler atlan<61>r.
Bunu <20>zel t<>rde dosyalar<61> d<>zenlemek i<>in kullan<61>n.
Dosya ad<61> olarak "NONE" verilirse t<>m <20>zelle<6C>tirmeler atlan<61>r.
Ek bilgi i<>in vim i<>inde ":help initialization" b<>l<EFBFBD>m<EFBFBD>ne bak<61>n.
.TP
\-U {gvimrc}
Grafik arabirim ilklendirmesi i<>in {gvimrc} dosyas<61>ndaki komutlara bak<61>n.
Di<EFBFBD>er t<>m grafik arabirim ilklendirmeleri atlan<61>r.
Dosya ad<61> olarak "NONE" verilirse t<>m <20>zelle<6C>tirmeler atlan<61>r.
Ek bilgi i<>in vim i<>inde ":help gui\-init" b<>l<EFBFBD>m<EFBFBD>ne bak<61>n.
.TP
\-V[N]
S<EFBFBD>zl<EFBFBD> anlat<61>m. Hangi dosyalar<61>n kaynak al<61>nd<6E><64><EFBFBD>n<EFBFBD> ve viminfo dosyas<61>ndan
nelerin okundu<64>unu yazd<7A>r<EFBFBD>r. 'verbose' i<>in iste<74>e ba<62>l<EFBFBD> N se<73>ene<6E>i
kullan<EFBFBD>labilir. <20>ntan<61>ml<6D> say<61> 10'dur.
.TP
\-v
.B Vim'i
"vi" yazarak ba<62>lat<61>rm<72><6D> gibi Vi kipinde ba<62>lat<61>r. Bu yaln<6C>zca
<EFBFBD>al<EFBFBD><EFBFBD>t<EFBFBD>r<EFBFBD>labilir "ex" oldu<64>unda bir i<>e yarar.
.TP
\-w {betik<69><6B>k}
Girdi<EFBFBD>iniz t<>m karakterler siz
.B Vim'den
<EFBFBD><EFBFBD>kana de<64>in {betik<69><6B>k} dosyas<61>nda saklan<61>r.
Bu "vim \-s" veya ":source" komutu ile kullan<61>lacak bir betik yaratmaya yarar.
E<EFBFBD>er {betik<69><6B>k} dosyas<61> varsa karakterler dosyaya eklenir.
.TP
\-W {betik<69><6B>k}
\-w gibi, ancak var olan bir dosyan<61>n <20>zerine yazar.
.TP
\-x
Dosya yazarken <20>ifreleme kullan<61>r. Bir <20>ifre girmeniz istenecektir.
.TP
\-X
X sunucusuna ba<62>lanmaz. Vim'in u<>birimde ba<62>lama s<>resini azalt<6C>r ancak pencere ba<62>l<EFBFBD><6C><EFBFBD>
ve pano kullan<61>lamaz.
.TP
\-y
.B Vim'i
"evim" veya "eview" yazarak ba<62>lat<61>rm<72><6D> gibi kolay kipte ba<62>lat<61>r.
.B Vim'i
di<EFBFBD>er t<>kla ve yaz d<>zenleyicileri gibi <20>al<61><6C>t<EFBFBD>r<EFBFBD>r.
.TP
\-Z
K<EFBFBD>s<EFBFBD>tl<EFBFBD> kip. Program "r" yazarak ba<62>lat<61>lm<6C><6D> gibi davran<61>r.
.TP
\-\-
Se<EFBFBD>eneklerin bitti<74>ini belirtir.
Bundan sonraki de<64>i<EFBFBD>kenler art<72>k bir dosya ad<61> olarak i<>letilir.
Ayn<EFBFBD> zamanda '\-' ile ba<62>layan bir dosyay<61> tan<61>tmak i<>in de kullan<61>labilir.
.TP
\-\-echo\-wid
Yaln<EFBFBD>zca GTK grafik arabirimi: Pencere numaras<61>n<EFBFBD> stdout'a yank<6E>la.
.TP
\-\-help
Yard<EFBFBD>m iletisini yazd<7A>r<EFBFBD>r ve <20><>kar, "\-h" gibi.
.TP
\-\-literal
Dosya ad<61> de<64>i<EFBFBD>kenlerini ger<65>ek anlamda i<>let, joker karakterlerini
geni<EFBFBD>letme. Bunun kabu<62>un karakterleri kendili<6C>inden geni<6E>letti<74>i Unix'te
bir etkisi bulunmamaktad<61>r.
.TP
\-\-noplugin
Eklentileri y<>kleme. "\-u NONE" da ayn<79> i<>levi g<>r<EFBFBD>r.
.TP
\-\-remote
Bir Vim sunucusuna ba<62>lan ve geri kalan de<64>i<EFBFBD>kenlerde belirtilen dosyalar<61>
d<EFBFBD>zenle. E<>er bir sunucu bulunamazsa bir uyar<61> verilir ve dosyalar <20>u anki
Vim'de d<>zenlenir.
.TP
\-\-remote\-expr {ifade}
Bir Vim sunucusuna ba<62>lan ve {ifade}'yi de<64>erlendirip sonucu stdout'a yazd<7A>r.
.TP
\-\-remote\-send {anahtarlar}
Bir Vim sunucusuna ba<62>lan ve ona {anahtarlar} g<>nder.
.TP
\-\-remote\-silent
\-\-remote gibi, ancak bir sunucu bulunamazsa uyar<61> vermez.
.TP
\-\-remote\-wait
\-\-remote gibi, ancak Vim dosyalar d<>zenlenene kadar <20><>kmaz.
.TP
\-\-remote\-wait\-silent
\-\-remote\-wait gibi, ancak bir sunucu bulunamazsa uyar<61> vermez.
.TP
\-\-serverlist
Bulunabilecek b<>t<EFBFBD>n Vim sunucular<61>n<EFBFBD> listeler.
.TP
\-\-servername {ad}
{ad}'<27> bir sunucu ad<61> olarak kullan<61>r. Bir \-\-remote de<64>i<EFBFBD>keni ve
ba<EFBFBD>lanaca<EFBFBD><EFBFBD> sunucunun ad<61> ile kullan<61>lmad<61><64><EFBFBD> s<>rece <20>u anki Vim i<>in
kullan<EFBFBD>l<EFBFBD>r.
.TP
\-\-socketid {id}
Yaln<EFBFBD>zca GTK grafik arabirimi: GtkPlug mekanizmas<61>n<EFBFBD> kullanarak gvim'i ba<62>ka
bir pencerede <20>al<61><6C>t<EFBFBD>r.
.TP
\-\-version
S<EFBFBD>r<EFBFBD>m bilgisini yazd<7A>r<EFBFBD>r ve <20><>kar.
.SH <EFBFBD>EVR<EFBFBD>M<EFBFBD><EFBFBD><EFBFBD> YARDIM
.B Vim
i<EFBFBD>inde ":help" yazarak ba<62>lay<61>n.
Belirli bir konu <20>zerine yard<72>m almak i<>in ":help subject" yaz<61>n.
<EFBFBD>rne<EFBFBD>in: "ZZ" komutu <20>zerine bilgi almak i<>in ":help ZZ" yaz<61>n.
<Tab> ve CTRL-D kullanarak konular<61> tamamlay<61>n (":help cmdline\-completion").
Bir konumdan di<64>erini atlamak i<>in etiketler mevcuttur (bir t<>r k<>pr<70> gibi),
ek bilgi i<>in ":help").
T<EFBFBD>m belgelendirmeyi bu bi<62>imde okuyabilirsiniz, <20>rne<6E>in: ":help syntax.txt".
":help syntax.txt".
.SH DOSYALAR
.TP 15
/usr/local/lib/vim/doc/*.txt
.B Vim
belgelendirme dosyalar<61>.
T<EFBFBD>m listeyi g<>rmek i<>in ":help doc\-file\-list" yaz<61>n.
.TP
/usr/local/lib/vim/doc/tags
Belgelendirme i<>inde veri bulmak i<>in kullan<61>lan etiketler dosyas<61>.
.TP
/usr/local/lib/vim/syntax/syntax.vim
Sistem geneli s<>zdizim ilklendirmeleri.
.TP
/usr/local/lib/vim/syntax/*.vim
Programlama dilleri i<>in s<>zdizim dosyalar<61>.
.TP
/usr/local/lib/vim/vimrc
Sistem geneli
.B Vim
ilklendirmeleri.
.TP
~/.vimrc
Sizin ki<6B>isel
.B Vim
ilklendirmeleriniz.
.TP
/usr/local/lib/vim/gvimrc
Sistem geneli gvim ilklendirmeleri.
.TP
~/.gvimrc
Sizin ki<6B>isel gvim ilklendirmeleriniz.
.TP
/usr/local/lib/vim/optwin.vim
":options" komutu i<>in kullan<61>lan betik, g<>rsel se<73>enek ayarlar<61>.
.TP
/usr/local/lib/vim/menu.vim
gvim i<>in sistem geneli men<65> ilklendirmeleri.
.TP
/usr/local/lib/vim/bugreport.vim
Hata raporu olu<6C>turmak i<>in kullan<61>lan betik. Ek bilgi i<>in: ":help bugs".
.TP
/usr/local/lib/vim/filetype.vim
Dosya t<>r<EFBFBD>n<EFBFBD> ad<61>ndan tan<61>yan betik. Ek bilgi i<>in: ":help 'filetype'".
.TP
/usr/local/lib/vim/scripts.vim
Dosya t<>r<EFBFBD>n<EFBFBD> i<>eri<72>inden tan<61>yan betik. Ek bilgi i<>in: ":help 'filetype'".
.TP
/usr/local/lib/vim/print/*.ps
PostScript yazd<7A>rmas<61> i<>in kullan<61>lan dosyalar.
.PP
En g<>ncel bilgiler i<>in V<>M ana sayfas<61>n<EFBFBD> ziyaret edin:
.br
<URL:http://www.vim.org/>
.SH AYRICA BAKINIZ
vimtutor(1)
.SH YAZAR
.B Vim'in
b<EFBFBD>y<EFBFBD>k <20>o<EFBFBD>unlu<6C>u Bram Moolenaar taraf<61>ndan ba<62>kalar<61>n<EFBFBD>n kayda de<64>er
yard<EFBFBD>mlar<EFBFBD>yla yaz<61>lm<6C><6D>t<EFBFBD>r.
Ek bilgi i<>in
.B Vim
i<EFBFBD>inde ":help credits" yaz<61>n.
.br
.B Vim
Stevie tabanl<6E>d<EFBFBD>r, yazarlar<61>: Tim Thompson,
Tony Andrews ve G.R. (Fred) Walter.
Orijinal koddan geriye pek bir <20>ey kalmad<61><64><EFBFBD>n<EFBFBD> s<>ylemek yanl<6E><6C> olmaz.
.SH HATALAR
Bilinen hatalar<61>n bir listesi i<>in ":help todo" yaz<61>n.
.PP
Unutmay<EFBFBD>n ki, ba<62>kalar<61> taraf<61>ndan hata olarak de<64>erlendirilebilecek konular<61>n
bir <20>o<EFBFBD>u Vi'nin davran<61><6E>lar<61>na sad<61>k kal<61>nmas<61> nedeniyle vard<72>r. Yine de
baz<EFBFBD> <20>eylerin "Vi bunu de<64>i<EFBFBD>ik bi<62>imde yap<61>yor" diye hata olabilece<63>ini
d<EFBFBD><EFBFBD><EFBFBD>n<EFBFBD>yorsan<EFBFBD>z, "vi_diff.txt" dosyas<61>n<EFBFBD> dikkatle okuyun (veya Vim i<>inde
:help vi_diff.txt yaz<61>n.
Ek olarak 'compatible' ve 'cpoptions' se<73>eneklerine de bakabilirsiniz.

544
runtime/doc/vim-tr.UTF-8.1 Normal file
View File

@@ -0,0 +1,544 @@
.TH VIM 1 "11 Nisan 2006"
.SH AD
vim \- Vi IMproved, bir programcının metin düzenleyicisi
.SH ÖZET
.br
.B vim
[seçenekler] [dosya ..]
.br
.B vim
[seçenekler] \-
.br
.B vim
[seçenekler] \-t etiket
.br
.B vim
[seçenekler] \-q [hatadosyası]
.PP
.br
.B ex
.br
.B view
.br
.B gvim
.B gview
.B evim
.B eview
.br
.B rvim
.B rview
.B rgvim
.B rgview
.SH TANIM
.B Vim,
Vi ile yukarıya doğru uyumlu olan bir metin düzenleyicisidir.
Her tür düz metni düzenlemede kullanılabilir.
Özellikle programları düzenlemede yararlıdır.
.PP
Vi üzerine yapılmış birçok geliştirme ve iyileştirmeyi içerir:
Çok düzeyli geri alma, çoklu pencereler ve arabellekler, sözdizim vurgulama,
komut satırı düzenleme, dosya adı tamamlama, çevrimiçi yardım, görsel seçim vb.
.B Vim
ve Vi arasındaki değişikliklerin bir özeti için ":help vi_diff.txt"
dosyasına bir göz atın.
.PP
.B Vim'i
çalıştırırken gerekli olan yardımın çoğu çevrimiçi yardım sisteminden elde
edilebilir. Bunun için ":help" komutunu kullanabilirsiniz.
Aşağıda ÇEVRİMİÇİ YARDIM bölümüne bakın.
.PP
Genelde
.B Vim
tek bir dosyayı düzenlemek için şu komutla çalıştırılır:
.PP
vim dosya
.PP
Biraz daha açacak olursak:
.PP
vim [seçenekler] [dosyalistesi]
.PP
Eğer dosya listesi sağlanmamışsa, düzenleyici boş bir arabellek açar.
Bunun dışında aşağıdaki dört seçenekten bir tanesi de bir veya birden çok
dosyayı düzenlemek için kullanılabilir.
.TP 12
dosya ..
Dosya adlarının bir listesi.
Bunlardan ilki ekrana getirilip arabelleğe yüklenir.
İmleç arabelleğin ilk satırında konumlandırılır.
Diğer dosyalara ":next" komutu ile geçebilirsiniz.
Adı tire ile başlayan bir dosyayı düzenlemek için dosya listesinin başına
"\-\-" koyun.
.TP
\-
Düzenlenecek dosya stdin'den okunur. Komutlar bir tty olması gereken
stderr'den okunur.
.TP
\-t {etiket}
Düzenlenecek dosya ve bu dosyanın başlangıç imleç konumu bir "etiket"e
dayanır, bir tür bıraktığınız konumu belirten bir ayraç gibi.
Etiket dosyasında {etiket} aranır, ilişkin dosya şu anki dosya olur ve
ilişkin komut çalıştırılır.
Bu genelde C programları için kullanılır, {etiket} bu durumda bir işlev
olabilir.
Bunun sonucunda bu işlevi içeren dosya o anki dosya olur ve imleç bu
işlevin başlangıcına konumlandırılır.
Ek bilgi için: ":help tag\-commands".
.TP
\-q [hatadosyası]
Hızlı düzelt kipinde başlat
[hatadosyası] okunur ve ilk hata görüntülenir.
Eğer [hatadosyası] sağlanmazsa, dosya adı 'errorfile' seçeneğinden alınır
(öntanımlı olarak Amiga için "AztecC.Err", diğer sistemlerde "errors.err").
Sonraki hatalara ":cn" komutu ile geçilebilir.
Ek bilgi için: ":help quickfix".
.PP
.B Vim
girilen komutun adına göre değişik biçimde davranır (çalıştırılabilir hâlâ
aynı dosya olarak kalabilir).
.TP 10
vim
"Normal" kip, standart çalışma biçimi.
.TP
ex
Ex kipinde başlat.
"\-e" değişkeni ile de başlatılabilir.
Normal kipe ":vi" komutu ile geçilebilir.
.TP
view
Saltokunur kipte başlat. Bu kipte dosya yazımına izin verilmez.
"\-R" değişkeni ile de başlatılabilir.
.TP
gvim gview
Grafik arabirim sürümü.
Yeni bir pencere açar.
"\-g" değişkeni ile de başlatılabilir.
.TP
evim eview
Kolay kipte başlatılan grafik arabirim sürümü.
Yeni bir pencere açar.
"\-y" değişkeni ile de başlatılabilir.
.TP
rvim rview rgvim rgview
Yukarıdaki ile aynı, ancak sınırlamalar içerir. Kabuk komutları
çalıştırılamaz veya
.B Vim
askıya alınamaz.
"\-Z" değişkeni ile de başlatılabilir.
.SH SEÇENEKLER
Seçenekler bir sıra gözetmeksizin dosya adlarından önce veya sonra
kullanılabilir.
Herhangi bir değişken içermeyen seçenekler bir tirenin ardında sıralanabilir.
.TP 12
+[num]
İlk dosya için imleç "num" satırında konumlandırılacaktır.
Eğer "num" eksikse imleç en son satırda başlar.
.TP
+/{dizge}
İlk dosya için imleç {dizgi}'nin ilk eşleşmesinin olduğu satırda
konumlandırılacaktır.
Kullanılabilir arama dizgileri için ":help search\-pattern" yazın.
.TP
+{komut}
.TP
\-c {komut}
İlk dosya okunduktan sonra {komut} çalıştırılır.
{komut} bir Ex komutu olarak işletilir.
Eğer {komut} boşluk içeriyorsa çift tırnak içerisine alınmalıdır (bu
kullanılan kabuğa bağlıdır).
Örnek: Vim "+set si" main.c
.br
Not: 10 taneye kadar "+" veya "\-c" komutu kullanabilirsiniz.
.TP
\-S {dosya}
İlk dosya okunduktan sonra {dosya} kaynak alınır.
\-c "source {dosya}" bu komutun eşdeğeridir.
{dosya}, '\-' ile başlayamaz.
Eğer {dosya} sağlanmazsa "Session.vim" kullanılır (yalnızca \-S son
değişken olarak kullanıldığında işe yarar).
.TP
\-\-cmd {komut}
"\-c" komutu gibi, ancak komut herhangi bir vimrc dosyasını işletmeden
önce çalıştırılır.
"\-c" komutundan bağımsız olarak bu komutlardan 10 taneye kadar
çalıştırabilirsiniz.
.TP
\-A
Eğer
.B Vim
sağdan sola yazılan dosyaları ve Arapça klavye dizilimini kullanabilmesi için
ARAPÇA desteği ile derlenmişe bu seçenek
.B Vim'i
Arapça kipinde başlatır ('arabic' seçeneği açılır). Aksi durumda
.B Vim
hata verip çıkar.
.TP
\-b
İkili kip.
Bir çalıştırılabiliri veya ikili dosyayı düzenlemeye olanacak sağlayacak
birkaç seçenek ayarlanır.
.TP
\-C
Uyumlu kip. 'compatible' seçeneğini ayarlar.
Bu kipte
.B Vim
bir .vimrc dosyası var olsa bile genelde Vi gibi davranır.
.TP
\-d
Karşılaştırma kipinde başlat.
Bir, iki, üç veya dört adet dosya adı değişkeni olmalıdır.
.B Vim
bütün dosyaları yan yana açar ve aralarındaki değişiklikleri gösterir.
vimdiff(1) gibi çalışır.
.TP
\-d {aygıt}
{aygıt}'ı bir uçbirim olarak kullanmak için açar.
Yalnızca Amiga'da çalışır.
Örnek:
"\-d con:20/30/600/150".
.TP
\-D
Hata ayıklama kipi. Bir betiğin ilk komutunu çalıştırırken hata ayıklama
kipine geçer.
.TP
\-e
.B Vim'i
Ex kipinde başlatır, "ex" çalıştırılabiliri ile aynı işlevi görür.
.TP
\-E
.B Vim'i
geliştirilmiş Ex kipinde başlatır, "exim" çalıştırılabiliri ile aynı
işlevi görür.
.TP
\-f
Önplan. Grafik arabirim sürümü için
.B Vim
başladığı kabuktan ayrılmayacak ve kendisini çatallamayacaktır.
Amiga'da,
.B Vim
yeni bir pencere açmak için yeniden başlatılmaz.
Bu seçenek
.B Vim
düzenleme oturumunun bitmesini bekleyecek bir program tarafından
başlatıldığında kullanılmalıdır (örn. mail).
Amiga'da ":sh" ve ":!" komutları çalışmayacaktır.
.TP
\-\-nofork
Önplan. Grafik arabirim sürümü için
.B Vim
başladığı kabuktan ayrılmayacak ve kendisini çatallamayacaktır.
.TP
\-F
Eğer
.B Vim
sağdan sola yazılan dosyaları ve Farsça klavye dizilimini kullanabilmesi için
FKMAP desteği ile derlenmişse, bu seçenek
.B Vim'i
Farsça kipinde başlatır ('fkmap' ve 'rightleft' seçenekleri açılır).
Aksi durumda
.B Vim
hata verip çıkar.
.TP
\-g
Eğer
.B Vim
grafik arabirim desteği ile derlenmişse bu seçenek grafik arabirimi çalıştırır.
Eğer grafik arabirim desteği eklenmemişse
.B Vim
hata verir ve çıkar.
.TP
\-h
Komut satırı değişkenleri ve seçenekleri üzerine biraz yardım sağlar.
Bu komuttan sonra
.B Vim
çıkar.
.TP
\-H
Eğer
.B Vim
sağdan sola yazılan dosyaları ve İbranca klavye dizilimini kullanabilmesi için
RIGHTLEFT desteği ile derlenmişse, bu seçenek
.B Vim'i
İbranca kipinde başlatır ('hkmap' ve 'rightleft' seçenekleri açılır).
Aksi durumda
.B Vim
hata verir ve çıkar.
.TP
\-i {viminfo}
Öntanımlı "~/.viminfo" dosyası yerine kullanılacak olan viminfo dosyasını
belirtmek için kullanılır.
Bu komut aynı zamanda viminfo kullanımını atlamak için de kullanılabilir.
Bunun için dosya adı yerine "NONE" vermeniz yeterlidir.
.TP
\-L
\-r ile aynı.
.TP
\-l
Lisp kipi.
Bu değişken 'lisp' ve 'showmatch' seçeneklerini açar.
.TP
\-m
Dosya yazma seçeneği kapalıdır.
\'write' seçeneğini sıfırlar.
Arabelleği hâlâ değiştirebilirsiniz, ancak dosyayı yazmak olanaklı değildir.
.TP
\-M
Değişikliklere izin verilmez. 'modifiable' ve 'write' seçenekleri kapatılır,
böylece değişiklik yapılamaz ve dosyalar yazılamaz.
Bu seçenekleri yeniden açıp değişiklik yapmayı etkinleştirebilirsiniz.
.TP
\-N
Uyumsuz kip. 'no-compatible' seçeneğini sıfırlar.
Bu seçenekle birlikte
.B Vim
biraz daha düzgünce çalışır, ancak bir .vimrc dosyası olmamasına rağmen
Vi ile daha az uyumludur.
.TP
\-n
Bir takas dosyası kullanılmaz.
Çökme sonrası kurtarma olanaklı olmayacaktır.
Eğer çok yavaş bir ortamda dosya çalışıyorsanız (örn. disket) yararlı olabilir.
":set uc=0" ile de yapılabilir.
Geri almak için ":set uc=200" yapın.
.TP
\-nb
NetBeans için bir düzenleyici sunucusu olur. Ayrıntılar için belgelere bakın.
.TP
\-o[N]
N sayıda pencereyi üst üste açar.
N verilmezse, her dosya için bir pencere açar.
.TP
\-O[N]
N sayıda pencereyi yan yana açar.
N verilmezse, her dosya için bir pencere açar.
.TP
\-p[N]
N sayıda sekme açar.
N verilmezse, her dosya için bir sekme açar.
.TP
\-R
Saltokunur kip.
\'readonly' seçeneği açılır.
Arabelleği hâlâ değiştirebilirsiniz, ancak yanlışlıkla dosyanın üzerine
yazmaktan sizi korur.
Dosyanın üzerine yazmak istemiyorsanız, Ex komutuna bir ünlem imi ekleyin,
örn. ":w!".
\-R seçeneği aynı zamanda \-n seçeneğini de uygular (yukarıda bakın).
\'readonly' seçeneği ":set noro" ile sıfırlanabilir.
Ek bilgi için: ":help 'readonly'".
.TP
\-r
Takas dosyalarını içerdikleri kurtarma bilgilerini gösterecek biçimde listeler.
.TP
\-r {dosya}
Kurtarma kipi.
Çökmüş bir düzenleme oturumunu takas dosyasını kullanarak kurtarır.
Takas dosyası dosya ile aynı ada iye olup sonuna ".swp" eklenmiştir.
Ek bilgi için: ":help recovery".
.TP
\-s
Sessiz kip. Yalnızca "Ex" olarak başlatıldığında veya "\-e" seçeneği
"\-s" seçeneğinden önce verildiğinde çalışır.
.TP
\-s {betikgir}
{betikgir} betik dosyası okunur.
Dosyadaki karakterler onları siz girmişsiniz gibi kabul edilir.
Aynısı ":source! {betikgir}" komutu ile de gerçekleştirilebilir.
Eğer dosyanın sonuna düzenleyici çıkmadan önce gelinirse, sonraki karakterler
klavyeden okunur.
.TP
\-T {uçbirim}
.B Vim'e
kullandığınız uçbirimin adını söyler.
Yalnızca kendiliğinden okunamazsa gereklidir.
.B Vim'in
tanıdığı bir uçbirim olmalıdır veya termcap veya terminfo dosyasında
tanımlı olmalıdır.
.TP
\-u {vimrc}
İlklendirme için {vimrc} dosyasındaki komutları kullan.
Diğer tüm ilklendirmeler atlanır.
Bunu özel türde dosyaları düzenlemek için kullanın.
Dosya adı olarak "NONE" verilirse tüm özelleştirmeler atlanır.
Ek bilgi için vim içinde ":help initialization" bölümüne bakın.
.TP
\-U {gvimrc}
Grafik arabirim ilklendirmesi için {gvimrc} dosyasındaki komutlara bakın.
Diğer tüm grafik arabirim ilklendirmeleri atlanır.
Dosya adı olarak "NONE" verilirse tüm özelleştirmeler atlanır.
Ek bilgi için vim içinde ":help gui\-init" bölümüne bakın.
.TP
\-V[N]
Sözlü anlatım. Hangi dosyaların kaynak alındığını ve viminfo dosyasından
nelerin okunduğunu yazdırır. 'verbose' için isteğe bağlı N seçeneği
kullanılabilir. Öntanımlı sayı 10'dur.
.TP
\-v
.B Vim'i
"vi" yazarak başlatırmış gibi Vi kipinde başlatır. Bu yalnızca
çalıştırılabilir "ex" olduğunda bir işe yarar.
.TP
\-w {betikçık}
Girdiğiniz tüm karakterler siz
.B Vim'den
çıkana değin {betikçık} dosyasında saklanır.
Bu "vim \-s" veya ":source" komutu ile kullanılacak bir betik yaratmaya yarar.
Eğer {betikçık} dosyası varsa karakterler dosyaya eklenir.
.TP
\-W {betikçık}
\-w gibi, ancak var olan bir dosyanın üzerine yazar.
.TP
\-x
Dosya yazarken şifreleme kullanır. Bir şifre girmeniz istenecektir.
.TP
\-X
X sunucusuna bağlanmaz. Vim'in uçbirimde başlama süresini azaltır ancak pencere başlığı
ve pano kullanılamaz.
.TP
\-y
.B Vim'i
"evim" veya "eview" yazarak başlatırmış gibi kolay kipte başlatır.
.B Vim'i
diğer tıkla ve yaz düzenleyicileri gibi çalıştırır.
.TP
\-Z
Kısıtlı kip. Program "r" yazarak başlatılmış gibi davranır.
.TP
\-\-
Seçeneklerin bittiğini belirtir.
Bundan sonraki değişkenler artık bir dosya adı olarak işletilir.
Aynı zamanda '\-' ile başlayan bir dosyayı tanıtmak için de kullanılabilir.
.TP
\-\-echo\-wid
Yalnızca GTK grafik arabirimi: Pencere numarasını stdout'a yankıla.
.TP
\-\-help
Yardım iletisini yazdırır ve çıkar, "\-h" gibi.
.TP
\-\-literal
Dosya adı değişkenlerini gerçek anlamda işlet, joker karakterlerini
genişletme. Bunun kabuğun karakterleri kendiliğinden genişlettiği Unix'te
bir etkisi bulunmamaktadır.
.TP
\-\-noplugin
Eklentileri yükleme. "\-u NONE" da aynı işlevi görür.
.TP
\-\-remote
Bir Vim sunucusuna bağlan ve geri kalan değişkenlerde belirtilen dosyaları
düzenle. Eğer bir sunucu bulunamazsa bir uyarı verilir ve dosyalar şu anki
Vim'de düzenlenir.
.TP
\-\-remote\-expr {ifade}
Bir Vim sunucusuna bağlan ve {ifade}'yi değerlendirip sonucu stdout'a yazdır.
.TP
\-\-remote\-send {anahtarlar}
Bir Vim sunucusuna bağlan ve ona {anahtarlar} gönder.
.TP
\-\-remote\-silent
\-\-remote gibi, ancak bir sunucu bulunamazsa uyarı vermez.
.TP
\-\-remote\-wait
\-\-remote gibi, ancak Vim dosyalar düzenlenene kadar çıkmaz.
.TP
\-\-remote\-wait\-silent
\-\-remote\-wait gibi, ancak bir sunucu bulunamazsa uyarı vermez.
.TP
\-\-serverlist
Bulunabilecek bütün Vim sunucularını listeler.
.TP
\-\-servername {ad}
{ad}'ı bir sunucu adı olarak kullanır. Bir \-\-remote değişkeni ve
bağlanacağı sunucunun adı ile kullanılmadığı sürece şu anki Vim için
kullanılır.
.TP
\-\-socketid {id}
Yalnızca GTK grafik arabirimi: GtkPlug mekanizmasını kullanarak gvim'i başka
bir pencerede çalıştır.
.TP
\-\-version
Sürüm bilgisini yazdırır ve çıkar.
.SH ÇEVRİMİÇİ YARDIM
.B Vim
içinde ":help" yazarak başlayın.
Belirli bir konu üzerine yardım almak için ":help subject" yazın.
Örneğin: "ZZ" komutu üzerine bilgi almak için ":help ZZ" yazın.
<Tab> ve CTRL-D kullanarak konuları tamamlayın (":help cmdline\-completion").
Bir konumdan diğerini atlamak için etiketler mevcuttur (bir tür köprü gibi),
ek bilgi için ":help").
Tüm belgelendirmeyi bu biçimde okuyabilirsiniz, örneğin: ":help syntax.txt".
":help syntax.txt".
.SH DOSYALAR
.TP 15
/usr/local/lib/vim/doc/*.txt
.B Vim
belgelendirme dosyaları.
Tüm listeyi görmek için ":help doc\-file\-list" yazın.
.TP
/usr/local/lib/vim/doc/tags
Belgelendirme içinde veri bulmak için kullanılan etiketler dosyası.
.TP
/usr/local/lib/vim/syntax/syntax.vim
Sistem geneli sözdizim ilklendirmeleri.
.TP
/usr/local/lib/vim/syntax/*.vim
Programlama dilleri için sözdizim dosyaları.
.TP
/usr/local/lib/vim/vimrc
Sistem geneli
.B Vim
ilklendirmeleri.
.TP
~/.vimrc
Sizin kişisel
.B Vim
ilklendirmeleriniz.
.TP
/usr/local/lib/vim/gvimrc
Sistem geneli gvim ilklendirmeleri.
.TP
~/.gvimrc
Sizin kişisel gvim ilklendirmeleriniz.
.TP
/usr/local/lib/vim/optwin.vim
":options" komutu için kullanılan betik, görsel seçenek ayarları.
.TP
/usr/local/lib/vim/menu.vim
gvim için sistem geneli menü ilklendirmeleri.
.TP
/usr/local/lib/vim/bugreport.vim
Hata raporu oluşturmak için kullanılan betik. Ek bilgi için: ":help bugs".
.TP
/usr/local/lib/vim/filetype.vim
Dosya türünü adından tanıyan betik. Ek bilgi için: ":help 'filetype'".
.TP
/usr/local/lib/vim/scripts.vim
Dosya türünü içeriğinden tanıyan betik. Ek bilgi için: ":help 'filetype'".
.TP
/usr/local/lib/vim/print/*.ps
PostScript yazdırması için kullanılan dosyalar.
.PP
En güncel bilgiler için VİM ana sayfasını ziyaret edin:
.br
<URL:http://www.vim.org/>
.SH AYRICA BAKINIZ
vimtutor(1)
.SH YAZAR
.B Vim'in
büyük çoğunluğu Bram Moolenaar tarafından başkalarının kayda değer
yardımlarıyla yazılmıştır.
Ek bilgi için
.B Vim
içinde ":help credits" yazın.
.br
.B Vim
Stevie tabanlıdır, yazarları: Tim Thompson,
Tony Andrews ve G.R. (Fred) Walter.
Orijinal koddan geriye pek bir şey kalmadığını söylemek yanlış olmaz.
.SH HATALAR
Bilinen hataların bir listesi için ":help todo" yazın.
.PP
Unutmayın ki, başkaları tarafından hata olarak değerlendirilebilecek konuların
bir çoğu Vi'nin davranışlarına sadık kalınması nedeniyle vardır. Yine de
bazı şeylerin "Vi bunu değişik biçimde yapıyor" diye hata olabileceğini
düşünüyorsanız, "vi_diff.txt" dosyasını dikkatle okuyun (veya Vim içinde
:help vi_diff.txt yazın.
Ek olarak 'compatible' ve 'cpoptions' seçeneklerine de bakabilirsiniz.

View File

@@ -1,4 +1,4 @@
*vim9.txt* For Vim version 8.2. Last change: 2020 May 25 *vim9.txt* For Vim version 8.2. Last change: 2020 Jun 21
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,7 +30,7 @@ THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
Vim script has been growing over time, while preserving backwards Vim script has been growing over time, while preserving backwards
compatibility. That means bad choices from the past often can't be changed compatibility. That means bad choices from the past often can't be changed
and compability with Vi restricts possible solutions. Execution is quite and compatibility with Vi restricts possible solutions. Execution is quite
slow, each line is parsed every time it is executed. slow, each line is parsed every time it is executed.
The main goal of Vim9 script is to drastically improve performance. This is The main goal of Vim9 script is to drastically improve performance. This is
@@ -68,7 +68,7 @@ In Vim script comments normally start with double quote. That can also be the
start of a string, thus in many places it cannot be used. In Vim9 script a start of a string, thus in many places it cannot be used. In Vim9 script a
comment can also start with #. In Vi this is a command to list text with comment can also start with #. In Vi this is a command to list text with
numbers, but you can also use `:number` for that. > numbers, but you can also use `:number` for that. >
let count = 0 # number of occurences let count = 0 # number of occurrences
To improve readability there must be a space between the command and the # To improve readability there must be a space between the command and the #
that starts a comment. Note that #{ is the start of a dictionary, therefore that starts a comment. Note that #{ is the start of a dictionary, therefore
@@ -106,7 +106,7 @@ list type, similar to Typescript. For example, a list of numbers: >
Functions and variables are script-local by default ~ Functions and variables are script-local by default ~
*vim9-scopes*
When using `:function` or `:def` to specify a new function at the script level When using `:function` or `:def` to specify a new function at the script level
in a Vim9 script, the function is local to the script, as if "s:" was in a Vim9 script, the function is local to the script, as if "s:" was
prefixed. Using the "s:" prefix is optional. prefixed. Using the "s:" prefix is optional.
@@ -136,7 +136,7 @@ and cannot be deleted or replaced.
Variable declarations with :let and :const ~ Variable declarations with :let and :const ~
*vim9-declaration*
Local variables need to be declared with `:let`. Local constants need to be Local variables need to be declared with `:let`. Local constants need to be
declared with `:const`. We refer to both as "variables". declared with `:const`. We refer to both as "variables".
@@ -269,6 +269,13 @@ possible AFTER the operators. For example: >
PosFunc(arg) : PosFunc(arg) :
NegFunc(arg) NegFunc(arg)
A special case is "->" for function call chains, it can appear in the next
line: >
let result = GetBuilder()
->BuilderSetWidth(333)
->BuilderSetHeight(777)
->BuilderBuild()
Note that "enddef" cannot be used at the start of a continuation line, it ends Note that "enddef" cannot be used at the start of a continuation line, it ends
the current function. the current function.
@@ -388,13 +395,17 @@ THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
The second and third form are optional arguments. The second and third form are optional arguments.
When the caller omits an argument the {value} is used. When the caller omits an argument the {value} is used.
The function will be compiled into instructions when
called, or when `:defcompile` is used. Syntax and
type errors will be produced at that time.
NOTE: It is possible to nest `:def` inside another NOTE: It is possible to nest `:def` inside another
`:def`, but it is not possible to nest `:def` inside `:def`, but it is not possible to nest `:def` inside
`:function`, for backwards compatibility. `:function`, for backwards compatibility.
[!] is used as with `:function`. Note that in Vim9 [!] is used as with `:function`. Note that in Vim9
script script-local functions cannot be deleted or script script-local functions cannot be deleted or
redefined. redefined later in the same script.
*:enddef* *:enddef*
:enddef End of a function defined with `:def`. :enddef End of a function defined with `:def`.
@@ -402,8 +413,9 @@ THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
If the script the function is defined in is Vim9 script, then script-local If the script the function is defined in is Vim9 script, then script-local
variables can be accessed without the "s:" prefix. They must be defined variables can be accessed without the "s:" prefix. They must be defined
before the function. If the script the function is defined in is legacy before the function is compiled. If the script the function is defined in is
script, then script-local variables must be accessed with the "s:" prefix. legacy script, then script-local variables must be accessed with the "s:"
prefix.
*:defc* *:defcompile* *:defc* *:defcompile*
:defc[ompile] Compile functions defined in the current script that :defc[ompile] Compile functions defined in the current script that
@@ -555,10 +567,13 @@ be exported.
Alternatively, an export statement can be used to export several already Alternatively, an export statement can be used to export several already
defined (otherwise script-local) items: > defined (otherwise script-local) items: >
export {EXPORTED_CONST, someValue, MyFunc, MyClass} export {EXPORTED_CONST, someValue, MyFunc, MyClass}
<
*E1042*
`:export` can only be used in Vim9 script, at the script level.
Import ~ Import ~
*:import* *:imp* *:import* *:imp* *E1094*
The exported items can be imported individually in another Vim9 script: > The exported items can be imported individually in another Vim9 script: >
import EXPORTED_CONST from "thatscript.vim" import EXPORTED_CONST from "thatscript.vim"
import MyClass from "myclass.vim" import MyClass from "myclass.vim"
@@ -629,8 +644,8 @@ actually needed. A recommended mechanism:
Import in legacy Vim script ~ Import in legacy Vim script ~
If an `import` statement is used in legacy Vim script, for identifier the If an `import` statement is used in legacy Vim script, the script-local "s:"
script-local "s:" namespace will be used, even when "s:" is not specified. namespace will be used for the imported item, even when "s:" is not specified.
============================================================================== ==============================================================================
@@ -673,12 +688,37 @@ widely used. The type names are what was used in Vim before, with some
additions such as "void" and "bool". additions such as "void" and "bool".
JavaScript/TypeScript syntax and semantics ~ Compiling functions early ~
Functions are compiled when called or when `:defcompile` is used. Why not
compile them early, so that syntax and type errors are reported early?
The functions can't be compiled right away when encountered, because there may
be forward references to functions defined later. Consider defining functions
A, B and C, where A calls B, B calls C, and C calls A again. It's impossible
to reorder the functions to avoid forward references.
An alternative would be to first scan through the file to locate items and
figure out their type, so that forward references are found, and only then
execute the script and compile the functions. This means the script has to be
parsed twice, which is slower, and some conditions at the script level, such
as checking if a feature is supported, are hard to use. An attempt was made
to see if it works, but it turned out to be impossible to make work nicely.
It would be possible to compile all the functions at the end of the script.
The drawback is that if a function never gets called, the overhead of
compiling it counts anyway. Since startup speed is very important, in most
cases it's better to do it later and accept that syntax and type errors are
only reported then. In case these errors should be found early, e.g. when
testing, the `:defcompile` command will help out.
TypeScript syntax and semantics ~
Script writers have complained that the Vim script syntax is unexpectedly Script writers have complained that the Vim script syntax is unexpectedly
different from what they are used to. To reduce this complaint popular different from what they are used to. To reduce this complaint popular
languages will be used as an example. At the same time, we do not want to languages are used as an example. At the same time, we do not want to abandon
abandon the well-known parts of legacy Vim script. the well-known parts of legacy Vim script.
Since Vim already uses `:let` and `:const` and optional type checking is Since Vim already uses `:let` and `:const` and optional type checking is
desirable, the JavaScript/TypeScript syntax fits best for variable desirable, the JavaScript/TypeScript syntax fits best for variable
@@ -695,7 +735,7 @@ are doing. Some details are unexpected and can be fixed. For example how the
... ...
return result || 0 " returns 1 return result || 0 " returns 1
Vim9 script works like JavaScript, keep the value: > Vim9 script works like JavaScript/Typescript, keep the value: >
let result = 44 let result = 44
... ...
return result || 0 " returns 44 return result || 0 " returns 44
@@ -727,6 +767,16 @@ that works like one would expect:
avoided. avoided.
- The Vim-specific use of "s:" to make things script-local can be dropped. - The Vim-specific use of "s:" to make things script-local can be dropped.
When sourcing a Vim9 script from a legacy script, only the items defined
globally can be used, not the exported items. Alternatives considered:
- All the exported items become available as script-local items. This makes
it uncontrollable what items get defined.
- Use the exported items and make them global. Disadvantage is that it's then
not possible to avoid name clashes in the global namespace.
- Completely disallow sourcing a Vim9 script, require using `:import`. That
makes it difficult to use scripts for testing, or sourcing them from the
command line to try them out.
Classes ~ Classes ~

45
runtime/doc/vimdiff-tr.1 Normal file
View File

@@ -0,0 +1,45 @@
.TH VIMDIFF 1 "30 Mart 2001"
.SH AD
vimdiff \- bir dosyan<61>n d<>rt adede kadar s<>r<EFBFBD>mlerini Vim ile d<>zenle
ve ayr<79>mlar<61>n<EFBFBD> g<>ster
.SH <EFBFBD>ZET
.br
.B vimdiff
[se<73>enekler] dosya1 dosya2 [dosya3 [dosya4]]
.PP
.B gvimdiff
.SH TANIM
.B Vimdiff,
.B Vim
i<EFBFBD>inde iki (<28><> veya d<>rt) dosyay<61> a<>ar.
Her dosya ayr<79> pencerelerde a<><61>l<EFBFBD>r.
Dosyalar aras<61>ndaki ayr<79>mlar vurgulan<61>r.
B<EFBFBD>ylece de<64>i<EFBFBD>iklikler kolayca denetlenebilir ve ayn<79> dosyan<61>n ba<62>ka bir
s<EFBFBD>r<EFBFBD>m<EFBFBD>ne kolayl<79>kla aktar<61>labilir.
.PP
Vim hakk<6B>nda ek bilgi i<>in: vim(1)
.PP
.B gvimdiff
olarak ba<62>lat<61>l<EFBFBD>rsa varsa grafik arabirim a<><61>l<EFBFBD>r.
.PP
Her pencerede 'diff' se<73>ene<6E>i a<><61>l<EFBFBD>r, b<>ylece de<64>i<EFBFBD>iklikler vurgulan<61>r.
.br
\'wrap' ve 'scrollbind' se<73>enekleri metnin d<>zg<7A>n g<>r<EFBFBD>nmesi i<>in a<><61>l<EFBFBD>r.
.br
\'foldmethod' se<73>ene<6E>i "diff"e, ayarlan<61>r, b<>ylece sat<61>r aral<61>klar<61>
k<EFBFBD>vr<EFBFBD>l<EFBFBD>r. 'foldcolumn' se<73>ene<6E>i k<>v<EFBFBD>rmalar<61> kolay ayr<79>mlama ve a<><61>p kapama
i<EFBFBD>in iki olarak ayarlan<61>r.
.SH SE<EFBFBD>ENEKLER
Sat<EFBFBD>rlar hizalama i<>in "\-O" se<73>ene<6E>i kullan<61>lm<6C><6D><EFBFBD>as<61>na dikey b<>l<EFBFBD>nt<6E>ler
i<EFBFBD>inde g<>r<EFBFBD>nt<6E>lenir.
Yatay b<>l<EFBFBD>nt<6E>ler kullanmak i<>in "\-o" kullan<61>n.
Di<EFBFBD>er t<>m de<64>i<EFBFBD>kenler i<>in: vim(1).
.SH AYRICA BAKINIZ
vim(1)
.SH YAZAR
.B Vim'in
b<EFBFBD>y<EFBFBD>k <20>o<EFBFBD>unlu<6C>u Bram Moolenaar taraf<61>ndan ba<62>kalar<61>n<EFBFBD>n kayda de<64>er
yard<EFBFBD>mlar<EFBFBD>yla yaz<61>lm<6C><6D>t<EFBFBD>r.
Ek bilgi i<>in
.B Vim
i<EFBFBD>inde ":help credits" yaz<61>n.

View File

@@ -0,0 +1,45 @@
.TH VIMDIFF 1 "30 Mart 2001"
.SH AD
vimdiff \- bir dosyanın dört adede kadar sürümlerini Vim ile düzenle
ve ayrımlarını göster
.SH ÖZET
.br
.B vimdiff
[seçenekler] dosya1 dosya2 [dosya3 [dosya4]]
.PP
.B gvimdiff
.SH TANIM
.B Vimdiff,
.B Vim
içinde iki (üç veya dört) dosyayı açar.
Her dosya ayrı pencerelerde açılır.
Dosyalar arasındaki ayrımlar vurgulanır.
Böylece değişiklikler kolayca denetlenebilir ve aynı dosyanın başka bir
sürümüne kolaylıkla aktarılabilir.
.PP
Vim hakkında ek bilgi için: vim(1)
.PP
.B gvimdiff
olarak başlatılırsa varsa grafik arabirim açılır.
.PP
Her pencerede 'diff' seçeneği açılır, böylece değişiklikler vurgulanır.
.br
\'wrap' ve 'scrollbind' seçenekleri metnin düzgün görünmesi için açılır.
.br
\'foldmethod' seçeneği "diff"e, ayarlanır, böylece satır aralıkları
kıvrılır. 'foldcolumn' seçeneği kıvırmaları kolay ayrımlama ve açıp kapama
için iki olarak ayarlanır.
.SH SEÇENEKLER
Satırlar hizalama için "\-O" seçeneği kullanılmışçasına dikey bölüntüler
içinde görüntülenir.
Yatay bölüntüler kullanmak için "\-o" kullanın.
Diğer tüm değişkenler için: vim(1).
.SH AYRICA BAKINIZ
vim(1)
.SH YAZAR
.B Vim'in
büyük çoğunluğu Bram Moolenaar tarafından başkalarının kayda değer
yardımlarıyla yazılmıştır.
Ek bilgi için
.B Vim
içinde ":help credits" yazın.

50
runtime/doc/vimtutor-tr.1 Normal file
View File

@@ -0,0 +1,50 @@
.TH VIMTUTOR 1 "2 Nisan 2001"
.SH AD
vimtutor \- Vim e<>itmeni
.SH <EFBFBD>ZET
.br
.B vimtutor [\-g] [dil]
.SH TANIM
.B Vimtutor,
.B Vim
e<EFBFBD>itmenini ba<62>lat<61>r.
<EFBFBD>nce orijinal e<>itmen dosyas<61>n<EFBFBD>n bir kopyas<61>n<EFBFBD> al<61>r, b<>ylece bir de<64>i<EFBFBD>ikli<6C>e
u<EFBFBD>ramadan de<64>i<EFBFBD>tirilebilir.
.PP
.B Vimtutor
ilk
.B Vim
komutlar<EFBFBD>n<EFBFBD> <20><>renmek isteyen ki<6B>iler i<>in yararl<72>d<EFBFBD>r.
.PP
<EFBFBD>ste<EFBFBD>e ba<62>l<EFBFBD> \-g de<64>i<EFBFBD>keni vimtutor'u vim yerine e<>er y<>kl<6B> ise gvim ile
ba<EFBFBD>lat<EFBFBD>r. Y<>kl<6B> de<64>ilse a<>mak i<>in Vim kullan<61>l<EFBFBD>r.
.PP
<EFBFBD>ste<EFBFBD>e ba<62>l<EFBFBD> [dil] de<64>i<EFBFBD>keni iki harfli dil kodunu belirtir, <20>rne<6E>in "tr"
veya "es". E<>er [dil] de<64>i<EFBFBD>keni verilmemi<6D>se mevcut yerelle<6C>tirme
kullan<EFBFBD>l<EFBFBD>r.
E<EFBFBD>er bu dilde bir e<>itmen varsa kullan<61>l<EFBFBD>r.
Yoksa <20>ngilizce s<>r<EFBFBD>m kullan<61>lacakt<6B>r.
.PP
.B Vim
her zaman Vi uyumlu kipte ba<62>lat<61>l<EFBFBD>r.
.SH DOSYALAR
.TP 15
/usr/local/lib/vim/tutor/tutor[.dil]
.B Vimtutor
metin dosyalar<61>.
.TP 15
/usr/local/lib/vim/tutor/tutor.vim
.B Vimtutor
metin dosyas<61>n<EFBFBD> kopyalamak i<>in kullan<61>lan betik.
.SH YAZAR
.B Vimtutor
ilk olarak Vi i<>in Michael C. Pierce ve Robert K. Ware,
Colorado School of Mines taraf<61>ndan, Colorado State University'den Charles
Smith'in verdi<64>i fikirler kullan<61>larak yaz<61>ld<6C>.
E-posta: bware@mines.colorado.edu.
.br
.B Vim
uyarlamas<EFBFBD> Bram Moolenaar taraf<61>ndan yap<61>ld<6C>.
<EFBFBD>evirmenlerin adlar<61> i<>in e<>itmen dosyalar<61>na bak<61>n.
.SH AYRICA BAKINIz
vim(1)

View File

@@ -0,0 +1,50 @@
.TH VIMTUTOR 1 "2 Nisan 2001"
.SH AD
vimtutor \- Vim eğitmeni
.SH ÖZET
.br
.B vimtutor [\-g] [dil]
.SH TANIM
.B Vimtutor,
.B Vim
eğitmenini başlatır.
Önce orijinal eğitmen dosyasının bir kopyasını alır, böylece bir değişikliğe
uğramadan değiştirilebilir.
.PP
.B Vimtutor
ilk
.B Vim
komutlarını öğrenmek isteyen kişiler için yararlıdır.
.PP
İsteğe bağlı \-g değişkeni vimtutor'u vim yerine eğer yüklü ise gvim ile
başlatır. Yüklü değilse açmak için Vim kullanılır.
.PP
İsteğe bağlı [dil] değişkeni iki harfli dil kodunu belirtir, örneğin "tr"
veya "es". Eğer [dil] değişkeni verilmemişse mevcut yerelleştirme
kullanılır.
Eğer bu dilde bir eğitmen varsa kullanılır.
Yoksa İngilizce sürüm kullanılacaktır.
.PP
.B Vim
her zaman Vi uyumlu kipte başlatılır.
.SH DOSYALAR
.TP 15
/usr/local/lib/vim/tutor/tutor[.dil]
.B Vimtutor
metin dosyaları.
.TP 15
/usr/local/lib/vim/tutor/tutor.vim
.B Vimtutor
metin dosyasını kopyalamak için kullanılan betik.
.SH YAZAR
.B Vimtutor
ilk olarak Vi için Michael C. Pierce ve Robert K. Ware,
Colorado School of Mines tarafından, Colorado State University'den Charles
Smith'in verdiği fikirler kullanılarak yazıldı.
E-posta: bware@mines.colorado.edu.
.br
.B Vim
uyarlaması Bram Moolenaar tarafından yapıldı.
Çevirmenlerin adları için eğitmen dosyalarına bakın.
.SH AYRICA BAKINIz
vim(1)

View File

@@ -137,6 +137,12 @@ invert the status line. Now it should be "sr", reverse the status line, as
status line is inverted anyway; you will only see this problem on terminals status line is inverted anyway; you will only see this problem on terminals
that have termcap codes for italics. that have termcap codes for italics.
*filler-lines*
The lines after the last buffer line in a window are called filler lines.
These lines start with a tilde (~) character. By default, these are
highlighted as NonText (|hl-NonText|). The EndOfBuffer highlight group
(|hl-EndOfBuffer|) can be used to change the highlighting of filler lines.
============================================================================== ==============================================================================
3. Opening and closing a window *opening-window* *E36* 3. Opening and closing a window *opening-window* *E36*

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types " Vim support file to detect file types
" "
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2020 May 07 " Last Change: 2020 Jun 15
" Listen very carefully, I will say this only once " Listen very carefully, I will say this only once
if exists("did_load_filetypes") if exists("did_load_filetypes")
@@ -462,7 +462,7 @@ au BufNewFile,BufRead *.desc setf desc
au BufNewFile,BufRead *.d call dist#ft#DtraceCheck() au BufNewFile,BufRead *.d call dist#ft#DtraceCheck()
" Desktop files " Desktop files
au BufNewFile,BufRead *.desktop,.directory setf desktop au BufNewFile,BufRead *.desktop,*.directory setf desktop
" Dict config " Dict config
au BufNewFile,BufRead dict.conf,.dictrc setf dictconf au BufNewFile,BufRead dict.conf,.dictrc setf dictconf
@@ -547,6 +547,9 @@ au BufNewFile,BufRead */etc/elinks.conf,*/.elinks/elinks.conf setf elinks
" ERicsson LANGuage; Yaws is erlang too " ERicsson LANGuage; Yaws is erlang too
au BufNewFile,BufRead *.erl,*.hrl,*.yaws setf erlang au BufNewFile,BufRead *.erl,*.hrl,*.yaws setf erlang
" Elm
au BufNewFile,BufRead *.elm setf elm
" Elm Filter Rules file " Elm Filter Rules file
au BufNewFile,BufRead filter-rules setf elmfilt au BufNewFile,BufRead filter-rules setf elmfilt
@@ -884,11 +887,12 @@ au BufNewFile,BufRead *.ll setf lifelines
" Lilo: Linux loader " Lilo: Linux loader
au BufNewFile,BufRead lilo.conf setf lilo au BufNewFile,BufRead lilo.conf setf lilo
" Lisp (*.el = ELisp, *.cl = Common Lisp, *.jl = librep Lisp) " Lisp (*.el = ELisp, *.cl = Common Lisp)
" *.jl was removed, it's also used for Julia, better skip than guess wrong.
if has("fname_case") if has("fname_case")
au BufNewFile,BufRead *.lsp,*.lisp,*.el,*.cl,*.jl,*.L,.emacs,.sawfishrc setf lisp au BufNewFile,BufRead *.lsp,*.lisp,*.el,*.cl,*.L,.emacs,.sawfishrc setf lisp
else else
au BufNewFile,BufRead *.lsp,*.lisp,*.el,*.cl,*.jl,.emacs,.sawfishrc setf lisp au BufNewFile,BufRead *.lsp,*.lisp,*.el,*.cl,.emacs,.sawfishrc setf lisp
endif endif
" SBCL implementation of Common Lisp " SBCL implementation of Common Lisp
@@ -1162,6 +1166,7 @@ else
endif endif
au BufNewFile,BufRead *.plx,*.al,*.psgi setf perl au BufNewFile,BufRead *.plx,*.al,*.psgi setf perl
au BufNewFile,BufRead *.p6,*.pm6,*.pl6 setf perl6 au BufNewFile,BufRead *.p6,*.pm6,*.pl6 setf perl6
au BufNewFile,BufRead *.raku,*.rakumod setf perl6
" Perl, XPM or XPM2 " Perl, XPM or XPM2
au BufNewFile,BufRead *.pm au BufNewFile,BufRead *.pm
@@ -1291,7 +1296,8 @@ au BufNewFile,BufRead *.pyx,*.pxd setf pyrex
" Python, Python Shell Startup and Python Stub Files " Python, Python Shell Startup and Python Stub Files
" Quixote (Python-based web framework) " Quixote (Python-based web framework)
au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc,*.ptl,*.pyi setf python au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc setf python
au BufNewFile,BufRead *.ptl,*.pyi,SConstruct setf python
" Radiance " Radiance
au BufNewFile,BufRead *.rad,*.mat setf radiance au BufNewFile,BufRead *.rad,*.mat setf radiance
@@ -1614,9 +1620,11 @@ au BufNewFile,BufRead *.sqr,*.sqi setf sqr
" OpenSSH configuration " OpenSSH configuration
au BufNewFile,BufRead ssh_config,*/.ssh/config setf sshconfig au BufNewFile,BufRead ssh_config,*/.ssh/config setf sshconfig
au BufNewFile,BufRead */etc/ssh/ssh_config.d/*.conf setf sshconfig
" OpenSSH server configuration " OpenSSH server configuration
au BufNewFile,BufRead sshd_config setf sshdconfig au BufNewFile,BufRead sshd_config setf sshdconfig
au BufNewFile,BufRead */etc/ssh/sshd_config.d/*.conf setf sshdconfig
" Stata " Stata
au BufNewFile,BufRead *.ado,*.do,*.imata,*.mata setf stata au BufNewFile,BufRead *.ado,*.do,*.imata,*.mata setf stata

11
runtime/ftplugin/asm.vim Normal file
View File

@@ -0,0 +1,11 @@
" Vim filetype plugin file
" Language: asm
" Maintainer: Colin Caine <cmcaine at the common googlemail domain>
" Last Changed: 23 May 2020
if exists("b:did_ftplugin") | finish | endif
setl comments=:;,s1:/*,mb:*,ex:*/,://
setl commentstring=;%s
let b:did_ftplugin = 1

18
runtime/ftplugin/elm.vim Normal file
View File

@@ -0,0 +1,18 @@
" Elm filetype plugin file
" Language: Elm
" Maintainer: Andreas Scharf <as@99n.de>
" Latest Revision: 2020-05-29
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal comments=s1fl:{-,mb:\ ,ex:-},:--
setlocal commentstring=--\ %s
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -2,7 +2,7 @@
" Language: man " Language: man
" Maintainer: Jason Franklin <vim@justemail.net> " Maintainer: Jason Franklin <vim@justemail.net>
" Maintainer: SungHyun Nam <goweol@gmail.com> " Maintainer: SungHyun Nam <goweol@gmail.com>
" Last Change: 2020 May 07 " Last Change: 2020 Jun 01
" To make the ":Man" command available before editing a manual page, source " To make the ":Man" command available before editing a manual page, source
" this script from your startup vimrc file. " this script from your startup vimrc file.
@@ -34,8 +34,8 @@ if &filetype == "man"
endif endif
nnoremap <buffer> <Plug>ManBS :%s/.\b//g<CR>:setl nomod<CR>'' nnoremap <buffer> <Plug>ManBS :%s/.\b//g<CR>:setl nomod<CR>''
nnoremap <buffer> <c-]> :call <SID>PreGetPage(v:count)<CR> nnoremap <buffer> <silent> <c-]> :call <SID>PreGetPage(v:count)<CR>
nnoremap <buffer> <c-t> :call <SID>PopPage()<CR> nnoremap <buffer> <silent> <c-t> :call <SID>PopPage()<CR>
nnoremap <buffer> <silent> q :q<CR> nnoremap <buffer> <silent> q :q<CR>
" Add undo commands for the maps " Add undo commands for the maps
@@ -138,11 +138,11 @@ func <SID>GetPage(cmdmods, ...)
endif endif
endif endif
if s:FindPage(sect, page) == 0 if s:FindPage(sect, page) == 0
let msg = "\nNo manual entry for ".page let msg = 'man.vim: no manual entry for "' . page . '"'
if sect != "" if !empty(sect)
let msg .= " in section ".sect let msg .= ' in section ' . sect
endif endif
echo msg echomsg msg
return return
endif endif
exec "let s:man_tag_buf_".s:man_tag_depth." = ".bufnr("%") exec "let s:man_tag_buf_".s:man_tag_depth." = ".bufnr("%")

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin " Vim filetype plugin
" Language: Vim " Language: Vim
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2020 May 17 " Last Change: 2020 Jun 16
" Only do this when not done yet for this buffer " Only do this when not done yet for this buffer
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
@@ -83,8 +83,7 @@ endif
if exists("loaded_matchit") if exists("loaded_matchit")
let b:match_ignorecase = 0 let b:match_ignorecase = 0
let b:match_words = let b:match_words =
\ '\<fu\%[nction]\>:\<retu\%[rn]\>:\<endf\%[unction]\>,' . \ '\<\%(fu\%[nction]\|def\)\>:\<retu\%[rn]\>:\<\%(endf\%[unction]\|enddef\)\>,' .
\ '\<def\>:\<retu\%[rn]\>:\<enddef\>,' .
\ '\<\(wh\%[ile]\|for\)\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<end\(w\%[hile]\|fo\%[r]\)\>,' . \ '\<\(wh\%[ile]\|for\)\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<end\(w\%[hile]\|fo\%[r]\)\>,' .
\ '\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,' . \ '\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,' .
\ '{:},' . \ '{:},' .

114
runtime/indent/elm.vim Normal file
View File

@@ -0,0 +1,114 @@
" Elm indent plugin file
" Language: Elm
" Maintainer: Andreas Scharf <as@99n.de>
" Original Author: Joseph Hager <ajhager@gmail.com>
" Copyright: Joseph Hager <ajhager@gmail.com>
" License: BSD3
" Latest Revision: 2020-05-29
" Only load this indent file when no other was loaded.
if exists('b:did_indent')
finish
endif
let b:did_indent = 1
" Local defaults
setlocal expandtab
setlocal indentexpr=GetElmIndent()
setlocal indentkeys+=0=else,0=if,0=of,0=import,0=then,0=type,0\|,0},0\],0),=-},0=in
setlocal nolisp
setlocal nosmartindent
" Only define the function once.
if exists('*GetElmIndent')
finish
endif
" Indent pairs
function! s:FindPair(pstart, pmid, pend)
"call search(a:pend, 'bW')
return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"'))
endfunction
function! GetElmIndent()
let l:lnum = v:lnum - 1
" Ident 0 if the first line of the file:
if l:lnum == 0
return 0
endif
let l:ind = indent(l:lnum)
let l:lline = getline(l:lnum)
let l:line = getline(v:lnum)
" Indent if current line begins with '}':
if l:line =~? '^\s*}'
return s:FindPair('{', '', '}')
" Indent if current line begins with 'else':
elseif l:line =~# '^\s*else\>'
if l:lline !~# '^\s*\(if\|then\)\>'
return s:FindPair('\<if\>', '', '\<else\>')
endif
" Indent if current line begins with 'then':
elseif l:line =~# '^\s*then\>'
if l:lline !~# '^\s*\(if\|else\)\>'
return s:FindPair('\<if\>', '', '\<then\>')
endif
" HACK: Indent lines in case with nearest case clause:
elseif l:line =~# '->' && l:line !~# ':' && l:line !~# '\\'
return indent(search('^\s*case', 'bWn')) + &shiftwidth
" HACK: Don't change the indentation if the last line is a comment.
elseif l:lline =~# '^\s*--'
return l:ind
" Align the end of block comments with the start
elseif l:line =~# '^\s*-}'
return indent(search('{-', 'bWn'))
" Indent double shift after let with an empty rhs
elseif l:lline =~# '\<let\>.*\s=$'
return l:ind + 4 + &shiftwidth
" Align 'in' with the parent let.
elseif l:line =~# '^\s*in\>'
return indent(search('^\s*let', 'bWn'))
" Align bindings with the parent let.
elseif l:lline =~# '\<let\>'
return l:ind + 4
" Align bindings with the parent in.
elseif l:lline =~# '^\s*in\>'
return l:ind
endif
" Add a 'shiftwidth' after lines ending with:
if l:lline =~# '\(|\|=\|->\|<-\|(\|\[\|{\|\<\(of\|else\|if\|then\)\)\s*$'
let l:ind = l:ind + &shiftwidth
" Add a 'shiftwidth' after lines starting with type ending with '=':
elseif l:lline =~# '^\s*type' && l:line =~# '^\s*='
let l:ind = l:ind + &shiftwidth
" Back to normal indent after comments:
elseif l:lline =~# '-}\s*$'
call search('-}', 'bW')
let l:ind = indent(searchpair('{-', '', '-}', 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string"'))
" Ident some operators if there aren't any starting the last line.
elseif l:line =~# '^\s*\(!\|&\|(\|`\|+\||\|{\|[\|,\)=' && l:lline !~# '^\s*\(!\|&\|(\|`\|+\||\|{\|[\|,\)=' && l:lline !~# '^\s*$'
let l:ind = l:ind + &shiftwidth
elseif l:lline ==# '' && getline(l:lnum - 1) !=# ''
let l:ind = indent(search('^\s*\S+', 'bWn'))
endif
return l:ind
endfunc

View File

@@ -2,7 +2,7 @@
" Header: "{{{ " Header: "{{{
" Maintainer: Bram Moolenaar " Maintainer: Bram Moolenaar
" Original Author: Andy Wokula <anwoku@yahoo.de> " Original Author: Andy Wokula <anwoku@yahoo.de>
" Last Change: 2019 Mar 20 " Last Change: 2020 Jun 18
" Version: 1.0 " Version: 1.0
" Description: HTML indent script with cached state for faster indenting on a " Description: HTML indent script with cached state for faster indenting on a
" range of lines. " range of lines.
@@ -223,7 +223,7 @@ endfunc "}}}
call s:AddITags(s:indent_tags, [ call s:AddITags(s:indent_tags, [
\ 'a', 'abbr', 'acronym', 'address', 'b', 'bdo', 'big', \ 'a', 'abbr', 'acronym', 'address', 'b', 'bdo', 'big',
\ 'blockquote', 'body', 'button', 'caption', 'center', 'cite', 'code', \ 'blockquote', 'body', 'button', 'caption', 'center', 'cite', 'code',
\ 'colgroup', 'del', 'dfn', 'dir', 'div', 'dl', 'em', 'fieldset', 'font', \ 'colgroup', 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt', 'em', 'fieldset', 'font',
\ 'form', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'html', \ 'form', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'html',
\ 'i', 'iframe', 'ins', 'kbd', 'label', 'legend', 'li', \ 'i', 'iframe', 'ins', 'kbd', 'label', 'legend', 'li',
\ 'map', 'menu', 'noframes', 'noscript', 'object', 'ol', \ 'map', 'menu', 'noframes', 'noscript', 'object', 'ol',

View File

@@ -1,7 +1,8 @@
" Vim indent file " Vim indent file
" Language: SQL " Language: SQL
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com> " Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Last Change: 2017 Jun 13 " Last Change By Maintainer: 2017 Jun 13
" Last Change: by Stephen Wall, #5578, 2020 Jun 07
" Version: 3.0 " Version: 3.0
" Download: http://vim.sourceforge.net/script.php?script_id=495 " Download: http://vim.sourceforge.net/script.php?script_id=495
@@ -67,68 +68,73 @@ set cpo&vim
" IS is excluded, since it is difficult to determine when the " IS is excluded, since it is difficult to determine when the
" ending block is (especially for procedures/functions). " ending block is (especially for procedures/functions).
let s:SQLBlockStart = '^\s*\%('. let s:SQLBlockStart = '^\s*\%('.
\ 'if\|else\|elseif\|elsif\|'. \ 'if\>.*\<then\|'.
\ 'while\|loop\|do\|for\|'. \ 'then\|else\>\|'.
\ 'begin\|'. \ 'elseif\>.*\<then\|'.
\ 'elsif\>.(\<then\|'.
\ 'while\>.*\<loop\|'.
\ 'for\>.*\<loop\|'.
\ 'foreach\>.*\<loop\|'.
\ 'loop\|do\|declare\|begin\|'.
\ 'case\|when\|merge\|exception'. \ 'case\|when\|merge\|exception'.
\ '\)\>' \ '\)\>'
let s:SQLBlockEnd = '^\s*\(end\)\>' let s:SQLBlockEnd = '^\s*\(end\)\>'
" The indent level is also based on unmatched paranethesis " The indent level is also based on unmatched parentheses
" If a line has an extra "(" increase the indent " If a line has an extra "(" increase the indent
" If a line has an extra ")" decrease the indent " If a line has an extra ")" decrease the indent
function! s:CountUnbalancedParan( line, paran_to_check ) function! s:CountUnbalancedParen( line, paren_to_check )
let l = a:line let l = a:line
let lp = substitute(l, '[^(]', '', 'g') let lp = substitute(l, '[^(]', '', 'g')
let l = a:line let l = a:line
let rp = substitute(l, '[^)]', '', 'g') let rp = substitute(l, '[^)]', '', 'g')
if a:paran_to_check =~ ')' if a:paren_to_check =~ ')'
" echom 'CountUnbalancedParan ) returning: ' . " echom 'CountUnbalancedParen ) returning: ' .
" \ (strlen(rp) - strlen(lp)) " \ (strlen(rp) - strlen(lp))
return (strlen(rp) - strlen(lp)) return (strlen(rp) - strlen(lp))
elseif a:paran_to_check =~ '(' elseif a:paren_to_check =~ '('
" echom 'CountUnbalancedParan ( returning: ' . " echom 'CountUnbalancedParen ( returning: ' .
" \ (strlen(lp) - strlen(rp)) " \ (strlen(lp) - strlen(rp))
return (strlen(lp) - strlen(rp)) return (strlen(lp) - strlen(rp))
else else
" echom 'CountUnbalancedParan unknown paran to check: ' . " echom 'CountUnbalancedParen unknown paren to check: ' .
" \ a:paran_to_check " \ a:paren_to_check
return 0 return 0
endif endif
endfunction endfunction
" Unindent commands based on previous indent level " Unindent commands based on previous indent level
function! s:CheckToIgnoreRightParan( prev_lnum, num_levels ) function! s:CheckToIgnoreRightParen( prev_lnum, num_levels )
let lnum = a:prev_lnum let lnum = a:prev_lnum
let line = getline(lnum) let line = getline(lnum)
let ends = 0 let ends = 0
let num_right_paran = a:num_levels let num_right_paren = a:num_levels
let ignore_paran = 0 let ignore_paren = 0
let vircol = 1 let vircol = 1
while num_right_paran > 0 while num_right_paren > 0
silent! exec 'norm! '.lnum."G\<bar>".vircol."\<bar>" silent! exec 'norm! '.lnum."G\<bar>".vircol."\<bar>"
let right_paran = search( ')', 'W' ) let right_paren = search( ')', 'W' )
if right_paran != lnum if right_paren != lnum
" This should not happen since there should be at least " This should not happen since there should be at least
" num_right_paran matches for this line " num_right_paren matches for this line
break break
endif endif
let vircol = virtcol(".") let vircol = virtcol(".")
" if getline(".") =~ '^)' " if getline(".") =~ '^)'
let matching_paran = searchpair('(', '', ')', 'bW', let matching_paren = searchpair('(', '', ')', 'bW',
\ 's:IsColComment(line("."), col("."))') \ 's:IsColComment(line("."), col("."))')
if matching_paran < 1 if matching_paren < 1
" No match found " No match found
" echom 'CTIRP - no match found, ignoring' " echom 'CTIRP - no match found, ignoring'
break break
endif endif
if matching_paran == lnum if matching_paren == lnum
" This was not an unmatched parantenses, start the search again " This was not an unmatched parentheses, start the search again
" again after this column " again after this column
" echom 'CTIRP - same line match, ignoring' " echom 'CTIRP - same line match, ignoring'
continue continue
@@ -136,23 +142,23 @@ function! s:CheckToIgnoreRightParan( prev_lnum, num_levels )
" echom 'CTIRP - match: ' . line(".") . ' ' . getline(".") " echom 'CTIRP - match: ' . line(".") . ' ' . getline(".")
if getline(matching_paran) =~? '\(if\|while\)\>' if getline(matching_paren) =~? '\(if\|while\)\>'
" echom 'CTIRP - if/while ignored: ' . line(".") . ' ' . getline(".") " echom 'CTIRP - if/while ignored: ' . line(".") . ' ' . getline(".")
let ignore_paran = ignore_paran + 1 let ignore_paren = ignore_paren + 1
endif endif
" One match found, decrease and check for further matches " One match found, decrease and check for further matches
let num_right_paran = num_right_paran - 1 let num_right_paren = num_right_paren - 1
endwhile endwhile
" Fallback - just move back one " Fallback - just move back one
" return a:prev_indent - shiftwidth() " return a:prev_indent - shiftwidth()
return ignore_paran return ignore_paren
endfunction endfunction
" Based on the keyword provided, loop through previous non empty " Based on the keyword provided, loop through previous non empty
" non comment lines to find the statement that initated the keyword. " non comment lines to find the statement that initiated the keyword.
" Return its indent level " Return its indent level
" CASE .. " CASE ..
" WHEN ... " WHEN ...
@@ -295,26 +301,26 @@ function! GetSQLIndent()
" echom 'prevl - SQLBlockStart - indent ' . ind . ' line: ' . prevline " echom 'prevl - SQLBlockStart - indent ' . ind . ' line: ' . prevline
elseif prevline =~ '[()]' elseif prevline =~ '[()]'
if prevline =~ '(' if prevline =~ '('
let num_unmatched_left = s:CountUnbalancedParan( prevline, '(' ) let num_unmatched_left = s:CountUnbalancedParen( prevline, '(' )
else else
let num_unmatched_left = 0 let num_unmatched_left = 0
endif endif
if prevline =~ ')' if prevline =~ ')'
let num_unmatched_right = s:CountUnbalancedParan( prevline, ')' ) let num_unmatched_right = s:CountUnbalancedParen( prevline, ')' )
else else
let num_unmatched_right = 0 let num_unmatched_right = 0
" let num_unmatched_right = s:CountUnbalancedParan( prevline, ')' ) " let num_unmatched_right = s:CountUnbalancedParen( prevline, ')' )
endif endif
if num_unmatched_left > 0 if num_unmatched_left > 0
" There is a open left paranethesis " There is a open left parenthesis
" increase indent " increase indent
let ind = ind + ( shiftwidth() * num_unmatched_left ) let ind = ind + ( shiftwidth() * num_unmatched_left )
elseif num_unmatched_right > 0 elseif num_unmatched_right > 0
" if it is an unbalanced paranethesis only unindent if " if it is an unbalanced parenthesis only unindent if
" it was part of a command (ie create table(..) ) " it was part of a command (ie create table(..) )
" instead of part of an if (ie if (....) then) which should " instead of part of an if (ie if (....) then) which should
" maintain the indent level " maintain the indent level
let ignore = s:CheckToIgnoreRightParan( prevlnum, num_unmatched_right ) let ignore = s:CheckToIgnoreRightParen( prevlnum, num_unmatched_right )
" echom 'prevl - ) unbalanced - CTIRP - ignore: ' . ignore " echom 'prevl - ) unbalanced - CTIRP - ignore: ' . ignore
if prevline =~ '^\s*)' if prevline =~ '^\s*)'
@@ -357,8 +363,8 @@ function! GetSQLIndent()
" elseif line =~ '^\s*)\s*;\?\s*$' " elseif line =~ '^\s*)\s*;\?\s*$'
" elseif line =~ '^\s*)' " elseif line =~ '^\s*)'
elseif line =~ '^\s*)' elseif line =~ '^\s*)'
let num_unmatched_right = s:CountUnbalancedParan( line, ')' ) let num_unmatched_right = s:CountUnbalancedParen( line, ')' )
let ignore = s:CheckToIgnoreRightParan( v:lnum, num_unmatched_right ) let ignore = s:CheckToIgnoreRightParen( v:lnum, num_unmatched_right )
" If the line ends in a ), then reduce the indent " If the line ends in a ), then reduce the indent
" This catches items like: " This catches items like:
" CREATE TABLE T1( " CREATE TABLE T1(
@@ -368,7 +374,7 @@ function! GetSQLIndent()
" But we do not want to unindent a line like: " But we do not want to unindent a line like:
" IF ( c1 = 1 " IF ( c1 = 1
" AND c2 = 3 ) THEN " AND c2 = 3 ) THEN
" let num_unmatched_right = s:CountUnbalancedParan( line, ')' ) " let num_unmatched_right = s:CountUnbalancedParen( line, ')' )
" if num_unmatched_right > 0 " if num_unmatched_right > 0
" elseif strpart( line, strlen(line)-1, 1 ) =~ ')' " elseif strpart( line, strlen(line)-1, 1 ) =~ ')'
" let ind = ind - shiftwidth() " let ind = ind - shiftwidth()

View File

@@ -23,4 +23,14 @@ bar">
text text
</div> </div>
<dl>
<dd>
dd text
</dd>
<dt>
dt text
</dt>
</dl>
" END_INDENT " END_INDENT

View File

@@ -23,4 +23,14 @@
text text
</div> </div>
<dl>
<dd>
dd text
</dd>
<dt>
dt text
</dt>
</dl>
" END_INDENT " END_INDENT

View File

@@ -12,3 +12,8 @@ map2:
map: &anchor map: &anchor
map: val map: val
# END_INDENT # END_INDENT
# START_INDENT
map: multiline
value
# END_INDENT

View File

@@ -12,3 +12,8 @@ map2:
map: &anchor map: &anchor
map: val map: val
# END_INDENT # END_INDENT
# START_INDENT
map: multiline
value
# END_INDENT

View File

@@ -1,7 +1,8 @@
" Vim indent file " Vim indent file
" Language: YAML " Language: YAML
" Maintainer: Nikolai Pavlov <zyx.vim@gmail.com> " Maintainer: Nikolai Pavlov <zyx.vim@gmail.com>
" Last Change: 2019 Sep 28 " Last Update: Lukas Reineke
" Last Change: 2020 Jun 07
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
if exists('b:did_indent') if exists('b:did_indent')
@@ -53,7 +54,7 @@ let s:c_ns_anchor_name = s:c_ns_anchor_char.'+'
let s:c_ns_anchor_property = '\v\&'.s:c_ns_anchor_name let s:c_ns_anchor_property = '\v\&'.s:c_ns_anchor_name
let s:ns_word_char = '\v[[:alnum:]_\-]' let s:ns_word_char = '\v[[:alnum:]_\-]'
let s:ns_tag_char = '\v%(%\x\x|'.s:ns_word_char.'|[#/;?:@&=+$.~*''()])' let s:ns_tag_char = '\v%('.s:ns_word_char.'|[#/;?:@&=+$.~*''()])'
let s:c_named_tag_handle = '\v\!'.s:ns_word_char.'+\!' let s:c_named_tag_handle = '\v\!'.s:ns_word_char.'+\!'
let s:c_secondary_tag_handle = '\v\!\!' let s:c_secondary_tag_handle = '\v\!\!'
let s:c_primary_tag_handle = '\v\!' let s:c_primary_tag_handle = '\v\!'
@@ -62,7 +63,7 @@ let s:c_tag_handle = '\v%('.s:c_named_tag_handle.
\ '|'.s:c_primary_tag_handle.')' \ '|'.s:c_primary_tag_handle.')'
let s:c_ns_shorthand_tag = '\v'.s:c_tag_handle . s:ns_tag_char.'+' let s:c_ns_shorthand_tag = '\v'.s:c_tag_handle . s:ns_tag_char.'+'
let s:c_non_specific_tag = '\v\!' let s:c_non_specific_tag = '\v\!'
let s:ns_uri_char = '\v%(%\x\x|'.s:ns_word_char.'\v|[#/;?:@&=+$,.!~*''()[\]])' let s:ns_uri_char = '\v%('.s:ns_word_char.'\v|[#/;?:@&=+$,.!~*''()[\]])'
let s:c_verbatim_tag = '\v\!\<'.s:ns_uri_char.'+\>' let s:c_verbatim_tag = '\v\!\<'.s:ns_uri_char.'+\>'
let s:c_ns_tag_property = '\v'.s:c_verbatim_tag. let s:c_ns_tag_property = '\v'.s:c_verbatim_tag.
\ '\v|'.s:c_ns_shorthand_tag. \ '\v|'.s:c_ns_shorthand_tag.

View File

@@ -453,12 +453,12 @@ if has("spell")
an 40.335.260 &Tools.&Spelling.Set\ Language\ to\ "en_us" :set spl=en_us spell<CR> an 40.335.260 &Tools.&Spelling.Set\ Language\ to\ "en_us" :set spl=en_us spell<CR>
an <silent> 40.335.270 &Tools.&Spelling.&Find\ More\ Languages :call <SID>SpellLang()<CR> an <silent> 40.335.270 &Tools.&Spelling.&Find\ More\ Languages :call <SID>SpellLang()<CR>
let s:undo_spellang = ['aun &Tools.&Spelling.&Find\ More\ Languages'] let s:undo_spelllang = ['aun &Tools.&Spelling.&Find\ More\ Languages']
func s:SpellLang() func s:SpellLang()
for cmd in s:undo_spellang for cmd in s:undo_spelllang
exe "silent! " . cmd exe "silent! " . cmd
endfor endfor
let s:undo_spellang = [] let s:undo_spelllang = []
if &enc == "iso-8859-15" if &enc == "iso-8859-15"
let enc = "latin1" let enc = "latin1"
@@ -481,7 +481,7 @@ if has("spell")
let found += 1 let found += 1
let menuname = '&Tools.&Spelling.' . escape(g:menutrans_set_lang_to, "\\. \t|") . '\ "' . nm . '"' let menuname = '&Tools.&Spelling.' . escape(g:menutrans_set_lang_to, "\\. \t|") . '\ "' . nm . '"'
exe 'an 40.335.' . n . ' ' . menuname . ' :set spl=' . nm . ' spell<CR>' exe 'an 40.335.' . n . ' ' . menuname . ' :set spl=' . nm . ' spell<CR>'
let s:undo_spellang += ['aun ' . menuname] let s:undo_spelllang += ['aun ' . menuname]
endif endif
let n += 10 let n += 10
endfor endfor

View File

@@ -1,7 +1,7 @@
" These commands create the option window. " These commands create the option window.
" "
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2019 Nov 07 " Last Change: 2020 Jun 10
" If there already is an option window, jump to that one. " If there already is an option window, jump to that one.
let buf = bufnr('option-window') let buf = bufnr('option-window')
@@ -447,6 +447,9 @@ if has("syntax")
call append("$", "spellcapcheck\tpattern to locate the end of a sentence") call append("$", "spellcapcheck\tpattern to locate the end of a sentence")
call append("$", "\t(local to buffer)") call append("$", "\t(local to buffer)")
call <SID>OptionL("spc") call <SID>OptionL("spc")
call append("$", "spelloptions\tflags to change how spell checking works")
call append("$", "\t(local to buffer)")
call <SID>OptionL("spo")
call append("$", "spellsuggest\tmethods used to suggest corrections") call append("$", "spellsuggest\tmethods used to suggest corrections")
call <SID>OptionG("sps", &sps) call <SID>OptionG("sps", &sps)
call append("$", "mkspellmem\tamount of memory used by :mkspell before compressing") call append("$", "mkspellmem\tamount of memory used by :mkspell before compressing")
@@ -1153,7 +1156,7 @@ call <SID>BinOptionG("warn", &warn)
if has("quickfix") if has("quickfix")
call <SID>Header("running make and jumping to errors") call <SID>Header("running make and jumping to errors (quickfix)")
call append("$", "errorfile\tname of the file that contains error messages") call append("$", "errorfile\tname of the file that contains error messages")
call <SID>OptionG("ef", &ef) call <SID>OptionG("ef", &ef)
call append("$", "errorformat\tlist of formats for error messages") call append("$", "errorformat\tlist of formats for error messages")
@@ -1174,6 +1177,8 @@ if has("quickfix")
call append("$", "makeencoding\tencoding of the \":make\" and \":grep\" output") call append("$", "makeencoding\tencoding of the \":make\" and \":grep\" output")
call append("$", "\t(global or local to buffer)") call append("$", "\t(global or local to buffer)")
call <SID>OptionG("menc", &menc) call <SID>OptionG("menc", &menc)
call append("$", "quickfixtextfunc\tfunction to display text in the quickfix window")
call <SID>OptionG("qftf", &qftf)
endif endif

View File

@@ -2,7 +2,7 @@
" "
" Author: Bram Moolenaar " Author: Bram Moolenaar
" Copyright: Vim license applies, see ":help license" " Copyright: Vim license applies, see ":help license"
" Last Change: 2020 May 22 " Last Change: 2020 Jun 12
" "
" WORK IN PROGRESS - Only the basics work " WORK IN PROGRESS - Only the basics work
" Note: On MS-Windows you need a recent version of gdb. The one included with " Note: On MS-Windows you need a recent version of gdb. The one included with
@@ -710,7 +710,7 @@ func s:DeleteCommands()
delcommand Source delcommand Source
delcommand Winbar delcommand Winbar
if exists('s:k_map_saved') if exists('s:k_map_saved') && !empty(s:k_map_saved)
call mapset('n', 0, s:k_map_saved) call mapset('n', 0, s:k_map_saved)
unlet s:k_map_saved unlet s:k_map_saved
endif endif

View File

@@ -1,6 +1,6 @@
" Vim plugin for showing matching parens " Vim plugin for showing matching parens
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2019 Oct 28 " Last Change: 2020 Jun 18
" Exit quickly when: " Exit quickly when:
" - this plugin was already loaded (or disabled) " - this plugin was already loaded (or disabled)
@@ -21,6 +21,7 @@ endif
augroup matchparen augroup matchparen
" Replace all matchparen autocommands " Replace all matchparen autocommands
autocmd! CursorMoved,CursorMovedI,WinEnter * call s:Highlight_Matching_Pair() autocmd! CursorMoved,CursorMovedI,WinEnter * call s:Highlight_Matching_Pair()
autocmd! WinLeave * call s:Remove_Matches()
if exists('##TextChanged') if exists('##TextChanged')
autocmd! TextChanged,TextChangedI * call s:Highlight_Matching_Pair() autocmd! TextChanged,TextChangedI * call s:Highlight_Matching_Pair()
endif endif
@@ -38,10 +39,7 @@ set cpo-=C
" for any matching paren. " for any matching paren.
func s:Highlight_Matching_Pair() func s:Highlight_Matching_Pair()
" Remove any previous match. " Remove any previous match.
if exists('w:paren_hl_on') && w:paren_hl_on call s:Remove_Matches()
silent! call matchdelete(3)
let w:paren_hl_on = 0
endif
" Avoid that we remove the popup menu. " Avoid that we remove the popup menu.
" Return when there are no colors (looks like the cursor jumps). " Return when there are no colors (looks like the cursor jumps).
@@ -195,6 +193,14 @@ func s:Highlight_Matching_Pair()
endif endif
endfunction endfunction
func s:Remove_Matches()
if exists('w:paren_hl_on') && w:paren_hl_on
silent! call matchdelete(3)
let w:paren_hl_on = 0
endif
endfunc
" Define commands that will disable and enable the plugin. " Define commands that will disable and enable the plugin.
command DoMatchParen call s:DoMatchParen() command DoMatchParen call s:DoMatchParen()
command NoMatchParen call s:NoMatchParen() command NoMatchParen call s:NoMatchParen()

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types in scripts " Vim support file to detect file types in scripts
" "
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2020 Mar 06 " Last change: 2020 Jun 07
" This file is called by an autocommand for every file that has just been " This file is called by an autocommand for every file that has just been
" loaded into a buffer. It checks if the type of file can be recognized by " loaded into a buffer. It checks if the type of file can be recognized by
@@ -35,10 +35,12 @@ let s:line1 = getline(1)
if s:line1 =~# "^#!" if s:line1 =~# "^#!"
" A script that starts with "#!". " A script that starts with "#!".
" Check for a line like "#!/usr/bin/env VAR=val bash". Turn it into " Check for a line like "#!/usr/bin/env {options} bash". Turn it into
" "#!/usr/bin/bash" to make matching easier. " "#!/usr/bin/bash" to make matching easier.
" Recognize only a few {options} that are commonly used.
if s:line1 =~# '^#!\s*\S*\<env\s' if s:line1 =~# '^#!\s*\S*\<env\s'
let s:line1 = substitute(s:line1, '\S\+=\S\+', '', 'g') let s:line1 = substitute(s:line1, '\S\+=\S\+', '', 'g')
let s:line1 = substitute(s:line1, '\(-[iS]\|--ignore-environment\|--split-string\)', '', '')
let s:line1 = substitute(s:line1, '\<env\s\+', '', '') let s:line1 = substitute(s:line1, '\<env\s\+', '', '')
endif endif

81
runtime/spell/eu/main.aap Normal file
View File

@@ -0,0 +1,81 @@
# Aap recipe for Basque Vim spell files.
#
# NOTE: This takes a VERY long time: several hours on a modern PC, more than
# a day on older systems.
# Select the amount of memory that can be used.
# Default.
#SETTING = 'set mkspellmem=460000,2000,500'
# For about 1 Tbyte of RAM.
#SETTING = 'set mkspellmem=900000,4000,1000'
# For about 2 Tbyte of RAM.
#SETTING = 'set mkspellmem=1900000,8000,2000'
# For about 4 Tbyte of RAM.
#SETTING = 'set mkspellmem=3900000,16000,4000'
# For about 8 Tbyte of RAM.
SETTING = 'set mkspellmem=7900000,30000,8000'
# Use a freshly compiled Vim if it exists.
@if os.path.exists('../../../src/vim'):
VIM = ../../../src/vim
@else:
:progsearch VIM vim
SPELLDIR = ..
FILES = eu_ES.aff eu_ES.dic
all: $SPELLDIR/eu.utf-8.spl ../README_eu.txt
$SPELLDIR/eu.utf-8.spl : $FILES
:sys env LANG=eu_ES.UTF-8
$VIM -u NONE -e -c $SETTING -c "mkspell! $SPELLDIR/eu eu_ES" -c q
#
# Fetching the files.
# URL suggested by Zuhaitz Beloki Leiza.
#
:attr {fetch = http://xuxen.eus/static/hunspell/xuxen_5.1_hunspell.tar.gz} xuxen_5.1_hunspell.tar.gz
# The files don't depend on the tar file so that we can delete it.
# Only download the tar file if the targets don't exist.
eu_ES.aff eu_ES.dic: {buildcheck=}
:assertpkg tar
:fetch xuxen_5.1_hunspell.tar.gz
:sys tar xf xuxen_5.1_hunspell.tar.gz
:update cleanunused
@if not os.path.exists('eu_ES.orig.aff'):
:copy eu_ES.aff eu_ES.orig.aff
@if not os.path.exists('eu_ES.orig.dic'):
:copy eu_ES.dic eu_ES.orig.dic
@if os.path.exists('eu_ES.diff'):
:sys patch <eu_ES.diff
../README_eu.txt : LICENSE.txt
:cat $source >! $target
# Delete all the files unpacked from the archive
clean: cleanunused
:delete {f} eu_ES.dic
:delete {f} eu_ES.aff
# Delete all the files from the archive that are not used, including the
# archive itself.
cleanunused:
:delete {f} xuxen_5.1_hunspell.tar.gz
# Generate diff files, so that others can get the files and apply
# the diffs to get the Vim versions.
diff:
:assertpkg diff
:sys {force} diff -a -C 1 eu_ES.orig.aff eu_ES.aff >eu_ES.diff
:sys {force} diff -a -C 1 eu_ES.orig.dic eu_ES.dic >>eu_ES.diff
# vim: set sts=4 sw=4 :

View File

@@ -5,9 +5,10 @@
# aap diff create all the diff files # aap diff create all the diff files
# "hu" is at the end, because it takes a very long time. # "hu" is at the end, because it takes a very long time.
# "eu" takes even longer (4 hours on my system).
LANG = af am bg br ca cs cy da de el en eo es fr fo ga gd gl he hr id it LANG = af am bg br ca cs cy da de el en eo es fr fo ga gd gl he hr id it
ku la lt lv mg mi ms nb nl nn ny pl pt ro ru rw sk sl sv sw ku la lt lv mg mi ms nb nl nn ny pl pt ro ru rw sk sl sv sw
tet th tl tn tr uk yi zu hu tet th tl tn tr uk yi zu hu eu
# TODO: # TODO:
# Finnish doesn't work, the dictionary fi_FI.zip file contains hyphenation... # Finnish doesn't work, the dictionary fi_FI.zip file contains hyphenation...
@@ -15,6 +16,12 @@ LANG = af am bg br ca cs cy da de el en eo es fr fo ga gd gl he hr id it
diff: $*LANG/diff diff: $*LANG/diff
:print Done. :print Done.
# Use "aap publish" to upload the .spl files.
SPL_files = eu.utf-8.spl
UPDIR = rsync://bram@ftp1.nluug.nl//var/ftp/pub/vim/runtime/spell
:attr {publish = $UPDIR/%file%} $SPL_files
@for l in string.split(_no.LANG): @for l in string.split(_no.LANG):
:child $l/main.aap :child $l/main.aap

View File

@@ -1,107 +1,267 @@
" Vim syntax file " Vim syntax file
" Language: .desktop, .directory files " Language: XDG desktop entry
" according to freedesktop.org specification 0.9.4 " Filenames: *.desktop, *.directory
" http://pdx.freedesktop.org/Standards/desktop-entry-spec/desktop-entry-spec-0.9.4.html " Maintainer: Eisuke Kawashima ( e.kawaschima+vim AT gmail.com )
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) " Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2016 Apr 02 " Last Change: 2020-06-11
" (added "Keywords") " Version Info: desktop.vim 1.5
" Version Info: desktop.vim 0.9.4-1.2 " References:
" - https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.5.html (2020-04-27)
" - https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-0.11.html (2006-02-07)
" quit when a syntax file was already loaded " quit when a syntax file was already loaded
if exists("b:current_syntax") if exists("b:current_syntax")
finish finish
endif endif
" This syntax file can be used to all *nix configuration files similar to dos let s:cpo_save = &cpo
" ini format (eg. .xawtv, .radio, kde rc files) - this is default mode. But set cpo&vim
" you can also enforce strict following of freedesktop.org standard for
" .desktop and .directory files . Set (eg. in vimrc)
" let enforce_freedesktop_standard = 1
" and nonstandard extensions not following X- notation will not be highlighted.
if exists("enforce_freedesktop_standard")
let b:enforce_freedesktop_standard = 1
else
let b:enforce_freedesktop_standard = 0
endif
" case on
syn case match syn case match
" General " Variable {{{1
if b:enforce_freedesktop_standard == 0 " This syntax file can be used to all *nix configuration files similar to dos
syn match dtNotStLabel "^.\{-}=\@=" nextgroup=dtDelim " ini format (eg. .xawtv, .radio, kde rc files) - this is default mode.
" By default strict following of freedesktop.org standard is enforced.
" To highlight nonstandard extensions that does not begin with X-, set
" let g:desktop_enable_nonstd = v:true
" Note that this may cause wrong highlight.
" To highlight KDE-reserved features, set
" let g:desktop_enable_kde = v:true
" g:desktop_enable_kde follows g:desktop_enable_nonstd if not supplied
if exists("g:desktop_enable_nonstd") && g:desktop_enable_nonstd
let s:desktop_enable_nonstd = v:true
else
let s:desktop_enable_nonstd = v:false
endif endif
syn match dtGroup /^\s*\[.*\]/ if exists("g:desktop_enable_kde") && g:desktop_enable_kde || s:desktop_enable_nonstd
syn match dtComment /^\s*#.*$/ let s:desktop_enable_kde = v:true
else
let s:desktop_enable_kde = v:false
endif
" Comment {{{1
syn match dtComment /^#.*$/
" Error {{{1
syn match dtError /\%(^\s.*\|\s\+$\)/
" Group Header {{{1
" ASCII printable characters except for brackets [ (0x5B) and ] (0x5D)
syn match dtGroup /^\[[\x20-\x5A\x5C\x5E-\x7E]\+\]$/
" Entries {{{1
syn match dtDelim /=/ contained syn match dtDelim /=/ contained
" lang_territory.codeset@modifier
syn match dtLocaleSuffix
\ /\[\%(C\|POSIX\|[a-z]\{2,4}\%(_[A-Z0-9]\{2,3}\)\?\)\%(\.[A-Za-z0-9_-]\+\)\?\%(@[A-Za-z]\+\)\?\]\ze\s*=/
\ contained
" Locale " Boolean Value {{{2
syn match dtLocale /^\s*\<\(Name\|GenericName\|Comment\|SwallowTitle\|Icon\|UnmountIcon\)\>.*/ contains=dtLocaleKey,dtLocaleName,dtDelim transparent syn match dtBoolean
syn keyword dtLocaleKey Name GenericName Comment SwallowTitle Icon UnmountIcon nextgroup=dtLocaleName containedin=dtLocale \ /^\%(DBusActivatable\|Hidden\|NoDisplay\|PrefersNonDefaultGPU\|StartupNotify\|Terminal\)\s*=\s*\%(true\|false\)/
syn match dtLocaleName /\(\[.\{-}\]\s*=\@=\|\)/ nextgroup=dtDelim containedin=dtLocale contained \ contains=dtBooleanKey,dtDelim,dtBooleanValue transparent
syn keyword dtBooleanKey
\ DBusActivatable Hidden NoDisplay PrefersNonDefaultGPU StartupNotify Terminal
\ contained nextgroup=dtDelim
" Numeric if s:desktop_enable_kde
syn match dtNumeric /^\s*\<Version\>/ contains=dtNumericKey,dtDelim syn match dtBoolean
syn keyword dtNumericKey Version nextgroup=dtDelim containedin=dtNumeric contained \ /^ReadOnly\s*=\s*\%(true\|false\)/
\ contains=dtBooleanKey,dtDelim,dtBooleanValue transparent
syn keyword dtBooleanKey
\ ReadOnly
\ contained nextgroup=dtDelim
endif
syn keyword dtBooleanValue true false contained
" Boolean " Numeric Value {{{2
syn match dtBoolean /^\s*\<\(StartupNotify\|ReadOnly\|Terminal\|Hidden\|NoDisplay\)\>.*/ contains=dtBooleanKey,dtDelim,dtBooleanValue transparent " icon theme
syn keyword dtBooleanKey StartupNotify ReadOnly Terminal Hidden NoDisplay nextgroup=dtDelim containedin=dtBoolean contained syn match dtNumeric /^\%(MaxSize\|MinSize\|Size\|Threshold\)\s*=\s*\d\+/ contains=dtNumericKey,dtDelim,dtNumericDecimal
syn keyword dtBooleanValue true false containedin=dtBoolean contained syn keyword dtNumericKey
\ MaxSize MinSize Size Threshold
\ contained nextgroup=dtDelim
" String if s:desktop_enable_kde
syn match dtString /^\s*\<\(Encoding\|Icon\|Path\|Actions\|FSType\|MountPoint\|UnmountIcon\|URL\|Keywords\|Categories\|OnlyShowIn\|NotShowIn\|StartupWMClass\|FilePattern\|MimeType\)\>.*/ contains=dtStringKey,dtDelim transparent syn match dtNumeric /^InitialPreference\s*=\s*\d\+/ contains=dtNumericKey,dtDelim,dtNumericDecimal
syn keyword dtStringKey Type Encoding TryExec Exec Path Actions FSType MountPoint URL Keywords Categories OnlyShowIn NotShowIn StartupWMClass FilePattern MimeType nextgroup=dtDelim containedin=dtString contained syn keyword dtNumericKey
\ InitialPreference
\ contained nextgroup=dtDelim
endif
" Exec syn match dtNumericDecimal /\<\d\+$/ contained
syn match dtExec /^\s*\<\(Exec\|TryExec\|SwallowExec\)\>.*/ contains=dtExecKey,dtDelim,dtExecParam transparent
syn keyword dtExecKey Exec TryExec SwallowExec nextgroup=dtDelim containedin=dtExec contained
syn match dtExecParam /%[fFuUnNdDickv]/ containedin=dtExec contained
" Type " String Value {{{2
syn match dtType /^\s*\<Type\>.*/ contains=dtTypeKey,dtDelim,dtTypeValue transparent syn match dtString
syn keyword dtTypeKey Type nextgroup=dtDelim containedin=dtType contained \ /^\%(Actions\|Implements\|MimeType\|NotShowIn\|OnlyShowIn\|Path\|StartupWMClass\|URL\)\s*=.*\S/
syn keyword dtTypeValue Application Link FSDevice Directory containedin=dtType contained \ contains=dtStringKey,dtDelim transparent
syn keyword dtStringKey
\ Actions Implements MimeType NotShowIn OnlyShowIn Path StartupWMClass URL Version
\ contained nextgroup=dtDelim
" X-Addition " icon theme
syn match dtXAdd /^\s*X-.*/ contains=dtXAddKey,dtDelim transparent syn match dtString
syn match dtXAddKey /^\s*X-.\{-}\s*=\@=/ nextgroup=dtDelim containedin=dtXAdd contains=dtXLocale contained \ /^\%(Context\|Directories\|Example\|Inherits\)\s*=.*\S/
\ contains=dtStringKey,dtDelim transparent
syn keyword dtStringKey
\ Context Directories Example Inherits
\ contained nextgroup=dtDelim
" Locale for X-Addition if s:desktop_enable_kde
syn match dtXLocale /\[.\{-}\]\s*=\@=/ containedin=dtXAddKey contained syn match dtString
\ /^\%(Dev\|DocPath\|FSType\|MountPoint\|ServiceTypes\)\s*=.*\S/
\ contains=dtStringKey,dtDelim transparent
syn keyword dtStringKey
\ Dev DocPath FSType MountPoint ServiceTypes
\ contained nextgroup=dtDelim
endif
" Locale for all " Categories {{{3
syn match dtALocale /\[.\{-}\]\s*=\@=/ containedin=ALL " https://specifications.freedesktop.org/menu-spec/menu-spec-1.0.html#category-registry
syn match dtCategories /^Categories\s*=.\+\S/ contains=dtCategoriesKey,dtDelim,dtCategoriesValue transparent
syn keyword dtCategoriesKey
\ Categories
\ contained nextgroup=dtDelim
" Main Categories
syn keyword dtCategoriesValue
\ Audio AudioVideo Development Education Game Graphics Network Office
\ Settings System Utility Video
\ contained
" Additional Categories
syn keyword dtCategoriesValue
\ BoardGame Chat Clock Geoscience Presentation 2DGraphics 3DGraphics
\ Accessibility ActionGame AdventureGame Amusement ArcadeGame Archiving
\ Art ArtificialIntelligence Astronomy AudioVideoEditing Biology
\ BlocksGame BoardGame Building Calculator Calendar CardGame Chart Chat
\ Chemistry Clock Compression ComputerScience ConsoleOnly Construction
\ ContactManagement Core DataVisualization Database Debugger
\ DesktopSettings Dialup Dictionary DiscBurning Documentation Economy
\ Electricity Electronics Email Emulator Engineering FileManager
\ FileTools FileTransfer Filesystem Finance FlowChart GNOME GTK
\ GUIDesigner Geography Geology Geoscience HamRadio HardwareSettings
\ History IDE IRCClient ImageProcessing InstantMessaging Java KDE
\ KidsGame Languages Literature LogicGame Math MedicalSoftware Midi
\ Mixer Monitor Motif Music News NumericalAnalysis OCR P2P PDA
\ PackageManager ParallelComputing Photography Physics Player
\ Presentation Printing Profiling ProjectManagement Publishing Qt
\ RasterGraphics Recorder RemoteAccess RevisionControl Robotics
\ RolePlaying Scanning Science Security Sequencer Simulation Sports
\ SportsGame Spreadsheet StrategyGame TV Telephony TelephonyTools
\ TerminalEmulator TextEditor TextTools Translation Tuner VectorGraphics
\ VideoConference Viewer WebBrowser WebDevelopment WordProcessor
\ contained
" Reserved Category
syn keyword dtCategoriesValue
\ Applet Screensaver Shell TrayIcon
\ contained
" Exec/TryExec {{{3
syn match dtExec /^\%(Exec\|TryExec\)\s*=.\+\S/ contains=dtExecKey,dtDelim,dtExecParam transparent
syn keyword dtExecKey
\ Exec TryExec
\ contained nextgroup=dtDelim
" code for file(s), URL(s), etc
syn match dtExecParam /\s\zs%[fFuUick]\ze\%(\W\|$\)/ contained
" Type {{{3
syn match dtType /^Type\s*=\s*\S\+/ contains=dtTypeKey,dtDelim,dtTypeValue transparent
syn keyword dtTypeKey
\ Type
\ contained nextgroup=dtDelim
syn keyword dtTypeValue
\ Application Directory Link
\ contained
if s:desktop_enable_kde
syn keyword dtTypeValue
\ FSDevice Service ServiceType
\ contained
endif
" Define the default highlighting. " Version {{{3
" Only when an item doesn't have highlighting yet syn match dtVersion /^Version\s*=\s*\S\+/ contains=dtVersionKey,dtDelim,dtVersionValue transparent
syn keyword dtVersionKey
\ Version
\ contained nextgroup=dtDelim
syn match dtVersionValue /[0-9]\+\%(\.[0-9]\+\)\{1,2}$/ contained
" Localestring Value {{{2
syn match dtLocalestring
\ /^\%(Comment\|GenericName\|Keywords\|Name\)\%(\[.\{-}\]\)\?\s*=.*\S/
\ contains=dtLocalestringKey,dtLocaleSuffix,dtDelim transparent
syn keyword dtLocalestringKey
\ Comment GenericName Keywords Name
\ contained nextgroup=dtLocaleSuffix,dtDelim skipwhite
" Iconstring Value {{{2
syn match dtIconstring
\ /^Icon\s*=.*\S/
\ contains=dtIconstringKey,dtDelim transparent
syn keyword dtIconstringKey
\ Icon
\ contained nextgroup=dtDelim skipwhite
if s:desktop_enable_kde
syn match dtIconstring
\ /^UnmountIcon\>\%(\[.\{-}\]\)\?\s*=.*\S/
\ contains=dtIconstringKey,dtLocaleSuffix,dtDelim transparent
syn keyword dtIconstringKey
\ UnmountIcon
\ contained nextgroup=dtLocaleSuffix,dtDelim skipwhite
endif
" X-Extension {{{2
syn match dtXExtension /^X-[0-9A-Za-z-]*\%(\[.\{-}\]\)\?\s*=.*\S/
\ contains=dtXExtensionKey,dtLocaleSuffix,dtDelim transparent
syn match dtXExtensionKey /^X-[0-9A-Za-z-]*/ contained nextgroup=dtLocaleSuffix,dtDelim
" non standard {{{2
if s:desktop_enable_nonstd
syn match dtNonStdLabel /^[0-9A-Za-z-]\+\%(\[.\{-}\]\)\?\s*=.*\S/
\ contains=dtNonStdLabelKey,dtLocaleSuffix,dtDelim transparent
syn match dtNonStdLabelKey /^[0-9A-Za-z-]\+/ contained nextgroup=dtLocaleSuffix,dtDelim
endif
" Highlight {{{1
hi def link dtComment Comment
hi def link dtError Error
hi def link dtGroup Special hi def link dtGroup Special
hi def link dtComment Comment
hi def link dtDelim String
hi def link dtLocaleKey Type hi def link dtDelim Delimiter
hi def link dtLocaleName Identifier hi def link dtLocaleSuffix Identifier
hi def link dtXLocale Identifier
hi def link dtALocale Identifier
hi def link dtNumericKey Type
hi def link dtBooleanKey Type hi def link dtBooleanKey Type
hi def link dtBooleanValue Constant hi def link dtBooleanValue Boolean
hi def link dtNumericKey Type
hi def link dtNumericDecimal Number
hi def link dtStringKey Type hi def link dtStringKey Type
hi def link dtCategoriesKey Type
hi def link dtCategoriesValue Constant
hi def link dtExecKey Type hi def link dtExecKey Type
hi def link dtExecParam Special hi def link dtExecParam Special
hi def link dtTypeKey Type hi def link dtTypeKey Type
hi def link dtTypeValue Constant hi def link dtTypeValue Constant
hi def link dtNotStLabel Type hi def link dtVersionKey Type
hi def link dtXAddKey Type hi def link dtVersionValue Constant
hi def link dtLocalestringKey Type
hi def link dtIconStringKey Type
hi def link dtXExtensionKey Type
hi def link dtNonStdLabelKey Type
" Clean Up {{{1
let b:current_syntax = "desktop" let b:current_syntax = "desktop"
let &cpo = s:cpo_save
" vim:ts=8 " vim:ts=8:sw=2:fdm=marker

105
runtime/syntax/elm.vim Normal file
View File

@@ -0,0 +1,105 @@
" Vim syntax file
" Language: Elm
" Maintainer: Andreas Scharf <as@99n.de>
" Original Author: Joseph Hager <ajhager@gmail.com>
" Copyright: Joseph Hager <ajhager@gmail.com>
" License: BSD3
" Latest Revision: 2020-05-29
if exists('b:current_syntax')
finish
endif
" Keywords
syn keyword elmConditional else if of then case
syn keyword elmAlias alias
syn keyword elmTypedef contained type port
syn keyword elmImport exposing as import module where
" Operators
" elm/core
syn match elmOperator contained "\(<|\||>\|||\|&&\|==\|/=\|<=\|>=\|++\|::\|+\|-\|*\|/\|//\|^\|<>\|>>\|<<\|<\|>\|%\)"
" elm/parser
syn match elmOperator contained "\(|.\||=\)"
" elm/url
syn match elmOperator contained "\(</>\|<?>\)"
" Types
syn match elmType "\<[A-Z][0-9A-Za-z_-]*"
syn keyword elmNumberType number
" Modules
syn match elmModule "\<\([A-Z][0-9A-Za-z_'-\.]*\)\+\.[A-Za-z]"me=e-2
syn match elmModule "^\(module\|import\)\s\+[A-Z][0-9A-Za-z_'-\.]*\(\s\+as\s\+[A-Z][0-9A-Za-z_'-\.]*\)\?\(\s\+exposing\)\?" contains=elmImport
" Delimiters
syn match elmDelimiter "[,;]"
syn match elmBraces "[()[\]{}]"
" Functions
syn match elmTupleFunction "\((,\+)\)"
" Comments
syn keyword elmTodo TODO FIXME XXX contained
syn match elmLineComment "--.*" contains=elmTodo,@spell
syn region elmComment matchgroup=elmComment start="{-|\=" end="-}" contains=elmTodo,elmComment,@spell fold
" Strings
syn match elmStringEscape "\\u[0-9a-fA-F]\{4}" contained
syn match elmStringEscape "\\[nrfvbt\\\"]" contained
syn region elmString start="\"" skip="\\\"" end="\"" contains=elmStringEscape,@spell
syn region elmTripleString start="\"\"\"" skip="\\\"" end="\"\"\"" contains=elmStringEscape,@spell
syn match elmChar "'[^'\\]'\|'\\.'\|'\\u[0-9a-fA-F]\{4}'"
" Lambda
syn region elmLambdaFunc start="\\"hs=s+1 end="->"he=e-2
" Debug
syn match elmDebug "Debug.\(log\|todo\|toString\)"
" Numbers
syn match elmInt "-\?\<\d\+\>"
syn match elmFloat "-\?\(\<\d\+\.\d\+\>\)"
" Identifiers
syn match elmTopLevelDecl "^\s*[a-zA-Z][a-zA-z0-9_]*\('\)*\s\+:\(\r\n\|\r\|\n\|\s\)\+" contains=elmOperator
syn match elmFuncName /^\l\w*/
" Folding
syn region elmTopLevelTypedef start="type" end="\n\(\n\n\)\@=" contains=ALL fold
syn region elmTopLevelFunction start="^[a-zA-Z].\+\n[a-zA-Z].\+=" end="^\(\n\+\)\@=" contains=ALL fold
syn region elmCaseBlock matchgroup=elmCaseBlockDefinition start="^\z\(\s\+\)\<case\>" end="^\z1\@!\W\@=" end="\(\n\n\z1\@!\)\@=" end="\n\z1\@!\(\n\n\)\@=" contains=ALL fold
syn region elmCaseItemBlock start="^\z\(\s\+\).\+->$" end="^\z1\@!\W\@=" end="\(\n\n\z1\@!\)\@=" end="\(\n\z1\S\)\@=" contains=ALL fold
syn region elmLetBlock matchgroup=elmLetBlockDefinition start="\<let\>" end="\<in\>" contains=ALL fold
hi def link elmFuncName Function
hi def link elmCaseBlockDefinition Conditional
hi def link elmCaseBlockItemDefinition Conditional
hi def link elmLetBlockDefinition TypeDef
hi def link elmTopLevelDecl Function
hi def link elmTupleFunction Normal
hi def link elmTodo Todo
hi def link elmComment Comment
hi def link elmLineComment Comment
hi def link elmString String
hi def link elmTripleString String
hi def link elmChar String
hi def link elmStringEscape Special
hi def link elmInt Number
hi def link elmFloat Float
hi def link elmDelimiter Delimiter
hi def link elmBraces Delimiter
hi def link elmTypedef TypeDef
hi def link elmImport Include
hi def link elmConditional Conditional
hi def link elmAlias Delimiter
hi def link elmOperator Operator
hi def link elmType Type
hi def link elmNumberType Identifier
hi def link elmLambdaFunc Function
hi def link elmDebug Debug
hi def link elmModule Type
syn sync minlines=500
let b:current_syntax = 'elm'

View File

@@ -1,7 +1,8 @@
" Vim syntax file " Vim syntax file
" Language: Objective-C " Language: Objective-C
" Maintainer: Kazunobu Kuriyama <kazunobu.kuriyama@gmail.com> " Maintainer: Kazunobu Kuriyama <kazunobu.kuriyama@gmail.com>
" Last Change: 2015 Dec 14 " Last Change: 2020 Jun 07
" Last Change By Maintainer: 2015 Dec 14
""" Preparation for loading ObjC stuff """ Preparation for loading ObjC stuff
if exists("b:current_syntax") if exists("b:current_syntax")
@@ -24,7 +25,7 @@ syn keyword objcUsefulTerm nil Nil NO YES
" Preprocessor Directives " Preprocessor Directives
syn region objcImported display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn region objcImported display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
syn match objcImported display contained "\(<\h[-a-zA-Z0-9_/]*\.h>\|<[a-z0-9]\+>\)" syn match objcImported display contained "\(<\h[-+a-zA-Z0-9_/]*\.h>\|<[a-z0-9]\+>\)"
syn match objcImport display "^\s*\(%:\|#\)\s*import\>\s*["<]" contains=objcImported syn match objcImport display "^\s*\(%:\|#\)\s*import\>\s*["<]" contains=objcImported
" ObjC Compiler Directives " ObjC Compiler Directives

View File

@@ -1,8 +1,8 @@
" Vim syntax file " Vim syntax file
" Language: TeX " Language: TeX
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM> " Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
" Last Change: May 19, 2020 " Last Change: Jun 07, 2020
" Version: 117 " Version: 118
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
" "
" Notes: {{{1 " Notes: {{{1
@@ -755,6 +755,8 @@ if has("conceal") && &enc == 'utf-8'
\ ['lceil' , '⌈'], \ ['lceil' , '⌈'],
\ ['ldots' , '…'], \ ['ldots' , '…'],
\ ['le' , '≤'], \ ['le' , '≤'],
\ ['left|' , '|'],
\ ['left\|' , '‖'],
\ ['left(' , '('], \ ['left(' , '('],
\ ['left\[' , '['], \ ['left\[' , '['],
\ ['left\\{' , '{'], \ ['left\\{' , '{'],
@@ -805,6 +807,8 @@ if has("conceal") && &enc == 'utf-8'
\ ['quad' , ' '], \ ['quad' , ' '],
\ ['qquad' , ''], \ ['qquad' , ''],
\ ['rfloor' , '⌋'], \ ['rfloor' , '⌋'],
\ ['right|' , '|'],
\ ['right\\|' , '‖'],
\ ['right)' , ')'], \ ['right)' , ')'],
\ ['right]' , ']'], \ ['right]' , ']'],
\ ['right\\}' , '}'], \ ['right\\}' , '}'],

View File

@@ -1,8 +1,8 @@
" Vim syntax file " Vim syntax file
" Language: Vim 8.0 script " Language: Vim 8.0 script
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM> " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: May 26, 2020 " Last Change: Jun 01, 20200
" Version: 8.0-35 " Version: 8.0-37
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
" Automatically generated keyword lists: {{{1 " Automatically generated keyword lists: {{{1
@@ -19,25 +19,24 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX
syn cluster vimCommentGroup contains=vimTodo,@Spell syn cluster vimCommentGroup contains=vimTodo,@Spell
" regular vim commands {{{2 " regular vim commands {{{2
syn keyword vimCommand contained a ar[gs] argl[ocal] ba[ll] bm[odified] breaka[dd] bun[load] cabc[lear] cal[l] cc cf[ile] changes cla[st] cnf[ile] comc[lear] cp[revious] cstag debugg[reedy] deletl dep diffpu[t] dl dr[op] ec em[enu] ene[w] files fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] isp[lit] keepa l[ist] laf[ter] lbel[ow] lcscope lfdo lgrepa[dd] lma lo[adview] lop[en] lua m[ove] mes mkvie[w] nbc[lose] noh[lsearch] ol[dfiles] pa[ckadd] po[p] prof[ile] pta[g] ptr[ewind] py3f[ile] pythonx quita[ll] redraws[tatus] rew[ind] rubyf[ile] sIg sa[rgument] sba[ll] sbr[ewind] scl scscope sfir[st] sgl sic sin sm[ap] snoreme spelld[ump] spellw[rong] srg st[op] stj[ump] sunmenu syn tN[ext] tabd[o] tabm[ove] tabr[ewind] tch[dir] tf[irst] tlmenu tm[enu] to[pleft] tu[nmenu] undol[ist] up[date] vi[sual] vmapc[lear] wa[ll] winp[os] wundo xme xr[estore] syn keyword vimCommand contained a ar[gs] argl[ocal] ba[ll] bm[odified] breaka[dd] bun[load] cabc[lear] cal[l] cc cf[ile] changes cla[st] cnew[er] com cope[n] cscope debug delep dell diffg[et] dig[raphs] do dsp[lit] echom[sg] enddef eval f[ile] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] ij[ump] inor j[oin] keepj[umps] lab[ove] lat lc[d] le[ft] lg[etfile] lhi[story] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mk[exrc] mz[scheme] new nore on[ly] pc[lose] pp[op] promptf[ind] ptj[ump] pu[t] py[thon] pyxdo rec[over] reg[isters] rightb[elow] rv[iminfo] sIn san[dbox] sbl[ast] scI scr[iptnames] setf[iletype] sgI sgp sig sir smenu so[urce] spellr[are] sr srl startg[replace] sun[hide] sy tN[ext] tabe[dit] tabnew tc[l] ter[minal] tlmenu tma[p] tr[ewind] u[ndo] unl ve[rsion] vim9 vmapc[lear] wa[ll] winp[os] wundo xme xr[estore]
syn keyword vimCommand contained ab arga[dd] argu[ment] bad[d] bn[ext] breakd[el] bw[ipeout] cabo[ve] cat[ch] ccl[ose] cfdo chd[ir] cle[arjumps] cnor comp[iler] cpf[ile] cun delc[ommand] deletp di[splay] diffs[plit] dli[st] ds[earch] echoe[rr] en[dif] eval filet fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] iuna[bbrev] keepalt la[st] lan[guage] lbo[ttom] ld[o] lfir[st] lh[elpgrep] lmak[e] loadk lp[revious] luado ma[rk] messages mod[e] nbs[tart] nor omapc[lear] packl[oadall] popu[p] profd[el] ptf[irst] pts[elect] py3f[ile] pyx r[ead] redrawt[abline] ri[ght] rundo sIl sal[l] sbf[irst] sc scp se[t] sg sgn sie sip sme snoremenu spelli[nfo] spr[evious] sri sta[g] stopi[nsert] sus[pend] sync ta[g] tabe[dit] tabn[ext] tabs tcld[o] th[row] tln tma[p] tp[revious] tunma[p] unh[ide] v vie[w] vne[w] wh[ile] wn[ext] wv[iminfo] xmenu xunme syn keyword vimCommand contained ab arga[dd] argu[ment] bad[d] bn[ext] breakd[el] bw[ipeout] cabo[ve] cat[ch] ccl[ose] cfdo chd[ir] class cnf[ile] comc[lear] cp[revious] cstag debugg[reedy] deletel delm[arks] diffo[ff] dir doau e[dit] echon endf[unction] ex files fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] interface ju[mps] keepp[atterns] lad[dexpr] later lch[dir] lefta[bove] lgetb[uffer] ll lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mks[ession] mzf[ile] nmapc[lear] nos[wapfile] opt[ions] pe[rl] pre[serve] promptr[epl] ptl[ast] pw[d] pydo pyxfile red[o] res[ize] ru[ntime] sI sIp sav[eas] sbm[odified] sce scripte[ncoding] setg[lobal] sgc sgr sign sl[eep] smile sor[t] spellr[epall] srI srn startr[eplace] sunme syn ta[g] tabf[ind] tabo[nly] tcd tf[irst] tln tmapc[lear] try una[bbreviate] unlo[ckvar] verb[ose] vim9script vne[w] wh[ile] wn[ext] wv[iminfo] xmenu xunme
syn keyword vimCommand contained abc[lear] argd[elete] as[cii] bd[elete] bo[tright] breakl[ist] cN[ext] cad[dbuffer] cb[uffer] cd cfir[st] che[ckpath] clo[se] co[py] con[tinue] cq[uit] cuna[bbrev] delel delf[unction] dif[fupdate] difft[his] do dsp[lit] echom[sg] endf[unction] ex filetype fix[del] for gui helpg[rep] ia in j[oin] keepj[umps] lab[ove] lat lc[d] le[ft] lg[etfile] lhi[story] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mk[exrc] mz[scheme] new nore on[ly] pc[lose] pp[op] promptf[ind] ptj[ump] pu[t] py[thon] pyxdo rec[over] reg[isters] rightb[elow] rv[iminfo] sIn san[dbox] sbl[ast] scI scr[iptnames] setf[iletype] sgI sgp sig sir smenu so[urce] spellr[are] sr srl star[tinsert] sts[elect] sv[iew] syncbind tab tabf[ind] tabnew tags tclf[ile] tj[ump] tlnoremenu tmapc[lear] tr[ewind] u[ndo] unl ve[rsion] vim[grep] vs[plit] win[size] wp[revious] x[it] xnoreme xunmenu syn keyword vimCommand contained abc[lear] argd[elete] as[cii] bd[elete] bo[tright] breakl[ist] cN[ext] cad[dbuffer] cb[uffer] cd cfir[st] che[ckpath] cle[arjumps] cnor comp[iler] cpf[ile] cun def deletep delp diffp[atch] disa[ssemble] doaut ea el[se] endfo[r] exi[t] filet fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] intro k lN[ext] laddb[uffer] lb[uffer] lcl[ose] lex[pr] lgete[xpr] lla[st] lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mksp[ell] n[ext] noa nu[mber] ownsyntax ped[it] prev[ious] ps[earch] ptn[ext] py3 pyf[ile] q[uit] redi[r] ret[ab] rub[y] sIc sIr sbN[ext] sbn[ext] scg scriptv[ersion] setl[ocal] sge sh[ell] sil[ent] sla[st] sn[ext] sp[lit] spellr[rare] src srp stj[ump] sunmenu sync tab tabfir[st] tabp[revious] tch[dir] th[row] tlnoremenu tn[ext] ts[elect] undoj[oin] uns[ilent] vert[ical] vim[grep] vs[plit] win[size] wp[revious] x[it] xnoreme xunmenu
syn keyword vimCommand contained abo[veleft] argdo au bel[owright] bp[revious] bro[wse] cNf[ile] cadde[xpr] cbe[fore] cdo cg[etfile] checkt[ime] cmapc[lear] col[der] conf[irm] cr[ewind] cw[indow] delep dell diffg[et] dig[raphs] doau e[dit] echon endfo[r] exi[t] filt[er] fo[ld] fu[nction] gvim helpt[ags] iabc[lear] inor ju[mps] keepp[atterns] lad[dexpr] later lch[dir] lefta[bove] lgetb[uffer] ll lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mks[ession] mzf[ile] nmapc[lear] nos[wapfile] opt[ions] pe[rl] pre[serve] promptr[epl] ptl[ast] pw[d] pydo pyxfile red[o] res[ize] ru[ntime] sI sIp sav[eas] sbm[odified] sce scripte[ncoding] setg[lobal] sgc sgr sign sl[eep] smile sor[t] spellr[epall] srI srn startg[replace] sun[hide] sw[apname] syntime tabN[ext] tabfir[st] tabo[nly] tc[l] te[aroff] tl[ast] tlu tn[ext] try una[bbreviate] unlo[ckvar] verb[ose] vimgrepa[dd] wN[ext] winc[md] wq xa[ll] xnoremenu xwininfo syn keyword vimCommand contained abo[veleft] argdo au bel[owright] bp[revious] bro[wse] cNf[ile] cadde[xpr] cbe[fore] cdo cg[etfile] checkt[ime] clo[se] co[py] con[tinue] cq[uit] cuna[bbrev] defc[ompile] deletl dep diffpu[t] dj[ump] dp earlier elsei[f] endt[ry] exp filetype fix[del] for gui helpg[rep] ia imp is[earch] kee[pmarks] lNf[ile] laddf[ile] lbe[fore] lcs lf[ile] lgr[ep] lli[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] mkv[imrc] nb[key] noautocmd o[pen] p[rint] perld[o] pro ptN[ext] ptp[revious] py3do python3 qa[ll] redr[aw] retu[rn] rubyd[o] sIe sN[ext] sb[uffer] sbp[revious] sci scs sf[ind] sgi si sim[alt] sm[agic] sno[magic] spe[llgood] spellu[ndo] sre[wind] st[op] stopi[nsert] sus[pend] syncbind tabN[ext] tabl[ast] tabr[ewind] tcld[o] tj[ump] tlu tno[remap] tu[nmenu] undol[ist] up[date] vi[sual] vimgrepa[dd] wN[ext] winc[md] wq xa[ll] xnoremenu xwininfo
syn keyword vimCommand contained addd arge[dit] bN[ext] bf[irst] br[ewind] bufdo c[hange] caddf[ile] cbel[ow] ce[nter] cgetb[uffer] chi[story] cn[ext] colo[rscheme] cons[t] cs d[elete] deletel delm[arks] diffo[ff] dir doaut ea el[se] endt[ry] exu[sage] fin[d] foldc[lose] g h[elp] hi if intro k lN[ext] laddb[uffer] lb[uffer] lcl[ose] lex[pr] lgete[xpr] lla[st] lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mksp[ell] n[ext] noa nu[mber] ownsyntax ped[it] prev[ious] ps[earch] ptn[ext] py3 pyf[ile] q[uit] redi[r] ret[ab] rub[y] sIc sIr sbN[ext] sbn[ext] scg scriptv[ersion] setl[ocal] sge sh[ell] sil[ent] sla[st] sn[ext] sp[lit] spellr[rare] src srp startr[eplace] sunme sy t tabc[lose] tabl[ast] tabp[revious] tcd ter[minal] tlm tlunmenu tno[remap] ts[elect] undoj[oin] uns[ilent] vert[ical] viu[sage] w[rite] windo wqa[ll] xmapc[lear] xprop y[ank] syn keyword vimCommand contained addd arge[dit] bN[ext] bf[irst] br[ewind] bufdo c[hange] caddf[ile] cbel[ow] ce[nter] cgetb[uffer] chi[story] cmapc[lear] col[der] conf[irm] cr[ewind] cw[indow] delc[ommand] deletp di[splay] diffs[plit] dl dr[op] ec em[enu] endw[hile] export filt[er] fo[ld] fu[nction] gvim helpt[ags] iabc[lear] import isp[lit] keepa l[ist] laf[ter] lbel[ow] lcscope lfdo lgrepa[dd] lma lo[adview] lop[en] lua m[ove] mes mkvie[w] nbc[lose] noh[lsearch] ol[dfiles] pa[ckadd] po[p] prof[ile] pta[g] ptr[ewind] py3f[ile] pythonx quita[ll] redraws[tatus] rew[ind] rubyf[ile] sIg sa[rgument] sba[ll] sbr[ewind] scl scscope sfir[st] sgl sic sin sm[ap] snoreme spelld[ump] spellw[rong] srg sta[g] sts[elect] sv[iew] syntime tabc[lose] tabm[ove] tabs tclf[ile] tl[ast] tlunmenu to[pleft] tunma[p] unh[ide] v vie[w] viu[sage] w[rite] windo wqa[ll] xmapc[lear] xprop y[ank]
syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bl[ast] brea[k] buffers ca caf[ter] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cnew[er] com cope[n] cscope debug deletep delp diffp[atch] dj[ump] dp earlier elsei[f] endw[hile] f[ile] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] ij[ump] is[earch] kee[pmarks] lNf[ile] laddf[ile] lbe[fore] lcs lf[ile] lgr[ep] lli[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] mkv[imrc] nb[key] noautocmd o[pen] p[rint] perld[o] pro ptN[ext] ptp[revious] py3do python3 qa[ll] redr[aw] retu[rn] rubyd[o] sIe sN[ext] sb[uffer] sbp[revious] sci scs sf[ind] sgi si sim[alt] sm[agic] sno[magic] spe[llgood] spellu[ndo] sre[wind] syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bl[ast] brea[k] buffers ca caf[ter] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cn[ext] colo[rscheme] cons[t] cs d[elete] delel delf[unction] dif[fupdate] difft[his] dli[st] ds[earch] echoe[rr] en[dif] ene[w] exu[sage] fin[d] foldc[lose] g h[elp] hi if in iuna[bbrev] keepalt la[st] lan[guage] lbo[ttom] ld[o] lfir[st] lh[elpgrep] lmak[e] loadk lp[revious] luado ma[rk] messages mod[e] nbs[tart] nor omapc[lear] packl[oadall] popu[p] profd[el] ptf[irst] pts[elect] py3f[ile] pyx r[ead] redrawt[abline] ri[ght] rundo sIl sal[l] sbf[irst] sc scp se[t] sg sgn sie sip sme snoremenu spelli[nfo] spr[evious] sri star[tinsert] substitutepattern sw[apname] t tabd[o] tabn[ext] tags te[aroff] tlm tm[enu] tp[revious] type
syn match vimCommand contained "\<z[-+^.=]\=\>" syn match vimCommand contained "\<z[-+^.=]\=\>"
syn keyword vimCommand contained def endd[ef] disa[ssemble] vim9[script] imp[ort] exp[ort]
syn keyword vimStdPlugin contained Arguments Break Cfilter Clear Continue DiffOrig Evaluate Finish Gdb Lfilter Man N[ext] Over P[rint] Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Winbar XMLent XMLns syn keyword vimStdPlugin contained Arguments Break Cfilter Clear Continue DiffOrig Evaluate Finish Gdb Lfilter Man N[ext] Over P[rint] Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Winbar XMLent XMLns
" vimOptions are caught only when contained in a vimSet {{{2 " vimOptions are caught only when contained in a vimSet {{{2
syn keyword vimOption contained acd ambw arshape background ballooneval bex bl brk buftype cf cinkeys cmdwinheight com completeslash cpoptions cscoperelative csre cursorcolumn delcombine digraph eadirection emo equalprg expandtab fdls fex fileignorecase fml foldlevel formatexpr gcr go guifontset helpheight history hlsearch imaf ims includeexpr infercase iskeyword keywordprg laststatus lispwords lrm magic maxfuncdepth menuitems mm modifiable mousemodel mzq numberwidth opfunc patchexpr pfn pp printfont pumwidth pythonthreehome redrawtime ri rs sb scroll sect sft shellredir shiftwidth showmatch signcolumn smarttab sp spf srr startofline suffixes switchbuf ta tagfunc tbi term termwintype tgc titlelen toolbariconsize ttimeout ttymouse twt undofile varsofttabstop verbosefile viminfofile wak weirdinvert wig wildoptions winheight wm wrapscan syn keyword vimOption contained acd ambw arshape background ballooneval bex bl brk buftype cf cinkeys cmdwinheight com completeslash cpoptions cscoperelative csre cursorcolumn delcombine digraph eadirection emo equalprg expandtab fdls fex fileignorecase fml foldlevel formatexpr gcr go guifontset helpheight history hlsearch imaf ims includeexpr infercase iskeyword keywordprg laststatus lispwords lrm magic maxfuncdepth menuitems mm modifiable mousemodel mzq numberwidth opfunc patchexpr pfn pp printfont pumwidth pythonthreehome re restorescreen ro rulerformat scl scs sft shellredir shiftwidth showmatch signcolumn smarttab sp spf srr startofline suffixes switchbuf ta tagfunc tbi term termwintype tgc titlelen toolbariconsize ttimeout ttymouse twt undofile varsofttabstop verbosefile viminfofile wak weirdinvert wig wildoptions winheight wm wrapscan
syn keyword vimOption contained ai anti autochdir backspace balloonevalterm bexpr bo browsedir casemap cfu cino cmp comments concealcursor cpp cscopetag cst cursorline dex dip eb emoji errorbells exrc fdm ff filetype fmr foldlevelstart formatlistpat gd gp guifontwide helplang hk ic imak imsearch incsearch insertmode isp km lazyredraw list ls makeef maxmapdepth mfd mmd modified mouses mzquantum nuw osfiletype patchmode ph preserveindent printheader pvh pyx regexpengine rightleft rtp sbo scrollbind sections sh shellslash shm showmode siso smc spc spl ss statusline suffixesadd sws tabline taglength tbidi termbidi terse tgst titleold top ttimeoutlen ttyscroll tx undolevels vartabstop vfile virtualedit warn wfh wildchar wim winminheight wmh write syn keyword vimOption contained ai anti autochdir backspace balloonevalterm bexpr bo browsedir casemap cfu cino cmp comments concealcursor cpp cscopetag cst cursorline dex dip eb emoji errorbells exrc fdm ff filetype fmr foldlevelstart formatlistpat gd gp guifontwide helplang hk ic imak imsearch incsearch insertmode isp km lazyredraw list ls makeef maxmapdepth mfd mmd modified mouses mzquantum nuw osfiletype patchmode ph preserveindent printheader pvh pyx readonly revins rop runtimepath scr sect sh shellslash shm showmode siso smc spc spl ss statusline suffixesadd sws tabline taglength tbidi termbidi terse tgst titleold top ttimeoutlen ttyscroll tx undolevels vartabstop vfile virtualedit warn wfh wildchar wim winminheight wmh write
syn keyword vimOption contained akm antialias autoindent backup balloonexpr bg bomb bs cb ch cinoptions cms commentstring conceallevel cpt cscopetagorder csto cursorlineopt dg dir ed enc errorfile fcl fdn ffs fillchars fo foldmarker formatoptions gdefault grepformat guiheadroom hf hkmap icon imc imsf inde is isprint kmp lbr listchars lsp makeencoding maxmem mh mmp more mouseshape mzschemedll odev pa path pheader previewheight printmbcharset pvp pyxversion relativenumber rightleftcmd ru sbr scrollfocus secure shcf shelltemp shortmess showtabline sj smd spell splitbelow ssl stl sw sxe tabpagemax tagrelative tbis termencoding textauto thesaurus titlestring tpm ttm ttytype uc undoreload vb vi visualbell wb wfw wildcharm winaltkeys winminwidth wmnu writeany syn keyword vimOption contained akm antialias autoindent backup balloonexpr bg bomb bs cb ch cinoptions cms commentstring conceallevel cpt cscopetagorder csto cursorlineopt dg dir ed enc errorfile fcl fdn ffs fillchars fo foldmarker formatoptions gdefault grepformat guiheadroom hf hkmap icon imc imsf inde is isprint kmp lbr listchars lsp makeencoding maxmem mh mmp more mouseshape mzschemedll odev pa path pheader previewheight printmbcharset pvp pyxversion redrawtime ri rs sb scroll sections shcf shelltemp shortmess showtabline sj smd spell splitbelow ssl stl sw sxe tabpagemax tagrelative tbis termencoding textauto thesaurus titlestring tpm ttm ttytype uc undoreload vb vi visualbell wb wfw wildcharm winaltkeys winminwidth wmnu writeany
syn keyword vimOption contained al ar autoread backupcopy bdir bh breakat bsdir cc charconvert cinw co compatible confirm crb cscopeverbose csverb cwh dict directory edcompatible encoding errorformat fcs fdo fic fixendofline foldclose foldmethod formatprg gfm grepprg guioptions hh hkmapp iconstring imcmdline imst indentexpr isf joinspaces kp lcs lm luadll makeprg maxmempattern mis mmt mouse mouset mzschemegcdll oft packpath pdev pi previewpopup printmbfont pvw qe remap rl rubydll sc scrolljump sel shell shelltype shortname shq slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tags tbs termguicolors textmode tildeop tl tr tty tw udf updatecount vbs viewdir vop wc wh wildignore wincolor winptydll wmw writebackup syn keyword vimOption contained al ar autoread backupcopy bdir bh breakat bsdir cc charconvert cinw co compatible confirm crb cscopeverbose csverb cwh dict directory edcompatible encoding errorformat fcs fdo fic fixendofline foldclose foldmethod formatprg gfm grepprg guioptions hh hkmapp iconstring imcmdline imst indentexpr isf joinspaces kp lcs lm luadll makeprg maxmempattern mis mmt mouse mouset mzschemegcdll oft packpath pdev pi previewpopup printmbfont pvw qe regexpengine rightleft rtp sbo scrollbind secure shell shelltype shortname shq slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tags tbs termguicolors textmode tildeop tl tr tty tw udf updatecount vbs viewdir vop wc wh wildignore wincolor winptydll wmw writebackup
syn keyword vimOption contained aleph arab autowrite backupdir bdlay bin breakindent bsk ccv ci cinwords cocu complete copyindent cryptmethod csl cuc debug dictionary display ef endofline esckeys fdc fdt fileencoding fixeol foldcolumn foldminlines fp gfn gtl guipty hi hkp ignorecase imd imstatusfunc indentkeys isfname js langmap linebreak lmap lw mat maxmemtot mkspellmem mod mousef mousetime nf ofu para penc pm previewwindow printoptions pw quoteescape renderoptions rlc ruf scb scrolloff selection shellcmdflag shellxescape showbreak si sm so spellfile spr st sts swapsync syn tag tagstack tc termwinkey textwidth timeout tm ts ttybuiltin twk udir updatetime vdir viewoptions vsts wcm whichwrap wildignorecase window winwidth wop writedelay syn keyword vimOption contained aleph arab autowrite backupdir bdlay bin breakindent bsk ccv ci cinwords cocu complete copyindent cryptmethod csl cuc debug dictionary display ef endofline esckeys fdc fdt fileencoding fixeol foldcolumn foldminlines fp gfn gtl guipty hi hkp ignorecase imd imstatusfunc indentkeys isfname js langmap linebreak lmap lw mat maxmemtot mkspellmem mod mousef mousetime nf ofu para penc pm previewwindow printoptions pw qftf relativenumber rightleftcmd ru sbr scrollfocus sel shellcmdflag shellxescape showbreak si sm so spellfile spr st sts swapsync syn tag tagstack tc termwinkey textwidth timeout tm ts ttybuiltin twk udir updatetime vdir viewoptions vsts wcm whichwrap wildignorecase window winwidth wop writedelay
syn keyword vimOption contained allowrevins arabic autowriteall backupext belloff binary breakindentopt bt cd cin clipboard cole completefunc cot cscopepathcomp cspc cul deco diff dy efm eol et fde fen fileencodings fk foldenable foldnestmax fs gfs gtt guitablabel hid hl im imdisable imstyle indk isi key langmenu lines lnr lz matchpairs mco ml modeline mousefocus mp nrformats omnifunc paragraphs perldll pmbcs printdevice prompt pythondll rdt report rnu ruler scf scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tal tcldll termwinscroll tf timeoutlen to tsl ttyfast tws ul ur ve vif vts wcr wi wildmenu winfixheight wiv wrap ws syn keyword vimOption contained allowrevins arabic autowriteall backupext belloff binary breakindentopt bt cd cin clipboard cole completefunc cot cscopepathcomp cspc cul deco diff dy efm eol et fde fen fileencodings fk foldenable foldnestmax fs gfs gtt guitablabel hid hl im imdisable imstyle indk isi key langmenu lines lnr lz matchpairs mco ml modeline mousefocus mp nrformats omnifunc paragraphs perldll pmbcs printdevice prompt pythondll quickfixtextfunc remap rl rubydll sc scrolljump selection shellpipe shellxquote showcmd sidescroll smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tal tcldll termwinscroll tf timeoutlen to tsl ttyfast tws ul ur ve vif vts wcr wi wildmenu winfixheight wiv wrap ws
syn keyword vimOption contained altkeymap arabicshape aw backupskip beval bk bri bufhidden cdpath cindent cm colorcolumn completeopt cp cscopeprg csprg culopt def diffexpr ea ei ep eventignore fdi fenc fileformat fkmap foldexpr foldopen fsync gfw guicursor guitabtooltip hidden hlg imactivatefunc imi inc inex isident keymap langnoremap linespace loadplugins ma matchtime mef mle modelineexpr mousehide mps nu opendevice paste pex pmbfn printencoding pt pythonhome re restorescreen ro rulerformat scl scs sessionoptions shellquote shiftround showfulltag sidescrolloff smartindent sol spellsuggest sr stal sua swf syntax tagcase tb tenc termwinsize tfu title toolbar tsr ttym twsl undodir ut verbose viminfo wa wd wic wildmode winfixwidth wiw wrapmargin ww syn keyword vimOption contained altkeymap arabicshape aw backupskip beval bk bri bufhidden cdpath cindent cm colorcolumn completeopt cp cscopeprg csprg culopt def diffexpr ea ei ep eventignore fdi fenc fileformat fkmap foldexpr foldopen fsync gfw guicursor guitabtooltip hidden hlg imactivatefunc imi inc inex isident keymap langnoremap linespace loadplugins ma matchtime mef mle modelineexpr mousehide mps nu opendevice paste pex pmbfn printencoding pt pythonhome quoteescape renderoptions rlc ruf scb scrolloff selectmode shellquote shiftround showfulltag sidescrolloff smartindent sol spellsuggest sr stal sua swf syntax tagcase tb tenc termwinsize tfu title toolbar tsr ttym twsl undodir ut verbose viminfo wa wd wic wildmode winfixwidth wiw wrapmargin ww
syn keyword vimOption contained ambiwidth ari awa balloondelay bevalterm bkc briopt buflisted cedit cink cmdheight columns completepopup cpo cscopequickfix csqf cursorbind define diffopt ead ek equalalways ex fdl fencs fileformats flp foldignore foldtext ft ghr guifont helpfile highlight hls imactivatekey iminsert include inf isk keymodel langremap lisp lpl macatsui maxcombine menc mls modelines mousem msm number operatorfunc pastetoggle pexpr popt printexpr pumheight pythonthreedll readonly revins rop runtimepath scr syn keyword vimOption contained ambiwidth ari awa balloondelay bevalterm bkc briopt buflisted cedit cink cmdheight columns completepopup cpo cscopequickfix csqf cursorbind define diffopt ead ek equalalways ex fdl fencs fileformats flp foldignore foldtext ft ghr guifont helpfile highlight hls imactivatekey iminsert include inf isk keymodel langremap lisp lpl macatsui maxcombine menc mls modelines mousem msm number operatorfunc pastetoggle pexpr popt printexpr pumheight pythonthreedll rdt report rnu ruler scf scrollopt sessionoptions
" vimOptions: These are the turn-off setting variants {{{2 " vimOptions: These are the turn-off setting variants {{{2
syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobevalterm nobk nobreakindent nocf nocindent nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noemo noeol noesckeys noexpandtab nofic nofixeol nofoldenable nogd nohid nohkmap nohls noicon noimc noimdisable noinfercase nojoinspaces nolangremap nolinebreak nolnr nolrm nomacatsui noml nomod nomodelineexpr nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscrollbind noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx noundofile novisualbell nowarn noweirdinvert nowfw nowildignorecase nowinfixheight nowiv nowrap nowrite nowritebackup syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobevalterm nobk nobreakindent nocf nocindent nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noemo noeol noesckeys noexpandtab nofic nofixeol nofoldenable nogd nohid nohkmap nohls noicon noimc noimdisable noinfercase nojoinspaces nolangremap nolinebreak nolnr nolrm nomacatsui noml nomod nomodelineexpr nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscrollbind noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx noundofile novisualbell nowarn noweirdinvert nowfw nowildignorecase nowinfixheight nowiv nowrap nowrite nowritebackup
@@ -50,8 +49,8 @@ syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautoc
syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbeval invbinary invbomb invbuflisted invcin invconfirm invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invendofline inverrorbells invex invfen invfixendofline invfkmap invfsync invguipty invhk invhkp invic invim invimd invinf invis invlangnoremap invlbr invlist invlpl invma invmh syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbeval invbinary invbomb invbuflisted invcin invconfirm invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invendofline inverrorbells invex invfen invfixendofline invfkmap invfsync invguipty invhk invhkp invic invim invimd invinf invis invlangnoremap invlbr invlist invlpl invma invmh
" termcap codes (which can also be set) {{{2 " termcap codes (which can also be set) {{{2
syn keyword vimOption contained t_8b t_AB t_al t_bc t_BE t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_EI t_F2 t_F4 t_F6 t_F8 t_fs t_IE t_k1 t_k2 t_K3 t_K4 t_K5 t_K6 t_K7 t_K8 t_K9 t_kb t_KB t_kd t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_PE t_PS t_RB t_RC t_RF t_Ri t_RI t_RS t_RT t_RV t_Sb t_SC t_se t_Sf t_SH t_Si t_SI t_so t_sr t_SR t_ST t_te t_Te t_TE t_ti t_TI t_ts t_Ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_VS t_WP t_WS t_xn t_xs t_ZH t_ZR syn keyword vimOption contained t_8b t_8u t_AF t_AL t_bc t_BE t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_EI t_F2 t_F4 t_F6 t_F8 t_fs t_IE t_k1 t_k2 t_K3 t_K4 t_K5 t_K6 t_K7 t_K8 t_K9 t_kb t_KB t_kd t_KD t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_PE t_PS t_RB t_RC t_RF t_Ri t_RI t_RS t_RT t_RV t_Sb t_SC t_se t_Sf t_SH t_Si t_SI t_so t_sr t_SR t_ST t_te t_Te t_TE t_ti t_TI t_ts t_Ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_VS t_WP t_WS t_xn t_xs t_ZH t_ZR
syn keyword vimOption contained t_8f t_AF t_AL t_BD t_cd t_Ce t_cm t_cs t_CS t_da t_dl t_EC t_F1 t_F3 t_F5 t_F7 t_F9 t_GP t_IS t_K1 t_k3 t_k4 t_k5 t_k6 t_k7 t_k8 t_k9 t_KA t_kB t_KC t_kD syn keyword vimOption contained t_8f t_AB t_al t_AU t_BD t_cd t_Ce t_cm t_cs t_CS t_da t_dl t_EC t_F1 t_F3 t_F5 t_F7 t_F9 t_GP t_IS t_K1 t_k3 t_k4 t_k5 t_k6 t_k7 t_k8 t_k9 t_KA t_kB t_KC t_kD t_ke
syn match vimOption contained "t_%1" syn match vimOption contained "t_%1"
syn match vimOption contained "t_#2" syn match vimOption contained "t_#2"
syn match vimOption contained "t_#4" syn match vimOption contained "t_#4"
@@ -79,11 +78,11 @@ syn match vimHLGroup contained "Conceal"
syn case match syn case match
" Function Names {{{2 " Function Names {{{2
syn keyword vimFuncName contained abs appendbufline asin assert_fails assert_notmatch balloon_gettext bufadd bufname byteidx char2nr ch_evalexpr ch_log ch_readraw cindent complete_check cosh deepcopy diff_hlID eval exists feedkeys findfile fnamemodify foldtextresult get getchar getcmdtype getenv getftype getmatches getreg gettagstack getwinvar has_key histget iconv inputlist interrupt isnan job_start js_encode libcall list2str log mapcheck matchdelete max nextnonblank popup_atcursor popup_dialog popup_getoptions popup_notification prevnonblank prop_add prop_type_add pum_getpos rand reg_recording remote_foreground remove round screencol searchdecl serverlist setenv setpos settagstack sign_define sign_placelist sin sound_playevent split str2list strftime strpart submatch synID systemlist taglist term_dumpload term_getcursor term_getstatus term_sendkeys term_setsize test_autochdir test_getvalue test_null_dict test_null_string test_scrollbar test_unknown timer_start toupper type values winbufnr win_findbuf winheight winline winsaveview winwidth syn keyword vimFuncName contained abs appendbufline asin assert_fails assert_notmatch balloon_gettext bufadd bufname byteidx char2nr ch_evalexpr ch_log ch_readraw cindent complete_check cosh deepcopy diff_hlID eval exists feedkeys findfile fnamemodify foldtextresult get getchar getcmdtype getenv getftype getmarklist getqflist gettabwinvar getwinposy has histdel hostname inputdialog insert islocked job_setoptions js_decode len lispindent localtime maparg matchaddpos matchstr mkdir or popup_clear popup_filter_yesno popup_hide popup_notification prevnonblank prop_add prop_type_add pum_getpos rand reduce reltimestr remote_send resolve screenchar screenstring searchpairpos setbufvar setline setreg sha256 sign_getplaced sign_unplace sort sound_stop srand strcharpart stridx strridx swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setapi term_wait test_garbagecollect_soon test_null_dict test_null_string test_setmouse timer_info tolower trunc uniq wildmenumode win_execute win_gotoid winlayout winrestview winwidth
syn keyword vimFuncName contained acos argc assert_beeps assert_false assert_report balloon_show bufexists bufnr byteidxcomp ch_canread ch_evalraw ch_logfile ch_sendexpr clearmatches complete_info count delete echoraw eventhandler exp filereadable float2nr foldclosed foreground getbufinfo getcharmod getcmdwintype getfontname getimstatus getmousepos getregtype getwininfo glob haslocaldir histnr indent inputrestore invert items job_status json_decode libcallnr listener_add log10 match matchend min nr2char popup_beval popup_filter_menu popup_getpos popup_setoptions printf prop_clear prop_type_change pumvisible range reltime remote_peek rename rubyeval screenpos searchpair setbufline setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playfile sqrt str2nr strgetchar strptime substitute synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_setansicolors term_start test_feedinput test_ignore_error test_null_job test_option_not_set test_setmouse test_void timer_stop tr undofile virtcol wincol win_getid win_id2tabwin winnr win_screenpos wordcount syn keyword vimFuncName contained acos argc assert_beeps assert_false assert_report balloon_show bufexists bufnr byteidxcomp ch_canread ch_evalraw ch_logfile ch_sendexpr clearmatches complete_info count delete echoraw eventhandler exp filereadable float2nr foldclosed foreground getbufinfo getcharmod getcmdwintype getfontname getimstatus getmatches getreg gettagstack getwinvar has_key histget iconv inputlist interrupt isnan job_start js_encode libcall list2str log mapcheck matcharg matchstrpos mode pathshorten popup_close popup_findinfo popup_list popup_setoptions printf prop_clear prop_type_change pumvisible range reg_executing remote_expr remote_startserver reverse screenchars search searchpos setcharsearch setloclist settabvar shellescape sign_jump sign_unplacelist sound_clear spellbadword state strchars string strtrans swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled term_list term_setkill test_alloc_fail test_getvalue test_null_function test_option_not_set test_settime timer_pause toupper type values winbufnr win_findbuf winheight winline winsaveview wordcount
syn keyword vimFuncName contained add argidx assert_equal assert_inrange assert_true balloon_split buflisted bufwinid call ch_close ch_getbufnr ch_open ch_sendraw col confirm cscope_connection deletebufline empty executable expand filewritable floor foldclosedend funcref getbufline getcharsearch getcompletion getfperm getjumplist getpid gettabinfo getwinpos glob2regpat hasmapto hlexists index inputsave isdirectory job_getchannel job_stop json_encode line listener_flush luaeval matchadd matchlist mkdir or popup_clear popup_filter_yesno popup_hide popup_settext prompt_setcallback prop_find prop_type_delete py3eval readdir reltimefloat remote_read repeat screenattr screenrow searchpairpos setbufvar setline setreg sha256 sign_getplaced sign_unplace sort sound_stop srand strcharpart stridx strridx swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setapi term_wait test_garbagecollect_now test_null_blob test_null_list test_override test_settime timer_info timer_stopall trim undotree visualmode windowsversion win_gettype win_id2win winrestcmd win_splitmove writefile syn keyword vimFuncName contained add argidx assert_equal assert_inrange assert_true balloon_split buflisted bufwinid call ch_close ch_getbufnr ch_open ch_sendraw col confirm cscope_connection deletebufline empty executable expand filewritable floor foldclosedend funcref getbufline getcharsearch getcompletion getfperm getjumplist getmousepos getregtype getwininfo glob haslocaldir histnr indent inputrestore invert items job_status json_decode libcallnr listener_add log10 mapset matchdelete max mzeval perleval popup_create popup_findpreview popup_locate popup_settext prompt_setcallback prop_find prop_type_delete py3eval readdir reg_recording remote_foreground remove round screencol searchcount server2client setcmdpos setmatches settabwinvar shiftwidth sign_place simplify soundfold spellsuggest str2float strdisplaywidth strlen strwidth synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_scrape term_setrestore test_autochdir test_ignore_error test_null_job test_override test_srand_seed timer_start tr undofile virtcol wincol win_getid win_id2tabwin winnr win_screenpos writefile
syn keyword vimFuncName contained and arglistid assert_equalfile assert_match atan browse bufload bufwinnr ceil ch_close_in ch_getjob ch_read ch_setoptions complete copy cursor did_filetype environ execute expandcmd filter fmod foldlevel function getbufvar getcmdline getcurpos getfsize getline getpos gettabvar getwinposx globpath histadd hlID input inputsecret isinf job_info join keys line2byte listener_remove map matchaddpos matchstr mode pathshorten popup_close popup_findinfo popup_menu popup_show prompt_setinterrupt prop_list prop_type_get pyeval readfile reltimestr remote_send resolve screenchar screenstring searchpos setcharsearch setloclist settabvar shellescape sign_jump sign_unplacelist sound_clear spellbadword state strchars string strtrans swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled term_list term_setkill test_alloc_fail test_garbagecollect_soon test_null_channel test_null_partial test_refcount test_srand_seed timer_pause tolower trunc uniq wildmenumode win_execute win_gotoid winlayout winrestview win_type xor syn keyword vimFuncName contained and arglistid assert_equalfile assert_match atan browse bufload bufwinnr ceil ch_close_in ch_getjob ch_read ch_setoptions complete copy cursor did_filetype environ execute expandcmd filter fmod foldlevel function getbufvar getcmdline getcurpos getfsize getline getpid gettabinfo getwinpos glob2regpat hasmapto hlexists index inputsave isdirectory job_getchannel job_stop json_encode line listener_flush luaeval match matchend menu_info nextnonblank popup_atcursor popup_dialog popup_getoptions popup_menu popup_show prompt_setinterrupt prop_list prop_type_get pyeval readdirex reltime remote_peek rename rubyeval screenpos searchdecl serverlist setenv setpos settagstack sign_define sign_placelist sin sound_playevent split str2list strftime strpart submatch synID systemlist taglist term_dumpload term_getcursor term_getstatus term_sendkeys term_setsize test_feedinput test_null_blob test_null_list test_refcount test_unknown timer_stop trim undotree visualmode windowsversion win_gettype win_id2win winrestcmd win_splitmove xor
syn keyword vimFuncName contained append argv assert_exception assert_notequal atan2 browsedir bufloaded byte2line changenr chdir ch_info ch_readblob ch_status complete_add cos debugbreak diff_filler escape exepath extend finddir fnameescape foldtext garbagecollect getchangelist getcmdpos getcwd getftime getloclist getqflist gettabwinvar getwinposy has histdel hostname inputdialog insert islocked job_setoptions js_decode len lispindent localtime maparg matcharg matchstrpos mzeval perleval popup_create popup_findpreview popup_move pow prompt_setprompt prop_remove prop_type_list pyxeval reg_executing remote_expr remote_startserver reverse screenchars search server2client setcmdpos setmatches settabwinvar shiftwidth sign_place simplify soundfold spellsuggest str2float strdisplaywidth strlen strwidth synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_scrape term_setrestore syn keyword vimFuncName contained append argv assert_exception assert_notequal atan2 browsedir bufloaded byte2line changenr chdir ch_info ch_readblob ch_status complete_add cos debugbreak diff_filler escape exepath extend finddir fnameescape foldtext garbagecollect getchangelist getcmdpos getcwd getftime getloclist getpos gettabvar getwinposx globpath histadd hlID input inputsecret isinf job_info join keys line2byte listener_remove map matchadd matchlist min nr2char popup_beval popup_filter_menu popup_getpos popup_move pow prompt_setprompt prop_remove prop_type_list pyxeval readfile reltimefloat remote_read repeat screenattr screenrow searchpair setbufline setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playfile sqrt str2nr strgetchar strptime substitute synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_setansicolors term_start test_garbagecollect_now test_null_channel test_null_partial test_scrollbar test_void timer_stopall
"--- syntax here and above generated by mkvimvim --- "--- syntax here and above generated by mkvimvim ---
" Special Vim Highlighting (not automatic) {{{1 " Special Vim Highlighting (not automatic) {{{1
@@ -170,10 +169,10 @@ endif
" Numbers {{{2 " Numbers {{{2
" ======= " =======
syn match vimNumber "\<\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment syn match vimNumber "\<\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment,vim9Comment
syn match vimNumber "-\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment syn match vimNumber "-\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment,vim9Comment
syn match vimNumber "\<0[xX]\x\+" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment syn match vimNumber "\<0[xX]\x\+" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment,vim9Comment
syn match vimNumber "\%(^\|\A\)\zs#\x\{6}" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment syn match vimNumber "\%(^\|\A\)\zs#\x\{6}" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment,vim9Comment
" All vimCommands are contained by vimIsCommand. {{{2 " All vimCommands are contained by vimIsCommand. {{{2
syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimEcho,vimIsCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimEcho,vimIsCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd
@@ -210,7 +209,7 @@ syn keyword vimFTOption contained detect indent off on plugin
" Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2 " Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2
" ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking. " ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking.
syn cluster vimAugroupList contains=vimAugroup,vimIsCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimNotFunc,vimMap,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue,vimSetEqual,vimOption syn cluster vimAugroupList contains=vimAugroup,vimIsCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimNotFunc,vimMap,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vim9Comment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vim9Comment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue,vimSetEqual,vimOption
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a' if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a'
syn region vimAugroup fold matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList syn region vimAugroup fold matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList
else else
@@ -237,7 +236,7 @@ endif
" Functions : Tag is provided for those who wish to highlight tagged functions {{{2 " Functions : Tag is provided for those who wish to highlight tagged functions {{{2
" ========= " =========
syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID
syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLetHereDoc,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vim9Comment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLetHereDoc,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand
syn match vimFunction "\<\(fu\%[nction]\|def\)!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody syn match vimFunction "\<\(fu\%[nction]\|def\)!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f' if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
@@ -296,9 +295,9 @@ syn match vimComment +\<endif\s\+".*$+lc=5 contains=@vimCommentGroup,vimCommentS
syn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString syn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString
syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"' syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"'
" Vim9 comments - TODO: might be highlighted while they don't work " Vim9 comments - TODO: might be highlighted while they don't work
syn match vimComment excludenl +\s#[^{].*$+lc=1 contains=@vimCommentGroup,vimCommentString syn match vim9Comment excludenl +\s#[^{].*$+lc=1 contains=@vimCommentGroup,vimCommentString
syn match vimComment +\<endif\s\+#[^{].*$+lc=5 contains=@vimCommentGroup,vimCommentString syn match vim9Comment +\<endif\s\+#[^{].*$+lc=5 contains=@vimCommentGroup,vimCommentString
syn match vimComment +\<else\s\+#[^{].*$+lc=4 contains=@vimCommentGroup,vimCommentString syn match vim9Comment +\<else\s\+#[^{].*$+lc=4 contains=@vimCommentGroup,vimCommentString
" Vim9 comment inside expression " Vim9 comment inside expression
syn match vim9Comment +\s\zs#[^{].*$+ms=s+1 contains=@vimCommentGroup,vimCommentString syn match vim9Comment +\s\zs#[^{].*$+ms=s+1 contains=@vimCommentGroup,vimCommentString
@@ -321,7 +320,7 @@ syn region vimString oneline keepend start=+[^a-zA-Z>!\\@]"+lc=1 skip=+\\\\\|\\"
syn region vimString oneline keepend start=+[^a-zA-Z>!\\@]'+lc=1 end=+'+ syn region vimString oneline keepend start=+[^a-zA-Z>!\\@]'+lc=1 end=+'+
syn region vimString oneline start=+=!+lc=1 skip=+\\\\\|\\!+ end=+!+ contains=@vimStringGroup syn region vimString oneline start=+=!+lc=1 skip=+\\\\\|\\!+ end=+!+ contains=@vimStringGroup
syn region vimString oneline start="=+"lc=1 skip="\\\\\|\\+" end="+" contains=@vimStringGroup syn region vimString oneline start="=+"lc=1 skip="\\\\\|\\+" end="+" contains=@vimStringGroup
"syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup "syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup " see tst45.vim
syn match vimString contained +"[^"]*\\$+ skipnl nextgroup=vimStringCont syn match vimString contained +"[^"]*\\$+ skipnl nextgroup=vimStringCont
syn match vimStringCont contained +\(\\\\\|.\)\{-}[^\\]"+ syn match vimStringCont contained +\(\\\\\|.\)\{-}[^\\]"+
@@ -345,7 +344,7 @@ syn match vimCollClass contained transparent "\%#=1\[:\(alnum\|alpha\|blank\|
syn match vimSubstSubstr contained "\\z\=\d" syn match vimSubstSubstr contained "\\z\=\d"
syn match vimSubstTwoBS contained "\\\\" syn match vimSubstTwoBS contained "\\\\"
syn match vimSubstFlagErr contained "[^< \t\r|]\+" contains=vimSubstFlags syn match vimSubstFlagErr contained "[^< \t\r|]\+" contains=vimSubstFlags
syn match vimSubstFlags contained "[&cegiIpr]\+" syn match vimSubstFlags contained "[&cegiIlnpr#]\+"
" 'String': {{{2 " 'String': {{{2
syn match vimString "[^(,]'[^']\{-}\zs'" syn match vimString "[^(,]'[^']\{-}\zs'"

View File

@@ -15,7 +15,6 @@ See INSTALLpc.txt for PC (Windows XP/Vista/7/8/10)
See INSTALLvms.txt for VMS See INSTALLvms.txt for VMS
See INSTALLx.txt for cross-compiling on Unix See INSTALLx.txt for cross-compiling on Unix
See ../READMEdir/README_390.txt for z/OS and OS/390 Unix See ../READMEdir/README_390.txt for z/OS and OS/390 Unix
See ../runtime/doc/os_beos.txt for BeBox
See ../runtime/doc/os_haiku.txt for Haiku See ../runtime/doc/os_haiku.txt for Haiku
1. Generic 1. Generic

View File

@@ -625,7 +625,7 @@ endif
ifeq ($(CHANNEL),yes) ifeq ($(CHANNEL),yes)
DEFINES += -DFEAT_JOB_CHANNEL -DFEAT_IPV6 DEFINES += -DFEAT_JOB_CHANNEL -DFEAT_IPV6
ifeq ($(shell expr "$(WINVER)" \>= 0x600),1) ifeq ($(shell expr "$$(($(WINVER)))" \>= "$$((0x600))"),1)
DEFINES += -DHAVE_INET_NTOP DEFINES += -DHAVE_INET_NTOP
endif endif
endif endif
@@ -741,6 +741,7 @@ OBJ = \
$(OUTDIR)/findfile.o \ $(OUTDIR)/findfile.o \
$(OUTDIR)/fold.o \ $(OUTDIR)/fold.o \
$(OUTDIR)/getchar.o \ $(OUTDIR)/getchar.o \
$(OUTDIR)/gui_xim.o \
$(OUTDIR)/hardcopy.o \ $(OUTDIR)/hardcopy.o \
$(OUTDIR)/hashtab.o \ $(OUTDIR)/hashtab.o \
$(OUTDIR)/highlight.o \ $(OUTDIR)/highlight.o \
@@ -791,6 +792,7 @@ OBJ = \
$(OUTDIR)/textobject.o \ $(OUTDIR)/textobject.o \
$(OUTDIR)/textprop.o \ $(OUTDIR)/textprop.o \
$(OUTDIR)/time.o \ $(OUTDIR)/time.o \
$(OUTDIR)/typval.o \
$(OUTDIR)/ui.o \ $(OUTDIR)/ui.o \
$(OUTDIR)/undo.o \ $(OUTDIR)/undo.o \
$(OUTDIR)/usercmd.o \ $(OUTDIR)/usercmd.o \

View File

@@ -61,6 +61,7 @@ SRC = arabic.c \
findfile.c \ findfile.c \
fold.c \ fold.c \
getchar.c \ getchar.c \
gui_xim.c \
hardcopy.c \ hardcopy.c \
hashtab.c \ hashtab.c \
highlight.c \ highlight.c \
@@ -107,6 +108,7 @@ SRC = arabic.c \
textobject.c \ textobject.c \
textprop.c \ textprop.c \
time.c \ time.c \
typval.c \
ui.c \ ui.c \
undo.c \ undo.c \
usercmd.c \ usercmd.c \

View File

@@ -23,6 +23,8 @@
# #
# Feature Set: FEATURES=[TINY, SMALL, NORMAL, BIG, HUGE] (default is HUGE) # Feature Set: FEATURES=[TINY, SMALL, NORMAL, BIG, HUGE] (default is HUGE)
# #
# Name to add to the version: MODIFIED_BY=[name of modifier]
#
# GUI interface: GUI=yes (default is no) # GUI interface: GUI=yes (default is no)
# #
# GUI with DirectWrite (DirectX): DIRECTX=yes # GUI with DirectWrite (DirectX): DIRECTX=yes
@@ -761,6 +763,7 @@ OBJ = \
$(OUTDIR)\findfile.obj \ $(OUTDIR)\findfile.obj \
$(OUTDIR)\fold.obj \ $(OUTDIR)\fold.obj \
$(OUTDIR)\getchar.obj \ $(OUTDIR)\getchar.obj \
$(OUTDIR)\gui_xim.obj \
$(OUTDIR)\hardcopy.obj \ $(OUTDIR)\hardcopy.obj \
$(OUTDIR)\hashtab.obj \ $(OUTDIR)\hashtab.obj \
$(OUTDIR)\highlight.obj \ $(OUTDIR)\highlight.obj \
@@ -811,6 +814,7 @@ OBJ = \
$(OUTDIR)\textobject.obj \ $(OUTDIR)\textobject.obj \
$(OUTDIR)\textprop.obj \ $(OUTDIR)\textprop.obj \
$(OUTDIR)\time.obj \ $(OUTDIR)\time.obj \
$(OUTDIR)\typval.obj \
$(OUTDIR)\ui.obj \ $(OUTDIR)\ui.obj \
$(OUTDIR)\undo.obj \ $(OUTDIR)\undo.obj \
$(OUTDIR)\usercmd.obj \ $(OUTDIR)\usercmd.obj \
@@ -1242,6 +1246,13 @@ CFLAGS = $(CFLAGS) -DMSWINPS
# #
CFLAGS = $(CFLAGS) -DFEAT_$(FEATURES) CFLAGS = $(CFLAGS) -DFEAT_$(FEATURES)
#
# MODIFIED_BY - Name of who modified a release version
#
!if "$(MODIFIED_BY)" != ""
CFLAGS = $(CFLAGS) -DMODIFIED_BY=\"$(MODIFIED_BY)\"
!endif
# #
# Always generate the .pdb file, so that we get debug symbols that can be used # Always generate the .pdb file, so that we get debug symbols that can be used
# on a crash (doesn't add overhead to the executable). # on a crash (doesn't add overhead to the executable).
@@ -1590,6 +1601,8 @@ $(OUTDIR)/fold.obj: $(OUTDIR) fold.c $(INCL)
$(OUTDIR)/getchar.obj: $(OUTDIR) getchar.c $(INCL) $(OUTDIR)/getchar.obj: $(OUTDIR) getchar.c $(INCL)
$(OUTDIR)/gui_xim.obj: $(OUTDIR) gui_xim.c $(INCL)
$(OUTDIR)/hardcopy.obj: $(OUTDIR) hardcopy.c $(INCL) version.h $(OUTDIR)/hardcopy.obj: $(OUTDIR) hardcopy.c $(INCL) version.h
$(OUTDIR)/hashtab.obj: $(OUTDIR) hashtab.c $(INCL) $(OUTDIR)/hashtab.obj: $(OUTDIR) hashtab.c $(INCL)
@@ -1755,6 +1768,8 @@ $(OUTDIR)/textprop.obj: $(OUTDIR) textprop.c $(INCL)
$(OUTDIR)/time.obj: $(OUTDIR) time.c $(INCL) $(OUTDIR)/time.obj: $(OUTDIR) time.c $(INCL)
$(OUTDIR)/typval.obj: $(OUTDIR) typval.c $(INCL)
$(OUTDIR)/ui.obj: $(OUTDIR) ui.c $(INCL) $(OUTDIR)/ui.obj: $(OUTDIR) ui.c $(INCL)
$(OUTDIR)/undo.obj: $(OUTDIR) undo.c $(INCL) $(OUTDIR)/undo.obj: $(OUTDIR) undo.c $(INCL)
@@ -1846,14 +1861,18 @@ $(OUTDIR)/vterm_vterm.obj: $(OUTDIR) libvterm/src/vterm.c $(TERM_DEPS)
$(CCCTERM) /Fo$@ libvterm/src/vterm.c $(CCCTERM) /Fo$@ libvterm/src/vterm.c
# $CFLAGS may contain backslashes and double quotes, escape them both. # $CFLAGS may contain backslashes, quotes and chevrons, escape them all.
E0_CFLAGS = $(CFLAGS:\=\\) E0_CFLAGS = $(CFLAGS:\=\\)
E_CFLAGS = $(E0_CFLAGS:"=\") E00_CFLAGS = $(E0_CFLAGS:"=\")
# ") stop the string # ") stop the string
# $LINKARGS2 may contain backslashes and double quotes, escape them both. E000_CFLAGS = $(E00_CFLAGS:<=^^<)
E_CFLAGS = $(E000_CFLAGS:>=^^>)
# $LINKARGS2 may contain backslashes, quotes and chevrons, escape them all.
E0_LINKARGS2 = $(LINKARGS2:\=\\) E0_LINKARGS2 = $(LINKARGS2:\=\\)
E_LINKARGS2 = $(E0_LINKARGS2:"=\") E00_LINKARGS2 = $(E0_LINKARGS2:"=\")
# ") stop the string # ") stop the string
E000_LINKARGS2 = $(E00_LINKARGS2:<=^^<)
E_LINKARGS2 = $(E000_LINKARGS2:>=^^>)
$(PATHDEF_SRC): Make_mvc.mak $(PATHDEF_SRC): Make_mvc.mak
@echo creating $(PATHDEF_SRC) @echo creating $(PATHDEF_SRC)
@@ -1905,6 +1924,7 @@ proto.h: \
proto/filepath.pro \ proto/filepath.pro \
proto/findfile.pro \ proto/findfile.pro \
proto/getchar.pro \ proto/getchar.pro \
proto/gui_xim.pro \
proto/hardcopy.pro \ proto/hardcopy.pro \
proto/hashtab.pro \ proto/hashtab.pro \
proto/highlight.pro \ proto/highlight.pro \
@@ -1954,6 +1974,7 @@ proto.h: \
proto/textobject.pro \ proto/textobject.pro \
proto/textprop.pro \ proto/textprop.pro \
proto/time.pro \ proto/time.pro \
proto/typval.pro \
proto/ui.pro \ proto/ui.pro \
proto/undo.pro \ proto/undo.pro \
proto/usercmd.pro \ proto/usercmd.pro \

View File

@@ -334,6 +334,7 @@ SRC = \
findfile.c \ findfile.c \
fold.c \ fold.c \
getchar.c \ getchar.c \
gui_xim.c \
hardcopy.c \ hardcopy.c \
hashtab.c \ hashtab.c \
highlight.c \ highlight.c \
@@ -386,6 +387,7 @@ SRC = \
textobject.c \ textobject.c \
textprop.c \ textprop.c \
time.c \ time.c \
typval.c \
ui.c \ ui.c \
undo.c \ undo.c \
usercmd.c \ usercmd.c \
@@ -444,6 +446,7 @@ OBJ = \
findfile.obj \ findfile.obj \
fold.obj \ fold.obj \
getchar.obj \ getchar.obj \
gui_xim.obj \
hardcopy.obj \ hardcopy.obj \
hashtab.obj \ hashtab.obj \
highlight.obj \ highlight.obj \
@@ -497,6 +500,7 @@ OBJ = \
textobject.obj \ textobject.obj \
textprop.obj \ textprop.obj \
time.obj \ time.obj \
typval.obj \
ui.obj \ ui.obj \
undo.obj \ undo.obj \
usercmd.obj \ usercmd.obj \
@@ -816,6 +820,10 @@ getchar.obj : getchar.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \ ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
globals.h globals.h
gui_xim.obj : gui_xim.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
globals.h
hardcopy.obj : hardcopy.c vim.h [.auto]config.h feature.h os_unix.h \ hardcopy.obj : hardcopy.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \ ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
@@ -1005,6 +1013,9 @@ textprop.obj : textprop.c vim.h [.auto]config.h feature.h os_unix.h \
time.obj : time.c vim.h [.auto]config.h feature.h os_unix.h \ time.obj : time.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h
typval.obj : typval.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h
ui.obj : ui.c vim.h [.auto]config.h feature.h os_unix.h \ ui.obj : ui.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h

View File

@@ -1580,6 +1580,9 @@ DEST_MAN_PL_I = $(DEST_MAN_TOP)/pl.ISO8859-2$(MAN1DIR)
DEST_MAN_PL_U = $(DEST_MAN_TOP)/pl.UTF-8$(MAN1DIR) DEST_MAN_PL_U = $(DEST_MAN_TOP)/pl.UTF-8$(MAN1DIR)
DEST_MAN_RU = $(DEST_MAN_TOP)/ru.KOI8-R$(MAN1DIR) DEST_MAN_RU = $(DEST_MAN_TOP)/ru.KOI8-R$(MAN1DIR)
DEST_MAN_RU_U = $(DEST_MAN_TOP)/ru.UTF-8$(MAN1DIR) DEST_MAN_RU_U = $(DEST_MAN_TOP)/ru.UTF-8$(MAN1DIR)
DEST_MAN_TR = $(DEST_MAN_TOP)/tr$(MAN1DIR)
DEST_MAN_TR_I = $(DEST_MAN_TOP)/tr.ISO8859-9$(MAN1DIR)
DEST_MAN_TR_U = $(DEST_MAN_TOP)/tr.UTF-8$(MAN1DIR)
# stuff common to all systems # stuff common to all systems
include Make_all.mak include Make_all.mak
@@ -1633,6 +1636,7 @@ BASIC_SRC = \
findfile.c \ findfile.c \
fold.c \ fold.c \
getchar.c \ getchar.c \
gui_xim.c \
hardcopy.c \ hardcopy.c \
hashtab.c \ hashtab.c \
highlight.c \ highlight.c \
@@ -1686,6 +1690,7 @@ BASIC_SRC = \
textobject.c \ textobject.c \
textprop.c \ textprop.c \
time.c \ time.c \
typval.c \
ui.c \ ui.c \
undo.c \ undo.c \
usercmd.c \ usercmd.c \
@@ -1781,6 +1786,7 @@ OBJ_COMMON = \
objects/findfile.o \ objects/findfile.o \
objects/fold.o \ objects/fold.o \
objects/getchar.o \ objects/getchar.o \
objects/gui_xim.o \
objects/hardcopy.o \ objects/hardcopy.o \
objects/hashtab.o \ objects/hashtab.o \
objects/highlight.o \ objects/highlight.o \
@@ -1830,6 +1836,7 @@ OBJ_COMMON = \
objects/textobject.o \ objects/textobject.o \
objects/textprop.o \ objects/textprop.o \
objects/time.o \ objects/time.o \
objects/typval.o \
objects/ui.o \ objects/ui.o \
objects/undo.o \ objects/undo.o \
objects/usercmd.o \ objects/usercmd.o \
@@ -1945,6 +1952,7 @@ PRO_AUTO = \
findfile.pro \ findfile.pro \
fold.pro \ fold.pro \
getchar.pro \ getchar.pro \
gui_xim.pro \
gui_beval.pro \ gui_beval.pro \
hardcopy.pro \ hardcopy.pro \
hashtab.pro \ hashtab.pro \
@@ -2006,6 +2014,7 @@ PRO_AUTO = \
textobject.pro \ textobject.pro \
textprop.pro \ textprop.pro \
time.pro \ time.pro \
typval.pro \
ui.pro \ ui.pro \
undo.pro \ undo.pro \
usercmd.pro \ usercmd.pro \
@@ -2023,7 +2032,7 @@ PRO_AUTO = \
RSRC_DIR = os_mac_rsrc RSRC_DIR = os_mac_rsrc
PRO_MANUAL = os_amiga.pro os_win32.pro \ PRO_MANUAL = os_amiga.pro os_win32.pro \
os_mswin.pro winclip.pro os_beos.pro os_vms.pro $(PERL_PRO) os_mswin.pro winclip.pro os_vms.pro $(PERL_PRO)
# Default target is making the executable and tools # Default target is making the executable and tools
all: $(VIMTARGET) $(TOOLS) languages $(GUI_BUNDLE) all: $(VIMTARGET) $(TOOLS) languages $(GUI_BUNDLE)
@@ -2121,6 +2130,7 @@ CCC = $(CCC_NF) $(ALL_CFLAGS)
# A shell script is used to try linking without unnecessary libraries. # A shell script is used to try linking without unnecessary libraries.
$(VIMTARGET): auto/config.mk objects $(OBJ) version.c version.h $(VIMTARGET): auto/config.mk objects $(OBJ) version.c version.h
$(CCC) version.c -o objects/version.o $(CCC) version.c -o objects/version.o
@$(BUILD_DATE_MSG)
@LINK="$(PURIFY) $(SHRPENV) $(CClink) $(ALL_LIB_DIRS) $(LDFLAGS) \ @LINK="$(PURIFY) $(SHRPENV) $(CClink) $(ALL_LIB_DIRS) $(LDFLAGS) \
-o $(VIMTARGET) $(OBJ) $(ALL_LIBS)" \ -o $(VIMTARGET) $(OBJ) $(ALL_LIBS)" \
MAKE="$(MAKE)" LINK_AS_NEEDED=$(LINK_AS_NEEDED) \ MAKE="$(MAKE)" LINK_AS_NEEDED=$(LINK_AS_NEEDED) \
@@ -2190,10 +2200,6 @@ winclip.pro: winclip.c
$(CPROTO) -DWIN32 -UHAVE_CONFIG_H $< > proto/$@ $(CPROTO) -DWIN32 -UHAVE_CONFIG_H $< > proto/$@
echo "/* vim: set ft=c : */" >> proto/$@ echo "/* vim: set ft=c : */" >> proto/$@
os_beos.pro: os_beos.c
$(CPROTO) -D__BEOS__ -UHAVE_CONFIG_H $< > proto/$@
echo "/* vim: set ft=c : */" >> proto/$@
os_vms.pro: os_vms.c os_vms.pro: os_vms.c
# must use os_vms_conf.h for auto/config.h # must use os_vms_conf.h for auto/config.h
mv auto/config.h auto/config.h.save mv auto/config.h auto/config.h.save
@@ -2576,6 +2582,10 @@ install-tool-languages:
-$(SHELL) ./installman.sh xxd $(DEST_MAN_PL_U) "-pl.UTF-8" $(INSTALLMANARGS) -$(SHELL) ./installman.sh xxd $(DEST_MAN_PL_U) "-pl.UTF-8" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh xxd $(DEST_MAN_RU) "-ru" $(INSTALLMANARGS) -$(SHELL) ./installman.sh xxd $(DEST_MAN_RU) "-ru" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh xxd $(DEST_MAN_RU_U) "-ru.UTF-8" $(INSTALLMANARGS) -$(SHELL) ./installman.sh xxd $(DEST_MAN_RU_U) "-ru.UTF-8" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh xxd $(DEST_MAN_TR) "-tr" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh xxd $(DEST_MAN_TR_I) "-tr" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh xxd $(DEST_MAN_TR_U) "-tr.UTF-8" $(INSTALLMANARGS)
# install the language specific files, if they were unpacked # install the language specific files, if they were unpacked
install-languages: languages $(DEST_LANG) $(DEST_KMAP) install-languages: languages $(DEST_LANG) $(DEST_KMAP)
@@ -2597,6 +2607,9 @@ install-languages: languages $(DEST_LANG) $(DEST_KMAP)
-$(SHELL) ./installman.sh install $(DEST_MAN_PL_U) "-pl.UTF-8" $(INSTALLMANARGS) -$(SHELL) ./installman.sh install $(DEST_MAN_PL_U) "-pl.UTF-8" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh install $(DEST_MAN_RU) "-ru" $(INSTALLMANARGS) -$(SHELL) ./installman.sh install $(DEST_MAN_RU) "-ru" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh install $(DEST_MAN_RU_U) "-ru.UTF-8" $(INSTALLMANARGS) -$(SHELL) ./installman.sh install $(DEST_MAN_RU_U) "-ru.UTF-8" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh install $(DEST_MAN_TR) "-tr" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh install $(DEST_MAN_TR_I) "-tr" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh install $(DEST_MAN_TR_U) "-tr.UTF-8" $(INSTALLMANARGS)
-$(SHELL) ./installml.sh install "$(GUI_MAN_TARGETS)" \ -$(SHELL) ./installml.sh install "$(GUI_MAN_TARGETS)" \
$(DEST_MAN_DA) $(INSTALLMLARGS) $(DEST_MAN_DA) $(INSTALLMLARGS)
-$(SHELL) ./installml.sh install "$(GUI_MAN_TARGETS)" \ -$(SHELL) ./installml.sh install "$(GUI_MAN_TARGETS)" \
@@ -2633,6 +2646,12 @@ install-languages: languages $(DEST_LANG) $(DEST_KMAP)
$(DEST_MAN_RU) $(INSTALLMLARGS) $(DEST_MAN_RU) $(INSTALLMLARGS)
-$(SHELL) ./installml.sh install "$(GUI_MAN_TARGETS)" \ -$(SHELL) ./installml.sh install "$(GUI_MAN_TARGETS)" \
$(DEST_MAN_RU_U) $(INSTALLMLARGS) $(DEST_MAN_RU_U) $(INSTALLMLARGS)
-$(SHELL) ./installml.sh install "$(GUI_MAN_TARGETS)" \
$(DEST_MAN_TR) $(INSTALLMLARGS)
-$(SHELL) ./installml.sh install "$(GUI_MAN_TARGETS)" \
$(DEST_MAN_TR_I) $(INSTALLMLARGS)
-$(SHELL) ./installml.sh install "$(GUI_MAN_TARGETS)" \
$(DEST_MAN_TR_U) $(INSTALLMLARGS)
if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \ if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \
cd $(PODIR); $(MAKE) prefix=$(DESTDIR)$(prefix) LOCALEDIR=$(DEST_LANG) \ cd $(PODIR); $(MAKE) prefix=$(DESTDIR)$(prefix) LOCALEDIR=$(DEST_LANG) \
INSTALL_DATA=$(INSTALL_DATA) FILEMOD=$(FILEMOD) install; \ INSTALL_DATA=$(INSTALL_DATA) FILEMOD=$(FILEMOD) install; \
@@ -2806,6 +2825,9 @@ uninstall_runtime:
-$(SHELL) ./installman.sh uninstall $(DEST_MAN_PL_U) "" $(INSTALLMANARGS) -$(SHELL) ./installman.sh uninstall $(DEST_MAN_PL_U) "" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh uninstall $(DEST_MAN_RU) "" $(INSTALLMANARGS) -$(SHELL) ./installman.sh uninstall $(DEST_MAN_RU) "" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh uninstall $(DEST_MAN_RU_U) "" $(INSTALLMANARGS) -$(SHELL) ./installman.sh uninstall $(DEST_MAN_RU_U) "" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh uninstall $(DEST_MAN_TR) "" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh uninstall $(DEST_MAN_TR_I) "" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh uninstall $(DEST_MAN_TR_U) "" $(INSTALLMANARGS)
-$(SHELL) ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ -$(SHELL) ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
$(DEST_MAN) $(INSTALLMLARGS) $(DEST_MAN) $(INSTALLMLARGS)
-$(SHELL) ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ -$(SHELL) ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
@@ -2844,6 +2866,12 @@ uninstall_runtime:
$(DEST_MAN_RU) $(INSTALLMLARGS) $(DEST_MAN_RU) $(INSTALLMLARGS)
-$(SHELL) ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ -$(SHELL) ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
$(DEST_MAN_RU_U) $(INSTALLMLARGS) $(DEST_MAN_RU_U) $(INSTALLMLARGS)
-$(SHELL) ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
$(DEST_MAN_TR) $(INSTALLMLARGS)
-$(SHELL) ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
$(DEST_MAN_TR_I) $(INSTALLMLARGS)
-$(SHELL) ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
$(DEST_MAN_TR_U) $(INSTALLMLARGS)
-rm -f $(DEST_MAN)/xxd.1 -rm -f $(DEST_MAN)/xxd.1
-rm -f $(DEST_MAN_DA)/xxd.1 $(DEST_MAN_DA_I)/xxd.1 $(DEST_MAN_DA_U)/xxd.1 -rm -f $(DEST_MAN_DA)/xxd.1 $(DEST_MAN_DA_I)/xxd.1 $(DEST_MAN_DA_U)/xxd.1
-rm -f $(DEST_MAN_DE)/xxd.1 $(DEST_MAN_DE_I)/xxd.1 $(DEST_MAN_DE_U)/xxd.1 -rm -f $(DEST_MAN_DE)/xxd.1 $(DEST_MAN_DE_I)/xxd.1 $(DEST_MAN_DE_U)/xxd.1
@@ -2959,7 +2987,9 @@ shadow: runtime pixmaps
../../testdir/samples \ ../../testdir/samples \
../../testdir/dumps \ ../../testdir/dumps \
../../testdir/test83-tags? \ ../../testdir/test83-tags? \
../../testdir/*.ok . ../../testdir/*.ok \
../../testdir/testluaplugin \
.
# After updating Vim new files may have been created, use this to refresh the # After updating Vim new files may have been created, use this to refresh the
# symbolic links in the shadow directory. This isn't guaranteed to catch all # symbolic links in the shadow directory. This isn't guaranteed to catch all
@@ -3277,6 +3307,9 @@ objects/gui_xmebw.o: gui_xmebw.c
objects/gui_x11.o: gui_x11.c objects/gui_x11.o: gui_x11.c
$(CCC) -o $@ gui_x11.c $(CCC) -o $@ gui_x11.c
objects/gui_xim.o: gui_xim.c
$(CCC) -o $@ gui_xim.c
objects/gui_photon.o: gui_photon.c objects/gui_photon.o: gui_photon.c
$(CCC) -o $@ gui_photon.c $(CCC) -o $@ gui_photon.c
@@ -3391,9 +3424,6 @@ objects/option.o: option.c optiondefs.h
objects/optionstr.o: optionstr.c objects/optionstr.o: optionstr.c
$(CCC_NF) $(LUA_CFLAGS) $(PERL_CFLAGS) $(PYTHON_CFLAGS) $(PYTHON3_CFLAGS) $(RUBY_CFLAGS) $(TCL_CFLAGS) $(ALL_CFLAGS) -o $@ optionstr.c $(CCC_NF) $(LUA_CFLAGS) $(PERL_CFLAGS) $(PYTHON_CFLAGS) $(PYTHON3_CFLAGS) $(RUBY_CFLAGS) $(TCL_CFLAGS) $(ALL_CFLAGS) -o $@ optionstr.c
objects/os_beos.o: os_beos.c
$(CCC) -o $@ os_beos.c
objects/os_qnx.o: os_qnx.c objects/os_qnx.o: os_qnx.c
$(CCC) -o $@ os_qnx.c $(CCC) -o $@ os_qnx.c
@@ -3496,6 +3526,9 @@ objects/textprop.o: textprop.c
objects/time.o: time.c objects/time.o: time.c
$(CCC) -o $@ time.c $(CCC) -o $@ time.c
objects/typval.o: typval.c
$(CCC) -o $@ typval.c
objects/ui.o: ui.c objects/ui.o: ui.c
$(CCC) -o $@ ui.c $(CCC) -o $@ ui.c
@@ -4098,6 +4131,10 @@ objects/time.o: time.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h proto.h globals.h
objects/typval.o: typval.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h
objects/ui.o: ui.c vim.h protodef.h auto/config.h feature.h os_unix.h \ objects/ui.o: ui.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
@@ -4211,6 +4248,11 @@ objects/gui_x11.o: gui_x11.c vim.h protodef.h auto/config.h feature.h os_unix.h
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h ../runtime/vim32x32.xpm ../runtime/vim16x16.xpm \ proto.h globals.h ../runtime/vim32x32.xpm ../runtime/vim16x16.xpm \
../runtime/vim48x48.xpm ../runtime/vim48x48.xpm
objects/gui_xim.o: gui_xim.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h ../runtime/vim32x32.xpm ../runtime/vim16x16.xpm \
../runtime/vim48x48.xpm
objects/gui_at_sb.o: gui_at_sb.c vim.h protodef.h auto/config.h feature.h \ objects/gui_at_sb.o: gui_at_sb.c vim.h protodef.h auto/config.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \ os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \

View File

@@ -84,6 +84,7 @@ textformat.c | text formatting
textobject.c | text objects textobject.c | text objects
textprop.c | text properties textprop.c | text properties
time.c | time and timer functions time.c | time and timer functions
typval.c | vim script type/value functions
undo.c | undo and redo undo.c | undo and redo
usercmd.c | user defined commands usercmd.c | user defined commands
userfunc.c | user defined functions userfunc.c | user defined functions

24
src/auto/configure vendored
View File

@@ -721,6 +721,7 @@ OS_EXTRA_SRC
XCODE_SELECT XCODE_SELECT
CPP_MM CPP_MM
CROSS_COMPILING CROSS_COMPILING
BUILD_DATE_MSG
STRIP STRIP
AWK AWK
FGREP FGREP
@@ -4455,6 +4456,17 @@ See \`config.log' for more details" "$LINENO" 5; }
fi fi
fi fi
if test -n "$SOURCE_DATE_EPOCH"; then
DATE_FMT="%b %d %Y %H:%M:%S"
BUILD_DATE=$(LC_ALL=C date -u -d "@$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || LC_ALL=C date -u -r "$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || LC_ALL=C date -u "+$DATE_FMT")
cat >>confdefs.h <<_ACEOF
#define BUILD_DATE "$BUILD_DATE"
_ACEOF
BUILD_DATE_MSG=-"echo -e '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\nNOTE: build date/time is fixed: $BUILD_DATE\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-fail-if-missing argument" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-fail-if-missing argument" >&5
$as_echo_n "checking --enable-fail-if-missing argument... " >&6; } $as_echo_n "checking --enable-fail-if-missing argument... " >&6; }
@@ -4533,16 +4545,6 @@ fi
OS_EXTRA_SRC=""; OS_EXTRA_OBJ="" OS_EXTRA_SRC=""; OS_EXTRA_OBJ=""
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BeOS" >&5
$as_echo_n "checking for BeOS... " >&6; }
case `uname` in
BeOS) OS_EXTRA_SRC=os_beos.c; OS_EXTRA_OBJ=objects/os_beos.o
BEOS=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; };;
*) BEOS=no; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; };;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Haiku" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Haiku" >&5
$as_echo_n "checking for Haiku... " >&6; } $as_echo_n "checking for Haiku... " >&6; }
case `uname` in case `uname` in
@@ -12616,7 +12618,7 @@ for ac_func in fchdir fchown fchmod fsync getcwd getpseudotty \
getpwent getpwnam getpwuid getrlimit gettimeofday localtime_r lstat \ getpwent getpwnam getpwuid getrlimit gettimeofday localtime_r lstat \
memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \ memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \ sigprocmask sigvec strcasecmp strcoll strerror strftime stricmp strncasecmp \
strnicmp strpbrk strptime strtol tgetent towlower towupper iswupper \ strnicmp strpbrk strptime strtol tgetent towlower towupper iswupper \
tzset usleep utime utimes mblen ftruncate unsetenv posix_openpt tzset usleep utime utimes mblen ftruncate unsetenv posix_openpt
do : do :

View File

@@ -161,6 +161,7 @@ static struct event_name
{"SessionLoadPost", EVENT_SESSIONLOADPOST}, {"SessionLoadPost", EVENT_SESSIONLOADPOST},
{"ShellCmdPost", EVENT_SHELLCMDPOST}, {"ShellCmdPost", EVENT_SHELLCMDPOST},
{"ShellFilterPost", EVENT_SHELLFILTERPOST}, {"ShellFilterPost", EVENT_SHELLFILTERPOST},
{"SigUSR1", EVENT_SIGUSR1},
{"SourceCmd", EVENT_SOURCECMD}, {"SourceCmd", EVENT_SOURCECMD},
{"SourcePre", EVENT_SOURCEPRE}, {"SourcePre", EVENT_SOURCEPRE},
{"SourcePost", EVENT_SOURCEPOST}, {"SourcePost", EVENT_SOURCEPOST},
@@ -763,7 +764,7 @@ au_event_disable(char *what)
save_ei = vim_strsave(p_ei); save_ei = vim_strsave(p_ei);
if (save_ei != NULL) if (save_ei != NULL)
{ {
new_ei = vim_strnsave(p_ei, (int)(STRLEN(p_ei) + STRLEN(what))); new_ei = vim_strnsave(p_ei, STRLEN(p_ei) + STRLEN(what));
if (new_ei != NULL) if (new_ei != NULL)
{ {
if (*what == ',' && *p_ei == NUL) if (*what == ',' && *p_ei == NUL)
@@ -991,7 +992,7 @@ au_get_grouparg(char_u **argp)
; ;
if (p > arg) if (p > arg)
{ {
group_name = vim_strnsave(arg, (int)(p - arg)); group_name = vim_strnsave(arg, p - arg);
if (group_name == NULL) // out of memory if (group_name == NULL) // out of memory
return AUGROUP_ERROR; return AUGROUP_ERROR;
group = au_find_group(group_name); group = au_find_group(group_name);
@@ -1759,15 +1760,6 @@ has_cmdundefined(void)
return (first_autopat[(int)EVENT_CMDUNDEFINED] != NULL); return (first_autopat[(int)EVENT_CMDUNDEFINED] != NULL);
} }
/*
* Return TRUE when there is an FuncUndefined autocommand defined.
*/
int
has_funcundefined(void)
{
return (first_autopat[(int)EVENT_FUNCUNDEFINED] != NULL);
}
#if defined(FEAT_EVAL) || defined(PROTO) #if defined(FEAT_EVAL) || defined(PROTO)
/* /*
* Return TRUE when there is a TextYankPost autocommand defined. * Return TRUE when there is a TextYankPost autocommand defined.

View File

@@ -103,13 +103,13 @@ read_buffer(
{ {
// Delete the binary lines. // Delete the binary lines.
while (--line_count >= 0) while (--line_count >= 0)
ml_delete((linenr_T)1, FALSE); ml_delete((linenr_T)1);
} }
else else
{ {
// Delete the converted lines. // Delete the converted lines.
while (curbuf->b_ml.ml_line_count > line_count) while (curbuf->b_ml.ml_line_count > line_count)
ml_delete(line_count, FALSE); ml_delete(line_count);
} }
// Put the cursor on the first line. // Put the cursor on the first line.
curwin->w_cursor.lnum = 1; curwin->w_cursor.lnum = 1;
@@ -2287,6 +2287,7 @@ free_buf_options(
vim_regfree(buf->b_s.b_cap_prog); vim_regfree(buf->b_s.b_cap_prog);
buf->b_s.b_cap_prog = NULL; buf->b_s.b_cap_prog = NULL;
clear_string_option(&buf->b_s.b_p_spl); clear_string_option(&buf->b_s.b_p_spl);
clear_string_option(&buf->b_s.b_p_spo);
#endif #endif
#ifdef FEAT_SEARCHPATH #ifdef FEAT_SEARCHPATH
clear_string_option(&buf->b_p_sua); clear_string_option(&buf->b_p_sua);
@@ -3650,7 +3651,7 @@ fileinfo(
#ifdef FEAT_QUICKFIX #ifdef FEAT_QUICKFIX
&& !bt_dontwrite(curbuf) && !bt_dontwrite(curbuf)
#endif #endif
? _("[New file]") : "", ? new_file_message() : "",
(curbuf->b_flags & BF_READERR) ? _("[Read errors]") : "", (curbuf->b_flags & BF_READERR) ? _("[Read errors]") : "",
curbuf->b_p_ro ? (shortmess(SHM_RO) ? _("[RO]") curbuf->b_p_ro ? (shortmess(SHM_RO) ? _("[RO]")
: _("[readonly]")) : "", : _("[readonly]")) : "",

View File

@@ -598,6 +598,12 @@ set_file_time(
} }
#endif // UNIX #endif // UNIX
char *
new_file_message(void)
{
return shortmess(SHM_NEW) ? _("[New]") : _("[New File]");
}
/* /*
* buf_write() - write to file "fname" lines "start" through "end" * buf_write() - write to file "fname" lines "start" through "end"
* *
@@ -2347,7 +2353,7 @@ restore_backup:
} }
else if (newfile) else if (newfile)
{ {
STRCAT(IObuff, shortmess(SHM_NEW) ? _("[New]") : _("[New File]")); STRCAT(IObuff, new_file_message());
c = TRUE; c = TRUE;
} }
if (no_eol) if (no_eol)

View File

@@ -2317,7 +2317,7 @@ del_lines(long nlines, int undo)
if (curbuf->b_ml.ml_flags & ML_EMPTY) // nothing to delete if (curbuf->b_ml.ml_flags & ML_EMPTY) // nothing to delete
break; break;
ml_delete(first, TRUE); ml_delete_flags(first, ML_DEL_MESSAGE);
++n; ++n;
// If we delete the last line in the file, stop // If we delete the last line in the file, stop

View File

@@ -999,8 +999,8 @@ channel_open(
for (addr = res; addr != NULL; addr = addr->ai_next) for (addr = res; addr != NULL; addr = addr->ai_next)
{ {
const char *dst = hostname; const char *dst = hostname;
const void *src = NULL;
# ifdef HAVE_INET_NTOP # ifdef HAVE_INET_NTOP
const void *src = NULL;
char buf[NUMBUFLEN]; char buf[NUMBUFLEN];
# endif # endif
@@ -1009,14 +1009,18 @@ channel_open(
struct sockaddr_in6 *sai = (struct sockaddr_in6 *)addr->ai_addr; struct sockaddr_in6 *sai = (struct sockaddr_in6 *)addr->ai_addr;
sai->sin6_port = htons(port); sai->sin6_port = htons(port);
# ifdef HAVE_INET_NTOP
src = &sai->sin6_addr; src = &sai->sin6_addr;
# endif
} }
else if (addr->ai_family == AF_INET) else if (addr->ai_family == AF_INET)
{ {
struct sockaddr_in *sai = (struct sockaddr_in *)addr->ai_addr; struct sockaddr_in *sai = (struct sockaddr_in *)addr->ai_addr;
sai->sin_port = htons(port); sai->sin_port = htons(port);
# ifdef HAVE_INET_NTOP
src = &sai->sin_addr; src = &sai->sin_addr;
#endif
} }
# ifdef HAVE_INET_NTOP # ifdef HAVE_INET_NTOP
if (src != NULL) if (src != NULL)
@@ -2902,7 +2906,7 @@ may_invoke_callback(channel_T *channel, ch_part_T part)
{ {
// Copy the message into allocated memory (excluding the NL) // Copy the message into allocated memory (excluding the NL)
// and remove it from the buffer (including the NL). // and remove it from the buffer (including the NL).
msg = vim_strnsave(buf, (int)(nl - buf)); msg = vim_strnsave(buf, nl - buf);
channel_consume(channel, part, (int)(nl - buf) + 1); channel_consume(channel, part, (int)(nl - buf) + 1);
} }
} }
@@ -3699,7 +3703,7 @@ channel_read_block(
{ {
// Copy the message into allocated memory and remove it from the // Copy the message into allocated memory and remove it from the
// buffer. // buffer.
msg = vim_strnsave(buf, (int)(nl - buf)); msg = vim_strnsave(buf, nl - buf);
channel_consume(channel, part, (int)(nl - buf) + 1); channel_consume(channel, part, (int)(nl - buf) + 1);
} }
} }

View File

@@ -499,18 +499,24 @@ str_foldcase(
* Also doesn't work for the first byte of a multi-byte, "c" must be a * Also doesn't work for the first byte of a multi-byte, "c" must be a
* character! * character!
*/ */
static char_u transchar_buf[7]; static char_u transchar_charbuf[7];
char_u * char_u *
transchar(int c) transchar(int c)
{
return transchar_buf(curbuf, c);
}
char_u *
transchar_buf(buf_T *buf, int c)
{ {
int i; int i;
i = 0; i = 0;
if (IS_SPECIAL(c)) // special key code, display as ~@ char if (IS_SPECIAL(c)) // special key code, display as ~@ char
{ {
transchar_buf[0] = '~'; transchar_charbuf[0] = '~';
transchar_buf[1] = '@'; transchar_charbuf[1] = '@';
i = 2; i = 2;
c = K_SECOND(c); c = K_SECOND(c);
} }
@@ -524,12 +530,12 @@ transchar(int c)
)) || (c < 256 && vim_isprintc_strict(c))) )) || (c < 256 && vim_isprintc_strict(c)))
{ {
// printable character // printable character
transchar_buf[i] = c; transchar_charbuf[i] = c;
transchar_buf[i + 1] = NUL; transchar_charbuf[i + 1] = NUL;
} }
else else
transchar_nonprint(transchar_buf + i, c); transchar_nonprint(buf, transchar_charbuf + i, c);
return transchar_buf; return transchar_charbuf;
} }
/* /*
@@ -541,27 +547,27 @@ transchar_byte(int c)
{ {
if (enc_utf8 && c >= 0x80) if (enc_utf8 && c >= 0x80)
{ {
transchar_nonprint(transchar_buf, c); transchar_nonprint(curbuf, transchar_charbuf, c);
return transchar_buf; return transchar_charbuf;
} }
return transchar(c); return transchar(c);
} }
/* /*
* Convert non-printable character to two or more printable characters in * Convert non-printable character to two or more printable characters in
* "buf[]". "buf" needs to be able to hold five bytes. * "buf[]". "charbuf" needs to be able to hold five bytes.
* Does NOT work for multi-byte characters, c must be <= 255. * Does NOT work for multi-byte characters, c must be <= 255.
*/ */
void void
transchar_nonprint(char_u *buf, int c) transchar_nonprint(buf_T *buf, char_u *charbuf, int c)
{ {
if (c == NL) if (c == NL)
c = NUL; // we use newline in place of a NUL c = NUL; // we use newline in place of a NUL
else if (c == CAR && get_fileformat(curbuf) == EOL_MAC) else if (c == CAR && get_fileformat(buf) == EOL_MAC)
c = NL; // we use CR in place of NL in this case c = NL; // we use CR in place of NL in this case
if (dy_flags & DY_UHEX) // 'display' has "uhex" if (dy_flags & DY_UHEX) // 'display' has "uhex"
transchar_hex(buf, c); transchar_hex(charbuf, c);
#ifdef EBCDIC #ifdef EBCDIC
// For EBCDIC only the characters 0-63 and 255 are not printable // For EBCDIC only the characters 0-63 and 255 are not printable
@@ -570,35 +576,35 @@ transchar_nonprint(char_u *buf, int c)
else if (c <= 0x7f) // 0x00 - 0x1f and 0x7f else if (c <= 0x7f) // 0x00 - 0x1f and 0x7f
#endif #endif
{ {
buf[0] = '^'; charbuf[0] = '^';
#ifdef EBCDIC #ifdef EBCDIC
if (c == DEL) if (c == DEL)
buf[1] = '?'; // DEL displayed as ^? charbuf[1] = '?'; // DEL displayed as ^?
else else
buf[1] = CtrlChar(c); charbuf[1] = CtrlChar(c);
#else #else
buf[1] = c ^ 0x40; // DEL displayed as ^? charbuf[1] = c ^ 0x40; // DEL displayed as ^?
#endif #endif
buf[2] = NUL; charbuf[2] = NUL;
} }
else if (enc_utf8 && c >= 0x80) else if (enc_utf8 && c >= 0x80)
{ {
transchar_hex(buf, c); transchar_hex(charbuf, c);
} }
#ifndef EBCDIC #ifndef EBCDIC
else if (c >= ' ' + 0x80 && c <= '~' + 0x80) // 0xa0 - 0xfe else if (c >= ' ' + 0x80 && c <= '~' + 0x80) // 0xa0 - 0xfe
{ {
buf[0] = '|'; charbuf[0] = '|';
buf[1] = c - 0x80; charbuf[1] = c - 0x80;
buf[2] = NUL; charbuf[2] = NUL;
} }
#else #else
else if (c < 64) else if (c < 64)
{ {
buf[0] = '~'; charbuf[0] = '~';
buf[1] = MetaChar(c); charbuf[1] = MetaChar(c);
buf[2] = NUL; charbuf[2] = NUL;
} }
#endif #endif
else // 0x80 - 0x9f and 0xff else // 0x80 - 0x9f and 0xff
@@ -607,13 +613,13 @@ transchar_nonprint(char_u *buf, int c)
* TODO: EBCDIC I don't know what to do with this chars, so I display * TODO: EBCDIC I don't know what to do with this chars, so I display
* them as '~?' for now * them as '~?' for now
*/ */
buf[0] = '~'; charbuf[0] = '~';
#ifdef EBCDIC #ifdef EBCDIC
buf[1] = '?'; // 0xff displayed as ~? charbuf[1] = '?'; // 0xff displayed as ~?
#else #else
buf[1] = (c - 0x80) ^ 0x40; // 0xff displayed as ~? charbuf[1] = (c - 0x80) ^ 0x40; // 0xff displayed as ~?
#endif #endif
buf[2] = NUL; charbuf[2] = NUL;
} }
} }
@@ -1764,6 +1770,8 @@ vim_isblankline(char_u *lbuf)
* If "prep" is not NULL, returns a flag to indicate the type of the number: * If "prep" is not NULL, returns a flag to indicate the type of the number:
* 0 decimal * 0 decimal
* '0' octal * '0' octal
* 'O' octal
* 'o' octal
* 'B' bin * 'B' bin
* 'b' bin * 'b' bin
* 'X' hex * 'X' hex
@@ -1783,8 +1791,8 @@ vim_isblankline(char_u *lbuf)
vim_str2nr( vim_str2nr(
char_u *start, char_u *start,
int *prep, // return: type of number 0 = decimal, 'x' int *prep, // return: type of number 0 = decimal, 'x'
// or 'X' is hex, '0' = octal, 'b' or 'B' // or 'X' is hex, '0', 'o' or 'O' is octal,
// is bin // 'b' or 'B' is bin
int *len, // return: detected length of number int *len, // return: detected length of number
int what, // what numbers to recognize int what, // what numbers to recognize
varnumber_T *nptr, // return: signed result varnumber_T *nptr, // return: signed result
@@ -1822,6 +1830,11 @@ vim_str2nr(
&& (maxlen == 0 || maxlen > 2)) && (maxlen == 0 || maxlen > 2))
// binary // binary
ptr += 2; ptr += 2;
else if ((what & STR2NR_OOCT)
&& (pre == 'O' || pre == 'o') && vim_isbdigit(ptr[2])
&& (maxlen == 0 || maxlen > 2))
// octal with prefix "0o"
ptr += 2;
else else
{ {
// decimal or octal, default is decimal // decimal or octal, default is decimal
@@ -1869,9 +1882,12 @@ vim_str2nr(
} }
} }
} }
else if (pre == '0' || ((what & STR2NR_OCT) && (what & STR2NR_FORCE))) else if (pre == 'O' || pre == 'o' ||
pre == '0' || ((what & STR2NR_OCT) && (what & STR2NR_FORCE)))
{ {
// octal // octal
if (pre != 0 && pre != '0')
n += 2; // skip over "0o"
while ('0' <= *ptr && *ptr <= '7') while ('0' <= *ptr && *ptr <= '7')
{ {
// avoid ubsan error for overflow // avoid ubsan error for overflow

View File

@@ -1845,6 +1845,9 @@ parse_cino(buf_T *buf)
// Handle C++ extern "C" or "C++" // Handle C++ extern "C" or "C++"
buf->b_ind_cpp_extern_c = 0; buf->b_ind_cpp_extern_c = 0;
// Handle C #pragma directives
buf->b_ind_pragma = 0;
for (p = buf->b_p_cino; *p; ) for (p = buf->b_p_cino; *p; )
{ {
l = p++; l = p++;
@@ -1920,6 +1923,7 @@ parse_cino(buf_T *buf)
case 'N': buf->b_ind_cpp_namespace = n; break; case 'N': buf->b_ind_cpp_namespace = n; break;
case 'k': buf->b_ind_if_for_while = n; break; case 'k': buf->b_ind_if_for_while = n; break;
case 'E': buf->b_ind_cpp_extern_c = n; break; case 'E': buf->b_ind_cpp_extern_c = n; break;
case 'P': buf->b_ind_pragma = n; break;
} }
if (*p == ',') if (*p == ',')
++p; ++p;
@@ -2116,12 +2120,17 @@ get_c_indent(void)
goto laterend; goto laterend;
} }
// #defines and so on always go at the left when included in 'cinkeys'. // #defines and so on go at the left when included in 'cinkeys',
// exluding pragmas when customized in 'cinoptions'
if (*theline == '#' && (*linecopy == '#' || in_cinkeys('#', ' ', TRUE))) if (*theline == '#' && (*linecopy == '#' || in_cinkeys('#', ' ', TRUE)))
{
char_u *directive = skipwhite(theline + 1);
if (curbuf->b_ind_pragma == 0 || STRNCMP(directive, "pragma", 6) != 0)
{ {
amount = curbuf->b_ind_hash_comment; amount = curbuf->b_ind_hash_comment;
goto theend; goto theend;
} }
}
// Is it a non-case label? Then that goes at the left margin too unless: // Is it a non-case label? Then that goes at the left margin too unless:
// - JS flag is set. // - JS flag is set.

View File

@@ -1317,6 +1317,11 @@ check_clipboard_option(void)
} }
if (errmsg == NULL) if (errmsg == NULL)
{ {
if (global_busy)
// clip_unnamed will be reset to clip_unnamed_saved
// at end_global_changes
clip_unnamed_saved = new_unnamed;
else
clip_unnamed = new_unnamed; clip_unnamed = new_unnamed;
clip_autoselect_star = new_autoselect_star; clip_autoselect_star = new_autoselect_star;
clip_autoselect_plus = new_autoselect_plus; clip_autoselect_plus = new_autoselect_plus;

View File

@@ -273,6 +273,7 @@ nextwild(
* options = WILD_SILENT: don't print warning messages * options = WILD_SILENT: don't print warning messages
* options = WILD_ESCAPE: put backslash before special chars * options = WILD_ESCAPE: put backslash before special chars
* options = WILD_ICASE: ignore case for files * options = WILD_ICASE: ignore case for files
* options = WILD_ALLLINKS; keep broken links
* *
* The variables xp->xp_context and xp->xp_backslash must have been set! * The variables xp->xp_context and xp->xp_backslash must have been set!
*/ */
@@ -1145,6 +1146,15 @@ set_one_cmd_context(
arg = skipwhite(arg); arg = skipwhite(arg);
} }
// Skip over ++argopt argument
if ((ea.argt & EX_ARGOPT) && *arg != NUL && STRNCMP(arg, "++", 2) == 0)
{
p = arg;
while (*p && !vim_isspace(*p))
MB_PTR_ADV(p);
arg = skipwhite(p);
}
// Check for '|' to separate commands and '"' to start comments. // Check for '|' to separate commands and '"' to start comments.
// Don't do this for ":read !cmd" and ":write !cmd". // Don't do this for ":read !cmd" and ":write !cmd".
if ((ea.argt & EX_TRLBAR) && !usefilter) if ((ea.argt & EX_TRLBAR) && !usefilter)
@@ -1727,7 +1737,8 @@ set_one_cmd_context(
{ {
if ( STRNCMP(arg, "messages", p - arg) == 0 if ( STRNCMP(arg, "messages", p - arg) == 0
|| STRNCMP(arg, "ctype", p - arg) == 0 || STRNCMP(arg, "ctype", p - arg) == 0
|| STRNCMP(arg, "time", p - arg) == 0) || STRNCMP(arg, "time", p - arg) == 0
|| STRNCMP(arg, "collate", p - arg) == 0)
{ {
xp->xp_context = EXPAND_LOCALES; xp->xp_context = EXPAND_LOCALES;
xp->xp_pattern = skipwhite(p); xp->xp_pattern = skipwhite(p);
@@ -2555,7 +2566,7 @@ ExpandUserDefined(
{ {
if (ga_grow(&ga, 1) == FAIL) if (ga_grow(&ga, 1) == FAIL)
break; break;
((char_u **)ga.ga_data)[ga.ga_len] = vim_strnsave(s, (int)(e - s)); ((char_u **)ga.ga_data)[ga.ga_len] = vim_strnsave(s, e - s);
++ga.ga_len; ++ga.ga_len;
} }
@@ -2675,11 +2686,19 @@ globpath(
f_getcompletion(typval_T *argvars, typval_T *rettv) f_getcompletion(typval_T *argvars, typval_T *rettv)
{ {
char_u *pat; char_u *pat;
char_u *type;
expand_T xpc; expand_T xpc;
int filtered = FALSE; int filtered = FALSE;
int options = WILD_SILENT | WILD_USE_NL | WILD_ADD_SLASH int options = WILD_SILENT | WILD_USE_NL | WILD_ADD_SLASH
| WILD_NO_BEEP; | WILD_NO_BEEP;
if (argvars[1].v_type != VAR_STRING)
{
semsg(_(e_invarg2), "type must be a string");
return;
}
type = tv_get_string(&argvars[1]);
if (argvars[2].v_type != VAR_UNKNOWN) if (argvars[2].v_type != VAR_UNKNOWN)
filtered = tv_get_number_chk(&argvars[2], NULL); filtered = tv_get_number_chk(&argvars[2], NULL);
@@ -2691,15 +2710,20 @@ f_getcompletion(typval_T *argvars, typval_T *rettv)
options |= WILD_KEEP_ALL; options |= WILD_KEEP_ALL;
ExpandInit(&xpc); ExpandInit(&xpc);
if (STRCMP(type, "cmdline") == 0)
{
set_one_cmd_context(&xpc, tv_get_string(&argvars[0]));
xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
}
else
{
xpc.xp_pattern = tv_get_string(&argvars[0]); xpc.xp_pattern = tv_get_string(&argvars[0]);
xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern); xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
xpc.xp_context = cmdcomplete_str_to_type(tv_get_string(&argvars[1]));
xpc.xp_context = cmdcomplete_str_to_type(type);
if (xpc.xp_context == EXPAND_NOTHING) if (xpc.xp_context == EXPAND_NOTHING)
{ {
if (argvars[1].v_type == VAR_STRING) semsg(_(e_invarg2), type);
semsg(_(e_invarg2), argvars[1].vval.v_string);
else
emsg(_(e_invarg));
return; return;
} }
@@ -2724,6 +2748,7 @@ f_getcompletion(typval_T *argvars, typval_T *rettv)
xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern); xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
} }
# endif # endif
}
pat = addstar(xpc.xp_pattern, xpc.xp_pattern_len, xpc.xp_context); pat = addstar(xpc.xp_pattern, xpc.xp_pattern_len, xpc.xp_context);
if ((rettv_list_alloc(rettv) != FAIL) && (pat != NULL)) if ((rettv_list_alloc(rettv) != FAIL) && (pat != NULL))

View File

@@ -30,6 +30,9 @@
/* Define when __DATE__ " " __TIME__ can be used */ /* Define when __DATE__ " " __TIME__ can be used */
#undef HAVE_DATE_TIME #undef HAVE_DATE_TIME
/* Defined from $SOURCE_DATE_EPOCH, used as the build date */
#undef BUILD_DATE
/* Define when __attribute__((unused)) can be used */ /* Define when __attribute__((unused)) can be used */
#undef HAVE_ATTRIBUTE_UNUSED #undef HAVE_ATTRIBUTE_UNUSED
@@ -195,6 +198,7 @@
#undef HAVE_SIGVEC #undef HAVE_SIGVEC
#undef HAVE_SMACK #undef HAVE_SMACK
#undef HAVE_STRCASECMP #undef HAVE_STRCASECMP
#undef HAVE_STRCOLL
#undef HAVE_STRERROR #undef HAVE_STRERROR
#undef HAVE_STRFTIME #undef HAVE_STRFTIME
#undef HAVE_STRICMP #undef HAVE_STRICMP

View File

@@ -169,6 +169,10 @@ MAKEMO = @MAKEMO@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
MSGFMT_DESKTOP = @MSGFMT_DESKTOP@ MSGFMT_DESKTOP = @MSGFMT_DESKTOP@
### set if $SOURCE_DATE_EPOCH was set when running configure
BUILD_DATE_MSG = @BUILD_DATE_MSG@
# Make sure that "make first" will run "make all" once configure has done its # Make sure that "make first" will run "make all" once configure has done its
# work. This is needed when using the Makefile in the top directory. # work. This is needed when using the Makefile in the top directory.
first: all first: all

View File

@@ -62,6 +62,18 @@ if test x"$ac_cv_prog_cc_c99" != xno; then
fi fi
fi fi
dnl If $SOURCE_DATE_EPOCH is present in the environment, use that as the
dnl "compiled" timestamp in :version's output. Attempt to get the formatted
dnl date using GNU date syntax, BSD date syntax, and finally falling back to
dnl just using the current time.
if test -n "$SOURCE_DATE_EPOCH"; then
DATE_FMT="%b %d %Y %H:%M:%S"
BUILD_DATE=$(LC_ALL=C date -u -d "@$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || LC_ALL=C date -u -r "$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || LC_ALL=C date -u "+$DATE_FMT")
AC_DEFINE_UNQUOTED(BUILD_DATE, ["$BUILD_DATE"])
BUILD_DATE_MSG=-"echo -e '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\nNOTE: build date/time is fixed: $BUILD_DATE\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='"
AC_SUBST(BUILD_DATE_MSG)
fi
dnl Check for the flag that fails if stuff are missing. dnl Check for the flag that fails if stuff are missing.
AC_MSG_CHECKING(--enable-fail-if-missing argument) AC_MSG_CHECKING(--enable-fail-if-missing argument)
@@ -146,14 +158,6 @@ fi
OS_EXTRA_SRC=""; OS_EXTRA_OBJ="" OS_EXTRA_SRC=""; OS_EXTRA_OBJ=""
dnl Check for BeOS, which needs an extra source file
AC_MSG_CHECKING(for BeOS)
case `uname` in
BeOS) OS_EXTRA_SRC=os_beos.c; OS_EXTRA_OBJ=objects/os_beos.o
BEOS=yes; AC_MSG_RESULT(yes);;
*) BEOS=no; AC_MSG_RESULT(no);;
esac
AC_MSG_CHECKING(for Haiku) AC_MSG_CHECKING(for Haiku)
case `uname` in case `uname` in
Haiku) HAIKU=yes; AC_MSG_RESULT(yes);; Haiku) HAIKU=yes; AC_MSG_RESULT(yes);;
@@ -3735,7 +3739,7 @@ AC_CHECK_FUNCS(fchdir fchown fchmod fsync getcwd getpseudotty \
getpwent getpwnam getpwuid getrlimit gettimeofday localtime_r lstat \ getpwent getpwnam getpwuid getrlimit gettimeofday localtime_r lstat \
memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \ memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \ sigprocmask sigvec strcasecmp strcoll strerror strftime stricmp strncasecmp \
strnicmp strpbrk strptime strtol tgetent towlower towupper iswupper \ strnicmp strpbrk strptime strtol tgetent towlower towupper iswupper \
tzset usleep utime utimes mblen ftruncate unsetenv posix_openpt) tzset usleep utime utimes mblen ftruncate unsetenv posix_openpt)
AC_FUNC_SELECT_ARGTYPES AC_FUNC_SELECT_ARGTYPES

View File

@@ -779,7 +779,7 @@ get_literal_key(char_u **arg, typval_T *tv)
for (p = *arg; ASCII_ISALNUM(*p) || *p == '_' || *p == '-'; ++p) for (p = *arg; ASCII_ISALNUM(*p) || *p == '_' || *p == '-'; ++p)
; ;
tv->v_type = VAR_STRING; tv->v_type = VAR_STRING;
tv->vval.v_string = vim_strnsave(*arg, (int)(p - *arg)); tv->vval.v_string = vim_strnsave(*arg, p - *arg);
*arg = skipwhite(p); *arg = skipwhite(p);
return OK; return OK;

View File

@@ -747,7 +747,7 @@ diff_write_buffer(buf_T *buf, diffin_T *din)
// xdiff doesn't support ignoring case, fold-case the text. // xdiff doesn't support ignoring case, fold-case the text.
c = PTR2CHAR(s); c = PTR2CHAR(s);
c = enc_utf8 ? utf_fold(c) : MB_TOLOWER(c); c = MB_CASEFOLD(c);
orig_len = mb_ptr2len(s); orig_len = mb_ptr2len(s);
if (mb_char2bytes(c, cbuf) != orig_len) if (mb_char2bytes(c, cbuf) != orig_len)
// TODO: handle byte length difference // TODO: handle byte length difference
@@ -1301,7 +1301,7 @@ ex_diffpatch(exarg_T *eap)
if (curbuf->b_fname != NULL) if (curbuf->b_fname != NULL)
{ {
newname = vim_strnsave(curbuf->b_fname, newname = vim_strnsave(curbuf->b_fname,
(int)(STRLEN(curbuf->b_fname) + 4)); STRLEN(curbuf->b_fname) + 4);
if (newname != NULL) if (newname != NULL)
STRCAT(newname, ".new"); STRCAT(newname, ".new");
} }
@@ -2764,7 +2764,7 @@ ex_diffgetput(exarg_T *eap)
{ {
// remember deleting the last line of the buffer // remember deleting the last line of the buffer
buf_empty = curbuf->b_ml.ml_line_count == 1; buf_empty = curbuf->b_ml.ml_line_count == 1;
ml_delete(lnum, FALSE); ml_delete(lnum);
--added; --added;
} }
for (i = 0; i < dp->df_count[idx_from] - start_skip - end_skip; ++i) for (i = 0; i < dp->df_count[idx_from] - start_skip - end_skip; ++i)
@@ -2786,7 +2786,7 @@ ex_diffgetput(exarg_T *eap)
// Added the first line into an empty buffer, need to // Added the first line into an empty buffer, need to
// delete the dummy empty line. // delete the dummy empty line.
buf_empty = FALSE; buf_empty = FALSE;
ml_delete((linenr_T)2, FALSE); ml_delete((linenr_T)2);
} }
} }
} }

View File

@@ -2387,10 +2387,10 @@ ex_loadkeymap(exarg_T *eap)
{ {
kp = (kmap_T *)curbuf->b_kmap_ga.ga_data + curbuf->b_kmap_ga.ga_len; kp = (kmap_T *)curbuf->b_kmap_ga.ga_data + curbuf->b_kmap_ga.ga_len;
s = skiptowhite(p); s = skiptowhite(p);
kp->from = vim_strnsave(p, (int)(s - p)); kp->from = vim_strnsave(p, s - p);
p = skipwhite(s); p = skipwhite(s);
s = skiptowhite(p); s = skiptowhite(p);
kp->to = vim_strnsave(p, (int)(s - p)); kp->to = vim_strnsave(p, s - p);
if (kp->from == NULL || kp->to == NULL if (kp->from == NULL || kp->to == NULL
|| STRLEN(kp->from) + STRLEN(kp->to) >= KMAP_LLEN || STRLEN(kp->from) + STRLEN(kp->to) >= KMAP_LLEN

View File

@@ -1287,13 +1287,13 @@ win_line(
// When still displaying '$' of change command, stop at cursor. // When still displaying '$' of change command, stop at cursor.
// When only displaying the (relative) line number and that's done, // When only displaying the (relative) line number and that's done,
// stop here. // stop here.
if ((dollar_vcol >= 0 && wp == curwin if (((dollar_vcol >= 0 && wp == curwin
&& lnum == wp->w_cursor.lnum && vcol >= (long)wp->w_virtcol && lnum == wp->w_cursor.lnum && vcol >= (long)wp->w_virtcol)
|| (number_only && draw_state > WL_NR))
#ifdef FEAT_DIFF #ifdef FEAT_DIFF
&& filler_todo <= 0 && filler_todo <= 0
#endif #endif
) )
|| (number_only && draw_state > WL_NR))
{ {
screen_line(screen_row, wp->w_wincol, col, -(int)wp->w_width, screen_line(screen_row, wp->w_wincol, col, -(int)wp->w_width,
screen_line_flags); screen_line_flags);
@@ -1764,7 +1764,7 @@ win_line(
{ {
// head byte at end of line // head byte at end of line
mb_l = 1; mb_l = 1;
transchar_nonprint(extra, c); transchar_nonprint(wp->w_buffer, extra, c);
} }
else else
{ {
@@ -2224,7 +2224,7 @@ win_line(
} }
else if (c != NUL) else if (c != NUL)
{ {
p_extra = transchar(c); p_extra = transchar_buf(wp->w_buffer, c);
if (n_extra == 0) if (n_extra == 0)
n_extra = byte2cells(c) - 1; n_extra = byte2cells(c) - 1;
#ifdef FEAT_RIGHTLEFT #ifdef FEAT_RIGHTLEFT

View File

@@ -1609,7 +1609,7 @@ decodeModifyOtherKeys(int c)
#endif #endif
mod_mask = decode_modifiers(arg[!form]); mod_mask = decode_modifiers(arg[!form]);
c = merge_modifyOtherKeys(arg[form]); c = merge_modifyOtherKeys(arg[form], &mod_mask);
} }
} }

1459
src/eval.c

File diff suppressed because it is too large Load Diff

View File

@@ -513,7 +513,7 @@ f_deletebufline(typval_T *argvars, typval_T *rettv)
} }
for (lnum = first; lnum <= last; ++lnum) for (lnum = first; lnum <= last; ++lnum)
ml_delete(first, TRUE); ml_delete_flags(first, ML_DEL_MESSAGE);
FOR_ALL_TAB_WINDOWS(tp, wp) FOR_ALL_TAB_WINDOWS(tp, wp)
if (wp->w_buffer == buf) if (wp->w_buffer == buf)

View File

@@ -94,6 +94,7 @@ static void f_getpid(typval_T *argvars, typval_T *rettv);
static void f_getcurpos(typval_T *argvars, typval_T *rettv); static void f_getcurpos(typval_T *argvars, typval_T *rettv);
static void f_getpos(typval_T *argvars, typval_T *rettv); static void f_getpos(typval_T *argvars, typval_T *rettv);
static void f_getreg(typval_T *argvars, typval_T *rettv); static void f_getreg(typval_T *argvars, typval_T *rettv);
static void f_getreginfo(typval_T *argvars, typval_T *rettv);
static void f_getregtype(typval_T *argvars, typval_T *rettv); static void f_getregtype(typval_T *argvars, typval_T *rettv);
static void f_gettagstack(typval_T *argvars, typval_T *rettv); static void f_gettagstack(typval_T *argvars, typval_T *rettv);
static void f_haslocaldir(typval_T *argvars, typval_T *rettv); static void f_haslocaldir(typval_T *argvars, typval_T *rettv);
@@ -338,6 +339,14 @@ ret_job(int argcount UNUSED, type_T **argtypes UNUSED)
return &t_job; return &t_job;
} }
static type_T *
ret_first_arg(int argcount, type_T **argtypes)
{
if (argcount > 0)
return argtypes[0];
return &t_void;
}
static type_T *ret_f_function(int argcount, type_T **argtypes); static type_T *ret_f_function(int argcount, type_T **argtypes);
/* /*
@@ -419,7 +428,7 @@ static funcentry_T global_functions[] =
{"asin", 1, 1, FEARG_1, ret_float, FLOAT_FUNC(f_asin)}, {"asin", 1, 1, FEARG_1, ret_float, FLOAT_FUNC(f_asin)},
{"assert_beeps", 1, 2, FEARG_1, ret_number, f_assert_beeps}, {"assert_beeps", 1, 2, FEARG_1, ret_number, f_assert_beeps},
{"assert_equal", 2, 3, FEARG_2, ret_number, f_assert_equal}, {"assert_equal", 2, 3, FEARG_2, ret_number, f_assert_equal},
{"assert_equalfile", 2, 2, FEARG_1, ret_number, f_assert_equalfile}, {"assert_equalfile", 2, 3, FEARG_1, ret_number, f_assert_equalfile},
{"assert_exception", 1, 2, 0, ret_number, f_assert_exception}, {"assert_exception", 1, 2, 0, ret_number, f_assert_exception},
{"assert_fails", 1, 3, FEARG_1, ret_number, f_assert_fails}, {"assert_fails", 1, 3, FEARG_1, ret_number, f_assert_fails},
{"assert_false", 1, 2, FEARG_1, ret_number, f_assert_false}, {"assert_false", 1, 2, FEARG_1, ret_number, f_assert_false},
@@ -540,6 +549,7 @@ static funcentry_T global_functions[] =
{"filter", 2, 2, FEARG_1, ret_any, f_filter}, {"filter", 2, 2, FEARG_1, ret_any, f_filter},
{"finddir", 1, 3, FEARG_1, ret_string, f_finddir}, {"finddir", 1, 3, FEARG_1, ret_string, f_finddir},
{"findfile", 1, 3, FEARG_1, ret_string, f_findfile}, {"findfile", 1, 3, FEARG_1, ret_string, f_findfile},
{"flatten", 1, 2, FEARG_1, ret_list_any, f_flatten},
{"float2nr", 1, 1, FEARG_1, ret_number, FLOAT_FUNC(f_float2nr)}, {"float2nr", 1, 1, FEARG_1, ret_number, FLOAT_FUNC(f_float2nr)},
{"floor", 1, 1, FEARG_1, ret_float, FLOAT_FUNC(f_floor)}, {"floor", 1, 1, FEARG_1, ret_float, FLOAT_FUNC(f_floor)},
{"fmod", 2, 2, FEARG_1, ret_float, FLOAT_FUNC(f_fmod)}, {"fmod", 2, 2, FEARG_1, ret_float, FLOAT_FUNC(f_fmod)},
@@ -579,12 +589,14 @@ static funcentry_T global_functions[] =
{"getjumplist", 0, 2, FEARG_1, ret_list_any, f_getjumplist}, {"getjumplist", 0, 2, FEARG_1, ret_list_any, f_getjumplist},
{"getline", 1, 2, FEARG_1, ret_f_getline, f_getline}, {"getline", 1, 2, FEARG_1, ret_f_getline, f_getline},
{"getloclist", 1, 2, 0, ret_list_dict_any, f_getloclist}, {"getloclist", 1, 2, 0, ret_list_dict_any, f_getloclist},
{"getmarklist", 0, 1, FEARG_1, ret_list_dict_any, f_getmarklist},
{"getmatches", 0, 1, 0, ret_list_dict_any, f_getmatches}, {"getmatches", 0, 1, 0, ret_list_dict_any, f_getmatches},
{"getmousepos", 0, 0, 0, ret_dict_number, f_getmousepos}, {"getmousepos", 0, 0, 0, ret_dict_number, f_getmousepos},
{"getpid", 0, 0, 0, ret_number, f_getpid}, {"getpid", 0, 0, 0, ret_number, f_getpid},
{"getpos", 1, 1, FEARG_1, ret_list_number, f_getpos}, {"getpos", 1, 1, FEARG_1, ret_list_number, f_getpos},
{"getqflist", 0, 1, 0, ret_list_dict_any, f_getqflist}, {"getqflist", 0, 1, 0, ret_list_dict_any, f_getqflist},
{"getreg", 0, 3, FEARG_1, ret_string, f_getreg}, {"getreg", 0, 3, FEARG_1, ret_string, f_getreg},
{"getreginfo", 0, 1, FEARG_1, ret_dict_any, f_getreginfo},
{"getregtype", 0, 1, FEARG_1, ret_string, f_getregtype}, {"getregtype", 0, 1, FEARG_1, ret_string, f_getregtype},
{"gettabinfo", 0, 1, FEARG_1, ret_list_dict_any, f_gettabinfo}, {"gettabinfo", 0, 1, FEARG_1, ret_list_dict_any, f_gettabinfo},
{"gettabvar", 2, 3, FEARG_1, ret_any, f_gettabvar}, {"gettabvar", 2, 3, FEARG_1, ret_any, f_gettabvar},
@@ -765,8 +777,10 @@ static funcentry_T global_functions[] =
}, },
{"rand", 0, 1, FEARG_1, ret_number, f_rand}, {"rand", 0, 1, FEARG_1, ret_number, f_rand},
{"range", 1, 3, FEARG_1, ret_list_number, f_range}, {"range", 1, 3, FEARG_1, ret_list_number, f_range},
{"readdir", 1, 2, FEARG_1, ret_list_string, f_readdir}, {"readdir", 1, 3, FEARG_1, ret_list_string, f_readdir},
{"readdirex", 1, 3, FEARG_1, ret_list_dict_any, f_readdirex},
{"readfile", 1, 3, FEARG_1, ret_any, f_readfile}, {"readfile", 1, 3, FEARG_1, ret_any, f_readfile},
{"reduce", 2, 3, FEARG_1, ret_any, f_reduce},
{"reg_executing", 0, 0, 0, ret_string, f_reg_executing}, {"reg_executing", 0, 0, 0, ret_string, f_reg_executing},
{"reg_recording", 0, 0, 0, ret_string, f_reg_recording}, {"reg_recording", 0, 0, 0, ret_string, f_reg_recording},
{"reltime", 0, 2, FEARG_1, ret_list_any, f_reltime}, {"reltime", 0, 2, FEARG_1, ret_list_any, f_reltime},
@@ -798,11 +812,12 @@ static funcentry_T global_functions[] =
{"screenpos", 3, 3, FEARG_1, ret_dict_number, f_screenpos}, {"screenpos", 3, 3, FEARG_1, ret_dict_number, f_screenpos},
{"screenrow", 0, 0, 0, ret_number, f_screenrow}, {"screenrow", 0, 0, 0, ret_number, f_screenrow},
{"screenstring", 2, 2, FEARG_1, ret_string, f_screenstring}, {"screenstring", 2, 2, FEARG_1, ret_string, f_screenstring},
{"search", 1, 4, FEARG_1, ret_number, f_search}, {"search", 1, 5, FEARG_1, ret_number, f_search},
{"searchcount", 0, 1, FEARG_1, ret_dict_any, f_searchcount},
{"searchdecl", 1, 3, FEARG_1, ret_number, f_searchdecl}, {"searchdecl", 1, 3, FEARG_1, ret_number, f_searchdecl},
{"searchpair", 3, 7, 0, ret_number, f_searchpair}, {"searchpair", 3, 7, 0, ret_number, f_searchpair},
{"searchpairpos", 3, 7, 0, ret_list_number, f_searchpairpos}, {"searchpairpos", 3, 7, 0, ret_list_number, f_searchpairpos},
{"searchpos", 1, 4, FEARG_1, ret_list_number, f_searchpos}, {"searchpos", 1, 5, FEARG_1, ret_list_number, f_searchpos},
{"server2client", 2, 2, FEARG_1, ret_number, f_server2client}, {"server2client", 2, 2, FEARG_1, ret_number, f_server2client},
{"serverlist", 0, 0, 0, ret_string, f_serverlist}, {"serverlist", 0, 0, 0, ret_string, f_serverlist},
{"setbufline", 3, 3, FEARG_3, ret_number, f_setbufline}, {"setbufline", 3, 3, FEARG_3, ret_number, f_setbufline},
@@ -842,7 +857,7 @@ static funcentry_T global_functions[] =
{"simplify", 1, 1, FEARG_1, ret_string, f_simplify}, {"simplify", 1, 1, FEARG_1, ret_string, f_simplify},
{"sin", 1, 1, FEARG_1, ret_float, FLOAT_FUNC(f_sin)}, {"sin", 1, 1, FEARG_1, ret_float, FLOAT_FUNC(f_sin)},
{"sinh", 1, 1, FEARG_1, ret_float, FLOAT_FUNC(f_sinh)}, {"sinh", 1, 1, FEARG_1, ret_float, FLOAT_FUNC(f_sinh)},
{"sort", 1, 3, FEARG_1, ret_list_any, f_sort}, {"sort", 1, 3, FEARG_1, ret_first_arg, f_sort},
{"sound_clear", 0, 0, 0, ret_void, SOUND_FUNC(f_sound_clear)}, {"sound_clear", 0, 0, 0, ret_void, SOUND_FUNC(f_sound_clear)},
{"sound_playevent", 1, 2, FEARG_1, ret_number, SOUND_FUNC(f_sound_playevent)}, {"sound_playevent", 1, 2, FEARG_1, ret_number, SOUND_FUNC(f_sound_playevent)},
{"sound_playfile", 1, 2, FEARG_1, ret_number, SOUND_FUNC(f_sound_playfile)}, {"sound_playfile", 1, 2, FEARG_1, ret_number, SOUND_FUNC(f_sound_playfile)},
@@ -937,6 +952,7 @@ static funcentry_T global_functions[] =
{"term_setsize", 3, 3, FEARG_1, ret_void, TERM_FUNC(f_term_setsize)}, {"term_setsize", 3, 3, FEARG_1, ret_void, TERM_FUNC(f_term_setsize)},
{"term_start", 1, 2, FEARG_1, ret_number, TERM_FUNC(f_term_start)}, {"term_start", 1, 2, FEARG_1, ret_number, TERM_FUNC(f_term_start)},
{"term_wait", 1, 2, FEARG_1, ret_void, TERM_FUNC(f_term_wait)}, {"term_wait", 1, 2, FEARG_1, ret_void, TERM_FUNC(f_term_wait)},
{"terminalprops", 0, 0, 0, ret_dict_string, f_terminalprops},
{"test_alloc_fail", 3, 3, FEARG_1, ret_void, f_test_alloc_fail}, {"test_alloc_fail", 3, 3, FEARG_1, ret_void, f_test_alloc_fail},
{"test_autochdir", 0, 0, 0, ret_void, f_test_autochdir}, {"test_autochdir", 0, 0, 0, ret_void, f_test_autochdir},
{"test_feedinput", 1, 1, FEARG_1, ret_void, f_test_feedinput}, {"test_feedinput", 1, 1, FEARG_1, ret_void, f_test_feedinput},
@@ -975,7 +991,7 @@ static funcentry_T global_functions[] =
{"tolower", 1, 1, FEARG_1, ret_string, f_tolower}, {"tolower", 1, 1, FEARG_1, ret_string, f_tolower},
{"toupper", 1, 1, FEARG_1, ret_string, f_toupper}, {"toupper", 1, 1, FEARG_1, ret_string, f_toupper},
{"tr", 3, 3, FEARG_1, ret_string, f_tr}, {"tr", 3, 3, FEARG_1, ret_string, f_tr},
{"trim", 1, 2, FEARG_1, ret_string, f_trim}, {"trim", 1, 3, FEARG_1, ret_string, f_trim},
{"trunc", 1, 1, FEARG_1, ret_float, FLOAT_FUNC(f_trunc)}, {"trunc", 1, 1, FEARG_1, ret_float, FLOAT_FUNC(f_trunc)},
{"type", 1, 1, FEARG_1, ret_number, f_type}, {"type", 1, 1, FEARG_1, ret_number, f_type},
{"undofile", 1, 1, FEARG_1, ret_string, f_undofile}, {"undofile", 1, 1, FEARG_1, ret_string, f_undofile},
@@ -1269,44 +1285,6 @@ non_zero_arg(typval_T *argvars)
&& *argvars[0].vval.v_string != NUL)); && *argvars[0].vval.v_string != NUL));
} }
/*
* Get the lnum from the first argument.
* Also accepts ".", "$", etc., but that only works for the current buffer.
* Returns -1 on error.
*/
linenr_T
tv_get_lnum(typval_T *argvars)
{
linenr_T lnum;
lnum = (linenr_T)tv_get_number_chk(&argvars[0], NULL);
if (lnum == 0) // no valid number, try using arg like line()
{
int fnum;
pos_T *fp = var2fpos(&argvars[0], TRUE, &fnum);
if (fp != NULL)
lnum = fp->lnum;
}
return lnum;
}
/*
* Get the lnum from the first argument.
* Also accepts "$", then "buf" is used.
* Returns 0 on error.
*/
linenr_T
tv_get_lnum_buf(typval_T *argvars, buf_T *buf)
{
if (argvars[0].v_type == VAR_STRING
&& argvars[0].vval.v_string != NULL
&& argvars[0].vval.v_string[0] == '$'
&& buf != NULL)
return buf->b_ml.ml_line_count;
return (linenr_T)tv_get_number_chk(&argvars[0], NULL);
}
#ifdef FEAT_FLOAT #ifdef FEAT_FLOAT
/* /*
* Get the float value of "argvars[0]" into "f". * Get the float value of "argvars[0]" into "f".
@@ -1500,33 +1478,6 @@ f_balloon_split(typval_T *argvars, typval_T *rettv UNUSED)
# endif # endif
#endif #endif
/*
* Get buffer by number or pattern.
*/
buf_T *
tv_get_buf(typval_T *tv, int curtab_only)
{
char_u *name = tv->vval.v_string;
buf_T *buf;
if (tv->v_type == VAR_NUMBER)
return buflist_findnr((int)tv->vval.v_number);
if (tv->v_type != VAR_STRING)
return NULL;
if (name == NULL || *name == NUL)
return curbuf;
if (name[0] == '$' && name[1] == NUL)
return lastbuf;
buf = buflist_find_by_name(name, curtab_only);
// If not found, try expanding the name, like done for bufexists().
if (buf == NULL)
buf = find_buffer(tv);
return buf;
}
/* /*
* Get the buffer from "arg" and give an error and return NULL if it is not * Get the buffer from "arg" and give an error and return NULL if it is not
* valid. * valid.
@@ -3450,13 +3401,6 @@ f_has(typval_T *argvars, typval_T *rettv)
1 1
#else #else
0 0
#endif
},
{"beos",
#ifdef __BEOS__
1
#else
0
#endif #endif
}, },
{"haiku", {"haiku",
@@ -5105,22 +5049,6 @@ f_invert(typval_T *argvars, typval_T *rettv)
rettv->vval.v_number = ~tv_get_number_chk(&argvars[0], NULL); rettv->vval.v_number = ~tv_get_number_chk(&argvars[0], NULL);
} }
/*
* Return TRUE if typeval "tv" is locked: Either that value is locked itself
* or it refers to a List or Dictionary that is locked.
*/
static int
tv_islocked(typval_T *tv)
{
return (tv->v_lock & VAR_LOCKED)
|| (tv->v_type == VAR_LIST
&& tv->vval.v_list != NULL
&& (tv->vval.v_list->lv_lock & VAR_LOCKED))
|| (tv->v_type == VAR_DICT
&& tv->vval.v_dict != NULL
&& (tv->vval.v_dict->dv_lock & VAR_LOCKED));
}
/* /*
* "islocked()" function * "islocked()" function
*/ */
@@ -5603,7 +5531,7 @@ find_some_match(typval_T *argvars, typval_T *rettv, matchtype_T type)
vim_free(li1->li_tv.vval.v_string); vim_free(li1->li_tv.vval.v_string);
li1->li_tv.vval.v_string = vim_strnsave(regmatch.startp[0], li1->li_tv.vval.v_string = vim_strnsave(regmatch.startp[0],
(int)(regmatch.endp[0] - regmatch.startp[0])); regmatch.endp[0] - regmatch.startp[0]);
li3->li_tv.vval.v_number = li3->li_tv.vval.v_number =
(varnumber_T)(regmatch.startp[0] - expr); (varnumber_T)(regmatch.startp[0] - expr);
li4->li_tv.vval.v_number = li4->li_tv.vval.v_number =
@@ -5638,7 +5566,7 @@ find_some_match(typval_T *argvars, typval_T *rettv, matchtype_T type)
copy_tv(&li->li_tv, rettv); copy_tv(&li->li_tv, rettv);
else else
rettv->vval.v_string = vim_strnsave(regmatch.startp[0], rettv->vval.v_string = vim_strnsave(regmatch.startp[0],
(int)(regmatch.endp[0] - regmatch.startp[0])); regmatch.endp[0] - regmatch.startp[0]);
} }
else if (l != NULL) else if (l != NULL)
rettv->vval.v_number = idx; rettv->vval.v_number = idx;
@@ -6311,6 +6239,72 @@ range_list_materialize(list_T *list)
break; break;
} }
/*
* "getreginfo()" function
*/
static void
f_getreginfo(typval_T *argvars, typval_T *rettv)
{
char_u *strregname;
int regname;
char_u buf[NUMBUFLEN + 2];
long reglen = 0;
dict_T *dict;
list_T *list;
if (argvars[0].v_type != VAR_UNKNOWN)
{
strregname = tv_get_string_chk(&argvars[0]);
if (strregname == NULL)
return;
}
else
strregname = get_vim_var_str(VV_REG);
regname = (strregname == NULL ? '"' : *strregname);
if (regname == 0 || regname == '@')
regname = '"';
if (rettv_dict_alloc(rettv) == FAIL)
return;
dict = rettv->vval.v_dict;
list = (list_T *)get_reg_contents(regname, GREG_EXPR_SRC | GREG_LIST);
if (list == NULL)
return;
dict_add_list(dict, "regcontents", list);
buf[0] = NUL;
buf[1] = NUL;
switch (get_reg_type(regname, &reglen))
{
case MLINE: buf[0] = 'V'; break;
case MCHAR: buf[0] = 'v'; break;
case MBLOCK:
vim_snprintf((char *)buf, sizeof(buf), "%c%ld", Ctrl_V,
reglen + 1);
break;
}
dict_add_string(dict, (char *)"regtype", buf);
buf[0] = get_register_name(get_unname_register());
buf[1] = NUL;
if (regname == '"')
dict_add_string(dict, (char *)"points_to", buf);
else
{
dictitem_T *item = dictitem_alloc((char_u *)"isunnamed");
if (item != NULL)
{
item->di_tv.v_type = VAR_SPECIAL;
item->di_tv.vval.v_number = regname == buf[0]
? VVAL_TRUE : VVAL_FALSE;
dict_add(dict, item);
}
}
}
static void static void
return_register(int regname, typval_T *rettv) return_register(int regname, typval_T *rettv)
{ {
@@ -6483,6 +6477,8 @@ search_cmn(typval_T *argvars, pos_T *match_pos, int *flagsp)
int options = SEARCH_KEEP; int options = SEARCH_KEEP;
int subpatnum; int subpatnum;
searchit_arg_T sia; searchit_arg_T sia;
int use_skip = FALSE;
pos_T firstpos;
pat = tv_get_string(&argvars[0]); pat = tv_get_string(&argvars[0]);
dir = get_search_arg(&argvars[1], flagsp); // may set p_ws dir = get_search_arg(&argvars[1], flagsp); // may set p_ws
@@ -6496,20 +6492,21 @@ search_cmn(typval_T *argvars, pos_T *match_pos, int *flagsp)
if (flags & SP_COLUMN) if (flags & SP_COLUMN)
options |= SEARCH_COL; options |= SEARCH_COL;
// Optional arguments: line number to stop searching and timeout. // Optional arguments: line number to stop searching, timeout and skip.
if (argvars[1].v_type != VAR_UNKNOWN && argvars[2].v_type != VAR_UNKNOWN) if (argvars[1].v_type != VAR_UNKNOWN && argvars[2].v_type != VAR_UNKNOWN)
{ {
lnum_stop = (long)tv_get_number_chk(&argvars[2], NULL); lnum_stop = (long)tv_get_number_chk(&argvars[2], NULL);
if (lnum_stop < 0) if (lnum_stop < 0)
goto theend; goto theend;
#ifdef FEAT_RELTIME
if (argvars[3].v_type != VAR_UNKNOWN) if (argvars[3].v_type != VAR_UNKNOWN)
{ {
#ifdef FEAT_RELTIME
time_limit = (long)tv_get_number_chk(&argvars[3], NULL); time_limit = (long)tv_get_number_chk(&argvars[3], NULL);
if (time_limit < 0) if (time_limit < 0)
goto theend; goto theend;
}
#endif #endif
use_skip = eval_expr_valid_arg(&argvars[4]);
}
} }
#ifdef FEAT_RELTIME #ifdef FEAT_RELTIME
@@ -6531,13 +6528,49 @@ search_cmn(typval_T *argvars, pos_T *match_pos, int *flagsp)
} }
pos = save_cursor = curwin->w_cursor; pos = save_cursor = curwin->w_cursor;
CLEAR_FIELD(firstpos);
CLEAR_FIELD(sia); CLEAR_FIELD(sia);
sia.sa_stop_lnum = (linenr_T)lnum_stop; sia.sa_stop_lnum = (linenr_T)lnum_stop;
#ifdef FEAT_RELTIME #ifdef FEAT_RELTIME
sia.sa_tm = &tm; sia.sa_tm = &tm;
#endif #endif
// Repeat until {skip} returns FALSE.
for (;;)
{
subpatnum = searchit(curwin, curbuf, &pos, NULL, dir, pat, 1L, subpatnum = searchit(curwin, curbuf, &pos, NULL, dir, pat, 1L,
options, RE_SEARCH, &sia); options, RE_SEARCH, &sia);
// finding the first match again means there is no match where {skip}
// evaluates to zero.
if (firstpos.lnum != 0 && EQUAL_POS(pos, firstpos))
subpatnum = FAIL;
if (subpatnum == FAIL || !use_skip)
// didn't find it or no skip argument
break;
firstpos = pos;
// If the skip expression matches, ignore this match.
{
int do_skip;
int err;
pos_T save_pos = curwin->w_cursor;
curwin->w_cursor = pos;
err = FALSE;
do_skip = eval_expr_to_bool(&argvars[4], &err);
curwin->w_cursor = save_pos;
if (err)
{
// Evaluating {skip} caused an error, break here.
subpatnum = FAIL;
break;
}
if (!do_skip)
break;
}
}
if (subpatnum != FAIL) if (subpatnum != FAIL)
{ {
if (flags & SP_SUBPAT) if (flags & SP_SUBPAT)
@@ -6832,14 +6865,9 @@ searchpair_cmn(typval_T *argvars, pos_T *match_pos)
skip = NULL; skip = NULL;
else else
{ {
// Type is checked later.
skip = &argvars[4]; skip = &argvars[4];
if (skip->v_type != VAR_FUNC && skip->v_type != VAR_PARTIAL
&& skip->v_type != VAR_STRING)
{
// Type error
semsg(_(e_invarg2), tv_get_string(&argvars[4]));
goto theend;
}
if (argvars[5].v_type != VAR_UNKNOWN) if (argvars[5].v_type != VAR_UNKNOWN)
{ {
lnum_stop = (long)tv_get_number_chk(&argvars[5], NULL); lnum_stop = (long)tv_get_number_chk(&argvars[5], NULL);
@@ -6963,12 +6991,7 @@ do_searchpair(
options |= SEARCH_START; options |= SEARCH_START;
if (skip != NULL) if (skip != NULL)
{ use_skip = eval_expr_valid_arg(skip);
// Empty string means to not use the skip expression.
if (skip->v_type == VAR_STRING || skip->v_type == VAR_FUNC)
use_skip = skip->vval.v_string != NULL
&& *skip->vval.v_string != NUL;
}
save_cursor = curwin->w_cursor; save_cursor = curwin->w_cursor;
pos = curwin->w_cursor; pos = curwin->w_cursor;
@@ -7245,6 +7268,37 @@ f_setpos(typval_T *argvars, typval_T *rettv)
} }
} }
/*
* Translate a register type string to the yank type and block length
*/
static int
get_yank_type(char_u **pp, char_u *yank_type, long *block_len)
{
char_u *stropt = *pp;
switch (*stropt)
{
case 'v': case 'c': // character-wise selection
*yank_type = MCHAR;
break;
case 'V': case 'l': // line-wise selection
*yank_type = MLINE;
break;
case 'b': case Ctrl_V: // block-wise selection
*yank_type = MBLOCK;
if (VIM_ISDIGIT(stropt[1]))
{
++stropt;
*block_len = getdigits(&stropt) - 1;
--stropt;
}
break;
default:
return FAIL;
}
*pp = stropt;
return OK;
}
/* /*
* "setreg()" function * "setreg()" function
*/ */
@@ -7258,7 +7312,11 @@ f_setreg(typval_T *argvars, typval_T *rettv)
int append; int append;
char_u yank_type; char_u yank_type;
long block_len; long block_len;
typval_T *regcontents;
int pointreg;
pointreg = 0;
regcontents = NULL;
block_len = -1; block_len = -1;
yank_type = MAUTO; yank_type = MAUTO;
append = FALSE; append = FALSE;
@@ -7272,8 +7330,58 @@ f_setreg(typval_T *argvars, typval_T *rettv)
if (regname == 0 || regname == '@') if (regname == 0 || regname == '@')
regname = '"'; regname = '"';
if (argvars[1].v_type == VAR_DICT)
{
dict_T *d = argvars[1].vval.v_dict;
dictitem_T *di;
if (d == NULL || d->dv_hashtab.ht_used == 0)
{
// Empty dict, clear the register (like setreg(0, []))
char_u *lstval[2] = {NULL, NULL};
write_reg_contents_lst(regname, lstval, 0, FALSE, MAUTO, -1);
return;
}
di = dict_find(d, (char_u *)"regcontents", -1);
if (di != NULL)
regcontents = &di->di_tv;
stropt = dict_get_string(d, (char_u *)"regtype", FALSE);
if (stropt != NULL)
{
int ret = get_yank_type(&stropt, &yank_type, &block_len);
if (ret == FAIL || *++stropt != NUL)
{
semsg(_(e_invargval), "value");
return;
}
}
if (regname == '"')
{
stropt = dict_get_string(d, (char_u *)"points_to", FALSE);
if (stropt != NULL)
{
pointreg = *stropt;
regname = pointreg;
}
}
else if (dict_get_number(d, (char_u *)"isunnamed"))
pointreg = regname;
}
else
regcontents = &argvars[1];
if (argvars[2].v_type != VAR_UNKNOWN) if (argvars[2].v_type != VAR_UNKNOWN)
{ {
if (yank_type != MAUTO)
{
semsg(_(e_toomanyarg), "setreg");
return;
}
stropt = tv_get_string_chk(&argvars[2]); stropt = tv_get_string_chk(&argvars[2]);
if (stropt == NULL) if (stropt == NULL)
return; // type error return; // type error
@@ -7283,32 +7391,19 @@ f_setreg(typval_T *argvars, typval_T *rettv)
case 'a': case 'A': // append case 'a': case 'A': // append
append = TRUE; append = TRUE;
break; break;
case 'v': case 'c': // character-wise selection default:
yank_type = MCHAR; get_yank_type(&stropt, &yank_type, &block_len);
break;
case 'V': case 'l': // line-wise selection
yank_type = MLINE;
break;
case 'b': case Ctrl_V: // block-wise selection
yank_type = MBLOCK;
if (VIM_ISDIGIT(stropt[1]))
{
++stropt;
block_len = getdigits(&stropt) - 1;
--stropt;
}
break;
} }
} }
if (argvars[1].v_type == VAR_LIST) if (regcontents && regcontents->v_type == VAR_LIST)
{ {
char_u **lstval; char_u **lstval;
char_u **allocval; char_u **allocval;
char_u buf[NUMBUFLEN]; char_u buf[NUMBUFLEN];
char_u **curval; char_u **curval;
char_u **curallocval; char_u **curallocval;
list_T *ll = argvars[1].vval.v_list; list_T *ll = regcontents->vval.v_list;
listitem_T *li; listitem_T *li;
int len; int len;
@@ -7353,14 +7448,17 @@ free_lstval:
vim_free(*--curallocval); vim_free(*--curallocval);
vim_free(lstval); vim_free(lstval);
} }
else else if (regcontents)
{ {
strval = tv_get_string_chk(&argvars[1]); strval = tv_get_string_chk(regcontents);
if (strval == NULL) if (strval == NULL)
return; return;
write_reg_contents_ex(regname, strval, -1, write_reg_contents_ex(regname, strval, -1,
append, yank_type, block_len); append, yank_type, block_len);
} }
if (pointreg != 0)
get_yank_register(pointreg, TRUE);
rettv->vval.v_number = 0; rettv->vval.v_number = 0;
} }
@@ -7532,9 +7630,30 @@ f_spellbadword(typval_T *argvars UNUSED, typval_T *rettv)
char_u *word = (char_u *)""; char_u *word = (char_u *)"";
hlf_T attr = HLF_COUNT; hlf_T attr = HLF_COUNT;
int len = 0; int len = 0;
#ifdef FEAT_SPELL
int wo_spell_save = curwin->w_p_spell;
if (!curwin->w_p_spell)
{
did_set_spelllang(curwin);
curwin->w_p_spell = TRUE;
}
if (*curwin->w_s->b_p_spl == NUL)
{
emsg(_(e_no_spell));
curwin->w_p_spell = wo_spell_save;
return;
}
#endif
if (rettv_list_alloc(rettv) == FAIL) if (rettv_list_alloc(rettv) == FAIL)
{
#ifdef FEAT_SPELL
curwin->w_p_spell = wo_spell_save;
#endif
return; return;
}
#ifdef FEAT_SPELL #ifdef FEAT_SPELL
if (argvars[0].v_type == VAR_UNKNOWN) if (argvars[0].v_type == VAR_UNKNOWN)
@@ -7547,7 +7666,7 @@ f_spellbadword(typval_T *argvars UNUSED, typval_T *rettv)
curwin->w_set_curswant = TRUE; curwin->w_set_curswant = TRUE;
} }
} }
else if (curwin->w_p_spell && *curbuf->b_s.b_p_spl != NUL) else if (*curbuf->b_s.b_p_spl != NUL)
{ {
char_u *str = tv_get_string_chk(&argvars[0]); char_u *str = tv_get_string_chk(&argvars[0]);
int capcol = -1; int capcol = -1;
@@ -7569,6 +7688,7 @@ f_spellbadword(typval_T *argvars UNUSED, typval_T *rettv)
} }
} }
} }
curwin->w_p_spell = wo_spell_save;
#endif #endif
list_append_string(rettv->vval.v_list, word, len); list_append_string(rettv->vval.v_list, word, len);
@@ -7594,13 +7714,32 @@ f_spellsuggest(typval_T *argvars UNUSED, typval_T *rettv)
int i; int i;
listitem_T *li; listitem_T *li;
int need_capital = FALSE; int need_capital = FALSE;
int wo_spell_save = curwin->w_p_spell;
if (!curwin->w_p_spell)
{
did_set_spelllang(curwin);
curwin->w_p_spell = TRUE;
}
if (*curwin->w_s->b_p_spl == NUL)
{
emsg(_(e_no_spell));
curwin->w_p_spell = wo_spell_save;
return;
}
#endif #endif
if (rettv_list_alloc(rettv) == FAIL) if (rettv_list_alloc(rettv) == FAIL)
{
#ifdef FEAT_SPELL
curwin->w_p_spell = wo_spell_save;
#endif
return; return;
}
#ifdef FEAT_SPELL #ifdef FEAT_SPELL
if (curwin->w_p_spell && *curwin->w_s->b_p_spl != NUL) if (*curwin->w_s->b_p_spl != NUL)
{ {
str = tv_get_string(&argvars[0]); str = tv_get_string(&argvars[0]);
if (argvars[1].v_type != VAR_UNKNOWN) if (argvars[1].v_type != VAR_UNKNOWN)
@@ -7637,6 +7776,7 @@ f_spellsuggest(typval_T *argvars UNUSED, typval_T *rettv)
} }
ga_clear(&ga); ga_clear(&ga);
} }
curwin->w_p_spell = wo_spell_save;
#endif #endif
} }
@@ -7821,7 +7961,7 @@ f_str2nr(typval_T *argvars, typval_T *rettv)
switch (base) switch (base)
{ {
case 2: what |= STR2NR_BIN + STR2NR_FORCE; break; case 2: what |= STR2NR_BIN + STR2NR_FORCE; break;
case 8: what |= STR2NR_OCT + STR2NR_FORCE; break; case 8: what |= STR2NR_OCT + STR2NR_OOCT + STR2NR_FORCE; break;
case 16: what |= STR2NR_HEX + STR2NR_FORCE; break; case 16: what |= STR2NR_HEX + STR2NR_FORCE; break;
} }
vim_str2nr(p, NULL, NULL, what, &n, NULL, 0, FALSE); vim_str2nr(p, NULL, NULL, what, &n, NULL, 0, FALSE);
@@ -8724,17 +8864,36 @@ f_trim(typval_T *argvars, typval_T *rettv)
char_u *prev; char_u *prev;
char_u *p; char_u *p;
int c1; int c1;
int dir = 0;
rettv->v_type = VAR_STRING; rettv->v_type = VAR_STRING;
if (head == NULL)
{
rettv->vval.v_string = NULL; rettv->vval.v_string = NULL;
if (head == NULL)
return; return;
}
if (argvars[1].v_type == VAR_STRING) if (argvars[1].v_type == VAR_STRING)
{
mask = tv_get_string_buf_chk(&argvars[1], buf2); mask = tv_get_string_buf_chk(&argvars[1], buf2);
if (argvars[2].v_type != VAR_UNKNOWN)
{
int error = 0;
// leading or trailing characters to trim
dir = (int)tv_get_number_chk(&argvars[2], &error);
if (error)
return;
if (dir < 0 || dir > 2)
{
semsg(_(e_invarg2), tv_get_string(&argvars[2]));
return;
}
}
}
if (dir == 0 || dir == 1)
{
// Trim leading characters
while (*head != NUL) while (*head != NUL)
{ {
c1 = PTR2CHAR(head); c1 = PTR2CHAR(head);
@@ -8753,8 +8912,13 @@ f_trim(typval_T *argvars, typval_T *rettv)
} }
MB_PTR_ADV(head); MB_PTR_ADV(head);
} }
}
for (tail = head + STRLEN(head); tail > head; tail = prev) tail = head + STRLEN(head);
if (dir == 0 || dir == 2)
{
// Trim trailing characters
for (; tail > head; tail = prev)
{ {
prev = tail; prev = tail;
MB_PTR_BACK(head, prev); MB_PTR_BACK(head, prev);
@@ -8773,7 +8937,8 @@ f_trim(typval_T *argvars, typval_T *rettv)
break; break;
} }
} }
rettv->vval.v_string = vim_strnsave(head, (int)(tail - head)); }
rettv->vval.v_string = vim_strnsave(head, tail - head);
} }
#ifdef FEAT_FLOAT #ifdef FEAT_FLOAT

View File

@@ -145,6 +145,7 @@ static struct vimvar
{VV_NAME("versionlong", VAR_NUMBER), VV_RO}, {VV_NAME("versionlong", VAR_NUMBER), VV_RO},
{VV_NAME("echospace", VAR_NUMBER), VV_RO}, {VV_NAME("echospace", VAR_NUMBER), VV_RO},
{VV_NAME("argv", VAR_LIST), VV_RO}, {VV_NAME("argv", VAR_LIST), VV_RO},
{VV_NAME("collate", VAR_STRING), VV_RO},
}; };
// shorthand // shorthand
@@ -164,7 +165,6 @@ static dict_T vimvardict; // Dictionary with v: variables
// for VIM_VERSION_ defines // for VIM_VERSION_ defines
#include "version.h" #include "version.h"
static char_u *skip_var_one(char_u *arg, int include_type);
static void list_glob_vars(int *first); static void list_glob_vars(int *first);
static void list_buf_vars(int *first); static void list_buf_vars(int *first);
static void list_win_vars(int *first); static void list_win_vars(int *first);
@@ -244,7 +244,9 @@ evalvars_init(void)
set_vim_var_nr(VV_ECHOSPACE, sc_col - 1); set_vim_var_nr(VV_ECHOSPACE, sc_col - 1);
set_reg_var(0); // default for v:register is not 0 but '"' // Default for v:register is not 0 but '"'. This is adjusted once the
// clipboard has been setup by calling reset_reg_var().
set_reg_var(0);
} }
#if defined(EXITFREE) || defined(PROTO) #if defined(EXITFREE) || defined(PROTO)
@@ -707,7 +709,7 @@ ex_let(exarg_T *eap)
if (eap->arg == eap->cmd) if (eap->arg == eap->cmd)
flags |= LET_NO_COMMAND; flags |= LET_NO_COMMAND;
argend = skip_var_list(arg, TRUE, &var_count, &semicolon); argend = skip_var_list(arg, TRUE, &var_count, &semicolon, FALSE);
if (argend == NULL) if (argend == NULL)
return; return;
if (argend > arg && argend[-1] == '.') // for var.='str' if (argend > arg && argend[-1] == '.') // for var.='str'
@@ -726,8 +728,18 @@ ex_let(exarg_T *eap)
else if (expr[0] == '.') else if (expr[0] == '.')
emsg(_("E985: .= is not supported with script version 2")); emsg(_("E985: .= is not supported with script version 2"));
else if (!ends_excmd2(eap->cmd, arg)) else if (!ends_excmd2(eap->cmd, arg))
// ":let var1 var2" {
if (current_sctx.sc_version == SCRIPT_VERSION_VIM9)
{
// Vim9 declaration ":let var: type"
arg = vim9_declare_scriptvar(eap, arg);
}
else
{
// ":let var1 var2" - list values
arg = list_arg_vars(eap, arg, &first); arg = list_arg_vars(eap, arg, &first);
}
}
else if (!eap->skip) else if (!eap->skip)
{ {
// ":let" // ":let"
@@ -904,7 +916,8 @@ ex_let_vars(
* Skip over assignable variable "var" or list of variables "[var, var]". * Skip over assignable variable "var" or list of variables "[var, var]".
* Used for ":let varvar = expr" and ":for varvar in expr". * Used for ":let varvar = expr" and ":for varvar in expr".
* For "[var, var]" increment "*var_count" for each variable. * For "[var, var]" increment "*var_count" for each variable.
* for "[var, var; var]" set "semicolon". * for "[var, var; var]" set "semicolon" to 1.
* If "silent" is TRUE do not give an "invalid argument" error message.
* Return NULL for an error. * Return NULL for an error.
*/ */
char_u * char_u *
@@ -912,7 +925,8 @@ skip_var_list(
char_u *arg, char_u *arg,
int include_type, int include_type,
int *var_count, int *var_count,
int *semicolon) int *semicolon,
int silent)
{ {
char_u *p, *s; char_u *p, *s;
@@ -923,9 +937,10 @@ skip_var_list(
for (;;) for (;;)
{ {
p = skipwhite(p + 1); // skip whites after '[', ';' or ',' p = skipwhite(p + 1); // skip whites after '[', ';' or ','
s = skip_var_one(p, TRUE); s = skip_var_one(p, FALSE);
if (s == p) if (s == p)
{ {
if (!silent)
semsg(_(e_invarg2), p); semsg(_(e_invarg2), p);
return NULL; return NULL;
} }
@@ -945,6 +960,7 @@ skip_var_list(
} }
else if (*p != ',') else if (*p != ',')
{ {
if (!silent)
semsg(_(e_invarg2), p); semsg(_(e_invarg2), p);
return NULL; return NULL;
} }
@@ -960,7 +976,7 @@ skip_var_list(
* l[idx]. * l[idx].
* In Vim9 script also skip over ": type" if "include_type" is TRUE. * In Vim9 script also skip over ": type" if "include_type" is TRUE.
*/ */
static char_u * char_u *
skip_var_one(char_u *arg, int include_type) skip_var_one(char_u *arg, int include_type)
{ {
char_u *end; char_u *end;
@@ -969,9 +985,12 @@ skip_var_one(char_u *arg, int include_type)
return arg + 2; return arg + 2;
end = find_name_end(*arg == '$' || *arg == '&' ? arg + 1 : arg, end = find_name_end(*arg == '$' || *arg == '&' ? arg + 1 : arg,
NULL, NULL, FNE_INCL_BR | FNE_CHECK_START); NULL, NULL, FNE_INCL_BR | FNE_CHECK_START);
if (include_type && current_sctx.sc_version == SCRIPT_VERSION_VIM9 if (include_type && current_sctx.sc_version == SCRIPT_VERSION_VIM9)
&& *end == ':')
{ {
// "a: type" is declaring variable "a" with a type, not "a:".
if (end == arg + 2 && end[-1] == ':')
--end;
if (*end == ':')
end = skip_type(skipwhite(end + 1)); end = skip_type(skipwhite(end + 1));
} }
return end; return end;
@@ -1185,6 +1204,13 @@ ex_let_one(
emsg(_("E996: Cannot lock an environment variable")); emsg(_("E996: Cannot lock an environment variable"));
return NULL; return NULL;
} }
if (current_sctx.sc_version == SCRIPT_VERSION_VIM9
&& (flags & LET_NO_COMMAND) == 0)
{
vim9_declare_error(arg);
return NULL;
}
// Find the end of the name. // Find the end of the name.
++arg; ++arg;
name = arg; name = arg;
@@ -2191,6 +2217,22 @@ set_argv_var(char **argv, int argc)
set_vim_var_list(VV_ARGV, l); set_vim_var_list(VV_ARGV, l);
} }
/*
* Reset v:register, taking the 'clipboard' setting into account.
*/
void
reset_reg_var(void)
{
int regname = 0;
// Adjust the register according to 'clipboard', so that when
// "unnamed" is present it becomes '*' or '+' instead of '"'.
#ifdef FEAT_CLIPBOARD
adjust_clip_reg(&regname);
#endif
set_reg_var(regname);
}
/* /*
* Set v:register if needed. * Set v:register if needed.
*/ */
@@ -2341,9 +2383,13 @@ get_var_tv(
*dip = v; *dip = v;
} }
if (tv == NULL && current_sctx.sc_version == SCRIPT_VERSION_VIM9) if (tv == NULL && (current_sctx.sc_version == SCRIPT_VERSION_VIM9
|| STRNCMP(name, "s:", 2) == 0))
{ {
imported_T *import = find_imported(name, 0, NULL); imported_T *import;
char_u *p = STRNCMP(name, "s:", 2) == 0 ? name + 2 : name;
import = find_imported(p, 0, NULL);
// imported variable from another script // imported variable from another script
if (import != NULL) if (import != NULL)
@@ -2512,7 +2558,7 @@ lookup_scriptvar(char_u *name, size_t len, cctx_T *dummy UNUSED)
} }
else else
{ {
p = vim_strnsave(name, (int)len); p = vim_strnsave(name, len);
if (p == NULL) if (p == NULL)
return NULL; return NULL;
} }
@@ -2589,7 +2635,7 @@ find_var_ht(char_u *name, char_u **varname)
if (*name == 'v') // v: variable if (*name == 'v') // v: variable
return &vimvarht; return &vimvarht;
if (get_current_funccal() != NULL if (get_current_funccal() != NULL
&& get_current_funccal()->func->uf_dfunc_idx == UF_NOT_COMPILED) && get_current_funccal()->func->uf_def_status == UF_NOT_COMPILED)
{ {
// a: and l: are only used in functions defined with ":function" // a: and l: are only used in functions defined with ":function"
if (*name == 'a') // a: function argument if (*name == 'a') // a: function argument
@@ -2827,6 +2873,15 @@ set_var_const(
} }
is_script_local = ht == get_script_local_ht(); is_script_local = ht == get_script_local_ht();
if (current_sctx.sc_version == SCRIPT_VERSION_VIM9
&& !is_script_local
&& (flags & LET_NO_COMMAND) == 0
&& name[1] == ':')
{
vim9_declare_error(name);
return;
}
di = find_var_in_ht(ht, 0, varname, TRUE); di = find_var_in_ht(ht, 0, varname, TRUE);
// Search in parent scope which is possible to reference from lambda // Search in parent scope which is possible to reference from lambda
@@ -2847,17 +2902,23 @@ set_var_const(
return; return;
} }
if (var_check_ro(di->di_flags, name, FALSE) if (is_script_local
|| var_check_lock(di->di_tv.v_lock, name, FALSE))
return;
if ((flags & LET_NO_COMMAND) == 0
&& is_script_local
&& current_sctx.sc_version == SCRIPT_VERSION_VIM9) && current_sctx.sc_version == SCRIPT_VERSION_VIM9)
{
if ((flags & LET_NO_COMMAND) == 0)
{ {
semsg(_("E1041: Redefining script item %s"), name); semsg(_("E1041: Redefining script item %s"), name);
return; return;
} }
// check the type
if (check_script_var_type(&di->di_tv, tv, name) == FAIL)
return;
}
if (var_check_ro(di->di_flags, name, FALSE)
|| var_check_lock(di->di_tv.v_lock, name, FALSE))
return;
} }
else else
// can only redefine once // can only redefine once

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