Compare commits

...

238 Commits

Author SHA1 Message Date
Bram Moolenaar
0f5a5ed8bb updated for version 7.3.1298
Problem:    Crash.
Solution:   Use STRCPY() instead of STRCAT() and allocate one more byte.
2013-07-03 17:51:17 +02:00
Bram Moolenaar
f4c5fcb3ad updated for version 7.3.1297
Problem:    findfile() directory matching does not work when a star follows
            text. (Markus Braun)
Solution:   Make a wildcard work properly. (Christian Brabandt)
2013-07-03 17:14:00 +02:00
Bram Moolenaar
8968a31179 updated for version 7.3.1296
Problem:    Only MS-Windows limits the GUI window size to what fits on the
            monitor.
Solution:   Limit the size for all systems. (Daniel Harding)
2013-07-03 16:58:44 +02:00
Bram Moolenaar
f4e1143697 updated for version 7.3.1295
Problem:    glob() and globpath() do not handle escaped special characters
            properly.
Solution:   Handle escaped characters differently. (Adnan Zafar)
2013-07-03 16:53:03 +02:00
Bram Moolenaar
a87aa8061c updated for version 7.3.1294
Problem:    ":diffoff" resets options.
Solution:   Save and restore option values. (Christian Brabandt)
2013-07-03 15:47:03 +02:00
Bram Moolenaar
caf2dffd51 updated for version 7.3.1293
Problem:    Put in empty buffer cannot be undone.
Solution:   Save one more line for undo. (Ozaki)
2013-07-03 14:19:54 +02:00
Bram Moolenaar
5e6d5ca16c updated for version 7.3.1292
Problem:    Possibly using invalid pointer when searcing for window. (Raichoo)
Solution:   Use "firstwin" instead of "tp_firstwin" for current tab.
2013-07-03 14:01:56 +02:00
Bram Moolenaar
e1fc4e2f0f updated for version 7.3.1291
Problem:    Compiler warnings for uninitialized variables. (Tony Mechelynck)
Solution:   Initialize the variables.
2013-07-03 13:29:58 +02:00
Bram Moolenaar
79f7e1475a updated for version 7.3.1290
Problem:    CTRL-R = in Insert mode changes the start of the insert position.
            (Ingo Karkat)
Solution:   Only break undo, don't start a new insert.
2013-07-03 13:16:23 +02:00
Bram Moolenaar
f9da680a0b updated for version 7.3.1289
Problem:    Get GLIB warning when removing a menu item.
Solution:   Reference menu-id and also call gtk_container_remove().  (Ivan
            Krasilnikov)
2013-07-03 13:04:27 +02:00
Bram Moolenaar
2951b77e50 updated for version 7.3.1288
Problem:    The first ":echo 'hello'" command output doesn't show.  Mapping
            for <S-F3> gets triggered during startup.
Solution:   Add debugging code for the termresponse.  When receiving the "Co"
            entry and when setting 'ambiwidth' redraw right away if possible.
            Add redraw_asap().  Don't set 'ambiwidth' if it already had the
            right value.  Do the 'ambiwidth' check in the second row to avoid
            confusion with <S-F3>.
2013-07-03 12:45:31 +02:00
Bram Moolenaar
4100937474 updated for version 7.3.1287
Problem:    Python SystemExit exception is not handled properly.
Solution:   Catch the exception and give an error. (Yasuhiro Matsumoto, Ken
            Takata)
2013-07-01 22:03:04 +02:00
Bram Moolenaar
c33916a6e0 updated for version 7.3.1286
Problem:    Check for screen size missing for Athena and Motif.
Solution:   Add call to limit_screen_size().
2013-07-01 21:43:08 +02:00
Bram Moolenaar
f5901aa195 updated for version 7.3.1285
Problem:    No tests for picking a window when selecting an entry in a
            location list.  Not picking the right window sometimes.
Solution:   Add test 96. Set usable_win appropriately. (Lech Lorens)
2013-07-01 21:25:25 +02:00
Bram Moolenaar
2982e70243 updated for version 7.3.1284
Problem:    Compiler warnings in MS-Windows clipboard handling.
Solution:   Add type casts. (Ken Takata)
2013-07-01 21:08:48 +02:00
Bram Moolenaar
72fe56f298 updated for version 7.3.1283
Problem:    Test 71 fails on MS-Windows.
Solution:   Put the binary data in a separate file. (Ken Takata)
2013-07-01 21:00:35 +02:00
Bram Moolenaar
bd65c46478 updated for version 7.3.1282
Problem:    'cursorline' not drawn in any other window. (Charles Campbell)
Solution:   Do draw the cursor line in other windows.
2013-07-01 20:18:33 +02:00
Bram Moolenaar
0e710d603e updated for version 7.3.1281
Problem:    When 'ttymouse' is set to "xterm2" clicking in column 123 moves
            the cursor to column 96. (Kevin Goodsell)
Solution:   Decode KE_CSI.
2013-07-01 20:06:19 +02:00
Bram Moolenaar
d05bf560ac updated for version 7.3.1280
Problem:    Reading memory already freed since patch 7.3.1247. (Simon
            Ruderich, Dominique Pelle)
Solution:   Copy submatches before reallocating the state list.
2013-06-30 23:24:08 +02:00
Bram Moolenaar
673b9a3cae updated for version 7.3.1279
Problem:    Compiler warning for variable uninitialized. (Tony Mechelynck)
Solution:   Add an init.
2013-06-30 22:43:27 +02:00
Bram Moolenaar
e057d40d96 updated for version 7.3.1278
Problem:    When someone sets the screen size to a huge value with "stty" Vim
            runs out of memory before reducing the size.
Solution:   Limit Rows and Columns in more places.
2013-06-30 17:51:51 +02:00
Bram Moolenaar
5a4d51e692 updated for version 7.3.1277
Problem:    In diff mode 'cursorline' also draws in the non-active window.
            When 'nu' and 'sbr' are set the 'sbr' string is not underlined.
Solution:   Only draw the cursor line in the current window. Combine the
            'cursorline' and other highlighting attributes. (Christian
            Brabandt)
2013-06-30 17:24:16 +02:00
Bram Moolenaar
85e932f2ca updated for version 7.3.1276
Problem:    When using a cscope connection resizing the window may send
            SIGWINCH to cscope and it quits.
Solution:   Call setpgid(0, 0) in the child process. (Narendran Gopalakrishnan)
2013-06-30 15:01:22 +02:00
Bram Moolenaar
e78495de7e updated for version 7.3.1275
Problem:    "gn" does not work when the match is a single character.
Solution:   Fix it, add a test. (Christian Brabandt)
2013-06-30 14:46:53 +02:00
Bram Moolenaar
2486285546 updated for version 7.3.1274
Problem:    When selecting an entry from a location list it may pick an
            arbitrary window or open a new one.
Solution:   Prefer using a window related to the location list. (Lech Lorens)
2013-06-30 13:57:45 +02:00
Bram Moolenaar
730d2c0747 updated for version 7.3.1273
Problem:    When copying a location list the index might be wrong.
Solution:   Set the index to one when using the first entry. (Lech Lorens)
2013-06-30 13:33:58 +02:00
Bram Moolenaar
55480dccf4 updated for version 7.3.1272
Problem:    Crash when editing Ruby file. (Aliaksandr Rahalevich)
Solution:   Reallocate the state list when necessary.
2013-06-30 13:17:24 +02:00
Bram Moolenaar
a4c8dcbdae updated for version 7.3.1271
Problem:    Command line completion does not work.
Solution:   Move setting xp_line down. (Daniel Thau)
2013-06-30 12:21:24 +02:00
Bram Moolenaar
14b6945e27 Updated runtime files. 2013-06-29 23:05:20 +02:00
Bram Moolenaar
10315b1201 updated for version 7.3.1270
Problem:    Using "Vp" in an empty buffer can't be undone. (Hauke Petersen)
Solution:   Save one line in an empty buffer. (Christian Brabandt)
2013-06-29 17:19:28 +02:00
Bram Moolenaar
6b487147ac updated for version 7.3.1269
Problem:    Insert completion keeps entry selected even though the list has
            changed. (Olivier Teuliere)
Solution:   Reset compl_shown_match and compl_curr_match. (Christian Brabandt)
2013-06-29 16:21:58 +02:00
Bram Moolenaar
39efa89afb updated for version 7.3.1268
Problem:    ACL support doesn't work when when compiled with MingW.
Solution:   Support ACL on MingW. (Ken Takata)
2013-06-29 15:40:04 +02:00
Bram Moolenaar
2751592119 updated for version 7.3.1267
Problem:    MS-Windows ACL support doesn't work well.
Solution:   Implement more ACL support. (Ken Takata)
2013-06-29 15:36:26 +02:00
Bram Moolenaar
a8e3580be6 updated for version 7.3.1266
Problem:    QNX: GUI fails to start.
Solution:   Remove the QNX-specific #ifdef. (Sean Boudreau)
2013-06-29 15:19:21 +02:00
Bram Moolenaar
630a730f9b updated for version 7.3.1265
Problem:    Accepting "Vim:" for a modeline causes errors too often.
Solution:   Require "Vim:" to be followed by "set".
2013-06-29 15:07:22 +02:00
Bram Moolenaar
f3fe392760 updated for version 7.3.1264
Problem:    Missing m_nowait.
Solution:   Include missing part of the patch.
2013-06-29 14:47:22 +02:00
Bram Moolenaar
4a46070365 updated for version 7.3.1263
Problem:    Typo in short option name.
Solution:   Change "imse" to "imsf".
2013-06-29 14:42:26 +02:00
Bram Moolenaar
fe17e7640d updated for version 7.3.1262
Problem:    Crash and compilation warnings with Cygwin.
Solution:   Check return value of XmbTextListToTextProperty(). Add type casts.
            Adjust #ifdefs. (Lech Lorens)
2013-06-29 14:17:02 +02:00
Bram Moolenaar
72179e1bd0 updated for version 7.3.1261
Problem:    A buffer-local language mapping from a keymap stops a global
            insert mode mapping from working. (Ron Aaron)
Solution:   Do not wait for more characters to be typed only when the mapping
            was defined with <nowait>.
2013-06-29 13:58:31 +02:00
Bram Moolenaar
b751546636 updated for version 7.3.1260
Problem:    User completion does not get the whole command line in the command
            line window.
Solution:   Pass on the whole command line. (Daniel Thau)
2013-06-29 12:58:33 +02:00
Bram Moolenaar
560c52d32b updated for version 7.3.1259
Problem:    No test for patch 7.3.1258
Solution:   Add a test entry.
2013-06-29 12:10:26 +02:00
Bram Moolenaar
4d9ae21a34 updated for version 7.3.1258
Problem:    Using submatch() may crash Vim. (Ingo Karkat)
Solution:   Restore the number of subexpressions used.
2013-06-28 23:04:42 +02:00
Bram Moolenaar
e3a0b53c2e updated for version 7.3.1257
Problem:    With GNU gettext() ":lang de_DE.utf8" does not always result in
            German messages.
Solution:   Clear the $LANGUAGE environment variable.
2013-06-28 20:36:30 +02:00
Bram Moolenaar
f0327f67c7 updated for version 7.3.1256
Problem:    Can't build without eval or autocmd feature.
Solution:   Add #ifdefs.
2013-06-28 20:16:55 +02:00
Bram Moolenaar
22dbc77ef1 Update runtime files. Remove duplicate tags in help. 2013-06-28 18:44:48 +02:00
Bram Moolenaar
6470de83f2 updated for version 7.3.1255
Problem:    Clang warnings when building with Athena.
Solution:   Add type casts. (Dominique Pelle)
2013-06-27 22:36:03 +02:00
Bram Moolenaar
a5f5c8be8f updated for version 7.3.1254
Problem:    Can't build without the multi-lang feature. (John Marriott)
Solution:   Add #ifdef.
2013-06-27 22:29:38 +02:00
Bram Moolenaar
5737ca2350 updated for version 7.3.1253
Problem:    Still undo problem after using CTRL-R = setline(). (Hirohito
            Higashi)
Solution:   Set the ins_need_undo flag.
2013-06-27 22:21:24 +02:00
Bram Moolenaar
c9dcb42704 updated for version 7.3.1252
Problem:    Gvim does not find the toolbar bitmap files in ~/vimfiles/bitmaps
            if the corresponding menu command contains additional characters
            like the shortcut marker '&' or if you use a non-english locale.
Solution:   Use menu->en_dname or menu->dname. (Martin Gieseking)
2013-06-27 22:02:02 +02:00
Bram Moolenaar
9b846cb8ac updated for version 7.3.1251
Problem:    Test 61 messes up viminfo.
Solution:   Specify a separate viminfo file.
2013-06-26 21:56:36 +02:00
Bram Moolenaar
877aa00811 updated for version 7.3.1250
Problem:    Python tests fail on MS-Windows.
Solution:   Change backslashes to slashes. (Taro Muraoka)
2013-06-26 21:49:51 +02:00
Bram Moolenaar
c14621eafb updated for version 7.3.1249
Problem:    Modeline not recognized when using "Vim" instead of "vim".
Solution:   Also accept "Vim".
2013-06-26 20:04:35 +02:00
Bram Moolenaar
abab85a499 updated for version 7.3.1248
Problem:    Still have old hacking code for Input Method.
Solution:   Add 'imactivatefunc' and 'imstatusfunc' as a generic solution to
            Input Method activation. (Yukihiro Nakadaira)
2013-06-26 19:18:05 +02:00
Bram Moolenaar
a0169128d9 updated for version 7.3.1247
Problem:    New regexp engine: '[ ]\@!\p\%([ ]\@!\p\)*:' does not always match.
Solution:   When there is a PIM add a duplicate state that starts at another
            position.
2013-06-26 18:16:58 +02:00
Bram Moolenaar
b893ac2098 updated for version 7.3.1246
Problem:    When setting 'winfixheight' and resizing the window causes the
            window layout to be wrong.
Solution:   Add frame_check_height() and frame_check_width() (Yukihiro
            Nakadaira)
2013-06-26 14:04:47 +02:00
Bram Moolenaar
31c31679e2 Updated runtime files. New version of TOhtml plugin. 2013-06-26 13:28:14 +02:00
Bram Moolenaar
b052fe0e2c updated for version 7.3.1245
Problem:    MS-Windows: confirm() dialog text may still not fit.
Solution:   Use GetTextWidthEnc() instead of GetTextWidth() in two more
            places. (Yasuhiro Matsumoto)
2013-06-26 13:16:20 +02:00
Bram Moolenaar
f05d81102c updated for version 7.3.1244
Problem:    MS-Windows: confirm() dialog text may not fit.
Solution:   Use GetTextWidthEnc() instead of GetTextWidth(). (Yasuhiro
            Matsumoto)
2013-06-26 12:58:32 +02:00
Bram Moolenaar
f86c0b01a7 updated for version 7.3.1243
Problem:    New regexp engine: back references in look-behind match don't
            work. (Lech Lorens)
Solution:   Copy the submatches before a recursive match.
2013-06-26 12:42:44 +02:00
Bram Moolenaar
daa270289b updated for version 7.3.1242
Problem:    No failure when trying to use a number as a string.
Solution:   Give an error when StringToLine() is called with an instance of
            the wrong type. (Jun Takimoto)
2013-06-24 22:33:30 +02:00
Bram Moolenaar
c8c13a0307 updated for version 7.3.1241
Problem:    Some test files missing from the distribution.
Solution:   Update the list of files.
2013-06-24 22:23:55 +02:00
Bram Moolenaar
56b45b9b37 Update runtime files. 2013-06-24 22:22:18 +02:00
Bram Moolenaar
df2bc27b52 updated for version 7.3.1240
Problem:    Memory leak in findfile().
Solution:   Free the memory. (Christian Brabandt)
2013-06-24 22:17:32 +02:00
Bram Moolenaar
c1c3d68da9 updated for version 7.3.1239
Problem:    Can't build with Python and MSVC10.
Solution:   Move #if outside of macro. (Taro Muraoka)
2013-06-24 21:21:58 +02:00
Bram Moolenaar
d5e376eb3b updated for version 7.3.1238
Problem:    Crash in Python interface on 64 bit machines.
Solution:   Change argument type of PyString_AsStringAndSize. (Taro Muraoka,
            Jun Takimoto)
2013-06-24 20:32:57 +02:00
Bram Moolenaar
7e85d3d432 updated for version 7.3.1237
Problem:    Python: non-import errors not handled correctly.
Solution:   Let non-ImportError exceptions pass the finder. (ZyX)
2013-06-23 16:40:39 +02:00
Bram Moolenaar
dee2e315d7 updated for version 7.3.1236
Problem:    Python: WindowSetattr() missing support for NUMBER_UNSIGNED.
Solution:   Add NUMBER_UNSIGNED, add more tests. Various fixes. (ZyX)
2013-06-23 16:35:47 +02:00
Bram Moolenaar
ede3e6383d updated for version 7.3.1235
Problem:    In insert mode CTRL-] is not inserted, on the command-line it is.
Solution:   Don't insert CTRL-] on the command line. (Yukihiro Nakadaira)
2013-06-23 16:16:19 +02:00
Bram Moolenaar
6f1404f8a8 updated for version 7.3.1234
Problem:    Python: Strings are not marked for translation.
Solution:   Add N_() where appropriate. (ZyX)
2013-06-23 16:04:08 +02:00
Bram Moolenaar
841fbd2907 updated for version 7.3.1233
Problem:    Various Python problems.
Solution:   Fix VimTryEnd. Crash with debug build and PYTHONDUMPREFS=1. Memory
            leaks in StringToLine(), BufferMark() and convert_dl. (ZyX)
2013-06-23 14:37:07 +02:00
Bram Moolenaar
c4b99e0be7 updated for version 7.3.1232
Problem:    Python: inconsistencies in variable names.
Solution:   Rename variables. (ZyX)
2013-06-23 14:30:47 +02:00
Bram Moolenaar
141be8a585 updated for version 7.3.1231
Problem:    Python: use of numbers not consistent.
Solution:   Add support for Number protocol. (ZyX)
2013-06-23 14:16:57 +02:00
Bram Moolenaar
c476e52fca updated for version 7.3.1230
Problem:    Python: Exception messages are not clear.
Solution:   Make exception messages more verbose. (ZyX)
2013-06-23 13:46:40 +02:00
Bram Moolenaar
0bd80ccd85 updated for version 7.3.1229
Problem:    Python: not so easy to delete/restore translating.
Solution:   Make macros do translation of exception messages. (ZyX)
            Note: this breaks translations!
2013-06-23 13:28:17 +02:00
Bram Moolenaar
808c2bc8bf updated for version 7.3.1228
Problem:    Python: various inconsistencies and problems.
Solution:   StringToLine now supports both bytes() and unicode() objects.
            Make function names consistant.  Fix memory leak fixed in
            StringToLine. (ZyX)
2013-06-23 13:11:18 +02:00
Bram Moolenaar
389a1793f4 updated for version 7.3.1227
Problem:    Inconsistent string conversion.
Solution:   Use 'encoding' instead of utf-8. Use METH_O in place of
            METH_VARARGS where appropriate. (ZyX)
2013-06-23 13:00:44 +02:00
Bram Moolenaar
6c85e7f3be updated for version 7.3.1226
Problem:    Python: duplicate code.
Solution:   Share code between OutputWrite() and OutputWritelines(). (ZyX)
2013-06-23 12:51:32 +02:00
Bram Moolenaar
3dbcd0c7ad updated for version 7.3.1225
Problem:    Compiler warnings when building with Motif.
Solution:   Change set_label() argument. (Kazunobu Kuriyama)
2013-06-22 13:00:16 +02:00
Bram Moolenaar
fe70acb376 updated for version 7.3.1224
Problem:    Clang gives warnings on xxd.
Solution:   Change how to use part of a string. (Dominique Pelle) Also avoid
            warning for return not reached.
2013-06-21 18:31:23 +02:00
Bram Moolenaar
d73895ec00 updated for version 7.3.1223
Problem:    Tests fail on MS-Windows.
Solution:   Avoid depending on OS version. Use DOS commands instead of Unix
            commands. (Taro Muraoka, Ken Takata)
2013-06-19 21:17:31 +02:00
Bram Moolenaar
22f93c700f updated for version 7.3.1222
Problem:    Cannot execute some tests from the src directoly.
Solution:   Add missing targets.
2013-06-19 20:11:50 +02:00
Bram Moolenaar
a6cc03101e updated for version 7.3.1221
Problem:    When build flags change "make distclean" run into a configure
            error.
Solution:   When CFLAGS changes delete auto/config.cache.  Also avoid adding
            duplicate text to flags.
2013-06-18 23:31:55 +02:00
Bram Moolenaar
db250526bb updated for version 7.3.1220
Problem:    MS-Windows: When using wide font italic and bold are not included.
Solution:   Support wide-bold, wide-italic and wide-bold-italic. (Ken Takata,
            Taro Muraoka)
2013-06-17 22:43:25 +02:00
Bram Moolenaar
a0c85c7ae1 updated for version 7.3.1219
Problem:    No test for using []] inside \%[].
Solution:   Add a test.
2013-06-17 22:04:38 +02:00
Bram Moolenaar
555d2a8340 updated for version 7.3.1218
Problem:    "make test" on MS-Windows does not clean all temporary files and
            gives some unneccessary message.
Solution:   Clean the right files.  Create .failed files. (Ken Takata)
2013-06-17 21:53:37 +02:00
Bram Moolenaar
d79862599d updated for version 7.3.1217
Problem:    New regexp engine: Can't handle \%[[ao]]. (Yukihiro Nakadaira)
Solution:   Support nested atoms inside \%[].
2013-06-17 21:33:41 +02:00
Bram Moolenaar
6324c3b920 updated for version 7.3.1216
Problem:    Configure can't find Motif on Ubuntu.
Solution:   Search for libXm in /usr/lib/*-linux-gnu.
2013-06-17 20:27:18 +02:00
Bram Moolenaar
06ae70d07c updated for version 7.3.1215
Problem:    Compiler warning for function not defined.
Solution:   Add #ifdef.
2013-06-17 19:26:36 +02:00
Bram Moolenaar
01b626c26e updated for version 7.3.1214
Problem:    Missing declaration for init_users() and realloc_post_list().
            (Salman Halim)
Solution:   Add the declarations.
2013-06-16 22:49:14 +02:00
Bram Moolenaar
8c0e322f18 updated for version 7.3.1213
Problem:    Can't build with small features and Python.
Solution:   Adjust #ifdefs.
2013-06-16 17:32:40 +02:00
Bram Moolenaar
6949eea7cc updated for version 7.3.1212
Problem:    "make test" on MS-Windows does not report failure like Unix does.
Solution:   Make it work like on Unix. (Taro Muraoka)
2013-06-16 16:57:46 +02:00
Bram Moolenaar
5246cd7a9b updated for version 7.3.1211
Problem:    MS-Windows: When 'encoding' differs from the current codepage
            ":hardcopy" does not work properly.
Solution:   Use TextOutW() and SetDlgItemTextW(). (Ken Takata)
2013-06-16 16:41:47 +02:00
Bram Moolenaar
03e114b0f2 updated for version 7.3.1210
Problem:    'backupcopy' default on MS-Windows is wrong when 'encoding' equals
            the current codepage.
Solution:   Change the #else block. (Ken Takata)
2013-06-16 16:34:56 +02:00
Bram Moolenaar
70baa405f2 updated for version 7.3.1209
Problem:    No completion for ":tabdo".
Solution:   Add tabdo to the list of modifiers. (Dominique Pelle)
2013-06-16 16:14:03 +02:00
Bram Moolenaar
427d51c23f updated for version 7.3.1208
Problem:    Compiler warnings on MS-Windows.
Solution:   Add type cast.  Move variable declaration. (Mike Williams)
2013-06-16 16:01:25 +02:00
Bram Moolenaar
a50d02d983 updated for version 7.3.1207
Problem:    New regexp engine: no match found on "#if FOO". (Lech Lorens)
Solution:   When adding a state gets skipped don't adjust the index.
2013-06-16 15:43:50 +02:00
Bram Moolenaar
5ab9d98b9a updated for version 7.3.1206
Problem:    Inconsistent function argument declarations.
Solution:   Use ANSI style.
2013-06-16 14:25:57 +02:00
Bram Moolenaar
926b5d3b30 updated for version 7.3.1205
Problem:    logtalk.dict is not removed on uninstall.
Solution:   Remove the file. (Kazunobu Kuriyama)
2013-06-16 14:20:13 +02:00
Bram Moolenaar
d69497413f updated for version 7.3.1204
Problem:    Calling gettabwinvar() in 'tabline' cancels Visual mode. (Hirohito
            Higashi)
Solution:   Don't always use goto_tabpage_tp().
2013-06-16 14:18:28 +02:00
Bram Moolenaar
4ce239b0b1 updated for version 7.3.1203
Problem:    Matches from matchadd() might be highlighted incorrectly when they
            are at a fixed position and inserting lines. (John Szakmeister)
Solution:   Redraw all lines below a change if there are highlighted matches.
            (idea by Christian Brabandt)
2013-06-15 23:00:30 +02:00
Bram Moolenaar
3351679948 updated for version 7.3.1202
Problem:    Tags are not found in case-folded tags file. (Darren cole, Issue
            90)
Solution:   Take into account that when case folding was used for the tags
            file "!rm" sorts before the "!_TAG" header lines.
2013-06-15 22:26:52 +02:00
Bram Moolenaar
e66f06d819 updated for version 7.3.1201
Problem:    When a startup script creates a preview window, it probably
            becomes the current window.
Solution:   Make another window the current one. (Christian Brabandt)
2013-06-15 21:54:16 +02:00
Bram Moolenaar
52b91d801a Updated runtime files. 2013-06-15 21:39:51 +02:00
Bram Moolenaar
df9259abce updated for version 7.3.1200
Problem:    When calling setline() from Insert mode, using CTRL-R =, undo does
            not work properly. (Israel Chauca)
Solution:   Sync undo after evaluating the expression. (Christian Brabandt)
2013-06-15 17:54:43 +02:00
Bram Moolenaar
dab38d516e updated for version 7.3.1199
Problem:    When evaluating 'foldexpr' causes an error this is silently
            ignored and evaluation is retried every time.
Solution:   Set emsg_silent instead of emsg_off. Stop evaluating 'foldexpr' is
            it is causing errors.  (Christian Brabandt)
2013-06-15 17:06:36 +02:00
Bram Moolenaar
9be6e21575 updated for version 7.3.1198
Problem:    Build error when using Perl 5.18.0 and dynamic loading.
Solution:   Change #ifdefs for Perl_croak_xs_usage. (Ike Devolder)
2013-06-15 16:47:35 +02:00
Bram Moolenaar
ff1806f8da updated for version 7.3.1197
Problem:    ":wviminfo!" does not write history previously read from a viminfo
            file.  (Roland Eggner)
Solution:   When not merging history write all entries.
2013-06-15 16:31:47 +02:00
Bram Moolenaar
141f6bb341 updated for version 7.3.1196
Problem:    Old regexp engine does not match pattern with backref correctly.
            (Dominique Pelle)
Solution:   Fix setting status.  Test multi-line patterns better.
2013-06-15 15:09:50 +02:00
Bram Moolenaar
4cff8faf05 updated for version 7.3.1195
Problem:    Compiler warning for unitialized variable. (Tony Mechelynck)
Solution:   Set the length to the matching backref.
2013-06-14 22:48:54 +02:00
Bram Moolenaar
44c71db771 updated for version 7.3.1194
Problem:    Yaml highlighting is slow.
Solution:   Tune the estimation of pattern failure chance.
2013-06-14 22:33:51 +02:00
Bram Moolenaar
1612b1abe7 updated for version 7.3.1193
Problem:    fail_if_missing not used for Python 3.
Solution:   Give an error when Python 3 can't be configured. (Andrei Olsen)
2013-06-14 21:22:39 +02:00
Bram Moolenaar
c5089bb8ff updated for version 7.3.1192
Problem:    Valgrind reports errors when using backreferences. (Dominique
            Pelle)
Solution:   Do not check the end of submatches.
2013-06-14 21:15:25 +02:00
Bram Moolenaar
580abea48a updated for version 7.3.1191
Problem:    Backreference to previous line doesn't work. (Lech Lorens)
Solution:   Implement looking in another line.
2013-06-14 20:31:28 +02:00
Bram Moolenaar
6e70736cbc updated for version 7.3.1190
Problem:    Compiler warning for parentheses. (Christian Wellenbrock)
Solution:   Change #ifdef.
2013-06-14 19:15:58 +02:00
Bram Moolenaar
4c46b5e001 updated for version 7.3.1189
Problem:    Highlighting is still wrong sometimes. (Dominique Pelle)
Solution:   Also restore reginput properly.
2013-06-13 22:59:30 +02:00
Bram Moolenaar
9d438d3b38 updated for version 7.3.1188
Problem:    Newline characters messing up error message.
Solution:   Remove the newlines. (Kazunobu Kuriyama)
2013-06-13 21:57:20 +02:00
Bram Moolenaar
0c6633a7ea updated for version 7.3.1187
Problem:    "s:" is recognized but "<SID>" is not. (ZyX)
Solution:   Translate "<SID>" like "s:".
2013-06-13 21:24:06 +02:00
Bram Moolenaar
5f87b23229 updated for version 7.3.1186
Problem:    Python 3: test 87 may crash.
Solution:   Use _PyArg_Parse_SizeT instead of PyArg_Parse. (Jun Takimoto)
2013-06-13 20:57:50 +02:00
Bram Moolenaar
b62bcd1e05 updated for version 7.3.1185
Problem:    New regexp engine: no match with ^ after \n. (SungHyun Nam)
Solution:   Fix it, add a test.
2013-06-13 20:19:40 +02:00
Bram Moolenaar
484d241a4a updated for version 7.3.1184
Problem:    Highlighting is sometimes wrong. (Axel Bender)
Solution:   Fetch regline again when returning from recursive regmatch.
2013-06-13 19:47:07 +02:00
Bram Moolenaar
98bfc2d5ee Add missing files from 7.3.1183. 2013-06-13 19:44:55 +02:00
Bram Moolenaar
82850dd9cb updated for version 7.3.1183
Problem:    Python tests 86 and 87 fail.
Solution:   Add "empty" files. (ZyX)
2013-06-13 19:27:18 +02:00
Bram Moolenaar
12b559e7c3 updated for version 7.3.1182
Problem:    'backupcopy' default on MS-Windows does not work for hard and soft
            links.
Solution:   Check for links. (David Pope, Ken Takata)
2013-06-12 22:41:37 +02:00
Bram Moolenaar
2a876e40ce updated for version 7.3.1181
Problem:    Wrong error message for 1.0[0].
Solution:   Check for funcref and float separately. (Yasuhiro Matsumoto)
2013-06-12 22:08:58 +02:00
Bram Moolenaar
ec7944aaf2 Update runtime files. 2013-06-12 21:29:15 +02:00
Bram Moolenaar
cab465a6d7 updated for version 7.3.1180
Problem:    When current directory changes, path from cscope may no longer be
            valid. (AS Budden)
Solution:   Always store the absolute path. (Christian Brabandt)
2013-06-12 21:25:23 +02:00
Bram Moolenaar
0825c00f14 updated for version 7.3.1179
Problem:    When a global mapping starts with the same characters as a
            buffer-local mapping Vim waits for a character to be typed to find
            out whether the global mapping is to be used. (Andy Wokula)
Solution:   Use the local mapping without waiting. (Michael Henry)
2013-06-12 21:00:26 +02:00
Bram Moolenaar
22971aaa45 updated for version 7.3.1178
Problem:    Can't put all Vim config files together in one directory.
Solution:   Load ~/.vim/vimrc if ~/.vimrc does not exist. (Lech Lorens)
2013-06-12 20:35:58 +02:00
Bram Moolenaar
6395af8018 updated for version 7.3.1177
Problem:    Wasting memory on padding.
Solution:   Reorder struct fields. (Dominique Pelle)
2013-06-12 19:52:15 +02:00
Bram Moolenaar
edb07a2d88 updated for version 7.3.1176
Problem:    Compiler warnings on 64 bit system.
Solution:   Add type casts. (Mike Williams)
2013-06-12 18:13:38 +02:00
Bram Moolenaar
2d473ab932 updated for version 7.3.1175
Problem:    Using isalpha() and isalnum() can be slow.
Solution:   Use range checks. (Mike Williams)
2013-06-12 17:12:24 +02:00
Bram Moolenaar
81c40c507c updated for version 7.3.1174
Problem:    Python 2 and 3 use different ways to load modules.
Solution:   Use the same method. (ZyX)
2013-06-12 14:41:04 +02:00
Bram Moolenaar
27610ed76c updated for version 7.3.1173
Problem:    Python 2 tests don't have the same output everywhere.
Solution:   Make the Python 2 tests more portable. (ZyX)
2013-06-12 14:26:26 +02:00
Bram Moolenaar
9f3685a527 updated for version 7.3.1172
Problem:    Python 2: loading modules doesn't work well.
Solution:   Fix the code. Add more tests. (ZyX)
2013-06-12 14:20:36 +02:00
Bram Moolenaar
0ea4a6b94b updated for version 7.3.1171
Problem:    Check for digits and ascii letters can be faster.
Solution:   Use a trick with one comparison. (Dominique Pelle)
2013-06-12 14:10:26 +02:00
Bram Moolenaar
60bf1f58d0 updated for version 7.3.1170
Problem:    Patch 7.3.1058 breaks backwards compatibility, not possible to use
            a function reference as a string. (lilydjwg)
Solution:   Instead of translating the function name only translate "s:".
2013-06-12 13:37:43 +02:00
Bram Moolenaar
a2947e2bea updated for version 7.3.1169
Problem:    New regexp engine: some work is done while executing a pattern,
            even though the result is predictable.
Solution:   Do the work while compiling the pattern.
2013-06-11 22:44:09 +02:00
Bram Moolenaar
780c3e9b04 updated for version 7.3.1168
Problem:    Python "sane" configure checks give a warning message.
Solution:   Use single quotes intead of escaped double quotes. (Ben Fritz)
2013-06-11 20:53:28 +02:00
Bram Moolenaar
3c7ad013fb updated for version 7.3.1167
Problem:    Python configure check doesn't reject Python 2 when requesting
            Python 3.  Some systems need -pthreads instead of -pthread.
Solution:   Adjust configure accordingly. (Andrei Olsen)
2013-06-11 19:53:45 +02:00
Bram Moolenaar
a9f2220176 updated for version 7.3.1166
Problem:    Loading Python modules is not tested.
Solution:   Enable commented-out tests, add missing files. (ZyX)
2013-06-11 18:48:21 +02:00
Bram Moolenaar
16619a235b updated for version 7.3.1165
Problem:    HP-UX compiler can't handle zero size array. (Charles Cooper)
Solution:   Make the array one item big.
2013-06-11 18:42:36 +02:00
Bram Moolenaar
9a773488a7 updated for version 7.3.1164
Problem:    Can't test what is actually displayed on screen.
Solution:   Add the screenchar() and screenattr() functions.
2013-06-11 18:40:13 +02:00
Bram Moolenaar
c09a6d6c0c updated for version 7.3.1163
Problem:    Not easy to load Python modules.
Solution:   Search "python2", "python3" and "pythonx" directories in
            'runtimepath' for Python modules. (ZyX)
2013-06-10 21:27:29 +02:00
Bram Moolenaar
f9c9b32bd1 updated for version 7.3.1162
Problem:    Python: Memory leaks
Solution:   Add more Py_DECREF(). (ZyX)
2013-06-10 20:47:36 +02:00
Bram Moolenaar
c1ba10c7f6 updated for version 7.3.1161
Problem:    Python: PyList_SetItem() is inefficient.
Solution:   Use PyList_SET_ITEM() (ZyX)
2013-06-10 20:39:03 +02:00
Bram Moolenaar
570064cf21 updated for version 7.3.1160
Problem:    Mixing long and pointer doesn't always work.
Solution:   Avoid cast to pointer.
2013-06-10 20:25:10 +02:00
Bram Moolenaar
a2e14fc764 updated for version 7.3.1159
Problem:    The round() function is not always available. (Christ van
            Willegen)
Solution:   Use the solution from f_round().
2013-06-10 20:10:44 +02:00
Bram Moolenaar
0bdda37fb4 updated for version 7.3.1158
Problem:    Crash when running test 86. (Jun Takimoto)
Solution:   Define PY_SSIZE_T_CLEAN early. (Elimar Riesebieter)
2013-06-10 18:36:24 +02:00
Bram Moolenaar
bcf4d178ab updated for version 7.3.1157
Problem:    New regexp engine fails on "\(\<command\)\@<=.*"
Solution:   Fix rule for postponing match.  Further tune estimating whether
            postponing works better.  Add test.
2013-06-10 16:35:18 +02:00
Bram Moolenaar
4380d1ea23 updated for version 7.3.1156
Problem:    Compiler warnings. (dv1445)
Solution:   Initialize variables, even when the value isn't really used.
2013-06-09 20:51:00 +02:00
Bram Moolenaar
11354759e2 updated for version 7.3.1155
Problem:    MS-DOS: "make test" uses external rmdir command.
Solution:   Rename "rmdir" to "rd". (Taro Muraoka)
2013-06-09 17:52:46 +02:00
Bram Moolenaar
927d4a1fb5 updated for version 7.3.1154
Problem:    New regexp_nfa engine: Uneccessary code.
Solution:   Remove uneccessary code.
2013-06-09 17:25:34 +02:00
Bram Moolenaar
2a4e98ac1e updated for version 7.3.1153
Problem:    New regexp engine: Some look-behind matches are very expensive.
Solution:   Pospone invisible matches further, until a match is almost found.
2013-06-09 16:24:45 +02:00
Bram Moolenaar
a940aa6fc4 updated for version 7.3.1152
Problem:    In tiny build ireg_icombine is undefined. (Tony Mechelynck)
Solution:   Add #ifdef.
2013-06-08 23:30:04 +02:00
Bram Moolenaar
1e02e6620b updated for version 7.3.1151
Problem:    New regexp engine: Slow when a look-behind match is followed by a
            zero-width match.
Solution:   Postpone the look-behind match more often.
2013-06-08 23:26:27 +02:00
Bram Moolenaar
e7766eeaa5 updated for version 7.3.1150
Problem:    New regexpengine: Slow when a look-behind match does not have a
            width specified.
Solution:   Try to compute the maximum width.
2013-06-08 22:30:03 +02:00
Bram Moolenaar
473de61b04 updated for version 7.3.1149
Problem:    New regexp engine: Matching plain text could be faster.
Solution:   Detect a plain text match and handle it specifically.  Add
            vim_regfree().
2013-06-08 18:19:48 +02:00
Bram Moolenaar
cd9c46265e updated for version 7.3.1148
Problem:    No command line completion for ":syntime".
Solution:   Implement the completion. (Dominique Pelle)
2013-06-08 15:24:48 +02:00
Bram Moolenaar
87f764a891 updated for version 7.3.1147
Problem:    New regexp engine: regstart is only used to find the first match.
Solution:   Use regstart whenever adding the start state.
2013-06-08 14:38:27 +02:00
Bram Moolenaar
b1b284fd5d updated for version 7.3.1146
Problem:    New regexp engine: look-behind match not checked when followed by
            zero-width match.
Solution:   Do the look-behind match before adding the zero-width state.
2013-06-08 13:33:37 +02:00
Bram Moolenaar
f96d109827 updated for version 7.3.1145
Problem:    New regexp engine: addstate() is called very often.
Solution:   Optimize adding the start state.
2013-06-07 22:39:40 +02:00
Bram Moolenaar
2358403363 updated for version 7.3.1144
Problem:    "RO" is not translated everywhere.
Solution:   Put inside _(). (Sergey Alyoshin)
2013-06-07 20:17:11 +02:00
Bram Moolenaar
3798519b9e updated for version 7.3.1143
Problem:    When mapping NUL it is displayed as an X.
Solution:   Check for KS_ZERO instead of K_ZERO. (Yasuhiro Matsumoto)
2013-06-07 19:53:10 +02:00
Bram Moolenaar
45fc539fe0 updated for version 7.3.1142
Problem:    Memory leak in ":syntime report".
Solution:   Clear the grow array. (Dominique Pelle)
2013-06-07 19:48:39 +02:00
Bram Moolenaar
a238431302 updated for version 7.3.1141
Problem:    Win32: Check for available memory is not reliable and adds
            overhead.
Solution:   Remove mch_avail_mem(). (Mike Williams)
2013-06-07 19:17:14 +02:00
Bram Moolenaar
43e0298416 updated for version 7.3.1140
Problem:    New regexp engine: trying expensive match while the result is not
            going to be used.
Solution:   Check for output state already being in the state list.
2013-06-07 17:31:29 +02:00
Bram Moolenaar
decd9540fd updated for version 7.3.1139
Problem:    New regexp engine: negated flag is hardly used.
Solution:   Add separate _NEG states, remove negated flag.
2013-06-07 16:31:50 +02:00
Bram Moolenaar
8aca2e9bef updated for version 7.3.1138
Problem:    New regexp engine: neglist no longer used.
Solution:   Remove the now unused neglist.
2013-06-07 14:59:18 +02:00
Bram Moolenaar
417bad227a updated for version 7.3.1137
Problem:    New regexp engine: collections are slow.
Solution:   Handle all characters in one go.
2013-06-07 14:08:30 +02:00
Bram Moolenaar
203d04d764 Updated runtime files. 2013-06-06 21:36:40 +02:00
Bram Moolenaar
4cd92d5aae updated for version 7.3.1136
Problem:    ":func Foo" does not show attributes.
Solution:   Add "abort", "dict" and "range". (Yasuhiro Matsumoto)
2013-06-06 21:31:06 +02:00
Bram Moolenaar
4e31296ffa updated for version 7.3.1135
Problem:    Compiler warning for unused argument.
Solution:   Add UNUSED.
2013-06-06 21:19:51 +02:00
Bram Moolenaar
cc908adac8 updated for version 7.3.1134
Problem:    Running test 49 takes a long time.
Solution:   Don't have it grep all files.
2013-06-06 18:55:49 +02:00
Bram Moolenaar
d89616ebb8 updated for version 7.3.1133
Problem:    New regexp engine is a bit slow.
Solution:   Skip ahead to a character that must match.  Don't try matching a
            "^" patter past the start of line.
2013-06-06 18:46:06 +02:00
Bram Moolenaar
6d3a5d755a updated for version 7.3.1132
Problem:    Crash when debugging regexp.
Solution:   Do not try to dump subexpr that were not set.  Skip over count of
            \% items.
2013-06-06 18:04:51 +02:00
Bram Moolenaar
188c57bcd1 updated for version 7.3.1131
Problem:    New regexp engine is a bit slow.
Solution:   Do not clear the state list.  Don't copy syntax submatches when
            not used.
2013-06-06 16:22:06 +02:00
Bram Moolenaar
f751255283 updated for version 7.3.1130
Problem:    Can't build with anything but huge features.
Solution:   Check for FEAT_PROFILE. (Yasuhiro Matsumoto)
2013-06-06 14:55:19 +02:00
Bram Moolenaar
8a7f5a2d43 updated for version 7.3.1129
Problem:    Can't see what pattern in syntax highlighting is slow.
Solution:   Add the ":syntime" command.
2013-06-06 14:01:46 +02:00
Bram Moolenaar
cd2d8bb6ea updated for version 7.3.1128
Problem:    Now that the NFA engine handles everything every failure is a
            syntax error.
Solution:   Remove the syntax_error flag.
2013-06-05 21:42:53 +02:00
Bram Moolenaar
2976c028ca updated for version 7.3.1127
Problem:    No error for using empty \%[].
Solution:   Give error message.
2013-06-05 21:30:37 +02:00
Bram Moolenaar
c19b4b50a8 updated for version 7.3.1126
Problem:    Compiler warning for unitialized variable. (Tony Mechelynck)
Solution:   Assign something to the variable.
2013-06-05 21:23:39 +02:00
Bram Moolenaar
973fced763 updated for version 7.3.1125
Problem:    Error for using \%V in a pattern in tiny Vim.
Solution:   Allow using \%V but never match. (Dominique Pelle)
2013-06-05 21:10:59 +02:00
Bram Moolenaar
d4209d203a updated for version 7.3.1124
Problem:    Python: Crash on MS-Windows when os.fchdir() is not available.
Solution:   Check for _chdir to be NULL. (Ken Takata)
2013-06-05 20:34:15 +02:00
Bram Moolenaar
e60c2e5e1c updated for version 7.3.1123
Problem:    Can't build tiny Vim on MS-Windows.
Solution:   Adjust #ifdef around using modif_fname(). (Mike Williams)
2013-06-05 19:35:38 +02:00
Bram Moolenaar
8795374bd3 updated for version 7.3.1122
Problem:    New regexp engine: \%> not supported.
Solution:   Implement \%>.
2013-06-05 18:52:40 +02:00
Bram Moolenaar
67604aed75 updated for version 7.3.1121
Problem:    New regexp engine: adding states that are not used.
Solution:   Don't add the states.
2013-06-05 16:51:57 +02:00
Bram Moolenaar
5b84ddccea updated for version 7.3.1120
Problem:    Crash when regexp logging is enabled.
Solution:   Avoid using NULL pointers. Advance over count argument.
2013-06-05 16:33:10 +02:00
Bram Moolenaar
1cd3f2c450 updated for version 7.3.1119
Problem:    Flags in 'cpo' are search for several times.
Solution:   Store the result and re-use the flags.
2013-06-05 12:43:09 +02:00
Bram Moolenaar
e2b8cb3b15 updated for version 7.3.1118
Problem:    Match failure rate is not very specific.
Solution:   Tune the failure rate for match items.
2013-06-05 11:46:25 +02:00
Bram Moolenaar
d75799ab7f updated for version 7.3.1117
Problem:    New regexp engine: \%[abc] not supported.
Solution:   Implement \%[abc].  Add tests.
2013-06-05 11:05:17 +02:00
Bram Moolenaar
78eae9aaf7 updated for version 7.3.1116
Problem:    Can't build without Visual mode.
Solution:   Add #ifdefs.
2013-06-05 11:02:05 +02:00
Bram Moolenaar
5ebc09b450 updated for version 7.3.1115
Problem:    Many users don't like the cursor line number when 'relativenumber'
            is set.
Solution:   Have four combinations with 'number' and 'relativenumber'.
            (Christian Brabandt)
2013-06-04 22:13:50 +02:00
Bram Moolenaar
b76591ef4a updated for version 7.3.1114
Problem:    Can't build without the syntax feature.
Solution:   Add #ifdefs. (Erik Falor)
2013-06-04 21:42:22 +02:00
Bram Moolenaar
044aa290c5 updated for version 7.3.1113
Problem:    New regexp engine: \%'m not supported.
Solution:   Implement \%'m.  Add tests.
2013-06-04 21:27:38 +02:00
Bram Moolenaar
dacd7de3fd updated for version 7.3.1112
Problem:    New regexp engine: \%V not supported.
Solution:   Implement \%V.  Add tests.
2013-06-04 18:28:48 +02:00
Bram Moolenaar
f811509c03 updated for version 7.3.1111
Problem:    nfa_recognize_char_class() implementation is inefficient.
Solution:   Use bits in an int instead of chars in a string. (Dominique Pelle)
2013-06-04 17:47:05 +02:00
Bram Moolenaar
a2d9510861 updated for version 7.3.1110
Problem:    New regexp matching: Using \@= and the like can be slow.
Solution:   Decide whether to first try matching the zero-wdith part or what
            follows, whatever is more likely to fail.
2013-06-04 14:23:05 +02:00
Bram Moolenaar
dd9a4a44a9 updated for version 7.3.1109
Problem:    Building on MS-Windows doesn't see changes in if_py_both.h.
Solution:   Add a dependency. (Ken Takata)
2013-06-03 20:12:51 +02:00
Bram Moolenaar
e9056b121d updated for version 7.3.1108
Problem:    Error message for os.fchdir() (Charles Peacech)
Solution:   Clear the error. (ZyX)
2013-06-03 20:04:48 +02:00
Bram Moolenaar
01d89dddfa updated for version 7.3.1107
Problem:    Compiler warnings for unused variables.
Solution:   Put the variables inside #ifdef.
2013-06-03 19:41:06 +02:00
Bram Moolenaar
dd2ccdf6ea updated for version 7.3.1106
Problem:    New regexp engine: saving and restoring lastlist in the states
            takes a lot of time.
Solution:   Use a second lastlist value for the first recursive call.
2013-06-03 12:17:04 +02:00
Bram Moolenaar
f46da70603 updated for version 7.3.1105
Problem:    New regexp engine: too much code in one function.  Dead code.
Solution:   Move the recursive nfa_regmatch call to a separate function.
            Remove the dead code.
2013-06-02 22:37:42 +02:00
Bram Moolenaar
f18fb7af75 updated for version 7.3.1104
Problem:    New regexp engine does not handle "~".
Solution:   Add support for "~".
2013-06-02 22:08:03 +02:00
Bram Moolenaar
f6de032afe updated for version 7.3.1103
Problem:    New regexp engine: overhead in saving and restoring.
Solution:   Make saving and restoring list IDs faster.  Don't copy or check \z
            subexpressions when they are not used.
2013-06-02 21:30:04 +02:00
Bram Moolenaar
9f5d600723 updated for version 7.3.1102
Problem:    Completion of ":py3do" and ":py3file" does not work after ":py3".
Solution:   Make completion work. (Taro Muraoka)
2013-06-02 19:22:13 +02:00
Bram Moolenaar
ac499e3116 updated for version 7.3.1101
Problem:    Configure doesn't find Python 3 on Ubuntu 13.04.
Solution:   First try distutils.sysconfig. Also fix some indents.  (Ken
            Takata)
2013-06-02 19:14:17 +02:00
Bram Moolenaar
78b5957439 updated for version 7.3.1100
Problem:    Python: a few more memory problems.
Solution:   Add and remove Py_XDECREF(). (ZyX)
2013-06-02 18:54:21 +02:00
Bram Moolenaar
f4258308e2 updated for version 7.3.1099
Problem:    Python: Changing directory with os.chdir() causes problems for
            Vim's notion of directories.
Solution:   Add vim.chdir() and vim.fchdir(). (ZyX)
2013-06-02 18:20:17 +02:00
Bram Moolenaar
4f2109d782 updated for version 7.3.1098
Problem:    Python: Possible memory leaks
Solution:   Add Py_XDECREF() calls. (ZyX)
2013-06-02 18:07:37 +02:00
Bram Moolenaar
bc41196bdc updated for version 7.3.1097
Problem:    Python: a few recently added items are not documented.
Solution:   Update the documentation. (ZyX)
2013-06-02 17:46:40 +02:00
Bram Moolenaar
de71b5658f updated for version 7.3.1096
Problem:    Python: popitem() was not defined in a standard way.
Solution:   Remove the argument from popitem(). (ZyX)
2013-06-02 17:41:54 +02:00
Bram Moolenaar
525666f282 updated for version 7.3.1095
Problem:    Compiler warnings for shadowed variables. (Christian Brabandt)
Solution:   Rename new_state() to alloc_state().  Remove unnecessary
            declaration.
2013-06-02 16:40:55 +02:00
Bram Moolenaar
307aa16a69 updated for version 7.3.1094
Problem:    New regexp engine: Attempts to match "^" at every character.
Solution:   Only try "^" at the start of a line.
2013-06-02 16:34:21 +02:00
Bram Moolenaar
b122e9798e updated for version 7.3.1093
Problem:    New regexp engine: When a sub expression is empty \1 skips a
            character.
Solution:   Make \1 try the current position when the match is emtpy.
2013-06-02 16:07:10 +02:00
Bram Moolenaar
69afb7bf0a updated for version 7.3.1092
Problem:    Can't build with regexp debugging.  NFA debug output shows wrong
            pattern.
Solution:   Fix debugging code for recent changes.  Add the pattern to the
            program.
2013-06-02 15:55:55 +02:00
Bram Moolenaar
5de820b916 updated for version 7.3.1091
Problem:    New regexp engine: no error when using \z1 or \z( where it does
            not work.
Solution:   Give an error message.
2013-06-02 15:01:57 +02:00
Bram Moolenaar
efb23f26e8 updated for version 7.3.1090
Problem:    New regexp engine does not support \z1 .. \z9 and \z(.
Solution:   Implement the syntax submatches.
2013-06-01 23:02:54 +02:00
Bram Moolenaar
0418811869 updated for version 7.3.1089
Problem:    Tests 86 and 87 fail on MS-Windows. (Ken Takata)
Solution:   Fix platform-specific stuff. (ZyX)
2013-06-01 20:32:12 +02:00
Bram Moolenaar
61602c5bfe updated for version 7.3.1088
Problem:    New regexp engine: \@<= and \@<! are not implemented.
Solution:   Implement look-behind matching.  Fix off-by-one error in old
            regexp engine.
2013-06-01 19:54:43 +02:00
Bram Moolenaar
543b7ef700 Updated runtime files and translations. 2013-06-01 14:50:56 +02:00
Bram Moolenaar
3737fc1c30 updated for version 7.3.1087
Problem:    A leading star is not seen as a normal char when \{} follows.
Solution:   Save and restore the parse state properly.
2013-06-01 14:42:56 +02:00
Bram Moolenaar
75d7a06920 updated for version 7.3.1086
Problem:    Old regexp engine accepts illegal range, new one doesn't.
Solution:   Also accept the illegal range with the new engine.
2013-06-01 13:24:24 +02:00
Bram Moolenaar
36b3a011d3 updated for version 7.3.1085
Problem:    New regexp engine: Non-greedy multi doesn't work.
Solution:   Implement \{-}.
2013-06-01 12:40:20 +02:00
Bram Moolenaar
54dafde170 updated for version 7.3.1084
Problem:    New regexp engine: only accepts up to \{,10}.
Solution:   Remove upper limit.  Remove dead code with NFA_PLUS.
2013-05-31 23:18:00 +02:00
Bram Moolenaar
4b78063368 updated for version 7.3.1083
Problem:    New regexp engine: Does not support \%^ and \%$.
Solution:   Support matching start and end of file.
2013-05-31 22:14:52 +02:00
Bram Moolenaar
14f55c6f67 updated for version 7.3.1082
Problem:    New regexp engine: Problem with \@= matching.
Solution:   Save and restore nfa_match.
2013-05-31 21:45:09 +02:00
Bram Moolenaar
99dc19d1cc updated for version 7.3.1081
Problem:    Compiler warnings on 64-bit Windows.
Solution:   Change variable types. (Mike Williams)
2013-05-31 20:49:31 +02:00
Bram Moolenaar
ca982c8d45 updated for version 7.3.1080
Problem:    Test 86 fails.
Solution:   Comment out the parts that don't work.  Make it pass on 32 bit
            systems.
2013-05-31 19:01:16 +02:00
Bram Moolenaar
96c7dfd806 updated for version 7.3.1079
Problem:    Test 87 fails.
Solution:   Fix the test for Python 3.3. (ZyX)  Make it pass on 32 bit systems.
2013-05-31 18:46:11 +02:00
Bram Moolenaar
b06e20e6ba updated for version 7.3.1078
Problem:    New regexp engine: \@! doesn't work.
Solution:   Implement the negated version of \@=.
2013-05-30 22:44:02 +02:00
Bram Moolenaar
35eacd7180 updated for version 7.3.1077
Problem:    Python: Allocating dict the wrong way, causing a crash.
Solution:   Use py_dict_alloc(). Fix some exception problems. (ZyX)
2013-05-30 22:06:33 +02:00
Bram Moolenaar
2d5e112284 updated for version 7.3.1076
Problem:    New regexp engine: \@= and \& don't work.
Solution:   Make these items work.  Add column info to logging.
2013-05-30 21:42:13 +02:00
Bram Moolenaar
021e147b70 updated for version 7.3.1075
Problem:    Compiler warning for storing a long_u in an int.
Solution:   Declare the number as an int. (Mike Williams)
2013-05-30 19:18:31 +02:00
Bram Moolenaar
f62d942e54 updated for version 7.3.1074
Problem:    Compiler warning for printf format. (Manuel Ortega)
Solution:   Add type casts.
2013-05-30 19:01:24 +02:00
Bram Moolenaar
16299b57cb updated for version 7.3.1073
Problem:    New regexp engine may run out of states.
Solution:   Allocate states dynamically.  Also make the test report errors.
2013-05-30 18:45:23 +02:00
Bram Moolenaar
4b6ebe6dce updated for version 7.3.1072
Problem:    Compiler warning for unitialized variable.
Solution:   Initialize it.
2013-05-30 17:49:24 +02:00
Bram Moolenaar
428e987b61 updated for version 7.3.1071
Problem:    New regexp engine: backreferences don't work correctly.
Solution:   Add every possible start/end position on the state stack.
2013-05-30 17:05:39 +02:00
Bram Moolenaar
fdde880b02 updated for version 7.3.1070
Problem:    Vim crashes in Python tests. Compiler warning for unused function.
Solution:   Disable the tests for now. Move the function.
2013-05-30 15:38:24 +02:00
252 changed files with 24193 additions and 7329 deletions

5
.gitignore vendored
View File

@@ -36,12 +36,16 @@ src/Obj*/pathdef.c
gvimext.dll
gvimext.lib
# Mac OSX
src/xxd/xxd.dSYM
# All platforms
*.rej
*.orig
*.mo
*.swp
*~
*.pyc
src/po/vim.pot
# Generated by "make test"
@@ -52,3 +56,4 @@ src/testdir/lua.vim
src/testdir/small.vim
src/testdir/tiny.vim
src/testdir/test*.out
src/testdir/test.log

View File

@@ -84,6 +84,15 @@ SRC_ALL = \
src/testdir/test49.vim \
src/testdir/test60.vim \
src/testdir/test83-tags? \
src/testdir/python2/*.py \
src/testdir/python3/*.py \
src/testdir/pythonx/*.py \
src/testdir/pythonx/topmodule/__init__.py \
src/testdir/pythonx/topmodule/submodule/__init__.py \
src/testdir/pythonx/topmodule/submodule/subsubmodule/__init__.py \
src/testdir/pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py \
src/testdir/python_after/*.py \
src/testdir/python_before/*.py \
src/proto.h \
src/proto/blowfish.pro \
src/proto/buffer.pro \

View File

@@ -1,9 +1,7 @@
" Vim completion script
" Language: Ruby
" Maintainer: Mark Guzman <segfault@hasno.info>
" Last Change: 2009 Sep 28
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Maintainer Version: 0.8.1
" ----------------------------------------------------------------------------
@@ -12,16 +10,23 @@
" ----------------------------------------------------------------------------
" {{{ requirement checks
function! s:ErrMsg(msg)
echohl ErrorMsg
echo a:msg
echohl None
endfunction
if !has('ruby')
s:ErrMsg( "Error: Rubycomplete requires vim compiled with +ruby" )
s:ErrMsg( "Error: falling back to syntax completion" )
call s:ErrMsg( "Error: Rubycomplete requires vim compiled with +ruby" )
call s:ErrMsg( "Error: falling back to syntax completion" )
" lets fall back to syntax completion
setlocal omnifunc=syntaxcomplete#Complete
finish
endif
if version < 700
s:ErrMsg( "Error: Required vim >= 7.0" )
call s:ErrMsg( "Error: Required vim >= 7.0" )
finish
endif
" }}} requirement checks
@@ -51,12 +56,6 @@ endif
" {{{ vim-side support functions
let s:rubycomplete_debug = 0
function! s:ErrMsg(msg)
echohl ErrorMsg
echo a:msg
echohl None
endfunction
function! s:dprint(msg)
if s:rubycomplete_debug == 1
echom a:msg
@@ -133,7 +132,7 @@ function! s:GetRubyVarType(v)
let stopline = 1
let vtp = ''
let pos = getpos('.')
let sstr = '^\s*#\s*@var\s*'.a:v.'\>\s\+[^ \t]\+\s*$'
let sstr = '^\s*#\s*@var\s*'.escape(a:v, '*').'\>\s\+[^ \t]\+\s*$'
let [lnum,lcol] = searchpos(sstr,'nb',stopline)
if lnum != 0 && lcol != 0
call setpos('.',pos)
@@ -275,7 +274,7 @@ class VimRubyCompletion
pare = /^\s*class\s*(.*)\s*<\s*(.*)\s*\n/.match( classdef )
load_buffer_class( $2 ) if pare != nil && $2 != name # load parent class if needed
mixre = /.*\n\s*include\s*(.*)\s*\n/.match( classdef )
mixre = /.*\n\s*(include|prepend)\s*(.*)\s*\n/.match( classdef )
load_buffer_module( $2 ) if mixre != nil && $2 != name # load mixins if needed
begin
@@ -364,6 +363,10 @@ class VimRubyCompletion
print txt if @@debug
end
def escape_vim_singlequote_string(str)
str.to_s.gsub(/'/,"\\'")
end
def get_buffer_entity_list( type )
# this will be a little expensive.
loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading")
@@ -526,9 +529,9 @@ class VimRubyCompletion
end
def clean_sel(sel, msg)
sel.delete_if { |x| x == nil }
sel.uniq!
sel.grep(/^#{Regexp.quote(msg)}/) if msg != nil
ret = sel.reject{|x|x.nil?}.uniq
ret = ret.grep(/^#{Regexp.quote(msg)}/) if msg != nil
ret
end
def get_rails_view_methods
@@ -767,10 +770,10 @@ class VimRubyCompletion
constants = clean_sel( constants, message )
valid = []
valid += methods.collect { |m| { :name => m, :type => 'm' } }
valid += variables.collect { |v| { :name => v, :type => 'v' } }
valid += classes.collect { |c| { :name => c, :type => 't' } }
valid += constants.collect { |d| { :name => d, :type => 'd' } }
valid += methods.collect { |m| { :name => m.to_s, :type => 'm' } }
valid += variables.collect { |v| { :name => v.to_s, :type => 'v' } }
valid += classes.collect { |c| { :name => c.to_s, :type => 't' } }
valid += constants.collect { |d| { :name => d.to_s, :type => 'd' } }
valid.sort! { |x,y| x[:name] <=> y[:name] }
outp = ""
@@ -779,7 +782,7 @@ class VimRubyCompletion
rg.step(150) do |x|
stpos = 0+x
enpos = 150+x
valid[stpos..enpos].each { |c| outp += "{'word':'%s','item':'%s','kind':'%s'}," % [ c[:name], c[:name], c[:type] ] }
valid[stpos..enpos].each { |c| outp += "{'word':'%s','item':'%s','kind':'%s'}," % [ c[:name], c[:name], c[:type] ].map{|x|escape_vim_singlequote_string(x)} }
outp.sub!(/,$/, '')
VIM::command("call extend(g:rubycomplete_completions, [%s])" % outp)

View File

@@ -1,6 +1,6 @@
" Vim autoload file for the tohtml plugin.
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
" Last Change: 2012 Jun 30
" Last Change: 2013 Jun 19
"
" Additional contributors:
"
@@ -401,15 +401,15 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
call add(html, '</head>')
let body_line_num = len(html)
if !empty(s:settings.prevent_copy)
call add(html, "<body onload='FixCharWidth();'>")
call add(html, "<body onload='FixCharWidth();".(s:settings.line_ids ? " JumpToLine();" : "")."'>")
call add(html, "<!-- hidden divs used by javascript to get the width of a char -->")
call add(html, "<div id='oneCharWidth'>0</div>")
call add(html, "<div id='oneInputWidth'><input size='1' value='0'".tag_close."</div>")
call add(html, "<div id='oneEmWidth' style='width: 1em;'></div>")
else
call add(html, '<body>')
call add(html, '<body'.(s:settings.line_ids ? ' onload="JumpToLine();"' : '').'>')
endif
call add(html, "<table border='1' width='100%' id='vimCodeElement'>")
call add(html, "<table border='1' width='100%' id='vimCodeElement".s:settings.id_suffix."'>")
call add(html, '<tr>')
for buf in a:win_list
@@ -475,7 +475,7 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
let temp = getline(1,'$')
" clean out id on the main content container because we already set it on
" the table
let temp[0] = substitute(temp[0], " id='vimCodeElement'", "", "")
let temp[0] = substitute(temp[0], " id='vimCodeElement[^']*'", "", "")
" undo deletion of start and end part
" so we can later save the file as valid html
" TODO: restore using grabbed lines if undolevel is 1?
@@ -503,6 +503,11 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
call add(html, s:body_end_line)
call add(html, '</html>')
" The generated HTML is admittedly ugly and takes a LONG time to fold.
" Make sure the user doesn't do syntax folding when loading a generated file,
" using a modeline.
call add(html, '<!-- vim: set foldmethod=manual : -->')
let i = 1
let name = "Diff" . (s:settings.use_xhtml ? ".xhtml" : ".html")
" Find an unused file name if current file name is already in use
@@ -539,14 +544,12 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
" add required javascript in reverse order so we can just call append again
" and again without adjusting {{{
" insert script closing tag if any javascript is needed
if s:settings.dynamic_folds || !empty(s:settings.prevent_copy)
call append(style_start, [
\ '',
\ s:settings.use_xhtml ? '//]]>' : '-->',
\ "</script>"
\ ])
endif
" insert script closing tag
call append(style_start, [
\ '',
\ s:settings.use_xhtml ? '//]]>' : '-->',
\ "</script>"
\ ])
" insert script which corrects the size of small input elements in
" prevent_copy mode. See 2html.vim for details on why this is needed and how
@@ -565,13 +568,62 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
\ ' var emWidth = document.getElementById("oneEmWidth").clientWidth;',
\ ' if (inputWidth > goodWidth) {',
\ ' while (ratio < 100*goodWidth/emWidth && ratio < 100) {',
\ ' ratio += 5;',
\ ' }',
\ ' document.getElementById("vimCodeElement").className = "em"+ratio;',
\ ' ratio += 5;',
\ ' }',
\ ' document.getElementById("vimCodeElement'.s:settings.id_suffix.'").className = "em"+ratio;',
\ ' }',
\ '}'
\ ])
endif
"
" insert javascript to get IDs from line numbers, and to open a fold before
" jumping to any lines contained therein
call append(style_start, [
\ " /* Always jump to new location even if the line was hidden inside a fold, or",
\ " * we corrected the raw number to a line ID.",
\ " */",
\ " if (lineElem) {",
\ " lineElem.scrollIntoView(true);",
\ " }",
\ " return true;",
\ "}",
\ "if ('onhashchange' in window) {",
\ " window.onhashchange = JumpToLine;",
\ "}"
\ ])
if s:settings.dynamic_folds
call append(style_start, [
\ "",
\ " /* navigate upwards in the DOM tree to open all folds containing the line */",
\ " var node = lineElem;",
\ " while (node && node.id != 'vimCodeElement".s:settings.id_suffix."')",
\ " {",
\ " if (node.className == 'closed-fold')",
\ " {",
\ " /* toggle open the fold ID (remove window ID) */",
\ " toggleFold(node.id.substr(4));",
\ " }",
\ " node = node.parentNode;",
\ " }",
\ ])
endif
call append(style_start, [
\ "",
\ "/* function to open any folds containing a jumped-to line before jumping to it */",
\ "function JumpToLine()",
\ "{",
\ " var lineNum;",
\ " lineNum = window.location.hash;",
\ " lineNum = lineNum.substr(1); /* strip off '#' */",
\ "",
\ " if (lineNum.indexOf('L') == -1) {",
\ " lineNum = 'L'+lineNum;",
\ " }",
\ " if (lineNum.indexOf('W') == -1) {",
\ " lineNum = 'W1'+lineNum;",
\ " }",
\ " lineElem = document.getElementById(lineNum);"
\ ])
" Insert javascript to toggle matching folds open and closed in all windows,
" if dynamic folding is active.
@@ -596,12 +648,11 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
\ ])
endif
" insert script tag if any javascript is needed
if s:settings.dynamic_folds || s:settings.prevent_copy != ""
call append(style_start, [
\ "<script type='text/javascript'>",
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
endif "}}}
" insert script tag; javascript is always needed for the line number
" normalization for URL hashes
call append(style_start, [
\ "<script type='text/javascript'>",
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
" Insert styles from all the generated html documents and additional styles
" for the table-based layout of the side-by-side diff. The diff should take
@@ -671,6 +722,7 @@ func! tohtml#GetUserSettings() "{{{
call tohtml#GetOption(user_settings, 'no_invalid', 0 )
call tohtml#GetOption(user_settings, 'whole_filler', 0 )
call tohtml#GetOption(user_settings, 'use_xhtml', 0 )
call tohtml#GetOption(user_settings, 'line_ids', user_settings.number_lines )
" }}}
" override those settings that need it {{{
@@ -804,6 +856,20 @@ func! tohtml#GetUserSettings() "{{{
let user_settings.no_invalid = 0
endif
if exists('g:html_id_expr')
let user_settings.id_suffix = eval(g:html_id_expr)
if user_settings.id_suffix !~ '^[-_:.A-Za-z0-9]*$'
echohl WarningMsg
echomsg '2html: g:html_id_expr evaluated to invalid string for HTML id attributes'
echomsg '2html: Omitting user-specified suffix'
echohl None
sleep 3
let user_settings.id_suffix=""
endif
else
let user_settings.id_suffix=""
endif
" TODO: font
return user_settings

View File

@@ -1,7 +1,7 @@
" Vim completion script
" Language: XML
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2006 Aug 15
" Last Change: 2013 Jun 29
" Version: 1.9
"
" Changelog:
@@ -475,12 +475,12 @@ function! s:InCommentAt(line, col)
endfunction
function! s:SetKeywords()
let g:IsKeywordBak=&iskeyword
let &iskeyword='33-255'
let s:IsKeywordBak=&l:iskeyword
let &l:iskeyword='33-255'
endfunction
function! s:RestoreKeywords()
let &iskeyword=g:IsKeywordBak
let &l:iskeyword=s:IsKeywordBak
endfunction
function! s:Push(el, sname)

View File

@@ -2,7 +2,7 @@
" vim: tw=0 ts=4 sw=4
" Vim color file
" Maintainer: Ron Aaron <ron@ronware.org>
" Last Change: 2006 Dec 10
" Last Change: 2013 May 23
hi clear
set background=dark
@@ -43,6 +43,8 @@ hi MatchParen term=reverse ctermfg=blue guibg=Blue
hi TabLine term=bold,reverse cterm=bold ctermfg=lightblue ctermbg=white gui=bold guifg=blue guibg=white
hi TabLineFill term=bold,reverse cterm=bold ctermfg=lightblue ctermbg=white gui=bold guifg=blue guibg=white
hi TabLineSel term=reverse ctermfg=white ctermbg=lightblue guifg=white guibg=blue
hi Underlined term=underline cterm=bold,underline ctermfg=lightblue guifg=lightblue gui=bold,underline
hi Ignore ctermfg=black ctermbg=black guifg=black guibg=black
hi link IncSearch Visual
hi link String Constant
hi link Character Constant

View File

@@ -2,7 +2,7 @@
" vim: tw=0 ts=4 sw=4
" Vim color file
" Maintainer: Ron Aaron <ron@ronware.org>
" Last Change: 2003 May 02
" Last Change: 2013 May 24
set background=dark
hi clear
@@ -11,7 +11,7 @@ if exists("syntax_on")
endif
let g:colors_name = "ron"
hi Normal guifg=cyan guibg=black
hi NonText guifg=brown
hi NonText guifg=yellow guibg=#303030
hi comment guifg=green
hi constant guifg=cyan gui=bold
hi identifier guifg=cyan gui=NONE
@@ -24,10 +24,11 @@ hi WarningMsg guifg=Black guibg=Green
hi Error guibg=Red
hi Todo guifg=Black guibg=orange
hi Cursor guibg=#60a060 guifg=#00ff00
hi Search guibg=lightslateblue
hi Search guibg=darkgray guifg=black gui=bold
hi IncSearch gui=NONE guibg=steelblue
hi LineNr guifg=darkgrey
hi title guifg=darkgrey
hi ShowMarksHL ctermfg=cyan ctermbg=lightblue cterm=bold guifg=yellow guibg=black gui=bold
hi StatusLineNC gui=NONE guifg=lightblue guibg=darkblue
hi StatusLine gui=bold guifg=cyan guibg=blue
hi label guifg=gold2
@@ -41,3 +42,4 @@ hi DiffDelete guibg=coral
hi Folded guibg=gray30
hi FoldColumn guibg=gray30 guifg=white
hi cIf0 guifg=gray
hi diffOnly guifg=red gui=bold

View File

@@ -1,9 +1,7 @@
" Vim compiler file
" Language: eRuby
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2008 Aug 1
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
if exists("current_compiler")

28
runtime/compiler/haml.vim Normal file
View File

@@ -0,0 +1,28 @@
" Vim compiler file
" Compiler: Haml
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2013 May 30
if exists("current_compiler")
finish
endif
let current_compiler = "haml"
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
set cpo-=C
CompilerSet makeprg=haml\ -c
CompilerSet errorformat=
\Haml\ %trror\ on\ line\ %l:\ %m,
\Syntax\ %trror\ on\ line\ %l:\ %m,
\%-G%.%#
let &cpo = s:cpo_save
unlet s:cpo_save
" vim:set sw=2 sts=2:

View File

@@ -0,0 +1,44 @@
" Vim Compiler File
" Compiler: ocaml
" Maintainer: See ftplugin/ocaml.vim (?)
" Last Change: June 2013 by Marc Weber
"
" Marc Weber's comments:
" Setting makeprg doesn't make sense, because there is ocamlc, ocamlopt,
" ocamake and whatnot. So which one to use?
"
" This error format was moved from ftplugin/ocaml.vim to this file,
" because ftplugin is the wrong file to set an error format
" and the error format itself is annoying because it joins many lines in this
" error case:
"
" Error: The implementation foo.ml does not match the interface foo.cmi:
" Modules do not match case.
"
" So having it here makes people opt-in
if exists("current_compiler")
finish
endif
let current_compiler = "ocaml"
let s:cpo_save = &cpo
set cpo&vim
CompilerSet errorformat =
\%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:,
\%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m,
\%+EReference\ to\ unbound\ regexp\ name\ %m,
\%Eocamlyacc:\ e\ -\ line\ %l\ of\ \"%f\"\\,\ %m,
\%Wocamlyacc:\ w\ -\ %m,
\%-Zmake%.%#,
\%C%m,
\%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
\%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
\%D%*\\a:\ Entering\ directory\ `%f',
\%X%*\\a:\ Leaving\ directory\ `%f',
\%DMaking\ %*\\a\ in\ %f
let &cpo = s:cpo_save
unlet s:cpo_save

35
runtime/compiler/rake.vim Normal file
View File

@@ -0,0 +1,35 @@
" Vim compiler file
" Language: Rake
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
if exists("current_compiler")
finish
endif
let current_compiler = "rake"
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
set cpo-=C
CompilerSet makeprg=rake
CompilerSet errorformat=
\%D(in\ %f),
\%\\s%#from\ %f:%l:%m,
\%\\s%#from\ %f:%l:,
\%\\s%##\ %f:%l:%m,
\%\\s%##\ %f:%l,
\%\\s%#[%f:%l:\ %#%m,
\%\\s%#%f:%l:\ %#%m,
\%\\s%#%f:%l:,
\%m\ [%f:%l]:
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8:

View File

@@ -1,9 +1,7 @@
" Vim compiler file
" Language: RSpec
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2009 Dec 22
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
if exists("current_compiler")
@@ -18,21 +16,15 @@ endif
let s:cpo_save = &cpo
set cpo-=C
CompilerSet makeprg=spec
CompilerSet makeprg=rspec
CompilerSet errorformat=
\%+W'%.%#'\ FAILED,
\%+I'%.%#'\ FIXED,
\%-Cexpected:%.%#,
\%-C\ \ \ \ \ got:%.%#,
\%f:%l:\ %tarning:\ %m,
\%E%.%#:in\ `load':\ %f:%l:%m,
\%C%f:%l:,
\%W%f:%l:\ warning:\ %m,
\%E%f:%l:in\ %*[^:]:\ %m,
\%E%f:%l:\ %m,
\%-Z%\tfrom\ %f:%l,
\%-Z%p^%.%#,
\%-C%.%#,
\%E%f:%l:in\ `%*[^']':\ %m,
\%-Z\ \ \ \ \ \#\ %f:%l:%.%#,
\%E\ \ %\\d%\\+)%.%#,
\%C\ \ \ \ \ %m,
\%-G%.%#
let &cpo = s:cpo_save

View File

@@ -1,33 +1,10 @@
" Vim compiler file
" Language: Ruby
" Function: Syntax check and/or error reporting
" Maintainer: Tim Hammerquist <timh at rubyforge.org>
" Last Change: 2008 Aug 1
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" ----------------------------------------------------------------------------
"
" Changelog:
" 0.2: script saves and restores 'cpoptions' value to prevent problems with
" line continuations
" 0.1: initial release
"
" Contributors:
" Hugh Sasse <hgs@dmu.ac.uk>
" Doug Kearns <djkea2@gus.gscit.monash.edu.au>
"
" Todo:
" match error type %m
"
" Comments:
" I know this file isn't perfect. If you have any questions, suggestions,
" patches, etc., please don't hesitate to let me know.
"
" This is my first experience with 'errorformat' and compiler plugins and
" I welcome any input from more experienced (or clearer-thinking)
" individuals.
" ----------------------------------------------------------------------------
if exists("current_compiler")
finish

View File

@@ -1,9 +1,7 @@
" Vim compiler file
" Language: Test::Unit - Ruby Unit Testing Framework
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2008 Aug 1
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
if exists("current_compiler")

30
runtime/compiler/sass.vim Normal file
View File

@@ -0,0 +1,30 @@
" Vim compiler file
" Compiler: Sass
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2013 May 30
if exists("current_compiler")
finish
endif
let current_compiler = "sass"
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
set cpo-=C
CompilerSet makeprg=sass\ -c
CompilerSet errorformat=
\%f:%l:%m\ (Sass::Syntax%trror),
\%ESyntax\ %trror:%m,
\%C%\\s%\\+on\ line\ %l\ of\ %f,
\%Z%.%#,
\%-G%.%#
let &cpo = s:cpo_save
unlet s:cpo_save
" vim:set sw=2 sts=2:

View File

@@ -1,8 +1,7 @@
" Vim compiler file
" Compiler: xmllint
" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/xmllint.vim
" Last Change: 2004 Nov 27
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2013 Jun 1
if exists("current_compiler")
finish
@@ -18,10 +17,8 @@ set cpo-=C
CompilerSet makeprg=xmllint\ --valid\ --noout\
CompilerSet errorformat=%E%f:%l:\ error:\ %m,
\%W%f:%l:\ warning:\ %m,
\%E%f:%l:\ validity\ error:\ %m,
\%W%f:%l:\ validity\ warning:\ %m,
CompilerSet errorformat=%+E%f:%l:\ %.%#\ error\ :\ %m,
\%+W%f:%l:\ %.%#\ warning\ :\ %m,
\%-Z%p^,
\%-G%.%#

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 7.3. Last change: 2013 May 19
*autocmd.txt* For Vim version 7.3. Last change: 2013 Jun 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -513,9 +513,9 @@ CursorHold When the user doesn't press a key for the time
CursorHoldI Just like CursorHold, but in Insert mode.
*CursorMoved*
CursorMoved After the cursor was moved in Normal mode.
Also when the text of the cursor line has been
changed, e.g., with "x", "rx" or "p".
CursorMoved After the cursor was moved in Normal or Visual
mode. Also when the text of the cursor line
has been changed, e.g., with "x", "rx" or "p".
Not triggered when there is typeahead or when
an operator is pending.
For an example see |match-parens|.

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.3. Last change: 2013 May 21
*eval.txt* For Vim version 7.3. Last change: 2013 Jun 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1906,6 +1906,8 @@ repeat( {expr}, {count}) String repeat {expr} {count} times
resolve( {filename}) String get filename a shortcut points to
reverse( {list}) List reverse {list} in-place
round( {expr}) Float round off {expr}
screenattr( {row}, {col}) Number attribute at screen position
screenchar( {row}, {col}) Number character at screen position
screencol() Number current cursor column
screenrow() Number current cursor row
search( {pattern} [, {flags} [, {stopline} [, {timeout}]]])
@@ -2773,7 +2775,8 @@ expand({expr} [, {nosuf} [, {list}]]) *expand()*
file name contains a space]
If the expansion fails, the result is an empty string. A name
for a non-existing file is not included.
for a non-existing file is not included, unless {expr} does
not start with '%', '#' or '<', see below.
When {expr} starts with '%', '#' or '<', the expansion is done
like for the |cmdline-special| variables with their associated
@@ -4890,6 +4893,21 @@ round({expr}) *round()*
< -5.0
{only available when compiled with the |+float| feature}
screenattr(row, col) *screenattr()*
Like screenchar(), but return the attribute. This is a rather
arbitrary number that can only be used to compare to the
attribute at other positions.
screenchar(row, col) *screenchar()*
The result is a Number, which is the character at position
[row, col] on the screen. This works for every possible
screen position, also status lines, window separators and the
command line. The top left position is row one, column one
The character excludes composing characters. For double-byte
encodings it may only be the first byte.
This is mainly to be used for testing.
Returns -1 when row or col is out of range.
screencol() *screencol()*
The result is a Number, which is the current screen column of
the cursor. The leftmost column has number 1.

View File

@@ -1,4 +1,4 @@
.TH EVIM 1 "16 f<>vrier 2002 February 16"
.TH EVIM 1 "16 f<>vrier 2002"
.SH NAME
evim \- <20> Easy Vim <20>, <20>dite un fichier avec Vim sans utiliser les modes
.SH SYNOPSIS
@@ -54,4 +54,4 @@ Voir le menu Aide/Remerciements ou ":help credits" dans
.SH TRADUCTION
Cette page de manuel a <20>t<EFBFBD> traduite David Blanchet.
<david.blanchet@free.fr> 2005-03-26.
Mise <20> jour 2012-05-06, Dominique Pell<6C> <dominique.pelle@gmail.com>
Mise <20> jour 2013-05-10, Dominique Pell<6C> <dominique.pelle@gmail.com>

View File

@@ -1,4 +1,4 @@
.TH EVIM 1 "16 février 2002 February 16"
.TH EVIM 1 "16 février 2002"
.SH NAME
evim \- « Easy Vim », édite un fichier avec Vim sans utiliser les modes
.SH SYNOPSIS
@@ -54,4 +54,4 @@ Voir le menu Aide/Remerciements ou ":help credits" dans
.SH TRADUCTION
Cette page de manuel a été traduite David Blanchet.
<david.blanchet@free.fr> 2005-03-26.
Mise à jour 2012-05-06, Dominique Pellé <dominique.pelle@gmail.com>
Mise à jour 2013-05-10, Dominique Pellé <dominique.pelle@gmail.com>

View File

@@ -1,4 +1,4 @@
*filetype.txt* For Vim version 7.3. Last change: 2011 Jun 19
*filetype.txt* For Vim version 7.3. Last change: 2013 May 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -603,7 +603,7 @@ Since the text for this plugin is rather long it has been put in a separate
file: |ft_sql.txt|.
TEX *ft-tex-plugin*
TEX *ft-tex-plugin* *g:tex_flavor*
If the first line of a *.tex file has the form >
%&<format>

View File

@@ -1,4 +1,4 @@
*gui.txt* For Vim version 7.3. Last change: 2011 Jul 22
*gui.txt* For Vim version 7.3. Last change: 2013 Jun 12
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -93,10 +93,16 @@ and initialize other things that you may want to set up differently from the
terminal version.
Recommended place for your personal GUI initializations:
Unix $HOME/.gvimrc
OS/2 $HOME/.gvimrc or $VIM/.gvimrc
MS-DOS and Win32 $HOME/_gvimrc or $VIM/_gvimrc
Amiga s:.gvimrc or $VIM/.gvimrc
Unix $HOME/.gvimrc or $HOME/.vim/gvimrc
OS/2 $HOME/.gvimrc, $HOME/vimfiles/gvimrc
or $VIM/.gvimrc
MS-DOS and Win32 $HOME/_gvimrc, $HOME/vimfiles/gvimrc
or $VIM/_gvimrc
Amiga s:.gvimrc, home:.gvimrc, home:vimfiles:gvimrc
or $VIM/.gvimrc
The personal initialization files are searched in the order specified above
and only the first one that is found is read.
There are a number of options which only have meaning in the GUI version of
Vim. These are 'guicursor', 'guifont', 'guipty' and 'guioptions'. They are

View File

@@ -10,9 +10,10 @@ The Lua Interface to Vim *lua* *Lua*
2. The vim module |lua-vim|
3. List userdata |lua-list|
4. Dict userdata |lua-dict|
5. Buffer userdata |lua-buffer|
6. Window userdata |lua-window|
7. The luaeval function |lua-luaeval|
5. Funcref userdata |lua-funcref|
6. Buffer userdata |lua-buffer|
7. Window userdata |lua-window|
8. The luaeval function |lua-luaeval|
{Vi does not have any of these commands}
@@ -110,9 +111,31 @@ input range are stored in "vim.firstline" and "vim.lastline" respectively. The
module also includes routines for buffer, window, and current line queries,
Vim evaluation and command execution, and others.
vim.list() Returns an empty list (see |List|).
vim.dict() Returns an empty dictionary (see |Dictionary|).
vim.list([arg]) Returns an empty list or, if "arg" is a Lua
table with numeric keys 1, ..., n (a
"sequence"), returns a list l such that l[i] =
arg[i] for i = 1, ..., n (see |List|).
Non-numeric keys are not used to initialize
the list. See also |lua-eval| for conversion
rules. Example: >
:lua t = {math.pi, false, say = 'hi'}
:echo luaeval('vim.list(t)')
:" [3.141593, 0], 'say' is ignored
<
vim.dict([arg]) Returns an empty dictionary or, if "arg" is a
Lua table, returns a dict d such that d[k] =
arg[k] for all string keys k in "arg" (see
|Dictionary|). Number keys are converted to
strings. Keys that are not strings are not
used to initialize the dictionary. See also
|lua-eval| for conversion rules. Example: >
:lua t = {math.pi, false, say = 'hi'}
:echo luaeval('vim.dict(t)')
:" {'say': 'hi'}, numeric keys ignored
<
vim.funcref({name}) Returns a Funcref to function {name} (see
|Funcref|). It is equivalent to Vim's
"function".
vim.buffer([arg]) If "arg" is a number, returns buffer with
number "arg" in the buffer list or, if "arg"
@@ -131,9 +154,9 @@ Vim evaluation and command execution, and others.
vim.type({arg}) Returns the type of {arg}. It is equivalent to
Lua's "type" function, but returns "list",
"dict", "buffer", or "window" if {arg} is a
list, dictionary, buffer, or window,
respectively. Examples: >
"dict", "funcref", "buffer", or "window" if
{arg} is a list, dictionary, funcref, buffer,
or window, respectively. Examples: >
:lua l = vim.list()
:lua print(type(l), vim.type(l))
:" userdata list
@@ -229,7 +252,40 @@ Examples:
<
==============================================================================
5. Buffer userdata *lua-buffer*
5. Funcref userdata *lua-funcref*
Funcref userdata represent funcref variables in Vim. Funcrefs that were
defined with a "dict" attribute need to be obtained as a dictionary key
in order to have "self" properly assigned to the dictionary (see examples
below.) A funcref "f" has the following properties:
Properties
----------
o "#f" is the name of the function referenced by "f"
o "f(...)" calls the function referenced by "f" (with arguments)
Examples:
>
:function I(x)
: return a:x
: endfunction
:let R = function('I')
:lua i1 = vim.funcref('I')
:lua i2 = vim.eval('R')
:lua print(#i1, #i2) -- both 'I'
:lua print(i1, i2, #i2(i1) == #i1(i2))
:function Mylen() dict
: return len(self.data)
: endfunction
:let mydict = {'data': [0, 1, 2, 3]}
:lua d = vim.eval('mydict'); d.len = vim.funcref('Mylen')
:echo mydict.len()
:lua l = d.len -- assign d as 'self'
:lua print(l())
<
==============================================================================
6. Buffer userdata *lua-buffer*
Buffer userdata represent vim buffers. A buffer userdata "b" has the following
properties and methods:
@@ -281,7 +337,7 @@ Examples:
<
==============================================================================
6. Window userdata *lua-window*
7. Window userdata *lua-window*
Window objects represent vim windows. A window userdata "w" has the following
properties and methods:
@@ -313,7 +369,7 @@ Examples:
<
==============================================================================
7. The luaeval function *lua-luaeval* *lua-eval*
8. The luaeval function *lua-luaeval* *lua-eval*
The (dual) equivalent of "vim.eval" for passing Lua values to Vim is
"luaeval". "luaeval" takes an expression string and an optional argument and
@@ -325,7 +381,13 @@ returns the result of the expression. It is semantically equivalent in Lua to:
return chunk(arg) -- return typval
end
<
Note that "_A" receives the argument to "luaeval". Examples: >
Note that "_A" receives the argument to "luaeval". Lua numbers, strings, and
list, dict, and funcref userdata are converted to their Vim respective types,
while Lua booleans are converted to numbers. An error is thrown if conversion
of any of the remaining Lua types, including userdata other than lists, dicts,
and funcrefs, is attempted.
Examples: >
:echo luaeval('math.pi')
:lua a = vim.list():add('newlist')

View File

@@ -1,4 +1,4 @@
*if_pyth.txt* For Vim version 7.3. Last change: 2013 May 21
*if_pyth.txt* For Vim version 7.3. Last change: 2013 Jun 28
VIM REFERENCE MANUAL by Paul Moore
@@ -174,7 +174,24 @@ vim.eval(str) *python-eval*
vim.bindeval(str) *python-bindeval*
Like |python-eval|, but returns special objects described in
|python-bindeval-objects|. These python objects let you modify (|List|
or |Dictionary|) or call (|Funcref|) vim objecs.
or |Dictionary|) or call (|Funcref|) vim objects.
vim.strwidth(str) *python-strwidth*
Like |strwidth()|: returns number of display cells str occupies, tab
is counted as one cell.
vim.foreach_rtp(callable) *python-foreach_rtp*
Call the given callable for each path in 'runtimepath' until either
callable returns something but None, the exception is raised or there
are no longer paths. If stopped in case callable returned non-None,
vim.foreach_rtp function returns the value returned by callable.
vim.chdir(*args, **kwargs) *python-chdir*
vim.fchdir(*args, **kwargs) *python-fchdir*
Run os.chdir or os.fchdir, then all appropriate vim stuff.
Note: you should not use these functions directly, use os.chdir and
os.fchdir instead. Behavior of vim.fchdir is undefined in case
os.fchdir does not exist.
Error object of the "vim" module
@@ -208,7 +225,7 @@ vim.windows *python-windows*
:py w in vim.windows # Membership test
:py n = len(vim.windows) # Number of elements
:py for w in vim.windows: # Sequential access
< Note: vim.windows object always accesses current tab page,.
< Note: vim.windows object always accesses current tab page.
|python-tabpage|.windows objects are bound to parent |python-tabpage|
object and always use windows from that tab page (or throw vim.error
in case tab page was deleted). You can keep a reference to both
@@ -289,6 +306,88 @@ Output from Python *python-output*
supported, and may cause the program to crash. This should probably be
fixed.
*python2-directory* *python3-directory* *pythonx-directory*
Python 'runtimepath' handling *python-special-path*
In python vim.VIM_SPECIAL_PATH special directory is used as a replacement for
the list of paths found in 'runtimepath': with this directory in sys.path and
vim.path_hooks in sys.path_hooks python will try to load module from
{rtp}/python2 (or python3) and {rtp}/pythonx (for both python versions) for
each {rtp} found in 'runtimepath'.
Implementation is similar to the following, but written in C: >
from imp import find_module, load_module
import vim
import sys
class VimModuleLoader(object):
def __init__(self, module):
self.module = module
def load_module(self, fullname, path=None):
return self.module
def _find_module(fullname, oldtail, path):
idx = oldtail.find('.')
if idx > 0:
name = oldtail[:idx]
tail = oldtail[idx+1:]
fmr = find_module(name, path)
module = load_module(fullname[:-len(oldtail)] + name, *fmr)
return _find_module(fullname, tail, module.__path__)
else:
fmr = find_module(fullname, path)
return load_module(fullname, *fmr)
# It uses vim module itself in place of VimPathFinder class: it does not
# matter for python which object has find_module function attached to as
# an attribute.
class VimPathFinder(object):
@classmethod
def find_module(cls, fullname, path=None):
try:
return VimModuleLoader(_find_module(fullname, fullname, path or vim._get_paths()))
except ImportError:
return None
@classmethod
def load_module(cls, fullname, path=None):
return _find_module(fullname, fullname, path or vim._get_paths())
def hook(path):
if path == vim.VIM_SPECIAL_PATH:
return VimPathFinder
else:
raise ImportError
sys.path_hooks.append(hook)
vim.VIM_SPECIAL_PATH *python-VIM_SPECIAL_PATH*
String constant used in conjunction with vim path hook. If path hook
installed by vim is requested to handle anything but path equal to
vim.VIM_SPECIAL_PATH constant it raises ImportError. In the only other
case it uses special loader.
Note: you must not use value of this constant directly, always use
vim.VIM_SPECIAL_PATH object.
vim.find_module(...) *python-find_module*
vim.path_hook(path) *python-path_hook*
Methods or objects used to implement path loading as described above.
You should not be using any of these directly except for vim.path_hook
in case you need to do something with sys.meta_path. It is not
guaranteed that any of the objects will exist in the future vim
versions.
vim._get_paths *python-_get_paths*
Methods returning a list of paths which will be searched for by path
hook. You should not rely on this method being present in future
versions, but can use it for debugging.
It returns a list of {rtp}/python2 (or {rtp}/python3) and
{rtp}/pythonx directories for each {rtp} in 'runtimepath'.
==============================================================================
3. Buffer objects *python-buffer*
@@ -329,6 +428,8 @@ The buffer object attributes are:
|BufFilePost| autocommands are launched.
b.number Buffer number. Can be used as |python-buffers| key.
Read-only.
b.valid True or False. Buffer object becomes invalid when
corresponding buffer is wiped out.
The buffer object methods are:
b.append(str) Append a line to the buffer
@@ -433,6 +534,8 @@ Window attributes are:
row, col (read-only) On-screen window position in display cells.
First position is zero.
tabpage (read-only) Window tab page.
valid (read-write) True or False. Window object becomes invalid
when corresponding window is closed.
The height attribute is writable only if the screen is split horizontally.
The width attribute is writable only if the screen is split vertically.
@@ -456,6 +559,8 @@ Tab page attributes are:
windows Like |python-windows|, but for current tab page.
vars The tab page |t:| variables.
window Current tabpage window.
valid True or False. Tab page object becomes invalid when
corresponding tab page is closed.
TabPage object type is available using "TabPage" attribute of vim module.
@@ -494,10 +599,9 @@ vim.Dictionary object *python-Dictionary*
Remove specified key from dictionary and return
corresponding value. If key is not found and default is
given returns the default, otherwise raises KeyError.
popitem(key)
Remove specified key from dictionary and return a pair
with it and the corresponding value. Returned key is a new
object.
popitem()
Remove random key from dictionary and return (key, value)
pair.
has_key(key)
Check whether dictionary contains specified key, similar
to `key in dict`.
@@ -636,6 +740,11 @@ To work around such problems there are these options:
3. You undefine PY_NO_RTLD_GLOBAL in auto/config.h after configuration. This
may crash Vim though.
*E880*
Raising SystemExit exception in python isn't endorsed way to quit vim, use: >
:py vim.command("qall!")
<
*has-python*
You can test what Python version is available with: >
if has('python')

View File

@@ -1,4 +1,4 @@
*indent.txt* For Vim version 7.3. Last change: 2013 May 20
*indent.txt* For Vim version 7.3. Last change: 2013 Jun 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -729,6 +729,50 @@ buffer-local variable as follows >
let b:fortran_indent_less=1
HTML *ft-html-indent* *html-indent* *html-indenting*
This is about variables you can set in your vimrc to customize HTML indenting.
You can set the indent for the first line after <script> and <style>
"blocktags" (default "zero"): >
:let g:html_indent_script1 = "inc"
:let g:html_indent_style1 = "inc"
<
VALUE MEANING ~
"zero" zero indent
"auto" auto indent (same indent as the blocktag)
"inc" auto indent + one indent step
Many tags increase the indent for what follows per default (see "Add Indent
Tags" in the script). You can add further tags with: >
:let g:html_indent_inctags = "html,body,head,tbody"
You can also remove such tags with: >
:let g:html_indent_autotags = "th,td,tr,tfoot,thead"
Default value is empty for both variables. Note: the initial "inctags" are
only defined once per Vim session.
User variables are only read when the script is sourced. To enable your
changes during a session, without reloading the HTML file, you can manually
do: >
:call HtmlIndent_CheckUserSettings()
Detail:
Calculation of indent inside "blocktags" with "alien" content:
BLOCKTAG INDENT EXPR WHEN APPLICABLE ~
<script> : {customizable} if first line of block
: cindent(v:lnum) if attributes empty or contain "java"
: -1 else (vbscript, tcl, ...)
<style> : {customizable} if first line of block
: GetCSSIndent() else
<!-- --> : -1
PHP *ft-php-indent* *php-indent* *php-indenting*
NOTE: PHP files will be indented correctly only if PHP |syntax| is active.

View File

@@ -1,4 +1,4 @@
*index.txt* For Vim version 7.3. Last change: 2013 May 17
*index.txt* For Vim version 7.3. Last change: 2013 Jun 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -801,6 +801,10 @@ tag char note action in Normal mode ~
|zE| zE eliminate all folds
|zF| zF create a fold for N lines
|zG| zG mark word as good spelled word
|zH| zH when 'wrap' off scroll half a screenwidth
to the right
|zL| zL when 'wrap' off scroll half a screenwidth
to the left
|zM| zM set 'foldlevel' to zero
|zN| zN set 'foldenable'
|zO| zO open folds recursively
@@ -1510,6 +1514,7 @@ tag command action ~
|:sview| :sv[iew] split window and edit file read-only
|:swapname| :sw[apname] show the name of the current swap file
|:syntax| :sy[ntax] syntax highlighting
|:syntime| :synti[me] measure syntax highlighting speed
|:syncbind| :sync[bind] sync scroll binding
|:t| :t same as ":copy"
|:tNext| :tN[ext] jump to previous matching tag

View File

@@ -1468,9 +1468,9 @@ knows how to color highlight. It can be used for any filetype and provides a
minimal language-sensitive completion.
To enable syntax code completion you can run: >
setlocal omnifunc=syntaxcomplete#Complete
setlocal omnifunc=syntaxcomplete#Complete
You can automate this by placing the following in your vimrc (after any
You can automate this by placing the following in your |.vimrc| (after any
":filetype" command): >
if has("autocmd") && exists("+omnifunc")
autocmd Filetype *
@@ -1487,7 +1487,7 @@ customize which syntax groups to include or exclude from the list. Let's have
a look at the PHP filetype to see how this works.
If you edit a file called, index.php, run the following command: >
:syntax list
syntax list
The first thing you will notice is that there are many different syntax groups.
The PHP language can include elements from different languages like HTML,
@@ -1496,24 +1496,38 @@ that begin with the filetype, "php", in this case. For example these syntax
groups are included by default with the PHP: phpEnvVar, phpIntVar,
phpFunctions.
The PHP language has an enormous number of items which it knows how to syntax
highlight. This means these items will be available within the omni
completion list. Some people may find this list unwieldy or are only
interested in certain items.
If you wish non-filetype syntax items to also be included, you can use a
regular expression syntax (added in version 13.0 of autoload\syntaxcomplete.vim)
to add items. Looking at the output from ":syntax list" while editing a PHP file
I can see some of these entries: >
htmlArg,htmlTag,htmlTagName,javaScriptStatement,javaScriptGlobalObjects
There are two ways to prune this list (if necessary). If you find certain
syntax groups you do not wish displayed you can add the following to your
vimrc: >
let g:omni_syntax_group_exclude_php = 'phpCoreConstant,phpConstant'
To pick up any JavaScript and HTML keyword syntax groups while editing a PHP
file, you can use 3 different regexs, one for each language. Or you can
simply restrict the include groups to a particular value, without using
a regex string: >
let g:omni_syntax_group_include_php = 'php\w\+,javaScript\w\+,html\w\+'
let g:omni_syntax_group_include_php = 'phpFunctions,phpMethods'
<
The basic form of this variable is: >
let g:omni_syntax_group_include_{filetype} = 'regex,comma,separated'
The PHP language has an enormous number of items which it knows how to syntax
highlight. These these items will be available within the omni completion
list.
Some people may find this list unwieldy or are only interested in certain
items. There are two ways to prune this list (if necessary). If you find
certain syntax groups you do not wish displayed you can use two different
methods to identify these groups. The first specifically lists the syntax
groups by name. The second uses a regular expression to identify both
syntax groups. Simply add one the following to your vimrc: >
let g:omni_syntax_group_exclude_php = 'phpCoreConstant,phpConstant'
let g:omni_syntax_group_exclude_php = 'php\w*Constant'
Add as many syntax groups to this list by comma separating them. The basic
form of this variable is: >
let g:omni_syntax_group_exclude_{filetype} = 'comma,separated,list'
For completeness the opposite is also true. Creating this variable in your
vimrc will only include the items in the phpFunctions and phpMethods syntax
groups: >
let g:omni_syntax_group_include_php = 'phpFunctions,phpMethods'
let g:omni_syntax_group_exclude_{filetype} = 'regex,comma,separated'
You can create as many of these variables as you need, varying only the
filetype at the end of the variable name.
@@ -1554,6 +1568,9 @@ To retrieve only the syntax items for the sqlOperator syntax group: >
To retrieve all syntax items for both the sqlOperator and sqlType groups: >
echo OmniSyntaxList( ['sqlOperator', 'sqlType'] )
A regular expression can also be used: >
echo OmniSyntaxList( ['sql\w\+'] )
From within a plugin, you would typically assign the output to a List: >
let myKeywords = []
let myKeywords = OmniSyntaxList( ['sqlKeyword'] )

View File

@@ -1,4 +1,4 @@
*intro.txt* For Vim version 7.3. Last change: 2012 Sep 05
*intro.txt* For Vim version 7.3. Last change: 2013 Jun 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -261,6 +261,7 @@ Vim would never have become what it is now, without the help of these people!
I wish to thank all the people that sent me bug reports and suggestions. The
list is too long to mention them all here. Vim would not be the same without
the ideas from all these people: They keep Vim alive!
*love* *peace* *friendship* *gross-national-happiness*
In this documentation there are several references to other versions of Vi:

View File

@@ -1,4 +1,4 @@
*map.txt* For Vim version 7.3. Last change: 2013 May 05
*map.txt* For Vim version 7.3. Last change: 2013 Jun 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -159,9 +159,9 @@ type "a", then "bar" will get inserted.
1.2 SPECIAL ARGUMENTS *:map-arguments*
"<buffer>", "<silent>", "<special>", "<script>", "<expr>" and "<unique>" can
be used in any order. They must appear right after the command, before any
other arguments.
"<buffer>", "<nowait>", "<silent>", "<special>", "<script>", "<expr>" and
"<unique>" can be used in any order. They must appear right after the
command, before any other arguments.
*:map-local* *:map-<buffer>* *E224* *E225*
If the first argument to one of these commands is "<buffer>" the mapping will
@@ -169,12 +169,23 @@ be effective in the current buffer only. Example: >
:map <buffer> ,w /[.,;]<CR>
Then you can map ",w" to something else in another buffer: >
:map <buffer> ,w /[#&!]<CR>
The local buffer mappings are used before the global ones.
The local buffer mappings are used before the global ones. See <nowait> below
to make a short local mapping not taking effect when a longer global one
exists.
The "<buffer>" argument can also be used to clear mappings: >
:unmap <buffer> ,w
:mapclear <buffer>
Local mappings are also cleared when a buffer is deleted, but not when it is
unloaded. Just like local option values.
Also see |map-precedence|.
*:map-<nowait>* *:map-nowait*
When defining a buffer-local mapping for "," there may be a global mapping
that starts with ",". Then you need to type another character for Vim to know
whether to use the "," mapping or the longer one. To avoid this add the
<nowait> argument. Then the mapping will be used when it matches, Vim does
not wait for more characters to be typed. However, if the characters were
already type they are used.
*:map-<silent>* *:map-silent*
To define a mapping which will not be echoed on the command line, add
@@ -654,6 +665,17 @@ option). After that it assumes that the 'q' is to be interpreted as such. If
you type slowly, or your system is slow, reset the 'timeout' option. Then you
might want to set the 'ttimeout' option.
*map-precedence*
Buffer-local mappings (defined using |:map-<buffer>|) take precedence over
global mappings. When a buffer-local mapping is the same as a global mapping,
Vim will use the buffer-local mapping. In addition, Vim will use a complete
mapping immediately if it was defined with <nowait>, even if a longer mapping
has the same prefix. For example, given the following two mappings: >
:map <buffer> <nowait> \a :echo "Local \a"<CR>
:map \abc :echo "Global \abc"<CR>
When typing \a the buffer-local mapping will be used immediately. Vim will
not wait for more characters to see if the user might be typing \abc.
*map-keys-fails*
There are situations where key codes might not be recognized:
- Vim can only read part of the key code. Mostly this is only the first
@@ -1242,6 +1264,7 @@ completion can be enabled:
-complete=shellcmd Shell command
-complete=sign |:sign| suboptions
-complete=syntax syntax file names |'syntax'|
-complete=syntime |:syntime| suboptions
-complete=tag tags
-complete=tag_listfiles tags, file names are shown when CTRL-D is hit
-complete=user user names

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 7.3. Last change: 2013 May 17
*options.txt* For Vim version 7.3. Last change: 2013 Jun 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -482,39 +482,42 @@ to set options automatically for one or more files:
There are two forms of modelines. The first form:
[text]{white}{vi:|vim:|ex:}[white]{options}
[text] any text or empty
{white} at least one blank character (<Space> or <Tab>)
{vi:|vim:|ex:} the string "vi:", "vim:" or "ex:"
[white] optional white space
{options} a list of option settings, separated with white space or ':',
where each part between ':' is the argument for a ":set"
command (can be empty)
[text] any text or empty
{white} at least one blank character (<Space> or <Tab>)
{vi:|vim:|ex:} the string "vi:", "vim:" or "ex:"
[white] optional white space
{options} a list of option settings, separated with white space
or ':', where each part between ':' is the argument
for a ":set" command (can be empty)
Example:
Examples:
vi:noai:sw=3 ts=6 ~
vim: tw=77 ~
The second form (this is compatible with some versions of Vi):
[text]{white}{vi:|vim:|ex:}[white]se[t] {options}:[text]
[text]{white}{vi:|vim:|Vim:|ex:}[white]se[t] {options}:[text]
[text] any text or empty
{white} at least one blank character (<Space> or <Tab>)
{vi:|vim:|ex:} the string "vi:", "vim:" or "ex:"
[white] optional white space
se[t] the string "set " or "se " (note the space)
{options} a list of options, separated with white space, which is the
argument for a ":set" command
: a colon
[text] any text or empty
[text] any text or empty
{white} at least one blank character (<Space> or <Tab>)
{vi:|vim:|Vim:|ex:} the string "vi:", "vim:", "Vim:" or "ex:"
[white] optional white space
se[t] the string "set " or "se " (note the space); When
"Vim" is used it must be "set".
{options} a list of options, separated with white space, which
is the argument for a ":set" command
: a colon
[text] any text or empty
Example:
Examples:
/* vim: set ai tw=75: */ ~
/* Vim: set ai tw=75: */ ~
The white space before {vi:|vim:|ex:} is required. This minimizes the chance
that a normal word like "lex:" is caught. There is one exception: "vi:" and
"vim:" can also be at the start of the line (for compatibility with version
3.0). Using "ex:" at the start of the line will be ignored (this could be
short for "example:").
The white space before {vi:|vim:|Vim:|ex:} is required. This minimizes the
chance that a normal word like "lex:" is caught. There is one exception:
"vi:" and "vim:" can also be at the start of the line (for compatibility with
version 3.0). Using "ex:" at the start of the line will be ignored (this
could be short for "example:").
*modeline-local*
The options are set like with ":setlocal": The new value only applies to the
@@ -530,7 +533,7 @@ in another window. But window-local options will be set.
*modeline-version*
If the modeline is only to be used for some versions of Vim, the version
number can be specified where "vim:" is used:
number can be specified where "vim:" or "Vim:" is used:
vim{vers}: version {vers} or later
vim<{vers}: version before {vers}
vim={vers}: version {vers}
@@ -2243,7 +2246,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Specifies whether to use quickfix window to show cscope results.
See |cscopequickfix|.
*'cscoperelative'* *'csre'*
*'cscoperelative'* *'csre'* *'nocscoperelative'* *'nocsre'*
'cscoperelative' 'csre' boolean (default off)
global
{not available when compiled without the |+cscope|
@@ -3993,6 +3996,26 @@ A jump table for the options with a short description can be found at |Q_op|.
Can be overruled by using "\c" or "\C" in the pattern, see
|/ignorecase|.
*'imactivatefunc'* *'imaf'*
'imactivatefunc' 'imaf' string (default "")
global
{not in Vi}
{only available when compiled with |+xim| and
|+GUI_GTK|}
This option specifies a function that will be called to
activate/inactivate Input Method.
Example: >
function ImActivateFunc(active)
if a:active
... do something
else
... do something
endif
" return value is not used
endfunction
set imactivatefunc=ImActivateFunc
<
*'imactivatekey'* *'imak'*
'imactivatekey' 'imak' string (default "")
global
@@ -4089,6 +4112,24 @@ A jump table for the options with a short description can be found at |Q_op|.
The value 0 may not work correctly with Athena and Motif with some XIM
methods. Use 'imdisable' to disable XIM then.
*'imstatusfunc'* *'imsf'*
'imstatusfunc' 'imsf' string (default "")
global
{not in Vi}
{only available when compiled with |+xim| and
|+GUI_GTK|}
This option specifies a function that is called to obtain the status
of Input Method. It must return a positive number when IME is active.
Example: >
function ImStatusFunc()
let is_active = ...do something
return is_active ? 1 : 0
endfunction
set imstatusfunc=ImStatusFunc
<
NOTE: This function is invoked very often. Keep it fast.
*'include'* *'inc'*
'include' 'inc' string (default "^\s*#\s*include")
global or local to buffer |global-local|
@@ -5132,7 +5173,18 @@ A jump table for the options with a short description can be found at |Q_op|.
characters are put before the number.
See |hl-LineNr| and |hl-CursorLineNr| for the highlighting used for
the number.
When setting this option, 'relativenumber' is reset.
*number_relativenumber*
The 'relativenumber' option changes the displayed number to be
relative to the cursor. Together with 'number' there are these
four combinations (cursor in line 3):
'nonu' 'nu' 'nonu' 'nu'
'nornu' 'nornu' 'rnu' 'rnu'
|apple | 1 apple | 2 apple | 2 apple
|pear | 2 pear | 1 pear | 1 pear
|nobody | 3 nobody | 0 nobody |3 nobody
|there | 4 there | 1 there | 1 there
*'numberwidth'* *'nuw'*
'numberwidth' 'nuw' number (Vim default: 4 Vi default: 8)
@@ -5516,7 +5568,7 @@ A jump table for the options with a short description can be found at |Q_op|.
matches will be highlighted. This is used to avoid that Vim hangs
when using a very complicated pattern.
*'regexpengine''* *'re'*
*'regexpengine'* *'re'*
'regexpengine' 're' number (default 0)
global
{not in Vi}
@@ -5547,7 +5599,10 @@ A jump table for the options with a short description can be found at |Q_op|.
characters are put before the number.
See |hl-LineNr| and |hl-CursorLineNr| for the highlighting used for
the number.
When setting this option, 'number' is reset.
The number in front of the cursor line also depends on the value of
'number', see |number_relativenumber| for all combinations of the two
options.
*'remap'* *'noremap'*
'remap' boolean (default on)
@@ -6699,7 +6754,8 @@ A jump table for the options with a short description can be found at |Q_op|.
V N Virtual column number as -{num}. Not displayed if equal to 'c'.
p N Percentage through file in lines as in |CTRL-G|.
P S Percentage through file of displayed window. This is like the
percentage described for 'ruler'. Always 3 in length.
percentage described for 'ruler'. Always 3 in length, unless
translated.
a S Argument list status as in default title. ({current} of {max})
Empty if the argument file count is zero or one.
{ NF Evaluate expression between '%{' and '}' and substitute result.
@@ -7521,7 +7577,7 @@ A jump table for the options with a short description can be found at |Q_op|.
given, no further entry is used.
See |undo-persistence|.
*'undofile'* *'udf'*
*'undofile'* *'noundofile'* *'udf'* *'noudf'*
'undofile' 'udf' boolean (default off)
local to buffer
{not in Vi}

View File

@@ -1,4 +1,4 @@
*pattern.txt* For Vim version 7.3. Last change: 2013 May 17
*pattern.txt* For Vim version 7.3. Last change: 2013 Jun 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -698,6 +698,7 @@ overview.
For speed it's often much better to avoid this multi. Try using "\zs"
instead |/\zs|. To match the same as the above example:
an\_s\+\zsfile
At least set a limit for the look-behind, see below.
"\@<=" and "\@<!" check for matches just before what follows.
Theoretically these matches could start anywhere before this position.
@@ -710,6 +711,18 @@ overview.
Example matches ~
\1\@<=,\([a-z]\+\) ",abc" in "abc,abc"
\@123<=
Like "\@<=" but only look back 123 bytes. This avoids trying lots
of matches that are known to fail and make executing the pattern very
slow. Example, check if there is a "<" just before "span":
/<\@1<=span
This will try matching "<" only one byte before "span", which is the
only place that works anyway.
After crossing a line boundary, the limit is relative to the end of
the line. Thus the characters at the start of the line with the match
are not counted (this is just to keep it simple).
The number zero is the same as no limit.
*/\@<!*
\@<! Matches with zero width if the preceding atom does NOT match just
before what follows. Thus this matches if there is no position in the
@@ -719,11 +732,16 @@ overview.
The match with the preceding atom is made to end just before the match
with what follows, thus an atom that ends in ".*" will work.
Warning: This can be slow (because many positions need to be checked
for a match).
for a match). Use a limit if you can, see below.
Example matches ~
\(foo\)\@<!bar any "bar" that's not in "foobar"
\(\/\/.*\)\@<!in "in" which is not after "//"
\@123<!
Like "\@<!" but only look back 123 bytes. This avoids trying lots of
matches that are known to fail and make executing the pattern very
slow.
*/\@>*
\@> Matches the preceding atom like matching a whole pattern. {not in Vi}
Like "(?>pattern)" in Perl.
@@ -1193,6 +1211,8 @@ When "\Z" appears anywhere in the pattern, composing characters are ignored.
Thus only the base characters need to match, the composing characters may be
different and the number of composing characters may differ. Only relevant
when 'encoding' is "utf-8".
Exception: If the pattern starts with one or more composing characters, these
must match.
When a composing character appears at the start of the pattern of after an
item that doesn't include the composing character, a match is found at any
@@ -1202,8 +1222,20 @@ When using a dot and a composing character, this works the same as the
composing character by itself, except that it doesn't matter what comes before
this.
The order of composing characters matters, even though changing the order
doesn't change what a character looks like. This may change in the future.
The order of composing characters does not matter. Also, the text may have
more composing characters than the pattern, it still matches. But all
composing characters in the pattern must be found in the text.
Suppose B is a base character and x and y are composing characters:
pattern text match ~
Bxy Bxy yes (perfect match)
Bxy Byx yes (order ignored)
Bxy By no (x missing)
Bxy Bx no (y missing)
Bx Bx yes (perfect match)
Bx By no (x missing)
Bx Bxy yes (extra y ignored)
Bx Byx yes (extra y ignored)
==============================================================================
9. Compare with Perl patterns *perl-patterns*

View File

@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 7.3. Last change: 2013 May 20
*quickref.txt* For Vim version 7.3. Last change: 2013 Jun 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -738,10 +738,12 @@ Short explanation of each option: *option-list*
'iconstring' string to use for the Vim icon text
'ignorecase' 'ic' ignore case in search patterns
'imactivatekey' 'imak' key that activates the X input method
'imactivatefunc' 'imaf' function to enable/disable the X input method
'imcmdline' 'imc' use IM when starting to edit a command line
'imdisable' 'imd' do not use the IM in any mode
'iminsert' 'imi' use :lmap or IM in Insert mode
'imsearch' 'ims' use :lmap or IM when typing a search pattern
'imstatusfunc' 'imsf' function to obtain X input method status
'include' 'inc' pattern to be used to find an include file
'includeexpr' 'inex' expression used to process an include line
'incsearch' 'is' highlight match while typing search pattern

View File

@@ -1,4 +1,4 @@
*spell.txt* For Vim version 7.3. Last change: 2011 May 25
*spell.txt* For Vim version 7.3. Last change: 2013 Jun 26
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -928,9 +928,13 @@ When the encoding is UTF-8 no word characters need to be specified.
Vim allows you to use spell checking for several languages in the same file.
You can list them in the 'spelllang' option. As a consequence all spell files
for the same encoding must use the same word characters, otherwise they can't
be combined without errors. If you get a warning that the word tables differ
you may need to generate the .spl file again with |:mkspell|. Check the FOL,
LOW and UPP lines in the used .aff file.
be combined without errors.
If you get an E763 warning that the word tables differ you need to update your
".spl" spell files. If you downloaded the files, get the latest version of
all spell files you use. Otherwise generate the .spl file again with
|:mkspell|. If you still get errors check the FOL, LOW and UPP lines in the
used .aff files.
The XX.ascii.spl spell file generated with the "-ascii" argument will not
contain the table with characters, so that it can be combine with spell files

View File

@@ -1,4 +1,4 @@
*starting.txt* For Vim version 7.3. Last change: 2013 May 20
*starting.txt* For Vim version 7.3. Last change: 2013 Jun 12
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -439,7 +439,9 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
will wait for the edit session to finish (e.g., mail or
readnews). See |amiga-window|.
MS-Windows: This option is not always supported.
MS-Windows: This option is not supported. However, when
running Vim with an installed vim.bat or gvim.bat file it
works.
{not in Vi}
@@ -755,11 +757,21 @@ accordingly. Vim proceeds in this order:
file, but "exrc" is what Vi always used, "vimrc" is a Vim specific
name. Also see |vimrc-intro|.
Recommended place for your personal initializations:
Unix $HOME/.vimrc
OS/2 $HOME/.vimrc or $VIM/.vimrc (or _vimrc)
MS-DOS and Win32 $HOME/_vimrc or $VIM/_vimrc
Amiga s:.vimrc or $VIM/.vimrc
Places for your personal initializations:
Unix $HOME/.vimrc or $HOME/.vim/vimrc
OS/2 $HOME/.vimrc, $HOME/vimfiles/vimrc
or $VIM/.vimrc (or _vimrc)
MS-Windows $HOME/_vimrc, $HOME/vimfiles/vimrc
or $VIM/_vimrc
Amiga s:.vimrc, home:.vimrc, home:vimfiles:vimrc
or $VIM/.vimrc
The files are searched in the order specified above and only the first
one that is found is read.
RECOMMENDATION: Put all your Vim configuration stuff in the
$HOME/.vim/ directory ($HOME/vimfiles/ for MS-Windows). That makes it
easy to copy it to another system.
If Vim was started with "-u filename", the file "filename" is used.
All following initializations until 4. are skipped.
@@ -789,12 +801,15 @@ accordingly. Vim proceeds in this order:
- The environment variable VIMINIT (see also |compatible-default|) (*)
The value of $VIMINIT is used as an Ex command line.
- The user vimrc file(s):
"$HOME/.vimrc" (for Unix and OS/2) (*)
"s:.vimrc" (for Amiga) (*)
"home:.vimrc" (for Amiga) (*)
"$VIM/.vimrc" (for OS/2 and Amiga) (*)
"$HOME/_vimrc" (for MS-DOS and Win32) (*)
"$VIM/_vimrc" (for MS-DOS and Win32) (*)
"$HOME/.vimrc" (for Unix and OS/2) (*)
"$HOME/.vim/vimrc" (for Unix and OS/2) (*)
"s:.vimrc" (for Amiga) (*)
"home:.vimrc" (for Amiga) (*)
"home:vimfiles:vimrc" (for Amiga) (*)
"$VIM/.vimrc" (for OS/2 and Amiga) (*)
"$HOME/_vimrc" (for MS-DOS and Win32) (*)
"$HOME/vimfiles/vimrc" (for MS-DOS and Win32) (*)
"$VIM/_vimrc" (for MS-DOS and Win32) (*)
Note: For Unix, OS/2 and Amiga, when ".vimrc" does not exist,
"_vimrc" is also tried, in case an MS-DOS compatible file
system is used. For MS-DOS and Win32 ".vimrc" is checked

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 7.3. Last change: 2013 Apr 05
*syntax.txt* For Vim version 7.3. Last change: 2013 Jun 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -37,6 +37,7 @@ In the User Manual:
15. Highlighting tags |tag-highlight|
16. Window-local syntax |:ownsyntax|
17. Color xterms |xterm-color|
18. When syntax is slow |:syntime|
{Vi does not have any of these commands}
@@ -378,10 +379,14 @@ settings, depending on which syntax is active. Example: >
2HTML *2html.vim* *convert-to-HTML*
This is not a syntax file itself, but a script that converts the current
window into HTML. Vim opens a new window in which it builds the HTML file.
window into HTML. Vim opens a new window in which it builds the HTML file.
After you save the resulting file, you can view it with any browser. The
colors should be exactly the same as you see them in Vim.
After you save the resulting file, you can view it with any browser. The
colors should be exactly the same as you see them in Vim. With
|g:html_line_ids| you can jump to specific lines by adding (for example) #L123
or #123 to the end of the URL in your browser's address bar. And with
|g:html_dynamic_folds| enabled, you can show or hide the text that is folded
in Vim.
You are not supposed to set the 'filetype' or 'syntax' option to "2html"!
Source the script to convert the current file: >
@@ -420,11 +425,14 @@ and last line to be converted. Example, using the last set Visual area: >
|g:html_end_line| to the start and end of the range,
respectively. Default range is the entire buffer.
If the current window is part of a |diff|, unless
|g:html_diff_one_file| is set, :TOhtml will convert
all windows which are part of the diff in the current
tab and place them side-by-side in a <table> element
in the generated HTML.
If the current window is part of a |diff|, unless
|g:html_diff_one_file| is set, :TOhtml will convert
all windows which are part of the diff in the current
tab and place them side-by-side in a <table> element
in the generated HTML. With |g:html_line_ids| you can
jump to lines in specific windows with (for example)
#W1L42 for line 42 in the first diffed window, or
#W3L87 for line 87 in the third.
Examples: >
@@ -434,9 +442,9 @@ and last line to be converted. Example, using the last set Visual area: >
<
*g:html_diff_one_file*
Default: 0.
When 0, all windows involved in a |diff| in the current tab page are converted
to HTML and placed side-by-side in a <table> element.
When 1, only the current buffer is converted.
When 0, and using |:TOhtml| all windows involved in a |diff| in the current tab
page are converted to HTML and placed side-by-side in a <table> element. When
1, only the current buffer is converted.
Example: >
let g:html_diff_one_file = 1
@@ -485,6 +493,23 @@ Force to omit the line numbers: >
:let g:html_number_lines = 0
Go back to the default to use 'number' by deleting the variable: >
:unlet g:html_number_lines
<
*g:html_line_ids*
Default: 1 if |g:html_number_lines| is set, 0 otherwise.
When 1, adds an HTML id attribute to each line number, or to an empty <span>
inserted for that purpose if no line numbers are shown. This ID attribute
takes the form of L123 for single-buffer HTML pages, or W2L123 for diff-view
pages, and is used to jump to a specific line (in a specific window of a diff
view). Javascript is inserted to open any closed dynamic folds
(|g:html_dynamic_folds|) containing the specificed line before jumping. The
javascript also allows omitting the window ID in the url, and the leading L.
For example: >
page.html#L123 jumps to line 123 in a single-buffer file
page.html#123 does the same
diff.html#W1L42 jumps to line 42 in the first window in a diff
diff.html#42 does the same
<
*g:html_use_css*
Default: 1.
@@ -594,6 +619,25 @@ they will not be openable without a foldcolumn.
>
:let g:html_hover_unfold = 1
<
*g:html_id_expr*
Default: ""
Dynamic folding and jumping to line IDs rely on unique IDs within the document
to work. If generated HTML is copied into a larger document, these IDs are no
longer guaranteed to be unique. Set g:html_id_expr to an expression Vim can
evaluate to get a unique string to append to each ID used in a given document,
so that the full IDs will be unique even when combined with other content in a
larger HTML document. Example, to append _ and the buffer number to each ID: >
:let g:html_id_expr = '"_".bufnr("%")'
<
To append a string "_mystring" to the end of each ID: >
:let g:html_id_expr = '"_mystring"'
<
Note, when converting a diff view to HTML, the expression will only be
evaluated for the first window in the diff, and the result used for all the
windows.
*TOhtml-wrap-text* *g:html_pre_wrap*
Default: current 'wrap' setting.
When 0, if |g:html_no_pre| is 0 or unset, the text in the generated HTML does
@@ -1240,7 +1284,7 @@ to your startup file.
ERLANG *erlang.vim* *ft-erlang-syntax*
Erlang is a functional programming language developed by Ericsson. Files with
the following extentions are recognized as Erlang files: erl, hrl, yaws.
the following extensions are recognized as Erlang files: erl, hrl, yaws.
The BIFs (built-in functions) are highlighted by default. To disable this,
put the following line in your vimrc: >
@@ -1309,8 +1353,8 @@ FORTRAN *fortran.vim* *ft-fortran-syntax*
Default highlighting and dialect ~
Highlighting appropriate for Fortran 2008 is used by default. This choice
should be appropriate for most users most of the time because Fortran 2008 is
almost a superset of previous versions (Fortran 2003, 95, 90, and 77).
should be appropriate for most users most of the time because Fortran 2008 is
almost a superset of previous versions (Fortran 2003, 95, 90, and 77).
Fortran source code form ~
Fortran code can be in either fixed or free source form. Note that the
@@ -1401,7 +1445,7 @@ items.
If you use F, the advantage of setting the dialect appropriately is that
other legacy features excluded from F will be highlighted as todo items and
that free source form will be assumed.
that free source form will be assumed.
The dialect can be selected in various ways. If all your fortran files use
the same dialect, set the global variable fortran_dialect in your .vimrc prior
@@ -1435,13 +1479,13 @@ Fortran comment of the form >
For previous versions of the syntax, you may have set fortran_dialect to the
now-obsolete values "f77", "f90", "f95", or "elf". Such settings will be
silently handled as "f08". Users of "elf" may wish to experiment with "F"
instead.
instead.
The syntax/fortran.vim script contains embedded comments that tell you how to
comment and/or uncomment some lines to (a) activate recognition of some
non-standard, vendor-supplied intrinsics and (b) to prevent features deleted
or declared obsolescent in the 2008 standard from being highlighted as todo
items.
items.
Limitations ~
Parenthesis checking does not catch too few closing parentheses. Hollerith
@@ -2188,9 +2232,11 @@ PERL *perl.vim* *ft-perl-syntax*
There are a number of possible options to the perl syntax highlighting.
If you use POD files or POD segments, you might: >
Inline POD highlighting is now turned on by default. If you don't wish
to have the added complexity of highlighting POD embedded within Perl
files, you may set the 'perl_include_pod' option to 0: >
:let perl_include_pod = 1
:let perl_include_pod = 0
The reduce the complexity of parsing (and increase performance) you can switch
off two elements in the parsing of variable names and contents. >
@@ -2243,13 +2289,20 @@ If you want to fold blocks in if statements, etc. as well set the following: >
:let perl_fold_blocks = 1
To avoid folding packages or subs when perl_fold is let, let the appropriate
variable(s): >
Subroutines are folded by default if 'perl_fold' is set. If you do not want
this, you can set 'perl_nofold_subs': >
:unlet perl_nofold_packages
:unlet perl_nofold_subs
:let perl_nofold_subs = 1
Anonymous subroutines are not folded by default; you may enable their folding
via 'perl_fold_anonymous_subs': >
:let perl_fold_anonymous_subs = 1
Packages are also folded by default if 'perl_fold' is set. To disable this
behavior, set 'perl_nofold_packages': >
:let perl_nofold_packages = 1
PHP3 and PHP4 *php.vim* *php3.vim* *ft-php-syntax* *ft-php3-syntax*
@@ -2286,7 +2339,7 @@ For highlighting parent error ] or ): >
let php_parent_error_close = 1
For skipping an php end tag, if there exists an open ( or [ without a closing
For skipping a php end tag, if there exists an open ( or [ without a closing
one: >
let php_parent_error_open = 1
@@ -2472,7 +2525,7 @@ If you want all possible Python highlighting (the same as setting the
preceding last option and unsetting all other ones): >
:let python_highlight_all = 1
Note: only existence of these options matter, not their value. You can replace
Note: only existence of these options matter, not their value. You can replace
1 above with anything.
@@ -2865,9 +2918,24 @@ tcsh_minlines is 100. The disadvantage of using a larger number is that
redrawing can become slow.
TEX *tex.vim* *ft-tex-syntax*
TEX *tex.vim* *ft-tex-syntax* *latex-syntax*
*tex-folding*
Tex Contents~
Tex: Want Syntax Folding? |tex-folding|
Tex: No Spell Checking Wanted |g:tex_nospell|
Tex: Don't Want Spell Checking In Comments? |tex-nospell|
Tex: Want Spell Checking in Verbatim Zones? |tex-verb|
Tex: Run-on Comments or MathZones |tex-runon|
Tex: Slow Syntax Highlighting? |tex-slow|
Tex: Want To Highlight More Commands? |tex-morecommands|
Tex: Excessive Error Highlighting? |tex-error|
Tex: Need a new Math Group? |tex-math|
Tex: Starting a New Style? |tex-style|
Tex: Taking Advantage of Conceal Mode |tex-conceal|
Tex: Selective Conceal Mode |g:tex_conceal|
Tex: Controlling iskeyword |g:tex_isk|
*tex-folding* *g:tex_fold_enabled*
Tex: Want Syntax Folding? ~
As of version 28 of <syntax/tex.vim>, syntax-based folding of parts, chapters,
@@ -2877,24 +2945,27 @@ in your <.vimrc>, and :set fdm=syntax. I suggest doing the latter via a
modeline at the end of your LaTeX file: >
% vim: fdm=syntax
If your system becomes too slow, then you might wish to look into >
http://vim.wikia.com/wiki/Keep_folds_closed_while_inserting_text
https://vimhelp.appspot.com/vim_faq.txt.html#faq-29.7
<
*tex-nospell*
*g:tex_nospell*
Tex: No Spell Checking Wanted~
If you don't want spell checking anywhere in your LaTeX document, put >
let g:tex_nospell=1
into your .vimrc. If you merely wish to suppress spell checking inside
comments only, see |g:tex_comment_nospell|.
*tex-nospell* *g:tex_comment_nospell*
Tex: Don't Want Spell Checking In Comments? ~
Some folks like to include things like source code in comments and so would
prefer that spell checking be disabled in comments in LaTeX files. To do
this, put the following in your <.vimrc>: >
let g:tex_comment_nospell= 1
The comment lines >
% nospell{
...
% nospell}
will suppress spell checking between them. These comment lines spelling
control are known to be fragile; for example, don't include any of the section
commands (\part, \chapter, \section, \paragraph, etc) inside nospell blocks
or interleave environments (such as math) across nospell blocks.
*tex-verb*
If you want to suppress spell checking everywhere inside your LaTeX document,
see |g:tex_nospell|.
*tex-verb* *g:tex_verbspell*
Tex: Want Spell Checking in Verbatim Zones?~
Often verbatim regions are used for things like source code; seldom does
@@ -2902,7 +2973,7 @@ one want source code spell-checked. However, for those of you who do
want your verbatim zones spell-checked, put the following in your <.vimrc>: >
let g:tex_verbspell= 1
<
*tex-runon*
*tex-runon* *tex-stopzone*
Tex: Run-on Comments or MathZones ~
The <syntax/tex.vim> highlighting supports TeX, LaTeX, and some AmsTeX. The
@@ -2915,7 +2986,7 @@ special "TeX comment" has been provided >
which will forcibly terminate the highlighting of either a texZone or a
texMathZone.
*tex-slow*
*tex-slow* *tex-sync*
Tex: Slow Syntax Highlighting? ~
If you have a slow computer, you may wish to reduce the values for >
@@ -2928,7 +2999,7 @@ if any, is the text at the top of the screen supposed to be in?).
Another cause of slow highlighting is due to syntax-driven folding; see
|tex-folding| for a way around this.
*g:tex_fast*
*g:tex_fast*
Finally, if syntax highlighting is still too slow, you may set >
@@ -2957,7 +3028,7 @@ selectively to enable just some syntax highlighting: >
As an example, let g:tex_fast= "M" will allow math-associated highlighting
but suppress all the other region-based syntax highlighting.
*tex-morecommands* *tex-package*
*tex-morecommands* *tex-package*
Tex: Want To Highlight More Commands? ~
LaTeX is a programmable language, and so there are thousands of packages full
@@ -2969,14 +3040,14 @@ by syntax/tex.vim. Please consider uploading any extensions that you write,
which typically would go in $HOME/after/syntax/tex/[pkgname].vim, to
http://vim.sf.net/.
*tex-error*
*tex-error* *g:tex_no_error*
Tex: Excessive Error Highlighting? ~
The <tex.vim> supports lexical error checking of various sorts. Thus,
although the error checking is ofttimes very useful, it can indicate
errors where none actually are. If this proves to be a problem for you,
you may put in your <.vimrc> the following statement: >
let tex_no_error=1
let g:tex_no_error=1
and all error checking by <syntax/tex.vim> will be suppressed.
*tex-math*
@@ -2994,7 +3065,7 @@ and then to the call to it in .vim/after/syntax/tex.vim.
The "starform" variable, if true, implies that your new math group
has a starred form (ie. eqnarray*).
*tex-style*
*tex-style* *b:tex_stylish*
Tex: Starting a New Style? ~
One may use "\makeatletter" in *.tex files, thereby making the use of "@" in
@@ -3021,12 +3092,12 @@ In fact, only a few characters are supported as subscripts.
One way to use this is to have vertically split windows (see |CTRL-W_v|); one
with |'conceallevel'| at 0 and the other at 2; and both using |'scrollbind'|.
*g:tex_conceal*
*g:tex_conceal*
Tex: Selective Conceal Mode~
You may selectively use conceal mode by setting g:tex_conceal in your
<.vimrc>. By default it is set to "admgs" to enable conceal for the
following sets of characters: >
<.vimrc>. By default, g:tex_conceal is set to "admgs" to enable concealment
for the following sets of characters: >
a = accents/ligatures
b = bold and italic
@@ -3038,18 +3109,25 @@ following sets of characters: >
By leaving one or more of these out, the associated conceal-character
substitution will not be made.
*g:tex_isk*
Tex: Controlling What's In A Keyword~
*g:tex_isk* *g:tex_stylish*
Tex: Controlling iskeyword~
(La)Tex keywords normally use the characters 0-9,a-z,A-Z,192-255 only
but the "_" is the only one that causes problems. So, by default,
syntax/tex.vim overrides the usual |'iskeyword'| setting (using |:setlocal|)
with one that works for LaTeX.
Normally, LaTeX keywords support 0-9, a-z, A-z, and 192-255 only. Latex
keywords don't support the underscore - except when in *.sty files. The
syntax highlighting script handles this with the following logic:
* If g:tex_stylish exists and is 1
then the file will be treated as a "sty" file, so the "_"
will be allowed as part of keywords
(irregardless of g:tex_isk)
* Else if the file's suffix is sty, cls, clo, dtx, or ltx,
then the file will be treated as a "sty" file, so the "_"
will be allowed as part of keywords
(irregardless of g:tex_isk)
* If g:tex_isk exists, then it will be used for the local 'iskeyword'
* Else the local 'iskeyword' will be set to 48-57,a-z,A-Z,192-255
However, one may override this iskeyword re-setting by setting the
variable, g:tex_isk, in one's .vimrc to whatever one wishes and
it will be used instead.
TF *tf.vim* *ft-tf-syntax*
@@ -3059,8 +3137,7 @@ For syncing, minlines defaults to 100. If you prefer another value, you can
set "tf_minlines" to the value you desire. Example: >
:let tf_minlines = your choice
<
VIM *vim.vim* *ft-vim-syntax*
*g:vimsyn_minlines* *g:vimsyn_maxlines*
There is a trade-off between more accurate syntax highlighting versus screen
@@ -3948,7 +4025,7 @@ External matches *:syn-ext-match*
These extra regular expression items are available in region patterns:
*/\z(* */\z(\)* *E50* *E52*
*/\z(* */\z(\)* *E50* *E52* *E879*
\z(\) Marks the sub-expression as "external", meaning that it can be
accessed from another pattern match. Currently only usable in
defining a syntax region start pattern.
@@ -4927,7 +5004,7 @@ restoring "b:current_syntax", since the syntax files do set
"w:current_syntax".
Once a window has its own syntax, syntax commands executed from other windows
on the same buffer (including :syntax clear) have no effect. Conversely,
on the same buffer (including :syntax clear) have no effect. Conversely,
syntax commands executed from that window do not affect other windows on the
same buffer.
@@ -5078,4 +5155,63 @@ Also make sure TTpro's Setup / Window / Full Color is enabled, and make sure
that Setup / Font / Enable Bold is NOT enabled.
(info provided by John Love-Jensen <eljay@Adobe.COM>)
==============================================================================
18. When syntax is slow *:syntime*
This is aimed at authors of a syntax file.
If your syntax causes redrawing to be slow, here are a few hints on making it
faster. To see slowness switch on some features that usually interfere, such
as 'relativenumber' and |folding|.
Note: this is only available when compiled with the |+profile| feature.
You many need to build Vim with "huge" features.
To find out what patterns are consuming most time, get an overview with this
sequence: >
:syntime on
[ redraw the text at least once with CTRL-L ]
:syntime report
This will display a list of syntax patterns that were used, sorted by the time
it took to match them against the text.
:syntime on Start measuring syntax times. This will add some
overhead to compute the time spent on syntax pattern
matching.
:syntime off Stop measuring syntax times.
:syntime clear Set all the counters to zero, restart measuring.
:syntime report Show the syntax items used since ":syntime on" in the
current window. Use a wider display to see more of
the output.
The list is sorted by total time. The columns are:
TOTAL Total time in seconds spent on
matching this pattern.
COUNT Number of times the pattern was used.
MATCH Number of times the pattern actually
matched
SLOWEST The longest time for one try.
AVERAGE The average time for one try.
NAME Name of the syntax item. Note that
this is not unique.
PATTERN The pattern being used.
Pattern matching gets slow when it has to try many alternatives. Try to
include as much literal text as possible to reduce the number of ways a
pattern does NOT match.
When using the "\@<=" and "\@<!" items, add a maximum size to avoid trying at
all positions in the current and previous line. For example, if the item is
literal text specify the size of that text (in bytes):
"<\@<=span" Matches "span" in "<span". This tries matching with "<" in
many places.
"<\@1<=span" Matches the same, but only tries one byte before "span".
vim:tw=78:sw=4:ts=8:ft=help:norl:

View File

@@ -341,7 +341,9 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'iconstring' options.txt /*'iconstring'*
'ignorecase' options.txt /*'ignorecase'*
'im' options.txt /*'im'*
'imactivatefunc' options.txt /*'imactivatefunc'*
'imactivatekey' options.txt /*'imactivatekey'*
'imaf' options.txt /*'imaf'*
'imak' options.txt /*'imak'*
'imc' options.txt /*'imc'*
'imcmdline' options.txt /*'imcmdline'*
@@ -351,6 +353,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'iminsert' options.txt /*'iminsert'*
'ims' options.txt /*'ims'*
'imsearch' options.txt /*'imsearch'*
'imsf' options.txt /*'imsf'*
'imstatusfunc' options.txt /*'imstatusfunc'*
'inc' options.txt /*'inc'*
'include' options.txt /*'include'*
'includeexpr' options.txt /*'includeexpr'*
@@ -496,8 +500,10 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'nocopyindent' options.txt /*'nocopyindent'*
'nocp' options.txt /*'nocp'*
'nocrb' options.txt /*'nocrb'*
'nocscoperelative' options.txt /*'nocscoperelative'*
'nocscopetag' options.txt /*'nocscopetag'*
'nocscopeverbose' options.txt /*'nocscopeverbose'*
'nocsre' options.txt /*'nocsre'*
'nocst' options.txt /*'nocst'*
'nocsverb' options.txt /*'nocsverb'*
'nocuc' options.txt /*'nocuc'*
@@ -657,6 +663,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'nottybuiltin' options.txt /*'nottybuiltin'*
'nottyfast' options.txt /*'nottyfast'*
'notx' options.txt /*'notx'*
'noudf' options.txt /*'noudf'*
'noundofile' options.txt /*'noundofile'*
'novb' options.txt /*'novb'*
'novice' vi_diff.txt /*'novice'*
'novisualbell' options.txt /*'novisualbell'*
@@ -740,7 +748,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'readonly' options.txt /*'readonly'*
'redraw' vi_diff.txt /*'redraw'*
'redrawtime' options.txt /*'redrawtime'*
'regexpengine'' options.txt /*'regexpengine''*
'regexpengine' options.txt /*'regexpengine'*
'relativenumber' options.txt /*'relativenumber'*
'remap' options.txt /*'remap'*
'report' options.txt /*'report'*
@@ -2412,6 +2420,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:map! map.txt /*:map!*
:map-<buffer> map.txt /*:map-<buffer>*
:map-<expr> map.txt /*:map-<expr>*
:map-<nowait> map.txt /*:map-<nowait>*
:map-<script> map.txt /*:map-<script>*
:map-<silent> map.txt /*:map-<silent>*
:map-<special> map.txt /*:map-<special>*
@@ -2422,6 +2431,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:map-expression map.txt /*:map-expression*
:map-local map.txt /*:map-local*
:map-modes map.txt /*:map-modes*
:map-nowait map.txt /*:map-nowait*
:map-operator map.txt /*:map-operator*
:map-script map.txt /*:map-script*
:map-silent map.txt /*:map-silent*
@@ -2874,6 +2884,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:syntax-enable syntax.txt /*:syntax-enable*
:syntax-on syntax.txt /*:syntax-on*
:syntax-reset syntax.txt /*:syntax-reset*
:syntime syntax.txt /*:syntime*
:t change.txt /*:t*
:tN tagsrch.txt /*:tN*
:tNext tagsrch.txt /*:tNext*
@@ -4279,6 +4290,7 @@ E875 pattern.txt /*E875*
E876 pattern.txt /*E876*
E877 pattern.txt /*E877*
E878 pattern.txt /*E878*
E879 syntax.txt /*E879*
E88 windows.txt /*E88*
E89 message.txt /*E89*
E90 message.txt /*E90*
@@ -4802,6 +4814,7 @@ b:changedtick eval.txt /*b:changedtick*
b:changelog_name filetype.txt /*b:changelog_name*
b:current_syntax-variable syntax.txt /*b:current_syntax-variable*
b:netrw_lastfile pi_netrw.txt /*b:netrw_lastfile*
b:tex_stylish syntax.txt /*b:tex_stylish*
b:var eval.txt /*b:var*
baan-folding syntax.txt /*baan-folding*
baan-syntax syntax.txt /*baan-syntax*
@@ -5659,6 +5672,7 @@ format-comments change.txt /*format-comments*
formatting change.txt /*formatting*
formfeed intro.txt /*formfeed*
fortran.vim syntax.txt /*fortran.vim*
friendship intro.txt /*friendship*
frombook usr_01.txt /*frombook*
ft-abel-syntax syntax.txt /*ft-abel-syntax*
ft-ada-commands ft_ada.txt /*ft-ada-commands*
@@ -5712,6 +5726,7 @@ ft-gitcommit-plugin filetype.txt /*ft-gitcommit-plugin*
ft-groff-syntax syntax.txt /*ft-groff-syntax*
ft-gsp-syntax syntax.txt /*ft-gsp-syntax*
ft-haskell-syntax syntax.txt /*ft-haskell-syntax*
ft-html-indent indent.txt /*ft-html-indent*
ft-html-omni insert.txt /*ft-html-omni*
ft-html-syntax syntax.txt /*ft-html-syntax*
ft-htmlos-syntax syntax.txt /*ft-htmlos-syntax*
@@ -5885,8 +5900,10 @@ g:html_encoding_override syntax.txt /*g:html_encoding_override*
g:html_end_line syntax.txt /*g:html_end_line*
g:html_expand_tabs syntax.txt /*g:html_expand_tabs*
g:html_hover_unfold syntax.txt /*g:html_hover_unfold*
g:html_id_expr syntax.txt /*g:html_id_expr*
g:html_ignore_conceal syntax.txt /*g:html_ignore_conceal*
g:html_ignore_folding syntax.txt /*g:html_ignore_folding*
g:html_line_ids syntax.txt /*g:html_line_ids*
g:html_no_foldcolumn syntax.txt /*g:html_no_foldcolumn*
g:html_no_invalid syntax.txt /*g:html_no_invalid*
g:html_no_pre syntax.txt /*g:html_no_pre*
@@ -5990,9 +6007,16 @@ g:tar_nomax pi_tar.txt /*g:tar_nomax*
g:tar_readoptions pi_tar.txt /*g:tar_readoptions*
g:tar_secure pi_tar.txt /*g:tar_secure*
g:tar_writeoptions pi_tar.txt /*g:tar_writeoptions*
g:tex_comment_nospell syntax.txt /*g:tex_comment_nospell*
g:tex_conceal syntax.txt /*g:tex_conceal*
g:tex_fast syntax.txt /*g:tex_fast*
g:tex_flavor filetype.txt /*g:tex_flavor*
g:tex_fold_enabled syntax.txt /*g:tex_fold_enabled*
g:tex_isk syntax.txt /*g:tex_isk*
g:tex_no_error syntax.txt /*g:tex_no_error*
g:tex_nospell syntax.txt /*g:tex_nospell*
g:tex_stylish syntax.txt /*g:tex_stylish*
g:tex_verbspell syntax.txt /*g:tex_verbspell*
g:var eval.txt /*g:var*
g:vimball_home pi_vimball.txt /*g:vimball_home*
g:vimball_mkdir pi_vimball.txt /*g:vimball_mkdir*
@@ -6126,6 +6150,7 @@ graphic-option-gone version4.txt /*graphic-option-gone*
greek options.txt /*greek*
grep quickfix.txt /*grep*
groff.vim syntax.txt /*groff.vim*
gross-national-happiness intro.txt /*gross-national-happiness*
group-name syntax.txt /*group-name*
gs various.txt /*gs*
gsp.vim syntax.txt /*gsp.vim*
@@ -6337,6 +6362,8 @@ howto.txt howto.txt /*howto.txt*
hpterm term.txt /*hpterm*
hpterm-color syntax.txt /*hpterm-color*
html-flavor insert.txt /*html-flavor*
html-indent indent.txt /*html-indent*
html-indenting indent.txt /*html-indenting*
html.vim syntax.txt /*html.vim*
htmlos.vim syntax.txt /*htmlos.vim*
http pi_netrw.txt /*http*
@@ -6604,6 +6631,7 @@ language-mapping map.txt /*language-mapping*
last-pattern pattern.txt /*last-pattern*
last-position-jump eval.txt /*last-position-jump*
last_buffer_nr() eval.txt /*last_buffer_nr()*
latex-syntax syntax.txt /*latex-syntax*
lc_time-variable eval.txt /*lc_time-variable*
lcs-conceal options.txt /*lcs-conceal*
lcs-eol options.txt /*lcs-eol*
@@ -6657,6 +6685,7 @@ location-list-window quickfix.txt /*location-list-window*
log() eval.txt /*log()*
log10() eval.txt /*log10()*
long-lines version5.txt /*long-lines*
love intro.txt /*love*
lowercase change.txt /*lowercase*
lpc.vim syntax.txt /*lpc.vim*
lua if_lua.txt /*lua*
@@ -6664,6 +6693,7 @@ lua-buffer if_lua.txt /*lua-buffer*
lua-commands if_lua.txt /*lua-commands*
lua-dict if_lua.txt /*lua-dict*
lua-eval if_lua.txt /*lua-eval*
lua-funcref if_lua.txt /*lua-funcref*
lua-list if_lua.txt /*lua-list*
lua-luaeval if_lua.txt /*lua-luaeval*
lua-vim if_lua.txt /*lua-vim*
@@ -6703,6 +6733,7 @@ map-listing map.txt /*map-listing*
map-modes map.txt /*map-modes*
map-multibyte map.txt /*map-multibyte*
map-overview map.txt /*map-overview*
map-precedence map.txt /*map-precedence*
map-self-destroy tips.txt /*map-self-destroy*
map-typing map.txt /*map-typing*
map-which-keys map.txt /*map-which-keys*
@@ -7156,6 +7187,7 @@ notation intro.txt /*notation*
notepad gui_w32.txt /*notepad*
nr2char() eval.txt /*nr2char()*
nroff.vim syntax.txt /*nroff.vim*
number_relativenumber options.txt /*number_relativenumber*
numbered-function eval.txt /*numbered-function*
o insert.txt /*o*
o_CTRL-V motion.txt /*o_CTRL-V*
@@ -7231,6 +7263,7 @@ pattern-searches pattern.txt /*pattern-searches*
pattern.txt pattern.txt /*pattern.txt*
patterns-composing pattern.txt /*patterns-composing*
pdev-option print.txt /*pdev-option*
peace intro.txt /*peace*
penc-option print.txt /*penc-option*
perl if_perl.txt /*perl*
perl-Append if_perl.txt /*perl-Append*
@@ -7342,9 +7375,17 @@ put-Visual-mode change.txt /*put-Visual-mode*
py3eval() eval.txt /*py3eval()*
pyeval() eval.txt /*pyeval()*
python if_pyth.txt /*python*
python-.locked if_pyth.txt /*python-.locked*
python-Dictionary if_pyth.txt /*python-Dictionary*
python-Function if_pyth.txt /*python-Function*
python-List if_pyth.txt /*python-List*
python-VIM_SPECIAL_PATH if_pyth.txt /*python-VIM_SPECIAL_PATH*
python-_get_paths if_pyth.txt /*python-_get_paths*
python-bindeval if_pyth.txt /*python-bindeval*
python-bindeval-objects if_pyth.txt /*python-bindeval-objects*
python-buffer if_pyth.txt /*python-buffer*
python-buffers if_pyth.txt /*python-buffers*
python-chdir if_pyth.txt /*python-chdir*
python-command if_pyth.txt /*python-command*
python-commands if_pyth.txt /*python-commands*
python-current if_pyth.txt /*python-current*
@@ -7352,11 +7393,17 @@ python-dynamic if_pyth.txt /*python-dynamic*
python-error if_pyth.txt /*python-error*
python-eval if_pyth.txt /*python-eval*
python-examples if_pyth.txt /*python-examples*
python-fchdir if_pyth.txt /*python-fchdir*
python-find_module if_pyth.txt /*python-find_module*
python-foreach_rtp if_pyth.txt /*python-foreach_rtp*
python-input if_pyth.txt /*python-input*
python-options if_pyth.txt /*python-options*
python-output if_pyth.txt /*python-output*
python-path_hook if_pyth.txt /*python-path_hook*
python-pyeval if_pyth.txt /*python-pyeval*
python-range if_pyth.txt /*python-range*
python-special-path if_pyth.txt /*python-special-path*
python-strwidth if_pyth.txt /*python-strwidth*
python-tabpage if_pyth.txt /*python-tabpage*
python-tabpages if_pyth.txt /*python-tabpages*
python-vars if_pyth.txt /*python-vars*
@@ -7365,7 +7412,10 @@ python-vvars if_pyth.txt /*python-vvars*
python-window if_pyth.txt /*python-window*
python-windows if_pyth.txt /*python-windows*
python.vim syntax.txt /*python.vim*
python2-directory if_pyth.txt /*python2-directory*
python3 if_pyth.txt /*python3*
python3-directory if_pyth.txt /*python3-directory*
pythonx-directory if_pyth.txt /*pythonx-directory*
q repeat.txt /*q*
q/ cmdline.txt /*q\/*
q: cmdline.txt /*q:*
@@ -7536,6 +7586,8 @@ save-file editing.txt /*save-file*
save-settings starting.txt /*save-settings*
scheme.vim syntax.txt /*scheme.vim*
scp pi_netrw.txt /*scp*
screenattr() eval.txt /*screenattr()*
screenchar() eval.txt /*screenchar()*
screencol() eval.txt /*screencol()*
screenrow() eval.txt /*screenrow()*
script usr_41.txt /*script*
@@ -8154,7 +8206,9 @@ tex-nospell syntax.txt /*tex-nospell*
tex-package syntax.txt /*tex-package*
tex-runon syntax.txt /*tex-runon*
tex-slow syntax.txt /*tex-slow*
tex-stopzone syntax.txt /*tex-stopzone*
tex-style syntax.txt /*tex-style*
tex-sync syntax.txt /*tex-sync*
tex-verb syntax.txt /*tex-verb*
tex.vim syntax.txt /*tex.vim*
text-functions usr_41.txt /*text-functions*

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.3. Last change: 2013 May 21
*todo.txt* For Vim version 7.3. Last change: 2013 Jun 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -34,191 +34,49 @@ not be repeated below, unless there is extra information.
*known-bugs*
-------------------- Known bugs and current work -----------------------
Rename src/Makefile and create a new one like toplevel Makefile that creates
auto/config.mk when it's not there? (Ben Schmidt, 2011 Feb 11)
--- Python interface ---
--- Python interface
Python: thread with refactoring patches. (ZyX, May 19, 16:46 and later)
9
10
11
Configure doesn't find Python 3 on Ubuntu 13.04. (Ken Takata, Apr 13)
Python SystemExit exception is not handled properly. Patch to catch the
exception and give an error. (Yasuhiro Matsumoto)
Does not work, tests fail.
Patch to print the result of a :python command. (Maxim Philippov
<philippovmi@gmail.com>, 2012 Aug 16) Update Aug 17.
Patch no longer applies.
":python os.chdir('/tmp')" makes short buffer names invalid. (Xavier de Gaye)
Patch to make os.chdir() handle side effects. (Xavier de Gaye, 2013 May 17)
Update May 19, also for os.fchdir().
Adds a $VIMRUNTIME/python directory.
ZyX: OK to add python and python3 directory.
Mac: OS/X 10.4 with Python 2.5 installed: configure finds an extra argument
that breaks the build. (Brian Victor, 2008 Sep 1)
Patch to access screen under Python. (Marko Mahni, 2010 Jul 18)
Breaks the tests
Problem: Python SystemExit exception is not handled properly.
Solution: Catch the exception and give an error. (Yasuhiro Matsumoto)
Files: runtime/doc/if_pyth.txt, src/if_py_both.h, src/if_python.c,
src/if_python3.c
Python: ":py raw_input('prompt')" doesn't work. (Manu Hack)
Win32: The Python interface only works with one version of Python, selected at
compile time. Can this be made to work with version 2.1 and 2.2 dynamically?
--- bug fixes ---
Python: Be able to define a Python function that can be called directly from
Vim script. Requires converting the arguments and return value.
9. Patch to fix "gn" on single character matches. (Christian Brabandt, 2013
Jun 2)
--- runtime files
8. Patch for cscope connection (Narendran, 2013 Jun 10)
Syntax file for protocol buffers. (Feng Xiao, 2013 May 9)
Has an ugly copyright notice.
Add statement that it does not conflict with Vim license.
Patch for JavaScript syntax. (Kevin Locke, 2013 May 9)
Claudio didn't respond yet.
--- Fast regexp engine
Duplicate condition in line 1094. (Ken Takata) Should be 'r'?
Multi-byte problem? Marc Weber
echo matchlist('1', '\%#=1\o{\?Ä\Z')
echo matchlist('1', '\%#=2\o{\?Ä\Z')
Difference in matching this pattern: (Marc Weber)
echo matchlist("t", '\%#=1ú\Z')
echo matchlist("t", '\%#=2ú\Z')
Difference in matching this pattern:
echo matchlist('google', '\%#=1\<go*\|go')
echo matchlist('google', '\%#=2\<go*\|go')
Difference in matching this pattern: (Marc Weber)
echo matchlist("\na", '\%#=1\_F')
echo matchlist("\na", '\%#=0\_F')
echo matchlist("\na", '\%#=2\_F')
Don't set curbuf, use reg_buf.
Estimation of number of items is wrong, can be much larger.
When running out of space, retry with more space?
nfa_regcomp() should not use nstate_max but the actual number of states for
allocating the prog?
Get example files for many languages. Compare syntax highlighting with old and
new regexp, find regexp constructs where NFA does not work correctly.
source ~/vim/regexp/runold.vim to update the "old" files.
source ~/vim/regexp/runnew.vim to update the "new" files
source ~/vim/regexp/diff.vim to find differences
Diffs in these files:
- csh02: line 2, "13" is not highlighted after -misc-fixed-bold-r-normal-
as cshNumber
- csh02: line 7, similar problem.
- tst28.tex line 8 \alpha in texStatement instead of texGreek
It's very slow compared to the old engine...
Performance tests:
- ~/vim/test/veryslow.js display last line (file from Daniel Fetchinson)
- ~/vim/test/slowsearch
- ~/vim/test/rgb.vim
- ~/vim/text/FeiqCfg.xml (file from Netjune)
- ~/vim/text/edl.svg (also XML)
- search for a.*e*exn in the vim executable. Go to last line to use
'hlsearch'.
- Slow combination of folding and PHP syntax highlighting. Script to
reproduce it. Caused by "syntax sync fromstart" in combination with patch
7.2.274. (Christian Brabandt, 2010 May 27) Generally, folding with
'foldmethod' set to "syntax" is slow. Do profiling to find out why.
- Does not use any of the optimizations, such as required start pattern.
- When lists are empty in nfa_regmatch() and match is true, it keeps looping
without doing anything.
"\ze" is currently disabled for NFA, can this be fixed?
"\_[0-9]\?\>" does not match at end of line, disabled.
Items with \%u, \%x, \%o, \%d do not work with the new engine.
--- bug fixes
Patch to avoid wrong error message for 1.0[0]. (Yasuhiro Matsumoto, 2013 May
1)
Patch for if_lua. (Luis Carvalho, 2012 Aug 26, update Aug 29, another Aug 30,
then Sep 1, reminder Oct 14)
Patch to check if 'foldexpr' sets did_emsg. (Christian Brabandt, 2013 Mar 20)
Patch for 'backupcopy' default behavior for symlinks on Windows. (David Pope,
2012 Mar 21, update Mar 31)
With fix for memory leak: Ken Takata, 2012 Aug 24
Another update Sep 24.
Also patch from Joerg Bornemann, 2013 Apr 30.
Undo problem: line not removed as expected when using setline() from Insert
mode. (Israel Chauca, 2010 May 13, more in second msg)
Break undo when CTRL-R = changes the text? Or save more lines?
Patch by Christian Brabandt, 2012 Nov 16.
Do allow real tags above the !_TAG entries. Undo older patch. Issue 90.
Matches might be highlighted correctly. Inefficient patch by Christian
Brabandt, 2013 Feb 26.
Patch to use bold/italic fonts when 'guifontewide' is set. (Ken Takata, 2013
Mar 31)
Problem with winfixheight and resizing. (Yukihiro Nakadaira, 2011 Sep 17)
Patch Sep 18.
Patch for IME problems. Remove hacking code for old IM. (Yukihiro Nakadaira,
2012 Jul 20)
Patch to fix finding toolbar bitmaps. Issue 129.
Combining characters are not used when executing a register with :@w.
(William Fugh, 2013 Apr 5, more info from Ben Fritz)
Patch by Christian Brabandt, 2013 Apr 6. Second one.
MS-Windows ACL support doesn't work well. Patch from Ken Takata, 2012 Aug 29.
Update Aug 31.
Another patch for MingW, 2012 Dec 29.
Bug in completion menu. (Olivier Teuliere, 2013 Feb 15)
Patch by Christian Brabandt, Feb 16.
'cursorline' is drawn incorrectly in diff mode. Patch by Christian Brabandt,
7. 'cursorline' is drawn incorrectly in diff mode. Patch by Christian Brabandt,
2012 Apr 2.
When someone does a silly thing such as setting rows and columns to 65535,
6. When someone does a silly thing such as setting rows and columns to 65535,
handle the out-of-memory and set them to sane values? (jimmywang, 2013 May 17)
InsertEnter doesn't prevent the cursor from moving when it goes to another
5. InsertEnter doesn't prevent the cursor from moving when it goes to another
line.
--- slightly incompatible changes
4. ":diffoff" does not restore options from before starting diff mode.
Patch by Christian Brabandt, 2013 May 26.
Patch to load ~/.vim/vimrc when ~/.vimrc isn't found. (Lech Lorens, 2013 Apr
13)
3. Can't use multi-byte fill character in custom status line.
Patch by Christian Wellenbrock, 2013 Jun 2. Update Jun 3 (second one).
It's probably a good idea to make a negative value for 'sts' use the value of
'sw'. Patch by So8res, Oct 3 2012
When a buffer-local mapping is used, but a global mapping starts with the same
characters, Vim currently waits for the next typed character to find out if
the global mapping matches. It is probably better to let the local mapping
win and not wait. (discussion with Andy Wokula, 2013 Jan 30)
Patch by Michael Henry, 2013 Jan 30, update Feb 15.
2. Patch to fix glob() and globpath() with escaped special characters.
(Adnan Zafar, 2013 Jun 2, tests Jun 3)
1. Bug in findfile() directory matching. (Markus Braun Ben Fritz, 2013 Jun 20)
Patch by Christian Brabandt (2013 Jun 22)
---- Fixes to be included before 7.4 above, less important stuff below ----
Patch to make has() check for Vim version and patch at the same time.
(Marc Weber, 2013 Jun 7)
Several syntax file match "^\s*" which may get underlined if that's in the
highlight group. Add a "\zs" after it?
@@ -228,6 +86,9 @@ Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10)
Checking runtime scripts: Thilo Six, 2012 Jun 6.
Fold can't be opened after ":move". (Ein Brown)
Patch from Christian Brabandt doesn't fix it completely.
GTK: problem with 'L' in 'guioptions' changing the window width.
(Aaron Cornelius, 2012 Feb 6)
@@ -248,6 +109,10 @@ Win32: When a directory name contains an exclamation mark, completion doesn't
complete the contents of the directory. No escaping for the "!"? (Jan
Stocker, 2012 Jan 5)
Patch to support expression argument to sort() instead of a function name.
Yasuhiro Matsumoto, 2013 May 31.
Or should we add a more general mechanism, like lambda functions?
Problem caused by patch 7.3.638: window->open does not update window
correctly. Issue 91.
@@ -259,25 +124,27 @@ Patch to view coverage of the tests. (Nazri Ramliy, 2013 Feb 15)
Patch to invert characters differently in GTK. (Yukihiro Nakadaira, 2013 May
5)
Patch to add "Q" and "A" responses to interactive :substitute. They are
carried over when using :global. (Christian Brabandt, 2013 Jun 19)
Bug with 'cursorline' in diff mode. Line being scrolled into view gets
highlighted as the cursor line. (Alessandro Ivaldi, 2013 Jun 4)
Patch to add the bufferlist() function. (Yegappan Lakshmanan, 2013 May 5)
May 17: with winlist() and tabpagelist().
May 19: with local variables.
Patch to allow setting w:quickfix_title via setqflist() and setloclist()
functions. (Christian Brabandt, 2013 May 8, update May 21)
May 28: with options
Patch to support 'u' in interactive substitute. (Christian Brabandt, 2012 Sep
28) With tests: Oct 9.
Patch to allow setting w:quickfix_title via setqflist() and setloclist()
functions. (Christian Brabandt, 2013 May 8, update May 21)
Patch to add getlocstack() / setlocstack(). (Christian Brabandt, 2013 May 14)
Second one.
Second one. Update May 22.
Patch to make fold updates much faster. (Christian Brabandt, 2012 Dec)
Patch for IME handling, adds 'imactivatefunc' and 'imstatusfunc' option.
(Yukihiro Nakadaira, 2012 Aug 16)
Patch to improve IME handling. (Yasuhiro Matsumoto, 2012 Jul 18)
Issue 54: document behavior of -complete, also expands arg.
- Add regex for 'paragraphs' and 'sections': 'parare' and 'sectre'. Combine
@@ -323,11 +190,22 @@ Patch to add functions for signs. (Christian Brabandt, 2013 Jan 27)
Patch to use directX to draw text on Windows. Adds the 'renderoptions'
option. (Taro Muraoka, 2013 Jan 25, update 2013 Apr 3, May 14)
Patch to add 'completeselect' option. Specifies how to select a candidate in
insert completion. (Shougo, 2013 May 29)
Update to add to existing 'completeopt'. 2013 May 30
Problem with refresh:always in completion. (Tyler Wade, 2013 Mar 17)
b:undo_ftplugin cannot call a script-local function. (Boris Danilov, 2013 Jan
7)
Win32: The Python interface only works with one version of Python, selected at
compile time. Can this be made to work with version 2.1 and 2.2 dynamically?
Python: Be able to define a Python function that can be called directly from
Vim script. Requires converting the arguments and return value, like with
vim.bindeval().
Patch for :tabcloseleft, after closing a tab go to left tab. (William Bowers,
2012 Aug 4)
@@ -347,6 +225,9 @@ Szamotulski, 2012 Nov 8)
Crash in autocmd that unloads buffers in a BufUnload event. (Andrew Pimlott,
2012 Aug 11) Disallow :new when BufUnload is being handled?
Patch to add ":ldo" and ":cdo", execute commands over quickfix list and
location list. (Yegappan Lakshmanan, 2013 Jun 2)
MS-Windows resizing problems:
- Windows window on screen positioning: Patch by Yukihiro Nakadaira, 2012 Jun
20. Uses getWindowRect() instead of GetWindowPlacement()
@@ -359,6 +240,8 @@ MS-Windows resizing problems:
Patch to append regexp to tag commands to make it possible to select one out
of many matches. (Cody Cutler, 2013 Mar 28)
Patch to add tagfunc(). Cleaned up by Christian Brabandt, 2013 Jun 22.
Help for 'b:undo_indent'. (Thilo Six, 2012 May 28)
Also question if examples are correct.
@@ -408,6 +291,7 @@ And one for gui_x11.txt.
Version for latest MacVim: Tobia Conforto, 2009 Nov 23
More recent version: https://retracile.net/wiki/VimBreakIndent
Posted to vim-dev by Taylor Hedberg, 2011 Nov 25
Update by Taylor Hedberg, 2013 May 30.
":cd" doesn't work when current directory path contains "**".
finddir() has the same problem. (Yukihiro Nakadaira, 2012 Jan 10)
@@ -533,12 +417,17 @@ Using ":break" or something else that stops executing commands inside a
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
cleared. See test64.
Changes to manpage plugin. (Elias Toivanen, 2011 Jul 25)
Patch to make "z=" work when 'spell' is off. Does this have nasty side
effects? (Christian Brabandt, 2012 Aug 5)
Would also need to do this for spellbadword() and spellsuggest().
Patch for variable tabstops.
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
right type.
@@ -647,9 +536,6 @@ New esperanto spell file can't be processed. (Dominique Pelle, 2011 Jan 30)
"L'Italie" noted as a spell error at start of the sentence. (Dominique Pelle,
2011 Feb 27)
Functions to read the actual contents of the screen, so that things like
conceal can be tested. (Nazri Ramliy, 2013 Feb 18)
Copy/paste between Vim and Google chrome doesn't work well for multi-byte
characters. (Ben Haskell, 2010 Sep 17)
When putting text in the cut buffer (when exiting) and conversion doesn't work
@@ -674,6 +560,32 @@ the command line. (Ingo Karkat, 2011 Jan 25)
Since patch 7.2.46 Yankring plugin has become very slow, eventually make Vim
crash? (Raiwil, 2010 Nov 17)
Does not work with NFA regexp engine:
- \%u, \%x, \%o, \%d followed by a composing character
Regexp engine performance:
- Profiling:
./vim -u NONE -s ~/vim/test/ruby.vim
./vim -u NONE -s ~/vim/test/loop.vim
./vim -u NONE -s ~/vim/test/alsa.vim
./vim -s ~/vim/test/todo.vim
./vim -s ~/vim/test/xml.vim
Dominique Pelle: xmlSyncDT is particularly slow (Jun 7)
- More test files from the src/pkg/regexp/testdata directory in the Go repo.
- Performance tests:
- Using asciidoc syntax. (Marek Schimara, 2013 Jun 6)
- ~/vim/text/FeiqCfg.xml (file from Netjune)
- ~/vim/text/edl.svg (also XML)
- glts has five tests. (May 25)
- ~/vim/test/slowsearch
- ~/vim/test/rgb.vim
- search for a.*e*exn in the vim executable. Go to last line to use
'hlsearch'.
- Slow combination of folding and PHP syntax highlighting. Script to
reproduce it. Caused by "syntax sync fromstart" in combination with patch
7.2.274. (Christian Brabandt, 2010 May 27) Generally, folding with
'foldmethod' set to "syntax" is slow. Do profiling to find out why.
Patch to add 'systemencoding', convert between 'encoding' and this for file
names, shell commands and the like. (Kikuchan, 2010 Oct 14)
Assume the system converts between the actual encoding of the filesystem to
@@ -1174,6 +1086,14 @@ Oct 19) Check for "col" being "MAXCOL" separately?
Unexpectedly inserting a double quote. (Anton Woellert, 2008 Mar 23)
Works OK when 'cmdheight' is 2.
8 Use a mechanism similar to omni completion to figure out the kind of tab
for CTRL-] and jump to the appropriate matching tag (if there are
several).
Alternative: be able to define a function that takes the tag name and uses
taglist() to find the right location. With indication of using CTRL-] so
that the context can be taken into account. (Robert Webb)
Patch by Christian Brabandt, 2013 May 31.
Test54 should not use shell commands. Make it portable.
The utf class table is missing some entries:
@@ -3659,12 +3579,6 @@ Tags:
make the filename or the whole option use |wildcards| globing, better
would be to merge the 2 kinds of globing. originally (Erik Falor, 2008
April 18), updated (Ian Kelling, 2008 July 4)
8 Use a mechanism similar to omni completion to figure out the kind of tab
for CTRL-] and jump to the appropriate matching tag (if there are
several).
Alternative: be able to define a function that takes the tag name and uses
taglist() to find the right location. With indication of using CTRL-] so
that the context can be taken into account. (Robert Webb)
7 Can CTRL-] (jump to tag) include a following "." and "->" to restrict the
number of possible matches? Check tags file for an item that has members.
(Flemming Madsen)
@@ -4324,7 +4238,7 @@ More advanced repeating commands:
- Add "." command for visual mode: redo last visual command (e.g. ":fmt").
7 Repeating "d:{cmd}" with "." doesn't work. (Benji Fisher) Somehow remember
the command line so that it can be repeated?
- Add "gn": repeat last movement command. Including count.
- Add command to repeat last movement. Including count.
- Add "." command after operator: repeat last command of same operator. E.g.
"c." will repeat last change, also when "x" used since then (Webb).
"y." will repeat last yank.

View File

@@ -1,11 +1,11 @@
.\" Traduction Lundi 7 ao<61>t 2000 par Richard Hitier
.\" Traduction lundi 7 ao<61>t 2000 par Richard Hitier
.\" (richard.hitier@dial.oleane.com)
.\" Mise <20> jour de la traduction par David Blanchet
.\" (david.blanchet@free.fr) 2006-06-10
.\" Mise <20> jour de la traduction par Dominique Pell<6C>
.\" (dominique.pelle@gmail.com) 2008-11-29
.\" (dominique.pelle@gmail.com) 2013-05-10
.\"
.TH VIM 1 "22 F<EFBFBD>vrier 2002"
.TH VIM 1 "22 f<EFBFBD>vrier 2002"
.SH NOM
vim \- Vi IMproved, <20>diteur de texte pour programmeurs
.SH SYNOPSIS
@@ -156,7 +156,7 @@ Ex
{commande} est interpr<70>t<EFBFBD>e comme une commande Ex.
Si la {commande} contient des espaces, elle doit <20>tre entour<75>e
de doubles-apostrophes (cela d<>pend du shell utilis<69>).
Exemple: Vim "+set si" main.c
Exemple : Vim "+set si" main.c
.br
Note : vous pouvez utiliser jusqu'<27> 10 commandes "+" ou "\-c".
.TP
@@ -204,7 +204,7 @@ Fonctionne comme vimdiff(1).
\-d {p<>riph}
Ouvre {p<>riph} pour l'utiliser comme terminal.
Uniquement sur Amiga.
Exemple:
Exemple :
"\-d con:20/30/600/150".
.TP
\-D
@@ -269,7 +269,7 @@ quitte.
Si
.B Vim
a <20>t<EFBFBD> compil<69> avec le support de la fonctionnalit<69> RIGHTLEFT pour l'<27>dition de
fichiers de droite <20> gauche et les claviers h<>breu, cette option lance
fichiers de droite <20> gauche et les claviers h<>breux, cette option lance
.B Vim
en mode H<>breu, c.-<2D>-d. avec les options 'hkmap' et 'rightleft' activ<69>es.
Sinon, un message d'erreur est <20>mis et
@@ -435,7 +435,7 @@ Mode restreint. Fonctionne comme si l'ex
\-\-
D<EFBFBD>limite la fin des options.
Les arguments qui suivent seront consid<69>r<EFBFBD>s comme des noms de fichiers.
Cela permet d'<27>diter des fichier d<>butant par un '\-'.
Cela permet d'<27>diter des fichiers d<>butant par un '\-'.
.TP
\-\-echo\-wid
IHM graphique GTK uniquement : retourne la Window ID sur stdout.
@@ -586,4 +586,4 @@ Cette page de manuel a
.br
Cette page de manuel a <20>t<EFBFBD> mise <20> jour par David Blanchet.
<david.blanchet@free.fr> 2006-04-10.
Mise <20> jour 2012-05-06, Dominique Pell<6C> <dominique.pelle@gmail.com>
Mise <20> jour 2013-05-10, Dominique Pell<6C> <dominique.pelle@gmail.com>

View File

@@ -1,11 +1,11 @@
.\" Traduction Lundi 7 août 2000 par Richard Hitier
.\" Traduction lundi 7 août 2000 par Richard Hitier
.\" (richard.hitier@dial.oleane.com)
.\" Mise à jour de la traduction par David Blanchet
.\" (david.blanchet@free.fr) 2006-06-10
.\" Mise à jour de la traduction par Dominique Pellé
.\" (dominique.pelle@gmail.com) 2008-11-29
.\" (dominique.pelle@gmail.com) 2013-05-10
.\"
.TH VIM 1 "22 Février 2002"
.TH VIM 1 "22 février 2002"
.SH NOM
vim \- Vi IMproved, éditeur de texte pour programmeurs
.SH SYNOPSIS
@@ -156,7 +156,7 @@ Exécute {commande} après la lecture du premier fichier.
{commande} est interprétée comme une commande Ex.
Si la {commande} contient des espaces, elle doit être entourée
de doubles-apostrophes (cela dépend du shell utilisé).
Exemple: Vim "+set si" main.c
Exemple : Vim "+set si" main.c
.br
Note : vous pouvez utiliser jusqu'à 10 commandes "+" ou "\-c".
.TP
@@ -204,7 +204,7 @@ Fonctionne comme vimdiff(1).
\-d {périph}
Ouvre {périph} pour l'utiliser comme terminal.
Uniquement sur Amiga.
Exemple:
Exemple :
"\-d con:20/30/600/150".
.TP
\-D
@@ -269,7 +269,7 @@ quitte.
Si
.B Vim
a été compilé avec le support de la fonctionnalité RIGHTLEFT pour l'édition de
fichiers de droite à gauche et les claviers hébreu, cette option lance
fichiers de droite à gauche et les claviers hébreux, cette option lance
.B Vim
en mode Hébreu, c.-à-d. avec les options 'hkmap' et 'rightleft' activées.
Sinon, un message d'erreur est émis et
@@ -435,7 +435,7 @@ Mode restreint. Fonctionne comme si l'exécutable commençait par la lettre 'r'.
\-\-
Délimite la fin des options.
Les arguments qui suivent seront considérés comme des noms de fichiers.
Cela permet d'éditer des fichier débutant par un '\-'.
Cela permet d'éditer des fichiers débutant par un '\-'.
.TP
\-\-echo\-wid
IHM graphique GTK uniquement : retourne la Window ID sur stdout.
@@ -586,4 +586,4 @@ Cette page de manuel a été traduite par Richard Hitier.
.br
Cette page de manuel a été mise à jour par David Blanchet.
<david.blanchet@free.fr> 2006-04-10.
Mise à jour 2012-05-06, Dominique Pellé <dominique.pelle@gmail.com>
Mise à jour par Dominique Pellé <dominique.pelle@gmail.com> 2013-05-10

View File

@@ -159,7 +159,7 @@ fichier n'est pas adressable, seuls les vides sont autoris
combl<EFBFBD>s par des octets nuls.
.PP
.I xxd \-r
ne g<>n<EFBFBD>re aucune erreur lors de l'analyse. Le probl<62>me sont pass<73>s
ne g<>n<EFBFBD>re aucune erreur lors de l'analyse. Les probl<62>mes sont pass<73>s
silencieusement.
.PP
Lors de l'<27>dition de la repr<70>sentation hexad<61>cimale, veuillez noter que
@@ -307,7 +307,7 @@ Convertir le fichier de l'exemple pr
000fffc: 0000 0000 40 ....A
.PP
Cr<EFBFBD>er un fichier d'un octet, contenant seulement le caract<63>re 'A'.
Les nombres apr<70>s '\-r \-s' s'ajoutent au num<75>ros de lignes trouv<75>es dans le
Le nombre apr<70>s '\-r \-s' s'ajoute aux num<75>ros de lignes trouv<75>es dans le
fichier ; les octets initiaux sont supprim<69>s.
.br
\fI% echo '010000: 41' | xxd \-r \-s \-0x10000 \> fichier\fR
@@ -393,4 +393,4 @@ Modifications mineures par Bram Moolenaar.
.SH TRADUCTION
Cette page de manuel a <20>t<EFBFBD> traduite par David Blanchet
<david.blanchet@free.fr> 2004-12-24.
Mise <20> jour 2012-05-06, Dominique Pell<6C> <dominique.pelle@gmail.com>
Mise <20> jour 2013-05-10, Dominique Pell<6C> <dominique.pelle@gmail.com>

View File

@@ -159,7 +159,7 @@ fichier n'est pas adressable, seuls les vides sont autorisés, et ils seront
comblés par des octets nuls.
.PP
.I xxd \-r
ne génère aucune erreur lors de l'analyse. Le problème sont passés
ne génère aucune erreur lors de l'analyse. Les problèmes sont passés
silencieusement.
.PP
Lors de l'édition de la représentation hexadécimale, veuillez noter que
@@ -307,7 +307,7 @@ Convertir le fichier de l'exemple précédent avec la fonctionnalité "autoskip"
000fffc: 0000 0000 40 ....A
.PP
Créer un fichier d'un octet, contenant seulement le caractère 'A'.
Les nombres après '\-r \-s' s'ajoutent au numéros de lignes trouvées dans le
Le nombre après '\-r \-s' s'ajoute aux numéros de lignes trouvées dans le
fichier ; les octets initiaux sont supprimés.
.br
\fI% echo '010000: 41' | xxd \-r \-s \-0x10000 \> fichier\fR
@@ -393,4 +393,4 @@ Modifications mineures par Bram Moolenaar.
.SH TRADUCTION
Cette page de manuel a été traduite par David Blanchet
<david.blanchet@free.fr> 2004-12-24.
Mise à jour 2012-05-06, Dominique Pellé <dominique.pelle@gmail.com>
Mise à jour 2013-05-10, Dominique Pellé <dominique.pelle@gmail.com>

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2013 May 15
" Last Change: 2013 Jun 24
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -757,6 +757,7 @@ au BufNewFile,BufRead *.git/MERGE_MSG setf gitcommit
au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig
au BufNewFile,BufRead *.git/modules/**/COMMIT_EDITMSG setf gitcommit
au BufNewFile,BufRead *.git/modules/**/config setf gitconfig
au BufNewFile,BufRead */.config/git/config setf gitconfig
au BufNewFile,BufRead git-rebase-todo setf gitrebase
au BufNewFile,BufRead .msg.[0-9]*
\ if getline(1) =~ '^From.*# This line is ignored.$' |
@@ -869,6 +870,9 @@ au BufNewFile,BufRead */etc/hosts.allow,*/etc/hosts.deny setf hostsaccess
" Hyper Builder
au BufNewFile,BufRead *.hb setf hb
" Httest
au BufNewFile,BufRead *.htt,*.htb setf httest
" Icon
au BufNewFile,BufRead *.icn setf icon
@@ -926,6 +930,23 @@ au BufNewFile,BufRead *.inf,*.INF setf inform
" Initng
au BufNewFile,BufRead */etc/initng/**/*.i,*.ii setf initng
" Innovation Data Processing
au BufRead,BufNewFile UPSTREAM.DAT,upstream.dat setf upstreamdat
au BufRead,BufNewFile UPSTREAM.*.DAT,upstream.*.dat setf upstreamdat
au BufRead,BufNewFile *.UPSTREAM.DAT,*.upstream.dat setf upstreamdat
au BufRead,BufNewFile UPSTREAM.LOG,upstream.log setf upstreamlog
au BufRead,BufNewFile UPSTREAM.*.LOG,upstream.*.log setf upstreamlog
au BufRead,BufNewFile *.UPSTREAM.LOG,*.upstream.log setf upstreamlog
au BufRead,BufNewFile UPSTREAMInstall.log,upstreaminstall.log setf upstreaminstalllog
au BufRead,BufNewFile UPSTREAMInstall.*.log,upstreaminstall.*.log setf upstreaminstalllog
au BufRead,BufNewFile *.UPSTREAMInstall.log,*.upstreaminstall.log setf upstreaminstalllog
au BufRead,BufNewFile USSERVER.LOG,usserver.log setf usserverlog
au BufRead,BufNewFile USSERVER.*.LOG,usserver.*.log setf usserverlog
au BufRead,BufNewFile *.USSERVER.LOG,*.usserver.log setf usserverlog
au BufRead,BufNewFile USW2KAgt.log,usw2kagt.log setf usw2kagtlog
au BufRead,BufNewFile USW2KAgt.*.log,usw2kagt.*.log setf usw2kagtlog
au BufRead,BufNewFile *.USW2KAgt.log,*.usw2kagt.log setf usw2kagtlog
" Ipfilter
au BufNewFile,BufRead ipf.conf,ipf6.conf,ipf.rules setf ipfilter
@@ -1101,7 +1122,7 @@ au BufNewFile,BufRead *.mv,*.mpl,*.mws setf maple
au BufNewFile,BufRead *.map setf map
" Markdown
au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,README.md setf markdown
au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,README.md setf markdown
" Mason
au BufNewFile,BufRead *.mason,*.mhtml setf mason
@@ -1547,6 +1568,9 @@ au BufNewFile,BufRead *.pdb setf prolog
" Promela
au BufNewFile,BufRead *.pml setf promela
" Google protocol buffers
au BufNewFile,BufRead *.proto setf proto
" Protocols
au BufNewFile,BufRead */etc/protocols setf protocols

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: Cucumber
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2010 Aug 09
" Last Change: 2013 Jun 01
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
@@ -9,6 +9,9 @@ if (exists("b:did_ftplugin"))
endif
let b:did_ftplugin = 1
let s:keepcpo= &cpo
set cpo&vim
setlocal formatoptions-=t formatoptions+=croql
setlocal comments=:# commentstring=#\ %s
setlocal omnifunc=CucumberComplete
@@ -18,11 +21,27 @@ let b:undo_ftplugin = "setl fo< com< cms< ofu<"
let b:cucumber_root = expand('%:p:h:s?.*[\/]\%(features\|stories\)\zs[\/].*??')
if !exists("g:no_plugin_maps") && !exists("g:no_cucumber_maps")
nmap <silent><buffer> <C-]> :<C-U>exe <SID>jump('edit',v:count)<CR>
nmap <silent><buffer> <C-W>] :<C-U>exe <SID>jump('split',v:count)<CR>
nmap <silent><buffer> <C-W><C-]> :<C-U>exe <SID>jump('split',v:count)<CR>
nmap <silent><buffer> <C-W>} :<C-U>exe <SID>jump('pedit',v:count)<CR>
let b:undo_ftplugin .= "| sil! iunmap! <C-]>| sil! iunmap! <C-W>]| sil! iunmap! <C-W><C-]>| sil! iunmap! <C-W>}"
nnoremap <silent><buffer> <C-]> :<C-U>exe <SID>jump('edit',v:count)<CR>
nnoremap <silent><buffer> [<C-D> :<C-U>exe <SID>jump('edit',v:count)<CR>
nnoremap <silent><buffer> ]<C-D> :<C-U>exe <SID>jump('edit',v:count)<CR>
nnoremap <silent><buffer> <C-W>] :<C-U>exe <SID>jump('split',v:count)<CR>
nnoremap <silent><buffer> <C-W><C-]> :<C-U>exe <SID>jump('split',v:count)<CR>
nnoremap <silent><buffer> <C-W>d :<C-U>exe <SID>jump('split',v:count)<CR>
nnoremap <silent><buffer> <C-W><C-D> :<C-U>exe <SID>jump('split',v:count)<CR>
nnoremap <silent><buffer> <C-W>} :<C-U>exe <SID>jump('pedit',v:count)<CR>
nnoremap <silent><buffer> [d :<C-U>exe <SID>jump('pedit',v:count)<CR>
nnoremap <silent><buffer> ]d :<C-U>exe <SID>jump('pedit',v:count)<CR>
let b:undo_ftplugin .=
\ "|sil! nunmap <buffer> <C-]>" .
\ "|sil! nunmap <buffer> [<C-D>" .
\ "|sil! nunmap <buffer> ]<C-D>" .
\ "|sil! nunmap <buffer> <C-W>]" .
\ "|sil! nunmap <buffer> <C-W><C-]>" .
\ "|sil! nunmap <buffer> <C-W>d" .
\ "|sil! nunmap <buffer> <C-W><C-D>" .
\ "|sil! nunmap <buffer> <C-W>}" .
\ "|sil! nunmap <buffer> [d" .
\ "|sil! nunmap <buffer> ]d"
endif
function! s:jump(command,count)
@@ -38,7 +57,7 @@ function! s:jump(command,count)
endfunction
function! s:allsteps()
let step_pattern = '\C^\s*\K\k*\>\s*\zs\S.\{-\}\ze\s*\%(do\|{\)\s*\%(|[^|]*|\s*\)\=\%($\|#\)'
let step_pattern = '\C^\s*\K\k*\>\s*(\=\s*\zs\S.\{-\}\ze\s*)\=\s*\%(do\|{\)\s*\%(|[^|]*|\s*\)\=\%($\|#\)'
let steps = []
for file in split(glob(b:cucumber_root.'/**/*.rb'),"\n")
let lines = readfile(file)
@@ -55,7 +74,7 @@ function! s:allsteps()
endfunction
function! s:steps(lnum)
let c = indent(a:lnum) + 1
let c = match(getline(a:lnum), '\S') + 1
while synIDattr(synID(a:lnum,c,1),'name') !~# '^$\|Region$'
let c = c + 1
endwhile
@@ -129,4 +148,7 @@ function! CucumberComplete(findstart,base) abort
return sort(steps)
endfunction
let &cpo = s:keepcpo
unlet s:keepcpo
" vim:set sts=2 sw=2:

View File

@@ -1,9 +1,7 @@
" Vim filetype plugin
" Language: eRuby
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2012 Mar 11
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Only do this when not done yet for this buffer
@@ -23,12 +21,11 @@ if !exists("g:eruby_default_subtype")
let g:eruby_default_subtype = "html"
endif
if !exists("b:eruby_subtype")
if &filetype =~ '^eruby\.'
let b:eruby_subtype = matchstr(&filetype,'^eruby\.\zs\w\+')
elseif !exists("b:eruby_subtype")
let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$")
let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+')
if b:eruby_subtype == ''
let b:eruby_subtype = matchstr(&filetype,'^eruby\.\zs\w\+')
endif
if b:eruby_subtype == ''
let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+$')
endif

View File

@@ -1,10 +1,9 @@
" Vim filetype plugin file
" Language: Falcon
" Author: Steven Oliver <oliver.steven@gmail.com>
" Copyright: Copyright (c) 2009, 2010, 2011, 2012 Steven Oliver
" Copyright: Copyright (c) 2009-2013 Steven Oliver
" License: You may redistribute this under the same terms as Vim itself
" --------------------------------------------------------------------------
" GetLatestVimScripts: 2762 1 :AutoInstall: falcon.vim
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
@@ -15,7 +14,7 @@ let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal tabstop=4 shiftwidth=4 expandtab fileencoding=utf-8
setlocal softtabstop=4 shiftwidth=4 fileencoding=utf-8
setlocal suffixesadd=.fal,.ftd
" Matchit support
@@ -31,7 +30,6 @@ if exists("loaded_matchit") && !exists("b:match_words")
\ ',{:},\[:\],(:)'
endif
" Set comments to include dashed lines
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
" Windows allows you to filter the open file dialog

View File

@@ -1,6 +1,7 @@
" Vim filetype plugin
" Language: generic git output
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2013 May 30
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: git commit file
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2012 April 7
" Last Change: 2013 May 30
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
@@ -11,9 +11,9 @@ endif
runtime! ftplugin/git.vim
let b:did_ftplugin = 1
setlocal nomodeline
setlocal nomodeline tabstop=8 formatoptions-=croq formatoptions+=tl
let b:undo_ftplugin = 'setl modeline<'
let b:undo_ftplugin = 'setl modeline< tabstop< formatoptions<'
if &textwidth == 0
" make sure that log messages play nice with git-log on standard terminals

View File

@@ -0,0 +1,32 @@
" Language: gprof
" Maintainer: Dominique Pelle <dominique.pelle@gmail.com>
" Last Change: 2013 Jun 09
" When cursor is on one line of the gprof call graph,
" calling this function jumps to this function in the call graph.
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin=1
fun! <SID>GprofJumpToFunctionIndex()
let l:line = getline('.')
if l:line =~ '[\d\+\]$'
" We're in a line in the call graph.
norm! $y%
call search('^' . escape(@", '[]'), 'sw')
norm! zz
elseif l:line =~ '^\(\s\+[0-9\.]\+\)\{3}\s\+'
" We're in line in the flat profile.
norm! 55|eby$
call search('^\[\d\+\].*\d\s\+' . escape(@", '[]*.') . '\>', 'sW')
norm! zz
endif
endfun
" Pressing <C-]> on a line in the gprof flat profile or in
" the call graph, jumps to the corresponding function inside
" the flat profile.
map <buffer> <silent> <C-]> :call <SID>GprofJumpToFunctionIndex()<CR>
" vim:sw=2 fdm=indent

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: Haml
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2012 Mar 11
" Language: Haml
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2013 Jun 01
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -18,6 +18,7 @@ let s:match_words = ""
runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
unlet! b:did_ftplugin
set matchpairs-=<:>
" Override our defaults if these were set by an included ftplugin.
if exists("b:undo_ftplugin")

View File

@@ -1,17 +1,16 @@
" Vim filetype plugin
" Language: Markdown
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2011 Dec 14
" Last Change: 2013 May 30
if exists("b:did_ftplugin")
finish
endif
runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
unlet! b:did_ftplugin
setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s
setlocal formatoptions+=tcqln
setlocal formatoptions+=tcqln formatoptions-=r formatoptions-=o
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^[-*+]\\s\\+
if exists('b:undo_ftplugin')

View File

@@ -13,6 +13,11 @@
" (Pierre Vittet)
" 2010 Jul 10 - Bugfix, thanks to Pat Rondon
" 2008 Jul 17 - Bugfix related to fnameescape (VA)
" 2013 Jul - moving errorformat into compiler/ocaml.vim Marc Weber
"
" Marc Weber's comment: This file may contain a lot of (very custom) stuff
" which eventually should be moved somewhere else ..
"
if exists("b:did_ftplugin")
finish
@@ -33,19 +38,6 @@ endif
" Error handling -- helps moving where the compiler wants you to go
let s:cposet=&cpoptions
set cpo&vim
setlocal efm=
\%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:,
\%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m,
\%+EReference\ to\ unbound\ regexp\ name\ %m,
\%Eocamlyacc:\ e\ -\ line\ %l\ of\ \"%f\"\\,\ %m,
\%Wocamlyacc:\ w\ -\ %m,
\%-Zmake%.%#,
\%C%m,
\%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
\%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
\%D%*\\a:\ Entering\ directory\ `%f',
\%X%*\\a:\ Leaving\ directory\ `%f',
\%DMaking\ %*\\a\ in\ %f
" Add mappings, unless the user didn't want this.
if !exists("no_plugin_maps") && !exists("no_ocaml_maps")

View File

@@ -1,8 +1,9 @@
" Vim filetype plugin file
" Language: Perl
" Maintainer: Andy Lester <andy@petdance.com>
" URL: http://github.com/petdance/vim-perl
" Last Change: 2012 Mar 11
" Language: Perl
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Homepage: http://github.com/vim-perl/vim-perl
" Bugs/requests: http://github.com/vim-perl/vim-perl/issues
" Last Change: 2013-05-11
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
@@ -12,7 +13,8 @@ let b:did_ftplugin = 1
let s:save_cpo = &cpo
set cpo-=C
setlocal formatoptions+=crq
setlocal formatoptions-=t
setlocal formatoptions+=crqol
setlocal keywordprg=perldoc\ -f
setlocal comments=:#
@@ -29,7 +31,7 @@ endif
" Provided by Ned Konz <ned at bike-nomad dot com>
"---------------------------------------------
setlocal include=\\<\\(use\\\|require\\)\\>
setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.pm','')
setlocal includeexpr=substitute(substitute(substitute(v:fname,'::','/','g'),'->\*','',''),'$','.pm','')
setlocal define=[^A-Za-z_]
" The following line changes a global variable but is necessary to make
@@ -38,7 +40,7 @@ setlocal define=[^A-Za-z_]
" problem for you, add an after/ftplugin/perl.vim file that contains
" set isfname-=:
set isfname+=:
"setlocal iskeyword=48-57,_,A-Z,a-z,:
set iskeyword+=:
" Set this once, globally.
if !exists("perlpath")
@@ -60,13 +62,27 @@ if !exists("perlpath")
endif
endif
let &l:path=perlpath
" Append perlpath to the existing path value, if it is set. Since we don't
" use += to do it because of the commas in perlpath, we have to handle the
" global / local settings, too.
if &l:path == ""
if &g:path == ""
let &l:path=perlpath
else
let &l:path=&g:path.",".perlpath
endif
else
let &l:path=&l:path.",".perlpath
endif
"---------------------------------------------
" Undo the stuff we changed.
let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< kp<" .
let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< kp< path<" .
\ " | unlet! b:browsefilter"
" proper matching for matchit plugin
let b:match_skip = 's:comment\|string\|perlQQ\|perlShellCommand\|perlHereDoc\|perlSubstitution\|perlTranslation\|perlMatch\|perlFormatField'
" Restore the saved compatibility options.
let &cpo = s:save_cpo
unlet s:save_cpo

View File

@@ -1,9 +1,10 @@
" Vim filetype plugin file
" Language: Perl 6
" Maintainer: Andy Lester <andy@petdance.com>
" URL: http://github.com/petdance/vim-perl/tree/master
" Last Change: 2012 Mar 11
" Contributors: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
" Language: Perl 6
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Homepage: http://github.com/vim-perl/vim-perl
" Bugs/requests: http://github.com/vim-perl/vim-perl/issues
" Last Change: 2013-05-11
" Contributors: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
"
" Based on ftplugin/perl.vim by Dan Sharp <dwsharp at hotmail dot com>
@@ -15,16 +16,19 @@ let b:did_ftplugin = 1
let s:save_cpo = &cpo
set cpo-=C
setlocal formatoptions+=crq
setlocal formatoptions-=t
setlocal formatoptions+=crqol
setlocal keywordprg=p6doc
setlocal comments=:#
setlocal commentstring=#%s
" Change the browse dialog on Win32 to show mainly Perl-related files
if has("gui_win32")
let b:browsefilter = "Perl Source Files (*.pl)\t*.pl\n" .
\ "Perl Modules (*.pm)\t*.pm\n" .
\ "Perl Documentation Files (*.pod)\t*.pod\n" .
\ "All Files (*.*)\t*.*\n"
\ "Perl Modules (*.pm)\t*.pm\n" .
\ "Perl Documentation Files (*.pod)\t*.pod\n" .
\ "All Files (*.*)\t*.*\n"
endif
" Provided by Ned Konz <ned at bike-nomad dot com>
@@ -39,10 +43,34 @@ setlocal define=[^A-Za-z_]
" after/ftplugin/perl6.vim file that contains
" set isfname-=:
set isfname+=:
setlocal iskeyword=48-57,_,A-Z,a-z,:,-
" Set this once, globally.
if !exists("perlpath")
if executable("perl6")
try
if &shellxquote != '"'
let perlpath = system('perl6 -e "@*INC.join(q/,/).say"')
else
let perlpath = system("perl6 -e '@*INC.join(q/,/).say'")
endif
let perlpath = substitute(perlpath,',.$',',,','')
catch /E145:/
let perlpath = ".,,"
endtry
else
" If we can't call perl to get its path, just default to using the
" current directory and the directory of the current file.
let perlpath = ".,,"
endif
endif
let &l:path=perlpath
"---------------------------------------------
" Undo the stuff we changed.
let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isk<" .
\ " | unlet! b:browsefilter"
\ " | unlet! b:browsefilter"
" Restore the saved compatibility options.
let &cpo = s:save_cpo

View File

@@ -1,17 +1,10 @@
" Vim filetype plugin
" Language: Ruby
" Maintainer: Gavin Sinclair <gsinclair at gmail.com>
" Last Change: 2010 Mar 15
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" ----------------------------------------------------------------------------
"
" Original matchit support thanks to Ned Konz. See his ftplugin/ruby.vim at
" http://bike-nomad.com/vim/ruby.vim.
" ----------------------------------------------------------------------------
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
finish
endif
@@ -21,7 +14,7 @@ let s:cpo_save = &cpo
set cpo&vim
if has("gui_running") && !has("gui_win32")
setlocal keywordprg=ri\ -T
setlocal keywordprg=ri\ -T\ -f\ bs
else
setlocal keywordprg=ri
endif
@@ -49,7 +42,7 @@ endif
setlocal formatoptions-=t formatoptions+=croql
setlocal include=^\\s*\\<\\(load\\\|\w*require\\)\\>
setlocal include=^\\s*\\<\\(load\\>\\\|require\\>\\\|autoload\\s*:\\=[\"']\\=\\h\\w*[\"']\\=,\\)
setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.rb','')
setlocal suffixesadd=.rb
@@ -69,41 +62,90 @@ endif
setlocal comments=:#
setlocal commentstring=#\ %s
if !exists("s:ruby_path")
if exists("g:ruby_path")
let s:ruby_path = g:ruby_path
elseif has("ruby") && has("win32")
ruby VIM::command( 'let s:ruby_path = "%s"' % ($: + begin; require %q{rubygems}; Gem.all_load_paths.sort.uniq; rescue LoadError; []; end).join(%q{,}) )
let s:ruby_path = '.,' . substitute(s:ruby_path, '\%(^\|,\)\.\%(,\|$\)', ',,', '')
elseif executable("ruby")
let s:code = "print ($: + begin; require %q{rubygems}; Gem.all_load_paths.sort.uniq; rescue LoadError; []; end).join(%q{,})"
if &shellxquote == "'"
let s:ruby_path = system('ruby -e "' . s:code . '"')
else
let s:ruby_path = system("ruby -e '" . s:code . "'")
endif
let s:ruby_path = '.,' . substitute(s:ruby_path, '\%(^\|,\)\.\%(,\|$\)', ',,', '')
if !exists('g:ruby_version_paths')
let g:ruby_version_paths = {}
endif
function! s:query_path(root)
let code = "print $:.join %q{,}"
if &shell =~# 'sh' && $PATH !~# '\s'
let prefix = 'env PATH='.$PATH.' '
else
" If we can't call ruby to get its path, just default to using the
" current directory and the directory of the current file.
let s:ruby_path = ".,,"
let prefix = ''
endif
if &shellxquote == "'"
let path_check = prefix.'ruby -e "' . code . '"'
else
let path_check = prefix."ruby -e '" . code . "'"
endif
let cd = haslocaldir() ? 'lcd' : 'cd'
let cwd = getcwd()
try
exe cd fnameescape(a:root)
let path = split(system(path_check),',')
exe cd fnameescape(cwd)
return path
finally
exe cd fnameescape(cwd)
endtry
endfunction
function! s:build_path(path)
let path = join(map(copy(a:path), 'v:val ==# "." ? "" : v:val'), ',')
if &g:path !~# '\v^\.%(,/%(usr|emx)/include)=,,$'
let path = substitute(&g:path,',,$',',','') . ',' . path
endif
return path
endfunction
if !exists('b:ruby_version') && !exists('g:ruby_path') && isdirectory(expand('%:p:h'))
let s:version_file = findfile('.ruby-version', '.;')
if !empty(s:version_file)
let b:ruby_version = get(readfile(s:version_file, '', 1), '')
if !has_key(g:ruby_version_paths, b:ruby_version)
let g:ruby_version_paths[b:ruby_version] = s:query_path(fnamemodify(s:version_file, ':p:h'))
endif
endif
endif
let &l:path = s:ruby_path
if exists("g:ruby_path")
let s:ruby_path = type(g:ruby_path) == type([]) ? join(g:ruby_path, ',') : g:ruby_path
elseif has_key(g:ruby_version_paths, get(b:, 'ruby_version', ''))
let s:ruby_paths = g:ruby_version_paths[b:ruby_version]
let s:ruby_path = s:build_path(s:ruby_paths)
else
if !exists('g:ruby_default_path')
if has("ruby") && has("win32")
ruby ::VIM::command( 'let g:ruby_default_path = split("%s",",")' % $:.join(%q{,}) )
elseif executable('ruby')
let g:ruby_default_path = s:query_path($HOME)
else
let g:ruby_default_path = map(split($RUBYLIB,':'), 'v:val ==# "." ? "" : v:val')
endif
endif
let s:ruby_paths = g:ruby_default_path
let s:ruby_path = s:build_path(s:ruby_paths)
endif
if stridx(&l:path, s:ruby_path) == -1
let &l:path = s:ruby_path
endif
if exists('s:ruby_paths') && stridx(&l:tags, join(map(copy(s:ruby_paths),'v:val."/tags"'),',')) == -1
let &l:tags = &tags . ',' . join(map(copy(s:ruby_paths),'v:val."/tags"'),',')
endif
if has("gui_win32") && !exists("b:browsefilter")
let b:browsefilter = "Ruby Source Files (*.rb)\t*.rb\n" .
\ "All Files (*.*)\t*.*\n"
endif
let b:undo_ftplugin = "setl fo< inc< inex< sua< def< com< cms< path< kp<"
let b:undo_ftplugin = "setl fo< inc< inex< sua< def< com< cms< path< tags< kp<"
\."| unlet! b:browsefilter b:match_ignorecase b:match_words b:match_skip"
\."| if exists('&ofu') && has('ruby') | setl ofu< | endif"
\."| if has('balloon_eval') && exists('+bexpr') | setl bexpr< | endif"
if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps")
nnoremap <silent> <buffer> [m :<C-U>call <SID>searchsyn('\<def\>','rubyDefine','b','n')<CR>
nnoremap <silent> <buffer> ]m :<C-U>call <SID>searchsyn('\<def\>','rubyDefine','','n')<CR>
nnoremap <silent> <buffer> [M :<C-U>call <SID>searchsyn('\<end\>','rubyDefine','b','n')<CR>
@@ -126,6 +168,26 @@ if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps")
\."| sil! exe 'unmap <buffer> [[' | sil! exe 'unmap <buffer> ]]' | sil! exe 'unmap <buffer> []' | sil! exe 'unmap <buffer> ]['"
\."| sil! exe 'unmap <buffer> [m' | sil! exe 'unmap <buffer> ]m' | sil! exe 'unmap <buffer> [M' | sil! exe 'unmap <buffer> ]M'"
if maparg('im','n') == ''
onoremap <silent> <buffer> im :<C-U>call <SID>wrap_i('[m',']M')<CR>
onoremap <silent> <buffer> am :<C-U>call <SID>wrap_a('[m',']M')<CR>
xnoremap <silent> <buffer> im :<C-U>call <SID>wrap_i('[m',']M')<CR>
xnoremap <silent> <buffer> am :<C-U>call <SID>wrap_a('[m',']M')<CR>
let b:undo_ftplugin = b:undo_ftplugin
\."| sil! exe 'ounmap <buffer> im' | sil! exe 'ounmap <buffer> am'"
\."| sil! exe 'xunmap <buffer> im' | sil! exe 'xunmap <buffer> am'"
endif
if maparg('iM','n') == ''
onoremap <silent> <buffer> iM :<C-U>call <SID>wrap_i('[[','][')<CR>
onoremap <silent> <buffer> aM :<C-U>call <SID>wrap_a('[[','][')<CR>
xnoremap <silent> <buffer> iM :<C-U>call <SID>wrap_i('[[','][')<CR>
xnoremap <silent> <buffer> aM :<C-U>call <SID>wrap_a('[[','][')<CR>
let b:undo_ftplugin = b:undo_ftplugin
\."| sil! exe 'ounmap <buffer> iM' | sil! exe 'ounmap <buffer> aM'"
\."| sil! exe 'xunmap <buffer> iM' | sil! exe 'xunmap <buffer> aM'"
endif
if maparg("\<C-]>",'n') == ''
nnoremap <silent> <buffer> <C-]> :<C-U>exe v:count1."tag <C-R>=RubyCursorIdentifier()<CR>"<CR>
nnoremap <silent> <buffer> g<C-]> :<C-U>exe "tjump <C-R>=RubyCursorIdentifier()<CR>"<CR>
@@ -142,6 +204,17 @@ if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps")
\."| sil! exe 'nunmap <buffer> <C-W>g<C-]>'| sil! exe 'nunmap <buffer> <C-W>g]'"
\."| sil! exe 'nunmap <buffer> <C-W>}'| sil! exe 'nunmap <buffer> <C-W>g}'"
endif
if maparg("gf",'n') == ''
" By using findfile() rather than gf's normal behavior, we prevent
" erroneously editing a directory.
nnoremap <silent> <buffer> gf :<C-U>exe <SID>gf(v:count1,"gf",'edit')<CR>
nnoremap <silent> <buffer> <C-W>f :<C-U>exe <SID>gf(v:count1,"\<Lt>C-W>f",'split')<CR>
nnoremap <silent> <buffer> <C-W><C-F> :<C-U>exe <SID>gf(v:count1,"\<Lt>C-W>\<Lt>C-F>",'split')<CR>
nnoremap <silent> <buffer> <C-W>gf :<C-U>exe <SID>gf(v:count1,"\<Lt>C-W>gf",'tabedit')<CR>
let b:undo_ftplugin = b:undo_ftplugin
\."| sil! exe 'nunmap <buffer> gf' | sil! exe 'nunmap <buffer> <C-W>f' | sil! exe 'nunmap <buffer> <C-W><C-F>' | sil! exe 'nunmap <buffer> <C-W>gf'"
endif
endif
let &cpo = s:cpo_save
@@ -191,7 +264,7 @@ function! RubyBalloonexpr()
if str !~ '^\w'
return ''
endif
silent! let res = substitute(system("ri -f simple -T \"".str.'"'),'\n$','','')
silent! let res = substitute(system("ri -f rdoc -T \"".str.'"'),'\n$','','')
if res =~ '^Nothing known about' || res =~ '^Bad argument:' || res =~ '^More than one method'
return ''
endif
@@ -202,29 +275,57 @@ function! RubyBalloonexpr()
endfunction
function! s:searchsyn(pattern,syn,flags,mode)
norm! m'
if a:mode ==# 'v'
norm! gv
endif
let i = 0
let cnt = v:count ? v:count : 1
while i < cnt
let i = i + 1
let line = line('.')
let col = col('.')
let pos = search(a:pattern,'W'.a:flags)
while pos != 0 && s:synname() !~# a:syn
let pos = search(a:pattern,'W'.a:flags)
endwhile
if pos == 0
call cursor(line,col)
return
endif
norm! m'
if a:mode ==# 'v'
norm! gv
endif
let i = 0
let cnt = v:count ? v:count : 1
while i < cnt
let i = i + 1
let line = line('.')
let col = col('.')
let pos = search(a:pattern,'W'.a:flags)
while pos != 0 && s:synname() !~# a:syn
let pos = search(a:pattern,'W'.a:flags)
endwhile
if pos == 0
call cursor(line,col)
return
endif
endwhile
endfunction
function! s:synname()
return synIDattr(synID(line('.'),col('.'),0),'name')
return synIDattr(synID(line('.'),col('.'),0),'name')
endfunction
function! s:wrap_i(back,forward)
execute 'norm k'.a:forward
let line = line('.')
execute 'norm '.a:back
if line('.') == line - 1
return s:wrap_a(a:back,a:forward)
endif
execute 'norm jV'.a:forward.'k'
endfunction
function! s:wrap_a(back,forward)
execute 'norm '.a:forward
if line('.') < line('$') && getline(line('.')+1) ==# ''
let after = 1
endif
execute 'norm '.a:back
while getline(line('.')-1) =~# '^\s*#' && line('.')
-
endwhile
if exists('after')
execute 'norm V'.a:forward.'j'
elseif line('.') > 1 && getline(line('.')-1) =~# '^\s*$'
execute 'norm kV'.a:forward
else
execute 'norm V'.a:forward
endif
endfunction
function! RubyCursorIdentifier()
@@ -241,6 +342,26 @@ function! RubyCursorIdentifier()
return stripped == '' ? expand("<cword>") : stripped
endfunction
function! s:gf(count,map,edit) abort
if getline('.') =~# '^\s*require_relative\s*\(["'']\).*\1\s*$'
let target = matchstr(getline('.'),'\(["'']\)\zs.\{-\}\ze\1')
return a:edit.' %:h/'.target.'.rb'
elseif getline('.') =~# '^\s*\%(require[( ]\|load[( ]\|autoload[( ]:\w\+,\)\s*\s*\%(::\)\=File\.expand_path(\(["'']\)\.\./.*\1,\s*__FILE__)\s*$'
let target = matchstr(getline('.'),'\(["'']\)\.\./\zs.\{-\}\ze\1')
return a:edit.' %:h/'.target.'.rb'
elseif getline('.') =~# '^\s*\%(require \|load \|autoload :\w\+,\)\s*\(["'']\).*\1\s*$'
let target = matchstr(getline('.'),'\(["'']\)\zs.\{-\}\ze\1')
else
let target = expand('<cfile>')
endif
let found = findfile(target, &path, a:count)
if found ==# ''
return 'norm! '.a:count.a:map
else
return a:edit.' '.fnameescape(found)
endif
endfunction
"
" Instructions for enabling "matchit" support:
"

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: Vim
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2012 Mar 21
" Last Change: 2013 Jun 26
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -21,10 +21,6 @@ let b:undo_ftplugin = "setl fo< isk< com< tw< commentstring<"
" and insert the comment leader when hitting <CR> or using "o".
setlocal fo-=t fo+=croql
" To make syntax highlighting of 'vimVar's work correctly we need the colon to
" be part of keywords. This needs to be done prior to the 'isk+=#' below.
setlocal isk+=:
" To allow tag lookup via CTRL-] for autoload functions, '#' must be a
" keyword character. E.g., for netrw#Nread().
setlocal isk+=#

View File

@@ -1,8 +1,9 @@
" Vim filetype plugin file
" Language: XS (Perl extension interface language)
" Maintainer: Andy Lester <andy@petdance.com>
" URL: http://github.com/petdance/vim-perl
" Last Change: 2009-08-14
" Language: XS (Perl extension interface language)
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Homepage: http://github.com/vim-perl/vim-perl
" Bugs/requests: http://github.com/vim-perl/vim-perl/issues
" Last Change: 2009-08-14
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")

View File

@@ -1,7 +1,7 @@
" Vim indent file
" Language: Cucumber
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2010 May 21
" Last Change: 2013 May 30
if exists("b:did_indent")
finish
@@ -12,6 +12,8 @@ setlocal autoindent
setlocal indentexpr=GetCucumberIndent()
setlocal indentkeys=o,O,*<Return>,<:>,0<Bar>,0#,=,!^F
let b:undo_indent = 'setl ai< inde< indk<'
" Only define the function once.
if exists("*GetCucumberIndent")
finish
@@ -24,35 +26,47 @@ endfunction
function! GetCucumberIndent()
let line = getline(prevnonblank(v:lnum-1))
let cline = getline(v:lnum)
let nline = getline(nextnonblank(v:lnum+1))
let syn = s:syn(prevnonblank(v:lnum-1))
let csyn = s:syn(v:lnum)
let nsyn = s:syn(nextnonblank(v:lnum+1))
if csyn ==# 'cucumberFeature' || cline =~# '^\s*Feature:'
" feature heading
return 0
elseif csyn ==# 'cucumberExamples' || cline =~# '^\s*\%(Examples\|Scenarios\):'
" examples heading
return 2 * &sw
elseif csyn =~# '^cucumber\%(Background\|Scenario\|ScenarioOutline\)$' || cline =~# '^\s*\%(Background\|Scenario\|Scenario Outline\):'
" background, scenario or outline heading
return &sw
elseif syn ==# 'cucumberFeature' || line =~# '^\s*Feature:'
" line after feature heading
return &sw
elseif syn ==# 'cucumberExamples' || line =~# '^\s*\%(Examples\|Scenarios\):'
" line after examples heading
return 3 * &sw
elseif syn =~# '^cucumber\%(Background\|Scenario\|ScenarioOutline\)$' || line =~# '^\s*\%(Background\|Scenario\|Scenario Outline\):'
" line after background, scenario or outline heading
return 2 * &sw
elseif cline =~# '^\s*@' && (s:syn(nextnonblank(v:lnum+1)) == 'cucumberFeature' || getline(nextnonblank(v:lnum+1)) =~# '^\s*Feature:' || indent(prevnonblank(v:lnum-1)) <= 0)
elseif cline =~# '^\s*[@#]' && (nsyn == 'cucumberFeature' || nline =~# '^\s*Feature:' || indent(prevnonblank(v:lnum-1)) <= 0)
" tag or comment before a feature heading
return 0
elseif line =~# '^\s*@'
elseif cline =~# '^\s*@'
" other tags
return &sw
elseif cline =~# '^\s*|' && line =~# '^\s*|'
elseif cline =~# '^\s*[#|]' && line =~# '^\s*|'
" mid-table
" preserve indent
return indent(prevnonblank(v:lnum-1))
elseif cline =~# '^\s*|' && line =~# '^\s*[^|#]'
elseif cline =~# '^\s*|' && line =~# '^\s*[^|]'
" first line of a table, relative indent
return indent(prevnonblank(v:lnum-1)) + &sw
elseif cline =~# '^\s*[^|# \t]' && line =~# '^\s*|'
elseif cline =~# '^\s*[^|]' && line =~# '^\s*|'
" line after a table, relative unindent
return indent(prevnonblank(v:lnum-1)) - &sw
elseif cline =~# '^\s*$' && line =~# '^\s*|'
let in = indent(prevnonblank(v:lnum-1))
return in == indent(v:lnum) ? in : in - &sw
elseif cline =~# '^\s*#' && getline(v:lnum-1) =~ '^\s*$' && getline(v:lnum+1) =~# '\S'
return indent(getline(v:lnum+1))
elseif cline =~# '^\s*#' && getline(v:lnum-1) =~ '^\s*$' && (nsyn =~# '^cucumber\%(Background\|Scenario\|ScenarioOutline\)$' || nline =~# '^\s*\%(Background\|Scenario\|Scenario Outline\):')
" comments on scenarios
return &sw
endif
return indent(prevnonblank(v:lnum-1))
endfunction

View File

@@ -4,7 +4,7 @@
" Contributors: Edwin Fine <efine145_nospam01 at usa dot net>
" Pawel 'kTT' Salata <rockplayer.pl@gmail.com>
" Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
" Last Update: 2013-Mar-05
" Last Update: 2013-Jun-01
" License: Vim license
" URL: https://github.com/hcs42/vim-erlang
@@ -1086,62 +1086,74 @@ function! s:ErlangCalcIndent2(lnum, stack)
endif
endif
elseif token == 'end'
let [lnum_new, col_new] = s:SearchEndPair(lnum, curr_col)
elseif index(['end', ')', ']', '}', '>>'], token) != -1
if lnum_new == 0
return s:IndentError('Matching token for "end" not found',
\token, stack)
else
if lnum_new != lnum
call s:Log(' Tokenize for "end" <<<<')
let [lnum, indtokens] = s:TokenizeLine(lnum_new, 'up')
call s:Log(' >>>> Tokenize for "end"')
" If we can be sure that there is synchronization in the Erlang
" syntax, we use searchpair to make the script quicker. Otherwise we
" just push the token onto the stack and keep parsing.
" No synchronization -> no searchpair optimization
if !exists('b:erlang_syntax_synced')
call s:Push(stack, token)
" We don't have searchpair optimization for '>>'
elseif token == '>>'
call s:Push(stack, token)
elseif token == 'end'
let [lnum_new, col_new] = s:SearchEndPair(lnum, curr_col)
if lnum_new == 0
return s:IndentError('Matching token for "end" not found',
\token, stack)
else
if lnum_new != lnum
call s:Log(' Tokenize for "end" <<<<')
let [lnum, indtokens] = s:TokenizeLine(lnum_new, 'up')
call s:Log(' >>>> Tokenize for "end"')
endif
let [success, i] = s:GetIndtokenAtCol(indtokens, col_new)
if !success | return i | endif
let [token, curr_vcol, curr_col] = indtokens[i]
call s:Log(' Match for "end" in line ' . lnum_new . ': ' .
\string(indtokens[i]))
endif
let [success, i] = s:GetIndtokenAtCol(indtokens, col_new)
if !success | return i | endif
let [token, curr_vcol, curr_col] = indtokens[i]
call s:Log(' Match for "end" in line ' . lnum_new . ': ' .
\string(indtokens[i]))
endif
else " token is one of the following: ')', ']', '}'
elseif index([')', ']', '}'], token) != -1
call s:Push(stack, token)
call s:Push(stack, token)
" We have to escape '[', because this string will be interpreted as a
" regexp
let open_paren = (token == ')' ? '(' :
\token == ']' ? '\[' :
\ '{')
" We have to escape '[', because this string will be interpreted as a
" regexp
let open_paren = (token == ')' ? '(' :
\token == ']' ? '\[' :
\ '{')
let [lnum_new, col_new] = s:SearchPair(lnum, curr_col,
\open_paren, '', token)
let [lnum_new, col_new] = s:SearchPair(lnum, curr_col,
\open_paren, '', token)
if lnum_new == 0
return s:IndentError('Matching token not found',
\token, stack)
else
if lnum_new != lnum
call s:Log(' Tokenize the opening paren <<<<')
let [lnum, indtokens] = s:TokenizeLine(lnum_new, 'up')
call s:Log(' >>>>')
endif
if lnum_new == 0
return s:IndentError('Matching token not found',
\token, stack)
else
if lnum_new != lnum
call s:Log(' Tokenize the opening paren <<<<')
let [lnum, indtokens] = s:TokenizeLine(lnum_new, 'up')
call s:Log(' >>>>')
let [success, i] = s:GetIndtokenAtCol(indtokens, col_new)
if !success | return i | endif
let [token, curr_vcol, curr_col] = indtokens[i]
call s:Log(' Match in line ' . lnum_new . ': ' .
\string(indtokens[i]))
" Go back to the beginning of the loop and handle the opening paren
continue
endif
let [success, i] = s:GetIndtokenAtCol(indtokens, col_new)
if !success | return i | endif
let [token, curr_vcol, curr_col] = indtokens[i]
call s:Log(' Match in line ' . lnum_new . ': ' .
\string(indtokens[i]))
" Go back to the beginning of the loop and handle the opening paren
continue
endif
elseif token == '>>'
call s:Push(stack, token)
elseif token == ';'
if empty(stack)
@@ -1323,7 +1335,10 @@ function! ErlangIndent()
let curr_col = len(ml[1])
if ml[2] == 'end'
" If we can be sure that there is synchronization in the Erlang
" syntax, we use searchpair to make the script quicker.
if ml[2] == 'end' && exists('b:erlang_syntax_synced')
let [lnum, col] = s:SearchEndPair(v:lnum, curr_col)
if lnum == 0

View File

@@ -1,9 +1,7 @@
" Vim indent file
" Language: eRuby
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2010 May 28
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
if exists("b:did_indent")
@@ -50,29 +48,32 @@ function! GetErubyIndent(...)
call cursor(v:lnum,1)
let inruby = searchpair('<%','','%>','W')
call cursor(v:lnum,vcol)
if inruby && getline(v:lnum) !~ '^<%\|^\s*-\=%>'
let ind = GetRubyIndent()
if inruby && getline(v:lnum) !~ '^<%\|^\s*[-=]\=%>'
let ind = GetRubyIndent(v:lnum)
else
exe "let ind = ".b:eruby_subtype_indentexpr
endif
let lnum = prevnonblank(v:lnum-1)
let line = getline(lnum)
let cline = getline(v:lnum)
if cline =~# '^\s*<%-\=\s*\%(}\|end\|else\|\%(ensure\|rescue\|elsif\|when\).\{-\}\)\s*\%(-\=%>\|$\)'
if cline =~# '^\s*<%[-=]\=\s*\%(}\|end\|else\|\%(ensure\|rescue\|elsif\|when\).\{-\}\)\s*\%([-=]\=%>\|$\)'
let ind = ind - &sw
endif
if line =~# '\S\s*<%-\=\s*\%(}\|end\).\{-\}\s*\%(-\=%>\|$\)'
if line =~# '\S\s*<%[-=]\=\s*\%(}\|end\).\{-\}\s*\%([-=]\=%>\|$\)'
let ind = ind - &sw
endif
if line =~# '\%({\|\<do\)\%(\s*|[^|]*|\)\=\s*-\=%>'
if line =~# '\%({\|\<do\)\%(\s*|[^|]*|\)\=\s*[-=]\=%>'
let ind = ind + &sw
elseif line =~# '<%-\=\s*\%(module\|class\|def\|if\|for\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure\|rescue\)\>.*%>'
elseif line =~# '<%[-=]\=\s*\%(module\|class\|def\|if\|for\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure\|rescue\)\>.*%>'
let ind = ind + &sw
endif
if line =~# '^\s*<%[=#-]\=\s*$' && cline !~# '^\s*end\>'
let ind = ind + &sw
endif
if cline =~# '^\s*-\=%>\s*$'
if line !~# '^\s*<%' && line =~# '%>\s*$'
let ind = ind - &sw
endif
if cline =~# '^\s*[-=]\=%>\s*$'
let ind = ind - &sw
endif
return ind

View File

@@ -2,13 +2,10 @@
" Language: Falcon
" Maintainer: Steven Oliver <oliver.steven@gmail.com>
" Website: https://steveno@github.com/steveno/falconpl-vim.git
" Credits: Thanks to the ruby.vim authors, I borrow a lot!
" Previous Maintainer: Brent A. Fulgham <bfulgham@debian.org>
" -----------------------------------------------------------
" Credits: This is, to a great extent, a copy n' paste of ruby.vim.
"======================================
" SETUP
"======================================
" 1. Setup {{{1
" ============
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@@ -19,7 +16,7 @@ let b:did_indent = 1
setlocal nosmartindent
" Setup indent function and when to use it
setlocal indentexpr=FalconGetIndent()
setlocal indentexpr=FalconGetIndent(v:lnum)
setlocal indentkeys=0{,0},0),0],!^F,o,O,e
setlocal indentkeys+==~case,=~catch,=~default,=~elif,=~else,=~end,=~\"
@@ -31,9 +28,8 @@ endif
let s:cpo_save = &cpo
set cpo&vim
"======================================
" VARIABLES
"======================================
" 2. Variables {{{1
" ============
" Regex of syntax group names that are strings AND comments
let s:syng_strcom = '\<falcon\%(String\|StringEscape\|Comment\)\>'
@@ -41,6 +37,31 @@ let s:syng_strcom = '\<falcon\%(String\|StringEscape\|Comment\)\>'
" Regex of syntax group names that are strings
let s:syng_string = '\<falcon\%(String\|StringEscape\)\>'
" Regex that defines blocks.
"
" Note that there's a slight problem with this regex and s:continuation_regex.
" Code like this will be matched by both:
"
" method_call do |(a, b)|
"
" The reason is that the pipe matches a hanging "|" operator.
"
let s:block_regex =
\ '\%(\<do:\@!\>\|%\@<!{\)\s*\%(|\s*(*\s*\%([*@&]\=\h\w*,\=\s*\)\%(,\s*(*\s*[*@&]\=\h\w*\s*)*\s*\)*|\)\=\s*\%(#.*\)\=$'
let s:block_continuation_regex = '^\s*[^])}\t ].*'.s:block_regex
" Regex that defines continuation lines.
" TODO: this needs to deal with if ...: and so on
let s:continuation_regex =
\ '\%(%\@<![({[\\.,:*/%+]\|\<and\|\<or\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$'
" Regex that defines bracket continuations
let s:bracket_continuation_regex = '%\@<!\%([({[]\)\s*\%(#.*\)\=$'
" Regex that defines continuation lines, not including (, {, or [.
let s:non_bracket_continuation_regex = '\%([\\.,:*/%+]\|\<and\|\<or\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$'
" Keywords to indent on
let s:falcon_indent_keywords = '^\s*\(case\|catch\|class\|enum\|default\|elif\|else' .
\ '\|for\|function\|if.*"[^"]*:.*"\|if \(\(:\)\@!.\)*$\|loop\|object\|select' .
@@ -49,109 +70,381 @@ let s:falcon_indent_keywords = '^\s*\(case\|catch\|class\|enum\|default\|elif\|e
" Keywords to deindent on
let s:falcon_deindent_keywords = '^\s*\(case\|catch\|default\|elif\|else\|end\)'
"======================================
" FUNCTIONS
"======================================
" 3. Functions {{{1
" ============
" Check if the character at lnum:col is inside a string
" Check if the character at lnum:col is inside a string, comment, or is ascii.
function s:IsInStringOrComment(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_strcom
endfunction
"======================================
" INDENT ROUTINE
"======================================
" Check if the character at lnum:col is inside a string.
function s:IsInString(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_string
endfunction
function FalconGetIndent()
" Get the line to be indented
let cline = getline(v:lnum)
" Check if the character at lnum:col is inside a string delimiter
function s:IsInStringDelimiter(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name') == 'falconStringDelimiter'
endfunction
" Don't reindent comments on first column
if cline =~ '^\/\/'
return 0
endif
" Find line above 'lnum' that isn't empty, in a comment, or in a string.
function s:PrevNonBlankNonString(lnum)
let in_block = 0
let lnum = prevnonblank(a:lnum)
while lnum > 0
" Go in and out of blocks comments as necessary.
" If the line isn't empty (with opt. comment) or in a string, end search.
let line = getline(lnum)
if line =~ '^=begin'
if in_block
let in_block = 0
else
break
endif
elseif !in_block && line =~ '^=end'
let in_block = 1
elseif !in_block && line !~ '^\s*#.*$' && !(s:IsInStringOrComment(lnum, 1)
\ && s:IsInStringOrComment(lnum, strlen(line)))
break
endif
let lnum = prevnonblank(lnum - 1)
endwhile
return lnum
endfunction
" Find the previous non-blank line
let lnum = prevnonblank(v:lnum - 1)
" Find line above 'lnum' that started the continuation 'lnum' may be part of.
function s:GetMSL(lnum)
" Start on the line we're at and use its indent.
let msl = a:lnum
let msl_body = getline(msl)
let lnum = s:PrevNonBlankNonString(a:lnum - 1)
while lnum > 0
" If we have a continuation line, or we're in a string, use line as MSL.
" Otherwise, terminate search as we have found our MSL already.
let line = getline(lnum)
if s:Match(line, s:non_bracket_continuation_regex) &&
\ s:Match(msl, s:non_bracket_continuation_regex)
" If the current line is a non-bracket continuation and so is the
" previous one, keep its indent and continue looking for an MSL.
"
" Example:
" method_call one,
" two,
" three
"
let msl = lnum
elseif s:Match(lnum, s:non_bracket_continuation_regex) &&
\ (s:Match(msl, s:bracket_continuation_regex) || s:Match(msl, s:block_continuation_regex))
" If the current line is a bracket continuation or a block-starter, but
" the previous is a non-bracket one, respect the previous' indentation,
" and stop here.
"
" Example:
" method_call one,
" two {
" three
"
return lnum
elseif s:Match(lnum, s:bracket_continuation_regex) &&
\ (s:Match(msl, s:bracket_continuation_regex) || s:Match(msl, s:block_continuation_regex))
" If both lines are bracket continuations (the current may also be a
" block-starter), use the current one's and stop here
"
" Example:
" method_call(
" other_method_call(
" foo
return msl
elseif s:Match(lnum, s:block_regex) &&
\ !s:Match(msl, s:continuation_regex) &&
\ !s:Match(msl, s:block_continuation_regex)
" If the previous line is a block-starter and the current one is
" mostly ordinary, use the current one as the MSL.
"
" Example:
" method_call do
" something
" something_else
return msl
else
let col = match(line, s:continuation_regex) + 1
if (col > 0 && !s:IsInStringOrComment(lnum, col))
\ || s:IsInString(lnum, strlen(line))
let msl = lnum
else
break
endif
endif
let msl_body = getline(msl)
let lnum = s:PrevNonBlankNonString(lnum - 1)
endwhile
return msl
endfunction
" Check if line 'lnum' has more opening brackets than closing ones.
function s:ExtraBrackets(lnum)
let opening = {'parentheses': [], 'braces': [], 'brackets': []}
let closing = {'parentheses': [], 'braces': [], 'brackets': []}
let line = getline(a:lnum)
let pos = match(line, '[][(){}]', 0)
" Save any encountered opening brackets, and remove them once a matching
" closing one has been found. If a closing bracket shows up that doesn't
" close anything, save it for later.
while pos != -1
if !s:IsInStringOrComment(a:lnum, pos + 1)
if line[pos] == '('
call add(opening.parentheses, {'type': '(', 'pos': pos})
elseif line[pos] == ')'
if empty(opening.parentheses)
call add(closing.parentheses, {'type': ')', 'pos': pos})
else
let opening.parentheses = opening.parentheses[0:-2]
endif
elseif line[pos] == '{'
call add(opening.braces, {'type': '{', 'pos': pos})
elseif line[pos] == '}'
if empty(opening.braces)
call add(closing.braces, {'type': '}', 'pos': pos})
else
let opening.braces = opening.braces[0:-2]
endif
elseif line[pos] == '['
call add(opening.brackets, {'type': '[', 'pos': pos})
elseif line[pos] == ']'
if empty(opening.brackets)
call add(closing.brackets, {'type': ']', 'pos': pos})
else
let opening.brackets = opening.brackets[0:-2]
endif
endif
endif
let pos = match(line, '[][(){}]', pos + 1)
endwhile
" Find the rightmost brackets, since they're the ones that are important in
" both opening and closing cases
let rightmost_opening = {'type': '(', 'pos': -1}
let rightmost_closing = {'type': ')', 'pos': -1}
for opening in opening.parentheses + opening.braces + opening.brackets
if opening.pos > rightmost_opening.pos
let rightmost_opening = opening
endif
endfor
for closing in closing.parentheses + closing.braces + closing.brackets
if closing.pos > rightmost_closing.pos
let rightmost_closing = closing
endif
endfor
return [rightmost_opening, rightmost_closing]
endfunction
function s:Match(lnum, regex)
let col = match(getline(a:lnum), '\C'.a:regex) + 1
return col > 0 && !s:IsInStringOrComment(a:lnum, col) ? col : 0
endfunction
function s:MatchLast(lnum, regex)
let line = getline(a:lnum)
let col = match(line, '.*\zs' . a:regex)
while col != -1 && s:IsInStringOrComment(a:lnum, col)
let line = strpart(line, 0, col)
let col = match(line, '.*' . a:regex)
endwhile
return col + 1
endfunction
" 4. FalconGetIndent Routine {{{1
" ============
function FalconGetIndent(...)
" For the current line, use the first argument if given, else v:lnum
let clnum = a:0 ? a:1 : v:lnum
" Use zero indent at the top of the file
if lnum == 0
if clnum == 0
return 0
endif
let prevline=getline(lnum)
let line = getline(clnum)
let ind = -1
" If we got a closing bracket on an empty line, find its match and indent
" according to it. For parentheses we indent to its column - 1, for the
" others we indent to the containing line's MSL's level. Return -1 if fail.
let col = matchend(line, '^\s*[]})]')
if col > 0 && !s:IsInStringOrComment(clnum, col)
call cursor(clnum, col)
let bs = strpart('(){}[]', stridx(')}]', line[col - 1]) * 2, 2)
if searchpair(escape(bs[0], '\['), '', bs[1], 'bW', s:skip_expr) > 0
if line[col-1]==')' && col('.') != col('$') - 1
let ind = virtcol('.') - 1
else
let ind = indent(s:GetMSL(line('.')))
endif
endif
return ind
endif
" If we have a deindenting keyword, find its match and indent to its level.
" TODO: this is messy
if s:Match(clnum, s:falcon_deindent_keywords)
call cursor(clnum, 1)
if searchpair(s:end_start_regex, s:end_middle_regex, s:end_end_regex, 'bW',
\ s:end_skip_expr) > 0
let msl = s:GetMSL(line('.'))
let line = getline(line('.'))
if strpart(line, 0, col('.') - 1) =~ '=\s*$' &&
\ strpart(line, col('.') - 1, 2) !~ 'do'
let ind = virtcol('.') - 1
elseif getline(msl) =~ '=\s*\(#.*\)\=$'
let ind = indent(line('.'))
else
let ind = indent(msl)
endif
endif
return ind
endif
" If we are in a multi-line string or line-comment, don't do anything to it.
if s:IsInString(clnum, matchend(line, '^\s*') + 1)
return indent('.')
endif
" Find a non-blank, non-multi-line string line above the current line.
let lnum = s:PrevNonBlankNonString(clnum - 1)
" If the line is empty and inside a string, use the previous line.
if line =~ '^\s*$' && lnum != prevnonblank(clnum - 1)
return indent(prevnonblank(clnum))
endif
" At the start of the file use zero indent.
if lnum == 0
return 0
endif
" Set up variables for the previous line.
let line = getline(lnum)
let ind = indent(lnum)
let chg = 0
" If we are in a multi-line string or line-comment, don't do anything
if s:IsInStringOrComment(v:lnum, matchend(cline, '^\s*') + 1 )
return indent('.')
" If the previous line ended with a block opening, add a level of indent.
if s:Match(lnum, s:block_regex)
return indent(s:GetMSL(lnum)) + &sw
endif
" If the start of the line equals a double quote, then indent to the
" previous lines first double quote
if cline =~? '^\s*"'
let chg = chg + &sw
" If it contained hanging closing brackets, find the rightmost one, find its
" match and indent according to that.
if line =~ '[[({]' || line =~ '[])}]\s*\%(#.*\)\=$'
let [opening, closing] = s:ExtraBrackets(lnum)
if opening.pos != -1
if opening.type == '(' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0
if col('.') + 1 == col('$')
return ind + &sw
else
return virtcol('.')
endif
else
let nonspace = matchend(line, '\S', opening.pos + 1) - 1
return nonspace > 0 ? nonspace : ind + &sw
endif
elseif closing.pos != -1
call cursor(lnum, closing.pos + 1)
normal! %
if s:Match(line('.'), s:falcon_indent_keywords)
return indent('.') + &sw
else
return indent('.')
endif
else
call cursor(clnum, vcol)
end
endif
" If previous line started with a double quote and this one
" doesn't, unindent
if prevline =~? '^\s*"' && cline =~? '^\s*'
let chg = chg - &sw
" If the previous line ended with an "end", match that "end"s beginning's
" indent.
let col = s:Match(lnum, '\%(^\|[^.:@$]\)\<end\>\s*\%(#.*\)\=$')
if col > 0
call cursor(lnum, col)
if searchpair(s:end_start_regex, '', s:end_end_regex, 'bW',
\ s:end_skip_expr) > 0
let n = line('.')
let ind = indent('.')
let msl = s:GetMSL(n)
if msl != n
let ind = indent(msl)
end
return ind
endif
end
let col = s:Match(lnum, s:falcon_indent_keywords)
if col > 0
call cursor(lnum, col)
let ind = virtcol('.') - 1 + &sw
" TODO: make this better (we need to count them) (or, if a searchpair
" fails, we know that something is lacking an end and thus we indent a
" level
if s:Match(lnum, s:end_end_regex)
let ind = indent('.')
endif
return ind
endif
" Indent if proper keyword
if prevline =~? s:falcon_indent_keywords
let chg = &sw
" If previous line opened a parenthesis, and did not close it, indent
elseif prevline =~ '^.*(\s*[^)]*\((.*)\)*[^)]*$'
" Make sure this isn't just a function split between two lines
if prevline =~ ',\s*$'
return indent(prevnonblank(v:lnum - 1)) + &sw
else
return match(prevline, '(.*\((.*)\|[^)]\)*.*$') + 1
endif
elseif prevline =~ '^[^(]*)\s*$'
" This line closes a parenthesis. Finds opening.
let curr_line = prevnonblank(lnum - 1)
while curr_line >= 0
let str = getline(curr_line)
if str !~ '^.*(\s*[^)]*\((.*)\)*[^)]*$'
let curr_line = prevnonblank(curr_line - 1)
else
break
endif
endwhile
if curr_line < 0
return -1
endif
let ind = indent(curr_line)
" Set up variables to use and search for MSL to the previous line.
let p_lnum = lnum
let lnum = s:GetMSL(lnum)
" If the previous line wasn't a MSL and is continuation return its indent.
" TODO: the || s:IsInString() thing worries me a bit.
if p_lnum != lnum
if s:Match(p_lnum, s:non_bracket_continuation_regex) || s:IsInString(p_lnum,strlen(line))
return ind
endif
endif
" If previous line ends in a semi-colon reset indent to previous
" lines setting
if prevline =~? ';\s*$' && prevnonblank(prevline) =~? ',\s*$'
let chg = chg - (2 * &sw)
" Set up more variables, now that we know we wasn't continuation bound.
let line = getline(lnum)
let msl_ind = indent(lnum)
" If the MSL line had an indenting keyword in it, add a level of indent.
" TODO: this does not take into account contrived things such as
" module Foo; class Bar; end
if s:Match(lnum, s:falcon_indent_keywords)
let ind = msl_ind + &sw
if s:Match(lnum, s:end_end_regex)
let ind = ind - &sw
endif
return ind
endif
" If previous line ended in a comma, indent again
if prevline =~? ',\s*$'
let chg = chg + &sw
" If the previous line ended with [*+/.,-=], but wasn't a block ending or a
" closing bracket, indent one extra level.
if s:Match(lnum, s:non_bracket_continuation_regex) && !s:Match(lnum, '^\s*\([\])}]\|end\)')
if lnum == p_lnum
let ind = msl_ind + &sw
else
let ind = msl_ind
endif
return ind
endif
" If previous line ended in a =>, indent again
if prevline =~? '=>\s*$'
let chg = chg + &sw
endif
" Deindent on proper keywords
if cline =~? s:falcon_deindent_keywords
let chg = chg - &sw
endif
return ind + chg
return ind
endfunction
" }}}1
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -1,7 +1,7 @@
" Vim indent file
" Language: git config file
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2012 April 7
" Last Change: 2013 May 30
if exists("b:did_indent")
finish

View File

@@ -1,7 +1,7 @@
" Vim indent file
" Language: Haml
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2010 May 21
" Last Change: 2013 May 30
if exists("b:did_indent")
finish
@@ -23,7 +23,7 @@ let s:attributes = '\%({.\{-\}}\|\[.\{-\}\]\)'
let s:tag = '\%([%.#][[:alnum:]_-]\+\|'.s:attributes.'\)*[<>]*'
if !exists('g:haml_self_closing_tags')
let g:haml_self_closing_tags = 'meta|link|img|hr|br'
let g:haml_self_closing_tags = 'base|link|meta|br|hr|img|input'
endif
function! GetHamlIndent()

View File

@@ -1,242 +1,505 @@
" Description: html indenter
" Author: Johannes Zellner <johannes@zellner.org>
" Last Change: Mo, 05 Jun 2006 22:32:41 CEST
" Restoring 'cpo' and 'ic' added by Bram 2006 May 5
" Globals: g:html_indent_tags -- indenting tags
" g:html_indent_strict -- inhibit 'O O' elements
" g:html_indent_strict_table -- inhibit 'O -' elements
" Vim indent script for HTML
" General: "{{{
" File: html.vim (Vimscript #2075)
" Author: Andy Wokula <anwoku@yahoo.de>
" Last Change: 2013 Jun 12
" Rev Days: 13
" Version: 0.9
" Vim Version: Vim7
" Description:
" Improved version of the distributed html indent script, faster on a
" range of lines.
"
" Credits:
" indent/html.vim (2006 Jun 05) from J. Zellner
" indent/css.vim (2006 Dec 20) from N. Weibull
"
" History:
" 2012 Oct 21 (v0.9) added support for shiftwidth()
" 2011 Sep 09 (v0.8) added HTML5 tags (thx to J. Zuckerman)
" 2008 Apr 28 (v0.6) revised customization
" 2008 Mar 09 (v0.5) fixed 'indk' issue (thx to C.J. Robinson)
" }}}
" Only load this indent file when no other was loaded.
" Init Folklore, check user settings (2nd time ++) "{{{
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal indentexpr=HtmlIndent()
setlocal indentkeys=o,O,<Return>,<>>,{,},!^F
" [-- local settings (must come before aborting the script) --]
setlocal indentexpr=HtmlIndentGet(v:lnum)
setlocal indentkeys=o,O,*<Return>,<>>,{,}
let b:indent = {"lnum": -1}
let b:undo_indent = "set inde< indk<| unlet b:indent"
if exists('g:html_indent_tags')
unlet g:html_indent_tags
" Load Once:
if exists("*HtmlIndent")
call HtmlIndent_CheckUserSettings()
finish
endif
" [-- helper function to assemble tag list --]
fun! <SID>HtmlIndentPush(tag)
if exists('g:html_indent_tags')
let g:html_indent_tags = g:html_indent_tags.'\|'.a:tag
else
let g:html_indent_tags = a:tag
endif
endfun
" [-- <ELEMENT ? - - ...> --]
call <SID>HtmlIndentPush('a')
call <SID>HtmlIndentPush('abbr')
call <SID>HtmlIndentPush('acronym')
call <SID>HtmlIndentPush('address')
call <SID>HtmlIndentPush('b')
call <SID>HtmlIndentPush('bdo')
call <SID>HtmlIndentPush('big')
call <SID>HtmlIndentPush('blockquote')
call <SID>HtmlIndentPush('button')
call <SID>HtmlIndentPush('caption')
call <SID>HtmlIndentPush('center')
call <SID>HtmlIndentPush('cite')
call <SID>HtmlIndentPush('code')
call <SID>HtmlIndentPush('colgroup')
call <SID>HtmlIndentPush('del')
call <SID>HtmlIndentPush('dfn')
call <SID>HtmlIndentPush('dir')
call <SID>HtmlIndentPush('div')
call <SID>HtmlIndentPush('dl')
call <SID>HtmlIndentPush('em')
call <SID>HtmlIndentPush('fieldset')
call <SID>HtmlIndentPush('font')
call <SID>HtmlIndentPush('form')
call <SID>HtmlIndentPush('frameset')
call <SID>HtmlIndentPush('h1')
call <SID>HtmlIndentPush('h2')
call <SID>HtmlIndentPush('h3')
call <SID>HtmlIndentPush('h4')
call <SID>HtmlIndentPush('h5')
call <SID>HtmlIndentPush('h6')
call <SID>HtmlIndentPush('i')
call <SID>HtmlIndentPush('iframe')
call <SID>HtmlIndentPush('ins')
call <SID>HtmlIndentPush('kbd')
call <SID>HtmlIndentPush('label')
call <SID>HtmlIndentPush('legend')
call <SID>HtmlIndentPush('map')
call <SID>HtmlIndentPush('menu')
call <SID>HtmlIndentPush('noframes')
call <SID>HtmlIndentPush('noscript')
call <SID>HtmlIndentPush('object')
call <SID>HtmlIndentPush('ol')
call <SID>HtmlIndentPush('optgroup')
" call <SID>HtmlIndentPush('pre')
call <SID>HtmlIndentPush('q')
call <SID>HtmlIndentPush('s')
call <SID>HtmlIndentPush('samp')
call <SID>HtmlIndentPush('script')
call <SID>HtmlIndentPush('select')
call <SID>HtmlIndentPush('small')
call <SID>HtmlIndentPush('span')
call <SID>HtmlIndentPush('strong')
call <SID>HtmlIndentPush('style')
call <SID>HtmlIndentPush('sub')
call <SID>HtmlIndentPush('sup')
call <SID>HtmlIndentPush('table')
call <SID>HtmlIndentPush('textarea')
call <SID>HtmlIndentPush('title')
call <SID>HtmlIndentPush('tt')
call <SID>HtmlIndentPush('u')
call <SID>HtmlIndentPush('ul')
call <SID>HtmlIndentPush('var')
" [-- <ELEMENT ? O O ...> --]
if !exists('g:html_indent_strict')
call <SID>HtmlIndentPush('body')
call <SID>HtmlIndentPush('head')
call <SID>HtmlIndentPush('html')
call <SID>HtmlIndentPush('tbody')
" Patch 7.3.694
if exists('*shiftwidth')
let s:ShiftWidth = function('shiftwidth')
else
func! s:ShiftWidth()
return &shiftwidth
endfunc
endif
" [-- <ELEMENT ? O - ...> --]
if !exists('g:html_indent_strict_table')
call <SID>HtmlIndentPush('th')
call <SID>HtmlIndentPush('td')
call <SID>HtmlIndentPush('tr')
call <SID>HtmlIndentPush('tfoot')
call <SID>HtmlIndentPush('thead')
endif
delfun <SID>HtmlIndentPush
let s:cpo_save = &cpo
set cpo-=C
"}}}
" [-- count indent-increasing tags of line a:lnum --]
fun! <SID>HtmlIndentOpen(lnum, pattern)
let s = substitute('x'.getline(a:lnum),
\ '.\{-}\(\(<\)\('.a:pattern.'\)\>\)', "\1", 'g')
let s = substitute(s, "[^\1].*$", '', '')
return strlen(s)
endfun
" [-- count indent-decreasing tags of line a:lnum --]
fun! <SID>HtmlIndentClose(lnum, pattern)
let s = substitute('x'.getline(a:lnum),
\ '.\{-}\(\(<\)/\('.a:pattern.'\)\>>\)', "\1", 'g')
let s = substitute(s, "[^\1].*$", '', '')
return strlen(s)
endfun
" [-- count indent-increasing '{' of (java|css) line a:lnum --]
fun! <SID>HtmlIndentOpenAlt(lnum)
return strlen(substitute(getline(a:lnum), '[^{]\+', '', 'g'))
endfun
" [-- count indent-decreasing '}' of (java|css) line a:lnum --]
fun! <SID>HtmlIndentCloseAlt(lnum)
return strlen(substitute(getline(a:lnum), '[^}]\+', '', 'g'))
endfun
" [-- return the sum of indents respecting the syntax of a:lnum --]
fun! <SID>HtmlIndentSum(lnum, style)
if a:style == match(getline(a:lnum), '^\s*</')
if a:style == match(getline(a:lnum), '^\s*</\<\('.g:html_indent_tags.'\)\>')
let open = <SID>HtmlIndentOpen(a:lnum, g:html_indent_tags)
let close = <SID>HtmlIndentClose(a:lnum, g:html_indent_tags)
if 0 != open || 0 != close
return open - close
endif
endif
func! HtmlIndent_CheckUserSettings() "{{{
if exists("g:html_indent_inctags")
call s:AddITags(split(g:html_indent_inctags, ","))
endif
if '' != &syntax &&
\ synIDattr(synID(a:lnum, 1, 1), 'name') =~ '\(css\|java\).*' &&
\ synIDattr(synID(a:lnum, strlen(getline(a:lnum)), 1), 'name')
\ =~ '\(css\|java\).*'
if a:style == match(getline(a:lnum), '^\s*}')
return <SID>HtmlIndentOpenAlt(a:lnum) - <SID>HtmlIndentCloseAlt(a:lnum)
endif
endif
return 0
endfun
fun! HtmlIndentGet(lnum)
" Find a non-empty line above the current line.
let lnum = prevnonblank(a:lnum - 1)
" Hit the start of the file, use zero indent.
if lnum == 0
return 0
if exists("g:html_indent_autotags")
call s:RemoveITags(split(g:html_indent_autotags, ","))
endif
let restore_ic = &ic
setlocal ic " ignore case
let indone = {"zero": 0
\,"auto": "indent(prevnonblank(v:lnum-1))"
\,"inc": "b:indent.blocktagind + s:ShiftWidth()"}
if exists("g:html_indent_script1")
let s:js1indent = get(indone, g:html_indent_script1, indone.zero)
endif
if exists("g:html_indent_style1")
let s:css1indent = get(indone, g:html_indent_style1, indone.zero)
endif
endfunc "}}}
" [-- special handling for <pre>: no indenting --]
if getline(a:lnum) =~ '\c</pre>'
\ || 0 < searchpair('\c<pre>', '', '\c</pre>', 'nWb')
\ || 0 < searchpair('\c<pre>', '', '\c</pre>', 'nW')
" we're in a line with </pre> or inside <pre> ... </pre>
if restore_ic == 0
setlocal noic
" Init Script Vars "{{{
let s:usestate = 1
let s:css1indent = 0
let s:js1indent = 0
" not to be changed:
let s:endtags = [0,0,0,0,0,0,0,0] " some places unused
let s:newstate = {}
let s:countonly = 0
"}}}
func! s:AddITags(taglist) "{{{
for itag in a:taglist
let s:indent_tags[itag] = 1
let s:indent_tags['/'.itag] = -1
endfor
endfunc "}}}
func! s:AddBlockTag(tag, id, ...) "{{{
if !(a:id >= 2 && a:id < 2+len(s:endtags))
return
endif
let s:indent_tags[a:tag] = a:id
if a:0 == 0
let s:indent_tags['/'.a:tag] = -a:id
let s:endtags[a:id-2] = "</".a:tag.">"
else
let s:indent_tags[a:1] = -a:id
let s:endtags[a:id-2] = a:1
endif
endfunc "}}}
func! s:RemoveITags(taglist) "{{{
" remove itags (protect blocktags from being removed)
for itag in a:taglist
if !has_key(s:indent_tags, itag) || s:indent_tags[itag] != 1
continue
endif
unlet s:indent_tags[itag]
if itag =~ '^\w\+$'
unlet s:indent_tags["/".itag]
endif
endfor
endfunc "}}}
" Add Indent Tags: {{{
if !exists("s:indent_tags")
let s:indent_tags = {}
endif
" old tags:
call s:AddITags(['a', 'abbr', 'acronym', 'address', 'b', 'bdo', 'big',
\ 'blockquote', 'button', 'caption', 'center', 'cite', 'code', 'colgroup',
\ 'del', 'dfn', 'dir', 'div', 'dl', 'em', 'fieldset', 'font', 'form',
\ 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'i', 'iframe', 'ins', 'kbd',
\ 'label', 'legend', 'map', 'menu', 'noframes', 'noscript', 'object', 'ol',
\ 'optgroup', 'q', 's', 'samp', 'select', 'small', 'span', 'strong', 'sub',
\ 'sup', 'table', 'textarea', 'title', 'tt', 'u', 'ul', 'var', 'th', 'td',
\ 'tr', 'tfoot', 'thead'])
" tags added 2011 Sep 09 (especially HTML5 tags):
call s:AddITags(['area', 'article', 'aside', 'audio', 'bdi', 'canvas',
\ 'command', 'datalist', 'details', 'embed', 'figure', 'footer',
\ 'header', 'group', 'keygen', 'mark', 'math', 'meter', 'nav', 'output',
\ 'progress', 'ruby', 'section', 'svg', 'texture', 'time', 'video',
\ 'wbr', 'text'])
"}}}
" Add Block Tags: contain alien content "{{{
call s:AddBlockTag('pre', 2)
call s:AddBlockTag('script', 3)
call s:AddBlockTag('style', 4)
call s:AddBlockTag('<!--', 5, '-->')
"}}}
func! s:CountITags(...) "{{{
" relative indent steps for current line [unit &sw]:
let s:curind = 0
" relative indent steps for next line [unit &sw]:
let s:nextrel = 0
if a:0==0
let s:block = s:newstate.block
let tmpline = substitute(s:curline, '<\zs\/\=\w\+\>\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
if s:block == 3
let s:newstate.scripttype = s:GetScriptType(matchstr(tmpline, '\C.*<SCRIPT\>\zs[^>]*'))
endif
let s:newstate.block = s:block
else
let s:block = 0 " assume starting outside of a block
let s:countonly = 1 " don't change state
let tmpline = substitute(s:altline, '<\zs\/\=\w\+\>\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
let s:countonly = 0
endif
endfunc "}}}
func! s:CheckTag(itag) "{{{
" "tag" or "/tag" or "<!--" or "-->"
let ind = get(s:indent_tags, a:itag)
if ind == -1
" closing tag
if s:block != 0
" ignore itag within a block
return "foo"
endif
if s:nextrel == 0
let s:curind -= 1
else
let s:nextrel -= 1
endif
" if s:curind >= 1
" let s:curind -= 1
" else
" let s:nextrel -= 1
" endif
elseif ind == 1
" opening tag
if s:block != 0
return "foo"
endif
let s:nextrel += 1
elseif ind != 0
" block-tag (opening or closing)
return s:Blocktag(a:itag, ind)
endif
" else ind==0 (other tag found): keep indent
return "foo" " no matter
endfunc "}}}
func! s:Blocktag(blocktag, ind) "{{{
if a:ind > 0
" a block starts here
if s:block != 0
" already in a block (nesting) - ignore
" especially ignore comments after other blocktags
return "foo"
endif
let s:block = a:ind " block type
if s:countonly
return "foo"
endif
let s:newstate.blocklnr = v:lnum
" save allover indent for the endtag
let s:newstate.blocktagind = b:indent.baseindent + (s:nextrel + s:curind) * s:ShiftWidth()
if a:ind == 3
return "SCRIPT" " all except this must be lowercase
" line is to be checked again for the type attribute
endif
else
let s:block = 0
" we get here if starting and closing block-tag on same line
endif
return "foo"
endfunc "}}}
func! s:GetScriptType(str) "{{{
if a:str == "" || a:str =~ "java"
return "javascript"
else
return ""
endif
endfunc "}}}
func! s:FreshState(lnum) "{{{
" Look back in the file (lines 1 to a:lnum-1) to calc a state for line
" a:lnum. A state is to know ALL relevant details about the lines
" 1..a:lnum-1, initial calculating (here!) can be slow, but updating is
" fast (incremental).
" State:
" lnum last indented line == prevnonblank(a:lnum - 1)
" block = 0 a:lnum located within special tag: 0:none, 2:<pre>,
" 3:<script>, 4:<style>, 5:<!--
" baseindent use this indent for line a:lnum as a start - kind of
" autoindent (if block==0)
" scripttype = '' type attribute of a script tag (if block==3)
" blocktagind indent for current opening (get) and closing (set)
" blocktag (if block!=0)
" blocklnr lnum of starting blocktag (if block!=0)
" inattr line {lnum} starts with attributes of a tag
let state = {}
let state.lnum = prevnonblank(a:lnum - 1)
let state.scripttype = ""
let state.blocktagind = -1
let state.block = 0
let state.baseindent = 0
let state.blocklnr = 0
let state.inattr = 0
if state.lnum == 0
return state
endif
" Heuristic:
" remember startline state.lnum
" look back for <pre, </pre, <script, </script, <style, </style tags
" remember stopline
" if opening tag found,
" assume a:lnum within block
" else
" look back in result range (stopline, startline) for comment
" \ delimiters (<!--, -->)
" if comment opener found,
" assume a:lnum within comment
" else
" assume usual html for a:lnum
" if a:lnum-1 has a closing comment
" look back to get indent of comment opener
" FI
" look back for blocktag
call cursor(a:lnum, 1)
let [stopline, stopcol] = searchpos('\c<\zs\/\=\%(pre\>\|script\>\|style\>\)', "bW")
" fugly ... why isn't there searchstr()
let tagline = tolower(getline(stopline))
let blocktag = matchstr(tagline, '\/\=\%(pre\>\|script\>\|style\>\)', stopcol-1)
if stopline > 0 && blocktag[0] != "/"
" opening tag found, assume a:lnum within block
let state.block = s:indent_tags[blocktag]
if state.block == 3
let state.scripttype = s:GetScriptType(matchstr(tagline, '\>[^>]*', stopcol))
endif
let state.blocklnr = stopline
" check preceding tags in the line:
let s:altline = tagline[: stopcol-2]
call s:CountITags(1)
let state.blocktagind = indent(stopline) + (s:curind + s:nextrel) * s:ShiftWidth()
return state
elseif stopline == state.lnum
" handle special case: previous line (= state.lnum) contains a
" closing blocktag which is preceded by line-noise;
" blocktag == "/..."
let swendtag = match(tagline, '^\s*</') >= 0
if !swendtag
let [bline, bcol] = searchpos('<'.blocktag[1:].'\>', "bW")
let s:altline = tolower(getline(bline)[: bcol-2])
call s:CountITags(1)
let state.baseindent = indent(bline) + (s:nextrel+s:curline) * s:ShiftWidth()
return state
endif
endif
" else look back for comment
call cursor(a:lnum, 1)
let [comline, comcol, found] = searchpos('\(<!--\)\|-->', 'bpW', stopline)
if found == 2
" comment opener found, assume a:lnum within comment
let state.block = 5
let state.blocklnr = comline
" check preceding tags in the line:
let s:altline = tolower(getline(comline)[: comcol-2])
call s:CountITags(1)
let state.blocktagind = indent(comline) + (s:curind + s:nextrel) * s:ShiftWidth()
return state
endif
" else within usual html
let s:altline = tolower(getline(state.lnum))
" check a:lnum-1 for closing comment (we need indent from the opening line)
let comcol = stridx(s:altline, '-->')
if comcol >= 0
call cursor(state.lnum, comcol+1)
let [comline, comcol] = searchpos('<!--', 'bW')
if comline == state.lnum
let s:altline = s:altline[: comcol-2]
else
let s:altline = tolower(getline(comline)[: comcol-2])
endif
call s:CountITags(1)
let state.baseindent = indent(comline) + (s:nextrel+s:curline) * s:ShiftWidth()
return state
" TODO check tags that follow "-->"
endif
" else no comments
call s:CountITags(1)
let state.baseindent = indent(state.lnum) + s:nextrel * s:ShiftWidth()
" line starts with end tag
let swendtag = match(s:altline, '^\s*</') >= 0
if !swendtag
let state.baseindent += s:curind * s:ShiftWidth()
endif
return state
endfunc "}}}
func! s:Alien2() "{{{
" <pre> block
return -1
endfunc "}}}
func! s:Alien3() "{{{
" <script> javascript
if prevnonblank(v:lnum-1) == b:indent.blocklnr
" indent for the first line after <script>
return eval(s:js1indent)
endif
if b:indent.scripttype == "javascript"
return cindent(v:lnum)
else
return -1
endif
endfunc "}}}
func! s:Alien4() "{{{
" <style>
if prevnonblank(v:lnum-1) == b:indent.blocklnr
" indent for first content line
return eval(s:css1indent)
endif
return s:CSSIndent()
endfunc
" [-- special handling for <javascript>: use cindent --]
let js = '<script.*type\s*=\s*.*java'
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" by Tye Zdrojewski <zdro@yahoo.com>, 05 Jun 2006
" ZDR: This needs to be an AND (we are 'after the start of the pair' AND
" we are 'before the end of the pair'). Otherwise, indentation
" before the start of the script block will be affected; the end of
" the pair will still match if we are before the beginning of the
" pair.
"
if 0 < searchpair(js, '', '</script>', 'nWb')
\ && 0 < searchpair(js, '', '</script>', 'nW')
" we're inside javascript
if getline(lnum) !~ js && getline(a:lnum) != '</script>'
if restore_ic == 0
setlocal noic
func! s:CSSIndent() "{{{
" adopted $VIMRUNTIME/indent/css.vim
if getline(v:lnum) =~ '^\s*[*}]'
return cindent(v:lnum)
endif
let minline = b:indent.blocklnr
let pnum = s:css_prevnoncomment(v:lnum - 1, minline)
if pnum <= minline
" < is to catch errors
" indent for first content line after comments
return eval(s:css1indent)
endif
let ind = indent(pnum) + s:css_countbraces(pnum, 1) * s:ShiftWidth()
let pline = getline(pnum)
if pline =~ '}\s*$'
let ind -= (s:css_countbraces(pnum, 0) - (pline =~ '^\s*}')) * s:ShiftWidth()
endif
return ind
endfunc "}}}
func! s:css_prevnoncomment(lnum, stopline) "{{{
" caller starts from a line a:lnum-1 that is not a comment
let lnum = prevnonblank(a:lnum)
let ccol = match(getline(lnum), '\*/')
if ccol < 0
return lnum
endif
call cursor(lnum, ccol+1)
let lnum = search('/\*', 'bW', a:stopline)
if indent(".") == virtcol(".")-1
return prevnonblank(lnum-1)
else
return lnum
endif
endfunc "}}}
func! s:css_countbraces(lnum, count_open) "{{{
let brs = substitute(getline(a:lnum),'[''"].\{-}[''"]\|/\*.\{-}\*/\|/\*.*$\|[^{}]','','g')
let n_open = 0
let n_close = 0
for brace in split(brs, '\zs')
if brace == "{"
let n_open += 1
elseif brace == "}"
if n_open > 0
let n_open -= 1
else
let n_close += 1
endif
return cindent(a:lnum)
endif
endfor
return a:count_open ? n_open : n_close
endfunc "}}}
"}}}
func! s:Alien5() "{{{
" <!-- -->
return -1
endfunc "}}}
func! HtmlIndent() "{{{
let s:curline = tolower(getline(v:lnum))
let indentunit = s:ShiftWidth()
let s:newstate = {}
let s:newstate.lnum = v:lnum
" does the line start with a closing tag?
let swendtag = match(s:curline, '^\s*</') >= 0
if prevnonblank(v:lnum-1) == b:indent.lnum && s:usestate
" use state (continue from previous line)
else
" start over (know nothing)
let b:indent = s:FreshState(v:lnum)
endif
if getline(lnum) =~ '\c</pre>'
" line before the current line a:lnum contains
" a closing </pre>. --> search for line before
" starting <pre> to restore the indent.
let preline = prevnonblank(search('\c<pre>', 'bW') - 1)
if preline > 0
if restore_ic == 0
setlocal noic
if b:indent.block >= 2
" within block
let endtag = s:endtags[b:indent.block-2]
let blockend = stridx(s:curline, endtag)
if blockend >= 0
" block ends here
let s:newstate.block = 0
" calc indent for REST OF LINE (may start more blocks):
let s:curline = strpart(s:curline, blockend+strlen(endtag))
call s:CountITags()
if swendtag && b:indent.block != 5
let indent = b:indent.blocktagind + s:curind * indentunit
let s:newstate.baseindent = indent + s:nextrel * indentunit
else
let indent = s:Alien{b:indent.block}()
let s:newstate.baseindent = b:indent.blocktagind + s:nextrel * indentunit
endif
return indent(preline)
call extend(b:indent, s:newstate, "force")
return indent
else
" block continues
" indent this line with alien method
let indent = s:Alien{b:indent.block}()
call extend(b:indent, s:newstate, "force")
return indent
endif
else
" not within a block - within usual html
" if < 2 then always 0
let s:newstate.block = b:indent.block
call s:CountITags()
if swendtag
let indent = b:indent.baseindent + s:curind * indentunit
let s:newstate.baseindent = indent + s:nextrel * indentunit
else
let indent = b:indent.baseindent
let s:newstate.baseindent = indent + (s:curind + s:nextrel) * indentunit
endif
call extend(b:indent, s:newstate, "force")
return indent
endif
let ind = <SID>HtmlIndentSum(lnum, -1)
let ind = ind + <SID>HtmlIndentSum(a:lnum, 0)
endfunc "}}}
if restore_ic == 0
setlocal noic
endif
" check user settings (first time), clear cpo, Modeline: {{{1
return indent(lnum) + (&sw * ind)
endfun
" DEBUG:
com! -nargs=* IndHtmlLocal <args>
call HtmlIndent_CheckUserSettings()
let &cpo = s:cpo_save
unlet s:cpo_save
" [-- EOF <runtime>/indent/html.vim --]
" vim:set fdm=marker ts=8:

View File

@@ -1,7 +1,7 @@
" Vim indent file
" Language: Liquid
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2012 May 07
" Last Change: 2013 May 30
if exists('b:did_indent')
finish

View File

@@ -4,9 +4,13 @@
" Mike Leary <leary@nwlink.com>
" Markus Mottl <markus.mottl@gmail.com>
" URL: http://www.ocaml.info/vim/indent/ocaml.vim
" Last Change: 2010 Sep 04 - Added an indentation improvement by Mark Weber
" Last Change: 2013 Jun 29
" 2005 Jun 25 - Fixed multiple bugs due to 'else\nreturn ind' working
" 2005 May 09 - Added an option to not indent OCaml-indents specially (MM)
" 2013 June - commented textwidth (Marc Weber)
"
" Marc Weber's comment: This file may contain a lot of (very custom) stuff
" which eventually should be moved somewhere else ..
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@@ -19,7 +23,9 @@ setlocal indentexpr=GetOCamlIndent()
setlocal indentkeys+=0=and,0=class,0=constraint,0=done,0=else,0=end,0=exception,0=external,0=if,0=in,0=include,0=inherit,0=initializer,0=let,0=method,0=open,0=then,0=type,0=val,0=with,0;;,0>\],0\|\],0>},0\|,0},0\],0)
setlocal nolisp
setlocal nosmartindent
setlocal textwidth=80
" At least Marc Weber and Markus Mottl do not like this:
" setlocal textwidth=80
" Comment formatting
if !exists("no_ocaml_comments")

View File

@@ -1,8 +1,9 @@
" Vim indent file
" Language: Perl 5
" Author: Andy Lester <andy@petdance.com>
" URL: http://github.com/petdance/vim-perl/tree/master
" Last Change: June 3, 2009
" Language: Perl 5
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Homepage: http://github.com/vim-perl/vim-perl
" Bugs/requests: http://github.com/vim-perl/vim-perl/issues
" Last Change: May 12, 2013
" Suggestions and improvements by :
" Aaron J. Sherman (use syntax for hints)
@@ -11,9 +12,9 @@
" TODO things that are not or not properly indented (yet) :
" - Continued statements
" print "foo",
" "bar";
" "bar";
" print "foo"
" if bar();
" if bar();
" - Multiline regular expressions (m//x)
" (The following probably needs modifying the perl syntax file)
" - qw() lists
@@ -34,15 +35,10 @@ if !b:indent_use_syntax
setlocal indentkeys+=0=EO
endif
" Only define the function once.
if exists("*GetPerlIndent")
finish
endif
let s:cpo_save = &cpo
set cpo-=C
function GetPerlIndent()
function! GetPerlIndent()
" Get the line to be indented
let cline = getline(v:lnum)
@@ -52,7 +48,7 @@ function GetPerlIndent()
return 0
endif
" Don't reindent coments on first column
" Don't reindent comments on first column
if cline =~ '^#.'
return 0
endif
@@ -124,7 +120,12 @@ function GetPerlIndent()
" Indent blocks enclosed by {}, (), or []
if b:indent_use_syntax
" Find a real opening brace
let bracepos = match(line, '[(){}\[\]]', matchend(line, '^\s*[)}\]]'))
" NOTE: Unlike Perl character classes, we do NOT need to escape the
" closing brackets with a backslash. Doing so just puts a backslash
" in the character class and causes sorrow. Instead, put the closing
" bracket as the first character in the class.
let braceclass = '[][(){}]'
let bracepos = match(line, braceclass, matchend(line, '^\s*[])}]'))
while bracepos != -1
let synid = synIDattr(synID(lnum, bracepos + 1, 0), "name")
" If the brace is highlighted in one of those groups, indent it.
@@ -133,7 +134,7 @@ function GetPerlIndent()
\ || synid == "perlMatchStartEnd"
\ || synid == "perlHereDoc"
\ || synid =~ "^perlFiledescStatement"
\ || synid =~ '^perl\(Sub\|Block\)Fold'
\ || synid =~ '^perl\(Sub\|Block\|Package\)Fold'
let brace = strpart(line, bracepos, 1)
if brace == '(' || brace == '{' || brace == '['
let ind = ind + &sw
@@ -141,22 +142,22 @@ function GetPerlIndent()
let ind = ind - &sw
endif
endif
let bracepos = match(line, '[(){}\[\]]', bracepos + 1)
let bracepos = match(line, braceclass, bracepos + 1)
endwhile
let bracepos = matchend(cline, '^\s*[)}\]]')
let bracepos = matchend(cline, '^\s*[])}]')
if bracepos != -1
let synid = synIDattr(synID(v:lnum, bracepos, 0), "name")
if synid == ""
\ || synid == "perlMatchStartEnd"
\ || synid =~ '^perl\(Sub\|Block\)Fold'
\ || synid =~ '^perl\(Sub\|Block\|Package\)Fold'
let ind = ind - &sw
endif
endif
else
if line =~ '[{\[(]\s*\(#[^)}\]]*\)\=$'
if line =~ '[{[(]\s*\(#[^])}]*\)\=$'
let ind = ind + &sw
endif
if cline =~ '^\s*[)}\]]'
if cline =~ '^\s*[])}]'
let ind = ind - &sw
endif
endif

View File

@@ -1,12 +1,13 @@
" Vim indent file
" Language: Perl 6
" Maintainer: Andy Lester <andy@petdance.com>
" URL: http://github.com/petdance/vim-perl/tree/master
" Last Change: 2009-07-04
" Contributors: Andy Lester <andy@petdance.com>
" Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
" Language: Perl 6
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Homepage: http://github.com/vim-perl/vim-perl
" Bugs/requests: http://github.com/vim-perl/vim-perl/issues
" Last Change: 2013-05-12
" Contributors: Andy Lester <andy@petdance.com>
" Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
"
" Adapted from Perl indent file by Rafael Garcia-Suarez <rgarciasuarez@free.fr>
" Adapted from indent/perl.vim by Rafael Garcia-Suarez <rgarciasuarez@free.fr>
" Suggestions and improvements by :
" Aaron J. Sherman (use syntax for hints)
@@ -46,15 +47,10 @@ if !b:indent_use_syntax
setlocal indentkeys+=0=EO
endif
" Only define the function once.
if exists("*GetPerl6Indent")
finish
endif
let s:cpo_save = &cpo
set cpo-=C
function GetPerl6Indent()
function! GetPerl6Indent()
" Get the line to be indented
let cline = getline(v:lnum)

View File

@@ -2,7 +2,7 @@
" Language: Python
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Original Author: David Bustos <bustos@caltech.edu>
" Last Change: 2012 May 01
" Last Change: 2013 Jun 21
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@@ -36,7 +36,7 @@ function GetPythonIndent(lnum)
if a:lnum > 1 && getline(a:lnum - 2) =~ '\\$'
return indent(a:lnum - 1)
endif
return indent(a:lnum - 1) + (exists("g:pyindent_continue") ? eval(g:pyindent_continue) : (&sw * 2))
return indent(a:lnum - 1) + (exists("g:pyindent_continue") ? eval(g:pyindent_continue) : (shiftwidth() * 2))
endif
" If the start of the line is in a string don't change the indent.
@@ -89,9 +89,9 @@ function GetPythonIndent(lnum)
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|String\\)$'")
if pp > 0
return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : &sw)
return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : shiftwidth())
endif
return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (&sw * 2))
return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (shiftwidth() * 2))
endif
if plnumstart == p
return indent(plnum)
@@ -134,15 +134,15 @@ function GetPythonIndent(lnum)
" If the previous line ended with a colon, indent this line
if pline =~ ':\s*$'
return plindent + &sw
return plindent + shiftwidth()
endif
" If the previous line was a stop-execution statement...
if getline(plnum) =~ '^\s*\(break\|continue\|raise\|return\|pass\)\>'
" See if the user has already dedented
if indent(a:lnum) > indent(plnum) - &sw
if indent(a:lnum) > indent(plnum) - shiftwidth()
" If not, recommend one dedent
return indent(plnum) - &sw
return indent(plnum) - shiftwidth()
endif
" Otherwise, trust the user
return -1
@@ -173,11 +173,11 @@ function GetPythonIndent(lnum)
endif
" Or the user has already dedented
if indent(a:lnum) <= plindent - &sw
if indent(a:lnum) <= plindent - shiftwidth()
return -1
endif
return plindent - &sw
return plindent - shiftwidth()
endif
" When after a () construct we probably want to go back to the start line.

View File

@@ -1,9 +1,7 @@
" Vim indent file
" Language: Ruby
" Maintainer: Nikolai Weibull <now at bitwi.se>
" Last Change: 2009 Dec 17
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" 0. Initialization {{{1
@@ -18,9 +16,9 @@ let b:did_indent = 1
setlocal nosmartindent
" Now, set up our indentation expression and keys that trigger it.
setlocal indentexpr=GetRubyIndent()
setlocal indentexpr=GetRubyIndent(v:lnum)
setlocal indentkeys=0{,0},0),0],!^F,o,O,e
setlocal indentkeys+==end,=elsif,=when,=ensure,=rescue,==begin,==end
setlocal indentkeys+==end,=else,=elsif,=when,=ensure,=rescue,==begin,==end
" Only define the function once.
if exists("*GetRubyIndent")
@@ -33,8 +31,9 @@ set cpo&vim
" 1. Variables {{{1
" ============
" Regex of syntax group names that are or delimit string or are comments.
let s:syng_strcom = '\<ruby\%(String\|StringEscape\|ASCIICode' .
" Regex of syntax group names that are or delimit strings/symbols or are comments.
let s:syng_strcom = '\<ruby\%(Regexp\|RegexpDelimiter\|RegexpEscape' .
\ '\|Symbol\|String\|StringDelimiter\|StringEscape\|ASCIICode' .
\ '\|Interpolation\|NoInterpolation\|Comment\|Documentation\)\>'
" Regex of syntax group names that are strings.
@@ -43,7 +42,7 @@ let s:syng_string =
" Regex of syntax group names that are strings or documentation.
let s:syng_stringdoc =
\'\<ruby\%(String\|Interpolation\|NoInterpolation\|StringEscape\|Documentation\)\>'
\'\<ruby\%(String\|Interpolation\|NoInterpolation\|StringEscape\|Documentation\)\>'
" Expression used to check whether we should skip a match with searchpair().
let s:skip_expr =
@@ -52,45 +51,60 @@ let s:skip_expr =
" Regex used for words that, at the start of a line, add a level of indent.
let s:ruby_indent_keywords = '^\s*\zs\<\%(module\|class\|def\|if\|for' .
\ '\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure' .
\ '\|rescue\)\>' .
\ '\|\%([*+/,=-]\|<<\|>>\|:\s\)\s*\zs' .
\ '\<\%(if\|for\|while\|until\|case\|unless\|begin\)\>'
\ '\|rescue\):\@!\>' .
\ '\|\%([=,*/%+-]\|<<\|>>\|:\s\)\s*\zs' .
\ '\<\%(if\|for\|while\|until\|case\|unless\|begin\):\@!\>'
" Regex used for words that, at the start of a line, remove a level of indent.
let s:ruby_deindent_keywords =
\ '^\s*\zs\<\%(ensure\|else\|rescue\|elsif\|when\|end\)\>'
\ '^\s*\zs\<\%(ensure\|else\|rescue\|elsif\|when\|end\):\@!\>'
" Regex that defines the start-match for the 'end' keyword.
"let s:end_start_regex = '\%(^\|[^.]\)\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\|do\)\>'
" TODO: the do here should be restricted somewhat (only at end of line)?
let s:end_start_regex = '^\s*\zs\<\%(module\|class\|def\|if\|for' .
\ '\|while\|until\|case\|unless\|begin\)\>' .
\ '\|\%([*+/,=-]\|<<\|>>\|:\s\)\s*\zs' .
\ '\<\%(if\|for\|while\|until\|case\|unless\|begin\)\>' .
\ '\|\<do\>'
let s:end_start_regex =
\ '\C\%(^\s*\|[=,*/%+\-|;{]\|<<\|>>\|:\s\)\s*\zs' .
\ '\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\):\@!\>' .
\ '\|\%(^\|[^.:@$]\)\@<=\<do:\@!\>'
" Regex that defines the middle-match for the 'end' keyword.
let s:end_middle_regex = '\<\%(ensure\|else\|\%(\%(^\|;\)\s*\)\@<=\<rescue\>\|when\|elsif\)\>'
let s:end_middle_regex = '\<\%(ensure\|else\|\%(\%(^\|;\)\s*\)\@<=\<rescue:\@!\>\|when\|elsif\):\@!\>'
" Regex that defines the end-match for the 'end' keyword.
let s:end_end_regex = '\%(^\|[^.:@$]\)\@<=\<end\>'
let s:end_end_regex = '\%(^\|[^.:@$]\)\@<=\<end:\@!\>'
" Expression used for searchpair() call for finding match for 'end' keyword.
let s:end_skip_expr = s:skip_expr .
\ ' || (expand("<cword>") == "do"' .
\ ' && getline(".") =~ "^\\s*\\<\\(while\\|until\\|for\\)\\>")'
\ ' && getline(".") =~ "^\\s*\\<\\(while\\|until\\|for\\):\\@!\\>")'
" Regex that defines continuation lines, not including (, {, or [.
let s:continuation_regex = '\%([\\*+/.,:]\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$'
let s:non_bracket_continuation_regex = '\%([\\.,:*/%+]\|\<and\|\<or\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$'
" Regex that defines continuation lines.
" TODO: this needs to deal with if ...: and so on
let s:continuation_regex2 =
\ '\%([\\*+/.,:({[]\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$'
let s:continuation_regex =
\ '\%(%\@<![({[\\.,:*/%+]\|\<and\|\<or\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$'
" Regex that defines bracket continuations
let s:bracket_continuation_regex = '%\@<!\%([({[]\)\s*\%(#.*\)\=$'
" Regex that defines the first part of a splat pattern
let s:splat_regex = '[[,(]\s*\*\s*\%(#.*\)\=$'
" Regex that defines blocks.
"
" Note that there's a slight problem with this regex and s:continuation_regex.
" Code like this will be matched by both:
"
" method_call do |(a, b)|
"
" The reason is that the pipe matches a hanging "|" operator.
"
let s:block_regex =
\ '\%(\<do\>\|{\)\s*\%(|\%([*@]\=\h\w*,\=\s*\)\%(,\s*[*@]\=\h\w*\)*|\)\=\s*\%(#.*\)\=$'
\ '\%(\<do:\@!\>\|%\@<!{\)\s*\%(|\s*(*\s*\%([*@&]\=\h\w*,\=\s*\)\%(,\s*(*\s*[*@&]\=\h\w*\s*)*\s*\)*|\)\=\s*\%(#.*\)\=$'
let s:block_continuation_regex = '^\s*[^])}\t ].*'.s:block_regex
" 2. Auxiliary Functions {{{1
" ======================
@@ -110,6 +124,11 @@ function s:IsInStringOrDocumentation(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_stringdoc
endfunction
" Check if the character at lnum:col is inside a string delimiter
function s:IsInStringDelimiter(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name') == 'rubyStringDelimiter'
endfunction
" Find line above 'lnum' that isn't empty, in a comment, or in a string.
function s:PrevNonBlankNonString(lnum)
let in_block = 0
@@ -118,16 +137,16 @@ function s:PrevNonBlankNonString(lnum)
" Go in and out of blocks comments as necessary.
" If the line isn't empty (with opt. comment) or in a string, end search.
let line = getline(lnum)
if line =~ '^=begin$'
if line =~ '^=begin'
if in_block
let in_block = 0
let in_block = 0
else
break
break
endif
elseif !in_block && line =~ '^=end$'
elseif !in_block && line =~ '^=end'
let in_block = 1
elseif !in_block && line !~ '^\s*#.*$' && !(s:IsInStringOrComment(lnum, 1)
\ && s:IsInStringOrComment(lnum, strlen(line)))
\ && s:IsInStringOrComment(lnum, strlen(line)))
break
endif
let lnum = prevnonblank(lnum - 1)
@@ -139,42 +158,144 @@ endfunction
function s:GetMSL(lnum)
" Start on the line we're at and use its indent.
let msl = a:lnum
let msl_body = getline(msl)
let lnum = s:PrevNonBlankNonString(a:lnum - 1)
while lnum > 0
" If we have a continuation line, or we're in a string, use line as MSL.
" Otherwise, terminate search as we have found our MSL already.
let line = getline(lnum)
let col = match(line, s:continuation_regex2) + 1
if (col > 0 && !s:IsInStringOrComment(lnum, col))
\ || s:IsInString(lnum, strlen(line))
if s:Match(lnum, s:splat_regex)
" If the above line looks like the "*" of a splat, use the current one's
" indentation.
"
" Example:
" Hash[*
" method_call do
" something
"
return msl
elseif s:Match(line, s:non_bracket_continuation_regex) &&
\ s:Match(msl, s:non_bracket_continuation_regex)
" If the current line is a non-bracket continuation and so is the
" previous one, keep its indent and continue looking for an MSL.
"
" Example:
" method_call one,
" two,
" three
"
let msl = lnum
elseif s:Match(lnum, s:non_bracket_continuation_regex) &&
\ (s:Match(msl, s:bracket_continuation_regex) || s:Match(msl, s:block_continuation_regex))
" If the current line is a bracket continuation or a block-starter, but
" the previous is a non-bracket one, respect the previous' indentation,
" and stop here.
"
" Example:
" method_call one,
" two {
" three
"
return lnum
elseif s:Match(lnum, s:bracket_continuation_regex) &&
\ (s:Match(msl, s:bracket_continuation_regex) || s:Match(msl, s:block_continuation_regex))
" If both lines are bracket continuations (the current may also be a
" block-starter), use the current one's and stop here
"
" Example:
" method_call(
" other_method_call(
" foo
return msl
elseif s:Match(lnum, s:block_regex) &&
\ !s:Match(msl, s:continuation_regex) &&
\ !s:Match(msl, s:block_continuation_regex)
" If the previous line is a block-starter and the current one is
" mostly ordinary, use the current one as the MSL.
"
" Example:
" method_call do
" something
" something_else
return msl
else
break
let col = match(line, s:continuation_regex) + 1
if (col > 0 && !s:IsInStringOrComment(lnum, col))
\ || s:IsInString(lnum, strlen(line))
let msl = lnum
else
break
endif
endif
let msl_body = getline(msl)
let lnum = s:PrevNonBlankNonString(lnum - 1)
endwhile
return msl
endfunction
" Check if line 'lnum' has more opening brackets than closing ones.
function s:LineHasOpeningBrackets(lnum)
let open_0 = 0
let open_2 = 0
let open_4 = 0
function s:ExtraBrackets(lnum)
let opening = {'parentheses': [], 'braces': [], 'brackets': []}
let closing = {'parentheses': [], 'braces': [], 'brackets': []}
let line = getline(a:lnum)
let pos = match(line, '[][(){}]', 0)
let pos = match(line, '[][(){}]', 0)
" Save any encountered opening brackets, and remove them once a matching
" closing one has been found. If a closing bracket shows up that doesn't
" close anything, save it for later.
while pos != -1
if !s:IsInStringOrComment(a:lnum, pos + 1)
let idx = stridx('(){}[]', line[pos])
if idx % 2 == 0
let open_{idx} = open_{idx} + 1
else
let open_{idx - 1} = open_{idx - 1} - 1
if line[pos] == '('
call add(opening.parentheses, {'type': '(', 'pos': pos})
elseif line[pos] == ')'
if empty(opening.parentheses)
call add(closing.parentheses, {'type': ')', 'pos': pos})
else
let opening.parentheses = opening.parentheses[0:-2]
endif
elseif line[pos] == '{'
call add(opening.braces, {'type': '{', 'pos': pos})
elseif line[pos] == '}'
if empty(opening.braces)
call add(closing.braces, {'type': '}', 'pos': pos})
else
let opening.braces = opening.braces[0:-2]
endif
elseif line[pos] == '['
call add(opening.brackets, {'type': '[', 'pos': pos})
elseif line[pos] == ']'
if empty(opening.brackets)
call add(closing.brackets, {'type': ']', 'pos': pos})
else
let opening.brackets = opening.brackets[0:-2]
endif
endif
endif
let pos = match(line, '[][(){}]', pos + 1)
endwhile
return (open_0 > 0) . (open_2 > 0) . (open_4 > 0)
" Find the rightmost brackets, since they're the ones that are important in
" both opening and closing cases
let rightmost_opening = {'type': '(', 'pos': -1}
let rightmost_closing = {'type': ')', 'pos': -1}
for opening in opening.parentheses + opening.braces + opening.brackets
if opening.pos > rightmost_opening.pos
let rightmost_opening = opening
endif
endfor
for closing in closing.parentheses + closing.braces + closing.brackets
if closing.pos > rightmost_closing.pos
let rightmost_closing = closing
endif
endfor
return [rightmost_opening, rightmost_closing]
endfunction
function s:Match(lnum, regex)
@@ -195,32 +316,35 @@ endfunction
" 3. GetRubyIndent Function {{{1
" =========================
function GetRubyIndent()
function GetRubyIndent(...)
" 3.1. Setup {{{2
" ----------
" Set up variables for restoring position in file. Could use v:lnum here.
" For the current line, use the first argument if given, else v:lnum
let clnum = a:0 ? a:1 : v:lnum
" Set up variables for restoring position in file. Could use clnum here.
let vcol = col('.')
" 3.2. Work on the current line {{{2
" -----------------------------
" Get the current line.
let line = getline(v:lnum)
let line = getline(clnum)
let ind = -1
" If we got a closing bracket on an empty line, find its match and indent
" according to it. For parentheses we indent to its column - 1, for the
" others we indent to the containing line's MSL's level. Return -1 if fail.
let col = matchend(line, '^\s*[]})]')
if col > 0 && !s:IsInStringOrComment(v:lnum, col)
call cursor(v:lnum, col)
if col > 0 && !s:IsInStringOrComment(clnum, col)
call cursor(clnum, col)
let bs = strpart('(){}[]', stridx(')}]', line[col - 1]) * 2, 2)
if searchpair(escape(bs[0], '\['), '', bs[1], 'bW', s:skip_expr) > 0
if line[col-1]==')' && col('.') != col('$') - 1
let ind = virtcol('.')-1
let ind = virtcol('.') - 1
else
let ind = indent(s:GetMSL(line('.')))
let ind = indent(s:GetMSL(line('.')))
endif
endif
return ind
@@ -233,35 +357,47 @@ function GetRubyIndent()
" If we have a deindenting keyword, find its match and indent to its level.
" TODO: this is messy
if s:Match(v:lnum, s:ruby_deindent_keywords)
call cursor(v:lnum, 1)
if s:Match(clnum, s:ruby_deindent_keywords)
call cursor(clnum, 1)
if searchpair(s:end_start_regex, s:end_middle_regex, s:end_end_regex, 'bW',
\ s:end_skip_expr) > 0
let line = getline('.')
\ s:end_skip_expr) > 0
let msl = s:GetMSL(line('.'))
let line = getline(line('.'))
if strpart(line, 0, col('.') - 1) =~ '=\s*$' &&
\ strpart(line, col('.') - 1, 2) !~ 'do'
let ind = virtcol('.') - 1
\ strpart(line, col('.') - 1, 2) !~ 'do'
let ind = virtcol('.') - 1
elseif getline(msl) =~ '=\s*\(#.*\)\=$'
let ind = indent(line('.'))
else
let ind = indent('.')
let ind = indent(msl)
endif
endif
return ind
endif
" If we are in a multi-line string or line-comment, don't do anything to it.
if s:IsInStringOrDocumentation(v:lnum, matchend(line, '^\s*') + 1)
if s:IsInStringOrDocumentation(clnum, matchend(line, '^\s*') + 1)
return indent('.')
endif
" If we are at the closing delimiter of a "<<" heredoc-style string, set the
" indent to 0.
if line =~ '^\k\+\s*$'
\ && s:IsInStringDelimiter(clnum, 1)
\ && search('\V<<'.line, 'nbW') > 0
return 0
endif
" 3.3. Work on the previous line. {{{2
" -------------------------------
" Find a non-blank, non-multi-line string line above the current line.
let lnum = s:PrevNonBlankNonString(v:lnum - 1)
let lnum = s:PrevNonBlankNonString(clnum - 1)
" If the line is empty and inside a string, use the previous line.
if line =~ '^\s*$' && lnum != prevnonblank(v:lnum - 1)
return indent(prevnonblank(v:lnum))
if line =~ '^\s*$' && lnum != prevnonblank(clnum - 1)
return indent(prevnonblank(clnum))
endif
" At the start of the file use zero indent.
@@ -269,7 +405,7 @@ function GetRubyIndent()
return 0
endif
" Set up variables for current line.
" Set up variables for the previous line.
let line = getline(lnum)
let ind = indent(lnum)
@@ -278,20 +414,42 @@ function GetRubyIndent()
return indent(s:GetMSL(lnum)) + &sw
endif
" If the previous line contained an opening bracket, and we are still in it,
" add indent depending on the bracket type.
if line =~ '[[({]'
let counts = s:LineHasOpeningBrackets(lnum)
if counts[0] == '1' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0
if col('.') + 1 == col('$')
return ind + &sw
" If the previous line ended with the "*" of a splat, add a level of indent
if line =~ s:splat_regex
return indent(lnum) + &sw
endif
" If the previous line contained unclosed opening brackets and we are still
" in them, find the rightmost one and add indent depending on the bracket
" type.
"
" If it contained hanging closing brackets, find the rightmost one, find its
" match and indent according to that.
if line =~ '[[({]' || line =~ '[])}]\s*\%(#.*\)\=$'
let [opening, closing] = s:ExtraBrackets(lnum)
if opening.pos != -1
if opening.type == '(' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0
if col('.') + 1 == col('$')
return ind + &sw
else
return virtcol('.')
endif
else
return virtcol('.')
let nonspace = matchend(line, '\S', opening.pos + 1) - 1
return nonspace > 0 ? nonspace : ind + &sw
endif
elseif closing.pos != -1
call cursor(lnum, closing.pos + 1)
normal! %
if s:Match(line('.'), s:ruby_indent_keywords)
return indent('.') + &sw
else
return indent('.')
endif
elseif counts[1] == '1' || counts[2] == '1'
return ind + &sw
else
call cursor(v:lnum, vcol)
call cursor(clnum, vcol)
end
endif
@@ -301,12 +459,12 @@ function GetRubyIndent()
if col > 0
call cursor(lnum, col)
if searchpair(s:end_start_regex, '', s:end_end_regex, 'bW',
\ s:end_skip_expr) > 0
\ s:end_skip_expr) > 0
let n = line('.')
let ind = indent('.')
let msl = s:GetMSL(n)
if msl != n
let ind = indent(msl)
let ind = indent(msl)
end
return ind
endif
@@ -316,7 +474,6 @@ function GetRubyIndent()
if col > 0
call cursor(lnum, col)
let ind = virtcol('.') - 1 + &sw
" let ind = indent(lnum) + &sw
" TODO: make this better (we need to count them) (or, if a searchpair
" fails, we know that something is lacking an end and thus we indent a
" level
@@ -336,7 +493,7 @@ function GetRubyIndent()
" If the previous line wasn't a MSL and is continuation return its indent.
" TODO: the || s:IsInString() thing worries me a bit.
if p_lnum != lnum
if s:Match(p_lnum,s:continuation_regex)||s:IsInString(p_lnum,strlen(line))
if s:Match(p_lnum, s:non_bracket_continuation_regex) || s:IsInString(p_lnum,strlen(line))
return ind
endif
endif
@@ -356,13 +513,15 @@ function GetRubyIndent()
return ind
endif
" If the previous line ended with [*+/.-=], indent one extra level.
if s:Match(lnum, s:continuation_regex)
" If the previous line ended with [*+/.,-=], but wasn't a block ending or a
" closing bracket, indent one extra level.
if s:Match(lnum, s:non_bracket_continuation_regex) && !s:Match(lnum, '^\s*\([\])}]\|end\)')
if lnum == p_lnum
let ind = msl_ind + &sw
else
let ind = msl_ind
endif
return ind
endif
" }}}2
@@ -375,4 +534,4 @@ endfunction
let &cpo = s:cpo_save
unlet s:cpo_save
" vim:set sw=2 sts=2 ts=8 noet:
" vim:set sw=2 sts=2 ts=8 et:

View File

@@ -1,7 +1,7 @@
" Vim indent file
" Language: Sass
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2010 May 21
" Last Change: 2013 May 30
if exists("b:did_indent")
finish
@@ -17,7 +17,8 @@ if exists("*GetSassIndent")
finish
endif
let s:property = '^\s*:\|^\s*[[:alnum:]-]\+\%(:\|\s*=\)'
let s:property = '^\s*:\|^\s*[[:alnum:]#{}-]\+\%(:\|\s*=\)'
let s:extend = '^\s*\%(@extend\|@include\|+\)'
function! GetSassIndent()
let lnum = prevnonblank(v:lnum-1)
@@ -27,7 +28,7 @@ function! GetSassIndent()
let line = substitute(line,'^\s\+','','')
let indent = indent(lnum)
let cindent = indent(v:lnum)
if line !~ s:property && cline =~ s:property
if line !~ s:property && line !~ s:extend && cline =~ s:property
return indent + &sw
"elseif line =~ s:property && cline !~ s:property
"return indent - &sw

View File

@@ -1,9 +1,10 @@
" Menu Translations: Russian
" Maintainer: vassily ragosin <vrr[at]users.sourceforge.net>
" Last Change: 26 Apr 2004
" Maintainer: Sergey Alyoshin <alyoshin.s@gmail.com>
" Previous Maintainer: vassily ragosin <vrr[at]users.sourceforge.net>
" Last Change: 29 May 2013
" URL: cvs://cvs.sf.net:/cvsroot/ruvim/extras/menu/menu_ru_ru.vim
"
" $Id: menu_ru_ru.koi8-r.vim,v 1.2 2004/06/16 11:19:21 vimboss Exp $
" $Id: menu_ru_ru.vim,v 1.1 2004/06/13 16:09:10 vimboss Exp $
"
" Adopted for RuVim project by Vassily Ragosin.
" First translation: Tim Alexeevsky <realtim [at] mail.ru>,
@@ -50,6 +51,7 @@ menutrans &About &
" File menu
menutrans &Open\.\.\.<Tab>:e &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\.\.\.<Tab>:e
menutrans Sp&lit-Open\.\.\.<Tab>:sp <09><>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>\.\.\.<Tab>:sp
menutrans Open\ Tab\.\.\.<Tab>:tabnew <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\.\.\.<Tab>:tabnew
menutrans &New<Tab>:enew &<26><><EFBFBD><EFBFBD><EFBFBD><Tab>:enew
menutrans &Close<Tab>:close &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:close
"--------------------
@@ -77,51 +79,57 @@ menutrans Put\ &After<Tab>]p
menutrans &Delete<Tab>x &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>x
menutrans &Select\ All<Tab>ggVG <09>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20>ӣ<Tab>ggVG
"--------------------
" Athena GUI only
menutrans &Find<Tab>/ &<26><><EFBFBD><EFBFBD><EFBFBD><Tab>/
menutrans Find\ and\ Rep&lace<Tab>:%s <09><><EFBFBD><EFBFBD><EFBFBD>\ <20>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:%s
" End Athena GUI only
menutrans &Find\.\.\.<Tab>/ &<26><><EFBFBD><EFBFBD><EFBFBD>\.\.\.<Tab>/
menutrans Find\ and\ Rep&lace\.\.\. <09><><EFBFBD><EFBFBD><EFBFBD>\ <20>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\.\.\.
menutrans Find\ and\ Rep&lace\.\.\.<Tab>:%s <09><><EFBFBD><EFBFBD><EFBFBD>\ <20>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\.\.\.<Tab>:%s
menutrans Find\ and\ Rep&lace\.\.\.<Tab>:s <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\.\.\.<Tab>:s
menutrans Find\ and\ Rep&lace\.\.\.<Tab>:s <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\.\.\.<Tab>:s
"--------------------
menutrans Settings\ &Window <09><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD>
menutrans Startup\ &Settings <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD>&<26><>
menutrans &Global\ Settings &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans F&ile\ Settings <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans C&olor\ Scheme &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD>
menutrans &Keymap <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Select\ Fo&nt\.\.\. <09><><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\.\.\.
">>>----------------- Edit/Global settings
menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:set\ hls!
menutrans Toggle\ &Ignore-case<Tab>:set\ ic! &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><Tab>:set\ ic!
menutrans Toggle\ &Showmatch<Tab>:set\ sm! <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:set\ sm!
menutrans &Context\ lines <EFBFBD><EFBFBD><EFBFBD>&<26><>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Virtual\ Edit <EFBFBD><EFBFBD><EFBFBD>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:set\ im!
menutrans Toggle\ Vi\ C&ompatible<Tab>:set\ cp! &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20>\ Vi<Tab>:set\ cp!
menutrans Search\ &Path\.\.\. &<26><><EFBFBD><EFBFBD>\ <20><><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\.\.\.
menutrans Ta&g\ Files\.\.\. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD>\.\.\.
menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:set\ hls!
menutrans Toggle\ &Ignore-case<Tab>:set\ ic! &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><Tab>:set\ ic!
menutrans Toggle\ &Showmatch<Tab>:set\ sm! <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:set\ sm!
menutrans &Context\ lines <09><><EFBFBD>&<26><>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Virtual\ Edit <09><><EFBFBD>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! <09><><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:set\ im!
menutrans Toggle\ Vi\ C&ompatible<Tab>:set\ cp! &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20>\ Vi<Tab>:set\ cp!
menutrans Search\ &Path\.\.\. &<26><><EFBFBD><EFBFBD>\ <20><><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\.\.\.
menutrans Ta&g\ Files\.\.\. <09><><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD>\.\.\.
"
menutrans Toggle\ &Toolbar &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Toggle\ &Bottom\ Scrollbar <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD>&<26><>
menutrans Toggle\ &Left\ Scrollbar <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20>&<26><><EFBFBD><EFBFBD>
menutrans Toggle\ &Right\ Scrollbar <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD>&<26><><EFBFBD>
menutrans Toggle\ &Toolbar &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Toggle\ &Bottom\ Scrollbar <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD>&<26><>
menutrans Toggle\ &Left\ Scrollbar <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20>&<26><><EFBFBD><EFBFBD>
menutrans Toggle\ &Right\ Scrollbar <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD>&<26><><EFBFBD>
">>>->>>------------- Edit/Global settings/Virtual edit
menutrans Never <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Block\ Selection <EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD>
menutrans Insert\ mode <EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Block\ and\ Insert <EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD>\ <20>\ <20>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Always <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Never <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Block\ Selection <09><><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD>
menutrans Insert\ mode <09>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Block\ and\ Insert <09><><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD>\ <20>\ <20>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Always <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
">>>----------------- Edit/File settings
menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><Tab>:set\ nu!
menutrans Toggle\ &List\ Mode<Tab>:set\ list! <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>&<26><><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:set\ list!
menutrans Toggle\ Line\ &Wrap<Tab>:set\ wrap! &<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><Tab>:set\ wrap!
menutrans Toggle\ W&rap\ at\ word<Tab>:set\ lbr! <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><Tab>:set\ lbr!
menutrans Toggle\ &expand-tab<Tab>:set\ et! <EFBFBD><EFBFBD><EFBFBD>&<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:set\ et!
menutrans Toggle\ &auto-indent<Tab>:set\ ai! <20><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:set\ ai!
menutrans Toggle\ &C-indenting<Tab>:set\ cin! <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD>\ C<Tab>:set\ cin!
menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><Tab>:set\ nu!
menutrans Toggle\ relati&ve\ Line\ Numbering<Tab>:set\ rnu! <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>&<26><><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><Tab>:set\ nru!
menutrans Toggle\ &List\ Mode<Tab>:set\ list! <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>&<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:set\ list!
menutrans Toggle\ Line\ &Wrap<Tab>:set\ wrap! &<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:set\ wrap!
menutrans Toggle\ W&rap\ at\ word<Tab>:set\ lbr! <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><Tab>:set\ lbr!
menutrans Toggle\ &expand-tab<Tab>:set\ et! <09><><EFBFBD>&<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:set\ et!
menutrans Toggle\ &auto-indent<Tab>:set\ ai! <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:set\ ai!
menutrans Toggle\ &C-indenting<Tab>:set\ cin! <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20>\ &<26><><EFBFBD><EFBFBD><EFBFBD>\ C<Tab>:set\ cin!
">>>---
menutrans &Shiftwidth <EFBFBD><EFBFBD><EFBFBD><EFBFBD>&<26><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Soft\ &Tabstop <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Te&xt\ Width\.\.\. &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\.\.\.
menutrans &File\ Format\.\.\. &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD>\.\.\.
menutrans &Shiftwidth <09><><EFBFBD><EFBFBD>&<26><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Soft\ &Tabstop <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Te&xt\ Width\.\.\. &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\.\.\.
menutrans &File\ Format\.\.\. &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD>\.\.\.
"
"
"
@@ -131,6 +139,7 @@ menutrans Jump\ &back<Tab>^T &
menutrans Build\ &Tags\ File <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD>
"-------------------
menutrans &Folding <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Spelling <09><>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Diff &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ (diff)
"-------------------
menutrans &Make<Tab>:make <09><>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:make
@@ -141,10 +150,26 @@ menutrans &Previous\ Error<Tab>:cp
menutrans &Older\ List<Tab>:cold <09><><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>&<26><>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:cold
menutrans N&ewer\ List<Tab>:cnew <09><><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD>&<26><><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:cnew
menutrans Error\ &Window <09><>&<26><>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Set\ Compiler <09><><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Se&T\ Compiler <09><><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
"-------------------
menutrans &Convert\ to\ HEX<Tab>:%!xxd <09>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20>\ HEX<Tab>:%!xxd
menutrans Conve&rt\ back<Tab>:%!xxd\ -r <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20>&<26>\ HEX<Tab>:%!xxd\ -r
">>>---------------- Tools/Spelling
menutrans &Spell\ Check\ On &<26><><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Spell\ Check\ &Off <09><>&<26><>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans To\ &Next\ error<Tab>]s &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans To\ &Previous\ error<Tab>[s &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Suggest\ &Corrections<Tab>z= <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Repeat\ correction<Tab>:spellrepall <09><><EFBFBD>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD>\ <20><><EFBFBD><EFBFBD>
"-------------------
menutrans Set\ language\ to\ "en" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>\ "en"
menutrans Set\ language\ to\ "en_au" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>\ "en_au"
menutrans Set\ language\ to\ "en_ca" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>\ "en_ca"
menutrans Set\ language\ to\ "en_gb" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>\ "en_gb"
menutrans Set\ language\ to\ "en_nz" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>\ "en_nz"
menutrans Set\ language\ to\ "en_us" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>\ "en_us"
menutrans &Find\ More\ Languages &<26><><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
let g:menutrans_set_lang_to = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>'
">>>---------------- Folds
menutrans &Enable/Disable\ folds<Tab>zi <09><><EFBFBD>/<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>zi
menutrans &View\ Cursor\ Line<Tab>zv <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>zv
@@ -219,7 +244,7 @@ menutrans M&in\ Height<Tab>^W1_
menutrans Max\ &Width<Tab>^W\| <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>^W\|
menutrans Min\ Widt&h<Tab>^W1\| <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>&<26><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>^W1\|
">>>----------------- Window/Move To
menutrans &Top<Tab>^WK <09><EFBFBD>&<26><><EFBFBD><EFBFBD><Tab>^WK
menutrans &Top<Tab>^WK <09>&<26><><EFBFBD><EFBFBD><Tab>^WK
menutrans &Bottom<Tab>^WJ <09>&<26><><EFBFBD><Tab>^WJ
menutrans &Left\ side<Tab>^WH <09>&<26><><EFBFBD><EFBFBD><Tab>^WH
menutrans &Right\ side<Tab>^WL <09>&<26><><EFBFBD><EFBFBD><EFBFBD><Tab>^WL

View File

@@ -1,6 +1,7 @@
" Menu Translations: Russian
" Maintainer: vassily ragosin <vrr[at]users.sourceforge.net>
" Last Change: 26 Apr 2004
" Maintainer: Sergey Alyoshin <alyoshin.s@gmail.com>
" Previous Maintainer: vassily ragosin <vrr[at]users.sourceforge.net>
" Last Change: 29 May 2013
" URL: cvs://cvs.sf.net:/cvsroot/ruvim/extras/menu/menu_ru_ru.vim
"
" $Id: menu_ru_ru.vim,v 1.1 2004/06/13 16:09:10 vimboss Exp $
@@ -50,6 +51,7 @@ menutrans &About &Заставка
" File menu
menutrans &Open\.\.\.<Tab>:e &Открыть\.\.\.<Tab>:e
menutrans Sp&lit-Open\.\.\.<Tab>:sp По&делить\ окно\.\.\.<Tab>:sp
menutrans Open\ Tab\.\.\.<Tab>:tabnew Открыть\ в&кладку\.\.\.<Tab>:tabnew
menutrans &New<Tab>:enew &Новый<Tab>:enew
menutrans &Close<Tab>:close &Закрыть<Tab>:close
"--------------------
@@ -77,51 +79,57 @@ menutrans Put\ &After<Tab>]p Вклеить\ по&сле<Tab>]p
menutrans &Delete<Tab>x &Удалить<Tab>x
menutrans &Select\ All<Tab>ggVG В&ыделить\ всё<Tab>ggVG
"--------------------
" Athena GUI only
menutrans &Find<Tab>/ &Поиск<Tab>/
menutrans Find\ and\ Rep&lace<Tab>:%s Поиск\ и\ &замена<Tab>:%s
" End Athena GUI only
menutrans &Find\.\.\.<Tab>/ &Поиск\.\.\.<Tab>/
menutrans Find\ and\ Rep&lace\.\.\. Поиск\ и\ &замена\.\.\.
menutrans Find\ and\ Rep&lace\.\.\.<Tab>:%s Поиск\ и\ &замена\.\.\.<Tab>:%s
menutrans Find\ and\ Rep&lace\.\.\.<Tab>:s Поиск\ и\ &замена\.\.\.<Tab>:s
menutrans Find\ and\ Rep&lace\.\.\. Поиск\ и\ &замена\.\.\.
menutrans Find\ and\ Rep&lace\.\.\.<Tab>:%s Поиск\ и\ &замена\.\.\.<Tab>:%s
menutrans Find\ and\ Rep&lace\.\.\.<Tab>:s Поиск\ и\ &замена\.\.\.<Tab>:s
"--------------------
menutrans Settings\ &Window Окно\ настройки\ &опций
menutrans Startup\ &Settings Настройки\ запус&ка
menutrans &Global\ Settings &Глобальные\ настройки
menutrans F&ile\ Settings Настройки\ &файлов
menutrans C&olor\ Scheme &Цветовая\ схема
menutrans &Keymap Раскладка\ кл&авиатуры
menutrans Select\ Fo&nt\.\.\. Выбор\ &шрифта\.\.\.
">>>----------------- Edit/Global settings
menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! Подсветка\ &найденных\ соответствий<Tab>:set\ hls!
menutrans Toggle\ &Ignore-case<Tab>:set\ ic! &Регистронезависимый\ поиск<Tab>:set\ ic!
menutrans Toggle\ &Showmatch<Tab>:set\ sm! Показывать\ парные\ &элементы<Tab>:set\ sm!
menutrans &Context\ lines Стр&ок\ вокруг\ курсора
menutrans &Virtual\ Edit Вир&туальное\ редактирование
menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! Режим\ &Вставки<Tab>:set\ im!
menutrans Toggle\ Vi\ C&ompatible<Tab>:set\ cp! &Совместимость\ с\ Vi<Tab>:set\ cp!
menutrans Search\ &Path\.\.\. &Путь\ для\ поиска\ файлов\.\.\.
menutrans Ta&g\ Files\.\.\. Файлы\ &меток\.\.\.
menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! Подсветка\ &найденных\ соответствий<Tab>:set\ hls!
menutrans Toggle\ &Ignore-case<Tab>:set\ ic! &Регистронезависимый\ поиск<Tab>:set\ ic!
menutrans Toggle\ &Showmatch<Tab>:set\ sm! Показывать\ парные\ &элементы<Tab>:set\ sm!
menutrans &Context\ lines Стр&ок\ вокруг\ курсора
menutrans &Virtual\ Edit Вир&туальное\ редактирование
menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! Режим\ &Вставки<Tab>:set\ im!
menutrans Toggle\ Vi\ C&ompatible<Tab>:set\ cp! &Совместимость\ с\ Vi<Tab>:set\ cp!
menutrans Search\ &Path\.\.\. &Путь\ для\ поиска\ файлов\.\.\.
menutrans Ta&g\ Files\.\.\. Файлы\ &меток\.\.\.
"
menutrans Toggle\ &Toolbar &Инструментальная\ панель
menutrans Toggle\ &Bottom\ Scrollbar Полоса\ прокрутки\ вни&зу
menutrans Toggle\ &Left\ Scrollbar Полоса\ прокрутки\ с&лева
menutrans Toggle\ &Right\ Scrollbar Полоса\ прокрутки\ спр&ава
menutrans Toggle\ &Toolbar &Инструментальная\ панель
menutrans Toggle\ &Bottom\ Scrollbar Полоса\ прокрутки\ вни&зу
menutrans Toggle\ &Left\ Scrollbar Полоса\ прокрутки\ с&лева
menutrans Toggle\ &Right\ Scrollbar Полоса\ прокрутки\ спр&ава
">>>->>>------------- Edit/Global settings/Virtual edit
menutrans Never Выключено
menutrans Block\ Selection При\ выделении\ блока
menutrans Insert\ mode В\ режиме\ Вставки
menutrans Block\ and\ Insert При\ выделении\ блока\ и\ в\ режиме\ Вставки
menutrans Always Включено\ всегда
menutrans Never Выключено
menutrans Block\ Selection При\ выделении\ блока
menutrans Insert\ mode В\ режиме\ Вставки
menutrans Block\ and\ Insert При\ выделении\ блока\ и\ в\ режиме\ Вставки
menutrans Always Включено\ всегда
">>>----------------- Edit/File settings
menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! &Нумерация\ строк<Tab>:set\ nu!
menutrans Toggle\ &List\ Mode<Tab>:set\ list! Отобра&жение\ невидимых\ символов<Tab>:set\ list!
menutrans Toggle\ Line\ &Wrap<Tab>:set\ wrap! &Перенос\ длинных\ строк<Tab>:set\ wrap!
menutrans Toggle\ W&rap\ at\ word<Tab>:set\ lbr! Перенос\ &целых\ слов<Tab>:set\ lbr!
menutrans Toggle\ &expand-tab<Tab>:set\ et! Про&белы\ вместо\ табуляции<Tab>:set\ et!
menutrans Toggle\ &auto-indent<Tab>:set\ ai! Автоматическое\ форматирование\ &отступов<Tab>:set\ ai!
menutrans Toggle\ &C-indenting<Tab>:set\ cin! Форматирование\ отступов\ в\ &стиле\ C<Tab>:set\ cin!
menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! &Нумерация\ строк<Tab>:set\ nu!
menutrans Toggle\ relati&ve\ Line\ Numbering<Tab>:set\ rnu! Относите&льная\ нумерация\ строк<Tab>:set\ nru!
menutrans Toggle\ &List\ Mode<Tab>:set\ list! Отобра&жение\ невидимых\ символов<Tab>:set\ list!
menutrans Toggle\ Line\ &Wrap<Tab>:set\ wrap! &Перенос\ длинных\ строк<Tab>:set\ wrap!
menutrans Toggle\ W&rap\ at\ word<Tab>:set\ lbr! Перенос\ &целых\ слов<Tab>:set\ lbr!
menutrans Toggle\ &expand-tab<Tab>:set\ et! Про&белы\ вместо\ табуляции<Tab>:set\ et!
menutrans Toggle\ &auto-indent<Tab>:set\ ai! Автоматическое\ форматирование\ &отступов<Tab>:set\ ai!
menutrans Toggle\ &C-indenting<Tab>:set\ cin! Форматирование\ отступов\ в\ &стиле\ C<Tab>:set\ cin!
">>>---
menutrans &Shiftwidth Вели&чина\ отступа
menutrans Soft\ &Tabstop Ширина\ &табуляции
menutrans Te&xt\ Width\.\.\. &Ширина\ текста\.\.\.
menutrans &File\ Format\.\.\. &Формат\ файла\.\.\.
menutrans &Shiftwidth Вели&чина\ отступа
menutrans Soft\ &Tabstop Ширина\ &табуляции
menutrans Te&xt\ Width\.\.\. &Ширина\ текста\.\.\.
menutrans &File\ Format\.\.\. &Формат\ файла\.\.\.
"
"
"
@@ -131,6 +139,7 @@ menutrans Jump\ &back<Tab>^T &Вернуться\ назад<Tab>^T
menutrans Build\ &Tags\ File Создать\ &файл\ меток
"-------------------
menutrans &Folding Работа\ со\ &складками
menutrans &Spelling Пр&авописание
menutrans &Diff &Отличия\ (diff)
"-------------------
menutrans &Make<Tab>:make Ко&мпиляция<Tab>:make
@@ -141,10 +150,26 @@ menutrans &Previous\ Error<Tab>:cp П&редыдущая\ ошибка<Tab>:cp
menutrans &Older\ List<Tab>:cold Более\ стар&ый\ список\ ошибок<Tab>:cold
menutrans N&ewer\ List<Tab>:cnew Более\ све&жий\ список\ ошибок<Tab>:cnew
menutrans Error\ &Window Ок&но\ ошибок
menutrans &Set\ Compiler Выбор\ &компилятора
menutrans Se&T\ Compiler Выбор\ &компилятора
"-------------------
menutrans &Convert\ to\ HEX<Tab>:%!xxd П&еревести\ в\ HEX<Tab>:%!xxd
menutrans Conve&rt\ back<Tab>:%!xxd\ -r Перевести\ и&з\ HEX<Tab>:%!xxd\ -r
">>>---------------- Tools/Spelling
menutrans &Spell\ Check\ On &Вкл\ проверку\ правописания
menutrans Spell\ Check\ &Off Вы&кл\ проверку\ правописания
menutrans To\ &Next\ error<Tab>]s &Следующая\ ошибка
menutrans To\ &Previous\ error<Tab>[s &Предыдущая\ ошибка
menutrans Suggest\ &Corrections<Tab>z= Предложить\ исп&равления
menutrans &Repeat\ correction<Tab>:spellrepall Пов&торить\ исправление\ для\ всех
"-------------------
menutrans Set\ language\ to\ "en" Установить\ язык\ "en"
menutrans Set\ language\ to\ "en_au" Установить\ язык\ "en_au"
menutrans Set\ language\ to\ "en_ca" Установить\ язык\ "en_ca"
menutrans Set\ language\ to\ "en_gb" Установить\ язык\ "en_gb"
menutrans Set\ language\ to\ "en_nz" Установить\ язык\ "en_nz"
menutrans Set\ language\ to\ "en_us" Установить\ язык\ "en_us"
menutrans &Find\ More\ Languages &Найти\ больше\ языков
let g:menutrans_set_lang_to = 'Установить язык'
">>>---------------- Folds
menutrans &Enable/Disable\ folds<Tab>zi Вкл/выкл\ &складки<Tab>zi
menutrans &View\ Cursor\ Line<Tab>zv Открыть\ строку\ с\ &курсором<Tab>zv
@@ -219,7 +244,7 @@ menutrans M&in\ Height<Tab>^W1_ Минимальная\ высо&та<Tab>^W1
menutrans Max\ &Width<Tab>^W\| Максимальная\ &ширина<Tab>^W\|
menutrans Min\ Widt&h<Tab>^W1\| Минимал&ьная\ ширина<Tab>^W1\|
">>>----------------- Window/Move To
menutrans &Top<Tab>^WK На&верх<Tab>^WK
menutrans &Top<Tab>^WK В&верх<Tab>^WK
menutrans &Bottom<Tab>^WJ В&низ<Tab>^WJ
menutrans &Left\ side<Tab>^WH В&лево<Tab>^WH
menutrans &Right\ side<Tab>^WL В&право<Tab>^WL

View File

@@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2013 May 20
" Last Change: 2013 Jun 29
" If there already is an option window, jump to that one.
if bufwinnr("option-window") > 0
@@ -1198,6 +1198,10 @@ call <SID>OptionL("ims")
if has("xim")
call append("$", "imcmdline\twhen set always use IM when starting to edit a command line")
call <SID>BinOptionG("imc", &imc)
call append("$", "imstatusfunc\tfunction to obtain IME status")
call <SID>OptionG("imsf", &imsf)
call append("$", "imactivatefunc\tfunction to enable/disable IME")
call <SID>OptionG("imaf", &imaf)
endif

View File

@@ -1,24 +1,37 @@
" Vim plugin for converting a syntax highlighted file to HTML.
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
" Last Change: 2012 Jul 12
" Last Change: 2013 Jun 26
"
" The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and
" $VIMRUNTIME/syntax/2html.vim
"
" TODO: {{{
" * Options for generating the CSS in external style sheets. New :TOcss
" command to convert the current color scheme into a (mostly) generic CSS
" stylesheet which can be re-used. Alternate stylesheet support? Good start
" by Erik Falor
" ( https://groups.google.com/d/topic/vim_use/7XTmC4D22dU/discussion ).
" * Add optional argument to :TOhtml command to specify mode (gui, cterm,
" term) to use for the styling. Suggestion by "nacitar".
" * Add way to override or specify which RGB colors map to the color numbers
" in cterm. Get better defaults than just guessing? Suggestion by "nacitar".
" * Disable filetype detection until after all processing is done.
" * Add option for not generating the hyperlink on stuff that looks like a
" URL? Or just color the link to fit with the colorscheme (and only special
" when hovering)?
" * Bug: Opera does not allow printing more than one page if uncopyable
" regions is turned on. Possible solution: Add normal text line numbers with
" display:none, set to display:inline for print style sheets, and hide
" <input> elements for print, to allow Opera printing multiple pages (and
" other uncopyable areas?). May need to make the new text invisible to IE
" with conditional comments to prevent copying it, IE for some reason likes
" to copy hidden text. Other browsers too?
" * Bug: still a 1px gap throughout the fold column when html_prevent_copy is
" "fn" in some browsers. Specifically, in Chromium on Ubuntu (but not Chrome
" on Windows). Perhaps it is font related?
" * Bug: still some gaps in the fold column when html_prevent_copy contains
" 'd' and showing the whole diff (observed in multiple browsers). Only gaps
" on diff lines though.
" * anchors on each line so you can do file.html#1234 to get to line 1234
" * add a modeline to the generated html to set nofoldenable or fdm=manual
" because syntax folding takes a terribly long time to work with the weird
" formatting the script does.
" * Options for generating the CSS in external style sheets. New :TOcss
" command to convert the current color scheme into a (mostly) generic CSS
" stylesheet which can be re-used. Alternate stylesheet support?
" * Undercurl support via CSS3, with fallback to dotted or something:
" https://groups.google.com/d/topic/vim_use/BzXA6He1pHg/discussion
" * Redo updates for modified default foldtext (v11) when/if the patch is
@@ -26,10 +39,7 @@
" * Test case +diff_one_file-dynamic_folds+expand_tabs-hover_unfold
" +ignore_conceal-ignore_folding+no_foldcolumn+no_pre+no_progress
" +number_lines-pre_wrap-use_css+use_xhtml+whole_filler.xhtml
" does not show the whole diff filler as it is supposed to.
" * Add option for not generating the hyperlink on stuff that looks like a
" URL? Or just color the link to fit with the colorscheme (and only special
" when hovering)?
" does not show the whole diff filler as it is supposed to?
" * Bug: when 'isprint' is wrong for the current encoding, will generate
" invalid content. Can/should anything be done about this? Maybe a separate
" plugin to correct 'isprint' based on encoding?
@@ -43,7 +53,6 @@
" - listchars support
" - full-line background highlight
" - other?
" * Explicitly trigger IE8+ Standards Mode? Doesn't seem necessary yet.
" * Make it so deleted lines in a diff don't create side-scrolling (get it
" free with full-line background highlight above).
" * Restore open/closed folds and cursor position after processing each file
@@ -58,82 +67,98 @@
if exists('g:loaded_2html_plugin')
finish
endif
let g:loaded_2html_plugin = 'vim7.3_v12'
let g:loaded_2html_plugin = 'vim7.3_v14'
"
" Changelog: {{{
"
" 7.3_v12 (this version): Fix modeline mangling to also work for when multiple
" highlight groups make up the start-of-modeline text.
" Improve render time of page with uncopyable regions
" by not using one-input-per-char. Change name of
" uncopyable option from html_unselectable to
" html_prevent_copy. Added html_no_invalid option and
" default to inserting invalid markup for uncopyable
" regions to prevent MS Word from pasting undeletable
" <input> elements. Fix 'cpo' handling (Thilo Six).
" 7.3_v12b1: Add html_unselectable option. Rework logic to
" eliminate post-processing substitute commands in
" favor of doing the work up front. Remove unnecessary
" special treatment of 'LineNr' highlight group. Minor
" speed improvements. Fix modeline mangling in
" generated output so it works for text in the first
" column. Fix missing line number and fold column in
" diff filler lines. Fix that some fonts have a 1px
" gap (using a dirty hack, improvements welcome). Add
" "colorscheme" meta tag. Does NOT include support for
" the new default foldtext added in v11, as the patch
" adding it has not yet been included in Vim.
" 7.3_v14 (this version): Allow suppressing line number anchors using
" g:html_line_ids=0. Allow customizing
" important IDs (like line IDs and fold IDs) using
" g:html_id_expr evalutated when the buffer conversion
" is started.
" 7.3_v13 (2eb30f341e8d): Keep foldmethod at manual in the generated file and
" insert modeline to set it to manual.
" Fix bug: diff mode with 2 unsaved buffers creates a
" duplicate of one buffer instead of including both.
" Add anchors to each line so you can put '#L123'
" or '#123' at the end of the URL to jump to line 123
" (idea by Andy Spencer). Add javascript to open folds
" to show the anchor being jumped to if it is hidden.
" Fix XML validation error: &nsbp; not part of XML.
" Allow TOhtml to chain together with other commands
" using |.
" 7.3_v12 (9910cbff5f16): Fix modeline mangling to also work for when multiple
" highlight groups make up the start-of-modeline text.
" Improve render time of page with uncopyable regions
" by not using one-input-per-char. Change name of
" uncopyable option from html_unselectable to
" html_prevent_copy. Added html_no_invalid option and
" default to inserting invalid markup for uncopyable
" regions to prevent MS Word from pasting undeletable
" <input> elements. Fix 'cpo' handling (Thilo Six).
" 7.3_v12b1: Add html_unselectable option. Rework logic to
" eliminate post-processing substitute commands in
" favor of doing the work up front. Remove unnecessary
" special treatment of 'LineNr' highlight group. Minor
" speed improvements. Fix modeline mangling in
" generated output so it works for text in the first
" column. Fix missing line number and fold column in
" diff filler lines. Fix that some fonts have a 1px
" gap (using a dirty hack, improvements welcome). Add
" "colorscheme" meta tag. Does NOT include support for
" the new default foldtext added in v11, as the patch
" adding it has not yet been included in Vim.
" 7.3_v11 ( unreleased ): Support new default foldtext from patch by Christian
" Brabandt in
" http://groups.google.com/d/topic/vim_dev/B6FSGfq9VoI/discussion.
" This patch has not yet been included in Vim, thus
" these changes are removed in the next version.
" Brabandt in
" http://groups.google.com/d/topic/vim_dev/B6FSGfq9VoI/discussion.
" This patch has not yet been included in Vim, thus
" these changes are removed in the next version.
" 7.3_v10 (fd09a9c8468e): Fix error E684 when converting a range wholly inside
" multiple nested folds with dynamic folding on.
" Also fix problem with foldtext in this situation.
" multiple nested folds with dynamic folding on.
" Also fix problem with foldtext in this situation.
" 7.3_v9 (0877b8d6370e): Add html_pre_wrap option active with html_use_css
" and without html_no_pre, default value same as
" 'wrap' option, (Andy Spencer). Don't use
" 'fileencoding' for converted document encoding if
" 'buftype' indicates a special buffer which isn't
" written.
" and without html_no_pre, default value same as
" 'wrap' option, (Andy Spencer). Don't use
" 'fileencoding' for converted document encoding if
" 'buftype' indicates a special buffer which isn't
" written.
" 7.3_v8 (85c5a72551e2): Add html_expand_tabs option to allow leaving tab
" characters in generated output (Andy Spencer).
" Escape text that looks like a modeline so Vim
" doesn't use anything in the converted HTML as a
" modeline. Bugfixes: Fix folding when a fold starts
" before the conversion range. Remove fold column when
" there are no folds.
" characters in generated output (Andy Spencer).
" Escape text that looks like a modeline so Vim
" doesn't use anything in the converted HTML as a
" modeline. Bugfixes: Fix folding when a fold starts
" before the conversion range. Remove fold column when
" there are no folds.
" 7.3_v7 (840c3cadb842): see betas released on vim_dev below:
" 7.3_v7b3: Fixed bug, convert Unicode to UTF-8 all the way.
" 7.3_v7b2: Remove automatic detection of encodings that are not
" supported by all major browsers according to
" http://wiki.whatwg.org/wiki/Web_Encodings and
" convert to UTF-8 for all Unicode encodings. Make
" HTML encoding to Vim encoding detection be
" case-insensitive for built-in pairs.
" 7.3_v7b1: Remove use of setwinvar() function which cannot be
" called in restricted mode (Andy Spencer). Use
" 'fencoding' instead of 'encoding' to determine by
" charset, and make sure the 'fenc' of the generated
" file matches its indicated charset. Add charsets for
" all of Vim's natively supported encodings.
" 7.3_v7b3: Fixed bug, convert Unicode to UTF-8 all the way.
" 7.3_v7b2: Remove automatic detection of encodings that are not
" supported by all major browsers according to
" http://wiki.whatwg.org/wiki/Web_Encodings and
" convert to UTF-8 for all Unicode encodings. Make
" HTML encoding to Vim encoding detection be
" case-insensitive for built-in pairs.
" 7.3_v7b1: Remove use of setwinvar() function which cannot be
" called in restricted mode (Andy Spencer). Use
" 'fencoding' instead of 'encoding' to determine by
" charset, and make sure the 'fenc' of the generated
" file matches its indicated charset. Add charsets for
" all of Vim's natively supported encodings.
" 7.3_v6 (0d3f0e3d289b): Really fix bug with 'nowrapscan', 'magic' and other
" user settings interfering with diff mode generation,
" trailing whitespace (e.g. line number column) when
" using html_no_pre, and bugs when using
" html_hover_unfold.
" user settings interfering with diff mode generation,
" trailing whitespace (e.g. line number column) when
" using html_no_pre, and bugs when using
" html_hover_unfold.
" 7.3_v5 ( unreleased ): Fix bug with 'nowrapscan' and also with out-of-sync
" folds in diff mode when first line was folded.
" folds in diff mode when first line was folded.
" 7.3_v4 (7e008c174cc3): Bugfixes, especially for xhtml markup, and diff mode
" 7.3_v3 (a29075150aee): Refactor option handling and make html_use_css
" default to true when not set to anything. Use strict
" doctypes where possible. Rename use_xhtml option to
" html_use_xhtml for consistency. Use .xhtml extension
" when using this option. Add meta tag for settings.
" default to true when not set to anything. Use strict
" doctypes where possible. Rename use_xhtml option to
" html_use_xhtml for consistency. Use .xhtml extension
" when using this option. Add meta tag for settings.
" 7.3_v2 (80229a724a11): Fix syntax highlighting in diff mode to use both the
" diff colors and the normal syntax colors
" diff colors and the normal syntax colors
" 7.3_v1 (e7751177126b): Add conceal support and meta tags in output
" Pre-v1 baseline: Mercurial changeset 3c9324c0800e
"}}}
@@ -143,7 +168,7 @@ let g:loaded_2html_plugin = 'vim7.3_v12'
" - this plugin was not already loaded
" - user commands are available. {{{
if !&cp && !exists(":TOhtml") && has("user_commands")
command -range=% TOhtml :call tohtml#Convert2HTML(<line1>, <line2>)
command -range=% -bar TOhtml :call tohtml#Convert2HTML(<line1>, <line2>)
endif "}}}
" Make sure any patches will probably use consistent indent

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types in scripts
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2012 Aug 30
" Last change: 2013 May 24
" 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
@@ -152,6 +152,10 @@ if s:line1 =~ "^#!"
elseif s:name =~ 'cfengine'
set ft=cfengine
" Erlang scripts
elseif s:name =~ 'escript'
set ft=erlang
endif
unlet s:name
@@ -327,6 +331,17 @@ else
elseif s:line1 =~ '^\(commit\|tree\|object\) \x\{40\}\>\|^tag \S\+$'
set ft=git
" Gprof (gnu profiler)
elseif s:line1 == 'Flat profile:'
\ && s:line2 == ''
\ && s:line3 =~ '^Each sample counts as .* seconds.$'
set ft=gprof
" Erlang terms
" (See also: http://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes.html#Choosing-Modes)
elseif s:line1 =~? '-\*-.*erlang.*-\*-'
set ft=erlang
" CVS diff
else
let s:lnum = 1

View File

@@ -2,7 +2,7 @@
" This file is normally sourced from menu.vim.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2010 Jul 26
" Last Change: 2013 Jun 24
" Define the SetSyn function, used for the Syntax menu entries.
" Set 'filetype' and also 'syntax' if it is manually selected.
@@ -243,6 +243,11 @@ an 50.50.360 &Syntax.HIJK.Informix\ 4GL :cal SetSyn("fgl")<CR>
an 50.50.370 &Syntax.HIJK.Initng :cal SetSyn("initng")<CR>
an 50.50.380 &Syntax.HIJK.Inittab :cal SetSyn("inittab")<CR>
an 50.50.390 &Syntax.HIJK.Inno\ setup :cal SetSyn("iss")<CR>
an 50.50.393 &Syntax.HIJK.Innovation\ Data\ Processing.Upstream\ dat :cal SetSyn ("upstreamdat")<CR>
an 50.50.394 &Syntax.HIJK.Innovation\ Data\ Processing.Upstream\ log :cal SetSyn ("upstreamlog")<CR>
an 50.50.395 &Syntax.HIJK.Innovation\ Data\ Processing.Upstream\ Install\ log :cal SetSyn ("upstreaminstalllog")<CR>
an 50.50.396 &Syntax.HIJK.Innovation\ Data\ Processing.Usserver\ log :cal SetSyn ("usserverlog")<CR>
an 50.50.397 &Syntax.HIJK.Innovation\ Data\ Processing.USW2KAgt\ log :cal SetSyn ("usw2kagtlog")<CR>
an 50.50.400 &Syntax.HIJK.InstallShield\ script :cal SetSyn("ishd")<CR>
an 50.50.410 &Syntax.HIJK.Interactive\ Data\ Lang :cal SetSyn("idlang")<CR>
an 50.50.420 &Syntax.HIJK.IPfilter :cal SetSyn("ipfilter")<CR>

View File

@@ -1,6 +1,6 @@
" Vim syntax support file
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
" Last Change: 2012 Jun 30
" Last Change: 2013 Jun 19
"
" Additional contributors:
"
@@ -214,17 +214,21 @@ endif
if !s:settings.use_css
" Return opening HTML tag for given highlight id
function! s:HtmlOpening(id)
function! s:HtmlOpening(id, extra_attrs)
let a = ""
if synIDattr(a:id, "inverse")
" For inverse, we always must set both colors (and exchange them)
let x = s:HtmlColor(synIDattr(a:id, "fg#", s:whatterm))
let a = a . '<span style="background-color: ' . ( x != "" ? x : s:fgc ) . '">'
let a = a . '<span '.a:extra_attrs.'style="background-color: ' . ( x != "" ? x : s:fgc ) . '">'
let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm))
let a = a . '<font color="' . ( x != "" ? x : s:bgc ) . '">'
else
let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm))
if x != "" | let a = a . '<span style="background-color: ' . x . '">' | endif
if x != ""
let a = a . '<span '.a:extra_attrs.'style="background-color: ' . x . '">'
elseif !empty(a:extra_attrs)
let a = a . '<span '.a:extra_attrs.'>'
endif
let x = s:HtmlColor(synIDattr(a:id, "fg#", s:whatterm))
if x != "" | let a = a . '<font color="' . x . '">' | endif
endif
@@ -235,7 +239,7 @@ if !s:settings.use_css
endfun
" Return closing HTML tag for given highlight id
function! s:HtmlClosing(id)
function! s:HtmlClosing(id, has_extra_attrs)
let a = ""
if synIDattr(a:id, "underline") | let a = a . "</u>" | endif
if synIDattr(a:id, "italic") | let a = a . "</i>" | endif
@@ -246,7 +250,7 @@ if !s:settings.use_css
let x = s:HtmlColor(synIDattr(a:id, "fg#", s:whatterm))
if x != "" | let a = a . '</font>' | endif
let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm))
if x != "" | let a = a . '</span>' | endif
if x != "" || a:has_extra_attrs | let a = a . '</span>' | endif
endif
return a
endfun
@@ -265,7 +269,7 @@ if s:settings.use_css
" first, get the style names we need
let wrapperfunc_lines = [
\ 'function! s:BuildStyleWrapper(style_id, diff_style_id, text, make_unselectable, unformatted)',
\ 'function! s:BuildStyleWrapper(style_id, diff_style_id, extra_attrs, text, make_unselectable, unformatted)',
\ '',
\ ' let l:style_name = synIDattr(a:style_id, "name", s:whatterm)'
\ ]
@@ -308,7 +312,7 @@ if s:settings.use_css
let wrapperfunc_lines += [
\ '',
\ ' if l:saved_style == ""'
\ ' if l:saved_style == "" && empty(a:extra_attrs)'
\ ]
if &diff
let wrapperfunc_lines += [
@@ -340,7 +344,7 @@ if s:settings.use_css
\ : "")
if s:settings.prevent_copy == ""
let wrapperfunc_lines += [
\ ' return "<span class=\"" . l:style_name .'.diffstyle.'"\">".a:text."</span>"'
\ ' return "<span ".a:extra_attrs."class=\"" . l:style_name .'.diffstyle.'"\">".a:text."</span>"'
\ ]
else
@@ -362,7 +366,7 @@ if s:settings.use_css
" uses the number of unique codepoints for its limit.
let wrapperfunc_lines += [
\ ' if a:make_unselectable',
\ ' return "<span class=\"" . l:style_name .'.diffstyle.'"\">'.
\ ' return "<span ".a:extra_attrs."class=\"" . l:style_name .'.diffstyle.'"\">'.
\ '<input'.s:unselInputType.' class=\"" . l:style_name .'.diffstyle.'"\"'.
\ ' value=\"".substitute(a:unformatted,''\s\+$'',"","")."\"'.
\ ' onselect=''this.blur(); return false;'''.
@@ -372,17 +376,9 @@ if s:settings.use_css
\ ' size=\"".strwidth(a:unformatted)."\"'.
\ (s:settings.use_xhtml ? '/' : '').'></span>"',
\ ' else',
\ ' return "<span class=\"" . l:style_name .'. diffstyle .'"\">".a:text."</span>"'
\ ' return "<span ".a:extra_attrs."class=\"" . l:style_name .'. diffstyle .'"\">".a:text."</span>"'
\ ]
endif
" close off tag for non-empty primary style
if s:settings.prevent_copy == ""
let wrapperfunc_lines[-1] .=
\ ' "\">".a:text."</span>"'
else
let wrapperfunc_lines[-1] .=
\ ' "\">".a:text."</span>"'
endif
let wrapperfunc_lines += [
\ ' endif',
\ 'endfun'
@@ -394,16 +390,16 @@ else
" no styles exist.
if &diff
let wrapperfunc_lines = [
\ 'function! s:BuildStyleWrapper(style_id, diff_style_id, text, unusedarg, unusedarg2)',
\ ' return s:HtmlOpening(a:style_id).(a:diff_style_id <= 0 ? "" :'.
\ 's:HtmlOpening(a:diff_style_id)).a:text.'.
\ '(a:diff_style_id <= 0 ? "" : s:HtmlClosing(a:diff_style_id)).s:HtmlClosing(a:style_id)',
\ 'function! s:BuildStyleWrapper(style_id, diff_style_id, extra_attrs, text, unusedarg, unusedarg2)',
\ ' return s:HtmlOpening(a:style_id, a:extra_attrs).(a:diff_style_id <= 0 ? "" :'.
\ 's:HtmlOpening(a:diff_style_id, "")).a:text.'.
\ '(a:diff_style_id <= 0 ? "" : s:HtmlClosing(a:diff_style_id, 0)).s:HtmlClosing(a:style_id, !empty(a:extra_attrs))',
\ 'endfun'
\ ]
else
let wrapperfunc_lines = [
\ 'function! s:BuildStyleWrapper(style_id, diff_style_id, text, unusedarg, unusedarg2)',
\ ' return s:HtmlOpening(a:style_id).a:text.s:HtmlClosing(a:style_id)',
\ 'function! s:BuildStyleWrapper(style_id, diff_style_id, extra_attrs, text, unusedarg, unusedarg2)',
\ ' return s:HtmlOpening(a:style_id, a:extra_attrs).a:text.s:HtmlClosing(a:style_id, !empty(a:extra_attrs))',
\ 'endfun'
\ ]
endif
@@ -418,7 +414,7 @@ let s:diff_mode = &diff
" unprintable characters expanded and double spaces replaced as necessary.
"
" TODO: eliminate unneeded logic like done for BuildStyleWrapper
function! s:HtmlFormat(text, style_id, diff_style_id, make_unselectable)
function! s:HtmlFormat(text, style_id, diff_style_id, extra_attrs, make_unselectable)
" Replace unprintable characters
let unformatted = strtrans(a:text)
@@ -447,27 +443,57 @@ function! s:HtmlFormat(text, style_id, diff_style_id, make_unselectable)
endif
" Enclose in the correct format
return s:BuildStyleWrapper(a:style_id, a:diff_style_id, formatted, a:make_unselectable, unformatted)
return s:BuildStyleWrapper(a:style_id, a:diff_style_id, a:extra_attrs, formatted, a:make_unselectable, unformatted)
endfun
" set up functions to call HtmlFormat in certain ways based on whether the
" element is supposed to be unselectable or not
if s:settings.prevent_copy =~# 'n'
function! s:HtmlFormat_n(text, style_id, diff_style_id)
return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 1)
endfun
if s:settings.number_lines
if s:settings.line_ids
function! s:HtmlFormat_n(text, style_id, diff_style_id, lnr)
if a:lnr > 0
return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 'id="'.(exists('g:html_diff_win_num') ? 'W'.g:html_diff_win_num : "").'L'.a:lnr.s:settings.id_suffix.'" ', 1)
else
return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 1)
endif
endfun
else
function! s:HtmlFormat_n(text, style_id, diff_style_id, lnr)
return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 1)
endfun
endif
elseif s:settings.line_ids
" if lines are not being numbered the only reason this function gets called
" is to put the line IDs on each line; "text" will be emtpy but lnr will
" always be non-zero, however we don't want to use the <input> because that
" won't work as nice for empty text
function! s:HtmlFormat_n(text, style_id, diff_style_id, lnr)
return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 'id="'.(exists('g:html_diff_win_num') ? 'W'.g:html_diff_win_num : "").'L'.a:lnr.s:settings.id_suffix.'" ', 0)
endfun
endif
else
function! s:HtmlFormat_n(text, style_id, diff_style_id)
return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 0)
endfun
if s:settings.line_ids
function! s:HtmlFormat_n(text, style_id, diff_style_id, lnr)
if a:lnr > 0
return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 'id="'.(exists('g:html_diff_win_num') ? 'W'.g:html_diff_win_num : "").'L'.a:lnr.s:settings.id_suffix.'" ', 0)
else
return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 0)
endif
endfun
else
function! s:HtmlFormat_n(text, style_id, diff_style_id, lnr)
return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 0)
endfun
endif
endif
if s:settings.prevent_copy =~# 'd'
function! s:HtmlFormat_d(text, style_id, diff_style_id)
return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 1)
return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 1)
endfun
else
function! s:HtmlFormat_d(text, style_id, diff_style_id)
return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 0)
return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 0)
endfun
endif
if s:settings.prevent_copy =~# 'f'
@@ -501,7 +527,7 @@ else
\ "</a>"
endfun
function! s:FoldColumn_fill()
return s:HtmlFormat(repeat(' ', s:foldcolumn), s:FOLD_C_ID, 0, 0)
return s:HtmlFormat(repeat(' ', s:foldcolumn), s:FOLD_C_ID, 0, "", 0)
endfun
endif
if s:settings.prevent_copy =~# 't'
@@ -512,17 +538,17 @@ if s:settings.prevent_copy =~# 't'
" substitute later?
if s:settings.dynamic_folds
function! s:HtmlFormat_t(text, style_id, diff_style_id)
return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 1) .
\ s:HtmlFormat("", a:style_id, 0, 0)
return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 1) .
\ s:HtmlFormat("", a:style_id, 0, "", 0)
endfun
else
function! s:HtmlFormat_t(text, style_id, diff_style_id)
return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 1)
return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 1)
endfun
endif
else
function! s:HtmlFormat_t(text, style_id, diff_style_id)
return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 0)
return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 0)
endfun
endif
@@ -607,7 +633,11 @@ endif
let s:orgbufnr = winbufnr(0)
let s:origwin_stl = &l:stl
if expand("%") == ""
exec 'new Untitled.'.(s:settings.use_xhtml ? 'x' : '').'html'
if exists('g:html_diff_win_num')
exec 'new Untitled_win'.g:html_diff_win_num.'.'.(s:settings.use_xhtml ? 'x' : '').'html'
else
exec 'new Untitled.'.(s:settings.use_xhtml ? 'x' : '').'html'
endif
else
exec 'new %.'.(s:settings.use_xhtml ? 'x' : '').'html'
endif
@@ -625,7 +655,6 @@ setlocal winfixheight
let s:newwin_stl = &l:stl
" on the new window, set the least time-consuming fold method
let s:old_fdm = &foldmethod
let s:old_fen = &foldenable
setlocal foldmethod=manual
setlocal nofoldenable
@@ -671,7 +700,7 @@ let s:LeadingSpace = ' '
let s:HtmlEndline = ''
if s:settings.no_pre
let s:HtmlEndline = '<br' . s:tag_close
let s:LeadingSpace = '&nbsp;'
let s:LeadingSpace = s:settings.use_xhtml ? '&#160;' : '&nbsp;'
let s:HtmlSpace = '\' . s:LeadingSpace
endif
@@ -774,13 +803,12 @@ if s:settings.use_css
endif
endif
" insert script tag if any javascript is needed
if s:settings.dynamic_folds || s:settings.prevent_copy != ""
call extend(s:lines, [
\ "",
\ "<script type='text/javascript'>",
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
endif
" insert script tag; javascript is always needed for the line number
" normalization for URL hashes
call extend(s:lines, [
\ "",
\ "<script type='text/javascript'>",
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
" insert javascript to toggle folds open and closed
if s:settings.dynamic_folds
@@ -799,7 +827,54 @@ if s:settings.dynamic_folds
\ " fold.className = 'closed-fold';",
\ " }",
\ "}"
\])
\ ])
endif
if s:settings.line_ids
" insert javascript to get IDs from line numbers, and to open a fold before
" jumping to any lines contained therein
call extend(s:lines, [
\ "",
\ "/* function to open any folds containing a jumped-to line before jumping to it */",
\ "function JumpToLine()",
\ "{",
\ " var lineNum;",
\ " lineNum = window.location.hash;",
\ " lineNum = lineNum.substr(1); /* strip off '#' */",
\ "",
\ " if (lineNum.indexOf('L') == -1) {",
\ " lineNum = 'L'+lineNum;",
\ " }",
\ " lineElem = document.getElementById(lineNum);"
\ ])
if s:settings.dynamic_folds
call extend(s:lines, [
\ "",
\ " /* navigate upwards in the DOM tree to open all folds containing the line */",
\ " var node = lineElem;",
\ " while (node && node.id != 'vimCodeElement".s:settings.id_suffix."')",
\ " {",
\ " if (node.className == 'closed-fold')",
\ " {",
\ " node.className = 'open-fold';",
\ " }",
\ " node = node.parentNode;",
\ " }",
\ ])
endif
call extend(s:lines, [
\ " /* Always jump to new location even if the line was hidden inside a fold, or",
\ " * we corrected the raw number to a line ID.",
\ " */",
\ " if (lineElem) {",
\ " lineElem.scrollIntoView(true);",
\ " }",
\ " return true;",
\ "}",
\ "if ('onhashchange' in window) {",
\ " window.onhashchange = JumpToLine;",
\ "}"
\ ])
endif
" Small text columns like the foldcolumn and line number column need a weird
@@ -853,42 +928,40 @@ if !empty(s:settings.prevent_copy)
\ ' var emWidth = document.getElementById("oneEmWidth").clientWidth;',
\ ' if (inputWidth > goodWidth) {',
\ ' while (ratio < 100*goodWidth/emWidth && ratio < 100) {',
\ ' ratio += 5;',
\ ' }',
\ ' document.getElementById("vimCodeElement").className = "em"+ratio;',
\ ' ratio += 5;',
\ ' }',
\ ' document.getElementById("vimCodeElement'.s:settings.id_suffix.'").className = "em"+ratio;',
\ ' }',
\ '}'
\ ])
endif
" insert script closing tag if any javascript is needed
if s:settings.dynamic_folds || s:settings.prevent_copy != ""
call extend(s:lines, [
\ '',
\ s:settings.use_xhtml ? '//]]>' : '-->',
\ "</script>"
\ ])
endif
" insert script closing tag
call extend(s:lines, [
\ '',
\ s:settings.use_xhtml ? '//]]>' : '-->',
\ "</script>"
\ ])
call extend(s:lines, ["</head>"])
if !empty(s:settings.prevent_copy)
call extend(s:lines,
\ ["<body onload='FixCharWidth();'>",
\ ["<body onload='FixCharWidth();".(s:settings.line_ids ? " JumpToLine();" : "")."'>",
\ "<!-- hidden divs used by javascript to get the width of a char -->",
\ "<div id='oneCharWidth'>0</div>",
\ "<div id='oneInputWidth'><input size='1' value='0'".s:tag_close."</div>",
\ "<div id='oneEmWidth' style='width: 1em;'></div>"
\ ])
else
call extend(s:lines, ["<body>"])
call extend(s:lines, ["<body".(s:settings.line_ids ? " onload='JumpToLine();'" : "").">"])
endif
if s:settings.no_pre
" if we're not using CSS we use a font tag which can't have a div inside
if s:settings.use_css
call extend(s:lines, ["<div id='vimCodeElement'>"])
call extend(s:lines, ["<div id='vimCodeElement".s:settings.id_suffix."'>"])
endif
else
call extend(s:lines, ["<pre id='vimCodeElement'>"])
call extend(s:lines, ["<pre id='vimCodeElement".s:settings.id_suffix."'>"])
endif
exe s:orgwin . "wincmd w"
@@ -1242,7 +1315,7 @@ while s:lnum <= s:end
if s:settings.number_lines
" Indent if line numbering is on. Indent gets style of line number
" column.
let s:new = s:HtmlFormat_n(repeat(' ', s:margin), s:LINENR_ID, 0) . s:new
let s:new = s:HtmlFormat_n(repeat(' ', s:margin), s:LINENR_ID, 0, 0) . s:new
endif
if s:settings.dynamic_folds && !s:settings.no_foldcolumn && s:foldcolumn > 0
" Indent for foldcolumn if there is one. Assume it's empty, there should
@@ -1274,7 +1347,7 @@ while s:lnum <= s:end
endif
" put numcol in a separate group for sake of unselectable text
let s:new = (s:settings.number_lines ? s:HtmlFormat_n(s:numcol, s:FOLDED_ID, 0): "") . s:HtmlFormat_t(s:new, s:FOLDED_ID, 0)
let s:new = (s:settings.number_lines ? s:HtmlFormat_n(s:numcol, s:FOLDED_ID, 0, s:lnum): "") . s:HtmlFormat_t(s:new, s:FOLDED_ID, 0)
" Skip to the end of the fold
let s:new_lnum = foldclosedend(s:lnum)
@@ -1305,7 +1378,7 @@ while s:lnum <= s:end
let s:foldId = s:foldId + 1
let s:new .= "<span id='"
let s:new .= (exists('g:html_diff_win_num') ? "win".g:html_diff_win_num : "")
let s:new .= "fold".s:foldId."' class='".s:allfolds[0].type."'>"
let s:new .= "fold".s:foldId.s:settings.id_suffix."' class='".s:allfolds[0].type."'>"
" Unless disabled, add a fold column for the opening line of a fold.
@@ -1317,19 +1390,19 @@ while s:lnum <= s:end
" add fold column that can open the new fold
if s:allfolds[0].level > 1 && s:firstfold
let s:new = s:new . s:FoldColumn_build('|', s:allfolds[0].level - 1, 0, "",
\ 'toggle-open FoldColumn','javascript:toggleFold("fold'.s:foldstack[0].id.'");')
\ 'toggle-open FoldColumn','javascript:toggleFold("fold'.s:foldstack[0].id.s:settings.id_suffix.'");')
endif
" add the filler spaces separately from the '+' char so that it can be
" shown/hidden separately during a hover unfold
let s:new = s:new . s:FoldColumn_build("+", 1, 0, "",
\ 'toggle-open FoldColumn', 'javascript:toggleFold("fold'.s:foldId.'");')
\ 'toggle-open FoldColumn', 'javascript:toggleFold("fold'.s:foldId.s:settings.id_suffix.'");')
" If this is not the last fold we're opening on this line, we need
" to keep the filler spaces hidden if the fold is opened by mouse
" hover. If it is the last fold to open in the line, we shouldn't hide
" them, so don't apply the toggle-filler class.
let s:new = s:new . s:FoldColumn_build(" ", 1, s:foldcolumn - s:allfolds[0].level - 1, "",
\ 'toggle-open FoldColumn'. (get(s:allfolds, 1, {'firstline': 0}).firstline == s:lnum ?" toggle-filler" :""),
\ 'javascript:toggleFold("fold'.s:foldId.'");')
\ 'javascript:toggleFold("fold'.s:foldId.s:settings.id_suffix.'");')
" add fold column that can close the new fold
" only add extra blank space if we aren't opening another fold on the
@@ -1343,11 +1416,11 @@ while s:lnum <= s:end
" the first fold in a line has '|' characters from folds opened in
" previous lines, before the '-' for this fold
let s:new .= s:FoldColumn_build('|', s:allfolds[0].level - 1, s:extra_space, '-',
\ 'toggle-closed FoldColumn', 'javascript:toggleFold("fold'.s:foldId.'");')
\ 'toggle-closed FoldColumn', 'javascript:toggleFold("fold'.s:foldId.s:settings.id_suffix.'");')
else
" any subsequent folds in the line only add a single '-'
let s:new = s:new . s:FoldColumn_build("-", 1, s:extra_space, "",
\ 'toggle-closed FoldColumn', 'javascript:toggleFold("fold'.s:foldId.'");')
\ 'toggle-closed FoldColumn', 'javascript:toggleFold("fold'.s:foldId.s:settings.id_suffix.'");')
endif
let s:firstfold = 0
endif
@@ -1355,7 +1428,7 @@ while s:lnum <= s:end
" Add fold text, moving the span ending to the next line so collapsing
" of folds works correctly.
" Put numcol in a separate group for sake of unselectable text.
let s:new = s:new . (s:settings.number_lines ? s:HtmlFormat_n(s:numcol, s:FOLDED_ID, 0) : "") . substitute(s:HtmlFormat_t(foldtextresult(s:lnum), s:FOLDED_ID, 0), '</span>', s:HtmlEndline.'\n\0', '')
let s:new = s:new . (s:settings.number_lines ? s:HtmlFormat_n(s:numcol, s:FOLDED_ID, 0, 0) : "") . substitute(s:HtmlFormat_t(foldtextresult(s:lnum), s:FOLDED_ID, 0), '</span>', s:HtmlEndline.'\n\0', '')
let s:new = s:new . "<span class='fulltext'>"
" open the fold now that we have the fold text to allow retrieval of
@@ -1381,7 +1454,7 @@ while s:lnum <= s:end
" add the fold column for folds not on the opening line
if get(s:foldstack, 0).firstline < s:lnum
let s:new = s:new . s:FoldColumn_build('|', s:foldstack[0].level, s:foldcolumn - s:foldstack[0].level, "",
\ 'FoldColumn', 'javascript:toggleFold("fold'.s:foldstack[0].id.'");')
\ 'FoldColumn', 'javascript:toggleFold("fold'.s:foldstack[0].id.s:settings.id_suffix.'");')
endif
endif
endif
@@ -1389,7 +1462,9 @@ while s:lnum <= s:end
" Now continue with the unfolded line text
if s:settings.number_lines
let s:new = s:new . s:HtmlFormat_n(s:numcol, s:LINENR_ID, 0)
let s:new = s:new . s:HtmlFormat_n(s:numcol, s:LINENR_ID, 0, s:lnum)
elseif s:settings.line_ids
let s:new = s:new . s:HtmlFormat_n("", s:LINENR_ID, 0, s:lnum)
endif
" Get the diff attribute, if any.
@@ -1479,7 +1554,7 @@ while s:lnum <= s:end
" Output the text with the same synID, with class set to the highlight ID
" name, unless it has been concealed completely.
if strlen(s:expandedtab) > 0
let s:new = s:new . s:HtmlFormat(s:expandedtab, s:id, s:diff_id, 0)
let s:new = s:new . s:HtmlFormat(s:expandedtab, s:id, s:diff_id, "", 0)
endif
endwhile
endif
@@ -1531,6 +1606,11 @@ unlet s:lines
" stripped from the final output.
%s!\v(%(^|\s+)%(vim?|ex)):!\1\&#0058;!ge
" The generated HTML is admittedly ugly and takes a LONG time to fold.
" Make sure the user doesn't do syntax folding when loading a generated file,
" using a modeline.
call append(line('$'), "<!-- vim: set foldmethod=manual : -->")
" Now, when we finally know which, we define the colors and styles
if s:settings.use_css
1;/<style type="text/+1
@@ -1616,7 +1696,7 @@ if s:settings.use_css
endif
endif
else
execute '%s:<body>:<body bgcolor="' . s:bgc . '" text="' . s:fgc . '">\r<font face="'. s:htmlfont .'">'
execute '%s:<body\([^>]*\):<body bgcolor="' . s:bgc . '" text="' . s:fgc . '"\1>\r<font face="'. s:htmlfont .'"'
endif
" Gather attributes for all other classes. Do diff first so that normal
@@ -1652,8 +1732,10 @@ endif
%s:\s\+$::e
" Restore old settings (new window first)
"
" Don't bother restoring foldmethod in case it was syntax because the markup is
" so weirdly formatted it can take a LONG time.
let &l:foldenable = s:old_fen
let &l:foldmethod = s:old_fdm
let &report = s:old_report
let &title = s:old_title
let &icon = s:old_icon
@@ -1684,7 +1766,7 @@ let &ls=s:ls
" Save a little bit of memory (worth doing?)
unlet s:htmlfont s:whitespace
unlet s:old_et s:old_paste s:old_icon s:old_report s:old_title s:old_search
unlet s:old_magic s:old_more s:old_fdm s:old_fen s:old_winheight
unlet s:old_magic s:old_more s:old_fen s:old_winheight
unlet! s:old_isprint
unlet s:whatterm s:stylelist s:diffstylelist s:lnum s:end s:margin s:fgc s:bgc s:old_winfixheight
unlet! s:col s:id s:attr s:len s:line s:new s:expandedtab s:concealinfo s:diff_mode

View File

@@ -2,7 +2,7 @@
" Language: SAP - ABAP/R4
" Revision: 2.1
" Maintainer: Marius Piedallu van Wyk <lailoken@gmail.com>
" Last Change: 2012 Oct 23
" Last Change: 2013 Jun 13
" Comment: Thanks to EPI-USE Labs for all your assistance. :)
" For version < 6.0: Clear all syntax items
@@ -140,7 +140,7 @@ syn keyword abapStatement CHANGING EXCEPTION EXCEPTIONS DEFAULT CHECKBOX COMMENT
syn keyword abapStatement ID NUMBER FOR TITLE OUTPUT
" Special ABAP specific tables:
syn match abapSpecialTables "\<\(sy\|\(p\|pa\)\d\d\d\d\|t\d\d\d.\|innnn\)-"me=e-1 contained
syn match abapSpecialTables "\<\(sy\|\(hrp\|p\|pa\)\d\d\d\d\|t\d\d\d.\|innnn\)-"me=e-1 contained
syn match abapStructure "\<\w\+-[^\>]"me=e-2 contains=abapSpecialTables,abapStatement,abapComplexStatement
syn match abapField "-\w\+"ms=s+1

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2013 Mar 13
" Last Change: 2013 Jun 06
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -21,7 +21,7 @@ syn keyword cTodo contained TODO FIXME XXX
" It's easy to accidentally add a space after a backslash that was intended
" for line continuation. Some compilers allow it, which makes it
" unpredicatable and should be avoided.
" unpredictable and should be avoided.
syn match cBadContinuation contained "\\\s\+$"
" cCommentGroup allows adding matches for special things in comments
@@ -341,12 +341,12 @@ syn region cPreCondit start="^\s*\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip
syn match cPreConditMatch display "^\s*\(%:\|#\)\s*\(else\|endif\)\>"
if !exists("c_no_if0")
syn cluster cCppOutInGroup contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip
syn region cCppOutWrapper start="^\s*\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse fold
syn region cCppOutWrapper start="^\s*\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold
syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
if !exists("c_no_if0_fold")
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip fold
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold
else
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
endif
syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
syn region cCppInWrapper start="^\s*\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold
@@ -356,7 +356,7 @@ if !exists("c_no_if0")
else
syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
endif
syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip
syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
syn region cCppOutSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip
syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc
endif

View File

@@ -2,8 +2,7 @@
" Language: Clean
" Author: Pieter van Engelen <pietere@sci.kun.nl>
" Co-Author: Arthur van Leeuwen <arthurvl@sci.kun.nl>
" Previous Change: 2011 Dec 25 by Thilo Six
" Last Change: 2013 Apr 25 by Jurriën Stutterheim
" Last Change: 2013 Jun 19 by Jurriën Stutterheim
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -19,7 +18,6 @@ set cpo&vim
" Some Clean-keywords
syn keyword cleanConditional if case
syn keyword cleanLabel let! with where in of
syn keyword cleanInclude from import qualified
syn keyword cleanSpecial Start
syn keyword cleanKeyword infixl infixr infix
syn keyword cleanBasicType Int Real Char Bool String
@@ -27,6 +25,10 @@ syn keyword cleanSpecialType World ProcId Void Files File
syn keyword cleanModuleSystem module implementation definition system
syn keyword cleanTypeClass class instance export
" Import highlighting
syn region cleanIncludeRegion start="^\s*\(from\|import\|\s\+\(as\|qualified\)\)" end="\n" contains=cleanIncludeKeyword keepend
syn keyword cleanIncludeKeyword contained from import as qualified
" To do some Denotation Highlighting
syn keyword cleanBoolDenot True False
syn region cleanStringDenot start=+"+ end=+"+
@@ -75,7 +77,7 @@ if version >= 508 || !exists("did_clean_syntax_init")
HiLink cleanLabel Label
HiLink cleanKeyword Keyword
" Generic Preprocessing
HiLink cleanInclude Include
HiLink cleanIncludeKeyword Include
HiLink cleanModuleSystem PreProc
" Type
HiLink cleanBasicType Type

View File

@@ -2,7 +2,7 @@
" Language: Cucumber
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Filenames: *.feature
" Last Change: 2012 Apr 30
" Last Change: 2013 May 30
if exists("b:current_syntax")
finish
@@ -14,50 +14,60 @@ syn case match
syn sync minlines=20
let g:cucumber_languages = {
\"en": {"and": "And\\>", "background": "Background\\>", "but": "But\\>", "examples": "Scenarios\\>\\|Examples\\>", "feature": "Feature\\>", "given": "Given\\>", "scenario": "Scenario\\>", "scenario_outline": "Scenario Outline\\>", "then": "Then\\>", "when": "When\\>"},
\"en": {"and": "And\\>", "background": "Background\\>", "but": "But\\>", "examples": "Scenarios\\>\\|Examples\\>", "feature": "Business Need\\>\\|Feature\\>\\|Ability\\>", "given": "Given\\>", "scenario": "Scenario\\>", "scenario_outline": "Scenario Template\\>\\|Scenario Outline\\>", "then": "Then\\>", "when": "When\\>"},
\"ar": {"and": "\\%u0648\\>", "background": "\\%u0627\\%u0644\\%u062e\\%u0644\\%u0641\\%u064a\\%u0629\\>", "but": "\\%u0644\\%u0643\\%u0646\\>", "examples": "\\%u0627\\%u0645\\%u062b\\%u0644\\%u0629\\>", "feature": "\\%u062e\\%u0627\\%u0635\\%u064a\\%u0629\\>", "given": "\\%u0628\\%u0641\\%u0631\\%u0636\\>", "scenario": "\\%u0633\\%u064a\\%u0646\\%u0627\\%u0631\\%u064a\\%u0648\\>", "scenario_outline": "\\%u0633\\%u064a\\%u0646\\%u0627\\%u0631\\%u064a\\%u0648 \\%u0645\\%u062e\\%u0637\\%u0637\\>", "then": "\\%u0627\\%u0630\\%u0627\\%u064b\\>\\|\\%u062b\\%u0645\\>", "when": "\\%u0639\\%u0646\\%u062f\\%u0645\\%u0627\\>\\|\\%u0645\\%u062a\\%u0649\\>"},
\"bg": {"and": "\\%u0418\\>", "background": "\\%u041f\\%u0440\\%u0435\\%u0434\\%u0438\\%u0441\\%u0442\\%u043e\\%u0440\\%u0438\\%u044f\\>", "but": "\\%u041d\\%u043e\\>", "examples": "\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\%u0438\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\%u043d\\%u043e\\%u0441\\%u0442\\>", "given": "\\%u0414\\%u0430\\%u0434\\%u0435\\%u043d\\%u043e\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "scenario_outline": "\\%u0420\\%u0430\\%u043c\\%u043a\\%u0430 \\%u043d\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "then": "\\%u0422\\%u043e\\>", "when": "\\%u041a\\%u043e\\%u0433\\%u0430\\%u0442\\%u043e\\>"},
\"bm": {"and": "Dan\\>", "background": "Latar Belakang\\>", "but": "Tetapi\\>", "examples": "Contoh \\>", "feature": "Fungsi\\>", "given": "Bagi\\>", "scenario": "Senario\\>", "scenario_outline": "Menggariskan Senario \\>", "then": "Kemudian\\>", "when": "Apabila\\>"},
\"ca": {"and": "I\\>", "background": "Antecedents\\>\\|Rerefons\\>", "but": "Per\\%u00f2\\>", "examples": "Exemples\\>", "feature": "Caracter\\%u00edstica\\>\\|Funcionalitat\\>", "given": "At\\%u00e8s\\>\\|Donada\\>\\|Donat\\>\\|Atesa\\>", "scenario": "Escenari\\>", "scenario_outline": "Esquema de l'escenari\\>", "then": "Aleshores\\>\\|Cal\\>", "when": "Quan\\>"},
\"cs": {"and": "A tak\\%u00e9\\>\\|A\\>", "background": "Pozad\\%u00ed\\>\\|Kontext\\>", "but": "Ale\\>", "examples": "P\\%u0159\\%u00edklady\\>", "feature": "Po\\%u017eadavek\\>", "given": "Pokud\\>", "scenario": "Sc\\%u00e9n\\%u00e1\\%u0159\\>", "scenario_outline": "N\\%u00e1\\%u010drt Sc\\%u00e9n\\%u00e1\\%u0159e\\>\\|Osnova sc\\%u00e9n\\%u00e1\\%u0159e\\>", "then": "Pak\\>", "when": "Kdy\\%u017e\\>"},
\"cs": {"and": "A tak\\%u00e9\\>\\|A\\>", "background": "Pozad\\%u00ed\\>\\|Kontext\\>", "but": "Ale\\>", "examples": "P\\%u0159\\%u00edklady\\>", "feature": "Po\\%u017eadavek\\>", "given": "Za p\\%u0159edpokladu\\>\\|Pokud\\>", "scenario": "Sc\\%u00e9n\\%u00e1\\%u0159\\>", "scenario_outline": "N\\%u00e1\\%u010drt Sc\\%u00e9n\\%u00e1\\%u0159e\\>\\|Osnova sc\\%u00e9n\\%u00e1\\%u0159e\\>", "then": "Pak\\>", "when": "Kdy\\%u017e\\>"},
\"cy-GB": {"and": "A\\>", "background": "Cefndir\\>", "but": "Ond\\>", "examples": "Enghreifftiau\\>", "feature": "Arwedd\\>", "given": "Anrhegedig a\\>", "scenario": "Scenario\\>", "scenario_outline": "Scenario Amlinellol\\>", "then": "Yna\\>", "when": "Pryd\\>"},
\"da": {"and": "Og\\>", "background": "Baggrund\\>", "but": "Men\\>", "examples": "Eksempler\\>", "feature": "Egenskab\\>", "given": "Givet\\>", "scenario": "Scenarie\\>", "scenario_outline": "Abstrakt Scenario\\>", "then": "S\\%u00e5\\>", "when": "N\\%u00e5r\\>"},
\"de": {"and": "Und\\>", "background": "Grundlage\\>", "but": "Aber\\>", "examples": "Beispiele\\>", "feature": "Funktionalit\\%u00e4t\\>", "given": "Gegeben sei\\>\\|Angenommen\\>", "scenario": "Szenario\\>", "scenario_outline": "Szenariogrundriss\\>", "then": "Dann\\>", "when": "Wenn\\>"},
\"el": {"and": "\\%u039a\\%u03b1\\%u03b9\\>", "background": "\\%u03a5\\%u03c0\\%u03cc\\%u03b2\\%u03b1\\%u03b8\\%u03c1\\%u03bf\\>", "but": "\\%u0391\\%u03bb\\%u03bb\\%u03ac\\>", "examples": "\\%u03a0\\%u03b1\\%u03c1\\%u03b1\\%u03b4\\%u03b5\\%u03af\\%u03b3\\%u03bc\\%u03b1\\%u03c4\\%u03b1\\>\\|\\%u03a3\\%u03b5\\%u03bd\\%u03ac\\%u03c1\\%u03b9\\%u03b1\\>", "feature": "\\%u0394\\%u03c5\\%u03bd\\%u03b1\\%u03c4\\%u03cc\\%u03c4\\%u03b7\\%u03c4\\%u03b1\\>\\|\\%u039b\\%u03b5\\%u03b9\\%u03c4\\%u03bf\\%u03c5\\%u03c1\\%u03b3\\%u03af\\%u03b1\\>", "given": "\\%u0394\\%u03b5\\%u03b4\\%u03bf\\%u03bc\\%u03ad\\%u03bd\\%u03bf\\%u03c5 \\%u03cc\\%u03c4\\%u03b9\\>\\|\\%u0394\\%u03b5\\%u03b4\\%u03bf\\%u03bc\\%u03ad\\%u03bd\\%u03bf\\%u03c5\\>", "scenario": "\\%u03a3\\%u03b5\\%u03bd\\%u03ac\\%u03c1\\%u03b9\\%u03bf\\>", "scenario_outline": "\\%u03a0\\%u03b5\\%u03c1\\%u03b9\\%u03b3\\%u03c1\\%u03b1\\%u03c6\\%u03ae \\%u03a3\\%u03b5\\%u03bd\\%u03b1\\%u03c1\\%u03af\\%u03bf\\%u03c5\\>", "then": "\\%u03a4\\%u03cc\\%u03c4\\%u03b5\\>", "when": "\\%u038c\\%u03c4\\%u03b1\\%u03bd\\>"},
\"en-Scouse": {"and": "An\\>", "background": "Dis is what went down\\>", "but": "Buh\\>", "examples": "Examples\\>", "feature": "Feature\\>", "given": "Youse know when youse got\\>\\|Givun\\>", "scenario": "The thing of it is\\>", "scenario_outline": "Wharrimean is\\>", "then": "Den youse gotta\\>\\|Dun\\>", "when": "Youse know like when\\>\\|Wun\\>"},
\"en-au": {"and": "N\\>", "background": "Background\\>", "but": "Cept\\>", "examples": "Cobber\\>", "feature": "Crikey\\>", "given": "Ya know how\\>", "scenario": "Mate\\>", "scenario_outline": "Blokes\\>", "then": "Ya gotta\\>", "when": "When\\>"},
\"en-au": {"and": "Too right\\>", "background": "First off\\>", "but": "Yeah nah\\>", "examples": "You'll wanna\\>", "feature": "Pretty much\\>", "given": "Y'know\\>", "scenario": "Awww, look mate\\>", "scenario_outline": "Reckon it's like\\>", "then": "But at the end of the day I reckon\\>", "when": "It's just unbelievable\\>"},
\"en-lol": {"and": "AN\\>", "background": "B4\\>", "but": "BUT\\>", "examples": "EXAMPLZ\\>", "feature": "OH HAI\\>", "given": "I CAN HAZ\\>", "scenario": "MISHUN\\>", "scenario_outline": "MISHUN SRSLY\\>", "then": "DEN\\>", "when": "WEN\\>"},
\"en-old": {"and": "Ond\\>\\|7\\>", "background": "\\%u00c6r\\>\\|Aer\\>", "but": "Ac\\>", "examples": "Se \\%u00f0e\\>\\|Se \\%u00fee\\>\\|Se the\\>", "feature": "Hw\\%u00e6t\\>\\|Hwaet\\>", "given": "\\%u00d0urh\\>\\|\\%u00deurh\\>\\|Thurh\\>", "scenario": "Swa\\>", "scenario_outline": "Swa hw\\%u00e6r swa\\>\\|Swa hwaer swa\\>", "then": "\\%u00d0a \\%u00f0e\\>\\|\\%u00dea \\%u00fee\\>\\|\\%u00dea\\>\\|\\%u00d0a\\>\\|Tha the\\>\\|Tha\\>", "when": "\\%u00d0a\\>\\|\\%u00dea\\>\\|Tha\\>"},
\"en-pirate": {"and": "Aye\\>", "background": "Yo-ho-ho\\>", "but": "Avast!\\>", "examples": "Dead men tell no tales\\>", "feature": "Ahoy matey!\\>", "given": "Gangway!\\>", "scenario": "Heave to\\>", "scenario_outline": "Shiver me timbers\\>", "then": "Let go and haul\\>", "when": "Blimey!\\>"},
\"en-tx": {"and": "And y'all\\>", "background": "Background\\>", "but": "But y'all\\>", "examples": "Examples\\>", "feature": "Feature\\>", "given": "Given y'all\\>", "scenario": "Scenario\\>", "scenario_outline": "All y'all\\>", "then": "Then y'all\\>", "when": "When y'all\\>"},
\"eo": {"and": "Kaj\\>", "background": "Fono\\>", "but": "Sed\\>", "examples": "Ekzemploj\\>", "feature": "Trajto\\>", "given": "Donita\\%u0135o\\>", "scenario": "Scenaro\\>", "scenario_outline": "Konturo de la scenaro\\>", "then": "Do\\>", "when": "Se\\>"},
\"es": {"and": "Y\\>", "background": "Antecedentes\\>", "but": "Pero\\>", "examples": "Ejemplos\\>", "feature": "Caracter\\%u00edstica\\>", "given": "Dado\\>", "scenario": "Escenario\\>", "scenario_outline": "Esquema del escenario\\>", "then": "Entonces\\>", "when": "Cuando\\>"},
\"es": {"and": "Y\\>", "background": "Antecedentes\\>", "but": "Pero\\>", "examples": "Ejemplos\\>", "feature": "Caracter\\%u00edstica\\>", "given": "Dadas\\>\\|Dados\\>\\|Dada\\>\\|Dado\\>", "scenario": "Escenario\\>", "scenario_outline": "Esquema del escenario\\>", "then": "Entonces\\>", "when": "Cuando\\>"},
\"et": {"and": "Ja\\>", "background": "Taust\\>", "but": "Kuid\\>", "examples": "Juhtumid\\>", "feature": "Omadus\\>", "given": "Eeldades\\>", "scenario": "Stsenaarium\\>", "scenario_outline": "Raamstsenaarium\\>", "then": "Siis\\>", "when": "Kui\\>"},
\"fa": {"and": "\\%u0648\\>", "background": "\\%u0632\\%u0645\\%u06cc\\%u0646\\%u0647\\>", "but": "\\%u0627\\%u0645\\%u0627\\>", "examples": "\\%u0646\\%u0645\\%u0648\\%u0646\\%u0647 \\%u0647\\%u0627\\>", "feature": "\\%u0648\\%u0650\\%u06cc\\%u0698\\%u06af\\%u06cc\\>", "given": "\\%u0628\\%u0627 \\%u0641\\%u0631\\%u0636\\>", "scenario": "\\%u0633\\%u0646\\%u0627\\%u0631\\%u06cc\\%u0648\\>", "scenario_outline": "\\%u0627\\%u0644\\%u06af\\%u0648\\%u06cc \\%u0633\\%u0646\\%u0627\\%u0631\\%u06cc\\%u0648\\>", "then": "\\%u0622\\%u0646\\%u06af\\%u0627\\%u0647\\>", "when": "\\%u0647\\%u0646\\%u06af\\%u0627\\%u0645\\%u06cc\\>"},
\"fi": {"and": "Ja\\>", "background": "Tausta\\>", "but": "Mutta\\>", "examples": "Tapaukset\\>", "feature": "Ominaisuus\\>", "given": "Oletetaan\\>", "scenario": "Tapaus\\>", "scenario_outline": "Tapausaihio\\>", "then": "Niin\\>", "when": "Kun\\>"},
\"fr": {"and": "Et\\>", "background": "Contexte\\>", "but": "Mais\\>", "examples": "Exemples\\>", "feature": "Fonctionnalit\\%u00e9\\>", "given": "Etant donn\\%u00e9\\>\\|Soit\\>", "scenario": "Sc\\%u00e9nario\\>", "scenario_outline": "Plan du sc\\%u00e9nario\\>\\|Plan du Sc\\%u00e9nario\\>", "then": "Alors\\>", "when": "Lorsqu'\\|Lorsque\\>\\|Quand\\>"},
\"fr": {"and": "Et\\>", "background": "Contexte\\>", "but": "Mais\\>", "examples": "Exemples\\>", "feature": "Fonctionnalit\\%u00e9\\>", "given": "\\%u00c9tant donn\\%u00e9es\\>\\|\\%u00c9tant donn\\%u00e9s\\>\\|\\%u00c9tant donn\\%u00e9e\\>\\|\\%u00c9tant donn\\%u00e9\\>\\|Etant donn\\%u00e9es\\>\\|Etant donn\\%u00e9s\\>\\|Etant donn\\%u00e9e\\>\\|Etant donn\\%u00e9\\>\\|Soit\\>", "scenario": "Sc\\%u00e9nario\\>", "scenario_outline": "Plan du sc\\%u00e9nario\\>\\|Plan du Sc\\%u00e9nario\\>", "then": "Alors\\>", "when": "Lorsqu'\\|Lorsque\\>\\|Quand\\>"},
\"gl": {"and": "E\\>", "background": "Contexto\\>", "but": "Mais\\>\\|Pero\\>", "examples": "Exemplos\\>", "feature": "Caracter\\%u00edstica\\>", "given": "Dadas\\>\\|Dados\\>\\|Dada\\>\\|Dado\\>", "scenario": "Escenario\\>", "scenario_outline": "Esbozo do escenario\\>", "then": "Ent\\%u00f3n\\>\\|Logo\\>", "when": "Cando\\>"},
\"he": {"and": "\\%u05d5\\%u05d2\\%u05dd\\>", "background": "\\%u05e8\\%u05e7\\%u05e2\\>", "but": "\\%u05d0\\%u05d1\\%u05dc\\>", "examples": "\\%u05d3\\%u05d5\\%u05d2\\%u05de\\%u05d0\\%u05d5\\%u05ea\\>", "feature": "\\%u05ea\\%u05db\\%u05d5\\%u05e0\\%u05d4\\>", "given": "\\%u05d1\\%u05d4\\%u05d9\\%u05e0\\%u05ea\\%u05df\\>", "scenario": "\\%u05ea\\%u05e8\\%u05d7\\%u05d9\\%u05e9\\>", "scenario_outline": "\\%u05ea\\%u05d1\\%u05e0\\%u05d9\\%u05ea \\%u05ea\\%u05e8\\%u05d7\\%u05d9\\%u05e9\\>", "then": "\\%u05d0\\%u05d6\\%u05d9\\>\\|\\%u05d0\\%u05d6\\>", "when": "\\%u05db\\%u05d0\\%u05e9\\%u05e8\\>"},
\"hi": {"and": "\\%u0924\\%u0925\\%u093e\\>\\|\\%u0914\\%u0930\\>", "background": "\\%u092a\\%u0943\\%u0937\\%u094d\\%u0920\\%u092d\\%u0942\\%u092e\\%u093f\\>", "but": "\\%u092a\\%u0930\\>", "examples": "\\%u0909\\%u0926\\%u093e\\%u0939\\%u0930\\%u0923\\>", "feature": "\\%u0930\\%u0942\\%u092a \\%u0932\\%u0947\\%u0916\\>", "given": "\\%u091a\\%u0942\\%u0902\\%u0915\\%u093f\\>\\|\\%u092f\\%u0926\\%u093f\\>\\|\\%u0905\\%u0917\\%u0930\\>", "scenario": "\\%u092a\\%u0930\\%u093f\\%u0926\\%u0943\\%u0936\\%u094d\\%u092f\\>", "scenario_outline": "\\%u092a\\%u0930\\%u093f\\%u0926\\%u0943\\%u0936\\%u094d\\%u092f \\%u0930\\%u0942\\%u092a\\%u0930\\%u0947\\%u0916\\%u093e\\>", "then": "\\%u0924\\%u092c\\>", "when": "\\%u091c\\%u092c\\>"},
\"hr": {"and": "I\\>", "background": "Pozadina\\>", "but": "Ali\\>", "examples": "Scenariji\\>\\|Primjeri\\>", "feature": "Mogu\\%u0107nost\\>\\|Mogucnost\\>\\|Osobina\\>", "given": "Zadano\\>\\|Zadani\\>\\|Zadan\\>", "scenario": "Scenarij\\>", "scenario_outline": "Koncept\\>\\|Skica\\>", "then": "Onda\\>", "when": "Kada\\>\\|Kad\\>"},
\"hu": {"and": "\\%u00c9s\\>", "background": "H\\%u00e1tt\\%u00e9r\\>", "but": "De\\>", "examples": "P\\%u00e9ld\\%u00e1k\\>", "feature": "Jellemz\\%u0151\\>", "given": "Ha\\>", "scenario": "Forgat\\%u00f3k\\%u00f6nyv\\>", "scenario_outline": "Forgat\\%u00f3k\\%u00f6nyv v\\%u00e1zlat\\>", "then": "Akkor\\>", "when": "Majd\\>"},
\"hu": {"and": "\\%u00c9s\\>", "background": "H\\%u00e1tt\\%u00e9r\\>", "but": "De\\>", "examples": "P\\%u00e9ld\\%u00e1k\\>", "feature": "Jellemz\\%u0151\\>", "given": "Amennyiben\\>\\|Adott\\>", "scenario": "Forgat\\%u00f3k\\%u00f6nyv\\>", "scenario_outline": "Forgat\\%u00f3k\\%u00f6nyv v\\%u00e1zlat\\>", "then": "Akkor\\>", "when": "Amikor\\>\\|Majd\\>\\|Ha\\>"},
\"id": {"and": "Dan\\>", "background": "Dasar\\>", "but": "Tapi\\>", "examples": "Contoh\\>", "feature": "Fitur\\>", "given": "Dengan\\>", "scenario": "Skenario\\>", "scenario_outline": "Skenario konsep\\>", "then": "Maka\\>", "when": "Ketika\\>"},
\"it": {"and": "E\\>", "background": "Contesto\\>", "but": "Ma\\>", "examples": "Esempi\\>", "feature": "Funzionalit\\%u00e0\\>", "given": "Dato\\>", "scenario": "Scenario\\>", "scenario_outline": "Schema dello scenario\\>", "then": "Allora\\>", "when": "Quando\\>"},
\"is": {"and": "Og\\>", "background": "Bakgrunnur\\>", "but": "En\\>", "examples": "Atbur\\%u00f0ar\\%u00e1sir\\>\\|D\\%u00e6mi\\>", "feature": "Eiginleiki\\>", "given": "Ef\\>", "scenario": "Atbur\\%u00f0ar\\%u00e1s\\>", "scenario_outline": "L\\%u00fdsing Atbur\\%u00f0ar\\%u00e1sar\\>\\|L\\%u00fdsing D\\%u00e6ma\\>", "then": "\\%u00de\\%u00e1\\>", "when": "\\%u00deegar\\>"},
\"it": {"and": "E\\>", "background": "Contesto\\>", "but": "Ma\\>", "examples": "Esempi\\>", "feature": "Funzionalit\\%u00e0\\>", "given": "Dato\\>\\|Data\\>\\|Dati\\>\\|Date\\>", "scenario": "Scenario\\>", "scenario_outline": "Schema dello scenario\\>", "then": "Allora\\>", "when": "Quando\\>"},
\"ja": {"and": "\\%u304b\\%u3064", "background": "\\%u80cc\\%u666f\\>", "but": "\\%u3057\\%u304b\\%u3057\\|\\%u305f\\%u3060\\%u3057\\|\\%u4f46\\%u3057", "examples": "\\%u30b5\\%u30f3\\%u30d7\\%u30eb\\>\\|\\%u4f8b\\>", "feature": "\\%u30d5\\%u30a3\\%u30fc\\%u30c1\\%u30e3\\>\\|\\%u6a5f\\%u80fd\\>", "given": "\\%u524d\\%u63d0", "scenario": "\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\>", "scenario_outline": "\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\%u30a2\\%u30a6\\%u30c8\\%u30e9\\%u30a4\\%u30f3\\>\\|\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\%u30c6\\%u30f3\\%u30d7\\%u30ec\\%u30fc\\%u30c8\\>\\|\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\%u30c6\\%u30f3\\%u30d7\\%u30ec\\>\\|\\%u30c6\\%u30f3\\%u30d7\\%u30ec\\>", "then": "\\%u306a\\%u3089\\%u3070", "when": "\\%u3082\\%u3057"},
\"ko": {"and": "\\%uadf8\\%ub9ac\\%uace0", "background": "\\%ubc30\\%uacbd\\>", "but": "\\%ud558\\%uc9c0\\%ub9cc\\|\\%ub2e8", "examples": "\\%uc608\\>", "feature": "\\%uae30\\%ub2a5\\>", "given": "\\%uc870\\%uac74\\|\\%uba3c\\%uc800", "scenario": "\\%uc2dc\\%ub098\\%ub9ac\\%uc624\\>", "scenario_outline": "\\%uc2dc\\%ub098\\%ub9ac\\%uc624 \\%uac1c\\%uc694\\>", "then": "\\%uadf8\\%ub7ec\\%uba74", "when": "\\%ub9cc\\%uc77c\\|\\%ub9cc\\%uc57d"},
\"lt": {"and": "Ir\\>", "background": "Kontekstas\\>", "but": "Bet\\>", "examples": "Pavyzd\\%u017eiai\\>\\|Scenarijai\\>\\|Variantai\\>", "feature": "Savyb\\%u0117\\>", "given": "Duota\\>", "scenario": "Scenarijus\\>", "scenario_outline": "Scenarijaus \\%u0161ablonas\\>", "then": "Tada\\>", "when": "Kai\\>"},
\"lu": {"and": "an\\>\\|a\\>", "background": "Hannergrond\\>", "but": "m\\%u00e4\\>\\|awer\\>", "examples": "Beispiller\\>", "feature": "Funktionalit\\%u00e9it\\>", "given": "ugeholl\\>", "scenario": "Szenario\\>", "scenario_outline": "Plang vum Szenario\\>", "then": "dann\\>", "when": "wann\\>"},
\"lv": {"and": "Un\\>", "background": "Situ\\%u0101cija\\>\\|Konteksts\\>", "but": "Bet\\>", "examples": "Piem\\%u0113ri\\>\\|Paraugs\\>", "feature": "Funkcionalit\\%u0101te\\>\\|F\\%u012b\\%u010da\\>", "given": "Kad\\>", "scenario": "Scen\\%u0101rijs\\>", "scenario_outline": "Scen\\%u0101rijs p\\%u0113c parauga\\>", "then": "Tad\\>", "when": "Ja\\>"},
\"nl": {"and": "En\\>", "background": "Achtergrond\\>", "but": "Maar\\>", "examples": "Voorbeelden\\>", "feature": "Functionaliteit\\>", "given": "Gegeven\\>\\|Stel\\>", "scenario": "Scenario\\>", "scenario_outline": "Abstract Scenario\\>", "then": "Dan\\>", "when": "Als\\>"},
\"no": {"and": "Og\\>", "background": "Bakgrunn\\>", "but": "Men\\>", "examples": "Eksempler\\>", "feature": "Egenskap\\>", "given": "Gitt\\>", "scenario": "Scenario\\>", "scenario_outline": "Abstrakt Scenario\\>", "then": "S\\%u00e5\\>", "when": "N\\%u00e5r\\>"},
\"pl": {"and": "Oraz\\>", "background": "Za\\%u0142o\\%u017cenia\\>", "but": "Ale\\>", "examples": "Przyk\\%u0142ady\\>", "feature": "W\\%u0142a\\%u015bciwo\\%u015b\\%u0107\\>", "given": "Zak\\%u0142adaj\\%u0105c\\>", "scenario": "Scenariusz\\>", "scenario_outline": "Szablon scenariusza\\>", "then": "Wtedy\\>", "when": "Je\\%u017celi\\>"},
\"pt": {"and": "E\\>", "background": "Contexto\\>", "but": "Mas\\>", "examples": "Exemplos\\>", "feature": "Funcionalidade\\>", "given": "Dado\\>", "scenario": "Cen\\%u00e1rio\\>\\|Cenario\\>", "scenario_outline": "Esquema do Cen\\%u00e1rio\\>\\|Esquema do Cenario\\>", "then": "Ent\\%u00e3o\\>\\|Entao\\>", "when": "Quando\\>"},
\"ro": {"and": "Si\\>", "background": "Conditii\\>", "but": "Dar\\>", "examples": "Exemplele\\>", "feature": "Functionalitate\\>", "given": "Daca\\>", "scenario": "Scenariu\\>", "scenario_outline": "Scenariul de sablon\\>", "then": "Atunci\\>", "when": "Cand\\>"},
\"ro-RO": {"and": "\\%u0218i\\>", "background": "Condi\\%u0163ii\\>", "but": "Dar\\>", "examples": "Exemplele\\>", "feature": "Func\\%u021bionalitate\\>", "given": "Dac\\%u0103\\>", "scenario": "Scenariu\\>", "scenario_outline": "Scenariul de \\%u015fablon\\>", "then": "Atunci\\>", "when": "C\\%u00e2nd\\>"},
\"ru": {"and": "\\%u041a \\%u0442\\%u043e\\%u043c\\%u0443 \\%u0436\\%u0435\\>\\|\\%u0418\\>", "background": "\\%u041f\\%u0440\\%u0435\\%u0434\\%u044b\\%u0441\\%u0442\\%u043e\\%u0440\\%u0438\\%u044f\\>", "but": "\\%u041d\\%u043e\\>\\|\\%u0410\\>", "examples": "\\%u0417\\%u043d\\%u0430\\%u0447\\%u0435\\%u043d\\%u0438\\%u044f\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\>\\|\\%u0424\\%u0438\\%u0447\\%u0430\\>", "given": "\\%u0414\\%u043e\\%u043f\\%u0443\\%u0441\\%u0442\\%u0438\\%u043c\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "scenario_outline": "\\%u0421\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u044f\\>", "then": "\\%u0422\\%u043e\\>", "when": "\\%u0415\\%u0441\\%u043b\\%u0438\\>"},
\"sk": {"and": "A\\>", "background": "Pozadie\\>", "but": "Ale\\>", "examples": "Pr\\%u00edklady\\>", "feature": "Po\\%u017eiadavka\\>", "given": "Pokia\\%u013e\\>", "scenario": "Scen\\%u00e1r\\>", "scenario_outline": "N\\%u00e1\\%u010drt Scen\\%u00e1ru\\>", "then": "Tak\\>", "when": "Ke\\%u010f\\>"},
\"no": {"and": "Og\\>", "background": "Bakgrunn\\>", "but": "Men\\>", "examples": "Eksempler\\>", "feature": "Egenskap\\>", "given": "Gitt\\>", "scenario": "Scenario\\>", "scenario_outline": "Abstrakt Scenario\\>\\|Scenariomal\\>", "then": "S\\%u00e5\\>", "when": "N\\%u00e5r\\>"},
\"pl": {"and": "Oraz\\>\\|I\\>", "background": "Za\\%u0142o\\%u017cenia\\>", "but": "Ale\\>", "examples": "Przyk\\%u0142ady\\>", "feature": "W\\%u0142a\\%u015bciwo\\%u015b\\%u0107\\>\\|Potrzeba biznesowa\\>\\|Funkcja\\>\\|Aspekt\\>", "given": "Zak\\%u0142adaj\\%u0105c\\>\\|Maj\\%u0105c\\>", "scenario": "Scenariusz\\>", "scenario_outline": "Szablon scenariusza\\>", "then": "Wtedy\\>", "when": "Je\\%u017celi\\>\\|Je\\%u015bli\\>\\|Kiedy\\>\\|Gdy\\>"},
\"pt": {"and": "E\\>", "background": "Cen\\%u00e1rio de Fundo\\>\\|Cenario de Fundo\\>\\|Contexto\\>\\|Fundo\\>", "but": "Mas\\>", "examples": "Cen\\%u00e1rios\\>\\|Exemplos\\>\\|Cenarios\\>", "feature": "Caracter\\%u00edstica\\>\\|Funcionalidade\\>\\|Caracteristica\\>", "given": "Dadas\\>\\|Dados\\>\\|Dada\\>\\|Dado\\>", "scenario": "Cen\\%u00e1rio\\>\\|Cenario\\>", "scenario_outline": "Delinea\\%u00e7\\%u00e3o do Cen\\%u00e1rio\\>\\|Esquema do Cen\\%u00e1rio\\>\\|Delineacao do Cenario\\>\\|Esquema do Cenario\\>", "then": "Ent\\%u00e3o\\>\\|Entao\\>", "when": "Quando\\>"},
\"ro": {"and": "\\%u015ei\\>\\|\\%u0218i\\>\\|Si\\>", "background": "Context\\>", "but": "Dar\\>", "examples": "Exemple\\>", "feature": "Func\\%u0163ionalitate\\>\\|Func\\%u021bionalitate\\>\\|Functionalitate\\>", "given": "Da\\%u0163i fiind\\>\\|Da\\%u021bi fiind\\>\\|Dati fiind\\>\\|Date fiind\\>\\|Dat fiind\\>", "scenario": "Scenariu\\>", "scenario_outline": "Structur\\%u0103 scenariu\\>\\|Structura scenariu\\>", "then": "Atunci\\>", "when": "C\\%u00e2nd\\>\\|Cand\\>"},
\"ru": {"and": "\\%u041a \\%u0442\\%u043e\\%u043c\\%u0443 \\%u0436\\%u0435\\>\\|\\%u0422\\%u0430\\%u043a\\%u0436\\%u0435\\>\\|\\%u0418\\>", "background": "\\%u041f\\%u0440\\%u0435\\%u0434\\%u044b\\%u0441\\%u0442\\%u043e\\%u0440\\%u0438\\%u044f\\>\\|\\%u041a\\%u043e\\%u043d\\%u0442\\%u0435\\%u043a\\%u0441\\%u0442\\>", "but": "\\%u041d\\%u043e\\>\\|\\%u0410\\>", "examples": "\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\%u044b\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\>\\|\\%u0421\\%u0432\\%u043e\\%u0439\\%u0441\\%u0442\\%u0432\\%u043e\\>\\|\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u044f\\>", "given": "\\%u0414\\%u043e\\%u043f\\%u0443\\%u0441\\%u0442\\%u0438\\%u043c\\>\\|\\%u041f\\%u0443\\%u0441\\%u0442\\%u044c\\>\\|\\%u0414\\%u0430\\%u043d\\%u043e\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "scenario_outline": "\\%u0421\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u044f\\>", "then": "\\%u0422\\%u043e\\%u0433\\%u0434\\%u0430\\>\\|\\%u0422\\%u043e\\>", "when": "\\%u041a\\%u043e\\%u0433\\%u0434\\%u0430\\>\\|\\%u0415\\%u0441\\%u043b\\%u0438\\>"},
\"sk": {"and": "A z\\%u00e1rove\\%u0148\\>\\|A taktie\\%u017e\\>\\|A tie\\%u017e\\>\\|A\\>", "background": "Pozadie\\>", "but": "Ale\\>", "examples": "Pr\\%u00edklady\\>", "feature": "Po\\%u017eiadavka\\>\\|Vlastnos\\%u0165\\>\\|Funkcia\\>", "given": "Za predpokladu\\>\\|Pokia\\%u013e\\>", "scenario": "Scen\\%u00e1r\\>", "scenario_outline": "N\\%u00e1\\%u010drt Scen\\%u00e1ru\\>\\|N\\%u00e1\\%u010drt Scen\\%u00e1ra\\>\\|Osnova Scen\\%u00e1ra\\>", "then": "Potom\\>\\|Tak\\>", "when": "Ke\\%u010f\\>\\|Ak\\>"},
\"sr-Cyrl": {"and": "\\%u0418\\>", "background": "\\%u041a\\%u043e\\%u043d\\%u0442\\%u0435\\%u043a\\%u0441\\%u0442\\>\\|\\%u041f\\%u043e\\%u0437\\%u0430\\%u0434\\%u0438\\%u043d\\%u0430\\>\\|\\%u041e\\%u0441\\%u043d\\%u043e\\%u0432\\%u0430\\>", "but": "\\%u0410\\%u043b\\%u0438\\>", "examples": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0458\\%u0438\\>\\|\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\%u0438\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\%u043d\\%u043e\\%u0441\\%u0442\\>\\|\\%u041c\\%u043e\\%u0433\\%u0443\\%u045b\\%u043d\\%u043e\\%u0441\\%u0442\\>\\|\\%u041e\\%u0441\\%u043e\\%u0431\\%u0438\\%u043d\\%u0430\\>", "given": "\\%u0417\\%u0430\\%u0434\\%u0430\\%u0442\\%u043e\\>\\|\\%u0417\\%u0430\\%u0434\\%u0430\\%u0442\\%u0435\\>\\|\\%u0417\\%u0430\\%u0434\\%u0430\\%u0442\\%u0438\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u043e\\>\\|\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\>", "scenario_outline": "\\%u0421\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0458\\%u0430\\>\\|\\%u041a\\%u043e\\%u043d\\%u0446\\%u0435\\%u043f\\%u0442\\>\\|\\%u0421\\%u043a\\%u0438\\%u0446\\%u0430\\>", "then": "\\%u041e\\%u043d\\%u0434\\%u0430\\>", "when": "\\%u041a\\%u0430\\%u0434\\%u0430\\>\\|\\%u041a\\%u0430\\%u0434\\>"},
\"sr-Latn": {"and": "I\\>", "background": "Kontekst\\>\\|Pozadina\\>\\|Osnova\\>", "but": "Ali\\>", "examples": "Scenariji\\>\\|Primeri\\>", "feature": "Mogu\\%u0107nost\\>\\|Funkcionalnost\\>\\|Mogucnost\\>\\|Osobina\\>", "given": "Zadato\\>\\|Zadate\\>\\|Zatati\\>", "scenario": "Scenario\\>\\|Primer\\>", "scenario_outline": "Struktura scenarija\\>\\|Koncept\\>\\|Skica\\>", "then": "Onda\\>", "when": "Kada\\>\\|Kad\\>"},
\"sv": {"and": "Och\\>", "background": "Bakgrund\\>", "but": "Men\\>", "examples": "Exempel\\>", "feature": "Egenskap\\>", "given": "Givet\\>", "scenario": "Scenario\\>", "scenario_outline": "Abstrakt Scenario\\>", "then": "S\\%u00e5\\>", "when": "N\\%u00e4r\\>"},
\"sv": {"and": "Och\\>", "background": "Bakgrund\\>", "but": "Men\\>", "examples": "Exempel\\>", "feature": "Egenskap\\>", "given": "Givet\\>", "scenario": "Scenario\\>", "scenario_outline": "Abstrakt Scenario\\>\\|Scenariomall\\>", "then": "S\\%u00e5\\>", "when": "N\\%u00e4r\\>"},
\"th": {"and": "\\%u0e41\\%u0e25\\%u0e30\\>", "background": "\\%u0e41\\%u0e19\\%u0e27\\%u0e04\\%u0e34\\%u0e14\\>", "but": "\\%u0e41\\%u0e15\\%u0e48\\>", "examples": "\\%u0e0a\\%u0e38\\%u0e14\\%u0e02\\%u0e2d\\%u0e07\\%u0e40\\%u0e2b\\%u0e15\\%u0e38\\%u0e01\\%u0e32\\%u0e23\\%u0e13\\%u0e4c\\>\\|\\%u0e0a\\%u0e38\\%u0e14\\%u0e02\\%u0e2d\\%u0e07\\%u0e15\\%u0e31\\%u0e27\\%u0e2d\\%u0e22\\%u0e48\\%u0e32\\%u0e07\\>", "feature": "\\%u0e04\\%u0e27\\%u0e32\\%u0e21\\%u0e15\\%u0e49\\%u0e2d\\%u0e07\\%u0e01\\%u0e32\\%u0e23\\%u0e17\\%u0e32\\%u0e07\\%u0e18\\%u0e38\\%u0e23\\%u0e01\\%u0e34\\%u0e08\\>\\|\\%u0e04\\%u0e27\\%u0e32\\%u0e21\\%u0e2a\\%u0e32\\%u0e21\\%u0e32\\%u0e23\\%u0e16\\>\\|\\%u0e42\\%u0e04\\%u0e23\\%u0e07\\%u0e2b\\%u0e25\\%u0e31\\%u0e01\\>", "given": "\\%u0e01\\%u0e33\\%u0e2b\\%u0e19\\%u0e14\\%u0e43\\%u0e2b\\%u0e49\\>", "scenario": "\\%u0e40\\%u0e2b\\%u0e15\\%u0e38\\%u0e01\\%u0e32\\%u0e23\\%u0e13\\%u0e4c\\>", "scenario_outline": "\\%u0e42\\%u0e04\\%u0e23\\%u0e07\\%u0e2a\\%u0e23\\%u0e49\\%u0e32\\%u0e07\\%u0e02\\%u0e2d\\%u0e07\\%u0e40\\%u0e2b\\%u0e15\\%u0e38\\%u0e01\\%u0e32\\%u0e23\\%u0e13\\%u0e4c\\>\\|\\%u0e2a\\%u0e23\\%u0e38\\%u0e1b\\%u0e40\\%u0e2b\\%u0e15\\%u0e38\\%u0e01\\%u0e32\\%u0e23\\%u0e13\\%u0e4c\\>", "then": "\\%u0e14\\%u0e31\\%u0e07\\%u0e19\\%u0e31\\%u0e49\\%u0e19\\>", "when": "\\%u0e40\\%u0e21\\%u0e37\\%u0e48\\%u0e2d\\>"},
\"tl": {"and": "\\%u0c2e\\%u0c30\\%u0c3f\\%u0c2f\\%u0c41\\>", "background": "\\%u0c28\\%u0c47\\%u0c2a\\%u0c25\\%u0c4d\\%u0c2f\\%u0c02\\>", "but": "\\%u0c15\\%u0c3e\\%u0c28\\%u0c3f\\>", "examples": "\\%u0c09\\%u0c26\\%u0c3e\\%u0c39\\%u0c30\\%u0c23\\%u0c32\\%u0c41\\>", "feature": "\\%u0c17\\%u0c41\\%u0c23\\%u0c2e\\%u0c41\\>", "given": "\\%u0c1a\\%u0c46\\%u0c2a\\%u0c4d\\%u0c2a\\%u0c2c\\%u0c21\\%u0c3f\\%u0c28\\%u0c26\\%u0c3f\\>", "scenario": "\\%u0c38\\%u0c28\\%u0c4d\\%u0c28\\%u0c3f\\%u0c35\\%u0c47\\%u0c36\\%u0c02\\>", "scenario_outline": "\\%u0c15\\%u0c25\\%u0c28\\%u0c02\\>", "then": "\\%u0c05\\%u0c2a\\%u0c4d\\%u0c2a\\%u0c41\\%u0c21\\%u0c41\\>", "when": "\\%u0c08 \\%u0c2a\\%u0c30\\%u0c3f\\%u0c38\\%u0c4d\\%u0c25\\%u0c3f\\%u0c24\\%u0c3f\\%u0c32\\%u0c4b\\>"},
\"tr": {"and": "Ve\\>", "background": "Ge\\%u00e7mi\\%u015f\\>", "but": "Fakat\\>\\|Ama\\>", "examples": "\\%u00d6rnekler\\>", "feature": "\\%u00d6zellik\\>", "given": "Diyelim ki\\>", "scenario": "Senaryo\\>", "scenario_outline": "Senaryo tasla\\%u011f\\%u0131\\>", "then": "O zaman\\>", "when": "E\\%u011fer ki\\>"},
\"uk": {"and": "\\%u0406\\>", "background": "\\%u041f\\%u0435\\%u0440\\%u0435\\%u0434\\%u0443\\%u043c\\%u043e\\%u0432\\%u0430\\>", "but": "\\%u0410\\%u043b\\%u0435\\>", "examples": "\\%u041f\\%u0440\\%u0438\\%u043a\\%u043b\\%u0430\\%u0434\\%u0438\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0456\\%u043e\\%u043d\\%u0430\\%u043b\\>", "given": "\\%u041f\\%u0440\\%u0438\\%u043f\\%u0443\\%u0441\\%u0442\\%u0438\\%u043c\\%u043e, \\%u0449\\%u043e\\>\\|\\%u041f\\%u0440\\%u0438\\%u043f\\%u0443\\%u0441\\%u0442\\%u0438\\%u043c\\%u043e\\>\\|\\%u041d\\%u0435\\%u0445\\%u0430\\%u0439\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0456\\%u0439\\>", "scenario_outline": "\\%u0421\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0456\\%u044e\\>", "then": "\\%u0422\\%u043e\\>", "when": "\\%u042f\\%u043a\\%u0449\\%u043e\\>"},
\"tt": {"and": "\\%u04ba\\%u04d9\\%u043c\\>\\|\\%u0412\\%u04d9\\>", "background": "\\%u041a\\%u0435\\%u0440\\%u0435\\%u0448\\>", "but": "\\%u041b\\%u04d9\\%u043a\\%u0438\\%u043d\\>\\|\\%u04d8\\%u043c\\%u043c\\%u0430\\>", "examples": "\\%u04ae\\%u0440\\%u043d\\%u04d9\\%u043a\\%u043b\\%u04d9\\%u0440\\>\\|\\%u041c\\%u0438\\%u0441\\%u0430\\%u043b\\%u043b\\%u0430\\%u0440\\>", "feature": "\\%u04ae\\%u0437\\%u0435\\%u043d\\%u0447\\%u04d9\\%u043b\\%u0435\\%u043a\\%u043b\\%u0435\\%u043b\\%u0435\\%u043a\\>\\|\\%u041c\\%u04e9\\%u043c\\%u043a\\%u0438\\%u043d\\%u043b\\%u0435\\%u043a\\>", "given": "\\%u04d8\\%u0439\\%u0442\\%u0438\\%u043a\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "scenario_outline": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\%u043d\\%u044b\\%u04a3 \\%u0442\\%u04e9\\%u0437\\%u0435\\%u043b\\%u0435\\%u0448\\%u0435\\>", "then": "\\%u041d\\%u04d9\\%u0442\\%u0438\\%u0497\\%u04d9\\%u0434\\%u04d9\\>", "when": "\\%u04d8\\%u0433\\%u04d9\\%u0440\\>"},
\"uk": {"and": "\\%u0410 \\%u0442\\%u0430\\%u043a\\%u043e\\%u0436\\>\\|\\%u0422\\%u0430\\>\\|\\%u0406\\>", "background": "\\%u041f\\%u0435\\%u0440\\%u0435\\%u0434\\%u0443\\%u043c\\%u043e\\%u0432\\%u0430\\>", "but": "\\%u0410\\%u043b\\%u0435\\>", "examples": "\\%u041f\\%u0440\\%u0438\\%u043a\\%u043b\\%u0430\\%u0434\\%u0438\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0456\\%u043e\\%u043d\\%u0430\\%u043b\\>", "given": "\\%u041f\\%u0440\\%u0438\\%u043f\\%u0443\\%u0441\\%u0442\\%u0438\\%u043c\\%u043e, \\%u0449\\%u043e\\>\\|\\%u041f\\%u0440\\%u0438\\%u043f\\%u0443\\%u0441\\%u0442\\%u0438\\%u043c\\%u043e\\>\\|\\%u041d\\%u0435\\%u0445\\%u0430\\%u0439\\>\\|\\%u0414\\%u0430\\%u043d\\%u043e\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0456\\%u0439\\>", "scenario_outline": "\\%u0421\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0456\\%u044e\\>", "then": "\\%u0422\\%u043e\\%u0434\\%u0456\\>\\|\\%u0422\\%u043e\\>", "when": "\\%u042f\\%u043a\\%u0449\\%u043e\\>\\|\\%u041a\\%u043e\\%u043b\\%u0438\\>"},
\"uz": {"and": "\\%u0412\\%u0430\\>", "background": "\\%u0422\\%u0430\\%u0440\\%u0438\\%u0445\\>", "but": "\\%u041b\\%u0435\\%u043a\\%u0438\\%u043d\\>\\|\\%u0411\\%u0438\\%u0440\\%u043e\\%u043a\\>\\|\\%u0410\\%u043c\\%u043c\\%u043e\\>", "examples": "\\%u041c\\%u0438\\%u0441\\%u043e\\%u043b\\%u043b\\%u0430\\%u0440\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\>", "given": "\\%u0410\\%u0433\\%u0430\\%u0440\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "scenario_outline": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439 \\%u0441\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430\\%u0441\\%u0438\\>", "then": "\\%u0423\\%u043d\\%u0434\\%u0430\\>", "when": "\\%u0410\\%u0433\\%u0430\\%u0440\\>"},
\"vi": {"and": "V\\%u00e0\\>", "background": "B\\%u1ed1i c\\%u1ea3nh\\>", "but": "Nh\\%u01b0ng\\>", "examples": "D\\%u1eef li\\%u1ec7u\\>", "feature": "T\\%u00ednh n\\%u0103ng\\>", "given": "Bi\\%u1ebft\\>\\|Cho\\>", "scenario": "T\\%u00ecnh hu\\%u1ed1ng\\>\\|K\\%u1ecbch b\\%u1ea3n\\>", "scenario_outline": "Khung t\\%u00ecnh hu\\%u1ed1ng\\>\\|Khung k\\%u1ecbch b\\%u1ea3n\\>", "then": "Th\\%u00ec\\>", "when": "Khi\\>"},
\"zh-CN": {"and": "\\%u800c\\%u4e14", "background": "\\%u80cc\\%u666f\\>", "but": "\\%u4f46\\%u662f", "examples": "\\%u4f8b\\%u5b50\\>", "feature": "\\%u529f\\%u80fd\\>", "given": "\\%u5047\\%u5982", "scenario": "\\%u573a\\%u666f\\>", "scenario_outline": "\\%u573a\\%u666f\\%u5927\\%u7eb2\\>", "then": "\\%u90a3\\%u4e48", "when": "\\%u5f53"},
\"zh-TW": {"and": "\\%u800c\\%u4e14\\|\\%u4e26\\%u4e14", "background": "\\%u80cc\\%u666f\\>", "but": "\\%u4f46\\%u662f", "examples": "\\%u4f8b\\%u5b50\\>", "feature": "\\%u529f\\%u80fd\\>", "given": "\\%u5047\\%u8a2d", "scenario": "\\%u5834\\%u666f\\>\\|\\%u5287\\%u672c\\>", "scenario_outline": "\\%u5834\\%u666f\\%u5927\\%u7db1\\>\\|\\%u5287\\%u672c\\%u5927\\%u7db1\\>", "then": "\\%u90a3\\%u9ebc", "when": "\\%u7576"}}
\"zh-CN": {"and": "\\%u800c\\%u4e14\\|\\%u5e76\\%u4e14\\|\\%u540c\\%u65f6", "background": "\\%u80cc\\%u666f\\>", "but": "\\%u4f46\\%u662f", "examples": "\\%u4f8b\\%u5b50\\>", "feature": "\\%u529f\\%u80fd\\>", "given": "\\%u5047\\%u5982\\|\\%u5047\\%u8bbe\\|\\%u5047\\%u5b9a", "scenario": "\\%u573a\\%u666f\\>\\|\\%u5267\\%u672c\\>", "scenario_outline": "\\%u573a\\%u666f\\%u5927\\%u7eb2\\>\\|\\%u5267\\%u672c\\%u5927\\%u7eb2\\>", "then": "\\%u90a3\\%u4e48", "when": "\\%u5f53"},
\"zh-TW": {"and": "\\%u800c\\%u4e14\\|\\%u4e26\\%u4e14\\|\\%u540c\\%u6642", "background": "\\%u80cc\\%u666f\\>", "but": "\\%u4f46\\%u662f", "examples": "\\%u4f8b\\%u5b50\\>", "feature": "\\%u529f\\%u80fd\\>", "given": "\\%u5047\\%u5982\\|\\%u5047\\%u8a2d\\|\\%u5047\\%u5b9a", "scenario": "\\%u5834\\%u666f\\>\\|\\%u5287\\%u672c\\>", "scenario_outline": "\\%u5834\\%u666f\\%u5927\\%u7db1\\>\\|\\%u5287\\%u672c\\%u5927\\%u7db1\\>", "then": "\\%u90a3\\%u9ebc", "when": "\\%u7576"}}
function! s:pattern(key)
let language = matchstr(getline(1),'#\s*language:\s*\zs\S\+')
@@ -73,13 +83,15 @@ function! s:pattern(key)
endfunction
function! s:Add(name)
let next = " skipempty skipwhite nextgroup=".join(map(["Region","AndRegion","ButRegion","Comment","Table"],'"cucumber".a:name.v:val'),",")
let next = " skipempty skipwhite nextgroup=".join(map(["Region","AndRegion","ButRegion","Comment","String","Table"],'"cucumber".a:name.v:val'),",")
exe "syn region cucumber".a:name.'Region matchgroup=cucumber'.a:name.' start="\%(^\s*\)\@<=\%('.s:pattern(tolower(a:name)).'\)" end="$"'.next
exe 'syn region cucumber'.a:name.'AndRegion matchgroup=cucumber'.a:name.'And start="\%(^\s*\)\@<='.s:pattern('and').'" end="$" contained'.next
exe 'syn region cucumber'.a:name.'ButRegion matchgroup=cucumber'.a:name.'But start="\%(^\s*\)\@<='.s:pattern('but').'" end="$" contained'.next
exe 'syn match cucumber'.a:name.'Comment "\%(^\s*\)\@<=#.*" contained'.next
exe 'syn region cucumber'.a:name.'String start=+\%(^\s*\)\@<="""+ end=+"""+ contained'.next
exe 'syn match cucumber'.a:name.'Table "\%(^\s*\)\@<=|.*" contained contains=cucumberDelimiter'.next
exe 'hi def link cucumber'.a:name.'Comment cucumberComment'
exe 'hi def link cucumber'.a:name.'String cucumberString'
exe 'hi def link cucumber'.a:name.'But cucumber'.a:name.'And'
exe 'hi def link cucumber'.a:name.'And cucumber'.a:name
exe 'syn cluster cucumberStepRegions add=cucumber'.a:name.'Region,cucumber'.a:name.'AndRegion,cucumber'.a:name.'ButRegion'
@@ -99,9 +111,8 @@ exe 'syn match cucumberExamples "\%(^\s*\)\@<='.s:pattern('examples').':" nextgr
syn match cucumberPlaceholder "<[^<>]*>" contained containedin=@cucumberStepRegions
syn match cucumberExampleTable "\%(^\s*\)\@<=|.*" contains=cucumberDelimiter
syn match cucumberDelimiter "|" contained
syn match cucumberTags "\%(^\s*\)\@<=\%(@[^@[:space:]]\+\s\+\)*@[^@[:space:]]\+\s*$"
syn region cucumberString start=+\%(^\s*\)\@<="""+ end=+"""+
syn match cucumberDelimiter "\\\@<!\%(\\\\\)*\zs|" contained
syn match cucumberTags "\%(^\s*\)\@<=\%(@[^@[:space:]]\+\s\+\)*@[^@[:space:]]\+\s*$" contains=@NoSpell
call s:Add('Then')
call s:Add('When')

View File

@@ -1,22 +1,23 @@
" Vim syntax file for the D programming language (version 1.053 and 2.047).
" Vim syntax file for the D programming language (version 1.076 and 2.063).
"
" Language: D
" Maintainer: Jesse Phillips <Jesse.K.Phillips+D@gmail.com>
" Last Change: 2012 Jan 11
" Version: 0.24
" Last Change: 2013 May 21
" Version: 0.25
"
" Contributors:
" - Jason Mills <jasonmills@nf.sympatico.ca>: original Maintainer
" - Jason Mills: original Maintainer
" - Kirk McDonald
" - Tim Keating
" - Frank Benoit
" - Shougo Matsushita <Shougo.Matsu@gmail.com>
" - Shougo Matsushita
" - Ellery Newcomer
" - Steven N. Oliver
" - Sohgo Takeuchi
" - Robert Clipsham
"
" Please submit bugs/comments/suggestions to the github repo:
" https://github.com/he-the-great/d.vim
" https://github.com/JesseKPhillips/d.vim
"
" Options:
" d_comment_strings - Set to highlight strings and numbers in comments.
@@ -40,7 +41,8 @@ let b:current_syntax = "d"
" Keyword definitions
"
syn keyword dExternal import module
syn keyword dExternal contained import module
syn keyword dAssert assert
syn keyword dConditional if else switch
syn keyword dBranch goto break continue
syn keyword dRepeat while for do foreach foreach_reverse
@@ -48,6 +50,7 @@ syn keyword dBoolean true false
syn keyword dConstant null
syn keyword dConstant __FILE__ __LINE__ __EOF__ __VERSION__
syn keyword dConstant __DATE__ __TIME__ __TIMESTAMP__ __VENDOR__
syn keyword dConstant __MODULE__ __FUNCTION__ __PRETTY_FUNCTION__
syn keyword dTypedef alias typedef
syn keyword dStructure template interface class struct union
syn keyword dEnum enum
@@ -58,7 +61,7 @@ if exists("d_hl_operator_overload")
syn keyword dOpOverload opSub opSub_r opMul opDiv opDiv_r opMod
syn keyword dOpOverload opMod_r opAnd opOr opXor opShl opShl_r opShr
syn keyword dOpOverload opShr_r opUShr opUShr_r opCat
syn keyword dOpOverload opCat_r opEquals opEquals opCmp
syn keyword dOpOverload opCat_r opEquals opCmp
syn keyword dOpOverload opAssign opAddAssign opSubAssign opMulAssign
syn keyword dOpOverload opDivAssign opModAssign opAndAssign
syn keyword dOpOverload opOrAssign opXorAssign opShlAssign
@@ -73,7 +76,7 @@ if exists("d_hl_operator_overload")
endif
syn keyword dType byte ubyte short ushort int uint long ulong cent ucent
syn keyword dType void bool bit
syn keyword dType void bool Object
syn keyword dType float double real
syn keyword dType ushort int uint long ulong float
syn keyword dType char wchar dchar string wstring dstring
@@ -94,22 +97,31 @@ syn keyword dDebug deprecated unittest invariant
syn keyword dExceptions throw try catch finally
syn keyword dScopeDecl public protected private export package
syn keyword dStatement debug return with
syn keyword dStatement function delegate __ctfe mixin macro
syn keyword dStorageClass in out inout ref lazy body
syn keyword dStorageClass pure nothrow
syn keyword dStatement function delegate __ctfe mixin macro __simd
syn keyword dStatement in out body
syn keyword dStorageClass contained in out scope
syn keyword dStorageClass inout ref lazy pure nothrow
syn keyword dStorageClass auto static override final abstract volatile
syn keyword dStorageClass __gshared __thread
syn keyword dStorageClass __gshared __vector
syn keyword dStorageClass synchronized shared immutable const lazy
syn keyword dPragma pragma
syn keyword dIdentifier _arguments _argptr __vptr __monitor _ctor _dtor
syn keyword dIdentifier _arguments _argptr __vptr __monitor
syn keyword dIdentifier _ctor _dtor __argTypes __overloadset
syn keyword dScopeIdentifier contained exit success failure
syn keyword dTraitsIdentifier contained isAbstractClass isArithmetic isAssociativeArray
syn keyword dTraitsIdentifier contained isFinalClass isFloating isIntegral isScalar
syn keyword dTraitsIdentifier contained isStaticArray isUnsigned isVirtualFunction
syn keyword dTraitsIdentifier contained isAbstractFunction isFinalFunction isStaticFunction
syn keyword dTraitsIdentifier contained isRef isOut isLazy hasMember identifier getMember
syn keyword dTraitsIdentifier contained getOverloads getVirtualFunctions parent compiles
syn keyword dTraitsIdentifier contained classInstanceSize allMembers derivedMembers isSame
syn keyword dTraitsIdentifier contained isAbstractClass isArithmetic
syn keyword dTraitsIdentifier contained isAssociativeArray isFinalClass
syn keyword dTraitsIdentifier contained isPOD isNested isFloating
syn keyword dTraitsIdentifier contained isIntegral isScalar isStaticArray
syn keyword dTraitsIdentifier contained isUnsigned isVirtualFunction
syn keyword dTraitsIdentifier contained isVirtualMethod isAbstractFunction
syn keyword dTraitsIdentifier contained isFinalFunction isStaticFunction
syn keyword dTraitsIdentifier contained isRef isOut isLazy hasMember
syn keyword dTraitsIdentifier contained identifier getAttributes getMember
syn keyword dTraitsIdentifier contained getOverloads getProtection
syn keyword dTraitsIdentifier contained getVirtualFunctions
syn keyword dTraitsIdentifier contained getVirtualMethods parent
syn keyword dTraitsIdentifier contained classInstanceSize allMembers
syn keyword dTraitsIdentifier contained derivedMembers isSame compiles
syn keyword dPragmaIdentifier contained lib msg startaddress GNU_asm
syn keyword dExternIdentifier contained Windows Pascal Java System D
syn keyword dAttribute contained safe trusted system
syn keyword dAttribute contained property disable
@@ -124,6 +136,8 @@ syn keyword dVersionIdentifier contained D_InlineAsm_X86 D_InlineAsm_X86_64
syn keyword dVersionIdentifier contained D_Version2 D_Coverage D_Ddoc D_LP64 D_PIC
syn keyword dVersionIdentifier contained unittest none all
syn cluster dComment contains=dNestedComment,dBlockComment,dLineComment
" Highlight the sharpbang
syn match dSharpBang "\%^#!.*" display
@@ -131,45 +145,42 @@ syn match dSharpBang "\%^#!.*" display
syn match dAnnotation "@[_$a-zA-Z][_$a-zA-Z0-9_]*\>" contains=dAttribute
" Version Identifiers
syn match dVersion "[^.]\<version\>"hs=s+1 nextgroup=dVersionInside
syn match dVersion "^\<version\>" nextgroup=dVersionInside
syn match dVersionInside "\s*([_a-zA-Z][_a-zA-Z0-9]*\>" transparent contained contains=dVersionIdentifier
" Scope StorageClass
syn match dStorageClass "\<scope\>"
" Traits Expression
syn match dStatement "\<__traits\>"
" Extern Modifier
syn match dExternal "\<extern\>"
syn match dVersion "\<version\>"
syn match dVersion "\<version\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+7 contains=dVersionIdentifier
" Scope Identifiers
syn match dScope "\<scope\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+5 contains=dScopeIdentifier
syn match dStatement "\<scope\>"
syn match dStatement "\<scope\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+5 contains=dScopeIdentifier
" Traits Identifiers
syn match dTraits "\<__traits\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+8 contains=dTraitsIdentifier
" Traits Statement
syn match dStatement "\<__traits\>"
syn match dStatement "\<__traits\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+8 contains=dTraitsIdentifier
" Pragma Statement
syn match dPragma "\<pragma\>"
syn match dPragma "\<pragma\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+8 contains=dPragmaIdentifier
" Necessary to highlight C++ in extern modifiers.
syn match dExternIdentifier "C\(++\)\?" contained
" Extern Identifiers
syn match dExternal "\<extern\>"
syn match dExtern "\<extern\s*([_a-zA-Z][_a-zA-Z0-9\+]*\>"he=s+6 contains=dExternIdentifier
" String is a statement and a module name.
syn match dType "[^.]\<string\>"ms=s+1
syn match dType "^\<string\>"
" Make import a region to prevent highlighting keywords
syn region dImport start="import" end=";" contains=dExternal,@dComment
" Assert is a statement and a module name.
syn match dAssert "[^.]\<assert\>"ms=s+1
syn match dAssert "^\<assert\>"
" Make module a region to prevent highlighting keywords
syn region dImport start="module" end=";" contains=dExternal,@dComment
" dTokens is used by the token string highlighting
syn cluster dTokens contains=dExternal,dConditional,dBranch,dRepeat,dBoolean
syn cluster dTokens add=dConstant,dTypedef,dStructure,dOperator,dOpOverload
syn cluster dTokens add=dType,dDebug,dExceptions,dScopeDecl,dStatement
syn cluster dTokens add=dStorageClass,dPragma,dAssert,dAnnotation
syn cluster dTokens add=dStorageClass,dPragma,dAssert,dAnnotation,dEnum
" Create a match for parameter lists to identify storage class
syn region paramlist start="(" end=")" contains=@dTokens
" Labels
"
@@ -358,146 +369,192 @@ hi def link dLineComment Comment
hi def link dBlockComment Comment
hi def link dNestedComment Comment
hi def link dExternal Include
hi def link dPragma PreProc
hi def link dAnnotation PreProc
hi def link dSharpBang PreProc
hi def link dAttribute StorageClass
hi def link dIdentifier Identifier
hi def link dVersion dStatement
hi def link dVersionIdentifier Identifier
hi def link dScope dStorageClass
hi def link dScopeIdentifier Identifier
hi def link dTraits dStatement
hi def link dTraitsIdentifier Identifier
hi def link dPragma PreProc
hi def link dPragmaIdentifier Identifier
hi def link dExtern dExternal
hi def link dExternIdentifier Identifier
" Marks contents of the asm statment body as special
syn match dAsmStatement "\<asm\>"
syn region dAsmBody start="asm[\n]*\s*{"hs=e+1 end="}"he=e-1 contains=dAsmStatement,dAsmOpCode
syn region dAsmBody start="asm[\n]*\s*{"hs=e+1 end="}"he=e-1 contains=dAsmStatement,dAsmOpCode,@dComment,DUserLabel
hi def link dAsmBody dUnicode
hi def link dAsmStatement dStatement
hi def link dAsmOpCode Identifier
syn keyword dAsmOpCode contained aaa aad aam aas adc
syn keyword dAsmOpCode contained add addpd addps addsd addss
syn keyword dAsmOpCode contained and andnpd andnps andpd andps
syn keyword dAsmOpCode contained arpl bound bsf bsr bswap
syn keyword dAsmOpCode contained bt btc btr bts call
syn keyword dAsmOpCode contained cbw cdq clc cld clflush
syn keyword dAsmOpCode contained cli clts cmc cmova cmovae
syn keyword dAsmOpCode contained cmovb cmovbe cmovc cmove cmovg
syn keyword dAsmOpCode contained cmovge cmovl cmovle cmovna cmovnae
syn keyword dAsmOpCode contained cmovnb cmovnbe cmovnc cmovne cmovng
syn keyword dAsmOpCode contained cmovnge cmovnl cmovnle cmovno cmovnp
syn keyword dAsmOpCode contained cmovns cmovnz cmovo cmovp cmovpe
syn keyword dAsmOpCode contained cmovpo cmovs cmovz cmp cmppd
syn keyword dAsmOpCode contained cmpps cmps cmpsb cmpsd cmpss
syn keyword dAsmOpCode contained cmpsw cmpxch8b cmpxchg comisd comiss
syn keyword dAsmOpCode contained cpuid cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi
syn keyword dAsmOpCode contained cvtpd2ps cvtpi2pd cvtpi2ps cvtps2dq cvtps2pd
syn keyword dAsmOpCode contained cvtps2pi cvtsd2si cvtsd2ss cvtsi2sd cvtsi2ss
syn keyword dAsmOpCode contained cvtss2sd cvtss2si cvttpd2dq cvttpd2pi cvttps2dq
syn keyword dAsmOpCode contained cvttps2pi cvttsd2si cvttss2si cwd cwde
syn keyword dAsmOpCode contained da daa das db dd
syn keyword dAsmOpCode contained de dec df di div
syn keyword dAsmOpCode contained divpd divps divsd divss dl
syn keyword dAsmOpCode contained dq ds dt dw emms
syn keyword dAsmOpCode contained enter f2xm1 fabs fadd faddp
syn keyword dAsmOpCode contained fbld fbstp fchs fclex fcmovb
syn keyword dAsmOpCode contained fcmovbe fcmove fcmovnb fcmovnbe fcmovne
syn keyword dAsmOpCode contained fcmovnu fcmovu fcom fcomi fcomip
syn keyword dAsmOpCode contained fcomp fcompp fcos fdecstp fdisi
syn keyword dAsmOpCode contained fdiv fdivp fdivr fdivrp feni
syn keyword dAsmOpCode contained ffree fiadd ficom ficomp fidiv
syn keyword dAsmOpCode contained fidivr fild fimul fincstp finit
syn keyword dAsmOpCode contained fist fistp fisub fisubr fld
syn keyword dAsmOpCode contained fld1 fldcw fldenv fldl2e fldl2t
syn keyword dAsmOpCode contained fldlg2 fldln2 fldpi fldz fmul
syn keyword dAsmOpCode contained fmulp fnclex fndisi fneni fninit
syn keyword dAsmOpCode contained fnop fnsave fnstcw fnstenv fnstsw
syn keyword dAsmOpCode contained fpatan fprem fprem1 fptan frndint
syn keyword dAsmOpCode contained frstor fsave fscale fsetpm fsin
syn keyword dAsmOpCode contained fsincos fsqrt fst fstcw fstenv
syn keyword dAsmOpCode contained fstp fstsw fsub fsubp fsubr
syn keyword dAsmOpCode contained fsubrp ftst fucom fucomi fucomip
syn keyword dAsmOpCode contained fucomp fucompp fwait fxam fxch
syn keyword dAsmOpCode contained fxrstor fxsave fxtract fyl2x fyl2xp1
syn keyword dAsmOpCode contained hlt idiv imul in inc
syn keyword dAsmOpCode contained ins insb insd insw int
syn keyword dAsmOpCode contained into invd invlpg iret iretd
syn keyword dAsmOpCode contained ja jae jb jbe jc
syn keyword dAsmOpCode contained jcxz je jecxz jg jge
syn keyword dAsmOpCode contained jl jle jmp jna jnae
syn keyword dAsmOpCode contained jnb jnbe jnc jne jng
syn keyword dAsmOpCode contained jnge jnl jnle jno jnp
syn keyword dAsmOpCode contained jns jnz jo jp jpe
syn keyword dAsmOpCode contained jpo js jz lahf lar
syn keyword dAsmOpCode contained ldmxcsr lds lea leave les
syn keyword dAsmOpCode contained lfence lfs lgdt lgs lidt
syn keyword dAsmOpCode contained lldt lmsw lock lods lodsb
syn keyword dAsmOpCode contained lodsd lodsw loop loope loopne
syn keyword dAsmOpCode contained loopnz loopz lsl lss ltr
syn keyword dAsmOpCode contained maskmovdqu maskmovq maxpd maxps maxsd
syn keyword dAsmOpCode contained maxss mfence minpd minps minsd
syn keyword dAsmOpCode contained minss mov movapd movaps movd
syn keyword dAsmOpCode contained movdq2q movdqa movdqu movhlps movhpd
syn keyword dAsmOpCode contained movhps movlhps movlpd movlps movmskpd
syn keyword dAsmOpCode contained movmskps movntdq movnti movntpd movntps
syn keyword dAsmOpCode contained movntq movq movq2dq movs movsb
syn keyword dAsmOpCode contained movsd movss movsw movsx movupd
syn keyword dAsmOpCode contained movups movzx mul mulpd mulps
syn keyword dAsmOpCode contained mulsd mulss neg nop not
syn keyword dAsmOpCode contained or orpd orps out outs
syn keyword dAsmOpCode contained outsb outsd outsw packssdw packsswb
syn keyword dAsmOpCode contained packuswb paddb paddd paddq paddsb
syn keyword dAsmOpCode contained paddsw paddusb paddusw paddw pand
syn keyword dAsmOpCode contained pandn pavgb pavgw pcmpeqb pcmpeqd
syn keyword dAsmOpCode contained pcmpeqw pcmpgtb pcmpgtd pcmpgtw pextrw
syn keyword dAsmOpCode contained pinsrw pmaddwd pmaxsw pmaxub pminsw
syn keyword dAsmOpCode contained pminub pmovmskb pmulhuw pmulhw pmullw
syn keyword dAsmOpCode contained pmuludq pop popa popad popf
syn keyword dAsmOpCode contained popfd por prefetchnta prefetcht0 prefetcht1
syn keyword dAsmOpCode contained prefetcht2 psadbw pshufd pshufhw pshuflw
syn keyword dAsmOpCode contained pshufw pslld pslldq psllq psllw
syn keyword dAsmOpCode contained psrad psraw psrld psrldq psrlq
syn keyword dAsmOpCode contained psrlw psubb psubd psubq psubsb
syn keyword dAsmOpCode contained psubsw psubusb psubusw psubw punpckhbw
syn keyword dAsmOpCode contained punpckhdq punpckhqdq punpckhwd punpcklbw punpckldq
syn keyword dAsmOpCode contained punpcklqdq punpcklwd push pusha pushad
syn keyword dAsmOpCode contained pushf pushfd pxor rcl rcpps
syn keyword dAsmOpCode contained rcpss rcr rdmsr rdpmc rdtsc
syn keyword dAsmOpCode contained rep repe repne repnz repz
syn keyword dAsmOpCode contained ret retf rol ror rsm
syn keyword dAsmOpCode contained rsqrtps rsqrtss sahf sal sar
syn keyword dAsmOpCode contained sbb scas scasb scasd scasw
syn keyword dAsmOpCode contained seta setae setb setbe setc
syn keyword dAsmOpCode contained sete setg setge setl setle
syn keyword dAsmOpCode contained setna setnae setnb setnbe setnc
syn keyword dAsmOpCode contained setne setng setnge setnl setnle
syn keyword dAsmOpCode contained setno setnp setns setnz seto
syn keyword dAsmOpCode contained setp setpe setpo sets setz
syn keyword dAsmOpCode contained sfence sgdt shl shld shr
syn keyword dAsmOpCode contained shrd shufpd shufps sidt sldt
syn keyword dAsmOpCode contained smsw sqrtpd sqrtps sqrtsd sqrtss
syn keyword dAsmOpCode contained stc std sti stmxcsr stos
syn keyword dAsmOpCode contained stosb stosd stosw str sub
syn keyword dAsmOpCode contained subpd subps subsd subss sysenter
syn keyword dAsmOpCode contained sysexit test ucomisd ucomiss ud2
syn keyword dAsmOpCode contained unpckhpd unpckhps unpcklpd unpcklps verr
syn keyword dAsmOpCode contained verw wait wbinvd wrmsr xadd
syn keyword dAsmOpCode contained xchg xlat xlatb xor xorpd
syn keyword dAsmOpCode contained xorps
syn keyword dAsmOpCode contained addsubpd addsubps fisttp haddpd haddps
syn keyword dAsmOpCode contained hsubpd hsubps lddqu monitor movddup
syn keyword dAsmOpCode contained movshdup movsldup mwait
syn keyword dAsmOpCode contained pavgusb pf2id pfacc pfadd pfcmpeq
syn keyword dAsmOpCode contained pfcmpge pfcmpgt pfmax pfmin pfmul
syn keyword dAsmOpCode contained pfnacc pfpnacc pfrcp pfrcpit1 pfrcpit2
syn keyword dAsmOpCode contained pfrsqit1 pfrsqrt pfsub pfsubr pi2fd
syn keyword dAsmOpCode contained pmulhrw pswapd
syn keyword dAsmOpCode contained aaa aad aam aas
syn keyword dAsmOpCode contained add addpd addps addsd
syn keyword dAsmOpCode contained and andnpd andnps andpd
syn keyword dAsmOpCode contained arpl bound bsf bsr
syn keyword dAsmOpCode contained bt btc btr bts
syn keyword dAsmOpCode contained call bswap andps addss
syn keyword dAsmOpCode contained cbw cdq clc cld
syn keyword dAsmOpCode contained cli clts cmc cmova
syn keyword dAsmOpCode contained cmovb cmovbe cmovc cmove
syn keyword dAsmOpCode contained cmovge cmovl cmovle cmovna
syn keyword dAsmOpCode contained cmovnae cmovg cmovae clflush
syn keyword dAsmOpCode contained cmovnb cmovnbe cmovnc cmovne
syn keyword dAsmOpCode contained cmovnge cmovnl cmovnle cmovno
syn keyword dAsmOpCode contained cmovns cmovnz cmovo cmovp
syn keyword dAsmOpCode contained cmovpo cmovs cmovz cmp
syn keyword dAsmOpCode contained cmppd cmovpe cmovnp cmovng
syn keyword dAsmOpCode contained cmpps cmps cmpsb cmpsd
syn keyword dAsmOpCode contained cmpsw cmpxch8b cmpxchg comisd
syn keyword dAsmOpCode contained cpuid cvtdq2pd cvtdq2ps cvtpd2dq
syn keyword dAsmOpCode contained cvtpd2ps cvtpi2pd cvtpi2ps cvtps2dq
syn keyword dAsmOpCode contained cvtps2pd cvtpd2pi comiss cmpss
syn keyword dAsmOpCode contained cvtps2pi cvtsd2si cvtsd2ss cvtsi2sd
syn keyword dAsmOpCode contained cvtss2sd cvtss2si cvttpd2dq cvttpd2pi
syn keyword dAsmOpCode contained cvttps2pi cvttsd2si cvttss2si cwd
syn keyword dAsmOpCode contained da daa das db
syn keyword dAsmOpCode contained dd cwde cvttps2dq cvtsi2ss
syn keyword dAsmOpCode contained de dec df di
syn keyword dAsmOpCode contained divpd divps divsd divss
syn keyword dAsmOpCode contained dq ds dt dw
syn keyword dAsmOpCode contained enter f2xm1 fabs fadd
syn keyword dAsmOpCode contained faddp emms dl div
syn keyword dAsmOpCode contained fbld fbstp fchs fclex
syn keyword dAsmOpCode contained fcmovbe fcmove fcmovnb fcmovnbe
syn keyword dAsmOpCode contained fcmovnu fcmovu fcom fcomi
syn keyword dAsmOpCode contained fcomp fcompp fcos fdecstp
syn keyword dAsmOpCode contained fdisi fcomip fcmovne fcmovb
syn keyword dAsmOpCode contained fdiv fdivp fdivr fdivrp
syn keyword dAsmOpCode contained ffree fiadd ficom ficomp
syn keyword dAsmOpCode contained fidivr fild fimul fincstp
syn keyword dAsmOpCode contained fist fistp fisub fisubr
syn keyword dAsmOpCode contained fld finit fidiv feni
syn keyword dAsmOpCode contained fld1 fldcw fldenv fldl2e
syn keyword dAsmOpCode contained fldlg2 fldln2 fldpi fldz
syn keyword dAsmOpCode contained fmulp fnclex fndisi fneni
syn keyword dAsmOpCode contained fnop fnsave fnstcw fnstenv
syn keyword dAsmOpCode contained fnstsw fninit fmul fldl2t
syn keyword dAsmOpCode contained fpatan fprem fprem1 fptan
syn keyword dAsmOpCode contained frstor fsave fscale fsetpm
syn keyword dAsmOpCode contained fsincos fsqrt fst fstcw
syn keyword dAsmOpCode contained fstp fstsw fsub fsubp
syn keyword dAsmOpCode contained fsubr fstenv fsin frndint
syn keyword dAsmOpCode contained fsubrp ftst fucom fucomi
syn keyword dAsmOpCode contained fucomp fucompp fwait fxam
syn keyword dAsmOpCode contained fxrstor fxsave fxtract fyl2x
syn keyword dAsmOpCode contained hlt idiv imul in
syn keyword dAsmOpCode contained inc fyl2xp1 fxch fucomip
syn keyword dAsmOpCode contained ins insb insd insw
syn keyword dAsmOpCode contained into invd invlpg iret
syn keyword dAsmOpCode contained ja jae jb jbe
syn keyword dAsmOpCode contained jcxz je jecxz jg
syn keyword dAsmOpCode contained jge jc iretd int
syn keyword dAsmOpCode contained jl jle jmp jna
syn keyword dAsmOpCode contained jnb jnbe jnc jne
syn keyword dAsmOpCode contained jnge jnl jnle jno
syn keyword dAsmOpCode contained jns jnz jo jp
syn keyword dAsmOpCode contained jpe jnp jng jnae
syn keyword dAsmOpCode contained jpo js jz lahf
syn keyword dAsmOpCode contained ldmxcsr lds lea leave
syn keyword dAsmOpCode contained lfence lfs lgdt lgs
syn keyword dAsmOpCode contained lldt lmsw lock lods
syn keyword dAsmOpCode contained lodsb lidt les lar
syn keyword dAsmOpCode contained lodsd lodsw loop loope
syn keyword dAsmOpCode contained loopnz loopz lsl lss
syn keyword dAsmOpCode contained maskmovdqu maskmovq maxpd maxps
syn keyword dAsmOpCode contained maxss mfence minpd minps
syn keyword dAsmOpCode contained minsd maxsd ltr loopne
syn keyword dAsmOpCode contained minss mov movapd movaps
syn keyword dAsmOpCode contained movdq2q movdqa movdqu movhlps
syn keyword dAsmOpCode contained movhps movlhps movlpd movlps
syn keyword dAsmOpCode contained movmskps movntdq movnti movntpd
syn keyword dAsmOpCode contained movntps movmskpd movhpd movd
syn keyword dAsmOpCode contained movntq movq movq2dq movs
syn keyword dAsmOpCode contained movsd movss movsw movsx
syn keyword dAsmOpCode contained movups movzx mul mulpd
syn keyword dAsmOpCode contained mulsd mulss neg nop
syn keyword dAsmOpCode contained not mulps movupd movsb
syn keyword dAsmOpCode contained or orpd orps out
syn keyword dAsmOpCode contained outsb outsd outsw packssdw
syn keyword dAsmOpCode contained packuswb paddb paddd paddq
syn keyword dAsmOpCode contained paddsw paddusb paddusw paddw
syn keyword dAsmOpCode contained pand paddsb packsswb outs
syn keyword dAsmOpCode contained pandn pavgb pavgw pcmpeqb
syn keyword dAsmOpCode contained pcmpeqw pcmpgtb pcmpgtd pcmpgtw
syn keyword dAsmOpCode contained pinsrw pmaddwd pmaxsw pmaxub
syn keyword dAsmOpCode contained pminub pmovmskb pmulhuw pmulhw
syn keyword dAsmOpCode contained pmullw pminsw pextrw pcmpeqd
syn keyword dAsmOpCode contained pmuludq pop popa popad
syn keyword dAsmOpCode contained popfd por prefetchnta prefetcht0
syn keyword dAsmOpCode contained prefetcht2 psadbw pshufd pshufhw
syn keyword dAsmOpCode contained pshufw pslld pslldq psllq
syn keyword dAsmOpCode contained psllw pshuflw prefetcht1 popf
syn keyword dAsmOpCode contained psrad psraw psrld psrldq
syn keyword dAsmOpCode contained psrlw psubb psubd psubq
syn keyword dAsmOpCode contained psubsw psubusb psubusw psubw
syn keyword dAsmOpCode contained punpckhdq punpckhqdq punpckhwd punpcklbw
syn keyword dAsmOpCode contained punpckldq punpckhbw psubsb psrlq
syn keyword dAsmOpCode contained punpcklqdq punpcklwd push pusha
syn keyword dAsmOpCode contained pushf pushfd pxor rcl
syn keyword dAsmOpCode contained rcpss rcr rdmsr rdpmc
syn keyword dAsmOpCode contained rep repe repne repnz
syn keyword dAsmOpCode contained repz rdtsc rcpps pushad
syn keyword dAsmOpCode contained ret retf rol ror
syn keyword dAsmOpCode contained rsqrtps rsqrtss sahf sal
syn keyword dAsmOpCode contained sbb scas scasb scasd
syn keyword dAsmOpCode contained seta setae setb setbe
syn keyword dAsmOpCode contained setc scasw sar rsm
syn keyword dAsmOpCode contained sete setg setge setl
syn keyword dAsmOpCode contained setna setnae setnb setnbe
syn keyword dAsmOpCode contained setne setng setnge setnl
syn keyword dAsmOpCode contained setno setnp setns setnz
syn keyword dAsmOpCode contained seto setnle setnc setle
syn keyword dAsmOpCode contained setp setpe setpo sets
syn keyword dAsmOpCode contained sfence sgdt shl shld
syn keyword dAsmOpCode contained shrd shufpd shufps sidt
syn keyword dAsmOpCode contained smsw sqrtpd sqrtps sqrtsd
syn keyword dAsmOpCode contained sqrtss sldt shr setz
syn keyword dAsmOpCode contained stc std sti stmxcsr
syn keyword dAsmOpCode contained stosb stosd stosw str
syn keyword dAsmOpCode contained subpd subps subsd subss
syn keyword dAsmOpCode contained sysexit test ucomisd ucomiss
syn keyword dAsmOpCode contained ud2 sysenter sub stos
syn keyword dAsmOpCode contained unpckhpd unpckhps unpcklpd unpcklps
syn keyword dAsmOpCode contained verw wbinvd wrmsr xadd
syn keyword dAsmOpCode contained xchg xlatb xor xorpd
syn keyword dAsmOpCode contained xorps pfrcpit1 pfmin movddup
syn keyword dAsmOpCode contained addsubpd addsubps fisttp haddps
syn keyword dAsmOpCode contained hsubpd hsubps lddqu monitor
syn keyword dAsmOpCode contained haddpd xlat wait verr
syn keyword dAsmOpCode contained movshdup movsldup mwait pfcmpeq
syn keyword dAsmOpCode contained pavgusb pf2id pfacc pfadd
syn keyword dAsmOpCode contained pfcmpge pfcmpgt pfmax pfmul
syn keyword dAsmOpCode contained pfnacc pfpnacc pfrcp pfrcpit1
syn keyword dAsmOpCode contained pfrsqit1 pfrsqrt pfsub pfsubr
syn keyword dAsmOpCode contained pmulhrw pswapd syscall sysret
syn keyword dAsmOpCode contained vpmuldq xgetbv cmpxchg8b cmpxchg16b
syn keyword dAsmOpCode contained pabsb pabsd pabsw palignr
syn keyword dAsmOpCode contained phaddd phaddsw phaddw phsubd
syn keyword dAsmOpCode contained phsubsw phsubw pmaddubsw pmulhrsw
syn keyword dAsmOpCode contained pshufb psignb psignd psignw
syn keyword dAsmOpCode contained popfq pushfq blendpd blendps
syn keyword dAsmOpCode contained blendvpd blendvps extractps insertps
syn keyword dAsmOpCode contained movntdqa mpsadbw packusdw pblendvb
syn keyword dAsmOpCode contained pblendw pcmpeqq pextrb pextrd
syn keyword dAsmOpCode contained pextrq phminposuw pinsrb pinsrd
syn keyword dAsmOpCode contained pinsrq pmaxsb pmaxsd pmaxud
syn keyword dAsmOpCode contained pmaxuw pminsb pminsd pminud
syn keyword dAsmOpCode contained pminuw pmulld ptest roundpd
syn keyword dAsmOpCode contained roundps roundsd roundss pmuldq
syn keyword dAsmOpCode contained pmovsxbd pmovsxdq pmovzxbq pmovzxdq
syn keyword dAsmOpCode contained pmovsxbq pmovsxwd pmovzxbq pmovzxwd
syn keyword dAsmOpCode contained pmovsxbw pmovsxwq pmovzxbw pmovzxwq
syn keyword dAsmOpCode contained crc32 pcmpestri pcmpestrm pcmpgtq
syn keyword dAsmOpCode contained pcmpistri pcmpistrm popcnt pi2fd
syn keyword dAsmOpCode contained adc
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -1,23 +1,32 @@
" Vim syntax file
" Language: Erlang (http://www.erlang.org)
" Maintainer: Csaba Hoch <csaba.hoch@gmail.com>
" Former Maintainer: Kreąimir Marľić (Kresimir Marzic) <kmarzic@fly.srk.fer.hr>
" Last Update: 2013-Mar-07
" Last Update: 2013-Jun-01
" License: Vim license
" URL: https://github.com/hcs42/vim-erlang
" Acknowledgements: This script was originally created by Kresimir Marzic [1].
" The script was then revamped by Csaba Hoch [2]. During the revamp, the new
" highlighting style and some code was taken from the Erlang syntax script
" that is part of vimerl [3], created by Oscar Hellström [4] and improved by
" Ricardo Catalinas Jiménez [5].
" [1]: Kreąimir Marľić (Kresimir Marzic) <kmarzic@fly.srk.fer.hr>
" [2]: Csaba Hoch <csaba.hoch@gmail.com>
" [3]: https://github.com/jimenezrick/vimerl
" [4]: Oscar Hellström <oscar@oscarh.net> (http://oscar.hellstrom.st)
" [5]: Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
" Customization:
"
" There are two optional sets of highlighting:
" To use the old highlighting style, add this to your .vimrc:
"
" 1. The BIFs (built-in functions) are highlighted by default. To disable
" this, put the following line in your vimrc:
" let g:erlang_old_style_highlight = 1
"
" let g:erlang_highlight_bifs = 0
" To highlight further module attributes, add them to
" ~/.vim/after/syntax/erlang.vim:
"
" 2. To enable highlighting some special atoms, put this in your vimrc:
"
" let g:erlang_highlight_special_atoms = 1
" syn keyword erlangAttribute myattr1 myattr2 contained
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -35,94 +44,108 @@ if version >= 600
endif
" Comments
syn match erlangComment '%.*$' contains=erlangCommentAnnotation,erlangTodo
syn match erlangCommentAnnotation ' \@<=@\%(clear\|docfile\|end\|headerfile\|todo\|TODO\|type\|author\|copyright\|doc\|reference\|see\|since\|title\|version\|deprecated\|hidden\|private\|equiv\|spec\|throws\)' contained
syn match erlangCommentAnnotation /`[^']*'/ contained
syn keyword erlangTodo TODO FIXME XXX contained
syn match erlangComment '%.*$' contains=erlangCommentAnnotation,erlangTodo
syn match erlangCommentAnnotation ' \@<=@\%(clear\|docfile\|end\|headerfile\|todo\|TODO\|type\|author\|copyright\|doc\|reference\|see\|since\|title\|version\|deprecated\|hidden\|private\|equiv\|spec\|throws\)' contained
syn match erlangCommentAnnotation /`[^']*'/ contained
syn keyword erlangTodo TODO FIXME XXX contained
syn match erlangShebang '^#!.*'
" Numbers (minimum base is 2, maximum is 36.)
syn match erlangNumberInteger '\<\d\+\>'
syn match erlangNumberInteger '\<\%([2-9]\|[12]\d\|3[0-6]\)\+#[[:alnum:]]\+\>'
syn match erlangNumberFloat '\<\d\+\.\d\+\%([eE][+-]\=\d\+\)\=\>'
syn match erlangNumberInteger '\<\d\+\>'
syn match erlangNumberInteger '\<\%([2-9]\|[12]\d\|3[0-6]\)\+#[[:alnum:]]\+\>'
syn match erlangNumberFloat '\<\d\+\.\d\+\%([eE][+-]\=\d\+\)\=\>'
" Strings, atoms, characters
syn region erlangString start=/"/ end=/"/ contains=erlangStringModifier
syn region erlangQuotedAtom start=/'/ end=/'/ contains=erlangQuotedAtomModifier
syn match erlangStringModifier '\~\a\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)' contained
syn match erlangQuotedAtomModifier '\~\a\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)' contained
syn match erlangModifier '\$\%([^\\]\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)\)'
syn region erlangString start=/"/ end=/"/ contains=erlangStringModifier
syn region erlangQuotedAtom start=/'/ end=/'/ contains=erlangQuotedAtomModifier
syn match erlangStringModifier '\~\a\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)' contained
syn match erlangQuotedAtomModifier '\~\a\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)' contained
syn match erlangModifier '\$\%([^\\]\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)\)'
" Operators
syn match erlangOperator '==\|=:=\|/=\|=/=\|<\|=<\|>\|>=\|++\|--\|=\|!\|<-\|+\|-\|\*\|\/'
syn keyword erlangOperator div rem or xor bor bxor bsl bsr and band not bnot andalso orelse
" Operators, separators
syn match erlangOperator '==\|=:=\|/=\|=/=\|<\|=<\|>\|>=\|++\|--\|=\|!\|<-\|+\|-\|\*\|\/'
syn keyword erlangOperator div rem or xor bor bxor bsl bsr and band not bnot andalso orelse
syn match erlangBracket '{\|}\|\[\|]\||\|||'
syn match erlangPipe '|'
syn match erlangRightArrow '->'
" Separators
syn match erlangSeparator '(\|)\|{\|}\|\[\|]\||\|||\|;\|,\|?\|#'
syn match erlangRightArrow '->'
" Atoms, function calls (order is important)
syn match erlangAtom '\<\l[[:alnum:]_@]*' contains=erlangBoolean
syn keyword erlangBoolean true false contained
syn match erlangLocalFuncCall '\<\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*(\)\@=' contains=erlangBIF
syn match erlangLocalFuncRef '\<\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*/\)\@='
syn match erlangGlobalFuncCall '\<\%(\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*\.\%(\s\|\n\|%.*\n\)*\)*\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*:\%(\s\|\n\|%.*\n\)*\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*(\)\@=' contains=erlangComment
syn match erlangGlobalFuncRef '\<\%(\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*\.\%(\s\|\n\|%.*\n\)*\)*\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*:\%(\s\|\n\|%.*\n\)*\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*/\)\@=' contains=erlangComment
" Functions call
syn match erlangFCall '\<\%(\a[[:alnum:]@]*\s*\.\s*\)*\a[[:alnum:]@]*\s*:\s*\a[[:alnum:]@]*\>'
" Variables, macros, records
syn match erlangVariable '\<[A-Z_][[:alnum:]_@]*'
syn match erlangMacro '??\=[[:alnum:]_@]\+'
syn match erlangMacro '\%(-define(\)\@<=[[:alnum:]_@]\+'
syn match erlangRecord '#\s*\l[[:alnum:]_@]*'
" Bitstrings
syn match erlangBitType '\%(\/\%(\s\|\n\|%.*\n\)*\)\@<=\%(integer\|float\|binary\|bytes\|bitstring\|bits\|binary\|utf8\|utf16\|utf32\|signed\|unsigned\|big\|little\|native\|unit\)\%(\%(\s\|\n\|%.*\n\)*-\%(\s\|\n\|%.*\n\)*\%(integer\|float\|binary\|bytes\|bitstring\|bits\|binary\|utf8\|utf16\|utf32\|signed\|unsigned\|big\|little\|native\|unit\)\)*' contains=erlangComment
" Constants and Directives
syn match erlangDirective '-\%(behaviour\|behavior\|compile\|define\|else\|endif\|export\|file\|ifdef\|ifndef\|import\|include_lib\|include\|module\|record\|undef\|author\|copyright\|doc\|vsn\|on_load\|export_type\)\>'
syn match erlangUnknownAttribute '-\%(\s\|\n\|%.*\n\)*\l[[:alnum:]_@]*' contains=erlangComment
syn match erlangAttribute '-\%(\s\|\n\|%.*\n\)*\%(behaviou\=r\|compile\|export\|file\|import\|module\|author\|copyright\|doc\|vsn\|on_load\|export_type\)' contains=erlangComment
syn match erlangInclude '-\%(\s\|\n\|%.*\n\)*\%(include\|include_lib\)\>' contains=erlangComment
syn match erlangRecordDef '-\%(\s\|\n\|%.*\n\)*record\>' contains=erlangComment
syn match erlangDefine '-\%(\s\|\n\|%.*\n\)*\%(define\|undef\)\>' contains=erlangComment
syn match erlangPreCondit '-\%(\s\|\n\|%.*\n\)*\%(ifdef\|ifndef\|else\|endif\)\>' contains=erlangComment
syn match erlangType '-\%(\s\|\n\|%.*\n\)*\%(spec\|type\|opaque\|callback\)\>' contains=erlangComment
" Keywords
syn keyword erlangKeyword after begin case catch cond end fun if let of query receive when try
syn keyword erlangExtra true false
syn keyword erlangKeyword after begin case catch cond end fun if let of query
syn keyword erlangKeyword receive when try
if !exists("g:erlang_highlight_bifs") || g:erlang_highlight_bifs == 1
" build-in-functions (BIFs)
syn keyword erlangBIF abs alive apply atom_to_binary atom_to_list binary_part binary_to_atom binary_to_existing_atom binary_to_float binary_to_integer bitstring_to_list binary_to_list binary_to_term bit_size byte_size check_old_code check_process_code concat_binary date delete_module demonitor disconnect_node element erase error exit float float_to_binary float_to_list garbage_collect get get_keys group_leader halt hd integer_to_binary integer_to_list iolist_to_binary iolist_size is_alive is_atom is_binary is_bitstring is_boolean is_float is_function is_integer is_list is_number is_pid is_port is_process_alive is_record is_reference is_tuple length link list_to_atom list_to_binary list_to_bitstring list_to_existing_atom list_to_float list_to_integer list_to_pid list_to_tuple load_module make_ref max min module_loaded monitor monitor_node node nodes now open_port pid_to_list port_close port_command port_connect pre_loaded process_flag process_flag process_info process purge_module put register registered round self setelement size spawn spawn_link spawn_monitor spawn_opt split_binary statistics term_to_binary throw time tl trunc tuple_size tuple_to_list unlink unregister whereis
endif
if exists("g:erlang_highlight_special_atoms") && g:erlang_highlight_special_atoms == 1
" Processes
syn keyword erlangProcess creation current_function dictionary
syn keyword erlangProcess group_leader heap_size high initial_call
syn keyword erlangProcess linked low memory_in_use message_queue
syn keyword erlangProcess net_kernel node normal priority
syn keyword erlangProcess reductions registered_name runnable
syn keyword erlangProcess running stack_trace status timer
syn keyword erlangProcess trap_exit waiting
" Ports
syn keyword erlangPort command count_in count_out creation in
syn keyword erlangPort in_format linked node out owner packeting
" Nodes
syn keyword erlangNode atom_tables communicating creation
syn keyword erlangNode current_gc current_reductions current_runtime
syn keyword erlangNode current_wall_clock distribution_port
syn keyword erlangNode entry_points error_handler friends
syn keyword erlangNode garbage_collection magic_cookie magic_cookies
syn keyword erlangNode module_table monitored_nodes name next_ref
syn keyword erlangNode ports preloaded processes reductions
syn keyword erlangNode ref_state registry runtime wall_clock
" Reserved
syn keyword erlangReserved apply_lambda module_info module_lambdas
syn keyword erlangReserved record record_index record_info
" Extras
syn keyword erlangExtra badarg nocookie
" Signals
syn keyword erlangSignal badsig kill killed exit normal
endif
" Build-in-functions (BIFs)
syn keyword erlangBIF abs alive apply atom_to_binary atom_to_list contained
syn keyword erlangBIF binary_part binary_to_atom contained
syn keyword erlangBIF binary_to_existing_atom binary_to_float contained
syn keyword erlangBIF binary_to_integer bitstring_to_list contained
syn keyword erlangBIF binary_to_list binary_to_term bit_size contained
syn keyword erlangBIF byte_size check_old_code check_process_code contained
syn keyword erlangBIF concat_binary date delete_module demonitor contained
syn keyword erlangBIF disconnect_node element erase error exit contained
syn keyword erlangBIF float float_to_binary float_to_list contained
syn keyword erlangBIF garbage_collect get get_keys group_leader contained
syn keyword erlangBIF halt hd integer_to_binary integer_to_list contained
syn keyword erlangBIF iolist_to_binary iolist_size is_alive contained
syn keyword erlangBIF is_atom is_binary is_bitstring is_boolean contained
syn keyword erlangBIF is_float is_function is_integer is_list contained
syn keyword erlangBIF is_number is_pid is_port is_process_alive contained
syn keyword erlangBIF is_record is_reference is_tuple length link contained
syn keyword erlangBIF list_to_atom list_to_binary contained
syn keyword erlangBIF list_to_bitstring list_to_existing_atom contained
syn keyword erlangBIF list_to_float list_to_integer list_to_pid contained
syn keyword erlangBIF list_to_tuple load_module make_ref max min contained
syn keyword erlangBIF module_loaded monitor monitor_node node contained
syn keyword erlangBIF nodes now open_port pid_to_list port_close contained
syn keyword erlangBIF port_command port_connect pre_loaded contained
syn keyword erlangBIF process_flag process_flag process_info contained
syn keyword erlangBIF process purge_module put register registered contained
syn keyword erlangBIF round self setelement size spawn spawn_link contained
syn keyword erlangBIF spawn_monitor spawn_opt split_binary contained
syn keyword erlangBIF statistics term_to_binary throw time tl contained
syn keyword erlangBIF trunc tuple_size tuple_to_list unlink contained
syn keyword erlangBIF unregister whereis contained
" Sync at the beginning of functions: if this is not used, multiline string
" are not always recognized
" are not always recognized, and the indentation script cannot use the
" "searchpair" (because it would not always skip strings and comments when
" looking for keywords and opening parens/brackets).
syn sync match erlangSync grouphere NONE "^[a-z]\s*("
let b:erlang_syntax_synced = 1
" Define the default highlighting. See ":help group-name" for the groups and
" their colors.
let s:old_style = (exists("g:erlang_old_style_highlight") && g:erlang_old_style_highlight == 1)
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists ("did_erlang_inits")
if version >= 508 || !exists("did_erlang_inits")
if version < 508
let did_erlang_inits = 1
command -nargs=+ HiLink hi link <args>
@@ -130,46 +153,106 @@ if version >= 508 || !exists ("did_erlang_inits")
command -nargs=+ HiLink hi def link <args>
endif
" erlang_characters
" Comments
HiLink erlangComment Comment
HiLink erlangCommentAnnotation Special
HiLink erlangTodo Todo
HiLink erlangSeparator Normal
HiLink erlangOperator Operator
HiLink erlangRightArrow Operator
HiLink erlangStartString String
HiLink erlangString String
HiLink erlangStringModifier Special
HiLink erlangStartQuotedAtom Type
HiLink erlangQuotedAtom Type
HiLink erlangQuotedAtomModifier Special
HiLink erlangShebang Comment
" Numbers
HiLink erlangNumberInteger Number
HiLink erlangNumberFloat Float
HiLink erlangNumberHex Number
" Strings, atoms, characters
HiLink erlangString String
if s:old_style
HiLink erlangQuotedAtom Type
else
HiLink erlangQuotedAtom String
endif
HiLink erlangStringModifier Special
HiLink erlangQuotedAtomModifier Special
HiLink erlangModifier Special
" erlang_functions
HiLink erlangFCall Function
" Operators, separators
HiLink erlangOperator Operator
HiLink erlangRightArrow Operator
if s:old_style
HiLink erlangBracket Normal
HiLink erlangPipe Normal
else
HiLink erlangBracket Delimiter
HiLink erlangPipe Delimiter
endif
" Atoms, functions, variables, macros
if s:old_style
HiLink erlangAtom Normal
HiLink erlangLocalFuncCall Normal
HiLink erlangLocalFuncRef Normal
HiLink erlangGlobalFuncCall Function
HiLink erlangGlobalFuncRef Function
HiLink erlangVariable Normal
HiLink erlangMacro Normal
HiLink erlangRecord Normal
else
HiLink erlangAtom String
HiLink erlangLocalFuncCall Normal
HiLink erlangLocalFuncRef Normal
HiLink erlangGlobalFuncCall Normal
HiLink erlangGlobalFuncRef Normal
HiLink erlangVariable Identifier
HiLink erlangMacro Macro
HiLink erlangRecord Structure
endif
" Bitstrings
if !s:old_style
HiLink erlangBitType Type
endif
" Constants and Directives
if s:old_style
HiLink erlangAttribute Type
HiLink erlangMacroDef Type
HiLink erlangUnknownAttribute Normal
HiLink erlangInclude Type
HiLink erlangRecordDef Type
HiLink erlangDefine Type
HiLink erlangPreCondit Type
HiLink erlangType Type
else
HiLink erlangAttribute Keyword
HiLink erlangMacroDef Macro
HiLink erlangUnknownAttribute Normal
HiLink erlangInclude Include
HiLink erlangRecordDef Keyword
HiLink erlangDefine Define
HiLink erlangPreCondit PreCondit
HiLink erlangType Type
endif
" Keywords
HiLink erlangKeyword Keyword
" Build-in-functions (BIFs)
HiLink erlangBIF Function
" erlang_keywords
HiLink erlangDirective Type
HiLink erlangKeyword Keyword
HiLink erlangProcess Special
HiLink erlangPort Special
HiLink erlangNode Special
HiLink erlangReserved Statement
HiLink erlangExtra Statement
HiLink erlangSignal Statement
if s:old_style
HiLink erlangBoolean Statement
HiLink erlangExtra Statement
HiLink erlangSignal Statement
else
HiLink erlangBoolean Boolean
HiLink erlangExtra Statement
HiLink erlangSignal Statement
endif
delcommand HiLink
endif
let b:current_syntax = "erlang"
" vim: sw=2 et

View File

@@ -1,9 +1,7 @@
" Vim syntax file
" Language: eRuby
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2010 Apr 15
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
if exists("b:current_syntax")
@@ -18,12 +16,11 @@ if !exists("g:eruby_default_subtype")
let g:eruby_default_subtype = "html"
endif
if !exists("b:eruby_subtype") && main_syntax == 'eruby'
if &filetype =~ '^eruby\.'
let b:eruby_subtype = matchstr(&filetype,'^eruby\.\zs\w\+')
elseif !exists("b:eruby_subtype") && main_syntax == 'eruby'
let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$")
let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+')
if b:eruby_subtype == ''
let b:eruby_subtype = matchstr(&filetype,'^eruby\.\zs\w\+')
endif
if b:eruby_subtype == ''
let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+$')
endif
@@ -61,7 +58,7 @@ syn cluster erubyRegions contains=erubyOneLiner,erubyBlock,erubyExpression,eruby
exe 'syn region erubyOneLiner matchgroup=erubyDelimiter start="^%\{1,'.b:eruby_nest_level.'\}%\@!" end="$" contains=@rubyTop containedin=ALLBUT,@erubyRegions keepend oneline'
exe 'syn region erubyBlock matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}%\@!-\=" end="[=-]\=%\@<!%\{1,'.b:eruby_nest_level.'\}>" contains=@rubyTop containedin=ALLBUT,@erubyRegions keepend'
exe 'syn region erubyExpression matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}=\{1,4}" end="[=-]\=%\@<!%\{1,'.b:eruby_nest_level.'\}>" contains=@rubyTop containedin=ALLBUT,@erubyRegions keepend'
exe 'syn region erubyComment matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}#" end="%\@<!%\{1,'.b:eruby_nest_level.'\}>" contains=rubyTodo,@Spell containedin=ALLBUT,@erubyRegions keepend'
exe 'syn region erubyComment matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}-\=#" end="[=-]\=%\@<!%\{1,'.b:eruby_nest_level.'\}>" contains=rubyTodo,@Spell containedin=ALLBUT,@erubyRegions keepend'
" Define the default highlighting.

View File

@@ -12,23 +12,23 @@ elseif exists("b:current_syntax")
endif
"All options
:syntax keyword esmtprcOptions hostname username password starttls certificate_passphrase preconnect identity mda
syntax keyword esmtprcOptions hostname username password starttls certificate_passphrase preconnect identity mda
"All keywords
:syntax keyword esmtprcIdentifier default enabled disabled required
syntax keyword esmtprcIdentifier default enabled disabled required
"We're trying to be smarer than /."*@.*/ :)
:syntax match esmtprcAddress /[a-z0-9_.-]*[a-z0-9]\+@[a-z0-9_.-]*[a-z0-9]\+\.[a-z]\+/
:syntax match esmtprcFulladd /[a-z0-9_.-]*[a-z0-9]\+\.[a-z]\+:[0-9]\+/
syntax match esmtprcAddress /[a-z0-9_.-]*[a-z0-9]\+@[a-z0-9_.-]*[a-z0-9]\+\.[a-z]\+/
syntax match esmtprcFulladd /[a-z0-9_.-]*[a-z0-9]\+\.[a-z]\+:[0-9]\+/
"String..
:syntax region esmtprcString start=/"/ end=/"/
syntax region esmtprcString start=/"/ end=/"/
:highlight link esmtprcOptions Label
:highlight link esmtprcString String
:highlight link esmtprcAddress Type
:highlight link esmtprcIdentifier Identifier
:highlight link esmtprcFulladd Include
highlight link esmtprcOptions Label
highlight link esmtprcString String
highlight link esmtprcAddress Type
highlight link esmtprcIdentifier Identifier
highlight link esmtprcFulladd Include
let b:current_syntax="esmtprc"
let b:current_syntax = "esmtprc"

View File

@@ -3,8 +3,8 @@
" Maintainer: Steven Oliver <oliver.steven@gmail.com>
" Website: http://github.com/steveno/vim-files/blob/master/syntax/falcon.vim
" Credits: Thanks the ruby.vim authors, I borrowed a lot!
" Thanks to the lisp authors for the rainbow code!
" -------------------------------------------------------------------------------
" GetLatestVimScripts: 2745 1 :AutoInstall: falcon.vim
" When wanted, highlight the trailing whitespace.
if exists("c_space_errors")
@@ -56,6 +56,7 @@ syn keyword falconBool true false
" Constants
syn keyword falconConst PI E nil
syn match falconConstant "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=\%(\s*(\)\@!"
" Comments
syn match falconCommentSkip contained "^\s*\*\($\|\s\+\)"
@@ -116,6 +117,47 @@ syn region falconString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<
syn region falconString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-'\z([^']*\)'\ze+hs=s+3 matchgroup=falconStringDelimiter end=+^\s*\zs\z1$+ fold keepend
syn region falconString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-`\z([^`]*\)`\ze+hs=s+3 matchgroup=falconStringDelimiter end=+^\s*\zs\z1$+ contains=falconStringEscape fold keepend
" Falcon rainbox to highlight parens in varying colors
if exists("g:falcon_rainbow") && g:falcon_rainbow != 0
syn region falconParen0 matchgroup=hlLevel0 start="`\=(" end=")" skip="|.\{-}|" contains=@falconListCluster,falconParen1
syn region falconParen1 contained matchgroup=hlLevel1 start="`\=(" end=")" skip="|.\{-}|" contains=@falconListCluster,falconParen2
syn region falconParen2 contained matchgroup=hlLevel2 start="`\=(" end=")" skip="|.\{-}|" contains=@falconListCluster,falconParen3
syn region falconParen3 contained matchgroup=hlLevel3 start="`\=(" end=")" skip="|.\{-}|" contains=@falconListCluster,falconParen4
syn region falconParen4 contained matchgroup=hlLevel4 start="`\=(" end=")" skip="|.\{-}|" contains=@falconListCluster,falconParen5
syn region falconParen5 contained matchgroup=hlLevel5 start="`\=(" end=")" skip="|.\{-}|" contains=@falconListCluster,falconParen6
syn region falconParen6 contained matchgroup=hlLevel6 start="`\=(" end=")" skip="|.\{-}|" contains=@falconListCluster,falconParen7
syn region falconParen7 contained matchgroup=hlLevel7 start="`\=(" end=")" skip="|.\{-}|" contains=@falconListCluster,falconParen8
syn region falconParen8 contained matchgroup=hlLevel8 start="`\=(" end=")" skip="|.\{-}|" contains=@falconListCluster,falconParen9
syn region falconParen9 contained matchgroup=hlLevel9 start="`\=(" end=")" skip="|.\{-}|" contains=@falconListCluster,falconParen0
endif
" Setup the colors for the rainbox
if exists("g:falcon_rainbow") && g:falcon_rainbow != 0
if &bg == "dark"
hi def hlLevel0 ctermfg=red guifg=red1
hi def hlLevel1 ctermfg=yellow guifg=orange1
hi def hlLevel2 ctermfg=green guifg=yellow1
hi def hlLevel3 ctermfg=cyan guifg=greenyellow
hi def hlLevel4 ctermfg=magenta guifg=green1
hi def hlLevel5 ctermfg=red guifg=springgreen1
hi def hlLevel6 ctermfg=yellow guifg=cyan1
hi def hlLevel7 ctermfg=green guifg=slateblue1
hi def hlLevel8 ctermfg=cyan guifg=magenta1
hi def hlLevel9 ctermfg=magenta guifg=purple1
else
hi def hlLevel0 ctermfg=red guifg=red3
hi def hlLevel1 ctermfg=darkyellow guifg=orangered3
hi def hlLevel2 ctermfg=darkgreen guifg=orange2
hi def hlLevel3 ctermfg=blue guifg=yellow3
hi def hlLevel4 ctermfg=darkmagenta guifg=olivedrab4
hi def hlLevel5 ctermfg=red guifg=green4
hi def hlLevel6 ctermfg=darkyellow guifg=paleturquoise3
hi def hlLevel7 ctermfg=darkgreen guifg=deepskyblue4
hi def hlLevel8 ctermfg=blue guifg=darkslateblue
hi def hlLevel9 ctermfg=darkmagenta guifg=darkviolet
endif
endif
" Syntax Synchronizing
syn sync minlines=10 maxlines=100
@@ -132,6 +174,7 @@ if !exists("did_falcon_syn_inits")
HiLink falconComment Comment
HiLink falconCommentL Comment
HiLink falconConst Constant
HiLink falconConstants Constant
HiLink falconOperator Operator
HiLink falconSymbol Normal
HiLink falconSpaceError Error
@@ -153,3 +196,4 @@ endif
let b:current_syntax = "falcon"
" vim: set sw=4 sts=4 et tw=80 :

View File

@@ -2,7 +2,7 @@
" Language: git commit file
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Filenames: *.git/COMMIT_EDITMSG
" Last Change: 2012 April 7
" Last Change: 2013 May 30
if exists("b:current_syntax")
finish

View File

@@ -2,7 +2,7 @@
" Language: git rebase --interactive
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Filenames: git-rebase-todo
" Last Change: 2012 April 7
" Last Change: 2013 May 30
if exists("b:current_syntax")
finish

69
runtime/syntax/gprof.vim Normal file
View File

@@ -0,0 +1,69 @@
" Vim syntax file
" Language: Syntax for Gprof Output
" Maintainer: Dominique Pelle <dominique.pelle@gmail.com>
" Last Change: 2013 Jun 09
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
let s:keepcpo= &cpo
set cpo&vim
syn case match
syn sync minlines=100
" Flat profile
syn match gprofFlatProfileTitle
\ "^Flat profile:$"
syn region gprofFlatProfileHeader
\ start="^Each sample counts as.*"
\ end="^ time.*name\s*$"
syn region gprofFlatProfileTrailer
\ start="^\s*%\s\+the percentage of the total running time.*"
\ end="^\s*the gprof listing if it were to be printed\."
" Call graph
syn match gprofCallGraphTitle "Call graph (explanation follows)"
syn region gprofCallGraphHeader
\ start="^granularity: each sample hit covers.*"
\ end="^\s*index % time\s\+self\s\+children\s\+called\s\+name$"
syn match gprofCallGraphFunction "\s\+\(\d\+\.\d\+\s\+\)\{3}\([0-9+]\+\)\?\s\+[a-zA-Z_<].*\ze\["
syn match gprofCallGraphSeparator "^-\+$"
syn region gprofCallGraphTrailer
\ start="This table describes the call tree of the program"
\ end="^\s*the cycle\.$"
" Index
syn region gprofIndex
\ start="^Index by function name$"
\ end="\%$"
syn match gprofIndexFunctionTitle "^Index by function name$"
syn match gprofNumbers "^\s\+[0-9 ./+]\+"
syn match gprofFunctionIndex "\[\d\+\]"
syn match gprofSpecial "<\(spontaneous\|cycle \d\+\)>"
hi def link gprofFlatProfileTitle Title
hi def link gprofFlatProfileHeader Comment
hi def link gprofFlatProfileFunction Number
hi def link gprofFlatProfileTrailer Comment
hi def link gprofCallGraphTitle Title
hi def link gprofCallGraphHeader Comment
hi def link gprofFlatProfileFunction Number
hi def link gprofCallGraphFunction Special
hi def link gprofCallGraphTrailer Comment
hi def link gprofCallGraphSeparator Label
hi def link gprofFunctionIndex Label
hi def link gprofSpecial SpecialKey
hi def link gprofNumbers Number
hi def link gprofIndexFunctionTitle Title
let b:current_syntax = "gprof"
let &cpo = s:keepcpo
unlet s:keepcpo

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Vim help file
" Maintainer: Bram Moolenaar (Bram@vim.org)
" Last Change: 2013 Apr 07
" Last Change: 2013 Jun 02
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")

View File

@@ -8,6 +8,7 @@
" (ss) fixed regex parsing issue with multiple qualifiers [gi]
" (ss) additional factoring of keywords, globals, and members
" Last Change: 2012 Oct 05
" 2013 Jun 12: adjusted javaScriptRegexpString (Kevin Locke)
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -42,7 +43,7 @@ syn region javaScriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+ con
syn match javaScriptSpecialCharacter "'\\.'"
syn match javaScriptNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>"
syn region javaScriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gi]\{0,2\}\s*$+ end=+/[gi]\{0,2\}\s*[;.,)\]}]+me=e-1 contains=@htmlPreproc oneline
syn region javaScriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gim]\{0,2\}\s*$+ end=+/[gim]\{0,2\}\s*[;.,)\]}]+me=e-1 contains=@htmlPreproc oneline
syn keyword javaScriptConditional if else switch
syn keyword javaScriptRepeat while for do in

View File

@@ -2,7 +2,7 @@
" Language: Liquid
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Filenames: *.liquid
" Last Change: 2010 May 21
" Last Change: 2013 May 30
if exists('b:current_syntax')
finish
@@ -71,8 +71,9 @@ endif
syn region liquidStatement matchgroup=liquidDelimiter start="{%" end="%}" contains=@liquidStatement containedin=ALLBUT,@liquidExempt keepend
syn region liquidExpression matchgroup=liquidDelimiter start="{{" end="}}" contains=@liquidExpression containedin=ALLBUT,@liquidExempt keepend
syn region liquidComment matchgroup=liquidDelimiter start="{%\s*comment\s*%}" end="{%\s*endcomment\s*%}" contains=liquidTodo,@Spell containedin=ALLBUT,@liquidExempt keepend
syn region liquidRaw matchgroup=liquidDelimiter start="{%\s*raw\s*%}" end="{%\s*endraw\s*%}" contains=TOP,@liquidExempt containedin=ALLBUT,@liquidExempt keepend
syn cluster liquidExempt contains=liquidStatement,liquidExpression,liquidComment,@liquidStatement,liquidYamlHead
syn cluster liquidExempt contains=liquidStatement,liquidExpression,liquidComment,liquidRaw,@liquidStatement,liquidYamlHead
syn cluster liquidStatement contains=liquidConditional,liquidRepeat,liquidKeyword,@liquidExpression
syn cluster liquidExpression contains=liquidOperator,liquidString,liquidNumber,liquidFloat,liquidBoolean,liquidNull,liquidEmpty,liquidPipe,liquidForloop

View File

@@ -2,50 +2,66 @@
" Language: Markdown
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Filenames: *.markdown
" Last Change: 2010 May 21
" Last Change: 2013 May 30
if exists("b:current_syntax")
finish
endif
if !exists('main_syntax')
let main_syntax = 'markdown'
endif
runtime! syntax/html.vim
unlet! b:current_syntax
if !exists('g:markdown_fenced_languages')
let g:markdown_fenced_languages = []
endif
for s:type in map(copy(g:markdown_fenced_languages),'matchstr(v:val,"[^=]*$")')
if s:type =~ '\.'
let b:{matchstr(s:type,'[^.]*')}_subtype = matchstr(s:type,'\.\zs.*')
endif
exe 'syn include @markdownHighlight'.substitute(s:type,'\.','','g').' syntax/'.matchstr(s:type,'[^.]*').'.vim'
unlet! b:current_syntax
endfor
unlet! s:type
syn sync minlines=10
syn case ignore
syn match markdownValid '[<>]\S\@!'
syn match markdownValid '[<>]\c[a-z/$!]\@!'
syn match markdownValid '&\%(#\=\w*;\)\@!'
syn match markdownLineStart "^[<@]\@!" nextgroup=@markdownBlock
syn match markdownLineStart "^[<@]\@!" nextgroup=@markdownBlock,htmlSpecialChar
syn cluster markdownBlock contains=markdownH1,markdownH2,markdownH3,markdownH4,markdownH5,markdownH6,markdownBlockquote,markdownListMarker,markdownOrderedListMarker,markdownCodeBlock,markdownRule
syn cluster markdownInline contains=markdownLineBreak,markdownLinkText,markdownItalic,markdownBold,markdownCode,markdownEscape,@htmlTop
syn cluster markdownInline contains=markdownLineBreak,markdownLinkText,markdownItalic,markdownBold,markdownCode,markdownEscape,@htmlTop,markdownError
syn match markdownH1 ".\+\n=\+$" contained contains=@markdownInline,markdownHeadingRule
syn match markdownH2 ".\+\n-\+$" contained contains=@markdownInline,markdownHeadingRule
syn match markdownH1 "^.\+\n=\+$" contained contains=@markdownInline,markdownHeadingRule,markdownAutomaticLink
syn match markdownH2 "^.\+\n-\+$" contained contains=@markdownInline,markdownHeadingRule,markdownAutomaticLink
syn match markdownHeadingRule "^[=-]\+$" contained
syn region markdownH1 matchgroup=markdownHeadingDelimiter start="##\@!" end="#*\s*$" keepend oneline contains=@markdownInline contained
syn region markdownH2 matchgroup=markdownHeadingDelimiter start="###\@!" end="#*\s*$" keepend oneline contains=@markdownInline contained
syn region markdownH3 matchgroup=markdownHeadingDelimiter start="####\@!" end="#*\s*$" keepend oneline contains=@markdownInline contained
syn region markdownH4 matchgroup=markdownHeadingDelimiter start="#####\@!" end="#*\s*$" keepend oneline contains=@markdownInline contained
syn region markdownH5 matchgroup=markdownHeadingDelimiter start="######\@!" end="#*\s*$" keepend oneline contains=@markdownInline contained
syn region markdownH6 matchgroup=markdownHeadingDelimiter start="#######\@!" end="#*\s*$" keepend oneline contains=@markdownInline contained
syn region markdownH1 matchgroup=markdownHeadingDelimiter start="##\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
syn region markdownH2 matchgroup=markdownHeadingDelimiter start="###\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
syn region markdownH3 matchgroup=markdownHeadingDelimiter start="####\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
syn region markdownH4 matchgroup=markdownHeadingDelimiter start="#####\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
syn region markdownH5 matchgroup=markdownHeadingDelimiter start="######\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
syn region markdownH6 matchgroup=markdownHeadingDelimiter start="#######\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
syn match markdownBlockquote ">\s" contained nextgroup=@markdownBlock
syn match markdownBlockquote ">\%(\s\|$\)" contained nextgroup=@markdownBlock
syn region markdownCodeBlock start=" \|\t" end="$" contained
" TODO: real nesting
syn match markdownListMarker " \{0,4\}[-*+]\%(\s\+\S\)\@=" contained
syn match markdownOrderedListMarker " \{0,4}\<\d\+\.\%(\s*\S\)\@=" contained
syn match markdownListMarker "\%(\t\| \{0,4\}\)[-*+]\%(\s\+\S\)\@=" contained
syn match markdownOrderedListMarker "\%(\t\| \{0,4}\)\<\d\+\.\%(\s\+\S\)\@=" contained
syn match markdownRule "\* *\* *\*[ *]*$" contained
syn match markdownRule "- *- *-[ -]*$" contained
syn match markdownLineBreak "\s\{2,\}$"
syn match markdownLineBreak " \{2,\}$"
syn region markdownIdDeclaration matchgroup=markdownLinkDelimiter start="^ \{0,3\}!\=\[" end="\]:" oneline keepend nextgroup=markdownUrl skipwhite
syn match markdownUrl "\S\+" nextgroup=markdownUrlTitle skipwhite contained
@@ -61,14 +77,23 @@ syn region markdownAutomaticLink matchgroup=markdownUrlDelimiter start="<\%(\w\+
syn region markdownItalic start="\S\@<=\*\|\*\S\@=" end="\S\@<=\*\|\*\S\@=" keepend contains=markdownLineStart
syn region markdownItalic start="\S\@<=_\|_\S\@=" end="\S\@<=_\|_\S\@=" keepend contains=markdownLineStart
syn region markdownBold start="\S\@<=\*\*\|\*\*\S\@=" end="\S\@<=\*\*\|\*\*\S\@=" keepend contains=markdownLineStart
syn region markdownBold start="\S\@<=__\|__\S\@=" end="\S\@<=__\|__\S\@=" keepend contains=markdownLineStart
syn region markdownBold start="\S\@<=\*\*\|\*\*\S\@=" end="\S\@<=\*\*\|\*\*\S\@=" keepend contains=markdownLineStart,markdownItalic
syn region markdownBold start="\S\@<=__\|__\S\@=" end="\S\@<=__\|__\S\@=" keepend contains=markdownLineStart,markdownItalic
syn region markdownBoldItalic start="\S\@<=\*\*\*\|\*\*\*\S\@=" end="\S\@<=\*\*\*\|\*\*\*\S\@=" keepend contains=markdownLineStart
syn region markdownBoldItalic start="\S\@<=___\|___\S\@=" end="\S\@<=___\|___\S\@=" keepend contains=markdownLineStart
syn region markdownCode matchgroup=markdownCodeDelimiter start="`" end="`" transparent keepend contains=markdownLineStart
syn region markdownCode matchgroup=markdownCodeDelimiter start="`" end="`" keepend contains=markdownLineStart
syn region markdownCode matchgroup=markdownCodeDelimiter start="`` \=" end=" \=``" keepend contains=markdownLineStart
syn region markdownCode matchgroup=markdownCodeDelimiter start="^\s*```.*$" end="^\s*```\ze\s*$" keepend
if main_syntax ==# 'markdown'
for s:type in g:markdown_fenced_languages
exe 'syn region markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*```'.matchstr(s:type,'[^=]*').'\>.*$" end="^\s*```\ze\s*$" keepend contains=@markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g')
endfor
unlet! s:type
endif
syn match markdownEscape "\\[][\\`*_{}()#+.!-]"
syn match markdownError "\w\@<=_\w\@="
hi def link markdownH1 htmlH1
hi def link markdownH2 htmlH2
@@ -99,7 +124,11 @@ hi def link markdownBoldItalic htmlBoldItalic
hi def link markdownCodeDelimiter Delimiter
hi def link markdownEscape Special
hi def link markdownError Error
let b:current_syntax = "markdown"
if main_syntax ==# 'markdown'
unlet main_syntax
endif
" vim:set sw=2:

View File

@@ -1,123 +1,437 @@
" Vim syntax file
" Language: Objective C
" Maintainer: Kazunobu Kuriyama <kazunobu.kuriyama@nifty.com>
" Ex-maintainer: Anthony Hodsdon <ahodsdon@fastmail.fm>
" First Author: Valentino Kyriakides <1kyriaki@informatik.uni-hamburg.de>
" Last Change: 2013 Feb 20
"
" 2013 Feb 19 Revised based on a patch sent to the maintainer by
" Christos Kontas <xakon@yahoo.com> on 2012 Dec 12.
" Language: Objective-C
" Maintainer: Kazunobu Kuriyama <kazunobu.kuriyama@nifty.com>
" Last Change: 2013 Jun 13
" Remark: Modern Objective-C Edition
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
""" Preparation for loading ObjC stuff
if exists("b:current_syntax")
finish
endif
let s:keepcpo= &cpo
if &filetype != 'objcpp'
syn clear
runtime! syntax/c.vim
endif
let s:cpo_save = &cpo
set cpo&vim
if &filetype != 'objcpp'
" Read the C syntax to start with
if version < 600
source <sfile>:p:h/c.vim
else
runtime! syntax/c.vim
endif
endif
""" ObjC proper stuff follows...
" Objective C extentions follow below
"
" NOTE: Objective C is abbreviated to ObjC/objc
" and uses *.h, *.m as file extensions!
syn keyword objcPreProcMacro __OBJC__ __OBJC2__ __clang__
" Defined Types
syn keyword objcPrincipalType id Class SEL IMP BOOL instancetype
syn keyword objcUsefulTerm nil Nil NO YES
" ObjC keywords, types, type qualifiers etc.
syn keyword objcStatement self super _cmd
syn keyword objcType id Class SEL IMP BOOL
syn keyword objcTypeModifier bycopy in out inout oneway
syn keyword objcConstant nil Nil
" Preprocessor Directives
syn region objcImported display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
syn match objcImported display contained "<[^>]*>"
syn match objcImport display "^\s*\(%:\|#\)\s*import\>\s*["<]" contains=objcImported
" Match the ObjC #import directive (like C's #include)
syn region objcImported display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
syn match objcImported display contained "<[-_0-9a-zA-Z.\/]*>"
syn match objcImport display "^\s*\(%:\|#\)\s*import\>\s*["<]" contains=objcImported
" ObjC Compiler Directives
syn match objcObjDef display /@interface\>\|@implementation\>\|@end\>\|@class\>/
syn match objcProtocol display /@protocol\>\|@optional\>\|@required\>/
syn match objcProperty display /@property\>\|@synthesize\>\|@dynamic\>/
syn match objcIvarScope display /@private\>\|@protected\>\|@public\>/
syn match objcInternalRep display /@selector\>\|@encode\>/
syn match objcException display /@try\>\|@throw\>\|@catch\|@finally\>/
syn match objcThread display /@synchronized\>/
syn match objcPool display /@autoreleasepool\>/
syn match objcModuleImport display /@import\>/
" Match the important ObjC directives
syn match objcScopeDecl "@public\|@private\|@protected"
syn match objcDirective "@interface\|@implementation"
syn match objcDirective "@class\|@end\|@defs"
syn match objcDirective "@encode\|@protocol\|@selector"
syn match objcDirective "@try\|@catch\|@finally\|@throw\|@synchronized"
" New directives introduced with Objc-2.0
syn match objcDirective "@property\|@synthesize\|@dynamic"
syn match objcDirective "@optional\|@required"
syn match objcDirective "@autoreleasepool"
" Match the ObjC method types
"
" NOTE: here I match only the indicators, this looks
" much nicer and reduces cluttering color highlightings.
" However, if you prefer full method declaration matching
" append .* at the end of the next two patterns!
"
syn match objcInstMethod "^\s*-\s*"
syn match objcFactMethod "^\s*+\s*"
" To distinguish from a header inclusion from a protocol list.
syn match objcProtocol display "<[_a-zA-Z][_a-zA-Z0-9]*>" contains=objcType,cType,Type
" To distinguish labels from the keyword for a method's parameter.
syn region objcKeyForMethodParam display
\ start="^\s*[_a-zA-Z][_a-zA-Z0-9]*\s*:\s*("
\ end=")\s*[_a-zA-Z][_a-zA-Z0-9]*"
\ contains=objcType,objcTypeModifier,cType,cStructure,cStorageClass,Type
" Objective-C Constant Strings
syn match objcSpecial display "%@" contained
" ObjC Constant Strings
syn match objcSpecial display contained "%@"
syn region objcString start=+\(@"\|"\)+ skip=+\\\\\|\\"+ end=+"+ contains=cFormat,cSpecial,objcSpecial
" ObjC Hidden Arguments
syn keyword objcHiddenArgument self _cmd super
" ObjC Type Qualifiers for Blocks
syn keyword objcBlocksQualifier __block
" ObjC Type Qualifiers for Object Lifetime
syn keyword objcObjectLifetimeQualifier __strong __weak __unsafe_unretained __autoreleasing
" ObjC Type Qualifiers for Toll-Free Bridge
syn keyword objcTollFreeBridgeQualifier __bridge __bridge_retained __bridge_transfer
" ObjC Type Qualifiers for Remote Messaging
syn match objcRemoteMessagingQualifier display contained /\((\s*oneway\s\+\|(\s*in\s\+\|(\s*out\s\+\|(\s*inout\s\+\|(\s*bycopy\s\+\(in\(out\)\?\|out\)\?\|(\s*byref\s\+\(in\(out\)\?\|out\)\?\)/hs=s+1
" shorthand
syn cluster objcTypeQualifier contains=objcBlocksQualifier,objcObjectLifetimeQualifier,objcTollFreeBridgeQualifier,objcRemoteMessagingQualifier
" ObjC Fast Enumeration
syn match objcFastEnumKeyword display /\sin\(\s\|$\)/
" ObjC Literal Syntax
syn match objcLiteralSyntaxNumber display /@\(YES\>\|NO\>\|\d\|-\|+\)/ contains=cNumber,cFloat,cOctal
syn match objcLiteralSyntaxSpecialChar display /@'/ contains=cSpecialCharacter
syn match objcLiteralSyntaxChar display /@'[^\\]'/
syn match objcLiteralSyntaxOp display /@\((\|\[\|{\)/me=e-1,he=e-1
" ObjC Declared Property Attributes
syn match objDeclPropAccessorNameAssign display /\s*=\s*/ contained
syn region objcDeclPropAccessorName display start=/\(getter\|setter\)/ end=/\h\w*/ contains=objDeclPropAccessorNameAssign
syn keyword objcDeclPropAccessorType readonly readwrite contained
syn keyword objcDeclPropAssignSemantics assign retain copy contained
syn keyword objcDeclPropAtomicity nonatomic contained
syn keyword objcDeclPropARC strong weak contained
syn region objcDeclProp display transparent keepend start=/@property\s*(/ end=/)/ contains=objcProperty,objcDeclPropAccessorName,objcDeclPropAccessorType,objcDeclPropAssignSemantics,objcDeclPropAtomicity,objcDeclPropARC
" To distinguish colons in methods and dictionaries from those in C's labels.
syn match objcColon display /^\s*\h\w*\s*\:\(\s\|.\)/me=e-1,he=e-1
" To distinguish a protocol list from system header files
syn match objcProtocolList display /<\h\w*\(\s*,\s*\h\w*\)*>/ contains=objcPrincipalType,cType,Type
" shorthand
syn cluster objcCEntities contains=cType,cStructure,cStorageClass,cString,cCharacter,cSpecialCharacter,cNumbers,cConstant,cOperator,cComment,cCommentL,cStatement,cLabel,cConditional,cRepeat
syn cluster objcObjCEntities contains=objcHiddenArgument,objcPrincipalType,objcString,objcUsefulTerm,objcProtocol,objcInternalRep,objcException,objcThread,objcPool,objcModuleImport,@objcTypeQualifier,objcLiteralSyntaxNumber,objcLiteralSyntaxOp,objcLiteralSyntaxChar,objcLiteralSyntaxSpecialChar,objcProtocolList,objcColon,objcFastEnumKeyword,objcType,objcClass,objcMacro,objcEnum,objcEnumValue,objcExceptionValue,objcNotificationValue,objcConstVar,objcPreProcMacro
" Objective-C Message Expressions
syn region objcMessage display start="\[" end="\]" contains=objcMessage,objcStatement,objcType,objcTypeModifier,objcString,objcConstant,objcDirective,cType,cStructure,cStorageClass,cString,cCharacter,cSpecialCharacter,cNumbers,cConstant,cOperator,cComment,cCommentL,Type
syn region objcMethodCall start=/\[/ end=/\]/ contains=objcMethodCall,objcBlocks,@objcObjCEntities,@objcCEntities
syn cluster cParenGroup add=objcMessage
syn cluster cPreProcGroup add=objcMessage
" To distinguish class method and instance method
syn match objcInstanceMethod display /^s*-\s*/
syn match objcClassMethod display /^s*+\s*/
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_objc_syntax_inits")
if version < 508
let did_objc_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
" ObjC Blocks
syn region objcBlocks start=/\(\^\s*([^)]\+)\s*{\|\^\s*{\)/ end=/}/ contains=objcBlocks,objcMethodCall,@objcObjCEntities,@objcCEntities
HiLink objcImport Include
HiLink objcImported cString
HiLink objcTypeModifier objcType
HiLink objcType Type
HiLink objcScopeDecl Statement
HiLink objcInstMethod Function
HiLink objcFactMethod Function
HiLink objcStatement Statement
HiLink objcDirective Statement
HiLink objcKeyForMethodParam None
HiLink objcString cString
HiLink objcSpecial Special
HiLink objcProtocol None
HiLink objcConstant cConstant
syn cluster cParenGroup add=objcMethodCall
syn cluster cPreProcGroup add=objcMethodCall
delcommand HiLink
endif
""" Foundation Framework
syn match objcClass /Protocol\s*\*/me=s+8,he=s+8
"""""""""""""""""
" NSObjCRuntime.h
syn keyword objcType NSInteger NSUInteger NSComparator
syn keyword objcEnum NSComparisonResult
syn keyword objcEnumValue NSOrderedAscending NSOrderedSame NSOrderedDescending
syn keyword objcEnum NSEnumerationOptions
syn keyword objcEnumValue NSEnumerationConcurrent NSEnumerationReverse
syn keyword objcEnum NSSortOptions
syn keyword objcEnumValue NSSortConcurrent NSSortStable
syn keyword objcEnumValue NSNotFound
syn keyword objcMacro NSIntegerMax NSIntegerMin NSUIntegerMax
" NSRange.h
syn keyword objcType NSRange NSRangePointer
" NSGeometry.h
syn keyword objcType NSPoint NSPointPointer NSPointArray NSSize NSSizePointer NSSizeArray NSRect NSRectPointer NSRectArray
syn keyword objcEnum NSRectEdge
syn keyword objcEnumValue NSMinXEdge NSMinYEdge NSMaxXEdge NSMaxYEdge
syn keyword objcConstVar NSZeroPoint NSZeroSize NSZeroRect
syn keyword cType CGFloat CGPoint CGSize CGRect
syn keyword objcEnum NSAlignmentOptions
syn keyword objcEnumValue NSAlignMinXInward NSAlignMinYInward NSAlignMaxXInward NSAlignMaxYInward NSAlignWidthInward NSAlignHeightInward NSAlignMinXOutward NSAlignMinYOutward NSAlignMaxXOutward NSAlignMaxYOutward NSAlignWidthOutward NSAlignHeightOutward NSAlignMinXNearest NSAlignMinYNearest NSAlignMaxXNearest NSAlignMaxYNearest NSAlignWidthNearest NSAlignHeightNearest NSAlignRectFlipped NSAlignAllEdgesInward NSAlignAllEdgesOutward NSAlignAllEdgesNearest
" NSDecimal.h
syn keyword objcType NSDecimal
syn keyword objcEnum NSRoundingMode
syn keyword objcEnumValue NSRoundPlain NSRoundDown NSRoundUp NSRoundBankers
syn keyword objcEnum NSCalculationError
syn keyword objcEnumValue NSCalculationNoError NSCalculationLossOfPrecision NSCalculationUnderflow NSCalculationOverflow NSCalculationDivideByZero
" NSDate.h
syn match objcClass /NSDate\s*\*/me=s+6,he=s+6
syn keyword objcType NSTimeInterval
syn keyword objcNotificationValue NSSystemClockDidChangeNotification
syn keyword objcMacro NSTimeIntervalSince1970
" NSZone.h
syn match objcType /NSZone\s*\*/me=s+6,he=s+6
" NSError.h
syn match objcClass /NSError\s*\*/me=s+7,he=s+7
syn keyword objcConstVar NSCocoaErrorDomain NSPOSIXErrorDomain NSOSStatusErrorDomain NSMachErrorDomain NSUnderlyingErrorKey NSLocalizedDescriptionKey NSLocalizedFailureReasonErrorKey NSLocalizedRecoverySuggestionErrorKey NSLocalizedRecoveryOptionsErrorKey NSRecoveryAttempterErrorKey NSHelpAnchorErrorKey NSStringEncodingErrorKey NSURLErrorKey NSFilePathErrorKey
" NSException.h
syn match objcClass /NSException\s*\*/me=s+11,he=s+11
syn keyword objcType NSUncaughtExceptionHandler
syn keyword objcConstVar NSGenericException NSRangeException NSInvalidArgumentException NSInternalInconsistencyException NSMallocException NSObjectInaccessibleException NSObjectNotAvailableException NSDestinationInvalidException NSPortTimeoutException NSInvalidSendPortException NSInvalidReceivePortException NSPortSendException NSPortReceiveException NSOldStyleException
" NSNotification.h
syn match objcClass /NSNotification\s*\*/me=s+14,he=s+14
syn match objcClass /NSNotificationCenter\s*\*/me=s+20,he=s+20
" NSDistributedNotificationCenter.h
syn match objcClass /NSDistributedNotificationCenter\s*\*/me=s+31,he=s+31
syn keyword objcConstVar NSLocalNotificationCenterType
syn keyword objcEnum NSNotificationSuspensionBehavior
syn keyword objcEnumValue NSNotificationSuspensionBehaviorDrop NSNotificationSuspensionBehaviorCoalesce NSNotificationSuspensionBehaviorHold NSNotificationSuspensionBehaviorHold NSNotificationSuspensionBehaviorDeliverImmediately
syn keyword objcEnumValue NSNotificationDeliverImmediately NSNotificationPostToAllSessions
" NSNotificationQueue.h
syn match objcClass /NSNotificationQueue\s*\*/me=s+19,he=s+19
syn keyword objcEnum NSPostingStyle
syn keyword objcEnumValue NSPostWhenIdle NSPostASAP NSPostNow
syn keyword objcEnum NSNotificationCoalescing
syn keyword objcEnumValue NSNotificationNoCoalescing NSNotificationCoalescingOnName NSNotificationCoalescingOnSender
" NSEnumerator.h
syn match objcClass /NSEnumerator\s*\*/me=s+12,he=s+12
" NSIndexSet.h
syn match objcClass /NSIndexSet\s*\*/me=s+10,he=s+10
syn match objcClass /NSMutableIndexSet\s*\*/me=s+17,he=s+17
" NSCharecterSet.h
syn match objcClass /NSCharacterSet\s*\*/me=s+14,he=s+14
" NSURL.h
syn match objcClass /NSURL\s*\*/me=s+5,he=s+5
syn keyword objcEnum NSURLBookmarkCreationOptions
syn keyword objcEnumValue NSURLBookmarkCreationPreferFileIDResolution NSURLBookmarkCreationMinimalBookmark NSURLBookmarkCreationSuitableForBookmarkFile NSURLBookmarkCreationWithSecurityScope NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess
syn keyword objcEnum NSURLBookmarkResolutionOptions
syn keyword objcEnumValue NSURLBookmarkResolutionWithoutUI NSURLBookmarkResolutionWithoutMounting NSURLBookmarkResolutionWithSecurityScope
syn keyword objcType NSURLBookmarkFileCreationOptions
syn keyword objcConstVar NSURLFileScheme NSURLKeysOfUnsetValuesKey
syn keyword objcConstVar NSURLNameKey NSURLLocalizedNameKey NSURLIsRegularFileKey NSURLIsDirectoryKey NSURLIsSymbolicLinkKey NSURLIsVolumeKey NSURLIsPackageKey NSURLIsSystemImmutableKey NSURLIsUserImmutableKey NSURLIsHiddenKey NSURLHasHiddenExtensionKey NSURLCreationDateKey NSURLContentAccessDateKey NSURLContentModificationDateKey NSURLAttributeModificationDateKey NSURLLinkCountKey NSURLParentDirectoryURLKey NSURLVolumeURLKey NSURLTypeIdentifierKey NSURLLocalizedTypeDescriptionKey NSURLLabelNumberKey NSURLLabelColorKey NSURLLocalizedLabelKey NSURLEffectiveIconKey NSURLCustomIconKey NSURLFileResourceIdentifierKey NSURLVolumeIdentifierKey NSURLPreferredIOBlockSizeKey NSURLIsReadableKey NSURLIsWritableKey NSURLIsExecutableKey NSURLFileSecurityKey NSURLIsExcludedFromBackupKey NSURLPathKey NSURLIsMountTriggerKey NSURLFileResourceTypeKey
syn keyword objcConstVar NSURLFileResourceTypeNamedPipe NSURLFileResourceTypeCharacterSpecial NSURLFileResourceTypeDirectory NSURLFileResourceTypeBlockSpecial NSURLFileResourceTypeRegular NSURLFileResourceTypeSymbolicLink NSURLFileResourceTypeSocket NSURLFileResourceTypeUnknown
syn keyword objcConstVar NSURLFileSizeKey NSURLFileAllocatedSizeKey NSURLTotalFileSizeKey NSURLTotalFileAllocatedSizeKey NSURLIsAliasFileKey
syn keyword objcConstVar NSURLVolumeLocalizedFormatDescriptionKey NSURLVolumeTotalCapacityKey NSURLVolumeAvailableCapacityKey NSURLVolumeResourceCountKey NSURLVolumeSupportsPersistentIDsKey NSURLVolumeSupportsSymbolicLinksKey NSURLVolumeSupportsHardLinksKey NSURLVolumeSupportsJournalingKey NSURLVolumeIsJournalingKey NSURLVolumeSupportsSparseFilesKey NSURLVolumeSupportsZeroRunsKey NSURLVolumeSupportsCaseSensitiveNamesKey NSURLVolumeSupportsCasePreservedNamesKey NSURLVolumeSupportsRootDirectoryDatesKey NSURLVolumeSupportsVolumeSizesKey NSURLVolumeSupportsRenamingKey NSURLVolumeSupportsAdvisoryFileLockingKey NSURLVolumeSupportsExtendedSecurityKey NSURLVolumeIsBrowsableKey NSURLVolumeMaximumFileSizeKey NSURLVolumeIsEjectableKey NSURLVolumeIsRemovableKey NSURLVolumeIsInternalKey NSURLVolumeIsAutomountedKey NSURLVolumeIsLocalKey NSURLVolumeIsReadOnlyKey NSURLVolumeCreationDateKey NSURLVolumeURLForRemountingKey NSURLVolumeUUIDStringKey NSURLVolumeNameKey NSURLVolumeLocalizedNameKey
syn keyword objcConstVar NSURLIsUbiquitousItemKey NSURLUbiquitousItemHasUnresolvedConflictsKey NSURLUbiquitousItemIsDownloadedKey NSURLUbiquitousItemIsDownloadingKey NSURLUbiquitousItemIsUploadedKey NSURLUbiquitousItemIsUploadingKey NSURLUbiquitousItemPercentDownloadedKey NSURLUbiquitousItemPercentUploadedKey
""""""""""""
" NSString.h
syn match objcClass /NSString\s*\*/me=s+8,he=s+8
syn match objcClass /NSMutableString\s*\*/me=s+15,he=s+15
syn keyword objcType unichar
syn keyword objcExceptionValue NSParseErrorException NSCharacterConversionException
syn keyword objcMacro NSMaximumStringLength
syn keyword objcEnum NSStringCompareOptions
syn keyword objcEnumValue NSCaseInsensitiveSearch NSLiteralSearch NSBackwardsSearch NSAnchoredSearch NSNumericSearch NSDiacriticInsensitiveSearch NSWidthInsensitiveSearch NSForcedOrderingSearch NSRegularExpressionSearch
syn keyword objcEnum NSStringEncoding
syn keyword objcEnumValue NSASCIIStringEncoding NSNEXTSTEPStringEncoding NSJapaneseEUCStringEncoding NSUTF8StringEncoding NSISOLatin1StringEncoding NSSymbolStringEncoding NSNonLossyASCIIStringEncoding NSShiftJISStringEncoding NSISOLatin2StringEncoding NSUnicodeStringEncoding NSWindowsCP1251StringEncoding NSWindowsCP1252StringEncoding NSWindowsCP1253StringEncoding NSWindowsCP1254StringEncoding NSWindowsCP1250StringEncoding NSISO2022JPStringEncoding NSMacOSRomanStringEncoding NSUTF16StringEncoding NSUTF16BigEndianStringEncoding NSUTF16LittleEndianStringEncoding NSUTF32StringEncoding NSUTF32BigEndianStringEncoding NSUTF32LittleEndianStringEncoding
syn keyword objcEnum NSStringEncodingConversionOptions
syn keyword objcEnumValue NSStringEncodingConversionAllowLossy NSStringEncodingConversionExternalRepresentation
syn keyword objcEnum NSStringEnumerationOptions
syn keyword objcEnumValue NSStringEnumerationByLines NSStringEnumerationByParagraphs NSStringEnumerationByComposedCharacterSequences NSStringEnumerationByWords NSStringEnumerationBySentences NSStringEnumerationReverse NSStringEnumerationSubstringNotRequired NSStringEnumerationLocalized
" NSAttributedString.h
syn match objcClass /NSAttributedString\s*\*/me=s+18,he=s+18
syn match objcClass /NSMutableAttributedString\s*\*/me=s+25,he=s+25
syn keyword objcEnum NSAttributedStringEnumerationOptions
syn keyword objcEnumValue NSAttributedStringEnumerationReverse NSAttributedStringEnumerationLongestEffectiveRangeNotRequired
" NSValue.h
syn match objcClass /NSValue\s*\*/me=s+7,he=s+7
syn match objcClass /NSNumber\s*\*/me=s+8,he=s+8
" NSDecimalNumber.h
syn match objcClass /NSDecimalNumber\s*\*/me=s+15,he=s+15
syn match objcClass /NSDecimalNumberHandler\s*\*/me=s+22,he=s+22
syn keyword objcExceptionValue NSDecimalNumberExactnessException NSDecimalNumberOverflowException NSDecimalNumberUnderflowException NSDecimalNumberDivideByZeroException
" NSData.h
syn match objcClass /NSData\s*\*/me=s+6,he=s+6
syn match objcClass /NSMutableData\s*\*/me=s+13,he=s+13
syn keyword objcEnum NSDataReadingOptions
syn keyword objcEnumValue NSDataReadingMappedIfSafe NSDataReadingUncached NSDataReadingMappedAlways NSDataReadingMapped NSMappedRead NSUncachedRead
syn keyword objcEnum NSDataWritingOptions
syn keyword objcEnumValue NSDataWritingAtomic NSDataWritingWithoutOverwriting NSDataWritingFileProtectionNone NSDataWritingFileProtectionComplete NSDataWritingFileProtectionCompleteUnlessOpen NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication NSDataWritingFileProtectionMask NSAtomicWrite
syn keyword objcEnum NSDataSearchOptions
syn keyword objcEnumValue NSDataSearchBackwards NSDataSearchAnchored
" NSArray.h
syn match objcClass /NSArray\s*\*/me=s+7,he=s+7
syn match objcClass /NSMutableArray\s*\*/me=s+14,he=s+14
syn keyword objcEnum NSBinarySearchingOptions
syn keyword objcEnumValue NSBinarySearchingFirstEqual NSBinarySearchingLastEqual NSBinarySearchingInsertionIndex
" NSDictionary.h
syn match objcClass /NSDictionary\s*\*/me=s+12,he=s+12
syn match objcClass /NSMutableDictionary\s*\*/me=s+19,he=s+19
" NSSet.h
syn match objcClass /NSSet\s*\*/me=s+5,me=s+5
syn match objcClass /NSMutableSet\s*\*/me=s+12,me=s+12
syn match objcClass /NSCountedSet\s*\*/me=s+12,me=s+12
" NSOrderedSet.h
syn match objcClass /NSOrderedSet\s*\*/me=s+12,me=s+12
syn match objcClass /NSMutableOrderedSet\s*\*/me=s+19,me=s+19
"""""""""""""""""""
" NSPathUtilities.h
syn keyword objcEnum NSSearchPathDirectory
syn keyword objcEnumValue NSApplicationDirectory NSDemoApplicationDirectory NSDeveloperApplicationDirectory NSAdminApplicationDirectory NSLibraryDirectory NSDeveloperDirectory NSUserDirectory NSDocumentationDirectory NSDocumentDirectory NSCoreServiceDirectory NSAutosavedInformationDirectory NSDesktopDirectory NSCachesDirectory NSApplicationSupportDirectory NSDownloadsDirectory NSInputMethodsDirectory NSMoviesDirectory NSMusicDirectory NSPicturesDirectory NSPrinterDescriptionDirectory NSSharedPublicDirectory NSPreferencePanesDirectory NSApplicationScriptsDirectory NSItemReplacementDirectory NSAllApplicationsDirectory NSAllLibrariesDirectory NSTrashDirectory
syn keyword objcEnum NSSearchPathDomainMask
syn keyword objcEnumValue NSUserDomainMask NSLocalDomainMask NSNetworkDomainMask NSSystemDomainMask NSAllDomainsMask
" NSFileManger.h
syn match objcClass /NSFileManager\s*\*/me=s+13,he=s+13
syn match objcClass /NSDirectoryEnumerator\s*\*/me=s+21,he=s+21
syn keyword objcEnum NSVolumeEnumerationOptions
syn keyword objcEnumValue NSVolumeEnumerationSkipHiddenVolumes NSVolumeEnumerationProduceFileReferenceURLs
syn keyword objcEnum NSDirectoryEnumerationOptions
syn keyword objcEnumValue NSDirectoryEnumerationSkipsSubdirectoryDescendants NSDirectoryEnumerationSkipsPackageDescendants NSDirectoryEnumerationSkipsHiddenFiles
syn keyword objcEnum NSFileManagerItemReplacementOptions
syn keyword objcEnumValue NSFileManagerItemReplacementUsingNewMetadataOnly NSFileManagerItemReplacementWithoutDeletingBackupItem
syn keyword objcNotificationValue NSUbiquityIdentityDidChangeNotification
syn keyword objcConstVar NSFileType NSFileTypeDirectory NSFileTypeRegular NSFileTypeSymbolicLink NSFileTypeSocket NSFileTypeCharacterSpecial NSFileTypeBlockSpecial NSFileTypeUnknown NSFileSize NSFileModificationDate NSFileReferenceCount NSFileDeviceIdentifier NSFileOwnerAccountName NSFileGroupOwnerAccountName NSFilePosixPermissions NSFileSystemNumber NSFileSystemFileNumber NSFileExtensionHidden NSFileHFSCreatorCode NSFileHFSTypeCode NSFileImmutable NSFileAppendOnly NSFileCreationDate NSFileOwnerAccountID NSFileGroupOwnerAccountID NSFileBusy NSFileProtectionKey NSFileProtectionNone NSFileProtectionComplete NSFileProtectionCompleteUnlessOpen NSFileProtectionCompleteUntilFirstUserAuthentication NSFileSystemSize NSFileSystemFreeSize NSFileSystemNodes NSFileSystemFreeNodes
" NSFileHandle.h
syn match objcClass /NSFileHandle\s*\*/me=s+12,he=s+12
syn keyword objcExceptionValue NSFileHandleOperationException
syn keyword objcNotificationValue NSFileHandleReadCompletionNotification NSFileHandleReadToEndOfFileCompletionNotification NSFileHandleConnectionAcceptedNotification NSFileHandleDataAvailableNotification NSFileHandleNotificationDataItem NSFileHandleNotificationFileHandleItem NSFileHandleNotificationMonitorModes
syn match objcClass /NSPipe\s*\*/me=s+6,he=s+6
""""""""""""
" NSLocale.h
syn match objcClass /NSLocale\s*\*/me=s+8,he=s+8
syn keyword objcEnum NSLocaleLanguageDirection
syn keyword objcEnumValue NSLocaleLanguageDirectionUnknown NSLocaleLanguageDirectionLeftToRight NSLocaleLanguageDirectionRightToLeft NSLocaleLanguageDirectionTopToBottom NSLocaleLanguageDirectionBottomToTop
syn keyword objcNotificationValue NSCurrentLocaleDidChangeNotification
syn keyword objcConstVar NSLocaleIdentifier NSLocaleLanguageCode NSLocaleCountryCode NSLocaleScriptCode NSLocaleVariantCode NSLocaleExemplarCharacterSet NSLocaleCalendar NSLocaleCollationIdentifier NSLocaleUsesMetricSystem NSLocaleMeasurementSystem NSLocaleDecimalSeparator NSLocaleGroupingSeparator NSLocaleCurrencySymbol NSLocaleCurrencyCode NSLocaleCollatorIdentifier NSLocaleQuotationBeginDelimiterKey NSLocaleQuotationEndDelimiterKey NSLocaleAlternateQuotationBeginDelimiterKey NSLocaleAlternateQuotationEndDelimiterKey NSGregorianCalendar NSBuddhistCalendar NSChineseCalendar NSHebrewCalendar NSIslamicCalendar NSIslamicCivilCalendar NSJapaneseCalendar NSRepublicOfChinaCalendar NSPersianCalendar NSIndianCalendar NSISO8601Calendar
" NSFormatter.h
syn match objcClass /NSFormatter\s*\*/me=s+11,he=s+11
" NSNumberFormatter.h
syn match objcClass /NSNumberFormatter\s*\*/me=s+17,he=s+17
syn keyword objcEnum NSNumberFormatterStyle
syn keyword objcEnumValue NSNumberFormatterNoStyle NSNumberFormatterDecimalStyle NSNumberFormatterCurrencyStyle NSNumberFormatterPercentStyle NSNumberFormatterScientificStyle NSNumberFormatterSpellOutStyle
syn keyword objcEnum NSNumberFormatterBehavior
syn keyword objcEnumValue NSNumberFormatterBehaviorDefault NSNumberFormatterBehavior10_0 NSNumberFormatterBehavior10_4
syn keyword objcEnum NSNumberFormatterPadPosition
syn keyword objcEnumValue NSNumberFormatterPadBeforePrefix NSNumberFormatterPadAfterPrefix NSNumberFormatterPadBeforeSuffix NSNumberFormatterPadAfterSuffix
syn keyword objcEnum NSNumberFormatterRoundingMode
syn keyword objcEnumValue NSNumberFormatterRoundCeiling NSNumberFormatterRoundFloor NSNumberFormatterRoundDown NSNumberFormatterRoundUp NSNumberFormatterRoundHalfEven NSNumberFormatterRoundHalfDown NSNumberFormatterRoundHalfUp
" NSDateFormatter.h
syn match objcClass /NSDateFormatter\s*\*/me=s+15,he=s+15
syn keyword objcEnum NSDateFormatterStyle
syn keyword objcEnumValue NSDateFormatterNoStyle NSDateFormatterShortStyle NSDateFormatterMediumStyle NSDateFormatterLongStyle NSDateFormatterFullStyle
syn keyword objcEnum NSDateFormatterBehavior
syn keyword objcEnumValue NSDateFormatterBehaviorDefault NSDateFormatterBehavior10_0 NSDateFormatterBehavior10_4
" NSCalendar.h
syn match objcClass /NSCalendar\s*\*/me=s+10,he=s+10
syn keyword objcEnum NSCalendarUnit
syn keyword objcEnumValue NSEraCalendarUnit NSYearCalendarUnit NSMonthCalendarUnit NSDayCalendarUnit NSHourCalendarUnit NSMinuteCalendarUnit NSSecondCalendarUnit NSWeekCalendarUnit NSWeekdayCalendarUnit NSWeekdayOrdinalCalendarUnit NSQuarterCalendarUnit NSWeekOfMonthCalendarUnit NSWeekOfYearCalendarUnit NSYearForWeekOfYearCalendarUnit NSCalendarCalendarUnit NSTimeZoneCalendarUnit
syn keyword objcEnumValue NSWrapCalendarComponents NSUndefinedDateComponent
syn match objcClass /NSDateComponents\s*\*/me=s+16,he=s+16
" NSTimeZone.h
syn match objcClass /NSTimeZone\s*\*/me=s+10,he=s+10
syn keyword objcEnum NSTimeZoneNameStyle
syn keyword objcEnumValue NSTimeZoneNameStyleStandard NSTimeZoneNameStyleShortStandard NSTimeZoneNameStyleDaylightSaving NSTimeZoneNameStyleShortDaylightSaving NSTimeZoneNameStyleGeneric NSTimeZoneNameStyleShortGeneric
syn keyword objcNotificationValue NSSystemTimeZoneDidChangeNotification
"""""""""""
" NSCoder.h
syn match objcClass /NSCoder\s*\*/me=s+7,he=s+7
" NSArchiver.h
syn match objcClass /NSArchiver\s*\*/me=s+10,he=s+10
syn match objcClass /NSUnarchiver\s*\*/me=s+12,he=s+12
syn keyword objcExceptionValue NSInconsistentArchiveException
" NSKeyedArchiver.h
syn match objcClass /NSKeyedArchiver\s*\*/me=s+15,he=s+15
syn match objcClass /NSKeyedUnarchiver\s*\*/me=s+17,he=s+17
syn keyword objcExceptionValue NSInvalidArchiveOperationException NSInvalidUnarchiveOperationException
""""""""""""""""""
" NSPropertyList.h
syn keyword objcEnum NSPropertyListMutabilityOptions
syn keyword objcEnumValue NSPropertyListImmutable NSPropertyListMutableContainers NSPropertyListMutableContainersAndLeaves
syn keyword objcEnum NSPropertyListFormat
syn keyword objcEnumValue NSPropertyListOpenStepFormat NSPropertyListXMLFormat_v1_0 NSPropertyListBinaryFormat_v1_0
syn keyword objcType NSPropertyListReadOptions NSPropertyListWriteOptions
" NSUserDefaults.h
syn match objcClass /NSUserDefaults\s*\*/me=s+14,he=s+14
syn keyword objcConstVar NSGlobalDomain NSArgumentDomain NSRegistrationDomain
syn keyword objcNotificationValue NSUserDefaultsDidChangeNotification
" NSBundle.h
syn match objcClass /NSBundle\s*\*/me=s+8,he=s+8
syn keyword objcEnumValue NSBundleExecutableArchitectureI386 NSBundleExecutableArchitecturePPC NSBundleExecutableArchitectureX86_64 NSBundleExecutableArchitecturePPC64
syn keyword objcNotificationValue NSBundleDidLoadNotification NSLoadedClasses
"""""""""""""""""
" NSProcessInfo.h
syn match objcClass /NSProcessInfo\s*\*/me=s+13,he=s+13
syn keyword objcEnumValue NSWindowsNTOperatingSystem NSWindows95OperatingSystem NSSolarisOperatingSystem NSHPUXOperatingSystem NSMACHOperatingSystem NSSunOSOperatingSystem NSOSF1OperatingSystem
" NSTask.h
syn match objcClass /NSTask\s*\*/me=s+6,he=s+6
syn keyword objcEnum NSTaskTerminationReason
syn keyword objcEnumValue NSTaskTerminationReasonExit NSTaskTerminationReasonUncaughtSignal
syn keyword objcNotificationValue NSTaskDidTerminateNotification
" NSThread.h
syn match objcClass /NSThread\s*\*/me=s+8,he=s+8
syn keyword objcNotificationValue NSWillBecomeMultiThreadedNotification NSDidBecomeSingleThreadedNotification NSThreadWillExitNotification
" NSLock.h
syn match objcClass /NSLock\s*\*/me=s+6,he=s+6
syn match objcClass /NSConditionLock\s*\*/me=s+15,he=s+15
syn match objcClass /NSRecursiveLock\s*\*/me=s+15,he=s+15
" NSDictributedLock
syn match objcClass /NSDistributedLock\s*\*/me=s+17,he=s+17
" NSOperation.h
""""""""""""""""
syn match objcClass /NSOperation\s*\*/me=s+11,he=s+11
syn keyword objcEnum NSOperationQueuePriority
syn keyword objcEnumValue NSOperationQueuePriorityVeryLow NSOperationQueuePriorityLow NSOperationQueuePriorityNormal NSOperationQueuePriorityHigh NSOperationQueuePriorityVeryHigh
syn match objcClass /NSBlockOperation\s*\*/me=s+16,he=s+16
syn match objcClass /NSInvocationOperation\s*\*/me=s+21,he=s+21
syn keyword objcExceptionValue NSInvocationOperationVoidResultException NSInvocationOperationCancelledException
syn match objcClass /NSOperationQueue\s*\*/me=s+16,he=s+16
syn keyword objcEnumValue NSOperationQueueDefaultMaxConcurrentOperationCount
" NSConnection.h
syn match objcClass /NSConnection\s*\*/me=s+12,he=s+12
syn keyword objcConstVar NSConnectionReplyMode
syn keyword objcNotificationValue NSConnectionDidDieNotification NSConnectionDidInitializeNotification
syn keyword objcExceptionValue NSFailedAuthenticationException
" NSPort.h
syn match objcClass /NSPort\s*\*/me=s+6,he=s+6
syn keyword objcType NSSocketNativeHandle
syn keyword objcNotificationValue NSPortDidBecomeInvalidNotification
syn match objcClass /NSMachPort\s*\*/me=s+10,he=s+10
syn keyword objcEnumValue NSMachPortDeallocateNone NSMachPortDeallocateSendRight NSMachPortDeallocateReceiveRight
syn match objcClass /NSMessagePort\s*\*/me=s+13,he=s+13
syn match objcClass /NSSocketPort\s*\*/me=s+12,he=s+12
" NSPortMessage.h
syn match objcClass /NSPortMessage\s*\*/me=s+13,he=s+13
" NSDistantObject.h
syn match objcClass /NSDistantObject\s*\*/me=s+15,he=s+15
" NSPortNameServer.h
syn match objcClass /NSPortNameServer\s*\*/me=s+16,he=s+16
syn match objcClass /NSMessagePortNameServer\s*\*/me=s+23,he=s+23
syn match objcClass /NSSocketPortNameServer\s*\*/me=s+22,he=s+22
" NSHost.h
syn match objcClass /NSHost\s*\*/me=s+6,he=s+6
" NSInvocation.h
syn match objcClass /NSInvocation\s*\*/me=s+12,he=s+12
" NSMethodSignature.h
syn match objcClass /NSMethodSignature\s*\*/me=s+17,he=s+17
"""""
" NSScanner.h
syn match objcClass /NSScanner\s*\*/me=s+9,he=s+9
" NSTimer.h
syn match objcClass /NSTimer\s*\*/me=s+7,he=s+7
" NSAutoreleasePool.h
syn match objcClass /NSAutoreleasePool\s*\*/me=s+17,he=s+17
" NSRunLoop.h
syn match objcClass /NSRunLoop\s*\*/me=s+9,he=s+9
syn keyword objcConstVar NSDefaultRunLoopMode NSRunLoopCommonModes
" NSNull.h
syn match objcClass /NSNull\s*\*/me=s+6,he=s+6
" NSProxy.h
syn match objcClass /NSProxy\s*\*/me=s+7,he=s+7
" NSObject.h
syn match objcClass /NSObject\s*\*/me=s+8,he=s+8
""" Default Highlighting
hi def link objcPreProcMacro cConstant
hi def link objcPrincipalType cType
hi def link objcUsefulTerm cConstant
hi def link objcImport cInclude
hi def link objcImported cString
hi def link objcObjDef cOperator
hi def link objcProtocol cOperator
hi def link objcProperty cOperator
hi def link objcIvarScope cOperator
hi def link objcInternalRep cOperator
hi def link objcException cOperator
hi def link objcThread cOperator
hi def link objcPool cOperator
hi def link objcModuleImport cOperator
hi def link objcSpecial cSpecial
hi def link objcString cString
hi def link objcHiddenArgument cStatement
hi def link objcBlocksQualifier cStorageClass
hi def link objcObjectLifetimeQualifier cStorageClass
hi def link objcTollFreeBridgeQualifier cStorageClass
hi def link objcRemoteMessagingQualifier cStorageClass
hi def link objcFastEnumKeyword cStatement
hi def link objcLiteralSyntaxNumber cNumber
hi def link objcLiteralSyntaxChar cCharacter
hi def link objcLiteralSyntaxSpecialChar cCharacter
hi def link objcLiteralSyntaxOp cOperator
hi def link objcDeclPropAccessorName cConstant
hi def link objcDeclPropAccessorType cConstant
hi def link objcDeclPropAssignSemantics cConstant
hi def link objcDeclPropAtomicity cConstant
hi def link objcDeclPropARC cConstant
hi def link objcInstanceMethod Function
hi def link objcClassMethod Function
hi def link objcType cType
hi def link objcClass cType
hi def link objcMacro cConstant
hi def link objcEnum cType
hi def link objcEnumValue cConstant
hi def link objcExceptionValue cConstant
hi def link objcNotificationValue cConstant
hi def link objcConstVar cConstant
""" Final step
let b:current_syntax = "objc"
let &cpo = s:cpo_save
unlet s:cpo_save
let &cpo = s:keepcpo
unlet s:keepcpo
" vim: ts=8
" vim: ts=8 sw=2 sts=2

View File

@@ -1,22 +1,24 @@
" Vim syntax file
" Language: Perl 5
" Maintainer: Andy Lester <andy@petdance.com>
" URL: http://github.com/petdance/vim-perl/tree/master
" Last Change: 2010-08-10
" Contributors: Andy Lester <andy@petdance.com>
" Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
" Lukas Mai <l.mai.web.de>
" Nick Hibma <nick@van-laarhoven.org>
" Sonia Heimann <niania@netsurf.org>
" and many others.
" Language: Perl 5
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Homepage: http://github.com/vim-perl/vim-perl/tree/master
" Bugs/requests: http://github.com/vim-perl/vim-perl/issues
" Last Change: 2013-05-11
" Contributors: Andy Lester <andy@petdance.com>
" Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
" Lukas Mai <l.mai.web.de>
" Nick Hibma <nick@van-laarhoven.org>
" Sonia Heimann <niania@netsurf.org>
" Rob Hoelz <rob@hoelz.ro>
" and many others.
"
" Please download most recent version first before mailing
" Please download the most recent version first, before mailing
" any comments.
"
" The following parameters are available for tuning the
" perl syntax highlighting, with defaults given:
"
" unlet perl_include_pod
" let perl_include_pod = 1
" unlet perl_no_scope_in_variables
" unlet perl_no_extended_vars
" unlet perl_string_as_statement
@@ -27,21 +29,29 @@
" unlet perl_fold_blocks
" let perl_nofold_packages = 1
" let perl_nofold_subs = 1
" unlet perl_fold_anonymous_subs
if exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
if exists('&regexpengine')
let s:regexpengine=&regexpengine
set regexpengine=1
endif
" POD starts with ^=<word> and ends with ^=cut
if exists("perl_include_pod")
if !exists("perl_include_pod") || perl_include_pod == 1
" Include a while extra syntax file
syn include @Pod syntax/pod.vim
unlet b:current_syntax
if exists("perl_fold")
syn region perlPOD start="^=[a-z]" end="^=cut" contains=@Pod,@Spell,perlTodo keepend fold
syn region perlPOD start="^=cut" end="^=cut" contains=perlTodo keepend fold
syn region perlPOD start="^=[a-z]" end="^=cut" contains=@Pod,@Spell,perlTodo keepend fold extend
syn region perlPOD start="^=cut" end="^=cut" contains=perlTodo keepend fold extend
else
syn region perlPOD start="^=[a-z]" end="^=cut" contains=@Pod,@Spell,perlTodo keepend
syn region perlPOD start="^=cut" end="^=cut" contains=perlTodo keepend
@@ -63,10 +73,13 @@ syn region perlGenericBlock matchgroup=perlGenericBlock start="{" end="}" conta
" All keywords
"
syn match perlConditional "\<\%(if\|elsif\|unless\|given\|when\|default\)\>"
syn match perlConditional "\<else\>" nextgroup=perlElseIfError skipwhite skipnl skipempty
syn match perlConditional "\<else\%(\%(\_s\*if\>\)\|\>\)" contains=perlElseIfError skipwhite skipnl skipempty
syn match perlRepeat "\<\%(while\|for\%(each\)\=\|do\|until\|continue\)\>"
syn match perlOperator "\<\%(defined\|undef\|eq\|ne\|[gl][et]\|cmp\|not\|and\|or\|xor\|not\|bless\|ref\|do\)\>"
syn match perlControl "\<\%(BEGIN\|CHECK\|INIT\|END\|UNITCHECK\)\>"
" for some reason, adding this as the nextgroup for perlControl fixes BEGIN
" folding issues...
syn match perlFakeGroup "" contained
syn match perlControl "\<\%(BEGIN\|CHECK\|INIT\|END\|UNITCHECK\)\>\_s*" nextgroup=perlFakeGroup
syn match perlStatementStorage "\<\%(my\|our\|local\|state\)\>"
syn match perlStatementControl "\<\%(return\|last\|next\|redo\|goto\|break\)\>"
@@ -93,9 +106,9 @@ syn match perlStatementTime "\<\%(gmtime\|localtime\|time\)\>"
syn match perlStatementMisc "\<\%(warn\|formline\|reset\|scalar\|prototype\|lock\|tied\=\|untie\)\>"
syn keyword perlTodo TODO TBD FIXME XXX NOTE contained
syn keyword perlTodo TODO TODO: TBD TBD: FIXME FIXME: XXX XXX: NOTE NOTE: contained
syn region perlStatementIndirObjWrap matchgroup=perlStatementIndirObj start="\<\%(map\|grep\|sort\|print\|system\|exec\)\>\s*{" end="}" contains=@perlTop,perlGenericBlock
syn region perlStatementIndirObjWrap matchgroup=perlStatementIndirObj start="\<\%(map\|grep\|sort\|printf\=\|say\|system\|exec\)\>\s*{" end="}" contains=@perlTop,perlGenericBlock extend
syn match perlLabel "^\s*\h\w*\s*::\@!\%(\<v\d\+\s*:\)\@<!"
@@ -146,14 +159,14 @@ if !exists("perl_no_extended_vars")
syn region perlArrow matchgroup=perlArrow start="->\s*{" end="}" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained
syn match perlArrow "->\s*{\s*\I\i*\s*}" contains=perlVarSimpleMemberName nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained
syn region perlArrow matchgroup=perlArrow start="->\s*\$*\I\i*\s*(" end=")" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained
syn region perlVarBlock matchgroup=perlVarPlain start="\%($#\|[$@]\)\$*{" skip="\\}" end="}" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod
syn region perlVarBlock2 matchgroup=perlVarPlain start="[%&*]\$*{" skip="\\}" end="}" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod
syn region perlVarBlock matchgroup=perlVarPlain start="\%($#\|[$@]\)\$*{" skip="\\}" end=+}\|\%(\%(<<\%('\|"\)\?\)\@=\)+ contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod extend
syn region perlVarBlock2 matchgroup=perlVarPlain start="[%&*]\$*{" skip="\\}" end=+}\|\%(\%(<<\%('\|"\)\?\)\@=\)+ contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod extend
syn match perlVarPlain2 "[%&*]\$*{\I\i*}" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod
syn match perlVarPlain "\%(\$#\|[@$]\)\$*{\I\i*}" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod
syn region perlVarMember matchgroup=perlVarPlain start="\%(->\)\={" skip="\\}" end="}" contained contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod
syn match perlVarSimpleMember "\%(->\)\={\s*\I\i*\s*}" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contains=perlVarSimpleMemberName contained
syn region perlVarMember matchgroup=perlVarPlain start="\%(->\)\={" skip="\\}" end="}" contained contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod extend
syn match perlVarSimpleMember "\%(->\)\={\s*\I\i*\s*}" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contains=perlVarSimpleMemberName contained extend
syn match perlVarSimpleMemberName "\I\i*" contained
syn region perlVarMember matchgroup=perlVarPlain start="\%(->\)\=\[" skip="\\]" end="]" contained contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod
syn region perlVarMember matchgroup=perlVarPlain start="\%(->\)\=\[" skip="\\]" end="]" contained contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod extend
syn match perlPackageConst "__PACKAGE__" nextgroup=perlMethod
syn match perlMethod "->\$*\I\i*" contained nextgroup=perlVarSimpleMember,perlVarMember,perlMethod
endif
@@ -168,13 +181,13 @@ syn match perlFiledescStatement "\u\w*" contained
" Special characters in strings and matches
syn match perlSpecialString "\\\%(\o\{1,3}\|x\%({\x\+}\|\x\{1,2}\)\|c.\|[^cx]\)" contained extend
syn match perlSpecialStringU2 "\\." extend contained transparent contains=NONE
syn match perlSpecialStringU2 "\\." extend contained contains=NONE
syn match perlSpecialStringU "\\\\" contained
syn match perlSpecialMatch "\\[1-9]" contained extend
syn match perlSpecialMatch "\\g\%(\d\+\|{\%(-\=\d\+\|\h\w*\)}\)" contained
syn match perlSpecialMatch "\\k\%(<\h\w*>\|'\h\w*'\)" contained
syn match perlSpecialMatch "{\d\+\%(,\%(\d\+\)\=\)\=}" contained
syn match perlSpecialMatch "\[[]-]\=[^\[\]]*[]-]\=\]" contained
syn match perlSpecialMatch "\[[]-]\=[^\[\]]*[]-]\=\]" contained extend
syn match perlSpecialMatch "[+*()?.]" contained
syn match perlSpecialMatch "(?[#:=!]" contained
syn match perlSpecialMatch "(?[impsx]*\%(-[imsx]\+\)\=)" contained
@@ -186,10 +199,9 @@ syn match perlSpecialMatch "(\*\%(\%(PRUNE\|SKIP\|THEN\)\%(:[^)]*\)\=\|\%(MARK\
"
" Highlight lines with only whitespace (only in blank delimited here documents) as errors
syn match perlNotEmptyLine "^\s\+$" contained
" Highlight '} else if (...) {', it should be '} else { if (...) { ' or
" '} elsif (...) {'.
syn match perlElseIfError "\s\+if" contained
syn keyword perlElseIfError elseif
" Highlight "} else if (...) {", it should be "} else { if (...) { " or "} elsif (...) {"
syn match perlElseIfError "else\_s*if" containedin=perlConditional
syn keyword perlElseIfError elseif containedin=perlConditional
" Variable interpolation
"
@@ -217,32 +229,32 @@ syn match perlString "\<\%(v\d\+\%(\.\d\+\)*\|\d\+\%(\.\d\+\)\{2,}\)\>" contain
syn match perlVStringV "\<v" contained
syn region perlParensSQ start=+(+ end=+)+ extend contained transparent contains=perlParensSQ,@perlInterpSQ keepend
syn region perlBracketsSQ start=+\[+ end=+\]+ extend contained transparent contains=perlBracketsSQ,@perlInterpSQ keepend
syn region perlBracesSQ start=+{+ end=+}+ extend contained transparent contains=perlBracesSQ,@perlInterpSQ keepend
syn region perlAnglesSQ start=+<+ end=+>+ extend contained transparent contains=perlAnglesSQ,@perlInterpSQ keepend
syn region perlParensSQ start=+(+ end=+)+ extend contained contains=perlParensSQ,@perlInterpSQ keepend
syn region perlBracketsSQ start=+\[+ end=+\]+ extend contained contains=perlBracketsSQ,@perlInterpSQ keepend
syn region perlBracesSQ start=+{+ end=+}+ extend contained contains=perlBracesSQ,@perlInterpSQ keepend
syn region perlAnglesSQ start=+<+ end=+>+ extend contained contains=perlAnglesSQ,@perlInterpSQ keepend
syn region perlParensDQ start=+(+ end=+)+ extend contained transparent contains=perlParensDQ,@perlInterpDQ keepend
syn region perlBracketsDQ start=+\[+ end=+\]+ extend contained transparent contains=perlBracketsDQ,@perlInterpDQ keepend
syn region perlBracesDQ start=+{+ end=+}+ extend contained transparent contains=perlBracesDQ,@perlInterpDQ keepend
syn region perlAnglesDQ start=+<+ end=+>+ extend contained transparent contains=perlAnglesDQ,@perlInterpDQ keepend
syn region perlParensDQ start=+(+ end=+)+ extend contained contains=perlParensDQ,@perlInterpDQ keepend
syn region perlBracketsDQ start=+\[+ end=+\]+ extend contained contains=perlBracketsDQ,@perlInterpDQ keepend
syn region perlBracesDQ start=+{+ end=+}+ extend contained contains=perlBracesDQ,@perlInterpDQ keepend
syn region perlAnglesDQ start=+<+ end=+>+ extend contained contains=perlAnglesDQ,@perlInterpDQ keepend
" Simple version of searches and matches
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\>\s*\z([^[:space:]'([{<#]\)+ end=+\z1[cgimopsx]*+ contains=@perlInterpMatch keepend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m#+ end=+#[cgimopsx]*+ contains=@perlInterpMatch keepend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*'+ end=+'[cgimopsx]*+ contains=@perlInterpSQ keepend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*/+ end=+/[cgimopsx]*+ contains=@perlInterpSlash keepend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*(+ end=+)[cgimopsx]*+ contains=@perlInterpMatch,perlParensDQ keepend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\>\s*\z([^[:space:]'([{<#]\)+ end=+\z1[msixpodualgc]*+ contains=@perlInterpMatch keepend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m#+ end=+#[msixpodualgc]*+ contains=@perlInterpMatch keepend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*'+ end=+'[msixpodualgc]*+ contains=@perlInterpSQ keepend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*/+ end=+/[msixpodualgc]*+ contains=@perlInterpSlash keepend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*(+ end=+)[msixpodualgc]*+ contains=@perlInterpMatch,perlParensDQ keepend
" A special case for m{}, m<> and m[] which allows for comments and extra whitespace in the pattern
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*{+ end=+}[cgimopsx]*+ contains=@perlInterpMatch,perlComment,perlBracesDQ keepend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*<+ end=+>[cgimopsx]*+ contains=@perlInterpMatch,perlAnglesDQ keepend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*\[+ end=+\][cgimopsx]*+ contains=@perlInterpMatch,perlComment,perlBracketsDQ keepend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*{+ end=+}[msixpodualgc]*+ contains=@perlInterpMatch,perlComment,perlBracesDQ
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*<+ end=+>[msixpodualgc]*+ contains=@perlInterpMatch,perlAnglesDQ keepend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*\[+ end=+\][msixpodualgc]*+ contains=@perlInterpMatch,perlComment,perlBracketsDQ keepend
" Below some hacks to recognise the // variant. This is virtually impossible to catch in all
" cases as the / is used in so many other ways, but these should be the most obvious ones.
syn region perlMatch matchgroup=perlMatchStartEnd start="\%([$@%&*]\@<!\%(\<split\|\<while\|\<if\|\<unless\|\.\.\|[-+*!~(\[{=]\)\s*\)\@<=/\%(/=\)\@!" start=+^/\%(/=\)\@!+ start=+\s\@<=/\%(/=\)\@![^[:space:][:digit:]$@%=]\@=\%(/\_s*\%([([{$@%&*[:digit:]"'`]\|\_s\w\|[[:upper:]_abd-fhjklnqrt-wyz]\)\)\@!+ skip=+\\/+ end=+/[cgimopsx]*+ contains=@perlInterpSlash
syn region perlMatch matchgroup=perlMatchStartEnd start="\%([$@%&*]\@<!\%(\<split\|\<while\|\<if\|\<unless\|\.\.\|[-+*!~(\[{=]\)\s*\)\@<=/\%(/=\)\@!" start=+^/\%(/=\)\@!+ start=+\s\@<=/\%(/=\)\@![^[:space:][:digit:]$@%=]\@=\%(/\_s*\%([([{$@%&*[:digit:]"'`]\|\_s\w\|[[:upper:]_abd-fhjklnqrt-wyz]\)\)\@!+ skip=+\\/+ end=+/[msixpodualgc]*+ contains=@perlInterpSlash
" Substitutions
@@ -254,13 +266,13 @@ syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s#+
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*(+ end=+)+ contains=@perlInterpMatch,perlParensDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*<+ end=+>+ contains=@perlInterpMatch,perlAnglesDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*\[+ end=+\]+ contains=@perlInterpMatch,perlBracketsDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*{+ end=+}+ contains=@perlInterpMatch,perlBracesDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend
syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+\z([^[:space:]'([{<]\)+ end=+\z1[ecgimopsx]*+ keepend contained contains=@perlInterpDQ
syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+(+ end=+)[ecgimopsx]*+ contained contains=@perlInterpDQ,perlParensDQ keepend
syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+\[+ end=+\][ecgimopsx]*+ contained contains=@perlInterpDQ,perlBracketsDQ keepend
syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+{+ end=+}[ecgimopsx]*+ contained contains=@perlInterpDQ,perlBracesDQ keepend
syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+<+ end=+>[ecgimopsx]*+ contained contains=@perlInterpDQ,perlAnglesDQ keepend
syn region perlSubstitutionSQ matchgroup=perlMatchStartEnd start=+'+ end=+'[ecgimopsx]*+ contained contains=@perlInterpSQ keepend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*{+ end=+}+ contains=@perlInterpMatch,perlBracesDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend extend
syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+\z([^[:space:]'([{<]\)+ end=+\z1[msixpodualgcer]*+ keepend contained contains=@perlInterpDQ
syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+(+ end=+)[msixpodualgcer]*+ contained contains=@perlInterpDQ,perlParensDQ keepend
syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+\[+ end=+\][msixpodualgcer]*+ contained contains=@perlInterpDQ,perlBracketsDQ keepend
syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+{+ end=+}[msixpodualgcer]*+ contained contains=@perlInterpDQ,perlBracesDQ keepend extend
syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+<+ end=+>[msixpodualgcer]*+ contained contains=@perlInterpDQ,perlAnglesDQ keepend
syn region perlSubstitutionSQ matchgroup=perlMatchStartEnd start=+'+ end=+'[msixpodualgcer]*+ contained contains=@perlInterpSQ keepend
" Translations
" perlMatch is the first part, perlTranslation* is the second, translator part.
@@ -270,48 +282,48 @@ syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!\%(
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!\%(tr\|y\)\s*(+ end=+)+ contains=@perlInterpSQ,perlParensSQ nextgroup=perlTranslationGQ skipwhite skipempty skipnl
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!\%(tr\|y\)\s*<+ end=+>+ contains=@perlInterpSQ,perlAnglesSQ nextgroup=perlTranslationGQ skipwhite skipempty skipnl
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!\%(tr\|y\)\s*{+ end=+}+ contains=@perlInterpSQ,perlBracesSQ nextgroup=perlTranslationGQ skipwhite skipempty skipnl
syn region perlTranslationGQ matchgroup=perlMatchStartEnd start=+\z([^[:space:]([{<]\)+ end=+\z1[cds]*+ contained
syn region perlTranslationGQ matchgroup=perlMatchStartEnd start=+(+ end=+)[cds]*+ contains=perlParensSQ contained
syn region perlTranslationGQ matchgroup=perlMatchStartEnd start=+\[+ end=+\][cds]*+ contains=perlBracketsSQ contained
syn region perlTranslationGQ matchgroup=perlMatchStartEnd start=+{+ end=+}[cds]*+ contains=perlBracesSQ contained
syn region perlTranslationGQ matchgroup=perlMatchStartEnd start=+<+ end=+>[cds]*+ contains=perlAnglesSQ contained
syn region perlTranslationGQ matchgroup=perlMatchStartEnd start=+\z([^[:space:]([{<]\)+ end=+\z1[cdsr]*+ contained
syn region perlTranslationGQ matchgroup=perlMatchStartEnd start=+(+ end=+)[cdsr]*+ contains=perlParensSQ contained
syn region perlTranslationGQ matchgroup=perlMatchStartEnd start=+\[+ end=+\][cdsr]*+ contains=perlBracketsSQ contained
syn region perlTranslationGQ matchgroup=perlMatchStartEnd start=+{+ end=+}[cdsr]*+ contains=perlBracesSQ contained
syn region perlTranslationGQ matchgroup=perlMatchStartEnd start=+<+ end=+>[cdsr]*+ contains=perlAnglesSQ contained
" Strings and q, qq, qw and qr expressions
syn region perlStringUnexpanded matchgroup=perlStringStartEnd start="'" end="'" contains=@perlInterpSQ keepend
syn region perlString matchgroup=perlStringStartEnd start=+"+ end=+"+ contains=@perlInterpDQ keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q\>\s*\z([^[:space:]#([{<]\)+ end=+\z1+ contains=@perlInterpSQ keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q#+ end=+#+ contains=@perlInterpSQ keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q\s*(+ end=+)+ contains=@perlInterpSQ,perlParensSQ keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q\s*\[+ end=+\]+ contains=@perlInterpSQ,perlBracketsSQ keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q\s*{+ end=+}+ contains=@perlInterpSQ,perlBracesSQ keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q\s*<+ end=+>+ contains=@perlInterpSQ,perlAnglesSQ keepend
syn region perlStringUnexpanded matchgroup=perlStringStartEnd start="'" end="'" contains=@perlInterpSQ keepend extend
syn region perlString matchgroup=perlStringStartEnd start=+"+ end=+"+ contains=@perlInterpDQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q\>\s*\z([^[:space:]#([{<]\)+ end=+\z1+ contains=@perlInterpSQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q#+ end=+#+ contains=@perlInterpSQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q\s*(+ end=+)+ contains=@perlInterpSQ,perlParensSQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q\s*\[+ end=+\]+ contains=@perlInterpSQ,perlBracketsSQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q\s*{+ end=+}+ contains=@perlInterpSQ,perlBracesSQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q\s*<+ end=+>+ contains=@perlInterpSQ,perlAnglesSQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]\>\s*\z([^[:space:]#([{<]\)+ end=+\z1+ contains=@perlInterpDQ keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]#+ end=+#+ contains=@perlInterpDQ keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]\s*(+ end=+)+ contains=@perlInterpDQ,perlParensDQ keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]\s*\[+ end=+\]+ contains=@perlInterpDQ,perlBracketsDQ keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]\s*{+ end=+}+ contains=@perlInterpDQ,perlBracesDQ keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]\s*<+ end=+>+ contains=@perlInterpDQ,perlAnglesDQ keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]\>\s*\z([^[:space:]#([{<]\)+ end=+\z1+ contains=@perlInterpDQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]#+ end=+#+ contains=@perlInterpDQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]\s*(+ end=+)+ contains=@perlInterpDQ,perlParensDQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]\s*\[+ end=+\]+ contains=@perlInterpDQ,perlBracketsDQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]\s*{+ end=+}+ contains=@perlInterpDQ,perlBracesDQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]\s*<+ end=+>+ contains=@perlInterpDQ,perlAnglesDQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*\z([^[:space:]#([{<]\)+ end=+\z1+ contains=@perlInterpSQ keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw#+ end=+#+ contains=@perlInterpSQ keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*(+ end=+)+ contains=@perlInterpSQ,perlParensSQ keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*\[+ end=+\]+ contains=@perlInterpSQ,perlBracketsSQ keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*{+ end=+}+ contains=@perlInterpSQ,perlBracesSQ keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*<+ end=+>+ contains=@perlInterpSQ,perlAnglesSQ keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*\z([^[:space:]#([{<]\)+ end=+\z1+ contains=@perlInterpSQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw#+ end=+#+ contains=@perlInterpSQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*(+ end=+)+ contains=@perlInterpSQ,perlParensSQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*\[+ end=+\]+ contains=@perlInterpSQ,perlBracketsSQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*{+ end=+}+ contains=@perlInterpSQ,perlBracesSQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*<+ end=+>+ contains=@perlInterpSQ,perlAnglesSQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\>\s*\z([^[:space:]#([{<'/]\)+ end=+\z1[imosx]*+ contains=@perlInterpMatch keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*/+ end=+/[imosx]*+ contains=@perlInterpSlash keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr#+ end=+#[imosx]*+ contains=@perlInterpMatch keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*'+ end=+'[imosx]*+ contains=@perlInterpSQ keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*(+ end=+)[imosx]*+ contains=@perlInterpMatch,perlParensDQ keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\>\s*\z([^[:space:]#([{<'/]\)+ end=+\z1[imosx]*+ contains=@perlInterpMatch keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*/+ end=+/[imosx]*+ contains=@perlInterpSlash keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr#+ end=+#[imosx]*+ contains=@perlInterpMatch keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*'+ end=+'[imosx]*+ contains=@perlInterpSQ keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*(+ end=+)[imosx]*+ contains=@perlInterpMatch,perlParensDQ keepend extend
" A special case for qr{}, qr<> and qr[] which allows for comments and extra whitespace in the pattern
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*{+ end=+}[imosx]*+ contains=@perlInterpMatch,perlBracesDQ,perlComment keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*<+ end=+>[imosx]*+ contains=@perlInterpMatch,perlAnglesDQ,perlComment keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*\[+ end=+\][imosx]*+ contains=@perlInterpMatch,perlBracketsDQ,perlComment keepend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*{+ end=+}[imosx]*+ contains=@perlInterpMatch,perlBracesDQ,perlComment keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*<+ end=+>[imosx]*+ contains=@perlInterpMatch,perlAnglesDQ,perlComment keepend extend
syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*\[+ end=+\][imosx]*+ contains=@perlInterpMatch,perlBracketsDQ,perlComment keepend extend
" Constructs such as print <<EOF [...] EOF, 'here' documents
"
@@ -319,14 +331,14 @@ syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s
" 'if $a' in 'print <<EOF if $a'). This is almost impossible to get right it
" seems due to the 'auto-extending nature' of regions.
if exists("perl_fold")
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\).*+ end=+^\z1$+ contains=@perlInterpDQ fold
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ end=+^\z1$+ contains=@perlInterpDQ fold
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ end=+^\z1$+ contains=@perlInterpSQ fold
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine fold
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*''+ end=+^$+ contains=@perlInterpSQ,perlNotEmptyLine fold
syn region perlAutoload matchgroup=perlStringStartEnd start=+<<\s*\(['"]\=\)\z(END_\%(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)\1+ end=+^\z1$+ contains=ALL fold
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\).*+ end=+^\z1$+ contains=@perlInterpDQ fold extend
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ end=+^\z1$+ contains=@perlInterpDQ fold extend
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ end=+^\z1$+ contains=@perlInterpSQ fold extend
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine fold extend
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*''+ end=+^$+ contains=@perlInterpSQ,perlNotEmptyLine fold extend
syn region perlAutoload matchgroup=perlStringStartEnd start=+<<\s*\(['"]\=\)\z(END_\%(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)\1+ end=+^\z1$+ contains=ALL fold extend
else
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\)+ end=+^\z1$+ contains=@perlInterpDQ
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\).*+ end=+^\z1$+ contains=@perlInterpDQ
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ end=+^\z1$+ contains=@perlInterpDQ
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ end=+^\z1$+ contains=@perlInterpSQ
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine
@@ -349,13 +361,13 @@ if v:version == 701 && !has('patch221') " XXX I hope that's the right one
else
syn match perlSubAttributesCont "\h\w*\_s*\%(:\_s*\)\=" nextgroup=@perlSubAttrMaybe contained
syn region perlSubAttributesCont matchgroup=perlSubAttributesCont start="\h\w*(" end=")\_s*\%(:\_s*\)\=" nextgroup=@perlSubAttrMaybe contained contains=@perlInterpSQ,perlParensSQ
syn cluster perlSubAttrMaybe contains=perlSubAttributesCont,perlSubError
syn cluster perlSubAttrMaybe contains=perlSubAttributesCont,perlSubError,perlFakeGroup
syn match perlSubAttributes "" contained nextgroup=perlSubError
syn match perlSubAttributes ":\_s*" contained nextgroup=@perlSubAttrMaybe
endif
syn match perlSubPrototypeError "(\%(\_s*\%(\%(\\\%([$@%&*]\|\[[$@%&*]\+\]\)\|[$&*]\|[@%]\%(\_s*)\)\@=\|;\%(\_s*[)$@%&*\\]\)\@=\|_\%(\_s*[);]\)\@=\)\_s*\)*\)\@>\zs\_[^)]\+" contained
syn match perlSubPrototype +(\_[^)]*)\_s*\|+ nextgroup=perlSubAttributes contained contains=perlSubPrototypeError
syn match perlSubName +\%(\h\|::\|'\w\)\%(\w\|::\|'\w\)*\_s*\|+ contained nextgroup=perlSubPrototype
syn match perlSubPrototype +(\_[^)]*)\_s*\|+ nextgroup=perlSubAttributes,perlComment contained contains=perlSubPrototypeError
syn match perlSubName +\%(\h\|::\|'\w\)\%(\w\|::\|'\w\)*\_s*\|+ contained nextgroup=perlSubPrototype,perlComment
syn match perlFunction +\<sub\>\_s*+ nextgroup=perlSubName
@@ -371,7 +383,7 @@ endif
syn match perlString "\I\@<!-\?\I\i*\%(\s*=>\)\@="
" All other # are comments, except ^#!
syn match perlComment "#.*" contains=perlTodo,@Spell
syn match perlComment "#.*" contains=perlTodo,@Spell extend
syn match perlSharpBang "^#!.*"
" Formats
@@ -385,9 +397,11 @@ syn match perlFormatField "@$" contained
" __END__ and __DATA__ clauses
if exists("perl_fold")
syntax region perlDATA start="^__\%(DATA\|END\)__$" skip="." end="." contains=perlPOD,@perlDATA fold
syntax region perlDATA start="^__DATA__$" skip="." end="." fold
syntax region perlDATA start="^__END__$" skip="." end="." contains=perlPOD,@perlDATA fold
else
syntax region perlDATA start="^__\%(DATA\|END\)__$" skip="." end="." contains=perlPOD,@perlDATA
syntax region perlDATA start="^__DATA__$" skip="." end="."
syntax region perlDATA start="^__END__$" skip="." end="." contains=perlPOD,@perlDATA
endif
"
@@ -400,8 +414,15 @@ if exists("perl_fold")
syn region perlPackageFold start="^package \S\+;\s*\%(#.*\)\=$" end="^1;\=\s*\%(#.*\)\=$" end="\n\+package"me=s-1 transparent fold keepend
endif
if !exists("perl_nofold_subs")
syn region perlSubFold start="^\z(\s*\)\<sub\>.*[^};]$" end="^\z1}\s*\%(#.*\)\=$" transparent fold keepend
syn region perlSubFold start="^\z(\s*\)\<\%(BEGIN\|END\|CHECK\|INIT\|UNITCHECK\)\>.*[^};]$" end="^\z1}\s*$" transparent fold keepend
if exists("perl_fold_anonymous_subs") && perl_fold_anonymous_subs
syn region perlSubFold start="\<sub\>[^\n;]*{" end="}" transparent fold keepend extend
syn region perlSubFold start="\<\%(BEGIN\|END\|CHECK\|INIT\)\>\s*{" end="}" transparent fold keepend
syn region perlBraces start="{" end="}" transparent extend
else
syn region perlSubFold start="^\z(\s*\)\<sub\>.*[^};]$" end="^\z1}\s*\%(#.*\)\=$" transparent fold keepend
syn region perlSubFold start="^\z(\s*\)\<\%(BEGIN\|END\|CHECK\|INIT\|UNITCHECK\)\>.*[^};]$" end="^\z1}\s*$" transparent fold keepend
endif
endif
if exists("perl_fold_blocks")
@@ -418,6 +439,9 @@ endif
command -nargs=+ HiLink hi def link <args>
" NOTE: If you're linking new highlight groups to perlString, please also put
" them into b:match_skip in ftplugin/perl.vim.
" The default highlighting.
HiLink perlSharpBang PreProc
HiLink perlControl PreProc
@@ -505,6 +529,22 @@ HiLink perlSpecialStringU perlSpecial
HiLink perlSpecialMatch perlSpecial
HiLink perlDATA perlComment
" NOTE: Due to a bug in Vim (or more likely, a misunderstanding on my part),
" I had to remove the transparent property from the following regions
" in order to get them to highlight correctly. Feel free to remove
" these and reinstate the transparent property if you know how.
HiLink perlParensSQ perlString
HiLink perlBracketsSQ perlString
HiLink perlBracesSQ perlString
HiLink perlAnglesSQ perlString
HiLink perlParensDQ perlString
HiLink perlBracketsDQ perlString
HiLink perlBracesDQ perlString
HiLink perlAnglesDQ perlString
HiLink perlSpecialStringU2 perlString
" Possible errors
HiLink perlNotEmptyLine Error
HiLink perlElseIfError Error
@@ -539,5 +579,13 @@ syn sync match perlSyncPOD grouphere NONE "^=cut"
let b:current_syntax = "perl"
if exists('&regexpengine')
let &regexpengine=s:regexpengine
unlet s:regexpengine
endif
let &cpo = s:cpo_save
unlet s:cpo_save
" XXX Change to sts=4:sw=4
" vim:ts=8:sts=2:sw=2:expandtab:ft=vim

View File

@@ -1,12 +1,13 @@
" Vim syntax file
" Language: Perl 6
" Maintainer: Andy Lester <andy@petdance.com>
" Homepage: http://github.com/petdance/vim-perl/tree/master
" Last Change: 2012 Apr 30
" Language: Perl 6
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Homepage: http://github.com/vim-perl/vim-perl/tree/master
" Bugs/requests: http://github.com/vim-perl/vim-perl/issues
" Last Change: 2009-07-04
" Contributors: Luke Palmer <fibonaci@babylonia.flatirons.org>
" Moritz Lenz <moritz@faui2k3.org>
" Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
" Contributors: Luke Palmer <fibonaci@babylonia.flatirons.org>
" Moritz Lenz <moritz@faui2k3.org>
" Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
"
" This is a big undertaking. Perl 6 is the sort of language that only Perl
" can parse. But I'll do my best to get vim to.
@@ -1023,7 +1024,7 @@ syn match p6PackageScope display "\%(\K\%(\k\|[-']\K\@=\)*\)\?::" nextgroup=p6Pa
" TODO: mostly stolen from perl.vim, might need more work
syn region p6Match
\ matchgroup=p6Quote
\ start="\%([$@%&*]\@<!\%(\<\%(split\|while\|until\|if\|unless\)\|\.\.\|[-+*!~(\[{=]\)\s*\)\@<=//\@!"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\%(\<\%(split\|while\|until\|if\|unless\)\|\.\.\|[-+*!~(\[{=]\)\s*\)\@<=//\@!"
\ start="^//\@!"
\ start=+\s\@<=/[^[:space:][:digit:]$@%=]\@=\%(/\_s*\%([([{$@%&*[:digit:]"'`]\|\_s\w\|[[:upper:]_abd-fhjklnqrt-wyz]\)\)\@!/\@!+
\ skip="\\/"
@@ -1033,7 +1034,7 @@ syn region p6Match
" m/foo/, mm/foo/, rx/foo/
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<\%(mm\?\|rx\)\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=//\@!"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<\%(mm\?\|rx\)\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=//\@!"
\ skip="\\/"
\ end="/"
\ keepend
@@ -1042,7 +1043,7 @@ syn region p6Match
" m!foo!, mm!foo!, rx!foo!
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<\%(mm\?\|rx\)\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=!!\@!"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<\%(mm\?\|rx\)\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=!!\@!"
\ skip="\\!"
\ end="!"
\ keepend
@@ -1051,7 +1052,7 @@ syn region p6Match
" m$foo$, mm$foo$, rx$foo$, m|foo|, mm|foo|, rx|foo|, etc
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<\%(mm\?\|rx\)\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=\z([\"'`|,$]\)\$\@!"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<\%(mm\?\|rx\)\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=\z([\"'`|,$]\)\$\@!"
\ skip="\\\z1"
\ end="\z1"
\ keepend
@@ -1060,7 +1061,7 @@ syn region p6Match
" m (foo), mm (foo), rx (foo)
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<\%(mm\?\|rx\)\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s\+\)\@<=()\@!)\@!"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<\%(mm\?\|rx\)\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s\+\)\@<=()\@!)\@!"
\ skip="\\)"
\ end=")"
\ contains=@p6Regexen,@p6Variables
@@ -1068,7 +1069,7 @@ syn region p6Match
" m[foo], mm[foo], rx[foo]
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<\%(mm\?\|rx\)\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=\[]\@!]\@!"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<\%(mm\?\|rx\)\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=\[]\@!]\@!"
\ skip="\\]"
\ end="]"
\ contains=@p6Regexen,@p6Variables
@@ -1076,7 +1077,7 @@ syn region p6Match
" m{foo}, mm{foo}, rx{foo}
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<\%(mm\?\|rx\)\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<={}\@!}\@!"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<\%(mm\?\|rx\)\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<={}\@!}\@!"
\ skip="\\}"
\ end="}"
\ contains=@p6Regexen,@p6Variables
@@ -1084,7 +1085,7 @@ syn region p6Match
" m<foo>, mm<foo>, rx<foo>
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<\%(mm\?\|rx\)\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=<>\@!>\@!"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<\%(mm\?\|rx\)\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=<>\@!>\@!"
\ skip="\\>"
\ end=">"
\ contains=@p6Regexen,@p6Variables
@@ -1092,7 +1093,7 @@ syn region p6Match
" m«foo», mm«foo», rx«foo»
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<\%(mm\?\|rx\)\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=«»\@!»\@!"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<\%(mm\?\|rx\)\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=«»\@!»\@!"
\ skip="\\»"
\ end="»"
\ contains=@p6Regexen,@p6Variables
@@ -1102,7 +1103,7 @@ syn region p6Match
" s/foo/bar/
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<s\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=/"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<s\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=/"
\ skip="\\/"
\ end="/"me=e-1
\ keepend
@@ -1121,7 +1122,7 @@ syn region p6Substitution
" s!foo!bar!
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<s\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=!"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<s\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=!"
\ skip="\\!"
\ end="!"me=e-1
\ keepend
@@ -1140,7 +1141,7 @@ syn region p6Substitution
" s$foo$bar$, s|foo|bar, etc
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<s\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=\z([\"'`|,$]\)"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<s\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=\z([\"'`|,$]\)"
\ skip="\\\z1"
\ end="\z1"me=e-1
\ keepend
@@ -1159,7 +1160,7 @@ syn region p6Substitution
" s{foo}
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<s\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<={}\@!"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<s\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<={}\@!"
\ skip="\\}"
\ end="}"
\ contains=@p6Regexen,@p6Variables
@@ -1167,7 +1168,7 @@ syn region p6Match
" s[foo]
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<s\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=\[]\@!"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<s\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=\[]\@!"
\ skip="\\]"
\ end="]"
\ contains=@p6Regexen,@p6Variables
@@ -1175,7 +1176,7 @@ syn region p6Match
" s<foo>
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<s\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=<>\@!"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<s\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=<>\@!"
\ skip="\\>"
\ end=">"
\ contains=@p6Regexen,@p6Variables
@@ -1183,7 +1184,7 @@ syn region p6Match
" s«foo»
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<s\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=«»\@!"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<s\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=«»\@!"
\ skip="\\»"
\ end="»"
\ contains=@p6Regexen,@p6Variables
@@ -1191,7 +1192,7 @@ syn region p6Match
" s (foo)
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<s\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s\+\)\@<=()\@!"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<s\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s\+\)\@<=()\@!"
\ skip="\\)"
\ end=")"
\ contains=@p6Regexen,@p6Variables
@@ -1201,7 +1202,7 @@ syn region p6Match
" m:P5//
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<m\s*:P\%(erl\)\?5\s*\)\@<=/"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<m\s*:P\%(erl\)\?5\s*\)\@<=/"
\ skip="\\/"
\ end="/"
\ contains=@p6RegexP5,p6Variable,p6VarExclam,p6VarMatch,p6VarNum
@@ -1209,7 +1210,7 @@ syn region p6Match
" m:P5!!
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<m\s*:P\%(erl\)\?5\s*\)\@<=!"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<m\s*:P\%(erl\)\?5\s*\)\@<=!"
\ skip="\\!"
\ end="!"
\ contains=@p6RegexP5,p6Variable,p6VarSlash,p6VarMatch,p6VarNum
@@ -1217,7 +1218,7 @@ syn region p6Match
" m:P5$$, m:P5||, etc
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<m\s*:P\%(erl\)\?5\s*\)\@<=\z([\"'`|,$]\)"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<m\s*:P\%(erl\)\?5\s*\)\@<=\z([\"'`|,$]\)"
\ skip="\\\z1"
\ end="\z1"
\ contains=@p6RegexP5,@p6Variables
@@ -1225,7 +1226,7 @@ syn region p6Match
" m:P5 ()
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<m\s*:P\%(erl\)\?5\s\+\)\@<=()\@!"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<m\s*:P\%(erl\)\?5\s\+\)\@<=()\@!"
\ skip="\\)"
\ end=")"
\ contains=@p6RegexP5,@p6Variables
@@ -1233,7 +1234,7 @@ syn region p6Match
" m:P5[]
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<m\s*:P\%(erl\)\?5\s*\)\@<=[]\@!"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<m\s*:P\%(erl\)\?5\s*\)\@<=[]\@!"
\ skip="\\]"
\ end="]"
\ contains=@p6RegexP5,@p6Variables
@@ -1241,7 +1242,7 @@ syn region p6Match
" m:P5{}
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<m\s*:P\%(erl\)\?5\s*\)\@<={}\@!"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<m\s*:P\%(erl\)\?5\s*\)\@<={}\@!"
\ skip="\\}"
\ end="}"
\ contains=@p6RegexP5,p6Variables
@@ -1249,7 +1250,7 @@ syn region p6Match
" m:P5<>
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<m\s*:P\%(erl\)\?5\s*\)\@<=<>\@!"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<m\s*:P\%(erl\)\?5\s*\)\@<=<>\@!"
\ skip="\\>"
\ end=">"
\ contains=@p6RegexP5,p6Variables
@@ -1257,7 +1258,7 @@ syn region p6Match
" m:P5«»
syn region p6Match
\ matchgroup=p6Quote
\ start="\%(\<m\s*:P\%(erl\)\?5\s*\)\@<=«»\@!"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<m\s*:P\%(erl\)\?5\s*\)\@<=«»\@!"
\ skip="\\»"
\ end="»"
\ contains=@p6RegexP5,p6Variables
@@ -1267,7 +1268,7 @@ syn region p6Match
" tr/foo/bar/, tr|foo|bar, etc
syn region p6String
\ matchgroup=p6Quote
\ start="\%(\<tr\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=\z([/\"'`|!,$]\)"
\ start="\%(\%(::\|[$@%&][.!^:*?]\?\|\.\)\@<!\<tr\%(\s*:!\?\k\%(\k\|[-']\K\@=\)*\%(([^)]*)\)\?\)*\s*\)\@<=\z([/\"'`|!,$]\)"
\ skip="\\\z1"
\ end="\z1"me=e-1
\ contains=p6RxRange

View File

@@ -1,9 +1,10 @@
" Vim syntax file
" Language: Perl POD format
" Maintainer: Andy Lester <andy@petdance.com>
" Previously: Scott Bigham <dsb@killerbunnies.org>
" URL: http://github.com/petdance/vim-perl
" Last Change: 2009-08-14
" Language: Perl POD format
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Previously: Scott Bigham <dsb@killerbunnies.org>
" Homepage: http://github.com/vim-perl/vim-perl
" Bugs/requests: http://github.com/vim-perl/vim-perl/issues
" Last Change: 2013 May 30
" To add embedded POD documentation highlighting to your syntax file, add
" the commands:
@@ -26,7 +27,11 @@ elseif exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
" POD commands
syn match podCommand "^=encoding" nextgroup=podCmdText contains=@NoSpell
syn match podCommand "^=head[1234]" nextgroup=podCmdText contains=@NoSpell
syn match podCommand "^=item" nextgroup=podCmdText contains=@NoSpell
syn match podCommand "^=over" nextgroup=podOverIndent skipwhite contains=@NoSpell
@@ -85,6 +90,100 @@ if version >= 508 || !exists("did_pod_syntax_inits")
delcommand HiLink
endif
if exists("perl_pod_spellcheck_headings")
" Spell-check headings
syn clear podCmdText
syn match podCmdText ".*$" contained contains=podFormat
endif
if exists("perl_pod_formatting")
" By default, escapes like C<> are not checked for spelling. Remove B<>
" and I<> from the list of escapes.
syn clear podFormat
syn region podFormat start="[CLF]<[^<]"me=e-1 end=">" oneline contains=podFormat,@NoSpell
syn region podFormat start="[CLF]<<\s" end="\s>>" oneline contains=podFormat,@NoSpell
" Don't spell-check inside E<>, but ensure that the E< itself isn't
" marked as a spelling mistake.
syn match podFormat "E<\(\d\+\|\I\i*\)>" contains=podEscape,podEscape2,@NoSpell
" Z<> is a mock formatting code. Ensure Z<> on its own isn't marked as a
" spelling mistake.
syn match podFormat "Z<>" contains=podEscape,podEscape2,@NoSpell
" These are required so that whatever is *within* B<...>, I<...>, etc. is
" spell-checked, but not the B, I, ... itself.
syn match podBoldOpen "B<" contains=@NoSpell
syn match podItalicOpen "I<" contains=@NoSpell
syn match podNoSpaceOpen "S<" contains=@NoSpell
syn match podIndexOpen "X<" contains=@NoSpell
" Same as above but for the << >> syntax.
syn match podBoldAlternativeDelimOpen "B<< " contains=@NoSpell
syn match podItalicAlternativeDelimOpen "I<< " contains=@NoSpell
syn match podNoSpaceAlternativeDelimOpen "S<< " contains=@NoSpell
syn match podIndexAlternativeDelimOpen "X<< " contains=@NoSpell
" Add support for spell checking text inside B<>, I<>, S<> and X<>.
syn region podBold start="B<[^<]"me=e end=">" oneline contains=podBoldItalic,podBoldOpen
syn region podBoldAlternativeDelim start="B<<\s" end="\s>>" oneline contains=podBoldAlternativeDelimOpen
syn region podItalic start="I<[^<]"me=e end=">" oneline contains=podItalicBold,podItalicOpen
syn region podItalicAlternativeDelim start="I<<\s" end="\s>>" oneline contains=podItalicAlternativeDelimOpen
" Nested bold/italic and vice-versa
syn region podBoldItalic contained start="I<[^<]"me=e end=">" oneline
syn region podItalicBold contained start="B<[^<]"me=e end=">" oneline
syn region podNoSpace start="S<[^<]"ms=s-2 end=">"me=e oneline contains=podNoSpaceOpen
syn region podNoSpaceAlternativeDelim start="S<<\s"ms=s-2 end="\s>>"me=e oneline contains=podNoSpaceAlternativeDelimOpen
syn region podIndex start="X<[^<]"ms=s-2 end=">"me=e oneline contains=podIndexOpen
syn region podIndexAlternativeDelim start="X<<\s"ms=s-2 end="\s>>"me=e oneline contains=podIndexAlternativeDelimOpen
" Restore this (otherwise B<> is shown as bold inside verbatim)
syn match podVerbatimLine "^\s.*$" contains=@NoSpell
" Ensure formatted text can be displayed in headings and items
syn clear podCmdText
if exists("perl_pod_spellcheck_headings")
syn match podCmdText ".*$" contained contains=podFormat,podBold,
\podBoldAlternativeDelim,podItalic,podItalicAlternativeDelim,
\podBoldOpen,podItalicOpen,podBoldAlternativeDelimOpen,
\podItalicAlternativeDelimOpen,podNoSpaceOpen
else
syn match podCmdText ".*$" contained contains=podFormat,podBold,
\podBoldAlternativeDelim,podItalic,podItalicAlternativeDelim,
\@NoSpell
endif
" Specify how to display these
hi def podBold term=bold cterm=bold gui=bold
hi link podBoldAlternativeDelim podBold
hi link podBoldAlternativeDelimOpen podBold
hi link podBoldOpen podBold
hi link podNoSpace Identifier
hi link podNoSpaceAlternativeDelim Identifier
hi link podIndex Identifier
hi link podIndexAlternativeDelim Identifier
hi def podItalic term=italic cterm=italic gui=italic
hi link podItalicAlternativeDelim podItalic
hi link podItalicAlternativeDelimOpen podItalic
hi link podItalicOpen podItalic
hi def podBoldItalic term=italic,bold cterm=italic,bold gui=italic,bold
hi def podItalicBold term=italic,bold cterm=italic,bold gui=italic,bold
endif
let b:current_syntax = "pod"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ts=8

View File

@@ -1,8 +1,8 @@
" Vim syntax file
" Language: PROLOG
" Maintainers: Thomas Koehler <jean-luc@picard.franken.de>
" Last Change: 2009 Dec 04
" URL: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/vim/syntax/prolog.vim
" Last Change: 2013 May 23
" URL: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/vim/syntax/prolog.vim
" There are two sets of highlighting in here:
" If the "prolog_highlighting_clean" variable exists, it is rather sparse.
@@ -21,14 +21,14 @@ syn case match
" Very simple highlighting for comments, clause heads and
" character codes. It respects prolog strings and atoms.
syn region prologCComment start=+/\*+ end=+\*/+
syn match prologComment +%.*+
syn region prologCComment start=+/\*+ end=+\*/+
syn match prologComment +%.*+
syn keyword prologKeyword module meta_predicate multifile dynamic
syn match prologCharCode +0'\\\=.+
syn region prologString start=+"+ skip=+\\\\\|\\"+ end=+"+
syn region prologAtom start=+'+ skip=+\\\\\|\\'+ end=+'+
syn region prologClauseHead start=+^[a-z][^(]*(+ skip=+\.[^ ]+ end=+:-\|\.$\|\.[ ]\|-->+ contains=prologComment,prologCComment,prologString
syn keyword prologKeyword module meta_predicate multifile dynamic
syn match prologCharCode +0'\\\=.+
syn region prologString start=+"+ skip=+\\\\\|\\"+ end=+"+
syn region prologAtom start=+'+ skip=+\\\\\|\\'+ end=+'+
syn region prologClause matchgroup=prologClauseHead start=+^\s*[a-z]\w*+ matchgroup=Normal end=+\.\s\|\.$+ contains=ALLBUT,prologClause
if !exists("prolog_highlighting_clean")
@@ -40,12 +40,12 @@ if !exists("prolog_highlighting_clean")
syn keyword prologKeyword arg current_prolog_flag put_char
syn keyword prologKeyword asserta fail put_code
syn keyword prologKeyword assertz findall read
syn keyword prologKeyword at_end_of_stream float read_term
syn keyword prologKeyword at_end_of_stream float read_term
syn keyword prologKeyword atom flush_output repeat
syn keyword prologKeyword atom_chars functor retract
syn keyword prologKeyword atom_codes get_byte set_input
syn keyword prologKeyword atom_concat get_char set_output
syn keyword prologKeyword atom_length get_code set_prolog_flag
syn keyword prologKeyword atom_codes get_byte set_input
syn keyword prologKeyword atom_concat get_char set_output
syn keyword prologKeyword atom_length get_code set_prolog_flag
syn keyword prologKeyword atomic halt set_stream_position
syn keyword prologKeyword bagof integer setof
syn keyword prologKeyword call is stream_property
@@ -54,7 +54,7 @@ if !exists("prolog_highlighting_clean")
syn keyword prologKeyword char_conversion number true
syn keyword prologKeyword clause number_chars unify_with_occurs_check
syn keyword prologKeyword close number_codes var
syn keyword prologKeyword compound once write
syn keyword prologKeyword compound once write
syn keyword prologKeyword copy_term op write_canonical
syn keyword prologKeyword current_char_conversion open write_term
syn keyword prologKeyword current_input peek_byte writeq
@@ -63,11 +63,13 @@ if !exists("prolog_highlighting_clean")
syn match prologOperator "=\\=\|=:=\|\\==\|=<\|==\|>=\|\\=\|\\+\|<\|>\|="
syn match prologAsIs "===\|\\===\|<=\|=>"
syn match prologNumber "\<[0123456789]*\>'\@!"
syn match prologNumber "\<[0123456789]*\>'\@!"
syn match prologCommentError "\*/"
syn match prologSpecialCharacter ";"
syn match prologSpecialCharacter "!"
syn match prologQuestion "?-.*\." contains=prologNumber
syn match prologSpecialCharacter ":-"
syn match prologSpecialCharacter "-->"
syn match prologQuestion "?-.*\." contains=prologNumber
endif
@@ -87,27 +89,29 @@ if version >= 508 || !exists("did_prolog_syn_inits")
endif
" The default highlighting.
HiLink prologComment Comment
HiLink prologCComment Comment
HiLink prologCharCode Special
HiLink prologComment Comment
HiLink prologCComment Comment
HiLink prologCharCode Special
if exists ("prolog_highlighting_clean")
HiLink prologKeyword Statement
HiLink prologClauseHead Statement
HiLink prologKeyword Statement
HiLink prologClauseHead Statement
HiLink prologClause Normal
else
HiLink prologKeyword Keyword
HiLink prologClauseHead Constant
HiLink prologQuestion PreProc
HiLink prologKeyword Keyword
HiLink prologClauseHead Constant
HiLink prologClause Normal
HiLink prologQuestion PreProc
HiLink prologSpecialCharacter Special
HiLink prologNumber Number
HiLink prologAsIs Normal
HiLink prologCommentError Error
HiLink prologAtom String
HiLink prologString String
HiLink prologOperator Operator
HiLink prologNumber Number
HiLink prologAsIs Normal
HiLink prologCommentError Error
HiLink prologAtom String
HiLink prologString String
HiLink prologOperator Operator
endif

74
runtime/syntax/proto.vim Normal file
View File

@@ -0,0 +1,74 @@
" syntax file for Protocol Buffers - Google's data interchange format
"
" Copyright 2008 Google Inc. All rights reserved.
"
" Permission is hereby granted, free of charge, to any person obtaining a copy
" of this software and associated documentation files (the "Software"), to deal
" in the Software without restriction, including without limitation the rights
" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
" copies of the Software, and to permit persons to whom the Software is
" furnished to do so, subject to the following conditions:
"
" The above copyright notice and this permission notice shall be included in
" all copies or substantial portions of the Software.
"
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
" THE SOFTWARE.
"
" http://code.google.com/p/protobuf/
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
syn case match
syn keyword protoTodo contained TODO FIXME XXX
syn cluster protoCommentGrp contains=protoTodo
syn keyword protoSyntax syntax import option
syn keyword protoStructure package message group
syn keyword protoRepeat optional required repeated
syn keyword protoDefault default
syn keyword protoExtend extend extensions to max
syn keyword protoRPC service rpc returns
syn keyword protoType int32 int64 uint32 uint64 sint32 sint64
syn keyword protoType fixed32 fixed64 sfixed32 sfixed64
syn keyword protoType float double bool string bytes
syn keyword protoTypedef enum
syn keyword protoBool true false
syn match protoInt /-\?\<\d\+\>/
syn match protoInt /\<0[xX]\x+\>/
syn match protoFloat /\<-\?\d*\(\.\d*\)\?/
syn region protoComment start="\/\*" end="\*\/" contains=@protoCommentGrp
syn region protoComment start="//" skip="\\$" end="$" keepend contains=@protoCommentGrp
syn region protoString start=/"/ skip=/\\./ end=/"/
syn region protoString start=/'/ skip=/\\./ end=/'/
hi def link protoTodo Todo
hi def link protoSyntax Include
hi def link protoStructure Structure
hi def link protoRepeat Repeat
hi def link protoDefault Keyword
hi def link protoExtend Keyword
hi def link protoRPC Keyword
hi def link protoType Type
hi def link protoTypedef Typedef
hi def link protoBool Boolean
hi def link protoInt Number
hi def link protoFloat Float
hi def link protoComment Comment
hi def link protoString String
let b:current_syntax = "proto"

View File

@@ -3,7 +3,7 @@
" Maintainer: Jakson Aquino <jalvesaq@gmail.com>
" Former Maintainers: Vaidotas Zemlys <zemlys@gmail.com>
" Tom Payne <tom@tompayne.org>
" Last Change: Sun Feb 20, 2011 12:06PM
" Last Change: Sun May 19, 2013 05:59PM
" Filenames: *.R *.r *.Rhistory *.Rt
"
" NOTE: The highlighting of R functions is defined in the
@@ -30,7 +30,16 @@ endif
syn case match
" Comment
syn match rComment contains=@Spell "\#.*"
syn match rComment contains=@Spell "#.*"
" Roxygen
syn match rOKeyword contained "@\(param\|return\|name\|rdname\|examples\|include\|docType\)"
syn match rOKeyword contained "@\(S3method\|TODO\|aliases\|alias\|assignee\|author\|callGraphDepth\|callGraph\)"
syn match rOKeyword contained "@\(callGraphPrimitives\|concept\|exportClass\|exportMethod\|exportPattern\|export\|formals\)"
syn match rOKeyword contained "@\(format\|importClassesFrom\|importFrom\|importMethodsFrom\|import\|keywords\)"
syn match rOKeyword contained "@\(method\|nord\|note\|references\|seealso\|setClass\|slot\|source\|title\|usage\)"
syn match rOComment contains=@Spell,rOKeyword "#'.*"
if &filetype == "rhelp"
" string enclosed in double quotes
@@ -65,7 +74,7 @@ syn keyword rConditional if else
syn keyword rRepeat for in repeat while
" Constant (not really)
syn keyword rConstant T F LETTERS letters month.ab month.name pi
syn keyword rConstant T F LETTERS letters month.abb month.name pi
syn keyword rConstant R.version.string
syn keyword rNumber NA_integer_ NA_real_ NA_complex_ NA_character_
@@ -105,8 +114,13 @@ syn match rOperator '-'
syn match rOperator '\*'
syn match rOperator '+'
syn match rOperator '='
syn match rOperator "[|!<>^~`/:@]"
syn match rOperator "%\{2}\|%\*%\|%\/%\|%in%\|%o%\|%x%"
if &filetype != "rmd" && &filetype != "rrst"
syn match rOperator "[|!<>^~/:]"
else
syn match rOperator "[|!<>^~`/:]"
endif
syn match rOperator "%\{2}\|%\S*%"
syn match rOpError '\*\{3}'
syn match rOpError '//'
syn match rOpError '&&&'
syn match rOpError '|||'
@@ -140,9 +154,11 @@ syn match rParenError "[\]}]" contained
runtime r-plugin/functions.vim
syn match rDollar display contained "\$"
syn match rDollar display contained "@"
" List elements will not be highlighted as functions:
syn match rLstElmt "\$[a-zA-Z0-9\\._]*" contains=rDollar
syn match rLstElmt "@[a-zA-Z0-9\\._]*" contains=rDollar
" Functions that may add new objects
syn keyword rPreProc library require attach detach source
@@ -156,7 +172,9 @@ endif
syn keyword rType array category character complex double function integer list logical matrix numeric vector data.frame
" Name of object with spaces
syn region rNameWSpace start="`" end="`"
if &filetype != "rmd" && &filetype != "rrst"
syn region rNameWSpace start="`" end="`"
endif
if &filetype == "rhelp"
syn match rhPreProc "^#ifdef.*"
@@ -169,6 +187,7 @@ hi def link rArrow Statement
hi def link rBoolean Boolean
hi def link rBraceError Error
hi def link rComment Comment
hi def link rOComment Comment
hi def link rComplex Number
hi def link rConditional Conditional
hi def link rConstant Constant
@@ -195,6 +214,7 @@ hi def link rStatement Statement
hi def link rString String
hi def link rStrError Error
hi def link rType Type
hi def link rOKeyword Title
let b:current_syntax="r"

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