Compare commits

..

173 Commits

Author SHA1 Message Date
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
Bram Moolenaar
3be8585661 updated for version 7.4.320
Problem:    Possible crash when an BufLeave autocommand deletes the buffer.
Solution:   Check for the window pointer being valid.  Postpone freeing the
            window until autocommands are done. (Yasuhiro Matsumoto)
2014-06-12 14:01:31 +02:00
Bram Moolenaar
980e58f7b3 updated for version 7.4.319
Problem:    Crash when putting zero bytes on the clipboard.
Solution:   Do not support the utf8_atom target when not using an Unicode
            encoding. (Naofumi Honda)
2014-06-12 13:28:30 +02:00
Bram Moolenaar
e3a8bab630 updated for version 7.4.318
Problem:    Check for whether a highlight group has settings ignores fg and bg
            color settings.
Solution:   Also check cterm and GUI color settings. (Christian Brabandt)
2014-06-12 12:20:54 +02:00
Bram Moolenaar
06e4a6df0a updated for version 7.4.317
Problem:    Crash when starting gvim.  Issue 230.
Solution:   Check for a pointer to be NULL. (Christian Brabandt)
2014-06-12 11:49:46 +02:00
Bram Moolenaar
7116aa0f7d updated for version 7.4.316
Problem:    Warning from 64-bit compiler.
Solution:   Add type cast. (Mike Williams)
2014-05-29 14:36:29 +02:00
Bram Moolenaar
c35b0fb181 updated for version 7.4.315
Problem:    Fixes for computation of topline not tested.
Solution:   Add test. (Hirohito Higashi)
2014-05-29 11:47:40 +02:00
Bram Moolenaar
ea389e9103 updated for version 7.4.314
Problem:    Completion messages can get in the way of a plugin.
Solution:   Add 'c' flag to 'shortmess' option. (Shougo Matsu)
2014-05-28 21:40:52 +02:00
Bram Moolenaar
6f6c0f8085 updated for version 7.4.313
Problem:    Changing the return value of getpos() causes an error. (Jie Zhu)
Solution:   Revert getpos() and add getcurpos().
2014-05-28 20:31:42 +02:00
Bram Moolenaar
2d1fe05fc0 updated for version 7.4.312
Problem:    Cannot figure out what argument list is being used for a window.
Solution:   Add the arglistid() function. (Marcin Szamotulski)
2014-05-28 18:22:57 +02:00
Bram Moolenaar
82c2585eb8 updated for version 7.4.311
Problem:    Can't use winrestview to only restore part of the view.
Solution:   Handle missing items in the dict. (Christian Brabandt)
2014-05-28 16:47:16 +02:00
Bram Moolenaar
493c178a28 updated for version 7.4.310
Problem:    getpos()/setpos() don't include curswant.
Solution:   Add a fifth number when getting/setting the cursor.
2014-05-28 14:34:46 +02:00
Bram Moolenaar
dd0402a759 updated for version 7.4.309
Problem:    When increasing the size of the lower window, the upper window
            jumps back to the top. (Ron Aaron)
Solution:   Change setting the topline. (Nobuhiro Takasaki)
2014-05-28 13:43:04 +02:00
Bram Moolenaar
846a2ff5f3 updated for version 7.4.308
Problem:    When using ":diffsplit" on an empty file the cursor is displayed
            on the command line.
Solution:   Limit the value of w_topfill.
2014-05-28 11:35:37 +02:00
Bram Moolenaar
cbc17d66be updated for version 7.4.307
Problem:    Can't build without the +termresponse feature.
Solution:   Add proper #ifdefs.
2014-05-22 21:22:19 +02:00
Bram Moolenaar
9a665ba296 updated for version 7.4.306
Problem:    getchar(0) does not return Esc.
Solution:   Do not wait for an Esc sequence to be complete.  (Yasuhiro
            Matsumoto)
2014-05-22 18:59:58 +02:00
Bram Moolenaar
13600303c5 Runtime file updates. 2014-05-22 18:26:40 +02:00
Bram Moolenaar
90013c6a75 updated for version 7.4.305
Problem:    Making 'ttymouse' empty after the xterm version was requested
            causes problems. (Elijah Griffin)
Solution:   Do not check for DEC mouse sequences when the xterm version was
            requested.  Also don't request the xterm version when DEC mouse
            was enabled.
2014-05-22 18:14:31 +02:00
Bram Moolenaar
b777618d11 updated for version 7.4.304
Problem:    Cannot always use Python with Vim.
Solution:   Add the manifest to the executable. (Jacques Germishuys)
2014-05-22 16:29:06 +02:00
Bram Moolenaar
e4c21e6899 updated for version 7.4.303
Problem:    When using double-width characters the text displayed on the
            command line is sometimes truncated.
Solution:   Reset the string lenght. (Nobuhiro Takasaki)
2014-05-22 16:05:19 +02:00
Bram Moolenaar
bc6cf6c511 updated for version 7.4.302
Problem:    Signs placed with 'foldcolumn' set don't show up after filler
            lines.
Solution:   Take filler lines into account. (Olaf Dabrunz)
2014-05-22 15:51:04 +02:00
Bram Moolenaar
b42970535c updated for version 7.4.301
Problem:    Still a scrolling problem when loading a session file.
Solution:   Fix off-by-one mistake. (Nobuhiro Takasaki)
2014-05-22 15:17:29 +02:00
Bram Moolenaar
7b129a5ac4 updated for version 7.4.300
Problem:    The way config.cache is removed doesn't always work.
Solution:   Always remove config.cache. (Ken Takata)
2014-05-22 14:54:26 +02:00
Bram Moolenaar
cf1b057939 updated for version 7.4.299
Problem:    When running configure twice DYNAMIC_PYTHON_DLL may become empty.
Solution:   Use AC_CACHE_VAL. (Ken Takata)
2014-05-22 14:44:22 +02:00
Bram Moolenaar
cbc67723bd updated for version 7.4.298
Problem:    Can't have a funcref start with "t:".
Solution:   Add "t" to the list of accepted names. (Yukihiro Nakadaira)
2014-05-22 14:19:56 +02:00
Bram Moolenaar
050fe7ebad updated for version 7.4.297
Problem:    Memory leak from result of get_isolated_shell_name().
Solution:   Free the memory. (Dominique Pelle)
2014-05-22 14:00:16 +02:00
Bram Moolenaar
1c5a2134db updated for version 7.4.296
Problem:    Can't run tests on Solaris.
Solution:   Change the way VIMRUNTIME is set. (Laurent Blume)
2014-05-22 13:12:29 +02:00
Bram Moolenaar
e968e36a00 Update runtime files. 2014-05-13 20:23:24 +02:00
Bram Moolenaar
715c286355 Update translations for changed error message. 2014-05-13 20:21:44 +02:00
Bram Moolenaar
24dc230871 updated for version 7.4.295
Problem:    Various typos, bad white space and unclear comments.
Solution:   Fix typos.  Improve white space. Update comments.
2014-05-13 20:19:58 +02:00
Bram Moolenaar
caca646bf0 updated for version 7.4.294
Problem:    Test files missing from patch.
Solution:   Patch the test files.
2014-05-13 20:15:37 +02:00
Bram Moolenaar
8df5acfda9 updated for version 7.4.293
Problem:    It is not possible to ignore composing characters at a specific
            point in a pattern.
Solution:   Add the %C item.
2014-05-13 19:37:29 +02:00
Bram Moolenaar
6082bea6ac updated for version 7.4.292
Problem:    Searching for "a" does not match accented "a" with new regexp
            engine, does match with old engine. (David Bürgin)
            "ca" does not match "ca" with accented "a" with either engine.
Solution:   Change the old engine, check for following composing character
            also for single-byte patterns.
2014-05-13 18:04:00 +02:00
Bram Moolenaar
6e13207d82 updated for version 7.4.291
Problem:    Compiler warning for int to pointer of different size when DEBUG
            is defined.
Solution:   use smsg() instead of EMSG3().
2014-05-13 16:46:32 +02:00
Bram Moolenaar
9c235069b2 updated for version 7.4.290
Problem:    A non-greedy match followed by a branch is too greedy. (Ingo
            Karkat)
Solution:   Add NFA_MATCH when it is already in the state list if the position
            differs.
2014-05-13 16:44:29 +02:00
Bram Moolenaar
ee4825331a updated for version 7.4.289
Problem:    Pattern with repeated backreference does not match with new regexp
            engine. (Urtica Dioica)
Solution:   Also check the end of a submatch when deciding to put a state in
            the state list.
2014-05-13 15:56:51 +02:00
Bram Moolenaar
be578edae3 updated for version 7.4.288
Problem:    When 'spellfile' is set the screen is not redrawn.
Solution:   Redraw when updating the spelling info. (Christian Brabandt)
2014-05-13 14:03:40 +02:00
Bram Moolenaar
46ae3cedeb updated for version 7.4.287
Problem:    Patches for .hgignore don't work, since the file is not in the
            distribution.
Solution:   Add .hgignore to the distribution.  Will be effective with the
            next version.
2014-05-13 13:52:38 +02:00
Bram Moolenaar
59838520c7 updated for version 7.4.286
Problem:    Error messages are inconsistant. (ZyX)
Solution:   Change "Lists" to "list".
2014-05-13 13:46:33 +02:00
Bram Moolenaar
fd859c9878 updated for version 7.4.285
Problem:    When 'relativenumber' is set and deleting lines or undoing that,
            line numbers are not always updated. (Robert Arkwright)
Solution:   (Christian Brabandt)
2014-05-13 12:44:24 +02:00
Bram Moolenaar
ed7547da43 updated for version 7.4.284
Problem:    Setting 'langmap' in the modeline can cause trouble.  E.g. mapping
            ":" breaks many commands. (Jens-Wolfhard Schicke-Uffmann)
Solution:   Disallow setting 'langmap' from the modeline.
2014-05-13 12:17:15 +02:00
Bram Moolenaar
d442ec7fe2 updated for version 7.4.283
Problem:    Compiler warning about unused variable. (Charles Cooper)
Solution:   Move the variable inside the #if block.
2014-05-09 20:33:04 +02:00
Bram Moolenaar
b7547420a4 updated for version 7.4.282
Problem:    Test 97 fails on Mac.
Solution:   Do not ignore case in file names. (Jun Takimoto)
2014-05-08 11:46:27 +02:00
Bram Moolenaar
04ad7fe05c updated for version 7.4.281
Problem:    When a session file has more than one tabpage and 'showtabline' is
            one the positions may be slightly off.
Solution:   Set 'showtabline' to two while positioning windows.
2014-05-07 21:14:47 +02:00
Bram Moolenaar
56b3bf89aa updated for version 7.4.280
Problem:    When using a session file the relative position of the cursor is
            not restored if there is another tab. (Nobuhiro Takasaki)
Solution:   Update w_wrow before calculating the fraction.
2014-05-07 20:25:35 +02:00
Bram Moolenaar
1b1063af58 updated for version 7.4.279
Problem:    globpath() returns a string, making it difficult to get a list of
            matches. (Greg Novack)
Solution:   Add an optional argument like with glob(). (Adnan Zafar)
2014-05-07 18:35:30 +02:00
Bram Moolenaar
3ec7f4e402 updated for version 7.4.278
Problem:    list_remove() conflicts with function defined in Sun header file.
Solution:   Rename the function. (Richard Palo)
2014-05-07 17:31:37 +02:00
Bram Moolenaar
0d3d5e0483 updated for version 7.4.277
Problem:    Using ":sign unplace *" may leave the cursor in the wrong position
            (Christian Brabandt)
Solution:   Update the cursor position when removing all signs.
2014-05-07 16:35:08 +02:00
Bram Moolenaar
75a8d74cc2 updated for version 7.4.276
Problem:    The fish shell is not supported.
Solution:   Use begin/end instead of () for fish. (Andy Russell)
2014-05-07 15:10:21 +02:00
Bram Moolenaar
f4d7f167f3 updated for version 7.4.275
Problem:    When changing the type of a sign that hasn't been placed ther is
            no error message.
Solution:   Add an error message. (Christian Brabandt)
2014-05-07 14:38:44 +02:00
Bram Moolenaar
a7611f60cd updated for version 7.4.274
Problem:    When doing ":update" just before running an external command that
            changes the file, the timestamp may be unchanged and the file
            is not reloaded.
Solution:   Also check the file size.
2014-05-02 15:46:14 +02:00
Bram Moolenaar
bcb9898eba Runtime file updates. 2014-05-01 14:08:19 +02:00
Bram Moolenaar
b96c69d80e updated for version 7.4.273
Problem:    "make autoconf" and "make reconfig" may first run configure and
            then remove the output.
Solution:   Add these targets to the exceptions. (Ken Takata)
2014-04-29 20:04:09 +02:00
Bram Moolenaar
e512c8c049 updated for version 7.4.272
Problem:    Using just "$" does not cause an error message.
Solution:   Check for empty environment variable name. (Christian Brabandt)
2014-04-29 17:41:22 +02:00
Bram Moolenaar
121f9bdde4 updated for version 7.4.271
Problem:    Compiler warning on 64 bit windows.
Solution:   Add type cast. (Mike Williams)
2014-04-29 15:55:43 +02:00
Bram Moolenaar
1ff32c5c2c updated for version 7.4.270
Problem:    Comparing pointers instead of the string they point to.
Solution:   Use strcmp(). (Ken Takata)
2014-04-29 15:11:43 +02:00
Bram Moolenaar
3d1956bcc9 updated for version 7.4.269
Problem:    CTRL-U in Insert mode does not work after using a cursor key.
            (Pine Wu)
Solution:   Use the original insert start position. (Christian Brabandt)
2014-04-29 14:44:35 +02:00
Bram Moolenaar
355a95a079 updated for version 7.4.268
Problem:    Using exists() on a funcref for a script-local function does not
            work.
Solution:   Translate <SNR> to the special byte sequence.  Add a test.
2014-04-29 14:03:02 +02:00
Bram Moolenaar
d69bd9af3c updated for version 7.4.267
Problem:    The '[ mark is in the wrong position after "gq". (Ingo Karkat)
Solution:   Add the setmark argument to do_join(). (Christian Brabandt)
2014-04-29 12:15:40 +02:00
Bram Moolenaar
33e87789a7 updated for version 7.4.266
Problem:    Test 62 fails.
Solution:   Set the language to C. (Christian Brabandt)
2014-04-29 11:55:29 +02:00
Bram Moolenaar
a4f317df89 updated for version 7.4.265
Problem:    Can't call a global function with "g:" in an expression.
Solution:   Skip the "g:" when looking up the function.
2014-04-24 17:12:33 +02:00
Bram Moolenaar
eccb7fc315 updated for version 7.4.264
Problem:    Can't define a function starting with "g:".  Can't assign a
            funcref to a buffer-local variable.
Solution:   Skip "g:" at the start of a function name.  Don't check for colons
            when assigning to a variable.
2014-04-23 20:43:41 +02:00
Bram Moolenaar
163d0da508 updated for version 7.4.263
Problem:    GCC 4.8 compiler warning for hiding a declaration (Francois Gannaz)
Solution:   Remove the second declaration.
2014-04-23 19:44:30 +02:00
Bram Moolenaar
2af78a1408 updated for version 7.4.262
Problem:    Duplicate code in regexec().
Solution:   Add line_lbr flag to regexec_nl().
2014-04-23 19:06:37 +02:00
Bram Moolenaar
93fc481b57 updated for version 7.4.261
Problem:    When updating the window involves a regexp pattern, an interactive
            substitute to replace a "\n" with a line break fails. (Ingo
            Karkat)
Solution:   Set reg_line_lbr in vim_regsub() and vim_regsub_multi().
2014-04-23 18:48:47 +02:00
Bram Moolenaar
9bdfb0025c updated for version 7.4.260
Problem:    It is possible to define a function with a colon in the name.  It
            is possible to define a function with a lower case character if a
            "#" appears after the name.
Solution:   Disallow using a colon other than with "s:".  Ignore "#" after the
            name.
