Compare commits

...

141 Commits

Author SHA1 Message Date
Bram Moolenaar
5bfa2ed6e4 updated for version 7.4.449
Problem:    Can't easily close the help window. (Chris Gaal)
Solution:   Add ":helpclose". (Christian Brabandt)
2014-09-19 19:39:34 +02:00
Bram Moolenaar
4ee40b0515 updated for version 7.4.448
Problem:    Using ETO_IGNORELANGUAGE causes problems.
Solution:   Remove this flag. (Paul Moore)
2014-09-19 16:13:53 +02:00
Bram Moolenaar
b4b43bb572 updated for version 7.4.447
Problem:    Spell files from Hunspell may generate a lot of errors.
Solution:   Add the IGNOREEXTRA flag.
2014-09-19 16:04:11 +02:00
Bram Moolenaar
5d2bae8b1c updated for version 7.4.446
Problem:    In some situations, when setting up an environment to trigger an
            autocommand, the environment is not properly restored.
Solution:   Check the return value of switch_win() and call restore_win()
            always.  (Daniel Hahler)
2014-09-19 14:26:36 +02:00
Bram Moolenaar
714db3bb81 updated for version 7.4.445
Problem:    Clipboard may be cleared on startup.
Solution:   Set clip_did_set_selection to -1 during startup. (Christian
            Brabandt)
2014-09-19 13:46:52 +02:00
Bram Moolenaar
103650de90 updated for version 7.4.444
Problem:    Reversed question mark not recognized as punctuation. (Issue 258)
Solution:   Add the Supplemental Punctuation range.
2014-09-15 14:25:54 +02:00
Bram Moolenaar
3516928c75 updated for version 7.4.443
Problem:    Error reported by ubsan when running test 72.
Solution:   Add type cast to unsigned. (Dominique Pelle)
2014-09-11 22:50:09 +02:00
Bram Moolenaar
3089a1068d updated for version 7.4.442
Problem:    Using unitinialized variable.
Solution:   Pass the first window of the tabpage.
2014-09-09 23:11:49 +02:00
Bram Moolenaar
6e932461cb Update runtime files. 2014-09-09 18:48:09 +02:00
Bram Moolenaar
58da707d24 updated for version 7.4.441
Problem:    Endless loop and other problems when 'cedit' is set to CTRL-C.
Solution:   Do not call ex_window() when ex_normal_busy or got_int was set.
            (Yasuhiro Matsumoto)
2014-09-09 18:45:49 +02:00
Bram Moolenaar
834def3872 updated for version 7.4.440
Problem:    Omni complete popup drawn incorrectly.
Solution:   Call validate_cursor() instead of check_cursor(). (Hirohito
            Higashi)
2014-09-09 18:29:33 +02:00
Bram Moolenaar
f638cbce76 updated for version 7.4.439
Problem:    Duplicate message in message history.  Some quickfix messages
            appear twice. (Gary Johnson)
Solution:   Do not reset keep_msg too early. (Hirohito Higashi)
2014-09-09 17:47:38 +02:00
Bram Moolenaar
5a4eceb02a updated for version 7.4.438
Problem:    Cached values for 'cino' not reset for ":set all&".
Solution:   Call parse_cino(). (Yukihiro Nakadaira)
2014-09-09 17:33:07 +02:00
Bram Moolenaar
fb03140730 updated for version 7.4.437
Problem:    New and old regexp engine are not consistent.
Solution:   Also give an error for "\ze*" for the old regexp engine.
2014-09-09 17:18:49 +02:00
Bram Moolenaar
371932a775 updated for version 7.4.436
Problem:    ml_get error for autocommand that moves the cursor of the current
            window.
Solution:   Check the cursor position after switching back to the current
            buffer.  (Christian Brabandt)
2014-09-09 16:59:38 +02:00
Bram Moolenaar
0026d47d8c updated for version 7.4.435
Problem:    Line formatting behaves differently when 'linebreak' is set.
            (mvxxc)
Solution:   Disable 'linebreak' temporarily. (Christian Brabandt)
2014-09-09 16:32:39 +02:00
Bram Moolenaar
0e2ea1beb4 updated for version 7.4.434
Problem:    gettabvar() is not consistent with getwinvar() and getbufvar().
Solution:   Return a dict with all variables when the varname is empty.
            (Yasuhiro Matsumoto)
2014-09-09 16:13:08 +02:00
Bram Moolenaar
13e2a0af66 updated for version 7.4.433
Problem:    Test 75 fails on MS-Windows.
Solution:   Use ":normal" instead of feedkeys(). (Michael Soyka)
2014-09-09 13:52:58 +02:00
Bram Moolenaar
14993322b1 updated for version 7.4.432
Problem:    When the startup code expands command line arguments, setting
            'encoding' will not properly convert the arguments.
Solution:   Call get_cmd_argsW() early in main(). (Yasuhiro Matsumoto)
2014-09-09 12:25:33 +02:00
Bram Moolenaar
120f4a878f updated for version 7.4.431
Problem:    Compiler warning.
Solution:   Add type cast. (Mike Williams)
2014-09-09 12:22:06 +02:00
Bram Moolenaar
5d5fbe7a2b updated for version 7.4.430
Problem:    test_listlbr fails when compiled with normal features.
Solution:   Check for the +conceal feature.
2014-08-30 18:10:18 +02:00
Bram Moolenaar
84d8cdd769 updated for version 7.4.429
Problem:    Build fails with fewer features. (Elimar Riesebieter)
Solution:   Add #ifdef.
2014-08-30 13:32:06 +02:00
Bram Moolenaar
c40bdee42a updated for version 7.4.428
Problem:    executable() may return a wrong result on MS-Windows.
Solution:   Change the way SearchPath() is called. (Yasuhiro Matsumoto, Ken
            Takata)
2014-08-29 17:45:32 +02:00
Bram Moolenaar
52a7246f01 updated for version 7.4.427
Problem:    When an InsertCharPre autocommand executes system() typeahead may
            be echoed and messes up the display. (Jacob Niehus)
Solution:   Do not set cooked mode when invoked from ":silent".
2014-08-29 15:53:52 +02:00
Bram Moolenaar
96f3a49b3b updated for version 7.4.426
Problem:    README File missing from list of files.
Solution:   Update the list of files.
2014-08-29 15:12:54 +02:00
Bram Moolenaar
34401cca5a Update runtime files. 2014-08-29 15:12:19 +02:00
Bram Moolenaar
773b158de8 updated for version 7.4.425
Problem:    When 'showbreak' is used "gj" may move to the wrong position.
            (Nazri Ramliy)
Solution:   Adjust virtcol when 'showbreak' is set. (Christian Brabandt)
2014-08-29 14:20:51 +02:00
Bram Moolenaar
d7408fa0ce updated for version 7.4.424
Problem:    Get ml_get error when using Python to delete lines in a buffer
            that is not in a window.  issue 248.
Solution:   Do not try adjusting the cursor for a different buffer.
2014-08-29 13:49:52 +02:00
Bram Moolenaar
e4df164692 updated for version 7.4.423
Problem:    expand("$shell") does not work as documented.
Solution:   Do not escape the $ when expanding environment variables.
2014-08-29 12:58:44 +02:00
Bram Moolenaar
49f9dd7b91 updated for version 7.4.422
Problem:    When using conceal with linebreak some text is not displayed
            correctly. (Grüner Gimpel)
Solution:   Check for conceal mode when using linebreak. (Christian Brabandt)
2014-08-29 12:08:43 +02:00
Bram Moolenaar
2d46e6075b updated for version 7.4.421
Problem:    Crash when searching for "\ze*". (Urtica Dioica)
Solution:   Disallow a multi after \ze and \zs.
2014-08-29 11:56:32 +02:00
Bram Moolenaar
a9537d238e updated for version 7.4.420
Problem:    It's not obvious how to add a new test.
Solution:   Add a README file. (Christian Brabandt)
2014-08-29 10:04:47 +02:00
Bram Moolenaar
f2d912e8bc updated for version 7.4.419
Problem:    Whan part of a list is locked it's possible to make changes.
Solution:   Check if any of the list items is locked before make a change.
            (ZyX)
2014-08-29 09:46:10 +02:00
Bram Moolenaar
26f08b06b6 updated for version 7.4.418
Problem:    When leaving ":append" the cursor shape is like in Insert mode.
            (Jacob Niehus)
Solution:   Do not have State set to INSERT when calling getline().
2014-08-29 09:02:27 +02:00
Bram Moolenaar
285ed7e049 updated for version 7.4.417
Problem:    After splitting a window and setting 'breakindent' the default
            minimum with is not respected.
Solution:   Call briopt_check() when copying options to a new window.
2014-08-24 21:39:49 +02:00
Bram Moolenaar
9576508975 updated for version 7.4.416
Problem:    Problem with breakindent/showbreak and tabs.
Solution:   Handle tabs differently. (Christian Brabandt)
2014-08-24 21:19:25 +02:00
Bram Moolenaar
7b61a546d8 Runtime file updates. 2014-08-23 15:31:19 +02:00
Bram Moolenaar
92f4baace8 Update version number to 7.4.415 2014-08-23 14:18:52 +02:00
Bram Moolenaar
5a31b46bff updated for version 7.4.415
Problem:    Cannot build.  Warning for shadowed variable. (John Little)
Solution:   Add missing change.  Remove declaration.
2014-08-23 14:16:20 +02:00
Bram Moolenaar
d5005164e1 updated for version 7.4.414
Problem:    Cannot define a command only when it's used.
Solution:   Add the CmdUndefined autocommand event. (partly by Yasuhiro
            Matsumoto)
2014-08-22 23:05:54 +02:00
Bram Moolenaar
fb539273c9 Updated runtime files. 2014-08-22 19:21:47 +02:00
Bram Moolenaar
d2e8087b53 updated for version 7.4.413
Problem:    MS-Windows: Using US international keyboard layout, inserting dead
            key by pressing space does not always work.  Issue 250.
Solution:   Let MS-Windows translate the message. (John Wellesz)
2014-08-22 18:44:33 +02:00
Bram Moolenaar
ce2f2e061d updated for version 7.4.412
Problem:    Can't build on Windows XP with MSVC.
Solution:   Add SUBSYSTEM_VER to the Makefile. (Yongwei Wu)
2014-08-22 18:12:57 +02:00
Bram Moolenaar
1b338d2022 updated for version 7.4.411
Problem:    "foo bar" sorts before "foo" with sort(). (John Little)
Solution:   Avoid putting quotes around strings before comparing them.
2014-08-22 13:13:27 +02:00
Bram Moolenaar
42f06f9dbc updated for version 7.4.410
Problem:    Fold does not open after search when there is a CmdwinLeave
            autocommand.
Solution:   Restore KeyTyped. (Jacob Niehus)
2014-08-17 17:24:07 +02:00
Bram Moolenaar
d5f62b14e1 updated for version 7.4.409
Problem:    Can't build with Perl on Fedora 20.
Solution:   Find xsubpp in another directory. (Michael Henry)
2014-08-17 17:05:44 +02:00
Bram Moolenaar
2a5868ab1e Add files missing from 7.4.408. 2014-08-16 19:45:02 +02:00
Bram Moolenaar
b5cf6c34e8 updated for version 7.4.408
Problem:    Visual block insert breaks a multi-byte character.
Solution:   Calculate the position properly. (Yasuhiro Matsumoto)
2014-08-16 18:36:43 +02:00
Bram Moolenaar
1fc7e972b0 updated for version 7.4.407
Problem:    Inserting text for Visual block mode, with cursor movement,
            repeats the wrong text. (Aleksandar Ivanov)
Solution:   Reset the update_Insstart_orig flag. (Christian Brabandt)
2014-08-16 18:13:03 +02:00
Bram Moolenaar
0ddd1b5e35 updated for version 7.4.406
Problem:    Test 72 and 100 fail on MS-Windows.
Solution:   Set fileformat to unix in the tests. (Taro Muraoka)
2014-08-16 17:34:34 +02:00
Bram Moolenaar
5307de0746 updated for version 7.4.405
Problem:    Screen updating is slow when using matches.
Solution:   Do not use the ">=" as in patch 7.4.362, check the lnum.
2014-08-16 16:28:36 +02:00
Bram Moolenaar
9b8f021d93 updated for version 7.4.404
Problem:    Windows 64 bit compiler warnings.
Solution:   Add type casts. (Mike Williams)
2014-08-13 22:05:53 +02:00
Bram Moolenaar
2be795084f updated for version 7.4.403
Problem:    Valgrind reports errors when running test 72. (Dominique Pelle)
Solution:   Reset the local 'cryptmethod' option before storing the seed.
            Set the seed in the memfile even when there is no block0 yet.
2014-08-13 21:58:28 +02:00
Bram Moolenaar
5a669b9481 updated for version 7.4.402
Problem:    Test 72 crashes under certain conditions. (Kazunobu Kuriyama)
Solution:   Clear the whole bufinfo_T early.
2014-08-12 20:14:33 +02:00
Bram Moolenaar
07cf382e22 updated for version 7.4.401
Problem:    Can't build on MS-Windows.
Solution:   Include the new files in all the Makefiles.
2014-08-10 16:31:50 +02:00
Bram Moolenaar
d21e8b3a17 updated for version 7.4.400
Problem:    List of distributed files is incomplete.
Solution:   Add recently added files.
2014-08-10 13:46:36 +02:00
Bram Moolenaar
8f4ac01544 updated for version 7.4.399
Problem:    Encryption implementation is messy.  Blowfish encryption has a
            weakness.
Solution:   Refactor the encryption, store the state in an allocated struct
            instead of using a save/restore mechanism.  Introduce the
            "blowfish2" method, which does not have the weakness and encrypts
            the whole undo file. (largely by David Leadbeater)
2014-08-10 13:38:34 +02:00
Bram Moolenaar
0106b4b891 updated for version 7.4.398
Problem:    Gcc error for the argument of InterlockedIncrement() and
            InterlockedDecrement(). (Axel Bender)
Solution:   Remove "unsigned" from the cRefCount_ declaration.
2014-08-07 13:55:10 +02:00
Bram Moolenaar
e98cfe1cc9 updated for version 7.4.397
Problem:    Matchparen only uses the topmost syntax item.
Solution:   Go through the syntax stack to find items. (James McCoy)
            Also use getcurpos() when possible.
2014-08-06 19:09:16 +02:00
Bram Moolenaar
6b1ee34aa0 updated for version 7.4.396
Problem:    When 'clipboard' is "unnamed", :g/pat/d is very slow. (Praful)
Solution:   Only set the clipboard after the last delete. (Christian Brabandt)
2014-08-06 18:17:11 +02:00
Bram Moolenaar
04d17ae167 updated for version 7.4.395
Problem:    C indent is wrong below an if with wrapped condition followed by
            curly braces. (Trevor Powell)
Solution:   Make a copy of tryposBrace.
2014-08-06 17:44:14 +02:00
Bram Moolenaar
9b352c46f0 updated for version 7.4.394
Problem:    When using DirectX last italic character is incomplete.
Solution:   Add one to the number of cells. (Ken Takata)
2014-08-06 16:49:55 +02:00
Bram Moolenaar
b5a7a8b545 updated for version 7.4.393
Problem:    Text drawing on newer MS-Windows systems is suboptimal.  Some
            multi-byte characters are not displayed, even though the same font
            in Notepad can display them. (Srinath Avadhanula)
Solution:   Add the 'renderoptions' option to enable Direct-X drawing. (Taro
            Muraoka)
2014-08-06 14:52:30 +02:00
Bram Moolenaar
8c1329cb59 updated for version 7.4.392
Problem:    Not easy to detect type of command line window.
Solution:   Add the getcmdwintype() function. (Jacob Niehus)
2014-08-06 13:36:59 +02:00
Bram Moolenaar
e0f148270a updated for version 7.4.391
Problem:    No 'cursorline' highlighting when the cursor is on a line with
            diff highlighting. (Benjamin Fritz)
Solution:   Combine the highlight attributes. (Christian Brabandt)
2014-08-06 13:20:56 +02:00
Bram Moolenaar
ece29e8013 updated for version 7.4.390
Problem:    Advancing pointer over end of a string.
Solution:   Init quote character to -1 instead of zero. (Dominique Pelle)
2014-08-06 12:49:18 +02:00
Bram Moolenaar
4e067c898e updated for version 7.4.389
Problem:    Still sometimes Vim enters Replace mode when starting up.
Solution:   Use a different solution in detecting the termresponse and
            location response. (Hayaki Saito)
2014-07-30 17:21:58 +02:00
Bram Moolenaar
b81c85d8f3 updated for version 7.4.388
Problem:    With 'linebreak' set and 'list' unset a Tab is not counted
            properly. (Kent Sibilev)
Solution:   Check the 'list' option. (Christian Brabandt)
2014-07-30 16:44:22 +02:00
Bram Moolenaar
4f5ce33d41 updated for version 7.4.387
Problem:    "4gro" replaces one character then executes "ooo". (Urtica Dioica)
Solution:   Write the ESC in the second stuff buffer.
2014-07-30 16:00:58 +02:00
Bram Moolenaar
23fb7a9955 updated for version 7.4.386
Problem:    When splitting a window the changelist position is wrong.
Solution:   Copy the changelist position. (Jacob Niehus)
2014-07-30 14:05:00 +02:00
Bram Moolenaar
278eb5820d updated for version 7.4.385
Problem:    When building with tiny or small features building the .mo files
            fails.
Solution:   In autoconf do not setup for building the .mo files when it would
            fail.
2014-07-30 13:22:52 +02:00
Bram Moolenaar
932e632de3 updated for version 7.4.384
Problem:    Test 102 fails when compiled with small features.
Solution:   Source small.vim. (Jacob Niehus)
2014-07-30 13:20:39 +02:00
Bram Moolenaar
dbc2802251 Update runtime files. Add vroom file support. 2014-07-26 13:40:44 +02:00
Bram Moolenaar
2bace3e2fb updated for version 7.4.383
Problem:    Bad interaction between preview window and omnifunc.
Solution:   Avoid redrawing the status line. (Hirohito Higashi)
2014-07-23 21:10:43 +02:00
Bram Moolenaar
20c3892e54 updated for version 7.4.382
Problem:    Mapping characters may not work after typing Esc in Insert mode.
Solution:   Fix the noremap flags for inserted characters. (Jacob Niehus)
2014-07-23 20:41:14 +02:00
Bram Moolenaar
17529ae026 updated for version 7.4.381
Problem:    Get u_undo error when backspacing in Insert mode deletes more than
            one line break. (Ayberk Ozgur)
Solution:   Also decrement Insstart.lnum.
2014-07-23 17:39:25 +02:00
Bram Moolenaar
12a28d4b29 updated for version 7.4.380
Problem:    Loading python may cause Vim to exit.
Solution:   Avoid loading the "site" module. (Taro Muraoka)
2014-07-23 16:57:00 +02:00
Bram Moolenaar
158a1b0748 updated for version 7.4.379
Problem:    Accessing freed memory after using setqflist(list, 'r'). (Lcd)
Solution:   Reset qf_index.
2014-07-23 16:33:07 +02:00
Bram Moolenaar
fb60409a3f updated for version 7.4.378
Problem:    Title of quickfist list is not kept for setqflist(list, 'r').
Solution:   Keep the title.  Add a test. (Lcd)
2014-07-23 15:55:00 +02:00
Bram Moolenaar
54368f2742 updated for version 7.4.377
Problem:    When 'equalalways' is set a split may report "no room" even though
            there is plenty of room.
Solution:   Compute the available room properly. (Yukihiro Nakadaira)
2014-07-23 15:21:20 +02:00
Bram Moolenaar
674fffe855 updated for version 7.4.376
Problem:    Popup menu flickers too much.
Solution:   Remove the forced redraw. (Hirohito Higashi)
2014-07-23 13:50:46 +02:00
Bram Moolenaar
a1fae80371 updated for version 7.4.375
Problem:    Test 63 fails when run with GUI-only Vim.
Solution:   Add guibg attributes. (suggested by Mike Soyka)
2014-07-23 13:16:30 +02:00
Bram Moolenaar
4f88062c55 updated for version 7.4.374
Problem:    Character after "fb" command not mapped if it might be a composing
            character.
Solution:   Don't disable mapping when looking for a composing character.
            (Jacob Niehus)
2014-07-23 12:31:20 +02:00
Bram Moolenaar
07d87790f1 Update runtime files. Make matchparen plugin backwards compatible.
Add json filetype.
2014-07-19 14:04:47 +02:00
Bram Moolenaar
a04854932e updated for version 7.4.373
Problem:    Compiler warning for unused argument and unused variable.
Solution:   Add UNUSED.  Move variable inside #ifdef.
2014-07-16 23:39:54 +02:00
Bram Moolenaar
1f538355db updated for version 7.4.372
Problem:    When 'winminheight' is zero there might not be one line for the
            current window.
Solution:   Change the size computations. (Yukihiro Nakadaira)
2014-07-16 18:19:27 +02:00
Bram Moolenaar
5524aebf16 updated for version 7.4.371
Problem:    When 'linebreak' is set control characters are not correctly
            displayed. (Kimmy Lindvall)
Solution:   Set n_extra. (Christian Brabandt)
2014-07-16 17:29:51 +02:00
Bram Moolenaar
b5647f71c2 updated for version 7.4.370
Problem:    Linebreak test fails when encoding is not utf-8. (Danek Duvall)
Solution:   Split the test in a single byte one and a utf-8 one. (Christian
            Brabandt)
2014-07-16 17:01:53 +02:00
Bram Moolenaar
4e036c9e6f updated for version 7.4.369
Problem:    Using freed memory when exiting while compiled with EXITFREE.
Solution:   Set curwin to NULL and check for that. (Dominique Pelle)
2014-07-16 16:30:28 +02:00
Bram Moolenaar
b643e77782 updated for version 7.4.368
Problem:    Restoring the window sizes after closing the command line window
            doesn't work properly if there are nested splits.
Solution:   Restore the sizes twice. (Hirohito Higashi)
2014-07-16 15:18:26 +02:00
Bram Moolenaar
f1924a9d8c updated for version 7.4.367
Problem:    Other solution for redrawing after completion.
Solution:   Schedule a window redraw instead of just clearing the command
            line. (Jacob Niehus)
2014-07-16 14:42:46 +02:00
Bram Moolenaar
310e2dbaee updated for version 7.4.366
Problem:    Can't run the linebreak test on MS-Windows.
Solution:   Fix the output file name. (Taro Muraoka)
2014-07-16 14:20:41 +02:00
Bram Moolenaar
b4d2135518 updated for version 7.4.365
Problem:    Crash when using ":botright split" when there isn't much space.
Solution:   Add a check for the minimum width/height. (Yukihiro Nakadaira)
2014-07-16 14:16:46 +02:00
Bram Moolenaar
db6ea06335 Updated runtime files. 2014-07-10 22:01:47 +02:00
Bram Moolenaar
3ed8b1332f updated for version 7.4.364
Problem:    When the viminfo file can't be renamed there is no error message.
            (Vladimir Berezhnoy)
Solution:   Check for the rename to fail.
2014-07-09 21:18:04 +02:00
Bram Moolenaar
455009122a updated for version 7.4.363
Problem:    In Windows console typing 0xCE does not work.
Solution:   Convert 0xCE to K_NUL 3. (Nobuhiro Takasaki et al.)
2014-07-09 20:51:07 +02:00
Bram Moolenaar
1e1aca3784 updated for version 7.4.362
Problem:    When matchaddpos() uses a length smaller than the number of bytes
            in the (last) character the highlight continues until the end of
            the line.
Solution:   Change condition from equal to larger-or-equal.
2014-07-09 20:20:43 +02:00
Bram Moolenaar
c804515003 updated for version 7.4.361
Problem:    Lots of flickering when filling the preview window for 'omnifunc'.
Solution:   Disable redrawing. (Hirohito Higashi)
2014-07-09 19:58:24 +02:00
Bram Moolenaar
ff65ac84fd updated for version 7.4.360
Problem:    In a regexp pattern a "$" followed by \v or \V is not seen as the
            end-of-line.
Solution:   Handle the situation. (Ozaki Kiichi)
2014-07-09 19:32:34 +02:00
Bram Moolenaar
0d1e8c1203 updated for version 7.4.359
Problem:    When 'ttymouse' is set to 'uxterm' the xterm version is not
            requested. (Tomas Janousek)
Solution:   Do not mark uxterm as a conflict mouse and add
            resume_get_esc_sequence().
2014-07-09 19:13:49 +02:00
Bram Moolenaar
6bf5548df2 updated for version 7.4.358
Problem:    Sort is not always stable.
Solution:   Add an index instead of relying on the pointer to remain the same.
            Idea by Jun Takimoto.
2014-07-09 17:51:51 +02:00
Bram Moolenaar
0bed10a813 updated for version 7.4.357
Problem:    After completion some characters are not redrawn.
Solution:   Clear the command line unconditionally. (Jacob Niehus)
2014-07-09 14:00:49 +02:00
Bram Moolenaar
cc57bb2f85 updated for version 7.4.356
Problem:    Mercurial does not ignore memfile_test. (Daniel Hahler)
Solution:   Add memfile_test to ignored files, remove trailing spaces.
2014-07-09 13:43:29 +02:00
Bram Moolenaar
8bb1c3e53e Updated runtime files. Overhauled HTML indent script. 2014-07-04 16:43:17 +02:00
Bram Moolenaar
9f4fe7c4c3 updated for version 7.4.355
Problem:    Several problems with Javascript indenting.
Solution:   Improve Javascript indenting.
2014-07-03 22:57:55 +02:00
Bram Moolenaar
b8b57460f0 updated for version 7.4.354
Problem:    Compiler warning.
Solution:   Change NUL to NULL. (Ken Takata)
2014-07-03 22:54:08 +02:00
Bram Moolenaar
86b17e914f updated for version 7.4.353
Problem:    'breakindent' doesn't work with the 'list' option.
Solution:   Make it work. (Christian Brabandt)
2014-07-02 20:00:47 +02:00
Bram Moolenaar
ee739b42c0 updated for version 7.4.352
Problem:    With 'linebreak' a tab causes a missing line break.
Solution:   Count a tab for what it's worth also for shorter lines.
            (Christian Brabandt)
2014-07-02 19:37:42 +02:00
Bram Moolenaar
c35e3de8cc updated for version 7.4.351
Problem:    sort() is not stable.
Solution:   When the items are identical, compare the pointers.
2014-07-02 19:06:18 +02:00
Bram Moolenaar
81439a6d1b updated for version 7.4.350
Problem:    Using C indenting for Javascript does not work well for a {} block
            inside parenthesis.
Solution:   When looking for a matching paren ignore one that is before the
            start of a {} block.
2014-07-02 18:27:48 +02:00
Bram Moolenaar
dab70c63e1 updated for version 7.4.349
Problem:    When there are matches to highlight the whole window is redrawn,
            which is slow.
Solution:   Only redraw everything when lines were inserted or deleted.
            Reset b_mod_xlines when needed.  (Alexey Radkov)
2014-07-02 17:16:58 +02:00
Bram Moolenaar
e7eb789ef0 updated for version 7.4.348
Problem:    When using "J1" in 'cinoptions' a line below a continuation line
            gets too much indent.
Solution:   Fix parenthesis in condition.
2014-07-02 17:02:36 +02:00
Bram Moolenaar
b7d929a86f updated for version 7.4.347
Problem:    test55 fails on some systems.
Solution:   Remove the elements that all result in zero and can end up in an
            arbitrary position.
2014-06-26 22:33:51 +02:00
Bram Moolenaar
9d7a592c80 updated for version 7.4.346
Problem:    Indent is not updated when changing 'breakindentopt'. (itchyny)
Solution:   Do not cache "brishift". (Christian Brabandt)
2014-06-26 21:24:56 +02:00
Bram Moolenaar
a40aa760a1 updated for version 7.4.345
Problem:    Indent is not updated when deleting indent.
Solution:   Remember changedtick.
2014-06-25 22:55:38 +02:00
Bram Moolenaar
946e27ab65 Updated runtime files. 2014-06-25 18:50:27 +02:00
Bram Moolenaar
b6da44ae82 updated for version 7.4.344
Problem:    Unessecary initializations and other things related to
            matchaddpos().
Solution:   Code cleanup. (Alexey Radkov)
2014-06-25 18:15:22 +02:00
Bram Moolenaar
41d7523986 updated for version 7.4.343
Problem:    matchdelete() does not always update the right lines.
Solution:   Fix off-by-one error.  (Ozaki Kiichi)
2014-06-25 17:58:11 +02:00
Bram Moolenaar
db5ffaab5a updated for version 7.4.342
Problem:    Clang gives warnings.
Solution:   Add an else block. (Dominique Pelle)
2014-06-25 17:44:49 +02:00
Bram Moolenaar
e8a3492548 updated for version 7.4.341
Problem:    sort() doesn't handle numbers well.
Solution:   Add an argument to specify sorting on numbers. (Christian Brabandt)
2014-06-25 17:31:09 +02:00
Bram Moolenaar
72e8f0bcc1 updated for version 7.4.340
Problem:    Error from sed about illegal bytes when installing Vim.
Solution:   Prepend LC_ALL=C. (Itchyny)
2014-06-25 15:02:33 +02:00
Bram Moolenaar
8dc907d7d3 updated for version 7.4.339
Problem:    Local function is available globally.
Solution:   Add "static".
2014-06-25 14:44:10 +02:00
Bram Moolenaar
597a422416 updated for version 7.4.338
Problem:    Cannot wrap lines taking indent into account.
Solution:   Add the 'breakindent' option. (many authors, final improvements by
            Christian Brabandt)
2014-06-25 14:39:50 +02:00
Bram Moolenaar
15a35c4f4a updated for version 7.4.337
Problem:    When there is an error preparing to edit the command line, the
            command won't be executed. (Hirohito Higashi)
Solution:   Reset did_emsg before editing.
2014-06-25 12:26:46 +02:00
Bram Moolenaar
78159bbf9e updated for version 7.4.336
Problem:    Setting 'history' to a big value causes out-of-memory errors.
Solution:   Limit the value to 10000. (Hirohito Higashi)
2014-06-25 11:48:54 +02:00
Bram Moolenaar
e8d1f20cbd updated for version 7.4.335
Problem:    No digraph for the new rouble sign.
Solution:   Add the digraphs =R and =P.
2014-06-18 21:38:18 +02:00
Bram Moolenaar
deae0f2566 updated for version 7.4.334
Problem:    Unitialized variables, causing some problems.
Solution:   Initialize the variables. (Dominique Pelle)
2014-06-18 21:20:11 +02:00
Bram Moolenaar
de993ea629 updated for version 7.4.333
Problem:    Compiler warning for unused function.
Solution:   Put the function inside the #ifdef.
2014-06-17 23:18:01 +02:00
Bram Moolenaar
58cbc914ea updated for version 7.4.332
Problem:    GTK: When a sign icon doesn't fit exactly there can be ugly gaps.
Solution:   Scale the sign to fit when the aspect ratio is not too far off.
            (Christian Brabandt)
2014-06-17 18:47:02 +02:00
Bram Moolenaar
7ec83432b7 updated for version 7.4.331
Problem:    Relative numbering not updated after a linewise yank.  Issue 235.
Solution:   Redraw after the yank. (Christian Brabandt)
2014-06-17 18:16:11 +02:00
Bram Moolenaar
b3414595c7 updated for version 7.4.330
Problem:    Using a regexp pattern to highlight a specific position can be
            slow.
Solution:   Add matchaddpos() to highlight specific positions efficiently.
            (Alexey Radkov)
2014-06-17 17:48:32 +02:00
Bram Moolenaar
ec1561cac5 updated for version 7.4.329
Problem:    When moving the cursor and then switching to another window the
            previous window isn't scrolled. (Yukihiro Nakadaira)
Solution:   Call update_topline() before leaving the window. (Christian
            Brabandt)
2014-06-17 13:52:40 +02:00
Bram Moolenaar
7a54a90744 updated for version 7.4.328
Problem:    Selection of inner block is inconsistent.
Solution:   Skip indent not only for '}' but all parens. (Tom McDonald)
2014-06-17 13:50:13 +02:00
Bram Moolenaar
8502c704ba updated for version 7.4.327
Problem:    When 'verbose' is set to display the return value of a function,
            may get E724 repeatedly.
Solution:   Do not give an error for verbose messages. Abort conversion to
            string after an error.
2014-06-17 12:51:16 +02:00
Bram Moolenaar
f0224c9f08 updated for version 7.4.326
Problem:    Can't build Tiny version. (Elimar Riesebieter)
Solution:   Add #ifdef.
2014-06-14 12:53:33 +02:00
Bram Moolenaar
0ae36a5c85 updated for version 7.4.325
Problem:    When starting the gui and changing the window size the status line
            may not be drawn correctly.
Solution:   Catch new_win_height() being called recursively. (Christian
            Brabandt)
2014-06-13 20:08:45 +02:00
Bram Moolenaar
822ff866bd Update runtime files. 2014-06-12 21:46:14 +02:00
Bram Moolenaar
2d54ec92d4 updated for version 7.4.324
Problem:    In Ex mode, cyrillic characters are not handled. (Stas Malavin)
Solution:   Support multi-byte characters in Ex mode. (Yukihiro Nakadaira)
2014-06-12 19:44:48 +02:00
Bram Moolenaar
8e7048ca4b updated for version 7.4.323
Problem:    Substitute() with zero width pattern breaks multi-byte character.
Solution:   Take multi-byte character size into account. (Yukihiro Nakadaira)
2014-06-12 18:39:22 +02:00
Bram Moolenaar
e639eb44e9 updated for version 7.4.322
Problem:    Using "msgfmt" is hard coded, cannot use "gmsgfmt".
Solution:   Use the msgfmt command found by configure. (Danek Duvall)
2014-06-12 18:03:29 +02:00
Bram Moolenaar
0e6c5ef7ef updated for version 7.4.321
Problem:    Can't build with strawberry perl 5.20 + mingw-w64-4.9.0.
Solution:   Define save_strlen. (Ken Takata)
2014-06-12 16:03:28 +02:00
232 changed files with 12185 additions and 2682 deletions

13
.gitignore vendored
View File

@@ -62,11 +62,12 @@ src/xxd/xxd.dSYM
src/po/vim.pot
# Generated by "make test"
src/po/*.ck
src/testdir/mbyte.vim
src/testdir/mzscheme.vim
src/testdir/lua.vim
src/testdir/small.vim
src/testdir/tiny.vim
src/po/*.ck
src/testdir/mbyte.vim
src/testdir/mzscheme.vim
src/testdir/lua.vim
src/testdir/small.vim
src/testdir/tiny.vim
src/testdir/test*.out
src/testdir/test.log
src/memfile_test

View File

@@ -11,6 +11,8 @@ SRC_ALL = \
src/blowfish.c \
src/buffer.c \
src/charset.c \
src/crypt.c \
src/crypt_zip.c \
src/diff.c \
src/digraph.c \
src/edit.c \
@@ -80,6 +82,7 @@ SRC_ALL = \
src/xxd/xxd.c \
src/main.aap \
src/testdir/main.aap \
src/testdir/README.txt \
src/testdir/*.in \
src/testdir/sautest/autoload/*.vim \
src/testdir/test[0-9]*.ok \
@@ -103,6 +106,8 @@ SRC_ALL = \
src/proto/blowfish.pro \
src/proto/buffer.pro \
src/proto/charset.pro \
src/proto/crypt.pro \
src/proto/crypt_zip.pro \
src/proto/diff.pro \
src/proto/digraph.pro \
src/proto/edit.pro \
@@ -289,6 +294,8 @@ SRC_DOS = \
src/dosinst.h \
src/glbl_ime.cpp \
src/glbl_ime.h \
src/gui_dwrite.cpp \
src/gui_dwrite.h \
src/gui_w16.c \
src/gui_w32.c \
src/gui_w48.c \

View File

@@ -1,7 +1,49 @@
" Vim completion script
" Language: HTML and XHTML
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2011 Apr 28
" Last Change: 2014 Jun 20
" Distinguish between HTML versions.
" To use with other HTML versions add another "elseif" condition to match
" proper DOCTYPE.
function! htmlcomplete#DetectOmniFlavor()
if &filetype == 'xhtml'
let b:html_omni_flavor = 'xhtml10s'
else
let b:html_omni_flavor = 'html401t'
endif
let i = 1
let line = ""
while i < 10 && i < line("$")
let line = getline(i)
if line =~ '<!DOCTYPE.*\<DTD '
break
endif
let i += 1
endwhile
if line =~ '<!DOCTYPE.*\<DTD ' " doctype line found above
if line =~ ' HTML 3\.2'
let b:html_omni_flavor = 'html32'
elseif line =~ ' XHTML 1\.1'
let b:html_omni_flavor = 'xhtml11'
else " two-step detection with strict/frameset/transitional
if line =~ ' XHTML 1\.0'
let b:html_omni_flavor = 'xhtml10'
elseif line =~ ' HTML 4\.01'
let b:html_omni_flavor = 'html401'
elseif line =~ ' HTML 4.0\>'
let b:html_omni_flavor = 'html40'
endif
if line =~ '\<Transitional\>'
let b:html_omni_flavor .= 't'
elseif line =~ '\<Frameset\>'
let b:html_omni_flavor .= 'f'
else
let b:html_omni_flavor .= 's'
endif
endif
endif
endfunction
function! htmlcomplete#CompleteTags(findstart, base)
if a:findstart

View File

@@ -3,7 +3,7 @@
" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com )
" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" URL: https://github.com/shawncplus/phpcomplete.vim
" Last Change: 2014 May 08
" Last Change: 2014 Jul 24
"
" OPTIONS:
"
@@ -109,13 +109,12 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
" locate the start of the word
let line = getline('.')
let start = col('.') - 1
let curline = line('.')
let compl_begin = col('.') - 2
while start >= 0 && line[start - 1] =~ '[\\a-zA-Z_0-9\x7f-\xff$]'
let start -= 1
endwhile
let b:phpbegin = phpbegin
let b:compl_context = phpcomplete#GetCurrentInstruction(line('.'), col('.') - 2, phpbegin)
let b:compl_context = phpcomplete#GetCurrentInstruction(line('.'), max([0, col('.') - 2]), phpbegin)
return start
" We can be also inside of phpString with HTML tags. Deal with
@@ -265,11 +264,11 @@ function! phpcomplete#CompleteUse(base) " {{{
if base !~ '\'
let builtin_classnames = filter(keys(copy(g:php_builtin_classnames)), 'v:val =~? "^'.classname_match_pattern.'"')
for classname in builtin_classnames
call add(res, {'word': classname, 'kind': 'c'})
call add(res, {'word': g:php_builtin_classes[tolower(classname)].name, 'kind': 'c'})
endfor
let builtin_interfacenames = filter(keys(copy(g:php_builtin_interfacenames)), 'v:val =~? "^'.classname_match_pattern.'"')
for interfacename in builtin_interfacenames
call add(res, {'word': interfacename, 'kind': 'i'})
call add(res, {'word': g:php_builtin_interfaces[tolower(interfacename)].name, 'kind': 'i'})
endfor
endif
@@ -278,7 +277,7 @@ endfunction
" }}}
function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
" Complete everything else -
" Complete everything
" + functions, DONE
" + keywords of language DONE
" + defines (constant definitions), DONE
@@ -459,7 +458,7 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
" Add builtin class names
for [classname, info] in items(g:php_builtin_classnames)
if classname =~? '^'.base
let builtin_classnames[leading_slash.classname] = info
let builtin_classnames[leading_slash.g:php_builtin_classes[tolower(classname)].name] = info
endif
endfor
for [interfacename, info] in items(g:php_builtin_interfacenames)
@@ -832,7 +831,7 @@ function! phpcomplete#CompleteClassName(base, kinds, current_namespace, imports)
if has_key(g:php_builtin_classes[tolower(classname)].methods, '__construct')
let menu = g:php_builtin_classes[tolower(classname)]['methods']['__construct']['signature']
endif
call add(res, {'word': leading_slash.classname, 'kind': 'c', 'menu': menu})
call add(res, {'word': leading_slash.g:php_builtin_classes[tolower(classname)].name, 'kind': 'c', 'menu': menu})
endfor
endif
@@ -926,10 +925,10 @@ function! phpcomplete#CompleteUserClass(context, base, sccontent, visibility) "
\ 'function\s*&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
let f_args = matchstr(i,
\ 'function\s*&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\({\|\_$\)')
if f_name != ''
if f_name != '' && stridx(f_name, '__') != 0
let c_functions[f_name.'('] = f_args
if g:phpcomplete_parse_docblock_comments
let c_doc[f_name.'('] = phpcomplete#GetDocBlock(a:sccontent, 'function\s*\<'.f_name.'\>')
let c_doc[f_name.'('] = phpcomplete#GetDocBlock(a:sccontent, 'function\s*&\?\<'.f_name.'\>')
endif
endif
endfor
@@ -950,12 +949,11 @@ function! phpcomplete#CompleteUserClass(context, base, sccontent, visibility) "
endif
endfor
let jvars = join(variables, ' ')
let svars = split(jvars, '\$')
let static_vars = split(join(variables, ' '), '\$')
let c_variables = {}
let var_index = 0
for i in svars
for i in static_vars
let c_var = matchstr(i,
\ '^\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
if c_var != ''
@@ -1049,7 +1047,7 @@ function! phpcomplete#CompleteBuiltInClass(context, classname, base) " {{{
if a:context =~ '->$' " complete for everything instance related
" methods
for [method_name, method_info] in items(class_info.methods)
if a:base == '' || method_name =~? '^'.a:base
if stridx(method_name, '__') != 0 && (a:base == '' || method_name =~? '^'.a:base)
call add(res, {'word':method_name.'(', 'kind': 'f', 'menu': method_info.signature, 'info': method_info.signature })
endif
endfor
@@ -1084,7 +1082,6 @@ endfunction
" }}}
function! phpcomplete#GetTaglist(pattern) " {{{
let cache_checksum = ''
if g:phpcomplete_cache_taglists == 1
" build a string with format of "<tagfile>:<mtime>$<tagfile2>:<mtime2>..."
@@ -1317,7 +1314,7 @@ function! phpcomplete#GetCallChainReturnType(classname_candidate, class_candidat
return unknown_result
elseif filereadable(classlocation)
elseif classlocation != '' && filereadable(classlocation)
" Read the next method from the stack and extract only the name
let classcontents = phpcomplete#GetCachedClassContents(classlocation, classname_candidate)
@@ -1325,7 +1322,7 @@ function! phpcomplete#GetCallChainReturnType(classname_candidate, class_candidat
" Get Structured information of all classes and subclasses including namespace and includes
" try to find the method's return type in docblock comment
for classstructure in classcontents
let doclock_target_pattern = 'function\s\+'.method.'\|\(public\|private\|protected\|var\).\+\$'.method
let doclock_target_pattern = 'function\s\+&\?'.method.'\|\(public\|private\|protected\|var\).\+\$'.method
let doc_str = phpcomplete#GetDocBlock(split(classstructure.content, '\n'), doclock_target_pattern)
if doc_str != ''
break
@@ -1357,7 +1354,14 @@ function! phpcomplete#GetCallChainReturnType(classname_candidate, class_candidat
else
let fullnamespace = class_candidate_namespace
endif
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(returnclass, fullnamespace, a:imports)
" make @return self, static, $this the same way
" (not exactly what php means by these)
if returnclass == 'self' || returnclass == 'static' || returnclass == '$this'
let classname_candidate = a:classname_candidate
let class_candidate_namespace = a:class_candidate_namespace
else
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(returnclass, fullnamespace, a:imports)
endif
endif
return phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, a:imports, methodstack)
@@ -1441,6 +1445,7 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
" Get class name
" Class name can be detected in few ways:
" @var $myVar class
" @var class $myVar
" in the same line (php 5.4 (new Class)-> syntax)
" line above
" or line in tags file
@@ -1496,9 +1501,9 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
let return_type = matchstr(g:php_builtin_functions[function_name.'('], '\v\|\s+\zs.+$')
let classname_candidate = return_type
let class_candidate_namespace = '\'
else
elseif function_file != '' && filereadable(function_file)
let file_lines = readfile(function_file)
let docblock_str = phpcomplete#GetDocBlock(file_lines, 'function\s*\<'.function_name.'\>')
let docblock_str = phpcomplete#GetDocBlock(file_lines, 'function\s*&\?\<'.function_name.'\>')
let docblock = phpcomplete#ParseDocBlock(docblock_str)
if has_key(docblock.return, 'type')
let classname_candidate = docblock.return.type
@@ -1514,44 +1519,48 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate
endif
else
" extract the variable name from the context
let object = methodstack[0]
let object_is_array = (object =~ '\v^[^[]+\[' ? 1 : 0)
let object = matchstr(object, variable_name_pattern)
let function_boundary = phpcomplete#GetCurrentFunctionBoundaries()
let search_end_line = max([1, function_boundary[0][0]])
" -1 makes us ignore the current line (where the completion was invoked
let lines = reverse(getline(search_end_line, line('.') - 1))
" check Constant lookup
let constant_object = matchstr(a:context, '\zs'.class_name_pattern.'\ze::')
if constant_object != ''
let classname_candidate = constant_object
endif
" extract the variable name from the context
let object = methodstack[0]
let object_is_array = (object =~ '\v^[^[]+\[' ? 1 : 0)
let object = matchstr(object, variable_name_pattern)
" scan the file backwards from current line for explicit type declaration (@var $variable Classname)
let i = 1 " start from the current line - 1
while i < a:start_line
let line = getline(a:start_line - i)
" in file lookup for /* @var $foo Class */
if line =~# '@var\s\+'.object.'\s\+'.class_name_pattern
let classname_candidate = matchstr(line, '@var\s\+'.object.'\s\+\zs'.class_name_pattern.'\(\[\]\)\?')
break
elseif line !~ '^\s*$'
" type indicator comments should be next to the variable
" non empty lines break the search
break
endif
let i += 1
endwhile
if classname_candidate == ''
" scan the file backwards from current line for explicit type declaration (@var $variable Classname)
for line in lines
" in file lookup for /* @var $foo Class */
if line =~# '@var\s\+'.object.'\s\+'.class_name_pattern
let classname_candidate = matchstr(line, '@var\s\+'.object.'\s\+\zs'.class_name_pattern.'\(\[\]\)\?')
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
break
endif
" in file lookup for /* @var Class $foo */
if line =~# '@var\s\+'.class_name_pattern.'\s\+'.object
let classname_candidate = matchstr(line, '@var\s\+\zs'.class_name_pattern.'\(\[\]\)\?\ze'.'\s\+'.object)
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
break
endif
endfor
endif
if classname_candidate != ''
let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, class_candidate_imports, methodstack)
" return absolute classname, without leading \
return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate
endif
" scan the file backwards from the current line
let i = 1
while i < a:start_line
let line = getline(a:start_line - i)
for line in lines " {{{
" do in-file lookup of $var = new Class
if line =~# '^\s*'.object.'\s*=\s*new\s\+'.class_name_pattern && !object_is_array
let classname_candidate = matchstr(line, object.'\c\s*=\s*new\s*\zs'.class_name_pattern.'\ze')
@@ -1661,9 +1670,9 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
let classname_candidate = return_type
let class_candidate_namespace = '\'
break
else
elseif function_file != '' && filereadable(function_file)
let file_lines = readfile(function_file)
let docblock_str = phpcomplete#GetDocBlock(file_lines, 'function\s*\<'.function_name.'\>')
let docblock_str = phpcomplete#GetDocBlock(file_lines, 'function\s*&\?\<'.function_name.'\>')
let docblock = phpcomplete#ParseDocBlock(docblock_str)
if has_key(docblock.return, 'type')
let classname_candidate = docblock.return.type
@@ -1713,7 +1722,7 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
endif
let i += 1
endwhile
endfor " }}}
if classname_candidate != ''
let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, class_candidate_imports, methodstack)
@@ -1784,6 +1793,7 @@ function! phpcomplete#GetClassLocation(classname, namespace) " {{{
return no_namespace_candidate
endif
return ''
endfunction
" }}}
@@ -1794,11 +1804,12 @@ function! phpcomplete#GetFunctionLocation(function_name, namespace) " {{{
return 'VIMPHP_BUILTINFUNCTION'
endif
" do in-file lookup for function definition
let i = 1
let buffer_lines = getline(1, line('$'))
for line in buffer_lines
if line =~? '^\s*function\s\+'.a:function_name.'\s*('
if line =~? '^\s*function\s\+&\?'.a:function_name.'\s*('
return expand('%:p')
endif
endfor
@@ -1826,6 +1837,8 @@ function! phpcomplete#GetFunctionLocation(function_name, namespace) " {{{
if no_namespace_candidate != ''
return no_namespace_candidate
endif
return ''
endfunction
" }}}
@@ -1916,7 +1929,7 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
silent! below 1new
silent! 0put =cfile
call search('\(class\|interface\)\s\+'.a:class_name.'\(\>\|$\)')
call search('\(class\|interface\)\_s\+'.a:class_name.'\(\>\|$\)')
let cfline = line('.')
call search('{')
let endline = line('.')
@@ -1949,7 +1962,9 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
let namespace = '\'
endif
let classlocation = phpcomplete#GetClassLocation(extends_class, namespace)
if filereadable(classlocation)
if classlocation == "VIMPHP_BUILTINOBJECT"
let result += [phpcomplete#GenerateBuiltinClassStub(g:php_builtin_classes[tolower(extends_class)])]
elseif classlocation != '' && filereadable(classlocation)
let full_file_path = fnamemodify(classlocation, ':p')
let result += phpcomplete#GetClassContentsStructure(full_file_path, readfile(full_file_path), extends_class)
elseif tolower(current_namespace) == tolower(namespace)
@@ -1972,6 +1987,51 @@ function! phpcomplete#GetClassContents(classlocation, class_name) " {{{
endfunction
" }}}
function! phpcomplete#GenerateBuiltinClassStub(class_info) " {{{
let re = 'class '.a:class_info['name']." {"
for [name, initializer] in items(a:class_info.constants)
let re .= "\n\tconst ".name." = ".initializer.";"
endfor
for [name, info] in items(a:class_info.properties)
let re .= "\n\t// @var $".name." ".info.type
let re .= "\n\tpublic $".name.";"
endfor
for [name, info] in items(a:class_info.static_properties)
let re .= "\n\t// @var ".name." ".info.type
let re .= "\n\tpublic static ".name." = ".info.initializer.";"
endfor
for [name, info] in items(a:class_info.methods)
if name =~ '^__'
continue
endif
let re .= "\n\t/**"
let re .= "\n\t * ".name
let re .= "\n\t *"
let re .= "\n\t * @return ".info.return_type
let re .= "\n\t */"
let re .= "\n\tpublic function ".name."(".info.signature."){"
let re .= "\n\t}"
endfor
for [name, info] in items(a:class_info.static_methods)
let re .= "\n\t/**"
let re .= "\n\t * ".name
let re .= "\n\t *"
let re .= "\n\t * @return ".info.return_type
let re .= "\n\t */"
let re .= "\n\tpublic static function ".name."(".info.signature."){"
let re .= "\n\t}"
endfor
let re .= "\n}"
return { 'class': a:class_info['name'],
\ 'content': re,
\ 'namespace': '',
\ 'imports': {},
\ 'file': 'VIMPHP_BUILTINOBJECT',
\ 'mtime': 0,
\ }
endfunction " }}}
function! phpcomplete#GetDocBlock(sccontent, search) " {{{
let i = 0
let l = 0
@@ -2266,7 +2326,7 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
if has_key(g:php_builtin_classnames, tolower(import.name))
let import['kind'] = 'c'
let import['builtin'] = 1
elseif has_key(g:php_builtin_interfaces, import.name)
elseif has_key(g:php_builtin_interfacenames, tolower(import.name))
let import['kind'] = 'i'
let import['builtin'] = 1
else
@@ -2294,6 +2354,40 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
endfunction
" }}}
function! phpcomplete#GetCurrentFunctionBoundaries() " {{{
let old_cursor_pos = [line('.'), col('.')]
let current_line_no = old_cursor_pos[0]
let function_pattern = '\c\(.*\%#\)\@!\_^\s*\zs\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function\_.\{-}(\_.\{-})\_.\{-}{'
let func_start_pos = searchpos(function_pattern, 'Wbc')
if func_start_pos == [0, 0]
call cursor(old_cursor_pos[0], old_cursor_pos[1])
return 0
endif
" get the line where the function declaration actually started
call search('\cfunction\_.\{-}(\_.\{-})\_.\{-}{', 'Wce')
" get the position of the function block's closing "}"
let func_end_pos = searchpairpos('{', '', '}', 'W')
if func_end_pos == [0, 0]
" there is a function start but no end found, assume that we are in a
" function but the user did not typed the closing "}" yet and the
" function runs to the end of the file
let func_end_pos = [line('$'), len(getline(line('$')))]
endif
" Decho func_start_pos[0].' <= '.current_line_no.' && '.current_line_no.' <= '.func_end_pos[0]
if func_start_pos[0] <= current_line_no && current_line_no <= func_end_pos[0]
call cursor(old_cursor_pos[0], old_cursor_pos[1])
return [func_start_pos, func_end_pos]
endif
call cursor(old_cursor_pos[0], old_cursor_pos[1])
return 0
endfunction
" }}}
function! phpcomplete#ExpandClassName(classname, current_namespace, imports) " {{{
" if there's an imported class, just use that class's information
if has_key(a:imports, a:classname) && (a:imports[a:classname].kind == 'c' || a:imports[a:classname].kind == 'i')
@@ -2494,7 +2588,7 @@ for [classname, class_info] in items(g:php_builtin_classes)
endif
endfor
let g:php_builtin_classnames[class_info.name] = ''
let g:php_builtin_classnames[classname] = ''
for [method_name, method_info] in items(class_info.methods)
let g:php_builtin_object_functions[classname.'::'.method_name.'('] = method_info.signature
endfor
@@ -2513,10 +2607,10 @@ for [interfacename, info] in items(g:php_builtin_interfaces)
let g:php_builtin_interfacenames[interfacename] = ''
for [method_name, method_info] in items(class_info.methods)
let g:php_builtin_object_functions[classname.'::'.method_name.'('] = method_info.signature
let g:php_builtin_object_functions[interfacename.'::'.method_name.'('] = method_info.signature
endfor
for [method_name, method_info] in items(class_info.static_methods)
let g:php_builtin_object_functions[classname.'::'.method_name.'('] = method_info.signature
let g:php_builtin_object_functions[interfacename.'::'.method_name.'('] = method_info.signature
endfor
endfor

29
runtime/compiler/go.vim Normal file
View File

@@ -0,0 +1,29 @@
" Vim compiler file
" Compiler: Go
" Maintainer: David Barnett (https://github.com/google/vim-ft-go)
" Last Change: 2014 Aug 16
if exists('current_compiler')
finish
endif
let current_compiler = 'go'
if exists(':CompilerSet') != 2
command -nargs=* CompilerSet setlocal <args>
endif
let s:save_cpo = &cpo
set cpo-=C
CompilerSet makeprg=go\ build
CompilerSet errorformat=
\%-G#\ %.%#,
\%A%f:%l:%c:\ %m,
\%A%f:%l:\ %m,
\%C%*\\s%m,
\%-G%.%#
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: sw=2 sts=2 et

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 7.4. Last change: 2014 May 02
*autocmd.txt* For Vim version 7.4. Last change: 2014 Aug 22
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -278,6 +278,7 @@ Name triggered by ~
|ShellCmdPost| after executing a shell command
|ShellFilterPost| after filtering with a shell command
|CmdUndefined| a user command is used but it isn't defined
|FuncUndefined| a user function is used but it isn't defined
|SpellFileMissing| a spell file is used but it can't be found
|SourcePre| before sourcing a Vim script
@@ -465,6 +466,16 @@ BufWriteCmd Before writing the whole buffer to a file.
*BufWritePost*
BufWritePost After writing the whole buffer to a file
(should undo the commands for BufWritePre).
*CmdUndefined*
CmdUndefined When a user command is used but it isn't
defined. Useful for defining a command only
when it's used. The pattern is matched
against the command name. Both <amatch> and
<afile> are set to the name of the command.
NOTE: Autocompletion won't work until the
command is defined. An alternative is to
always define the user command and have it
invoke an autoloaded function. See |autoload|.
*CmdwinEnter*
CmdwinEnter After entering the command-line window.
Useful for setting options specifically for
@@ -670,6 +681,8 @@ FuncUndefined When a user function is used but it isn't
when it's used. The pattern is matched
against the function name. Both <amatch> and
<afile> are set to the name of the function.
NOTE: When writing Vim scripts a better
alternative is to use an autoloaded function.
See |autoload-functions|.
*GUIEnter*
GUIEnter After starting the GUI successfully, and after

View File

@@ -1,4 +1,4 @@
*change.txt* For Vim version 7.4. Last change: 2014 Feb 11
*change.txt* For Vim version 7.4. Last change: 2014 Jun 26
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1717,8 +1717,8 @@ Note that using `:sort` with `:global` doesn't sort the matching lines, it's
quite useless.
The details about sorting depend on the library function used. There is no
guarantee that sorting is "stable" or obeys the current locale. You will have
to try it out.
guarantee that sorting obeys the current locale. You will have to try it out.
Vim does do a "stable" sort.
The sorting can be interrupted, but if you interrupt it too late in the
process you may end up with duplicated lines. This also depends on the system

View File

@@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 7.4. Last change: 2014 Feb 23
*cmdline.txt* For Vim version 7.4. Last change: 2014 Sep 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -56,7 +56,7 @@ history tables:
These are completely separate. Each history can only be accessed when
entering the same type of line.
Use the 'history' option to set the number of lines that are remembered
(default: 20).
(default: 50).
Notes:
- When you enter a command-line that is exactly the same as an older one, the
old one is removed (to avoid repeated commands moving older commands out of
@@ -1084,6 +1084,9 @@ another window, or drag statuslines of other windows. You can drag the
statusline of the command-line window itself and the statusline above it.
Thus you can resize the command-line window, but not others.
The |getcmdwintype()| function returns the type of the command-line being
edited as described in |cmdwin-char|.
AUTOCOMMANDS

View File

@@ -1,4 +1,4 @@
*digraph.txt* For Vim version 7.4. Last change: 2014 Apr 17
*digraph.txt* For Vim version 7.4. Last change: 2014 Jun 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -170,6 +170,11 @@ used for the currency sign, and latin9 (iso-8859-15), where the digraph =e is
used for the euro sign, while both of them are the character 164, 0xa4. For
compatibility with zsh Eu can also be used for the euro sign.
ROUBLE
The rouble sign was added in 2014 as 0x20bd. Vim supports the digraphs =R and
=P for this. Note that R= and P= are other characters.
*digraph-table*
char digraph hex dec official name ~
^@ NU 0x00 0 NULL (NUL)
@@ -966,6 +971,8 @@ char digraph hex dec official name ~
₧ Pt 20A7 8359 PESETA SIGN
₩ W= 20A9 8361 WON SIGN
€ Eu 20AC 8364 EURO SIGN
₽ =R 20BD 8381 ROUBLE SIGN
₽ =P 20BD 8381 ROUBLE SIGN
℃ oC 2103 8451 DEGREE CELSIUS
℅ co 2105 8453 CARE OF
℉ oF 2109 8457 DEGREE FAHRENHEIT

View File

@@ -1,4 +1,4 @@
*editing.txt* For Vim version 7.4. Last change: 2014 May 02
*editing.txt* For Vim version 7.4. Last change: 2014 Aug 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1362,11 +1362,21 @@ cannot be read without the right key.
{only available when compiled with the |+cryptv| feature} *E833*
The text in the swap file and the undo file is also encrypted. *E843*
However, this is done block-by-block and may reduce the time needed to crack a
password. You can disable the swap file, but then a crash will cause you to
lose your work. The undo file can be disabled without much disadvantage. >
:set noundofile
:noswapfile edit secrets
Note: The text in memory is not encrypted. A system administrator may be able
to see your text while you are editing it. When filtering text with
":!filter" or using ":w !command" the text is not encrypted, this may reveal
it to others. The 'viminfo' file is not encrypted.
":!filter" or using ":w !command" the text is also not encrypted, this may
reveal it to others. The 'viminfo' file is not encrypted.
You could do this to edit very secret text: >
:set noundofile viminfo=
:noswapfile edit secrets.txt
Keep in mind that without a swap file you risk loosing your work in a crash.
WARNING: If you make a typo when entering the key and then write the file and
exit, the text will be lost!
@@ -1393,18 +1403,25 @@ To disable the encryption, reset the 'key' option to an empty value: >
:set key=
You can use the 'cryptmethod' option to select the type of encryption, use one
of these two: >
:setlocal cm=zip " weak method, backwards compatible
:setlocal cm=blowfish " strong method
of these: >
:setlocal cm=zip " weak method, backwards compatible
:setlocal cm=blowfish " method with flaws
:setlocal cm=blowfish2 " medium strong method
Do this before writing the file. When reading an encrypted file it will be
set automatically to the method used when that file was written. You can
change 'cryptmethod' before writing that file to change the method.
To set the default method, used for new files, use one of these in your
|vimrc| file: >
set cm=zip
set cm=blowfish
set cm=blowfish2
Use the first one if you need to be compatible with Vim 7.2 and older. Using
"blowfish2" is highly recommended if you can use a Vim version that supports
it.
The message given for reading and writing a file will show "[crypted]" when
using zip, "[blowfish]" when using blowfish.
using zip, "[blowfish]" when using blowfish, etc.
When writing an undo file, the same key and method will be used for the text
in the undo file. |persistent-undo|.
@@ -1439,7 +1456,7 @@ lines to "/etc/magic", "/usr/share/misc/magic" or wherever your system has the
0 string VimCrypt~ Vim encrypted file
>9 string 01 - "zip" cryptmethod
>9 string 02 - "blowfish" cryptmethod
>9 string 03 - "blowfish2" cryptmethod
Notes:
- Encryption is not possible when doing conversion with 'charconvert'.
@@ -1463,6 +1480,10 @@ Notes:
- Pkzip uses the same encryption as 'cryptmethod' "zip", and US Govt has no
objection to its export. Pkzip's public file APPNOTE.TXT describes this
algorithm in detail.
- The implmentation of 'cryptmethod' "blowfish" has a flaw. It is possible to
crack the first 64 bytes of a file and in some circumstances more of the
file. Use of it is not recommended, but it's still the strongest method
supported by Vim 7.3 and 7.4. The "zip" method is even weaker.
- Vim originates from the Netherlands. That is where the sources come from.
Thus the encryption code is not exported from the USA.

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.4. Last change: 2014 May 07
*eval.txt* For Vim version 7.4. Last change: 2014 Sep 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1102,9 +1102,9 @@ are known inside the current Vim session. Using expand() will first try using
the environment variables known inside the current Vim session. If that
fails, a shell will be used to expand the variable. This can be slow, but it
does expand all variables that the shell knows about. Example: >
:echo $version
:echo expand("$version")
The first one probably doesn't echo anything, the second echoes the $version
:echo $shell
:echo expand("$shell")
The first one probably doesn't echo anything, the second echoes the $shell
variable (if your shell supports it).
@@ -1807,7 +1807,8 @@ getchar( [expr]) Number get one character from the user
getcharmod( ) Number modifiers for the last typed character
getcmdline() String return the current command-line
getcmdpos() Number return cursor position in command-line
getcmdtype() String return the current command-line type
getcmdtype() String return current command-line type
getcmdwintype() String return current command-line window type
getcurpos() List position of the cursor
getcwd() String the current working directory
getfontname( [{name}]) String name of font being used
@@ -1887,6 +1888,8 @@ match( {expr}, {pat}[, {start}[, {count}]])
Number position where {pat} matches in {expr}
matchadd( {group}, {pattern}[, {priority}[, {id}]])
Number highlight {pattern} with {group}
matchaddpos( {group}, {list}[, {priority}[, {id}]])
Number highlight positions with {group}
matcharg( {nr}) List arguments of |:match|
matchdelete( {id}) Number delete match identified by {id}
matchend( {expr}, {pat}[, {start}[, {count}]])
@@ -2110,8 +2113,8 @@ argidx() The result is the current index in the argument list. 0 is
arglistid([{winnr}, [ {tabnr} ]])
Return the argument list ID. This is a number which
identifies the argument list being used. Zero is used for the
global argument list.
Return zero if the arguments are invalid.
global argument list. See |arglist|.
Return -1 if the arguments are invalid.
Without arguments use the current window.
With {winnr} only use this window in the current tab page.
@@ -2607,7 +2610,7 @@ cursor({list})
with two, three or four item:
[{lnum}, {col}, {off}]
[{lnum}, {col}, {off}, {curswant}]
This is like the return value of |getpos()| or |getcurpos|,
This is like the return value of |getpos()| or |getcurpos()|,
but without the first item.
Does not change the jumplist.
@@ -2619,7 +2622,7 @@ cursor({list})
line.
If {col} is zero, the cursor will stay in the current column.
If {curswant} is given it is used to set the preferred column
for vertical movment. Otherwise {col} is used.
for vertical movement. Otherwise {col} is used.
When 'virtualedit' is used {off} specifies the offset in
screen columns from the start of the character. E.g., a
position within a <Tab> or after the last character.
@@ -2910,7 +2913,8 @@ expand({expr} [, {nosuf} [, {list}]]) *expand()*
<
Expand() can also be used to expand variables and environment
variables that are only known in a shell. But this can be
slow, because a shell must be started. See |expr-env-expand|.
slow, because a shell may be used to do the expansion. See
|expr-env-expand|.
The expanded variable is still handled like a list of file
names. When an environment variable cannot be expanded, it is
left unchanged. Thus ":echo expand('$FOOBAR')" results in
@@ -3260,6 +3264,10 @@ getchar([expr]) *getchar()*
String when a modifier (shift, control, alt) was used that is
not included in the character.
When [expr] is 0 and Esc is typed, there will be a short delay
while Vim waits to see if this is the start of an escape
sequence.
When [expr] is 1 only the first byte is returned. For a
one-byte character it is the character itself as a number.
Use nr2char() to convert it to a String.
@@ -3338,11 +3346,17 @@ getcmdtype() *getcmdtype()*
? backward search command
@ |input()| command
- |:insert| or |:append| command
= |i_CTRL-R_=|
Only works when editing the command line, thus requires use of
|c_CTRL-\_e| or |c_CTRL-R_=| or an expression mapping.
Returns an empty string otherwise.
Also see |getcmdpos()|, |setcmdpos()| and |getcmdline()|.
getcmdwintype() *getcmdwintype()*
Return the current |command-line-window| type. Possible return
values are the same as |getcmdtype()|. Returns an empty string
when not in the command-line window.
*getcurpos()*
getcurpos() Get the position of the cursor. This is like getpos('.'), but
includes an extra item in the list:
@@ -3353,7 +3367,7 @@ getcurpos() Get the position of the cursor. This is like getpos('.'), but
let save_cursor = getcurpos()
MoveTheCursorAround
call setpos('.', save_cursor)
<
*getcwd()*
getcwd() The result is a String, which is the name of the current
working directory.
@@ -3475,6 +3489,34 @@ getmatches() *getmatches()*
'pattern': 'FIXME', 'priority': 10, 'id': 2}] >
:unlet m
<
*getpid()*
getpid() Return a Number which is the process ID of the Vim process.
On Unix and MS-Windows this is a unique number, until Vim
exits. On MS-DOS it's always zero.
*getpos()*
getpos({expr}) Get the position for {expr}. For possible values of {expr}
see |line()|. For getting the cursor position see
|getcurpos()|.
The result is a |List| with four numbers:
[bufnum, lnum, col, off]
"bufnum" is zero, unless a mark like '0 or 'A is used, then it
is the buffer number of the mark.
"lnum" and "col" are the position in the buffer. The first
column is 1.
The "off" number is zero, unless 'virtualedit' is used. Then
it is the offset in screen columns from the start of the
character. E.g., a position within a <Tab> or after the last
character.
Note that for '< and '> Visual mode matters: when it is "V"
(visual line mode) the column of '< is zero and the column of
'> is a large number.
This can be used to save and restore the position of a mark: >
let save_a_mark = getpos("'a")
...
call setpos(''a', save_a_mark
< Also see |getcurpos()| and |setpos()|.
getqflist() *getqflist()*
Returns a list with all the current quickfix errors. Each
@@ -3534,6 +3576,8 @@ gettabvar({tabnr}, {varname} [, {def}]) *gettabvar()*
Get the value of a tab-local variable {varname} in tab page
{tabnr}. |t:var|
Tabs are numbered starting with one.
When {varname} is empty a dictionary with all tab-local
variables is returned.
Note that the name without "t:" must be used.
When the tab or variable doesn't exist {def} or an empty
string is returned, there is no error message.
@@ -4348,6 +4392,41 @@ matchadd({group}, {pattern}[, {priority}[, {id}]])
available from |getmatches()|. All matches can be deleted in
one operation by |clearmatches()|.
matchaddpos({group}, {pos}[, {priority}[, {id}]]) *matchaddpos()*
Same as |matchadd()|, but requires a list of positions {pos}
instead of a pattern. This command is faster than |matchadd()|
because it does not require to handle regular expressions and
sets buffer line boundaries to redraw screen. It is supposed
to be used when fast match additions and deletions are
required, for example to highlight matching parentheses.
The list {pos} can contain one of these items:
- A number. This whole line will be highlighted. The first
line has number 1.
- A list with one number, e.g., [23]. The whole line with this
number will be highlighted.
- A list with two numbers, e.g., [23, 11]. The first number is
the line number, the second one is the column number (first
column is 1, the value must correspond to the byte index as
|col()| would return). The character at this position will
be highlighted.
- A list with three numbers, e.g., [23, 11, 3]. As above, but
the third number gives the length of the highlight in bytes.
The maximum number of positions is 8.
Example: >
:highlight MyGroup ctermbg=green guibg=green
:let m = matchaddpos("MyGroup", [[23, 24], 34])
< Deletion of the pattern: >
:call matchdelete(m)
< Matches added by |matchaddpos()| are returned by
|getmatches()| with an entry "pos1", "pos2", etc., with the
value a list like the {pos} item.
These matches cannot be set via |setmatches()|, however they
can still be deleted by |clearmatches()|.
matcharg({nr}) *matcharg()*
Selects the {nr} match item, as set with a |:match|,
|:2match| or |:3match| command.
@@ -4506,34 +4585,6 @@ nr2char({expr}[, {utf8}]) *nr2char()*
characters. nr2char(0) is a real NUL and terminates the
string, thus results in an empty string.
*getpid()*
getpid() Return a Number which is the process ID of the Vim process.
On Unix and MS-Windows this is a unique number, until Vim
exits. On MS-DOS it's always zero.
*getpos()*
getpos({expr}) Get the position for {expr}. For possible values of {expr}
see |line()|. For getting the cursor position see
|getcurpos()|.
The result is a |List| with four numbers:
[bufnum, lnum, col, off]
"bufnum" is zero, unless a mark like '0 or 'A is used, then it
is the buffer number of the mark.
"lnum" and "col" are the position in the buffer. The first
column is 1.
The "off" number is zero, unless 'virtualedit' is used. Then
it is the offset in screen columns from the start of the
character. E.g., a position within a <Tab> or after the last
character.
Note that for '< and '> Visual mode matters: when it is "V"
(visual line mode) the column of '< is zero and the column of
'> is a large number.
This can be used to save and restore the position of a mark: >
let save_a_mark = getpos("'a")
...
call setpos(''a', save_a_mark
< Also see |getcurpos()| and |setpos()|.
or({expr}, {expr}) *or()*
Bitwise OR on the two arguments. The arguments are converted
to a number. A List, Dict or Float argument causes an error.
@@ -5443,7 +5494,7 @@ setreg({regname}, {value} [,{options}])
Returns zero for success, non-zero for failure.
*E883*
Note: you may not use |List| containing more then one item to
Note: you may not use |List| containing more than one item to
set search and expression registers. Lists containing no
items act like empty strings.
@@ -5587,11 +5638,20 @@ sort({list} [, {func} [, {dict}]]) *sort()* *E702*
If you want a list to remain unmodified make a copy first: >
:let sortedlist = sort(copy(mylist))
< Uses the string representation of each item to sort on.
Numbers sort after Strings, |Lists| after Numbers.
For sorting text in the current buffer use |:sort|.
When {func} is given and it is one then case is ignored.
< When {func} is omitted, is empty or zero, then sort() uses the
string representation of each item to sort on. Numbers sort
after Strings, |Lists| after Numbers. For sorting text in the
current buffer use |:sort|.
When {func} is given and it is '1' or 'i' then case is
ignored.
When {func} is given and it is 'n' then all items will be
sorted numerical (Implementation detail: This uses the
strtod() function to parse numbers, Strings, Lists, Dicts and
Funcrefs will be considered as being 0).
When {func} is a |Funcref| or a function name, this function
is called to compare items. The function is invoked with two
items as argument and must return zero if they are equal, 1 or
@@ -5601,6 +5661,11 @@ sort({list} [, {func} [, {dict}]]) *sort()* *E702*
{dict} is for functions with the "dict" attribute. It will be
used to set the local variable "self". |Dictionary-function|
The sort is stable, items which compare equal (as number or as
string) will keep their relative position. E.g., when sorting
on numbers, text strings will sort next to each other, in the
same order as they were originally.
Also see |uniq()|.
Example: >
@@ -6031,6 +6096,12 @@ system({expr} [, {input}]) *system()* *E677*
list items converted to NULs).
Pipes are not used.
When prepended by |:silent| the shell will not be set to
cooked mode. This is meant to be used for commands that do
not need the user to type. It avoids stray characters showing
up on the screen which require |CTRL-L| to remove. >
:silent let f = system('ls *.vim')
<
Note: Use |shellescape()| or |::S| with |expand()| or
|fnamemodify()| to escape special characters in a command
argument. Newlines in {expr} may cause the command to fail.
@@ -6457,7 +6528,7 @@ winsaveview() Returns a |Dictionary| that contains information to restore
buffer and you want to go back to the original view.
This does not save fold information. Use the 'foldenable'
option to temporarily switch off folding, so that folds are
not opened when moving around.
not opened when moving around. This may have side effects.
The return value includes:
lnum cursor line number
col cursor column (Note: the first column
@@ -6513,7 +6584,7 @@ xor({expr}, {expr}) *xor()*
*feature-list*
There are three types of features:
There are four types of features:
1. Features that are only supported when they have been enabled when Vim
was compiled |+feature-list|. Example: >
:if has("cindent")
@@ -6567,6 +6638,7 @@ dialog_con Compiled with console dialog support.
dialog_gui Compiled with GUI dialog support.
diff Compiled with |vimdiff| and 'diff' support.
digraphs Compiled with support for digraphs.
directx Compiled with support for Direct-X and 'renderoptions'.
dnd Compiled with support for the "~ register |quote_~|.
dos16 16 bits DOS version of Vim.
dos32 32 bits DOS (DJGPP) version of Vim.
@@ -6609,8 +6681,8 @@ jumplist Compiled with |jumplist| support.
keymap Compiled with 'keymap' support.
langmap Compiled with 'langmap' support.
libcall Compiled with |libcall()| support.
linebreak Compiled with 'linebreak', 'breakat' and 'showbreak'
support.
linebreak Compiled with 'linebreak', 'breakat', 'showbreak' and
'breakindent' support.
lispindent Compiled with support for lisp indenting.
listcmds Compiled with commands for the buffer list |:files|
and the argument list |arglist|.

View File

@@ -96,6 +96,9 @@ Help on help files *helphelp*
find a tag in a file with the same language as the
current file. See |help-translated|.
*:helpc* *:helpclose*
:helpc[lose] Close one help window.
*:helpg* *:helpgrep*
:helpg[rep] {pattern}[@xx]
Search all help text files and make a list of lines

View File

@@ -1,4 +1,4 @@
*if_pyth.txt* For Vim version 7.4. Last change: 2013 Jul 10
*if_pyth.txt* For Vim version 7.4. Last change: 2014 Jul 23
VIM REFERENCE MANUAL by Paul Moore
@@ -28,7 +28,7 @@ Both can be available at the same time, but read |python-2-and-3|.
==============================================================================
1. Commands *python-commands*
*:python* *:py* *E205* *E263* *E264*
*:python* *:py* *E263* *E264* *E887*
:[range]py[thon] {stmt}
Execute Python statement {stmt}. A simple check if
the `:python` command is working: >

View File

@@ -1244,6 +1244,7 @@ tag command action ~
|:gvim| :gv[im] start the GUI
|:hardcopy| :ha[rdcopy] send text to the printer
|:help| :h[elp] open a help window
|:helpclose| :helpc[lose] close one help window
|:helpfind| :helpf[ind] dialog to open a help window
|:helpgrep| :helpg[rep] like ":grep" but searches help files
|:helptags| :helpt[ags] generate help tags for a directory

View File

@@ -1,4 +1,4 @@
*insert.txt* For Vim version 7.4. Last change: 2013 Jul 12
*insert.txt* For Vim version 7.4. Last change: 2014 Aug 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -51,6 +51,8 @@ char action ~
abbreviation.
Note: If your <Esc> key is hard to hit on your keyboard, train
yourself to use CTRL-[.
If Esc doesn't work and you are using a Mac, try CTRL-Esc.
Or disable Listening under Accessibility preferences.
*i_CTRL-C*
CTRL-C Quit insert mode, go back to Normal mode. Do not check for
abbreviations. Does not trigger the |InsertLeave| autocommand
@@ -1302,7 +1304,7 @@ HTML *ft-html-omni*
XHTML *ft-xhtml-omni*
CTRL-X CTRL-O provides completion of various elements of (X)HTML files. It is
designed to support writing of XHTML 1.0 Strict files but will also works for
designed to support writing of XHTML 1.0 Strict files but will also work for
other versions of HTML. Features:
- after "<" complete tag name depending on context (no div suggestion inside

View File

@@ -1,4 +1,4 @@
*intro.txt* For Vim version 7.4. Last change: 2013 Jun 17
*intro.txt* For Vim version 7.4. Last change: 2014 May 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -136,9 +136,10 @@ http://www.vim.org/maillist.php
Bug reports: *bugs* *bug-reports* *bugreport.vim*
Send bug reports to: Vim Developers <vim_dev@vim.org>
This is a maillist, many people will see the message. If you don't want that,
e.g. because it is a security issue, send it to <bugs@vim.org>, this only goes
to the Vim maintainer (that's Bram).
This is a maillist, you need to become a member first and many people will see
the message. If you don't want that, e.g. because it is a security issue,
send it to <bugs@vim.org>, this only goes to the Vim maintainer (that's Bram).
Please be brief; all the time that is spent on answering mail is subtracted
from the time that is spent on improving Vim! Always give a reproducible
example and try to find out which settings or other things influence the

View File

@@ -1,4 +1,4 @@
*map.txt* For Vim version 7.4. Last change: 2014 May 10
*map.txt* For Vim version 7.4. Last change: 2014 Jun 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -60,17 +60,17 @@ modes.
{rhs}, is then further scanned for mappings. This
allows for nested and recursive use of mappings.
:no[remap] {lhs} {rhs} |mapmode-nvo| *:no* *:noremap*
:nn[oremap] {lhs} {rhs} |mapmode-n| *:nn* *:nnoremap*
:vn[oremap] {lhs} {rhs} |mapmode-v| *:vn* *:vnoremap*
:xn[oremap] {lhs} {rhs} |mapmode-x| *:xn* *:xnoremap*
:snor[emap] {lhs} {rhs} |mapmode-s| *:snor* *:snoremap*
:ono[remap] {lhs} {rhs} |mapmode-o| *:ono* *:onoremap*
:no[remap]! {lhs} {rhs} |mapmode-ic| *:no!* *:noremap!*
:ino[remap] {lhs} {rhs} |mapmode-i| *:ino* *:inoremap*
:ln[oremap] {lhs} {rhs} |mapmode-l| *:ln* *:lnoremap*
:cno[remap] {lhs} {rhs} |mapmode-c| *:cno* *:cnoremap*
*:nore* *:norem*
:no[remap] {lhs} {rhs} |mapmode-nvo| *:no* *:noremap* *:nor*
:nn[oremap] {lhs} {rhs} |mapmode-n| *:nn* *:nnoremap*
:vn[oremap] {lhs} {rhs} |mapmode-v| *:vn* *:vnoremap*
:xn[oremap] {lhs} {rhs} |mapmode-x| *:xn* *:xnoremap*
:snor[emap] {lhs} {rhs} |mapmode-s| *:snor* *:snoremap*
:ono[remap] {lhs} {rhs} |mapmode-o| *:ono* *:onoremap*
:no[remap]! {lhs} {rhs} |mapmode-ic| *:no!* *:noremap!*
:ino[remap] {lhs} {rhs} |mapmode-i| *:ino* *:inoremap*
:ln[oremap] {lhs} {rhs} |mapmode-l| *:ln* *:lnoremap*
:cno[remap] {lhs} {rhs} |mapmode-c| *:cno* *:cnoremap*
Map the key sequence {lhs} to {rhs} for the modes
where the map command applies. Disallow mapping of
{rhs}, to avoid nested and recursive mappings. Often
@@ -828,12 +828,10 @@ Here is an example that counts the number of spaces with <F4>: >
let &selection = "inclusive"
let reg_save = @@
if a:0 " Invoked from Visual mode, use '< and '> marks.
silent exe "normal! `<" . a:type . "`>y"
if a:0 " Invoked from Visual mode, use gv command.
silent exe "normal! gvy"
elseif a:type == 'line'
silent exe "normal! '[V']y"
elseif a:type == 'block'
silent exe "normal! `[\<C-V>`]y"
else
silent exe "normal! `[v`]y"
endif

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 7.4. Last change: 2014 May 13
*options.txt* For Vim version 7.4. Last change: 2014 Sep 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1200,6 +1200,38 @@ A jump table for the options with a short description can be found at |Q_op|.
break if 'linebreak' is on. Only works for ASCII and also for 8-bit
characters when 'encoding' is an 8-bit encoding.
*'breakindent'* *'bri'*
'breakindent' 'bri' boolean (default off)
local to window
{not in Vi}
{not available when compiled without the |+linebreak|
feature}
Every wrapped line will continue visually indented (same amount of
space as the beginning of that line), thus preserving horizontal blocks
of text.
*'breakindentopt'* *'briopt'*
'breakindentopt' 'briopt' string (default empty)
local to window
{not in Vi}
{not available when compiled without the |+linebreak|
feature}
Settings for 'breakindent'. It can consist of the following optional
items and must be separated by a comma:
min:{n} Minimum text width that will be kept after
applying 'breakindent', even if the resulting
text should normally be narrower. This prevents
text indented almost to the right window border
occupying lot of vertical space when broken.
shift:{n} After applying 'breakindent', the wrapped line's
beginning will be shifted by the given number of
characters. It permits dynamic French paragraph
indentation (negative) or emphasizing the line
continuation (positive).
sbr Display the 'showbreak' value before applying the
additional indent.
The default value for min is 20 and shift is 0.
*'browsedir'* *'bsdir'*
'browsedir' 'bsdir' string (default: "last")
global
@@ -2197,10 +2229,18 @@ A jump table for the options with a short description can be found at |Q_op|.
zip PkZip compatible method. A weak kind of encryption.
Backwards compatible with Vim 7.2 and older.
*blowfish*
blowfish Blowfish method. Strong encryption. Requires Vim 7.3
or later, files can NOT be read by Vim 7.2 and older.
This adds a "seed" to the file, every time you write
the file the encrypted bytes will be different.
blowfish Blowfish method. Medium strong encryption but it has
an implementation flaw. Requires Vim 7.3 or later,
files can NOT be read by Vim 7.2 and older. This adds
a "seed" to the file, every time you write the file
the encrypted bytes will be different.
*blowfish2*
blowfish2 Blowfish method. Medium strong encryption. Requires
Vim 7.4.399 or later, files can NOT be read by Vim 7.3
and older. This adds a "seed" to the file, every time
you write the file the encrypted bytes will be
different. The whole undo file is encrypted, not just
the pieces of text.
When reading an encrypted file 'cryptmethod' will be set automatically
to the detected method of the file being read. Thus if you write it
@@ -3329,7 +3369,7 @@ A jump table for the options with a short description can be found at |Q_op|.
NOTE: This option is reset when 'compatible' is set.
*'grepformat'* *'gfm'*
'grepformat' 'gfm' string (default "%f:%l%m,%f %l%m")
'grepformat' 'gfm' string (default "%f:%l:%m,%f:%l%m,%f %l%m")
global
{not in Vi}
Format to recognize for the ":grep" command output.
@@ -3920,12 +3960,13 @@ A jump table for the options with a short description can be found at |Q_op|.
NOTE: This option is reset when 'compatible' is set.
*'history'* *'hi'*
'history' 'hi' number (Vim default: 20, Vi default: 0)
'history' 'hi' number (Vim default: 50, Vi default: 0)
global
{not in Vi}
A history of ":" commands, and a history of previous search patterns
are remembered. This option decides how many entries may be stored in
is remembered. This option decides how many entries may be stored in
each of these histories (see |cmdline-editing|).
The maximum value is 10000.
NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.
@@ -4574,12 +4615,13 @@ A jump table for the options with a short description can be found at |Q_op|.
{not in Vi}
{not available when compiled without the |+linebreak|
feature}
If on Vim will wrap long lines at a character in 'breakat' rather
If on, Vim will wrap long lines at a character in 'breakat' rather
than at the last character that fits on the screen. Unlike
'wrapmargin' and 'textwidth', this does not insert <EOL>s in the file,
it only affects the way the file is displayed, not its contents. The
value of 'showbreak' is used to put in front of wrapped lines.
This option is not used when the 'wrap' option is off or 'list' is on.
it only affects the way the file is displayed, not its contents.
If 'breakindent' is set, line is visually indented. Then, the value
of 'showbreak' is used to put in front of wrapped lines. This option
is not used when the 'wrap' option is off.
Note that <Tab> characters after an <EOL> are mostly not displayed
with the right amount of white space.
@@ -5335,7 +5377,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Expression which is evaluated to apply a patch to a file and generate
the resulting new version of the file. See |diff-patchexpr|.
*'patchmode'* *'pm'* *E206*
*'patchmode'* *'pm'* *E205* *E206*
'patchmode' 'pm' string (default "")
global
{not in Vi}
@@ -5616,6 +5658,77 @@ A jump table for the options with a short description can be found at |Q_op|.
this option at the default "on". Only switch it off when working with
old Vi scripts.
*'renderoptions'* *'rop'*
'renderoptions' 'rop' string (default: empty)
global
{not in Vi}
{only available when compiled with GUI and DIRECTX on
MS-Windows}
Select a text renderer and set its options. The options depend on the
renderer.
Syntax: >
set rop=type:{renderer}(,{name}:{value})*
<
Currently, only one optional renderer is available.
render behavior ~
directx Vim will draw text using DirectX (DirectWrite). It makes
drawn glyphs more beautiful than default GDI.
It requires 'encoding' is "utf-8", and only works on
MS-Windows Vista or newer version.
Options:
name meaning type value ~
gamma gamma float 1.0 - 2.2 (maybe)
contrast enhancedContrast float (unknown)
level clearTypeLevel float (unknown)
geom pixelGeometry int 0 - 2 (see below)
renmode renderingMode int 0 - 6 (see below)
taamode textAntialiasMode int 0 - 3 (see below)
See this URL for detail:
http://msdn.microsoft.com/en-us/library/dd368190.aspx
For geom: structure of a device pixel.
0 - DWRITE_PIXEL_GEOMETRY_FLAT
1 - DWRITE_PIXEL_GEOMETRY_RGB
2 - DWRITE_PIXEL_GEOMETRY_BGR
See this URL for detail:
http://msdn.microsoft.com/en-us/library/dd368114.aspx
For renmode: method of rendering glyphs.
0 - DWRITE_RENDERING_MODE_DEFAULT
1 - DWRITE_RENDERING_MODE_ALIASED
2 - DWRITE_RENDERING_MODE_GDI_CLASSIC
3 - DWRITE_RENDERING_MODE_GDI_NATURAL
4 - DWRITE_RENDERING_MODE_NATURAL
5 - DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC
6 - DWRITE_RENDERING_MODE_OUTLINE
See this URL for detail:
http://msdn.microsoft.com/en-us/library/dd368118.aspx
For taamode: antialiasing mode used for drawing text.
0 - D2D1_TEXT_ANTIALIAS_MODE_DEFAULT
1 - D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE
2 - D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE
3 - D2D1_TEXT_ANTIALIAS_MODE_ALIASED
See this URL for detail:
http://msdn.microsoft.com/en-us/library/dd368170.aspx
Example: >
set encoding=utf-8
set gfn=Ricty_Diminished:h12:cSHIFTJIS
set rop=type:directx
<
If select a raster font (Courier, Terminal or FixedSys) to
'guifont', it fallbacks to be drawn by GDI automatically.
Other render types are currently not supported.
*'report'*
'report' number (default 2)
global
@@ -7737,6 +7850,7 @@ A jump table for the options with a short description can be found at |Q_op|.
fold options
options options and mappings local to a window or buffer (not
global values for local options)
localoptions same as "options"
slash backslashes in file names replaced with forward
slashes
unix with Unix end-of-line format (single <NL>), even when

View File

@@ -1,4 +1,4 @@
*os_vms.txt* For Vim version 7.4. Last change: 2014 Feb 24
*os_vms.txt* For Vim version 7.4. Last change: 2014 Aug 29
VIM REFERENCE MANUAL
@@ -774,7 +774,7 @@ Version 7.4
- correct RealWaitForChar
- after 7.4-119 use different functions lib$cvtf_to_internal_time because Alpha and VAX have
G_FLOAT but IA64 uses IEEE float otherwise Vim crashes
- guard agains crashes that are caused by mixed filenames
- guard against crashes that are caused by mixed filenames
- [TESTDIR]make_vms.mms changed to see the output files
- Improve tests, update known issues
- minor compiler warnings fixed

View File

@@ -1,4 +1,4 @@
*os_win32.txt* For Vim version 7.4. Last change: 2012 May 18
*os_win32.txt* For Vim version 7.4. Last change: 2014 Aug 29
VIM REFERENCE MANUAL by George Reilly
@@ -334,7 +334,7 @@ A. You have two possible solutions depending on what you want:
:!start /min ctags -R .
< When it has finished you should see file named "tags" in your current
directory. You should notice the window title blinking on your taskbar.
This is more noticable for commands that take longer.
This is more noticeable for commands that take longer.
Now delete the "tags" file and run this command: >
:!start /b ctags -R .
< You should have the same "tags" file, but this time there will be no

View File

@@ -1,4 +1,4 @@
*pattern.txt* For Vim version 7.4. Last change: 2014 May 13
*pattern.txt* For Vim version 7.4. Last change: 2014 Sep 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -706,11 +706,18 @@ overview.
But to limit the time needed, only the line where what follows matches
is searched, and one line before that (if there is one). This should
be sufficient to match most things and not be too slow.
The part of the pattern after "\@<=" and "\@<!" are checked for a
match first, thus things like "\1" don't work to reference \(\) inside
the preceding atom. It does work the other way around:
Example matches ~
\1\@<=,\([a-z]\+\) ",abc" in "abc,abc"
In the old regexp engine the part of the pattern after "\@<=" and
"\@<!" are checked for a match first, thus things like "\1" don't work
to reference \(\) inside the preceding atom. It does work the other
way around:
Bad example matches ~
\%#=1\1\@<=,\([a-z]\+\) ",abc" in "abc,abc"
However, the new regexp engine works differently, it is better to not
rely on this behavior, do not use \@<= if it can be avoided:
Example matches ~
\([a-z]\+\)\zs,\1 ",abc" in "abc,abc"
\@123<=
Like "\@<=" but only look back 123 bytes. This avoids trying lots
@@ -822,6 +829,7 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
branch is used. Example: >
/\(.\{-}\zsFab\)\{3}
< Finds the third occurrence of "Fab".
This cannot be followed by a multi. *E888*
{not in Vi} {not available when compiled without the |+syntax| feature}
*/\ze*
\ze Matches at any position, and sets the end of the match there: The
@@ -830,6 +838,7 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
branch is used.
Example: "end\ze\(if\|for\)" matches the "end" in "endif" and
"endfor".
This cannot be followed by a multi. |E888|
{not in Vi} {not available when compiled without the |+syntax| feature}
*/\%^* *start-of-file*
@@ -1332,7 +1341,7 @@ Finally, these constructs are unique to Perl:
patterns defined by both |matchadd()| and |:match|.
Highlighting matches using |:match| are limited to three
matches (aside from |:match|, |:2match| and |:3match|are
matches (aside from |:match|, |:2match| and |:3match| are
available). |matchadd()| does not have this limitation and in
addition makes it possible to prioritize matches.

View File

@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 7.4. Last change: 2013 Jun 29
*quickref.txt* For Vim version 7.4. Last change: 2014 Aug 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -624,6 +624,8 @@ Short explanation of each option: *option-list*
'bioskey' 'biosk' MS-DOS: use bios calls for input characters
'bomb' prepend a Byte Order Mark to the file
'breakat' 'brk' characters that may cause a line break
'breakindent' 'bri' wrapped line repeats indent
'breakindentopt' 'briopt' settings for 'breakindent'
'browsedir' 'bsdir' which directory to start browsing in
'bufhidden' 'bh' what to do when buffer is no longer in window
'buflisted' 'bl' whether the buffer shows up in the buffer list
@@ -829,6 +831,7 @@ Short explanation of each option: *option-list*
'regexpengine' 're' default regexp engine to use
'relativenumber' 'rnu' show relative line number in front of each line
'remap' allow mappings to work recursively
'renderoptions' 'rop' options for text rendering on Windows
'report' threshold for reporting nr. of lines changed
'restorescreen' 'rs' Win32: restore screen when exiting
'revins' 'ri' inserting characters will work backwards

View File

@@ -1,4 +1,4 @@
*spell.txt* For Vim version 7.4. Last change: 2013 Nov 12
*spell.txt* For Vim version 7.4. Last change: 2014 Jul 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -939,9 +939,10 @@ 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.
all spell files you use. If you are only using one, e.g., German, then also
download the recent English spell files. 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
@@ -1057,6 +1058,9 @@ this text to start with a "#" so that mistakes don't go unnoticed. Example:
SFX F 0 in [^i]n # Spion > Spionin ~
SFX F 0 nen in # Bauerin > Bauerinnen ~
However, to avoid lots of errors in affix files written for Myspell, you can
add the IGNOREEXTRA flag.
Apparently Myspell allows an affix name to appear more than once. Since this
might also be a mistake, Vim checks for an extra "S". The affix files for
Myspell that use this feature apparently have this flag. Example:
@@ -1110,6 +1114,14 @@ Specifically, the affix flags can be used for:
- CIRCUMFIX, as explained just below.
IGNOREEXTRA *spell-IGNOREEXTRA*
Normally Vim gives an error for an extra field that does not start with '#'.
This avoids errors going unnoticed. However, some files created for Myspell
or Hunspell may contain many entries with an extra field. Use the IGNOREEXTRA
flag to avoid lots of errors.
CIRCUMFIX *spell-CIRCUMFIX*
The CIRCUMFIX flag means a prefix and suffix must be added at the same time.

View File

@@ -1,4 +1,4 @@
*starting.txt* For Vim version 7.4. Last change: 2014 Mar 29
*starting.txt* For Vim version 7.4. Last change: 2014 Jul 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -167,7 +167,10 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
*-+/*
+/{pat} The cursor will be positioned on the first line containing
"pat" in the first file being edited (see |pattern| for the
available search patterns).
available search patterns). The search starts at the cursor
position, which can be the first line or the cursor position
last used from |viminfo|. To force a search from the first
line use "+1 +/pat".
+{command} *-+c* *-c*
-c {command} {command} will be executed after the first file has been
@@ -1503,7 +1506,7 @@ most of the information will be restored).
already set (registers, marks, |v:oldfiles|, etc.)
will be overwritten {not in Vi}
*:wv* *:wviminfo* *E137* *E138* *E574*
*:wv* *:wviminfo* *E137* *E138* *E574* *E886*
:wv[iminfo][!] [file] Write to viminfo file [file] (default: see above).
The information in the file is first read in to make
a merge between old and new info. When [!] is used,

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 7.4. Last change: 2014 Apr 05
*syntax.txt* For Vim version 7.4. Last change: 2014 Sep 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -501,7 +501,7 @@ 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
(|g:html_dynamic_folds|) containing the specified line before jumping. The
javascript also allows omitting the window ID in the url, and the leading L.
For example: >
@@ -1688,7 +1688,7 @@ vimrc file: >
HTML comments are rather special (see an HTML reference document for the
details), and the syntax coloring scheme will highlight all errors.
However, if you prefer to use the wrong style (starts with <!-- and
ends with --!>) you can define >
ends with -->) you can define >
:let html_wrong_comments=1
JavaScript and Visual Basic embedded inside HTML documents are highlighted as
@@ -2279,7 +2279,7 @@ files, you may set the 'perl_include_pod' option to 0: >
:let perl_include_pod = 0
The reduce the complexity of parsing (and increase performance) you can switch
To reduce the complexity of parsing (and increase performance) you can switch
off two elements in the parsing of variable names and contents. >
To handle package references in variable and function names not differently
@@ -2975,6 +2975,7 @@ TEX *tex.vim* *ft-tex-syntax* *latex-syntax*
Tex: Taking Advantage of Conceal Mode |tex-conceal|
Tex: Selective Conceal Mode |g:tex_conceal|
Tex: Controlling iskeyword |g:tex_isk|
Tex: Fine Subscript and Superscript Control |tex-supersub|
*tex-folding* *g:tex_fold_enabled*
Tex: Want Syntax Folding? ~
@@ -3068,6 +3069,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.
(also see: |g:tex_conceal| and |tex-supersub|)
*tex-morecommands* *tex-package*
Tex: Want To Highlight More Commands? ~
@@ -3169,6 +3171,28 @@ syntax highlighting script handles this with the following logic:
* 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
*tex-supersub* *g:tex_superscripts* *g:tex_subscripts*
Tex: Fine Subscript and Superscript Control~
See |tex-conceal| for how to enable concealed character replacement.
See |g:tex_conceal| for selectively concealing accents, bold/italic,
math, Greek, and superscripts/subscripts.
One may exert fine control over which superscripts and subscripts one
wants syntax-based concealment for (see |:syn-cchar|). Since not all
fonts support all characters, one may override the
concealed-replacement lists; by default these lists are given by: >
let g:tex_superscripts= "[0-9a-zA-W.,:;+-<>/()=]"
let g:tex_subscripts= "[0-9aehijklmnoprstuvx,+-/().]"
<
For example, I use Luxi Mono Bold; it doesn't support subscript
characters for "hklmnpst", so I put >
let g:tex_subscripts= "[0-9aeijoruvx,+-/().]"
< in ~/.vim/ftplugin/tex/tex.vim in order to avoid having inscrutable
utf-8 glyphs appear.
TF *tf.vim* *ft-tf-syntax*

View File

@@ -91,6 +91,10 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'bl' options.txt /*'bl'*
'bomb' options.txt /*'bomb'*
'breakat' options.txt /*'breakat'*
'breakindent' options.txt /*'breakindent'*
'breakindentopt' options.txt /*'breakindentopt'*
'bri' options.txt /*'bri'*
'briopt' options.txt /*'briopt'*
'brk' options.txt /*'brk'*
'browsedir' options.txt /*'browsedir'*
'bs' options.txt /*'bs'*
@@ -752,6 +756,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'regexpengine' options.txt /*'regexpengine'*
'relativenumber' options.txt /*'relativenumber'*
'remap' options.txt /*'remap'*
'renderoptions' options.txt /*'renderoptions'*
'report' options.txt /*'report'*
'restorescreen' options.txt /*'restorescreen'*
'revins' options.txt /*'revins'*
@@ -762,6 +767,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'rlc' options.txt /*'rlc'*
'rnu' options.txt /*'rnu'*
'ro' options.txt /*'ro'*
'rop' options.txt /*'rop'*
'rs' options.txt /*'rs'*
'rtp' options.txt /*'rtp'*
'ru' options.txt /*'ru'*
@@ -1167,6 +1173,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
+dialog_gui various.txt /*+dialog_gui*
+diff various.txt /*+diff*
+digraphs various.txt /*+digraphs*
+directx various.txt /*+directx*
+dnd various.txt /*+dnd*
+emacs_tags various.txt /*+emacs_tags*
+eval various.txt /*+eval*
@@ -2523,8 +2530,11 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:noautocmd autocmd.txt /*:noautocmd*
:noh pattern.txt /*:noh*
:nohlsearch pattern.txt /*:nohlsearch*
:nor map.txt /*:nor*
:nore map.txt /*:nore*
:norea map.txt /*:norea*
:noreabbrev map.txt /*:noreabbrev*
:norem map.txt /*:norem*
:noremap map.txt /*:noremap*
:noremap! map.txt /*:noremap!*
:noreme gui.txt /*:noreme*
@@ -3444,6 +3454,7 @@ CTRL-^ editing.txt /*CTRL-^*
CTRL-{char} intro.txt /*CTRL-{char}*
Chinese mbyte.txt /*Chinese*
Cmd-event autocmd.txt /*Cmd-event*
CmdUndefined autocmd.txt /*CmdUndefined*
Cmdline cmdline.txt /*Cmdline*
Cmdline-mode cmdline.txt /*Cmdline-mode*
CmdwinEnter autocmd.txt /*CmdwinEnter*
@@ -3585,7 +3596,7 @@ E201 autocmd.txt /*E201*
E202 options.txt /*E202*
E203 autocmd.txt /*E203*
E204 autocmd.txt /*E204*
E205 if_pyth.txt /*E205*
E205 options.txt /*E205*
E206 options.txt /*E206*
E207 editing.txt /*E207*
E208 message.txt /*E208*
@@ -4316,6 +4327,9 @@ E882 eval.txt /*E882*
E883 eval.txt /*E883*
E884 eval.txt /*E884*
E885 sign.txt /*E885*
E886 starting.txt /*E886*
E887 if_pyth.txt /*E887*
E888 pattern.txt /*E888*
E89 message.txt /*E89*
E90 message.txt /*E90*
E91 options.txt /*E91*
@@ -4795,6 +4809,7 @@ argidx() eval.txt /*argidx()*
arglist editing.txt /*arglist*
arglist-position editing.txt /*arglist-position*
arglist-quit usr_07.txt /*arglist-quit*
arglistid() eval.txt /*arglistid()*
argument-list editing.txt /*argument-list*
argv() eval.txt /*argv()*
as motion.txt /*as*
@@ -4892,6 +4907,7 @@ blockwise-operators visual.txt /*blockwise-operators*
blockwise-register change.txt /*blockwise-register*
blockwise-visual visual.txt /*blockwise-visual*
blowfish options.txt /*blowfish*
blowfish2 options.txt /*blowfish2*
bold syntax.txt /*bold*
bom-bytes mbyte.txt /*bom-bytes*
book intro.txt /*book*
@@ -6065,6 +6081,8 @@ 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_subscripts syntax.txt /*g:tex_subscripts*
g:tex_superscripts syntax.txt /*g:tex_superscripts*
g:tex_verbspell syntax.txt /*g:tex_verbspell*
g:var eval.txt /*g:var*
g:vimball_home pi_vimball.txt /*g:vimball_home*
@@ -6128,6 +6146,8 @@ getcharmod() eval.txt /*getcharmod()*
getcmdline() eval.txt /*getcmdline()*
getcmdpos() eval.txt /*getcmdpos()*
getcmdtype() eval.txt /*getcmdtype()*
getcmdwintype() eval.txt /*getcmdwintype()*
getcurpos() eval.txt /*getcurpos()*
getcwd() eval.txt /*getcwd()*
getfontname() eval.txt /*getfontname()*
getfperm() eval.txt /*getfperm()*
@@ -6823,6 +6843,7 @@ match() eval.txt /*match()*
match-highlight pattern.txt /*match-highlight*
match-parens tips.txt /*match-parens*
matchadd() eval.txt /*matchadd()*
matchaddpos() eval.txt /*matchaddpos()*
matcharg() eval.txt /*matcharg()*
matchdelete() eval.txt /*matchdelete()*
matchend() eval.txt /*matchend()*
@@ -8281,6 +8302,7 @@ 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-supersub syntax.txt /*tex-supersub*
tex-sync syntax.txt /*tex-sync*
tex-verb syntax.txt /*tex-verb*
tex.vim syntax.txt /*tex.vim*

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.4. Last change: 2014 May 22
*todo.txt* For Vim version 7.4. Last change: 2014 Sep 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -46,37 +46,102 @@ Regexp problems:
- NFA regexp doesn't handle \%<v correctly. (Ingo Karkat, 2014 May 12)
- Does not work with NFA regexp engine:
\%u, \%x, \%o, \%d followed by a composing character
- Bug relating to back references. (Ingo Karkat, 2014 Jul 24)
- Using back reference before the capturing group sometimes works with the old
engine, can we do this with the new engine? E.g. with
"/\%(<\1>\)\@<=.*\%(<\/\(\w\+\)>\)\@=" matching text inside HTML tags.
Still using freed memory after using setloclist(). (lcd, 2014 Jul 23)
More info Jul 24. Not clear why.
Patch to make getregtype() return the right size for non-linux systems.
(Yasuhiro Matsumoto, 2014 Jul 8)
Breaks test_eval. Inefficient, can we only compute y_width when needed?
Problem that a previous silent ":throw" causes a following try/catch not to
work. (ZyX, 2013 Sep 28)
Update for Romanian spell file. (Vanilla Ice, 2014 Aug 13)
Still produces errors.
Add flag to ignore fifth argument of SFX.
Conversion from utf-8 to cp1250 can't be without errors.
Patch to remove ETO_IGNORELANGUAGE, it causes Chinese characters not to show
up. (Paul Moore, 2014 Jul 30)
Should it depend on the Windows version? Waiting for feedback.
No longer needed after including DirectX patch?
Related to issue 255?
Problem with linebreak, adds a test that fails. (Nazri Ramliy, 2014 Sep 6)
Patch to avoid problems with encoding conversion with diff.vim.
(Yasuhiro Matsumoto, 2014 Sep 1.
Patch by Marcin Szamotulski to add count to :close (2014 Aug 10, update Aug
14, Aug 30)
Make ":1close" close the first window.
Make ":+1close" close the next window.
Make ":-1close" close the previous window.
Can't easily close the help window, like ":pc" closes the preview window and
":ccl" closes the quickfix window. Add ":hclose". (Chris Gaal)
Patch for :helpclose, Christian Brabandt, 2010 Sep 6.
Patch to fix line formatting bug. (Christian Brabandt, 2014 Sep 7)
Patch to fix ml_get error. (Christian Brabandt, 2014 Sep 7)
Patch by Marcin Szamotulski to add +cmd to buffer commands.
(2014 Aug 18)
Patch to fix encoding of arguments when setting 'encoding'. (Yasuhiro
Matsumoto, 2014 Sep 4)
Patch to fix that system() with empty input fails. (Olaf Dabrunz, 2014 Aug 19)
When using a visual selection of multiple words and doing CTRL-W_] it jumps to
the tag matching the word under the cursor, not the selected text.
(Patrick hemmer)
Patch by Christian, 2014 Aug 8.
Completion for :buf does not use 'wildignorecase'. (Akshay H, 2014 May 31)
Patch to handle list with some items locked. (ZyX, 2014 Aug 17)
Prefer the second solution.
Issue 252. Patch by Christian, 2014 Aug 26.
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
directory exists. (Sergio Gallelli, 2013 Dec 29)
Patch to add a special key name for K_CURSORHOLD. (Hirohito Higashi, 2014 Aug
10)
The entries added by matchaddpos() are returned by getmatches() but can't be
set with setmatches(). (lcd47, 2014 Jun 29)
Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15)
Setting 'ttymouse' empty causes Dec mouse to be detected. (Elijah Griffin,
2014 May 13)
Python: ":py raw_input('prompt')" doesn't work. (Manu Hack)
Value returned by virtcol() changes depending on how lines wrap. This is
inconsistent with the documentation.
MS-Windows: Crash opening very long file name starting with "\\".
(Christian Brock, 2012 Jun 29)
Syntax highlighting slow (hangs) in SASS file. (Niek Bosch, 2013 Aug 21)
Patch to allow for a different icon on MS-Windows. (Yasuhiro Matsumoto, 2014
Sep 7).
Adding "~" to 'cdpath' doesn't work for completion? (Davido, 2013 Aug 19)
Syntax file for gnuplot. Existing one is very old. (Andrew Rasmussen, 2014
Feb 24)
Add digraph for Rouble: =P. What's the Unicode?
Issue 174: Detect Mason files.
"hi link" does not respect groups with GUI settings only. (Mark Lodato, 2014
Jun 8)
No error for missing endwhile. (ZyX, 2014 Mar 20)
Phpcomplete.vim update. (Complex, 2014 Jan 15)
Patch to add :arglocal and :arglists. (Marcin Szamotulski, 2014 Aug 6)
PHP syntax is extremely slow. (Anhad Jai Singh, 2014 Jan 19)
@@ -85,25 +150,22 @@ Spell files use a latin single quote. Unicode also has another single quote:
New OpenOffice spell files support this with ICONV. But they are not
compatible with Vim spell files. The old files can no longer be downloaded.
Win32: use different args for SearchPath()? (Yasuhiro Matsumoto, 2009 Jan 30)
Also fixes wrong result from executable().
Update from Ken Takata, 2014 Jan 10. Newer 2014 Apr 3.
Win32: patch to use 64 bit stat() if possible. (Ken Takata, 2014 May 12)
More tests May 14. Update May 29. Update Aug 10.
Win32: use 64 bit stat() if possible. (Ken Takata, 2014 May 12)
More tests May 14.
The garbage collector may use too much stack. Make set_ref_in_item()
iterative instead of recursive. Test program by Marc Weber (2013 Dec 10)
Patch by Ben Fritz, 2014 Jun 22.
Related: Vim hangs when freeing a lot of objects. Patch by Yasuhiro
Matsumoto, 2014 Aug 26.
Idea: For a window in the middle (has window above and below it), use
right-mouse-drag on the status line to move a window up/down without changing
it's height? It's like dragging the status bar above it at the same time.
its height? It's like dragging the status bar above it at the same time.
Can we make ":unlet $VAR" use unsetenv() to delete the env var?
What for systems that don't have unsetenv()?
Patch to make getchar() work for typing Esc. (Yasuhiro Matsumoto, 2014 May 13)
Patch for problem that v:register is set to '_' after deleting into the black
hole register.
This does not give an error: (Andre Sihera, 2014 Mar 21)
vim -u NONE 1 2 3 -c 'bufdo if 1 | echo 1'
This neither: (ZyX)
@@ -113,8 +175,8 @@ This neither: (ZyX)
Change 'viewdir' to "$HOME/vimfiles/view" and use 'viewdiralt' to also read
from?
Patch to add arglistid(), get the ID of the currently used argument list.
(Marcin Szamotulski, 2014 Apr 27)
Problem with upwards search on Windows (works OK on Linux). (Brett Stahlman,
2014 Jun 8)
Include a plugin manager with Vim? Neobundle seems to be the best currently.
Long message about this from ZyX, 2014 Mar 23. And following replies.
@@ -153,15 +215,8 @@ Out of scope:
Setting the spell file in a session only reads the local additions, not the
normal spell file. (Enno Nagel, 2014 Mar 29)
- Patch for 'breakindent' option: repeat indent for wrapped line. (Vaclav
Smilauer, 2004 Sep 13, fix Oct 31, update 2007 May 30)
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.
Updated for Vim 7.4 by Ken Takata, 2013 Oct 5.
Update by Christian Brabandt, 2014 May 9. Remarks by Ken Takata.
Update by Christian 2014 May 12, github link on May 15
CTRL-] in Visual mode uses the selected text as a tag. This does not work
when preceded with CTRL-W. (Patrick Hemmer, 2014 Jun 28)
When typing the first character of a command, e.g. "f", then using a menu, the
menu item doesn't work. Clear typeahead when using a menu?
@@ -172,23 +227,36 @@ Editing an ascii file as ucs-2 or ucs-4 causes display errors.
":Next 1 some-arg" does not complain about trailing argument. Also for
various other commands. (ZyX, 2014 Mar 30)
patch to skip sort if no line matches the expression.
(Christian Brabandt, 2014 Jun 25)
Patch to add sortuniq(). (Cade Forester, 2014 Mar 19)
Or add uniq() instead? Patch by lcd47, but it has problems.
Patch to support sorting on floating point number. (Alex Jakushev, 2010 Oct
30)
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?
VMS: Select() doesn't work properly, typing ESC may hang Vim. Use sys$qiow
instead. (Samuel Ferencik, 2013 Sep 28)
Patch for XDG base directory support. (Jean François Bignolles, 2014 Mar 4)
Remark on the docs. Should not be a compile time feature. But then what?
Patch to add flag to shortmess to avoid giving completion messages.
(Shougo Matsu, 2014 Jan 6, update Jan 11)
Completion of ":e" is ":earlier", should be ":edit". Complete to the matching
command instead of doing this alphabetically. (Mikel Jorgensen)
Patch to add v:completed_item. (Shougo Matsu, 2013 Nov 29).
Patch to get MSVC version in a nicer way. (Ken Takata, 2014 Jul 24)
Patch to make test 100 work on MS-Windows. (Taro Muraoka, 2013 Dec 12)
Patch to define macros for hardcoded values. (Elias Diem, 2013 Dec 14)
Patch to add sortuniq(). (Cade Forester, 2014 Mar 19)
Or add uniq() instead? Patch by lcd47, but it has problems.
Perl: support for Activestate perl 5.18: Issue 170.
Several syntax file match "^\s*" which may get underlined if that's in the
@@ -200,15 +268,12 @@ Issue 28.
Go through more coverity reports.
Patch to add ":undorecover", get as much text out of the undo file as
possible. (Christian Brabandt, 2014 Mar 12)
possible. (Christian Brabandt, 2014 Mar 12, update Aug 22)
Include Haiku port? (Adrien Destugues, Siarzhuk Zharski, 2013 Oct 24)
Updated spec ftplugin. (Matěj Cepl, 2013 Oct 16)
Some quickfix messages appear twice. (Gary Johnson, 2014 Feb 16)
Patch by Christian Brabandt, 2014 Feb 17.
Patch to right-align signs. (James Kolb (email james), 2013 Sep 23)
Patch to handle integer overflow. (Aaron Burrow, 2013 Dec 12)
@@ -291,19 +356,12 @@ Works OK for echo, just not for ":call" and ":call call()". (Ted, 2011 Mar
Patch by Christian Brabandt, 2013 Mar 23.
Not 100% sure this is the right solution.
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.
Patch to add {lhs} to :mapclear: clear all maps starting with {lhs}.
(Christian Brabandt, 2013 Dec 9)
The garbage collector may use too much stack. Make set_ref_in_item()
iterative instead of recursive. Test program by Marc Weber (2013 Dec 10)
Exception caused by argument of return is not caught by try/catch.
(David Barnett, 2013 Nov 19)
@@ -344,6 +402,7 @@ 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. Update May 22.
Update by Daniel Hahler, 2014 Jul 4, Aug 14.
Patch to make fold updates much faster. (Christian Brabandt, 2012 Dec)
@@ -358,9 +417,6 @@ Patch by Christian Brabandt, 2013 Apr 20, unfinished.
Bug: findfile("any", "file:///tmp;") does not work.
v:register is not directly reset to " after a delete command that specifies a
register. It is reset after the next command. (Steve Vermeulen, 2013 Mar 16)
'ff' is wrong for one-line file without EOL. (Issue 77)
Patch to set antialiasing style on Windows. (Ondrej Balaz, 2013 Mar 14)
@@ -401,13 +457,6 @@ signs? Patch by Christian Brabandt, 2013 Aug 22.
Patch to remove flicker from popup menu. (Yasuhiro Matsumoto, 2013 Aug 15)
Patch to use directX to draw text on Windows. Adds the 'renderoptions'
option. (Taro Muraoka, 2013 Jan 25, update 2013 Apr 3, May 14)
Fixes this problem:
8 Win32: Multi-byte characters are not displayed, even though the same font
in Notepad can display them. (Srinath Avadhanula) Try with the
UTF-8-demo.txt page with Andale Mono.
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
@@ -482,6 +531,9 @@ Aug 16)
When there are no command line arguments ":next" and ":argu" give E163, which
is confusing. Should say "the argument list is empty".
xterm supports escape sequences to mark a paste operation. Need to be
enabled. (Bruno Sutic, 2014 Jul 11) How to know the terminal supports this?
URXVT:
- will get stuck if byte sequence does not contain the expected semicolon.
- Use urxvt mouse support also in xterm. Explanations:
@@ -618,6 +670,7 @@ effects? (Christian Brabandt, 2012 Aug 5, Update 2013 Aug 12)
Would also need to do this for spellbadword() and spellsuggest().
Patch for variable tabstops. On github (Christian Brabandt, 2014 May 15)
Update Aug 16 (email).
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
@@ -659,9 +712,6 @@ Build problem with small features on Mac OS X 10.6. (Rainer, 2011 Jan 24)
"0g@$" puts '] on last byte of multi-byte. (ZyX, 2011 Jan 22)
Patch to support sorting on floating point number. (Alex Jakushev, 2010 Oct
30)
Patch to addd TextDeletePost and TextYankPost events. (Philippe Vaucher, 2011
May 24) Update May 26.
@@ -791,10 +841,6 @@ setpos() does not restore cursor position after :normal. (Tyru, 2010 Aug 11)
file names unique, also support this for 'backupdir'. (Mikolaj Machowski)
Patch by Christian Brabandt, 2010 Oct 21.
getpos()/setpos() don't include curswant. getpos() could return a fifth
element. setpos() could accept an optional fifth element.
Patch by Christian Brabandt, 2010 Sep 6. Again 2013 Aug 22.
With "tw=55 fo+=a" typing space before ) doesn't work well. (Scott Mcdermott,
2010 Oct 24)
@@ -1332,10 +1378,6 @@ Jul 31)
C syntax: {} inside () causes following {} to be highlighted as error.
(Michalis Giannakidis, 2006 Jun 1)
Can't easily close the help window, like ":pc" closes the preview window and
":ccl" closes the quickfix window. Add ":hclose". (Chris Gaal)
Patch for :helpclose, Christian Brabandt, 2010 Sep 6.
When 'diffopt' has "context:0" a single deleted line causes two folds to merge
and mess up syncing. (Austin Jennings, 2008 Jan 31)
@@ -1409,8 +1451,8 @@ files with "foo/**" in 'path'. (Kalisiak, 2006 July 15)
Additional info: When using the |wildcards| ** globing, vim hangs
indefinitely on lots of directories. The |file-searching| globing, like in
":set path=/**" does not hang as often as with globing with |wildcards|, like
in ":1find /**/file". This is for a files that unix "find" can find very
quick. Merging the 2 kinds of globing might make this an easier fix. (Ian
in ":1find /**/file". This is for files that unix "find" can find very
quickly. Merging the 2 kinds of globing might make this an easier fix. (Ian
Kelling, 2008 July 4)
When the file name has parenthesis, e.g., "foo (bar).txt", ":!ls '%'" has the
@@ -1864,6 +1906,10 @@ restored. (Luc St-Louis)
Patch to support horizontal scroll wheel in GTK. Untested. (Bjorn Winckler,
2010 Jun 30)
Add an option for a minimal text length before inserting a line break for
'textwidth'. Avoids very short lines when a very long word follows.
(Kartik Agaram)
At next release:
- Build a huge version by default.
@@ -3031,6 +3077,8 @@ Spell checking:
Diff mode:
9 When making small changes, e.g. deleting a character, update the diff.
Possibly without running diff.
9 Instead invoking an external diff program, use builtin code. One can be
found here: http://www.ioplex.com/~miallen/libmba/dl/src/diff.c
It's quite big and badly documented though.
@@ -3925,7 +3973,6 @@ Autocommands:
when exiting isn't a good idea.
CursorHoldC - CursorHold while command-line editing
WinMoved - when windows have been moved around, e.g, ":wincmd J"
CmdUndefined - Like FuncUndefined but for user commands.
SearchPost - After doing a search command (e.g. to do "M")
PreDirChanged/PostDirChanged
- Before/after ":cd" has been used (for changing the

View File

@@ -1,4 +1,4 @@
*undo.txt* For Vim version 7.4. Last change: 2013 Sep 08
*undo.txt* For Vim version 7.4. Last change: 2014 May 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -97,9 +97,9 @@ change but joins in with the previous change use this command:
or redo.
{not in Vi}
This is most useful when you need to prompt the user halfway a change. For
example in a function that calls |getchar()|. Do make sure that there was a
related change before this that you must join with.
This is most useful when you need to prompt the user halfway through a change.
For example in a function that calls |getchar()|. Do make sure that there was
a related change before this that you must join with.
This doesn't work by itself, because the next key press will start a new
change again. But you can do something like this: >

View File

@@ -1,4 +1,4 @@
*usr_04.txt* For Vim version 7.4. Last change: 2008 Sep 06
*usr_04.txt* For Vim version 7.4. Last change: 2014 Aug 29
VIM USER MANUAL - by Bram Moolenaar
@@ -186,7 +186,7 @@ commands:
/four<Enter> find the first string "four"
cwfive<Esc> change the word to "five"
n find the next "four"
. repeat the change to "five'
. repeat the change to "five"
n find the next "four"
. repeat the change
etc.

View File

@@ -1,4 +1,4 @@
*usr_08.txt* For Vim version 7.4. Last change: 2006 Jul 18
*usr_08.txt* For Vim version 7.4. Last change: 2014 Jul 06
VIM USER MANUAL - by Bram Moolenaar
@@ -532,7 +532,7 @@ window. And you will notice a bar at the top with the two file names:
You now have two tab pages. The first one has a window for "thisfile" and the
second one a window for "thatfile". It's like two pages that are on top of
eachother, with a tab sticking out of each page showing the file name.
each other, with a tab sticking out of each page showing the file name.
Now use the mouse to click on "thisfile" in the top line. The result is

View File

@@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 7.4. Last change: 2014 Apr 05
*usr_41.txt* For Vim version 7.4. Last change: 2014 Aug 16
VIM USER MANUAL - by Bram Moolenaar
@@ -708,6 +708,7 @@ Cursor and mark position: *cursor-functions* *mark-functions*
cursor() position the cursor at a line/column
screencol() get screen column of the cursor
screenrow() get screen row of the cursor
getcurpos() get position of the cursor
getpos() get position of cursor, mark, etc.
setpos() set position of cursor, mark, etc.
byte2line() get line number at a specific byte count
@@ -792,6 +793,7 @@ Command line: *command-line-functions*
getcmdpos() get position of the cursor in the command line
setcmdpos() set position of the cursor in the command line
getcmdtype() return the current command-line type
getcmdwintype() return the current command-line window type
Quickfix and location lists: *quickfix-functions*
getqflist() list of quickfix errors
@@ -826,6 +828,7 @@ Syntax and highlighting: *syntax-functions* *highlighting-functions*
synconcealed() get info about concealing
diff_hlID() get highlight ID for diff mode at a position
matchadd() define a pattern to highlight (a "match")
matchaddpos() define a list of positions to highlight
matcharg() get info about |:match| arguments
matchdelete() delete a match defined by |matchadd()| or a
|:match| command

View File

@@ -1,4 +1,4 @@
*various.txt* For Vim version 7.4. Last change: 2014 May 22
*various.txt* For Vim version 7.4. Last change: 2014 Aug 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -337,6 +337,7 @@ N *+dialog_con* Support for |:confirm| with console dialog.
N *+dialog_con_gui* Support for |:confirm| with GUI and console dialog.
N *+diff* |vimdiff| and 'diff'
N *+digraphs* |digraphs| *E196*
m *+directx* Win32 GUI only: DirectX and |'renderoptions'|
*+dnd* Support for DnD into the "~ register |quote_~|.
B *+emacs_tags* |emacs-tags| files
N *+eval* expression evaluation |eval.txt|

View File

@@ -1,4 +1,4 @@
*version6.txt* For Vim version 7.4. Last change: 2013 Jul 28
*version6.txt* For Vim version 7.4. Last change: 2014 Aug 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -7816,7 +7816,7 @@ Files: src/buffer.c, src/eval.c, src/ex_docmd.c, src/fileio.c,
Patch 6.1.212
Problem: When Vim was started with "-R" ":new" creates a buffer
'noreadonly' while ":enew" has 'readonly' set. (Preben Guldberg)
Solution: Don't set 'readonly in a new empty buffer for ":enew".
Solution: Don't set 'readonly' in a new empty buffer for ":enew".
Files: src/ex_docmd.c
Patch 6.1.213

View File

@@ -1,4 +1,4 @@
*version7.txt* For Vim version 7.4. Last change: 2013 Nov 18
*version7.txt* For Vim version 7.4. Last change: 2014 Aug 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1626,10 +1626,10 @@ and merge it back in.
When running the tests and one of them fails to produce "test.out" the
following tests are still executed. This helps when running out of memory.
When compiling with EXITFREE defined and the ccmalloc library it is possible
to detect memory leaks. Some memory will always reported as leaked, such as
allocated by X11 library functions and the memory allocated in alloc_cmdbuff()
to store the ":quit" command.
When compiling with EXITFREE defined and the ccmalloc library, it is possible
to detect memory leaks. Some memory will always be reported as leaked, such
as allocated by X11 library functions and the memory allocated in
alloc_cmdbuff() to store the ":quit" command.
Moved the code for printing to src/hardcopy.c.
@@ -2038,8 +2038,8 @@ Removed the "COUNT" flag from ":argadd", to avoid ":argadd 1*" to be used like
Avoid that $LANG is used for the menus when LC_MESSAGES is "en_US".
Added backslashes before dashes in the vim.1 manual page to make the appear as
real dashes. (Pierr Habouzit)
Added backslashes before dashes in the vim.1 manual page to make them appear
as real dashes. (Pierr Habouzit)
Where "gq" left the cursor depended on the value of 'formatprg'. Now "gq"
always leaves the cursor at the last line of the formatted text.
@@ -2049,7 +2049,7 @@ detection may try to check the contents of the file while it's still
compressed. Skip setting 'filetype' for compressed files until they have been
decompressed. Required for patterns that end in a "*".
Starting with an argument "+cmd" or "-S script" causes the cursor the be moved
Starting with an argument "+cmd" or "-S script" causes the cursor to be moved
to the first line. That breaks a BufReadPost autocommand that uses g`".
Don't move the cursor if it's somewhere past the first line.
@@ -6485,7 +6485,7 @@ Patch 7.1.282 (extra)
Problem: Win64: Edit with Vim context menu isn't installed correctly.
Compiler warnings and a few other things.
Solution: Add [ and ] to entry of class name. Use UINT_PTR instead of UINT.
And a fixes for the other things. (George V. Reilly)
And fixes for other things. (George V. Reilly)
Files: src/GvimExt/Makefile, src/dosinst.c, src/if_ole.cpp, src/if_ole.h,
src/if_ole.idl, src/INSTALLpc.txt, src/Make_mvc.mak,
src/os_win32.c,
@@ -15783,7 +15783,7 @@ Files: src/if_py_both.h, src/if_python3.c, src/testdir/test86.in,
src/testdir/test87.ok
Patch 7.3.944
Problem: External program receives the termrespone.
Problem: External program receives the termresponse.
Solution: Insert a delay and discard input. (Hayaki Saito)
Files: src/term.c

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2014 Feb 26
" Last Change: 2014 Sep 05
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -530,6 +530,9 @@ au BufNewFile,BufRead configure.in,configure.ac setf config
" CUDA Cumpute Unified Device Architecture
au BufNewFile,BufRead *.cu setf cuda
" Dockerfile
au BufNewFile,BufRead Dockerfile setf dockerfile
" WildPackets EtherPeek Decoder
au BufNewFile,BufRead *.dcd setf dcd
@@ -811,6 +814,9 @@ au BufNewFile,BufRead {,.}gitolite.rc,example.gitolite.rc setf perl
" Gnuplot scripts
au BufNewFile,BufRead *.gpi setf gnuplot
" Go (Google)
au BufNewFile,BufRead *.go setf go
" GrADS scripts
au BufNewFile,BufRead *.gs setf grads
@@ -864,7 +870,7 @@ func! s:FThtml()
setf xhtml
return
endif
if getline(n) =~ '{%\s*\(extends\|block\)\>'
if getline(n) =~ '{%\s*\(extends\|block\|load\)\>'
setf htmldjango
return
endif
@@ -989,7 +995,7 @@ au BufNewFile,BufRead *.java,*.jav setf java
au BufNewFile,BufRead *.jj,*.jjt setf javacc
" JavaScript, ECMAScript
au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx,*.json setf javascript
au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx setf javascript
" Java Server Pages
au BufNewFile,BufRead *.jsp setf jsp
@@ -1007,12 +1013,18 @@ au BufNewFile,BufRead *.jgr setf jgraph
" Jovial
au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial
" JSON
au BufNewFile,BufRead *.json,*.jsonp setf json
" Kixtart
au BufNewFile,BufRead *.kix setf kix
" Kimwitu[++]
au BufNewFile,BufRead *.k setf kwt
" Kivy
au BufNewFile,BufRead *.kv setf kivy
" KDE script
au BufNewFile,BufRead *.ks setf kscript
@@ -1092,6 +1104,9 @@ au BufNewFile,BufRead *.lou,*.lout setf lout
" Lua
au BufNewFile,BufRead *.lua setf lua
" Luarocks
au BufNewFile,BufRead *.rockspec setf lua
" Linden Scripting Language (Second Life)
au BufNewFile,BufRead *.lsl setf lsl
@@ -1139,7 +1154,7 @@ au BufNewFile,BufRead *.map setf map
au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,README.md setf markdown
" Mason
au BufNewFile,BufRead *.mason,*.mhtml setf mason
au BufNewFile,BufRead *.mason,*.mhtml,*.comp setf mason
" Matlab or Objective C
au BufNewFile,BufRead *.m call s:FTm()
@@ -1646,6 +1661,20 @@ else
au BufNewFile,BufRead *.rnw,*.snw setf rnoweb
endif
" R Markdown file
if has("fname_case")
au BufNewFile,BufRead *.Rmd,*.rmd,*.Smd,*.smd setf rmd
else
au BufNewFile,BufRead *.rmd,*.smd setf rmd
endif
" R reStructuredText file
if has("fname_case")
au BufNewFile,BufRead *.Rrst,*.rrst,*.Srst,*.srst setf rrst
else
au BufNewFile,BufRead *.rrst,*.srst setf rrst
endif
" Rexx, Rebol or R
au BufNewFile,BufRead *.r,*.R call s:FTr()
@@ -2294,6 +2323,9 @@ au BufNewFile,BufRead vgrindefs setf vgrindefs
" VRML V1.0c
au BufNewFile,BufRead *.wrl setf vrml
" Vroom (vim testing and executable documentation)
au BufNewFile,BufRead *.vroom setf vroom
" Webmacro
au BufNewFile,BufRead *.wm setf webmacro
@@ -2661,7 +2693,7 @@ au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh')
" Plain text files, needs to be far down to not override others. This avoids
" the "conf" type being used if there is a line starting with '#'.
au BufNewFile,BufRead *.txt,*.text setf text
au BufNewFile,BufRead *.txt,*.text,README setf text
" Use the filetype detect plugins. They may overrule any of the previously

View File

@@ -0,0 +1,16 @@
" Vim filetype plugin
" Language: Dockerfile
" Maintainer: Honza Pokorny <http://honza.ca>
" Last Change: 2014 Aug 29
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
finish
endif
" Don't load another plugin for this buffer
let b:did_ftplugin = 1
let b:undo_ftplugin = "setl commentstring<"
setlocal commentstring=#\ %s

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

@@ -0,0 +1,18 @@
" Vim filetype plugin file
" Language: Go
" Maintainer: David Barnett (https://github.com/google/vim-ft-go)
" Last Change: 2014 Aug 16
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setlocal formatoptions-=t
setlocal comments=s1:/*,mb:*,ex:*/,://
setlocal commentstring=//\ %s
let b:undo_ftplugin = 'setl fo< com< cms<'
" vim: sw=2 sts=2 et

View File

@@ -20,49 +20,9 @@ if exists("g:ft_html_autocomment") && (g:ft_html_autocomment == 1)
setlocal formatoptions-=t formatoptions+=croql
endif
if exists('&omnifunc')
" Distinguish between HTML versions
" To use with other HTML versions add another
" elseif condition to match proper DOCTYPE
setlocal omnifunc=htmlcomplete#CompleteTags
if &filetype == 'xhtml'
let b:html_omni_flavor = 'xhtml10s'
else
let b:html_omni_flavor = 'html401t'
endif
let i = 1
let line = ""
while i < 10 && i < line("$")
let line = getline(i)
if line =~ '<!DOCTYPE.*\<DTD '
break
endif
let i += 1
endwhile
if line =~ '<!DOCTYPE.*\<DTD ' " doctype line found above
if line =~ ' HTML 3\.2'
let b:html_omni_flavor = 'html32'
elseif line =~ ' XHTML 1\.1'
let b:html_omni_flavor = 'xhtml11'
else " two-step detection with strict/frameset/transitional
if line =~ ' XHTML 1\.0'
let b:html_omni_flavor = 'xhtml10'
elseif line =~ ' HTML 4\.01'
let b:html_omni_flavor = 'html401'
elseif line =~ ' HTML 4.0\>'
let b:html_omni_flavor = 'html40'
endif
if line =~ '\<Transitional\>'
let b:html_omni_flavor .= 't'
elseif line =~ '\<Frameset\>'
let b:html_omni_flavor .= 'f'
else
let b:html_omni_flavor .= 's'
endif
endif
endif
setlocal omnifunc=htmlcomplete#CompleteTags
call htmlcomplete#DetectOmniFlavor()
endif
" HTML: thanks to Johannes Zellner and Benji Fisher.

17
runtime/ftplugin/json.vim Normal file
View File

@@ -0,0 +1,17 @@
" Vim filetype plugin
" Language: JSON
" Maintainer: David Barnett <daviebdawg+vim@gmail.com>
" Last Change: 2014 Jul 16
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
let b:undo_ftplugin = 'setlocal formatoptions< comments< commentstring<'
setlocal formatoptions-=t
" JSON has no comments.
setlocal comments=
setlocal commentstring=

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

@@ -0,0 +1,31 @@
" Vim filetype plugin file
" Language: R
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Last Change: Sun Feb 23, 2014 04:07PM
" Only do this when not yet done for this buffer
if exists("b:did_ftplugin")
finish
endif
" Don't load another plugin for this buffer
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal iskeyword=@,48-57,_,.
setlocal formatoptions-=t
setlocal commentstring=#\ %s
setlocal comments=:#',:###,:##,:#
if has("gui_win32") && !exists("b:browsefilter")
let b:browsefilter = "R Source Files (*.R)\t*.R\n" .
\ "Files that include R (*.Rnw *.Rd *.Rmd *.Rrst)\t*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
\ "All Files (*.*)\t*.*\n"
endif
let b:undo_ftplugin = "setl cms< com< fo< isk< | unlet! b:browsefilter"
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -0,0 +1,29 @@
" Vim filetype plugin file
" Language: R help file
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Last Change: Wed Jul 09, 2014 06:23PM
" Only do this when not yet done for this buffer
if exists("b:did_ftplugin")
finish
endif
" Don't load another plugin for this buffer
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal iskeyword=@,48-57,_,.
if has("gui_win32") && !exists("b:browsefilter")
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
\ "All Files (*.*)\t*.*\n"
endif
let b:undo_ftplugin = "setl isk< | unlet! b:browsefilter"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: sw=2

43
runtime/ftplugin/rmd.vim Normal file
View File

@@ -0,0 +1,43 @@
" Vim filetype plugin file
" Language: R help file
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Last Change: Wed Jul 09, 2014 06:23PM
" Original work by Alex Zvoleff (adjusted for rmd by Michel Kuhlmann)
" Only do this when not yet done for this buffer
if exists("b:did_ftplugin")
finish
endif
runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s
setlocal formatoptions+=tcqln
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+
setlocal iskeyword=@,48-57,_,.
let s:cpo_save = &cpo
set cpo&vim
" Enables pandoc if it is installed
unlet! b:did_ftplugin
runtime ftplugin/pandoc.vim
" Don't load another plugin for this buffer
let b:did_ftplugin = 1
if has("gui_win32") && !exists("b:browsefilter")
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
\ "All Files (*.*)\t*.*\n"
endif
if exists('b:undo_ftplugin')
let b:undo_ftplugin .= " | setl cms< com< fo< flp< isk< | unlet! b:browsefilter"
else
let b:undo_ftplugin = "setl cms< com< fo< flp< isk< | unlet! b:browsefilter"
endif
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: sw=2

View File

@@ -0,0 +1,40 @@
" Vim filetype plugin file
" Language: Rnoweb
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Last Change: Wed Jul 09, 2014 06:23PM
" Only do this when not yet done for this buffer
if exists("b:did_ftplugin")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
runtime! ftplugin/tex.vim
" Don't load another plugin for this buffer
let b:did_ftplugin = 1
" Enables Vim-Latex-Suite, LaTeX-Box if installed
runtime ftplugin/tex_*.vim
setlocal iskeyword=@,48-57,_,.
setlocal suffixesadd=.bib,.tex
setlocal comments=b:%,b:#,b:##,b:###,b:#'
if has("gui_win32") && !exists("b:browsefilter")
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
\ "All Files (*.*)\t*.*\n"
endif
if exists('b:undo_ftplugin')
let b:undo_ftplugin .= " | setl isk< sua< com< | unlet! b:browsefilter"
else
let b:undo_ftplugin = "setl isk< sua< com< | unlet! b:browsefilter"
endif
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: sw=2

37
runtime/ftplugin/rrst.vim Normal file
View File

@@ -0,0 +1,37 @@
" Vim filetype plugin file
" Language: reStructuredText documentation format with R code
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Last Change: Wed Jul 09, 2014 06:23PM
" Original work by Alex Zvoleff
" Only do this when not yet done for this buffer
if exists("b:did_ftplugin")
finish
endif
" Don't load another plugin for this buffer
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s
setlocal formatoptions+=tcqln
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+
setlocal iskeyword=@,48-57,_,.
if has("gui_win32") && !exists("b:browsefilter")
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
\ "All Files (*.*)\t*.*\n"
endif
if exists('b:undo_ftplugin')
let b:undo_ftplugin .= " | setl cms< com< fo< flp< isk< | unlet! b:browsefilter"
else
let b:undo_ftplugin = "setl cms< com< fo< flp< isk< | unlet! b:browsefilter"
endif
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: sw=2

17
runtime/ftplugin/text.vim Normal file
View File

@@ -0,0 +1,17 @@
" Vim filetype plugin
" Language: Text
" Maintainer: David Barnett <daviebdawg+vim@gmail.com>
" Last Change: 2014 Jul 09
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
let b:undo_ftplugin = 'setlocal comments< commentstring<'
" We intentionally don't set formatoptions-=t since text should wrap as text.
" Pseudo comment leaders to indent bulleted lists.
setlocal comments=fb:-,fb:*
setlocal commentstring=

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: Vim
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2013 Jun 26
" Last Change: 2014 Sep 07
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -62,9 +62,12 @@ if exists("loaded_matchit")
\ '\<try\>:\<cat\%[ch]\>:\<fina\%[lly]\>:\<endt\%[ry]\>,' .
\ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,' .
\ '(:)'
" Ignore ":syntax region" commands, the 'end' argument clobbers if-endif
let b:match_skip = 'getline(".") =~ "^\\s*sy\\%[ntax]\\s\\+region" ||
\ synIDattr(synID(line("."),col("."),1),"name") =~? "comment\\|string"'
" Ignore syntax region commands and settings, any 'en*' would clobber
" if-endif.
" - set spl=de,en
" - au! FileType javascript syntax region foldBraces start=/{/ end=/}/ …
let b:match_skip = 'synIDattr(synID(line("."),col("."),1),"name")
\ =~? "comment\\|string\\|vimSynReg\\|vimSet"'
endif
let &cpo = s:cpo_save

View File

@@ -0,0 +1,35 @@
" Vim filetype plugin file
" Language: Vroom (vim testing and executable documentation)
" Maintainer: David Barnett (https://github.com/google/vim-ft-vroom)
" Last Change: 2014 Jul 23
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo-=C
let b:undo_ftplugin = 'setlocal formatoptions< shiftwidth< softtabstop<' .
\ ' expandtab< iskeyword< comments< commentstring<'
setlocal formatoptions-=t
" The vroom interpreter doesn't accept anything but 2-space indent.
setlocal shiftwidth=2
setlocal softtabstop=2
setlocal expandtab
" To allow tag lookup and autocomplete for whole autoload functions, '#' must be
" a keyword character. This also conforms to the behavior of ftplugin/vim.vim.
setlocal iskeyword+=#
" Vroom files have no comments (text is inert documentation unless indented).
setlocal comments=
setlocal commentstring=
let &cpo = s:cpo_save
unlet s:cpo_save

78
runtime/indent/go.vim Normal file
View File

@@ -0,0 +1,78 @@
" Vim indent file
" Language: Go
" Maintainer: David Barnett (https://github.com/google/vim-ft-go)
" Last Change: 2014 Aug 16
"
" TODO:
" - function invocations split across lines
" - general line splits (line ends in an operator)
if exists('b:did_indent')
finish
endif
let b:did_indent = 1
" C indentation is too far off useful, mainly due to Go's := operator.
" Let's just define our own.
setlocal nolisp
setlocal autoindent
setlocal indentexpr=GoIndent(v:lnum)
setlocal indentkeys+=<:>,0=},0=)
if exists('*GoIndent')
finish
endif
" The shiftwidth() function is relatively new.
" Don't require it to exist.
if exists('*shiftwidth')
function s:sw() abort
return shiftwidth()
endfunction
else
function s:sw() abort
return &shiftwidth
endfunction
endif
function! GoIndent(lnum)
let l:prevlnum = prevnonblank(a:lnum-1)
if l:prevlnum == 0
" top of file
return 0
endif
" grab the previous and current line, stripping comments.
let l:prevl = substitute(getline(l:prevlnum), '//.*$', '', '')
let l:thisl = substitute(getline(a:lnum), '//.*$', '', '')
let l:previ = indent(l:prevlnum)
let l:ind = l:previ
if l:prevl =~ '[({]\s*$'
" previous line opened a block
let l:ind += s:sw()
endif
if l:prevl =~# '^\s*\(case .*\|default\):$'
" previous line is part of a switch statement
let l:ind += s:sw()
endif
" TODO: handle if the previous line is a label.
if l:thisl =~ '^\s*[)}]'
" this line closed a block
let l:ind -= s:sw()
endif
" Colons are tricky.
" We want to outdent if it's part of a switch ("case foo:" or "default:").
" We ignore trying to deal with jump labels because (a) they're rare, and
" (b) they're hard to disambiguate from a composite literal key.
if l:thisl =~# '^\s*\(case .*\|default\):$'
let l:ind -= s:sw()
endif
return l:ind
endfunction
" vim: sw=2 sts=2 et

File diff suppressed because it is too large Load Diff

168
runtime/indent/json.vim Normal file
View File

@@ -0,0 +1,168 @@
" Vim indent file
" Language: JSON
" Mantainer: Eli Parra <eli@elzr.com> https://github.com/elzr/vim-json
" Last Change: 2014 Aug 29
" https://github.com/jakar/vim-json/commit/20b650e22aa750c4ab6a66aa646bdd95d7cd548a#diff-e81fc111b2052e306d126bd9989f7b7c
" Original Author: Rogerz Zhang <rogerz.zhang at gmail.com> http://github.com/rogerz/vim-json
" Acknowledgement: Based off of vim-javascript maintained by Darrick Wiebe
" http://www.vim.org/scripts/script.php?script_id=2765
" 0. Initialization {{{1
" =================
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal nosmartindent
" Now, set up our indentation expression and keys that trigger it.
setlocal indentexpr=GetJSONIndent()
setlocal indentkeys=0{,0},0),0[,0],!^F,o,O,e
" Only define the function once.
if exists("*GetJSONIndent")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
" 1. Variables {{{1
" ============
let s:line_term = '\s*\%(\%(\/\/\).*\)\=$'
" Regex that defines blocks.
let s:block_regex = '\%({\)\s*\%(|\%([*@]\=\h\w*,\=\s*\)\%(,\s*[*@]\=\h\w*\)*|\)\=' . s:line_term
" 2. Auxiliary Functions {{{1
" ======================
" 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') == 'jsonString'
endfunction
" Find line above 'lnum' that isn't empty, or in a string.
function s:PrevNonBlankNonString(lnum)
let lnum = prevnonblank(a:lnum)
while lnum > 0
" If the line isn't empty or in a string, end search.
let line = getline(lnum)
if !(s:IsInString(lnum, 1) && s:IsInString(lnum, strlen(line)))
break
endif
let lnum = prevnonblank(lnum - 1)
endwhile
return lnum
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
let line = getline(a:lnum)
let pos = match(line, '[][(){}]', 0)
while 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
endif
let pos = match(line, '[][(){}]', pos + 1)
endwhile
return (open_0 > 0) . (open_2 > 0) . (open_4 > 0)
endfunction
function s:Match(lnum, regex)
let col = match(getline(a:lnum), a:regex) + 1
return col > 0 && !s:IsInString(a:lnum, col) ? col : 0
endfunction
" 3. GetJSONIndent Function {{{1
" =========================
function GetJSONIndent()
" 3.1. Setup {{{2
" ----------
" Set up variables for restoring position in file. Could use v:lnum here.
let vcol = col('.')
" 3.2. Work on the current line {{{2
" -----------------------------
" Get the current line.
let line = getline(v:lnum)
let ind = -1
" If we got a closing bracket on an empty line, find its match and indent
" according to it.
let col = matchend(line, '^\s*[]}]')
if col > 0 && !s:IsInString(v:lnum, col)
call cursor(v:lnum, col)
let bs = strpart('{}[]', stridx('}]', line[col - 1]) * 2, 2)
let pairstart = escape(bs[0], '[')
let pairend = escape(bs[1], ']')
let pairline = searchpair(pairstart, '', pairend, 'bW')
if pairline > 0
let ind = indent(pairline)
else
let ind = virtcol('.') - 1
endif
return ind
endif
" If we are in a multi-line string, don't do anything to it.
if s:IsInString(v:lnum, matchend(line, '^\s*') + 1)
return indent('.')
endif
" 3.3. Work on the previous line. {{{2
" -------------------------------
let lnum = prevnonblank(v:lnum - 1)
if lnum == 0
return 0
endif
" Set up variables for current line.
let line = getline(lnum)
let ind = indent(lnum)
" If the previous line ended with a block opening, add a level of indent.
" if s:Match(lnum, s:block_regex)
" return indent(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' || counts[1] == '1' || counts[2] == '1'
return ind + &sw
else
call cursor(v:lnum, vcol)
end
endif
" }}}2
return ind
endfunction
" }}}1
let &cpo = s:cpo_save
unlet s:cpo_save
" vim:set sw=2 sts=2 ts=8 noet:

111
runtime/indent/rhelp.vim Normal file
View File

@@ -0,0 +1,111 @@
" Vim indent file
" Language: R Documentation (Help), *.Rd
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Last Change: Wed Jul 09, 2014 07:34PM
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
runtime indent/r.vim
let s:RIndent = function(substitute(&indentexpr, "()", "", ""))
let b:did_indent = 1
setlocal indentkeys=0{,0},:,!^F,o,O,e
setlocal indentexpr=GetRHelpIndent()
" Only define the function once.
if exists("*GetRHelpIndent")
finish
endif
setlocal noautoindent
setlocal nocindent
setlocal nosmartindent
setlocal nolisp
setlocal indentkeys=0{,0},:,!^F,o,O,e
setlocal indentexpr=GetCorrectRHelpIndent()
function s:SanitizeRHelpLine(line)
let newline = substitute(a:line, '\\\\', "x", "g")
let newline = substitute(newline, '\\{', "x", "g")
let newline = substitute(newline, '\\}', "x", "g")
let newline = substitute(newline, '\\%', "x", "g")
let newline = substitute(newline, '%.*', "", "")
let newline = substitute(newline, '\s*$', "", "")
return newline
endfunction
function GetRHelpIndent()
let clnum = line(".") " current line
if clnum == 1
return 0
endif
let cline = getline(clnum)
if cline =~ '^\s*}\s*$'
let i = clnum
let bb = -1
while bb != 0 && i > 1
let i -= 1
let line = s:SanitizeRHelpLine(getline(i))
let line2 = substitute(line, "{", "", "g")
let openb = strlen(line) - strlen(line2)
let line3 = substitute(line2, "}", "", "g")
let closeb = strlen(line2) - strlen(line3)
let bb += openb - closeb
endwhile
return indent(i)
endif
if cline =~ '^\s*#ifdef\>' || cline =~ '^\s*#endif\>'
return 0
endif
let lnum = clnum - 1
let line = getline(lnum)
if line =~ '^\s*#ifdef\>' || line =~ '^\s*#endif\>'
let lnum -= 1
let line = getline(lnum)
endif
while lnum > 1 && (line =~ '^\s*$' || line =~ '^#ifdef' || line =~ '^#endif')
let lnum -= 1
let line = getline(lnum)
endwhile
if lnum == 1
return 0
endif
let line = s:SanitizeRHelpLine(line)
let line2 = substitute(line, "{", "", "g")
let openb = strlen(line) - strlen(line2)
let line3 = substitute(line2, "}", "", "g")
let closeb = strlen(line2) - strlen(line3)
let bb = openb - closeb
let ind = indent(lnum) + (bb * &sw)
if line =~ '^\s*}\s*$'
let ind = indent(lnum)
endif
if ind < 0
return 0
endif
return ind
endfunction
function GetCorrectRHelpIndent()
let lastsection = search('^\\[a-z]*{', "bncW")
let secname = getline(lastsection)
if secname =~ '^\\usage{' || secname =~ '^\\examples{' || secname =~ '^\\dontshow{' || secname =~ '^\\dontrun{' || secname =~ '^\\donttest{' || secname =~ '^\\testonly{' || secname =~ '^\\method{.*}{.*}('
return s:RIndent()
else
return GetRHelpIndent()
endif
endfunction
" vim: sw=2

46
runtime/indent/rmd.vim Normal file
View File

@@ -0,0 +1,46 @@
" Vim indent file
" Language: Rmd
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Last Change: Wed Jul 09, 2014 07:33PM
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
runtime indent/r.vim
let s:RIndent = function(substitute(&indentexpr, "()", "", ""))
let b:did_indent = 1
setlocal indentkeys=0{,0},:,!^F,o,O,e
setlocal indentexpr=GetRmdIndent()
if exists("*GetRmdIndent")
finish
endif
function GetMdIndent()
let pline = getline(v:lnum - 1)
let cline = getline(v:lnum)
if prevnonblank(v:lnum - 1) < v:lnum - 1 || cline =~ '^\s*[-\+\*]\s' || cline =~ '^\s*\d\+\.\s\+'
return indent(v:lnum)
elseif pline =~ '^\s*[-\+\*]\s'
return indent(v:lnum - 1) + 2
elseif pline =~ '^\s*\d\+\.\s\+'
return indent(v:lnum - 1) + 3
endif
return indent(prevnonblank(v:lnum - 1))
endfunction
function GetRmdIndent()
if getline(".") =~ '^```{r .*}$' || getline(".") =~ '^```$'
return 0
endif
if search('^```{r', "bncW") > search('^```$', "bncW")
return s:RIndent()
else
return GetMdIndent()
endif
endfunction
" vim: sw=2

35
runtime/indent/rnoweb.vim Normal file
View File

@@ -0,0 +1,35 @@
" Vim indent file
" Language: Rnoweb
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Last Change: Wed Jul 09, 2014 07:28PM
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
runtime indent/tex.vim
let s:TeXIndent = function(substitute(&indentexpr, "()", "", ""))
unlet b:did_indent
runtime indent/r.vim
let s:RIndent = function(substitute(&indentexpr, "()", "", ""))
let b:did_indent = 1
setlocal indentkeys=0{,0},!^F,o,O,e,},=\bibitem,=\item
setlocal indentexpr=GetRnowebIndent()
if exists("*GetRnowebIndent")
finish
endif
function GetRnowebIndent()
if getline(".") =~ "^<<.*>>=$"
return 0
endif
if search("^<<", "bncW") > search("^@", "bncW")
return s:RIndent()
endif
return s:TeXIndent()
endfunction
" vim: sw=2

46
runtime/indent/rrst.vim Normal file
View File

@@ -0,0 +1,46 @@
" Vim indent file
" Language: Rrst
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Last Change: Wed Jul 09, 2014 07:33PM
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
runtime indent/r.vim
let s:RIndent = function(substitute(&indentexpr, "()", "", ""))
let b:did_indent = 1
setlocal indentkeys=0{,0},:,!^F,o,O,e
setlocal indentexpr=GetRrstIndent()
if exists("*GetRrstIndent")
finish
endif
function GetRstIndent()
let pline = getline(v:lnum - 1)
let cline = getline(v:lnum)
if prevnonblank(v:lnum - 1) < v:lnum - 1 || cline =~ '^\s*[-\+\*]\s' || cline =~ '^\s*\d\+\.\s\+'
return indent(v:lnum)
elseif pline =~ '^\s*[-\+\*]\s'
return indent(v:lnum - 1) + 2
elseif pline =~ '^\s*\d\+\.\s\+'
return indent(v:lnum - 1) + 3
endif
return indent(prevnonblank(v:lnum - 1))
endfunction
function GetRrstIndent()
if getline(".") =~ '^\.\. {r .*}$' || getline(".") =~ '^\.\. \.\.$'
return 0
endif
if search('^\.\. {r', "bncW") > search('^\.\. \.\.$', "bncW")
return s:RIndent()
else
return GetRstIndent()
endif
endfunction
" vim: sw=2

View File

@@ -2,7 +2,7 @@
" Language: Shell Script
" Maintainer: Peter Aronoff <telemachus@arpinum.org>
" Original Author: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2013-11-28
" Latest Revision: 2014-08-22
if exists("b:did_indent")
finish
@@ -91,7 +91,9 @@ function! GetShIndent()
if s:is_case(pine)
let ind = indent(lnum) + s:indent_value('case-labels')
else
let ind -= s:indent_value('case-statements') - s:indent_value('case-breaks')
let ind -= (s:is_case_label(pine, lnum) && s:is_case_ended(pine) ?
\ 0 : s:indent_value('case-statements')) -
\ s:indent_value('case-breaks')
endif
elseif s:is_case_break(line)
let ind -= s:indent_value('case-breaks')

21
runtime/indent/vroom.vim Normal file
View File

@@ -0,0 +1,21 @@
" Vim indent file
" Language: Vroom (vim testing and executable documentation)
" Maintainer: David Barnett (https://github.com/google/vim-ft-vroom)
" Last Change: 2014 Jul 23
if exists('b:did_indent')
finish
endif
let b:did_indent = 1
let s:cpo_save = &cpo
set cpo-=C
let b:undo_indent = 'setlocal autoindent<'
setlocal autoindent
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -2,7 +2,7 @@
" You can also use this as a start for your own set of menus.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2013 May 17
" Last Change: 2014 May 22
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
" in all modes and avoid side effects from mappings defined by the user.
@@ -477,6 +477,7 @@ if has("folding")
an 40.340.110 &Tools.&Folding.&Enable/Disable\ folds<Tab>zi zi
an 40.340.120 &Tools.&Folding.&View\ Cursor\ Line<Tab>zv zv
an 40.340.120 &Tools.&Folding.Vie&w\ Cursor\ Line\ only<Tab>zMzx zMzx
inoremenu 40.340.120 &Tools.&Folding.Vie&w\ Cursor\ Line\ only<Tab>zMzx <C-O>zM<C-O>zx
an 40.340.130 &Tools.&Folding.C&lose\ more\ folds<Tab>zm zm
an 40.340.140 &Tools.&Folding.&Close\ all\ folds<Tab>zM zM
an 40.340.150 &Tools.&Folding.O&pen\ more\ folds<Tab>zr zr

View File

@@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2014 Apr 01
" Last Change: 2014 Aug 06
" If there already is an option window, jump to that one.
if bufwinnr("option-window") > 0
@@ -324,6 +324,12 @@ call <SID>BinOptionG("wrap", &wrap)
call append("$", "linebreak\twrap long lines at a character in 'breakat'")
call append("$", "\t(local to window)")
call <SID>BinOptionL("lbr")
call append("$", "breakindent\tpreserve indentation in wrapped text")
call append("$", "\t(local to window)")
call <SID>BinOptionL("bri")
call append("$", "breakindentopt\tadjust breakindent behaviour")
call append("$", "\t(local to window)")
call <SID>OptionL("briopt")
call append("$", "breakat\twhich characters might cause a line break")
call <SID>OptionG("brk", &brk)
call append("$", "showbreak\tstring to put before wrapped screen lines")
@@ -600,6 +606,10 @@ if has("gui")
call append("$", "guiheadroom\troom (in pixels) left above/below the window")
call append("$", " \tset ghr=" . &ghr)
endif
if has("directx")
call append("$", "renderoptions\toptions for text rendering")
call <SID>OptionG("rop", &rop)
endif
call append("$", "guipty\tuse a pseudo-tty for I/O to external commands")
call <SID>BinOptionG("guipty", &guipty)
if has("browse")

View File

@@ -1,6 +1,6 @@
" Vim plugin for showing matching parens
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2013 May 08
" Last Change: 2014 Jul 19
" Exit quickly when:
" - this plugin was already loaded (or disabled)
@@ -39,7 +39,7 @@ set cpo-=C
function! s:Highlight_Matching_Pair()
" Remove any previous match.
if exists('w:paren_hl_on') && w:paren_hl_on
3match none
silent! call matchdelete(3)
let w:paren_hl_on = 0
endif
@@ -54,14 +54,15 @@ function! s:Highlight_Matching_Pair()
let c_col = col('.')
let before = 0
let c = getline(c_lnum)[c_col - 1]
let text = getline(c_lnum)
let c = text[c_col - 1]
let plist = split(&matchpairs, '.\zs[:,]')
let i = index(plist, c)
if i < 0
" not found, in Insert mode try character before the cursor
if c_col > 1 && (mode() == 'i' || mode() == 'R')
let before = 1
let c = getline(c_lnum)[c_col - 2]
let c = text[c_col - 2]
let i = index(plist, c)
endif
if i < 0
@@ -87,14 +88,27 @@ function! s:Highlight_Matching_Pair()
" Find the match. When it was just before the cursor move it there for a
" moment.
if before > 0
let save_cursor = winsaveview()
let has_getcurpos = exists("*getcurpos")
if has_getcurpos
" getcurpos() is more efficient but doesn't exist before 7.4.313.
let save_cursor = getcurpos()
else
let save_cursor = winsaveview()
endif
call cursor(c_lnum, c_col - before)
endif
" When not in a string or comment ignore matches inside them.
" Build an expression that detects whether the current cursor position is in
" certain syntax types (string, comment, etc.), for use as searchpairpos()'s
" skip argument.
" We match "escape" for special items, such as lispEscapeSpecial.
let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' .
\ '=~? "string\\|character\\|singlequote\\|escape\\|comment"'
let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' .
\ '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))'
" If executing the expression determines that the cursor is currently in
" one of the syntax types, then we want searchpairpos() to find the pair
" within those syntax types (i.e., not skip). Otherwise, the cursor is
" outside of the syntax types and s_skip should keep its value so we skip any
" matching pair inside the syntax types.
execute 'if' s_skip '| let s_skip = 0 | endif'
" Limit the search to lines visible in the window.
@@ -147,19 +161,27 @@ function! s:Highlight_Matching_Pair()
endtry
if before > 0
call winrestview(save_cursor)
if has_getcurpos
call setpos('.', save_cursor)
else
call winrestview(save_cursor)
endif
endif
" If a match is found setup match highlighting.
if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom
exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) .
\ 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/'
if exists('*matchaddpos')
call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3)
else
exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) .
\ 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/'
endif
let w:paren_hl_on = 1
endif
endfunction
" Define commands that will disable and enable the plugin.
command! NoMatchParen windo 3match none | unlet! g:loaded_matchparen |
command! NoMatchParen windo silent! call matchdelete(3) | unlet! g:loaded_matchparen |
\ au! matchparen
command! DoMatchParen runtime plugin/matchparen.vim | windo doau CursorMoved

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types in scripts
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2013 May 24
" Last change: 2014 Aug 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
@@ -319,6 +319,10 @@ else
elseif s:line1 =~ '^==\d\+== valgrind' || s:line3 =~ '^==\d\+== Using valgrind'
set ft=valgrind
" Go docs
elseif s:line1 =~ '^PACKAGE DOCUMENTATION$'
set ft=godoc
" Renderman Interface Bytestream
elseif s:line1 =~ '^##RenderMan'
set ft=rib

View File

@@ -2,7 +2,7 @@
" This file is normally sourced from menu.vim.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2013 Jun 24
" Last Change: 2014 Aug 13
" Define the SetSyn function, used for the Syntax menu entries.
" Set 'filetype' and also 'syntax' if it is manually selected.
@@ -326,6 +326,7 @@ an 50.70.270 &Syntax.M.Messages\ (/var/log) :cal SetSyn("messages")<CR>
an 50.70.280 &Syntax.M.Metafont :cal SetSyn("mf")<CR>
an 50.70.290 &Syntax.M.MetaPost :cal SetSyn("mp")<CR>
an 50.70.300 &Syntax.M.MGL :cal SetSyn("mgl")<CR>
an 50.70.305 &Syntax.M.MIX :cal SetSyn("mix")<CR>
an 50.70.310 &Syntax.M.MMIX :cal SetSyn("mmix")<CR>
an 50.70.320 &Syntax.M.Modconf :cal SetSyn("modconf")<CR>
an 50.70.330 &Syntax.M.Model :cal SetSyn("model")<CR>

View File

@@ -5,6 +5,7 @@
" URL: http://asciidoc.org/
" Licence: GPL (http://www.gnu.org)
" Remarks: Vim 6 or greater
" Last Update: 2014 Aug 29 (see Issue 240)
" Limitations:
"
" - Nested quoted text formatting is highlighted according to the outer
@@ -155,7 +156,8 @@ hi def link asciidocQuotedAttributeList Special
hi def link asciidocQuotedBold Special
hi def link asciidocQuotedDoubleQuoted Label
hi def link asciidocQuotedEmphasized2 Type
hi def link asciidocQuotedEmphasized Type
hi asciidocQuotedEmphasizedItalic term=italic cterm=italic gui=italic
hi def link asciidocQuotedEmphasized asciidocQuotedEmphasizedItalic
hi def link asciidocQuotedMonospaced2 Identifier
hi def link asciidocQuotedMonospaced Identifier
hi def link asciidocQuotedSingleQuoted Label

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2013 Jul 05
" Last Change: 2014 May 26
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -322,6 +322,9 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
syn keyword cConstant SEEK_CUR SEEK_END SEEK_SET
syn keyword cConstant TMP_MAX stderr stdin stdout
syn keyword cConstant EXIT_FAILURE EXIT_SUCCESS RAND_MAX
" POSIX 2001
syn keyword cConstant SIGBUS SIGPOLL SIGPROF SIGSYS SIGURG
syn keyword cConstant SIGVTALRM SIGXCPU SIGXFSZ
" Add POSIX errors as well
syn keyword cConstant E2BIG EACCES EAGAIN EBADF EBADMSG EBUSY
syn keyword cConstant ECANCELED ECHILD EDEADLK EDOM EEXIST EFAULT

View File

@@ -3,7 +3,7 @@
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
" Last Change: 2014 Jan 20
" Last Change: 2014 Jul 11
" URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debchangelog.vim
" Standard syntax initialization
@@ -19,7 +19,7 @@ syn case ignore
" Define some common expressions we can use later on
syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ "
syn match debchangelogUrgency contained "; urgency=\(low\|medium\|high\|critical\|emergency\)\( \S.*\)\="
syn match debchangelogTarget contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile)|wheezy-backports|%(lucid|precise|quantal|saucy|trusty)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
syn match debchangelogTarget contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile)|wheezy-backports|%(devel|lucid|precise|trusty|utopic)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
syn match debchangelogVersion contained "(.\{-})"
syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*"

View File

@@ -3,7 +3,7 @@
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
" Last Change: 2013 Oct 28
" Last Change: 2014 May 01
" URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debcontrol.vim
" Standard syntax initialization
@@ -13,6 +13,9 @@ elseif exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
" Should match case except for the keys of each field
syn case match
@@ -23,8 +26,17 @@ syn match debcontrolElse "^.*$"
syn match debControlComma ", *"
syn match debControlSpace " "
let s:kernels = '\%(linux\|hurd\|kfreebsd\|knetbsd\|kopensolaris\|netbsd\)'
let s:archs = '\%(alpha\|amd64\|armeb\|armel\|armhf\|arm64\|avr32\|hppa\|i386'
\ . '\|ia64\|lpia\|m32r\|m68k\|mipsel\|mips\|powerpcspe\|powerpc\|ppc64el'
\ . '\|ppc64\|s390x\|s390\|sh3eb\|sh3\|sh4eb\|sh4\|sh\|sparc64\|sparc\|x32\)'
let s:pairs = 'hurd-i386\|kfreebsd-i386\|kfreebsd-amd64\|knetbsd-i386\|kopensolaris-i386\|netbsd-alpha\|netbsd-i386'
" Define some common expressions we can use later on
syn match debcontrolArchitecture contained "\%(all\|linux-any\|\%(any-\)\=\%(alpha\|amd64\|arm\%(e[bl]\|hf\|64\)\=\|avr32\|hppa\|i386\|ia64\|lpia\|m32r\|m68k\|mips\%(el\)\=\|powerpc\%(spe\)\=\|ppc64\|s390x\=\|sh[34]\(eb\)\=\|sh\|sparc\%(64\)\=\)\|x32\|hurd-\%(i386\|any\)\|kfreebsd-\%(i386\|amd64\|any\)\|knetbsd-\%(i386\|any\)\|kopensolaris-\%(i386\|any\)\|netbsd-\%(alpha\|i386\|any\)\|any\)"
exe 'syn match debcontrolArchitecture contained "\%(all\|'. s:kernels .'-any\|\%(any-\)\='. s:archs .'\|'. s:pairs .'\|any\)"'
unlet s:kernels s:archs s:pairs
syn match debcontrolMultiArch contained "\%(no\|foreign\|allowed\|same\)"
syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+"
syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)"
@@ -108,4 +120,7 @@ endif
let b:current_syntax = "debcontrol"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ts=8 sw=2

View File

@@ -2,7 +2,7 @@
" Language: Debian sources.list
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
" Last Change: 2014 Jan 20
" Last Change: 2014 Jul 11
" URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debsources.vim
" Standard syntax initialization
@@ -23,7 +23,7 @@ syn match debsourcesComment /#.*/ contains=@Spell
" Match uri's
syn match debsourcesUri +\(http://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++
syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(squeeze\|wheezy\|\(old\)\=stable\|testing\|unstable\|sid\|rc-buggy\|experimental\|lucid\|precise\|quantal\|saucy\|trusty\)\([-[:alnum:]_./]*\)+
syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(squeeze\|wheezy\|jessie\|\(old\)\=stable\|testing\|unstable\|sid\|rc-buggy\|experimental\|devel\|lucid\|precise\|trusty\|utopic\)\([-[:alnum:]_./]*\)+
" Associate our matches and regions with pretty colours
hi def link debsourcesLine Error

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Django template
" Maintainer: Dave Hodder <dmh@dmh.org.uk>
" Last Change: 2012 Apr 09
" Last Change: 2014 Jul 13
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -64,7 +64,7 @@ syn region djangoTagBlock start="{%" end="%}" contains=djangoStatement,djangoFil
syn region djangoVarBlock start="{{" end="}}" contains=djangoFilter,djangoArgument,djangoVarError display
" Django template 'comment' tag and comment block
syn region djangoComment start="{%\s*comment\s*%}" end="{%\s*endcomment\s*%}" contains=djangoTodo
syn region djangoComment start="{%\s*comment\(\s\+.\{-}\)\?%}" end="{%\s*endcomment\s*%}" contains=djangoTodo
syn region djangoComBlock start="{#" end="#}" contains=djangoTodo
" Define the default highlighting.

View File

@@ -0,0 +1,24 @@
" dockerfile.vim - Syntax highlighting for Dockerfiles
" Maintainer: Honza Pokorny <http://honza.ca>
" Version: 0.5
" Last Change: 2014 Aug 29
" License: BSD
if exists("b:current_syntax")
finish
endif
let b:current_syntax = "dockerfile"
syntax case ignore
syntax match dockerfileKeyword /\v^\s*(ONBUILD\s+)?(ADD|CMD|ENTRYPOINT|ENV|EXPOSE|FROM|MAINTAINER|RUN|USER|VOLUME|WORKDIR|COPY)\s/
syntax region dockerfileString start=/\v"/ skip=/\v\\./ end=/\v"/
syntax match dockerfileComment "\v^\s*#.*$"
hi def link dockerfileString String
hi def link dockerfileKeyword Keyword
hi def link dockerfileComment Comment

View File

@@ -1,176 +1,505 @@
" Vim syntax file
" Language: gnuplot 3.8i.0
" Maintainer: John Hoelzel johnh51@users.sourceforge.net
" Last Change: Mon May 26 02:33:33 UTC 2003
" Filenames: *.gpi *.gih scripts: #!*gnuplot
" URL: http://johnh51.get.to/vim/syntax/gnuplot.vim
"
" Language: gnuplot 4.7.0
" Maintainer: Andrew Rasmussen andyras@users.sourceforge.net
" Original Maintainer: John Hoelzel johnh51@users.sourceforge.net
" Last Change: 2014-02-24
" Filenames: *.gnu *.plt *.gpi *.gih *.gp *.gnuplot scripts: #!*gnuplot
" URL: http://www.vim.org/scripts/script.php?script_id=4873
" Original URL: http://johnh51.get.to/vim/syntax/gnuplot.vim
" thanks to "David Necas (Yeti)" <yeti@physics.muni.cz> for heads up - working on more changes .
" *.gpi = GnuPlot Input - what I use because there is no other guideline. jeh 11/2000
" *.gih = makes using cut/pasting from gnuplot.gih easier ...
" #!*gnuplot = for Linux bash shell scripts of gnuplot commands.
" emacs used a suffix of '<gp?>'
" gnuplot demo files show no preference.
" I will post mail and newsgroup comments on a standard suffix in 'URL' directory.
" thanks to "David Necas (Yeti)" <yeti@physics.muni.cz>
" credit also to Jim Eberle <jim.eberle@fastnlight.com>
" for the script http://www.vim.org/scripts/script.php?script_id=1737
" some shortened names to make demo files look clean... jeh. 11/2000
" demos -> 3.8i ... jeh. 5/2003 - a work in progress...
" added current commands, keywords, variables, todos, macros... amr 2014-02-24
" For vim version 5.x: Clear all syntax items
" For vim version 6.x: Quit when a syntax file was already loaded
" 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")
finish
endif
" some shortened names to make demo files look clean... jeh. 11/2000
" demos -> 3.8i ... jeh. 5/2003 - a work in progress...
" ---- Special characters ---- "
" commands
" no harm in just matching any \[char] within double quotes, right?
syn match gnuplotSpecial "\\." contained
" syn match gnuplotSpecial "\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[a-z\\]" contained
syn keyword gnuplotStatement cd call clear exit set unset plot splot help
syn keyword gnuplotStatement load pause quit fit rep[lot] if
syn keyword gnuplotStatement FIT_LIMIT FIT_MAXITER FIT_START_LAMBDA
syn keyword gnuplotStatement FIT_LAMBDA_FACTOR FIT_LOG FIT_SCRIPT
syn keyword gnuplotStatement print pwd reread reset save show test ! functions var
syn keyword gnuplotConditional if
" if is cond + stmt - ok?
" measurements in the units in, cm and pt are special
syn match gnuplotUnit "[0-9]+in"
syn match gnuplotUnit "[0-9]+cm"
syn match gnuplotUnit "[0-9]+pt"
" numbers fm c.vim
" external (shell) commands are special
syn region gnuplotExternal start="!" end="$"
" integer number, or floating point number without a dot and with "f".
" ---- Comments ---- "
syn region gnuplotComment start="#" end="$" contains=gnuplotTodo
" ---- Constants ---- "
" strings
syn region gnuplotString start=+"+ skip=+\\"+ end=+"+ contains=gnuplotSpecial
syn region gnuplotString start="'" end="'"
" built-in variables
syn keyword gnuplotNumber GNUTERM GPVAL_TERM GPVAL_TERMOPTIONS GPVAL_SPLOT
syn keyword gnuplotNumber GPVAL_OUTPUT GPVAL_ENCODING GPVAL_VERSION
syn keyword gnuplotNumber GPVAL_PATCHLEVEL GPVAL_COMPILE_OPTIONS
syn keyword gnuplotNumber GPVAL_MULTIPLOT GPVAL_PLOT GPVAL_VIEW_ZSCALE
syn keyword gnuplotNumber GPVAL_TERMINALS GPVAL_pi GPVAL_NaN
syn keyword gnuplotNumber GPVAL_ERRNO GPVAL_ERRMSG GPVAL_PWD
syn keyword gnuplotNumber pi NaN GPVAL_LAST_PLOT GPVAL_TERM_WINDOWID
syn keyword gnuplotNumber GPVAL_X_MIN GPVAL_X_MAX GPVAL_X_LOG
syn keyword gnuplotNumber GPVAL_DATA_X_MIN GPVAL_DATA_X_MAX GPVAL_Y_MIN
syn keyword gnuplotNumber GPVAL_Y_MAX GPVAL_Y_LOG GPVAL_DATA_Y_MIN
syn keyword gnuplotNumber GPVAL_DATA_Y_MAX GPVAL_X2_MIN GPVAL_X2_MAX
syn keyword gnuplotNumber GPVAL_X2_LOG GPVAL_DATA_X2_MIN GPVAL_DATA_X2_MAX
syn keyword gnuplotNumber GPVAL_Y2_MIN GPVAL_Y2_MAX GPVAL_Y2_LOG
syn keyword gnuplotNumber GPVAL_DATA_Y2_MIN GPVAL_DATA_Y2_MAX GPVAL_Z_MIN
syn keyword gnuplotNumber GPVAL_Z_MAX GPVAL_Z_LOG GPVAL_DATA_Z_MIN
syn keyword gnuplotNumber GPVAL_DATA_Z_MAX GPVAL_CB_MIN GPVAL_CB_MAX
syn keyword gnuplotNumber GPVAL_CB_LOG GPVAL_DATA_CB_MIN GPVAL_DATA_CB_MAX
syn keyword gnuplotNumber GPVAL_T_MIN GPVAL_T_MAX GPVAL_T_LOG GPVAL_U_MIN
syn keyword gnuplotNumber GPVAL_U_MAX GPVAL_U_LOG GPVAL_V_MIN GPVAL_V_MAX
syn keyword gnuplotNumber GPVAL_V_LOG GPVAL_R_MIN GPVAL_R_LOG
syn keyword gnuplotNumber GPVAL_TERM_XMIN GPVAL_TERM_XMAX GPVAL_TERM_YMIN
syn keyword gnuplotNumber GPVAL_TERM_YMAX GPVAL_TERM_XSIZE
syn keyword gnuplotNumber GPVAL_TERM_YSIZE GPVAL_VIEW_MAP GPVAL_VIEW_ROT_X
syn keyword gnuplotNumber GPVAL_VIEW_ROT_Z GPVAL_VIEW_SCALE
" function name variables
syn match gnuplotNumber "GPFUN_[a-zA-Z_]*"
" stats variables
syn keyword gnuplotNumber STATS_records STATS_outofrange STATS_invalid
syn keyword gnuplotNumber STATS_blank STATS_blocks STATS_columns STATS_min
syn keyword gnuplotNumber STATS_max STATS_index_min STATS_index_max
syn keyword gnuplotNumber STATS_lo_quartile STATS_median STATS_up_quartile
syn keyword gnuplotNumber STATS_mean STATS_stddev STATS_sum STATS_sumsq
syn keyword gnuplotNumber STATS_correlation STATS_slope STATS_intercept
syn keyword gnuplotNumber STATS_sumxy STATS_pos_min_y STATS_pos_max_y
syn keyword gnuplotNumber STATS_mean STATS_stddev STATS_mean_x STATS_sum_x
syn keyword gnuplotNumber STATS_stddev_x STATS_sumsq_x STATS_min_x
syn keyword gnuplotNumber STATS_max_x STATS_median_x STATS_lo_quartile_x
syn keyword gnuplotNumber STATS_up_quartile_x STATS_index_min_x
syn keyword gnuplotNumber STATS_index_max_x STATS_mean_y STATS_stddev_y
syn keyword gnuplotNumber STATS_sum_y STATS_sumsq_y STATS_min_y
syn keyword gnuplotNumber STATS_max_y STATS_median_y STATS_lo_quartile_y
syn keyword gnuplotNumber STATS_up_quartile_y STATS_index_min_y
syn keyword gnuplotNumber STATS_index_max_y STATS_correlation STATS_sumxy
" deprecated fit variables
syn keyword gnuplotError FIT_LIMIT FIT_MAXITER FIT_START_LAMBDA
syn keyword gnuplotError FIT_LAMBDA_FACTOR FIT_LOG FIT_SCRIPT
" numbers, from c.vim
" integer number, or floating point number without a dot and with "f".
syn case ignore
syn match gnuplotNumber "\<[0-9]\+\(u\=l\=\|lu\|f\)\>"
" floating point number, with dot, optional exponent
" floating point number, with dot, optional exponent
syn match gnuplotFloat "\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=[fl]\=\>"
" floating point number, starting with a dot, optional exponent
" floating point number, starting with a dot, optional exponent
syn match gnuplotFloat "\.[0-9]\+\(e[-+]\=[0-9]\+\)\=[fl]\=\>"
" floating point number, without dot, with exponent
" floating point number, without dot, with exponent
syn match gnuplotFloat "\<[0-9]\+e[-+]\=[0-9]\+[fl]\=\>"
" hex number
" hex number
syn match gnuplotNumber "\<0x[0-9a-f]\+\(u\=l\=\|lu\)\>"
syn case match
" flag an octal number with wrong digits by not hilighting
" flag an octal number with wrong digits by not highlighting
syn match gnuplotOctalError "\<0[0-7]*[89]"
" plot args
" ---- Identifiers: Functions ---- "
syn keyword gnuplotType u[sing] tit[le] notit[le] wi[th] steps fs[teps]
syn keyword gnuplotType title notitle t
syn keyword gnuplotType with w
syn keyword gnuplotType li[nes] l
" t - too much? w - too much? l - too much?
syn keyword gnuplotType linespoints via
" numerical functions
syn keyword gnuplotFunc abs acos acosh airy arg asin asinh atan atan2
syn keyword gnuplotFunc atanh EllipticK EllipticE EllipticPi besj0 besj1
syn keyword gnuplotFunc besy0 besy1 ceil cos cosh erf erfc exp expint
syn keyword gnuplotFunc floor gamma ibeta inverf igamma imag invnorm int
syn keyword gnuplotFunc lambertw lgamma log log10 norm rand real sgn sin
syn keyword gnuplotFunc sin sinh sqrt tan tanh voigt
" funcs
" string functions
syn keyword gnuplotFunc gprintf sprintf strlen strstrt substr strftime
syn keyword gnuplotFunc strptime system word words
syn keyword gnuplotFunc abs acos acosh arg asin asinh atan atanh atan2
syn keyword gnuplotFunc besj0 besj1 besy0 besy1
syn keyword gnuplotFunc ceil column cos cosh erf erfc exp floor gamma
syn keyword gnuplotFunc ibeta inverf igamma imag invnorm int lgamma
syn keyword gnuplotFunc log log10 norm rand real sgn sin sinh sqrt tan
syn keyword gnuplotFunc lambertw
syn keyword gnuplotFunc tanh valid
syn keyword gnuplotFunc tm_hour tm_mday tm_min tm_mon tm_sec
syn keyword gnuplotFunc tm_wday tm_yday tm_year
" other functions
syn keyword gnuplotFunc column columnhead columnheader defined exists
syn keyword gnuplotFunc hsv2rgb stringcolumn timecolumn tm_hour tm_mday
syn keyword gnuplotFunc tm_min tm_mon tm_sec tm_wday tm_yday tm_year
syn keyword gnuplotFunc time valid value
" set vars
" ---- Statements ---- "
syn keyword gnuplotType xdata timefmt grid noytics ytics fs
syn keyword gnuplotType logscale time notime mxtics nomxtics style mcbtics
syn keyword gnuplotType nologscale
syn keyword gnuplotType axes x1y2 unique acs[plines]
syn keyword gnuplotType size origin multiplot xtics xr[ange] yr[ange] square nosquare ratio noratio
syn keyword gnuplotType binary matrix index every thru sm[ooth]
syn keyword gnuplotType all angles degrees radians
syn keyword gnuplotType arrow noarrow autoscale noautoscale arrowstyle
" autoscale args = x y xy z t ymin ... - too much?
" needs code to: using title vs autoscale t
syn keyword gnuplotType x y z zcb
syn keyword gnuplotType linear cubicspline bspline order level[s]
syn keyword gnuplotType auto disc[rete] incr[emental] from to head nohead
syn keyword gnuplotType graph base both nosurface table out[put] data
syn keyword gnuplotType bar border noborder boxwidth
syn keyword gnuplotType clabel noclabel clip noclip cntrp[aram]
syn keyword gnuplotType contour nocontour
syn keyword gnuplotType dgrid3d nodgrid3d dummy encoding format
" set encoding args not included - yet.
syn keyword gnuplotType function grid nogrid hidden[3d] nohidden[3d] isosample[s] key nokey
syn keyword gnuplotType historysize nohistorysize
syn keyword gnuplotType defaults offset nooffset trianglepattern undefined noundefined altdiagonal bentover noaltdiagonal nobentover
syn keyword gnuplotType left right top bottom outside below samplen spacing width height box nobox linestyle ls linetype lt linewidth lw
syn keyword gnuplotType Left Right autotitles noautotitles enhanced noenhanced
syn keyword gnuplotType isosamples
syn keyword gnuplotType label nolabel logscale nolog[scale] missing center font locale
syn keyword gnuplotType mapping margin bmargin lmargin rmargin tmargin spherical cylindrical cartesian
syn keyword gnuplotType linestyle nolinestyle linetype lt linewidth lw pointtype pt pointsize ps
syn keyword gnuplotType mouse nomouse
syn keyword gnuplotType nooffsets data candlesticks financebars linespoints lp vector nosurface
syn keyword gnuplotType term[inal] linux aed767 aed512 gpic
syn keyword gnuplotType regis tek410x tek40 vttek kc-tek40xx
syn keyword gnuplotType km-tek40xx selanar bitgraph xlib x11 X11
" x11 args
syn keyword gnuplotType aifm cgm dumb fig gif small large size nofontlist winword6 corel dxf emf
syn keyword gnuplotType hpgl
" syn keyword gnuplotType transparent hp2623a hp2648 hp500c pcl5 why jeh
syn keyword gnuplotType hp2623a hp2648 hp500c pcl5
syn match gnuplotType "\<transparent\>"
syn keyword gnuplotType hpljii hpdj hppj imagen mif pbm png svg
syn keyword gnuplotType postscript enhanced_postscript qms table
" postscript editing values?
syn keyword gnuplotType tgif tkcanvas epson-180dpi epson-60dpi
syn keyword gnuplotType epson-lx800 nec-cp6 okidata starc
syn keyword gnuplotType tandy-60dpi latex emtex pslatex pstex epslatex
syn keyword gnuplotType eepic tpic pstricks texdraw mf metafont mpost mp
syn keyword gnuplotType timestamp notimestamp
syn keyword gnuplotType variables version
syn keyword gnuplotType x2data y2data ydata zdata
syn keyword gnuplotType reverse writeback noreverse nowriteback
syn keyword gnuplotType axis mirror autofreq nomirror rotate autofreq norotate
syn keyword gnuplotType update
syn keyword gnuplotType multiplot nomultiplot mytics
syn keyword gnuplotType nomytics mztics nomztics mx2tics nomx2tics
syn keyword gnuplotType my2tics nomy2tics offsets origin output
syn keyword gnuplotType para[metric] nopara[metric] pointsize polar nopolar
syn keyword gnuplotType zrange x2range y2range rrange cbrange
syn keyword gnuplotType trange urange vrange sample[s] size
syn keyword gnuplotType bezier boxerrorbars boxes bargraph bar[s]
syn keyword gnuplotType boxxy[errorbars] csplines dots fsteps histeps impulses
syn keyword gnuplotType line[s] linesp[oints] points poiinttype sbezier splines steps
" w lt lw ls = optional
syn keyword gnuplotType vectors xerr[orbars] xyerr[orbars] yerr[orbars] financebars candlesticks vector
syn keyword gnuplotType errorb[ars] surface
syn keyword gnuplotType filledcurve[s] pm3d x1 x2 y1 y2 xy closed
syn keyword gnuplotType at pi front
syn keyword gnuplotType errorlines xerrorlines yerrorlines xyerrorlines
syn keyword gnuplotType tics ticslevel ticscale time timefmt view
syn keyword gnuplotType xdata xdtics noxdtics ydtics noydtics
syn keyword gnuplotType zdtics nozdtics x2dtics nox2dtics y2dtics noy2dtics
syn keyword gnuplotType xlab[el] ylab[el] zlab[el] cblab[el] x2label y2label xmtics
syn keyword gnuplotType xmtics noxmtics ymtics noymtics zmtics nozmtics
syn keyword gnuplotType x2mtics nox2mtics y2mtics noy2mtics
syn keyword gnuplotType cbdtics nocbdtics cbmtics nocbmtics cbtics nocbtics
syn keyword gnuplotType xtics noxtics ytics noytics
syn keyword gnuplotType ztics noztics x2tics nox2tics
syn keyword gnuplotType y2tics noy2tics zero nozero zeroaxis nozeroaxis
syn keyword gnuplotType xzeroaxis noxzeroaxis yzeroaxis noyzeroaxis
syn keyword gnuplotType x2zeroaxis nox2zeroaxis y2zeroaxis noy2zeroaxis
syn keyword gnuplotType angles one two fill empty solid pattern
syn keyword gnuplotType default
syn keyword gnuplotType scansautomatic flush b[egin] noftriangles implicit
" b too much? - used in demo
syn keyword gnuplotType palette positive negative ps_allcF nops_allcF maxcolors
syn keyword gnuplotType push fontfile pop
syn keyword gnuplotType rgbformulae defined file color model gradient colornames
syn keyword gnuplotType RGB HSV CMY YIQ XYZ
syn keyword gnuplotType colorbox vertical horizontal user bdefault
syn keyword gnuplotType loadpath fontpath decimalsign in out
" common (builtin) variable names
syn keyword gnuplotKeyword x y t u v z s
" comments + strings
syn region gnuplotComment start="#" end="$"
syn region gnuplotComment start=+"+ skip=+\\"+ end=+"+
syn region gnuplotComment start=+'+ end=+'+
" conditionals
syn keyword gnuplotConditional if else
" Define the default highlighting.
" repeats
syn keyword gnuplotRepeat do for while
" operators
syn match gnuplotOperator "[-+*/^|&?:]"
syn match gnuplotOperator "\*\*"
syn match gnuplotOperator "&&"
syn match gnuplotOperator "||"
" Keywords
" keywords for 'fit' command
syn keyword gnuplotKeyword via z x:z x:z:s x:y:z:s
syn keyword gnuplotKeyword x:y:t:z:s x:y:t:u:z:s x:y:t:u:v:z:s
" keywords for 'plot' command
" 'axes' keyword
syn keyword gnuplotKeyword axes x1y1 x1y2 x2y1 x2y2
" 'binary' keyword
syn keyword gnuplotKeyword binary matrix general array record format endian
syn keyword gnuplotKeyword filetype avs edf png scan transpose dx dy dz
syn keyword gnuplotKeyword flipx flipy flipz origin center rotate using
syn keyword gnuplotKeyword perpendicular skip every
" datafile keywords
syn keyword gnuplotKeyword binary nonuniform matrix index every using
syn keyword gnuplotKeyword smooth volatile noautoscale every index
" 'smooth' keywords
syn keyword gnuplotKeyword unique frequency cumulative cnormal kdensity
syn keyword gnuplotKeyword csplines acsplines bezer sbezier
" deprecated 'thru' keyword
syn keyword gnuplotError thru
" 'using' keyword
syn keyword gnuplotKeyword using u xticlabels yticlabels zticlabels
syn keyword gnuplotKeyword x2ticlabels y2ticlabels xtic ytic ztic
" 'errorbars' keywords
syn keyword gnuplotKeyword errorbars xerrorbars yerrorbars xyerrorbars
" 'errorlines' keywords
syn keyword gnuplotKeyword errorlines xerrorlines yerrorlines xyerrorlines
" 'title' keywords
syn keyword gnuplotKeyword title t tit notitle columnheader at beginning
syn keyword gnuplotKeyword end
" 'with' keywords
syn keyword gnuplotKeyword with w linestyle ls linetype lt linewidth
syn keyword gnuplotKeyword lw linecolor lc pointtype pt pointsize ps
syn keyword gnuplotKeyword fill fs nohidden3d nocontours nosurface palette
" styles for 'with'
syn keyword gnuplotKeyword lines l points p linespoints lp surface dots
syn keyword gnuplotKeyword impulses labels vectors steps fsteps histeps
syn keyword gnuplotKeyword errorbars errorlines financebars xerrorbars
syn keyword gnuplotKeyword xerrorlines xyerrorbars yerrorbars yerrorlines
syn keyword gnuplotKeyword boxes boxerrorbars boxxyerrorbars boxplot
syn keyword gnuplotKeyword candlesticks circles ellipses filledcurves
syn keyword gnuplotKeyword histogram image rgbimage rgbalpha pm3d variable
" keywords for 'save' command
syn keyword gnuplotKeyword save functions func variables all var terminal
syn keyword gnuplotKeyword term set
" keywords for 'set/show' command
" set angles
syn keyword gnuplotKeyword angles degrees deg radians rad
" set arrow
syn keyword gnuplotKeyword arrow from to rto length angle arrowstyle as
syn keyword gnuplotKeyword nohead head backhead heads size filled empty
syn keyword gnuplotKeyword nofilled front back linestyle linetype linewidth
" set autoscale
" TODO regexp here
syn keyword gnuplotKeyword autoscale x y z cb x2 y2 zy min max fixmin
syn keyword gnuplotKeyword fixmax fix keepfix noextend
" set bars
syn keyword gnuplotKeyword bars small large fullwidth front back
" set bind
syn keyword gnuplotKeyword bind
" set margins
" TODO regexp
syn keyword gnuplotKeyword margin bmargin lmargin rmargin tmargin
" set border
syn keyword gnuplotKeyword border front back
" set boxwidth
syn keyword gnuplotKeyword boxwidth absolute relative
" deprecated set clabel
syn keyword gnuplotError clabel
" set clip
syn keyword gnuplotKeyword clip points one two
" set cntrlabel
syn keyword gnuplotKeyword cntrlabel format font start interval onecolor
" set cntrparam
syn keyword gnuplotKeyword cntrparam linear cubicspline bspline points
syn keyword gnuplotKeyword order levels auto discrete incremental
" set colorbox
syn keyword gnuplotKeyword colorbox vertical horizontal default user origin
syn keyword gnuplotKeyword size front back noborder bdefault border
" show colornames
syn keyword gnuplotKeyword colornames
" set contour
syn keyword gnuplotKeyword contour base surface both
" set datafile
syn keyword gnuplotKeyword datafile fortran nofpe_trap missing separator
syn keyword gnuplotKeyword whitespace tab comma commentschars binary
" set decimalsign
syn keyword gnuplotKeyword decimalsign locale
" set dgrid3d
syn keyword gnuplotKeyword dgrid3d splines qnorm gauss cauchy exp box hann
syn keyword gnuplotKeyword kdensity
" set dummy
syn keyword gnuplotKeyword dummy
" set encoding
syn keyword gnuplotKeyword encoding default iso_8859_1 iso_8859_15
syn keyword gnuplotKeyword iso_8859_2 iso_8859_9 koi8r koi8u cp437 cp850
syn keyword gnuplotKeyword cp852 cp950 cp1250 cp1251 cp1254 sjis utf8
" set fit
syn keyword gnuplotKeyword fit logfile default quiet noquiet results brief
syn keyword gnuplotKeyword verbose errorvariables noerrorvariables
syn keyword gnuplotKeyword errorscaling noerrorscaling prescale noprescale
syn keyword gnuplotKeyword maxiter none limit limit_abs start-lambda script
syn keyword gnuplotKeyword lambda-factor
" set fontpath
syn keyword gnuplotKeyword fontpath
" set format
syn keyword gnuplotKeyword format
" show functions
syn keyword gnuplotKeyword functions
" set grid
syn keyword gnuplotKeyword grid polar layerdefault xtics ytics ztics x2tics
syn keyword gnuplotKeyword y2tics cbtics mxtics mytics mztics mx2tics
syn keyword gnuplotKeyword my2tics mcbtics xmtics ymtics zmtics x2mtics
syn keyword gnuplotKeyword y2mtics cbmtics noxtics noytics noztics nox2tics
syn keyword gnuplotKeyword noy2tics nocbtics nomxtics nomytics nomztics
syn keyword gnuplotKeyword nomx2tics nomy2tics nomcbtics
" set hidden3d
syn keyword gnuplotKeyword hidden3d offset trianglepattern undefined
syn keyword gnuplotKeyword altdiagonal noaltdiagonal bentover nobentover
syn keyword gnuplotKeyword noundefined
" set historysize
syn keyword gnuplotKeyword historysize
" set isosamples
syn keyword gnuplotKeyword isosamples
" set key
syn keyword gnuplotKeyword key on off inside outside at left right center
syn keyword gnuplotKeyword top bottom vertical horizontal Left Right
syn keyword gnuplotKeyword opaque noopaque reverse noreverse invert maxrows
syn keyword gnuplotKeyword noinvert samplen spacing width height autotitle
syn keyword gnuplotKeyword noautotitle title enhanced noenhanced font
syn keyword gnuplotKeyword textcolor box nobox linetype linewidth maxcols
" set label
syn keyword gnuplotKeyword label left center right rotate norotate by font
syn keyword gnuplotKeyword front back textcolor point nopoint offset boxed
syn keyword gnuplotKeyword hypertext
" set linetype
syn keyword gnuplotKeyword linetype
" set link
syn keyword gnuplotKeyword link via inverse
" set loadpath
syn keyword gnuplotKeyword loadpath
" set locale
syn keyword gnuplotKeyword locale
" set logscale
syn keyword gnuplotKeyword logscale log
" set macros
syn keyword gnuplotKeyword macros
" set mapping
syn keyword gnuplotKeyword mapping cartesian spherical cylindrical
" set mouse
syn keyword gnuplotKeyword mouse doubleclick nodoubleclick zoomcoordinates
syn keyword gnuplotKeyword nozoomcoordinates ruler noruler at polardistance
syn keyword gnuplotKeyword nopolardistance deg tan format clipboardformat
syn keyword gnuplotKeyword mouseformat labels nolabels zoomjump nozoomjump
syn keyword gnuplotKeyword verbose noverbose
" set multiplot
syn keyword gnuplotKeyword multiplot title font layout rowsfirst downwards
syn keyword gnuplotKeyword downwards upwards scale offset
" set object
syn keyword gnuplotKeyword object behind fillcolor fc fs rectangle ellipse
syn keyword gnuplotKeyword circle polygon at center size units xy xx yy to
syn keyword gnuplotKeyword from
" set offsets
syn keyword gnuplotKeyword offsets
" set origin
syn keyword gnuplotKeyword origin
" set output
syn keyword gnuplotKeyword output
" set parametric
syn keyword gnuplotKeyword parametric
" show plot
syn keyword gnuplotKeyword plot add2history
" set pm3d
syn keyword gnuplotKeyword hidden3d interpolate scansautomatic scansforward
syn keyword gnuplotKeyword scansbackward depthorder flush begin center end
syn keyword gnuplotKeyword ftriangles noftriangles clip1in clip4in mean map
syn keyword gnuplotKeyword corners2color geomean harmean rms median min max
syn keyword gnuplotKeyword c1 c2 c3 c4 pm3d at nohidden3d implicit explicit
" set palette
syn keyword gnuplotKeyword palette gray color gamma rgbformulae defined
syn keyword gnuplotKeyword file functions cubehelix start cycles saturation
syn keyword gnuplotKeyword model RGB HSV CMY YIQ XYZ positive negative
syn keyword gnuplotKeyword nops_allcF ps_allcF maxcolors float int gradient
syn keyword gnuplotKeyword fit2rgbformulae rgbformulae
" set pointintervalbox
syn keyword gnuplotKeyword pointintervalbox
" set pointsize
syn keyword gnuplotKeyword pointsize
" set polar
syn keyword gnuplotKeyword polar
" set print
syn keyword gnuplotKeyword print append
" set psdir
syn keyword gnuplotKeyword psdir
" set raxis
syn keyword gnuplotKeyword raxis rrange rtics
" set samples
syn keyword gnuplotKeyword samples
" set size
syn keyword gnuplotKeyword size square nosquare ratio noratio
" set style
syn keyword gnuplotKeyword style function data noborder rectangle arrow
syn keyword gnuplotKeyword default nohead head heads size filled empty
syn keyword gnuplotKeyword nofilled front back boxplot range fraction
syn keyword gnuplotKeyword outliers nooutliers pointtype candlesticks
syn keyword gnuplotKeyword separation labels off auto x x2 sorted unsorted
syn keyword gnuplotKeyword fill empty transparent solid pattern border
syn keyword gnuplotKeyword increment userstyles financebars line default
syn keyword gnuplotKeyword linetype lt linecolor lc linewidth lw pointtype
syn keyword gnuplotKeyword pt pointsize ps pointinterval pi palette circle
syn keyword gnuplotKeyword radius graph screen wedge nowedge ellipse size
syn keyword gnuplotKeyword units xx xy yy histogram line textbox opaque
syn keyword gnuplotKeyword border noborder
" set surface
syn keyword gnuplotKeyword surface implicit explicit
" set table
syn keyword gnuplotKeyword table
" set terminal (list of terminals)
syn keyword gnuplotKeyword terminal term push pop aed512 aed767 aifm aqua
syn keyword gnuplotKeyword be cairo cairolatex canvas cgm context corel
syn keyword gnuplotKeyword debug dumb dxf dxy800a eepic emf emxvga epscairo
syn keyword gnuplotKeyword epslatex epson_180dpi excl fig ggi gif gpic hpgl
syn keyword gnuplotKeyword grass hp2623a hp2648 hp500c hpljii hppj imagen
syn keyword gnuplotKeyword jpeg kyo latex linux lua mf mif mp next openstep
syn keyword gnuplotKeyword pbm pdf pdfcairo pm png pngcairo postscript
syn keyword gnuplotKeyword pslatex pstex pstricks qms qt regis sun svg svga
syn keyword gnuplotKeyword tek40 tek410x texdraw tgif tikz tkcanvas tpic
syn keyword gnuplotKeyword vgagl vws vx384 windows wx wxt x11 xlib
" keywords for 'set terminal'
syn keyword gnuplotKeyword color monochrome dashlength dl eps pdf fontscale
syn keyword gnuplotKeyword standalone blacktext colortext colourtext header
syn keyword gnuplotKeyword noheader mono color solid dashed notransparent
syn keyword gnuplotKeyword crop crop background input rounded butt square
syn keyword gnuplotKeyword size fsize standalone name jsdir defaultsize
syn keyword gnuplotKeyword timestamp notimestamp colour mitered beveled
syn keyword gnuplotKeyword round squared palfuncparam blacktext nec_cp6
syn keyword gnuplotKeyword mppoints inlineimages externalimages defaultfont
syn keyword gnuplotKeyword aspect feed nofeed rotate small tiny standalone
syn keyword gnuplotKeyword oldstyle newstyle level1 leveldefault level3
syn keyword gnuplotKeyword background nobackground solid clip noclip
syn keyword gnuplotKeyword colortext colourtext epson_60dpi epson_lx800
syn keyword gnuplotKeyword okidata starc tandy_60dpi dpu414 nec_cp6 draft
syn keyword gnuplotKeyword medium large normal landscape portrait big
syn keyword gnuplotKeyword inches pointsmax textspecial texthidden
syn keyword gnuplotKeyword thickness depth version acceleration giant
syn keyword gnuplotKeyword delay loop optimize nooptimize pspoints
syn keyword gnuplotKeyword FNT9X17 FNT13X25 interlace nointerlace courier
syn keyword gnuplotKeyword originreset nooriginreset gparrows nogparrows
syn keyword gnuplotKeyword picenvironment nopicenvironment tightboundingbox
syn keyword gnuplotKeyword notightboundingbox charsize gppoints nogppoints
syn keyword gnuplotKeyword fontscale textscale fulldoc nofulldoc standalone
syn keyword gnuplotKeyword preamble header tikzplot tikzarrows notikzarrows
syn keyword gnuplotKeyword cmykimages externalimages noexternalimages
syn keyword gnuplotKeyword polyline vectors magnification psnfss nopsnfss
syn keyword gnuplotKeyword psnfss-version7 prologues a4paper amstex fname
syn keyword gnuplotKeyword fsize server persist widelines interlace
syn keyword gnuplotKeyword truecolor notruecolor defaultplex simplex duplex
syn keyword gnuplotKeyword nofontfiles adobeglyphnames noadobeglyphnames
syn keyword gnuplotKeyword nostandalone metric textrigid animate nopspoints
syn keyword gnuplotKeyword hpdj FNT5X9 roman emtex rgbimages bitmap
syn keyword gnuplotKeyword nobitmap providevars nointerlace add delete
syn keyword gnuplotKeyword auxfile hacktext unit raise palfuncparam
syn keyword gnuplotKeyword noauxfile nohacktext nounit noraise ctrl noctrl
syn keyword gnuplotKeyword close widget fixed dynamic tek40xx vttek
syn keyword gnuplotKeyword kc-tek40xx km-tek40xx bitgraph perltk
syn keyword gnuplotKeyword interactive red green blue interpolate mode
syn keyword gnuplotKeyword position ctrlq replotonresize position noctrlq
syn keyword gnuplotKeyword noreplotonresize
" set termoption
syn keyword gnuplotKeyword termoption font fontscale solid dashed
" set tics
syn keyword gnuplotKeyword tics add axis border mirror nomirror in out
syn keyword gnuplotKeyword scale rotate norotate by offset nooffset left
syn keyword gnuplotKeyword autojustify format font textcolor right center
" deprecated set ticslevel
syn keyword gnuplotError ticslevel ticscale
" set timestamp
syn keyword gnuplotKeyword timestamp top bottom offset font
" set timefmt
syn keyword gnuplotKeyword timefmt
" set title
syn keyword gnuplotKeyword title offset font textcolor tc
" set ranges
syn keyword gnuplotKeyword trange urange vrange
" show variables
syn keyword gnuplotKeyword variables
" show version
syn keyword gnuplotKeyword version
" set view
syn keyword gnuplotKeyword view map equal noequal xy xyz
" set x2data
syn keyword gnuplotKeyword xdata ydata zdata x2data y2data cbdata xdtics
syn keyword gnuplotKeyword ydtics zdtics x2dtics y2dtics cbdtics xzeroaxis
syn keyword gnuplotKeyword yzeroaxis zzeroaxis x2zeroaxis y2zeroaxis
syn keyword gnuplotKeyword cbzeroaxis time geographic
" set label
syn keyword gnuplotKeyword xlabel ylabel zlabel x2label y2label cblabel
syn keyword gnuplotKeyword offset font textcolor by parallel
" set range
syn keyword gnuplotKeyword xrange yrange zrange x2range y2range cbrange
" set xyplane
syn keyword gnuplotKeyword xyplane
" set zeroaxis
" set zero
syn keyword gnuplotKeyword zero
" set zeroaxis
syn keyword gnuplotKeyword zeroaxis
" keywords for 'stats' command
syn keyword gnuplotKeyword nooutput
" keywords for 'test' command
syn keyword gnuplotKeyword terminal palette rgb rbg grb gbr brg bgr
" ---- Macros ---- "
syn region gnuplotMacro start="@" end=" "
" ---- Todos ---- "
syn keyword gnuplotTodo contained TODO FIXME XXX
" ---- Types: gnuplot commands ---- "
" I set the commands as Types to distinguish them visually from keywords for the
" commands. This comes at the end of the syntax file because some commands
" are redundant with keywords. It's probably too much trouble to go and
" create special regions for each redundant keyword/command pair, which means
" that some keywords (e.g. 'p') will be highlighted as commands.
syn keyword gnuplotStatement cd call clear evaluate exit fit help history
syn keyword gnuplotStatement load lower pause plot p print pwd quit raise
syn keyword gnuplotStatement refresh replot rep reread reset save set show
syn keyword gnuplotStatement shell splot spstats system test undefine unset
syn keyword gnuplotStatement update
" ---- 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_gnuplot_syntax_inits")
@@ -181,14 +510,41 @@ if version >= 508 || !exists("did_gnuplot_syntax_inits")
command -nargs=+ HiLink hi def link <args>
endif
HiLink gnuplotStatement Statement
HiLink gnuplotConditional Conditional
" ---- Comments ---- "
HiLink gnuplotComment Comment
" ---- Constants ---- "
HiLink gnuplotString String
HiLink gnuplotNumber Number
HiLink gnuplotFloat Float
" ---- Identifiers ---- "
HiLink gnuplotIdentifier Identifier
" ---- Statements ---- "
HiLink gnuplotConditional Conditional
HiLink gnuplotRepeat Repeat
HiLink gnuplotKeyword Keyword
HiLink gnuplotOperator Operator
" ---- PreProcs ---- "
HiLink gnuplotMacro Macro
" ---- Types ---- "
HiLink gnuplotStatement Type
HiLink gnuplotFunc Identifier
" ---- Specials ---- "
HiLink gnuplotSpecial Special
HiLink gnuplotUnit Special
HiLink gnuplotExternal Special
" ---- Errors ---- "
HiLink gnuplotError Error
HiLink gnuplotOctalError Error
HiLink gnuplotFunc Type
HiLink gnuplotType Type
HiLink gnuplotComment Comment
" ---- Todos ---- "
HiLink gnuplotTodo Todo
delcommand HiLink
endif

208
runtime/syntax/go.vim Normal file
View File

@@ -0,0 +1,208 @@
" Vim syntax file
" Language: Go
" Maintainer: David Barnett (https://github.com/google/vim-ft-go)
" Last Change: 2014 Aug 16
" Options:
" There are some options for customizing the highlighting; the recommended
" settings are the default values, but you can write:
" let OPTION_NAME = 0
" in your ~/.vimrc file to disable particular options. You can also write:
" let OPTION_NAME = 1
" to enable particular options. At present, all options default to on.
"
" - g:go_highlight_array_whitespace_error
" Highlights white space after "[]".
" - g:go_highlight_chan_whitespace_error
" Highlights white space around the communications operator that don't
" follow the standard style.
" - g:go_highlight_extra_types
" Highlights commonly used library types (io.Reader, etc.).
" - g:go_highlight_space_tab_error
" Highlights instances of tabs following spaces.
" - g:go_highlight_trailing_whitespace_error
" Highlights trailing white space.
" Quit when a (custom) syntax file was already loaded
if exists('b:current_syntax')
finish
endif
if !exists('g:go_highlight_array_whitespace_error')
let g:go_highlight_array_whitespace_error = 1
endif
if !exists('g:go_highlight_chan_whitespace_error')
let g:go_highlight_chan_whitespace_error = 1
endif
if !exists('g:go_highlight_extra_types')
let g:go_highlight_extra_types = 1
endif
if !exists('g:go_highlight_space_tab_error')
let g:go_highlight_space_tab_error = 1
endif
if !exists('g:go_highlight_trailing_whitespace_error')
let g:go_highlight_trailing_whitespace_error = 1
endif
syn case match
syn keyword goDirective package import
syn keyword goDeclaration var const type
syn keyword goDeclType struct interface
hi def link goDirective Statement
hi def link goDeclaration Keyword
hi def link goDeclType Keyword
" Keywords within functions
syn keyword goStatement defer go goto return break continue fallthrough
syn keyword goConditional if else switch select
syn keyword goLabel case default
syn keyword goRepeat for range
hi def link goStatement Statement
hi def link goConditional Conditional
hi def link goLabel Label
hi def link goRepeat Repeat
" Predefined types
syn keyword goType chan map bool string error
syn keyword goSignedInts int int8 int16 int32 int64 rune
syn keyword goUnsignedInts byte uint uint8 uint16 uint32 uint64 uintptr
syn keyword goFloats float32 float64
syn keyword goComplexes complex64 complex128
hi def link goType Type
hi def link goSignedInts Type
hi def link goUnsignedInts Type
hi def link goFloats Type
hi def link goComplexes Type
" Treat func specially: it's a declaration at the start of a line, but a type
" elsewhere. Order matters here.
syn match goType /\<func\>/
syn match goDeclaration /^func\>/
" Predefined functions and values
syn keyword goBuiltins append cap close complex copy delete imag len
syn keyword goBuiltins make new panic print println real recover
syn keyword goConstants iota true false nil
hi def link goBuiltins Keyword
hi def link goConstants Keyword
" Comments; their contents
syn keyword goTodo contained TODO FIXME XXX BUG
syn cluster goCommentGroup contains=goTodo
syn region goComment start="/\*" end="\*/" contains=@goCommentGroup,@Spell
syn region goComment start="//" end="$" contains=@goCommentGroup,@Spell
hi def link goComment Comment
hi def link goTodo Todo
" Go escapes
syn match goEscapeOctal display contained "\\[0-7]\{3}"
syn match goEscapeC display contained +\\[abfnrtv\\'"]+
syn match goEscapeX display contained "\\x\x\{2}"
syn match goEscapeU display contained "\\u\x\{4}"
syn match goEscapeBigU display contained "\\U\x\{8}"
syn match goEscapeError display contained +\\[^0-7xuUabfnrtv\\'"]+
hi def link goEscapeOctal goSpecialString
hi def link goEscapeC goSpecialString
hi def link goEscapeX goSpecialString
hi def link goEscapeU goSpecialString
hi def link goEscapeBigU goSpecialString
hi def link goSpecialString Special
hi def link goEscapeError Error
" Strings and their contents
syn cluster goStringGroup contains=goEscapeOctal,goEscapeC,goEscapeX,goEscapeU,goEscapeBigU,goEscapeError
syn region goString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@goStringGroup
syn region goRawString start=+`+ end=+`+
hi def link goString String
hi def link goRawString String
" Characters; their contents
syn cluster goCharacterGroup contains=goEscapeOctal,goEscapeC,goEscapeX,goEscapeU,goEscapeBigU
syn region goCharacter start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@goCharacterGroup
hi def link goCharacter Character
" Regions
syn region goBlock start="{" end="}" transparent fold
syn region goParen start='(' end=')' transparent
" Integers
syn match goDecimalInt "\<\d\+\([Ee]\d\+\)\?\>"
syn match goHexadecimalInt "\<0x\x\+\>"
syn match goOctalInt "\<0\o\+\>"
syn match goOctalError "\<0\o*[89]\d*\>"
hi def link goDecimalInt Integer
hi def link goHexadecimalInt Integer
hi def link goOctalInt Integer
hi def link Integer Number
" Floating point
syn match goFloat "\<\d\+\.\d*\([Ee][-+]\d\+\)\?\>"
syn match goFloat "\<\.\d\+\([Ee][-+]\d\+\)\?\>"
syn match goFloat "\<\d\+[Ee][-+]\d\+\>"
hi def link goFloat Float
" Imaginary literals
syn match goImaginary "\<\d\+i\>"
syn match goImaginary "\<\d\+\.\d*\([Ee][-+]\d\+\)\?i\>"
syn match goImaginary "\<\.\d\+\([Ee][-+]\d\+\)\?i\>"
syn match goImaginary "\<\d\+[Ee][-+]\d\+i\>"
hi def link goImaginary Number
" Spaces after "[]"
if go_highlight_array_whitespace_error != 0
syn match goSpaceError display "\(\[\]\)\@<=\s\+"
endif
" Spacing errors around the 'chan' keyword
if go_highlight_chan_whitespace_error != 0
" receive-only annotation on chan type
syn match goSpaceError display "\(<-\)\@<=\s\+\(chan\>\)\@="
" send-only annotation on chan type
syn match goSpaceError display "\(\<chan\)\@<=\s\+\(<-\)\@="
" value-ignoring receives in a few contexts
syn match goSpaceError display "\(\(^\|[={(,;]\)\s*<-\)\@<=\s\+"
endif
" Extra types commonly seen
if go_highlight_extra_types != 0
syn match goExtraType /\<bytes\.\(Buffer\)\>/
syn match goExtraType /\<io\.\(Reader\|Writer\|ReadWriter\|ReadWriteCloser\)\>/
syn match goExtraType /\<reflect\.\(Kind\|Type\|Value\)\>/
syn match goExtraType /\<unsafe\.Pointer\>/
endif
" Space-tab error
if go_highlight_space_tab_error != 0
syn match goSpaceError display " \+\t"me=e-1
endif
" Trailing white space error
if go_highlight_trailing_whitespace_error != 0
syn match goSpaceError display excludenl "\s\+$"
endif
hi def link goExtraType Type
hi def link goSpaceError Error
" Search backwards for a global declaration to start processing the syntax.
"syn sync match goSync grouphere NONE /^\(const\|var\|type\|func\)\>/
" There's a bug in the implementation of grouphere. For now, use the
" following as a more expensive/less precise workaround.
syn sync minlines=500
let b:current_syntax = 'go'
" vim: sw=2 sts=2 et

21
runtime/syntax/godoc.vim Normal file
View File

@@ -0,0 +1,21 @@
" Vim syntax file
" Language: Godoc (generated documentation for go)
" Maintainer: David Barnett (https://github.com/google/vim-ft-go)
" Last Change: 2014 Aug 16
if exists('b:current_syntax')
finish
endif
syn case match
syn match godocTitle "^\([A-Z][A-Z ]*\)$"
command -nargs=+ HiLink hi def link <args>
HiLink godocTitle Title
delcommand HiLink
let b:current_syntax = 'godoc'
" vim: sw=2 sts=2 et

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Django HTML template
" Maintainer: Dave Hodder <dmh@dmh.org.uk>
" Last Change: 2007 Jan 26
" Last Change: 2014 Jul 13
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -28,7 +28,7 @@ syn cluster djangoBlocks add=djangoTagBlock,djangoVarBlock,djangoComment,djangoC
syn region djangoTagBlock start="{%" end="%}" contains=djangoStatement,djangoFilter,djangoArgument,djangoTagError display containedin=ALLBUT,@djangoBlocks
syn region djangoVarBlock start="{{" end="}}" contains=djangoFilter,djangoArgument,djangoVarError display containedin=ALLBUT,@djangoBlocks
syn region djangoComment start="{%\s*comment\s*%}" end="{%\s*endcomment\s*%}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks
syn region djangoComment start="{%\s*comment\(\s\+.\{-}\)\?%}" end="{%\s*endcomment\s*%}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks
syn region djangoComBlock start="{#" end="#}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks
let b:current_syntax = "htmldjango"

View File

@@ -2,7 +2,7 @@
" Language: J
" Maintainer: David Bürgin <676c7473@gmail.com>
" URL: https://github.com/glts/vim-j
" Last Change: 2014-04-05
" Last Change: 2014-05-25
if exists('b:current_syntax')
finish
@@ -46,7 +46,7 @@ syntax match jStdlibVerb /\<\%(assert\|break\|do\)\>\.\@!/
" All in all, a compromise between correctness and practicality had to be
" made. See http://www.jsoftware.com/help/dictionary/dcons.htm for reference.
syntax match jNumber /\<_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(\%(r_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%([px]_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(r_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\)\=\)\=\)\|\%(\%(j\|a[dr]\)_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%([px]_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(\%(j\|a[dr]\)_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\)\=\)\=\)\|\%([px]_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(\%(j\|a[dr]\|r\)_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\)\=\)\)\=/
syntax match jNumber /\<_\=\d\+\%([eE]\d\+\)\=b_\=[0-9a-z]\+/
syntax match jNumber /\<_\=\d\+\%([eE]\d\+\)\=b_\=[0-9a-z]\+\%(\.[0-9a-z]\+\)\=/
syntax match jNumber /\<__\=\>/
syntax match jNumber /\<_\./
syntax match jNumber /\<_\=\d\+x\>/
@@ -64,15 +64,20 @@ syntax match jVerb /[=!\]]\|[\^?]\.\=\|[;[]:\=\|{\.\|[_/\\]:\|[<>+*\-%$|,#][.:]\
syntax match jCopula /=[.:]/
syntax match jConjunction /;\.\|\^:\|![.:]/
" Explicit noun definition. The difficulty is that the define expression
" "0 : 0" can occur in the middle of a line but the jNounDefine region must
" only start on the next line. The trick is to split the problem into two
" regions and link them with "nextgroup=".
" Explicit noun definition. The difficulty is that the define expression can
" occur in the middle of a line but the jNounDefine region must only start on
" the next line. The trick is to split the problem into two regions and link
" them with "nextgroup=". The fold wrapper provides syntax folding.
syntax region jNounDefineFold
\ matchgroup=NONE start=/\<\%(\%(0\|noun\)\s\+\%(\:\s*0\|def\s\+0\|define\)\>\)\@=/
\ keepend matchgroup=NONE end=/^\s*)\s*$/
\ contains=jNounDefineStart
\ fold
syntax region jNounDefineStart
\ matchgroup=jDefineExpression start=/\<\%(0\|noun\)\s\+\%(\:\s*0\|def\s\+0\|define\)\>/
\ keepend matchgroup=NONE end=/$/
\ contains=@jStdlibItems,@jPrimitiveItems,jNumber,jString,jParenGroup,jParen,jComment
\ oneline skipempty nextgroup=jDefineEnd,jNounDefine
\ contained oneline skipempty nextgroup=jDefineEnd,jNounDefine
" These two items must have "contained", which allows them to match only after
" jNounDefineStart thanks to the "nextgroup=" above.
syntax region jNounDefine
@@ -87,6 +92,7 @@ syntax region jDefine
\ matchgroup=jDefineExpression start=/\<\%([1-4]\|13\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>/
\ matchgroup=jDefineEnd end=/^\s*)\s*$/
\ contains=jControl,@jStdlibItems,@jPrimitiveItems,jNumber,jString,jArgument,jParenGroup,jParen,jComment,jDefineMonadDyad
\ fold
syntax match jDefineMonadDyad contained /^\s*:\s*$/
" Paired parentheses. When a jDefineExpression such as "3 : 0" is

143
runtime/syntax/json.vim Normal file
View File

@@ -0,0 +1,143 @@
" Vim syntax file
" Language: JSON
" Maintainer: Eli Parra <eli@elzr.com>
" Last Change: 2014 Aug 23
" Version: 0.12
if !exists("main_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
let main_syntax = 'json'
endif
syntax match jsonNoise /\%(:\|,\)/
" NOTE that for the concealing to work your conceallevel should be set to 2
" Syntax: Strings
" Separated into a match and region because a region by itself is always greedy
syn match jsonStringMatch /"\([^"]\|\\\"\)\+"\ze[[:blank:]\r\n]*[,}\]]/ contains=jsonString
if has('conceal')
syn region jsonString oneline matchgroup=jsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ concealends contains=jsonEscape contained
else
syn region jsonString oneline matchgroup=jsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=jsonEscape contained
endif
" Syntax: JSON does not allow strings with single quotes, unlike JavaScript.
syn region jsonStringSQError oneline start=+'+ skip=+\\\\\|\\"+ end=+'+
" Syntax: JSON Keywords
" Separated into a match and region because a region by itself is always greedy
syn match jsonKeywordMatch /"\([^"]\|\\\"\)\+"[[:blank:]\r\n]*\:/ contains=jsonKeyword
if has('conceal')
syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ concealends contained
else
syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ contained
endif
" Syntax: Escape sequences
syn match jsonEscape "\\["\\/bfnrt]" contained
syn match jsonEscape "\\u\x\{4}" contained
" Syntax: Numbers
syn match jsonNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>\ze[[:blank:]\r\n]*[,}\]]"
" ERROR WARNINGS **********************************************
if (!exists("g:vim_json_warnings") || g:vim_json_warnings==1)
" Syntax: Strings should always be enclosed with quotes.
syn match jsonNoQuotesError "\<[[:alpha:]][[:alnum:]]*\>"
syn match jsonTripleQuotesError /"""/
" Syntax: An integer part of 0 followed by other digits is not allowed.
syn match jsonNumError "-\=\<0\d\.\d*\>"
" Syntax: Decimals smaller than one should begin with 0 (so .1 should be 0.1).
syn match jsonNumError "\:\@<=[[:blank:]\r\n]*\zs\.\d\+"
" Syntax: No comments in JSON, see http://stackoverflow.com/questions/244777/can-i-comment-a-json-file
syn match jsonCommentError "//.*"
syn match jsonCommentError "\(/\*\)\|\(\*/\)"
" Syntax: No semicolons in JSON
syn match jsonSemicolonError ";"
" Syntax: No trailing comma after the last element of arrays or objects
syn match jsonTrailingCommaError ",\_s*[}\]]"
" Syntax: Watch out for missing commas between elements
syn match jsonMissingCommaError /\("\|\]\|\d\)\zs\_s\+\ze"/
syn match jsonMissingCommaError /\(\]\|\}\)\_s\+\ze"/ "arrays/objects as values
syn match jsonMissingCommaError /}\_s\+\ze{/ "objects as elements in an array
syn match jsonMissingCommaError /\(true\|false\)\_s\+\ze"/ "true/false as value
endif
" ********************************************** END OF ERROR WARNINGS
" Allowances for JSONP: function call at the beginning of the file,
" parenthesis and semicolon at the end.
" Function name validation based on
" http://stackoverflow.com/questions/2008279/validate-a-javascript-function-name/2008444#2008444
syn match jsonPadding "\%^[[:blank:]\r\n]*[_$[:alpha:]][_$[:alnum:]]*[[:blank:]\r\n]*("
syn match jsonPadding ");[[:blank:]\r\n]*\%$"
" Syntax: Boolean
syn match jsonBoolean /\(true\|false\)\(\_s\+\ze"\)\@!/
" Syntax: Null
syn keyword jsonNull null
" Syntax: Braces
syn region jsonFold matchgroup=jsonBraces start="{" end=/}\(\_s\+\ze\("\|{\)\)\@!/ transparent fold
syn region jsonFold matchgroup=jsonBraces start="\[" end=/]\(\_s\+\ze"\)\@!/ transparent fold
" 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_json_syn_inits")
if version < 508
let did_json_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink jsonPadding Operator
HiLink jsonString String
HiLink jsonTest Label
HiLink jsonEscape Special
HiLink jsonNumber Number
HiLink jsonBraces Delimiter
HiLink jsonNull Function
HiLink jsonBoolean Boolean
HiLink jsonKeyword Label
if (!exists("g:vim_json_warnings") || g:vim_json_warnings==1)
HiLink jsonNumError Error
HiLink jsonCommentError Error
HiLink jsonSemicolonError Error
HiLink jsonTrailingCommaError Error
HiLink jsonMissingCommaError Error
HiLink jsonStringSQError Error
HiLink jsonNoQuotesError Error
HiLink jsonTripleQuotesError Error
endif
HiLink jsonQuote Quote
HiLink jsonNoise Noise
delcommand HiLink
endif
let b:current_syntax = "json"
if main_syntax == 'json'
unlet main_syntax
endif
" Vim settings
" vim: ts=8 fdm=marker
" MIT License
" Copyright (c) 2013, Jeroen Ruigrok van der Werven, Eli Parra
"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.
"See https://twitter.com/elzr/status/294964017926119424

36
runtime/syntax/kivy.vim Normal file
View File

@@ -0,0 +1,36 @@
" Vim syntax file
" Language: Kivy
" Maintainer: Corey Prophitt <prophitt.corey@gmail.com>
" Last Change: May 29th, 2014
" Version: 1
" URL: http://kivy.org/
if exists("b:current_syntax")
finish
endif
" Load Python syntax first (Python can be used within Kivy)
syn include @pyth $VIMRUNTIME/syntax/python.vim
" Kivy language rules can be found here
" http://kivy.org/docs/guide/lang.html
" Define Kivy syntax
syn match kivyPreProc /#:.*/
syn match kivyComment /#.*/
syn match kivyRule /<\I\i*\(,\s*\I\i*\)*>:/
syn match kivyAttribute /\<\I\i*\>/ nextgroup=kivyValue
syn region kivyValue start=":" end=/$/ contains=@pyth skipwhite
syn region kivyAttribute matchgroup=kivyIdent start=/[\a_][\a\d_]*:/ end=/$/ contains=@pyth skipwhite
hi def link kivyPreproc PreProc
hi def link kivyComment Comment
hi def link kivyRule Function
hi def link kivyIdent Statement
hi def link kivyAttribute Label
let b:current_syntax = "kivy"
" vim: ts=8

View File

@@ -1,10 +1,10 @@
" ninja build file syntax.
" Language: ninja build file as described at
" http://martine.github.com/ninja/manual.html
" Version: 1.3
" Last Change: 2013/04/16
" Version: 1.4
" Last Change: 2014/05/13
" Maintainer: Nicolas Weber <nicolasweber@gmx.de>
" Version 1.3 of this script is in the upstream vim repository and will be
" Version 1.4 of this script is in the upstream vim repository and will be
" included in the next vim release. If you change this, please send your change
" upstream.
@@ -55,6 +55,7 @@ syn keyword ninjaPoolCommand contained depth
" $simple_varname -> variable
" ${varname} -> variable
syn match ninjaDollar "\$\$"
syn match ninjaWrapLineOperator "\$$"
syn match ninjaSimpleVar "\$[a-zA-Z0-9_-]\+"
syn match ninjaVar "\${[a-zA-Z0-9_.-]\+}"
@@ -70,6 +71,7 @@ hi def link ninjaComment Comment
hi def link ninjaKeyword Keyword
hi def link ninjaRuleCommand Statement
hi def link ninjaPoolCommand Statement
hi def link ninjaDollar ninjaOperator
hi def link ninjaWrapLineOperator ninjaOperator
hi def link ninjaOperator Operator
hi def link ninjaSimpleVar ninjaVar

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Python
" Maintainer: Neil Schemenauer <nas@python.ca>
" Last Change: 2013 Feb 26
" Last Change: 2014 Jul 16
" Credits: Zvezdan Petkovic <zpetkovic@acm.org>
" Neil Schemenauer <nas@python.ca>
" Dmitry Vasiliev
@@ -113,7 +113,7 @@ syn match pythonEscape "\\\o\{1,3}" contained
syn match pythonEscape "\\x\x\{2}" contained
syn match pythonEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained
" Python allows case-insensitive Unicode IDs: http://www.unicode.org/charts/
syn match pythonEscape "\\N{\a\+\%(\s\a\+\)*}" contained
syn match pythonEscape "\\N{.\{-}}" contained
syn match pythonEscape "\\$"
if exists("python_highlight_all")

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 May 19, 2013 05:59PM
" Last Change: Wed Jul 09, 2014 10:29PM
" Filenames: *.R *.r *.Rhistory *.Rt
"
" NOTE: The highlighting of R functions is defined in the
@@ -30,14 +30,16 @@ endif
syn case match
" Comment
syn match rComment contains=@Spell "#.*"
syn match rCommentTodo contained "\(BUG\|FIXME\|NOTE\|TODO\):"
syn match rComment contains=@Spell,rCommentTodo "#.*"
" 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 rOKeyword contained "@\(method\|noRd\|note\|references\|seealso\|setClass\|slot\|source\|title\|usage\)"
syn match rOKeyword contained "@\(family\|template\|templateVar\|description\|details\|inheritsParams\)"
syn match rOComment contains=@Spell,rOKeyword "#'.*"
@@ -119,7 +121,7 @@ if &filetype != "rmd" && &filetype != "rrst"
else
syn match rOperator "[|!<>^~`/:]"
endif
syn match rOperator "%\{2}\|%\S*%"
syn match rOperator "%\{2}\|%\S\{-}%"
syn match rOpError '\*\{3}'
syn match rOpError '//'
syn match rOpError '&&&'
@@ -164,8 +166,8 @@ syn match rLstElmt "@[a-zA-Z0-9\\._]*" contains=rDollar
syn keyword rPreProc library require attach detach source
if &filetype == "rhelp"
syn match rHelpIdent '\\method'
syn match rHelpIdent '\\S4method'
syn match rHelpIdent '\\method'
syn match rHelpIdent '\\S4method'
endif
" Type
@@ -187,6 +189,7 @@ hi def link rArrow Statement
hi def link rBoolean Boolean
hi def link rBraceError Error
hi def link rComment Comment
hi def link rCommentTodo Todo
hi def link rOComment Comment
hi def link rComplex Number
hi def link rConditional Conditional

View File

@@ -2,9 +2,7 @@
" Language: R Help File
" Maintainer: Jakson Aquino <jalvesaq@gmail.com>
" Former Maintainer: Johannes Ranke <jranke@uni-bremen.de>
" Last Change: Fri Oct 14, 2011 09:54PM
" Version: 0.7.4
" SVN: $Id: rhelp.vim 90 2010-11-22 10:58:11Z ranke $
" Last Change: Wed Jul 09, 2014 10:28PM
" Remarks: - Includes R syntax highlighting in the appropriate
" sections if an r.vim file is in the same directory or in the
" default debian location.
@@ -23,6 +21,8 @@ elseif exists("b:current_syntax")
finish
endif
setlocal iskeyword=@,48-57,_,.
syn case match
" R help identifiers {{{1
@@ -51,7 +51,12 @@ syn region rhelpRcode matchgroup=Delimiter start="\\examples{" matchgroup=Delimi
syn region rhelpRcode matchgroup=Delimiter start="\\usage{" matchgroup=Delimiter transparent end="}" contains=@R,rhelpIdentifier,rhelpS4method
syn region rhelpRcode matchgroup=Delimiter start="\\synopsis{" matchgroup=Delimiter transparent end="}" contains=@R
syn region rhelpRcode matchgroup=Delimiter start="\\special{" matchgroup=Delimiter transparent end="}" contains=@R
syn region rhelpRcode matchgroup=Delimiter start="\\code{" skip='\\\@<!{.\{-}\\\@<!}' transparent end="}" contains=@R,rhelpDots,rhelpString,rhelpSpecialChar,rhelpLink keepend
if v:version > 703
syn region rhelpRcode matchgroup=Delimiter start="\\code{" skip='\\\@1<!{.\{-}\\\@1<!}' transparent end="}" contains=@R,rhelpDots,rhelpString,rhelpSpecialChar,rhelpLink keepend
else
syn region rhelpRcode matchgroup=Delimiter start="\\code{" skip='\\\@<!{.\{-}\\\@<!}' transparent end="}" contains=@R,rhelpDots,rhelpString,rhelpSpecialChar,rhelpLink keepend
endif
syn region rhelpS4method matchgroup=Delimiter start="\\S4method{.*}(" matchgroup=Delimiter transparent end=")" contains=@R,rhelpDots
syn region rhelpSexpr matchgroup=Delimiter start="\\Sexpr{" matchgroup=Delimiter transparent end="}" contains=@R
@@ -127,8 +132,13 @@ syn region rhelpLink matchgroup=rhelpSection start="\\link\[.\{-}\]{" end="}" co
syn region rhelpLink matchgroup=rhelpSection start="\\linkS4class{" end="}" contained keepend extend
" Verbatim like {{{1
syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@<!{.\{-}\\\@<!}' end="}" contains=rhelpSpecialChar,rhelpComment
syn region rhelpVerbatim matchgroup=rhelpType start="\\verb{" skip='\\\@<!{.\{-}\\\@<!}' end="}" contains=rhelpSpecialChar,rhelpComment
if v:version > 703
syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpSpecialChar,rhelpComment
syn region rhelpVerbatim matchgroup=rhelpType start="\\verb{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpSpecialChar,rhelpComment
else
syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@<!{.\{-}\\\@<!}' end="}" contains=rhelpSpecialChar,rhelpComment
syn region rhelpVerbatim matchgroup=rhelpType start="\\verb{" skip='\\\@<!{.\{-}\\\@<!}' end="}" contains=rhelpSpecialChar,rhelpComment
endif
" Type Styles {{{1
syn match rhelpType "\\emph\>"
@@ -200,6 +210,8 @@ syn match rhelpBraceError /[)}]/ contained
syn match rhelpCurlyError /[)\]]/ contained
syn match rhelpParenError /[\]}]/ contained
syntax sync match rhelpSyncRcode grouphere rhelpRcode "\\examples{"
" Define the default highlighting {{{1
" 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
@@ -233,4 +245,5 @@ if version >= 508 || !exists("did_rhelp_syntax_inits")
endif
let b:current_syntax = "rhelp"
" vim: foldmethod=marker:
" vim: foldmethod=marker sw=2

87
runtime/syntax/rmd.vim Normal file
View File

@@ -0,0 +1,87 @@
" markdown Text with R statements
" Language: markdown with R code chunks
" Last Change: Wed Jul 09, 2014 10:29PM
"
" CONFIGURATION:
" To highlight chunk headers as R code, put in your vimrc:
" let rmd_syn_hl_chunk = 1
" for portability
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" load all of pandoc info
runtime syntax/pandoc.vim
if exists("b:current_syntax")
let rmdIsPandoc = 1
unlet b:current_syntax
else
let rmdIsPandoc = 0
runtime syntax/markdown.vim
if exists("b:current_syntax")
unlet b:current_syntax
endif
endif
" load all of the r syntax highlighting rules into @R
syntax include @R syntax/r.vim
if exists("b:current_syntax")
unlet b:current_syntax
endif
if exists("g:rmd_syn_hl_chunk")
" highlight R code inside chunk header
syntax match rmdChunkDelim "^[ \t]*```{r" contained
syntax match rmdChunkDelim "}$" contained
else
syntax match rmdChunkDelim "^[ \t]*```{r.*}$" contained
endif
syntax match rmdChunkDelim "^[ \t]*```$" contained
syntax region rmdChunk start="^[ \t]*``` *{r.*}$" end="^[ \t]*```$" contains=@R,rmdChunkDelim keepend fold
" also match and syntax highlight in-line R code
syntax match rmdEndInline "`" contained
syntax match rmdBeginInline "`r " contained
syntax region rmdrInline start="`r " end="`" contains=@R,rmdBeginInline,rmdEndInline keepend
" match slidify special marker
syntax match rmdSlidifySpecial "\*\*\*"
if rmdIsPandoc == 0
syn match rmdBlockQuote /^\s*>.*\n\(.*\n\@<!\n\)*/ skipnl
" LaTeX
syntax include @LaTeX syntax/tex.vim
if exists("b:current_syntax")
unlet b:current_syntax
endif
" Inline
syntax match rmdLaTeXInlDelim "\$"
syntax match rmdLaTeXInlDelim "\\\$"
syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" contains=@texMathZoneGroup
" Region
syntax match rmdLaTeXRegDelim "\$\$" contained
syntax match rmdLaTeXRegDelim "\$\$latex$" contained
syntax region rmdLaTeXRegion start="^\$\$" skip="\\\$" end="\$\$$" contains=@LaTeX,rmdLaTeXSt,rmdLaTeXRegDelim keepend
syntax region rmdLaTeXRegion2 start="^\\\[" end="\\\]" contains=@LaTeX,rmdLaTeXSt,rmdLaTeXRegDelim keepend
hi def link rmdLaTeXSt Statement
hi def link rmdLaTeXInlDelim Special
hi def link rmdLaTeXRegDelim Special
endif
setlocal iskeyword=@,48-57,_,.
syn sync match rmdSyncChunk grouphere rmdChunk "^[ \t]*``` *{r"
hi def link rmdChunkDelim Special
hi def link rmdBeginInline Special
hi def link rmdEndInline Special
hi def link rmdBlockQuote Comment
hi def link rmdSlidifySpecial Special
let b:current_syntax = "rmd"
" vim: ts=8 sw=2

47
runtime/syntax/rrst.vim Normal file
View File

@@ -0,0 +1,47 @@
" reStructured Text with R statements
" Language: reST with R code chunks
" Maintainer: Alex Zvoleff, azvoleff@mail.sdsu.edu
" Last Change: Wed Jul 09, 2014 10:29PM
"
" CONFIGURATION:
" To highlight chunk headers as R code, put in your vimrc:
" let rrst_syn_hl_chunk = 1
" for portability
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" load all of the rst info
runtime syntax/rst.vim
unlet b:current_syntax
" load all of the r syntax highlighting rules into @R
syntax include @R syntax/r.vim
setlocal iskeyword=@,48-57,_,.
" highlight R chunks
if exists("g:rrst_syn_hl_chunk")
" highlight R code inside chunk header
syntax match rrstChunkDelim "^\.\. {r" contained
syntax match rrstChunkDelim "}$" contained
else
syntax match rrstChunkDelim "^\.\. {r .*}$" contained
endif
syntax match rrstChunkDelim "^\.\. \.\.$" contained
syntax region rrstChunk start="^\.\. {r.*}$" end="^\.\. \.\.$" contains=@R,rrstChunkDelim keepend transparent fold
" also highlight in-line R code
syntax match rrstInlineDelim "`" contained
syntax match rrstInlineDelim ":r:" contained
syntax region rrstInline start=":r: *`" skip=/\\\\\|\\`/ end="`" contains=@R,rrstInlineDelim keepend
hi def link rrstChunkDelim Special
hi def link rrstInlineDelim Special
let b:current_syntax = "rrst"
" vim: ts=8 sw=2

View File

@@ -1,7 +1,8 @@
" Vim syntax file
" Language: reStructuredText documentation format
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2013-11-26
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2014-08-23
if exists("b:current_syntax")
finish
@@ -47,7 +48,7 @@ syn match rstSimpleTableLines contained display
syn cluster rstDirectives contains=rstFootnote,rstCitation,
\ rstHyperlinkTarget,rstExDirective
syn match rstExplicitMarkup '^\.\.\_s'
syn match rstExplicitMarkup '^\s*\.\.\_s'
\ nextgroup=@rstDirectives,rstComment,rstSubstitutionDefinition
let s:ReferenceName = '[[:alnum:]]\+\%([_.-][[:alnum:]]\+\)*'
@@ -99,11 +100,11 @@ function! s:DefineInlineMarkup(name, start, middle, end)
\ ""
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, "'", "'")
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '"', '"')
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '(', ')')
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\[', '\]')
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '{', '}')
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '<', '>')
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '"', '"')
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '(', ')')
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\[', '\]')
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '{', '}')
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '<', '>')
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\%(^\|\s\|[/:]\)', '')
@@ -136,23 +137,24 @@ syn match rstStandaloneHyperlink contains=@NoSpell
\ "\<\%(\%(\%(https\=\|file\|ftp\|gopher\)://\|\%(mailto\|news\):\)[^[:space:]'\"<>]\+\|www[[:alnum:]_-]*\.[[:alnum:]_-]\+\.[^[:space:]'\"<>]\+\)[[:alnum:]/]"
syn region rstCodeBlock contained matchgroup=rstDirective
\ start=+\%(sourcecode\|code\%(-block\)\=\)::\s+
\ start=+\%(sourcecode\|code\%(-block\)\=\)::\_s*\n\ze\z(\s\+\)+
\ skip=+^$+
\ end=+^\s\@!+
\ end=+^\z1\@!+
\ contains=@NoSpell
syn cluster rstDirectives add=rstCodeBlock
if !exists('g:rst_syntax_code_list')
let g:rst_syntax_code_list = ['vim', 'java', 'cpp', 'lisp', 'php', 'python', 'perl']
let g:rst_syntax_code_list = ['vim', 'java', 'cpp', 'lisp', 'php',
\ 'python', 'perl', 'sh']
endif
for code in g:rst_syntax_code_list
unlet! b:current_syntax
exe 'syn include @rst'.code.' syntax/'.code.'.vim'
exe 'syn region rstDirective'.code.' matchgroup=rstDirective fold '
\.'start=#\%(sourcecode\|code\%(-block\)\=\)::\s\+'.code.'\s*$# '
\.'start=#\%(sourcecode\|code\%(-block\)\=\)::\s\+'.code.'\_s*\n\ze\z(\s\+\)# '
\.'skip=#^$# '
\.'end=#^\s\@!# contains=@NoSpell,@rst'.code.' keepend'
\.'end=#^\z1\@!# contains=@NoSpell,@rst'.code
exe 'syn cluster rstDirectives add=rstDirective'.code
endfor

View File

@@ -1,8 +1,8 @@
" Vim syntax file
" Language: TeX
" Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM>
" Last Change: Mar 20, 2014
" Version: 81
" Last Change: Sep 09, 2014
" Version: 82
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
"
" Notes: {{{1
@@ -88,6 +88,12 @@ if !exists("g:tex_conceal")
else
let s:tex_conceal= g:tex_conceal
endif
if !exists("g:tex_superscripts")
let g:tex_superscripts= "[0-9a-zA-W.,:;+-<>/()=]"
endif
if !exists("g:tex_subscripts")
let g:tex_subscripts= "[0-9aehijklmnoprstuvx,+-/().]"
endif
" Determine whether or not to use "*.sty" mode {{{1
" The user may override the normal determination by setting
@@ -331,22 +337,22 @@ syn match texSpaceCodeChar "`\\\=.\(\^.\)\==\(\d\|\"\x\{1,6}\|`.\)" contained
if s:tex_fast =~ 'p'
if !exists("g:tex_nospell") || !g:tex_nospell
if g:tex_fold_enabled && has("folding")
syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' fold contains=@texFoldGroup,@texDocGroup,@Spell
syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' fold contains=@texFoldGroup,@texDocGroup,@Spell
syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texPartGroup,@Spell
syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texChapterGroup,@Spell
syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSectionGroup,@Spell
syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSectionGroup,@Spell
syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSectionGroup,@Spell
syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSubSectionGroup,@Spell
syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texParaGroup,@Spell
syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@Spell
syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' fold contains=@texFoldGroup,@Spell
syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' fold contains=@texFoldGroup,@Spell
else
syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup,@Spell
syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup,@Spell
syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup,@Spell
syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup,@Spell
syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup,@Spell
syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup,@Spell
syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup,@Spell
syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup,@Spell
syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup,@Spell
syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@Spell
@@ -355,22 +361,22 @@ if s:tex_fast =~ 'p'
endif
else
if g:tex_fold_enabled && has("folding")
syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' fold contains=@texFoldGroup,@texDocGroup
syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' fold contains=@texFoldGroup,@texDocGroup
syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texPartGroup
syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texChapterGroup
syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSectionGroup
syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSectionGroup
syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSectionGroup
syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSubSectionGroup
syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texParaGroup
syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup
syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' fold contains=@texFoldGroup
syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' fold contains=@texFoldGroup
else
syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup
syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup
syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup
syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup
syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup
syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup
syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup
syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup
syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup
syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup
@@ -620,7 +626,7 @@ if s:tex_fast =~ 'r'
syn region texRefZone matchgroup=texStatement start="\\\(page\|eq\)ref{" end="}\|%stopzone\>" contains=@texRefGroup
syn region texRefZone matchgroup=texStatement start="\\v\=ref{" end="}\|%stopzone\>" contains=@texRefGroup
syn region texRefOption contained matchgroup=Delimiter start='\[' end=']' contains=@texRefGroup,texRefZone nextgroup=texRefOption,texCite
syn region texCite contained matchgroup=Delimiter start='{' end='}' contains=@texRefGroup,texRefZone,texCite
syn region texCite contained matchgroup=Delimiter start='{' end='}' contains=@texRefGroup,texRefZone,texCite
endif
syn match texRefZone '\\cite\%([tp]\*\=\)\=' nextgroup=texRefOption,texCite
@@ -1045,8 +1051,11 @@ if has("conceal") && &enc == 'utf-8'
syn region texSubscript matchgroup=Delimiter start='_{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSubscripts,texStatement,texSubscript,texSuperscript,texMathMatcher
endif
fun! s:SuperSub(group,leader,pat,cchar)
exe 'syn match '.a:group." '".a:leader.a:pat."' contained conceal cchar=".a:cchar
exe 'syn match '.a:group."s '".a:pat."' contained conceal cchar=".a:cchar.' nextgroup='.a:group.'s'
if a:pat =~ '^\\' || (a:leader == '\^' && a:pat =~ g:tex_superscripts) || (a:leader == '_' && a:pat =~ g:tex_subscripts)
" call Decho("SuperSub: group<".a:group."> leader<".a:leader."> pat<".a:pat."> cchar<".a:cchar.">")
exe 'syn match '.a:group." '".a:leader.a:pat."' contained conceal cchar=".a:cchar
exe 'syn match '.a:group."s '".a:pat."' contained conceal cchar=".a:cchar.' nextgroup='.a:group.'s'
endif
endfun
call s:SuperSub('texSuperscript','\^','0','⁰')
call s:SuperSub('texSuperscript','\^','1','¹')
@@ -1170,44 +1179,44 @@ if has("conceal") && &enc == 'utf-8'
let i= i + 1
endfor
endfun
" \` \' \^ \" \~ \. \= \c \H \k \r \u \v
call s:Accents('a','à','á','â','ä','ã','ȧ','ā',' ',' ','ą','å','ă','ǎ')
call s:Accents('A','À','Á','Â','Ä','Ã','Ȧ','Ā',' ',' ','Ą','Å','Ă','Ǎ')
call s:Accents('c',' ','ć','ĉ',' ',' ','ċ',' ','ç',' ',' ',' ',' ','č')
call s:Accents('C',' ','Ć','Ĉ',' ',' ','Ċ',' ','Ç',' ',' ',' ',' ','Č')
call s:Accents('d',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ď')
call s:Accents('D',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','Ď')
call s:Accents('e','è','é','ê','ë','ẽ','ė','ē','ȩ',' ','ę',' ','ĕ','ě')
call s:Accents('E','È','É','Ê','Ë','Ẽ','Ė','Ē','Ȩ',' ','Ę',' ','Ĕ','Ě')
call s:Accents('g',' ','ǵ','ĝ',' ',' ','ġ',' ','ģ',' ',' ',' ','ğ','ǧ')
call s:Accents('G',' ','Ǵ','Ĝ',' ',' ','Ġ',' ','Ģ',' ',' ',' ','Ğ','Ǧ')
call s:Accents('h',' ',' ','ĥ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ȟ')
call s:Accents('H',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','Ȟ')
call s:Accents('i','ì','í','î','ï','ĩ','į','ī',' ',' ','į',' ','ĭ','ǐ')
call s:Accents('I','Ì','Í','Î','Ï','Ĩ','İ','Ī',' ',' ','Į',' ','Ĭ','Ǐ')
call s:Accents('J',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ǰ')
call s:Accents('k',' ',' ',' ',' ',' ',' ',' ','ķ',' ',' ',' ',' ','ǩ')
call s:Accents('K',' ',' ',' ',' ',' ',' ',' ','Ķ',' ',' ',' ',' ','Ǩ')
call s:Accents('l',' ','ĺ','ľ',' ',' ',' ',' ','ļ',' ',' ',' ',' ','ľ')
call s:Accents('L',' ','Ĺ','Ľ',' ',' ',' ',' ','Ļ',' ',' ',' ',' ','Ľ')
call s:Accents('n',' ','ń',' ',' ','ñ',' ',' ','ņ',' ',' ',' ',' ','ň')
call s:Accents('N',' ','Ń',' ',' ','Ñ',' ',' ','Ņ',' ',' ',' ',' ','Ň')
call s:Accents('o','ò','ó','ô','ö','õ','ȯ','ō',' ','ő','ǫ',' ','ŏ','ǒ')
call s:Accents('O','Ò','Ó','Ô','Ö','Õ','Ȯ','Ō',' ','Ő','Ǫ',' ','Ŏ','Ǒ')
call s:Accents('r',' ','ŕ',' ',' ',' ',' ',' ','ŗ',' ',' ',' ',' ','ř')
call s:Accents('R',' ','Ŕ',' ',' ',' ',' ',' ','Ŗ',' ',' ',' ',' ','Ř')
call s:Accents('s',' ','ś','ŝ',' ',' ',' ',' ','ş',' ','ȿ',' ',' ','š')
call s:Accents('S',' ','Ś','Ŝ',' ',' ',' ',' ','Ş',' ',' ',' ',' ','Š')
call s:Accents('t',' ',' ',' ',' ',' ',' ',' ','ţ',' ',' ',' ',' ','ť')
call s:Accents('T',' ',' ',' ',' ',' ',' ',' ','Ţ',' ',' ',' ',' ','Ť')
call s:Accents('u','ù','ú','û','ü','ũ',' ','ū',' ','ű','ų','ů','ŭ','ǔ')
call s:Accents('U','Ù','Ú','Û','Ü','Ũ',' ','Ū',' ','Ű','Ų','Ů','Ŭ','Ǔ')
call s:Accents('w',' ',' ','ŵ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ')
call s:Accents('W',' ',' ','Ŵ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ')
call s:Accents('y','ỳ','ý','ŷ','ÿ','ỹ',' ',' ',' ',' ',' ',' ',' ',' ')
call s:Accents('Y','Ỳ','Ý','Ŷ','Ÿ','Ỹ',' ',' ',' ',' ',' ',' ',' ',' ')
call s:Accents('z',' ','ź',' ',' ',' ','ż',' ',' ',' ',' ',' ',' ','ž')
call s:Accents('Z',' ','Ź',' ',' ',' ','Ż',' ',' ',' ',' ',' ',' ','Ž')
" \` \' \^ \" \~ \. \= \c \H \k \r \u \v
call s:Accents('a','à','á','â','ä','ã','ȧ','ā',' ',' ','ą','å','ă','ǎ')
call s:Accents('A','À','Á','Â','Ä','Ã','Ȧ','Ā',' ',' ','Ą','Å','Ă','Ǎ')
call s:Accents('c',' ','ć','ĉ',' ',' ','ċ',' ','ç',' ',' ',' ',' ','č')
call s:Accents('C',' ','Ć','Ĉ',' ',' ','Ċ',' ','Ç',' ',' ',' ',' ','Č')
call s:Accents('d',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ď')
call s:Accents('D',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','Ď')
call s:Accents('e','è','é','ê','ë','ẽ','ė','ē','ȩ',' ','ę',' ','ĕ','ě')
call s:Accents('E','È','É','Ê','Ë','Ẽ','Ė','Ē','Ȩ',' ','Ę',' ','Ĕ','Ě')
call s:Accents('g',' ','ǵ','ĝ',' ',' ','ġ',' ','ģ',' ',' ',' ','ğ','ǧ')
call s:Accents('G',' ','Ǵ','Ĝ',' ',' ','Ġ',' ','Ģ',' ',' ',' ','Ğ','Ǧ')
call s:Accents('h',' ',' ','ĥ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ȟ')
call s:Accents('H',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','Ȟ')
call s:Accents('i','ì','í','î','ï','ĩ','į','ī',' ',' ','į',' ','ĭ','ǐ')
call s:Accents('I','Ì','Í','Î','Ï','Ĩ','İ','Ī',' ',' ','Į',' ','Ĭ','Ǐ')
call s:Accents('J',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ǰ')
call s:Accents('k',' ',' ',' ',' ',' ',' ',' ','ķ',' ',' ',' ',' ','ǩ')
call s:Accents('K',' ',' ',' ',' ',' ',' ',' ','Ķ',' ',' ',' ',' ','Ǩ')
call s:Accents('l',' ','ĺ','ľ',' ',' ',' ',' ','ļ',' ',' ',' ',' ','ľ')
call s:Accents('L',' ','Ĺ','Ľ',' ',' ',' ',' ','Ļ',' ',' ',' ',' ','Ľ')
call s:Accents('n',' ','ń',' ',' ','ñ',' ',' ','ņ',' ',' ',' ',' ','ň')
call s:Accents('N',' ','Ń',' ',' ','Ñ',' ',' ','Ņ',' ',' ',' ',' ','Ň')
call s:Accents('o','ò','ó','ô','ö','õ','ȯ','ō',' ','ő','ǫ',' ','ŏ','ǒ')
call s:Accents('O','Ò','Ó','Ô','Ö','Õ','Ȯ','Ō',' ','Ő','Ǫ',' ','Ŏ','Ǒ')
call s:Accents('r',' ','ŕ',' ',' ',' ',' ',' ','ŗ',' ',' ',' ',' ','ř')
call s:Accents('R',' ','Ŕ',' ',' ',' ',' ',' ','Ŗ',' ',' ',' ',' ','Ř')
call s:Accents('s',' ','ś','ŝ',' ',' ',' ',' ','ş',' ','ȿ',' ',' ','š')
call s:Accents('S',' ','Ś','Ŝ',' ',' ',' ',' ','Ş',' ',' ',' ',' ','Š')
call s:Accents('t',' ',' ',' ',' ',' ',' ',' ','ţ',' ',' ',' ',' ','ť')
call s:Accents('T',' ',' ',' ',' ',' ',' ',' ','Ţ',' ',' ',' ',' ','Ť')
call s:Accents('u','ù','ú','û','ü','ũ',' ','ū',' ','ű','ų','ů','ŭ','ǔ')
call s:Accents('U','Ù','Ú','Û','Ü','Ũ',' ','Ū',' ','Ű','Ų','Ů','Ŭ','Ǔ')
call s:Accents('w',' ',' ','ŵ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ')
call s:Accents('W',' ',' ','Ŵ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ')
call s:Accents('y','ỳ','ý','ŷ','ÿ','ỹ',' ',' ',' ',' ',' ',' ',' ',' ')
call s:Accents('Y','Ỳ','Ý','Ŷ','Ÿ','Ỹ',' ',' ',' ',' ',' ',' ',' ',' ')
call s:Accents('z',' ','ź',' ',' ',' ','ż',' ',' ',' ',' ',' ',' ','ž')
call s:Accents('Z',' ','Ź',' ',' ',' ','Ż',' ',' ',' ',' ',' ',' ','Ž')
call s:Accents('\\i','ì','í','î','ï','ĩ','į',' ',' ',' ',' ',' ','ĭ',' ')
" \` \' \^ \" \~ \. \= \c \H \k \r \u \v
delfun s:Accents
@@ -1252,7 +1261,7 @@ endif
if did_tex_syntax_inits == 1
let did_tex_syntax_inits= 2
" TeX highlighting groups which should share similar highlighting
if !exists("s:tex_no_error")
if !exists("g:tex_no_error")
if !exists("g:tex_no_math")
HiLink texBadMath texError
HiLink texMathDelimBad texError

113
runtime/syntax/vroom.vim Normal file
View File

@@ -0,0 +1,113 @@
" Vim syntax file
" Language: Vroom (vim testing and executable documentation)
" Maintainer: David Barnett (https://github.com/google/vim-ft-vroom)
" Last Change: 2014 Jul 23
" For version 5.x: Clear all syntax items.
" For version 6.x and later: Quit when a syntax file was already loaded.
if v:version < 600
syntax clear
elseif exists('b:current_syntax')
finish
endif
let s:cpo_save = &cpo
set cpo-=C
syn include @vroomVim syntax/vim.vim
syn include @vroomShell syntax/sh.vim
syntax region vroomAction
\ matchgroup=vroomOutput
\ start='\m^ ' end='\m$' keepend
\ contains=vroomControlBlock
syntax region vroomAction
\ matchgroup=vroomOutput
\ start='\m^ & ' end='\m$' keepend
\ contains=vroomControlBlock
syntax match vroomOutput '\m^ &$'
syntax region vroomMessageBody
\ matchgroup=vroomMessage
\ start='\m^ \~ ' end='\m$' keepend
\ contains=vroomControlBlock
syntax region vroomColoredAction
\ matchgroup=vroomInput
\ start='\m^ > ' end='\m$' keepend
\ contains=vimNotation,vroomControlBlock
syntax region vroomAction
\ matchgroup=vroomInput
\ start='\m^ % ' end='\m$' keepend
\ contains=vimNotation,vroomControlBlock
syntax region vroomAction
\ matchgroup=vroomContinuation
\ start='\m^ |' end='\m$' keepend
syntax region vroomAction
\ start='\m^ \ze:' end='\m$' keepend
\ contains=@vroomVim,vroomControlBlock
syntax region vroomAction
\ matchgroup=vroomDirective
\ start='\m^ @\i\+' end='\m$' keepend
\ contains=vroomControlBlock
syntax region vroomSystemAction
\ matchgroup=vroomSystem
\ start='\m^ ! ' end='\m$' keepend
\ contains=@vroomShell,vroomControlBlock
syntax region vroomHijackAction
\ matchgroup=vroomHijack
\ start='\m^ \$ ' end='\m$' keepend
\ contains=vroomControlBlock
syntax match vroomControlBlock contains=vroomControlEscape,@vroomControls
\ '\v \([^&()][^()]*\)$'
syntax match vroomControlEscape '\m&' contained
syntax cluster vroomControls
\ contains=vroomDelay,vroomMode,vroomBuffer,vroomRange
\,vroomChannel,vroomBind,vroomStrictness
syntax match vroomRange '\v\.(,\+?(\d+|\$)?)?' contained
syntax match vroomRange '\v\d*,\+?(\d+|\$)?' contained
syntax match vroomBuffer '\v\d+,@!' contained
syntax match vroomDelay '\v\d+(\.\d+)?s' contained
syntax match vroomMode '\v<%(regex|glob|verbatim)' contained
syntax match vroomChannel '\v<%(stderr|stdout|command|status)>' contained
syntax match vroomBind '\v<bind>' contained
syntax match vroomStrictness '\v\<%(STRICT|RELAXED|GUESS-ERRORS)\>' contained
highlight default link vroomInput Identifier
highlight default link vroomDirective vroomInput
highlight default link vroomControlBlock vroomInput
highlight default link vroomSystem vroomInput
highlight default link vroomOutput Statement
highlight default link vroomContinuation Constant
highlight default link vroomHijack Special
highlight default link vroomColoredAction Statement
highlight default link vroomSystemAction vroomSystem
highlight default link vroomHijackAction vroomHijack
highlight default link vroomMessage vroomOutput
highlight default link vroomMessageBody Constant
highlight default link vroomControlEscape Special
highlight default link vroomBuffer vroomInput
highlight default link vroomRange Include
highlight default link vroomMode Constant
highlight default link vroomDelay Type
highlight default link vroomStrictness vroomMode
highlight default link vroomChannel vroomMode
highlight default link vroomBind vroomMode
let b:current_syntax = 'vroom'
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -121,7 +121,7 @@ NOTA: A medida que vaya avanzando en este tutor no intente memorizar,
h (izquierda) j (abajo) k (arriba) l (derecha)
2. Para acceder a Vim (desde el símbolo del sistema %) escriba:
vin FILENAME <INTRO>
vim FILENAME <INTRO>
3. Para salir de Vim escriba: <ESC> :q! <INTRO> para eliminar todos
los cambios.

View File

@@ -1029,10 +1029,10 @@ NOTE : Le compl
des Mines du Colorado et reprend des id<69>es fournies par Charles Smith,
Universit<69> d'<27>tat du Colorado. E-mail : bware@mines.colorado.edu.
Modifi<66> pour Vim par Bram Moolenar.
Modifi<66> pour Vim par Bram Moolenaar.
Traduit en fran<61>ais par Adrien Beau, en avril 2001.
Derni<6E>res mises <20> jour par Dominique Pell<6C>.
E-mail : dominique.pelle@gmail.com
Last Change : 2013 May 10
Last Change : 2014 Aug 18
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -1029,10 +1029,10 @@ NOTE : Le complètement fonctionne pour de nombreuses commandes. Essayez
des Mines du Colorado et reprend des idées fournies par Charles Smith,
Université d'État du Colorado. E-mail : bware@mines.colorado.edu.
Modifié pour Vim par Bram Moolenar.
Modifié pour Vim par Bram Moolenaar.
Traduit en français par Adrien Beau, en avril 2001.
Dernières mises à jour par Dominique Pellé.
E-mail : dominique.pelle@gmail.com
Last Change : 2013 May 10
Last Change : 2014 Aug 18
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -55,8 +55,7 @@ NOTE:
2. <20><><EFBFBD>Τ<CEA4>˥<EFBFBD><CBA5><EFBFBD><EFBFBD><EFBFBD>: :q! <ENTER>
<20><><EFBFBD><EFBFBD><EFBFBD>ˤ<EFBFBD><CBA4><EFBFBD><EFBFBD>Խ<EFBFBD><D4BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƥ<EFBFBD><C6A4><EFBFBD>¸<EFBFBD><C2B8><EFBFBD><EFBFBD><EFBFBD>˥<EFBFBD><CBA5>ǥ<EFBFBD><C7A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD>
3. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ץ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ץȤ<EFBFBD><EFBFBD>ФƤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Υ<EFBFBD><EFBFBD><EFBFBD>ȥꥢ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>٤ˤ˥<EFBFBD><EFBFBD>ޥ<EFBFBD><EFBFBD><EFBFBD>
<20>򥿥<EFBFBD><F2A5BFA5>פ<EFBFBD><D7A4>ޤ<EFBFBD><DEA4><EFBFBD>
3. <20><><EFBFBD>Υ<EFBFBD><EFBFBD><EFBFBD>ȥꥢ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>٤Υ<EFBFBD><EFBFBD>ޥ<EFBFBD><EFBFBD>ɤ<EFBFBD><EFBFBD>¹Ԥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD>
<20><><EFBFBD>Υ<EFBFBD><CEA5>ޥ<EFBFBD><DEA5>ɤ<EFBFBD>: vimtutor <ENTER>
4. <20><><EFBFBD><EFBFBD><EFBFBD>ޤǤΥ<C7A4><CEA5>ƥåפ<C3A5><D7A4>Ф<EFBFBD><D0A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĥ<EFBFBD><C4A4><EFBFBD><EFBFBD>ʤ<EFBFBD><CAA4>С<EFBFBD><D0A1><EFBFBD><EFBFBD>ƥå<C6A5> 1 <20><><EFBFBD><EFBFBD> 3 <20>ޤǤ<DEA4><C7A4><EFBFBD>
@@ -904,7 +903,7 @@ NOTE: 1
** CTRL-D <20><> <TAB> <20>ǥ<EFBFBD><C7A5>ޥ<EFBFBD><DEA5>ɥ饤<C9A5><E9A5A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E4B4B0><EFBFBD><EFBFBD> **
1. <20><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѥ<EFBFBD><EFBFBD><EFBFBD>ɤǤʤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><EFBFBD><EFBFBD>ǧ<EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD>: :set nocp
1. <20>ߴ<EFBFBD><EFBFBD><EFBFBD>ɤǤʤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><EFBFBD><EFBFBD>ǧ<EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD>: :set nocp
2. <20><><EFBFBD>ߤΥǥ<CEA5><C7A5><EFBFBD>ȥ<EFBFBD><C8A5>˺ߤ<CBBA><DFA4>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> :!ls <20><> :!dir <20>dz<EFBFBD>ǧ<EFBFBD><C7A7><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD>
@@ -949,7 +948,7 @@ NOTE:
<20><><EFBFBD><EFBFBD><EFBFBD>ˤ<EFBFBD> Vim <20>Υ<EFBFBD><CEA5><EFBFBD>ȥꥢ<C8A5><EAA5A2><EFBFBD>򽪤<EFBFBD><F2BDAAA4><EFBFBD><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǥ<EFBFBD><C7A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ñ<EFBFBD>ˡ<EFBFBD><CBA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⽼ʬ<E2BDBC><CAAC>
<20>Ȥ<EFBFBD><C8A4><EFBFBD><EFBFBD>Ȥ<EFBFBD><C8A4>Ǥ<EFBFBD><C7A4><EFBFBD><EFBFBD><EFBFBD>ˤȡ<CBA4>Vim <20>λ<EFBFBD><CEBB>ij<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Τߤ<CEA4><DFA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><C8A4>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD><EFBFBD>
Vim <20>ˤϤ<CBA4><CFA4><EFBFBD><EFBFBD><EFBFBD>¿<EFBFBD><C2BF><EFBFBD>Υ<EFBFBD><CEA5>ޥ<EFBFBD><DEA5>ɤ<EFBFBD><C9A4><EFBFBD><EFBFBD><EFBFBD><EAA1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƥ<EFBFBD><C6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȤϤǤ<CFA4><C7A4>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD><EFBFBD>
<20>ʹߤϥ桼<CFA5><E6A1BC><EFBFBD>ޥ˥奢<CBA5><E5A5A2><EFBFBD>򻲾Ȥ<F2BBB2BE><C8A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ":help user-manual"
<20>ʹߤϥ桼<CFA5><E6A1BC><EFBFBD><EFBFBD><EFBFBD>ޥ˥奢<EFBFBD><EFBFBD><EFBFBD>򻲾Ȥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ":help user-manual"
<20><><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>γؽ<CEB3><D8BD>Τ<EFBFBD><CEA4><EFBFBD><EFBFBD>ˡ<EFBFBD><CBA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܤ<EFBFBD><DCA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD>
Vim - Vi Improved - by Steve Oualline

View File

@@ -55,8 +55,7 @@ NOTE:
2. <20><><EFBFBD>̂悤<CC82>Ƀ^<5E>C<EFBFBD>v: :q! <ENTER>
<20><><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD><EFBFBD>ҏW<D28F><57><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>e<EFBFBD><65><EFBFBD>ۑ<EFBFBD><DB91><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɃG<C983>f<EFBFBD>B<EFBFBD>^<5E><><EFBFBD>I<EFBFBD><49><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B
3. <20>V<EFBFBD>F<EFBFBD><EFBFBD><EFBFBD>v<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>v<EFBFBD>g<EFBFBD><EFBFBD><EFBFBD>o<EFBFBD>Ă<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD><EFBFBD><EFBFBD>̃`<60><><EFBFBD>[<5B>g<EFBFBD><67><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>n<EFBFBD>߂<EFBFBD><EFBFBD>ׂɂɃR<EFBFBD>}<7D><><EFBFBD>h
<20><><EFBFBD>^<5E>C<EFBFBD>v<EFBFBD><76><EFBFBD>܂<EFBFBD><DC82>B
3. <20><><EFBFBD>̃`<60><><EFBFBD>[<5B>g<EFBFBD><EFBFBD><EFBFBD>A<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>n<EFBFBD>߂<EFBFBD><EFBFBD>ׂ̃R<EFBFBD>}<7D><><EFBFBD>h<EFBFBD><68><EFBFBD><EFBFBD><EFBFBD>s<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƁA<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɖ߂<EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>B
<20><><EFBFBD>̃R<CC83>}<7D><><EFBFBD>h<EFBFBD><68>: vimtutor <ENTER>
4. <20><><EFBFBD><EFBFBD><EFBFBD>܂ł̃X<CC83>e<EFBFBD>b<EFBFBD>v<EFBFBD><76><EFBFBD>o<EFBFBD><6F><EFBFBD><EFBFBD><EFBFBD>M<EFBFBD><4D><EFBFBD>‚<EFBFBD><C282><EFBFBD><EFBFBD>Ȃ<EFBFBD><C882>΁A<CE81>X<EFBFBD>e<EFBFBD>b<EFBFBD>v 1 <20><><EFBFBD><EFBFBD> 3 <20>܂ł<DC82><C582><EFBFBD>
@@ -904,7 +903,7 @@ NOTE: 1
** CTRL-D <20><> <TAB> <20>ŃR<C583>}<7D><><EFBFBD>h<EFBFBD><68><EFBFBD>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E28AAE><EFBFBD><EFBFBD> **
1. <20>R<EFBFBD><EFBFBD><EFBFBD>p<EFBFBD>`<EFBFBD><EFBFBD><EFBFBD>[<5B>h<EFBFBD>łȂ<C582><C882><EFBFBD><EFBFBD>Ƃ<EFBFBD><C682>m<EFBFBD>F<EFBFBD><46><EFBFBD>܂<EFBFBD>: :set nocp
1. <20>݊<EFBFBD><EFBFBD><EFBFBD><EFBFBD>[<5B>h<EFBFBD>łȂ<C582><C882><EFBFBD><EFBFBD>Ƃ<EFBFBD><C682>m<EFBFBD>F<EFBFBD><46><EFBFBD>܂<EFBFBD>: :set nocp
2. <20><><EFBFBD>݂̃f<CC83>B<EFBFBD><42><EFBFBD>N<EFBFBD>g<EFBFBD><67><EFBFBD>ɍ݂<C98D><DD82>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD> :!ls <20><> :!dir <20>Ŋm<C58A>F<EFBFBD><46><EFBFBD>܂<EFBFBD><DC82>B
@@ -949,7 +948,7 @@ NOTE:
<20><><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD> Vim <20>̃`<60><><EFBFBD>[<5B>g<EFBFBD><67><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>I<EFBFBD><49><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B<EFBFBD>G<EFBFBD>f<EFBFBD>B<EFBFBD>^<5E><><EFBFBD>ȒP<C892>ɁA<C981><41><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>[<5B><><EFBFBD><EFBFBD>
<20>g<EFBFBD><67><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD><C682>ł<EFBFBD><C582><EFBFBD><EFBFBD><EFBFBD>ɂƁAVim <20>̎<EFBFBD><CC8E>ŠT<C28A>O<EFBFBD>̗v<CC97>_<EFBFBD>݂̂<CC82><DD82>`<60><><EFBFBD><EFBFBD>Ƃ<EFBFBD><C682>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B
Vim <20>ɂ͂<C982><CD82><EFBFBD><EFBFBD>ɑ<EFBFBD><C991><EFBFBD><EFBFBD>̃R<CC83>}<7D><><EFBFBD>h<EFBFBD><68><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>őS<C591>Ă<EFBFBD><C482><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ͂ł<CD82><C582>܂<EFBFBD><DC82><EFBFBD><EFBFBD>B
<20>ȍ~<7E>̓<EFBFBD><CD83>[<5B>U<EFBFBD>}<7D>j<EFBFBD><6A><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>Q<EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ":help user-manual"
<20>ȍ~<7E>̓<EFBFBD><CD83>[<5B>U<EFBFBD>[<5B>}<7D>j<EFBFBD><6A><EFBFBD>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>Q<EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ":help user-manual"
<20><><EFBFBD><EFBFBD><EFBFBD>Ȍ<EFBFBD><C88C>̊w<CC8A>K<EFBFBD>̂<EFBFBD><CC82>߂ɁA<C981><41><EFBFBD>̖{<7B>𐄑E<F0908491><45><EFBFBD>܂<EFBFBD><DC82>B
Vim - Vi Improved - by Steve Oualline

View File

@@ -55,8 +55,7 @@ NOTE: カーソルキーでも移動できます。しかし hjkl に一度慣
2. 次のようにタイプ: :q! <ENTER>
これにより編集した内容を保存せずにエディタが終了します。
3. シェルプロンプトが出てきたら、このチュートリアルを始める為ににコマンド
をタイプします。
3. このチュートリアルを始める為コマンドを実行すると、ここに戻れます。
そのコマンドは: vimtutor <ENTER>
4. これまでのステップを覚え自信がついたならば、ステップ 1 から 3 までを実
@@ -904,7 +903,7 @@ NOTE: 1つの検索コマンドだけ大文字小文字の区別をやめたい
** CTRL-D と <TAB> でコマンドラインを補完する **
1. コンパチモードでないことを確認します: :set nocp
1. 互換モードでないことを確認します: :set nocp
2. 現在のディレクトリに在るファイルを :!ls か :!dir で確認します。
@@ -949,7 +948,7 @@ NOTE: 補完は多くのコマンドで動作します。そして CTRL-D と <T
これにて Vim のチュートリアルを終わります。エディタを簡単に、しかも充分に
使うことができるようにと、Vim の持つ概念の要点のみを伝えようとしました。
Vim にはさらに多くのコマンドがあり、ここで全てを説明することはできません。
以降はユーザマニュアルを参照ください: ":help user-manual"
以降はユーザマニュアルを参照ください: ":help user-manual"
これ以後の学習のために、次の本を推薦します。
Vim - Vi Improved - by Steve Oualline

View File

@@ -572,7 +572,7 @@ Nota: Isso
digite :#,#s/velho/novo/g onde #,# s<>o os n<>meros das duas linhas.
Digite :%s/velho/novo/g para mudar todas as ocorr<72>ncias no arquivo
inteiro.
Digite :%/velho/novo/gc para mudar todas as ocorr<72>ncia no arquivo
Digite :%s/velho/novo/gc para mudar todas as ocorr<72>ncia no arquivo
inteiro, com a op<6F><70>o de confirmar cada
substitui<75><69>o.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -971,7 +971,7 @@ NOTA: A completa
Colorado School of Mines, usando id<69>ias fornecidas por Charles Smith,
Colorado State University. E-mail: bware@mines.colorado.edu.
Modificado para o Vim por Bram Moolenar.
Modificado para o Vim por Bram Moolenaar.
Vers<72>o 1.4 traduzida para o portugu<67>s por Marcelo Drudi Miranda, Escola
Polit<69>cnica da Universidade de S<>o Paulo.

View File

@@ -572,7 +572,7 @@ Nota: Isso é muito útil para corrigir um programa com parênteses não-casados
digite :#,#s/velho/novo/g onde #,# são os números das duas linhas.
Digite :%s/velho/novo/g para mudar todas as ocorrências no arquivo
inteiro.
Digite :%/velho/novo/gc para mudar todas as ocorrência no arquivo
Digite :%s/velho/novo/gc para mudar todas as ocorrência no arquivo
inteiro, com a opção de confirmar cada
substituição.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -971,7 +971,7 @@ NOTA: A completação funciona com muitos comandos. Basta pressionar CTRL-D e
Colorado School of Mines, usando idéias fornecidas por Charles Smith,
Colorado State University. E-mail: bware@mines.colorado.edu.
Modificado para o Vim por Bram Moolenar.
Modificado para o Vim por Bram Moolenaar.
Versão 1.4 traduzida para o português por Marcelo Drudi Miranda, Escola
Politécnica da Universidade de São Paulo.

View File

@@ -0,0 +1,971 @@
===============================================================================
= D o b r o d o <20> l i u VIM p r i r u <20> n i k - Verzija 1.7 =
===============================================================================
Vim je mo<6D>an editor sa mnogo komandi, suvi<76>e da bismo ih ovde sve
opisali. Priru<72>nik je zami<6D>ljen da opi<70>e dovoljno komandi da biste
mogli lagodno da koristite Vim kao editor op<6F>te namene.
Pribli<6C>no vreme potrebno za uspe<70>an zavr<76>etak priru<72>nika je izme<6D>u
25 i 30 minuta, u zavisnosti od vremena potro<72>enog na ve<76>bu.
UPOZORENJE:
Komande u lekcijama <20>e menjati tekst. Iskopirajte ovaj fajl i
ve<76>bajte na kopiji (ako ste pokrenuli "vimtutor" ovo je ve<76> kopija).
Va<56>no je upamtiti da je ovaj priru<72>nik zami<6D>ljen za aktivnu ve<76>bu.
To zna<6E>i da morate upotrebljavati komande o kojima <20>itate da biste
ih nau<61>ili. Ako samo <20>itate tekst, zaboravi<76>ete komande!
Ako je Caps Lock uklju<6A>en ISKLJU<4A>ITE ga. Pritisnite taster j dovoljno
puta da lekcija 1.1 cela stane na ekran.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 1.1: POMERANJE KURSORA
** Za pomeranje kursora, pritiskajte tastere h,j,k,l kako je prikazano **
^
k Savet: h je s leve strane i pomera kursor u levo.
< h l > l je s desne strane i pomera kursor u desno.
j j izgleda kao strelica nani<6E>e.
v
1. Pomerajte kursor po ekranu dok se ne naviknete na komande.
2. Pritisnite taster (j) dok ne po<70>ne da se ponavlja.
Sada znate kako da do<64>ete do naredne lekcije.
3. Koriste<74>i taster j pre<72>ite na lekciju 1.2.
NAPOMENA: Ako niste sigurni <20>ta ste zapravo pritisnuli, pritisnite <ESC>
za prelazak u Normal mod i poku<6B>ajte ponovo.
NAPOMENA: Strelice tako<6B>e pomeraju kursor, ali kori<72><69>enje tastera hjkl je
znatno br<62>e, kad se jednom naviknete na njih. Zaista!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 1.2: IZLAZAK IZ VIM-a
!! UPOZORENJE: Pre izvo<76>enja bilo kog koraka, pro<72>itajte celu lekciju!!
1. Pritisnite <ESC> (editor je sada u Normal modu).
2. Otkucajte: :q! <ENTER>.
Ovime se izlazi iz editora, sa GUBITKOM svih izmena.
3. Kada se pojavi komandni prompt, unesite komandu koja je pokrenula
ovaj priru<72>nik: vimtutor <ENTER>
4. Ako ste upamtili ove korake, izvr<76>ite ih redom od 1 do 3 da biste
iza<7A>li iz editora i ponovo ga pokrenuli.
NAPOMENA: :q! <ENTER> poni<6E>tava sve izmene koje ste napravili.
U narednim lekcijama nau<61>i<EFBFBD>ete kako da sa<73>uvate izmene.
5. Pomerite kursor na lekciju 1.3.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 1.3: IZMENA TEKSTA - BRISANJE
** Pritisnite x za brisanje znaka pod kursorom. **
1. Pomerite kursor na red ozna<6E>en sa --->.
2. Da biste ispravili gre<72>ke, pomerajte kursor dok se
ne na<6E>e na slovu koje treba izbrisati.
3. Pritisnite taster x da izbri<72>ete ne<6E>eljeno slovo.
4. Ponavljajte korake od 2 do 4 dok ne ispravite sve gre<72>ke.
---> RRRibaa riibi grizzze rrreepp.
5. Kad ispravite red, pre<72>ite na lekciju 1.4.
NAPOMENA: Dok koristite priru<72>nik, nemojte u<>iti komande napamet,
ve<76> ve<76>bajte njihovu primenu.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 1.4: IZMENA TEKSTA - UBACIVANJE
** Pritisnite i za ubacivanje teksta ispred kursora. **
1. Pomerite kursor na prvi slede<64>i red ozna<6E>en sa --->.
2. Da biste tekst prvog reda izjedna<6E>ili s tekstom drugog, namestite
kursor na prvi znak POSLE kog <20>ete ubaciti potreban tekst.
3. Pritisnite i pa unesite potrebne dopune.
4. Po ispravci svake gre<72>ke pritisnite <ESC> da se vratite u Normal mod.
Ponovite korake od 2 do 4 da biste ispravili celu re<72>enicu.
---> Do teka neoje v red.
---> Deo teksta nedostaje iz ovog reda.
5. Pre<72>ite na slede<64>u lekciju.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 1.5: IZMENA TEKSTA - DODAVANJE
** Pritisnite A za dodavanje teksta. **
1. Pomerite kursor na prvi slede<64>i red ozna<6E>en sa --->.
Nije va<76>no gde se nalazi kursor u tom redu.
2. Pritisnite A i unesite dodatni tekst.
3. Po<50>to ste dodali tekst, pritisnite <ESC> za povratak u
Normal mod.
4. Pomerite kursor na drugi red ozna<6E>en sa ---> i ponavljajte
korake 2 i 3 dok ne ispravite tekst.
---> Deo teksta nedostaje u
Deo teksta nedostaje u ovom redu.
---> Deo teksta nedostaje
Deo teksta nedostaje i ovde.
5. Pre<72>ite na lekciju 1.6.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 1.6: IZMENA FAJLA
** Upotrebite :wq za snimanje teksta i izlazak iz editora. **
!! UPOZORENJE: Pre izvo<76>enja bilo kog koraka, pro<72>itajte celu lekciju!!
1. Iza<7A>ite iz editora kao u lekciji 1.2: :q!
2. Na komandnom promptu unesite slede<64>u komandu: vim tutor <ENTER>
'vim' je komanda za pokretanja Vim editora, 'tutor' je ime fajla koji
<20>elite da menjate. Koristite fajl koji imate pravo da menjate.
3. Ubacujte i bri<72>ite tekst kao u prethodnim lekcijama.
4. Snimite izmenjeni tekst i iza<7A>ite iz Vim-a: :wq <ENTER>
5. Ponovo pokrenite vimtutor i pro<72>itajte rezime koji sledi.
6. Po<50>to pro<72>itate korake iznad i u potpunosti ih razumete:
izvr<76>ite ih.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REZIME lekcije 1
1. Kursor se pomera strelicama ili pomo<6D>u tastera hjkl .
h (levo) j (dole) k (gore) l (desno)
2. Za pokretanje Vim-a iz shell-a: vim IME_FAJLA <ENTER>
3. Izlaz: <ESC> :q! <ENTER> sve promene su izgubljene.
ILI: <ESC> :wq <ENTER> promene su sa<73>uvane.
4. Brisanje znaka na kome se nalazi kursor: x
5. Ubacivanja ili dodavanje teksta:
i unesite tekst <ESC> unos ispred kursora
A unesite tekst <ESC> dodavanje na kraju reda
NAPOMENA: Pritiskom na <ESC> prebacujete Vim u Normal mod i
prekidate ne<6E>eljenu ili delimi<6D>no izvr<76>enu komandu.
Nastavite sa lekcijom 2.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 2.1: NAREDBE BRISANJA
** Otkucajte dw za brisanje re<72>i. **
1. Pritisnite <ESC> da biste bili sigurni da ste u Normal modu.
2. Pomerite kursor na red ozna<6E>en sa --->.
3. Pomerite kursor na po<70>etak re<72>i koju treba izbrisati.
4. Otkucajte dw da biste uklonili re<72>.
NAPOMENA: Slovo d <20>e se pojaviti na dnu ekrana kad ga otkucate. Vim <20>eka
da otkucate w . Ako je prikazano neko drugo slovo, pogre<72>ili ste u
kucanju; pritisnite <ESC> i poku<6B>ajte ponovo. (Ako se ne pojavi
ni<6E>ta, mo<6D>da je isklju<6A>ena opcija 'showcmd': vidi lekciju 6.5.)
---> Neke re<72>i sme<6D>no ne pripadaju na papir ovoj re<72>enici.
5. Ponavljajte korake 3 i 4 dok ne ispravite re<72>enicu, pa
pre<72>ite na lekciju 2.2.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 2.2: JO<4A> BRISANJA
** Otkucajte d$ za brisanje znakova do kraja reda. **
1. Pritisnite <ESC> da biste bili sigurni da ste u Normal modu.
2. Pomerite kursor na red ozna<6E>en sa --->.
3. Pomerite kursor do kraja ispravnog dela re<72>enice
(POSLE prve . ).
4. Otkucajte d$ za brisanje ostatka reda.
---> Neko je uneo kraj ovog reda dvaput. kraj ovog reda dvaput.
5. Pre<72>ite na lekciju 2.3 za podrobnije obja<6A>njenje.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 2.3: O OPERATORIMA I POKRETIMA
Mnoge komande za izmenu teksta sastoje se od operatora i pokreta.
Oblik komande brisanja sa d operatorom je slede<64>i:
d pokret
Pri <20>emu je:
d - operator brisanja.
pokret - ono na <20>emu <20>e se operacija izvr<76>avati (opisano u nastavku).
Kratak spisak pokreta:
w - sve do po<70>etka slede<64>e re<72>i, NE UKLJU<4A>UJU<4A>I prvo slovo.
e - sve do kraja teku<6B>e re<72>i, UKLJU<4A>UJU<4A>I poslednje slovo.
$ - sve do kraje reda, UKLJU<4A>UJU<4A>I poslednje slovo.
Kucanjem de brisa<73>e se tekst od kursora do kraja re<72>i.
NAPOMENA: Pritiskom samo na taster pokreta dok ste u Normal modu, bez
operatora, kursor se pomera kao <20>to je opisano.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 2.4: KORI<52><49>ENJE BROJANJA ZA POKRETE
** Uno<6E>enjem nekog broja pre pokreta, pokret se izvr<76>ava taj broj puta. **
1. Pomerite kursor na red ozna<6E>en sa --->.
2. Otkucajte 2w da pomerite kursor dve re<72>i napred.
3. Otkucajte 3e da pomerite kursor na kraj tre<72>e re<72>i napred.
4. Otkucajte 0 (nulu) da pomerite kursor na po<70>etak reda.
5. Ponovite korake 2 i 3 s nekim drugim brojevima.
---> Re<52>enica sa re<72>ima po kojoj mo<6D>ete pomerati kursor.
6. Pre<72>ite na lekciju 2.5.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 2.5: KORI<52><49>ENJE BROJANJA ZA VE<56>E BRISANJE
** Uno<6E>enje nekog broja s operatorom ponavlja operator taj broj puta. **
U kombinaciji operatora brisanja s pokretima spomenutim iznad
mo<6D>ete uneti broj pre pokreta da biste izbrisali vi<76>e znakova:
d broj pokret
1. Pomerite kursor na prvo slovo u re<72>i s VELIKIM SLOVIMA u redu
ozna<6E>enom sa --->.
2. Otkucajte d2w da izbri<72>ete dve re<72>i sa VELIKIM SLOVIMA
3. Ponovite korake 1 i 2 sa razli<6C>itim brojevima da izbri<72>ete
uzastopne re<72>i sa VELIKIM SLOVIMA kori<72><69>enjem samo jedne komande.
---> ovaj ABC<42><43> D<>E red FGHI JK LMN OP s re<72>ima je RS<52> TUVZ<56> ispravljen.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 2.6: OPERACIJE NAD REDOVIMA
** Otkucajte dd za brisanje celog reda. **
Zbog u<>estalosti brisanja celih redova, autori Vi-ja odlu<6C>ili su da
je lak<61>e brisati redove ako se otkuca d dvaput.
1. Pomerite kursor na drugi red u donjoj strofi.
2. Otkucajte dd da ga izbri<72>ete.
3. Pomerite kursor na <20>etvrti red.
4. Otkucajte 2dd da biste izbrisali dva reda.
---> 1) Sedlo mi je od marame,
---> 2) blato na sve strane,
---> 3) uzda od kanapa,
---> 4) auto mi je ovde,
---> 5) satovi pokazuju vreme,
---> 6) a bi<62> mi je od o<>ina
---> 7) prebijena <20>tapa.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 2.7: PONI<4E>TAVANJE PROMENA
** Pritisnite u za poni<6E>tavanje poslednje komande, U za ceo red. **
1. Pomerite kursor na red ozna<6E>en sa ---> i postavite ga na mesto
prve gre<72>ke.
2. Otkucajte x da izbri<72>ete prvi ne<6E>eljeni znak.
3. Otkucajte u da poni<6E>tite poslednju izvr<76>enu komandu.
4. Sad ispravite sve gre<72>ke u redu koriste<74>i komandu x .
5. Otkucajte veliko U da biste vratili sadr<64>aj reda u prvobitno
stanje.
6. Onda otkucajte u nekoliko puta da biste poni<6E>tili U
i prethodne komande.
7. Sad otkucajte CTRL-R (dr<64>e<EFBFBD>i CTRL dok pritiskate R)
nekoliko puta da biste vratili izmene (poni<6E>tili poni<6E>tavanja).
---> Iiisspravite gre<72>ke uu ovvom redu ii pooni<6E>titeee ih.
8. Ovo su veoma korisne komande. Pre<72>ite na rezime lekcije 2.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REZIME lekcije 2
1. Brisanje od kursora do slede<64>e re<72>i: dw
2. Brisanje od kursora do kraja reda: d$
3. Brisanje celog reda: dd
4. Za ponavljanje pokreta prethodno unesite broj: 2w
5. Oblik komande za izmenu:
operator [broj] pokret
gde je:
operator - <20>ta uraditi, recimo d za brisanje
[broj] - neobavezan broj ponavljanja pokreta
pokret - kretanje po tekstu na kome se radi,
kao <20>to je: w (re<72>), $ (kraj reda), itd.
6. Pomeranje kursora na po<70>etak reda: 0
7. Za poni<6E>tavanje prethodnih izmena, pritisnite: u (malo u)
Za poni<6E>tavanje svih promena u redu, pritisnite: U (veliko U)
Za vra<72>anja promena, otkucajte: CTRL-R
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 3.1: KOMANDA POSTAVLJANJA
** Otkucajte p da postavite prethodno izbrisan tekst iza kursora. **
1. Pomerite kursor na prvi slede<64>i red ozna<6E>en sa --->.
2. Otkucajte dd da izbri<72>ete red i smestite ga u Vim registar.
3. Pomerite kursor na red c), IZNAD mesta gde treba postaviti izbrisan red.
4. Otkucajte p da postavite red ispod kursora.
5. Ponavljajte korake 2 do 4 da biste postavili sve linije u pravilnom
redosledu.
---> d) prebijena <20>tapa.
---> b) uzda od kanapa,
---> c) a bi<62> mi je od o<>ina
---> a) Sedlo mi je od marame,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 3.2: KOMANDA ZAMENE
** Otkucajte rx da zamenite znak ispod kursora slovom x . **
1. Pomerite kursor na prvi slede<64>i red ozna<6E>en sa --->.
2. Pomerite kursor tako da se nalazi na prvoj gre<72>ci.
3. Otkucajte r i onda znak koji treba da tu stoji.
4. Ponavljajte korake 2 i 3 sve dok prvi red ne bude
isti kao drugi.
---> Kedi ju ovej red uga<67>en, nako je protresao pusta<74>ne testere!
---> Kada je ovaj red uno<6E>en, neko je pritiskao pogre<72>ne tastere!
5. Pre<72>ite na lekciju 3.2.
NAPOMENA: Setite se da treba da u<>ite ve<76>banjem, ne pam<61>enjem.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 3.3: OPERATOR IZMENE
** Za izmenu teksta do kraja re<72>i, otkucajte ce .**
1. Pomerite kursor na prvi slede<64>i red ozna<6E>en sa --->.
2. Postavite kursor na a u rakdur.
3. Otkucajte ce i ispravite re<72> (u ovom slu<6C>aju otkucajte ed ).
4. Pritisnite <ESC> i pomerite kursor na slede<64>i znak koji
treba ispraviti.
5. Ponavljajte korake 3 i 4 sve dok prva re<72>enica ne bude ista
kao druga.
---> Ovaj rakdur ima nekoliko rejga koje treflja isprpikati operagrom izmene.
---> Ovaj red ima nekoliko re<72>i koje treba ispraviti operatorom izmene.
Uo<EFBFBD>ite da ce bri<72>e re<72> i postavlja editor u Insert mod.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 3.4: DALJE IZMENE UPOTREBOM c
** Komanda izmene se koristi sa istim pokretima kao i brisanje. **
1. Operator izmene se koristi na isti na<6E>in kao i operator brisanja:
c [broj] pokret
2. Pokreti su isti, recimo: w (re<72>) i $ (kraj reda).
3. Pomerite kursor na prvi slede<64>i red ozna<6E>en sa --->.
4. Pomerite kursor na prvu gre<72>ku.
5. Otkucajte c$ i unesite ostatak reda tako da bude isti kao
drugi red, pa pritisnite <ESC>.
---> Kraj ovog reda treba izmeniti tako da izgleda kao red ispod.
---> Kraj ovog reda treba ispraviti kori<72><69>enjem c$ komande.
NAPOMENA: Za ispravljanje gre<72>aka mo<6D>ete koristiti Backspace .
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REZIME lekcije 3
1. Za postavljanje teksta koji ste upravo izbrisali, pritisnite p . Ovo
postavlja tekst IZA kursora (ako je bio izbrisan jedan ili vi<76>e redova
sadr<64>aj <20>e do<64>i na red ispod kursora).
2. Za zamenu znaka na kome se nalazi kursor, pritisnite r i onda
<20>eljeni znak.
3. Operator izmene dozvoljava promenu teksta od kursora do pozicije gde
se zavr<76>ava pokret. Primera radi, kucajte ce za izmenu od kursora do
kraja re<72>i, ili c$ za izmenu od kursora do kraja reda.
4. Oblik operacije izmene je:
c [broj] pokret
Pre<EFBFBD>ite na narednu lekciju.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 4.1: POZICIJA KURSORA I STATUS FAJLA
** Pritisnite CTRL-G za prikaz pozicije kursora u tekstu i status fajla.
Pritisnite G za pomeranje kursora na neki red u tekstu. **
NAPOMENA: Pro<72>itajte celu lekciju pre izvo<76>enja bilo kog koraka!!
1. Dr<44>ite taster CTRL i pritisnite g . Ovo zovemo CTRL-G.
Editor <20>e na dnu ekrana ispisati poruku sa imenom fajla i pozicijom
kursora u tekstu. Zapamtite broj reda za 3. korak.
NAPOMENA: U donjem desnom uglu mo<6D>e se videti poziciju kursora ako je
uklju<6A>ena opcija 'ruler' (vidi :help ruler ili lekciju 6.5.)
2. Pritisnite G za pomeranje kursora na kraj teksta.
Pritisnite 1G ili gg za pomranje kursora na po<70>etak teksta.
3. Otkucajte broj reda na kome ste malopre bili i onda G . Kursor
<20>e se vratiti na red na kome je bio kad ste otkucali CTRL-G.
4. Ako ste spremni, izvr<76>ite korake od 1 do 3.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 4.2: KOMANDE PRETRA<52>IVANJA
** Otkucajte / i onda izraz koji <20>elite da potra<72>ite. **
1. U Normal modu otkucajte znak / . Primietite da se znak pojavio
zajedno sa kursorom na dnu ekrana kao i kod komande : .
2. Sada otkucajte 'grrre<72>ka' <ENTER>. (Bez razmaka i navodnika.)
To je re<72> koju tra<72>ite.
3. Za ponovno tra<72>enje istog izraza, otkucajte n .
Za tra<72>enje istog izraza u suprotnom smeru, otkucajte N .
4. Za tra<72>enje izraza unatrag, koristite ? umesto / .
5. Za povratak na prethodnu poziciju otkucajte CTRL-O (dr<64>ite CTRL dok
pritiskate O ). Ponavljajte za ranije pozicije. CTRL-I ide napred.
---> "grrre<72>ka" je pogre<72>no; umesto grrre<72>ka treba da stoji gre<72>ka.
NAPOMENA: Ako pretraga do<64>e do kraja teksta tra<72>enje <20>e se nastaviti od
njegovog po<70>etka osim ako je opcija 'wrapscan' isklju<6A>ena.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 4.3: TRA<52>ENJE PARA ZAGRADE
** Otkucajte % za nala<6C>enje para ), ] ili } . **
1. Postavite kursor na bilo koju od ( , [ ili {
otvorenih zagrada u redu ozna<6E>enom sa --->.
2. Otkucajte znak % .
3. Kursor <20>e se pomeriti na odgovaraju<6A>u zatvorenu zagradu.
4. Otkucajte % da pomerite kursor na prvu zagradu u paru.
5. Pomerite kursor na neku od (,),[,],{ ili } i ponovite komandu % .
---> Red ( testiranja obi<62>nih ( [ uglastih ] i { viti<74>astih } zagrada.))
NAPOMENA: Vrlo korisno u ispravljanju koda sa rasparenim zagradama!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 4.4: KOMANDA ZAMENE
** Otkucajte :s/staro/novo/g da zamenite 'staro' za 'novo'. **
1. Pomerite kursor na red ozna<6E>en sa --->.
2. Otkucajte :s/rdi/ri/ <ENTER> . Primetite da ova komanda zamenjuje
samo prvo "rdi" u redu.
3. Otkucajte :s/rdi/ri/g . Dodavanje opcije g zna<6E>i da <20>e se komanda
izvr<76>iti u celom redu, zamenom svih pojava niza "rdi".
---> rdiba rdibi grdize rep.
4. Za zamenu svih izraza izme<6D>u neka dva reda,
otkucajte :#,#s/staro/novo/g gde su #,# krajnji brojevi redova u opsegu
u kome <20>e se obaviti zamena.
Otkucajte :%s/staro/novo/g za zamenu svih izraza u celom tekstu.
Otkucajte :%s/staro/novo/gc za nala<6C>enje svih izraza u tekstu i
potvrdu zamene.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REZIME lekcije 4
1. CTRL-G prikazuje poziciju kursora u tekstu i status fajla.
G pomera kursor na kraj teksta.
broj G pomera kursor na navedeni red.
gg pomera kursor na prvi red teksta.
2. Kucanjem / sa izrazom taj izraz se tra<72>i UNAPRED.
Kucanjem ? sa izrazom taj izraz se tra<72>i UNAZAD.
Posle komande tra<72>enja koristite n za nala<6C>enje izraza u istom
smeru, a N za nala<6C>enje u suprotnom smeru.
CTRL-O vra<72>a kursor na prethodnu poziciju, a CTRL-I na narednu.
3. Kucanjem % kad je kursor na zagradi on se pomera na njen par.
4. Za zamenu prvog izraza staro za izraz novo :s/staro/novo/
Za zamenu svih izraza u celom redu :s/staro/novo/g
Za zamenu svih izraza u opsegu linija #,# :#,#s/staro/novo/g
Za zamenu u celom tekstu :%s/staro/novo/g
Za potvrdu svake zamene dodajte 'c' :%s/staro/novo/gc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 5.1: IZVR<56>AVANJE SPOLJA<4A>NJIH KOMANDI
** Otkucajte :! pa spolja<6A>nju komandu koju <20>elite da izvr<76>ite. **
1. Otkucajte poznatu komandu : da biste namestili kursor na dno
ekrana. Time omogu<67>avate unos komande u komandnoj liniji editora.
2. Otkucajte znak ! (uzvi<76>nik). Ovime omogu<67>avate
izvr<76>avanje bilo koje spolja<6A>nje komande.
3. Kao primer otkucajte ls posle ! i pritisnite <ENTER>. Ovo <20>e
prikazati sadr<64>aj direktorijuma, kao da ste na komandnom promptu.
Otkucajte :!dir ako :!ls ne radi.
NAPOMENA: Na ovaj na<6E>in mogu<67>e je izvr<76>iti bilo koju spolja<6A>nju komandu,
zajedno sa njenim argumentima.
NAPOMENA: Sve : komande se izvr<76>avaju po<70>to pritisnete <ENTER> .
U daljem tekstu to ne<6E>emo uvek napominjati.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 5.2: VI<56>E O SNIMANJU FAJLOVA
** Za snimanje promena, otkucajte :w IME_FAJLA . **
1. Otkucajte :!dir ili :!ls za pregled sadr<64>aja direktorijuma.
Ve<56> znate da morate pritisnuti <ENTER> posle toga.
2. Izaberite ime fajla koji jo<6A> ne postoji, npr. TEST.
3. Otkucajte: :w TEST (gde je TEST ime koje ste izabrali.)
4. Time <20>ete snimiti ceo fajl (Vim Tutor) pod imenom TEST.
Za proveru, otkucajte opet :!dir ili :!ls za pregled
sadr<64>aja direktorijuma.
NAPOMENA: Ako biste napustili Vim i ponovo ga pokrenuli sa vim TEST ,
tekst bi bio ta<74>na kopija ovog fajla u trenutku kad ste
ga snimili.
5. Izbri<72>ite fajl tako <20>to <20>ete otkucati (MS-DOS): :!del TEST
ili (Unix): :!rm TEST
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 5.3: SNIMANJE OZNA<4E>ENOG TEKSTA
** Da biste snimili deo teksta, otkucajte v pokret :w IME_FAJLA **
1. Pomerite kursor na ovu liniju.
2. Pritisnite v i pomerite kursor pet redova ispod. Primetite da je
tekst ozna<6E>en inverzno.
3. Pritisnite : . Na dnu ekrana pojavi<76>e se :'<,'> .
4. Otkucajte w TEST , gde je TEST ime fajla koji jo<6A> ne postoji.
Proverite da zaista pi<70>e :'<,'>w TEST pre nego <20>to pritisnete <ENTER>.
5. Vim <20>e snimiti ozna<6E>eni tekst u TEST. Proverite sa :!dir ili !ls .
Nemojte jo<6A> brisati fajl! Koristi<74>emo ga u narednoj lekciji.
NAPOMENA: Komanda v zapo<70>inje vizuelno ozna<6E>avanje. Mo<4D>ete pomerati kursor
i tako menjati veli<6C>inu ozna<6E>enog teksta. Onda mo<6D>ete upotrebiti
operatore nad tekstom. Na primer, d <20>e izbrisati ozna<6E>eni tekst.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 5.4: U<>ITAVANJE FAJLA U TEKST
** Za ubacivanje sadr<64>aja fajla, otkucajte :r IME_FAJLA **
1. Postavite kursor iznad ove linije.
NAPOMENA: Po<50>to izvr<76>ite 2. korak vide<64>ete tekst iz lekcije 5.3. Tada
pomerite kursor DOLE da biste ponovo videli ovu lekciju.
2. U<>itajte fajl TEST koriste<74>i komandu :r TEST gde je TEST ime fajla
koje ste koristili u prethodnoj lekciji. Sadr<64>aj u<>itanog fajla je
uba<62>en ispod kursora.
3. Da biste proverili da je fajl u<>itan, vratite kursor unazad i
primetite dve kopije lekcije 5.3, originalnu i onu iz fajla.
NAPOMENA: Tako<6B>e mo<6D>ete u<>itati izlaz spolja<6A>nje komande. Na primer,
:r !ls <20>e u<>itati izlaz komande ls i postaviti ga ispod
kursora.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REZIME lekcije 5
1. :!komanda izvr<76>ava spolja<6A>nju komandu.
Korisni primeri:
(MS-DOS) (Unix)
:!dir :!ls - pregled sadr<64>aja direktorijuma.
:!del FAJL :!rm FAJL - bri<72>e fajl FAJL.
2. :w FAJL zapisuje trenutni tekst na disk pod imenom FAJL.
3. v pokret :w IME_FAJLA snima vizuelno ozna<6E>ene redove u fajl
IME_FAJLA.
4. :r IME_FAJLA u<>itava fajl IME_FAJLA sa diska i stavlja
njegov sadr<64>aj ispod kursora.
5. :r !dir u<>itava izlaz komande dir i postavlja ga ispod kursora.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 6.1: KOMANDA OTVORI
** Pritisnite o da biste otvorili red ispod kursora
i pre<72>li u Insert mod. **
1. Pomerite kursor na slede<64>i red ozna<6E>en sa --->.
2. Otkucajte malo o da biste otvorili novi red ISPOD kursora
i pre<72>li u Insert mod.
3. Otkucajte neki tekst i onda pritisnite <ESC> da biste iza<7A>li
iz Insert moda.
---> Kad pritisnete o kursor prelazi u novootvoreni red u Insert modu.
4. Za otvaranje reda IZNAD kursora, umesto malog otkucajte veliko O .
Isprobajte na donjem redu ozna<6E>enom sa --->.
---> Otvorite red iznad ovog kucanjem velikog O dok je kursor u ovom redu.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 6.2: KOMANDA DODAJ
** Otkucajte a za dodavanje teksta IZA kursora. **
1. Pomerite kursor na po<70>etak slede<64>eg reda ozna<6E>enog sa --->.
2. Kucajte e dok kursor ne do<64>e na kraj re<72>i re .
3. Otkucajte a (malo) da biste dodali tekst IZA kursora.
4. Dopunite re<72> kao <20>to je u redu ispod. Pritisnite <ESC> za izlazak
iz Insert moda.
5. Sa e pre<72>ite na narednu nepotpunu re<72> i ponovite korake 3 i 4.
---> Ovaj re omogu<67>ava ve dodav teksta u nekom redu.
---> Ovaj red omogu<67>ava ve<76>banje dodavanja teksta u nekom redu.
NAPOMENA: Komande a, i, i A aktiviraju isti Insert mod, jedina
razlika je u poziciji od koje <20>e se tekst ubacivati.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 6.3: DRUGI NA<4E>IN ZAMENE
** Otkucajte veliko R da biste zamenili vi<76>e od jednog znaka. **
1. Pomerite kursor na prvi slede<64>i red ozna<6E>en sa --->.
Pomerite kursor na po<70>etak prvog xxx .
2. Pritisnite R i otkucajte broj koji je red ispod,
tako da zameni xxx .
3. Pritisnite <ESC> za izlazak iz Replace moda.
Primetite da je ostatak reda ostao nepromenjen.
4. Ponovite korake da biste zamenili drugo xxx.
---> Dodavanje 123 na xxx daje xxx.
---> Dodavanje 123 na 456 daje 579.
NAPOMENA: Replace mod je kao Insert mod, s tom razlikom <20>to svaki
uneti znak bri<72>e ve<76> postoje<6A>i.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 6.4: KOPIRANJE I LEPLJENJE TEKSTA
** Koristite operator y za kopiranje a p za lepljenje teksta. **
1. Pomerite kursor na red sa ---> i postavite kursor posle "a)".
2. Aktivirajte Visual mod sa v i pomerite kursor sve do ispred "prvi".
3. Pritisnite y da biste kopirali ozna<6E>eni tekst u interni bafer.
4. Pomerite kursor do kraja slede<64>eg reda: j$
5. Pritisnite p da biste zalepili tekst. Onda otkucajte: a drugi <ESC> .
6. Upotrebite Visual mod da ozna<6E>ite " red.", kopirajte sa y , kursor
pomerite na kraj slede<64>eg reda sa j$ i tamo zalepite tekst sa p .
---> a) ovo je prvi red.
b)
NAPOMENA: tako<6B>e mo<6D>ete koristiti y kao operator; yw kopira jednu re<72>.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 6.5: POSTAVLJANJE OPCIJA
** Postavite opciju tako da tra<72>enje i zamena ignori<72>u veli<6C>inu slova **
1. Potra<72>ite re<72> 'razlika': /razlika <ENTER>
Ponovite nekoliko puta pritiskom na n .
2. Aktivirajte opciju 'ic' (Ignore case): :set ic
3. Ponovo potra<72>ite re<72> 'razlika' pritiskom na n
Primetite da su sada prona<6E>eni i RAZLIKA i Razlika.
4. Aktivirajte opcije 'hlsearch' i 'incsearch': :set hls is
5. Ponovo otkucajte komandu tra<72>enja i uo<75>ite razlike: /razlika <ENTER>
6. Za deaktiviranje opcije ic kucajte: :set noic
NAPOMENA: Za neozna<6E>avanje prona<6E>enih izraza otkucajte: :nohlsearch
NAPOMENA: Ako <20>elite da ne razlikujete veli<6C>inu slova u samo jednoj komandi
tra<72>enja, dodajte \c u izraz: /razlika\c <ENTER>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REZIME lekcije 6
1. Pritisnite o za otvaranje reda ISPOD kursora i prelazak u Insert mod.
Pritisnite O za otvaranje reda IZNAD kursora.
2. Pritisnite a za unos teksta IZA kursora.
Pritisnite A za unos teksta na kraju reda.
3. Komanda e pomera kursor na kraj re<72>i.
4. Operator y kopira tekst, p ga lepi.
5. Kucanje velikog R aktivira Replace mod dok ne pritisnete <ESC> .
6. Kucanje ":set xxx" aktivira opciju "xxx". Neke opcije su:
'ic' 'ignorecase' ne razlikuje velika/mala slova pri tra<72>enju
'is' 'incsearch' prikazuje prona<6E>en tekst dok kucate izraz
'hls' 'hlsearch' ozna<6E>ava inverzno sve prona<6E>ene izraze
Mo<4D>ete koristite dugo ili kratko ime opcije.
7. Ispred imena opcije stavite "no" da je deaktivirate: :set noic
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 7.1: DOBIJANJE POMO<4D>I
** Koristite on-line sistem za pomo<6D> **
Vim ima detaljan on-line sistem za pomo<6D>. Za po<70>etak, poku<6B>ajte ne<6E>to
od slede<64>eg:
- pritisnite taster <HELP> (ako ga imate na tastaturi)
- pritisnite taster <F1> (ako ga imate na tastaturi)
- otkucajte :help <ENTER>
Pro<72>itajte tekst u prozoru pomo<6D>i da biste nau<61>ili pomo<6D> radi.
Kucanjem CTRL-W CTRL-W prelazite iz jednog prozora u drugi.
Otkucajte :q <ENTER> da zatvorite prozor pomo<6D>i.
Pomo<6D> o prakti<74>no bilo kojoj temi mo<6D>ete dobiti dodavanjem argumenta
komandi ":help". Poku<6B>ajte ovo (ne zaboravite <ENTER> na kraju):
:help w
:help c_CTRL-D
:help insert-index
:help user-manual
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 7.2: PRAVLJENJE STARTNOG SKRIPTA
** Aktivirajte mogu<67>nosti editora **
Vim ima mnogo vi<76>e mogu<67>nosti nego Vi, ali ve<76>ina nije automatski
aktivirana. Za dodatne mogu<67>nosti napravite "vimrc" fajl.
1. Otvorite "vimrc" fajl. Ovo zavisi od va<76>eg sistema:
:e ~/.vimrc za Unix
:e $VIM/_vimrc za MS-Windows
2. Onda u<>itajte primer sadr<64>aja "vimrc" fajla:
:r $VIMRUNTIME/vimrc_example.vim
3. Snimite fajl sa:
:w
Slede<64>i put kada pokrenete Vim, bojenje sintakse teksta bi<62>e
aktivirano. Sva svoja pode<64>avanja mo<6D>ete dodati u "vimrc" fajl.
Za vi<76>e informacija otkucajte :help vimrc-intro
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 7.3: AUTOMATSKO DOVR<56>AVANJE
** Dovr<76>avanje komandne linije sa CTRL-D i <TAB> **
1. Podesite Vim da ne bude u Vi-kompatibilnom modu: :set nocp
2. Pogledajte koji fajlovi postoje u direktorijumu: :!ls ili :!dir
3. Otkucajte po<70>etak komande: :e
4. Otkucajte CTRL-D i Vim <20>e prikazati spisak komandi koje po<70>inju sa "e".
5. Pritisnite <TAB> i Vim <20>e dopuniti ime komande u ":edit".
6. Dodajte razmak i po<70>etak imena postoje<6A>eg fajla: :edit FA
7. Pritisnite <TAB>. Vim <20>e dopuniti ime fajla (ako je jedinstveno).
NAPOMENA: Mogu<67>e je dopuniti mnoge komande. Samo probajte CTRL-D i <TAB>.
Naro<72>ito je korisno za :help komande.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REZIME lekcije 7
1. Otkucajte :help ili pritisnite <F1> ili <Help> za pomo<6D>.
2. Otkucajte :help komanda biste dobili pomo<6D> za tu komandu.
3. Otkucajte CTRL-W CTRL-W za prelazak u drugi prozor.
4. Otkucajte :q da zatvorite prozor pomo<6D>i.
5. Napravite vimrc startni skript za aktiviranje pode<64>avanja koja
vam odgovaraju.
6. Dok kucate neku od : komandi, pritisnite CTRL-D da biste videli mogu<67>e
vrednosti. Pritisnite <TAB> da odaberete jednu od njih.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ovim je priru<72>nik zavr<76>en. Njegov cilj je bio kratak pregled Vim editora,
koliko da omogu<67>i njegovo relativno jednostavno kori<72><69>enje. Priru<72>nik nije
potpun, jer Vim ima mnogo vi<76>e komandi. Kao slede<64>e, pro<72>itajte priru<72>nik:
":help user-manual".
Za dalje <20>itanje i u<>enje, preporu<72>ujemo knjigu:
Vim - Vi Improved - by Steve Oualline
Izdava<76>: New Riders
Prva knjiga potpuno posve<76>ena Vim-u. Naro<72>ito korisna za po<70>etnike.
Ima mno<6E>tvo primera i slika.
Vidite http://iccf-holland.org/click5.html
Slede<64>a knjiga je starija i vi<76>e govori o Vi-u nego o Vim-u, ali je tako<6B>e
preporu<72>ujemo:
Learning the Vi Editor - by Linda Lamb
Izdava<76>: O'Reilly & Associates Inc.
Dobra knjiga iz koje mo<6D>ete saznati skoro sve <20>to mo<6D>ete raditi u Vi-ju.
<20>esto izdanje ima i informacija o Vim-u.
Ovaj priru<72>nik su napisali: Michael C. Pierce i Robert K. Ware,
Colorado School of Mines koriste<74>i ideje Charlesa Smitha,
Colorado State University. E-mail: bware@mines.colorado.edu.
Prilago<67>avanje za Vim uradio je Bram Moolenaar.
Prevod na srpski: Ivan Nejgebauer <ian@uns.ac.rs>
Verzija 1.0, maj/juni 2014.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -0,0 +1,971 @@
===============================================================================
= D o b r o d o š l i u VIM p r i r u č n i k - Verzija 1.7 =
===============================================================================
Vim je moćan editor sa mnogo komandi, suviše da bismo ih ovde sve
opisali. Priručnik je zamišljen da opiše dovoljno komandi da biste
mogli lagodno da koristite Vim kao editor opšte namene.
Približno vreme potrebno za uspešan završetak priručnika je između
25 i 30 minuta, u zavisnosti od vremena potrošenog na vežbu.
UPOZORENJE:
Komande u lekcijama će menjati tekst. Iskopirajte ovaj fajl i
vežbajte na kopiji (ako ste pokrenuli "vimtutor" ovo je već kopija).
Važno je upamtiti da je ovaj priručnik zamišljen za aktivnu vežbu.
To znači da morate upotrebljavati komande o kojima čitate da biste
ih naučili. Ako samo čitate tekst, zaboravićete komande!
Ako je Caps Lock uključen ISKLJUČITE ga. Pritisnite taster j dovoljno
puta da lekcija 1.1 cela stane na ekran.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 1.1: POMERANJE KURSORA
** Za pomeranje kursora, pritiskajte tastere h,j,k,l kako je prikazano **
^
k Savet: h je s leve strane i pomera kursor u levo.
< h l > l je s desne strane i pomera kursor u desno.
j j izgleda kao strelica naniže.
v
1. Pomerajte kursor po ekranu dok se ne naviknete na komande.
2. Pritisnite taster (j) dok ne počne da se ponavlja.
Sada znate kako da dođete do naredne lekcije.
3. Koristeći taster j pređite na lekciju 1.2.
NAPOMENA: Ako niste sigurni šta ste zapravo pritisnuli, pritisnite <ESC>
za prelazak u Normal mod i pokušajte ponovo.
NAPOMENA: Strelice takođe pomeraju kursor, ali korišćenje tastera hjkl je
znatno brže, kad se jednom naviknete na njih. Zaista!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 1.2: IZLAZAK IZ VIM-a
!! UPOZORENJE: Pre izvođenja bilo kog koraka, pročitajte celu lekciju!!
1. Pritisnite <ESC> (editor je sada u Normal modu).
2. Otkucajte: :q! <ENTER>.
Ovime se izlazi iz editora, sa GUBITKOM svih izmena.
3. Kada se pojavi komandni prompt, unesite komandu koja je pokrenula
ovaj priručnik: vimtutor <ENTER>
4. Ako ste upamtili ove korake, izvršite ih redom od 1 do 3 da biste
izašli iz editora i ponovo ga pokrenuli.
NAPOMENA: :q! <ENTER> poništava sve izmene koje ste napravili.
U narednim lekcijama naučićete kako da sačuvate izmene.
5. Pomerite kursor na lekciju 1.3.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 1.3: IZMENA TEKSTA - BRISANJE
** Pritisnite x za brisanje znaka pod kursorom. **
1. Pomerite kursor na red označen sa --->.
2. Da biste ispravili greške, pomerajte kursor dok se
ne nađe na slovu koje treba izbrisati.
3. Pritisnite taster x da izbrišete neželjeno slovo.
4. Ponavljajte korake od 2 do 4 dok ne ispravite sve greške.
---> RRRibaa riibi grizzze rrreepp.
5. Kad ispravite red, pređite na lekciju 1.4.
NAPOMENA: Dok koristite priručnik, nemojte učiti komande napamet,
već vežbajte njihovu primenu.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 1.4: IZMENA TEKSTA - UBACIVANJE
** Pritisnite i za ubacivanje teksta ispred kursora. **
1. Pomerite kursor na prvi sledeći red označen sa --->.
2. Da biste tekst prvog reda izjednačili s tekstom drugog, namestite
kursor na prvi znak POSLE kog ćete ubaciti potreban tekst.
3. Pritisnite i pa unesite potrebne dopune.
4. Po ispravci svake greške pritisnite <ESC> da se vratite u Normal mod.
Ponovite korake od 2 do 4 da biste ispravili celu rečenicu.
---> Do teka neoje v red.
---> Deo teksta nedostaje iz ovog reda.
5. Pređite na sledeću lekciju.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 1.5: IZMENA TEKSTA - DODAVANJE
** Pritisnite A za dodavanje teksta. **
1. Pomerite kursor na prvi sledeći red označen sa --->.
Nije važno gde se nalazi kursor u tom redu.
2. Pritisnite A i unesite dodatni tekst.
3. Pošto ste dodali tekst, pritisnite <ESC> za povratak u
Normal mod.
4. Pomerite kursor na drugi red označen sa ---> i ponavljajte
korake 2 i 3 dok ne ispravite tekst.
---> Deo teksta nedostaje u
Deo teksta nedostaje u ovom redu.
---> Deo teksta nedostaje
Deo teksta nedostaje i ovde.
5. Pređite na lekciju 1.6.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 1.6: IZMENA FAJLA
** Upotrebite :wq za snimanje teksta i izlazak iz editora. **
!! UPOZORENJE: Pre izvođenja bilo kog koraka, pročitajte celu lekciju!!
1. Izađite iz editora kao u lekciji 1.2: :q!
2. Na komandnom promptu unesite sledeću komandu: vim tutor <ENTER>
'vim' je komanda za pokretanja Vim editora, 'tutor' je ime fajla koji
želite da menjate. Koristite fajl koji imate pravo da menjate.
3. Ubacujte i brišite tekst kao u prethodnim lekcijama.
4. Snimite izmenjeni tekst i izađite iz Vim-a: :wq <ENTER>
5. Ponovo pokrenite vimtutor i pročitajte rezime koji sledi.
6. Pošto pročitate korake iznad i u potpunosti ih razumete:
izvršite ih.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REZIME lekcije 1
1. Kursor se pomera strelicama ili pomoću tastera hjkl .
h (levo) j (dole) k (gore) l (desno)
2. Za pokretanje Vim-a iz shell-a: vim IME_FAJLA <ENTER>
3. Izlaz: <ESC> :q! <ENTER> sve promene su izgubljene.
ILI: <ESC> :wq <ENTER> promene su sačuvane.
4. Brisanje znaka na kome se nalazi kursor: x
5. Ubacivanja ili dodavanje teksta:
i unesite tekst <ESC> unos ispred kursora
A unesite tekst <ESC> dodavanje na kraju reda
NAPOMENA: Pritiskom na <ESC> prebacujete Vim u Normal mod i
prekidate neželjenu ili delimično izvršenu komandu.
Nastavite sa lekcijom 2.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 2.1: NAREDBE BRISANJA
** Otkucajte dw za brisanje reči. **
1. Pritisnite <ESC> da biste bili sigurni da ste u Normal modu.
2. Pomerite kursor na red označen sa --->.
3. Pomerite kursor na početak reči koju treba izbrisati.
4. Otkucajte dw da biste uklonili reč.
NAPOMENA: Slovo d će se pojaviti na dnu ekrana kad ga otkucate. Vim čeka
da otkucate w . Ako je prikazano neko drugo slovo, pogrešili ste u
kucanju; pritisnite <ESC> i pokušajte ponovo. (Ako se ne pojavi
ništa, možda je isključena opcija 'showcmd': vidi lekciju 6.5.)
---> Neke reči smešno ne pripadaju na papir ovoj rečenici.
5. Ponavljajte korake 3 i 4 dok ne ispravite rečenicu, pa
pređite na lekciju 2.2.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 2.2: JOŠ BRISANJA
** Otkucajte d$ za brisanje znakova do kraja reda. **
1. Pritisnite <ESC> da biste bili sigurni da ste u Normal modu.
2. Pomerite kursor na red označen sa --->.
3. Pomerite kursor do kraja ispravnog dela rečenice
(POSLE prve . ).
4. Otkucajte d$ za brisanje ostatka reda.
---> Neko je uneo kraj ovog reda dvaput. kraj ovog reda dvaput.
5. Pređite na lekciju 2.3 za podrobnije objašnjenje.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 2.3: O OPERATORIMA I POKRETIMA
Mnoge komande za izmenu teksta sastoje se od operatora i pokreta.
Oblik komande brisanja sa d operatorom je sledeći:
d pokret
Pri čemu je:
d - operator brisanja.
pokret - ono na čemu će se operacija izvršavati (opisano u nastavku).
Kratak spisak pokreta:
w - sve do početka sledeće reči, NE UKLJUČUJUĆI prvo slovo.
e - sve do kraja tekuće reči, UKLJUČUJUĆI poslednje slovo.
$ - sve do kraje reda, UKLJUČUJUĆI poslednje slovo.
Kucanjem de brisaće se tekst od kursora do kraja reči.
NAPOMENA: Pritiskom samo na taster pokreta dok ste u Normal modu, bez
operatora, kursor se pomera kao što je opisano.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 2.4: KORIŠĆENJE BROJANJA ZA POKRETE
** Unošenjem nekog broja pre pokreta, pokret se izvršava taj broj puta. **
1. Pomerite kursor na red označen sa --->.
2. Otkucajte 2w da pomerite kursor dve reči napred.
3. Otkucajte 3e da pomerite kursor na kraj treće reči napred.
4. Otkucajte 0 (nulu) da pomerite kursor na početak reda.
5. Ponovite korake 2 i 3 s nekim drugim brojevima.
---> Rečenica sa rečima po kojoj možete pomerati kursor.
6. Pređite na lekciju 2.5.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 2.5: KORIŠĆENJE BROJANJA ZA VEĆE BRISANJE
** Unošenje nekog broja s operatorom ponavlja operator taj broj puta. **
U kombinaciji operatora brisanja s pokretima spomenutim iznad
možete uneti broj pre pokreta da biste izbrisali više znakova:
d broj pokret
1. Pomerite kursor na prvo slovo u reči s VELIKIM SLOVIMA u redu
označenom sa --->.
2. Otkucajte d2w da izbrišete dve reči sa VELIKIM SLOVIMA
3. Ponovite korake 1 i 2 sa različitim brojevima da izbrišete
uzastopne reči sa VELIKIM SLOVIMA korišćenjem samo jedne komande.
---> ovaj ABCČĆ DĐE red FGHI JK LMN OP s rečima je RSŠ TUVZŽ ispravljen.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 2.6: OPERACIJE NAD REDOVIMA
** Otkucajte dd za brisanje celog reda. **
Zbog učestalosti brisanja celih redova, autori Vi-ja odlučili su da
je lakše brisati redove ako se otkuca d dvaput.
1. Pomerite kursor na drugi red u donjoj strofi.
2. Otkucajte dd da ga izbrišete.
3. Pomerite kursor na četvrti red.
4. Otkucajte 2dd da biste izbrisali dva reda.
---> 1) Sedlo mi je od marame,
---> 2) blato na sve strane,
---> 3) uzda od kanapa,
---> 4) auto mi je ovde,
---> 5) satovi pokazuju vreme,
---> 6) a bič mi je od očina
---> 7) prebijena štapa.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 2.7: PONIŠTAVANJE PROMENA
** Pritisnite u za poništavanje poslednje komande, U za ceo red. **
1. Pomerite kursor na red označen sa ---> i postavite ga na mesto
prve greške.
2. Otkucajte x da izbrišete prvi neželjeni znak.
3. Otkucajte u da poništite poslednju izvršenu komandu.
4. Sad ispravite sve greške u redu koristeći komandu x .
5. Otkucajte veliko U da biste vratili sadržaj reda u prvobitno
stanje.
6. Onda otkucajte u nekoliko puta da biste poništili U
i prethodne komande.
7. Sad otkucajte CTRL-R (držeći CTRL dok pritiskate R)
nekoliko puta da biste vratili izmene (poništili poništavanja).
---> Iiisspravite greške uu ovvom redu ii pooništiteee ih.
8. Ovo su veoma korisne komande. Pređite na rezime lekcije 2.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REZIME lekcije 2
1. Brisanje od kursora do sledeće reči: dw
2. Brisanje od kursora do kraja reda: d$
3. Brisanje celog reda: dd
4. Za ponavljanje pokreta prethodno unesite broj: 2w
5. Oblik komande za izmenu:
operator [broj] pokret
gde je:
operator - šta uraditi, recimo d za brisanje
[broj] - neobavezan broj ponavljanja pokreta
pokret - kretanje po tekstu na kome se radi,
kao što je: w (reč), $ (kraj reda), itd.
6. Pomeranje kursora na početak reda: 0
7. Za poništavanje prethodnih izmena, pritisnite: u (malo u)
Za poništavanje svih promena u redu, pritisnite: U (veliko U)
Za vraćanja promena, otkucajte: CTRL-R
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 3.1: KOMANDA POSTAVLJANJA
** Otkucajte p da postavite prethodno izbrisan tekst iza kursora. **
1. Pomerite kursor na prvi sledeći red označen sa --->.
2. Otkucajte dd da izbrišete red i smestite ga u Vim registar.
3. Pomerite kursor na red c), IZNAD mesta gde treba postaviti izbrisan red.
4. Otkucajte p da postavite red ispod kursora.
5. Ponavljajte korake 2 do 4 da biste postavili sve linije u pravilnom
redosledu.
---> d) prebijena štapa.
---> b) uzda od kanapa,
---> c) a bič mi je od očina
---> a) Sedlo mi je od marame,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 3.2: KOMANDA ZAMENE
** Otkucajte rx da zamenite znak ispod kursora slovom x . **
1. Pomerite kursor na prvi sledeći red označen sa --->.
2. Pomerite kursor tako da se nalazi na prvoj grešci.
3. Otkucajte r i onda znak koji treba da tu stoji.
4. Ponavljajte korake 2 i 3 sve dok prvi red ne bude
isti kao drugi.
---> Kedi ju ovej red ugašen, nako je protresao pustašne testere!
---> Kada je ovaj red unošen, neko je pritiskao pogrešne tastere!
5. Pređite na lekciju 3.2.
NAPOMENA: Setite se da treba da učite vežbanjem, ne pamćenjem.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 3.3: OPERATOR IZMENE
** Za izmenu teksta do kraja reči, otkucajte ce .**
1. Pomerite kursor na prvi sledeći red označen sa --->.
2. Postavite kursor na a u rakdur.
3. Otkucajte ce i ispravite reč (u ovom slučaju otkucajte ed ).
4. Pritisnite <ESC> i pomerite kursor na sledeći znak koji
treba ispraviti.
5. Ponavljajte korake 3 i 4 sve dok prva rečenica ne bude ista
kao druga.
---> Ovaj rakdur ima nekoliko rejga koje treflja isprpikati operagrom izmene.
---> Ovaj red ima nekoliko reči koje treba ispraviti operatorom izmene.
Uočite da ce briše reč i postavlja editor u Insert mod.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 3.4: DALJE IZMENE UPOTREBOM c
** Komanda izmene se koristi sa istim pokretima kao i brisanje. **
1. Operator izmene se koristi na isti način kao i operator brisanja:
c [broj] pokret
2. Pokreti su isti, recimo: w (reč) i $ (kraj reda).
3. Pomerite kursor na prvi sledeći red označen sa --->.
4. Pomerite kursor na prvu grešku.
5. Otkucajte c$ i unesite ostatak reda tako da bude isti kao
drugi red, pa pritisnite <ESC>.
---> Kraj ovog reda treba izmeniti tako da izgleda kao red ispod.
---> Kraj ovog reda treba ispraviti korišćenjem c$ komande.
NAPOMENA: Za ispravljanje grešaka možete koristiti Backspace .
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REZIME lekcije 3
1. Za postavljanje teksta koji ste upravo izbrisali, pritisnite p . Ovo
postavlja tekst IZA kursora (ako je bio izbrisan jedan ili više redova
sadržaj će doći na red ispod kursora).
2. Za zamenu znaka na kome se nalazi kursor, pritisnite r i onda
željeni znak.
3. Operator izmene dozvoljava promenu teksta od kursora do pozicije gde
se završava pokret. Primera radi, kucajte ce za izmenu od kursora do
kraja reči, ili c$ za izmenu od kursora do kraja reda.
4. Oblik operacije izmene je:
c [broj] pokret
Pređite na narednu lekciju.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 4.1: POZICIJA KURSORA I STATUS FAJLA
** Pritisnite CTRL-G za prikaz pozicije kursora u tekstu i status fajla.
Pritisnite G za pomeranje kursora na neki red u tekstu. **
NAPOMENA: Pročitajte celu lekciju pre izvođenja bilo kog koraka!!
1. Držite taster CTRL i pritisnite g . Ovo zovemo CTRL-G.
Editor će na dnu ekrana ispisati poruku sa imenom fajla i pozicijom
kursora u tekstu. Zapamtite broj reda za 3. korak.
NAPOMENA: U donjem desnom uglu može se videti poziciju kursora ako je
uključena opcija 'ruler' (vidi :help ruler ili lekciju 6.5.)
2. Pritisnite G za pomeranje kursora na kraj teksta.
Pritisnite 1G ili gg za pomranje kursora na početak teksta.
3. Otkucajte broj reda na kome ste malopre bili i onda G . Kursor
će se vratiti na red na kome je bio kad ste otkucali CTRL-G.
4. Ako ste spremni, izvršite korake od 1 do 3.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 4.2: KOMANDE PRETRAŽIVANJA
** Otkucajte / i onda izraz koji želite da potražite. **
1. U Normal modu otkucajte znak / . Primietite da se znak pojavio
zajedno sa kursorom na dnu ekrana kao i kod komande : .
2. Sada otkucajte 'grrreška' <ENTER>. (Bez razmaka i navodnika.)
To je reč koju tražite.
3. Za ponovno traženje istog izraza, otkucajte n .
Za traženje istog izraza u suprotnom smeru, otkucajte N .
4. Za traženje izraza unatrag, koristite ? umesto / .
5. Za povratak na prethodnu poziciju otkucajte CTRL-O (držite CTRL dok
pritiskate O ). Ponavljajte za ranije pozicije. CTRL-I ide napred.
---> "grrreška" je pogrešno; umesto grrreška treba da stoji greška.
NAPOMENA: Ako pretraga dođe do kraja teksta traženje će se nastaviti od
njegovog početka osim ako je opcija 'wrapscan' isključena.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 4.3: TRAŽENJE PARA ZAGRADE
** Otkucajte % za nalaženje para ), ] ili } . **
1. Postavite kursor na bilo koju od ( , [ ili {
otvorenih zagrada u redu označenom sa --->.
2. Otkucajte znak % .
3. Kursor će se pomeriti na odgovarajuću zatvorenu zagradu.
4. Otkucajte % da pomerite kursor na prvu zagradu u paru.
5. Pomerite kursor na neku od (,),[,],{ ili } i ponovite komandu % .
---> Red ( testiranja običnih ( [ uglastih ] i { vitičastih } zagrada.))
NAPOMENA: Vrlo korisno u ispravljanju koda sa rasparenim zagradama!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 4.4: KOMANDA ZAMENE
** Otkucajte :s/staro/novo/g da zamenite 'staro' za 'novo'. **
1. Pomerite kursor na red označen sa --->.
2. Otkucajte :s/rdi/ri/ <ENTER> . Primetite da ova komanda zamenjuje
samo prvo "rdi" u redu.
3. Otkucajte :s/rdi/ri/g . Dodavanje opcije g znači da će se komanda
izvršiti u celom redu, zamenom svih pojava niza "rdi".
---> rdiba rdibi grdize rep.
4. Za zamenu svih izraza između neka dva reda,
otkucajte :#,#s/staro/novo/g gde su #,# krajnji brojevi redova u opsegu
u kome će se obaviti zamena.
Otkucajte :%s/staro/novo/g za zamenu svih izraza u celom tekstu.
Otkucajte :%s/staro/novo/gc za nalaženje svih izraza u tekstu i
potvrdu zamene.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REZIME lekcije 4
1. CTRL-G prikazuje poziciju kursora u tekstu i status fajla.
G pomera kursor na kraj teksta.
broj G pomera kursor na navedeni red.
gg pomera kursor na prvi red teksta.
2. Kucanjem / sa izrazom taj izraz se traži UNAPRED.
Kucanjem ? sa izrazom taj izraz se traži UNAZAD.
Posle komande traženja koristite n za nalaženje izraza u istom
smeru, a N za nalaženje u suprotnom smeru.
CTRL-O vraća kursor na prethodnu poziciju, a CTRL-I na narednu.
3. Kucanjem % kad je kursor na zagradi on se pomera na njen par.
4. Za zamenu prvog izraza staro za izraz novo :s/staro/novo/
Za zamenu svih izraza u celom redu :s/staro/novo/g
Za zamenu svih izraza u opsegu linija #,# :#,#s/staro/novo/g
Za zamenu u celom tekstu :%s/staro/novo/g
Za potvrdu svake zamene dodajte 'c' :%s/staro/novo/gc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 5.1: IZVRŠAVANJE SPOLJAŠNJIH KOMANDI
** Otkucajte :! pa spoljašnju komandu koju želite da izvršite. **
1. Otkucajte poznatu komandu : da biste namestili kursor na dno
ekrana. Time omogućavate unos komande u komandnoj liniji editora.
2. Otkucajte znak ! (uzvičnik). Ovime omogućavate
izvršavanje bilo koje spoljašnje komande.
3. Kao primer otkucajte ls posle ! i pritisnite <ENTER>. Ovo će
prikazati sadržaj direktorijuma, kao da ste na komandnom promptu.
Otkucajte :!dir ako :!ls ne radi.
NAPOMENA: Na ovaj način moguće je izvršiti bilo koju spoljašnju komandu,
zajedno sa njenim argumentima.
NAPOMENA: Sve : komande se izvršavaju pošto pritisnete <ENTER> .
U daljem tekstu to nećemo uvek napominjati.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 5.2: VIŠE O SNIMANJU FAJLOVA
** Za snimanje promena, otkucajte :w IME_FAJLA . **
1. Otkucajte :!dir ili :!ls za pregled sadržaja direktorijuma.
Već znate da morate pritisnuti <ENTER> posle toga.
2. Izaberite ime fajla koji još ne postoji, npr. TEST.
3. Otkucajte: :w TEST (gde je TEST ime koje ste izabrali.)
4. Time ćete snimiti ceo fajl (Vim Tutor) pod imenom TEST.
Za proveru, otkucajte opet :!dir ili :!ls za pregled
sadržaja direktorijuma.
NAPOMENA: Ako biste napustili Vim i ponovo ga pokrenuli sa vim TEST ,
tekst bi bio tačna kopija ovog fajla u trenutku kad ste
ga snimili.
5. Izbrišite fajl tako što ćete otkucati (MS-DOS): :!del TEST
ili (Unix): :!rm TEST
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 5.3: SNIMANJE OZNAČENOG TEKSTA
** Da biste snimili deo teksta, otkucajte v pokret :w IME_FAJLA **
1. Pomerite kursor na ovu liniju.
2. Pritisnite v i pomerite kursor pet redova ispod. Primetite da je
tekst označen inverzno.
3. Pritisnite : . Na dnu ekrana pojaviće se :'<,'> .
4. Otkucajte w TEST , gde je TEST ime fajla koji još ne postoji.
Proverite da zaista piše :'<,'>w TEST pre nego što pritisnete <ENTER>.
5. Vim će snimiti označeni tekst u TEST. Proverite sa :!dir ili !ls .
Nemojte još brisati fajl! Koristićemo ga u narednoj lekciji.
NAPOMENA: Komanda v započinje vizuelno označavanje. Možete pomerati kursor
i tako menjati veličinu označenog teksta. Onda možete upotrebiti
operatore nad tekstom. Na primer, d će izbrisati označeni tekst.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 5.4: UČITAVANJE FAJLA U TEKST
** Za ubacivanje sadržaja fajla, otkucajte :r IME_FAJLA **
1. Postavite kursor iznad ove linije.
NAPOMENA: Pošto izvršite 2. korak videćete tekst iz lekcije 5.3. Tada
pomerite kursor DOLE da biste ponovo videli ovu lekciju.
2. Učitajte fajl TEST koristeći komandu :r TEST gde je TEST ime fajla
koje ste koristili u prethodnoj lekciji. Sadržaj učitanog fajla je
ubačen ispod kursora.
3. Da biste proverili da je fajl učitan, vratite kursor unazad i
primetite dve kopije lekcije 5.3, originalnu i onu iz fajla.
NAPOMENA: Takođe možete učitati izlaz spoljašnje komande. Na primer,
:r !ls će učitati izlaz komande ls i postaviti ga ispod
kursora.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REZIME lekcije 5
1. :!komanda izvršava spoljašnju komandu.
Korisni primeri:
(MS-DOS) (Unix)
:!dir :!ls - pregled sadržaja direktorijuma.
:!del FAJL :!rm FAJL - briše fajl FAJL.
2. :w FAJL zapisuje trenutni tekst na disk pod imenom FAJL.
3. v pokret :w IME_FAJLA snima vizuelno označene redove u fajl
IME_FAJLA.
4. :r IME_FAJLA učitava fajl IME_FAJLA sa diska i stavlja
njegov sadržaj ispod kursora.
5. :r !dir učitava izlaz komande dir i postavlja ga ispod kursora.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 6.1: KOMANDA OTVORI
** Pritisnite o da biste otvorili red ispod kursora
i prešli u Insert mod. **
1. Pomerite kursor na sledeći red označen sa --->.
2. Otkucajte malo o da biste otvorili novi red ISPOD kursora
i prešli u Insert mod.
3. Otkucajte neki tekst i onda pritisnite <ESC> da biste izašli
iz Insert moda.
---> Kad pritisnete o kursor prelazi u novootvoreni red u Insert modu.
4. Za otvaranje reda IZNAD kursora, umesto malog otkucajte veliko O .
Isprobajte na donjem redu označenom sa --->.
---> Otvorite red iznad ovog kucanjem velikog O dok je kursor u ovom redu.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 6.2: KOMANDA DODAJ
** Otkucajte a za dodavanje teksta IZA kursora. **
1. Pomerite kursor na početak sledećeg reda označenog sa --->.
2. Kucajte e dok kursor ne dođe na kraj reči re .
3. Otkucajte a (malo) da biste dodali tekst IZA kursora.
4. Dopunite reč kao što je u redu ispod. Pritisnite <ESC> za izlazak
iz Insert moda.
5. Sa e pređite na narednu nepotpunu reč i ponovite korake 3 i 4.
---> Ovaj re omogućava ve dodav teksta u nekom redu.
---> Ovaj red omogućava vežbanje dodavanja teksta u nekom redu.
NAPOMENA: Komande a, i, i A aktiviraju isti Insert mod, jedina
razlika je u poziciji od koje će se tekst ubacivati.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 6.3: DRUGI NAČIN ZAMENE
** Otkucajte veliko R da biste zamenili više od jednog znaka. **
1. Pomerite kursor na prvi sledeći red označen sa --->.
Pomerite kursor na početak prvog xxx .
2. Pritisnite R i otkucajte broj koji je red ispod,
tako da zameni xxx .
3. Pritisnite <ESC> za izlazak iz Replace moda.
Primetite da je ostatak reda ostao nepromenjen.
4. Ponovite korake da biste zamenili drugo xxx.
---> Dodavanje 123 na xxx daje xxx.
---> Dodavanje 123 na 456 daje 579.
NAPOMENA: Replace mod je kao Insert mod, s tom razlikom što svaki
uneti znak briše već postojeći.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 6.4: KOPIRANJE I LEPLJENJE TEKSTA
** Koristite operator y za kopiranje a p za lepljenje teksta. **
1. Pomerite kursor na red sa ---> i postavite kursor posle "a)".
2. Aktivirajte Visual mod sa v i pomerite kursor sve do ispred "prvi".
3. Pritisnite y da biste kopirali označeni tekst u interni bafer.
4. Pomerite kursor do kraja sledećeg reda: j$
5. Pritisnite p da biste zalepili tekst. Onda otkucajte: a drugi <ESC> .
6. Upotrebite Visual mod da označite " red.", kopirajte sa y , kursor
pomerite na kraj sledećeg reda sa j$ i tamo zalepite tekst sa p .
---> a) ovo je prvi red.
b)
NAPOMENA: takođe možete koristiti y kao operator; yw kopira jednu reč.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 6.5: POSTAVLJANJE OPCIJA
** Postavite opciju tako da traženje i zamena ignorišu veličinu slova **
1. Potražite reč 'razlika': /razlika <ENTER>
Ponovite nekoliko puta pritiskom na n .
2. Aktivirajte opciju 'ic' (Ignore case): :set ic
3. Ponovo potražite reč 'razlika' pritiskom na n
Primetite da su sada pronađeni i RAZLIKA i Razlika.
4. Aktivirajte opcije 'hlsearch' i 'incsearch': :set hls is
5. Ponovo otkucajte komandu traženja i uočite razlike: /razlika <ENTER>
6. Za deaktiviranje opcije ic kucajte: :set noic
NAPOMENA: Za neoznačavanje pronađenih izraza otkucajte: :nohlsearch
NAPOMENA: Ako želite da ne razlikujete veličinu slova u samo jednoj komandi
traženja, dodajte \c u izraz: /razlika\c <ENTER>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REZIME lekcije 6
1. Pritisnite o za otvaranje reda ISPOD kursora i prelazak u Insert mod.
Pritisnite O za otvaranje reda IZNAD kursora.
2. Pritisnite a za unos teksta IZA kursora.
Pritisnite A za unos teksta na kraju reda.
3. Komanda e pomera kursor na kraj reči.
4. Operator y kopira tekst, p ga lepi.
5. Kucanje velikog R aktivira Replace mod dok ne pritisnete <ESC> .
6. Kucanje ":set xxx" aktivira opciju "xxx". Neke opcije su:
'ic' 'ignorecase' ne razlikuje velika/mala slova pri traženju
'is' 'incsearch' prikazuje pronađen tekst dok kucate izraz
'hls' 'hlsearch' označava inverzno sve pronađene izraze
Možete koristite dugo ili kratko ime opcije.
7. Ispred imena opcije stavite "no" da je deaktivirate: :set noic
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 7.1: DOBIJANJE POMOĆI
** Koristite on-line sistem za pomoć **
Vim ima detaljan on-line sistem za pomoć. Za početak, pokušajte nešto
od sledećeg:
- pritisnite taster <HELP> (ako ga imate na tastaturi)
- pritisnite taster <F1> (ako ga imate na tastaturi)
- otkucajte :help <ENTER>
Pročitajte tekst u prozoru pomoći da biste naučili pomoć radi.
Kucanjem CTRL-W CTRL-W prelazite iz jednog prozora u drugi.
Otkucajte :q <ENTER> da zatvorite prozor pomoći.
Pomoć o praktično bilo kojoj temi možete dobiti dodavanjem argumenta
komandi ":help". Pokušajte ovo (ne zaboravite <ENTER> na kraju):
:help w
:help c_CTRL-D
:help insert-index
:help user-manual
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 7.2: PRAVLJENJE STARTNOG SKRIPTA
** Aktivirajte mogućnosti editora **
Vim ima mnogo više mogućnosti nego Vi, ali većina nije automatski
aktivirana. Za dodatne mogućnosti napravite "vimrc" fajl.
1. Otvorite "vimrc" fajl. Ovo zavisi od vašeg sistema:
:e ~/.vimrc za Unix
:e $VIM/_vimrc za MS-Windows
2. Onda učitajte primer sadržaja "vimrc" fajla:
:r $VIMRUNTIME/vimrc_example.vim
3. Snimite fajl sa:
:w
Sledeći put kada pokrenete Vim, bojenje sintakse teksta biće
aktivirano. Sva svoja podešavanja možete dodati u "vimrc" fajl.
Za više informacija otkucajte :help vimrc-intro
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lekcija 7.3: AUTOMATSKO DOVRŠAVANJE
** Dovršavanje komandne linije sa CTRL-D i <TAB> **
1. Podesite Vim da ne bude u Vi-kompatibilnom modu: :set nocp
2. Pogledajte koji fajlovi postoje u direktorijumu: :!ls ili :!dir
3. Otkucajte početak komande: :e
4. Otkucajte CTRL-D i Vim će prikazati spisak komandi koje počinju sa "e".
5. Pritisnite <TAB> i Vim će dopuniti ime komande u ":edit".
6. Dodajte razmak i početak imena postojećeg fajla: :edit FA
7. Pritisnite <TAB>. Vim će dopuniti ime fajla (ako je jedinstveno).
NAPOMENA: Moguće je dopuniti mnoge komande. Samo probajte CTRL-D i <TAB>.
Naročito je korisno za :help komande.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REZIME lekcije 7
1. Otkucajte :help ili pritisnite <F1> ili <Help> za pomoć.
2. Otkucajte :help komanda biste dobili pomoć za tu komandu.
3. Otkucajte CTRL-W CTRL-W za prelazak u drugi prozor.
4. Otkucajte :q da zatvorite prozor pomoći.
5. Napravite vimrc startni skript za aktiviranje podešavanja koja
vam odgovaraju.
6. Dok kucate neku od : komandi, pritisnite CTRL-D da biste videli moguće
vrednosti. Pritisnite <TAB> da odaberete jednu od njih.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ovim je priručnik završen. Njegov cilj je bio kratak pregled Vim editora,
koliko da omogući njegovo relativno jednostavno korišćenje. Priručnik nije
potpun, jer Vim ima mnogo više komandi. Kao sledeće, pročitajte priručnik:
":help user-manual".
Za dalje čitanje i učenje, preporučujemo knjigu:
Vim - Vi Improved - by Steve Oualline
Izdavač: New Riders
Prva knjiga potpuno posvećena Vim-u. Naročito korisna za početnike.
Ima mnoštvo primera i slika.
Vidite http://iccf-holland.org/click5.html
Sledeća knjiga je starija i više govori o Vi-u nego o Vim-u, ali je takođe
preporučujemo:
Learning the Vi Editor - by Linda Lamb
Izdavač: O'Reilly & Associates Inc.
Dobra knjiga iz koje možete saznati skoro sve što možete raditi u Vi-ju.
Šesto izdanje ima i informacija o Vim-u.
Ovaj priručnik su napisali: Michael C. Pierce i Robert K. Ware,
Colorado School of Mines koristeći ideje Charlesa Smitha,
Colorado State University. E-mail: bware@mines.colorado.edu.
Prilagođavanje za Vim uradio je Bram Moolenaar.
Prevod na srpski: Ivan Nejgebauer <ian@uns.ac.rs>
Verzija 1.0, maj/juni 2014.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -55,8 +55,8 @@ NOTE: The cursor keys should also work. But using hjkl you will be able to
2. Type: :q! <ENTER>.
This exits the editor, DISCARDING any changes you have made.
3. When you see the shell prompt, type the command that got you into this
tutor. That would be: vimtutor <ENTER>
3. Get back here by executing the command that got you into this tutor. That
might be: vimtutor <ENTER>
4. If you have these steps memorized and are confident, execute steps
1 through 3 to exit and re-enter the editor.

View File

@@ -1,7 +1,7 @@
" Vim tutor support file
" Author: Eduardo F. Amatria <eferna1@platea.pntic.mec.es>
" Maintainer: Bram Moolenaar
" Last Change: 2012 Sep 21
" Last Change: 2014 Jun 25
" This Vim script is used for detecting if a translation of the
" tutor file exist, i.e., a tutor.xx file, where xx is the language.
@@ -36,6 +36,8 @@ else
let s:ext = ".pl"
elseif s:lang =~ "Slovak"
let s:ext = ".sk"
elseif s:lang =~ "Serbian"
let s:ext = ".sr"
elseif s:lang =~ "Czech"
let s:ext = ".cs"
elseif s:lang =~ "Dutch"
@@ -122,6 +124,15 @@ if s:ext =~? '\.sk'
endif
endif
" The Slovak tutor is available in two encodings, guess which one to use
" Note that the utf-8 version is the original, the cp1250 version is created
" from it.
if s:ext =~? '\.sr'
if &enc =~ 1250
let s:ext = ".sr.cp1250"
endif
endif
" The Czech tutor is available in three encodings, guess which one to use
if s:ext =~? '\.cs'
if &enc =~ 1250

View File

@@ -843,10 +843,10 @@ Open up a line above this by typing Shift-O while the cursor is on this line.
<20>P<EFBFBD><50> xuandong@sh163.net <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD>N<EFBFBD><4E><EFBFBD>B<EFBFBD><42><EFBFBD>O<EFBFBD>r<EFBFBD>ץ<EFBFBD><D7A5>C
2002<30>~03<30><33>18<31><38> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <linuxrat@gnuchina.org>
<20>ھ<EFBFBD>Bram Molenaar<61><72><EFBFBD>ͦb2002<30>~03<30><33>16<31><EFBFBD>ӫH<D3AB>n<EFBFBD>D<EFBFBD>A<EFBFBD>Nvimtutor1.4<EFBFBD><EFBFBD>Ķ
<20>ھ<EFBFBD>Bram Moolenaar<EFBFBD><EFBFBD><EFBFBD>ͦb2002<EFBFBD>~03<30><33>16<31><EFBFBD>ӫH<D3AB>n<EFBFBD>D<EFBFBD>A<EFBFBD>Nvimtutor1.4<EFBFBD><EFBFBD>Ķ
<20><><EFBFBD>ɯŨ<C9AF>vimtutor1.5<EFBFBD>C
2001<30>~11<31><31>15<31><35> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <linuxrat@gnuchina.org>
<20>Nvimtutor1.4<EFBFBD><EFBFBD>Ķ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>浹Bram Molenaar<61>MSven Guckes<65>C
<20>Nvimtutor1.4<EFBFBD><EFBFBD>Ķ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>浹Bram Moolenaar<EFBFBD>MSven Guckes<65>C
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -988,9 +988,9 @@
<20><>л xuandong@sh163.net <20><>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2002<30><32>03<30><33>18<31><38> <20><><EFBFBD><EFBFBD>̩ <linuxrat@gnuchina.org>
<20><><EFBFBD><EFBFBD>Bram Molenaar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD>2002<30><32>03<30><33>16<31>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>󣬽<EFBFBD>vimtutor1.4<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<20><><EFBFBD><EFBFBD>Bram Moolenaar<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>2002<EFBFBD><EFBFBD>03<EFBFBD><EFBFBD>16<EFBFBD>յ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>󣬽<EFBFBD>vimtutor1.4<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>vimtutor1.5<EFBFBD><EFBFBD>
2001<30><31>11<31><31>15<31><35> <20><><EFBFBD><EFBFBD>̩ <linuxrat@gnuchina.org>
<20><>vimtutor1.4<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Bram Molenaar<61><72>Sven Guckes<65><73>
<20><>vimtutor1.4<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Bram Moolenaar<EFBFBD><EFBFBD>Sven Guckes<65><73>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -843,10 +843,10 @@ Open up a line above this by typing Shift-O while the cursor is on this line.
感謝 xuandong@sh163.net 的指正,將兩處錯別字修正。
2002年03月18日 梁昌泰 <linuxrat@gnuchina.org>
根據Bram Molenaar先生在2002年03月16日的來信要求將vimtutor1.4中譯
根據Bram Moolenaar先生在2002年03月16日的來信要求將vimtutor1.4中譯
版升級到vimtutor1.5。
2001年11月15日 梁昌泰 <linuxrat@gnuchina.org>
將vimtutor1.4中譯版提交給Bram Molenaar和Sven Guckes。
將vimtutor1.4中譯版提交給Bram Moolenaar和Sven Guckes。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -988,9 +988,9 @@
感谢 xuandong@sh163.net 的指正,将两处错别字修正。
2002年03月18日 梁昌泰 <linuxrat@gnuchina.org>
根据Bram Molenaar先生在2002年03月16日的来信要求将vimtutor1.4中译
根据Bram Moolenaar先生在2002年03月16日的来信要求将vimtutor1.4中译
版升级到vimtutor1.5。
2001年11月15日 梁昌泰 <linuxrat@gnuchina.org>
将vimtutor1.4中译版提交给Bram Molenaar和Sven Guckes。
将vimtutor1.4中译版提交给Bram Moolenaar和Sven Guckes。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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