2014-04-23 17:43:42 +02:00
Bram Moolenaar
62f167f716 updated for version 7.4.259
Problem:    Warning for misplaced "const".
Solution:   Move the "const". (Yukihiro Nakadaira)
2014-04-23 12:52:40 +02:00
Bram Moolenaar
c8836f7025 updated for version 7.4.258
Problem:    Configure fails if $CC contains options.
Solution:   Remove quotes around $CC. (Paul Barker)
2014-04-12 13:12:24 +02:00
Bram Moolenaar
0eac828ab0 updated for version 7.4.257
Problem:    Compiler warning, possibly for mismatch in parameter name.
Solution:   Rename the parameter in the declaration.
2014-04-12 12:26:36 +02:00
Bram Moolenaar
b21a29be56 updated for version 7.4.256
Problem:    Using systemlist() may cause a crash and does not handle NUL
            characters properly.
Solution:   Increase the reference count, allocate memory by length. (Yasuhiro
            Matsumoto)
2014-04-11 10:22:53 +02:00
272 changed files with 13077 additions and 3170 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

@@ -3,6 +3,7 @@
# source files for all source archives
SRC_ALL = \
.hgignore \
src/README.txt \
src/arabic.c \
src/arabic.h \
@@ -10,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 \
@@ -88,6 +91,7 @@ SRC_ALL = \
src/testdir/test60.vim \
src/testdir/test83-tags? \
src/testdir/test77a.com \
src/testdir/test_*.vim \
src/testdir/python2/*.py \
src/testdir/python3/*.py \
src/testdir/pythonx/*.py \
@@ -101,6 +105,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 \
@@ -287,6 +293,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

@@ -1,7 +1,7 @@
" netrw.vim: Handles file transfer and remote directory listing across
" AUTOLOAD SECTION
" Date: Mar 20, 2014
" Version: 151
" Date: May 13, 2014
" Version: 152
" Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 1999-2013 Charles E. Campbell {{{1
@@ -22,7 +22,14 @@
if &cp || exists("g:loaded_netrw")
finish
endif
let g:loaded_netrw = "v151"
if v:version < 704 || !has("patch213")
if !exists("s:needpatch213")
echo "***sorry*** this version of netrw requires vim v7.4 with patch 213"
endif
let s:needpatch213= 1
finish
endif
let g:loaded_netrw = "v152"
if !exists("s:NOTE")
let s:NOTE = 0
let s:WARNING = 1
@@ -44,7 +51,7 @@ setl cpo&vim
" 0=note = s:NOTE
" 1=warning = s:WARNING
" 2=error = s:ERROR
" Mar 04, 2014 : max errnum currently is 96
" Apr 16, 2014 : max errnum currently is 97
fun! netrw#ErrorMsg(level,msg,errnum)
" call Dfunc("netrw#ErrorMsg(level=".a:level." msg<".a:msg."> errnum=".a:errnum.") g:netrw_use_errorwindow=".g:netrw_use_errorwindow)
@@ -100,7 +107,7 @@ fun! netrw#ErrorMsg(level,msg,errnum)
hi link netrwMesgError Error
endif
" call Decho("setl noma ro bh=wipe")
setl noma ro bh=wipe
setl ro nomod noma bh=wipe
else
" (optional) netrw will show messages using echomsg. Even if the
@@ -245,7 +252,7 @@ call s:NetrwInit("g:netrw_alto" , &sb)
call s:NetrwInit("g:netrw_altv" , &spr)
call s:NetrwInit("g:netrw_banner" , 1)
call s:NetrwInit("g:netrw_browse_split", 0)
call s:NetrwInit("g:netrw_bufsettings" , "noma nomod nonu nobl nowrap ro")
call s:NetrwInit("g:netrw_bufsettings" , "noma nomod nonu nobl nowrap ro nornu")
call s:NetrwInit("g:netrw_chgwin" , -1)
call s:NetrwInit("g:netrw_compress" , "gzip")
call s:NetrwInit("g:netrw_ctags" , "ctags")
@@ -316,7 +323,7 @@ if !exists("g:netrw_localcopycmd")
if g:netrw_cygwin
let g:netrw_localcopycmd= "cp"
else
let g:netrw_localcopycmd= "cmd /c copy"
let g:netrw_localcopycmd= expand("$COMSPEC")." /c copy"
endif
elseif has("unix") || has("macunix")
let g:netrw_localcopycmd= "cp"
@@ -328,7 +335,15 @@ if exists("g:netrw_local_mkdir")
let g:netrw_localmkdir= g:netrw_local_mkdir
call netrw#ErrorMsg(s:NOTE,"g:netrw_local_mkdir is deprecated in favor of g:netrw_localmkdir",87)
endif
call s:NetrwInit("g:netrw_localmkdir","mkdir")
if has("win32") || has("win95") || has("win64") || has("win16")
if g:netrw_cygwin
call s:NetrwInit("g:netrw_localmkdir","mkdir")
else
let g:netrw_localmkdir= expand("$COMSPEC")." /c mkdir"
endif
else
call s:NetrwInit("g:netrw_localmkdir","mkdir")
endif
call s:NetrwInit("g:netrw_remote_mkdir","mkdir")
if exists("g:netrw_local_movecmd")
let g:netrw_localmovecmd= g:netrw_local_movecmd
@@ -339,7 +354,7 @@ if !exists("g:netrw_localmovecmd")
if g:netrw_cygwin
let g:netrw_localmovecmd= "mv"
else
let g:netrw_localmovecmd= "cmd /c move"
let g:netrw_localmovecmd= expand("$COMSPEC")." /c move"
endif
elseif has("unix") || has("macunix")
let g:netrw_localmovecmd= "mv"
@@ -347,11 +362,19 @@ if !exists("g:netrw_localmovecmd")
let g:netrw_localmovecmd= ""
endif
endif
call s:NetrwInit("g:netrw_localrmdir", "rmdir")
if exists("g:netrw_local_rmdir")
let g:netrw_localrmdir= g:netrw_local_rmdir
call netrw#ErrorMsg(s:NOTE,"g:netrw_local_rmdir is deprecated in favor of g:netrw_localrmdir",86)
endif
if has("win32") || has("win95") || has("win64") || has("win16")
if g:netrw_cygwin
call s:NetrwInit("g:netrw_localrmdir","rmdir")
else
let g:netrw_localrmdir= expand("$COMSPEC")." /c rmdir"
endif
else
call s:NetrwInit("g:netrw_localrmdir","rmdir")
endif
call s:NetrwInit("g:netrw_liststyle" , s:THINLIST)
" sanity checks
if g:netrw_liststyle < 0 || g:netrw_liststyle >= s:MAXLIST
@@ -423,7 +446,6 @@ endif
call s:NetrwInit("g:NetrwTopLvlMenu","Netrw.")
call s:NetrwInit("g:netrw_win95ftp",1)
call s:NetrwInit("g:netrw_winsize",50)
if g:netrw_winsize == 0|let g:netrw_winsize= -1|endif
if g:netrw_winsize > 100|let g:netrw_winsize= 100|endif
" ---------------------------------------------------------------------
" Default values for netrw's script variables: {{{2
@@ -583,37 +605,50 @@ fun! netrw#Explore(indx,dosplit,style,...)
if a:style == 0 " Explore, Sexplore
" call Decho("style=0: Explore or Sexplore")
let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz
exe winsz."wincmd s"
if winsz == 0|let winsz= ""|endif
exe "noswapfile ".winsz."wincmd s"
" call Decho("exe noswapfile ".winsz."wincmd s")
elseif a:style == 1 "Explore!, Sexplore!
" call Decho("style=1: Explore! or Sexplore!")
let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz
exe "keepalt ".winsz."wincmd v"
if winsz == 0|let winsz= ""|endif
exe "keepalt noswapfile ".winsz."wincmd v"
" call Decho("exe keepalt noswapfile ".winsz."wincmd v")
elseif a:style == 2 " Hexplore
" call Decho("style=2: Hexplore")
let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz
exe "keepalt bel ".winsz."wincmd s"
if winsz == 0|let winsz= ""|endif
exe "keepalt noswapfile bel ".winsz."wincmd s"
" call Decho("exe keepalt noswapfile bel ".winsz."wincmd s")
elseif a:style == 3 " Hexplore!
" call Decho("style=3: Hexplore!")
let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz
exe "keepalt abo ".winsz."wincmd s"
if winsz == 0|let winsz= ""|endif
exe "keepalt noswapfile abo ".winsz."wincmd s"
" call Decho("exe keepalt noswapfile abo ".winsz."wincmd s")
elseif a:style == 4 " Vexplore
" call Decho("style=4: Vexplore")
let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz
exe "keepalt lefta ".winsz."wincmd v"
if winsz == 0|let winsz= ""|endif
exe "keepalt noswapfile lefta ".winsz."wincmd v"
" call Decho("exe keepalt noswapfile lefta ".winsz."wincmd v")
elseif a:style == 5 " Vexplore!
" call Decho("style=5: Vexplore!")
let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz
exe "keepalt rightb ".winsz."wincmd v"
if winsz == 0|let winsz= ""|endif
exe "keepalt noswapfile rightb ".winsz."wincmd v"
" call Decho("exe keepalt noswapfile rightb ".winsz."wincmd v")
elseif a:style == 6 " Texplore
call s:SaveBufVars()
" call Decho("style = 6: Texplore")
exe "keepalt tabnew ".fnameescape(curdir)
" call Decho("exe keepalt tabnew ".fnameescape(curdir))
call s:RestoreBufVars()
endif
call s:RestoreWinVars()
@@ -1335,8 +1370,29 @@ fun! netrw#Obtain(islocal,fname,...)
keepj call netrw#ErrorMsg(s:ERROR,getline(1),5)
endif
endif
elseif b:netrw_method == 9
" obtain file using sftp
" call Decho("obtain via sftp (method #9)")
if a:fname =~ '/'
let localfile= substitute(a:fname,'^.*/','','')
else
let localfile= a:fname
endif
" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1).shellescape(localfile)." ".shellescape(tgtdir))
exe s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1).shellescape(localfile)." ".shellescape(tgtdir)
elseif !exists("b:netrw_method") || b:netrw_method < 0
" call Dfunc("netrw#Obtain : unsupported method")
" probably a badly formed url; protocol not recognized
" call Dret("netrw#Obtain : unsupported method")
return
else
" protocol recognized but not supported for Obtain (yet?)
if !exists("g:netrw_quiet")
keepj call netrw#ErrorMsg(s:ERROR,"current protocol not supported for obtaining file",97)
endif
" call Dret("netrw#Obtain : current protocol not supported for obtaining file")
return
endif
@@ -1436,6 +1492,7 @@ fun! s:NetrwOptionRestore(vt)
if exists("{a:vt}netrw_magickeep")|let &l:magic = {a:vt}netrw_magickeep |unlet {a:vt}netrw_magickeep|endif
if exists("{a:vt}netrw_modkeep") |let &l:mod = {a:vt}netrw_modkeep |unlet {a:vt}netrw_modkeep |endif
if exists("{a:vt}netrw_nukeep") |let &l:nu = {a:vt}netrw_nukeep |unlet {a:vt}netrw_nukeep |endif
if exists("{a:vt}netrw_rnukeep") |let &l:rnu = {a:vt}netrw_rnukeep |unlet {a:vt}netrw_rnukeep |endif
if exists("{a:vt}netrw_repkeep") |let &l:report = {a:vt}netrw_repkeep |unlet {a:vt}netrw_repkeep |endif
if exists("{a:vt}netrw_rokeep") |let &l:ro = {a:vt}netrw_rokeep |unlet {a:vt}netrw_rokeep |endif
if exists("{a:vt}netrw_selkeep") |let &l:sel = {a:vt}netrw_selkeep |unlet {a:vt}netrw_selkeep |endif
@@ -1532,7 +1589,7 @@ fun! s:NetrwOptionSave(vt)
let {a:vt}netrw_awkeep = &l:aw
let {a:vt}netrw_bhkeep = &l:bh
let {a:vt}netrw_blkeep = &l:bl
" let {a:vt}netrw_btkeep = &l:bt
let {a:vt}netrw_btkeep = &l:bt
let {a:vt}netrw_bombkeep = &l:bomb
let {a:vt}netrw_cedit = &cedit
let {a:vt}netrw_cikeep = &l:ci
@@ -1542,7 +1599,9 @@ fun! s:NetrwOptionSave(vt)
let {a:vt}netrw_cpokeep = &l:cpo
let {a:vt}netrw_diffkeep = &l:diff
let {a:vt}netrw_fenkeep = &l:fen
let {a:vt}netrw_ffkeep = &l:ff
if !exists("g:netrw_ffkeep") || g:netrw_ffkeep == 1
let {a:vt}netrw_ffkeep = &l:ff
endif
let {a:vt}netrw_fokeep = &l:fo " formatoptions
let {a:vt}netrw_gdkeep = &l:gd " gdefault
let {a:vt}netrw_hidkeep = &l:hidden
@@ -1553,6 +1612,7 @@ fun! s:NetrwOptionSave(vt)
let {a:vt}netrw_magickeep = &l:magic
let {a:vt}netrw_modkeep = &l:mod
let {a:vt}netrw_nukeep = &l:nu
let {a:vt}netrw_rnukeep = &l:rnu
let {a:vt}netrw_repkeep = &l:report
let {a:vt}netrw_rokeep = &l:ro
let {a:vt}netrw_selkeep = &l:sel
@@ -1973,7 +2033,7 @@ fun! netrw#NetRead(mode,...)
endif
let b:netrw_lastfile = choice
" call Decho("setl ro")
setl ro
setl ro nomod
".........................................
" NetRead: (dav) NetRead Method #6 {{{3
@@ -2052,7 +2112,7 @@ fun! netrw#NetRead(mode,...)
let result = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method)
let b:netrw_lastfile = choice
" call Decho("setl ro")
setl ro
setl ro nomod
".........................................
" NetRead: (sftp) NetRead Method #9 {{{3
@@ -3675,7 +3735,7 @@ fun! s:NetrwGetBuffer(islocal,dirname)
" call Decho(" re-using w:netrw_treebufnr=".w:netrw_treebufnr)
let eikeep= &ei
setl ei=all
exe "sil! keepalt b ".w:netrw_treebufnr
exe "sil! noswapfile keepalt b ".w:netrw_treebufnr
let &ei= eikeep
setl ma
sil! keepj %d
@@ -3799,10 +3859,10 @@ fun! s:NetrwGetBuffer(islocal,dirname)
setl ei=all
if getline(2) =~ '^" Netrw Directory Listing'
" call Decho(" getline(2)<".getline(2).'> matches "Netrw Directory Listing" : using keepalt b '.bufnum)
exe "sil! keepalt b ".bufnum
exe "sil! noswapfile keepalt b ".bufnum
else
" call Decho(" getline(2)<".getline(2).'> does not match "Netrw Directory Listing" : using b '.bufnum)
exe "sil! keepalt b ".bufnum
exe "sil! noswapfile keepalt b ".bufnum
endif
if bufname("%") == '.'
" call Decho("exe sil! keepalt file ".fnameescape(getcwd()))
@@ -3985,8 +4045,8 @@ fun! s:NetrwListSettings(islocal)
" call Dfunc("s:NetrwListSettings(islocal=".a:islocal.")")
" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo)
let fname= bufname("%")
" call Decho("(NetrwListSettings) setl bt=nofile nobl ma nonu nowrap noro")
setl bt=nofile nobl ma nonu nowrap noro
" " call Decho("(NetrwListSettings) setl bt=nofile nobl ma nonu nowrap noro nornu")
setl bt=nofile nobl ma nonu nowrap noro nornu
" call Decho("(NetrwListSettings) exe sil! keepalt file ".fnameescape(fname))
exe "sil! keepalt file ".fnameescape(fname)
if g:netrw_use_noswf
@@ -4011,9 +4071,11 @@ endfun
" =1: local browsing
fun! s:NetrwListStyle(islocal)
" call Dfunc("NetrwListStyle(islocal=".a:islocal.") w:netrw_liststyle=".w:netrw_liststyle)
let ykeep = @@
let fname = s:NetrwGetWord()
if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif
let svpos = netrw#SavePosn()
let w:netrw_liststyle = (w:netrw_liststyle + 1) % s:MAXLIST
" call Decho("fname<".fname.">")
" call Decho("chgd w:netrw_liststyle to ".w:netrw_liststyle)
@@ -4057,18 +4119,11 @@ fun! s:NetrwListStyle(islocal)
" refresh the listing
" call Decho("refresh the listing")
let svpos= netrw#SavePosn()
keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
keepj call netrw#RestorePosn(svpos)
keepj call s:NetrwCursor()
" keep cursor on the filename
sil! keepj $
let result= search('\%(^\%(|\+\s\)\=\|\s\{2,}\)\zs'.escape(fname,'.\[]*$^').'\%(\s\{2,}\|$\)','bc')
" call Decho("search result=".result." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'N/A'))
if result <= 0 && exists("w:netrw_bannercnt")
exe "sil! keepj ".w:netrw_bannercnt
endif
" restore position; keep cursor on the filename
keepj call netrw#RestorePosn(svpos)
let @@= ykeep
" call Dret("NetrwListStyle".(exists("w:netrw_liststyle")? ' : w:netrw_liststyle='.w:netrw_liststyle : ""))
@@ -4198,6 +4253,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
endif
let newdir = a:newdir
let dolockout = 0
let dorestore = 1
" call Decho("dirname<".dirname.">")
" ignore <cr>s when done in the banner
@@ -4208,7 +4264,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
" call Decho("#1: quickhelp=".g:netrw_quickhelp." ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
let g:netrw_quickhelp= (g:netrw_quickhelp + 1)%len(s:QuickHelp)
" call Decho("#2: quickhelp=".g:netrw_quickhelp." ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
setl noro ma nowrap
setl ma noro nowrap
keepj call setline(line('.'),'" Quick Help: <F1>:help '.s:QuickHelp[g:netrw_quickhelp])
setl noma nomod nowrap
keepj call netrw#RestorePosn(nbcd_curpos)
@@ -4300,6 +4356,14 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
call s:NetrwMenu(0)
" optional change to window
if g:netrw_chgwin >= 1
if winnr("$")+1 == g:netrw_chgwin
" if g:netrw_chgwin is set to one more than the last window, then
" vertically split the last window to make that window available.
let curwin= winnr()
exe "keepj keepalt ".g:netrw_chgwin."wincmd ".winnr("$")
vs
exe "keepj keepalt ".g:netrw_chgwin."wincmd ".curwin
endif
exe "keepj keepalt ".g:netrw_chgwin."wincmd w"
endif
endif
@@ -4317,11 +4381,18 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
else
exe "keepj e! ".fnameescape(dirname)
endif
" call Decho("after e! ".dirname.": hidden=".&hidden." bufhidden<".&bufhidden."> mod=".&mod)
call s:NetrwCursor()
" call Decho("COMBAK#1: after e! ".dirname.": hidden=".&hidden." bufhidden<".&bufhidden."> mod=".&mod)
if &hidden || &bufhidden == "hide"
" file came from vim's hidden storage. Don't "restore" options with it.
let dorestore= 0
endif
else
" call Decho("edit-a-file: remote file: NetrwBrowse will edit it")
endif
let dolockout= 1
" call Decho("COMBAK#2: after e! ".dirname.": hidden=".&hidden." bufhidden<".&bufhidden."> mod=".&mod)
" handle g:Netrw_funcref -- call external-to-netrw functions
" This code will handle g:Netrw_funcref as an individual function reference
@@ -4488,21 +4559,31 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
" --------------------------------------
" NetrwBrowseChgDir: Restore and Cleanup {{{3
" --------------------------------------
keepj call s:NetrwOptionRestore("s:")
if dolockout
" call Decho("COMBAK#3: after e! ".dirname.": hidden=".&hidden." bufhidden<".&bufhidden."> mod=".&mod)
if dorestore
" dorestore is zero'd when a local file was hidden or bufhidden;
" in such a case, we want to keep whatever settings it may have.
" call Decho("doing option restore (dorestore=".dorestore.")")
keepj call s:NetrwOptionRestore("s:")
" else " Decho
" call Decho("skipping option restore (dorestore==0): hidden=".&hidden." bufhidden=".&bufhidden." mod=".&mod)
endif
" call Decho("COMBAK#4: after e! ".dirname.": hidden=".&hidden." bufhidden<".&bufhidden."> mod=".&mod)
if dolockout && dorestore
" call Decho("restore: filewritable(dirname<".dirname.">)=".filewritable(dirname))
if filewritable(dirname)
" call Decho("restore: doing modification lockout settings: ma nomod noro")
" call Decho("restore: setl ma nomod noro")
setl ma nomod noro
setl ma noro nomod
" call Decho("restore: ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
else
" call Decho("restore: doing modification lockout settings: ma nomod ro")
" call Decho("restore: setl ma nomod noro")
setl ma nomod ro
setl ma ro nomod
" call Decho("restore: ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
endif
endif
" call Decho("COMBAK#5: after e! ".dirname.": hidden=".&hidden." bufhidden<".&bufhidden."> mod=".&mod)
let @@= ykeep
" call Dret("s:NetrwBrowseChgDir <".dirname."> : curpos<".string(getpos(".")).">")
@@ -5368,7 +5449,7 @@ fun! s:NetrwMaps(islocal)
nnoremap <buffer> <silent> a :call <SID>NetrwHide(1)<cr>
nnoremap <buffer> <silent> % :call <SID>NetrwOpenFile(1)<cr>
nnoremap <buffer> <silent> c :call <SID>NetrwLcd(b:netrw_curdir)<cr>
nnoremap <buffer> <silent> C :let g:netrw_chgwin= winnr()<cr>
nnoremap <buffer> <silent> C :<c-u>call <SID>NetrwSetChgwin()<cr>
nnoremap <buffer> <silent> <cr> :call netrw#LocalBrowseCheck(<SID>NetrwBrowseChgDir(1,<SID>NetrwGetWord()))<cr>
nnoremap <buffer> <silent> <s-cr> :call <SID>TreeSqueezeDir(1)<cr>
nnoremap <buffer> <silent> d :call <SID>NetrwMakeDir("")<cr>
@@ -5421,7 +5502,7 @@ fun! s:NetrwMaps(islocal)
inoremap <buffer> <silent> a <c-o>:call <SID>NetrwHide(1)<cr>
inoremap <buffer> <silent> c <c-o>:exe "keepjumps lcd ".fnameescape(b:netrw_curdir)<cr>
inoremap <buffer> <silent> c <c-o>:call <SID>NetrwLcd(b:netrw_curdir)<cr>
inoremap <buffer> <silent> C <c-o>:let g:netrw_chgwin= winnr()<cr>
inoremap <buffer> <silent> C <c-o>:call <SID>NetrwSetChgwin()<cr>
inoremap <buffer> <silent> % <c-o>:call <SID>NetrwOpenFile(1)<cr>
inoremap <buffer> <silent> - <c-o>:call <SID>NetrwBrowseUpDir(1)<cr>
inoremap <buffer> <silent> <cr> <c-o>:call netrw#LocalBrowseCheck(<SID>NetrwBrowseChgDir(1,<SID>NetrwGetWord()))<cr>
@@ -5552,7 +5633,7 @@ fun! s:NetrwMaps(islocal)
nnoremap <buffer> <silent> gf :<c-u>call <SID>NetrwForceFile(0,<SID>NetrwGetWord())<cr>
nnoremap <buffer> <silent> gh :<c-u>call <SID>NetrwHidden(0)<cr>
nnoremap <buffer> <silent> gp :<c-u>call <SID>NetrwChgPerm(0,b:netrw_curdir)<cr>
nnoremap <buffer> <silent> C :let g:netrw_chgwin= winnr()<cr>
nnoremap <buffer> <silent> C :<c-u>call <SID>NetrwSetChgwin()<cr>
nnoremap <buffer> <silent> i :call <SID>NetrwListStyle(0)<cr>
nnoremap <buffer> <silent> I :call <SID>NetrwBannerCtrl(1)<cr>
nnoremap <buffer> <silent> o :call <SID>NetrwSplit(0)<cr>
@@ -5600,7 +5681,7 @@ fun! s:NetrwMaps(islocal)
inoremap <buffer> <silent> gb <c-o>:<c-u>call <SID>NetrwBookHistHandler(1,b:netrw_curdir)<cr>
inoremap <buffer> <silent> gh <c-o>:<c-u>call <SID>NetrwHidden(0)<cr>
inoremap <buffer> <silent> gp <c-o>:<c-u>call <SID>NetrwChgPerm(0,b:netrw_curdir)<cr>
inoremap <buffer> <silent> C <c-o>:let g:netrw_chgwin= winnr()<cr>
inoremap <buffer> <silent> C <c-o>:call <SID>NetrwSetChgwin()<cr>
inoremap <buffer> <silent> i <c-o>:call <SID>NetrwListStyle(0)<cr>
inoremap <buffer> <silent> I <c-o>:call <SID>NetrwBannerCtrl(1)<cr>
inoremap <buffer> <silent> o <c-o>:call <SID>NetrwSplit(0)<cr>
@@ -5972,7 +6053,7 @@ fun! s:NetrwMarkFileCopy(islocal,...)
if a:islocal && s:netrwmftgt_islocal
" Copy marked files, local directory to local directory
" call Decho("copy from local to local")
if !executable(g:netrw_localcopycmd) && g:netrw_localcopycmd !~ '\<cmd\s'
if !executable(g:netrw_localcopycmd) && g:netrw_localcopycmd !~ '^'.expand("$COMSPEC").'\s'
call netrw#ErrorMsg(s:ERROR,"g:netrw_localcopycmd<".g:netrw_localcopycmd."> not executable on your system, aborting",91)
" call Dfunc("s:NetrwMarkFileMove : g:netrw_localcopycmd<".g:netrw_localcopycmd."> n/a!")
return
@@ -6545,7 +6626,7 @@ fun! s:NetrwMarkFileMove(islocal)
" move: local -> local
" call Decho("move from local to local")
" call Decho("local to local move")
if !executable(g:netrw_localmovecmd) && g:netrw_localmovecmd !~ '\<cmd\s'
if !executable(g:netrw_localmovecmd) && g:netrw_localmovecmd !~ '^'.expand("$COMSPEC").'\s'
call netrw#ErrorMsg(s:ERROR,"g:netrw_localmovecmd<".g:netrw_localmovecmd."> not executable on your system, aborting",90)
" call Dfunc("s:NetrwMarkFileMove : g:netrw_localmovecmd<".g:netrw_localmovecmd."> n/a!")
return
@@ -7487,13 +7568,14 @@ endfun
fun! s:NetrwRefresh(islocal,dirname)
" call Dfunc("NetrwRefresh(islocal<".a:islocal.">,dirname=".a:dirname.") hide=".g:netrw_hide." sortdir=".g:netrw_sort_direction)
" at the current time (Mar 19, 2007) all calls to NetrwRefresh() call NetrwBrowseChgDir() first.
" (defunct) NetrwBrowseChgDir() may clear the display; hence a NetrwSavePosn() may not work if its placed here.
" (defunct) Also, NetrwBrowseChgDir() now does a NetrwSavePosn() itself.
setl ma noro
" call Decho("setl ma noro")
" call Decho("clear buffer<".expand("%")."> with :%d")
let ykeep = @@
" save the cursor position before refresh.
let screenposn = netrw#SavePosn()
" call Decho("win#".winnr().": ".winheight(0)."x".winwidth(0)." curfile<".expand("%").">")
" call Decho("clearing buffer prior to refresh")
sil! keepj %d
if a:islocal
@@ -7501,6 +7583,8 @@ fun! s:NetrwRefresh(islocal,dirname)
else
keepj call s:NetrwBrowse(a:islocal,a:dirname)
endif
" restore position
keepj call netrw#RestorePosn(screenposn)
" restore file marks
@@ -7550,6 +7634,21 @@ fun! s:NetrwRefreshDir(islocal,dirname)
" call Dret("s:NetrwRefreshDir")
endfun
" ---------------------------------------------------------------------
" s:NetrwSetChgwin: set g:netrw_chgwin; a <cr> will use the specified
" window number to do its editing in.
" Supports [count]C where the count, if present, is used to specify
" a window to use for editing via the <cr> mapping.
fun! s:NetrwSetChgwin()
" call Dfunc("s:NetrwSetChgwin() v:count=".v:count)
if v:count > 0
let g:netrw_chgwin= v:count
else
let g:netrw_chgwin= winnr()
endif
" call Dret("s:NetrwSetChgwin")
endfun
" ---------------------------------------------------------------------
" s:NetrwSetSort: sets up the sort based on the g:netrw_sort_sequence {{{2
" What this function does is to compute a priority for the patterns
@@ -7687,6 +7786,7 @@ fun! s:NetrwSplit(mode)
if a:mode == 0
" remote and o
let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize
if winsz == 0|let winsz= ""|endif
" call Decho("exe ".(g:netrw_alto? "bel " : "abo ").winsz."wincmd s")
exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s"
let s:didsplit= 1
@@ -7707,6 +7807,7 @@ fun! s:NetrwSplit(mode)
elseif a:mode == 2
" remote and v
let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize
if winsz == 0|let winsz= ""|endif
" call Decho("exe ".(g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v")
exe (g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v"
let s:didsplit= 1
@@ -7717,6 +7818,7 @@ fun! s:NetrwSplit(mode)
elseif a:mode == 3
" local and o
let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize
if winsz == 0|let winsz= ""|endif
" call Decho("exe ".(g:netrw_alto? "bel " : "abo ").winsz."wincmd s")
exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s"
let s:didsplit= 1
@@ -7755,6 +7857,7 @@ fun! s:NetrwSplit(mode)
elseif a:mode == 5
" local and v
let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize
if winsz == 0|let winsz= ""|endif
" call Decho("exe ".(g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v")
exe (g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v"
let s:didsplit= 1
@@ -7983,7 +8086,7 @@ fun! s:NetrwTreeListing(dirname)
1d
endwhile
setl noma nomod ro
exe "setl ".g:netrw_bufsettings
" call Dret("NetrwTreeListing : bufname<".expand("%").">")
return
@@ -8088,7 +8191,7 @@ fun! s:NetrwWideListing()
exe "nmap <buffer> <silent> w /^\\\\|\\s\\s\\zs\\S/\<cr>"
exe "nmap <buffer> <silent> b ?^\\\\|\\s\\s\\zs\\S?\<cr>"
" call Decho("NetrwWideListing) setl noma nomod ro")
setl noma nomod ro
exe "setl ".g:netrw_bufsettings
" call Decho("(NetrwWideListing) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
" call Dret("NetrwWideListing")
return
@@ -8591,7 +8694,7 @@ fun! s:NetrwRemoteListing()
let w:netrw_method= b:netrw_method
endif
if s:method == "ftp" || s:method == "sftp"
if s:method == "ftp"
" use ftp to get remote file listing {{{3
" call Decho("use ftp to get remote file listing")
let s:method = "ftp"
@@ -8660,7 +8763,7 @@ fun! s:NetrwRemoteListing()
endif
endif
else
else
" use ssh to get remote file listing {{{3
" call Decho("use ssh to get remote file listing: s:path<".s:path.">")
let listcmd= s:MakeSshCmd(g:netrw_list_cmd)
@@ -9656,6 +9759,18 @@ fun! netrw#RestorePosn(...)
if a:0 > 0
exe "keepj ".a:1
endif
" call Decho("a:1 = ".((a:0 > 0)? a:1 : 'n/a'))
" call Decho("liststyle = ".(exists("liststyle")? liststyle : 'n/a'). " w:netrw_liststyle=".(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a'))
if exists("liststyle") && exists("w:netrw_liststyle") && liststyle != w:netrw_liststyle
let usesrch= 1
else
let usesrch= 0
endif
" call Decho("winh = ".(exists("w:netrw_winh")? w:netrw_winh : -1))
" call Decho("winw = ".(exists("w:netrw_winw")? w:netrw_winw : -1))
" call Decho("cur winheight=".winheight(0)." winwidth=".winwidth(0))
" call Decho("w:netrw_winfile = ".(exists("w:netrw_winfile")? w:netrw_winfile : 'n/a'))
" restore window
if exists("w:netrw_winnr")
@@ -9675,9 +9790,31 @@ fun! netrw#RestorePosn(...)
endif
" restore position
if exists("w:netrw_line") && exists("w:netrw_col")
" call Decho("restore posn: exe keepj norm! ".w:netrw_line."G0".w:netrw_col."|")
" when the window's height x width has changed, the line,col is no longer useful
if w:netrw_winh == winheight(0) && w:netrw_winw == winwidth(0) && exists("w:netrw_line") && exists("w:netrw_col") && !usesrch
" call Decho("using posn: exe keepj norm! ".w:netrw_line."G0".w:netrw_col."|")
exe "keepj norm! ".w:netrw_line."G0".w:netrw_col."\<bar>"
elseif exists("w:netrw_winfile")
if !search('\<'.escape(w:netrw_winfile,g:netrw_fname_escape),'cw')
if exists("w:netrw_bannercnt")
" call Decho("using bannercnt: win#".winnr()." ".winheight(0)."x".winwidth(0)." w:netrw_winfile<".w:netrw_winfile.">")
exe "keepj ".w:netrw_bannercnt
norm! 0
else
" go to upper left corner
" call Decho("goto ulc: win#".winnr()." ".winheight(0)."x".winwidth(0)." w:netrw_winfile<".w:netrw_winfile.">")
keepj 1
norm! 0
endif
else
" call Decho("used search: w:netrw_winfile<".w:netrw_winfile.">")
endif
else
" call Decho("goto ulc: win#".winnr()." ".winheight(0)."x".winwidth(0))
keepj 1
norm! 0
endif
let &ei= eikeep
@@ -9703,12 +9840,32 @@ fun! netrw#SavePosn()
let w:netrw_col = virtcol(".")
" call Decho("currently, win#".w:netrw_winnr." line#".w:netrw_line." col#".w:netrw_col)
" save filename under cursor
" call Decho("line#".line(".")." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'n/a'))
if exists("w:netrw_bannercnt") && line(".") >= w:netrw_bannercnt && &ft == "netrw"
let winfile = "|let w:netrw_winfile='".s:NetrwGetWord()."'"
else
let winfile= ""
endif
" call Decho("winfile<".winfile.">")
if exists("w:netrw_liststyle")
let liststyle = "|let liststyle=".w:netrw_liststyle
else
let liststyle= ""
endif
" call Decho("liststyle=".liststyle)
" Save top-of-screen line
keepj norm! H0
let w:netrw_hline= line(".")
" save up alternate position information
" use this when window height x width has changed
let w:netrw_winh = winheight(0)
let w:netrw_winw = winwidth(0)
" set up string holding position parameters
let ret = "let w:netrw_winnr=".w:netrw_winnr."|let w:netrw_line=".w:netrw_line."|let w:netrw_col=".w:netrw_col."|let w:netrw_hline=".w:netrw_hline
let ret = "let w:netrw_winnr=".w:netrw_winnr."|let w:netrw_line=".w:netrw_line."|let w:netrw_col=".w:netrw_col."|let w:netrw_hline=".w:netrw_hline."|let w:netrw_winh=".w:netrw_winh."|let w:netrw_winw=".w:netrw_winw.liststyle.winfile
keepj call netrw#RestorePosn()
" call Dret("netrw#SavePosn : winnr=".(exists("w:netrw_winnr")? w:netrw_winnr : "n/a")." line=".(exists("w:netrw_line")? w:netrw_line : "n/a")." col=".(exists("w:netrw_col")? w:netrw_col : "n/a")." hline=".(exists("w:netrw_hline")? w:netrw_hline : "n/a"))
@@ -9883,7 +10040,11 @@ endfun
" a correct command for use with a system() call
fun! s:MakeSshCmd(sshcmd)
" call Dfunc("s:MakeSshCmd(sshcmd<".a:sshcmd.">) user<".s:user."> machine<".s:machine.">")
let sshcmd = substitute(a:sshcmd,'\<HOSTNAME\>',s:user.s:machine,'')
if s:user == ""
let sshcmd = substitute(a:sshcmd,'\<HOSTNAME\>',s:machine,'')
else
let sshcmd = substitute(a:sshcmd,'\<HOSTNAME\>',s:user."@".s:machine,'')
endif
if exists("g:netrw_port") && g:netrw_port != ""
let sshcmd= substitute(sshcmd,"USEPORT",g:netrw_sshport.' '.g:netrw_port,'')
elseif exists("s:port") && s:port != ""
@@ -10050,7 +10211,7 @@ fun! s:NetrwEnew(...)
keepj call s:NetrwOptionRestore("w:")
" call Decho("generate a buffer with keepjumps keepalt enew!")
let netrw_keepdiff= &l:diff
keepj keepalt enew!
noswapfile keepj keepalt enew!
let &l:diff= netrw_keepdiff
" call Decho("bufnr($)=".bufnr("$")." winnr($)=".winnr("$"))
keepj call s:NetrwOptionSave("w:")
@@ -10145,7 +10306,7 @@ fun! s:NetrwLcd(newdir)
else
call s:NetrwOptionRestore("w:")
" call Decho("setl noma nomod nowrap")
setl noma nomod nowrap
exe "setl ".g:netrw_bufsettings
" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
let a:newdir= dirname
" call Dret("s:NetrwBrowse : reusing buffer#".(exists("bufnum")? bufnum : 'N/A')."<".dirname."> getcwd<".getcwd().">")
@@ -10201,7 +10362,7 @@ fun! s:RemotePathAnalysis(dirname)
let s:machine = substitute(a:dirname,dirpat,'\4','')
let s:port = substitute(a:dirname,dirpat,'\5','')
let s:path = substitute(a:dirname,dirpat,'\6','')
let s:fname = substitute(a:dirname,'^.*/\ze.','','')
let s:fname = substitute(s:path,'^.*/\ze.','','')
if s:machine =~ '@'
let dirpat = '^\(.*\)@\(.\{-}\)$'
let s:user = s:user.'@'.substitute(s:machine,dirpat,'\1','')

View File

@@ -2,6 +2,8 @@
" Language: PHP
" 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 Jul 24
"
" OPTIONS:
"
@@ -16,7 +18,7 @@
" The completion list generated this way is only filtered by the completion base
" and generally not much more accurate then simple keyword completion.
"
" let g:phpcomplete_search_tags_for_variables = 1/0 [default 0]
" let g:phpcomplete_search_tags_for_variables = 1/0 [default 0]
" Enables use of tags when the plugin tries to find variables.
" When enabled the plugin will search for the variables in the tag files with kind 'v',
" lines like $some_var = new Foo; but these usually yield highly inaccurate results and
@@ -107,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
@@ -138,7 +139,7 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
unlet! b:compl_context
" chop of the "base" from the end of the current instruction
if a:base != ""
let context = substitute(context, '\s*\$\?\([a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\)*$', '', '')
let context = substitute(context, '\s*[$a-zA-Z_0-9\x7f-\xff]*$', '', '')
end
end
@@ -263,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
@@ -276,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
@@ -457,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)
@@ -830,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
@@ -924,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
@@ -948,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 != ''
@@ -1047,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
@@ -1082,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>..."
@@ -1315,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)
@@ -1323,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
@@ -1355,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)
@@ -1439,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
@@ -1494,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
@@ -1512,53 +1519,59 @@ 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')
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
break
endif
" in-file lookup for Class::getInstance()
if line =~# '^\s*'.object.'\s*=&\?\s*'.class_name_pattern.'\s*::\s*getInstance' && !object_is_array
let classname_candidate = matchstr(line, object.'\s*=&\?\s*\zs'.class_name_pattern.'\ze\s*::\s*getInstance')
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
break
endif
@@ -1657,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
@@ -1709,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)
@@ -1780,6 +1793,7 @@ function! phpcomplete#GetClassLocation(classname, namespace) " {{{
return no_namespace_candidate
endif
return ''
endfunction
" }}}
@@ -1790,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
@@ -1822,8 +1837,8 @@ function! phpcomplete#GetFunctionLocation(function_name, namespace) " {{{
if no_namespace_candidate != ''
return no_namespace_candidate
endif
endif
return ''
endfunction
" }}}
@@ -1914,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('.')
@@ -1947,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)
@@ -1970,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
@@ -2264,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
@@ -2292,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')
@@ -2492,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
@@ -2511,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 Jan 23
*autocmd.txt* For Vim version 7.4. Last change: 2014 May 02
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
@@ -569,7 +580,8 @@ FileChangedRO Before making the first change to a read-only
FileChangedShell When Vim notices that the modification time of
a file has changed since editing started.
Also when the file attributes of the file
change. |timestamp|
change or when the size of the file changes.
|timestamp|
Mostly triggered after executing a shell
command, but also with a |:checktime| command
or when Gvim regains input focus.
@@ -669,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 Aug 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -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 @@
*diff.txt* For Vim version 7.4. Last change: 2013 Sep 20
*diff.txt* For Vim version 7.4. Last change: 2014 May 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -95,7 +95,7 @@ While already in Vim you can start diff mode in three ways.
:difft[his] Make the current window part of the diff windows. This sets
the options like for "vimdiff".
:diffp[atch] {patchfile} *E816* *:diffp* *:diffpatch*
:diffp[atch] {patchfile} *E816* *:diffp* *:diffpatch*
Use the current buffer, patch it with the diff found in
{patchfile} and open a buffer on the result. The options are
set as for "vimdiff".

View File

@@ -1,4 +1,4 @@
*digraph.txt* For Vim version 7.4. Last change: 2013 Dec 12
*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
@@ -1077,7 +1084,7 @@ char digraph hex dec official name ~
⊥ -T 22A5 8869 UP TACK
⋅ .P 22C5 8901 DOT OPERATOR
⋮ :3 22EE 8942 VERTICAL ELLIPSIS
.3 22EF 8943 MIDLINE HORIZONTAL ELLIPSIS
.3 22EF 8943 MIDLINE HORIZONTAL ELLIPSIS
⌂ Eh 2302 8962 HOUSE
⌈ <7 2308 8968 LEFT CEILING
⌉ >7 2309 8969 RIGHT CEILING

View File

@@ -1,4 +1,4 @@
*editing.txt* For Vim version 7.4. Last change: 2013 Nov 25
*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,20 +1480,25 @@ 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.
==============================================================================
10. Timestamps *timestamp* *timestamps*
Vim remembers the modification timestamp of a file when you begin editing it.
This is used to avoid that you have two different versions of the same file
(without you knowing this).
Vim remembers the modification timestamp, mode and size of a file when you
begin editing it. This is used to avoid that you have two different versions
of the same file (without you knowing this).
After a shell command is run (|:!cmd| |suspend| |:read!| |K|) timestamps are
compared for all buffers in a window. Vim will run any associated
|FileChangedShell| autocommands or display a warning for any files that have
changed. In the GUI this happens when Vim regains input focus.
After a shell command is run (|:!cmd| |suspend| |:read!| |K|) timestamps,
file modes and file sizes are compared for all buffers in a window. Vim will
run any associated |FileChangedShell| autocommands or display a warning for
any files that have changed. In the GUI this happens when Vim regains input
focus.
*E321* *E462*
If you want to automatically reload a file when it has been changed outside of

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.4. Last change: 2014 Apr 06
*eval.txt* For Vim version 7.4. Last change: 2014 Aug 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1716,6 +1716,8 @@ append( {lnum}, {string}) Number append {string} below line {lnum}
append( {lnum}, {list}) Number append lines {list} below line {lnum}
argc() Number number of files in the argument list
argidx() Number current index in the argument list
arglistid( [{winnr}, [ {tabnr}]])
Number argument list id
argv( {nr}) String {nr} entry of the argument list
argv( ) List the argument list
asin( {expr}) Float arc sine of {expr}
@@ -1805,11 +1807,13 @@ 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
getfperm( {fname}) String file permissions of file {fname}
getfsize( {fname}) Number size in bytes of file {fname}
getfontname( [{name}]) String name of font being used
getftime( {fname}) Number last modification time of file
getftype( {fname}) String description of type of file {fname}
getline( {lnum}) String line {lnum} of current buffer
@@ -1832,7 +1836,7 @@ getwinvar( {nr}, {varname} [, {def}])
any variable {varname} in window {nr}
glob( {expr} [, {nosuf} [, {list}]])
any expand file wildcards in {expr}
globpath( {path}, {expr} [, {flag}])
globpath( {path}, {expr} [, {nosuf} [, {list}]])
String do glob({expr}) for all dirs in {path}
has( {feature}) Number TRUE if feature {feature} supported
has_key( {dict}, {key}) Number TRUE if {dict} has entry {key}
@@ -1884,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}]])
@@ -2103,6 +2109,18 @@ argc() The result is the number of files in the argument list of the
argidx() The result is the current index in the argument list. 0 is
the first file. argc() - 1 is the last one. See |arglist|.
*arglistid()*
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. 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.
With {winnr} and {tabnr} use the window in the specified tab
page.
*argv()*
argv([{nr}]) The result is the {nr}th file in the argument list of the
current window. See |arglist|. "argv(0)" is the first one.
@@ -2587,9 +2605,14 @@ cursor({lnum}, {col} [, {off}]) *cursor()*
cursor({list})
Positions the cursor at the column (byte count) {col} in the
line {lnum}. The first column is one.
When there is one argument {list} this is used as a |List|
with two or three items {lnum}, {col} and {off}. This is like
the return value of |getpos()|, but without the first item.
with two, three or four item:
[{lnum}, {col}, {off}]
[{lnum}, {col}, {off}, {curswant}]
This is like the return value of |getpos()| or |getcurpos()|,
but without the first item.
Does not change the jumplist.
If {lnum} is greater than the number of lines in the buffer,
the cursor will be positioned at the last line in the buffer.
@@ -2598,6 +2621,8 @@ cursor({list})
the cursor will be positioned at the last character in the
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.
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.
@@ -2735,7 +2760,8 @@ exists({expr}) The result is a Number, which is non-zero if {expr} is
string)
*funcname built-in function (see |functions|)
or user defined function (see
|user-functions|).
|user-functions|). Also works for a
variable that is a Funcref.
varname internal variable (see
|internal-variables|). Also works
for |curly-braces-names|, |Dictionary|
@@ -3237,6 +3263,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.
@@ -3320,6 +3350,22 @@ getcmdtype() *getcmdtype()*
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:
[bufnum, lnum, col, off, curswant]
The "curswant" number is the preferred column when moving the
cursor vertically.
This can be used to save and restore the cursor position: >
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.
@@ -3441,6 +3487,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
@@ -3570,11 +3644,12 @@ glob({expr} [, {nosuf} [, {list}]]) *glob()*
See |expand()| for expanding special Vim variables. See
|system()| for getting the raw output of an external command.
globpath({path}, {expr} [, {flag}]) *globpath()*
globpath({path}, {expr} [, {nosuf} [, {list}]]) *globpath()*
Perform glob() on all directories in {path} and concatenate
the results. Example: >
:echo globpath(&rtp, "syntax/c.vim")
< {path} is a comma-separated list of directory names. Each
<
{path} is a comma-separated list of directory names. Each
directory name is prepended to {expr} and expanded like with
|glob()|. A path separator is inserted when needed.
To add a comma inside a directory name escape it with a
@@ -3582,11 +3657,19 @@ globpath({path}, {expr} [, {flag}]) *globpath()*
trailing backslash, remove it if you put a comma after it.
If the expansion fails for one of the directories, there is no
error message.
Unless the optional {flag} argument is given and is non-zero,
Unless the optional {nosuf} argument is given and is non-zero,
the 'suffixes' and 'wildignore' options apply: Names matching
one of the patterns in 'wildignore' will be skipped and
'suffixes' affect the ordering of matches.
When {list} is present and it is non-zero the result is a List
with all matching files. The advantage of using a List is, you
also get filenames containing newlines correctly. Otherwise
the result is a String and when there are several matches,
they are separated by <NL> characters. Example: >
:echo globpath(&rtp, "syntax/c.vim", 0, 1)
<
The "**" item can be used to search in a directory tree.
For example, to find all "README.txt" files in the directories
in 'runtimepath' and below: >
@@ -4305,6 +4388,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.
@@ -4463,33 +4581,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()|.
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 cursor position: >
let save_cursor = getpos(".")
MoveTheCursorAround
call setpos('.', save_cursor)
< Also see |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.
@@ -5288,8 +5379,9 @@ setpos({expr}, {list})
. the cursor
'x mark x
{list} must be a |List| with four numbers:
{list} must be a |List| with four or five numbers:
[bufnum, lnum, col, off]
[bufnum, lnum, col, off, curswant]
"bufnum" is the buffer number. Zero can be used for the
current buffer. Setting the cursor is only possible for
@@ -5307,6 +5399,12 @@ setpos({expr}, {list})
character. E.g., a position within a <Tab> or after the last
character.
The "curswant" number is only used when setting the cursor
position. It sets the preferred column for when moving the
cursor vertically. When the "curswant" number is missing the
preferred column is not set. When it is present and setting a
mark position it is not used.
Note that for '< and '> changing the line number may result in
the marks to be effectively be swapped, so that '< is always
before '>.
@@ -5314,10 +5412,13 @@ setpos({expr}, {list})
Returns 0 when the position could be set, -1 otherwise.
An error message is given if {expr} is invalid.
Also see |getpos()|
Also see |getpos()| and |getcurpos()|.
This does not restore the preferred column for moving
vertically. See |winrestview()| for that.
vertically; if you set the cursor position with this, |j| and
|k| motions will jump to previous columns! Use |cursor()| to
also set the preferred column. Also see the "curswant" key in
|winrestview()|.
setqflist({list} [, {action}]) *setqflist()*
@@ -5533,11 +5634,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 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
@@ -5547,6 +5657,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: >
@@ -6382,6 +6497,16 @@ winrestcmd() Returns a sequence of |:resize| commands that should restore
winrestview({dict})
Uses the |Dictionary| returned by |winsaveview()| to restore
the view of the current window.
Note: The {dict} does not have to contain all values, that are
returned by |winsaveview()|. If values are missing, those
settings won't be restored. So you can use: >
:call winrestview({'curswant': 4})
<
This will only set the curswant value (the column the cursor
wants to move on vertical movements) of the cursor to column 5
(yes, that is 5), while all other settings will remain the
same. This is useful, if you set the cursor position manually.
If you have changed the values the result is unpredictable.
If the window size changed the result won't be the same.
@@ -6393,10 +6518,12 @@ 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
col cursor column (Note: the first column
zero, as opposed to what getpos()
returns)
coladd cursor column offset for 'virtualedit'
curswant column for vertical movement
topline first line in the window
@@ -6447,7 +6574,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")
@@ -6464,10 +6591,11 @@ There are three types of features:
included.
4. Beyond a certain version or at a certain version and including a specific
patch. The "patch-7.4.123" feature means that the Vim version is 7.5 or
later, or it is version 7.4 and patch 123 was included.
The example above can be simplified to: >
:if has("patch-6.2.148")
patch. The "patch-7.4.237" feature means that the Vim version is 7.5 or
later, or it is version 7.4 and patch 237 was included.
Note that this only works for patch 7.4.237 and later, before that you
need to use the example above that checks v:version. Example: >
:if has("patch-7.4.248")
< Note that it's possible for patch 147 to be omitted even though 148 is
included.
@@ -6500,6 +6628,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.
@@ -6542,8 +6671,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|.
@@ -6690,6 +6819,8 @@ can only be called from within the script and from functions, user commands
and autocommands defined in the script. It is also possible to call the
function from a mapping defined in the script, but then |<SID>| must be used
instead of "s:" when the mapping is expanded outside of the script.
There are only script-local functions, no buffer-local or window-local
functions.
*:fu* *:function* *E128* *E129* *E123*
:fu[nction] List all functions and their arguments.
@@ -6713,12 +6844,15 @@ last defined. Example: >
<
See |:verbose-cmd| for more information.
*E124* *E125* *E853*
*E124* *E125* *E853* *E884*
:fu[nction][!] {name}([arguments]) [range] [abort] [dict]
Define a new function by the name {name}. The name
must be made of alphanumeric characters and '_', and
must start with a capital or "s:" (see above). When
using a capital "g:" be prepended.
must start with a capital or "s:" (see above). Note
that using "b:" or "g:" is not allowed. (since patch
7.4.260 E884 is given if the function name has a colon
in the name, e.g. for "foo:bar()". Before that patch
no error was given).
{name} can also be a |Dictionary| entry that is a
|Funcref|: >

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

@@ -1,4 +1,4 @@
*indent.txt* For Vim version 7.4. Last change: 2013 Nov 05
*indent.txt* For Vim version 7.4. Last change: 2014 Apr 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -812,7 +812,7 @@ OPTIONS: ~
PHP indenting can be altered in several ways by modifying the values of some
global variables:
*php-comment*
*php-comment* *PHP_autoformatcomment*
To not enable auto-formating of comments by default (if you want to use your
own 'formatoptions'): >
:let g:PHP_autoformatcomment = 0
@@ -821,6 +821,7 @@ Else, 't' will be removed from the 'formatoptions' string and "qrowcb" will be
added, see |fo-table| for more information.
-------------
*PHP_outdentSLComments*
To add extra indentation to single-line comments: >
:let g:PHP_outdentSLComments = N
@@ -832,6 +833,7 @@ Only single-line comments will be affected such as: >
/* Comment */
-------------
*PHP_default_indenting*
To add extra indentation to every PHP lines with N being the number of
'shiftwidth' to add: >
:let g:PHP_default_indenting = N
@@ -851,14 +853,18 @@ For example, with N = 1, this will give:
(Notice the extra indentation between the PHP container markers and the code)
-------------
To indent PHP tags as the surrounding code: >
:let g:PHP_outdentphpescape = 0
*PHP_outdentphpescape*
To indent PHP escape tags as the surrounding non-PHP code (only affects the
PHP escape tags): >
:let g:PHP_outdentphpescape = 0
-------------
*PHP_removeCRwhenUnix*
To automatically remove '\r' characters when the 'fileformat' is set to Unix: >
:let g:PHP_removeCRwhenUnix = 1
-------------
*PHP_BracesAtCodeLevel*
To indent braces at the same level than the code they contain: >
:let g:PHP_BracesAtCodeLevel = 1
@@ -877,6 +883,7 @@ NOTE: Indenting will be a bit slower if this option is used because some
optimizations won't be available.
-------------
*PHP_vintage_case_default_indent*
To indent 'case:' and 'default:' statements in switch() blocks: >
:let g:PHP_vintage_case_default_indent = 1

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: 2013 Aug 22
*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
@@ -306,9 +306,21 @@ is disabled. This makes it possible to map zero without making it impossible
to type a count with a zero.
*map-overview* *map-modes*
Overview of which map command works in which mode:
Overview of which map command works in which mode. More details below.
COMMANDS MODES ~
:map :noremap :unmap Normal, Visual, Select, Operator-pending
:nmap :nnoremap :nunmap Normal
:vmap :vnoremap :vunmap Visual and Select
:smap :snoremap :sunmap Select
:xmap :xnoremap :xunmap Visual
:omap :onoremap :ounmap Operator-pending
:map! :noremap! :unmap! Insert and Command-line
:imap :inoremap :iunmap Insert
:lmap :lnoremap :lunmap Insert, Command-line, Lang-Arg
:cmap :cnoremap :cunmap Command-line
commands: modes: ~
COMMANDS MODES ~
Normal Visual+Select Operator-pending ~
:map :noremap :unmap :mapclear yes yes yes
:nmap :nnoremap :nunmap :nmapclear yes - -
@@ -324,7 +336,7 @@ NOTE: Mapping a printable character in Select mode may confuse the user. It's
better to explicitly use :xmap and :smap for printable characters. Or use
:sunmap after defining the mapping.
commands: modes: ~
COMMANDS MODES ~
Visual Select ~
:vmap :vnoremap :vunmap :vmapclear yes yes
:xmap :xnoremap :xunmap :xmapclear yes -
@@ -333,7 +345,7 @@ better to explicitly use :xmap and :smap for printable characters. Or use
*mapmode-ic* *mapmode-i* *mapmode-c* *mapmode-l*
Some commands work both in Insert mode and Command-line mode, some not:
commands: modes: ~
COMMANDS MODES ~
Insert Command-line Lang-Arg ~
:map! :noremap! :unmap! :mapclear! yes yes -
:imap :inoremap :iunmap :imapclear yes - -
@@ -816,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 Mar 23
*options.txt* For Vim version 7.4. Last change: 2014 Aug 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
@@ -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.
@@ -4492,6 +4533,8 @@ A jump table for the options with a short description can be found at |Q_op|.
be able to execute Normal mode commands.
This is the opposite of the 'keymap' option, where characters are
mapped in Insert mode.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
Example (for Greek, in UTF-8): *greek* >
:set langmap=ΑA,ΒB,ΨC,ΔD,ΕE,ΦF,ΓG,ΗH,ΙI,ΞJ,ΚK,ΛL,ΜM,ΝN,ΟO,ΠP,QQ,ΡR,ΣS,ΤT,ΘU,ΩV,WW,ΧX,ΥY,ΖZ,αa,βb,ψc,δd,εe,φf,γg,ηh,ιi,ξj,κk,λl,μm,νn,οo,πp,qq,ρr,σs,τt,θu,ωv,ςw,χx,υy,ζz
@@ -4572,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.
@@ -5333,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}
@@ -5614,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
@@ -6252,6 +6367,9 @@ A jump table for the options with a short description can be found at |Q_op|.
A don't give the "ATTENTION" message when an existing swap file
is found.
I don't give the intro message when starting Vim |:intro|.
c don't give |ins-completion-menu| messages. For example,
"-- XXX completion (YYY)", "match 1 of 2", "The only match",
"Pattern not found", "Back at original", etc.
This gives you the opportunity to avoid that a change between buffers
requires you to hit <Enter>, but still gives as useful a message as
@@ -6619,6 +6737,10 @@ A jump table for the options with a short description can be found at |Q_op|.
top of the suggestion list with the internal methods.
Lines without a slash are ignored, use this for
comments.
The word in the second column must be correct,
otherwise it will not be used. Add the word to an
".add" file if it is currently flagged as a spelling
mistake.
The file is used for all languages.
expr:{expr} Evaluate expression {expr}. Use a function to avoid
@@ -7504,8 +7626,8 @@ A jump table for the options with a short description can be found at |Q_op|.
"s" = button state
"c" = column plus 33
"r" = row plus 33
This only works up to 223 columns! See "dec" for a
solution.
This only works up to 223 columns! See "dec",
"urxvt", and "sgr" for solutions.
xterm2 Works like "xterm", but with the xterm reporting the
mouse position while the mouse is dragged. This works
much faster and more precise. Your xterm must at
@@ -7527,29 +7649,35 @@ A jump table for the options with a short description can be found at |Q_op|.
pterm QNX pterm mouse handling.
*urxvt-mouse*
urxvt Mouse handling for the urxvt (rxvt-unicode) terminal.
The mouse works only if the terminal supports this
encoding style, but it does not have 223 columns limit
unlike "xterm" or "xterm2".
*sgr-mouse*
sgr Mouse handling for the terminal that emits SGR-styled
mouse reporting. Works with xterm version 277 or
later.
mouse reporting. The mouse works even in columns
beyond 223. This option is backward compatible with
"xterm2" because it can also decode "xterm2" style
mouse codes.
The mouse handling must be enabled at compile time |+mouse_xterm|
|+mouse_dec| |+mouse_netterm|.
|+mouse_dec| |+mouse_netterm| |+mouse_jsbterm| |+mouse_urxvt|
|+mouse_sgr|.
Only "xterm"(2) is really recognized. NetTerm mouse codes are always
recognized, if enabled at compile time. DEC terminal mouse codes
are recognized if enabled at compile time, and 'ttymouse' is not
"xterm" (because the xterm and dec mouse codes conflict).
"xterm", "xterm2", "urxvt" or "sgr" (because dec mouse codes conflict
with them).
This option is automatically set to "xterm", when the 'term' option is
set to a name that starts with "xterm", and 'ttymouse' is not "xterm"
or "xterm2" already. The main use of this option is to set it to
"xterm", when the terminal name doesn't start with "xterm", but it can
handle xterm mouse codes.
The "sgr" value will be set if the xterm version is 277 or later.
set to a name that starts with "xterm", "mlterm", or "screen", and
'ttymouse' is not set already.
Additionally, if vim is compiled with the |+termresponse| feature and
|t_RV| is set to the escape sequence to request the xterm version
number, more intelligent detection process runs.
The "xterm2" value will be set if the xterm version is reported to be
95 or higher. This only works when compiled with the |+termresponse|
feature and if |t_RV| is set to the escape sequence to request the
xterm version number. Otherwise "xterm2" must be set explicitly.
If you do not want 'ttymouse' to be set to "xterm2" automatically, set
t_RV to an empty string: >
from 95 to 276. The "sgr" value will be set if the xterm version is
277 or highter.
If you do not want 'ttymouse' to be set to "xterm2" or "sgr"
automatically, set t_RV to an empty string: >
:set t_RV=
<
*'ttyscroll'* *'tsl'*

View File

@@ -1,4 +1,4 @@
*pattern.txt* For Vim version 7.4. Last change: 2014 Feb 08
*pattern.txt* For Vim version 7.4. Last change: 2014 Jul 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -545,6 +545,7 @@ Character classes {not in Vi}: */character-classes*
|/\%u| \%u \%u match specified multibyte character (eg \%u20ac)
|/\%U| \%U \%U match specified large multibyte character (eg
\%U12345678)
|/\%C| \%C \%C match any composing characters
Example matches ~
\<\I\i* or
@@ -705,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
@@ -1207,12 +1215,18 @@ will probably never match.
8. Composing characters *patterns-composing*
*/\Z*
When "\Z" appears anywhere in the pattern, composing characters are ignored.
Thus only the base characters need to match, the composing characters may be
different and the number of composing characters may differ. Only relevant
when 'encoding' is "utf-8".
When "\Z" appears anywhere in the pattern, all composing characters are
ignored. Thus only the base characters need to match, the composing
characters may be different and the number of composing characters may differ.
Only relevant when 'encoding' is "utf-8".
Exception: If the pattern starts with one or more composing characters, these
must match.
*/\%C*
Use "\%C" to skip any composing characters. For example, the pattern "a" does
not match in "càt" (where the a has the composing character 0x0300), but
"a\%C" does. Note that this does not match "cát" (where the á is character
0xe1, it does not have a compositing character). It does match "cat" (where
the a is just an a).
When a composing character appears at the start of the pattern of after an
item that doesn't include the composing character, a match is found at any
@@ -1325,7 +1339,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 @@
*pi_netrw.txt* For Vim version 7.4. Last change: 2014 Mar 20
*pi_netrw.txt* For Vim version 7.4. Last change: 2014 May 13
------------------------------------------------
NETRW REFERENCE MANUAL by Charles E. Campbell
@@ -173,7 +173,7 @@ There are more protocols supported by netrw than just scp and ftp, too: see the
next section, |netrw-externapp|, on how to use these external applications with
netrw and vim.
PREVENTING LOADING *netrw-noload*
PREVENTING LOADING *netrw-noload*
If you want to use plugins, but for some reason don't wish to use netrw, then
you need to avoid loading both the plugin and the autoload portions of netrw.
@@ -184,7 +184,7 @@ You may do so by placing the following two lines in your <.vimrc>: >
<
==============================================================================
3. Netrw Reference *netrw-ref* {{{1
3. Netrw Reference *netrw-ref* {{{1
Netrw supports several protocols in addition to scp and ftp as mentioned
in |netrw-start|. These include dav, fetch, http,... well, just look
@@ -291,7 +291,7 @@ SOURCING *netrw-source* {{{2
:Nsource "scp://[user@]machine[[:#]port]/path" uses scp
:Nsource "sftp://[user@]machine/path" uses sftp
DIRECTORY LISTING *netrw-trailingslash* *netrw-dirlist* {{{2
DIRECTORY LISTING *netrw-trailingslash* *netrw-dirlist* {{{2
One may browse a directory to get a listing by simply attempting to
edit the directory: >
@@ -348,9 +348,9 @@ settings are described below, in |netrw-browser-options|, and in
*g:netrw_bufsettings* the settings that netrw buffers have
(default) noma nomod nonu nowrap ro nobl
*g:netrw_chgwin* specifies a window number where file edits will take
place. (also see |netrw-C|)
(default) not defined
*g:netrw_chgwin* specifies a window number where subsequent file edits
will take place. (also see |netrw-C|)
(default) -1
*g:Netrw_funcref* specifies a function (or functions) to be called when
netrw edits a file. The file is first edited, and
@@ -371,9 +371,9 @@ settings are described below, in |netrw-browser-options|, and in
value of this variable to see if the alternate ftp
method works for your setup.
*g:netrw_ftp_options* Chosen by default, these options are supposed to turn
interactive prompting off and to restrain ftp from
attempting auto-login upon initial connection.
*g:netrw_ftp_options* Chosen by default, these options are supposed to
turn interactive prompting off and to restrain ftp
from attempting auto-login upon initial connection.
However, it appears that not all ftp implementations
support this (ex. ncftp).
="-i -n"
@@ -404,8 +404,8 @@ settings are described below, in |netrw-browser-options|, and in
*g:netrw_preview* =0 (default) preview window shown in a horizontally
split window
=1 preview window shown in a vertically split window.
Also affects the "previous window" (see |netrw-P|) in
the same way.
Also affects the "previous window" (see |netrw-P|)
in the same way.
*g:netrw_scpport* = "-P" : option to use to set port for scp
*g:netrw_sshport* = "-p" : option to use to set port for ssh
@@ -543,15 +543,17 @@ which contains ftp commands which will be automatically run whenever ftp
starts. You may use this feature to enter a user and password for one site: >
userid
password
< *netrw-windows-netrc* *netrw-windows-s*
If |g:netrw_ftp_cmd| contains -s:[path/]MACHINE, then (on Windows machines only)
netrw will substitute the current machine name requested for ftp connections
for MACHINE. Hence one can have multiple machine.ftp files containing login
and password for ftp. Example: >
< *netrw-windows-netrc* *netrw-windows-s*
If |g:netrw_ftp_cmd| contains -s:[path/]MACHINE, then (on Windows machines
only) netrw will substitute the current machine name requested for ftp
connections for MACHINE. Hence one can have multiple machine.ftp files
containing login and password for ftp. Example: >
let g:netrw_ftp_cmd= 'c:\Windows\System32\ftp -s:C:\Users\Myself\MACHINE'
vim ftp://myhost.somewhere.net/
will use a file >
C:\Users\Myself\myhost.ftp
<
Often, ftp will need to query the user for the userid and password.
@@ -681,7 +683,7 @@ your <.vimrc> customization file: >
<
==============================================================================
6. Transparent Remote File Editing *netrw-transparent* {{{1
6. Transparent Remote File Editing *netrw-transparent* {{{1
Transparent file transfers occur whenever a regular file read or write
(invoked via an |:autocmd| for |BufReadCmd|, |BufWriteCmd|, or |SourceCmd|
@@ -755,7 +757,7 @@ below, a {netfile} is an url to a remote file.
==============================================================================
8. Variables and Options *netrw-var* *netrw-settings* {{{1
8. Variables and Options *netrw-var* *netrw-settings* {{{1
(also see: |netrw-options| |netrw-variables| |netrw-protocol|
|netrw-browser-settings| |netrw-browser-options| )
@@ -795,7 +797,7 @@ set in the user's <.vimrc> file: (see also |netrw-settings| |netrw-protocol|)
=1 use default method to do ftp >
-----------------------------------------------------------------------
<
*netrw-internal-variables*
*netrw-internal-variables*
The script will also make use of the following variables internally, albeit
temporarily.
>
@@ -1042,8 +1044,8 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
<del> Netrw will attempt to remove the file/directory |netrw-del|
- Makes Netrw go up one directory |netrw--|
a Toggles between normal display, |netrw-a|
hiding (suppress display of files matching g:netrw_list_hide)
showing (display only files which match g:netrw_list_hide)
hiding (suppress display of files matching g:netrw_list_hide)
showing (display only files which match g:netrw_list_hide)
c Make browsing directory the current directory |netrw-c|
C Setting the editing window |netrw-C|
d Make a directory |netrw-d|
@@ -1068,7 +1070,7 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
mx Apply arbitrary shell command to marked files |netrw-mx|
mz Compress/decompress marked files |netrw-mz|
o Enter the file/directory under the cursor in a new |netrw-o|
browser window. A horizontal split is used.
browser window. A horizontal split is used.
O Obtain a file specified by cursor |netrw-O|
p Preview the file |netrw-p|
P Browse in the previously used window |netrw-P|
@@ -1082,7 +1084,7 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
u Change to recently-visited directory |netrw-u|
U Change to subsequently-visited directory |netrw-U|
v Enter the file/directory under the cursor in a new |netrw-v|
browser window. A vertical split is used.
browser window. A vertical split is used.
x View file with an associated program |netrw-x|
X Execute filename under cursor via |system()| |netrw-X|
@@ -1096,9 +1098,9 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
<rightmouse> (gvim only) delete file/directory using word under
mouse
<2-leftmouse> (gvim only) when:
* in a netrw-selected file, AND
* |g:netrw_retmap| == 1 AND
* the user doesn't already have a <2-leftmouse>
* in a netrw-selected file, AND
* |g:netrw_retmap| == 1 AND
* the user doesn't already have a <2-leftmouse>
mapping defined before netrw is autoloaded,
then a double clicked leftmouse button will return
to the netrw browser window. See |g:netrw_retmap|.
@@ -1234,9 +1236,7 @@ cursor at the left.
There is only one tree listing buffer; using "v" on a displayed subdirectory
will split the screen, but the same buffer will be shown twice.
Associated setting variable: |g:netrw_altv| |g:netrw_winsize|
Related Actions |netrw-cr| |netrw-o| |netrw-t| |netrw-v|
Related Actions: |netrw-cr| |netrw-o| |netrw-t| |netrw-v|
Associated setting variables:
|g:netrw_altv| control right/left splitting
|g:netrw_winsize| control initial sizing
@@ -1258,11 +1258,12 @@ The wide listing format uses two or more contiguous spaces to delineate
filenames; when using that format, netrw won't be able to recognize or use
filenames which have two or more contiguous spaces embedded in the name or any
trailing spaces. The thin listing format will, however, work with such files.
This listing format is the most compact.
The wide listing format is the most compact.
The tree listing format has a top directory followed by files and directories
preceded by a "|". One may open and close directories by pressing the <cr>
key while atop the directory name.
preceded by one or more "|"s, which indicate the directory depth. One may
open and close directories by pressing the <cr> key while atop the directory
name.
One may make a preferred listing style your default; see |g:netrw_liststyle|.
As an example, by putting the following line in your .vimrc, >
@@ -1462,8 +1463,16 @@ If files have been marked with |netrw-mf|: (local marked file list)
Marked files (and empty directories) will be deleted; again, you'll be
asked to confirm the deletion before it actually takes place.
A further approach is to delete files which match a pattern.
* use :MF pattern (see |netrw-:MF|); then press "D".
* use mr (see |netrw-mr|) which will prompt you for pattern.
This will cause the matching files to be marked. Then,
press "D".
The |g:netrw_rm_cmd|, |g:netrw_rmf_cmd|, and |g:netrw_rmdir_cmd| variables are
used to control the attempts to remove files and directories. The
used to control the attempts to remove remote files and directories. The
g:netrw_rm_cmd is used with files, and its default value is:
g:netrw_rm_cmd: ssh HOSTNAME rm
@@ -1471,12 +1480,12 @@ g:netrw_rm_cmd is used with files, and its default value is:
The g:netrw_rmdir_cmd variable is used to support the removal of directories.
Its default value is:
g:netrw_rmdir_cmd: ssh HOSTNAME rmdir
|g:netrw_rmdir_cmd|: ssh HOSTNAME rmdir
If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt
to remove it again using the g:netrw_rmf_cmd variable. Its default value is:
g:netrw_rmf_cmd: ssh HOSTNAME rm -f
|g:netrw_rmf_cmd|: ssh HOSTNAME rm -f
Related topics: |netrw-d|
Associated setting variable: |g:netrw_localrmdir| |g:netrw_rm_cmd|
@@ -1548,11 +1557,12 @@ windows should have.
Return to Explorer~
When one edits a file, for example by pressing <cr> when the
cursor is atop a file in a netrw browser window, :Rexplore will
return the display to that of the last netrw browser window.
return the display to that of the last netrw browser display
in that window.
Return from Explorer~
Conversely, when one is editing a directory, issuing a :Rexplore
will return to editing the last file being edited in that
will return to editing the file that was last edited in that
window.
The <2-leftmouse> map (which is only available under gvim and
@@ -1919,19 +1929,21 @@ MARKING FILES *netrw-:MF* *netrw-mf* {{{2
Netrw has several ways of marking files:
* One may mark files with the cursor atop a filename and
then pressing "mf".
then pressing "mf".
* With gvim, in addition one may mark files with
<s-leftmouse>.
<s-leftmouse>. (see |netrw-mouse|)
* One may use the :MF command, which takes a list of
files (for local directories, the list may include
wildcards -- see |glob()|) >
files (for local directories, the list may include
wildcards -- see |glob()|) >
:MF *.c
<
* Note that :MF uses |<f-args>| to break the line
at spaces.
at spaces.
* Mark files based upon the quickfix list (|netrw-qF|)
The following netrw maps make use of marked files:
@@ -1948,7 +1960,6 @@ The following netrw maps make use of marked files:
|netrw-mT| Generate tags using marked files
|netrw-mx| Apply shell command to marked files
|netrw-mz| Compress/Decompress marked files
|netrw-qF| Mark files using quickfix list
|netrw-O| Obtain marked files
|netrw-R| Rename marked files
@@ -2350,7 +2361,7 @@ your browsing preferences. (see also: |netrw-settings|)
2: errors
*g:netrw_fastbrowse* =0: slow speed directory browsing;
never re-uses directory listings,
never re-uses directory listings;
always obtains directory listings.
=1: medium speed directory browsing;
re-use directory listings only
@@ -2373,6 +2384,11 @@ your browsing preferences. (see also: |netrw-settings|)
trading off accuracy (ie. up-to-date listing)
versus speed.
*g:netrw_ffkeep* (default: doesn't exist)
If this variable exists and is zero, then
netrw will not do a save and restore for
|'fileformat'|.
*g:netrw_fname_escape* =' ?&;%'
Used on filenames before remote reading/writing
@@ -2518,13 +2534,13 @@ your browsing preferences. (see also: |netrw-settings|)
default: =0
*g:netrw_rm_cmd* command for removing files
*g:netrw_rm_cmd* command for removing remote files
default: "ssh USEPORT HOSTNAME rm"
*g:netrw_rmdir_cmd* command for removing directories
*g:netrw_rmdir_cmd* command for removing remote directories
default: "ssh USEPORT HOSTNAME rmdir"
*g:netrw_rmf_cmd* command for removing softlinks
*g:netrw_rmf_cmd* command for removing remote softlinks
default: "ssh USEPORT HOSTNAME rm -f"
*g:netrw_sort_by* sort by "name", "time", or "size"
@@ -2634,6 +2650,9 @@ your browsing preferences. (see also: |netrw-settings|)
If g:netrw_winsize is less than zero, then
the absolute value of g:netrw_winsize lines
or columns will be used for the new window.
If g:netrw_winsize is zero, then a normal
split will be made (ie. |'equalalways'| will
take effect, for example).
default: 50 (for 50%)
*g:netrw_xstrlen* Controls how netrw computes string lengths,
@@ -2830,6 +2849,15 @@ One may select a netrw window for editing with the "C" mapping, or by setting
g:netrw_chgwin to the selected window number. Subsequent selection of a file
to edit (|netrw-cr|) will use that window.
* C by itself, will select the current window for editing via
|netrw-cr|
* [count]C the count will be used as the window number to be used
for editing via |netrw-cr|.
Using >
let g:netrw_chgwin= -1
will restore the default editing behavior (ie. use the current window).
Related topics: |netrw-cr| |g:netrw_browse_split|
Associated setting variables: |g:netrw_chgwin|
@@ -3118,6 +3146,15 @@ Associated setting variables: |g:netrw_chgwin|
all netrw's mouse mappings, not just the <leftmouse> one.
(see |g:netrw_mousemaps|)
*netrw-p16*
P16. When editing remote files (ex. :e ftp://hostname/path/file),
under Windows I get an |E303| message complaining that its unable
to open a swap file.
(romainl) It looks like you are starting Vim from a protected
directory. Start if from your $HOME or another writable
directory.
==============================================================================
11. Debugging Netrw Itself *netrw-debug* {{{1
@@ -3177,6 +3214,32 @@ which is loaded automatically at startup (assuming :set nocp).
==============================================================================
12. History *netrw-history* {{{1
v152: Apr 08, 2014 * uses the |'noswapfile'| option (requires
vim 7.4 with patch 213)
* (Enno Nagel) turn |'rnu'| off in netrw
buffers.
* (Quinn Strahl) suggested that netrw
allow regular window splitting to occur,
thereby allowing |'equalalways'| to take
effect.
* (qingtian zhao) normally, netrw will
save and restore the |'fileformat'|;
however, sometimes that isn't wanted
Apr 14, 2014 * whenever netrw marks a buffer as ro,
it will also mark it as nomod.
Apr 16, 2014 * sftp protocol now supported by
netrw#Obtain(); this means that one
may use "mc" to copy a remote file
to a local file using sftp, and that
the |netrw-O| command can obtain remote
files via sftp.
* added [count]C support (see |netrw-C|)
Apr 18, 2014 * when |g:netrw_chgwin| is one more than
the last window, then vertically split
the last window and use it as the
chgwin window.
May 09, 2014 * SavePosn was "saving filename under cursor"
from a non-netrw window when using :Rex.
v151: Jan 22, 2014 * extended :Rexplore to return to buffer
prior to Explore or editing a directory
* (Ken Takata) netrw gave error when

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 @@
*sign.txt* For Vim version 7.4. Last change: 2013 Nov 17
*sign.txt* For Vim version 7.4. Last change: 2014 May 07
VIM REFERENCE MANUAL by Gordon Prieur
@@ -137,6 +137,7 @@ PLACING SIGNS *:sign-place* *E158*
:sign place {id} line={lnum} name={name} buffer={nr}
Same, but use buffer {nr}.
*E885*
:sign place {id} name={name} file={fname}
Change the placed sign {id} in file {fname} to use the defined
sign {name}. See remark above about {fname} |:sign-fname|.

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

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 Jun 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -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

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*
@@ -1201,6 +1208,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
+mouse various.txt /*+mouse*
+mouse_dec various.txt /*+mouse_dec*
+mouse_gpm various.txt /*+mouse_gpm*
+mouse_jsbterm various.txt /*+mouse_jsbterm*
+mouse_netterm various.txt /*+mouse_netterm*
+mouse_pterm various.txt /*+mouse_pterm*
+mouse_sgr various.txt /*+mouse_sgr*
@@ -1415,6 +1423,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
/\%>c pattern.txt /*\/\\%>c*
/\%>l pattern.txt /*\/\\%>l*
/\%>v pattern.txt /*\/\\%>v*
/\%C pattern.txt /*\/\\%C*
/\%U pattern.txt /*\/\\%U*
/\%V pattern.txt /*\/\\%V*
/\%[] pattern.txt /*\/\\%[]*
@@ -2521,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*
@@ -3583,7 +3595,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*
@@ -4312,6 +4324,10 @@ E880 if_pyth.txt /*E880*
E881 autocmd.txt /*E881*
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*
E89 message.txt /*E89*
E90 message.txt /*E90*
E91 options.txt /*E91*
@@ -4441,6 +4457,13 @@ Operator-pending-mode intro.txt /*Operator-pending-mode*
OverTheSpot mbyte.txt /*OverTheSpot*
P change.txt /*P*
PATHEXT eval.txt /*PATHEXT*
PHP_BracesAtCodeLevel indent.txt /*PHP_BracesAtCodeLevel*
PHP_autoformatcomment indent.txt /*PHP_autoformatcomment*
PHP_default_indenting indent.txt /*PHP_default_indenting*
PHP_outdentSLComments indent.txt /*PHP_outdentSLComments*
PHP_outdentphpescape indent.txt /*PHP_outdentphpescape*
PHP_removeCRwhenUnix indent.txt /*PHP_removeCRwhenUnix*
PHP_vintage_case_default_indent indent.txt /*PHP_vintage_case_default_indent*
Pattern pattern.txt /*Pattern*
Perl if_perl.txt /*Perl*
Posix intro.txt /*Posix*
@@ -4784,6 +4807,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*
@@ -4881,6 +4905,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*
@@ -5972,6 +5997,7 @@ g:netrw_dynamic_maxfilenamelen pi_netrw.txt /*g:netrw_dynamic_maxfilenamelen*
g:netrw_errorlvl pi_netrw.txt /*g:netrw_errorlvl*
g:netrw_fastbrowse pi_netrw.txt /*g:netrw_fastbrowse*
g:netrw_fetch_cmd pi_netrw.txt /*g:netrw_fetch_cmd*
g:netrw_ffkeep pi_netrw.txt /*g:netrw_ffkeep*
g:netrw_fname_escape pi_netrw.txt /*g:netrw_fname_escape*
g:netrw_ftp pi_netrw.txt /*g:netrw_ftp*
g:netrw_ftp_browse_reject pi_netrw.txt /*g:netrw_ftp_browse_reject*
@@ -6116,6 +6142,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()*
@@ -6811,6 +6839,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()*
@@ -7076,6 +7105,7 @@ netrw-p12 pi_netrw.txt /*netrw-p12*
netrw-p13 pi_netrw.txt /*netrw-p13*
netrw-p14 pi_netrw.txt /*netrw-p14*
netrw-p15 pi_netrw.txt /*netrw-p15*
netrw-p16 pi_netrw.txt /*netrw-p16*
netrw-p2 pi_netrw.txt /*netrw-p2*
netrw-p3 pi_netrw.txt /*netrw-p3*
netrw-p4 pi_netrw.txt /*netrw-p4*

View File

@@ -1,4 +1,4 @@
*term.txt* For Vim version 7.4. Last change: 2013 Mar 13
*term.txt* For Vim version 7.4. Last change: 2014 May 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -666,8 +666,8 @@ When the X-server clipboard is available, the command server described in
*xterm-copy-paste*
NOTE: In some (older) xterms, it's not possible to move the cursor past column
95. This is an xterm problem, not Vim's. Get a newer xterm |color-xterm|.
Now the limit is 223 columns.
95 or 223. This is an xterm problem, not Vim's. Get a newer xterm
|color-xterm|. Also see |'ttymouse'|.
Copy/paste in xterm with (current mode NOT included in 'mouse'):
1. Press left mouse button on first letter of text, move mouse pointer to last

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.4. Last change: 2014 Apr 05
*todo.txt* For Vim version 7.4. Last change: 2014 Aug 22
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -35,78 +35,131 @@ not be repeated below, unless there is extra information.
-------------------- Known bugs and current work -----------------------
Regexp problems:
- Crash when using cpp syntax file with raw string. (Havard Garnes)
Edit "~/tmp/test.cc" and source "~/tmp/cpp.vim".
- NFA regexp doesn't count tab matches correctly. (Urtica Dioica / gaultheria
Shallon, 2013 Nov 18)
- After patch 7.4.100 there is still a difference between NFA and old engine.
25 a's with pattern \v^(aa+)\1+$ (Urtica Dioica, 2013 Nov 21) Also: 9 a's
with pattern \v^(a{-2,})\1+$ (Nov 23)
- NFA engine combining character mismatch. (glts, 2013 Aug 27)
Remark from Dominique, Aug 27
- Bug with pattern: '\vblock (\d+)\.\n.*\d+%(\1)@<!\.$'
(Lech Lorens, 2014 Feb 3)
- Issue 164: freeze on regexp search.
- NFA problem with non-greedy match and branches. (Ingo Karkat, 2013 Nov 29)
- Ignorecase not handled properly for multi-byte characters. (Axel Bender,
2013 Dec 11)
- Using \@> and \?. (Brett Stahlman, 2013 Dec 21) Remark from Marcin Szamotulski
Remark from Brett 2014 Jan 6 and 7.
- Bug with back references. (Lech Lorens, 2014 Feb 3)
- Bug when using \>. (Ramel, 2014 Feb 2) (Aaron Bohannon, 2014 Feb 13)
- 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 for:
CmdUndefined - Like FuncUndefined but for user commands.
Yasuhiro Matsumoto, 2014 Aug 18
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?
Patch to fix a problem with breakindent. (Christian Brabandt, 2014 Aug 17)
It's actually not a breakindent problem. With test: Aug 19.
With renamed test: Aug 20
Problem that a previous silent ":throw" causes a following try/catch not to
work. (ZyX, 2013 Sep 28)
ml_get error when using Python, issue 248.
Patch to fix typos in help files. (Dominique, 2014 Aug 9)
Way to reproduce problem that characters are put on the screen twice in Insert
mode when using system(). (Jacob Niehus, 2014 Aug 9)
Related to setting TMODE_COOK. Perhaps we can omit that for system()?
Update for Romanian spell file. (Vanilla Ice, 2014 Aug 13)
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?
Patch by Marcin Szamotulski to add count to :close (2014 Aug 10, update Aug
14)
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 by Marcin Szamotulski to add +cmd to buffer commands.
(2014 Aug 18)
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.
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
directory exists. (Sergio Gallelli, 2013 Dec 29)
It is possible to define a function with a colon in the name.
"g:" is not recognized as it should. (zyx, 2014 Mar 16)
Do some plugins use names with a colon? Disallow it, but ignore the error
when an option is set?
Patch to add a special key name for K_CURSORHOLD. (Hirohito Higashi, 2014 Aug
10)
":lunmap" cannot be abbrevated to ":lu". (ZyX)
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)
Python: ":py raw_input('prompt')" doesn't work. (Manu Hack)
Crash in setqflist(). (Benoit Mortgat, 2010 Nov 18)
Value returned by virtcol() changes depending on how lines wrap. This is
inconsistant with the documentation.
MS-Windows: Crash opening very long file name starting with "\\".
(Christian Brock, 2012 Jun 29)
Crash in autocmd that unloads buffers in a BufUnload event. (Andrew Pimlott,
2012 Aug 11) Disallow :new when BufUnload is being handled?
Spell files use a latin single quote. Unicode also has another single quote.
Adjust spell file scripts to duplicate words to support both quotes.
(Ron Aaron, 2014 Apr 4)
Problem with 'spellsuggest' file, only works for some words.
(Cesar Romani, 2013 Aug 20) Depends on file name? (Aug 24)
Additional remark by glts: the suggested words are marked bad?
Syntax highlighting slow (hangs) in SASS file. (Niek Bosch, 2013 Aug 21)
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)
Spell files use a latin single quote. Unicode also has another single quote:
0x2019. (Ron Aaron, 2014 Apr 4)
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.
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.
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.
Can we make ":unlet $VAR" use unsetenv() to delete the env var?
What for systems that don't have unsetenv()?
@@ -119,6 +172,9 @@ This neither: (ZyX)
Change 'viewdir' to "$HOME/vimfiles/view" and use 'viewdiralt' to also read
from?
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.
Also see http://vim-wiki.mawercer.de/wiki/topic/vim%20plugin%20managment.html
@@ -156,29 +212,48 @@ 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)
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?
Editing an ascii file as ucs-2 or ucs-4 causes display errors.
(ZyX, 2014 Mar 30)
":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", whould 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
@@ -190,7 +265,7 @@ 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 16)
Include Haiku port? (Adrien Destugues, Siarzhuk Zharski, 2013 Oct 24)
@@ -281,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)
@@ -334,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)
@@ -348,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)
@@ -391,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
@@ -462,10 +521,6 @@ Patch to add tagfunc(). Cleaned up by Christian Brabandt, 2013 Jun 22.
Help for 'b:undo_indent'. (Thilo Six, 2012 May 28)
Also question if examples are correct.
It should be possible to make globpath() return a list instead of a string,
like with glob(). (Greg Novack, 2012 Nov 2)
Patch by Adnan Zafar, 2013 Jul 15.
The input map for CTRL-O in mswin.vim causes problems after CTRL-X CTRL-O.
Suggestion for another map. (Philip Mat, 2012 Jun 18)
But use "gi" instead of "a". Or use CTRL-\ CTRL-O.
@@ -476,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:
@@ -503,14 +561,6 @@ Apr 18)
Patch for has('unnamedplus') docs. (Tony Mechelynck, 2011 Sep 27)
And one for gui_x11.txt.
- 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.
":cd" doesn't work when current directory path contains "**".
finddir() has the same problem. (Yukihiro Nakadaira, 2012 Jan 10)
Requires a rewrite of the file_file_in_path code.
@@ -619,7 +669,8 @@ Patch to make "z=" work when 'spell' is off. Does this have nasty side
effects? (Christian Brabandt, 2012 Aug 5, Update 2013 Aug 12)
Would also need to do this for spellbadword() and spellsuggest().
Patch for variable tabstops.
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
@@ -661,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.
@@ -749,9 +797,6 @@ crash? (Raiwil, 2010 Nov 17)
Patch to add FoldedLineNr highlighting: different highlighting for the line
number of a closed fold. (eXerigumo Clanjor, 2013 Jul 15)
Does not work with NFA regexp engine:
- \%u, \%x, \%o, \%d followed by a composing character
Regexp engine performance:
- Profiling:
./vim -u NONE -s ~/vim/test/ruby.vim
@@ -796,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)
@@ -1070,6 +1111,11 @@ Session file generates error upon loading, cause by --remote-silent-tab.
Using ~ works OK on 'a' with composing char, but not on 0x0418 with composing
char 0x0301. (Tony Mechelynck, 2009 Mar 4)
Searching for composing char works, but not when inside []. (ZyX, Benjamin R.
Haskell, 2010 Aug 24)
This does not work yet: "a\(%C\)" (get composing characters into a submatch).
A function on a dictionary is not profiled. (ZyX, 2010 Dec 25)
Inconsistent: starting with $LANG set to es_ES.utf-8 gives Spanish
@@ -1154,6 +1200,7 @@ is executed.
":pedit %" with a BufReadPre autocommand causes the cursor to move to the
first line. (Ingo Karkat, 2008 Jul 1) Ian Kelling is working on this.
Similar problem with ":e". (Marc Montu, 2014 Apr 22)
Wildmenu not deleted: "gvim -u NONE", ":set nocp wildmenu cmdheight=3
laststatus=2", CTRL-D CTRL-H CTRL-H CTRL-H. (A.Politz, 2008 April 1)
@@ -1297,9 +1344,6 @@ When 'smartcase' is set and using CTRL-L to add to the search pattern it may
result in no matches. Convert chars to lower case? (Erik Wognsen, 2009 Apr
16)
Searching for composing char works, but not when inside []. (ZyX, Benjamin R.
Haskell, 2010 Aug 24)
Fail to edit file after failed register access. Error flag remains set?
(Lech Lorens, 2010 Aug 30)
@@ -1334,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)
@@ -1501,6 +1541,7 @@ Engelke, 2007 Dec 20 - 2008 Jan 17)
Win64: Seek error in swap file for a very big file (3 Gbyte). Check storing
pointer in long and seek offset in 64 bit var.
Patches from Ken Takata might help (2014 Apr 17)
Win32: patch for fullscreen mode. (Liushaolin, 2008 April 17)
@@ -3032,6 +3073,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.
@@ -3127,12 +3170,8 @@ Multi-byte characters:
8 toupper() function doesn't handle byte count changes.
7 Searching and composing characters:
When searching, should order of composing characters be ignored?
Add special item to match with a composing character, zero-width, so that
one can replace a base character and keep the composing characters.
Add a special item to match with a composing character, so that composing
characters can be manipulated.
Add a modifier to ignore composing characters, only compare base
characters. Useful for Hebrew (Ron Aaron)
8 Should implement 'delcombine' for command line editing.
8 Detect overlong UTF-8 sequences and handle them like illegal bytes.
8 ":s/x/\u\1/" doesn't work, making uppercase isn't done for multi-byte
@@ -3930,7 +3969,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_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
@@ -772,6 +773,7 @@ Date and Time: *date-functions* *time-functions*
Buffers, windows and the argument list:
argc() number of entries in the argument list
argidx() current position in the argument list
arglistid() get id of the argument list
argv() get one entry from the argument list
bufexists() check if a buffer exists
buflisted() check if a buffer exists and is listed
@@ -791,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
@@ -825,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 Apr 01
*various.txt* For Vim version 7.4. Last change: 2014 Aug 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -266,8 +266,8 @@ g8 Print the hex values of the bytes used in the
(to use aliases) set 'shellcmdflag' to "-ic".
For Win32 also see |:!start|.
After the command has been executed, the timestamp of
the current file is checked |timestamp|.
After the command has been executed, the timestamp and
size of the current file is checked |timestamp|.
Vim redraws the screen after the command is finished,
because it may have printed any text. This requires a
@@ -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|
@@ -379,6 +380,7 @@ N *+mouse* Mouse handling |mouse-using|
N *+mouseshape* |'mouseshape'|
B *+mouse_dec* Unix only: Dec terminal mouse handling |dec-mouse|
N *+mouse_gpm* Unix only: Linux console mouse handling |gpm-mouse|
N *+mouse_jsbterm* JSB mouse handling |jsbterm-mouse|
B *+mouse_netterm* Unix only: netterm mouse handling |netterm-mouse|
N *+mouse_pterm* QNX only: pterm mouse handling |qnx-terminal|
N *+mouse_sysmouse* Unix only: *BSD console mouse handling |sysmouse|

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 Aug 22
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -811,6 +811,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 +867,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 +992,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 +1010,18 @@ au BufNewFile,BufRead *.jgr setf jgraph
" Jovial
au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial
" JSON
au BufNewFile,BufRead *.json 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
@@ -1139,7 +1148,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 +1655,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 +2317,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 +2687,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

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

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

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

@@ -0,0 +1,13 @@
" Vim indent file
" Language: JSON
" Maintainer: David Barnett <daviebdawg+vim@gmail.com>
" Last Change: 2014 Jul 16
if exists('b:did_indent')
finish
endif
" JSON is a subset of JavaScript. JavaScript indenting should work fine.
runtime! indent/javascript.vim
let b:did_indent = 1

View File

@@ -3,8 +3,8 @@
" Author: John Wellesz <John.wellesz (AT) teaser (DOT) fr>
" URL: http://www.2072productions.com/vim/indent/php.vim
" Home: https://github.com/2072/PHP-Indenting-for-VIm
" Last Change: 2014 Jan 21
" Version: 1.39
" Last Change: 2014 April 3rd
" Version: 1.49
"
"
" Type :help php-indent for available options
@@ -39,7 +39,8 @@
"
" or simply 'let' the option PHP_removeCRwhenUnix to 1 and the script will
" silently remove them when VIM load this script (at each bufread).
"
if exists("b:did_indent")
finish
@@ -126,14 +127,26 @@ if exists("*GetPhpIndent")
finish " XXX -- comment this line for easy dev
endif
let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\|die\|else\)'
let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|\%(}\s*\)\?else\>\|do\>\|while\>\|switch\>\|case\>\|default\>\|for\%(each\)\=\>\|declare\>\|class\>\|trait\>\|use\>\|interface\>\|abstract\>\|final\>\|try\>\|\%(}\s*\)\=catch\>\|\%(}\s*\)\=finally\>\)'
let s:functionDecl = '\<function\>\%(\s\+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\)\=\s*(.*'
let s:endline= '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$'
let s:terminated = '\%(\%(;\%(\s*\%(?>\|}\)\)\=\|<<<''\=\a\w*''\=$\|^\s*}\)'.s:endline.'\)\|^[^''"`]*[''"`]$'
let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!'
let s:escapeDebugStops = 0
function! DebugPrintReturn(scriptLine)
echo "debug:" . a:scriptLine
call getchar()
if ! s:escapeDebugStops
echo "debug:" . a:scriptLine
let c = getchar()
if c == "\<Del>"
let s:escapeDebugStops = 1
end
endif
endfunction
@@ -190,6 +203,11 @@ function! GetLastRealCodeLNum(startline) " {{{
while getline(lnum) !~? tofind && lnum > 1
let lnum = lnum - 1
endwhile
elseif lastline =~ '^[^''"`]*[''"`][;,]'.s:endline
let tofind=substitute( lastline, '^.*\([''"`]\)[;,].*$', '^[^\1]\\+[\1]$', '')
while getline(lnum) !~? tofind && lnum > 1
let lnum = lnum - 1
endwhile
else
break
endif
@@ -211,9 +229,9 @@ function! Skippmatch2()
let line = getline(".")
if line =~ "\\([\"']\\).*/\\*.*\\1" || line =~ '\%(//\|#\).*/\*'
return 1
return 1
else
return 0
return 0
endif
endfun
@@ -226,9 +244,23 @@ function! Skippmatch() " {{{
endif
endfun " }}}
function! FindOpenBracket(lnum) " {{{
function! FindOpenBracket(lnum, blockStarter) " {{{
call cursor(a:lnum, 1)
return searchpair('{', '', '}', 'bW', 'Skippmatch()')
let line = searchpair('{', '', '}', 'bW', 'Skippmatch()')
if a:blockStarter == 1
while line > 1
let linec = getline(line)
if linec =~ s:terminated || linec =~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline
break
endif
let line = GetLastRealCodeLNum(line - 1)
endwhile
endif
return line
endfun " }}}
function! FindTheIfOfAnElse (lnum, StopAfterFirstPrevElse) " {{{
@@ -248,7 +280,7 @@ function! FindTheIfOfAnElse (lnum, StopAfterFirstPrevElse) " {{{
endif
if getline(beforeelse) =~ '^\s*}'
let beforeelse = FindOpenBracket(beforeelse)
let beforeelse = FindOpenBracket(beforeelse, 0)
if getline(beforeelse) =~ '^\s*{'
let beforeelse = GetLastRealCodeLNum(beforeelse - 1)
@@ -285,13 +317,13 @@ function! FindTheSwitchIndent (lnum) " {{{
return indent(1) - &sw * b:PHP_vintage_case_default_indent
end
if getline(test) =~ '^\s*}'
let test = FindOpenBracket(test)
while getline(test) =~ '^\s*}' && test > 1
let test = GetLastRealCodeLNum(FindOpenBracket(test, 0) - 1)
if getline(test) =~ '^\s*{'
let test = GetLastRealCodeLNum(GetLastRealCodeLNum(test - 1) - 1)
if getline(test) =~ '^\s*switch\>'
let test = GetLastRealCodeLNum(test - 1)
endif
endif
endwhile
if getline(test) =~# '^\s*switch\>'
return indent(test)
@@ -308,7 +340,7 @@ function! IslinePHP (lnum, tofind) " {{{
let cline = getline(a:lnum)
if a:tofind==""
let tofind = "^\\s*[\"']*\\s*\\zs\\S"
let tofind = "^\\s*[\"'`]*\\s*\\zs\\S"
else
let tofind = a:tofind
endif
@@ -319,6 +351,14 @@ function! IslinePHP (lnum, tofind) " {{{
let synname = synIDattr(synID(a:lnum, coltotest, 0), "name")
if synname == 'phpStringSingle' || synname == 'phpStringDouble' || synname == 'phpBacktick'
if cline !~ '^\s*[''"`]'
return ""
else
return synname
end
end
if get(s:SynPHPMatchGroups, synname) || synname =~ '^php' || synname =~? '^javaScript'
return synname
else
@@ -326,9 +366,6 @@ function! IslinePHP (lnum, tofind) " {{{
endif
endfunction " }}}
let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\|die\|else\)'
let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|else\>\|while\>\|switch\>\|case\>\|default\>\|for\%(each\)\=\>\|declare\>\|class\>\|interface\>\|abstract\>\|try\>\|catch\>\)'
let s:autoresetoptions = 0
if ! s:autoresetoptions
let s:autoresetoptions = 1
@@ -344,7 +381,6 @@ function! ResetPhpOptions()
setlocal formatoptions+=q
setlocal formatoptions+=r
setlocal formatoptions+=o
setlocal formatoptions+=w
setlocal formatoptions+=c
setlocal formatoptions+=b
endif
@@ -443,6 +479,7 @@ function! GetPhpIndent()
" Test if we are indenting PHP code {{{
let lnum = prevnonblank(v:lnum - 1)
let last_line = getline(lnum)
let endline= s:endline
if b:InPHPcode_tofind!=""
if cline =~? b:InPHPcode_tofind
@@ -483,6 +520,9 @@ function! GetPhpIndent()
let b:InPHPcode_and_script = 1
endif
elseif last_line =~ '^[^''"`]\+[''"`]$' " a string identifier with nothing after it and no other string identifier before
let b:InPHPcode = 0
let b:InPHPcode_tofind = substitute( last_line, '^.*\([''"`]\).*$', '^[^\1]*\1[;,]$', '')
elseif last_line =~? '<<<''\=\a\w*''\=$'
let b:InPHPcode = 0
let b:InPHPcode_tofind = substitute( last_line, '^.*<<<''\=\(\a\w*\)''\=$', '^\\s*\1;\\=$', '')
@@ -545,7 +585,7 @@ function! GetPhpIndent()
return 0
endif
if cline =~? '^\s*\a\w*;$\|^\a\w*$' && cline !~? s:notPhpHereDoc
if cline =~? '^\s*\a\w*;$\|^\a\w*$\|^\s*[''"`][;,]' && cline !~? s:notPhpHereDoc
return 0
endif " }}}
@@ -555,7 +595,6 @@ function! GetPhpIndent()
let last_line = getline(lnum)
let ind = indent(lnum)
let endline= s:endline
if ind==0 && b:PHP_default_indenting
let ind = b:PHP_default_indenting
@@ -567,7 +606,7 @@ function! GetPhpIndent()
if cline =~ '^\s*}\%(}}\)\@!'
let ind = indent(FindOpenBracket(v:lnum))
let ind = indent(FindOpenBracket(v:lnum, 1))
let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
return ind
endif
@@ -599,7 +638,7 @@ function! GetPhpIndent()
let LastLineClosed = 0
let terminated = '\%(;\%(\s*\%(?>\|}\)\)\=\|<<<''\=\a\w*''\=$\|^\s*}\)'.endline
let terminated = s:terminated
let unstated = '\%(^\s*'.s:blockstart.'.*)\|\%(//.*\)\@<!\<e'.'lse\>\)'.endline
@@ -614,7 +653,7 @@ function! GetPhpIndent()
while last_line_num > 1
if previous_line =~ '^\s*\%(' . s:blockstart . '\|\%([a-zA-Z]\s*\)*function\)'
if previous_line =~ terminated || previous_line =~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . endline
let ind = indent(last_line_num)
@@ -625,7 +664,7 @@ function! GetPhpIndent()
return ind
endif
let last_line_num = last_line_num - 1
let last_line_num = GetLastRealCodeLNum(last_line_num - 1)
let previous_line = getline(last_line_num)
endwhile
@@ -638,22 +677,29 @@ function! GetPhpIndent()
let last_line_num = lnum
let LastLineClosed = 1
let isSingleLineBlock = 0
while 1
if previous_line =~ '^\s*}\|;\s*}'.endline " XXX
if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline " XXX
call cursor(last_line_num, 1)
call search('}\|;\s*}'.endline, 'cW')
if previous_line !~ '^}'
call search('}\|;\s*}'.endline, 'W')
end
let oldLastLine = last_line_num
let last_line_num = searchpair('{', '', '}', 'bW', 'Skippmatch()')
if oldLastLine == last_line_num || getline(last_line_num) =~ '^\s*{'
if getline(last_line_num) =~ '^\s*{'
let last_line_num = GetLastRealCodeLNum(last_line_num - 1)
elseif oldLastLine == last_line_num
let isSingleLineBlock = 1
continue
endif
let previous_line = getline(last_line_num)
continue
else
let isSingleLineBlock = 0
if getline(last_line_num) =~# '^\s*else\%(if\)\=\>'
let last_line_num = FindTheIfOfAnElse(last_line_num, 0)
@@ -711,7 +757,12 @@ function! GetPhpIndent()
if last_line =~# '[{(\[]'.endline || last_line =~? '\h\w*\s*(.*,$' && AntepenultimateLine !~ '[,(]'.endline
if !b:PHP_BracesAtCodeLevel || last_line !~# '^\s*{'
let dontIndent = 0
if last_line =~ '\S\+\s*{'.endline && last_line !~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline
let dontIndent = 1
endif
if !dontIndent && (!b:PHP_BracesAtCodeLevel || last_line !~# '^\s*{')
let ind = ind + &sw
endif
@@ -723,7 +774,7 @@ function! GetPhpIndent()
elseif last_line =~ '\S\+\s*),'.endline
call cursor(lnum, 1)
call search('),'.endline, 'W')
call search('),'.endline, 'W') " line never begins with ) so no need for 'c' flag
let openedparent = searchpair('(', '', ')', 'bW', 'Skippmatch()')
if openedparent != lnum
let ind = indent(openedparent)

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

@@ -1,6 +1,6 @@
" Vim script to work like "less"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2012 May 18
" Last Change: 2014 May 13
" Avoid loading this file twice, allow the user to define his own script.
if exists("loaded_less")
@@ -87,6 +87,9 @@ noremap <script> <Space> :call <SID>NextPage()<CR><SID>L
map <C-V> <Space>
map f <Space>
map <C-F> <Space>
map <PageDown> <Space>
map <kPageDown> <Space>
map <S-Down> <Space>
map z <Space>
map <Esc><Space> <Space>
fun! s:NextPage()
@@ -116,10 +119,14 @@ map e <CR>
map <C-E> <CR>
map j <CR>
map <C-J> <CR>
map <Down> <CR>
" Scroll one page backward
noremap <script> b <C-B><SID>L
map <C-B> b
map <PageUp> b
map <kPageUp> b
map <S-Up> b
map w b
map <Esc>v b
@@ -133,6 +140,7 @@ map y k
map <C-Y> k
map <C-P> k
map <C-K> k
map <Up> k
" Redraw
noremap <script> r <C-L><SID>L
@@ -143,11 +151,15 @@ noremap <script> R <C-L><SID>L
noremap <script> g gg<SID>L
map < g
map <Esc>< g
map <Home> g
map <kHome> g
" End of file
noremap <script> G G<SID>L
map > G
map <Esc>> G
map <End> G
map <kEnd> G
" Go to percentage
noremap <script> % %<SID>L
@@ -184,6 +196,7 @@ fun! s:Backward()
endfun
call s:Forward()
cunmap <CR>
" Quitting
noremap q :q<CR>
@@ -240,6 +253,18 @@ fun! s:End()
unmap v
unmap /
unmap ?
unmap <Up>
unmap <Down>
unmap <PageDown>
unmap <kPageDown>
unmap <PageUp>
unmap <kPageUp>
unmap <S-Down>
unmap <S-Up>
unmap <Home>
unmap <kHome>
unmap <End>
unmap <kEnd>
endfun
" vim: sw=2

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

@@ -20,7 +20,7 @@
if &cp || exists("g:loaded_netrwPlugin")
finish
endif
let g:loaded_netrwPlugin = "v151"
let g:loaded_netrwPlugin = "v152"
if v:version < 702
echohl WarningMsg
echo "***warning*** you need vim version 7.2 for this version of netrw"

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

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

@@ -2,7 +2,7 @@
" Language: C++
" Current Maintainer: vim-jp (https://github.com/vim-jp/cpp-vim)
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
" Last Change: 2012 Jun 14
" Last Change: 2014 May 14
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -39,6 +39,7 @@ if !exists("cpp_no_cpp11")
syn keyword cppExceptions noexcept
syn keyword cppStorageClass constexpr decltype
syn keyword cppConstant nullptr
syn region cppRawString matchgroup=cppRawDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
endif
" The minimum and maximum operators in GNU C++
@@ -62,6 +63,8 @@ if version >= 508 || !exists("did_cpp_syntax_inits")
HiLink cppStructure Structure
HiLink cppBoolean Boolean
HiLink cppConstant Constant
HiLink cppRawDelimiter Delimiter
HiLink cppRawString String
delcommand HiLink
endif

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

@@ -4,8 +4,8 @@
" :3s+-foo++g
" Description: highlight dnsmasq configuration files
" File: runtime/syntax/dnsmasq.vim
" Version: 2.67
" Last Change: 2013 Nov 03
" Version: 2.70
" Last Change: 2014 Apr 30
" Modeline: vim: ts=8:sw=2:sts=2:
"
" License: VIM License
@@ -132,6 +132,9 @@ syn match DnsmasqKeyword "^\s*dhcp-subscrid\>"
syn match DnsmasqKeyword "^\s*dhcp-userclass\>"
syn match DnsmasqKeyword "^\s*dhcp-vendorclass\>"
syn match DnsmasqKeyword "^\s*dns-rr\>"
syn match DnsmasqKeyword "^\s*dnssec\>"
syn match DnsmasqKeyword "^\s*dnssec-check-unsigned\>"
syn match DnsmasqKeyword "^\s*dnssec-no-timecheck\>"
syn match DnsmasqKeyword "^\s*dns-forward-max\>"
syn match DnsmasqKeyword "^\s*domain\>"
syn match DnsmasqKeyword "^\s*domain-needed\>"
@@ -153,6 +156,7 @@ syn match DnsmasqKeyword "^\s*listen-address\>"
syn match DnsmasqKeyword "^\s*local\>"
syn match DnsmasqKeyword "^\s*localmx\>"
syn match DnsmasqKeyword "^\s*local-ttl\>"
syn match DnsmasqKeyword "^\s*local-service\>"
syn match DnsmasqKeyword "^\s*localise-queries\>"
syn match DnsmasqKeyword "^\s*log-async\>"
syn match DnsmasqKeyword "^\s*log-dhcp\>"
@@ -187,8 +191,10 @@ syn match DnsmasqKeyword "^\s*read-ethers\>"
syn match DnsmasqKeyword "^\s*rebind-domain-ok\>"
syn match DnsmasqKeyword "^\s*rebind-localhost-ok\>"
syn match DnsmasqKeyword "^\s*resolv-file\>"
syn match DnsmasqKeyword "^\s*rev-server\>"
syn match DnsmasqKeyword "^\s*selfmx\>"
syn match DnsmasqKeyword "^\s*server\>"
syn match DnsmasqKeyword "^\s*servers-file\>"
syn match DnsmasqKeyword "^\s*srv-host\>"
syn match DnsmasqKeyword "^\s*stop-dns-rebind\>"
syn match DnsmasqKeyword "^\s*strict-order\>"

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

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

@@ -0,0 +1,16 @@
" Vim syntax file
" Language: JSON
" Maintainer: David Barnett <daviebdawg+vim@gmail.com>
" Last Change: 2014 Jul 16
" For version 5.x: Clear all syntax items.
" For version 6.x and later: Quit when a syntax file was already loaded.
if exists('b:current_syntax')
finish
endif
" Use JavaScript syntax. JSON is a subset of JavaScript.
runtime! syntax/javascript.vim
unlet b:current_syntax
let b:current_syntax = 'json'

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

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。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

@@ -192,6 +192,30 @@ To set the environment execute the msvc2010.bat script. You can then build
Vim with Make_mvc.mak.
Targeting Windows XP with new MSVC *new-msvc-windows-xp*
----------------------------------
Beginning with Visual C++ 2010, Microsoft changed the behavior of LINK.EXE
so that it targets Windows 6.0 (Vista) by default. In order to override
this, the target Windows version number needs to be passed to LINK like
follows:
LINK ... /subsystem:console,5.01
Make_mvc.mak now supports a macro SUBSYSTEM_VER to pass the Windows version.
Use lines like follows to target Windows XP (assuming using Visual C++ 2012
under 64-bit Windows):
set WinSdk71=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.1A
set SDK_INCLUDE_DIR=%WinSdk71%\Include
set INCLUDE=%WinSdk71%\Include;%INCLUDE%
set LIB=%WinSdk71%\Lib;%LIB%
set PATH=%WinSdk71%\Bin;%PATH%
set CL=/D_USING_V110_SDK71_
nmake -f Make_mvc.mak ... WINVER=0x0501 SUBSYSTEM_VER=5.01
The following Visual C++ team blog can serve as a reference page:
http://blogs.msdn.com/b/vcblog/archive/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012.aspx
2. MinGW
========

View File

@@ -54,6 +54,8 @@ EXE_dependencies = \
blowfish.obj \
buffer.obj \
charset.obj \
crypt.obj \
crypt_zip.obj \
diff.obj \
digraph.obj \
edit.obj \

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