Compare commits

..

486 Commits

Author SHA1 Message Date
Justin M. Keyes
b33c777493 NVIM v0.1.2
Features:
  ef66249 tabline: Add %[] atom to the tabline, for random commands on click
  f338ea7 job control: implement jobpid() to get PID of job
  d0d5d17 job control: add 'detach' option to jobstart
  7ad3f07 Add support for binary numbers

Fixes:
  291495a regexp_nfa.c: Speed up find_match_text()
  317d5ca input: Do not set high-bit; preserve ALT modifier.
  3b7c409 shell: Unquote &shell* options before using them

Notable changes:
  49b06a8 encoding: Always use "utf-8" as default for &encoding
  79a6983 ui: revert "gui_running" hack

Other changes:
  b4b4536 version: semver.org compliance
  c6aa716 reproducible builds: Stop using __{DATE,TIME}__
  46bd3c0 clipboard: Check $DISPLAY. Prefer xsel. #4150
  f6ecd12 job control: don't kill PTY processes on exit
  49f0417 clipboard: Detach clipboard helper, so contents is kept after nvim exit
  38435e8 python: Add missing I/O methods to RedirectStream
  d26b01d eval: Use better error messages when failing to dump values
  62d137c Remove swapsync.
2016-02-09 00:01:18 -05:00
E Kawashima
392964617a vimrc_example.vim: Update vimrc path. #4203 2016-02-08 23:29:18 -05:00
Diego Viola
f8f92a2360 doc: Add whitespace before parens. #4202 2016-02-08 13:43:27 -05:00
Justin M. Keyes
827e267800 Merge pull request #4175 from watiko/vim-7.4.700
vim-patch:7.4.700
2016-02-07 01:33:01 -05:00
David Barnett
cc52060245 vim-patch:541f92 #4173
Updated runtime files.

https://github.com/vim/vim/commit/541f92
2016-02-07 01:13:30 -05:00
Justin M. Keyes
bd3ea7227e Merge pull request #4176 from watiko/vim-7.4.689
vim-patch:7.4.689
2016-02-07 01:01:03 -05:00
Justin M. Keyes
0ef0c17837 Merge pull request #4185 from justinmk/ci_mingw
CI/travis: get MinGW from our mirror
2016-02-07 00:09:39 -05:00
Justin M. Keyes
5e876388e5 CI/travis: get MinGW from our mirror.
sourceforge download has been failing randomly, which causes build
failures.
2016-02-06 23:43:16 -05:00
watiko
1ecbfd19db vim-patch:7.4.689
Problem:    On MS-Windows, when 'autochdir' is set, diff mode with files in
            different directories does not work. (Axel Bender)
Solution:   Remember the current directory and use it where needed. (Christian
            Brabandt)

d87c36ea5e

---

see: "autochdir + encoding=utf8 messes up diff"
     https://groups.google.com/d/msg/vim_dev/QrE4Y2LMJR8/uxigns5KGxYJ
2016-02-07 13:40:07 +09:00
Justin M. Keyes
b12e5fa8bd CI/travis: Move check to before_script.sh.
Avoids some duplication.
2016-02-06 23:19:26 -05:00
watiko
9b19335c6e vim-patch:7.4.693 #4172
Problem:    Session file is not correct when there are multiple tab pages.
Solution:   Reset the current window number for each tab page. (Jacob Niehus)

695baeefe1

---

see: "[patch] wincmd error during session restore"
     https://groups.google.com/d/msg/vim_dev/NykQ0UuOjXc/_MZi4sv9vp0J

What I did for testing:

```sh
mkdir /tmp/test_session
cd $_

function test_session() {
  $1 -u NONE -i NONE -N ~/.vimrc \
    -c 'wincmd s'      \
    -c 'wincmd v'      \
    -c 'wincmd T'      \
    -c 'normal 1gt'    \
    -c '2wincmd w'     \
    -c 'mks! test.vis' \
    -c 'qa'
  $1 -u NONE -i NONE -N -S test.vis
}

test_session vim
test_session nvim
test_session /path/to/your/neovim/repository/build/bin/nvim
```
2016-02-06 22:54:36 -05:00
Justin M. Keyes
1ce80d8676 Merge pull request #4174 from jamessan/msgpack-version-check
cmake: Fix search for msgpack when old system lib is installed
2016-02-06 12:44:40 -05:00
James McCoy
1d1574e0ac cmake: Use find_package(Msgpack)'s version in pkg_search_module
Avoid duplicating information by using the Msgpack_FIND_VERSION variable
exported by find_package() inside FindMsgpack's pkg_search_module call.
2016-02-05 21:23:19 -05:00
James McCoy
79e7c03f91 cmake: msgpack: Check all lib names per directory
By default, find_library() searches all directories for one possible
name and then looks for the next name.  To make sure we're building
against the same headers and libraries, look for all names in a
directory before moving to the next one.
2016-02-05 19:46:53 -05:00
James McCoy
2be51f5e85 cmake: msgpack: Add more thorough version check
In 33bc332, version constraints were added to pkg_search_module(), but
that only affects the set of directories searched by
find_library()/find_path().

Once the header directory is found, parse the version from
version_master.h so it can be checked by the find_package() call in the
root CMakeLists.txt.
2016-02-05 19:46:53 -05:00
Justin M. Keyes
d9cada146f Merge pull request #4157 from watiko/vim-7.4.694
vim-patch:7.4.{662,694}
2016-02-05 10:02:38 -05:00
watiko
7b955802b3 vim-patch:7.4.688 #4159
Problem:    When "$" is in 'cpo' the popup menu isn't undrawn correctly.
            (Issue 166)
Solution:   When using the popup menu remove the "$".

478c46e50f

NOTE: To reproduce in nvim:
    nvim -u NONE -c 'exe "norm iaaa iabbbbbb acc" | norm yyp' -c 'set cpo+=$'
2016-02-05 09:54:03 -05:00
Shougo Matsushita
46bd3c0f77 clipboard: Check $DISPLAY. Prefer xsel. #4150 2016-02-05 09:51:56 -05:00
watiko
3cf8ad6f48 tests: Add test case for legacy test 45 2016-02-05 14:09:03 +09:00
Lucas Hoffmann
86c5696c27 tests: Migrate legacy test 45. 2016-02-05 13:55:27 +09:00
watiko
69e448d1d8 vim-patch:7.4.700
Problem:    Fold can't be opened after ":move". (Ein Brown)
Solution:   Delete the folding information and update it afterwards.
            (Christian Brabandt)

d5f6933d5c
2016-02-05 12:21:14 +09:00
Justin M. Keyes
add02b675d Merge pull request #4155 from justinmk/gui_running
ui: revert "gui_running" hack
2016-02-04 01:21:26 -05:00
Justin M. Keyes
863e1c91a6 Merge pull request #4158 from neovim/coverity-135004
coverity/135004: Null pointer dereferences
2016-02-03 11:40:40 -05:00
Nikolai Aleksandrovich Pavlov
f5c112c949 coverity/135004: Null pointer dereferences 2016-02-03 16:27:28 +03:00
watiko
4cbe52b3a3 tests: Migrate legacy test textobjects 2016-02-03 21:56:22 +09:00
watiko
7aaffb7001 vim-patch:7.4.694
Problem:    Running tests changes the .viminfo file.
Solution:   Disable viminfo in the text objects test.

29d54df5cd
2016-02-03 21:56:22 +09:00
watiko
924cacd2fc vim-patch:7.4.662
Problem:    When 'M' is in the 'cpo' option then selecting a text object in
            parenthesis does not work correctly.
Solution:   Keep 'M' in 'cpo' when finding a match. (Hirohito Higashi)

438b64ab71
2016-02-03 21:56:22 +09:00
lyuts
4f4b8ea448 CMake: Avoid dependency cycles in helptags targets. #3983
Declare dependency in terms of directory, rather than individual doc
files to avoid target dependency cycles.  This still maintains install
targets at doc file level.
2016-02-03 01:43:12 -05:00
Justin M. Keyes
79a6983c0c ui: revert "gui_running" hack
Plugins (YCM, dispatch.vim) use gui_running to decide behavior; so do
some colorschemes. Up to now, nvim lied about gui_running for the
benefit of colorschemes and the detriment of all _other_ plugins that
check this condition. That's counterproductive: a user employs at most
_one_ colorscheme but may use many other plugins which expect the Vim
legacy semantics of gui_running.

Moreover, colorschemes usually don't _need_ to check gui_running: they
can instead set cterm{fg,bg} and gui{fg,bg} in the same :highlight call.

It is reasonable for users who want "true color" to modify their
colorscheme once (or request upstream to do so) in order to avoid
running into quirks in any other plugins.

Closes #2782
2016-02-03 01:21:59 -05:00
Justin M. Keyes
8e92b7f9fc Merge pull request #4153 from watiko/vim-7.4.643
vim-patch:7.4.643
2016-02-02 22:18:42 -05:00
Justin M. Keyes
a4ea4dac45 Merge #4120 'vim-patch:7.4.740' 2016-02-02 22:09:05 -05:00
Jurica Bradaric
ac88c35d32 test: Do not depend on helptags. 2016-02-02 22:07:53 -05:00
watiko
f104ce2d15 vim-patch:7.4.643
Problem:    Using the default file format for Mac files. (Issue 77)
Solution:   Reset the try_mac counter in the right place. (Oswald)

c6b7217ff5
2016-02-03 06:38:38 +09:00
Marco Hinz
3d15cab29d Tests: fix according to lualint 2016-02-02 20:23:12 +01:00
Justin M. Keyes
5308585adf Merge pull request #3871 from ZyX-I/tabline-clicks
Allow running random code on tabline clicks
2016-02-01 22:31:02 -05:00
ZyX
ad5cb87d7a eval: Add +tablineat feature 2016-02-01 21:40:46 +03:00
ZyX
1a356e6439 documentation: Reword help 2016-02-01 21:40:46 +03:00
ZyX
3f314d40be functests: Improve tabline click tests 2016-02-01 21:40:46 +03:00
ZyX
64038bf4e2 tabline: Switch to functions, handle different click types 2016-02-01 21:40:06 +03:00
ZyX
ef662498b1 tabline: Add %[] atom to the tabline, for random commands on click
Currently untested and undocumented.
2016-02-01 21:40:06 +03:00
ZyX
3e3d2d783c option: Refactor 'statusline' option flags from #defines to enum 2016-02-01 21:40:06 +03:00
Shougo Matsushita
830678d5f9 version.c: update
Thanks to @sethjackson, @oni-link, @equalsraf, @jusga

included patches:
 697 Already included e4975f8
1013
1149 Revert 7.4.1013

NA patches:
1002 Windows Test
1003 Travis CI
1004 Makefile
1008 Drop OS/2 support
1009 ARCHIE is already removed in neovim
1011 if_perl
1012 if_python
1014 Cygwin support
1016 Drop OS/2 support
1019 Makefile fix
1020 Windows fix
1021 Makefile fix
1022 Remove outdated description
1023 Makefile fix
1024 Windows fix
1025 Makefile fix
1026 Makefile fix
1027 if_python fix
1028 Nsis version file
1031 if_python
1033 Windows fix
1038 configure fix
1040 tee.c
1043 INSTALL_mac.txt
1044 ifdef FEAT_EVAL
1045 Travis fix
1060 old style test README fix
1062 Makefile fix
1063 Makefile fix
1065 if_python, if_lua, if_perl, if_ruby fix
1066 Windows build
1067 Makefile fix
1069 Compiler warning
1070 if_tcl
1074 GUI Compiler warning
1077 Windows build documentation
1078 Windows build
1080 Windows GUI
1082 Windows GUI
1083 GVimExt
1095 Makefile
1098 style fix
1099 crypt
1100 Cygwin Makefile
1103 filelist
1104 if_mzscheme
1106 Windows Makefile
1109 Windows
1115 Windows Makefile
1124 Windows
1125 if_perl
1127 if_perl
1128 Windows junction delete() fix
1129 if_python
1131 viminfo
1133 ARGS() macro
1134 Windows
1135 Windows
1138 GUI
1139 Windows
1144 float.h
1145 configure fix
1146 if_python3 fix
1148 Makefile fix
1155 feature remove
1158 ARGS macro
1159 ARGS macro
1162 if_mzscheme
1171 Makefile fix
1172 configure fix
1175 MinGW Cygwin build
1176 channel prototype fix
1185 if_tcl
1190 configure fix
1192 FEAT non multibyte fix
1196-1203 ARGS macro
1204 GUI Motif
1205-1208 old style function
1209 Athena support
1210 old style function
1211 old style function
1212 GUI Motif
1213-1215 old style function
1216 HAVE_STDARG_H
1218 old style function
1219 FEAT_FLOAT
2016-02-01 04:04:14 -05:00
Jurica Bradaric
208f9dd09d vim-patch:7.4.740
Problem:    ":1quit" works like ":.quit". (Bohr Shaw)
Solution:   Don't exit Vim when a range is specified. (Christian Brabandt)

c7a0d32c83
2016-02-01 09:04:08 +01:00
Justin M. Keyes
76086b36b7 Merge pull request #4145 from pra85/patch-1
typo in doc/nvim_provider.txt
2016-02-01 02:50:26 -05:00
Justin M. Keyes
be1d5a61be Merge pull request #4129 from jbradaric/vim-7.4.745
vim-patch:7.4.{745,746,747,748}
2016-02-01 02:49:27 -05:00
Prayag Verma
1ac6601841 doc: fix typo in doc/nvim_provider.txt
Spelling mistake - 
`peform` > `perform`
2016-02-01 13:15:26 +05:30
Jurica Bradaric
59ef994f8f vim-patch:7.4.741 #4121
Problem:    When using += with ":set" a trailing comma is not recognized.
            (Issue 365)
Solution:   Don't add a second comma. Add a test. (partly by Christian
            Brabandt)

a7b7b1cef9
2016-02-01 02:28:51 -05:00
Justin M. Keyes
99067b7e56 Merge pull request #4113 from jbradaric/vim-7.4.709
vim-patch:7.4.709
2016-02-01 02:16:29 -05:00
Justin M. Keyes
fe1ba0487a Merge pull request #3994 from sethjackson/pathext
Windows: use $PATHEXT to find executables in path
2016-02-01 02:06:49 -05:00
Justin M. Keyes
e2231bc372 Merge pull request #4144 from george-b/manwidth
Respect $MANWIDTH
2016-02-01 01:49:43 -05:00
Justin M. Keyes
1d995bb357 Merge pull request #4013 from watiko/vim-increment
Vim patches related to increment and marks
2016-02-01 01:47:37 -05:00
George Brown
948361760c Respect $MANWIDTH
If $MANWIDTH is set do not override it otherwise use winwidth.
2016-02-01 00:39:24 -06:00
Justin M. Keyes
5ee87c68b7 Merge pull request #4024 from sethjackson/io-include
Windows: include <io.h>
2016-02-01 01:24:57 -05:00
Justin M. Keyes
ee5c4f8a2b Merge pull request #4030 from sethjackson/unistd
config: Remove HAVE_UNISTD_H
2016-02-01 00:07:23 -05:00
watiko
228d236bdf Fix lint error 2016-02-01 03:47:09 +09:00
watiko
fa924f4604 tests: Migrate legacy test increment. 2016-02-01 03:47:09 +09:00
watiko
2016365ffe vim-patch:7.4.1089
Problem:    Repeating CTRL-A doesn't work.
Solution:   Call prep_redo_cmd(). (Hirohito Higashi)

ef2b5036b3
2016-02-01 03:47:09 +09:00
watiko
cb724182ff vim-patch:7.4.1088
Problem:    Coverity warns for uninitialized variables.  Only one is an actual
            problem.
Solution:   Move the conditions.  Don't use endpos if handling an error.

7ae4fbca55
2016-02-01 03:47:09 +09:00
watiko
8f212568aa vim-patch:7.4.1087
Problem:    CTRL-A and CTRL-X do not work properly with blockwise visual
            selection if there is a mix of Tab and spaces.
Solution:   Add OP_NR_ADD and OP_NR_SUB. (Hirohito Higashi)

d79e55016c
2016-02-01 03:47:09 +09:00
watiko
3a94e06abb vim-patch:7.4.1085
Problem:    The CTRL-A and CTRL-X commands do not update the '[ and '] marks.
Solution:   (Yukihiro Nakadaira)

a52dfaed10
2016-02-01 03:47:09 +09:00
watiko
40149a9dbf vim-patch:7.4.634
Problem:    Marks are not restored after redo + undo.
Solution:   Fix the way marks are restored. (Olaf Dabrunz)

f65aad5554
35e7594dd4
2016-02-01 03:47:09 +09:00
watiko
2f52ae18e7 vim-patch:7.4.1084
Problem:    Using "." to repeat CTRL-A in Visual mode increments the wrong
            numbers.
Solution:   Append right size to the redo buffer. (Ozaki Kiichi)

e1edc1caba
2016-02-01 03:47:09 +09:00
watiko
594e3a64de vim-patch:7.4.1076
Problem:    CTRL-A does not work well in right-left mode.
Solution:   Remove reversing the line, add a test. (Hirohito Higashi)

6a3c8aff04
2016-02-01 03:47:09 +09:00
watiko
63560c9c89 vim-patch:7.4.1072
Problem:    Increment test is old style.
Solution:   Make the increment test a new style test. (Hirohito Higashi)

450919587d
44132a10ae
2016-02-01 03:47:08 +09:00
watiko
ddba89c9b6 vim-patch:7.4.1065
Problem:    Cannot use the "dll" options on MS-Windows.
Solution:   Support the options on all platforms.  Use the built-in name as
            the default, so that it's clear what Vim is looking for.

25e4fcde76
2016-02-01 03:47:08 +09:00
watiko
a6e4271c15 vim-patch:7.4.1029
Problem:    test_increment fails on systems with 32 bit long.
Solution:   Only test with 32 bits.

d3343960d7
2016-02-01 03:47:08 +09:00
watiko
a5f361e470 vim-patch:7.4.1027
Problem:    No support for binary numbers.
Solution:   Add "bin" to nrformats. (Jason Schulz)

887c1fea4a
2016-02-01 03:47:08 +09:00
watiko
7fc996abf6 vim-patch:7.0212
Add missing test case (test59's test 8-8).

8fd89f0fe7
0b23879827
2016-02-01 03:44:46 +09:00
watiko
1e94262efe vim-patch:7.4.848
Problem:    CTRL-A on hex number in Visual block mode is incorrect.
Solution:   Account for the "0x". (Hirohito Higashi)

5adfea1ac6
2016-02-01 03:43:37 +09:00
watiko
61a3b14726 vim-patch:7.4.823
Problem:    Cursor moves after CTRL-A on alphabetic character.
Solution:   (Hirohito Higashi, test by Christian Brabandt)

25c2f6783a
2016-02-01 03:43:37 +09:00
watiko
9664f513f4 vim-patch:7.4.807
Problem:    After CTRL-V CTRL-A mode isn't updated. (Hirohito Higashi)
Solution:   Clear the command line or update the displayed command.

0bbcb5c8ef
2016-02-01 03:43:37 +09:00
watiko
d21aaef456 vim-patch:7.4.806
Problem:    CTRL-A in Visual mode doesn't work properly with "alpha" in
            'nrformat'.
Solution:   Make it work. (Christian Brabandt)

cc218ab3ca
2016-02-01 03:43:37 +09:00
watiko
43fd126298 vim-patch:7.4.782
Problem:    Still a few problems with CTRL-A and CTRL-X in Visual mode.
Solution:   Fix the reported problems. (Christian Brabandt)

5d1bc78a2b
2016-02-01 03:43:37 +09:00
watiko
b20b8f9f04 vim-patch:7.4.780
Problem:    Compiler complains about uninitialized variable and clobbered
            variables.
Solution:   Add Initialization.  Make variables static.

1db43b1145
2016-02-01 03:43:37 +09:00
watiko
d050d6390d vim-patch:7.4.779
Problem:    Using CTRL-A in a line without a number moves the cursor. May
            cause a crash when at the start of the line. (Urtica Dioica)
Solution:   Do not move the cursor if no number was changed.

3ec3261980
2016-02-01 03:43:36 +09:00
watiko
b3dbc9d90b vim-patch:7.4.778
Problem:    Coverity warns for uninitialized variable.
Solution:   Change condition of assignment.

ae2fe73abc
2016-02-01 03:43:36 +09:00
watiko
5ef1cb5c2e vim-patch:7.4.765
Problem:    CTRL-A and CTRL-X in Visual mode do not always work well.
Solution:   Improvements for increment and decrement. (Christian Brabandt)

9bb1930af9
2016-02-01 03:43:36 +09:00
watiko
6d1b948b6b vim-patch:7.4.764
Problem:    test_increment fails on MS-Windows. (Ken Takata)
Solution:   Clear Visual mappings. (Taro Muraoka)

6a57cce048
2016-02-01 03:43:36 +09:00
watiko
4d074e39ea vim-patch:7.4.754
Problem:    Using CTRL-A in Visual mode does not work well. (Gary Johnson)
Solution:   Make it increment all numbers in the Visual area. (Christian
            Brabandt)

3a304b2382
2016-02-01 03:43:36 +09:00
Rui Abreu Ferreira
da4bf813da Windows: use $PATHEXT to find executables in path.
is_executable_in_path() searches for executables in $PATH, but on
Windows executable files have extensions available in the environment
var $PATHEXT. This commit changes is_executable_in_path() to append
those extensions to the filename.

This patch diverges from standard Vim, in that Vim only checked for
the given filename if it already has an extensions. This one always
checks for the given filename.
2016-01-30 15:09:18 -05:00
Jurica Bradaric
515b7e3eff vim-patch:7.4.748
Problem:    Buffer overflow.
Solution:   Make the buffer larger. (Kazunobu Kuriyama)

6a7e2a668b
2016-01-30 14:45:07 +01:00
Jurica Bradaric
a984203bd6 Fix linter errors. 2016-01-30 14:42:06 +01:00
Jurica Bradaric
7179f43666 vim-patch:7.4.747
Problem:    ":cnext" may jump to the wrong column when setting
            'virtualedit=all' (cs86661)
Solution:   Reset the coladd field. (Hirohito Higashi)

b8c890035e
2016-01-30 14:41:52 +01:00
Jurica Bradaric
73234bfec6 vim-patch:7.4.746
Problem:    ":[count]tag" is not always working. (cs86661)
Solution:   Set cur_match a bit later. (Hirohito Higashi)

01cf376da1
2016-01-30 12:29:41 +01:00
Jurica Bradaric
f8ad215d25 vim-patch:7.4.745
Problem:    The entries added by matchaddpos() are returned by getmatches()
            but can't be set with setmatches(). (Lcd)
Solution:   Fix setmatches(). (Christian Brabandt)

0fce425772
2016-01-30 12:16:32 +01:00
Justin M. Keyes
8f22031708 Merge pull request #4117 from watiko/vim-7.4.963
Vim 7.4.{639,753,949,963}
2016-01-29 20:41:03 -05:00
Michael Reed
5ffe1425c9 Merge pull request #3165 from blueyed/dont-wrap-DECSCUSR-for-tmux
[RFC] Do not use TMUX_WRAP for DECSCUSR sequence

Reviewed-by: Felipe Morales
Reviewed-by: Justin M. Keyes
Reviewed-by: Michael Reed
2016-01-29 19:22:27 -05:00
Daniel Hahler
0e546d8b38 Do not use TMUX_WRAP for DECSCUSR sequence
Wrapping it will send it to the terminal "directly", which might change the
cursor of another pane, e.g. when starting Neovim and changing to
another pane directly.

tmux has a terminfo extension (Ss/Se) to handle and translate the
DECSCUSR sequences internally.  This can be controlled through
`terminal-overrides`, but does not appear to be able to handle the
uncommon sequences for Konsole.
2016-01-29 23:22:56 +01:00
Justin M. Keyes
4c960c3d78 Merge #3077 'test_eval' 2016-01-29 00:23:53 -05:00
Justin M. Keyes
41f6a10a9b test: eval_spec.lua: minor cleanup 2016-01-29 00:20:47 -05:00
Justin M. Keyes
d671dae58c Merge pull request #4124 from justinmk/vim-7.4.1137
vim-patch:7.4.1137
2016-01-29 00:06:49 -05:00
Justin M. Keyes
aa17b4b4bc vim-patch:7.4.1137
Problem:    Illegal memory access when using :copen and :cclose.
Solution:   Avoid that curbuf is invalid. (suggestion by Justin M. Keyes)
            Add a test.

62ef797496
2016-01-28 23:56:58 -05:00
Michael Reed
aa8b3b60ee Merge pull request #4118 from nicdumz/vim-83d1b19
[RFC] vim-patch: 3 runtime commits
2016-01-28 19:05:50 -05:00
Justin M. Keyes
73e83e8566 Merge pull request #4096 from justinmk/coverity125476
coverity/125476: RI: Null pointer dereference
2016-01-28 17:00:49 -05:00
Justin M. Keyes
1574c4a115 Merge pull request #4119 from jamessan/minimum-msgpack-version
cmake: msgpack: Ensure at least version 1.0 is found
2016-01-28 12:53:03 -05:00
Jurica Bradaric
a31f9161b0 vim-patch:7.4.709
Problem:    ":tabmove" does not work as documented.
Solution:   Make it work consistently.  Update documentation and add tests.
            (Hirohito Higashi)

40ce3a4e1f
2016-01-28 18:25:25 +01:00
James McCoy
33bc33274a cmake: msgpack: Ensure at least version 1.0 is found
Neovim's code relies on functionality introduced in msgpack-c 1.0.0
(at least MSGPACK_OBJECT_FLOAT enum value), so enforce that minimum
version.
2016-01-28 09:01:05 -05:00
Nicolas Dumazet
92f889dada vim-patch:ba172f2
Remove local-additions entries from help.txt.

https://github.com/vim/vim/commit/ba172f2
2016-01-28 13:54:37 +01:00
Nicolas Dumazet
487609c075 vim-patch:0a63ded
Updated runtime files.

https://github.com/vim/vim/commit/0a63ded
2016-01-28 13:53:53 +01:00
Nicolas Dumazet
2e000a1acd vim-patch:83d1b19
More updated runtime files.

83d1b19015

Left out:
- doc/tags
- doc/todo.txt
- runtime/tutor/de.*
- runtime/syntax/vim.vim that seems to have already been
  applied/autogenerated without the has(...) tests
2016-01-28 13:43:43 +01:00
watiko
db51ff10f4 vim-patch:7.4.963
Problem:    test_listlbr_utf8 sometimes fails.
Solution:   Don't use a literal multibyte character but <C-V>uXXXX. Do not
            dump the screen highlighting. (Christian Brabandt, closes #518)

1c57fe8b94
2016-01-28 20:52:41 +09:00
watiko
8721e1fe08 vim-patch:7.4.949
Problem:    When using 'colorcolumn' and there is a sign with a fullwidth
            character the highlighting is wrong. (Andrew Stewart)
Solution:   Only increment vcol when in the right state. (Christian Brabandt)

32a214e78d
2016-01-28 20:52:41 +09:00
watiko
8771e84db7 vim-patch:7.4.753
Problem:    Appending in Visual mode with 'linebreak' set does not work
            properly.  Also when 'selection' is "exclusive". (Ingo Karkat)
Solution:   Recalculate virtual columns. (Christian Brabandt)

74db34cc91
2016-01-28 20:52:41 +09:00
watiko
d25a59f4d0 vim-patch:7.4.639
Problem:    Combination of linebreak and conceal doesn't work well.
Solution:   Fix the display problems. (Christian Brabandt)

8fc6bc7126
2016-01-28 20:52:40 +09:00
oni-link
db77b7bc9e file_pat_to_reg_pat(): handle empty string. 2016-01-28 00:46:38 -05:00
Justin M. Keyes
50393ef178 Merge #4112 'vim-patch:7.4.698' 2016-01-28 00:10:28 -05:00
Justin M. Keyes
52f160f352 eval_defs.h: fix comment 2016-01-27 23:59:33 -05:00
Justin M. Keyes
069a220f32 Merge pull request #4080 from jbradaric/vim-7.4.704
vim-patch:7.4.704
2016-01-27 23:49:00 -05:00
Justin M. Keyes
164fb2a688 Merge pull request #4098 from jusga/vim-7.4.656
vim-patch:7.4.656
2016-01-27 23:41:19 -05:00
Justin M. Keyes
d459a0891c Merge pull request #4111 from nicdumz/vim-5a5f459
vim-patch:5a5f459
2016-01-27 22:57:08 -05:00
Justin M. Keyes
894fcb778e glob2regpat(): handle empty string. 2016-01-27 22:19:50 -05:00
Jurica Bradaric
ccab78046c vim-patch:7.4.698
Problem:    Various problems with locked and fixed lists and dictionaries.
Solution:   Disallow changing locked items, fix a crash, add tests. (Olaf
            Dabrunz)

9bc174b69d
2016-01-27 22:02:35 +01:00
Nicolas Dumazet
71980676f0 vim-patch:5a5f459
Original commit: https://github.com/vim/vim/commit/5a5f459

commit 5a5f45917dbf542cb00617fa5ef70a14898495dd
Author: Bram Moolenaar <Bram@vim.org>
Date:   Mon Apr 13 12:43:06 2015 +0200

    Updated runtime files.

(1) Merged manually vimrc_example.vim
(2) Left out README.txt, doc/tags, doc/todo.txt, tutor/tutor.de,
tutor.de.utf-8, ga.po
2016-01-27 14:22:48 +01:00
Lucas Hoffmann
6c77ea1cb6 tests: Remove legacy test files for eval test. 2016-01-27 12:59:06 +01:00
Lucas Hoffmann
e78fc534dd tests: Migrate recent patches of legacy eval test.
As the work of this migration did take quite some time, some changes where
made in master after this branch was started.  These are ported to the new
test file.
2016-01-27 12:54:45 +01:00
Lucas Hoffmann
4b13cbc76d tests: Comments and typos after review.
Helped-by: Justin M. Keyes <justinkz@gmail.com>
2016-01-27 12:52:13 +01:00
Lucas Hoffmann
fb3a6b925b tests: Resurrect unused part of legacy eval test.
The old test_eval.in file did a `:wq` on line 168.  The following 60 lines
where not used and there was no expected output for them in test_eval.ok.
This test code is now used in several test cases in the new test file.
2016-01-27 12:48:20 +01:00
Lucas Hoffmann
c13dc2b762 tests: Split converted eval test into it() blocks. 2016-01-27 12:43:53 +01:00
Lucas Hoffmann
8cfef01193 tests: Debug converted eval test. 2016-01-27 12:40:41 +01:00
Lucas Hoffmann
3571fdac6f tests: Migrate legacy eval test. 2016-01-27 12:37:56 +01:00
Justin M. Keyes
765d394f18 vim-patch:ac809999
ac80999985
2016-01-27 03:20:07 -05:00
Justin M. Keyes
c15e796211 coverity/125476: RI: Null pointer dereference 2016-01-27 02:39:42 -05:00
Justin M. Keyes
130611fca3 Merge pull request #4107 from oni-link/remove.strlen
search.c: searchit(): Remove strlen() check
2016-01-27 01:31:21 -05:00
oni-link
18ca2035fe search.c: searchit(): Remove strlen() check
While in the `while` loop at line 603 of function searchit(), memory
address ptr+matchpos is always valid. The strlen() check should not be
necessary to verify this.

Also added a check to prevent reading a line after the end of the
buffer.
2016-01-26 19:04:18 +01:00
Justin M. Keyes
9b0b3a0883 Merge pull request #4093 from oni-link/fix.issue.3486
regexp_nfa.c: Speed up find_match_text()
2016-01-26 10:18:06 -05:00
Jason Schulz
1937c6e480 vim_str2nr: cleanup #4104
Fixes unused assignments found by clang-scan.
2016-01-26 09:15:25 -05:00
Justin Gassner
299044d4ef vim-patch:7.4.656
Problem:    Missing changes for glob() in one file.
Solution:   Add the missing changes.

d8b77f7dc0
2016-01-25 21:45:26 +01:00
Justin M. Keyes
45b378259e Merge pull request #2710 from lucc/test83
Migrate legacy test 83.
2016-01-25 14:14:06 -05:00
Justin M. Keyes
ce0e66260f Merge pull request #4039 from cacplate/pr-3696
window.c: change return types to bool (adoption of #3696)
2016-01-25 14:12:12 -05:00
Felipe Morales
e74fa00c38 Merge pull request #4097 from fmoralesc/4071
plugin/tutor: Fix locale handling
2016-01-25 19:11:05 +01:00
Felipe Morales
1715b79d39 plugin/tutor: Fix locale handling
Fixes issue #4071
2016-01-25 17:44:46 +01:00
Charles Joachim
2772144cbf window.c: change return types to bool
Co-authored-by: Wayne Rowcliffe (@war1025)
2016-01-25 08:47:31 -05:00
Lucas Hoffmann
91a1680205 tests: Improve test 83 and add pending() call.
If nvim was compiled without `has("iconv")` this test is skipped.
2016-01-25 09:51:39 +01:00
Lucas Hoffmann
66f89ae321 tests: Migrate legacy test 83. 2016-01-25 09:39:59 +01:00
Justin M. Keyes
63d0f6e94a Merge pull request #4095 from justinmk/coverity134885
coverity/134885: Using uninitialized value
2016-01-25 00:02:12 -05:00
Justin M. Keyes
41434e6881 coverity/134885: Using uninitialized value
Case: (dobin > 1) && (pre != 0)
2016-01-24 23:17:13 -05:00
oni-link
291495a7b0 regexp_nfa.c: Speed up find_match_text()
An extra test in commit 0a116c828d was
introduced, to check for end of string with a call to strlen(). This was
necessary, because an incorrect length for invalid byte sequences was
used to step through the string. This slowed down find_match_text()
compared to vim's version.

To speed up things, the extra check was removed and a sequence length
of 1 for invalid byte sequences is used.

Fixes issue #3486
2016-01-24 23:38:38 +01:00
Justin M. Keyes
e1d81178cc Merge pull request #4069 from jusga/vim-7.4.680
vim-patch:7.4.680
2016-01-24 16:14:53 -05:00
Justin M. Keyes
31047607f8 Merge pull request #4073 from jbradaric/vim-7.4.654
vim-patch:7.4.654
2016-01-24 16:05:20 -05:00
Florian Walch
a15cfb4d52 Merge pull request #4089 from jbradaric/vim-7.4.722
vim-patch:7.4.722
2016-01-24 13:02:14 +01:00
Florian Walch
c5f37c0fc0 Merge pull request #4090 from jbradaric/vim-7.4.739
vim-patch:7.4.739
2016-01-24 12:58:44 +01:00
Jurica Bradaric
7c94b2c343 vim-patch:7.4.739
Problem:    In a string "\U" only takes 4 digits, while after CTRL-V U eight
            digits can be used.
Solution:   Make "\U" also take eight digits. (Christian Brabandt)

acc39888cd
2016-01-24 10:31:53 +01:00
Jurica Bradaric
3915ac2409 vim-patch:7.4.722
Problem:    0x202f is not recognized as a non-breaking space character.
Solution:   Add 0x202f to the list. (Christian Brabandt)

73284b973a
2016-01-24 09:55:40 +01:00
Jurica Bradaric
4d0c511354 strings: Change order of operands in condition.
utf_ptr2char only needs to be called for l > 1.
2016-01-24 09:16:34 +01:00
Jurica Bradaric
d22a821ce3 regexp: Remove a leftover line.
It was replaced with `case 0xc3: case 0xc4: case 0xc5:`.
2016-01-24 09:15:59 +01:00
Jurica Bradaric
ee56470157 vim-patch:7.4.704
Problem:    Searching for a character matches an illegal byte and causes
            invalid memory access. (Dominique Pelle)
Solution:   Do not match an invalid byte when search for a character in a
            string.  Fix equivalence classes using negative numbers, which
            result in illegal bytes.

d82a2a990b
2016-01-24 09:15:30 +01:00
Justin M. Keyes
4172ce4eb0 Merge pull request #4072 from jbradaric/vim-7.4.642
vim-patch:7.4.642
2016-01-23 14:47:45 -05:00
Justin M. Keyes
d4430dc3eb Merge pull request #4007 from brcolow/vim-7.4.718
vim-patch:7.4.718
2016-01-23 14:37:31 -05:00
Justin M. Keyes
c8b487ae40 Merge pull request #4078 from jbradaric/vim-7.4.685
vim-patch:7.4.685
2016-01-23 10:07:24 -05:00
Justin Gassner
50c4c56967 vim-patch:dbcf19d
Add test files for patch 7.4.680.

dbcf19dc49
2016-01-23 15:33:31 +01:00
Jurica Bradaric
f583e51209 vim-patch:7.4.685
Problem:    When there are illegal utf-8 characters the old regexp engine may
            go past the end of a string.
Solution:   Only advance to the end of the string. (Dominique Pelle)

0e462411ca
2016-01-23 13:57:07 +01:00
Justin Gassner
0ccd1ef725 vim-patch:5837f1f #4066
Update runtime files.

5837f1f447
2016-01-23 12:05:15 +01:00
James McCoy
feb70192a8 cmake: Search for both libmsgpackc and libmsgpack #4075
libmsgpack was the old C++ library provided by msgpack-c.  The C library
is libmsgpackc.

The C++ support became header-only, but there was a bug
(msgpack/msgpack-c#395) wherein using msgpack-c's CMake build system
would only install libmsgpack instead of libmsgpackc.

Searching for both libraries, but preferring libmsgpackc, allows for
building against older msgpack-c releases and prepares for the upcoming
msgpack-c release which fixes the aforementioned issues.

Signed-off-by: James McCoy <jamessan@jamessan.com>
2016-01-22 23:03:14 +01:00
Jurica Bradaric
ce17037e3e window: Skip backslash only if followed by space 2016-01-22 21:06:20 +01:00
Michael Ennen
8048699f7d vim-patch:7.4.718
Problem:    Autocommands triggered by quickfix cannot get the current title
            value.
Solution:   Set w:quickfix_title earlier. (Yannick)
            Also move the check for a title into the function.

81278efadf
2016-01-22 12:52:01 -07:00
Jurica Bradaric
34904efd9d window: Fix code style. 2016-01-22 19:48:52 +01:00
Jurica Bradaric
b8ed507e3b window: Fix linter errors. 2016-01-22 19:28:17 +01:00
Jurica Bradaric
8b86f1103a vim-patch:7.4.642
Problem:    When using "gf" escaped spaces are not handled.
Solution:   Recognize escaped spaces.

d45c07ac74
2016-01-22 19:28:17 +01:00
Jurica Bradaric
22230196cb vim-patch:7.4.654
Problem:    glob() and globpath() cannot include links to non-existing files.
            (Charles Campbell)
Solution:   Add an argument to include all links with glob(). (James McCoy)
            Also for globpath().

a245bc79b4
2016-01-22 19:26:23 +01:00
Justin Gassner
f1aec23c09 vim-patch:7.4.680
Problem:    CTRL-W in Insert mode does not work well for multi-byte
            characters.
Solution:   Use mb_get_class(). (Yasuhiro Matsumoto)

310f2d59b2
2016-01-22 11:55:00 +01:00
Justin M. Keyes
bcbcf235f6 Merge pull request #4012 from jbradaric/vim-7.4.729
vim-patch:7.4.729
2016-01-21 02:35:15 -05:00
Justin M. Keyes
5bfbf968dd Merge pull request #4054 from watiko/vim-7.4.603
vim-patch:7.4.603
2016-01-21 02:11:32 -05:00
Justin M. Keyes
8887ccffa6 Merge pull request #4049 from watiko/vim-7.4.616
vim-patch:7.4.616
2016-01-21 02:05:40 -05:00
Justin M. Keyes
542c79f20d test: printf_spec: fix missing setup
before_each(clear) is required to init the test harness for single-test
runs, and also to ensure a known environment for each test.
2016-01-21 01:34:56 -05:00
Justin M. Keyes
9eb6a44564 Merge #3916 "Add support for binary numbers". 2016-01-21 01:34:36 -05:00
watiko
5fa082fa85 tests: Migrate legacy test 39. 2016-01-21 14:05:02 +09:00
Florian Walch
03d8adda8e vim-patch.sh: List in chronological order. #4034 2016-01-20 22:16:56 -05:00
Michael Reed
a2ec5a569b Merge pull request #4061 from Pyrohh/doc
[RFC] doc: The ":drop" command is always available
2016-01-20 19:23:29 -05:00
Michael Reed
d70b57264b Merge pull request #4052 from sethjackson/anchor
[RFC] gitignore: Anchor errors.json
2016-01-20 17:04:31 -05:00
Michael Reed
23a83d24a6 doc: The ":drop" command is always available 2016-01-20 17:02:32 -05:00
Björn Linse
297075bf47 Merge pull request #3944 from bfredl/detach
job control: add `detach` option and `jobpid` function and teardown PTY processes correctly.
2016-01-20 11:55:40 +01:00
Björn Linse
f6ecd127b9 job control: don't kill PTY processes on exit
These will automatically recieve SIGHUP on closing PTY master.
2016-01-20 11:09:29 +01:00
Björn Linse
4618307a6c job control: add tests for 'jobpid' and 'detach' 2016-01-20 11:09:29 +01:00
Björn Linse
f338ea7835 job control: implement jobpid() to get PID of job 2016-01-20 11:09:29 +01:00
Björn Linse
49f0417988 clipboard: Detach clipboard helper, so contents is kept after nvim exit 2016-01-20 11:09:29 +01:00
Björn Linse
d0d5d17b69 job control: add 'detach' option to jobstart 2016-01-20 11:09:25 +01:00
watiko
ac0f979501 vim-patch:7.4.603
Problem:    'foldcolumn' may be set such that it fills the whole window, not
            leaving space for text.
Solution:   Reduce the foldcolumn width when there is not sufficient room.
            (idea by Christian Brabandt)

1c93429c48
2016-01-20 18:30:28 +09:00
Seth Jackson
a480614cb0 gitignore: Anchor errors.json 2016-01-19 21:55:43 -05:00
Jurica Bradaric
a118abca77 Add eol to listchars for mouse specification tests
This is consistent with VIM behavior. When showing a visual selection,
VIM only extends it past the last character if eol is in listchars (even
if nolist is set).
2016-01-19 08:47:49 +01:00
Jurica Bradaric
1c91dc8a5e screen: Fix linting errors 2016-01-19 08:25:54 +01:00
Jurica Bradaric
21afabb9e8 vim-patch:7.4.729
Problem:    Occasional crash with 'list' set.
Solution:   Fix off-by-one error. (Christian Brabandt)
2016-01-19 08:25:54 +01:00
watiko
c90784836b vim-patch:7.4.616
Problem:    Cannot insert a tab in front of a block.
Solution:   Correctly compute aop->start. (Christian Brabandt)

f2c03d7301
2016-01-19 12:29:37 +09:00
Seth Jackson
33321f2c85 config: Remove HAVE_UNISTD_H.
Unix systems must have this header but Windows does not have it at all.

Since src/nvim/os/unix_defs.h includes <unistd.h> without the guard
in order to avoid including this in the numerous places we would
need <unistd.h> on Unix we just include src/nvim/os/os.h which will pull
in <unistd.h> for us.
2016-01-18 13:48:47 -05:00
Justin M. Keyes
ee0e214427 Merge pull request #4046 from strokirk/fix-redirectstream-iobase
python: Add missing I/O methods to RedirectStream
2016-01-18 13:44:26 -05:00
Michael Reed
74d450aa7b Merge pull request #4044 from sethjackson/utime
[RFC] config: Remove duplicate check for HAVE_UTIME_H
2016-01-18 13:05:25 -05:00
Dan Strokirk
38435e8a05 python: Add missing I/O methods to RedirectStream
`RedirectStream` is used to redirect `stdout` and `stderr`, but are
missing certain I/O methods available on other file-like objects.
This causes external plugins (like `colorama`) to crash.

Inheriting from `io.IOBase` adds an abstract implementation of these
methods, which will at least keep the python code running.

Fixes #4045
2016-01-18 17:22:11 +01:00
Justin M. Keyes
9c811c6ba6 Merge pull request #4038 from sethjackson/build-type-cache
Defer setting CMAKE_BUILD_TYPE CACHE property
2016-01-18 10:13:54 -05:00
Seth Jackson
51d95d1438 config: Remove duplicate check for HAVE_UTIME_H. 2016-01-18 09:22:25 -05:00
Rui Abreu Ferreira
1eaa2227e9 CMake: Defer setting CACHE CMAKE_BUILD_TYPE.
The Visual Studio CMake generator fails to configure if
CACHE CMAKE_BUILD_TYPE is set before CMAKE_BUILD_TYPE.
2016-01-18 09:18:18 -05:00
Rui Abreu Ferreira
f5ae5fa799 MSVC+CMake: avoid get_target_property. #4004
When using the Visual Studio generator don't use get_target_property for
custom command, because it returns unexpanded VS variables (e.g.
$(Configuration)) within the result as part of the LOCATION path.

The single case where this is a problem is for getting the output path for
nvim-test, instead we use a path here.
2016-01-17 22:59:55 -05:00
Justin M. Keyes
3875d0bdf6 Merge pull request #4037 from watiko/fix-doc-mem
doc: Remove MEM_PROFILE related description
2016-01-17 22:53:02 -05:00
Justin M. Keyes
1a958345e2 Merge pull request #3981 from watiko/vim-7.4.991
Vim 7.4.9{78,80,81,91}
2016-01-17 22:51:06 -05:00
watiko
a119db78d7 doc: Remove MEM_PROFILE related description
This feature was already removed.

83161200c4
2016-01-18 12:45:30 +09:00
Justin M. Keyes
5f33f581a7 Merge pull request #4035 from heewa/fix-ycm-path
fix YouCompleteMe db path in config
2016-01-17 22:41:55 -05:00
Justin M. Keyes
92f7dc1c4b Merge pull request #3967 from cacplate/pr-3698
Change return type to bool in fileio.c (adoption of PR 3698)
2016-01-17 21:53:49 -05:00
Heewa Barfchin
9c2a156faa Improve YCM contrib: Fix db path 2016-01-17 20:50:10 -05:00
Justin M. Keyes
d1aa549735 Merge pull request #3997 from cacplate/do_init
remove DO_INIT macro
2016-01-17 19:30:33 -05:00
Florian Walch
9b550a8760 vim-patch.sh: Fix listing of NA patches. #4034 2016-01-17 19:18:45 -05:00
Charles Joachim
a29b08ca5a fileio: Change return types to bool
Co-authored-by: Wayne Rowcliffe (@war1025)
2016-01-17 10:53:50 -05:00
Charles Joachim
d858315e59 globals: remove DO_INIT macro and replace usage by INIT 2016-01-17 10:46:52 -05:00
Rui Abreu Ferreira
8099275082 Windows: include <io.h>.
if_csope.c uses _open_osfhandle so include the necessary header.
Futher we need <io.h> for read/write/close/lseek.

See: https://msdn.microsoft.com/en-us/library/bdts1c9x.aspx
2016-01-17 09:33:23 -05:00
Michael Reed
55a345c3e7 Merge pull request #4027 from sethjackson/fcntl
[RFC] Windows: Include <fcntl.h> for file constants
2016-01-17 03:06:26 -05:00
Michael Reed
a3a7afded6 Merge pull request #4025 from Pyrohh/nofollow
[RFC] os/win_defs.h: Define O_NOFOLLOW
2016-01-17 03:05:11 -05:00
Seth Jackson
4f18e0f678 Windows: Include <fcntl.h> for file constants.
This header is required by POSIX for the constants (O_RDONLY, etc.)
but we were only including it on Unix systems as a side effect of
including <unistd.h>.
2016-01-17 00:28:53 -05:00
Michael Reed
3b4d1ab180 os/win_defs.h: Define O_NOFOLLOW
It's not present on Windows; see the discussion in #4024.
2016-01-16 18:58:28 -05:00
Seth Jackson
a7ade5c832 misc: UNIX => Unix #4022
Although UNIX is a registered trademark of The Open Group, it doesn't
really matter whether we refer to these systems as UNIX, Unix, or
Unix-like. So, for consistency, refer to them collectively as Unix.

Related:
http://www.greens.org/about/unix.html
http://www.unixica.com/html/unixunix.html
2016-01-16 18:34:31 -05:00
Seth Jackson
0735b05c82 doc: Remove reference to gettimeofday()
We use libuv for high resolution time now so this note is irrelevant.
2016-01-16 14:13:05 -05:00
Seth Jackson
e4fb777252 doc: Remove more references to MS-DOS
Among other things, this includes:
- lies about command.com
- references to pcterm
2016-01-16 14:12:56 -05:00
Seth Jackson
ba3123c88f doc: cleanup. #4032 #4033 2016-01-16 01:01:54 -05:00
Michael Reed
704882e8dc Merge pull request #4029 from sethjackson/fcntl
[RFC] config: Remove HAVE_FCNTL_H
2016-01-17 11:58:05 -05:00
Michael Reed
3920e7680d Merge pull request #4020 from sethjackson/uv-include
[RFC] Windows: Include <uv.h> for S_IFLNK
2016-01-17 11:56:47 -05:00
Seth Jackson
5dfbe6685d config: Remove HAVE_FCNTL_H.
We do not use it and all systems we support have <fcntl.h>.
2016-01-17 09:40:07 -05:00
Rui Abreu Ferreira
d38d6486f2 Windows: Include <uv.h> for S_IFLNK.
S_IFLNK is not defined on Windows but libuv defines it for us.
2016-01-17 09:33:43 -05:00
Jason Schulz
f82e982bda Fix lint issues 2016-01-15 20:32:00 -08:00
Jason Schulz
7ad3f077dc Add support for binary numbers 2016-01-15 18:21:06 -08:00
Justin M. Keyes
dddbf9c5fa Merge pull request #4021 from jusga/vim-f3c2afb
vim-patch:f3c2afb
2016-01-15 12:03:44 -05:00
Justin Gassner
fec466c72e vim-patch:f3c2afb
Update a few runtime files.

f3c2afb77f
2016-01-15 16:09:46 +01:00
watiko
6f88dca92d tests: Migrate legacy test cdo. 2016-01-15 23:50:04 +09:00
watiko
4eba134a55 vim-patch:7.4.991
Problem:    When running new style tests the output is not visible.
Solution:   Add the testdir/messages file and show it.  Update the list of
            test names.

096c8bb40d
2016-01-15 23:50:04 +09:00
watiko
9d18492793 vim-patch:7.4.981
Problem:    An error in a test script goes unnoticed.
Solution:   Source the test script inside try/catch. (Hirohito Higashi)

4686b323e4
2016-01-15 23:50:04 +09:00
watiko
1231f0b001 vim-patch:7.4.980
Problem:    Tests for :cdo, :ldo, etc. are outdated.
Solution:   Add new style tests for these commands. (Yegappan Lakshmanan)

57d7971b5f
2016-01-15 23:50:04 +09:00
watiko
85d06fef16 vim-patch:7.4.978
Problem:    test_cdo fails when using another language than English.
Solution:   Set the language to C. (Dominique Pelle)

c42b9c670e
2016-01-15 23:50:04 +09:00
watiko
8b173a1de5 tests: Remove needless line continuation. 2016-01-15 23:50:04 +09:00
Michael Reed
f433f569a3 Revert ROOT_UID removal
It helps clarify intent for those unaware of root's UID.

see https://github.com/neovim/neovim/pull/4015#discussion_r49822371
2016-01-15 03:03:18 -05:00
Michael Reed
d4fb5920d3 Merge pull request #4019 from Pyrohh/fcntl
[RFC] test: sys/fcntl.h  ->  fcntl.h
2016-01-15 00:33:49 -05:00
Michael Reed
0b23dec35e Merge pull request #4015 from Pyrohh/os_defs_more
[RFC] Misc. macro cleanup
2016-01-15 00:27:06 -05:00
Michael Reed
07265d221f Misc. macro cleanup
- ROOT_UID's comment is misleading, as it's always defined to 0.

- SEEK_{SET,END} & O_NOFOLLOW should already be defined on Unix-like
  systems in <stdio.h> and <fcntl.h>, respectively.  In any case,
  neither of those #ifdef blocks should be in the middle of source files.

- The S_IS{LNK,DIR,...} macros should only be undefined on Windows.
2016-01-14 23:38:26 -05:00
Michael Reed
729064af5f test: sys/fcntl.h -> fcntl.h
POSIX.1-2008[1] says that the latter should be used, and all of our
supported platforms would seem to support this scheme, apparently even
Windows[2].

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/fcntl.h.html
[2]: https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx
2016-01-14 23:36:58 -05:00
Justin M. Keyes
24fbb2c866 Merge pull request #4014 from jusga/vim-2b8388b
vim-patch:2b8388b
2016-01-14 23:14:23 -05:00
Seth Jackson
4034670568 doc: Remove references to the Mac GUI #4016
We don't support it.
2016-01-14 23:04:58 -05:00
Michael Reed
65394777d5 Merge pull request #4017 from sethjackson/rgb
[RFC] Windows: Undefine the Windows RGB macro
2016-01-14 22:58:31 -05:00
Rui Abreu Ferreira
755e56ba66 Windows: Undefine the Windows RGB macro.
Windows provides a RGB macro but we have our own in macros.h.
Undefine the Windows one before including macros.h.

See: https://msdn.microsoft.com/en-us/library/dd162937%28v=vs.85%29.aspx
2016-01-14 21:40:56 -05:00
Michael Reed
964e52e81f Merge pull request #4009 from sethjackson/swapsync
[RFC] Remove 'swapsync'
2016-01-14 15:38:19 -05:00
Michael Reed
68550b0d63 Merge pull request #3990 from sethjackson/remove-gtk-docs
[RFC] Remove references to GTK GUI support + some no-ops
2016-01-14 15:37:15 -05:00
Seth Jackson
7a7a758786 doc: Remove references to GTK.
We don't support it.
2016-01-14 13:16:10 -05:00
Seth Jackson
62d137ce09 Remove swapsync.
It's complete overkill.
2016-01-14 13:13:32 -05:00
Justin Gassner
cf0ff1dd0f vim-patch:2b8388b
Updated runtime files.

2b8388bd01
2016-01-14 17:58:15 +01:00
Michael Reed
bf7bc4dcf0 Merge pull request #4005 from sethjackson/stack-protector
[RFC] MinGW: don't use -fstack-protector
2016-01-13 23:49:13 -05:00
Rui Abreu Ferreira
54a1fb77e7 MinGW: don't use -fstack-protector
Mingw-w64 fails to link when using -fstack-protector flags, disabled the
flag check for non Unix system.
2016-01-13 23:09:27 -05:00
Justin M. Keyes
269f3ac779 Merge pull request #4010 from watiko/vim-7.4.614
vim-patch:7.4.614
2016-01-13 23:03:58 -05:00
Michael Ennen
c2ab844133 vim-patch:7.4.716 #4006
Problem:    When using the 'c' flag of ":substitute" and selecting "a" or "l"
            at the prompt the flags are not remembered for ":&&". (Ingo
            Karkat)
Solution:   Save the flag values and restore them. (Hirohito Higashi)

cad2fc9935
2016-01-13 22:25:31 -05:00
watiko
b1b8759fc3 vim-patch:7.4.614
Problem:    There is no test for what patch 7.4.601 fixes.
Solution:   Add a test. (Christian Brabandt)

d7ce7a9ad2
2016-01-14 12:22:45 +09:00
Michael Ennen
62f1aaedb1 vim-patch:7.4.715 #4003
Problem:    Invalid memory access when there are illegal bytes.
Solution:   Get the length from the text, not from the character. (Dominique
            Pelle)

2186ffa2c7
2016-01-13 22:12:53 -05:00
Justin M. Keyes
2c76651438 Merge pull request #4002 from brcolow/7.4.714
Vim 7.4.714
2016-01-13 22:06:10 -05:00
Justin M. Keyes
59e1f8996d Merge pull request #4008 from brcolow/vim-7.4.721
Vim 7.4.721
2016-01-13 22:01:56 -05:00
Michael Ennen
da9e519ba1 vim-patch:7.4.721
Problem:    When 'list' is set Visual mode does not highlight anything in
            empty lines. (mgaleski)
Solution:   Check the value of lcs_eol in another place. (Christian Brabandt)

d59c099120
2016-01-13 18:19:13 -07:00
Michael Ennen
39ef219535 vim-patch:7.4.714
Problem:    Illegal memory access when there are illegal bytes.
Solution:   Check the byte length of the character. (Dominique Pelle)

069dd08d8d
2016-01-13 16:52:44 -07:00
Michael Reed
573d65c738 Merge pull request #3992 from Pyrohh/shada
[RFC] shada.c: Fix HAVE_BE64TOH check
2016-01-13 16:16:52 -05:00
Michael Reed
852aaa5d42 shada.c: Fix HAVE_BE64TOH check
Mentioned here:

  https://github.com/neovim/neovim/pull/3985#issuecomment-170663426

HAVE_BE64TOH is defined in `config/config.h', which is included by
`vim.h'.  Since the HAVE_BE64TOH check in `shada.c' is evaluated before
`vim.h' is included, it always evaluates to false, meaning that
be64toh() in shada.c is always used instead of the one in <endian.h>.

Moving the HAVE_BE64TOH block to after where `vim.h' is included seems
to fix the issue.
2016-01-13 15:56:20 -05:00
Justin M. Keyes
7f3999ac80 Merge pull request #3996 from justinmk/ctrlc
vim-patch:7.4.569, 7.4.573
2016-01-13 03:27:23 -05:00
Michael Ennen
5c87d40acd vim patches 7.4.955/974/975/989. #3919
Helped by @Shougo.

vim-patch:7.4.955
vim-patch:7.4.974
vim-patch:7.4.975
vim-patch:7.4.989

Port upstream vim patches 955, 974, 975 and 989. Mark patches
964, 968, 970, and 971, and 982 as NA. Update patch list to 1022.

patch 7.4.955
Problem:    Vim doesn't recognize .pl6 and .pod6 files.
Solution:   Recognize them as perl6 and pod6. (Mike Eve)

patch 7.4.974
Problem:    When using :diffsplit the cursor jumps to the first line.
Solution:   Put the cursor on the line related to where the cursor was before
            the split.

patch 7.4.975
Problem:    Using ":sort" on a very big file sometimes causes text to be
            corrupted. (John Beckett)
Solution:   Copy the line into a buffer before calling ml_append().

patch 7.4.989
Problem:    Leaking memory when hash_add() fails. Coverity error 99126.
Solution:   When hash_add() fails free the memory.

778 marked as not NA as it will be needed once vim patch 754 is merged

Marked as NA:
964 test 87 was deleted
968 tests 86/87 were deleted
970 guarded by: `# if defined(FEAT_GUI_GTK) || defined(PROTO`
    and is inside a function that no longer exists
971 function table already sorted correctly
982 marked as NA because Neovim tests are only specified in exactly one location
2016-01-13 03:23:19 -05:00
Justin M. Keyes
8bfb521417 Merge pull request #3977 from sethjackson/output-paths
Fix build output paths for Visual Studio generator
2016-01-13 02:55:30 -05:00
Justin M. Keyes
8eeda7169a terminal: less babysitting of mapped_ctrl_c
process_interrupts() checks get_real_state() so we can avoid some
housekeeping of mapped_ctrl_c in terminal-mode.
2016-01-13 02:40:57 -05:00
Shougo Matsushita
3dfbeabf35 vim-patch:7.4.569/573
vim-patch:7.4.569
vim-patch:7.4.573
Helped-by: @glts https://github.com/neovim/neovim/pull/2621

Problem:    Having CTRL-C interrupt or not does not check the mode of the
            mapping. (Ingo Karkat)
Solution:   Use a bitmask with the map mode. (Christian Brabandt)

651863c94a

Problem:    Mapping CTRL-C in Visual mode doesn't work. (Ingo Karkat)
Solution:   Call get_real_state() instead of using State directly.

5000869712
2016-01-13 01:56:36 -05:00
Michael Reed
420fe1fe73 Merge pull request #3995 from sethjackson/crt-externs
[RFC] config: Cleanup unused identifiers.
2016-01-12 20:52:29 -05:00
Seth Jackson
7c79ea70ef config: Cleanup unused identifiers.
HAVE_CRT_EXTERNS_H is unused since a3ec68c.
SIZEOF_OFF_T is unused since f916cf0.
HAVE_LIBGEN_H was never used.
2016-01-12 20:31:18 -05:00
Michael Reed
e8fab975f8 Merge pull request #3993 from Pyrohh/os_defs
[RFC] Stop using <stropts.h>
2016-01-12 17:15:36 -05:00
Michael Reed
5db511b6f1 Stop using <stropts.h>
In Vim, at least the constant `I_PUSH` is used from <stropts.h>, but
Neovim doesn't seem to use anything from said header.

Besides that, POSIX.1-2008[1] marks this header as obsolescent, and
there don't seem to be many platforms that even have it.

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stropts.h.html#tag_13_52_11
2016-01-12 16:40:22 -05:00
Michael Reed
ddf3e27959 Merge pull request #3985 from Pyrohh/_max_path
[RDY]  os/*_defs.h: MAXNAMLEN cleanup
2016-01-12 12:57:30 -05:00
Michael Reed
f65d58907d os/*_defs.h: MAXNAMLEN cleanup
For non-Windows systems, we assume that NAME_MAX is in <limits.h>, as
specified in POSIX.1-2008[1]. For Windows, which doesn't have NAME_MAX,
just define it ourselves to _MAX_PATH[2].

Also, remove two (now unused) HAVE_*_H checks.

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html
[2]: https://msdn.microsoft.com/en-us/library/930f87yf.aspx

Helped-by: Seth Jackson
2016-01-12 12:26:15 -05:00
Justin M. Keyes
a1c770ca27 Merge pull request #3291 from sethjackson/env-separator
Windows: use ';' as env $PATH separator
2016-01-12 09:47:22 -05:00
Justin M. Keyes
970b5f2752 Merge pull request #3984 from cacplate/has_event
Remove redundant functions to replace for the general has_event function
2016-01-12 09:45:09 -05:00
Seth Jackson
7497dbee16 doc: Remove references to Motif GUI support #3893
We don't support it.
2016-01-11 18:36:13 -05:00
Rui Abreu Ferreira
7c0f6d2380 Windows: use ';' as env $PATH separator.
In Windows the separator character in the PATH environment is ';' instead
of ':'. Add a new define ENV_SEPCHAR to be used instead of hardcoding
the character literal.
2016-01-11 16:36:13 -05:00
Charles Joachim
879c668d14 fileio: Replace some event checking functions with one has_event 2016-01-11 08:45:19 -05:00
Justin M. Keyes
3b94756feb Merge pull request #3982 from justinmk/nohighbit
input: Do not set high-bit. Preserve META modifier.
2016-01-11 00:48:28 -05:00
Justin M. Keyes
317d5ca7b0 input: Do not set high-bit; preserve ALT modifier.
Background: Vim internally prefers to represent ALT/META chords as
single-byte keys, by setting the high bit of the key byte.
extract_modifiers() _discards_ the meta/alt modifier, but we need it for
libvterm and libtermkey.

Closes #2440
Closes #3727
Closes #2017
References #2277
References #2254

https://github.com/neovim/neovim/issues/2017#issuecomment-140423557
> We [not libtermkey] are setting the high bit for some reason

https://github.com/neovim/neovim/issues/176#issuecomment-77834715
> libvtermkey requires the leading esc to parse alt/meta

https://github.com/neovim/neovim/pull/3246#issuecomment-136328450
> A program could do better than the current logic on some terminals, by
> asking for pure 8bit mode (S8C1T) and then immediately querying the
> mode again. If the result comes back as an 8bit single-byte CSI, then
> it can presume the mode setting was successful, and now the ESC prefix
> byte won't be seen in multibyte sequences; only as an Alt- prefix or
> a real Escape key. On such a terminal, it could therefore avoid
> needing to use that waiting timeout.
2016-01-11 00:29:58 -05:00
Justin M. Keyes
223aafb1a7 Merge pull request #3980 from ZyX-I/shell-unquote
shell: Unquote &shell* options before using them
2016-01-10 21:26:11 -05:00
ZyX
3b7c4093e2 shell: Unquote &shell* options before using them 2016-01-11 05:24:44 +03:00
Justin M. Keyes
095320a67d Merge pull request #3979 from sethjackson/maxnamlen
Windows: define MAXNAMLEN for Windows
2016-01-10 15:27:02 -05:00
Rui Abreu Ferreira
1ce329e7dd Fix build output paths for Visual Studio generator
The Visual Studio cmake generator creates subdirectories inside
the build path for different build configuration. But this breaks some of our
cmake scripts, like the help tags installer, that assume the targets are
built in that location. Updated CMakeLists.txt to remove extra paths.
2016-01-10 14:16:30 -05:00
Seth Jackson
4fc85e5c87 Windows: define MAXNAMLEN for Windows.
MAXNAMLEN can be defined using _MAX_PATH from stdlib.h
which will fix the BASENAMELEN definition too.
2016-01-10 14:13:19 -05:00
Justin M. Keyes
dd8812c7cb Merge pull request #3978 from justinmk/32bit
portability: fix cast
2016-01-10 14:12:15 -05:00
Justin M. Keyes
a641b74140 portability: fix cast.
PRId64 format expects int64_t.
Regression from c6e481cba5.
2016-01-10 13:55:13 -05:00
Justin M. Keyes
73b8c89518 Merge pull request #2667 from equalsraf/tb-min-log
cmake: Pass MIN_LOG_LEVEL as compiler definition
2016-01-10 12:21:52 -05:00
Rui Abreu Ferreira
72d03cc961 cmake: Pass -DMIN_LOG_LEVEL as compiler definition
- Check if MIN_LOG_LEVEL value is a number 0-3, default to
  INFO (1) or ignore it in Release mode
- When TRAVIS_CI_BUILD is ON the default is DEBUG (0)
- Add local.mk.example
2016-01-10 17:06:53 +00:00
Justin M. Keyes
5999749e07 Merge pull request #3974 from sethjackson/cpack
CMake: Add CPack settings to CMakeLists.txt
2016-01-10 11:23:33 -05:00
Justin M. Keyes
97ed0e8dd3 Merge pull request #3972 from jusga/vim-e271909
vim-patch:e271909
2016-01-10 10:26:19 -05:00
Rui Abreu Ferreira
fd10729bc8 CMake: Add CPack settings to CMakeLists.txt 2016-01-10 09:50:35 -05:00
Justin Gassner
6bed244488 vim-patch:e271909
Updated syntax files.

e271909625
2016-01-10 12:47:35 +01:00
Rui Abreu Ferreira
57cfb95758 win32: Fix syntax error in #ifndef block. #3968
The block is only compiled if the system is NOT WIN32, but the closing
parenthesis for the statement opened outside the block is closed inside
the block.
2016-01-10 01:38:09 -05:00
Justin M. Keyes
c6e481cba5 portability: use portable format specifier 2016-01-10 01:34:49 -05:00
Justin M. Keyes
9bf694ff0b Merge #3857 'Vim 7.4.{944,945,946,950,953,1032,1055}'. 2016-01-10 01:33:05 -05:00
watiko
f350655ddd Improve coding style 2016-01-10 10:44:57 +09:00
watiko
59b04d856b tests: Make helper.source() return tempname. 2016-01-10 10:44:57 +09:00
watiko
feed81f45f tests: Fix OSX's tempname issue. 2016-01-10 10:44:57 +09:00
watiko
d37dc0b314 tests: Rename 100_undo_level to 100_lispwords. 2016-01-10 10:44:57 +09:00
watiko
9c5ab23ef2 tests: Migrate legacy test undolevels. 2016-01-10 10:44:57 +09:00
watiko
d8e07deff6 tests: Migrate legacy test assert. 2016-01-10 10:44:57 +09:00
watiko
6c8e572d09 vim-patch:7.4.1055
Problem:    Running "make newtests" in src/testdir has no output.
Solution:   List the messages file when a test fails. (Christian Brabandt)
            Update the list of tests.

e7893a4088
2016-01-10 10:44:56 +09:00
watiko
3a6cef9ee6 vim-patch:7.4.1032
Problem:    message from assert_false() does not look nice.
Solution:   Handle missing sourcing_name. Use right number of spaces. (Watiko)
            Don't use line number if it's zero.

cbfe32953a
2016-01-10 09:01:30 +09:00
watiko
2586459118 vim-patch:7.4.953
Problem:    When a test script navigates to another buffer the .res file is
            created with the wrong name.
Solution:   Use the "testname" for the .res file. (Damien)

de0ad40cb3
2016-01-10 09:01:30 +09:00
watiko
47fac915f3 vim-patch:7.4.950
Problem:    v:errors is not initialized.
Solution:   Initialze it to an empty list. (Thinca)

4649ded287
2016-01-10 09:01:30 +09:00
watiko
588b09277b vim-patch:7.4.946
Problem:    Missing changes in source file.
Solution:   Include changes to the eval.c file.

bbfbaf9741
2016-01-10 09:01:30 +09:00
watiko
008c014cbe vim-patch:7.4.945
Problem:    New style testing is incomplete.
Solution:   Add the runtest script to the list of distributed files.
            Add the new functions to the function overview.
            Rename the functions to match Vim function style.
            Move undolevels testing into a new style test script.

683fa185a4
2016-01-10 09:01:30 +09:00
watiko
593df501b3 vim-patch:7.4.944
Problem:    Writing tests for Vim script is hard.
Solution:   Add assertEqual(), assertFalse() and assertTrue() functions.  Add
            the v:errors variable.  Add the runtest script. Add a first new
            style test script.

43345546ae
2016-01-10 09:01:30 +09:00
Thomas Fehér
50db0312f9 build: ensure static jemalloc. #3970
Otherwise the dynamic library is built also and find_library will prefer
that over the static one. That results in linking against the dynamic
library which will not be found after install.

This code:
  8b3c399b6d/third-party/CMakeLists.txt (L130)
should prevent the above problem, but it doesn't hurt to be explicit.
2016-01-09 12:23:02 -05:00
Michael Reed
c15446222b Merge pull request #3962 from sethjackson/windows-98
[RFC] doc: Remove references to Windows 98
2016-01-09 00:20:49 -05:00
Seth Jackson
665bd8de59 doc: Remove references to Windows 98. 2016-01-08 22:13:32 -05:00
Justin M. Keyes
36f17ce87e vim-patch.sh: fix regression 2016-01-08 19:12:36 -05:00
Justin M. Keyes
3706701d9b Merge pull request #3965 from jusga/vim-e3faf44
vim-patch:e3faf44
2016-01-08 19:01:07 -05:00
Michael Reed
a42800ba45 Merge pull request #3963 from Pyrohh/contrib
[RFC] CONTRIBUTING.md: Remove outdated info
2016-01-08 18:28:59 -05:00
Michael Reed
94fabe4d59 CONTRIBUTING.md: Remove outdated info
- Remove mention of "build-issues" and "runtime-issues" sections from
  the "Troubleshooting" page; they're already mentioned at the top of
  the section: "Before reporting an issue, see the ...".

- As of [1], clint-ignored-files.txt isn't used anymore.

[1]: 57eaefbb23
2016-01-08 17:47:09 -05:00
Justin Gassner
4bc3bcab22 vim-patch:e3faf44
Updated runtime files.

e3faf44bef
2016-01-08 23:14:47 +01:00
Seth Jackson
d51a27b7e5 Remove 'restorescreen' option
The relevant code was never actually in Neovim, most likely due to being
unifdef(1)'d out during the initial import.

see `:h hidden-options'
2016-01-08 14:59:18 -05:00
Justin M. Keyes
3b23d733dd Merge pull request #3943 from ZyX-I/better-fref-error
eval: Use better error messages when failing to dump values
2016-01-08 09:29:37 -05:00
Justin M. Keyes
af5c34f8a5 Merge pull request #3839 from justinmk/reprobuilds
semver (semantic versioning) compliance
2016-01-08 02:10:19 -05:00
Justin M. Keyes
b4b4536339 version: semver.org compliance
We use `git describe` to stamp pre-release versions (dev builds). But
`git describe` uses the result of the most-recent tag (the current
_release_ version)--so we must munge it with the _next_ (i.e.
unreleased) version.

Also fix non-git builds: do not invoke git_describe(NVIM_VERSION_MEDIUM)
if we're not in a git tree, else it gets the dummy value
"HEAD-HASH-NOTFOUND".

Example :version output in non-git build:
  NVIM 0.1.2-dev

Example :version output in git build:
  NVIM v0.1.2-176-g9c3c2b5
2016-01-08 01:09:22 -05:00
Justin M. Keyes
7643245470 BuildLibuv.cmake: make case consistent 2016-01-08 01:09:22 -05:00
Michael Reed
fec35dc976 screen.c: Remove out of date comment
This was forgotten in 10b2a0e529
2016-01-07 15:29:33 -05:00
Justin M. Keyes
e57e303c6b Merge pull request #3956 from oni-link/cov.62611
coverity/62611: Nesting level does not match indentation
2016-01-07 10:11:21 -05:00
oni-link
23669bd7df coverity/62611: Nesting level does not match indentation
The nested line was the else-branch of an if-then-else block that dealt
with cryptography, but after commit
85338fe1d5 (Remove cryptography) removed
the if-then part, the indentation of this line was not adjusted.
2016-01-07 12:31:05 +01:00
Justin M. Keyes
2d39eea9f0 Merge pull request #3952 from Pyrohh/repro-builds
build: Stop using __{DATE,TIME}__
2016-01-06 17:57:44 -05:00
Justin M. Keyes
c6aa71605f build: Stop using __{DATE,TIME}__
Recording the compilation time modifies the source for dubious gain, and
interferes with reproducible builds [1].

[1] https://reproducible-builds.org/
2016-01-06 17:24:21 -05:00
ZyX
c6f6033482 eval: Do not use msgpack#string for error messages 2016-01-07 00:54:58 +03:00
ZyX
bd4ca22cf0 documentation: Update documentation 2016-01-07 00:54:57 +03:00
ZyX
efaf76e623 functests: Update tests 2016-01-07 00:54:57 +03:00
Seth Jackson
ec580da5f4 doc: Clarify Windows feature tests for eval(). 2016-01-06 15:46:25 -05:00
Justin M. Keyes
0298b004f8 Merge pull request #3945 from sethjackson/win32-winnt
MinGW: libuv needs -D_WIN32_WINNT=0x0600
2016-01-06 02:45:07 -05:00
Rui Abreu Ferreira
bd529ea3f3 MinGW: libuv needs -D_WIN32_WINNT=0x0600
Without this compilation fails due to a missing symbol: SRWLOCK in libuv
headers. _WIN32_WINNT defines the Windows header version that is to be used,
and it seems libuv requires this version. See

    b471b33da8
2016-01-04 19:51:09 -05:00
ZyX
d26b01d4bd eval: Use better error messages when failing to dump values
Examples:

    let g:SR = [[]]
    call add(g:SR[0], g:SR)
    wshada
    " E952: Unable to dump variable g:SR: container references itself in index 0, index 0

    let g:F = {'_TYPE': v:msgpack_types.map, '_VAL': [[{'abc': 1}, function("tr")]]}
    wshada
    " E951: Error while dumping variable g:F, key {'abc': 1} at index 0 from special map, key '': attempt to dump function reference
    " (no msgpack#string available)
    " E951: Error while dumping variable g:F, key {="abc": 1} at index 0 from special map, key '': attempt to dump function reference
    " (msgpack#string available)

    let g:F = {'_TYPE': v:msgpack_types.map, '_VAL': [[g:SR, function("tr")]]}
    wshada
    " E951: Error while dumping variable g:F, key [[[[{E724@0}]]]] at index 0 from special map, index 1: attempt to dump function reference

    call msgpackdump([g:SR])
    " E952: Unable to dump msgpackdump() argument, index 0: container references itself in index 0, index 0

Not tested yet.
2016-01-04 17:20:16 +03:00
Justin M. Keyes
074d3dc1f3 Merge pull request #3938 from sethjackson/s-islnk
Fix S_ISLNK definition in os_defs.h
2016-01-03 14:11:09 -05:00
Seth Jackson
3ce8de7c8f Fix S_ISLNK definition in os_defs.h. 2016-01-03 13:51:58 -05:00
Justin M. Keyes
59eaba2894 Merge pull request #3655 from bfredl/enc_default
Default to encoding=utf-8
2016-01-02 18:05:52 -05:00
Björn Linse
70f6e2ce52 encoding: update tests 2016-01-02 23:22:13 +01:00
Björn Linse
5a6633bc34 encoding: Update documentation 2016-01-02 23:21:57 +01:00
Björn Linse
04bdeeb8b2 encoding: cleanup defaults of iskeyword, isprint and fileencodings 2016-01-02 23:21:51 +01:00
Björn Linse
49b06a8f2a encoding: Always use "utf-8" as default for &encoding
Preverve the locale-depedency for fileencodings=default
2016-01-02 23:15:53 +01:00
Justin M. Keyes
cb62594042 Merge pull request #3927 from sethjackson/if-cscope
Windows: Bring back code branch for if_cscope
2016-01-02 12:35:21 -05:00
Justin M. Keyes
c9df429887 Merge pull request #3928 from justinmk/fix_ci_target
test: change CI_TARGET reference to CI
2016-01-02 01:21:42 -05:00
Justin M. Keyes
22a928aeac test: change CI_TARGET reference to CI
Travis defines[1] $CI for its builds, whereas $CI_TARGET is
a Neovim-specific env var from 6483a198e4
that lost prominence in d2eb4a9346.

[1] https://docs.travis-ci.com/user/environment-variables/
2016-01-01 23:58:42 -05:00
Justin M. Keyes
6f25ba0550 CI/travis: enable gcov for one build only. #3926 2016-01-01 22:20:16 -05:00
Rui Abreu Ferreira
b2f9bfbff0 Windows: Bring back code branch for if_cscope.
The Vim code for windows in if_cscope.c/.h was removed during the refactor,
added missing code for error_closing().
2016-01-01 20:58:04 -05:00
Justin M. Keyes
4d27bd6bfe Merge pull request #3920 from sethjackson/vim-spec
Windows: Fix api/vim_spec.lua functional test
2016-01-01 17:22:40 -05:00
Justin M. Keyes
adf11f3478 Merge pull request #3925 from sethjackson/uv-uid-t
Windows: Make the os_get_uname argument portable
2016-01-01 14:56:11 -05:00
Justin M. Keyes
f1344bc219 Merge pull request #3903 from justinmk/vim-7.4.605
vim-patch:7.4.605
2016-01-01 14:38:17 -05:00
Justin M. Keyes
3fd62f9612 file_pat_to_reg_pat, buflist_findpat: const params
file_pat_to_reg_pat() and buflist_findpat() do not modify the data of
these parameters.
2016-01-01 14:26:32 -05:00
Seth Jackson
ff0253127e Windows: Make the os_get_uname argument portable.
Since uid_t is not defined on Windows use uv_uid_t instead.
We now use uv_uid_t everywhere except one place in src/nvim/main.c
which is wrapped in a #ifdef UNIX check.
2016-01-01 14:13:56 -05:00
Justin M. Keyes
df4ac79761 Merge pull request #3911 from sethjackson/have-fsync-guard
os_fsync
2016-01-01 12:13:40 -05:00
Justin M. Keyes
a79ebeeea4 Merge pull request #3707 from bfredl/oapblock
[use oap->motion_type also to represent block motion type
2016-01-01 08:17:05 -05:00
Björn Linse
303ac3f283 normal: use oap->motion_type also to represent block motion type
Previously oap->motion_type == MCHAR would be blockwise if
oap->block_mode was set.
2016-01-01 12:56:51 +01:00
Seth Jackson
648aebb8b6 Port fsync() to libuv. 2016-01-01 00:12:28 -05:00
Rui Abreu Ferreira
a48508de0d test/functional: Fix api/vim_spec.lua.
On Windows the default file format is DOS i.e. newlines are \r\n
instead of \n.
2015-12-31 23:28:55 -05:00
Justin M. Keyes
04cd3eef24 Merge pull request #3918 from sethjackson/servertest
Windows: fix serverstart functional test
2015-12-31 17:12:57 -05:00
Justin M. Keyes
6d5a5b02f6 Merge pull request #3304 from sethjackson/wildignorecase
Windows: Ignore EW_ICASE in do_path_expand
2015-12-31 17:02:57 -05:00
Rui Abreu Ferreira
568ee1e3c2 Windows: Ignore EW_ICASE in do_path_expand
The do_path_expand() function is still using the unix_expandpath
variant from Vim. For Windows it should behave as the old
dos_expandpath() function. This commit adds an ifdef to ignore
EW_ICASE flag in this function, otherwise all matches fail on Windows
if wildignorecase is set.
2015-12-31 16:14:12 -05:00
Rui Abreu Ferreira
091e885d44 Windows: fix serverstart functional test 2015-12-31 16:07:43 -05:00
Justin M. Keyes
68fb815bf1 Merge pull request #3881 from sethjackson/msvc-ui-call
MSVC: Fix UI_CALL for MSVC
2015-12-31 00:16:07 -05:00
Justin M. Keyes
8b3c399b6d build: use our mirror of LuaJIT-2.0.4.tar.gz
Point to new location.
2015-12-30 23:40:04 -05:00
Justin M. Keyes
bd39e2354f Merge pull request #3910 from Shougo/version
Update version.c to 7.4.1000
2015-12-30 20:24:21 -05:00
Shougo Matsushita
6a7535cd84 Update version.c to 7.4.1000
NA patches list:
607 Compiler warning
620 Compiler warning
624 result check for realloc
628 volatile add, but no code in neovim
641 tabnew fix, but no code in neovim
661 no K_CURSORHOLD in neovim
841 add ifdef
842 Windows GUI
854 CONTRIBUTION.md
863 FEAT_DIFF
864 Tiny build
923 add ifdef
924 configure changes
927 if_ruby
928 client server
930 Windows GUI
934 Appveyor
938 X11 and GTK GUI fix
940 term
948 ifdef
954 if_lua
959 term
960 Windows build
962 Makefile fix
965 ifdef fix
966 configure fix
967 Makefile fix
976 configure fix
979 crypt feature
985 if_ruby
986 test fix in Windows
987 if_ruby
988 build rule
990 Appveyor
992 build fix in Windows
994 tests for Windows
995 GTK GUI
996 GTK GUI
997 Travis CI
999 Makefile change
2015-12-31 10:05:37 +09:00
Justin M. Keyes
76bf21de26 vim-patch:7.4.605
Problem:    The # register is not writable, it cannot be restored after
            jumping around.
Solution:   Make the # register writable. (Marcin Szamotulski)

3b3a9498d1
2015-12-30 01:16:32 -05:00
Justin M. Keyes
d8a2007d47 Merge pull request #3869 from oni-link/fix.issue.3844
helpers.c: Handle msgpack str/bin objects with length 0 correctly
2015-12-30 01:01:23 -05:00
Justin M. Keyes
930ee40ad3 build: use our mirror of LuaJIT-2.0.4.tar.gz
The luajit.org download URL:
  http://luajit.org/download/LuaJIT-2.0.4.tar.gz
is breaking our travis builds because of connection problems.
2015-12-30 00:41:52 -05:00
Justin M. Keyes
541ba61ac9 Merge pull request #3874 from sethjackson/win-defs
MSVC: Define STDOUT_FILENO and STDERR_FILENO
2015-12-29 12:59:55 -05:00
Justin M. Keyes
6ee58e67cb Merge pull request #3879 from sethjackson/open-osfhandle
Windows: Fix cast in if_cscope.c
2015-12-26 17:42:50 +01:00
Justin M. Keyes
9040d7aed7 Merge pull request #3849 from Shougo/vim-7.4.675
vim-patch:7.4.675
2015-12-26 17:39:38 +01:00
Justin M. Keyes
f4e3c13bcc Merge pull request #3868 from Shougo/vim-7.4.608
vim-patch:7.4.608, 7.4.612
2015-12-26 17:27:40 +01:00
Justin M. Keyes
f0538639c0 Merge #2927 'vim-patch:7.4.858' 2015-12-25 08:34:40 -05:00
Justin M. Keyes
39555dc8c4 test: Makefile: add legacy cdo test 2015-12-25 08:34:07 -05:00
Florian Walch
7f99d210fd vim-patch:7.4.858
Problem:    It's a bit clumsy to execute a command on a list of matches.
Solution:   Add the ":ldo", ":lfdo", ":cdo" and ":cfdo" commands. (Yegappan
            Lakshmanan)

aa23b37942
2015-12-24 08:08:50 +01:00
Seth Jackson
25eaacd10f doc: os_dos.txt: Remove more references to MS-DOS/Windows 95 #3889 2015-12-23 15:13:05 -05:00
Seth Jackson
91b8ab3d21 doc: Remove references to neXtaw GUI support #3892
We never supported it.
2015-12-22 19:14:11 -05:00
Michael Reed
b654a2b324 doc: Fix invalid reference
found with `make -C runtime/doc html`
2015-12-22 18:50:10 -05:00
Michael Reed
9649537f4c doc: mbyte.txt: Remove some low-hanging fruit
- Nvim has no concept of "huge" or "normal" features: the overwhelming
  majority of features are compiled in by default
- Nvim does not link to X (X11), so doesn't support setting things via
  ~/.Xresources, among many other things
2015-12-22 18:44:26 -05:00
Seth Jackson
47b9ac9013 doc: Remove references to Athena GUI support #3891
We don't support Athena anymore.
2015-12-22 18:39:51 -05:00
Seth Jackson
b9d1a7f810 doc: vi_diff: Update supported OS list #3890
We do not support every Unix flavor in existence so note
that here.

We do not support Windows 95 or NT. Update the list to
the Windows versions we do support.

We only support OS X not classic Mac OS so note that too.
2015-12-22 18:20:46 -05:00
Seth Jackson
944658e2e1 doc: Remove a reference to Windows ME #3888
We don't support Windows 95, Windows ME, or Windows 2000 anymore.
2015-12-22 15:52:27 -05:00
Seth Jackson
fbfe564b3c gitignore: Ignore errors.json
It's generated by `make lint`.
2015-12-22 15:22:21 -05:00
Seth Jackson
aa0af927da doc: os_win32: More cleanup #3884
Follow-up to ee1f8ea

Roger Knobbe is still mentioned in intro.txt, for anyone wondering.
2015-12-22 14:33:16 -05:00
Seth Jackson
5403924f7c doc: Remove some references to MS-DOS #3886
We don't support MS-DOS.
2015-12-22 14:14:28 -05:00
Seth Jackson
efb30a0068 Windows: Remove unused function #3878
The only call site was removed in 902ad8d.
2015-12-22 13:50:59 -05:00
Rui Abreu Ferreira
c5d0c280d3 MSVC: Fix UI_CALL macro for MSVC.
The UI_CALL macro uses variadic macros and relies on the non standard
GCC extension. MSVC already applies similar behavior for the regular
__VA_ARGS__ removing the comma.
In MSVC UI_CALL can be implemented by calling UI_CALL_MORE directly.
2015-12-22 09:35:34 -05:00
Seth Jackson
ee1f8eab0c doc: Remove references to Windows 3.1 #3883 2015-12-21 22:48:57 -05:00
Seth Jackson
53a1db1a10 Windows: Fix cast in if_cscope.c. 2015-12-21 15:21:21 -05:00
Rui Abreu Ferreira
eb53ec5ba2 MSVC: Define STDOUT_FILENO and STDERR_FILENO. 2015-12-21 00:01:16 -05:00
oni-link
8373aaf44e helpers.c: Handle msgpack str/bin objects with length 0 correctly
When converting a msgpack object to a String object, strings (and byte
arrays) with length 0 are handled as errors. This is fixed by
always using the msgpack data pointer as a valid pointer. For a NULL
pointer there is nothing to copy.

Test by @snoe

Fixes #3844
2015-12-21 00:23:53 +01:00
Marco Hinz
376b973a0a Tests: fix according to lualint 2015-12-20 22:41:40 +01:00
Justin M. Keyes
e9161799bf Merge pull request #3867 from Shougo/vim-7.4.604
vim-patch:7.4.604
2015-12-20 15:31:45 -05:00
Shougo Matsushita
90537ae970 vim-patch:7.4.604
Problem:    Running tests changes viminfo.
Solution:   Disable viminfo.

6bf7c523ad
2015-12-19 12:58:01 +09:00
Shougo Matsushita
884c124130 vim-patch:7.4.608, 7.4.612
Problem:    test_eval fails when the clipboard feature is missing.
Solution:   Skip part of the test. Reduce the text used.

4ac163ae5f

Problem:    test_eval fails on Mac.
Solution:   Use the * register instead of the + register. (Jun Takimoto)

e08dd4e49e
2015-12-19 11:07:45 +09:00
Justin M. Keyes
e123675bcc Merge pull request #3722 from ZyX-I/fix-3721
shada: Continue dumping when variables failed to dump
2015-12-18 11:55:15 -05:00
ZyX
5c112c0cb9 shada: Free wms->hms in shada_write_exit
Otherwise there should be memory leak.
2015-12-18 19:29:49 +03:00
ZyX
ea67bf808b shada: Continue dumping when variables failed to dump
Closes #3721
2015-12-18 19:29:49 +03:00
Justin M. Keyes
f638572164 Merge pull request #3863 from justinmk/vim-8a94d87
vim-patch:8a94d87
2015-12-18 10:51:37 -05:00
Justin M. Keyes
65f11d0a00 vim-patch:8a94d87
Update runtime files.

8a94d873aa
2015-12-17 21:56:41 -05:00
Justin M. Keyes
1e7a553ed7 vim-patch.sh: force LC_ALL=C for preprocessing
Any patch may contain mixed encodings, so we must process them as byte
arrays. E.g. with stock `sed` on OS X patch
8a94d873aa8c753a8522ea86a049bdf2abd0c507 causes this error:
    sed: RE error: illegal byte sequence
To avoid that, set LC_ALL=C.

Also remove redundant *.patch creation from review_pr().
2015-12-17 21:28:54 -05:00
Justin M. Keyes
ecdf18edbb Merge pull request #3860 from justinmk/vim-0122c40
vim-patch:0122c40
2015-12-17 15:23:35 -05:00
Justin M. Keyes
cb0b89f8ba vim-patch:0122c40
Update runtime files.

0122c4070f
2015-12-17 05:14:40 -05:00
Justin M. Keyes
5b30ba7b99 Merge pull request #3859 from justinmk/vim-83caecf
vim-patch:83caecf
2015-12-17 05:06:07 -05:00
Justin M. Keyes
7581046b60 Merge pull request #3858 from justinmk/vim-9da7ff7
vim-patch:9da7ff7
2015-12-17 04:57:53 -05:00
Justin M. Keyes
1f27ccb77f vim-patch:83caecf
Updated runtime files.

83caecf314
2015-12-17 04:52:20 -05:00
Justin M. Keyes
aa4cc17bb0 vim-patch:9da7ff7
Updated runtime files.

9da7ff70cc
2015-12-17 04:40:15 -05:00
Justin M. Keyes
9d64d75031 vim-patch.sh: fix order of non-tagged patches
Sort non-tagged patches in descending order, like tagged patches.
2015-12-17 04:07:03 -05:00
Justin M. Keyes
b051f33814 Merge pull request #3851 from brcolow/vim-7.4.682
vim-patch:7.4.682
2015-12-16 23:44:02 -05:00
brcolow
67f03f33a7 vim-patch:7.4.682
Problem: The search highlighting and match highlighting replaces the
cursorline highlighting, this doesn't look good.
Solution: Combine the highlighting. (Yasuhiro Matsumoto)

09deeb7c94
2015-12-16 13:13:04 -07:00
Justin M. Keyes
f9647d99b4 Merge pull request #3842 from sethjackson/cross-compile
Fix CMakeLists.txt search paths for cross compile
2015-12-16 10:18:15 -05:00
Justin M. Keyes
c42cb49a96 Merge pull request #3846 from sethjackson/win-defs
MSVC: Define S_IXUSR.
2015-12-16 10:12:49 -05:00
Rui Abreu Ferreira
aa36af214a MSVC: Define S_IXUSR. 2015-12-16 05:46:49 -05:00
Justin M. Keyes
75cfd3c0ca Merge pull request #3848 from Shougo/vim-7.4.665
vim-patch:7.4.665
vim-patch:7.4.671
2015-12-15 21:54:22 -05:00
Justin M. Keyes
5cb01bafa8 Merge pull request #3847 from Pyrohh/move-uncrustify
Move uncrustify.cfg to contrib/
2015-12-15 21:24:37 -05:00
Michael Reed
243b492c0d contrib: Move uncrustify.cfg to contrib/
It hasn't been used in quite a while, so it's probably safe to move it
out of the repository root.
2015-12-15 15:34:49 -05:00
Shougo Matsushita
e1abbe6b67 vim-patch:7.4.675
Problem:    When a FileReadPost autocommand moves the cursor inside a line it
            gets moved back.
Solution:   When checking whether an autocommand moved the cursor store the
            column as well. (Christian Brabandt)

eab316bdf9
2015-12-16 05:24:38 +09:00
Shougo Matsushita
4cc38e04c7 vim-patch:7.4.665, 671
Problem:    'linebreak' does not work properly with multi-byte characters.
Solution:   Compute the pointer offset with mb_head_off().  (Yasuhiro
            Matsumoto)

76feaf1bfe

Problem:    Warning for shadowing a variable.
Solution:   Rename off to mb_off. (Kazunobu Kuriyama)

4df702999d
2015-12-16 05:18:25 +09:00
Rui Abreu Ferreira
8be2ab11de Fix CMakeLists.txt search paths for cross compile 2015-12-15 13:53:46 -05:00
Justin M. Keyes
1946f96a16 Merge pull request #3841 from sethjackson/fname-illegal
Windows: define FNAME_ILLEGAL
2015-12-14 23:27:27 -05:00
Seth Jackson
e117544d72 Windows: define FNAME_ILLEGAL. 2015-12-14 17:45:35 -05:00
Justin M. Keyes
77c0f9a62b Merge #3623 'vim-patch:7.4.{670,723,803}' 2015-12-13 14:18:05 -05:00
Johan Klokkhammer Helsing
ad34a376eb Fix linting errors. 2015-12-13 13:06:48 +01:00
Johan Klokkhammer Helsing
c3ac16cfeb Solve warnings. 2015-12-13 13:06:48 +01:00
Johan Klokkhammer Helsing
3b472e55b3 vim-patch:7.4.803
Problem:    C indent does not support C11 raw strings. (Mark Lodato)
Solution:   Do not change indent inside the raw string.

f7bb86dc59
2015-12-13 13:06:48 +01:00
Johan Klokkhammer Helsing
b079622716 Appease clint. 2015-12-13 13:06:48 +01:00
Johan Klokkhammer Helsing
238a8d33fa vim-patch:7.4.723
Problem:    For indenting, finding the C++ baseclass can be slow.
Solution:   Cache the result. (Hirohito Higashi)

4032cfdf17
2015-12-13 13:06:39 +01:00
Johan Klokkhammer Helsing
123361f187 vim-patch:7.4.670
Problem:    Using 'cindent' for Javascript is less than perfect.
Solution:   Improve indenting of continuation lines. (Hirohito Higashi)

dcefba9934
2015-12-13 11:55:37 +01:00
Justin M. Keyes
8a34d21b0d Merge pull request #3706 from Pyrohh/version_commit
Remove "Commit:" field from `--version` output
2015-12-13 03:00:09 -05:00
Justin M. Keyes
7387816dcb Merge pull request #3481 from fabiopozzi/improve-it-translation
l10n: it translation
2015-12-13 02:14:26 -05:00
Justin M. Keyes
f406ae412e Merge pull request #3838 from Shougo/vim-7.4.658
vim-patch:7.4.658
2015-12-13 01:47:34 -05:00
Justin M. Keyes
c3e4e0e383 Merge pull request #3837 from Shougo/vim-7.4.645
vim-patch:7.4.645
2015-12-13 01:45:17 -05:00
Justin M. Keyes
cd1be8350d Merge pull request #3834 from Shougo/vim-7.4.635
vim-patch:7.4.635
2015-12-13 01:42:34 -05:00
Shougo Matsushita
0488fea0de vim-patch:7.4.635
Problem:    If no NL or CR is found in the first block of a file then the
            'fileformat' may be set to "mac". (Issue 77)
Solution:   Check if a CR was found. (eswald)

05eb612ff3
2015-12-13 15:06:35 +09:00
Justin M. Keyes
3c9d8ac99e Merge #3718 'vim-patch:7.4.655' 2015-12-13 00:35:09 -05:00
Justin M. Keyes
014d692013 Merge pull request #3835 from Shougo/vim-7.4.640
vim-patch:7.4.640
2015-12-13 00:31:30 -05:00
Justin M. Keyes
28821397f6 Merge pull request #3836 from sethjackson/set-init-3
Windows: Remove broken check for WIN3264
2015-12-13 00:24:44 -05:00
Justin M. Keyes
1b6e7f9e39 test: fixeol_spec: setup/teardown
Without this cleanup, test will fail if run multiple times.
2015-12-13 00:21:11 -05:00
Justin M. Keyes
aca51f3d93 Merge #3443 'vim-patch:7.4.{785,795,898}' 2015-12-13 00:09:07 -05:00
Seth Jackson
a9b4cedb08 Windows: Remove broken check for WIN3264.
We do not define WIN3264 so this check was broken.

Futher since UNIX is defined on all Unix platforms
we support we can simply remove this #ifdef.
2015-12-12 23:30:43 -05:00
Shougo Matsushita
815fe24604 vim-patch:7.4.658
Problem:    'formatexpr' is evaluated too often.
Solution:   Only invoke it when beyond the 'textwidth' column, as it is
            documented. (James McCoy)

0f8dd840fc
2015-12-13 13:10:31 +09:00
Shougo Matsushita
d1ec3f661a vim-patch:7.4.645
Problem:    When splitting the window in a BufAdd autocommand while still in
            the first, empty buffer the window count is wrong.
Solution:   Do not reset b_nwindows to zero and don't increment it.

8da9bbfd02
2015-12-13 13:01:46 +09:00
Justin M. Keyes
ebdb802bf5 Merge pull request #3816 from sethjackson/win-setenv
Windows: Implement os_setenv()
2015-12-12 22:57:02 -05:00
Shougo Matsushita
f1b9a59ed6 vim-patch:7.4.640
Problem:    After deleting characters in Insert mode such that lines are
            joined undo does not work properly. (issue 324)
Solution:   Use Insstart instead of Insstart_orig. (Christian Brabandt)

c3bbad085c
2015-12-13 12:53:30 +09:00
Rui Abreu Ferreira
810d31a430 Windows: Implement os_setenv() using _putenv_s()
Windows does not have setenv(), instead the _putenv_s() function is used - added
a function check and fatal errors. Implemented os_setenv() for Windows.

Vim supports the original putenv() function if no alternative is available.
Neovim only supports systems where safer alternatives exist, so the check for
putenv() was removed from config/CMakeLists.txt.
2015-12-12 22:33:10 -05:00
mseri
f183cc14de doc: nvim_python: mention --upgrade. #3832 2015-12-12 20:56:17 -05:00
Justin M. Keyes
5c4a5d0677 Merge pull request #3589 from ZyX-I/remove-internal_refcount
eval: Replace internal_refcount hack with proper copyID setting
2015-12-12 20:41:00 -05:00
ZyX
5b96d370df eval: Use list_unref in place of decrementing refcount directly 2015-12-13 03:44:54 +03:00
ZyX
1cf7de074b eval: Replace internal_refcount hack with proper copyID setting 2015-12-13 03:44:53 +03:00
Justin M. Keyes
cc203e4b93 Merge pull request #3753 from watiko/vim-7.4.790
Vim 7.4.{786,787,789,790}
2015-12-12 17:43:23 -05:00
Justin M. Keyes
f37ad6af36 Merge pull request #3807 from ZyX-I/improve-clint
Make clint.py better follow our style guide
2015-12-12 17:32:05 -05:00
ZyX
a35c45732c shada: Fix all linter errors in src/nvim/shada.*
This commit is an example of fixing incorrect code which previously passed
through linter.
2015-12-13 00:47:46 +03:00
Justin M. Keyes
2b12406f2e Merge pull request #3824 from sethjackson/pstrcmp
Windows: Remove UNIX guard for pstrcmp()
2015-12-12 14:45:46 -05:00
Justin M. Keyes
3b74ee1ce9 Merge pull request #3825 from sethjackson/modname
Windows: Remove unnecessary codepath from modname
2015-12-12 14:32:46 -05:00
Justin M. Keyes
158dc2b7a7 Merge pull request #3826 from sethjackson/remove-getscript
Remove getscript.vim
2015-12-12 11:38:23 -05:00
Seth Jackson
5262cf2f19 Remove getscript.vim. 2015-12-12 09:18:51 -05:00
Seth Jackson
7f8365e302 Windows: Remove unnecessary codepath from modname.
File names starting with periods are perfectly acceptable on Windows
file systems. The only place where this is not acceptable is on
MS-DOS FAT file systems which only support 8.3 file names.

See here:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx

Since Neovim does not support MS-DOS or 8.3 file names (#605)
we can drop this codepath.

It was not compiling anyways since we do not define WIN3264.
2015-12-11 20:26:38 -05:00
Rui Abreu Ferreira
fe143ac439 Windows: Remove UNIX guard for pstrcmp()
@equalsraf: I took a look at the Vim source pstrcmp() is actually used in the
dos_expandpath(misc1.c). The only difference between the UNIX and WIN32 version
of the functions is the _cdecl call convention annotation - the body of the
function is identical. Neovim kept the comment from the Unix function but not
from the Windows variant. Seems to me its safe to use the same function for
both - and just correct the comment.
2015-12-11 19:10:06 -05:00
watiko
1b56425662 Make clint status valid 2015-12-12 08:15:34 +09:00
watiko
74341ca5ca Fix the memory leaking 2015-12-12 05:28:27 +09:00
watiko
8c684b2fdb Revert char to char_u 2015-12-12 04:26:22 +09:00
watiko
a3a8df8359 tests: Improve legacy autocmd_option.
* Compare tables instead of strings
 * Add neovim specific test
2015-12-12 03:34:17 +09:00
ZyX
e796632240 clint: Check indentation and alignment inside expressions 2015-12-11 19:08:46 +03:00
Enrico Ghirardi
81960df9f5 statusline: Check width before advancing pointer. #3818
Closes #3763

Helped-by: oni-link <knil.ino@gmail.com>
2015-12-10 03:19:02 -05:00
Justin M. Keyes
fcf829963e Merge pull request #3813 from Shougo/remote
Fix UpdateRemotePlugins fails problem
2015-12-09 23:26:19 -05:00
Justin M. Keyes
bf65b3ab45 Merge pull request #3804 from sethjackson/signal-guards
Add guards for SIGPIPE and SIGQUIT
2015-12-09 23:17:07 -05:00
Justin M. Keyes
87abe073d9 Merge pull request #3783 from sethjackson/log-file-def
Update USR_LOG_FILE definition.
2015-12-09 21:29:49 -05:00
ZyX
74c960007f clint: Check for spaces after { and before } 2015-12-09 19:55:34 +03:00
ZyX
4c0ac1ca26 clint: Do not special-case for() semicolons 2015-12-09 18:37:13 +03:00
Shougo Matsushita
f338fee482 Fix UpdateRemotePlugins fails problem 2015-12-10 00:09:55 +09:00
Justin M. Keyes
f40c8c4c23 Merge pull request #3805 from sethjackson/windows-home
Windows: Define HOME environment variable
2015-12-09 09:52:48 -05:00
Rui Abreu Ferreira
3abbdb2f41 Windows: Define HOME environment variable
- Bring back Vim code for settings $HOME in Windows from
  $HOMEDRIVE$HOMEPATH
- vim-patch:0
2015-12-08 22:55:40 -05:00
ZyX
86c0bd14ec clint: Disallow old style comments everywhere, except for macros 2015-12-08 13:54:20 +03:00
ZyX
77836ff01b clint: Make sure that braces are always used for if and other clauses 2015-12-08 13:22:31 +03:00
Rui Abreu Ferreira
67a7b1785c Add guards for SIGPIPE and SIGQUIT
In some systems the signals SIGPIPE and SIGQUIT are not available.
2015-12-08 00:17:34 -05:00
Rui Abreu Ferreira
0ab4f2f18f Update USR_LOG_FILE definition. 2015-12-07 19:26:26 -05:00
Justin M. Keyes
6d583f8587 Merge pull request #3780 from sethjackson/header-guards
Add missing guard for HAVE_UNISTD_H
2015-12-07 03:16:03 -05:00
Justin M. Keyes
f838755fc0 Merge pull request #3782 from sethjackson/mingw-luajit
MinGW: Add libluajit-5.1 lib name to FindLuaJit
2015-12-07 03:14:54 -05:00
Justin M. Keyes
618c8d0e82 Merge pull request #3793 from mhinz/docs/remove-shell-cmd
Docs: remove references to removed :shell command
2015-12-06 10:15:13 -05:00
Marco Hinz
b6b84cb94f Docs: remove reference to removed :shell command
References #3791.
2015-12-06 14:21:22 +01:00
watiko
3a60f927b8 Improve coding style 2015-12-06 07:41:09 +09:00
Michael Reed
7be12edd38 Remove "Commit:" field from --version output
If nvim is built from a non-tagged commit, the truncated commit hash is
already appended to the main version string (e.g., "NVIM v0.1.0-83-g959f260 ..."),
making the "Commit:" field redundant.

Regarding the truncated hash length: we don't have nearly enough commits
to worry about collisions, and probably won't ever, so the default
length should be fine.
2015-12-05 16:15:32 -05:00
Rui Abreu Ferreira
655f1b7513 MinGW: Add libluajit-5.1 lib name to FindLuaJit 2015-12-02 23:07:22 -05:00
Rui Abreu Ferreira
07eaff7c26 Add missing guard for HAVE_UNISTD_H 2015-12-02 19:54:33 -05:00
watiko
8c00c34b91 tests: Keep each autocmd_option's test in isolation. 2015-11-28 20:15:28 +09:00
watiko
597547e797 Use vim_snprintf instead of sprintf 2015-11-28 20:15:28 +09:00
watiko
972b43459b Improve coding style 2015-11-28 19:48:17 +09:00
watiko
cf673f60c6 Improve coding style 2015-11-28 18:24:57 +09:00
watiko
d9c0293824 tests: Improve legacy test autocmd_option. 2015-11-28 17:22:53 +09:00
watiko
21956adb6e tests: Migrate legacy test autocmd_option. 2015-11-28 17:22:53 +09:00
watiko
fe9d91ceb6 vim-patch:7.4.790
Problem:    Test fails when the autochdir feature is not available.  Test
            output contains the test script.
Solution:   Check for the autochdir feature. (Kazunobu Kuriyama)  Only write
            the relevant test output.

d113a80c77
2015-11-28 17:22:53 +09:00
watiko
09f6066bb4 vim-patch:7.4.789
Problem:    Using freed memory and crash. (Dominique Pellej)
Solution:   Correct use of pointers. (Hirohito Higashi)

9cac424d05
2015-11-28 17:22:52 +09:00
watiko
789041c282 vim-patch:7.4.787
Problem:    snprintf() isn't available everywhere.
Solution:   Use vim_snprintf(). (Ken Takata)

fb9bc4829a
2015-11-28 17:22:52 +09:00
watiko
119545190c vim-patch:7.4.786
Problem:    It is not possible for a plugin to adjust to a changed setting.
Solution:   Add the OptionSet autocommand event. (Christian Brabandt)

537443018d
2015-11-28 17:22:28 +09:00
Johan Klokkhammer Helsing
98f9ff730b vim-patch:7.4.898
Problem:    The 'fixendofline' option is set on with ":edit".
Solution:   Don't set the option when clearing a buffer. (Yasuhiro Matsumoto)

04dfd51229
2015-11-22 20:06:07 +01:00
Johan Klokkhammer Helsing
8d07058097 vim-patch:7.4.795
Problem:    The 'fixeol' option is not copied to a new window.
Solution:   Copy the option value. (Yasuhiro Matsumoto)

b388be0abf
2015-11-22 20:03:41 +01:00
Johan Klokkhammer Helsing
b1d7b5294a Convert legacy test for fixeol to lua test. 2015-11-22 20:03:41 +01:00
Johan Klokkhammer Helsing
a86d4b323e vim-patch:7.4.785
Problem:    On some systems automatically adding the missing EOL causes
            problems. Setting 'binary' has too many side effects.
Solution:   Add the 'fixeol' option, default on. (Pavel Samarkin)

34d72d4b6c
2015-11-22 20:03:41 +01:00
Johan Klokkhammer Helsing
cfa2107e33 vim-patch:7.4.655
Problem:    Text deleted by "dit" depends on indent of closing tag.
            (Jan Parthey)
Solution:   Do not adjust oap->end in do_pending_operator(). (Christian
            Brabandt)

b6c2735c56
2015-11-22 02:52:50 +01:00
Fabio Pozzi
36af4af27a Improved it translation: make check-po-it now OK.
Fixed some fuzzy translation matches.
Fixed all make check-po-it errors, now it builds OK.
2015-10-20 22:01:58 +02:00
294 changed files with 13151 additions and 7518 deletions

View File

@@ -7,4 +7,4 @@ if [[ -n "${CI_TARGET}" ]]; then
exit
fi
coveralls --gcov "$(which "${GCOV}")" --encoding iso-8859-1 || echo 'coveralls upload failed.'
[ "$USE_GCOV" = on ] && { coveralls --gcov "$(which "${GCOV}")" --encoding iso-8859-1 || echo 'coveralls upload failed.' ; }

View File

@@ -19,6 +19,10 @@ if [[ -n "${LLVM_SYMBOLIZER}" ]] && [[ ! $(type -P "${LLVM_SYMBOLIZER}") ]]; the
echo "\$LLVM_SYMBOLIZER: '${LLVM_SYMBOLIZER}' is not executable."
exit 1
fi
if [ "${BUILD_32BIT}" = ON ] && [ "${BUILD_MINGW}" = ON ]; then
>&2 echo "32-bit MinGW builds not supported."
exit 1
fi
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
# Adds user to a dummy group.

View File

@@ -1,10 +1,5 @@
build_deps() {
if [[ "${BUILD_32BIT}" == ON ]]; then
if [[ "${BUILD_MINGW}" == ON ]]; then
>&2 echo "32-bit MinGW builds not supported."
exit 1
fi
DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} ${CMAKE_FLAGS_32BIT}"
fi
if [[ "${BUILD_MINGW}" == ON ]]; then
@@ -42,11 +37,6 @@ build_nvim() {
CMAKE_FLAGS="${CMAKE_FLAGS} -DCLANG_${CLANG_SANITIZER}=ON"
fi
if [[ "${BUILD_32BIT}" == ON ]]; then
if [[ "${BUILD_MINGW}" == ON ]]; then
>&2 echo "32-bit MinGW builds not supported."
exit 1
fi
CMAKE_FLAGS="${CMAKE_FLAGS} ${CMAKE_FLAGS_32BIT}"
fi
if [[ "${BUILD_MINGW}" == ON ]]; then

View File

@@ -14,7 +14,9 @@ elif [[ "${BUILD_MINGW}" == ON ]]; then
# binutils-mingw-w64-i686 gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64-dev mingw-w64-tools
echo "Downloading MinGW..."
curl -sSL "http://downloads.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-4.8-release/i686-w64-mingw32-gcc-4.8.0-linux64_rubenvb.tar.xz" | tar xJf - -C "${HOME}/.local"
curl -sSL "https://github.com/neovim/deps/raw/master/opt/i686-w64-mingw32-gcc-4.8.0-linux64_rubenvb.tar.xz" \
| tar xJf - -C "${HOME}/.local"
fi
# Set CC to default to avoid compilation problems

View File

@@ -4,7 +4,7 @@ set -e
set -o pipefail
if [[ -n "${CI_TARGET}" ]]; then
make lint
make "${CI_TARGET}"
exit 0
fi

2
.gitignore vendored
View File

@@ -67,3 +67,5 @@ local.mk
/runtime/doc/doctags
/runtime/doc/errors.log
# clint errors, generated by `make lint`
/errors.json

View File

@@ -12,8 +12,6 @@ env:
- PATH="$(python2.7 -c 'import site; print(site.getuserbase())')/bin:$HOME/.local/mingw32/bin:$PATH"
# LLVM symbolizer path.
- LLVM_SYMBOLIZER="$(which llvm-symbolizer-3.6)"
# Force verification of DLOG macros.
- CFLAGS="-DMIN_LOG_LEVEL=0"
# Build directory for Neovim.
- BUILD_DIR="$TRAVIS_BUILD_DIR/build"
# Build directory for third-party dependencies.
@@ -28,9 +26,9 @@ env:
- CMAKE_FLAGS="-DTRAVIS_CI_BUILD=ON
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX
-DUSE_GCOV=ON
-DBUSTED_OUTPUT_TYPE=gtest
-DDEPS_PREFIX=$DEPS_BUILD_DIR/usr"
-DDEPS_PREFIX=$DEPS_BUILD_DIR/usr
-DMIN_LOG_LEVEL=0"
- DEPS_CMAKE_FLAGS="-DDEPS_DOWNLOAD_DIR:PATH=$DEPS_DOWNLOAD_DIR"
# Additional CMake flags for 32-bit builds.
- CMAKE_FLAGS_32BIT="-DCMAKE_SYSTEM_LIBRARY_PATH=/lib32:/usr/lib32:/usr/local/lib32
@@ -59,37 +57,34 @@ env:
matrix:
include:
- os: linux
env: CI_TARGET=clint
env: CI_TARGET=lint
- os: linux
compiler: gcc-5
env: GCOV=gcov-5
- os: linux
# Travis creates a cache per compiler.
# Set a different value here to store 32-bit
# dependencies in a separate cache.
compiler: gcc-5 -m32
env: GCOV=gcov-5 BUILD_32BIT=ON
env: BUILD_32BIT=ON
- os: linux
compiler: clang-3.6
env: GCOV=llvm-cov-3.6 CLANG_SANITIZER=ASAN_UBSAN
env: GCOV=llvm-cov-3.6 CLANG_SANITIZER=ASAN_UBSAN CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON"
- os: linux
compiler: clang-3.6
env: GCOV=llvm-cov-3.6 CLANG_SANITIZER=MSAN
env: CLANG_SANITIZER=MSAN
- os: linux
compiler: clang-3.6
env: CLANG_SANITIZER=TSAN
- os: osx
compiler: clang
env: GCOV=gcov
- os: osx
compiler: gcc-4.9
env: GCOV=gcov-4.9
- os: linux
env: BUILD_MINGW=ON
fast_finish: true
allow_failures:
# TODO: Remove when all MSan errors have been fixed.
- env: GCOV=llvm-cov-3.6 CLANG_SANITIZER=MSAN
- env: CLANG_SANITIZER=MSAN
before_install: .ci/before_install.sh
install: .ci/install.sh

View File

@@ -6,8 +6,13 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
# Prefer our bundled versions of dependencies.
set(DEPS_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/.deps/usr" CACHE PATH "Path prefix for finding dependencies")
list(INSERT CMAKE_PREFIX_PATH 0 ${DEPS_PREFIX})
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${DEPS_PREFIX}/lib/pkgconfig")
if(CMAKE_CROSSCOMPILING AND NOT UNIX)
list(INSERT CMAKE_FIND_ROOT_PATH 0 ${DEPS_PREFIX})
list(INSERT CMAKE_PREFIX_PATH 0 ${DEPS_PREFIX}/../host/bin)
else()
list(INSERT CMAKE_PREFIX_PATH 0 ${DEPS_PREFIX})
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${DEPS_PREFIX}/lib/pkgconfig")
endif()
# used for check_c_compiler_flag
include(CheckCCompilerFlag)
@@ -35,37 +40,35 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(USE_FNAME_CASE TRUE)
endif()
# Set available build types for CMake GUIs.
# A different build type can still be set by -DCMAKE_BUILD_TYPE=...
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
STRINGS "Debug" "Dev" "Release" "MinSizeRel" "RelWithDebInfo")
# Set default build type.
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "CMAKE_BUILD_TYPE not given, defaulting to 'Dev'.")
set(CMAKE_BUILD_TYPE "Dev" CACHE STRING "Choose the type of build." FORCE)
endif()
# Version tokens
# - In a git repo, these tokens are _ignored_.
# - If the current HEAD is tagged, the tag name is used.
# - Otherwise the result of `git describe` is used.
# - If not in a git repo (e.g. a tarball) these tokens set the version string.
# Set available build types for CMake GUIs.
# A different build type can still be set by -DCMAKE_BUILD_TYPE=...
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
STRINGS "Debug" "Dev" "Release" "MinSizeRel" "RelWithDebInfo")
# If not in a git repo (e.g., a tarball) these tokens define the complete
# version string, else it is combined with the result of `git describe`.
set(NVIM_VERSION_MAJOR 0)
set(NVIM_VERSION_MINOR 1)
set(NVIM_VERSION_PATCH 1)
set(NVIM_VERSION_PATCH 2)
set(NVIM_VERSION_PRERELEASE "") # for package maintainers
file(TO_CMAKE_PATH ${CMAKE_CURRENT_LIST_DIR}/.git FORCED_GIT_DIR)
include(GetGitRevisionDescription)
get_git_head_revision(GIT_REFSPEC NVIM_VERSION_COMMIT)
if(NVIM_VERSION_COMMIT) # is a git repo
git_get_exact_tag(NVIM_VERSION_MEDIUM)
if(NVIM_VERSION_MEDIUM) # is a tagged release
unset(NVIM_VERSION_COMMIT)
else() # is a dev build
git_describe(NVIM_VERSION_MEDIUM)
get_git_head_revision(GIT_REFSPEC NVIM_VERSION_COMMIT)
endif()
if(NVIM_VERSION_COMMIT) # is a git repo
git_describe(NVIM_VERSION_MEDIUM)
# `git describe` annotates the most recent tagged release; for pre-release
# builds we must replace that with the unreleased version.
string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.[0-9]+"
"v${NVIM_VERSION_MAJOR}.${NVIM_VERSION_MINOR}.${NVIM_VERSION_PATCH}"
NVIM_VERSION_MEDIUM
${NVIM_VERSION_MEDIUM})
endif()
set(NVIM_VERSION_BUILD_TYPE "${CMAKE_BUILD_TYPE}")
@@ -204,6 +207,7 @@ endif()
if(MINGW)
# Use POSIX compatible stdio in Mingw
add_definitions(-D__USE_MINGW_ANSI_STDIO)
add_definitions(-D_WIN32_WINNT=0x0600)
endif()
# OpenBSD's GCC (4.2.1) doesn't have -Wvla
@@ -212,12 +216,16 @@ if(HAS_WVLA_FLAG)
add_definitions(-Wvla)
endif()
check_c_compiler_flag(-fstack-protector-strong HAS_FSTACK_PROTECTOR_STRONG_FLAG)
check_c_compiler_flag(-fstack-protector HAS_FSTACK_PROTECTOR_FLAG)
if(HAS_FSTACK_PROTECTOR_STRONG_FLAG)
add_definitions(-fstack-protector-strong)
elseif(HAS_FSTACK_PROTECTOR_FLAG)
add_definitions(-fstack-protector --param ssp-buffer-size=4)
if(UNIX)
# -fstack-protector breaks non Unix builds even in Mingw-w64
check_c_compiler_flag(-fstack-protector-strong HAS_FSTACK_PROTECTOR_STRONG_FLAG)
check_c_compiler_flag(-fstack-protector HAS_FSTACK_PROTECTOR_FLAG)
if(HAS_FSTACK_PROTECTOR_STRONG_FLAG)
add_definitions(-fstack-protector-strong)
elseif(HAS_FSTACK_PROTECTOR_FLAG)
add_definitions(-fstack-protector --param ssp-buffer-size=4)
endif()
endif()
check_c_compiler_flag(-fdiagnostics-color=auto HAS_DIAG_COLOR_FLAG)
@@ -271,7 +279,7 @@ include(CheckLibraryExists)
find_package(LibUV REQUIRED)
include_directories(SYSTEM ${LIBUV_INCLUDE_DIRS})
find_package(Msgpack REQUIRED)
find_package(Msgpack 1.0.0 REQUIRED)
include_directories(SYSTEM ${MSGPACK_INCLUDE_DIRS})
find_package(LuaJit REQUIRED)
@@ -328,9 +336,16 @@ endif()
set(CMAKE_THREAD_PREFER_PTHREAD ON)
find_package(Threads REQUIRED)
# Place targets in bin/ or lib/ for all build configurations
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
foreach(CFGNAME ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${CFGNAME} CFGNAME)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFGNAME} ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFGNAME} ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFGNAME} ${CMAKE_BINARY_DIR}/lib)
endforeach()
# Find Lua interpreter
include(LuaHelpers)
@@ -377,6 +392,16 @@ install_helper(
FILES ${MANPAGES}
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
# MIN_LOG_LEVEL for log.h
if(DEFINED MIN_LOG_LEVEL)
if(NOT MIN_LOG_LEVEL MATCHES "^[0-3]$")
message(FATAL_ERROR "MIN_LOG_LEVEL must be a number DEBUG (0), INFO (1), WARNING (2) or ERROR (3)")
endif()
message(STATUS "Log level set to ${MIN_LOG_LEVEL}")
else()
message(STATUS "Log level not specified, defaulting to INFO(1)")
endif()
# Go down the tree.
add_subdirectory(src/nvim)
@@ -401,7 +426,11 @@ if(BUSTED_PRG)
if(POLICY CMP0026)
cmake_policy(SET CMP0026 OLD)
endif()
get_target_property(TEST_LIBNVIM_PATH nvim-test LOCATION)
if(CMAKE_GENERATOR MATCHES "Visual Studio")
set(TEST_LIBNVIM_PATH ${CMAKE_BINARY_DIR}/lib/nvim-test.dll)
else()
get_target_property(TEST_LIBNVIM_PATH nvim-test LOCATION)
endif()
configure_file(
test/config/paths.lua.in
@@ -465,3 +494,15 @@ if(LUACHECK_PRG)
-DTEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test
-P ${PROJECT_SOURCE_DIR}/cmake/RunTestsLint.cmake)
endif()
set(CPACK_PACKAGE_NAME "Neovim")
set(CPACK_PACKAGE_VENDOR "neovim.io")
set(CPACK_PACKAGE_VERSION ${NVIM_VERSION_MEDIUM})
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Neovim")
# Set toplevel directory/installer name as Neovim
set(CPACK_PACKAGE_FILE_NAME "Neovim")
set(CPACK_TOPLEVEL_TAG "Neovim")
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
set(CPACK_NSIS_MODIFY_PATH ON)
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
include(CPack)

View File

@@ -23,15 +23,10 @@ If your issue isn't mentioned there:
your problem persists.
- If you're experiencing compile or runtime warnings/failures, try searching for
the error message(s) you received (if any) on [Neovim's issue tracker][github-issues].
- For build issues, see
[Troubleshooting#build-issues][wiki-troubleshooting-build-issues].
- For runtime issues, see
[Troubleshooting#runtime-issues][wiki-troubleshooting-runtime-issues].
If your issue isn't mentioned there, try reproducing it using `nvim`
with the smallest possible `vimrc` (or none at all via `nvim -u NONE`),
to rule out bugs in plugins you're using.
If you're using a plugin manager, comment out your plugins, then add
them back in one by one.
- For runtime issues, try reproducing it using `nvim` with the smallest
possible `vimrc` (or none at all via `nvim -u NONE`), to rule out bugs in
plugins you're using. If you're using a plugin manager, comment out your
plugins, then add them back in one by one.
Include as much detail as possible; we generally need to know:
@@ -112,10 +107,9 @@ happen to be modifying anyway. Fix anything that looks outright
otherwise prefer to leave things as they are.
For new code, run `make lint` (which runs [clint.py][clint]) to detect style
errors. Make sure that the file(s) you intend to be linted are not in
`clint-ignored-files.txt`. It's not perfect, so some warnings may be false
positives/negatives. To have `clint.py` ignore certain cases, put `// NOLINT`
at the end of the line.
errors. It's not perfect, so some warnings may be false positives/negatives.
To have `clint.py` ignore certain cases, put `// NOLINT` at the end of the
line.
We also provide a configuration file for [`clang-format`][clang-format], which
can be used to format code according to the style guidelines. Be aware that
@@ -196,6 +190,4 @@ such as [`tig`][tig].
[wiki-contributing]: https://github.com/neovim/neovim/wiki/Contributing
[wiki-faq]: https://github.com/neovim/neovim/wiki/FAQ
[wiki-review-checklist]: https://github.com/neovim/neovim/wiki/Code-review-checklist
[wiki-troubleshooting-build-issues]: https://github.com/neovim/neovim/wiki/Troubleshooting#build-issues
[wiki-troubleshooting-runtime-issues]: https://github.com/neovim/neovim/wiki/Troubleshooting#runtime-issues
[wiki-troubleshooting]: https://github.com/neovim/neovim/wiki/Troubleshooting

259
clint.py
View File

@@ -198,6 +198,8 @@ _ERROR_CATEGORIES = [
'runtime/printf',
'runtime/printf_format',
'runtime/threadsafe_fn',
'syntax/parenthesis',
'whitespace/alignment',
'whitespace/blank_line',
'whitespace/braces',
'whitespace/comma',
@@ -213,7 +215,7 @@ _ERROR_CATEGORIES = [
'whitespace/parens',
'whitespace/semicolon',
'whitespace/tab',
'whitespace/todo'
'whitespace/todo',
]
# The default state of the category filter. This is overrided by the --filter=
@@ -826,9 +828,9 @@ def Error(filename, linenum, category, confidence, message):
_RE_PATTERN_CLEANSE_LINE_ESCAPES = re.compile(
r'\\([abfnrtv?"\\\']|\d+|x[0-9a-fA-F]+)')
# Matches strings. Escape codes should already be removed by ESCAPES.
_RE_PATTERN_CLEANSE_LINE_DOUBLE_QUOTES = re.compile(r'"[^"]*"')
_RE_PATTERN_CLEANSE_LINE_DOUBLE_QUOTES = re.compile(r'"([^"]*)"')
# Matches characters. Escape codes should already be removed by ESCAPES.
_RE_PATTERN_CLEANSE_LINE_SINGLE_QUOTES = re.compile(r"'.'")
_RE_PATTERN_CLEANSE_LINE_SINGLE_QUOTES = re.compile(r"'(.)'")
# Matches multi-line C++ comments.
# This RE is a little bit more complicated than one might expect, because we
# have to take care of space removals tools so we can handle comments inside
@@ -923,39 +925,48 @@ def CleanseComments(line):
class CleansedLines(object):
"""Holds 3 copies of all lines with different preprocessing applied to them.
"""Holds 5 copies of all lines with different preprocessing applied to them.
1) elided member contains lines without strings and comments,
2) lines member contains lines without comments, and
3) raw_lines member contains all the lines without processing.
3) raw_lines member contains all the lines with multiline comments replaced.
4) init_lines member contains all the lines without processing.
5) elided_with_space_strings is like elided, but with string literals
looking like `" "`.
All these three members are of <type 'list'>, and of the same length.
"""
def __init__(self, lines):
def __init__(self, lines, init_lines):
self.elided = []
self.lines = []
self.raw_lines = lines
self.num_lines = len(lines)
self.init_lines = init_lines
self.lines_without_raw_strings = lines
self.elided_with_space_strings = []
for linenum in range(len(self.lines_without_raw_strings)):
self.lines.append(CleanseComments(
self.lines_without_raw_strings[linenum]))
elided = self._CollapseStrings(
self.lines_without_raw_strings[linenum])
self.elided.append(CleanseComments(elided))
elided = CleanseComments(self._CollapseStrings(
self.lines_without_raw_strings[linenum], True))
self.elided_with_space_strings.append(elided)
def NumLines(self):
"""Returns the number of lines represented."""
return self.num_lines
@staticmethod
def _CollapseStrings(elided):
def _CollapseStrings(elided, keep_spaces=False):
"""Collapses strings and chars on a line to simple "" or '' blocks.
We nix strings first so we're not fooled by text like '"http://"'
Args:
elided: The line being processed.
keep_spaces: If true, collapse to
Returns:
The line with collapsed strings.
@@ -964,12 +975,75 @@ class CleansedLines(object):
# Remove escaped characters first to make quote/single quote
# collapsing basic. Things that look like escaped characters
# shouldn't occur outside of strings and chars.
elided = _RE_PATTERN_CLEANSE_LINE_ESCAPES.sub('', elided)
elided = _RE_PATTERN_CLEANSE_LINE_SINGLE_QUOTES.sub("''", elided)
elided = _RE_PATTERN_CLEANSE_LINE_DOUBLE_QUOTES.sub('""', elided)
elided = _RE_PATTERN_CLEANSE_LINE_ESCAPES.sub(
'' if not keep_spaces else lambda m: ' ' * len(m.group(0)),
elided)
elided = _RE_PATTERN_CLEANSE_LINE_SINGLE_QUOTES.sub(
"''" if not keep_spaces
else lambda m: "'" + (' ' * len(m.group(1))) + "'",
elided)
elided = _RE_PATTERN_CLEANSE_LINE_DOUBLE_QUOTES.sub(
'""' if not keep_spaces
else lambda m: '"' + (' ' * len(m.group(1))) + '"',
elided)
return elided
BRACES = {
'(': ')',
'{': '}',
'[': ']',
# '<': '>', C++-specific pair removed
}
CLOSING_BRACES = dict(((v, k) for k, v in BRACES.items()))
def GetExprBracesPosition(clean_lines, linenum, pos):
"""List positions of all kinds of braces
If input points to ( or { or [ then function proceeds until finding the
position which closes it.
Args:
clean_lines: A CleansedLines instance containing the file.
linenum: Current line number.
pos: A position on the line.
Yields:
A tuple (linenum, pos, brace, depth) that points to each brace.
Additionally each new line (linenum, pos, 's', depth) is yielded, for each
line end (linenum, pos, 'e', depth) is yielded and at the very end it
yields (linenum, pos, None, None).
"""
depth = 0
yielded_line_start = True
startpos = pos
while linenum < clean_lines.NumLines() - 1:
line = clean_lines.elided_with_space_strings[linenum]
if not line.startswith('#') or yielded_line_start:
# Ignore #ifdefs, but not if it is macros that are checked
for i, brace in enumerate(line[startpos:]):
pos = i + startpos
if brace != ' ' and not yielded_line_start:
yield (linenum, pos, 's', depth)
yielded_line_start = True
if brace in BRACES:
depth += 1
yield (linenum, pos, brace, depth)
elif brace in CLOSING_BRACES:
yield (linenum, pos, brace, depth)
depth -= 1
if depth == 0:
yield (linenum, pos, None, None)
return
yield (linenum, len(line) - 1, 'e', depth)
yielded_line_start = False
startpos = 0
linenum += 1
def FindEndOfExpressionInLine(line, startpos, depth, startchar, endchar):
"""Find the position just after the matching endchar.
@@ -995,9 +1069,9 @@ def FindEndOfExpressionInLine(line, startpos, depth, startchar, endchar):
def CloseExpression(clean_lines, linenum, pos):
"""If input points to ( or { or [ or <, finds the position that closes it.
"""If input points to ( or { or [, finds the position that closes it.
If lines[linenum][pos] points to a '(' or '{' or '[' or '<', finds the
If lines[linenum][pos] points to a '(' or '{' or '[', finds the
linenum/pos that correspond to the closing of the expression.
Args:
@@ -1014,16 +1088,9 @@ def CloseExpression(clean_lines, linenum, pos):
line = clean_lines.elided[linenum]
startchar = line[pos]
if startchar not in '({[<':
if startchar not in BRACES:
return (line, clean_lines.NumLines(), -1)
if startchar == '(':
endchar = ')'
if startchar == '[':
endchar = ']'
if startchar == '{':
endchar = '}'
if startchar == '<':
endchar = '>'
endchar = BRACES[startchar]
# Check first line
(end_pos, num_open) = FindEndOfExpressionInLine(
@@ -1300,6 +1367,23 @@ def CheckForMultilineCommentsAndStrings(filename, clean_lines, linenum, error):
'Use C++11 raw strings or concatenation instead.')
def CheckForOldStyleComments(filename, line, linenum, error):
"""Logs an error if we see /*-style comment
Args:
filename: The name of the current file.
line: The text of the line to check.
linenum: The number of the line to check.
error: The function to call with any errors found.
"""
if line.find('/*') >= 0 and line[-1] != '\\':
error(filename, linenum, 'readability/old_style_comment', 5,
'/*-style comment found, it should be replaced with //-style. '
'/*-style comments are only allowed inside macros. '
'Note that you should not use /*-style comments to document '
'macros itself, use doxygen-style comments for this.')
threading_list = (
('asctime(', 'os_asctime_r('),
('ctime(', 'os_ctime_r('),
@@ -1968,6 +2052,92 @@ def FindPreviousMatchingAngleBracket(clean_lines, linenum, init_prefix):
return False
def CheckExpressionAlignment(filename, clean_lines, linenum, error, startpos=0):
"""Checks for the correctness of alignment inside expressions
Args:
filename: The name of the current file.
clean_lines: A CleansedLines instance containing the file.
linenum: The number of the line to check.
error: The function to call with any errors found.
startpos: Position where to start searching for expression start.
"""
level_starts = {}
line = clean_lines.elided_with_space_strings[linenum]
prev_line_start = Search(r'\S', line).start()
depth_line_starts = {}
pos = min([
idx
for idx in (
line.find(k, startpos)
for k in BRACES
if k != '{'
)
if idx >= 0
] + [len(line) + 1])
if pos == len(line) + 1:
return
ignore_error_levels = set()
firstlinenum = linenum
for linenum, pos, brace, depth in GetExprBracesPosition(
clean_lines, linenum, pos
):
line = clean_lines.elided_with_space_strings[linenum]
if depth is None:
if pos < len(line) - 1:
CheckExpressionAlignment(filename, clean_lines, linenum, error,
pos + 1)
return
elif depth <= 0:
error(filename, linenum, 'syntax/parenthesis', 4,
'Unbalanced parenthesis')
return
if brace == 's':
assert firstlinenum != linenum
if level_starts[depth][1]:
if line[pos] == BRACES[depth_line_starts[depth][1]]:
if pos != depth_line_starts[depth][0]:
if depth not in ignore_error_levels:
error(filename, linenum, 'whitespace/indent', 2,
'End of the inner expression should have '
'the same indent as start')
else:
if (pos != depth_line_starts[depth][0] + 4
and not (depth_line_starts[depth][1] == '{'
and pos == depth_line_starts[depth][0] + 2)):
if depth not in ignore_error_levels:
error(filename, linenum, 'whitespace/indent', 2,
'Inner expression indentation should be 4')
else:
if (pos != level_starts[depth][0] + 1
+ (level_starts[depth][2] == '{')):
if depth not in ignore_error_levels:
error(filename, linenum, 'whitespace/alignment', 2,
'Inner expression should be aligned '
'as opening brace + 1 (+ 2 in case of {)')
prev_line_start = pos
elif brace == 'e':
pass
else:
opening = brace in BRACES
if opening:
# Only treat {} as part of the expression if it is preceded by
# "=" (brace initializer) or "(type)" (construct like (struct
# foo) { ... }).
if brace == '{' and not (Search(
r'(?:= *|\((?:struct )?\w+(\s*\[\w*\])?\)) *$',
line[:pos])
):
ignore_error_levels.add(depth)
line_ended_with_opening = (
pos == len(line) - 2 * (line.endswith(' \\')) - 1)
level_starts[depth] = (pos, line_ended_with_opening, brace)
if line_ended_with_opening:
depth_line_starts[depth] = (prev_line_start, brace)
else:
del level_starts[depth]
def CheckSpacing(filename, clean_lines, linenum, nesting_state, error):
"""Checks for the correctness of various spacing issues in the code.
@@ -1975,7 +2145,8 @@ def CheckSpacing(filename, clean_lines, linenum, nesting_state, error):
if/for/while/switch, no spaces around parens in function calls, two
spaces between code and comment, don't start a block with a blank
line, don't end a function with a blank line, don't add a blank line
after public/protected/private, don't have too many blank lines in a row.
after public/protected/private, don't have too many blank lines in a row,
spaces after {, spaces before }.
Args:
filename: The name of the current file.
@@ -2236,6 +2407,10 @@ def CheckSpacing(filename, clean_lines, linenum, nesting_state, error):
# Next we will look for issues with function calls.
CheckSpacingForFunctionCall(filename, line, linenum, error)
# Check whether everything inside expressions is aligned correctly
if any((line.find(k) >= 0 for k in BRACES if k != '{')):
CheckExpressionAlignment(filename, clean_lines, linenum, error)
# Except after an opening paren, or after another opening brace (in case of
# an initializer list, for instance), you should have spaces before your
# braces. And since you should never have braces at the beginning of a line,
@@ -2292,8 +2467,6 @@ def CheckSpacing(filename, clean_lines, linenum, nesting_state, error):
'Extra space before [')
# You shouldn't have a space before a semicolon at the end of the line.
# There's a special case for "for" since the style guide allows space before
# the semicolon there.
if Search(r':\s*;\s*$', line):
error(filename, linenum, 'whitespace/semicolon', 5,
'Semicolon defining empty statement. Use {} instead.')
@@ -2301,12 +2474,18 @@ def CheckSpacing(filename, clean_lines, linenum, nesting_state, error):
error(filename, linenum, 'whitespace/semicolon', 5,
'Line contains only semicolon. If this should be an empty'
' statement, use {} instead.')
elif (Search(r'\s+;\s*$', line) and
not Search(r'\bfor\b', line)):
elif Search(r'\s+;\s*$', line):
error(filename, linenum, 'whitespace/semicolon', 5,
'Extra space before last semicolon. If this should be an empty '
'statement, use {} instead.')
if Search(r'\{(?!\})\S', line):
error(filename, linenum, 'whitespace/braces', 5,
'Missing space after {')
if Search(r'\S(?<!\{)\}', line):
error(filename, linenum, 'whitespace/braces', 5,
'Missing space before }')
def GetPreviousNonBlankLine(clean_lines, linenum):
"""Return the most recent non-blank line and its line number.
@@ -2361,11 +2540,27 @@ def CheckBraces(filename, clean_lines, linenum, error):
' of the previous line')
# An else clause should be on the same line as the preceding closing brace.
# If there is no preceding closing brace, there should be one.
if Match(r'\s*else\s*', line):
prevline = GetPreviousNonBlankLine(clean_lines, linenum)[0]
if Match(r'\s*}\s*$', prevline):
error(filename, linenum, 'whitespace/newline', 4,
'An else should appear on the same line as the preceding }')
else:
error(filename, linenum, 'readability/braces', 5,
'An else should always have braces before it')
# If should always have a brace
for blockstart in ('if', 'while', 'for'):
if Match(r'\s*{0}[^{{]*$'.format(blockstart), line):
pos = line.find(blockstart)
pos = line.find('(', pos)
if pos > 0:
(endline, _, endpos) = CloseExpression(
clean_lines, linenum, pos)
if endline[endpos:].find('{') == -1:
error(filename, linenum, 'readability/braces', 5,
'{0} should always use braces'.format(blockstart))
# If braces come on one side of an else, they should be on both.
# However, we have to worry about "else if" that spans multiple lines!
@@ -3026,12 +3221,14 @@ def ProcessLine(filename, file_extension, clean_lines, line,
arguments : filename, clean_lines, line, error
"""
raw_lines = clean_lines.raw_lines
init_lines = clean_lines.init_lines
ParseNolintSuppressions(filename, raw_lines[line], line, error)
nesting_state.Update(filename, clean_lines, line, error)
if nesting_state.stack and nesting_state.stack[-1].inline_asm != _NO_ASM:
return
CheckForFunctionLengths(filename, clean_lines, line, function_state, error)
CheckForMultilineCommentsAndStrings(filename, clean_lines, line, error)
CheckForOldStyleComments(filename, init_lines[line], line, error)
CheckStyle(
filename, clean_lines, line, file_extension, nesting_state, error)
CheckLanguage(filename, clean_lines, line, file_extension, include_state,
@@ -3072,12 +3269,12 @@ def ProcessFileData(filename, file_extension, lines, error,
for line in range(1, len(lines)):
ParseKnownErrorSuppressions(filename, lines, line)
if _cpplint_state.record_errors_file:
raw_lines = lines[:]
init_lines = lines[:]
if _cpplint_state.record_errors_file:
def RecordedError(filename, linenum, category, confidence, message):
if not IsErrorSuppressedByNolint(category, linenum):
key = raw_lines[linenum - 1 if linenum else 0:linenum + 2]
key = init_lines[linenum - 1 if linenum else 0:linenum + 2]
err = [filename, key, category]
json.dump(err, _cpplint_state.record_errors_file)
_cpplint_state.record_errors_file.write('\n')
@@ -3089,7 +3286,7 @@ def ProcessFileData(filename, file_extension, lines, error,
CheckForHeaderGuard(filename, lines, error)
RemoveMultiLineComments(filename, lines, error)
clean_lines = CleansedLines(lines)
clean_lines = CleansedLines(lines, init_lines)
for line in range(clean_lines.NumLines()):
ProcessLine(filename, file_extension, clean_lines, line,
include_state, function_state, nesting_state, error,
@@ -3119,7 +3316,7 @@ def ProcessFile(filename, vlevel, extra_check_functions=[]):
_SetVerboseLevel(vlevel)
try:
# Support the UNIX convention of using "-" for stdin. Note that
# Support the Unix convention of using "-" for stdin. Note that
# we are not opening the file with universal newline support
# (which codecs doesn't support anyway), so the resulting lines do
# contain trailing '\r' characters if we are reading a file that

View File

@@ -34,7 +34,7 @@ endif()
if(MSVC)
list(APPEND LUAJIT_NAMES lua51)
elseif(MINGW)
list(APPEND LUAJIT_NAMES libluajit)
list(APPEND LUAJIT_NAMES libluajit libluajit-5.1)
else()
list(APPEND LUAJIT_NAMES luajit-5.1)
endif()

View File

@@ -7,7 +7,9 @@
if(NOT MSGPACK_USE_BUNDLED)
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
pkg_check_modules(PC_MSGPACK QUIET msgpack)
pkg_search_module(PC_MSGPACK QUIET
msgpackc>=${Msgpack_FIND_VERSION}
msgpack>=${Msgpack_FIND_VERSION})
endif()
else()
set(PC_MSGPACK_INCLUDEDIR)
@@ -19,19 +21,33 @@ endif()
set(MSGPACK_DEFINITIONS ${PC_MSGPACK_CFLAGS_OTHER})
find_path(MSGPACK_INCLUDE_DIR msgpack.h
find_path(MSGPACK_INCLUDE_DIR msgpack/version_master.h
HINTS ${PC_MSGPACK_INCLUDEDIR} ${PC_MSGPACK_INCLUDE_DIRS}
${LIMIT_SEARCH})
# If we're asked to use static linkage, add libmsgpack.a as a preferred library name.
if(MSGPACK_INCLUDE_DIR)
file(READ ${MSGPACK_INCLUDE_DIR}/msgpack/version_master.h msgpack_version_h)
string(REGEX REPLACE ".*MSGPACK_VERSION_MAJOR +([0-9]+).*" "\\1" MSGPACK_VERSION_MAJOR "${msgpack_version_h}")
string(REGEX REPLACE ".*MSGPACK_VERSION_MINOR +([0-9]+).*" "\\1" MSGPACK_VERSION_MINOR "${msgpack_version_h}")
string(REGEX REPLACE ".*MSGPACK_VERSION_REVISION +([0-9]+).*" "\\1" MSGPACK_VERSION_REVISION "${msgpack_version_h}")
set(MSGPACK_VERSION_STRING "${MSGPACK_VERSION_MAJOR}.${MSGPACK_VERSION_MINOR}.${MSGPACK_VERSION_REVISION}")
else()
set(MSGPACK_VERSION_STRING)
endif()
# If we're asked to use static linkage, add libmsgpack{,c}.a as a preferred library name.
if(MSGPACK_USE_STATIC)
list(APPEND MSGPACK_NAMES
"${CMAKE_STATIC_LIBRARY_PREFIX}msgpackc${CMAKE_STATIC_LIBRARY_SUFFIX}"
"${CMAKE_STATIC_LIBRARY_PREFIX}msgpack${CMAKE_STATIC_LIBRARY_SUFFIX}")
endif()
list(APPEND MSGPACK_NAMES msgpack)
list(APPEND MSGPACK_NAMES msgpackc msgpack)
find_library(MSGPACK_LIBRARY NAMES ${MSGPACK_NAMES}
# Check each directory for all names to avoid using headers/libraries from
# different places.
NAMES_PER_DIR
HINTS ${PC_MSGPACK_LIBDIR} ${PC_MSGPACK_LIBRARY_DIRS}
${LIMIT_SEARCH})
@@ -43,6 +59,7 @@ set(MSGPACK_INCLUDE_DIRS ${MSGPACK_INCLUDE_DIR})
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set MSGPACK_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(Msgpack DEFAULT_MSG
MSGPACK_LIBRARY MSGPACK_INCLUDE_DIR)
find_package_handle_standard_args(Msgpack
REQUIRED_VARS MSGPACK_LIBRARY MSGPACK_INCLUDE_DIR
VERSION_VAR MSGPACK_VERSION_STRING)

View File

@@ -8,7 +8,6 @@ include(CheckCSourceCompiles)
check_type_size("int" SIZEOF_INT)
check_type_size("long" SIZEOF_LONG)
check_type_size("intmax_t" SIZEOF_INTMAX_T)
check_type_size("off_t" SIZEOF_OFF_T)
check_type_size("size_t" SIZEOF_SIZE_T)
check_type_size("long long" SIZEOF_LONG_LONG)
check_type_size("void *" SIZEOF_VOID_PTR)
@@ -16,29 +15,21 @@ check_type_size("void *" SIZEOF_VOID_PTR)
check_symbol_exists(_NSGetEnviron crt_externs.h HAVE__NSGETENVIRON)
# Headers
check_include_files(dirent.h HAVE_DIRENT_H)
check_include_files(fcntl.h HAVE_FCNTL_H)
check_include_files(iconv.h HAVE_ICONV_H)
check_include_files(langinfo.h HAVE_LANGINFO_H)
check_include_files(libgen.h HAVE_LIBGEN_H)
check_include_files(locale.h HAVE_LOCALE_H)
check_include_files(pwd.h HAVE_PWD_H)
check_include_files(strings.h HAVE_STRINGS_H)
check_include_files(stropts.h HAVE_STROPTS_H)
check_include_files(sys/param.h HAVE_SYS_PARAM_H)
check_include_files(sys/wait.h HAVE_SYS_WAIT_H)
if(NOT HAVE_SYS_WAIT_H AND UNIX)
# See if_cscope.c
message(SEND_ERROR "header sys/wait.h is required for UNIX")
message(SEND_ERROR "header sys/wait.h is required for Unix")
endif()
check_include_files(sys/utsname.h HAVE_SYS_UTSNAME_H)
check_include_files(utime.h HAVE_UTIME_H)
check_include_files(unistd.h HAVE_UNISTD_H)
check_include_files(utime.h HAVE_UTIME_H)
# Functions
check_function_exists(fseeko HAVE_FSEEKO)
check_function_exists(fsync HAVE_FSYNC)
check_function_exists(getpwent HAVE_GETPWENT)
check_function_exists(getpwnam HAVE_GETPWNAM)
check_function_exists(getpwuid HAVE_GETPWUID)
@@ -51,7 +42,10 @@ if(JEMALLOC_FOUND)
set(HAVE_JEMALLOC 1)
endif()
check_function_exists(putenv HAVE_PUTENV)
check_function_exists(_putenv_s HAVE_PUTENV_S)
if(WIN32 AND NOT HAVE_PUTENV_S)
message(SEND_ERROR "_putenv_s() function not found on your system.")
endif()
check_function_exists(opendir HAVE_OPENDIR)
check_function_exists(readlink HAVE_READLINK)
check_function_exists(setenv HAVE_SETENV)
@@ -98,10 +92,10 @@ endif()
if (NOT "${HAVE_BE64TOH}")
if (NOT "${CMAKE_CROSSCOMPILING}")
# It is safe to make ORDER_BIG_ENDIAN not defined if
# - HAVE_BE64TOH is true. In this case be64toh will be used unconditionally in
# - HAVE_BE64TOH is true. In this case be64toh will be used unconditionally in
# any case and ORDER_BIG_ENDIAN will not be examined.
# - CMAKE_CROSSCOMPILING *and* HAVE_BE64TOH are both false. In this case
# be64toh function which uses cycle and arithmetic operations is used which
# - CMAKE_CROSSCOMPILING *and* HAVE_BE64TOH are both false. In this case
# be64toh function which uses cycle and arithmetic operations is used which
# will work regardless of endianess. Function is sub-optimal though.
check_c_source_runs("
${SI}

View File

@@ -5,7 +5,6 @@
#define SIZEOF_INT @SIZEOF_INT@
#define SIZEOF_LONG @SIZEOF_LONG@
#define SIZEOF_OFF_T @SIZEOF_OFF_T@
#if @SIZEOF_VOID_PTR@ == 8
#define ARCH_64
@@ -14,22 +13,18 @@
#endif
#cmakedefine HAVE__NSGETENVIRON
#cmakedefine HAVE_CRT_EXTERNS_H
#cmakedefine HAVE_FCNTL_H
#cmakedefine HAVE_FD_CLOEXEC
#cmakedefine HAVE_FSEEKO
#cmakedefine HAVE_FSYNC
#cmakedefine HAVE_GETPWENT
#cmakedefine HAVE_GETPWNAM
#cmakedefine HAVE_GETPWUID
#cmakedefine HAVE_ICONV
#cmakedefine HAVE_ICONV_H
#cmakedefine HAVE_LANGINFO_H
#cmakedefine HAVE_LIBGEN_H
#cmakedefine HAVE_LOCALE_H
#cmakedefine HAVE_NL_LANGINFO_CODESET
#cmakedefine HAVE_NL_MSG_CAT_CNTR
#cmakedefine HAVE_PUTENV
#cmakedefine HAVE_PUTENV_S
#cmakedefine HAVE_PWD_H
#cmakedefine HAVE_READLINK
// TODO: add proper cmake check
@@ -42,11 +37,8 @@
#cmakedefine HAVE_STRCASECMP
#cmakedefine HAVE_STRINGS_H
#cmakedefine HAVE_STRNCASECMP
#cmakedefine HAVE_STROPTS_H
#cmakedefine HAVE_SYS_PARAM_H
#cmakedefine HAVE_SYS_UTSNAME_H
#cmakedefine HAVE_SYS_WAIT_H
#cmakedefine HAVE_UNISTD_H
#cmakedefine HAVE_UTIME
#cmakedefine HAVE_UTIME_H
#cmakedefine HAVE_UTIMES

View File

@@ -5,7 +5,6 @@
#define NVIM_VERSION_MINOR @NVIM_VERSION_MINOR@
#define NVIM_VERSION_PATCH @NVIM_VERSION_PATCH@
#define NVIM_VERSION_PRERELEASE "@NVIM_VERSION_PRERELEASE@"
#cmakedefine NVIM_VERSION_COMMIT "@NVIM_VERSION_COMMIT@"
#cmakedefine NVIM_VERSION_MEDIUM "@NVIM_VERSION_MEDIUM@"
#define NVIM_VERSION_CFLAGS "@NVIM_VERSION_CFLAGS@"

View File

@@ -9,7 +9,7 @@ def DirectoryOfThisScript():
def GetDatabase():
compilation_database_folder = os.path.join(DirectoryOfThisScript(),
'..', '..', 'build')
'..', 'build')
if os.path.exists(compilation_database_folder):
return ycm_core.CompilationDatabase(compilation_database_folder)
return None

View File

@@ -31,6 +31,11 @@
#
# CMAKE_BUILD_TYPE := Debug
# By default, nvim's log level is INFO (1) (unless CMAKE_BUILD_TYPE is
# "Release", in which case logging is disabled).
# The log level must be a number DEBUG (0), INFO (1), WARNING (2) or ERROR (3).
# CMAKE_EXTRA_FLAGS += -DMIN_LOG_LEVEL=1
# By default, nvim uses bundled versions of its required third-party
# dependencies.
# Uncomment these entries to instead use system-wide installations of

View File

@@ -1,4 +1,4 @@
.Dd November 11, 2015
.Dd January 28, 2016
.Dt NVIM 1
.Os
.Sh NAME
@@ -75,7 +75,7 @@ Can be used to edit files starting with a hyphen
.Pq Sq - .
.It Fl -literal
Interpret filenames literally, that is, do not expand wildcards.
Has no effect on UNIX-like systems, where the shell expands wildcards.
Has no effect on Unix-like systems, where the shell expands wildcards.
.It Fl e
Ex mode.
See
@@ -373,8 +373,24 @@ Used to set the 'shell' option, which determines the shell used by the
command.
.It Ev NVIM_TUI_ENABLE_CURSOR_SHAPE
If defined, change the cursor shape to a vertical bar while in insert mode.
Requires that the host terminal support the DECSCUSR CSI escape sequence.
Requires that the host terminal supports the DECSCUSR CSI escape sequence.
Has no effect in GUIs.
.Pp
Depending on the terminal emulator, using this option with
.Nm
under
.Xr tmux 1
might require adding the following to
.Pa ~/.tmux.conf :
.Bd -literal -offset indent
set -ga terminal-overrides ',*:Ss=\eE[%p1%d q:Se=\eE[2 q'
.Ed
.Pp
See
.Ic terminal-overrides
in the
.Xr tmux 1
manual page for more information.
.It Ev NVIM_TUI_ENABLE_TRUE_COLOR
If defined, assume the host terminal supports 24 bit colors.
Has no effect in GUIs.

View File

@@ -26,15 +26,12 @@ foreach(DF ${DOCFILES})
list(APPEND BUILDDOCFILES ${GENERATED_RUNTIME_DIR}/doc/${F})
endforeach()
add_custom_command(OUTPUT ${BUILDDOCFILES}
COMMAND ${CMAKE_COMMAND} -E copy_directory
add_custom_command(OUTPUT copy_docfiles
COMMAND ${CMAKE_COMMAND} -E copy_directory
${PROJECT_SOURCE_DIR}/runtime/doc ${GENERATED_RUNTIME_DIR}/doc
DEPENDS
${DOCFILES})
)
add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
COMMAND ${CMAKE_COMMAND} -E copy_directory
${PROJECT_SOURCE_DIR}/runtime/doc ${GENERATED_RUNTIME_DIR}/doc
COMMAND "${PROJECT_BINARY_DIR}/bin/nvim"
-u NONE
-i NONE
@@ -43,7 +40,7 @@ add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
-c "helptags ++t ."
-c quit
DEPENDS
${BUILDDOCFILES}
copy_docfiles
nvim
WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}/doc"
)

View File

@@ -1,667 +0,0 @@
" ---------------------------------------------------------------------
" getscript.vim
" Author: Charles E. Campbell
" Date: Jan 21, 2014
" Version: 36
" Installing: :help glvs-install
" Usage: :help glvs
"
" GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim
"redraw!|call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" ---------------------------------------------------------------------
" Initialization: {{{1
" if you're sourcing this file, surely you can't be
" expecting vim to be in its vi-compatible mode!
if exists("g:loaded_getscript")
finish
endif
let g:loaded_getscript= "v36"
if &cp
echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
finish
endif
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of getscript needs vim 7.2"
echohl Normal
finish
endif
let s:keepcpo = &cpo
set cpo&vim
"DechoTabOn
" ---------------------------
" Global Variables: {{{1
" ---------------------------
" Cygwin Detection ------- {{{2
if !exists("g:getscript_cygwin")
if has("win32") || has("win95") || has("win64") || has("win16")
if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
let g:getscript_cygwin= 1
else
let g:getscript_cygwin= 0
endif
else
let g:getscript_cygwin= 0
endif
endif
" wget vs curl {{{2
if !exists("g:GetLatestVimScripts_wget")
if executable("wget")
let g:GetLatestVimScripts_wget= "wget"
elseif executable("curl")
let g:GetLatestVimScripts_wget= "curl"
else
let g:GetLatestVimScripts_wget = 'echo "GetLatestVimScripts needs wget or curl"'
let g:GetLatestVimScripts_options = ""
endif
endif
" options that wget and curl require:
if !exists("g:GetLatestVimScripts_options")
if g:GetLatestVimScripts_wget == "wget"
let g:GetLatestVimScripts_options= "-q -O"
elseif g:GetLatestVimScripts_wget == "curl"
let g:GetLatestVimScripts_options= "-s -O"
else
let g:GetLatestVimScripts_options= ""
endif
endif
" by default, allow autoinstall lines to work
if !exists("g:GetLatestVimScripts_allowautoinstall")
let g:GetLatestVimScripts_allowautoinstall= 1
endif
" set up default scriptaddr address
if !exists("g:GetLatestVimScripts_scriptaddr")
let g:GetLatestVimScripts_scriptaddr = 'http://vim.sourceforge.net/script.php?script_id='
endif
"" For debugging:
"let g:GetLatestVimScripts_wget = "echo"
"let g:GetLatestVimScripts_options = "options"
" ---------------------------------------------------------------------
" Check If AutoInstall Capable: {{{1
let s:autoinstall= ""
if g:GetLatestVimScripts_allowautoinstall
if (has("win32") || has("gui_win32") || has("gui_win32s") || has("win16") || has("win64") || has("win32unix") || has("win95")) && &shell != "bash"
" windows (but not cygwin/bash)
let s:dotvim= "vimfiles"
if !exists("g:GetLatestVimScripts_mv")
let g:GetLatestVimScripts_mv= "ren"
endif
else
" unix
let s:dotvim= ".vim"
if !exists("g:GetLatestVimScripts_mv")
let g:GetLatestVimScripts_mv= "mv"
endif
endif
if exists("g:GetLatestVimScripts_autoinstalldir") && isdirectory(g:GetLatestVimScripts_autoinstalldir)
let s:autoinstall= g:GetLatestVimScripts_autoinstalldir"
elseif exists('$HOME') && isdirectory(expand("$HOME")."/".s:dotvim)
let s:autoinstall= $HOME."/".s:dotvim
endif
" call Decho("s:autoinstall<".s:autoinstall.">")
"else "Decho
" call Decho("g:GetLatestVimScripts_allowautoinstall=".g:GetLatestVimScripts_allowautoinstall.": :AutoInstall: disabled")
endif
" ---------------------------------------------------------------------
" Public Interface: {{{1
com! -nargs=0 GetLatestVimScripts call getscript#GetLatestVimScripts()
com! -nargs=0 GetScript call getscript#GetLatestVimScripts()
silent! com -nargs=0 GLVS call getscript#GetLatestVimScripts()
" ---------------------------------------------------------------------
" GetLatestVimScripts: this function gets the latest versions of {{{1
" scripts based on the list in
" (first dir in runtimepath)/GetLatest/GetLatestVimScripts.dat
fun! getscript#GetLatestVimScripts()
" call Dfunc("GetLatestVimScripts() autoinstall<".s:autoinstall.">")
" insure that wget is executable
if executable(g:GetLatestVimScripts_wget) != 1
echoerr "GetLatestVimScripts needs ".g:GetLatestVimScripts_wget." which apparently is not available on your system"
" call Dret("GetLatestVimScripts : wget not executable/availble")
return
endif
" insure that fnameescape() is available
if !exists("*fnameescape")
echoerr "GetLatestVimScripts needs fnameescape() (provided by 7.1.299 or later)"
return
endif
" Find the .../GetLatest subdirectory under the runtimepath
for datadir in split(&rtp,',') + ['']
if isdirectory(datadir."/GetLatest")
" call Decho("found directory<".datadir.">")
let datadir= datadir . "/GetLatest"
break
endif
if filereadable(datadir."GetLatestVimScripts.dat")
" call Decho("found ".datadir."/GetLatestVimScripts.dat")
break
endif
endfor
" Sanity checks: readability and writability
if datadir == ""
echoerr 'Missing "GetLatest/" on your runtimepath - see :help glvs-dist-install'
" call Dret("GetLatestVimScripts : unable to find a GetLatest subdirectory")
return
endif
if filewritable(datadir) != 2
echoerr "(getLatestVimScripts) Your ".datadir." isn't writable"
" call Dret("GetLatestVimScripts : non-writable directory<".datadir.">")
return
endif
let datafile= datadir."/GetLatestVimScripts.dat"
if !filereadable(datafile)
echoerr "Your data file<".datafile."> isn't readable"
" call Dret("GetLatestVimScripts : non-readable datafile<".datafile.">")
return
endif
if !filewritable(datafile)
echoerr "Your data file<".datafile."> isn't writable"
" call Dret("GetLatestVimScripts : non-writable datafile<".datafile.">")
return
endif
" --------------------
" Passed sanity checks
" --------------------
" call Decho("datadir <".datadir.">")
" call Decho("datafile <".datafile.">")
" don't let any event handlers interfere (like winmanager's, taglist's, etc)
let eikeep = &ei
let hlskeep = &hls
let acdkeep = &acd
set ei=all hls&vim noacd
" Edit the datafile (ie. GetLatestVimScripts.dat):
" 1. record current directory (origdir),
" 2. change directory to datadir,
" 3. split window
" 4. edit datafile
let origdir= getcwd()
" call Decho("exe cd ".fnameescape(substitute(datadir,'\','/','ge')))
exe "cd ".fnameescape(substitute(datadir,'\','/','ge'))
split
" call Decho("exe e ".fnameescape(substitute(datafile,'\','/','ge')))
exe "e ".fnameescape(substitute(datafile,'\','/','ge'))
res 1000
let s:downloads = 0
let s:downerrors= 0
" Check on dependencies mentioned in plugins
" call Decho(" ")
" call Decho("searching plugins for GetLatestVimScripts dependencies")
let lastline = line("$")
" call Decho("lastline#".lastline)
let firstdir = substitute(&rtp,',.*$','','')
let plugins = split(globpath(firstdir,"plugin/**/*.vim"),'\n')
let plugins = plugins + split(globpath(firstdir,"AsNeeded/**/*.vim"),'\n')
let foundscript = 0
" this loop updates the GetLatestVimScripts.dat file
" with dependencies explicitly mentioned in the plugins
" via GetLatestVimScripts: ... lines
" It reads the plugin script at the end of the GetLatestVimScripts.dat
" file, examines it, and then removes it.
for plugin in plugins
" call Decho(" ")
" call Decho("plugin<".plugin.">")
" read plugin in
" evidently a :r creates a new buffer (the "#" buffer) that is subsequently unused -- bwiping it
$
" call Decho(".dependency checking<".plugin."> line$=".line("$"))
" call Decho("..exe silent r ".fnameescape(plugin))
exe "silent r ".fnameescape(plugin)
exe "silent bwipe ".bufnr("#")
while search('^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+','W') != 0
let depscript = substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+\s\+\(.*\)$','\1','e')
let depscriptid = substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\(\d\+\)\s\+.*$','\1','')
let llp1 = lastline+1
" call Decho("..depscript<".depscript.">")
" found a "GetLatestVimScripts: # #" line in the script;
" check if its already in the datafile by searching backwards from llp1,
" the (prior to reading in the plugin script) last line plus one of the GetLatestVimScripts.dat file,
" for the script-id with no wrapping allowed.
let curline = line(".")
let noai_script = substitute(depscript,'\s*:AutoInstall:\s*','','e')
exe llp1
let srchline = search('^\s*'.depscriptid.'\s\+\d\+\s\+.*$','bW')
if srchline == 0
" this second search is taken when, for example, a 0 0 scriptname is to be skipped over
let srchline= search('\<'.noai_script.'\>','bW')
endif
" call Decho("..noai_script<".noai_script."> depscriptid#".depscriptid." srchline#".srchline." curline#".line(".")." lastline#".lastline)
if srchline == 0
" found a new script to permanently include in the datafile
let keep_rega = @a
let @a = substitute(getline(curline),'^"\s\+GetLatestVimScripts:\s\+','','')
echomsg "Appending <".@a."> to ".datafile." for ".depscript
" call Decho("..Appending <".@a."> to ".datafile." for ".depscript)
exe lastline."put a"
let @a = keep_rega
let lastline = llp1
let curline = curline + 1
let foundscript = foundscript + 1
" else " Decho
" call Decho("..found <".noai_script."> (already in datafile at line#".srchline.")")
endif
let curline = curline + 1
exe curline
endwhile
" llp1: last line plus one
let llp1= lastline + 1
" call Decho(".deleting lines: ".llp1.",$d")
exe "silent! ".llp1.",$d"
endfor
" call Decho("--- end dependency checking loop --- foundscript=".foundscript)
" call Decho(" ")
" call Dredir("BUFFER TEST (GetLatestVimScripts 1)","ls!")
if foundscript == 0
setlocal nomod
endif
" --------------------------------------------------------------------
" Check on out-of-date scripts using GetLatest/GetLatestVimScripts.dat
" --------------------------------------------------------------------
" call Decho("begin: checking out-of-date scripts using datafile<".datafile.">")
setlocal lz
1
" /^-----/,$g/^\s*\d/call Decho(getline("."))
1
/^-----/,$g/^\s*\d/call s:GetOneScript()
" call Decho("--- end out-of-date checking --- ")
" Final report (an echomsg)
try
silent! ?^-------?
catch /^Vim\%((\a\+)\)\=:E114/
" call Dret("GetLatestVimScripts : nothing done!")
return
endtry
exe "norm! kz\<CR>"
redraw!
let s:msg = ""
if s:downloads == 1
let s:msg = "Downloaded one updated script to <".datadir.">"
elseif s:downloads == 2
let s:msg= "Downloaded two updated scripts to <".datadir.">"
elseif s:downloads > 1
let s:msg= "Downloaded ".s:downloads." updated scripts to <".datadir.">"
else
let s:msg= "Everything was already current"
endif
if s:downerrors > 0
let s:msg= s:msg." (".s:downerrors." downloading errors)"
endif
echomsg s:msg
" save the file
if &mod
silent! w!
endif
q!
" restore events and current directory
exe "cd ".fnameescape(substitute(origdir,'\','/','ge'))
let &ei = eikeep
let &hls = hlskeep
let &acd = acdkeep
setlocal nolz
" call Dredir("BUFFER TEST (GetLatestVimScripts 2)","ls!")
" call Dret("GetLatestVimScripts : did ".s:downloads." downloads")
endfun
" ---------------------------------------------------------------------
" GetOneScript: (Get Latest Vim Script) this function operates {{{1
" on the current line, interpreting two numbers and text as
" ScriptID, SourceID, and Filename.
" It downloads any scripts that have newer versions from vim.sourceforge.net.
fun! s:GetOneScript(...)
" call Dfunc("GetOneScript()")
" set options to allow progress to be shown on screen
let rega= @a
let t_ti= &t_ti
let t_te= &t_te
let rs = &rs
set t_ti= t_te= nors
" put current line on top-of-screen and interpret it into
" a script identifer : used to obtain webpage
" source identifier : used to identify current version
" and an associated comment: used to report on what's being considered
if a:0 >= 3
let scriptid = a:1
let srcid = a:2
let fname = a:3
let cmmnt = ""
" call Decho("scriptid<".scriptid.">")
" call Decho("srcid <".srcid.">")
" call Decho("fname <".fname.">")
else
let curline = getline(".")
if curline =~ '^\s*#'
let @a= rega
" call Dret("GetOneScript : skipping a pure comment line")
return
endif
let parsepat = '^\s*\(\d\+\)\s\+\(\d\+\)\s\+\(.\{-}\)\(\s*#.*\)\=$'
try
let scriptid = substitute(curline,parsepat,'\1','e')
catch /^Vim\%((\a\+)\)\=:E486/
let scriptid= 0
endtry
try
let srcid = substitute(curline,parsepat,'\2','e')
catch /^Vim\%((\a\+)\)\=:E486/
let srcid= 0
endtry
try
let fname= substitute(curline,parsepat,'\3','e')
catch /^Vim\%((\a\+)\)\=:E486/
let fname= ""
endtry
try
let cmmnt= substitute(curline,parsepat,'\4','e')
catch /^Vim\%((\a\+)\)\=:E486/
let cmmnt= ""
endtry
" call Decho("curline <".curline.">")
" call Decho("parsepat<".parsepat.">")
" call Decho("scriptid<".scriptid.">")
" call Decho("srcid <".srcid.">")
" call Decho("fname <".fname.">")
endif
" plugin author protection from downloading his/her own scripts atop their latest work
if scriptid == 0 || srcid == 0
" When looking for :AutoInstall: lines, skip scripts that have 0 0 scriptname
let @a= rega
" call Dret("GetOneScript : skipping a scriptid==srcid==0 line")
return
endif
let doautoinstall= 0
if fname =~ ":AutoInstall:"
" call Decho("case AutoInstall: fname<".fname.">")
let aicmmnt= substitute(fname,'\s\+:AutoInstall:\s\+',' ','')
" call Decho("aicmmnt<".aicmmnt."> s:autoinstall=".s:autoinstall)
if s:autoinstall != ""
let doautoinstall = g:GetLatestVimScripts_allowautoinstall
endif
else
let aicmmnt= fname
endif
" call Decho("aicmmnt<".aicmmnt.">: doautoinstall=".doautoinstall)
exe "norm z\<CR>"
redraw!
" call Decho('considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid)
echo 'considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid
" grab a copy of the plugin's vim.sourceforge.net webpage
let scriptaddr = g:GetLatestVimScripts_scriptaddr.scriptid
let tmpfile = tempname()
let v:errmsg = ""
" make up to three tries at downloading the description
let itry= 1
while itry <= 3
" call Decho(".try#".itry." to download description of <".aicmmnt."> with addr=".scriptaddr)
if has("win32") || has("win16") || has("win95")
" call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile).' '.shellescape(scriptaddr)."|bw!")
new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile).' '.shellescape(scriptaddr)|bw!
else
" call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile)." ".shellescape(scriptaddr))
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile)." ".shellescape(scriptaddr)
endif
if itry == 1
exe "silent vsplit ".fnameescape(tmpfile)
else
silent! e %
endif
setlocal bh=wipe
" find the latest source-id in the plugin's webpage
silent! 1
let findpkg= search('Click on the package to download','W')
if findpkg > 0
break
endif
let itry= itry + 1
endwhile
" call Decho(" --- end downloading tries while loop --- itry=".itry)
" testing: did finding "Click on the package..." fail?
if findpkg == 0 || itry >= 4
silent q!
call delete(tmpfile)
" restore options
let &t_ti = t_ti
let &t_te = t_te
let &rs = rs
let s:downerrors = s:downerrors + 1
" call Decho("***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">")
echomsg "***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">"
" call Dret("GetOneScript : srch for /Click on the package/ failed")
let @a= rega
return
endif
" call Decho('found "Click on the package to download"')
let findsrcid= search('src_id=','W')
if findsrcid == 0
silent q!
call delete(tmpfile)
" restore options
let &t_ti = t_ti
let &t_te = t_te
let &rs = rs
let s:downerrors = s:downerrors + 1
" call Decho("***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">")
echomsg "***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">"
let @a= rega
" call Dret("GetOneScript : srch for /src_id/ failed")
return
endif
" call Decho('found "src_id=" in description page')
let srcidpat = '^\s*<td class.*src_id=\(\d\+\)">\([^<]\+\)<.*$'
let latestsrcid= substitute(getline("."),srcidpat,'\1','')
let sname = substitute(getline("."),srcidpat,'\2','') " script name actually downloaded
" call Decho("srcidpat<".srcidpat."> latestsrcid<".latestsrcid."> sname<".sname.">")
silent q!
call delete(tmpfile)
" convert the strings-of-numbers into numbers
let srcid = srcid + 0
let latestsrcid = latestsrcid + 0
" call Decho("srcid=".srcid." latestsrcid=".latestsrcid." sname<".sname.">")
" has the plugin's most-recent srcid increased, which indicates that it has been updated
if latestsrcid > srcid
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."]: need to update <".sname.">")
let s:downloads= s:downloads + 1
if sname == bufname("%")
" GetLatestVimScript has to be careful about downloading itself
let sname= "NEW_".sname
endif
" -----------------------------------------------------------------------------
" the plugin has been updated since we last obtained it, so download a new copy
" -----------------------------------------------------------------------------
" call Decho(".downloading new <".sname.">")
echomsg ".downloading new <".sname.">"
if has("win32") || has("win16") || has("win95")
" call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='.latestsrcid)."|q")
new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='.latestsrcid)|q
else
" call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='))
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id=').latestsrcid
endif
" --------------------------------------------------------------------------
" AutoInstall: only if doautoinstall has been requested by the plugin itself
" --------------------------------------------------------------------------
" call Decho("checking if plugin requested autoinstall: doautoinstall=".doautoinstall)
if doautoinstall
" call Decho(" ")
" call Decho("Autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname))
if filereadable(sname)
" call Decho("<".sname."> is readable")
" call Decho("exe silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall))
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall)
let curdir = fnameescape(substitute(getcwd(),'\','/','ge'))
let installdir= curdir."/Installed"
if !isdirectory(installdir)
call mkdir(installdir)
endif
" call Decho("curdir<".curdir."> installdir<".installdir.">")
" call Decho("exe cd ".fnameescape(s:autoinstall))
exe "cd ".fnameescape(s:autoinstall)
" determine target directory for moves
let firstdir= substitute(&rtp,',.*$','','')
let pname = substitute(sname,'\..*','.vim','')
" call Decho("determine tgtdir: is <".firstdir.'/AsNeeded/'.pname." readable?")
if filereadable(firstdir.'/AsNeeded/'.pname)
let tgtdir= "AsNeeded"
else
let tgtdir= "plugin"
endif
" call Decho("tgtdir<".tgtdir."> pname<".pname.">")
" decompress
if sname =~ '\.bz2$'
" call Decho("decompress: attempt to bunzip2 ".sname)
exe "sil !bunzip2 ".shellescape(sname)
let sname= substitute(sname,'\.bz2$','','')
" call Decho("decompress: new sname<".sname."> after bunzip2")
elseif sname =~ '\.gz$'
" call Decho("decompress: attempt to gunzip ".sname)
exe "sil !gunzip ".shellescape(sname)
let sname= substitute(sname,'\.gz$','','')
" call Decho("decompress: new sname<".sname."> after gunzip")
elseif sname =~ '\.xz$'
" call Decho("decompress: attempt to unxz ".sname)
exe "sil !unxz ".shellescape(sname)
let sname= substitute(sname,'\.xz$','','')
" call Decho("decompress: new sname<".sname."> after unxz")
else
" call Decho("no decompression needed")
endif
" distribute archive(.zip, .tar, .vba, ...) contents
if sname =~ '\.zip$'
" call Decho("dearchive: attempt to unzip ".sname)
exe "silent !unzip -o ".shellescape(sname)
elseif sname =~ '\.tar$'
" call Decho("dearchive: attempt to untar ".sname)
exe "silent !tar -xvf ".shellescape(sname)
elseif sname =~ '\.tgz$'
" call Decho("dearchive: attempt to untar+gunzip ".sname)
exe "silent !tar -zxvf ".shellescape(sname)
elseif sname =~ '\.taz$'
" call Decho("dearchive: attempt to untar+uncompress ".sname)
exe "silent !tar -Zxvf ".shellescape(sname)
elseif sname =~ '\.tbz$'
" call Decho("dearchive: attempt to untar+bunzip2 ".sname)
exe "silent !tar -jxvf ".shellescape(sname)
elseif sname =~ '\.txz$'
" call Decho("dearchive: attempt to untar+xz ".sname)
exe "silent !tar -Jxvf ".shellescape(sname)
elseif sname =~ '\.vba$'
" call Decho("dearchive: attempt to handle a vimball: ".sname)
silent 1split
if exists("g:vimball_home")
let oldvimballhome= g:vimball_home
endif
let g:vimball_home= s:autoinstall
exe "silent e ".fnameescape(sname)
silent so %
silent q
if exists("oldvimballhome")
let g:vimball_home= oldvimballhome
else
unlet g:vimball_home
endif
else
" call Decho("no dearchiving needed")
endif
" ---------------------------------------------
" move plugin to plugin/ or AsNeeded/ directory
" ---------------------------------------------
if sname =~ '.vim$'
" call Decho("dearchive: attempt to simply move ".sname." to ".tgtdir)
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".tgtdir
else
" call Decho("dearchive: move <".sname."> to installdir<".installdir.">")
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".installdir
endif
if tgtdir != "plugin"
" call Decho("exe silent !".g:GetLatestVimScripts_mv." plugin/".shellescape(pname)." ".tgtdir)
exe "silent !".g:GetLatestVimScripts_mv." plugin/".shellescape(pname)." ".tgtdir
endif
" helptags step
let docdir= substitute(&rtp,',.*','','e')."/doc"
" call Decho("helptags: docdir<".docdir.">")
exe "helptags ".fnameescape(docdir)
exe "cd ".fnameescape(curdir)
endif
if fname !~ ':AutoInstall:'
let modline=scriptid." ".latestsrcid." :AutoInstall: ".fname.cmmnt
else
let modline=scriptid." ".latestsrcid." ".fname.cmmnt
endif
else
let modline=scriptid." ".latestsrcid." ".fname.cmmnt
endif
" update the data in the <GetLatestVimScripts.dat> file
call setline(line("."),modline)
" call Decho("update data in ".expand("%")."#".line(".").": modline<".modline.">")
" else " Decho
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."], no need to update")
endif
" restore options
let &t_ti = t_ti
let &t_te = t_te
let &rs = rs
let @a = rega
" call Dredir("BUFFER TEST (GetOneScript)","ls!")
" call Dret("GetOneScript")
endfun
" ---------------------------------------------------------------------
" Restore Options: {{{1
let &cpo= s:keepcpo
unlet s:keepcpo
" ---------------------------------------------------------------------
" Modelines: {{{1
" vim: ts=8 sts=2 fdm=marker nowrap

View File

@@ -75,7 +75,9 @@ function man#get_page(...) abort
setlocal modifiable
silent keepjumps norm! 1G"_dG
let $MANWIDTH = winwidth(0)
if empty($MANWIDTH)
let $MANWIDTH = winwidth(0)
endif
silent exec 'r!/usr/bin/man '.s:cmd(sect, page).' | col -b'
" Remove blank lines from top and bottom.
while getline(1) =~ '^\s*$'

View File

@@ -3,7 +3,7 @@
" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com )
" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" URL: https://github.com/shawncplus/phpcomplete.vim
" Last Change: 2014 Dec 01
" Last Change: 2015 Apr 02
"
" OPTIONS:
"
@@ -141,71 +141,80 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
if a:base != ""
let context = substitute(context, '\s*[$a-zA-Z_0-9\x7f-\xff]*$', '', '')
end
else
let context = ''
end
let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(getline(0, line('.')))
try
let winheight = winheight(0)
let winnr = winnr()
if context =~? '^use\s'
return phpcomplete#CompleteUse(a:base)
endif
let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(getline(0, line('.')))
if context =~ '\(->\|::\)$'
" {{{
" Get name of the class
let classname = phpcomplete#GetClassName(line('.'), context, current_namespace, imports)
if context =~? '^use\s' || context ==? 'use'
return phpcomplete#CompleteUse(a:base)
endif
" Get location of class definition, we have to iterate through all
if classname != ''
if classname =~ '\'
" split the last \ segment as a classname, everything else is the namespace
let classname_parts = split(classname, '\')
let namespace = join(classname_parts[0:-2], '\')
let classname = classname_parts[-1]
if context =~ '\(->\|::\)$'
" {{{
" Get name of the class
let classname = phpcomplete#GetClassName(line('.'), context, current_namespace, imports)
" Get location of class definition, we have to iterate through all
if classname != ''
if classname =~ '\'
" split the last \ segment as a classname, everything else is the namespace
let classname_parts = split(classname, '\')
let namespace = join(classname_parts[0:-2], '\')
let classname = classname_parts[-1]
else
let namespace = '\'
endif
let classlocation = phpcomplete#GetClassLocation(classname, namespace)
else
let namespace = '\'
let classlocation = ''
endif
let classlocation = phpcomplete#GetClassLocation(classname, namespace)
if classlocation != ''
if classlocation == 'VIMPHP_BUILTINOBJECT' && has_key(g:php_builtin_classes, tolower(classname))
return phpcomplete#CompleteBuiltInClass(context, classname, a:base)
endif
if filereadable(classlocation)
let classfile = readfile(classlocation)
let classcontent = ''
let classcontent .= "\n".phpcomplete#GetClassContents(classlocation, classname)
let sccontent = split(classcontent, "\n")
let visibility = expand('%:p') == fnamemodify(classlocation, ':p') ? 'private' : 'public'
return phpcomplete#CompleteUserClass(context, a:base, sccontent, visibility)
endif
endif
return phpcomplete#CompleteUnknownClass(a:base, context)
" }}}
elseif context =~? 'implements'
return phpcomplete#CompleteClassName(a:base, ['i'], current_namespace, imports)
elseif context =~? 'extends\s\+.\+$' && a:base == ''
return ['implements']
elseif context =~? 'extends'
let kinds = context =~? 'class\s' ? ['c'] : ['i']
return phpcomplete#CompleteClassName(a:base, kinds, current_namespace, imports)
elseif context =~? 'class [a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
" special case when you've typed the class keyword and the name too, only extends and implements allowed there
return filter(['extends', 'implements'], 'stridx(v:val, a:base) == 0')
elseif context =~? 'new'
return phpcomplete#CompleteClassName(a:base, ['c'], current_namespace, imports)
endif
if a:base =~ '^\$'
return phpcomplete#CompleteVariable(a:base)
else
let classlocation = ''
return phpcomplete#CompleteGeneral(a:base, current_namespace, imports)
endif
if classlocation != ''
if classlocation == 'VIMPHP_BUILTINOBJECT' && has_key(g:php_builtin_classes, tolower(classname))
return phpcomplete#CompleteBuiltInClass(context, classname, a:base)
endif
if filereadable(classlocation)
let classfile = readfile(classlocation)
let classcontent = ''
let classcontent .= "\n".phpcomplete#GetClassContents(classlocation, classname)
let sccontent = split(classcontent, "\n")
let visibility = expand('%:p') == fnamemodify(classlocation, ':p') ? 'private' : 'public'
return phpcomplete#CompleteUserClass(context, a:base, sccontent, visibility)
endif
endif
return phpcomplete#CompleteUnknownClass(a:base, context)
" }}}
elseif context =~? 'implements'
return phpcomplete#CompleteClassName(a:base, ['i'], current_namespace, imports)
elseif context =~? 'extends\s\+.\+$'
return ['implements']
elseif context =~? 'extends'
let kinds = context =~? 'class\s' ? ['c'] : ['i']
return phpcomplete#CompleteClassName(a:base, kinds, current_namespace, imports)
elseif context =~? 'class [a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
" special case when you've typed the class keyword and the name too, only extends and implements allowed there
return filter(['extends', 'implements'], 'stridx(v:val, a:base) == 0')
elseif context =~? 'new'
return phpcomplete#CompleteClassName(a:base, ['c'], current_namespace, imports)
endif
if a:base =~ '^\$'
return phpcomplete#CompleteVariable(a:base)
else
return phpcomplete#CompleteGeneral(a:base, current_namespace, imports)
endif
finally
silent! exec winnr.'resize '.winheight
endtry
endfunction
" }}}
@@ -244,12 +253,13 @@ function! phpcomplete#CompleteUse(base) " {{{
if has_key(tag, 'namespace')
let patched_ctags_detected = 1
endif
if tag.kind ==? 'n' && tag.name =~? '^'.namespace_match_pattern
let patched_ctags_detected = 1
call add(namespaced_matches, {'word': tag.name, 'kind': 'n', 'menu': tag.filename, 'info': tag.filename })
elseif has_key(tag, 'namespace') && (tag.kind ==? 'c' || tag.kind ==? 'i') && tag.namespace ==? namespace_for_class
elseif has_key(tag, 'namespace') && (tag.kind ==? 'c' || tag.kind ==? 'i' || tag.kind ==? 't') && tag.namespace ==? namespace_for_class
call add(namespaced_matches, {'word': namespace_for_class.'\'.tag.name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
elseif (tag.kind ==? 'c' || tag.kind ==? 'i')
elseif (tag.kind ==? 'c' || tag.kind ==? 'i' || tag.kind ==? 't')
call add(no_namespace_matches, {'word': namespace_for_class.'\'.tag.name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
endif
endfor
@@ -272,6 +282,10 @@ function! phpcomplete#CompleteUse(base) " {{{
endfor
endif
for comp in res
let comp.word = substitute(comp.word, '^\\', '', '')
endfor
return res
endfunction
" }}}
@@ -326,6 +340,7 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
let ext_functions = {}
let ext_constants = {}
let ext_classes = {}
let ext_traits = {}
let ext_interfaces = {}
let ext_namespaces = {}
@@ -420,7 +435,7 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
endif
endif
endif
elseif tag.kind ==? 'c' || tag.kind ==? 'i'
elseif tag.kind ==? 'c' || tag.kind ==? 'i' || tag.kind ==? 't'
let info = ' - '.tag.filename
let key = ''
@@ -441,6 +456,8 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
let ext_classes[key] = info
elseif tag.kind ==? 'i'
let ext_interfaces[key] = info
elseif tag.kind ==? 't'
let ext_traits[key] = info
endif
endif
endif
@@ -463,7 +480,7 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
endfor
for [interfacename, info] in items(g:php_builtin_interfacenames)
if interfacename =~? '^'.base
let builtin_interfaces[leading_slash.interfacename] = info
let builtin_interfaces[leading_slash.g:php_builtin_interfaces[tolower(interfacename)].name] = info
endif
endfor
endif
@@ -511,6 +528,8 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
else
let ext_interfaces[imported_name] = ' '.import.name.' - '.import.filename
endif
elseif import.kind ==? 't'
let ext_traits[imported_name] = ' '.import.name.' - '.import.filename
endif
" no builtin interfaces
@@ -540,6 +559,9 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
" Add external interfaces
call extend(all_values, ext_interfaces)
" Add external traits
call extend(all_values, ext_traits)
" Add built-in classes
call extend(all_values, builtin_classnames)
@@ -566,6 +588,8 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
elseif has_key(ext_interfaces, i) || has_key(builtin_interfaces, i)
let info = has_key(ext_interfaces, i) ? ext_interfaces[i] : builtin_interfaces[i].' - builtin'
let final_list += [{'word':i, 'kind': 'i', 'menu': info, 'info': i.info}]
elseif has_key(ext_traits, i)
let final_list += [{'word':i, 'kind': 't', 'menu': ext_traits[i], 'info': ext_traits[i]}]
elseif has_key(int_constants, i) || has_key(builtin_constants, i)
let info = has_key(int_constants, i) ? int_constants[i] : ' - builtin'
let final_list += [{'word':i, 'kind': 'd', 'menu': info, 'info': i.info}]
@@ -784,7 +808,7 @@ function! phpcomplete#CompleteClassName(base, kinds, current_namespace, imports)
let tags = []
if len(tag_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion
let tags = phpcomplete#GetTaglist('^'.tag_match_pattern)
let tags = phpcomplete#GetTaglist('^\c'.tag_match_pattern)
endif
if len(tags)
@@ -861,6 +885,39 @@ function! phpcomplete#CompareCompletionRow(i1, i2) " {{{
endfunction
" }}}
function! s:getNextCharWithPos(filelines, current_pos) " {{{
let line_no = a:current_pos[0]
let col_no = a:current_pos[1]
let last_line = a:filelines[len(a:filelines) - 1]
let end_pos = [len(a:filelines) - 1, strlen(last_line) - 1]
if line_no > end_pos[0] || line_no == end_pos[0] && col_no > end_pos[1]
return ['EOF', 'EOF']
endif
" we've not reached the end of the current line break
if col_no + 1 < strlen(a:filelines[line_no])
let col_no += 1
else
" we've reached the end of the current line, jump to the next
" non-blank line (blank lines have no position where we can read from,
" not even a whitespace. The newline char does not positionable by vim
let line_no += 1
while strlen(a:filelines[line_no]) == 0
let line_no += 1
endwhile
let col_no = 0
endif
" return 'EOF' string to signal end of file, normal results only one char
" in length
if line_no == end_pos[0] && col_no > end_pos[1]
return ['EOF', 'EOF']
endif
return [[line_no, col_no], a:filelines[line_no][col_no]]
endfunction " }}}
function! phpcomplete#EvaluateModifiers(modifiers, required_modifiers, prohibited_modifiers) " {{{
" if theres no modifier, and no modifier is allowed and no modifier is required
if len(a:modifiers) == 0 && len(a:required_modifiers) == 0
@@ -1475,21 +1532,19 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
return ''
endif
if line =~? '\v^\s*(abstract\s+|final\s+)*\s*class'
let class_name = matchstr(line, '\c\s*class\s*\zs'.class_name_pattern.'\ze')
if line =~? '\v^\s*(abstract\s+|final\s+)*\s*class\s'
let class_name = matchstr(line, '\cclass\s\+\zs'.class_name_pattern.'\ze')
let extended_class = matchstr(line, '\cclass\s\+'.class_name_pattern.'\s\+extends\s\+\zs'.class_name_pattern.'\ze')
let classname_candidate = a:context =~? 'parent::' ? extended_class : class_name
else
let i += 1
continue
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
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
let i += 1
endwhile
elseif a:context =~? '(\s*new\s\+'.class_name_pattern.'\s*)->'
let classname_candidate = matchstr(a:context, '\cnew\s\+\zs'.class_name_pattern.'\ze')
@@ -1602,26 +1657,26 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
endif
endif
" in-file lookup for typehinted function arguments
" - the function can have a name or be anonymous (e.g., function qux() { ... } vs. function () { ... })
" - the type-hinted argument can be anywhere in the arguments list.
if line =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*(.\{-}'.class_name_pattern.'\s\+'.object && !object_is_array
let f_args = matchstr(line, '\cfunction\(\s\+'.function_name_pattern.'\)\?\s*(\zs.\{-}\ze)')
let args = split(f_args, '\s*\zs,\ze\s*')
for arg in args
if arg =~# object.'\(,\|$\)'
let classname_candidate = matchstr(arg, '\s*\zs'.class_name_pattern.'\ze\s\+'.object)
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
" function declaration line
if line =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*('
let function_lines = join(reverse(lines), " ")
" search for type hinted arguments
if function_lines =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*(.\{-}'.class_name_pattern.'\s\+'.object && !object_is_array
let f_args = matchstr(function_lines, '\cfunction\(\s\+'.function_name_pattern.'\)\?\s*(\zs.\{-}\ze)')
let args = split(f_args, '\s*\zs,\ze\s*')
for arg in args
if arg =~# object.'\(,\|$\)'
let classname_candidate = matchstr(arg, '\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
if classname_candidate != ''
break
endif
endfor
if classname_candidate != ''
break
endif
endif
" if we see a function declaration, try loading the docblock for it and look for matching @params
if line =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*(.\{-}'.object
" search for docblock for the function
let match_line = substitute(line, '\\', '\\\\', 'g')
let sccontent = getline(0, a:start_line - i)
let doc_str = phpcomplete#GetDocBlock(sccontent, match_line)
@@ -1641,13 +1696,14 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
endif
" assignment for the variable in question with a variable on the right hand side
if line =~# '^\s*'.object.'\s*=&\?\s*'.variable_name_pattern
if line =~# '^\s*'.object.'\s*=&\?\s\+\(clone\)\?\s*'.variable_name_pattern
" try to find the next non-comment or string ";" char
let start_col = match(line, '^\s*'.object.'\C\s*=\zs&\?\s*'.variable_name_pattern)
let start_col = match(line, '^\s*'.object.'\C\s*=\zs&\?\s\+\(clone\)\?\s*'.variable_name_pattern)
let filelines = reverse(lines)
let [pos, char] = s:getNextCharWithPos(filelines, [a:start_line - i - 1, start_col])
let chars_read = 1
let last_pos = pos
" read while end of the file
while char != 'EOF' && chars_read < 1000
let last_pos = pos
@@ -1689,6 +1745,7 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
let filelines = reverse(lines)
let [pos, char] = s:getNextCharWithPos(filelines, [a:start_line - i - 1, start_col])
let chars_read = 1
let last_pos = pos
" read while end of the file
while char != 'EOF' && chars_read < 1000
let last_pos = pos
@@ -1819,7 +1876,7 @@ function! phpcomplete#GetClassLocation(classname, namespace) " {{{
let i = 1
while i < line('.')
let line = getline(line('.')-i)
if line =~? '^\s*\(abstract\s\+\|final\s\+\)*\s*class\s*'.a:classname.'\(\s\+\|$\)' && tolower(current_namespace) == search_namespace
if line =~? '^\s*\(abstract\s\+\|final\s\+\)*\s*\(class\|interface\|trait\)\s*'.a:classname.'\(\s\+\|$\)' && tolower(current_namespace) == search_namespace
return expand('%:p')
else
let i += 1
@@ -1831,7 +1888,9 @@ function! phpcomplete#GetClassLocation(classname, namespace) " {{{
let no_namespace_candidate = ''
let tags = phpcomplete#GetTaglist('^'.a:classname.'$')
for tag in tags
if tag.kind == 'c' || tag.kind == 'i'
" We'll allow interfaces and traits to be handled classes since you
" can't have colliding names with different kinds anyway
if tag.kind == 'c' || tag.kind == 'i' || tag.kind == 't'
if !has_key(tag, 'namespace')
let no_namespace_candidate = tag.filename
else
@@ -1981,7 +2040,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('\c\(class\|interface\|trait\)\_s\+'.a:class_name.'\(\>\|$\)')
let cfline = line('.')
call search('{')
let endline = line('.')
@@ -1994,8 +2053,48 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
let extends_class = ''
endif
call searchpair('{', '', '}', 'W')
let classcontent = join(getline(cfline, line('.')), "\n")
let class_closing_bracket_line = line('.')
let classcontent = join(getline(cfline, class_closing_bracket_line), "\n")
let used_traits = []
" move back to the line next to the class's definition
call cursor(endline + 1, 1)
let keep_searching = 1
while keep_searching != 0
" try to grab "use..." keywords
let [lnum, col] = searchpos('\c^\s\+use\s\+'.class_name_pattern, 'cW', class_closing_bracket_line)
let syn_name = synIDattr(synID(lnum, col, 0), "name")
if syn_name =~? 'string\|comment'
call cursor(lnum + 1, 1)
continue
endif
let trait_line = getline(lnum)
if trait_line !~? ';'
" try to find the next line containing ';'
let l = lnum
let search_line = trait_line
" add lines from the file until theres no ';' in them
while search_line !~? ';' && l > 0
" file lines are reversed so we need to go backwards
let l += 1
let search_line = getline(l)
let trait_line .= ' '.substitute(search_line, '\(^\s\+\|\s\+$\)', '', 'g')
endwhile
endif
let use_expression = matchstr(trait_line, '^\s*use\s\+\zs.\{-}\ze;')
let use_parts = map(split(use_expression, '\s*,\s*'), 'substitute(v:val, "\\s+", " ", "g")')
let used_traits += map(use_parts, 'substitute(v:val, "\\s", "", "g")')
call cursor(lnum + 1, 1)
if [lnum, col] == [0, 0]
let keep_searching = 0
endif
endwhile
silent! bw! %
let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(a:file_lines[0:cfline])
" go back to original window
exe phpcomplete_original_window.'wincmd w'
@@ -2008,21 +2107,27 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
\ 'mtime': getftime(full_file_path),
\ })
let all_extends = used_traits
if extends_class != ''
let [extends_class, namespace] = phpcomplete#ExpandClassName(extends_class, current_namespace, imports)
if namespace == ''
let namespace = '\'
endif
let classlocation = phpcomplete#GetClassLocation(extends_class, namespace)
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)
" try to find the declaration in the same file.
let result += phpcomplete#GetClassContentsStructure(full_file_path, a:file_lines, extends_class)
endif
call add(all_extends, extends_class)
endif
if len(all_extends) > 0
for class in all_extends
let [class, namespace] = phpcomplete#ExpandClassName(class, current_namespace, imports)
if namespace == ''
let namespace = '\'
endif
let classlocation = phpcomplete#GetClassLocation(class, namespace)
if classlocation == "VIMPHP_BUILTINOBJECT"
let result += [phpcomplete#GenerateBuiltinClassStub(g:php_builtin_classes[tolower(class)])]
elseif classlocation != '' && filereadable(classlocation)
let full_file_path = fnamemodify(classlocation, ':p')
let result += phpcomplete#GetClassContentsStructure(full_file_path, readfile(full_file_path), class)
elseif tolower(current_namespace) == tolower(namespace)
" try to find the declaration in the same file.
let result += phpcomplete#GetClassContentsStructure(full_file_path, a:file_lines, class)
endif
endfor
endif
return result
@@ -2270,19 +2375,40 @@ endfunction!
" }}}
function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
let original_window = winnr()
silent! below 1new
silent! 0put =a:file_lines
normal! G
" clear out classes, functions and other blocks
while 1
let block_start_pos = searchpos('\c\(class\|trait\|function\|interface\)\s\+\_.\{-}\zs{', 'Web')
if block_start_pos == [0, 0]
break
endif
let block_end_pos = searchpairpos('{', '', '}\|\%$', 'W', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')
silent! exec block_start_pos[0].','.block_end_pos[0].'d'
endwhile
normal! G
" grab the remains
let file_lines = reverse(getline(1, line('.') - 1))
silent! bw! %
exe original_window.'wincmd w'
let namespace_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
let file_lines = reverse(copy(a:file_lines))
let i = 0
let file_length = len(file_lines)
let imports = {}
let current_namespace = '\'
while i < file_length
let line = file_lines[i]
if line =~? '^\s*namespace\s*'.namespace_name_pattern
let current_namespace = matchstr(line, '^\s*namespace\s*\zs'.namespace_name_pattern.'\ze')
let current_namespace = matchstr(line, '\c^\s*namespace\s*\zs'.namespace_name_pattern.'\ze')
break
endif
@@ -2303,11 +2429,11 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
let use_line .= ' '.substitute(search_line, '\(^\s\+\|\s\+$\)', '', 'g')
endwhile
endif
let use_expression = matchstr(use_line, '^\s*use\s\+\zs.\{-}\ze;')
let use_expression = matchstr(use_line, '^\c\s*use\s\+\zs.\{-}\ze;')
let use_parts = map(split(use_expression, '\s*,\s*'), 'substitute(v:val, "\\s+", " ", "g")')
for part in use_parts
if part =~? '\s\+as\s\+'
let [object, name] = split(part, '\s\+as\s\+')
let [object, name] = split(part, '\s\+as\s\+\c')
let object = substitute(object, '^\\', '', '')
let name = substitute(name, '^\\', '', '')
else
@@ -2343,7 +2469,7 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
break
endif
" if the name matches with the extracted classname and namespace
if (tag.kind == 'c' || tag.kind == 'i') && tag.name == classname
if (tag.kind == 'c' || tag.kind == 'i' || tag.kind == 't') && tag.name == classname
if has_key(tag, 'namespace')
let patched_ctags_detected = 1
if tag.namespace == namespace_for_classes
@@ -2386,7 +2512,7 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
let tags = phpcomplete#GetTaglist('^'.import['name'].'$')
for tag in tags
" search for the first matchin namespace, class, interface with no namespace
if !has_key(tag, 'namespace') && (tag.kind == 'n' || tag.kind == 'c' || tag.kind == 'i')
if !has_key(tag, 'namespace') && (tag.kind == 'n' || tag.kind == 'c' || tag.kind == 'i' || tag.kind == 't')
call extend(import, tag)
let import['builtin'] = 0
break

View File

@@ -37,16 +37,16 @@ if executable('pbcopy')
let s:copy['*'] = s:copy['+']
let s:paste['*'] = s:paste['+']
let s:cache_enabled = 0
elseif executable('xclip')
let s:copy['+'] = 'xclip -quiet -i -selection clipboard'
let s:paste['+'] = 'xclip -o -selection clipboard'
let s:copy['*'] = 'xclip -quiet -i -selection primary'
let s:paste['*'] = 'xclip -o -selection primary'
elseif executable('xsel')
elseif exists('$DISPLAY') && executable('xsel')
let s:copy['+'] = 'xsel --nodetach -i -b'
let s:paste['+'] = 'xsel -o -b'
let s:copy['*'] = 'xsel --nodetach -i -p'
let s:paste['*'] = 'xsel -o -p'
elseif exists('$DISPLAY') && executable('xclip')
let s:copy['+'] = 'xclip -quiet -i -selection clipboard'
let s:paste['+'] = 'xclip -o -selection clipboard'
let s:copy['*'] = 'xclip -quiet -i -selection primary'
let s:paste['*'] = 'xclip -o -selection primary'
else
echom 'clipboard: No clipboard tool available. See :help nvim-clipboard'
finish
@@ -83,6 +83,7 @@ function! s:clipboard.set(lines, regtype, reg)
end
let selection.data = [a:lines, a:regtype]
let argv = split(s:copy[a:reg], " ")
let selection.detach = s:cache_enabled
let jobid = jobstart(argv, selection)
if jobid <= 0
echohl WarningMsg

View File

@@ -1,5 +1,6 @@
"""Legacy python/python3-vim emulation."""
import imp
import io
import logging
import os
import sys
@@ -151,7 +152,7 @@ class ScriptHost(object):
current.range = current.buffer.range(start, stop)
class RedirectStream(object):
class RedirectStream(io.IOBase):
def __init__(self, redirect_handler):
self.redirect_handler = redirect_handler
@@ -161,9 +162,6 @@ class RedirectStream(object):
def writelines(self, seq):
self.redirect_handler('\n'.join(seq))
def flush(self):
pass
class LegacyEvalHook(neovim.SessionHook):

View File

@@ -168,10 +168,15 @@ function! s:UpdateRemotePlugins()
let hosts = keys(s:hosts)
for host in hosts
if has_key(s:plugin_patterns, host)
let commands = commands
\ + ['" '.host.' plugins']
\ + s:RegistrationCommands(host)
\ + ['', '']
try
let commands +=
\ ['" '.host.' plugins']
\ + s:RegistrationCommands(host)
\ + ['', '']
catch
echomsg v:throwpoint
echomsg v:exception
endtry
endif
endfor
call writefile(commands, s:remote_plugins_manifest)
@@ -212,9 +217,11 @@ function! s:RequirePythonHost(host)
return channel_id
endif
catch
echomsg v:throwpoint
echomsg v:exception
endtry
throw 'Failed to load Python host. You can try to see what happened '.
throw 'Failed to load '. a:host.orig_name . ' host. '.
\ 'You can try to see what happened '.
\ 'by starting Neovim with the environment variable '.
\ '$NVIM_PYTHON_LOG_FILE set to a file and opening '.
\ 'the generated log file. Also, the host stderr will be available '.

View File

@@ -251,13 +251,14 @@ endfunction
" Tutor Cmd: {{{1
function! s:Locale()
let l:lang = ""
if exists('v:lang') && v:lang =~ '\a\a'
let l:lang = v:lang
elseif $LC_ALL =~ '\a\a'
let l:lang = $LC_ALL
elseif $LANG =~ '\a\a'
let l:lang = $LANG
else
let l:lang = 'en_US'
endif
return split(l:lang, '_')
endfunction

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 7.4. Last change: 2014 Sep 23
*autocmd.txt* For Vim version 7.4. Last change: 2015 Mar 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -258,6 +258,7 @@ Name triggered by ~
|Syntax| when the 'syntax' option has been set
|EncodingChanged| after the 'encoding' option has been changed
|TermChanged| after the value of 'term' has changed
|OptionSet| after setting any option
Startup and exit
|VimEnter| after doing all the startup stuff
@@ -745,6 +746,24 @@ MenuPopup Just before showing the popup menu (under the
o Operator-pending
i Insert
c Command line
*OptionSet*
OptionSet After setting an option. The pattern is
matched against the long option name.
The |v:option_old| variable indicates the
old option value, |v:option_new| variable
indicates the newly set value, the
|v:option_type| variable indicates whether
it's global or local scoped and |<amatch>|
indicates what option has been set.
Note: It's a bad idea, to reset an option
during this autocommand, since this will
probably break plugins. You can always use
|:noa| to prevent triggering this autocommand.
Could be used, to check for existence of the
'backupdir' and 'undodir' options and create
directories, if they don't exist yet.
*QuickFixCmdPre*
QuickFixCmdPre Before a quickfix command is run (|:make|,
|:lmake|, |:grep|, |:lgrep|, |:grepadd|,
@@ -954,6 +973,13 @@ WinLeave Before leaving a window. If the window to be
==============================================================================
6. Patterns *autocmd-patterns* *{pat}*
The {pat} argument can be a comma separated list. This works as if the
command was given with each pattern separately. Thus this command: >
:autocmd BufRead *.txt,*.info set et
Is equivalent to: >
:autocmd BufRead *.txt set et
:autocmd BufRead *.info set et
The file pattern {pat} is tested for a match against the file name in one of
two ways:
1. When there is no '/' in the pattern, Vim checks for a match against only
@@ -1022,7 +1048,7 @@ The pattern is interpreted like mostly used in file names:
[^ch] match any character but 'c' and 'h'
Note that for all systems the '/' character is used for path separator (even
MS-DOS). This was done because the backslash is difficult to use in a pattern
Windows). This was done because the backslash is difficult to use in a pattern
and to make the autocommands portable across different systems.
*autocmd-changes*

View File

@@ -1,4 +1,4 @@
*change.txt* For Vim version 7.4. Last change: 2014 Jun 26
*change.txt* For Vim version 7.4. Last change: 2015 Feb 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -370,9 +370,14 @@ CTRL-A Add [count] to the number or alphabetic character at
CTRL-X Subtract [count] from the number or alphabetic
character at or after the cursor.
The CTRL-A and CTRL-X commands work for (signed) decimal numbers, unsigned
octal and hexadecimal numbers and alphabetic characters. This depends on the
'nrformats' option.
The CTRL-A and CTRL-X commands can work for:
- signed and unsigned decimal numbers
- unsigned binary, octal and hexadecimal numbers
- alphabetic characters
This depends on the 'nrformats' option:
- When 'nrformats' includes "bin", Vim assumes numbers starting with '0b' or
'0B' are binary.
- When 'nrformats' includes "octal", Vim considers numbers starting with a '0'
to be octal, unless the number includes a '8' or '9'. Other numbers are
decimal and may have a preceding minus sign.
@@ -386,6 +391,10 @@ octal and hexadecimal numbers and alphabetic characters. This depends on the
under or after the cursor. This is useful to make lists with an alphabetic
index.
For decimals a leading negative sign is considered for incrementing or
decrementing, for binary and octal and hex values, it won't be considered. To
ignore the sign Visually select the number before using CTRL-A or CTRL-X.
For numbers with leading zeros (including all octal and hexadecimal numbers),
Vim preserves the number of characters in the number when possible. CTRL-A on
"0077" results in "0100", CTRL-X on "0x100" results in "0x0ff".
@@ -397,6 +406,10 @@ octal number.
Note that when 'nrformats' includes "octal", decimal numbers with leading
zeros cause mistakes, because they can be confused with octal numbers.
Note similarly, when 'nrformats' includes "bin", binary numbers with a leading
'0x' or '0X' can be interpreted as hexadecimal rather than binary since '0b'
are valid hexadecimal digits.
The CTRL-A command is very useful in a macro. Example: Use the following
steps to make a numbered list.
@@ -832,13 +845,13 @@ This replaces each 'E' character with a euro sign. Read more in |<Char->|.
:promptf[ind] [string]
Put up a Search dialog. When [string] is given, it is
used as the initial search string.
{only for Win32, Motif and GTK GUI}
{only for Win32 GUI}
*:promptr* *:promptrepl*
:promptr[epl] [string]
Put up a Search/Replace dialog. When [string] is
given, it is used as the initial search string.
{only for Win32, Motif and GTK GUI}
{only for Win32 GUI}
4.4 Changing tabs *change-tabs*
@@ -1063,11 +1076,12 @@ There are nine types of registers: *registers* *E354*
2. 10 numbered registers "0 to "9
3. The small delete register "-
4. 26 named registers "a to "z or "A to "Z
5. four read-only registers ":, "., "% and "#
6. the expression register "=
7. The selection and drop registers "*, "+ and "~
8. The black hole register "_
9. Last search pattern register "/
5. three read-only registers ":, "., "%
6. alternate buffer register "#
7. the expression register "=
8. The selection and drop registers "*, "+ and "~
9. The black hole register "_
10. Last search pattern register "/
1. Unnamed register "" *quote_quote* *quotequote*
Vim fills this register with text deleted with the "d", "c", "s", "x" commands
@@ -1109,7 +1123,7 @@ letters to replace their previous contents or as uppercase letters to append
to their previous contents. When the '>' flag is present in 'cpoptions' then
a line break is inserted before the appended text.
5. Read-only registers ":, "., "% and "#
5. Read-only registers ":, ". and "%
These are '%', '#', ':' and '.'. You can use them only with the "p", "P",
and ":put" commands and with CTRL-R.
*quote_.* *quote.* *E29*
@@ -1120,8 +1134,6 @@ and ":put" commands and with CTRL-R.
('textwidth' and other options affect what is inserted).
*quote_%* *quote%*
"% Contains the name of the current file.
*quote_#* *quote#*
"# Contains the name of the alternate file.
*quote_:* *quote:* *E30*
": Contains the most recent executed command-line. Example: Use
"@:" to repeat the previous command-line command.
@@ -1129,15 +1141,33 @@ and ":put" commands and with CTRL-R.
one character of it was typed. Thus it remains unchanged if
the command was completely from a mapping.
6. Expression register "= *quote_=* *quote=* *@=*
*quote_#* *quote#*
6. Alternate file register "#
Contains the name of the alternate file for the current window. It will
change how the |CTRL-^| command works.
This register is writable, mainly to allow for restoring it after a plugin has
changed it. It accepts buffer number: >
let altbuf = bufnr(@#)
...
let @# = altbuf
It will give error |E86| if you pass buffer number and this buffer does not
exist.
It can also accept a match with an existing buffer name: >
let @# = 'buffer_name'
Error |E93| if there is more than one buffer matching the given name or |E94|
if none of buffers matches the given name.
7. Expression register "= *quote_=* *quote=* *@=*
This is not really a register that stores text, but is a way to use an
expression in commands which use a register. The expression register is
read-only; you cannot put text into it. After the '=', the cursor moves to
the command-line, where you can enter any expression (see |expression|). All
normal command-line editing commands are available, including a special
history for expressions. When you end the command-line by typing <CR>, Vim
computes the result of the expression. If you end it with <Esc>, Vim abandons
the expression. If you do not enter an expression, Vim uses the previous
read-write.
When typing the '=' after " or CTRL-R the cursor moves to the command-line,
where you can enter any expression (see |expression|). All normal
command-line editing commands are available, including a special history for
expressions. When you end the command-line by typing <CR>, Vim computes the
result of the expression. If you end it with <Esc>, Vim abandons the
expression. If you do not enter an expression, Vim uses the previous
expression (like with the "/" command).
The expression must evaluate to a String. A Number is always automatically
@@ -1150,35 +1180,23 @@ If the "= register is used for the "p" command, the String is split up at <NL>
characters. If the String ends in a <NL>, it is regarded as a linewise
register.
7. Selection and drop registers "*, "+ and "~
8. Selection and drop registers "*, "+ and "~
Use these registers for storing and retrieving the selected text for the GUI.
See |quotestar| and |quoteplus|. When the clipboard is not available or not
working, the unnamed register is used instead. For Unix systems and Mac OS X,
see |nvim-clipboard|.
*quote_~* *quote~* *<Drop>*
The read-only "~ register stores the dropped text from the last drag'n'drop
operation. When something has been dropped onto Vim, the "~ register is
filled in and the <Drop> pseudo key is sent for notification. You can remap
this key if you want; the default action (for all modes) is to insert the
contents of the "~ register at the cursor position.
{only available when compiled with the |+dnd| feature, currently only with the
GTK GUI}
Note: The "~ register is only used when dropping plain text onto Vim.
Drag'n'drop of URI lists is handled internally.
8. Black hole register "_ *quote_*
9. Black hole register "_ *quote_*
When writing to this register, nothing happens. This can be used to delete
text without affecting the normal registers. When reading from this register,
nothing is returned.
9. Last search pattern register "/ *quote_/* *quote/*
10. Last search pattern register "/ *quote_/* *quote/*
Contains the most recent search-pattern. This is used for "n" and 'hlsearch'.
It is writable with `:let`, you can change it to have 'hlsearch' highlight
other matches without actually searching. You can't yank or delete into this
register. The search direction is available in |v:searchforward|.
Note that the valued is restored when returning from a function
Note that the value is restored when returning from a function
|function-search-undo|.
*@/*
@@ -1390,10 +1408,10 @@ When you hit Return in a C-comment, Vim will insert the middle comment leader
for the new line: " * ". To close this comment you just have to type "/"
before typing anything else on the new line. This will replace the
middle-comment leader with the end-comment leader and apply any specified
alignment, leaving just " */". There is no need to hit BackSpace first.
alignment, leaving just " */". There is no need to hit Backspace first.
When there is a match with a middle part, but there also is a maching end part
which is longer, the end part is used. This makes a C style comment work
When there is a match with a middle part, but there also is a matching end
part which is longer, the end part is used. This makes a C style comment work
without requiring the middle part to end with a space.
Here is an example of alignment flags at work to make a comment stand out
@@ -1597,7 +1615,7 @@ Vim has a sorting function and a sorting command. The sorting function can be
found here: |sort()|, |uniq()|.
*:sor* *:sort*
:[range]sor[t][!] [i][u][r][n][x][o] [/{pattern}/]
:[range]sor[t][!] [i][u][r][n][x][o][b] [/{pattern}/]
Sort lines in [range]. When no range is given all
lines are sorted.
@@ -1617,6 +1635,9 @@ found here: |sort()|, |uniq()|.
With [o] sorting is done on the first octal number in
the line (after or inside a {pattern} match).
With [b] sorting is done on the first binary number in
the line (after or inside a {pattern} match).
With [u] only keep the first of a sequence of
identical lines (ignoring case when [i] is used).
Without this flag, a sequence of identical lines

View File

@@ -379,7 +379,7 @@ CTRL-N After using 'wildchar' which got multiple matches, go to next
<S-Tab> *c_CTRL-P* *c_<S-Tab>*
CTRL-P After using 'wildchar' which got multiple matches, go to
previous match. Otherwise recall older command-line from
history. <S-Tab> only works with the GUI and with MS-DOS.
history. <S-Tab> only works with the GUI.
*c_CTRL-A*
CTRL-A All names that match the pattern in front of the cursor are
inserted.
@@ -482,6 +482,8 @@ followed by another Vim command:
:argdo
:autocmd
:bufdo
:cdo
:cfdo
:command
:cscope
:debug
@@ -490,8 +492,9 @@ followed by another Vim command:
:function
:global
:help
:helpfind
:lcscope
:ldo
:lfdo
:make
:normal
:promptfind
@@ -816,7 +819,7 @@ These modifiers can be given, in this order:
separator is removed. Thus ":p:h" on a directory name results
on the directory name itself (without trailing slash).
When the file name is an absolute path (starts with "/" for
Unix; "x:\" for MS-DOS and WIN32), that part is not removed.
Unix; "x:\" for Windows), that part is not removed.
When there is no head (path is relative to current directory)
the result is empty.
:t Tail of the file name (last component of the name). Must
@@ -915,8 +918,8 @@ option contains "sh", this is done twice, to avoid the shell trying to expand
the "!".
*filename-backslash*
For filesystems that use a backslash as directory separator (MS-DOS and
Windows), it's a bit difficult to recognize a backslash that is used
For filesystems that use a backslash as directory separator (Windows
filesystems), it's a bit difficult to recognize a backslash that is used
to escape the special meaning of the next character. The general rule is: If
the backslash is followed by a normal file name character, it does not have a
special meaning. Therefore "\file\foo" is a valid file name, you don't have

View File

@@ -1,107 +0,0 @@
*debugger.txt* For Vim version 7.4. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Gordon Prieur
Debugger Support Features *debugger-support*
1. Debugger Features |debugger-features|
==============================================================================
1. Debugger Features *debugger-features*
The following features are available for an integration with a debugger or
an Integrated Programming Environment (IPE) or Integrated Development
Environment (IDE):
Alternate Command Input |alt-input|
Debug Signs |debug-signs|
Debug Source Highlight |debug-highlight|
Message Footer |gui-footer|
Balloon Evaluation |balloon-eval|
These features were added specifically for use in the Motif version of gvim.
However, the |alt-input| and |debug-highlight| were written to be usable in
both vim and gvim. Some of the other features could be used in the non-GUI
vim with slight modifications. However, I did not do this nor did I test the
reliability of building for vim or non Motif GUI versions.
1.1 Alternate Command Input *alt-input*
For Vim to work with a debugger there must be at least an input connection
with a debugger or external tool. In many cases there will also be an output
connection but this isn't absolutely necessary.
The purpose of the input connection is to let the external debugger send
commands to Vim. The commands sent by the debugger should give the debugger
enough control to display the current debug environment and state.
The current implementation is based on the X Toolkit dispatch loop and the
XtAddInput() function call.
1.2 Debug Signs *debug-signs*
Many debuggers mark specific lines by placing a small sign or color highlight
on the line. The |:sign| command lets the debugger set this graphic mark. Some
examples where this feature would be used would be a debugger showing an arrow
representing the Program Counter (PC) of the program being debugged. Another
example would be a small stop sign for a line with a breakpoint. These visible
highlights let the user keep track of certain parts of the state of the
debugger.
This feature can be used with more than debuggers, too. An IPE can use a sign
to highlight build errors, searched text, or other things. The sign feature
can also work together with the |debug-highlight| to ensure the mark is
highly visible.
Debug signs are defined and placed using the |:sign| command.
1.3 Debug Source Highlight *debug-highlight*
This feature allows a line to have a predominant highlight. The highlight is
intended to make a specific line stand out. The highlight could be made to
work for both vim and gvim, whereas the debug sign is, in most cases, limited
to gvim. The one exception to this is Sun Microsystem's dtterm. The dtterm
from Sun has a "sign gutter" for showing signs.
1.4 Message Footer *gui-footer*
The message footer can be used to display messages from a debugger or IPE. It
can also be used to display menu and toolbar tips. The footer area is at the
bottom of the GUI window, below the line used to display colon commands.
The display of the footer is controlled by the 'guioptions' letter 'F'.
1.5 Balloon Evaluation *balloon-eval*
This feature allows a debugger, or other external tool, to display dynamic
information based on where the mouse is pointing. The purpose of this feature
was to allow Sun's Visual WorkShop debugger to display expression evaluations.
However, the feature was implemented in as general a manner as possible and
could be used for displaying other information as well.
The Balloon Evaluation has some settable parameters too. For Motif the font
list and colors can be set via X resources (XmNballoonEvalFontList,
XmNballoonEvalBackground, and XmNballoonEvalForeground).
The 'balloondelay' option sets the delay before an attempt is made to show a
balloon.
The 'ballooneval' option needs to be set to switch it on.
Balloon evaluation is only available when compiled with the |+balloon_eval|
feature.
The Balloon evaluation functions are also used to show a tooltip for the
toolbar. The 'ballooneval' option does not need to be set for this. But the
other settings apply.
Another way to use the balloon is with the 'balloonexpr' option. This is
completely user definable.
==============================================================================
vim:tw=78:sw=4:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*diff.txt* For Vim version 7.4. Last change: 2015 Jan 19
*diff.txt* For Vim version 7.4. Last change: 2015 Feb 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -306,6 +306,19 @@ name or a part of a buffer name. Examples:
Also see |'diffopt'| and the "diff" item of |'fillchars'|.
*diff-slow* *diff_translations*
For very long lines, the diff syntax highlighting might be slow, especially
since it tries to match all different kind of localisations. To disable
localisations and speed up the syntax highlighting, set the global variable
g:diff_translations to zero: >
let g:diff_translations = 0
<
After setting this variable, Reload the syntax script: >
set syntax=diff
<
FINDING THE DIFFERENCES *diff-diffexpr*

View File

@@ -130,9 +130,7 @@ You can use this file if you discover that you need the original file. See
also the 'patchmode' option. The name of the backup file is normally the same
as the original file with 'backupext' appended. The default "~" is a bit
strange to avoid accidentally overwriting existing files. If you prefer ".bak"
change the 'backupext' option. Extra dots are replaced with '_' on MS-DOS
machines, when Vim has detected that an MS-DOS-like filesystem is being used
(e.g., messydos or crossdos). The backup file can be placed in another
change the 'backupext' option. The backup file can be placed in another
directory by setting 'backupdir'.
When you started editing without giving a file name, "No File" is displayed in
@@ -276,7 +274,8 @@ CTRL-^ Edit the alternate file. Mostly the alternate file is
Mnemonic: "goto file".
Uses the 'isfname' option to find out which characters
are supposed to be in a file name. Trailing
punctuation characters ".,:;!" are ignored.
punctuation characters ".,:;!" are ignored. Escaped
spaces "\ " are reduced to a single space.
Uses the 'path' option as a list of directory names to
look for the file. See the 'path' option for details
about relative directories and wildcards.
@@ -470,9 +469,9 @@ The 'fileformat' option sets the <EOL> style for a file:
"mac" <CR> Mac format *Mac-format*
When reading a file, the mentioned characters are interpreted as the <EOL>.
In DOS format (default for MS-DOS and Win32), <CR><NL> and <NL> are both
interpreted as the <EOL>. Note that when writing the file in DOS format,
<CR> characters will be added for each single <NL>. Also see |file-read|.
In DOS format (default for Windows), <CR><NL> and <NL> are both interpreted as
the <EOL>. Note that when writing the file in DOS format, <CR> characters will
be added for each single <NL>. Also see |file-read|.
When writing a file, the mentioned characters are used for <EOL>. For DOS
format <CR><NL> is used. Also see |DOS-format-write|.
@@ -493,13 +492,13 @@ If you start editing a new file and the 'fileformats' option is not empty
(which is the default), Vim will try to detect whether the lines in the file
are separated by the specified formats. When set to "unix,dos", Vim will
check for lines with a single <NL> (as used on Unix) or by a <CR><NL> pair
(MS-DOS). Only when ALL lines end in <CR><NL>, 'fileformat' is set to "dos",
(Windows). Only when ALL lines end in <CR><NL>, 'fileformat' is set to "dos",
otherwise it is set to "unix". When 'fileformats' includes "mac", and no <NL>
characters are found in the file, 'fileformat' is set to "mac".
If the 'fileformat' option is set to "dos" on non-MS-DOS systems the message
If the 'fileformat' option is set to "dos" on non-Windows systems the message
"[dos format]" is shown to remind you that something unusual is happening. On
MS-DOS systems you get the message "[unix format]" if 'fileformat' is set to
Windows systems you get the message "[unix format]" if 'fileformat' is set to
"unix". On all systems but the Macintosh you get the message "[mac format]"
if 'fileformat' is set to "mac".
@@ -795,7 +794,8 @@ USING THE ARGUMENT LIST
autocommand event is disabled by adding it to
'eventignore'. This considerably speeds up editing
each file.
Also see |:windo|, |:tabdo| and |:bufdo|.
Also see |:windo|, |:tabdo|, |:bufdo|, |:cdo|, |:ldo|,
|:cfdo| and |:lfdo|.
Example: >
:args *.c
@@ -964,10 +964,10 @@ lost the original file.
*DOS-format-write*
If the 'fileformat' is "dos", <CR> <NL> is used for <EOL>. This is default
for MS-DOS and Win32. On other systems the message "[dos format]" is shown to
for Windows. On other systems the message "[dos format]" is shown to
remind you that an unusual <EOL> was used.
*Unix-format-write*
If the 'fileformat' is "unix", <NL> is used for <EOL>. On MS-DOS and Win32
If the 'fileformat' is "unix", <NL> is used for <EOL>. On Windows
the message "[unix format]" is shown.
*Mac-format-write*
If the 'fileformat' is "mac", <CR> is used for <EOL>. On non-Mac systems the
@@ -997,11 +997,11 @@ When the file name is actually a device name, Vim will not make a backup (that
would be impossible). You need to use "!", since the device already exists.
Example for Unix: >
:w! /dev/lpt0
and for MS-DOS or MS-Windows: >
and Windows: >
:w! lpt0
For Unix a device is detected when the name doesn't refer to a normal file or
a directory. A fifo or named pipe also looks like a device to Vim.
For MS-DOS and MS-Windows the device is detected by its name:
For Windows the device is detected by its name:
CON
CLOCK$
NUL
@@ -1144,7 +1144,7 @@ If you want to always use ":confirm", set the 'confirm' option.
|:diffsplit|, |:diffpatch|, |:pedit|, |:redir|,
|:source|, |:update|, |:visual|, |:vsplit|,
and |:qall| if 'confirm' is set.
{only in Win32, Athena, Motif, GTK and Mac GUI}
{only in Win32 GUI}
When ":browse" is not possible you get an error
message. If the |+browse| feature is missing or the
{command} doesn't support browsing, the {command} is
@@ -1172,16 +1172,13 @@ For versions of Vim where browsing is not supported, the command is executed
unmodified.
*browsefilter*
For MS Windows and GTK, you can modify the filters that are used in the browse
dialog. By setting the g:browsefilter or b:browsefilter variables, you can
change the filters globally or locally to the buffer. The variable is set to
a string in the format "{filter label}\t{pattern};{pattern}\n" where {filter
label} is the text that appears in the "Files of Type" comboBox, and {pattern}
is the pattern which filters the filenames. Several patterns can be given,
separated by ';'.
For Motif the same format is used, but only the very first pattern is actually
used (Motif only offers one pattern, but you can edit it).
For Windows you can modify the filters that are used in the browse dialog. By
setting the g:browsefilter or b:browsefilter variables, you can change the
filters globally or locally to the buffer. The variable is set to a string in
the format "{filter label}\t{pattern};{pattern}\n" where {filter label} is the
text that appears in the "Files of Type" comboBox, and {pattern} is the
pattern which filters the filenames. Several patterns can be given, separated
by ';'.
For example, to have only Vim files in the dialog, you could use the following
command: >
@@ -1225,7 +1222,7 @@ present in 'cpoptions' and "!" is not used in the command.
Does not change the meaning of an already opened file,
because its full path name is remembered. Files from
the |arglist| may change though!
On MS-DOS this also changes the active drive.
On Windows this also changes the active drive.
To change to the directory of the current file: >
:cd %:h
<

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.4. Last change: 2014 Nov 27
*eval.txt* For Vim version 7.4. Last change: 2015 Nov 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -65,14 +65,16 @@ the Number. Examples:
Number 0 --> String "0" ~
Number -1 --> String "-1" ~
*octal*
Conversion from a String to a Number is done by converting the first digits
to a number. Hexadecimal "0xf9" and Octal "017" numbers are recognized. If
the String doesn't start with digits, the result is zero. Examples:
Conversion from a String to a Number is done by converting the first digits to
a number. Hexadecimal "0xf9", Octal "017", and Binary "0b10" numbers are
recognized. If the String doesn't start with digits, the result is zero.
Examples:
String "456" --> Number 456 ~
String "6bar" --> Number 6 ~
String "foo" --> Number 0 ~
String "0xf1" --> Number 241 ~
String "0100" --> Number 64 ~
String "0b101" --> Number 5 ~
String "-8" --> Number -8 ~
String "+8" --> Number 0 ~
@@ -522,7 +524,7 @@ Funcref to a Dictionary, but the "self" variable is not available then.
To avoid the extra name for the function it can be defined and directly
assigned to a Dictionary in this way: >
:let mydict = {'data': [0, 1, 2, 3]}
:function mydict.len() dict
:function mydict.len()
: return len(self.data)
:endfunction
:echo mydict.len()
@@ -953,7 +955,7 @@ Decimal, Hexadecimal (starting with 0x or 0X), or Octal (starting with 0).
Floating point numbers can be written in two forms:
[-+]{N}.{M}
[-+]{N}.{M}e[-+]{exp}
[-+]{N}.{M}[eE][-+]{exp}
{N} and {M} are numbers. Both {N} and {M} must be present and can only
contain digits.
@@ -1017,7 +1019,7 @@ A string constant accepts these special characters:
\X. same as \x.
\u.... character specified with up to 4 hex numbers, stored according to the
current value of 'encoding' (e.g., "\u02a4")
\U.... same as \u....
\U.... same as \u but allows up to 8 hex numbers.
\b backspace <BS>
\e escape <Esc>
\f formfeed <FF>
@@ -1375,6 +1377,15 @@ v:errmsg Last given error message. It's allowed to set this variable.
: ... handle error
< "errmsg" also works, for backwards compatibility.
*v:errors* *errors-variable*
v:errors Errors found by assert functions, such as |assert_true()|.
This is a list of strings.
The assert functions append an item when an assert fails.
To remove old results make it empty: >
:let v:errors = []
< If v:errors is set to anything but a list it is made an empty
list by the assert function.
*v:exception* *exception-variable*
v:exception The value of the exception most recently caught and not
finished. See also |v:throwpoint| and |throw-variables|.
@@ -1535,6 +1546,15 @@ v:oldfiles List of file names that is loaded from the |shada| file on
than String this will cause trouble.
{only when compiled with the |+shada| feature}
*v:option_new*
v:option_new New value of the option. Valid while executing an |OptionSet|
autocommand.
*v:option_old*
v:option_old Old value of the option. Valid while executing an |OptionSet|
autocommand.
*v:option_type*
v:option_type Scope of the set command. Valid while executing an
|OptionSet| autocommand. Can be either "global" or "local"
*v:operator* *operator-variable*
v:operator The last operator given in Normal mode. This is a single
character except for commands starting with <g> or <z>,
@@ -1719,10 +1739,13 @@ 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}]])
arglistid( [{winnr} [, {tabnr}]])
Number argument list id
argv( {nr}) String {nr} entry of the argument list
argv( ) List the argument list
assert_equal( {exp}, {act} [, {msg}]) none assert that {exp} equals {act}
assert_false( {actual} [, {msg}]) none assert that {actual} is false
assert_true( {actual} [, {msg}]) none assert that {actual} is true
asin( {expr}) Float arc sine of {expr}
atan( {expr}) Float arc tangent of {expr}
atan2( {expr}, {expr}) Float arc tangent of {expr1} / {expr2}
@@ -1839,10 +1862,10 @@ getwinposx() Number X coord in pixels of GUI Vim window
getwinposy() Number Y coord in pixels of GUI Vim window
getwinvar( {nr}, {varname} [, {def}])
any variable {varname} in window {nr}
glob( {expr} [, {nosuf} [, {list}]])
glob( {expr} [, {nosuf} [, {list} [, {alllinks}]]])
any expand file wildcards in {expr}
glob2regpat( {expr}) String convert a glob pat into a search pat
globpath( {path}, {expr} [, {nosuf} [, {list}]])
globpath( {path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]])
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}
@@ -1873,6 +1896,7 @@ isdirectory( {directory}) Number TRUE if {directory} is a directory
islocked( {expr}) Number TRUE if {expr} is locked
items( {dict}) List key-value pairs in {dict}
jobclose({job}[, {stream}]) Number Closes a job stream(s)
jobpid({job}) Number Returns pid of a job.
jobresize({job}, {width}, {height})
Number Resize {job}'s pseudo terminal window
jobsend({job}, {data}) Number Writes {data} to {job}'s stdin
@@ -2152,6 +2176,37 @@ argv([{nr}]) The result is the {nr}th file in the argument list of the
< Without the {nr} argument a |List| with the whole |arglist| is
returned.
*assert_equal()*
assert_equal({expected}, {actual}, [, {msg}])
When {expected} and {actual} are not equal an error message is
added to |v:errors|.
There is no automatic conversion, the String "4" is different
from the Number 4. And the number 4 is different from the
Float 4.0. The value of 'ignorecase' is not used here, case
always matters.
When {msg} is omitted an error in the form "Expected
{expected} but got {actual}" is produced.
Example: >
assert_equal('foo', 'bar')
< Will result in a string to be added to |v:errors|:
test.vim line 12: Expected 'foo' but got 'bar' ~
assert_false({actual}, [, {msg}]) *assert_false()*
When {actual} is not false an error message is added to
|v:errors|, like with |assert_equal()|..
A value is false when it is zero. When "{actual}" is not a
number the assert fails.
When {msg} is omitted an error in the form "Expected False but
got {actual}" is produced.
assert_true({actual}, [, {msg}]) *assert_true()*
When {actual} is not true an error message is added to
|v:errors|, like with |assert_equal()|..
A value is true when it is a non-zeron number. When {actual}
is not a number the assert fails.
When {msg} is omitted an error in the form "Expected True but
got {actual}" is produced.
asin({expr}) *asin()*
Return the arc sine of {expr} measured in radians, as a |Float|
in the range of [-pi/2, pi/2].
@@ -2406,6 +2461,10 @@ col({expr}) The result is a Number, which is the byte index of the column
number of bytes in the cursor line plus one)
'x position of mark x (if the mark is not set, 0 is
returned)
v In Visual mode: the start of the Visual area (the
cursor is the end). When not in Visual mode
returns the cursor position. Differs from |'<| in
that it's updated right away.
Additionally {expr} can be [lnum, col]: a |List| with the line
and column number. Most useful when the column is "$", to get
the last column of a specific line. When "lnum" or "col" is
@@ -2507,10 +2566,10 @@ confirm({msg} [, {choices} [, {default} [, {type}]]])
{default} is omitted, 1 is used.
The optional {type} argument gives the type of dialog. This
is only used for the icon of the GTK, Mac, Motif and Win32
GUI. It can be one of these values: "Error", "Question",
"Info", "Warning" or "Generic". Only the first character is
relevant. When {type} is omitted, "Generic" is used.
is only used for the icon of the Win32 GUI. It can be one of
these values: "Error", "Question", "Info", "Warning" or
"Generic". Only the first character is relevant.
When {type} is omitted, "Generic" is used.
If the user aborts the dialog by pressing <Esc>, CTRL-C,
or another valid interrupt key, confirm() returns 0.
@@ -2769,7 +2828,7 @@ executable({expr}) *executable()*
arguments.
executable() uses the value of $PATH and/or the normal
searchpath for programs. *PATHEXT*
On MS-DOS and MS-Windows the ".exe", ".bat", etc. can
On Windows the ".exe", ".bat", etc. can
optionally be included. Then the extensions in $PATHEXT are
tried. Thus if "foo.exe" does not exist, "foo.exe.bat" can be
found. If $PATHEXT is not set then ".exe;.com;.bat;.cmd" is
@@ -2777,9 +2836,9 @@ executable({expr}) *executable()*
the name without an extension. When 'shell' looks like a
Unix shell, then the name is also tried without adding an
extension.
On MS-DOS and MS-Windows it only checks if the file exists and
On Windows it only checks if the file exists and
is not a directory, not if it's really executable.
On MS-Windows an executable in the same directory as Vim is
On Windows an executable in the same directory as Vim is
always found. Since this directory is added to $PATH it
should also work to execute it |win32-PATH|.
The result is a Number:
@@ -3223,8 +3282,7 @@ foreground() Move the Vim window to the foreground. Useful when sent from
On Win32 systems this might not work, the OS does not always
allow a window to bring itself to the foreground. Use
|remote_foreground()| instead.
{only in the Win32, Athena, Motif and GTK GUI versions and the
Win32 console version}
{only in the Win32 GUI and console version}
function({name}) *function()* *E700*
@@ -3355,7 +3413,7 @@ getchar([expr]) *getchar()*
: endwhile
:endfunction
<
You may also receive syntetic characters, such as
You may also receive synthetic characters, such as
|<CursorHold>|. Often you will want to ignore this and get
another character: >
:function GetKey()
@@ -3472,8 +3530,6 @@ getfontname([{name}]) *getfontname()*
Only works when the GUI is running, thus not in your vimrc or
gvimrc file. Use the |GUIEnter| autocommand to use this
function just after the GUI has started.
Note that the GTK 2 GUI accepts any font name, thus checking
for a valid name does not work.
getfperm({fname}) *getfperm()*
The result is a String, which is the read, write, and execute
@@ -3572,8 +3628,7 @@ getmatches() *getmatches()*
<
*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.
This is a unique number, until Vim exits.
*getpos()*
getpos({expr}) Get the position for {expr}. For possible values of {expr}
@@ -3699,7 +3754,7 @@ getwinvar({winnr}, {varname} [, {def}]) *getwinvar()*
:let list_is_on = getwinvar(2, '&list')
:echo "myvar = " . getwinvar(1, 'myvar')
<
glob({expr} [, {nosuf} [, {list}]]) *glob()*
glob({expr} [, {nosuf} [, {list} [, {alllinks}]]]) *glob()*
Expand the file wildcards in {expr}. See |wildcards| for the
use of special characters.
@@ -3716,8 +3771,11 @@ glob({expr} [, {nosuf} [, {list}]]) *glob()*
matches, they are separated by <NL> characters.
If the expansion fails, the result is an empty String or List.
A name for a non-existing file is not included. A symbolic
link is only included if it points to an existing file.
However, when the {alllinks} argument is present and it is
non-zero then all symbolic links are included.
For most systems backticks can be used to get files names from
any external command. Example: >
@@ -3736,8 +3794,11 @@ glob2regpat({expr}) *glob2regpat()*
if filename =~ glob2regpat('Make*.mak')
< This is equivalent to: >
if filename =~ '^Make.*\.mak$'
<
globpath({path}, {expr} [, {nosuf} [, {list}]]) *globpath()*
< When {expr} is an empty string the result is "^$", match an
empty string.
*globpath()*
globpath({path}, {expr} [, {nosuf} [, {list} [, {allinks}]]])
Perform glob() on all directories in {path} and concatenate
the results. Example: >
:echo globpath(&rtp, "syntax/c.vim")
@@ -3763,6 +3824,8 @@ globpath({path}, {expr} [, {nosuf} [, {list}]]) *globpath()*
they are separated by <NL> characters. Example: >
:echo globpath(&rtp, "syntax/c.vim", 0, 1)
<
{allinks} is used as with |glob()|.
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: >
@@ -4105,6 +4168,9 @@ jobclose({job}[, {stream}]) {Nvim} *jobclose()*
Close {job}'s {stream}, which can be one "stdin", "stdout" or
"stderr". If {stream} is omitted, all streams are closed.
jobpid({job}) {Nvim} *jobpid()*
Return the pid (process id) of {job}.
jobresize({job}, {width}, {height}) {Nvim} *jobresize()*
Resize {job}'s pseudo terminal window to {width} and {height}.
This function will fail if used on jobs started without the
@@ -4124,9 +4190,14 @@ jobsend({job}, {data}) {Nvim} *jobsend()*
jobstart({cmd}[, {opts}]) {Nvim} *jobstart()*
Spawns {cmd} as a job. If {cmd} is a |List|, it will be run
directly. If {cmd} is a |string|, it will be equivalent to >
:call jobstart([&shell, &shellcmdflag, '{cmd}'])
< If passed, {opts} must be a dictionary with any of the
directly. If {cmd} is a |string|, it will be roughly
equivalent to >
:call jobstart(split(&shell) + split(&shellcmdflag) + ['{cmd}'])
< NOTE: read |shell-unquoting| before constructing any lists
with 'shell' or 'shellcmdflag' options. The above call is
only written to show the idea, one needs to perform unquoting
and do split taking quotes into account.
If passed, {opts} must be a dictionary with any of the
following keys:
- on_stdout: stdout event handler
- on_stderr: stderr event handler
@@ -4137,6 +4208,10 @@ jobstart({cmd}[, {opts}]) {Nvim} *jobstart()*
- width: Width of the terminal screen(only if pty is set)
- height: Height of the terminal screen(only if pty is set)
- TERM: $TERM environment variable(only if pty is set)
- detach: Detach the job process from the nvim process. The
process won't get killed when nvim exists. If the process
dies before nvim exits, on_exit will still be invoked.
This option is only allowed for non-pty jobs.
Either funcrefs or function names can be passed as event
handlers. The {opts} object is also used as the "self"
argument for the callback, so the caller may pass arbitrary
@@ -4703,7 +4778,7 @@ msgpackdump({list}) {Nvim} *msgpackdump()*
(dictionary with zero items is represented by 0x80 byte in
messagepack).
Limitations:
Limitations: *E951* *E952*
1. |Funcref|s cannot be dumped.
2. Containers that reference themselves cannot be dumped.
3. Dictionary keys are always dumped as STR strings.
@@ -4854,6 +4929,9 @@ printf({fmt}, {expr1} ...) *printf()*
%c single byte
%d decimal number
%5d decimal number padded with spaces to 5 characters
%b binary number
%08b binary number padded with zeros to at least 8 characters
%B binary number using upper case letters
%x hex number
%04x hex number padded with zeros to at least 4 characters
%X hex number using upper case letters
@@ -4940,20 +5018,19 @@ printf({fmt}, {expr1} ...) *printf()*
The conversion specifiers and their meanings are:
*printf-d* *printf-o* *printf-x* *printf-X*
doxX The Number argument is converted to signed decimal
(d), unsigned octal (o), or unsigned hexadecimal (x
and X) notation. The letters "abcdef" are used for
x conversions; the letters "ABCDEF" are used for X
conversions.
The precision, if any, gives the minimum number of
digits that must appear; if the converted value
requires fewer digits, it is padded on the left with
zeros.
In no case does a non-existent or small field width
cause truncation of a numeric field; if the result of
a conversion is wider than the field width, the field
is expanded to contain the conversion result.
*printf-d* *printf-b* *printf-B* *printf-o* *printf-x* *printf-X*
dbBoxX The Number argument is converted to signed decimal (d),
unsigned binary (b and B), unsigned octal (o), or
unsigned hexadecimal (x and X) notation. The letters
"abcdef" are used for x conversions; the letters
"ABCDEF" are used for X conversions. The precision, if
any, gives the minimum number of digits that must
appear; if the converted value requires fewer digits, it
is padded on the left with zeros. In no case does a
non-existent or small field width cause truncation of a
numeric field; if the result of a conversion is wider
than the field width, the field is expanded to contain
the conversion result.
*printf-c*
c The Number argument is converted to a byte, and the
@@ -4963,6 +5040,7 @@ printf({fmt}, {expr1} ...) *printf()*
s The text of the String argument is used. If a
precision is specified, no more bytes than the number
specified are used.
*printf-S*
S The text of the String argument is used. If a
precision is specified, no more display cells than the
number specified are used. Without the |+multi_byte|
@@ -5024,7 +5102,7 @@ py3eval({expr}) *py3eval()*
Evaluate Python expression {expr} and return its result
converted to Vim data structures.
Numbers and strings are returned as they are (strings are
copied though, unicode strings are additionally converted to
copied though, Unicode strings are additionally converted to
'encoding').
Lists are represented as Vim |List| type.
Dictionaries are represented as Vim |Dictionary| type with
@@ -5151,8 +5229,7 @@ remote_foreground({server}) *remote_foreground()*
Note: This does not restore the window if it was minimized,
like foreground() does.
This function is not available in the |sandbox|.
{only in the Win32, Athena, Motif and GTK GUI versions and the
Win32 console version}
{only in the Win32 GUI and the Win32 console version}
remote_peek({serverid} [, {retvar}]) *remote_peek()*
@@ -5828,12 +5905,12 @@ setwinvar({nr}, {varname}, {val}) *setwinvar()*
:call setwinvar(2, "myvar", "foobar")
sha256({string}) *sha256()*
Returns a String with 64 hex charactes, which is the SHA256
Returns a String with 64 hex characters, which is the SHA256
checksum of {string}.
shellescape({string} [, {special}]) *shellescape()*
Escape {string} for use as a shell command argument.
On MS-Windows and MS-DOS, when 'shellslash' is not set, it
On Windows when 'shellslash' is not set, it
will enclose {string} in double quotes and double all double
quotes within {string}.
For other systems, it will enclose {string} in single quotes
@@ -6069,12 +6146,14 @@ str2float( {expr}) *str2float()*
str2nr( {expr} [, {base}]) *str2nr()*
Convert string {expr} to a number.
{base} is the conversion base, it can be 8, 10 or 16.
{base} is the conversion base, it can be 2, 8, 10 or 16.
When {base} is omitted base 10 is used. This also means that
a leading zero doesn't cause octal conversion to be used, as
with the default String to Number conversion.
When {base} is 16 a leading "0x" or "0X" is ignored. With a
different base the result will be zero.
different base the result will be zero. Similarly, when {base}
is 8 a leading "0" is ignored, and when {base} is 2 a leading
"0b" or "0B" is ignored.
Text after the number is silently ignored.
@@ -6685,6 +6764,10 @@ virtcol({expr}) *virtcol()*
plus one)
'x position of mark x (if the mark is not set, 0 is
returned)
v In Visual mode: the start of the Visual area (the
cursor is the end). When not in Visual mode
returns the cursor position. Differs from |'<| in
that it's updated right away.
Note that only marks in the current file can be used.
Examples: >
virtcol(".") with text "foo^Lbar", with cursor on the "^L", returns 5
@@ -6897,8 +6980,6 @@ There are four types of features:
acl Compiled with |ACL| support.
arabic Compiled with Arabic support |Arabic|.
autocmd Compiled with autocommand support. |autocommand|
balloon_eval Compiled with |balloon-eval| support.
balloon_multiline GUI supports multiline balloons.
browse Compiled with |:browse| support, and browse() will
work.
browsefilter Compiled with support for |browsefilter|.
@@ -6916,7 +6997,6 @@ debug Compiled with "DEBUG" defined.
dialog_con Compiled with console dialog support.
dialog_gui Compiled with GUI dialog support.
digraphs Compiled with support for digraphs.
dnd Compiled with support for the "~ register |quote_~|.
eval Compiled with expression evaluation support. Always
true, of course!
ex_extra Compiled with extra Ex commands |+ex_extra|.
@@ -6929,21 +7009,13 @@ filterpipe When 'shelltemp' is off pipes are used for shell
find_in_path Compiled with support for include file searches
|+find_in_path|.
float Compiled with support for |Float|.
fname_case Case in file names matters (for MS-DOS and Windows
this is not present).
fname_case Case in file names matters (for Windows this is not
present).
folding Compiled with |folding| support.
footer Compiled with GUI footer support. |gui-footer|
gettext Compiled with message translation |multi-lang|
gui Compiled with GUI enabled.
gui_athena Compiled with Athena GUI.
gui_gnome Compiled with Gnome support (gui_gtk is also defined).
gui_gtk Compiled with GTK+ GUI (any version).
gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined).
gui_mac Compiled with Macintosh GUI.
gui_motif Compiled with Motif GUI.
gui_running Vim is running in the GUI, or it will start soon.
gui_win32 Compiled with MS Windows Win32 GUI.
gui_win32s idem, and Win32s system being used (Windows 3.1)
iconv Can use iconv() for conversion.
insert_expand Compiled with support for CTRL-X expansion commands in
Insert mode.
@@ -6991,6 +7063,7 @@ statusline Compiled with support for 'statusline', 'rulerformat'
syntax Compiled with syntax highlighting support |syntax|.
syntax_items There are active syntax highlighting items for the
current buffer.
tablineat 'tabline' option accepts %@Func@ items.
tag_binary Compiled with binary searching in tags files
|tag-binary-search|.
tag_old_static Compiled with support for old static tags
@@ -7015,10 +7088,9 @@ visualextra Compiled with extra Visual mode commands.
vreplace Compiled with |gR| and |gr| commands.
wildignore Compiled with 'wildignore' option.
wildmenu Compiled with 'wildmenu' option.
win32 Win32 version of Vim (MS-Windows 95 and later, 32 or
64 bits)
win32unix Win32 version of Vim, using Unix files (Cygwin)
win64 Win64 version of Vim (MS-Windows 64 bit).
win32 Windows version of Vim (32 or 64 bit).
win32unix Windows version of Vim, using Unix files (Cygwin).
win64 Windows version of Vim (64 bit).
winaltkeys Compiled with 'winaltkeys' option.
windows Compiled with support for more than one window.
writebackup Compiled with 'writebackup' default on.
@@ -7587,7 +7659,7 @@ This does NOT work: >
:unlet v
< *E741*
If you try to change a locked variable you get an
error message: "E741: Value of {name} is locked"
error message: "E741: Value is locked: {name}"
[depth] is relevant when locking a |List| or
|Dictionary|. It specifies how deep the locking goes:
@@ -8504,7 +8576,7 @@ You can catch all Vim errors by the pattern >
*catch-text*
NOTE: You should never catch the error message text itself: >
:catch /No such variable/
only works in the english locale, but not when the user has selected
only works in the English locale, but not when the user has selected
a different language by the |:language| command. It is however helpful to
cite the message text in a comment: >
:catch /^Vim(\a\+):E108:/ " No such variable

View File

@@ -53,60 +53,6 @@ o Toggling between Farsi ISIR-3342 standard encoding and Vim Farsi via F9
right-to-left mode, this function is also supported only in right-to-left
mode.
Farsi Fonts *farsi fonts*
-----------
The following files are found in the subdirectories of the '$VIM/farsi/fonts'
directory:
+ far-a01.pcf X Windows fonts for Unix including Linux systems
+ far-a01.bf X Windows fonts for SunOS
+ far-a01.f16 a screen fonts for Unix including Linux systems
+ far-a01.fon a monospaced fonts for Windows NT/95/98
+ far-a01.com a screen fonts for DOS
Font Installation
-----------------
o Installation of fonts for MS Window systems (NT/95/98)
From 'Control Panel' folder, start the 'Fonts' program. Then from 'file'
menu item select 'Install New Fonts ...'. Browse and select the
'far-a01.fon', then follow the installation guide.
NOTE: several people have reported that this does not work. The solution
is unknown.
o Installation of fonts for X Window systems (Unix/Linux)
Depending on your system, copy far-a01.pcf.Z or far-a01.pcf.gz into a
directory of your choice. Change to the directory containing the Farsi
fonts and execute the following commands:
> mkfontdir
> xset +fp path_name_of_farsi_fonts_directory
o Installation of fonts for X Window systems (SunOS)
Copy far-a01.bf font into a directory of your choice.
Change to the directory containing the far-a01.fb fonts and
execute the following commands:
> fldfamily
> xset +fp path_name_of_fonts_directory
o Installation of ASCII screen fonts (Unix/Linux)
For Linux system, copy the far-a01.f16 fonts into /usr/lib/kbd/consolefonts
directory and execute the setfont program as "setfont far-a01.f16". For
other systems (e.g. SCO Unix), please refer to the fonts installation
section of your system administration manuals.
o Installation of ASCII screen fonts (DOS)
After system power on, prior to the first use of Vim, upload the Farsi
fonts by executing the far-a01.com font uploading program.
Usage
-----
@@ -165,7 +111,7 @@ The letter encoding used is the Vim extended ISIR-3342 standard with a built
in function to convert between Vim extended ISIR-3342 and ISIR-3342 standard.
For document portability reasons, the letter encoding is kept the same across
different platforms (i.e. UNIX's, NT/95/98, MS DOS, ...).
different platforms (i.e. Unix, Windows, ...).
o Keyboard
@@ -215,7 +161,7 @@ o Keyboard
Note:
<09> stands for Farsi PSP (break without space)
<09> stands for Farsi PCN (for HAMZE attribute )
<09> stands for Farsi PCN (for HAMZE attribute)
Restrictions
------------

View File

@@ -595,7 +595,7 @@ Format description:
ignored.
2. Each entry starts with line that has format "{type} with timestamp
{timestamp}:". {timestamp} is |strftime()|-formatted string representing
actual UNIX timestamp value. First strftime() argument is equal to
actual Unix timestamp value. First strftime() argument is equal to
`%Y-%m-%dT%H:%M:%S`. When writing this timestamp is parsed using
|msgpack#strptime()|, with caching (it remembers which timestamp produced
particular strftime() output and uses this value if you did not change

View File

@@ -208,18 +208,6 @@ takes too much time or you don't like the cursor jumping to another line,
include the 'h' flag in 'guioptions'. Then the scrolling is limited by the
text of the current cursor line.
*athena-intellimouse*
If you have an Intellimouse and an X server that supports using the wheel,
then you can use the wheel to scroll the text up and down in gvim. This works
with XFree86 4.0 and later, and with some older versions when you add patches.
See |scroll-mouse-wheel|.
For older versions of XFree86 you must patch your X server. The following
page has a bit of information about using the Intellimouse on Linux as well as
links to the patches and X server binaries (may not have the one you need
though):
http://www.inria.fr/koala/colas/mouse-wheel-scroll/
==============================================================================
3. Mouse Control *gui-mouse*
@@ -605,10 +593,6 @@ The default menus have these priorities:
When no or zero priority is given, 500 is used.
The priority for the PopUp menu is not used.
The Help menu will be placed on the far right side of the menu bar on systems
which support this (Motif and GTK+). For GTK+ 2, this is not done anymore
because right-aligning the Help menu is now discouraged UI design.
You can use a priority higher than 9999, to make it go after the Help menu,
but that is non-standard and is discouraged. The highest possible priority is
about 32000. The lowest is 1.
@@ -677,10 +661,8 @@ level. Vim interprets the items in this menu as follows:
toolbar button image. Note that the exact filename is OS-specific: For
example, under Win32 the command >
:amenu ToolBar.Hello :echo "hello"<CR>
< would find the file 'hello.bmp'. Under GTK+/X11 it is 'Hello.xpm'. With
GTK+ 2 the files 'Hello.png', 'Hello.xpm' and 'Hello.bmp' are checked for
existence, and the first one found would be used.
For MS-Windows and GTK+ 2 the bitmap is scaled to fit the button. For
< would find the file 'hello.bmp'. Under X11 it is 'Hello.xpm'.
For MS-Windows and the bitmap is scaled to fit the button. For
MS-Windows a size of 18 by 18 pixels works best.
For MS-Windows the bitmap should have 16 colors with the standard palette.
The light grey pixels will be changed to the Window frame color and the
@@ -729,8 +711,8 @@ nr Name Normal action ~
30 WinMinWidth make current window use few columns
*hidden-menus* *win32-hidden-menus*
In the Win32 and GTK+ GUI, starting a menu name with ']' excludes that menu
from the main menu bar. You must then use the |:popup| command to display it.
In the Win32 GUI, starting a menu name with ']' excludes that menu from the
main menu bar. You must then use the |:popup| command to display it.
*popup-menu*
You can define the special menu "PopUp". This is the menu that is displayed
@@ -883,9 +865,8 @@ a menu item - you don't need to do a :tunmenu as well.
5.9 Popup Menus
In the Win32 and GTK+ GUI, you can cause a menu to popup at the cursor.
This behaves similarly to the PopUp menus except that any menu tree can
be popped up.
In the Win32 GUI, you can cause a menu to popup at the cursor. This behaves
similarly to the PopUp menus except that any menu tree can be popped up.
This command is for backwards compatibility, using it is discouraged, because
it behaves in a strange way.
@@ -894,7 +875,7 @@ it behaves in a strange way.
:popu[p] {name} Popup the menu {name}. The menu named must
have at least one subentry, but need not
appear on the menu-bar (see |hidden-menus|).
{only available for Win32 and GTK GUI}
{only available for Win32 GUI}
:popu[p]! {name} Like above, but use the position of the mouse
pointer instead of the cursor.

View File

@@ -47,10 +47,6 @@ If you want Vim to start with a maximized window, add this command to your
vimrc or gvimrc file: >
au GUIEnter * simalt ~x
<
*gui-w32s*
There is a specific version of gvim.exe that runs under the Win32s subsystem
of Windows 3.1 or 3.11. See |win32s|.
==============================================================================
2. Vim as default editor *vim-default-editor*
@@ -88,7 +84,6 @@ when you have got a new version):
You can also install Vim in the "Send To" menu:
1. Start a Windows Explorer
2. Navigate to your sendto directory:
Windows 95: %windir%\sendto (e.g. "c:\windows\sendto")
Windows NT: %windir%\profiles\%user%\sendto (e.g.
"c:\winnt\profiles\mattha\sendto").
3. Right-click in the file pane and select New->Shortcut
@@ -262,17 +257,6 @@ WARNING: If you close this window with the "X" button, and confirm the
question if you really want to kill the application, Vim may be killed too!
(This does not apply to commands run asynchronously with ":!start".)
*msdos-mode*
If you get a dialog that says "This program is set to run in MS-DOS mode..."
when you run an external program, you can solve this by changing the
properties of the associated shortcut:
- Use a Windows Explorer to find the command.com that is used. It can be
c:\command.com, c:\dos\command.com, c:\windows\command.com, etc.
- With the right mouse button, select properties of this command.com.
- In the Program tab select "Advanced".
- Unselect "MS-DOS mode".
- Click "OK" twice.
*win32-!start*
Normally, Vim waits for a command to complete before continuing (this makes
sense for most shell commands which produce output for Vim to use). If you
@@ -281,10 +265,6 @@ syntax on W95 & NT: >
:!start [/min] {command}
The optional "/min" causes the window to be minimized.
On Win32s, you will have to go to another window instead. Don't forget that
you must tell Windows 3.1x to keep executing a DOS command in the background
while you switch back to Vim.
==============================================================================
5. Special colors *win32-colors*
@@ -293,7 +273,7 @@ On Win32, the normal DOS colors can be used. See |dos-colors|.
Additionally the system configured colors can also be used. These are known
by the names Sys_XXX, where XXX is the appropriate system color name, from the
following list (see the Win32 documentation for full descriptions). Case is
ignored. Note: On Win32s not all of these colors are supported.
ignored.
Sys_3DDKShadow Sys_3DFace Sys_BTNFace
Sys_3DHilight Sys_3DHighlight Sys_BTNHilight

View File

@@ -1,4 +1,4 @@
*help.txt* For Vim version 7.4. Last change: 2012 Dec 06
*help.txt* For Vim version 7.4. Last change: 2015 Apr 15
VIM - main help file
k
@@ -23,6 +23,7 @@ Get specific help: It is possible to go directly to whatever you want help
Command-line editing c_ :help c_<Del>
Vim command argument - :help -r
Option ' :help 'textwidth'
Regular expression / :help /[
Search for help: Type ":help word", then hit CTRL-D to see matching
help entries for "word".
Or use ":helpgrep word". |:helpgrep|
@@ -162,7 +163,6 @@ Remarks about specific systems ~
|os_win32.txt| MS-Windows
*standard-plugin-list*
Standard plugins ~
|pi_getscript.txt| Downloading latest version of Vim scripts
|pi_gzip.txt| Reading and writing compressed files
|pi_netrw.txt| Reading and writing files over a network
|pi_paren.txt| Highlight matching parens

View File

@@ -184,12 +184,6 @@ command: >
:!xterm -e vim +help &
<
*:helpfind* *:helpf*
:helpf[ind] Like |:help|, but use a dialog to enter the argument.
Only for backwards compatibility. It now executes the
ToolBar.FindHelp menu entry instead of using a builtin
dialog. {only when compiled with |+GUI_GTK|}
*:helpt* *:helptags*
*E154* *E150* *E151* *E152* *E153* *E670*
:helpt[ags] [++t] {dir}

View File

@@ -1,4 +1,4 @@
*index.txt* For Vim version 7.4. Last change: 2015 Jan 07
*index.txt* For Vim version 7.4. Last change: 2015 Feb 12
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -700,12 +700,16 @@ tag char note action in Normal mode ~
|g'| g'{mark} 1 like |'| but without changing the jumplist
|g`| g`{mark} 1 like |`| but without changing the jumplist
|gstar| g* 1 like "*", but without using "\<" and "\>"
|g+| g+ go to newer text state N times
|g,| g, 1 go to N newer position in change list
|g-| g- go to older text state N times
|g0| g0 1 when 'wrap' off go to leftmost character of
the current line that is on the screen;
when 'wrap' on go to the leftmost character
of the current screen line
|g8| g8 print hex value of bytes used in UTF-8
character under the cursor
|g;| g; 1 go to N older position in change list
|g<| g< display previous command output
|g?| g? 2 Rot13 encoding operator
|g?g?| g?? 2 Rot13 encode current line
@@ -734,6 +738,7 @@ tag char note action in Normal mode ~
the screen; when 'wrap' on go to the
leftmost non-white character of the current
screen line
|g_| g_ 1 cursor to the last CHAR N - 1 lines lower
|ga| ga print ascii value of character under the
cursor
|gd| gd 1 go to definition of word under the cursor
@@ -1128,6 +1133,8 @@ tag command action ~
|:cc| :cc go to specific error
|:cclose| :ccl[ose] close quickfix window
|:cd| :cd change directory
|:cdo| :cdo execute command in each valid error list entry
|:cfdo| :cfdo execute command in each file in error list
|:center| :ce[nter] format lines at the center
|:cexpr| :cex[pr] read errors from expr and jump to first
|:cfile| :cf[ile] read file with error messages and jump to first
@@ -1239,7 +1246,6 @@ tag command action ~
|:hardcopy| :ha[rdcopy] send text to the printer
|:help| :h[elp] open a help window
|:helpclose| :helpc[lose] close one help window
|:helpfind| :helpf[ind] dialog to open a help window
|:helpgrep| :helpg[rep] like ":grep" but searches help files
|:helptags| :helpt[ags] generate help tags for a directory
|:highlight| :hi[ghlight] specify highlighting methods
@@ -1285,6 +1291,8 @@ tag command action ~
|:lchdir| :lch[dir] change directory locally
|:lclose| :lcl[ose] close location window
|:lcscope| :lcs[cope] like ":cscope" but uses location list
|:ldo| :ld[o] execute command in valid location list entries
|:lfdo| :lfd[o] execute command in each file in location list
|:left| :le[ft] left align lines
|:leftabove| :lefta[bove] make split window appear left or above
|:let| :let assign a value to a variable or option

View File

@@ -1941,9 +1941,9 @@ If the 'fileformats' option is not empty Vim tries to recognize the type of
changed, the detected format is only used while reading the file.
A similar thing happens with 'fileencodings'.
On non-MS-DOS and Win32 systems the message "[dos format]" is shown if
On non-Windows systems the message "[dos format]" is shown if
a file is read in DOS format, to remind you that something unusual is done.
On Macintosh, MS-DOS, and Win32 the message "[unix format]" is shown if
On Macintosh and Windows the message "[unix format]" is shown if
a file is read in Unix format.
On non-Macintosh systems, the message "[Mac format]" is shown if a file is
read in Mac format.

View File

@@ -1,4 +1,4 @@
*intro.txt* For Vim version 7.4. Last change: 2014 May 24
*intro.txt* For Vim version 7.4. Last change: 2015 Jan 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -131,7 +131,7 @@ http://www.vim.org/maillist.php
Bug reports: *bugs* *bug-reports* *bugreport.vim*
Send bug reports to: Vim Developers <vim_dev@vim.org>
Send bug reports to: Vim Developers <vim-dev@vim.org>
This is a maillist, you need to become a member first and many people will 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).
@@ -251,7 +251,7 @@ Vim would never have become what it is now, without the help of these people!
lots of patches
Ingo Wilken Tcl interface
Mike Williams PostScript printing
Juergen Weigert Lattice version, AUX improvements, UNIX and
Juergen Weigert Lattice version, AUX improvements, Unix and
MS-DOS ports, autoconf
Stefan 'Sec' Zehl Maintainer of vim.org

View File

@@ -1,4 +1,4 @@
*map.txt* For Vim version 7.4. Last change: 2014 Oct 03
*map.txt* For Vim version 7.4. Last change: 2014 Dec 08
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -43,16 +43,6 @@ features. Unfortunately, every system has its own way to deal with multibyte
languages and it is quite complicated.
COMPILING
If you already have a compiled Vim program, check if the |+multi_byte| feature
is included. The |:version| command can be used for this.
If +multi_byte is not included, you should compile Vim with "normal", "big" or
"huge" features. You can further tune what features are included. See the
INSTALL files in the source directory.
LOCALE
First of all, you must make sure your current locale is set correctly. If
@@ -107,14 +97,6 @@ is the difficult part. It depends on the system you are using, the locale and
a few other things. See the chapters on fonts: |mbyte-fonts-X11| for
X-Windows and |mbyte-fonts-MSwin| for MS-Windows.
For GTK+ 2, you can skip most of this section. The option 'guifontset' does
no longer exist. You only need to set 'guifont' and everything should "just
work". If your system comes with Xft2 and fontconfig and the current font
does not contain a certain glyph, a different font will be used automatically
if available. The 'guifontwide' option is still supported but usually you do
not need to set it. It is only necessary if the automatic font selection does
not suit your needs.
For X11 you can set the 'guifontset' option to a list of fonts that together
cover the characters that are used. Example for Korean: >
@@ -494,11 +476,6 @@ For Vim you may need to set 'encoding' to "utf-8".
Unfortunately, using fonts in X11 is complicated. The name of a single-byte
font is a long string. For multi-byte fonts we need several of these...
Note: Most of this is no longer relevant for GTK+ 2. Selecting a font via
its XLFD is not supported; see 'guifont' for an example of how to
set the font. Do yourself a favor and ignore the |XLFD| and |xfontset|
sections below.
First of all, Vim only accepts fixed-width fonts for displaying text. You
cannot use proportionally spaced fonts. This excludes many of the available
(and nicer looking) fonts. However, for menus and tooltips any font can be
@@ -629,52 +606,6 @@ If you use a wrong "font" argument you will get an error message.
Also make sure that you set 'guifontset' before setting fonts for highlight
groups.
USING RESOURCE FILES
Instead of specifying 'guifontset', you can set X11 resources and Vim will
pick them up. This is only for people who know how X resource files work.
For Motif and Athena insert these three lines in your $HOME/.Xdefaults file:
Vim.font: |base_font_name_list|
Vim*fontSet: |base_font_name_list|
Vim*fontList: your_language_font
Note: Vim.font is for text area.
Vim*fontSet is for menu.
Vim*fontList is for menu (for Motif GUI)
For example, when you are using Japanese and a 14 dots font, >
Vim.font: -misc-fixed-medium-r-normal--14-*
Vim*fontSet: -misc-fixed-medium-r-normal--14-*
Vim*fontList: -misc-fixed-medium-r-normal--14-*
<
or: >
Vim*font: k14,r14
Vim*fontSet: k14,r14
Vim*fontList: k14,r14
<
To have them take effect immediately you will have to do >
xrdb -merge ~/.Xdefaults
Otherwise you will have to stop and restart the X server before the changes
take effect.
The GTK+ version of GUI Vim does not use .Xdefaults, use ~/.gtkrc instead.
The default mostly works OK. But for the menus you might have to change
it. Example: >
style "default"
{
fontset="-*-*-medium-r-normal--14-*-*-*-c-*-*-*"
}
widget_class "*" style "default"
==============================================================================
6. Fonts on MS-Windows *mbyte-fonts-MSwin*
@@ -847,20 +778,6 @@ For example, when you are using kinput2 as |IM-server| and sh, >
export XMODIFIERS="@im=kinput2"
<
FULLY CONTROLLED XIM
You can fully control XIM, like with IME of MS-Windows (see |multibyte-ime|).
This is currently only available for the GTK GUI.
Before using fully controlled XIM, one setting is required. Set the
'imactivatekey' option to the key that is used for the activation of the input
method. For example, when you are using kinput2 + canna as IM Server, the
activation key is probably Shift+Space: >
:set imactivatekey=S-space
See 'imactivatekey' for the format.
==============================================================================
8. Input on MS-Windows *mbyte-IME*
@@ -893,14 +810,11 @@ WHAT IS IME
URL.
WHAT IS GLOBAL IME *global-ime*
Global IME makes capability to input Chinese, Japanese, and Korean text
into Vim buffer on any language version of Windows 98, Windows 95, and
Windows NT 4.0.
On Windows 2000 and XP it should work as well (without downloading). On
Windows 2000 Professional, Global IME is built in, and the Input Locales
can be added through Control Panel/Regional Options/Input Locales.
Please see below URL for detail of Global IME. You can also find various
language version of Global IME at same place.
Global IME enables input of Chinese, Japanese, and Korean text into Vim
buffer on any language version of Windows. Global IME is built in, and
the Input Locales can be added through Control Panel/Regional
Options/Input Locales. Please see below URL for detail of Global IME.
You can also find various language version of Global IME at same place.
- Global IME detailed information.
http://search.microsoft.com/results.aspx?q=global+ime
@@ -1201,14 +1115,12 @@ internally.
Vim has comprehensive UTF-8 support. It works well in:
- xterm with utf-8 support enabled
- Athena, Motif and GTK GUI
- MS-Windows GUI
- several other platforms
Double-width characters are supported. This works best with 'guifontwide' or
'guifontset'. When using only 'guifont' the wide characters are drawn in the
normal width and a space to fill the gap. Note that the 'guifontset' option
is no longer relevant in the GTK+ 2 GUI.
normal width and a space to fill the gap.
*bom-bytes*
When reading a file a BOM (Byte Order Mark) can be used to recognize the
@@ -1278,8 +1190,6 @@ doesn't always work. See the system specific remarks below, and 'langmenu'.
USING UTF-8 IN X-Windows *utf-8-in-xwindows*
Note: This section does not apply to the GTK+ 2 GUI.
You need to specify a font to be used. For double-wide characters another
font is required, which is exactly twice as wide. There are three ways to do
this:

View File

@@ -401,12 +401,6 @@ You have used an ":unabbreviate" command with an argument which is not an
existing abbreviation. All variations of this command give the same message:
":cunabbrev", ":iunabbrev", etc. Check for trailing white space.
>
/dev/dsp: No such file or directory
Only given for GTK GUI with Gnome support. Gnome tries to use the audio
device and it isn't present. You can ignore this error.
*E31* >
No such mapping

View File

@@ -26,7 +26,7 @@ are now decoupled from Nvim core as providers:
The first example is clipboard integration: in the original Vim source code,
clipboard functions account for more than 1k lines of C source code (and that
is just on ui.c), all to peform two tasks that are now accomplished with
is just on ui.c), all to perform two tasks that are now accomplished with
simple shell commands such as xclip or pbcopy/pbpaste.
The other example is Python scripting support: Vim has three files dedicated to

View File

@@ -49,6 +49,9 @@ To use Vim Python 2/3 plugins with Nvim, do the following:
>
$ pip3 install --user neovim
<
Note: If you previously installed the package, get the latest version by
appending the `--upgrade` flag to the commands above.
==============================================================================
*g:python_host_prog*

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 7.4. Last change: 2014 Dec 17
*options.txt* For Vim version 7.4. Last change: 2015 Oct 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -183,7 +183,7 @@ the option value, use '\"' instead. This example sets the 'titlestring'
option to 'hi "there"': >
:set titlestring=hi\ \"there\"
For MS-DOS and WIN32 backslashes in file names are mostly not removed. More
For Windows backslashes in file names are mostly not removed. More
precise: For options that expect a file name (those where environment
variables are expanded) a backslash before a normal file name character is not
removed. But a backslash before a special character (space, backslash, comma,
@@ -488,11 +488,11 @@ number can be specified where "vim:" or "Vim:" is used:
vim<{vers}: version before {vers}
vim={vers}: version {vers}
vim>{vers}: version after {vers}
{vers} is 600 for Vim 6.0 (hundred times the major version plus minor).
For example, to use a modeline only for Vim 6.0 and later:
/* vim600: set foldmethod=marker: */ ~
To use a modeline for Vim before version 5.7:
/* vim<570: set sw=4: */ ~
{vers} is 700 for Vim 7.0 (hundred times the major version plus minor).
For example, to use a modeline only for Vim 7.0:
/* vim700: set foldmethod=marker */ ~
To use a modeline for Vim after version 7.2:
/* vim>702: set cole=2: */ ~
There can be no blanks between "vim" and the ":".
@@ -635,9 +635,9 @@ A jump table for the options with a short description can be found at |Q_op|.
(or Vim is run inside an xterm invoked with "-cjkwidth" option.),
this option should be set to "double" to match the width perceived
by Vim with the width of glyphs in the font. Perhaps it also has
to be set to "double" under CJK Windows 9x/ME or Windows 2k/XP
when the system locale is set to one of CJK locales. See Unicode
Standard Annex #11 (http://www.unicode.org/reports/tr11).
to be set to "double" under CJK Windows XP when the system locale is
set to one of CJK locales.
See Unicode Standard Annex #11 (http://www.unicode.org/reports/tr11).
Vim may set this option automatically at startup time when Vim is
compiled with the |+termresponse| feature and if |t_u7| is set to the
@@ -772,14 +772,14 @@ A jump table for the options with a short description can be found at |Q_op|.
putting a ":gui" command in the gvimrc file, before where the value
of 'background' is used (e.g., before ":syntax on").
For MS-DOS and Windows the default is "dark".
For Windows the default is "dark".
For other systems "dark" is used when 'term' is "linux",
"screen.linux", "cygwin" or "putty", or $COLORFGBG suggests a dark
background. Otherwise the default is "light".
Normally this option would be set in the vimrc file. Possibly
depending on the terminal name. Example: >
:if &term == "pcterm"
:if &term == "xterm"
: set background=dark
:endif
< When this option is set, the default settings for the highlight groups
@@ -900,7 +900,7 @@ A jump table for the options with a short description can be found at |Q_op|.
impossible!). Writing may fail because of this.
- A directory "." means to put the backup file in the same directory
as the edited file.
- A directory starting with "./" (or ".\" for MS-DOS et al.) means to
- A directory starting with "./" (or ".\" for Windows) means to
put the backup file relative to where the edited file is. The
leading "." is replaced with the path name of the edited file.
("." inside a directory name has no special meaning).
@@ -1110,8 +1110,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'browsedir'* *'bsdir'*
'browsedir' 'bsdir' string (default: "last")
global
{only for Motif, Athena, GTK, Mac and
Win32 GUI}
{only for Mac and Win32 GUI}
Which directory to use for the file browser:
last Use same directory as with last file browser, where a
file was opened or saved.
@@ -1194,6 +1193,9 @@ A jump table for the options with a short description can be found at |Q_op|.
nofile only: The buffer name is fixed, it is not handled like a
file name. It is not modified in response to a |:cd|
command.
both: When using ":e bufname" and already editing "bufname"
the buffer is made empty and autocommands are
triggered as usual for |:edit|.
*E676*
"acwrite" implies that the buffer name is not related to a file, like
"nofile", but it will be written. Thus, in contrast to "nofile" and
@@ -2073,7 +2075,7 @@ A jump table for the options with a short description can be found at |Q_op|.
the edited file. On Unix, a dot is prepended to the file name, so
it doesn't show in a directory listing. On MS-Windows the "hidden"
attribute is set and a dot prepended if possible.
- A directory starting with "./" (or ".\" for MS-DOS et al.) means to
- A directory starting with "./" (or ".\" for Windows) means to
put the swap file relative to where the edited file is. The leading
"." is replaced with the path name of the edited file.
- For Unix and Win32, if a directory ends in two path separators "//"
@@ -2129,7 +2131,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'edcompatible' 'ed' Removed. |vim-differences| {Nvim}
*'encoding'* *'enc'* *E543*
'encoding' 'enc' string (default: "utf-8" or value from $LANG)
'encoding' 'enc' string (default: "utf-8")
global
{only available when compiled with the |+multi_byte|
feature}
@@ -2151,10 +2153,6 @@ A jump table for the options with a short description can be found at |Q_op|.
can use: >
if has("multi_byte_encoding")
<
Normally 'encoding' will be equal to your current locale. This will
be the default if Vim recognizes your environment settings, otherwise
"utf-8" is used.
When you set this option, it fires the |EncodingChanged| autocommand
event so that you can set up fonts if necessary.
@@ -2171,22 +2169,20 @@ A jump table for the options with a short description can be found at |Q_op|.
setting 'encoding' to one of these values instead of utf-8 only has
effect for encoding used for files when 'fileencoding' is empty.
When 'encoding' is set to a Unicode encoding, and 'fileencodings' was
not set yet, the default for 'fileencodings' is changed.
*'endofline'* *'eol'* *'noendofline'* *'noeol'*
'endofline' 'eol' boolean (default on)
local to buffer
When writing a file and this option is off and the 'binary' option
is on, no <EOL> will be written for the last line in the file. This
option is automatically set when starting to edit a new file, unless
the file does not have an <EOL> for the last line in the file, in
which case it is reset. Normally you don't have to set or reset this
option. When 'binary' is off the value is not used when writing the
file. When 'binary' is on it is used to remember the presence of a
<EOL> for the last line in the file, so that when you write the file
the situation from the original file can be kept. But you can change
it if you want to.
is on, or 'fixeol' option is off, no <EOL> will be written for the
last line in the file. This option is automatically set or reset when
starting to edit a new file, depending on whether file has an <EOL>
for the last line in the file. Normally you don't have to set or
reset this option.
When 'binary' is off and 'fixeol' is on the value is not used when
writing the file. When 'binary' is on or 'fixeol' is off it is used
to remember the presence of a <EOL> for the last line in the file, so
that when you write the file the situation from the original file can
be kept. But you can change it if you want to.
*'equalalways'* *'ea'* *'noequalalways'* *'noea'*
'equalalways' 'ea' boolean (default on)
@@ -2343,9 +2339,7 @@ A jump table for the options with a short description can be found at |Q_op|.
old short name was 'fe', which is no longer used.
*'fileencodings'* *'fencs'*
'fileencodings' 'fencs' string (default: "ucs-bom",
"ucs-bom,utf-8,default,latin1" when
'encoding' is set to a Unicode value)
'fileencodings' 'fencs' string (default: "ucs-bom,utf-8,default,latin1")
global
{only available when compiled with the |+multi_byte|
feature}
@@ -2385,9 +2379,8 @@ A jump table for the options with a short description can be found at |Q_op|.
because Vim cannot detect an error, thus the encoding is always
accepted.
The special value "default" can be used for the encoding from the
environment. This is the default value for 'encoding'. It is useful
when 'encoding' is set to "utf-8" and your environment uses a
non-latin1 encoding, such as Russian.
environment. It is useful when 'encoding' is set to "utf-8" and
your environment uses a non-latin1 encoding, such as Russian.
When 'encoding' is "utf-8" and a file contains an illegal byte
sequence it won't be recognized as UTF-8. You can use the |8g8|
command to find the illegal byte sequence.
@@ -2402,7 +2395,7 @@ A jump table for the options with a short description can be found at |Q_op|.
is read.
*'fileformat'* *'ff'*
'fileformat' 'ff' string (MS-DOS and MS-Windows default: "dos",
'fileformat' 'ff' string (Windows default: "dos",
Unix default: "unix",
Macintosh default: "mac")
local to buffer
@@ -2446,8 +2439,8 @@ A jump table for the options with a short description can be found at |Q_op|.
2. If a <NL> is found and 'fileformats' includes "unix", 'fileformat'
is set to "unix". Note that when a <NL> is found without a
preceding <CR>, "unix" is preferred over "dos".
3. If 'fileformat' has not yet been set, and if 'fileformats'
includes "mac", 'fileformat' is set to "mac".
3. If 'fileformat' has not yet been set, and if a <CR> is found, and
if 'fileformats' includes "mac", 'fileformat' is set to "mac".
This means that "mac" is only chosen when:
"unix" is not present or no <NL> is found in the file, and
"dos" is not present or no <CR><NL> is found in the file.
@@ -2541,6 +2534,17 @@ A jump table for the options with a short description can be found at |Q_op|.
fold:c Folded |hl-Folded|
diff:c DiffDelete |hl-DiffDelete|
*'fixendofline'* *'fixeol'* *'nofixendofline'* *'nofixeol'*
'fixendofline' 'fixeol' boolean (default on)
local to buffer
{not in Vi}
When writing a file and this option is on, <EOL> at the end of file
will be restored if missing. Turn this option off if you want to
preserve the situation from the original file.
When the 'binary' option is set the value of this option doesn't
matter.
See the 'endofline' option.
*'fkmap'* *'fk'* *'nofkmap'* *'nofk'*
'fkmap' 'fk' boolean (default off) *E198*
global
@@ -2808,10 +2812,7 @@ A jump table for the options with a short description can be found at |Q_op|.
written even on filesystems which do metadata-only journaling. This
will force the harddrive to spin up on Linux systems running in laptop
mode, so it may be undesirable in some situations. Be warned that
turning this off increases the chances of data loss after a crash. On
systems without an fsync() implementation, this variable is always
off.
Also see 'swapsync' for controlling fsync() on swap files.
turning this off increases the chances of data loss after a crash.
*'gdefault'* *'gd'* *'nogdefault'* *'nogd'*
'gdefault' 'gd' boolean (default off)
@@ -2864,14 +2865,14 @@ A jump table for the options with a short description can be found at |Q_op|.
r-cr:hor20-Cursor/lCursor,
sm:block-Cursor
-blinkwait175-blinkoff150-blinkon175",
for MS-DOS and Win32 console:
for Windows console:
"n-v-c:block,o:hor50,i-ci:hor15,
r-cr:hor30,sm:block")
global
{only available when compiled with GUI enabled, and
for MS-DOS and Win32 console}
for Windows console}
This option tells Vim what the cursor should look like in different
modes. It fully works in the GUI. In an MSDOS or Win32 console, only
modes. It fully works in the GUI. In a Windows console, only
the height of the cursor can be changed. This can be done by
specifying a block cursor, or a percentage for a vertical or
horizontal cursor.
@@ -2970,28 +2971,18 @@ A jump table for the options with a short description can be found at |Q_op|.
the case of X). The font names given should be "normal" fonts. Vim
will try to find the related bold and italic fonts.
For Win32, GTK, Motif, and Mac OS: >
For Win32 and Mac OS: >
:set guifont=*
< will bring up a font requester, where you can pick the font you want.
The font name depends on the GUI used. See |setting-guifont| for a
way to set 'guifont' for various systems.
For the GTK+ 2 GUI the font name looks like this: >
:set guifont=Andale\ Mono\ 11
< That's all. XLFDs are not used. For Chinese this is reported to work
well: >
if has("gui_gtk2")
set guifont=Bitstream\ Vera\ Sans\ Mono\ 12,Fixed\ 12
set guifontwide=Microsoft\ Yahei\ 12,WenQuanYi\ Zen\ Hei\ 12
endif
<
For Mac OSX you can use something like this: >
:set guifont=Monaco:h10
< *E236*
Note that the fonts must be mono-spaced (all characters have the same
width). An exception is GTK 2: all fonts are accepted, but
mono-spaced fonts look best.
width).
To preview a font on X11, you might be able to use the "xfontsel"
program. The "xlsfonts" program gives a list of all available fonts.
@@ -3024,7 +3015,6 @@ A jump table for the options with a short description can be found at |Q_op|.
global
{only available when compiled with GUI enabled and
with the |+xfontset| feature}
{not available in the GTK+ 2 GUI}
When not empty, specifies two (or more) fonts to be used. The first
one for normal English, the second one for your special language. See
|xfontset|.
@@ -3052,24 +3042,12 @@ A jump table for the options with a short description can be found at |Q_op|.
Note: The size of these fonts must be exactly twice as wide as the one
specified with 'guifont' and the same height.
All GUI versions but GTK+ 2:
'guifontwide' is only used when 'encoding' is set to "utf-8" and
'guifontset' is empty or invalid.
When 'guifont' is set and a valid font is found in it and
'guifontwide' is empty Vim will attempt to find a matching
double-width font and set 'guifontwide' to it.
GTK+ 2 GUI only: *guifontwide_gtk2*
If set and valid, 'guifontwide' is always used for double width
characters, even if 'encoding' is not set to "utf-8".
Vim does not attempt to find an appropriate value for 'guifontwide'
automatically. If 'guifontwide' is empty Pango/Xft will choose the
font for characters not available in 'guifont'. Thus you do not need
to set 'guifontwide' at all unless you want to override the choice
made by Pango/Xft.
Windows +multibyte only: *guifontwide_win_mbyte*
If set and valid, 'guifontwide' is used for IME instead of 'guifont'.
@@ -3077,7 +3055,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'guiheadroom'* *'ghr'*
'guiheadroom' 'ghr' number (default 50)
global
{only for GTK and X11 GUI}
{only for X11 GUI}
The number of pixels subtracted from the screen height when fitting
the GUI window on the screen. Set this before the GUI is started,
e.g., in your |gvimrc| file. When zero, the whole screen height will
@@ -3087,8 +3065,7 @@ A jump table for the options with a short description can be found at |Q_op|.
screen.
*'guioptions'* *'go'*
'guioptions' 'go' string (default "egmrLT" (MS-Windows),
"aegimrLT" (GTK, Motif and Athena))
'guioptions' 'go' string (default "egmrLT" (MS-Windows))
global
{only available when compiled with GUI enabled}
This option only has an effect in the GUI version of Vim. It is a
@@ -3134,10 +3111,9 @@ A jump table for the options with a short description can be found at |Q_op|.
'guitablabel' can be used to change the text in the labels.
When 'e' is missing a non-GUI tab pages line may be used.
The GUI tabs are only supported on some systems, currently
GTK, Motif, Mac OS/X and MS-Windows.
Mac OS/X and MS-Windows.
*'go-i'*
'i' Use a Vim icon. For GTK with KDE it is used in the left-upper
corner of the window.
'i' Use a Vim icon.
*'go-m'*
'm' Menu bar is present.
*'go-M'*
@@ -3149,10 +3125,8 @@ A jump table for the options with a short description can be found at |Q_op|.
*'go-g'*
'g' Grey menu items: Make menu items that are not active grey. If
'g' is not included inactive menu items are not shown at all.
Exception: Athena will always use grey menu items.
*'go-T'*
'T' Include Toolbar. Currently only in Win32, GTK+, Motif,
and Athena GUIs.
'T' Include Toolbar. Currently only in Win32 GUI.
*'go-r'*
'r' Right-hand scrollbar is always present.
*'go-R'*
@@ -3184,8 +3158,6 @@ A jump table for the options with a short description can be found at |Q_op|.
the right moment, try adding this flag. This must be done
before starting the GUI. Set it in your |gvimrc|. Adding or
removing it after the GUI has started has no effect.
*'go-F'*
'F' Add a footer. Only for Motif. See |gui-footer|.
*'guipty'* *'noguipty'*
@@ -3438,54 +3410,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|/ignorecase|.
*'imactivatefunc'* *'imaf'*
'imactivatefunc' 'imaf' string (default "")
global
{only available when compiled with |+xim| and
|+GUI_GTK|}
This option specifies a function that will be called to
activate/inactivate Input Method.
'imactivatefunc' 'imaf' Removed. |vim-differences| {Nvim}
Example: >
function ImActivateFunc(active)
if a:active
... do something
else
... do something
endif
" return value is not used
endfunction
set imactivatefunc=ImActivateFunc
<
*'imactivatekey'* *'imak'*
'imactivatekey' 'imak' string (default "")
global
{only available when compiled with |+xim| and
|+GUI_GTK|} *E599*
Specifies the key that your Input Method in X-Windows uses for
activation. When this is specified correctly, vim can fully control
IM with 'imcmdline', 'iminsert' and 'imsearch'.
You can't use this option to change the activation key, the option
tells Vim what the key is.
Format:
[MODIFIER_FLAG-]KEY_STRING
These characters can be used for MODIFIER_FLAG (case is ignored):
S Shift key
L Lock key
C Control key
1 Mod1 key
2 Mod2 key
3 Mod3 key
4 Mod4 key
5 Mod5 key
Combinations are allowed, for example "S-C-space" or "SC-space" are
both shift+ctrl+space.
See <X11/keysymdef.h> and XStringToKeysym for KEY_STRING.
Example: >
:set imactivatekey=S-space
< "S-space" means shift+space. This is the activation key for kinput2 +
canna (Japanese), and ami (Korean).
'imactivatekey' 'imak' Removed. |vim-differences| {Nvim}
*'imcmdline'* *'imc'* *'noimcmdline'* *'noimc'*
'imcmdline' 'imc' boolean (default off)
@@ -3527,8 +3455,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|i_CTRL-^|.
The value is set to 1 when setting 'keymap' to a valid keymap name.
It is also used for the argument of commands like "r" and "f".
The value 0 may not work correctly with Athena and Motif with some XIM
methods. Use 'imdisable' to disable XIM then.
*'imsearch'* *'ims'*
'imsearch' 'ims' number (default 0, 2 when an input method is supported)
@@ -3544,25 +3470,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|c_CTRL-^|.
The value is set to 1 when it is not -1 and setting the 'keymap'
option to a valid keymap name.
The value 0 may not work correctly with Athena and Motif with some XIM
methods. Use 'imdisable' to disable XIM then.
*'imstatusfunc'* *'imsf'*
'imstatusfunc' 'imsf' string (default "")
global
{only available when compiled with |+xim| and
|+GUI_GTK|}
This option specifies a function that is called to obtain the status
of Input Method. It must return a positive number when IME is active.
Example: >
function ImStatusFunc()
let is_active = ...do something
return is_active ? 1 : 0
endfunction
set imstatusfunc=ImStatusFunc
<
NOTE: This function is invoked very often. Keep it fast.
'imstatusfunc' 'imsf' Removed. |vim-differences| {Nvim}
*'include'* *'inc'*
'include' 'inc' string (default "^\s*#\s*include")
@@ -3704,7 +3614,7 @@ A jump table for the options with a short description can be found at |Q_op|.
When executing commands with |:normal| 'insertmode' is not used.
*'isfname'* *'isf'*
'isfname' 'isf' string (default for MS-DOS and Win32:
'isfname' 'isf' string (default for Windows:
"@,48-57,/,\,.,-,_,+,,,#,$,%,{,},[,],:,@-@,!,~,="
otherwise: "@,48-57,/,.,-,_,+,,,#,$,%,~,=")
global
@@ -3755,7 +3665,7 @@ A jump table for the options with a short description can be found at |Q_op|.
See |option-backslash| about including spaces and backslashes.
*'isident'* *'isi'*
'isident' 'isi' string (default for MS-DOS and Win32:
'isident' 'isi' string (default for Windows:
"@,48-57,_,128-167,224-235"
otherwise: "@,48-57,_,192-255")
global
@@ -3770,10 +3680,8 @@ A jump table for the options with a short description can be found at |Q_op|.
change 'iskeyword' instead.
*'iskeyword'* *'isk'*
'iskeyword' 'isk' string (Vim default for
Win32: @,48-57,_,128-167,224-235
otherwise: @,48-57,_,192-255
Vi default: @,48-57,_)
'iskeyword' 'isk' string (default: @,48-57,_,192-255
Vi default: @,48-57,_)
local to buffer
Keywords are used in searching and recognizing with many commands:
"w", "*", "[i", etc. It is also used for "\k" in a |pattern|. See
@@ -3785,8 +3693,7 @@ A jump table for the options with a short description can be found at |Q_op|.
When the 'lisp' option is on the '-' character is always included.
*'isprint'* *'isp'*
'isprint' 'isp' string (default for MS-DOS, Win32, and Macintosh:
"@,~-255"; otherwise: "@,161-255")
'isprint' 'isp' string (default: "@,161-255")
global
The characters given by this option are displayed directly on the
screen. It is also used for "\p" in a |pattern|. The characters from
@@ -4077,8 +3984,9 @@ A jump table for the options with a short description can be found at |Q_op|.
conceal:c Character to show in place of concealed text, when
'conceallevel' is set to 1. A space when omitted.
*lcs-nbsp*
nbsp:c Character to show for a non-breakable space (character
0xA0, 160). Left blank when omitted.
nbsp:c Character to show for a non-breakable space character
(0xA0 (160 decimal) and U+202F). Left blank when
omitted.
The characters ':' and ',' should not be used. UTF-8 characters can
be used when 'encoding' is "utf-8", otherwise only printable
@@ -4381,7 +4289,7 @@ A jump table for the options with a short description can be found at |Q_op|.
The mouse pointer is restored when the mouse is moved.
*'mousemodel'* *'mousem'*
'mousemodel' 'mousem' string (default "extend", "popup" for MS-DOS and Win32)
'mousemodel' 'mousem' string (default "extend", "popup" for Windows)
global
Sets the model to use for the mouse. The name mostly specifies what
the right mouse button is used for:
@@ -4483,12 +4391,12 @@ A jump table for the options with a short description can be found at |Q_op|.
*'mousetime'* *'mouset'*
'mousetime' 'mouset' number (default 500)
global
Only for GUI, MS-DOS, Win32 and Unix with xterm. Defines the maximum
Only for GUI, Windows and Unix with xterm. Defines the maximum
time in msec between two mouse clicks for the second click to be
recognized as a multi click.
*'nrformats'* *'nf'*
'nrformats' 'nf' string (default "hex")
'nrformats' 'nf' string (default "bin,hex")
local to buffer
This defines what bases Vim will consider for numbers when using the
CTRL-A and CTRL-X commands for adding to and subtracting from a number
@@ -4501,6 +4409,9 @@ A jump table for the options with a short description can be found at |Q_op|.
hex If included, numbers starting with "0x" or "0X" will be
considered to be hexadecimal. Example: Using CTRL-X on
"0x100" results in "0x0ff".
bin If included, numbers starting with "0b" or "0B" will be
considered to be binary. Example: Using CTRL-X on
"0b1000" subtracts one, resulting in "0b0111".
Numbers which simply begin with a digit in the range 1-9 are always
considered decimal. This also happens for numbers that are not
recognized as octal or hex.
@@ -4564,11 +4475,11 @@ A jump table for the options with a short description can be found at |Q_op|.
*'opendevice'* *'odev'* *'noopendevice'* *'noodev'*
'opendevice' 'odev' boolean (default off)
global
{only for MS-DOS and MS-Windows}
{only for Windows}
Enable reading and writing from devices. This may get Vim stuck on a
device that can be opened but doesn't actually do the I/O. Therefore
it is off by default.
Note that on MS-Windows editing "aux.h", "lpt1.txt" and the like also
Note that on Windows editing "aux.h", "lpt1.txt" and the like also
result in editing a device.
@@ -4934,18 +4845,7 @@ A jump table for the options with a short description can be found at |Q_op|.
instead of the number of lines.
*'restorescreen'* *'rs'* *'norestorescreen'* *'nors'*
'restorescreen' 'rs' boolean (default on)
global
{only in Windows 95/NT console version}
When set, the screen contents is restored when exiting Vim. This also
happens when executing external commands.
For non-Windows Vim: You can set or reset the 't_ti' and 't_te'
options in your vimrc. To disable restoring:
set t_ti= t_te=
To enable restoring (for an xterm):
set t_ti=^[7^[[r^[[?47h t_te=^[[?47l^[8
(Where ^[ is an <Esc>, type CTRL-V <Esc> to insert it)
'restorescreen' 'rs' Removed. |vim-differences| {Nvim}
*'revins'* *'ri'* *'norevins'* *'nori'*
'revins' 'ri' boolean (default off)
@@ -5353,7 +5253,7 @@ A jump table for the options with a short description can be found at |Q_op|.
r Removable media. The argument is a string (up to the next
','). This parameter can be given several times. Each
specifies the start of a path for which no marks will be
stored. This is to avoid removable media. For MS-DOS you
stored. This is to avoid removable media. For Windows you
could use "ra:,rb:". You can also use it for temp files,
e.g., for Unix: "r/tmp". Case is ignored.
*shada-s*
@@ -5391,8 +5291,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'shell'* *'sh'* *E91*
'shell' 'sh' string (default $SHELL or "sh",
MS-DOS and Win32: "command.com" or
"cmd.exe")
Windows: "cmd.exe")
global
Name of the shell to use for ! and :! commands. When changing the
value also check these options: 'shellpipe', 'shellslash'
@@ -5403,27 +5302,50 @@ A jump table for the options with a short description can be found at |Q_op|.
If the name of the shell contains a space, you might need to enclose
it in quotes. Example: >
:set shell=\"c:\program\ files\unix\sh.exe\"\ -f
< Note the backslash before each quote (to avoid starting a comment) and
each space (to avoid ending the option value). Also note that the
"-f" is not inside the quotes, because it is not part of the command
name. And Vim automagically recognizes the backslashes that are path
separators.
< Note the backslash before each quote (to avoid starting a comment) and
each space (to avoid ending the option value), so better use |:let-&|
like this: >
:let &shell='"C:\Program Files\unix\sh.exe" -f'
< Also note that the "-f" is not inside the quotes, because it is not
part of the command name.
*shell-unquoting*
Rules regarding quotes:
1. Option is split on space and tab characters that are not inside
quotes: "abc def" runs shell named "abc" with additional argument
"def", '"abc def"' runs shell named "abc def" with no additional
arguments (here and below: additional means “additional to
'shellcmdflag'”).
2. Quotes in option may be present in any position and any number:
'"abc"', '"a"bc', 'a"b"c', 'ab"c"' and '"a"b"c"' are all equivalent
to just "abc".
3. Inside quotes backslash preceding backslash means one backslash.
Backslash preceding quote means one quote. Backslash preceding
anything else means backslash and next character literally:
'"a\\b"' is the same as "a\b", '"a\\"b"' runs shell named literally
'a"b', '"a\b"' is the same as "a\b" again.
4. Outside of quotes backslash always means itself, it cannot be used
to escape quote: 'a\"b"' is the same as "a\b".
Note that such processing is done after |:set| did its own round of
unescaping, so to keep yourself sane use |:let-&| like shown above.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'shellcmdflag'* *'shcf'*
'shellcmdflag' 'shcf' string (default: "-c";
MS-DOS and Win32, when 'shell' does not
Windows, when 'shell' does not
contain "sh" somewhere: "/c")
global
Flag passed to the shell to execute "!" and ":!" commands; e.g.,
"bash.exe -c ls" or "command.com /c dir". For the MS-DOS-like
"bash.exe -c ls" or "cmd.exe /c dir". For Windows
systems, the default is set according to the value of 'shell', to
reduce the need to set this option by the user.
On Unix it can have more than one flag. Each white space separated
part is passed as an argument to the shell command.
See |option-backslash| about including spaces and backslashes.
Also see |dos-shell| for MS-DOS and MS-Windows.
See |shell-unquoting| which talks about separating this option into
multiple arguments.
Also see |dos-shell| for Windows.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
@@ -5438,7 +5360,7 @@ A jump table for the options with a short description can be found at |Q_op|.
The name of the temporary file can be represented by "%s" if necessary
(the file name is appended automatically if no %s appears in the value
of this option).
For MS-DOS the default is ">". The output is directly saved in a file
For Windows the default is ">". The output is directly saved in a file
and not echoed to the screen.
For Unix the default it "| tee". The stdout of the compiler is saved
in a file and echoed to the screen. If the 'shell' option is "csh" or
@@ -5462,7 +5384,7 @@ A jump table for the options with a short description can be found at |Q_op|.
security reasons.
*'shellquote'* *'shq'*
'shellquote' 'shq' string (default: ""; MS-DOS and Win32, when 'shell'
'shellquote' 'shq' string (default: ""; Windows, when 'shell'
contains "sh" somewhere: "\"")
global
Quoting character(s), put around the command passed to the shell, for
@@ -5470,7 +5392,7 @@ A jump table for the options with a short description can be found at |Q_op|.
quoting. See 'shellxquote' to include the redirection. It's
probably not useful to set both options.
This is an empty string by default. Only known to be useful for
third-party shells on MS-DOS-like systems, such as the MKS Korn Shell
third-party shells on Windows systems, such as the MKS Korn Shell
or bash, where it should be "\"". The default is adjusted according
the value of 'shell', to reduce the need to set this option by the
user. See |dos-shell|.
@@ -5535,7 +5457,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'shellxescape'* *'sxe'*
'shellxescape' 'sxe' string (default: "";
for MS-DOS and MS-Windows: "\"&|<>()@^")
for Windows: "\"&|<>()@^")
global
When 'shellxquote' is set to "(" then the characters listed in this
option will be escaped with a '^' character. This makes it possible
@@ -5704,8 +5626,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Use the 'M' flag in 'highlight' to set the type of highlighting for
this message.
When |XIM| may be used the message will include "XIM". But this
doesn't mean XIM is really active, especially when 'imactivatekey' is
not set.
doesn't mean XIM is really active.
*'showtabline'* *'stal'*
'showtabline' 'stal' number (default 1)
@@ -6090,11 +6011,39 @@ A jump table for the options with a short description can be found at |Q_op|.
( - Start of item group. Can be used for setting the width and
alignment of a section. Must be followed by %) somewhere.
) - End of item group. No width fields allowed.
T N For 'tabline': start of tab page N label. Use %T after the last
label. This information is used for mouse clicks.
X N For 'tabline': start of close tab N label. Use %X after the
label, e.g.: %3Xclose%X. Use %999X for a "close current tab"
mark. This information is used for mouse clicks.
T N For 'tabline': start of tab page N label. Use %T or %X to end
the label. Clicking this label with left mouse button switches
to the specified tab page.
X N For 'tabline': start of close tab N label. Use %X or %T to end
the label, e.g.: %3Xclose%X. Use %999X for a "close current
tab" label. Clicking this label with left mouse button closes
specified tab page.
@ N For 'tabline': start of execute function label. Use %X or %T to
end the label, e.g.: %10@SwitchBuffer@foo.c%X. Clicking this
label runs specified function: in the example when clicking once
using left mouse button on "foo.c" "SwitchBuffer(10, 1, 'l',
' ')" expression will be run. Function receives the
following arguments in order:
1. minwid field value or zero if no N was specified
2. number of mouse clicks to detect multiple clicks
3. mouse button used: "l", "r" or "m" for left, right or middle
button respectively; one should not rely on third argument
being only "l", "r" or "m": any other non-empty string value
that contains only ASCII lower case letters may be expected
for other mouse buttons
4. modifiers pressed: string which contains "s" if shift
modifier was pressed, "c" for control, "a" for alt and "m"
for meta; currently if modifier is not pressed string
contains space instead, but one should not rely on presence
of spaces or specific order of modifiers: use |stridx()| to
test whether some modifier is present; string is guaranteed
to contain only ASCII letters and spaces, one letter per
modifier; "?" modifier may also be present, but its presence
is a bug that denotes that new mouse button recognition was
added without modifying code that reacts on mouse clicks on
this label.
Note: to test whether your version of Neovim contains this
feature use `has('tablineat')`.
< - Where to truncate line if too long. Default is at the start.
No width fields allowed.
= - Separation point between left and right aligned items.
@@ -6201,7 +6150,7 @@ A jump table for the options with a short description can be found at |Q_op|.
When 'swapfile' is reset, the swap file for the current buffer is
immediately deleted. When 'swapfile' is set, and 'updatecount' is
non-zero, a swap file is immediately created.
Also see |swap-file| and |'swapsync'|.
Also see |swap-file|.
If you want to open a new buffer without creating a swap file for it,
use the |:noswapfile| modifier.
@@ -6209,18 +6158,7 @@ A jump table for the options with a short description can be found at |Q_op|.
specify special kinds of buffers. See |special-buffers|.
*'swapsync'* *'sws'*
'swapsync' 'sws' string (default "fsync")
global
When this option is not empty a swap file is synced to disk after
writing to it. This takes some time, especially on busy unix systems.
When this option is empty parts of the swap file may be in memory and
not written to disk. When the system crashes you may lose more work.
On Unix the system does a sync now and then without Vim asking for it,
so the disadvantage of setting this option off is small. On some
systems the swap file will not be written at all. For a unix system
setting it to "sync" will use the sync() call instead of the default
fsync(), which may work better on some systems.
The 'fsync' option is used for the actual file.
'swapsync' 'sws' Removed. |vim-differences| {Nvim}
*'switchbuf'* *'swb'*
'switchbuf' 'swb' string (default "")
@@ -6435,9 +6373,8 @@ A jump table for the options with a short description can be found at |Q_op|.
'term' string (default is $TERM, if that fails:
in the GUI: "builtin_gui"
on Mac: "mac-ansi"
on MS-DOS: "pcterm"
on Unix: "ansi"
on Win 32: "win32")
on Windows: "win32")
global
Name of the terminal. Used for choosing the terminal control
characters. Environment variables are expanded |:set_env|.
@@ -6707,7 +6644,6 @@ A jump table for the options with a short description can be found at |Q_op|.
When 'updatecount' is set from zero to non-zero, swap files are
created for all buffers that have 'swapfile' set. When 'updatecount'
is set to zero, existing swap files are not deleted.
Also see |'swapsync'|.
This option has no meaning in buffers where |'buftype'| is "nofile"
or "nowrite".
@@ -7011,7 +6947,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'winaltkeys'* *'wak'*
'winaltkeys' 'wak' string (default "menu")
global
{only used in Win32, Motif, and GTK}
{only used in Win32}
Some GUI versions allow the access to menu entries by using the ALT
key in combination with a character that appears underlined in the
menu. This conflicts with the use of the ALT key for mappings and
@@ -7026,8 +6962,7 @@ A jump table for the options with a short description can be found at |Q_op|.
keys can be mapped.
If the menu is disabled by excluding 'm' from 'guioptions', the ALT
key is never used for the menu.
This option is not used for <F10>; on Win32 and with GTK <F10> will
select the menu, unless it has been mapped.
This option is not used for <F10>; on Win32.
*'window'* *'wi'*
'window' 'wi' number (default screen height - 1)
@@ -7195,6 +7130,6 @@ A jump table for the options with a short description can be found at |Q_op|.
global
The number of microseconds to wait for each character sent to the
screen. When non-zero, characters are sent to the terminal one by
one. For MS-DOS pcterm this does not work. For debugging purposes.
one. For debugging purposes.
vim:tw=78:ts=8:ft=help:noet:norl:

View File

@@ -52,12 +52,9 @@ Will find "c:\user\piet\_vimrc" and the runtime files in "e:\vim\vim54".
See |$VIM| and |$VIMRUNTIME| for more information.
Under Windows 95, you can set $VIM in your C:\autoexec.bat file. For
example: >
set VIM=D:\vim
Under Windows NT, you can set environment variables for each user separately
under "Start/Settings/Control Panel->System", or through the properties in the
menu of "My Computer", under the Environment Tab.
You can set environment variables for each user separately under
"Start/Settings/Control Panel->System", or through the properties in the menu
of "My Computer", under the Environment Tab.
==============================================================================
2. Using backslashes *dos-backslash*
@@ -246,16 +243,6 @@ the CTRL-C until it tries to read a key.
==============================================================================
8. Temp files *dos-temp-files*
Only for the 16 bit and 32 bit DOS version:
Vim puts temporary files (for filtering) in the first of these directories
that exists and in which Vim can create a file:
$TMP
$TEMP
C:\TMP
C:\TEMP
current directory
For the Win32 version (both console and GUI):
Vim uses standard Windows functions to obtain a temporary file name (for
filtering). The first of these directories that exists and in which Vim can
create a file is used:
@@ -266,10 +253,10 @@ create a file is used:
==============================================================================
9. Shell option default *dos-shell*
The default for the 'sh' ('shell') option is "command.com" on Windows 95 and
"cmd.exe" on Windows NT. If SHELL is defined, Vim uses SHELL instead, and if
SHELL is not defined but COMSPEC is, Vim uses COMSPEC. Vim starts external
commands with "<shell> /c <command_name>". Typing CTRL-Z starts a new command
The default for the 'sh' ('shell') option is "cmd.exe" on Windows.
If SHELL is defined, Vim uses SHELL instead, and if SHELL is not defined
but COMSPEC is, Vim uses COMSPEC. Vim starts external commands with
"<shell> /c <command_name>". Typing CTRL-Z starts a new command
subshell. Return to Vim with "exit". |'shell'| |CTRL-Z|
If you are running a third-party shell, you may need to set the

View File

@@ -7,17 +7,15 @@
*win32* *Win32* *MS-Windows*
This file documents the idiosyncrasies of the Win32 version of Vim.
The Win32 version of Vim works on Windows NT, XP, Vista and Windows 7.
The Win32 version of Vim works on Windows XP, Vista and Windows 7.
There are both console and GUI versions.
The 32 bit version also runs on 64 bit MS-Windows systems.
1. Known problems |win32-problems|
2. Startup |win32-startup|
3. Restore screen contents |win32-restore|
4. Using the mouse |win32-mouse|
5. Running under Windows 3.1 |win32-win3.1|
6. Win32 mini FAQ |win32-faq|
3. Using the mouse |win32-mouse|
4. Win32 mini FAQ |win32-faq|
Additionally, there are a number of common Win32 and DOS items:
File locations |dos-locations|
@@ -34,7 +32,6 @@ Win32 GUI |gui-w32|
Credits:
The Win32 version was written by George V. Reilly <george@reilly.org>.
The original Windows NT port was done by Roger Knobbe <RogerK@wonderware.com>.
The GUI version was made by George V. Reilly and Robert Webb.
==============================================================================
@@ -79,14 +76,7 @@ make "!xxd" work, as it is in the Tools menu. And it also means that when
executable() returns 1 the executable can actually be executed.
==============================================================================
3. Restore screen contents *win32-restore*
When 'restorescreen' is set (which is the default), Vim will restore the
original contents of the console when exiting or when executing external
commands. If you don't want this, use ":set nors". |'restorescreen'|
==============================================================================
4. Using the mouse *win32-mouse*
3. Using the mouse *win32-mouse*
The Win32 version of Vim supports using the mouse. If you have a two-button
mouse, the middle button can be emulated by pressing both left and right
@@ -98,35 +88,7 @@ When the mouse doesn't work, try disabling the "Quick Edit Mode" feature of
the console.
==============================================================================
5. Running under Windows 3.1 *win32-win3.1*
*win32s* *windows-3.1*
There is a special version of Gvim that runs under Windows 3.1 and 3.11. You
need the gvim.exe that was compiled with Visual C++ 4.1.
To run the Win32 version under Windows 3.1, you need to install Win32s. You
might have it already from another Win32 application which you have installed.
If Vim doesn't seem to be running properly, get the latest version: 1.30c.
You can find it at:
http://support.microsoft.com/download/support/mslfiles/pw1118.exe
(Microsoft moved it again, we don't know where it is now :-( ).
The reason for having two versions of gvim.exe is that the Win32s version was
compiled with VC++ 4.1. This is the last version of VC++ that supports Win32s
programs. VC++ 5.0 is better, so that one was used for the Win32 version.
Apart from that, there is no difference between the programs. If you are in a
mixed environment, you can use the gvim.exe for Win32s on both.
The Win32s version works the same way as the Win32 version under 95/NT. When
running under Win32s the following differences apply:
- You cannot use long file names, because Windows 3.1 doesn't support them!
- When executing an external command, it doesn't return an exit code. After
doing ":make" you have to do ":cn" yourself.
==============================================================================
6. Win32 mini FAQ *win32-faq*
4. Win32 mini FAQ *win32-faq*
Q. How do I change the font?
A. In the GUI version, you can use the 'guifont' option. Example: >
@@ -134,14 +96,6 @@ A. In the GUI version, you can use the 'guifont' option. Example: >
< In the console version, you need to set the font of the console itself.
You cannot do this from within Vim.
Q. How do I type dead keys on Windows NT?
A. Dead keys work on NT 3.51. Just type them as you would in any other
application.
On NT 4.0, you need to make sure that the default locale (set in the
Keyboard part of the Control Panel) is the same as the currently active
locale. Otherwise the NT code will get confused and crash! This is a NT
4.0 problem, not really a Vim problem.
Q. I'm using Vim to edit a symbolically linked file on a Unix NFS file server.
When I write the file, Vim does not "write through" the symlink. Instead,
it deletes the symbolic link and creates a new file in its place. Why?
@@ -176,28 +130,6 @@ A. Basically what you need is to put a tee program that will copy its input
:set shellpipe=\|\ tee
< to your _vimrc.
Q. I'm storing files on a remote machine that works with VisionFS, and files
disappear!
A. VisionFS can't handle certain dot (.) three letter extension file names.
SCO declares this behavior required for backwards compatibility with 16bit
DOS/Windows environments. The two commands below demonstrate the behavior:
>
echo Hello > file.bat~
dir > file.bat
<
The result is that the "dir" command updates the "file.bat~" file, instead
of creating a new "file.bat" file. This same behavior is exhibited in Vim
when editing an existing file named "foo.bat" because the default behavior
of Vim is to create a temporary file with a '~' character appended to the
name. When the file is written, it winds up being deleted.
Solution: Add this command to your _vimrc file: >
:set backupext=.temporary
Q. How do I change the blink rate of the cursor?
A. You can't! This is a limitation of the NT console. NT 5.0 is reported to
be able to set the blink rate for all console windows at the same time.
*:!start*
Q. How can I run an external command or program asynchronously?
A. When using :! to run an external command, you can run it with "start": >
@@ -240,28 +172,6 @@ A. You have two possible solutions depending on what you want:
< The first command runs notepad minimized and the second one runs it
normally.
Q. I'm using Win32s, and when I try to run an external command like "make",
Vim doesn't wait for it to finish! Help!
A. The problem is that a 32-bit application (Vim) can't get notification from
Windows that a 16-bit application (your DOS session) has finished. Vim
includes a work-around for this, but you must set up your DOS commands to
run in a window, not full-screen. Unfortunately the default when you
install Windows is full-screen. To change this:
1) Start PIF editor (in the Main program group).
2) Open the file "_DEFAULT.PIF" in your Windows directory.
3) Changes the display option from "Full Screen" to "Windowed".
4) Save and exit.
To test, start Vim and type >
:!dir C:\<CR>".
< You should see a DOS box window appear briefly with the directory listing.
Q. I use Vim under Win32s and NT. In NT, I can define the console to default to
50 lines, so that I get a 80x50 shell when I ':sh'. Can I do the same in
W3.1x, or am I stuck with 80x25?
A. Edit SYSTEM.INI and add 'ScreenLines=50' to the [NonWindowsApp] section. DOS
prompts and external DOS commands will now run in a 50-line window.
*windows-icon*
Q. I don't like the Vim icon, can I change it?
A. Yes, place your favorite icon in bitmaps/vim.ico in a directory of

View File

@@ -1,4 +1,4 @@
*pattern.txt* For Vim version 7.4. Last change: 2014 Sep 06
*pattern.txt* For Vim version 7.4. Last change: 2015 Mar 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -59,6 +59,8 @@ explanations are in chapter 27 |usr_27.txt|.
*n*
n Repeat the latest "/" or "?" [count] times.
If the cursor doesn't move the search is repeated with
count + 1.
|last-pattern|
*N*
@@ -129,7 +131,7 @@ gD Goto global Declaration. When the cursor is on a
*CTRL-C*
CTRL-C Interrupt current (search) command. Use CTRL-Break on
MS-DOS |dos-CTRL-Break|.
Windows |dos-CTRL-Break|.
In Normal mode, any pending command is aborted.
*:noh* *:nohlsearch*
@@ -1050,7 +1052,10 @@ x A single character, with no special meaning, matches itself
*E769*
When the ']' is not there Vim will not give an error message but
assume no collection is used. Useful to search for '['. However, you
do get E769 for internal searching.
do get E769 for internal searching. And be aware that in a
`:substitute` command the whole command becomes the pattern. E.g.
":s/[/x/" searches for "[/x" and replaces it with nothing. It does
not search for "[" and replaces it with "x"!
If the sequence begins with "^", it matches any single character NOT
in the collection: "[^xyz]" matches anything but 'x', 'y' and 'z'.
@@ -1082,7 +1087,7 @@ x A single character, with no special meaning, matches itself
*[:backspace:]* [:backspace:] the <BS> character
The brackets in character class expressions are additional to the
brackets delimiting a collection. For example, the following is a
plausible pattern for a UNIX filename: "[-./[:alnum:]_~]\+" That is,
plausible pattern for a Unix filename: "[-./[:alnum:]_~]\+" That is,
a list of at least one character, each of which is either '-', '.',
'/', alphabetic, numeric, '_' or '~'.
These items only work for 8-bit characters.

View File

@@ -1,482 +0,0 @@
*pi_getscript.txt* For Vim version 7.0. Last change: 2013 Nov 29
>
GETSCRIPT REFERENCE MANUAL by Charles E. Campbell
<
Authors: Charles E. Campbell <NdrOchip@ScampbellPfamilyA.Mbiz>
(remove NOSPAM from the email address)
*GetLatestVimScripts-copyright*
Copyright: (c) 2004-2012 by Charles E. Campbell *glvs-copyright*
The VIM LICENSE (see |copyright|) applies to the files in this
package, including getscriptPlugin.vim, getscript.vim,
GetLatestVimScripts.dist, and pi_getscript.txt, except use "getscript"
instead of "VIM". Like anything else that's free, getscript and its
associated files are provided *as is* and comes with no warranty of
any kind, either expressed or implied. No guarantees of
merchantability. No guarantees of suitability for any purpose. By
using this plugin, you agree that in no event will the copyright
holder be liable for any damages resulting from the use of this
software. Use at your own risk!
Getscript is a plugin that simplifies retrieval of the latest versions of the
scripts that you yourself use! Typing |:GLVS| will invoke getscript; it will
then use the <GetLatestVimScripts.dat> (see |GetLatestVimScripts_dat|) file to
get the latest versions of scripts listed therein from http://vim.sf.net/.
==============================================================================
1. Contents *glvs-contents* *glvs* *getscript*
*GetLatestVimScripts*
1. Contents........................................: |glvs-contents|
2. GetLatestVimScripts -- Getting Started..........: |glvs-install|
3. GetLatestVimScripts Usage.......................: |glvs-usage|
4. GetLatestVimScripts Data File...................: |glvs-data|
5. GetLatestVimScripts Friendly Plugins............: |glvs-plugins|
6. GetLatestVimScripts AutoInstall.................: |glvs-autoinstall|
7. GetLatestViMScripts Options.....................: |glvs-options|
8. GetLatestVimScripts Algorithm...................: |glvs-alg|
9. GetLatestVimScripts History.....................: |glvs-hist|
==============================================================================
2. GetLatestVimScripts -- Getting Started *getscript-start*
*getlatestvimscripts-install*
VERSION FROM VIM DISTRIBUTION *glvs-dist-install*
Vim 7.0 does not include the GetLatestVimScripts.dist file which
serves as an example and a template. So, you'll need to create
your own! See |GetLatestVimScripts_dat|.
VERSION FROM VIM SF NET *glvs-install*
NOTE: The last step, that of renaming/moving the GetLatestVimScripts.dist
file, is for those who have just downloaded GetLatestVimScripts.tar.bz2 for
the first time.
The GetLatestVimScripts.dist file serves as an example and a template for your
own personal list. Feel free to remove all the scripts mentioned within it;
the "important" part of it is the first two lines.
Your computer needs to have wget or curl for GetLatestVimScripts to do its work.
1. if compressed: gunzip getscript.vba.gz
2. Unix:
vim getscript.vba
:so %
:q
cd ~/.vim/GetLatest
mv GetLatestVimScripts.dist GetLatestVimScripts.dat
(edit GetLatestVimScripts.dat to install your own personal
list of desired plugins -- see |GetLatestVimScripts_dat|)
3. Windows:
vim getscript.vba
:so %
:q
cd **path-to-vimfiles**/GetLatest
mv GetLatestVimScripts.dist GetLatestVimScripts.dat
(edit GetLatestVimScripts.dat to install your own personal
list of desired plugins -- see |GetLatestVimScripts_dat|)
==============================================================================
3. GetLatestVimScripts Usage *glvs-usage* *:GLVS*
Unless it has been defined elsewhere, >
:GLVS
will invoke GetLatestVimScripts(). If some other plugin has defined that
command, then you may type
>
:GetLatestVimScripts
<
The script will attempt to update and, if permitted, will automatically
install scripts from http://vim.sourceforge.net/. To do so it will peruse a
file,
>
.vim/GetLatest/GetLatestVimScripts.dat (unix)
<
or >
..wherever..\vimfiles\GetLatest\GetLatestVimScripts.dat (windows)
(see |glvs-data|), and examine plugins in your [.vim|vimfiles]/plugin
directory (see |glvs-plugins|).
Scripts which have been downloaded will appear in the
~/.vim/GetLatest (unix) or ..wherever..\vimfiles\GetLatest (windows)
subdirectory. GetLatestVimScripts will attempt to automatically
install them if you have the following line in your <.vimrc>: >
let g:GetLatestVimScripts_allowautoinstall=1
The <GetLatestVimScripts.dat> file will be automatically be updated to
reflect the latest version of script(s) so downloaded.
(also see |glvs-options|)
==============================================================================
4. GetLatestVimScripts Data File *getscript-data* *glvs-data*
*:GetLatestVimScripts_dat*
The data file <GetLatestVimScripts.dat> must have for its first two lines
the following text:
>
ScriptID SourceID Filename
--------------------------
<
Following those two lines are three columns; the first two are numeric
followed by a text column. The GetLatest/GetLatestVimScripts.dist file
contains an example of such a data file. Anything following a #... is
ignored, so you may embed comments in the file.
The first number on each line gives the script's ScriptID. When you're about
to use a web browser to look at scripts on http://vim.sf.net/, just before you
click on the script's link, you'll see a line resembling
http://vim.sourceforge.net/scripts/script.php?script_id=40
The "40" happens to be a ScriptID that GetLatestVimScripts needs to
download the associated page, and is assigned by vim.sf.net itself
during initial uploading of the plugin.
The second number on each line gives the script's SourceID. The SourceID
records the count of uploaded scripts as determined by vim.sf.net; hence it
serves to indicate "when" a script was uploaded. Setting the SourceID to 1
insures that GetLatestVimScripts will assume that the script it has is
out-of-date.
The SourceID is extracted by GetLatestVimScripts from the script's page on
vim.sf.net; whenever it is greater than the one stored in the
GetLatestVimScripts.dat file, the script will be downloaded
(see |GetLatestVimScripts_dat|).
If your script's author has included a special comment line in his/her plugin,
the plugin itself will be used by GetLatestVimScripts to build your
<GetLatestVimScripts.dat> file, including any dependencies on other scripts it
may have. As an example, consider: >
" GetLatestVimScripts: 884 1 :AutoInstall: AutoAlign.vim
This comment line tells getscript.vim to check vimscript #884 and that the
script is automatically installable. Getscript will also use this line to
help build the GetLatestVimScripts.dat file, by including a line such as: >
884 1 :AutoInstall: AutoAlign.vim
<
assuming that such a line isn't already in GetLatestVimScripts.dat file.
See |glvs-plugins| for more. Thus, GetLatestVimScripts thus provides a
comprehensive ability to keep your plugins up-to-date!
In summary:
* Optionally tell getscript that it is allowed to build/append a
GetLatestVimScripts.dat file based upon already installed plugins: >
let g:GetLatestVimScripts_allowautoinstall=1
<
* A line such as >
" GetLatestVimScripts: 884 1 :AutoInstall: AutoAlign.vim
< in an already-downloaded plugin constitutes the concurrence of the
plugin author that getscript may do AutoInstall. Not all plugins
may be AutoInstall-able, and the plugin's author is best situated
to know whether or not his/her plugin will AutoInstall properly.
* A line such as >
884 1 :AutoInstall: AutoAlign.vim
< in your GetLatestVimScripts.dat file constitutes your permission
to getscript to do AutoInstall. AutoInstall requires both your
and the plugin author's permission. See |GetLatestVimScripts_dat|.
*GetLatestVimScripts_dat*
As an example of a <GetLatestVimScripts.dat> file:
>
ScriptID SourceID Filename
--------------------------
294 1 :AutoInstall: Align.vim
120 2 Decho.vim
40 3 DrawIt.tar.gz
451 4 EasyAccents.vim
195 5 engspchk.vim
642 6 GetLatestVimScripts.vim
489 7 Manpageview.vim
<
Note: the first two lines are required, but essentially act as comments.
==============================================================================
5. GetLatestVimScripts Friendly Plugins *getscript-plugins* *glvs-plugins*
(this section is for plugin authors)~
If a plugin author includes the following comment anywhere in their plugin,
GetLatestVimScripts will find it and use it to automatically build the user's
GetLatestVimScripts.dat files:
>
src_id
v
" GetLatestVimScripts: ### ### yourscriptname
^
scriptid
<
As an author, you should include such a line in to refer to your own script
plus any additional lines describing any plugin dependencies it may have.
Same format, of course!
If your command is auto-installable (see |glvs-autoinstall|), and most scripts
are, then you may include :AutoInstall: just before "yourscriptname":
>
src_id
v
" GetLatestVimScripts: ### ### :AutoInstall: yourscriptname
^
scriptid
<
NOTE: The :AutoInstall: feature requires both the plugin author's and~
the user's permission to operate!~
GetLatestVimScripts commands for those scripts are then appended, if not
already present, to the user's GetLatest/GetLatestVimScripts.dat file. It is
a relatively painless way to automate the acquisition of any scripts your
plugins depend upon.
Now, as an author, you probably don't want GetLatestVimScripts to download
your own scripts atop your own copy, thereby overwriting your not-yet-released
hard work. GetLatestVimScripts provides a solution for this: put
>
0 0 yourscriptname
<
into your <GetLatestVimScripts.dat> file and GetLatestVimScripts will skip
examining the "yourscriptname" scripts for those GetLatestVimScripts comment
lines. As a result, those lines won't be inadvertently installed into your
<GetLatestVimScripts.dat> file and subsequently used to download your own
scripts. This is especially important to do if you've included the
:AutoInstall: option.
Be certain to use the same "yourscriptname" in the "0 0 yourscriptname" line
as you've used in your GetLatestVimScripts comment!
==============================================================================
6. GetLatestVimScripts AutoInstall *getscript-autoinstall*
*glvs-autoinstall*
GetLatestVimScripts now supports "AutoInstall". Not all scripts are
supportive of auto-install, as they may have special things you need to do to
install them (please refer to the script's "install" directions). On the
other hand, most scripts will be auto-installable.
To let GetLatestVimScripts do an autoinstall, the data file's comment field
should begin with (surrounding blanks are ignored): >
:AutoInstall:
<
Both colons are needed, and it should begin the comment (yourscriptname)
field.
One may prevent any autoinstalling by putting the following line in your
<.vimrc>: >
let g:GetLatestVimScripts_allowautoinstall= 0
<
With :AutoInstall: enabled, as it is by default, files which end with
---.tar.bz2 : decompressed & untarred in .vim/ directory
---.vba.bz2 : decompressed in .vim/ directory, then vimball handles it
---.vim.bz2 : decompressed & moved into .vim/plugin directory
---.tar.gz : decompressed & untarred in .vim/ directory
---.vba.gz : decompressed in .vim/ directory, then vimball handles it
---.vim.gz : decompressed & moved into .vim/plugin directory
---.vba : unzipped in .vim/ directory
---.vim : moved to .vim/plugin directory
---.zip : unzipped in .vim/ directory
and which merely need to have their components placed by the untar/gunzip or
move-to-plugin-directory process should be auto-installable. Vimballs, of
course, should always be auto-installable.
When is a script not auto-installable? Let me give an example:
.vim/after/syntax/blockhl.vim
The <blockhl.vim> script provides block highlighting for C/C++ programs; it is
available at:
http://vim.sourceforge.net/scripts/script.php?script_id=104
Currently, vim's after/syntax only supports by-filetype scripts (in
blockhl.vim's case, that's after/syntax/c.vim). Hence, auto-install would
possibly overwrite the current user's after/syntax/c.vim file.
In my own case, I use <aftersyntax.vim> (renamed to after/syntax/c.vim) to
allow a after/syntax/c/ directory:
http://vim.sourceforge.net/scripts/script.php?script_id=1023
The script allows multiple syntax files to exist separately in the
after/syntax/c subdirectory. I can't bundle aftersyntax.vim in and build an
appropriate tarball for auto-install because of the potential for the
after/syntax/c.vim contained in it to overwrite a user's c.vim.
==============================================================================
7. GetLatestVimScripts Options *glvs-options*
>
g:GetLatestVimScripts_wget
< default= "wget"
This variable holds the name of the command for obtaining
scripts.
>
g:GetLatestVimScripts_options
< default= "-q -O"
This variable holds the options to be used with the
g:GetLatestVimScripts_wget command.
>
g:GetLatestVimScripts_allowautoinstall
< default= 1
This variable indicates whether GetLatestVimScripts is allowed
to attempt to automatically install scripts. Furthermore, the
plugin author has to have explicitly indicated that his/her
plugin is automatically installable (via the :AutoInstall:
keyword in the GetLatestVimScripts comment line).
>
g:GetLatestVimScripts_autoinstalldir
< default= $HOME/.vim (linux)
default= $HOME/vimfiles (windows)
Override where :AutoInstall: scripts will be installed.
Doesn't override vimball installation.
>
g:GetLatestVimScripts_scriptaddr
< default='http://vim.sourceforge.net/script.php?script_id='
Override this if your system needs
... ='http://vim.sourceforge.net/script/script.php?script_id='
==============================================================================
8. GetLatestVimScripts Algorithm *glvs-algorithm* *glvs-alg*
The Vim sourceforge page dynamically creates a page by keying off of the
so-called script-id. Within the webpage of
http://vim.sourceforge.net/scripts/script.php?script_id=40
is a line specifying the latest source-id (src_id). The source identifier
numbers are always increasing, hence if the src_id is greater than the one
recorded for the script in GetLatestVimScripts then it's time to download a
newer copy of that script.
GetLatestVimScripts will then download the script and update its internal
database of script ids, source ids, and scriptnames.
The AutoInstall process will:
Move the file from GetLatest/ to the following directory
Unix : $HOME/.vim
Windows: $HOME\vimfiles
if the downloaded file ends with ".bz2"
bunzip2 it
else if the downloaded file ends with ".gz"
gunzip it
if the resulting file ends with ".zip"
unzip it
else if the resulting file ends with ".tar"
tar -oxvf it
else if the resulting file ends with ".vim"
move it to the plugin subdirectory
==============================================================================
9. GetLatestVimScripts History *getscript-history* *glvs-hist* {{{1
v36 Apr 22, 2013 : * (glts) suggested use of plugin/**/*.vim instead of
plugin/*.vim in globpath() call.
* (Andy Wokula) got warning message when setting
g:loaded_getscriptPlugin
v35 Apr 07, 2012 : * (MengHuan Yu) pointed out that the script url has
changed (somewhat). However, it doesn't work, and
the original one does (under Linux). I'll make it
yet-another-option.
v34 Jun 23, 2011 : * handles additional decompression options for tarballs
(tgz taz tbz txz)
v33 May 31, 2011 : * using fnameescape() instead of escape()
* *.xz support
v32 Jun 19, 2010 : * (Jan Steffens) added support for xz compression
v31 Jun 29, 2008 : * (Bill McCarthy) fixed having hls enabled with getscript
* (David Schaefer) the acd option interferes with vimballs
Solution: bypass the acd option
v30 Jun 13, 2008 : * GLVS now checks for existence of fnameescape() and will
issue an error message if it is not supported
v29 Jan 07, 2008 : * Bram M pointed out that cpo is a global option and that
getscriptPlugin.vim was setting it but not restoring it.
v28 Jan 02, 2008 : * improved shell quoting character handling, cygwin
interface, register-a bypass
Oct 29, 2007 * Bill McCarthy suggested a change to getscript that avoids
creating pop-up windows
v24 Apr 16, 2007 : * removed save&restore of the fo option during script
loading
v23 Nov 03, 2006 : * ignores comments (#...)
* handles vimballs
v22 Oct 13, 2006 : * supports automatic use of curl if wget is not
available
v21 May 01, 2006 : * now takes advantage of autoloading.
v20 Dec 23, 2005 : * Eric Haarbauer found&fixed a bug with unzip use;
unzip needs the -o flag to overwrite.
v19 Nov 28, 2005 : * v18's GetLatestVimScript line accessed the wrong
script! Fixed.
v18 Mar 21, 2005 : * bugfix to automatic database construction
* bugfix - nowrapscan caused an error
(tnx to David Green for the fix)
Apr 01, 2005 * if shell is bash, "mv" instead of "ren" used in
:AutoInstall:s, even though its o/s is windows
Apr 01, 2005 * when downloading errors occurred, GLVS was
terminating early. It now just goes on to trying
the next script (after trying three times to
download a script description page)
Apr 20, 2005 * bugfix - when a failure to download occurred,
GetLatestVimScripts would stop early and claim that
everything was current. Fixed.
v17 Aug 25, 2004 : * g:GetLatestVimScripts_allowautoinstall, which
defaults to 1, can be used to prevent all
:AutoInstall:
v16 Aug 25, 2004 : * made execution of bunzip2/gunzip/tar/zip silent
* fixed bug with :AutoInstall: use of helptags
v15 Aug 24, 2004 : * bugfix: the "0 0 comment" download prevention wasn't
always preventing downloads (just usually). Fixed.
v14 Aug 24, 2004 : * bugfix -- helptags was using dotvim, rather than
s:dotvim. Fixed.
v13 Aug 23, 2004 : * will skip downloading a file if its scriptid or srcid
is zero. Useful for script authors; that way their
own GetLatestVimScripts activity won't overwrite
their scripts.
v12 Aug 23, 2004 : * bugfix - a "return" got left in the distribution that
was intended only for testing. Removed, now works.
* :AutoInstall: implemented
v11 Aug 20, 2004 : * GetLatestVimScripts is now a plugin:
* :GetLatestVimScripts command
* (runtimepath)/GetLatest/GetLatestVimScripts.dat
now holds scripts that need updating
v10 Apr 19, 2004 : * moved history from script to doc
v9 Jan 23, 2004 : windows (win32/win16/win95) will use
double quotes ("") whereas other systems will use
single quotes ('') around the urls in calls via wget
v8 Dec 01, 2003 : makes three tries at downloading
v7 Sep 02, 2003 : added error messages if "Click on..." or "src_id="
not found in downloaded webpage
Uses t_ti, t_te, and rs to make progress visible
v6 Aug 06, 2003 : final status messages now display summary of work
( "Downloaded someqty scripts" or
"Everything was current")
Now GetLatestVimScripts is careful about downloading
GetLatestVimScripts.vim itself!
(goes to <NEW_GetLatestVimScripts.vim>)
v5 Aug 04, 2003 : missing an endif near bottom
v4 Jun 17, 2003 : redraw! just before each "considering" message
v3 May 27, 2003 : Protects downloaded files from errant shell
expansions with single quotes: '...'
v2 May 14, 2003 : extracts name of item to be obtained from the
script file. Uses it instead of comment field
for output filename; comment is used in the
"considering..." line and is now just a comment!
* Fixed a bug: a string-of-numbers is not the
same as a number, so I added zero to them
and they became numbers. Fixes comparison.
==============================================================================
vim:tw=78:ts=8:ft=help:fdm=marker

View File

@@ -677,7 +677,7 @@ It is possible to achieve a poor man's version of duplex printing using the PS
utility psselect. This utility has options -e and -o for printing just the
even or odd pages of a PS file respectively.
First generate a PS file with the 'hardcopy' command, then generate a new
First generate a PS file with the 'hardcopy' command, then generate new
files with all the odd and even numbered pages with: >
psselect -o test.ps odd.ps

View File

@@ -291,6 +291,100 @@ use this code: >
au QuickfixCmdPost make call QfMakeConv()
EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
*:cdo*
:cdo[!] {cmd} Execute {cmd} in each valid entry in the quickfix list.
It works like doing this: >
:cfirst
:{cmd}
:cnext
:{cmd}
etc.
< When the current file can't be |abandon|ed and the [!]
is not present, the command fails.
When an error is detected on one buffer, further
buffers will not be visited.
The last buffer (or where an error occurred) becomes
the current buffer.
{cmd} can contain '|' to concatenate several commands.
Only valid entries in the quickfix list are used.
Note: While this command is executing, the Syntax
autocommand event is disabled by adding it to
'eventignore'. This considerably speeds up editing
each buffer.
Also see |:bufdo|, |:tabdo|, |:argdo|, |:windo|,
|:ldo|, |:cfdo| and |:lfdo|.
*:cfdo*
:cfdo[!] {cmd} Execute {cmd} in each file in the quickfix list.
It works like doing this: >
:cfirst
:{cmd}
:cnfile
:{cmd}
etc.
< When the current file can't be |abandon|ed and the [!]
is not present, the command fails.
When an error is detected on one buffer, further
buffers will not be visited.
The last buffer (or where an error occurred) becomes
the current buffer.
{cmd} can contain '|' to concatenate several commands.
Only valid entries in the quickfix list are used.
Note: While this command is executing, the Syntax
autocommand event is disabled by adding it to
'eventignore'. This considerably speeds up editing
each buffer.
Also see |:bufdo|, |:tabdo|, |:argdo|, |:windo|,
|:cdo|, |:ldo| and |:lfdo|.
*:ldo*
:ld[o][!] {cmd} Execute {cmd} in each valid entry in the location list
for the current window.
It works like doing this: >
:lfirst
:{cmd}
:lnext
:{cmd}
etc.
< When the current file can't be |abandon|ed and the [!]
is not present, the command fails.
When an error is detected on one buffer, further
buffers will not be visited.
The last buffer (or where an error occurred) becomes
the current buffer.
{cmd} can contain '|' to concatenate several commands.
Only valid entries in the location list are used.
Note: While this command is executing, the Syntax
autocommand event is disabled by adding it to
'eventignore'. This considerably speeds up editing
each buffer.
Also see |:bufdo|, |:tabdo|, |:argdo|, |:windo|,
|:cdo|, |:cfdo| and |:lfdo|.
*:lfdo*
:lfdo[!] {cmd} Execute {cmd} in each file in the location list for
the current window.
It works like doing this: >
:lfirst
:{cmd}
:lnfile
:{cmd}
etc.
< When the current file can't be |abandon|ed and the [!]
is not present, the command fails.
When an error is detected on one buffer, further
buffers will not be visited.
The last buffer (or where an error occurred) becomes
the current buffer.
{cmd} can contain '|' to concatenate several commands.
Only valid entries in the location list are used.
Note: While this command is executing, the Syntax
autocommand event is disabled by adding it to
'eventignore'. This considerably speeds up editing
each buffer.
Also see |:bufdo|, |:tabdo|, |:argdo|, |:windo|,
|:cdo|, |:ldo| and |:cfdo|.
=============================================================================
2. The error window *quickfix-window*
@@ -493,11 +587,11 @@ or simpler >
"$*" can be given multiple times, for example: >
:set makeprg=gcc\ -o\ $*\ $*
The 'shellpipe' option defaults to ">" for MS-DOS and Win32. This means that
the output of the compiler is saved in a file and not shown on the screen
directly. For Unix "| tee" is used. The compiler output is shown on the
screen and saved in a file the same time. Depending on the shell used "|&
tee" or "2>&1| tee" is the default, so stderr output will be included.
The 'shellpipe' option defaults to ">" on Windows. This means that the output
of the compiler is saved in a file and not shown on the screen directly. For
Unix "| tee" is used. The compiler output is shown on the screen and saved in
a file the same time. Depending on the shell used "|& tee" or "2>&1| tee" is
the default, so stderr output will be included.
If 'shellpipe' is empty, the {errorfile} part will be omitted. This is useful
for compilers that write to an errorfile themselves.
@@ -905,9 +999,9 @@ normally happens by matching following characters and items. When nothing is
following the rest of the line is matched. If "%f" is followed by a '%' or a
backslash, it will look for a sequence of 'isfname' characters.
On MS-DOS and MS-Windows a leading "C:" will be included in "%f", even when
using "%f:". This means that a file name which is a single alphabetical
letter will not be detected.
On Windows a leading "C:" will be included in "%f", even when using "%f:".
This means that a file name which is a single alphabetical letter will not be
detected.
The "%p" conversion is normally followed by a "^". It's used for compilers
that output a line like: >

View File

@@ -730,13 +730,10 @@ Short explanation of each option: *option-list*
'icon' let Vim set the text of the window icon
'iconstring' string to use for the Vim icon text
'ignorecase' 'ic' ignore case in search patterns
'imactivatekey' 'imak' key that activates the X input method
'imactivatefunc' 'imaf' function to enable/disable the X input method
'imcmdline' 'imc' use IM when starting to edit a command line
'imdisable' 'imd' do not use the IM in any mode
'iminsert' 'imi' use :lmap or IM in Insert mode
'imsearch' 'ims' use :lmap or IM when typing a search pattern
'imstatusfunc' 'imsf' function to obtain X input method status
'include' 'inc' pattern to be used to find an include file
'includeexpr' 'inex' expression used to process an include line
'incsearch' 'is' highlight match while typing search pattern
@@ -820,7 +817,6 @@ Short explanation of each option: *option-list*
'relativenumber' 'rnu' show relative line number in front of each line
'remap' allow mappings to work recursively
'report' threshold for reporting nr. of lines changed
'restorescreen' 'rs' Win32: restore screen when exiting
'revins' 'ri' inserting characters will work backwards
'rightleft' 'rl' window is right-to-left oriented
'rightleftcmd' 'rlc' commands for which editing works right-to-left
@@ -874,7 +870,6 @@ Short explanation of each option: *option-list*
'suffixes' 'su' suffixes that are ignored with multiple match
'suffixesadd' 'sua' suffixes added when searching for a file
'swapfile' 'swf' whether to use a swapfile for a buffer
'swapsync' 'sws' how to sync the swap file
'switchbuf' 'swb' sets behavior when switching to another buffer
'synmaxcol' 'smc' maximum column to find syntax items
'syntax' 'syn' syntax to be loaded for current buffer
@@ -985,11 +980,9 @@ Short explanation of each option: *option-list*
|g_CTRL-G| g CTRL-G show cursor column, line, and character
position
|CTRL-C| CTRL-C during searches: Interrupt the search
|dos-CTRL-Break| CTRL-Break MS-DOS: during searches: Interrupt the search
|dos-CTRL-Break| CTRL-Break Windows: during searches: Interrupt the search
|<Del>| <Del> while entering a count: delete last character
|:version| :ve[rsion] show version information
|:mode| :mode N MS-DOS: set screen mode to N (number, C80,
C4350, etc.)
|:normal| :norm[al][!] {commands}
execute Normal mode commands
|Q| Q switch to "Ex" mode

View File

@@ -178,14 +178,14 @@ Hurrah for VIM!! It is "at your fingertips" like vi, and has the extensions
that vi sorely needs: highlighting for executing commands on blocks, an easily
navigable and digestible help screen, and more. (Paul Pax)
The reason WHY I don't have this amazingly useful macro any more, is that I
The reason WHY I don't have this amazingly useful macro anymore, is that I
now use VIM - and this is built in!! (Stephen Riehm, Germany)
I am a user of VIM and I love it. I use it to do all my programming, C,
C++, HTML what ever. (Tim Allwine)
I discovered VIM after years of struggling with the original vi, and I just
can't live without it any more. (Emmanuel Mogenet, USA)
can't live without it anymore. (Emmanuel Mogenet, USA)
Emacs has not a bit of chance to survive so long as VIM is around. Besides,
it also has the most detailed software documentation I have ever seen---much

View File

@@ -60,7 +60,7 @@ Disadvantages:
If you want to put swap files in a fixed place, put a command resembling the
following ones in your vimrc:
:set dir=~/tmp (for Unix)
:set dir=c:\\tmp (for MS-DOS and Win32)
:set dir=c:\\tmp (for Windows)
This is also very handy when editing files on floppy. Of course you will have
to create that "tmp" directory for this to work!
@@ -92,10 +92,7 @@ changed, not when you only moved around. The reason why it is not kept up to
date all the time is that this would slow down normal work too much. You can
change the 200 character count with the 'updatecount' option. You can set
the time with the 'updatetime' option. The time is given in milliseconds.
After writing to the swap file Vim syncs the file to disk. This takes some
time, especially on busy Unix systems. If you don't want this you can set the
'swapsync' option to an empty string. The risk of losing work becomes bigger
though.
After writing to the swap file Vim syncs the file to disk.
If the writing to the swap file is not wanted, it can be switched off by
setting the 'updatecount' option to 0. The same is done when starting Vim

View File

@@ -1,4 +1,4 @@
*remote.txt* For Vim version 7.4. Last change: 2008 May 24
*remote.txt* For Vim version 7.4. Last change: 2015 Mar 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -34,7 +34,8 @@ The following command line arguments are available:
The remote Vim is raised. If you don't want
this use >
vim --remote-send "<C-\><C-N>:n filename<CR>"
< --remote-silent [+{cmd}] {file} ... *--remote-silent*
<
--remote-silent [+{cmd}] {file} ... *--remote-silent*
As above, but don't complain if there is no
server and the file is edited locally.
--remote-wait [+{cmd}] {file} ... *--remote-wait*

View File

@@ -1,4 +1,4 @@
*repeat.txt* For Vim version 7.4. Last change: 2015 Jan 07
*repeat.txt* For Vim version 7.4. Last change: 2015 Apr 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -287,13 +287,13 @@ with CTRL-V followed by the three digit decimal code. This does NOT work for
the <t_xx> termcap codes, these can only be used in mappings.
*:source_crnl* *W15*
MS-DOS and Win32: Files that are read with ":source" normally have
<CR><NL> <EOL>s. These always work. If you are using a file with <NL> <EOL>s
(for example, a file made on Unix), this will be recognized if 'fileformats'
is not empty and the first line does not end in a <CR>. This fails if the
first line has something like ":map <F1> :help^M", where "^M" is a <CR>. If
the first line ends in a <CR>, but following ones don't, you will get an error
message, because the <CR> from the first lines will be lost.
Windows: Files that are read with ":source" normally have <CR><NL> <EOL>s.
These always work. If you are using a file with <NL> <EOL>s (for example, a
file made on Unix), this will be recognized if 'fileformats' is not empty and
the first line does not end in a <CR>. This fails if the first line has
something like ":map <F1> :help^M", where "^M" is a <CR>. If the first line
ends in a <CR>, but following ones don't, you will get an error message,
because the <CR> from the first lines will be lost.
Mac Classic: Files that are read with ":source" normally have <CR> <EOL>s.
These always work. If you are using a file with <NL> <EOL>s (for example, a
@@ -303,7 +303,7 @@ linebreaks which has a <CR> in first line.
On other systems, Vim expects ":source"ed files to end in a <NL>. These
always work. If you are using a file with <CR><NL> <EOL>s (for example, a
file made on MS-DOS), all lines will have a trailing <CR>. This may cause
file made on Windows), all lines will have a trailing <CR>. This may cause
problems for some commands (e.g., mappings). There is no automatic <EOL>
detection, because it's common to start with a line that defines a mapping
that ends in a <CR>, which will confuse the automaton.
@@ -390,7 +390,7 @@ To enter debugging mode use one of these methods:
useful to find out what is happening when Vim is starting up. A side
effect is that Vim will switch the terminal mode before initialisations
have finished, with unpredictable results.
For a GUI-only version (Windows, Macintosh) the debugging will start as
For a GUI-only version (Windows) the debugging will start as
soon as the GUI window has been opened. To make this happen early, add a
":gui" command in the vimrc file.
*:debug*
@@ -583,6 +583,7 @@ For example, to profile the one_script.vim script file: >
:prof[ile] start {fname} *:prof* *:profile* *E750*
Start profiling, write the output in {fname} upon exit.
"~/" and environment variables in {fname} will be expanded.
If {fname} already exists it will be silently overwritten.
The variable |v:profiling| is set to one.
@@ -658,10 +659,6 @@ long you take to respond to the input() prompt is irrelevant.
Profiling should give a good indication of where time is spent, but keep in
mind there are various things that may clobber the results:
- The accuracy of the time measured depends on the gettimeofday() system
function. It may only be as accurate as 1/100 second, even though the times
are displayed in micro seconds.
- Real elapsed time is measured, if other processes are busy they may cause
delays at unpredictable moments. You may want to run the profiling several
times and use the lowest results.

View File

@@ -106,9 +106,6 @@ o Does not support reverse insert and rightleft modes on the command-line.
o Somewhat slower in right-to-left mode, because right-to-left motion is
emulated inside Vim, not by the controlling terminal.
o When the Athena GUI is used, the bottom scrollbar works in the wrong
direction. This is difficult to fix.
o When both 'rightleft' and 'revins' are on: 'textwidth' does not work.
Lines do not wrap at all; you just get a single, long line.

View File

@@ -245,26 +245,6 @@ dragging the scrollbar of the current window. How many lines are scrolled
depends on your mouse driver. If the scroll action causes input focus
problems, see |intellimouse-wheel-problems|.
For the X11 GUIs (Motif, Athena and GTK) scrolling the wheel generates key
presses <ScrollWheelUp>, <ScrollWheelDown>, <ScrollWheelLeft> and
<ScrollWheelRight>. For example, if you push the scroll wheel upwards a
<ScrollWheelUp> key press is generated causing the window to scroll upwards
(while the text is actually moving downwards). The default action for these
keys are:
<ScrollWheelUp> scroll three lines up *<ScrollWheelUp>*
<S-ScrollWheelUp> scroll one page up *<S-ScrollWheelUp>*
<C-ScrollWheelUp> scroll one page up *<C-ScrollWheelUp>*
<ScrollWheelDown> scroll three lines down *<ScrollWheelDown>*
<S-ScrollWheelDown> scroll one page down *<S-ScrollWheelDown>*
<C-ScrollWheelDown> scroll one page down *<C-ScrollWheelDown>*
<ScrollWheelLeft> scroll six columns left *<ScrollWheelLeft>*
<S-ScrollWheelLeft> scroll one page left *<S-ScrollWheelLeft>*
<C-ScrollWheelLeft> scroll one page left *<C-ScrollWheelLeft>*
<ScrollWheelRight> scroll six columns right *<ScrollWheelRight>*
<S-ScrollWheelRight> scroll one page right *<S-ScrollWheelRight>*
<C-ScrollWheelRight> scroll one page right *<C-ScrollWheelRight>*
This should work in all modes, except when editing the command line.
Note that horizontal scrolling only works if 'nowrap' is set. Also, unless
the "h" flag in 'guioptions' is set, the cursor moves to the longest visible
line if the cursor line is about to be scrolled off the screen (similarly to
@@ -281,13 +261,6 @@ You can also use Alt and Ctrl modifiers.
This only works when Vim gets the scroll wheel events, of course. You can
check if this works with the "xev" program.
When using XFree86, the /etc/XF86Config file should have the correct entry for
your mouse. For FreeBSD, this entry works for a Logitech scrollmouse: >
Protocol "MouseMan"
Device "/dev/psm0"
ZAxisMapping 4 5
See the XFree86 documentation for information.
*<MouseDown>* *<MouseUp>*
The keys <MouseDown> and <MouseUp> have been deprecated. Use <ScrollWheelUp>
instead of <MouseDown> and use <ScrollWheelDown> instead of <MouseUp>.

View File

@@ -75,12 +75,8 @@ DEFINING A SIGN. *:sign-define* *E255* *E160* *E612*
Define the file name where the bitmap can be found. Should be
a full path. The bitmap should fit in the place of two
characters. This is not checked. If the bitmap is too big it
will cause redraw problems. Only GTK 2 can scale the bitmap
to fit the space available.
will cause redraw problems.
toolkit supports ~
GTK 1 pixmap (.xpm)
GTK 2 many
Motif pixmap (.xpm)
Win32 .bmp, .ico, .cur
pixmap (.xpm) |+xpm_w32|

View File

@@ -35,9 +35,7 @@ Vim only checks words for spelling, there is no grammar check.
If the 'mousemodel' option is set to "popup" and the cursor is on a badly
spelled word or it is "popup_setpos" and the mouse pointer is on a badly
spelled word, then the popup menu will contain a submenu to replace the bad
word. Note: this slows down the appearance of the popup menu. Note for GTK:
don't release the right mouse button until the menu appears, otherwise it
won't work.
word. Note: this slows down the appearance of the popup menu.
To search for the next misspelled word:

View File

@@ -356,7 +356,7 @@ accordingly. Vim proceeds in this order:
1. Set the 'shell' and 'term' option *SHELL* *COMSPEC* *TERM*
The environment variable SHELL, if it exists, is used to set the
'shell' option. On MS-DOS and Win32, the COMSPEC variable is used
'shell' option. On Windows, the COMSPEC variable is used
if SHELL is not set.
The environment variable TERM, if it exists, is used to set the 'term'
option. However, 'term' will change later when starting the GUI (step
@@ -494,7 +494,7 @@ sessions. Put it in a place so that it will be found by 3b:
Local setup:
Put all commands that you need for editing a specific directory only into a
vimrc file and place it in that directory under the name ".nvimrc" ("_nvimrc"
for MS-DOS and Win32). NOTE: To make Vim look for these special files you
for Windows). NOTE: To make Vim look for these special files you
have to turn on the option 'exrc'. See |trojan-horse| too.
System setup:
@@ -516,10 +516,9 @@ interfere with Vi, then use the variable VIMINIT and the file init.vim
instead.
MS-DOS line separators:
On MS-DOS-like systems (MS-DOS itself and Win32), Vim assumes that all
the vimrc files have <CR> <NL> pairs as line separators. This will give
problems if you have a file with only <NL>s and have a line like
":map xx yy^M". The trailing ^M will be ignored.
On Windows systems Vim assumes that all the vimrc files have <CR> <NL> pairs
as line separators. This will give problems if you have a file with only
<NL>s and have a line like ":map xx yy^M". The trailing ^M will be ignored.
The $MYVIMRC or $MYGVIMRC file will be set to the first found vimrc and/or
gvimrc file.
@@ -947,7 +946,7 @@ about to abandon with ":bdel", use ":wsh". The '[' and ']' marks are not
stored, but the '"' mark is. The '"' mark is very useful for jumping to the
cursor position when the file was last exited. No marks are saved for files
that start with any string given with the "r" flag in 'shada'. This can be
used to avoid saving marks for files on removable media (for MS-DOS you would
used to avoid saving marks for files on removable media (for Windows you would
use "ra:,rb:".
The |v:oldfiles| variable is filled with the file names that the ShaDa file
has marks for.

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 7.4. Last change: 2015 Jan 07
*syntax.txt* For Vim version 7.4. Last change: 2015 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -71,10 +71,10 @@ with: >
For a color terminal see |:hi-normal-cterm|.
For setting up your own colors syntax highlighting see |syncolor|.
NOTE: The syntax files on MS-DOS and Windows have lines that end in <CR><NL>.
The files for Unix end in <NL>. This means you should use the right type of
file for your system. Although on MS-DOS and Windows the right format is
automatically selected if the 'fileformats' option is not empty.
NOTE: The syntax files on Windows have lines that end in <CR><NL>. The files
for Unix end in <NL>. This means you should use the right type of file for
your system. Although on Windows the right format is automatically selected
if the 'fileformats' option is not empty.
NOTE: When using reverse video ("gvim -fg white -bg black"), the default value
of 'background' will not be set until the GUI window is opened, which is after
@@ -206,7 +206,8 @@ thing. These are then linked to a highlight group that specifies the color.
A syntax group name doesn't specify any color or attributes itself.
The name for a highlight or syntax group must consist of ASCII letters, digits
and the underscore. As a regexp: "[a-zA-Z0-9_]*"
and the underscore. As a regexp: "[a-zA-Z0-9_]*". However, Vim does not give
an error when using other characters.
To be able to allow each user to pick his favorite set of colors, there must
be preferred names for highlight groups that are common for many languages.
@@ -1130,6 +1131,8 @@ there are very long lines in the file. To disable translations: >
:let diff_translations = 0
Also see |diff-slow|.
DIRCOLORS *dircolors.vim* *ft-dircolors-syntax*
@@ -3304,6 +3307,32 @@ must not click outside of the pixel strings, but feel free to improve it.
It will look much better with a font in a quadratic cell size, e.g. for X: >
:set guifont=-*-clean-medium-r-*-*-8-*-*-*-*-80-*
YAML *yaml.vim* *ft-yaml-syntax*
*g:yaml_schema* *b:yaml_schema*
A YAML schema is a combination of a set of tags and a mechanism for resolving
non-specific tags. For user this means that YAML parser may, depending on
plain scalar contents, treat plain scalar (which can actually be only string
and nothing else) as a value of the other type: null, boolean, floating-point,
integer. `g:yaml_schema` option determines according to which schema values
will be highlighted specially. Supported schemas are
Schema Description ~
failsafe No additional highlighting.
json Supports JSON-style numbers, booleans and null.
core Supports more number, boolean and null styles.
pyyaml In addition to core schema supports highlighting timestamps,
but there are some differences in what is recognized as
numbers and many additional boolean values not present in core
schema.
Default schema is `core`.
Note that schemas are not actually limited to plain scalars, but this is the
only difference between schemas defined in YAML specification and the only
difference defined in the syntax file.
==============================================================================
5. Defining a syntax *:syn-define* *E410*
@@ -4236,7 +4265,7 @@ If the "maxlines={N}" argument is given, the number of lines that are searched
for a comment or syncing pattern is restricted to N lines backwards (after
adding "minlines"). This is useful if you have few things to sync on and a
slow machine. Example: >
:syntax sync ccomment maxlines=500
:syntax sync maxlines=500 ccomment
<
*:syn-sync-linebreaks*
When using a pattern that matches multiple lines, a change in one line may
@@ -4504,7 +4533,7 @@ mentioned for the default values. See |:verbose-cmd| for more information.
*highlight-args* *E416* *E417* *E423*
There are three types of terminals for highlighting:
term a normal terminal (vt100, xterm)
cterm a color terminal (MS-DOS console, color-xterm, these have the "Co"
cterm a color terminal (Windows console, color-xterm, these have the "Co"
termcap entry)
gui the GUI
@@ -4629,6 +4658,8 @@ ctermbg={color-nr} *highlight-ctermbg*
Note that for some color terminals these names may result in the wrong
colors!
You can also use "NONE" to remove the color.
*:hi-normal-cterm*
When setting the "ctermfg" or "ctermbg" colors for the Normal group,
these will become the colors used for the non-highlighted text.
@@ -4650,7 +4681,7 @@ ctermbg={color-nr} *highlight-ctermbg*
*E419* *E420*
When Vim knows the normal foreground and background colors, "fg" and
"bg" can be used as color names. This only works after setting the
colors for the Normal group and for the MS-DOS console. Example, for
colors for the Normal group and for the Windows console. Example, for
reverse video: >
:highlight Visual ctermfg=bg ctermbg=fg
< Note that the colors are used that are valid at the moment this
@@ -4676,7 +4707,7 @@ font={font-name} *highlight-font*
When setting the font for the "Normal" group, this becomes the default
font (until the 'guifont' option is changed; the last one set is
used).
The following only works with Motif and Athena, not with other GUIs:
The following only works with Motif not with other GUIs:
When setting the font for the "Menu" group, the menus will be changed.
When setting the font for the "Tooltip" group, the tooltips will be
changed.
@@ -4864,11 +4895,6 @@ Menu Current font, background and foreground colors of the menus.
Also used for the toolbar.
Applicable highlight arguments: font, guibg, guifg.
NOTE: For Motif and Athena the font argument actually
specifies a fontset at all times, no matter if 'guifontset' is
empty, and as such it is tied to the current |:language| when
set.
*hl-Scrollbar*
Scrollbar Current background and foreground of the main window's
scrollbars.
@@ -4878,11 +4904,6 @@ Scrollbar Current background and foreground of the main window's
Tooltip Current font, background and foreground of the tooltips.
Applicable highlight arguments: font, guibg, guifg.
NOTE: For Motif and Athena the font argument actually
specifies a fontset at all times, no matter if 'guifontset' is
empty, and as such it is tied to the current |:language| when
set.
==============================================================================
13. Linking groups *:hi-link* *:highlight-link* *E412* *E413*

View File

@@ -48,8 +48,8 @@ A double click with the mouse in the non-GUI tab pages line opens a new, empty
tab page. It is placed left of the position of the click. The first click
may select another tab page first, causing an extra screen update.
This also works in a few GUI versions, esp. Win32 and Motif. But only when
clicking right of the labels.
This also works in a few GUI versions, esp. Win32. But only when clicking
right of the labels.
In the GUI tab pages line you can use the right mouse button to open menu.
|tabline-menu|.
@@ -197,22 +197,29 @@ REORDERING TAB PAGES:
Move the current tab page to after tab page N. Use zero to
make the current tab page the first one. Without N the tab
page is made the last one. >
:.tabmove " do nothing
:-tabmove " move the tab page to the left
:tabmove " move the tab page to the right
:.tabmove " as above
:+tabmove " as above
:+tabmove " move the tab page to the right
:0tabmove " move the tab page to the beginning of the tab
" list
:$tabmove " move the tab page to the end of the tab list
<
:tabmove 0 " as above
:tabmove " move the tab page to the last
:$tabmove " as above
:tabmove $ " as above
:tabm[ove] +[N]
:tabm[ove] -[N]
Move the current tab page N places to the right (with +) or to
the left (with -).
the left (with -). >
:tabmove - " move the tab page to the left
:tabmove -1 " as above
:tabmove + " move the tab page to the right
:tabmove +1 " as above
Note that although it is possible to move a tab behind the N-th one by using
:Ntabmove, it is impossible to move it by N places by using :+Ntabmove. For
clarification what +N means in this context see |[range]|.
:Ntabmove. And move it by N places by using :+Ntabmove. For clarification what
+N means in this context see |[range]|.
LOOPING OVER TAB PAGES:
@@ -234,7 +241,8 @@ LOOPING OVER TAB PAGES:
current tab page.
{cmd} can contain '|' to concatenate several commands.
{cmd} must not open or close tab pages or reorder them.
Also see |:windo|, |:argdo| and |:bufdo|.
Also see |:windo|, |:argdo|, |:bufdo|, |:cdo|, |:ldo|, |:cfdo|
and |:lfdo|.
==============================================================================
3. Other items *tab-page-other*

View File

@@ -1,4 +1,4 @@
*term.txt* For Vim version 7.4. Last change: 2014 May 13
*term.txt* For Vim version 7.4. Last change: 2015 Feb 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -357,7 +357,7 @@ adjust the various t_ codes. This avoids the problem that the xterm can
produce different codes, depending on the mode it is in (8-bit, VT102,
VT220, etc.). The result is that codes like <xF1> are no longer needed.
Note: This is only done on startup. If the xterm options are changed after
Vim has started, the escape sequences may not be recognized any more.
Vim has started, the escape sequences may not be recognized anymore.
*xterm-resize*
Window resizing with xterm only works if the allowWindowOps resource is
@@ -425,11 +425,9 @@ cleared when scrolling).
Unfortunately it is not possible to deduce from the termcap how cursor
positioning should be done when using a scrolling region: Relative to the
beginning of the screen or relative to the beginning of the scrolling region.
Most terminals use the first method. A known exception is the MS-DOS console
(pcterm). The 't_CS' option should be set to any string when cursor
positioning is relative to the start of the scrolling region. It should be
set to an empty string otherwise. It defaults to "yes" when 'term' is
"pcterm".
Most terminals use the first method. The 't_CS' option should be set to any
string when cursor positioning is relative to the start of the scrolling
region. It should be set to an empty string otherwise.
Note for xterm users: The shifted cursor keys normally don't work. You can
make them work with the xmodmap command and some mappings in Vim.
@@ -672,10 +670,9 @@ border, the text is scrolled.
A selection can be started by pressing the left mouse button on the first
character, moving the mouse to the last character, then releasing the mouse
button. You will not always see the selection until you release the button,
only in some versions (GUI, MS-DOS, WIN32) will the dragging be shown
immediately. Note that you can make the text scroll by moving the mouse at
least one character in the first/last line in the window when 'scrolloff' is
non-zero.
only in some versions (GUI, Windows) will the dragging be shown immediately.
Note that you can make the text scroll by moving the mouse at least one
character in the first/last line in the window when 'scrolloff' is non-zero.
In Normal, Visual and Select mode clicking the right mouse button causes the
Visual area to be extended. When 'mousemodel' is "popup", the left button has
@@ -689,9 +686,9 @@ work on systems where the window manager consumes the mouse events when the
alt key is pressed (it may move the window).
*double-click*
Double, triple and quadruple clicks are supported when the GUI is active,
for MS-DOS and Win32, and for an xterm (if the gettimeofday() function is
available). For selecting text, extra clicks extend the selection:
Double, triple and quadruple clicks are supported when the GUI is active, for
Windows and for an xterm. For selecting text, extra clicks extend the
selection:
click select ~
double word or % match *<2-LeftMouse>*
triple line *<3-LeftMouse>*

View File

@@ -190,7 +190,7 @@ child, you should have the intention to do this for at least one year.
How do you know that the money will be spent right? First of all you have my
personal guarantee as the author of Vim. I trust the people that are working
at the centre, I know them personally. Further more, the centre has been
at the centre, I know them personally. Furthermore, the centre has been
co-sponsored and inspected by World Vision, Save the Children Fund and is now
under the supervision of Pacific Academy Outreach Society. The centre is
visited about once a year to check the progress (at our own cost). I have

View File

@@ -1,4 +1,4 @@
*usr_02.txt* For Vim version 7.4. Last change: 2010 Jul 20
*usr_02.txt* For Vim version 7.4. Last change: 2015 Apr 12
VIM USER MANUAL - by Bram Moolenaar
@@ -29,11 +29,10 @@ To start Vim, enter this command: >
gvim file.txt
In UNIX you can type this at any command prompt. If you are running Microsoft
Windows, open an MS-DOS prompt window and enter the command.
In either case, Vim starts editing a file called file.txt. Because this
is a new file, you get a blank window. This is what your screen will look
like:
On Unix you can type this at any command prompt. If you are running Windows,
open a command prompt window and enter the command. In either case, Vim
starts editing a file called file.txt. Because this is a new file, you get a
blank window. This is what your screen will look like:
+---------------------------------------+
|# |
@@ -61,10 +60,9 @@ use this command: >
the editing occurs inside your command window. In other words, if you are
running inside an xterm, the editor uses your xterm window. If you are using
an MS-DOS command prompt window under Microsoft Windows, the editing occurs
inside this window. The text in the window will look the same for both
versions, but with gvim you have extra features, like a menu bar. More about
that later.
the command prompt under Microsoft Windows, the editing occurs inside this
window. The text in the window will look the same for both versions, but with
gvim you have extra features, like a menu bar. More about that later.
==============================================================================
*02.2* Inserting text
@@ -80,7 +78,7 @@ mistakes; you can correct them later. To enter the following programmer's
limerick, this is what you type: >
iA very intelligent turtle
Found programming UNIX a hurdle
Found programming Unix a hurdle
After typing "turtle" you press the <Enter> key to start a new line. Finally
you press the <Esc> key to stop Insert mode and go back to Normal mode. You
@@ -88,7 +86,7 @@ now have two lines of text in your Vim window:
+---------------------------------------+
|A very intelligent turtle |
|Found programming UNIX a hurdle |
|Found programming Unix a hurdle |
|~ |
|~ |
| |
@@ -110,7 +108,7 @@ of the window. This indicates you are in Insert mode.
+---------------------------------------+
|A very intelligent turtle |
|Found programming UNIX a hurdle |
|Found programming Unix a hurdle |
|~ |
|~ |
|-- INSERT -- |
@@ -187,7 +185,7 @@ look like this:
+---------------------------------------+
|intelligent turtle |
|Found programming UNIX a hurdle |
|Found programming Unix a hurdle |
|~ |
|~ |
| |
@@ -202,7 +200,7 @@ insert mode (the final <Esc>). The result:
+---------------------------------------+
|A young intelligent turtle |
|Found programming UNIX a hurdle |
|Found programming Unix a hurdle |
|~ |
|~ |
| |
@@ -215,7 +213,7 @@ To delete a whole line use the "dd" command. The following line will
then move up to fill the gap:
+---------------------------------------+
|Found programming UNIX a hurdle |
|Found programming Unix a hurdle |
|~ |
|~ |
|~ |
@@ -332,7 +330,7 @@ Insert mode. Then you can type the text for the new line.
Suppose the cursor is somewhere in the first of these two lines:
A very intelligent turtle ~
Found programming UNIX a hurdle ~
Found programming Unix a hurdle ~
If you now use the "o" command and type new text: >
@@ -342,7 +340,7 @@ The result is:
A very intelligent turtle ~
That liked using Vim ~
Found programming UNIX a hurdle ~
Found programming Unix a hurdle ~
The "O" command (uppercase) opens a line above the cursor.
@@ -518,9 +516,11 @@ Summary: *help-summary* >
:help subject()
< Function "subject". >
:help -subject
< Command-line option "-subject". >
< Command-line argument "-subject". >
:help +subject
< Compile-time feature "+subject". >
:help /*
< Regular expression item "*" >
:help EventName
< Autocommand event "EventName". >
:help digraphs.txt

View File

@@ -528,7 +528,7 @@ MATCHING ANY SINGLE CHARACTER
The . (dot) character matches any existing character. For example, the
pattern "c.m" matches a string whose first character is a c, whose second
character is anything, and whose the third character is m. Example:
character is anything, and whose third character is m. Example:
We use a computer that became the cummin winter. ~
xxx xxx xxx

View File

@@ -285,7 +285,6 @@ Where can you find plugins?
- You could write one yourself, see |write-plugin|.
Some plugins come as a vimball archive, see |vimball|.
Some plugins can be updated automatically, see |getscript|.
USING A GLOBAL PLUGIN

View File

@@ -134,10 +134,10 @@ The following command makes the mouse work like a Microsoft Windows mouse: >
:behave mswin
The default behavior of the mouse on UNIX systems is xterm. The default
behavior on a Microsoft Windows system is selected during the installation
process. For details about what the two behaviors are, see |:behave|. Here
follows a summary.
The default behavior of the mouse on Unix systems is xterm. The default
behavior on Windows systems is selected during the installation process. For
details about what the two behaviors are, see |:behave|. Here follows a
summary.
XTERM MOUSE BEHAVIOR

View File

@@ -698,10 +698,10 @@ still be something that an external command can do better or faster.
through an external program. In other words, it runs the system command
represented by {program}, giving it the block of text represented by {motion}
as input. The output of this command then replaces the selected block.
Because this summarizes badly if you are unfamiliar with UNIX filters, take
Because this summarizes badly if you are unfamiliar with Unix filters, take
a look at an example. The sort command sorts a file. If you execute the
following command, the unsorted file input.txt will be sorted and written to
output.txt. (This works on both UNIX and Microsoft Windows.) >
output.txt. This works on both Unix and Windows. >
sort <input.txt >output.txt

View File

@@ -293,7 +293,6 @@ If you really don't want to see this message, you can add the 'A' flag to the
'updatecount' Number of key strokes after which the swap file is flushed to
disk.
'updatetime' Timeout after which the swap file is flushed to disk.
'swapsync' Whether the disk is synced when the swap file is flushed.
'directory' List of directory names where to store the swap file.
'maxmem' Limit for memory usage before writing text to the swap file.
'maxmemtot' Same, but for all files in total.

View File

@@ -309,7 +309,7 @@ matches can be found.
==============================================================================
*12.8* Find where a word is used
If you are a UNIX user, you can use a combination of Vim and the grep command
If you are a Unix user, you can use a combination of Vim and the grep command
to edit all the files that contain a given word. This is extremely useful if
you are working on a program and want to view or edit all the files that
contain a specific variable.
@@ -324,7 +324,7 @@ will only list the files containing the word and not print the matching lines.
The word it is searching for is "frame_counter". Actually, this can be any
regular expression. (Note: What grep uses for regular expressions is not
exactly the same as what Vim uses.)
The entire command is enclosed in backticks (`). This tells the UNIX shell
The entire command is enclosed in backticks (`). This tells the Unix shell
to run this command and pretend that the results were typed on the command
line. So what happens is that the grep command is run and produces a list of
files, these files are put on the Vim command line. This results in Vim

View File

@@ -70,9 +70,7 @@ difference. Without it executes the program normally, with the range a number
of text lines is filtered through the program.
Executing a whole row of programs this way is possible. But a shell is much
better at it. You can start a new shell this way: >
:shell
better at it. You can start a new shell with |:terminal|.
This is similar to using CTRL-Z to suspend Vim. The difference is that a new
shell is started.

View File

@@ -25,7 +25,7 @@ Back in the early days, the old Teletype machines used two characters to
start a new line. One to move the carriage back to the first position
(carriage return, <CR>), another to move the paper up (line feed, <LF>).
When computers came out, storage was expensive. Some people decided that
they did not need two characters for end-of-line. The UNIX people decided
they did not need two characters for end-of-line. The Unix people decided
they could use <Line Feed> only for end-of-line. The Apple people
standardized on <CR>. The MS-DOS (and Microsoft Windows) folks decided to
keep the old <CR><LF>.
@@ -34,7 +34,7 @@ have line-break problems. The Vim editor automatically recognizes the
different file formats and handles things properly behind your back.
The option 'fileformats' contains the various formats that will be tried
when a new file is edited. The following command, for example, tells Vim to
try UNIX format first and MS-DOS format second: >
try Unix format first and MS-DOS format second: >
:set fileformats=unix,dos
@@ -97,12 +97,12 @@ CONVERSION
You can use the 'fileformat' option to convert from one file format to
another. Suppose, for example, that you have an MS-DOS file named README.TXT
that you want to convert to UNIX format. Start by editing the MS-DOS format
that you want to convert to Unix format. Start by editing the MS-DOS format
file: >
vim README.TXT
Vim will recognize this as a dos format file. Now change the file format to
UNIX: >
Unix: >
:set fileformat=unix
:write

View File

@@ -563,9 +563,9 @@ that combination. Thus CTRL-K dP also works. Since there is no digraph for
"dP" Vim will also search for a "Pd" digraph.
Note:
The digraphs depend on the character set that Vim assumes you are
using. On MS-DOS they are different from MS-Windows. Always use
":digraphs" to find out which digraphs are currently available.
The digraphs depend on the character set that Vim assumes you
are using. Always use ":digraphs" to find out which digraphs are
currently available.
You can define your own digraphs. Example: >

View File

@@ -83,7 +83,7 @@ matter if 'ignorecase' or 'smartcase' was changed.
Note:
If your search takes much longer than you expected, you can interrupt
it with CTRL-C on Unix and CTRL-Break on MS-DOS and MS-Windows.
it with CTRL-C on Unix and CTRL-Break on Windows.
==============================================================================
*27.2* Wrapping around the file end

View File

@@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 7.4. Last change: 2014 Aug 16
*usr_41.txt* For Vim version 7.4. Last change: 2015 Nov 30
VIM USER MANUAL - by Bram Moolenaar
@@ -888,6 +888,11 @@ Mappings: *mapping-functions*
maparg() get rhs of a mapping
wildmenumode() check if the wildmode is active
Testing: *test-functions*
assert_equal() assert that two expressions values are equal
assert_false() assert that an expression is false
assert_true() assert that an expression is true
Various: *various-functions*
mode() get current editing mode
visualmode() last visual mode used
@@ -1494,8 +1499,8 @@ Here is a summary of items that apply to Vim scripts. They are also mentioned
elsewhere, but form a nice checklist.
The end-of-line character depends on the system. For Unix a single <NL>
character is used. For MS-DOS, Windows and the like, <CR><LF> is used.
This is important when using mappings that end in a <CR>. See |:source_crnl|.
character is used. For Windows <CR><LF> is used. This is important when
using mappings that end in a <CR>. See |:source_crnl|.
WHITE SPACE
@@ -2465,8 +2470,6 @@ utility is recommended.
For utmost portability use Vim itself to pack scripts together. This can be
done with the Vimball utility. See |vimball|.
It's good if you add a line to allow automatic updating. See |glvs-plugins|.
==============================================================================
Next chapter: |usr_42.txt| Add new menus

View File

@@ -272,19 +272,15 @@ g8 Print the hex values of the bytes used in the
:!! Repeat last ":!{cmd}".
*:ve* *:version*
:ve[rsion] Print the version number of the editor. If the
compiler used understands "__DATE__" the compilation
date is mentioned. Otherwise a fixed release-date is
shown.
The following lines contain information about which
features were enabled when Vim was compiled. When
there is a preceding '+', the feature is included,
when there is a '-' it is excluded. To change this,
you have to edit feature.h and recompile Vim.
To check for this in an expression, see |has()|.
Here is an overview of the features.
The first column shows the smallest version in which
they are included:
:ve[rsion] Print the version number of the editor. The following
lines contain information about which features were
enabled when Vim was compiled. When there is a
preceding '+', the feature is included, when there is
a '-' it is excluded. To change this, you have to
edit feature.h and recompile Vim. To check for this
in an expression, see |has()|. Here is an overview of
the features. The first column shows the smallest
version in which they are included:
T tiny
S small
N normal
@@ -299,9 +295,6 @@ g8 Print the hex values of the bytes used in the
*+acl* |ACL| support included
B *+arabic* |Arabic| language support
N *+autocmd* |:autocmd|, automatic commands
m *+balloon_eval* |balloon-eval| support. Included when compiling with
supported GUI (Motif, GTK, GUI) and either
Netbeans/Sun Workshop integration or |+eval| feature.
N *+browse* |:browse| command
N *+byte_offset* support for 'o' flag in 'statusline' option, "go"
and ":goto" commands.
@@ -321,7 +314,6 @@ N *+dialog_gui* Support for |:confirm| with GUI dialog.
N *+dialog_con* Support for |:confirm| with console dialog.
N *+dialog_con_gui* Support for |:confirm| with GUI and console dialog.
N *+digraphs* |digraphs| *E196*
*+dnd* Support for DnD into the "~ register |quote_~|.
N *+eval* expression evaluation |eval.txt|
N *+ex_extra* Vim's extra Ex commands: |:center|, |:left|,
|:normal|, |:retab| and |:right|
@@ -331,12 +323,7 @@ N *+file_in_path* |gf|, |CTRL-W_f| and |<cfile>|
N *+find_in_path* include file searches: |[I|, |:isearch|,
|CTRL-W_CTRL-I|, |:checkpath|, etc.
N *+folding* |folding|
*+footer* |gui-footer|
N *+gettext* message translations |multi-lang|
*+GUI_Athena* Unix only: Athena |GUI|
*+GUI_neXtaw* Unix only: neXtaw |GUI|
*+GUI_GTK* Unix only: GTK+ |GUI|
*+GUI_Motif* Unix only: Motif |GUI|
*+iconv* Compiled with the |iconv()| function
*+iconv/dyn* Likewise |iconv-dynamic| |/dyn|
N *+insert_expand* |insert_expand| Insert mode completion
@@ -376,6 +363,7 @@ N *+startuptime* |--startuptime| argument
N *+statusline* Options 'statusline', 'rulerformat' and special
formats of 'titlestring' and 'iconstring'
N *+syntax* Syntax highlighting |syntax|
N *+tablineat* 'tabline' option recognizing %@Func@ items.
N *+tag_binary* binary searching in tags file |tag-binary-search|
N *+tag_old_static* old method for static tags |tag-old-static|
m *+tag_any_white* any white space allowed in tags file |tag-any-white|
@@ -576,17 +564,11 @@ which it was defined is reported.
:5sleep "sleep for five seconds
:sleep 100m "sleep for a hundred milliseconds
10gs "sleep for ten seconds
< Can be interrupted with CTRL-C (CTRL-Break on MS-DOS).
< Can be interrupted with CTRL-C (CTRL-Break on Windows).
"gs" stands for "goto sleep".
While sleeping the cursor is positioned in the text,
if at a visible position.
*g_CTRL-A*
g CTRL-A Only when Vim was compiled with MEM_PROFILING defined
(which is very rare): print memory usage statistics.
Only useful for debugging Vim.
==============================================================================
2. Using Vim like less or more *less*

View File

@@ -44,8 +44,7 @@ Memory usage limits
The option 'maxmem' ('mm') is used to set the maximum memory used for one
buffer (in kilobytes). 'maxmemtot' is used to set the maximum memory used for
all buffers (in kilobytes). The defaults depend on the system used. For
MS-DOS, 'maxmemtot' is set depending on the amount of memory available.
all buffers (in kilobytes). The defaults depend on the system used.
These are not hard limits, but tell Vim when to move text into a swap file.
If you don't like Vim to swap to a file, set 'maxmem' and 'maxmemtot' to a
very large value. The swap file will then only be used for recovery. If you
@@ -57,15 +56,9 @@ argument when starting Vim.
Support for different systems.
Vim can be used on:
- All Unix systems (it works on all systems it was tested on, although
the GUI and Perl interface may not work everywhere).
- MS-DOS in real-mode (no additional drivers required).
- In protected mode on Windows 3.1 and MS-DOS (DPMI driver required).
- Windows 95 and Windows NT, with support for long file names.
- Macintosh
Note that on some systems features need to be disabled to reduce
resource usage, esp. on MS-DOS. For some outdated systems you need to
use an older Vim version.
- Modern Unix systems (*BSD, Linux, etc.)
- Windows (XP SP 2 or greater)
- OS X
Multi level undo. |undo|
'u' goes backward in time, 'CTRL-R' goes forward again. Set option
@@ -83,8 +76,7 @@ Graphical User Interface (GUI). |gui|
Included support for GUI: menu's, mouse, scrollbars, etc. You can
define your own menus. Better support for CTRL/SHIFT/ALT keys in
combination with special keys and mouse. Supported for various
platforms, such as X11 (with Motif and Athena interfaces), GTK, Win32
(Windows 95 and later), and Macintosh.
platforms such as Win32.
Multiple windows and buffers. |windows.txt|
Vim can split the screen into several windows, each editing a
@@ -347,9 +339,8 @@ Printing. |printing|
Mouse support. |mouse-using|
The mouse is supported in the GUI version, in an xterm for Unix, for
BSDs with sysmouse, for Linux with gpm, for MS-DOS, and Win32. It
can be used to position the cursor, select the visual area, paste a
register, etc.
BSDs with sysmouse, for Linux with gpm, and for Win32. It can be used
to position the cursor, select the visual area, paste a register, etc.
Usage of key names. |<>| |key-notation|
Special keys now all have a name like <Up>, <End>, etc.

View File

@@ -199,9 +199,14 @@ Other options:
'cpoptions' ('g', 'w', 'H', '*', '-', 'j', and all POSIX flags were removed)
'guioptions' (only the 't' flag was removed)
'guipty'
'imactivatefunc'
'imactivatekey'
'imstatusfunc'
'macatsui'
'restorescreen'
'shelltype'
'shortname'
'swapsync'
'termencoding' (Vim 7.4.852 also removed this for Windows)
'textauto'
'textmode'
@@ -214,6 +219,7 @@ Other options:
Other commands:
:Print
:fixdel
:helpfind
:mode (no longer accepts an argument)
:open
:shell

View File

@@ -1,4 +1,4 @@
*windows.txt* For Vim version 7.4. Last change: 2014 Dec 05
*windows.txt* For Vim version 7.4. Last change: 2015 Jan 31
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -681,7 +681,6 @@ can also get to them with the buffer list commands, like ":bnext".
When using the |:tab| modifier each argument is opened in a
tab page. The last window is used if it's empty.
Also see |++opt| and |+cmd|.
{only available when compiled with a GUI}
==============================================================================
8. Do a command in all buffers or windows *list-repeat*
@@ -702,7 +701,8 @@ can also get to them with the buffer list commands, like ":bnext".
the current window.
{cmd} can contain '|' to concatenate several commands.
{cmd} must not open or close windows or reorder them.
Also see |:tabdo|, |:argdo| and |:bufdo|.
Also see |:tabdo|, |:argdo|, |:bufdo|, |:cdo|, |:ldo|,
|:cfdo| and |:lfdo|.
*:bufdo*
:[range]bufdo[!] {cmd} Execute {cmd} in each buffer in the buffer list or if
@@ -728,7 +728,8 @@ can also get to them with the buffer list commands, like ":bnext".
autocommand event is disabled by adding it to
'eventignore'. This considerably speeds up editing
each buffer.
Also see |:tabdo|, |:argdo| and |:windo|.
Also see |:tabdo|, |:argdo|, |:windo|, |:cdo|, |:ldo|,
|:cfdo| and |:lfdo|.
Examples: >
@@ -984,8 +985,8 @@ list of buffers. |unlisted-buffer|
(the term "unlisted" is a bit confusing then...).
Each buffer has a unique number. That number will not change,
so you can always go to a specific buffer with ":buffer N" or
"N CTRL-^", where N is the buffer number.
thus you can always go to a specific buffer with ":buffer N"
or "N CTRL-^", where N is the buffer number.
Indicators (chars in the same column are mutually exclusive):
u an unlisted buffer (only displayed when [!] is used)

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2015 Jan 07
" Last Change: 2015 Apr 06
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -1262,8 +1262,8 @@ au BufNewFile,BufRead */etc/modules.conf,*/etc/modules,*/etc/conf.modules setf m
" Mplayer config
au BufNewFile,BufRead mplayer.conf,*/.mplayer/config setf mplayerconf
" Moterola S record
au BufNewFile,BufRead *.s19,*.s28,*.s37 setf srec
" Motorola S record
au BufNewFile,BufRead *.s19,*.s28,*.s37,*.mot,*.srec setf srec
" Mrxvtrc
au BufNewFile,BufRead mrxvtrc,.mrxvtrc setf mrxvtrc
@@ -1290,7 +1290,7 @@ au BufNewFile,BufRead *.mush setf mush
au BufNewFile,BufRead Mutt{ng,}rc setf muttrc
" Nano
au BufNewFile,BufRead */etc/nanorc,.nanorc setf nanorc
au BufNewFile,BufRead */etc/nanorc,*.nanorc setf nanorc
" Nastran input/DMAP
"au BufNewFile,BufRead *.dat setf nastran
@@ -1393,7 +1393,7 @@ else
au BufNewFile,BufRead *.pl call s:FTpl()
endif
au BufNewFile,BufRead *.plx,*.al setf perl
au BufNewFile,BufRead *.p6,*.pm6 setf perl6
au BufNewFile,BufRead *.p6,*.pm6,*.pl6 setf perl6
func! s:FTpl()
if exists("g:filetype_pl")
@@ -1422,6 +1422,7 @@ au BufNewFile,BufRead *.pm
" Perl POD
au BufNewFile,BufRead *.pod setf pod
au BufNewFile,BufRead *.pod6 setf pod6
" Php, php3, php4, etc.
" Also Phtml (was used for PHP 2 in the past)
@@ -2032,6 +2033,10 @@ func! s:FTRules()
setf conf " Better than hog
return
endif
if path =~ '^/\(etc\|usr/share\)/polkit-1/rules\.d'
setf javascript
return
endif
try
let config_lines = readfile('/etc/udev/udev.conf')
catch /^Vim\%((\a\+)\)\=:E484/

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: 2015-03-27
if exists('b:did_ftplugin')
finish
@@ -16,39 +16,38 @@ setlocal iskeyword=48-57,A-Z,_,a-z
setlocal comments=:NB.
setlocal commentstring=NB.\ %s
setlocal formatoptions-=t
setlocal shiftwidth=2 softtabstop=2 expandtab
setlocal matchpairs=(:)
let b:undo_ftplugin = 'setlocal matchpairs< expandtab< softtabstop< shiftwidth< formatoptions< commentstring< comments< iskeyword<'
let b:undo_ftplugin = 'setlocal matchpairs< formatoptions< commentstring< comments< iskeyword<'
" Section movement with ]] ][ [[ []. The start/end patterns below are amended
" inside the function in order to avoid matching on the current cursor line.
let s:sectionstart = '.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>.*'
let s:sectionstart = '\%(\s*Note\|.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\)\>.*'
let s:sectionend = '\s*)\s*'
function! s:SearchSection(end, backwards, visualmode) abort
if a:visualmode !=# ''
normal! gv
endif
let flags = a:backwards ? 'bsW' : 'sW'
let l:flags = a:backwards ? 'bsW' : 'sW'
if a:end
call search('^' . s:sectionend . (a:backwards ? '\n\_.\{-}\%#' : '$'), flags)
call search('^' . s:sectionend . (a:backwards ? '\n\_.\{-}\%#' : '$'), l:flags)
else
call search('^' . s:sectionstart . (a:backwards ? '\n\_.\{-}\%#' : '$'), flags)
call search('^' . s:sectionstart . (a:backwards ? '\n\_.\{-}\%#' : '$'), l:flags)
endif
endfunction
noremap <script> <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, '')<CR>
xnoremap <script> <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, visualmode())<CR>
noremap <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, '')<CR>
xnoremap <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, visualmode())<CR>
sunmap <buffer> ]]
noremap <script> <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, '')<CR>
xnoremap <script> <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, visualmode())<CR>
noremap <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, '')<CR>
xnoremap <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, visualmode())<CR>
sunmap <buffer> ][
noremap <script> <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, '')<CR>
xnoremap <script> <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, visualmode())<CR>
noremap <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, '')<CR>
xnoremap <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, visualmode())<CR>
sunmap <buffer> [[
noremap <script> <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, '')<CR>
xnoremap <script> <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, visualmode())<CR>
noremap <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, '')<CR>
xnoremap <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, visualmode())<CR>
sunmap <buffer> []
let b:undo_ftplugin .= ' | silent! execute "unmap <buffer> ]]"'
@@ -66,7 +65,7 @@ endif
" Enhanced "%" matching (see ":help matchit")
if exists('loaded_matchit') && !exists('b:match_words')
let b:match_ignorecase = 0
let b:match_words = '^.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(\:\s*0\|def\s\+0\|define\)\>:^\s*\:\s*$:^\s*)\s*$'
let b:match_words = '^\%(\s*Note\|.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(\:\s*0\|def\s\+0\|define\)\)\>:^\s*\:\s*$:^\s*)\s*$'
\ . ',\<\%(for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.:\<\%(case\|catch[dt]\=\|else\%(if\)\=\|fcase\)\.:\<end\.'
let b:undo_ftplugin .= ' | unlet! b:match_ignorecase b:match_words'
endif

View File

@@ -2,7 +2,7 @@
" Filename: spec.vim
" Maintainer: Igor Gnatenko i.gnatenko.brain@gmail.com
" Former Maintainer: Gustavo Niemeyer <niemeyer@conectiva.com> (until March 2014)
" Last Change: Sun Mar 2 11:24 MSK 2014 Igor Gnatenko
" Last Change: Fri Feb 20 16:01 MSK 2014 Igor Gnatenko
if exists("b:did_ftplugin")
finish
@@ -18,7 +18,9 @@ if !exists("no_plugin_maps") && !exists("no_spec_maps")
endif
endif
noremap <buffer> <unique> <script> <Plug>SpecChangelog :call <SID>SpecChangelog("")<CR>
if !hasmapto("call <SID>SpecChangelog(\"\")<CR>")
noremap <buffer> <unique> <script> <Plug>SpecChangelog :call <SID>SpecChangelog("")<CR>
endif
if !exists("*s:GetRelVer")
function! s:GetRelVer()

View File

@@ -1,9 +1,11 @@
" Vim indent file
" Language: Fortran95 (and Fortran90, Fortran77, F and elf90)
" Version: 0.40
" Last Change: 2011 Dec. 28
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www.unb.ca/chem/ajit/>
" Language: Fortran 2008 (and earlier versions: 2003, 95, 90, and 77)
" Version: 0.41
" Last Change: 2015 Jan. 15
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
" Usage: Do :help fortran-indent from Vim
" Credits:
" Useful suggestions were made by: Albert Oliver Serra.
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@@ -36,8 +38,8 @@ if !exists("b:fortran_fixed_source")
else
" f90 and f95 allow both fixed and free source form
" assume fixed source form unless signs of free source form
" are detected in the first five columns of the first 250 lines
" Detection becomes more accurate and time-consuming if more lines
" are detected in the first five columns of the first s:lmax lines.
" Detection becomes more accurate and more time-consuming if more lines
" are checked. Increase the limit below if you keep lots of comments at
" the very top of each file and you have a fast computer
let s:lmax = 500
@@ -129,7 +131,7 @@ function FortranGetIndent(lnum)
if getline(v:lnum) =~? '^\s*\(\d\+\s\)\=\s*'
\. '\(else\|else\s*if\|else\s*where\|case\|'
\. 'end\s*\(if\|where\|select\|interface\|'
\. 'type\|forall\|associate\|enum\)\)\>'
\. 'type\|forall\|associate\|enum\|block\)\)\>'
let ind = ind - &sw
" Fix indent for case statement immediately after select
if prevstat =~? '\<select\s\+\(case\|type\)\>'
@@ -141,8 +143,11 @@ function FortranGetIndent(lnum)
if prevstat =~ '&\s*$' && prev2stat !~ '&\s*$'
let ind = ind + &sw
endif
if prevstat =~ '&\s*$' && prevstat =~ '\<else\s*if\>'
let ind = ind - &sw
endif
"Line after last continuation line
if prevstat !~ '&\s*$' && prev2stat =~ '&\s*$'
if prevstat !~ '&\s*$' && prev2stat =~ '&\s*$' && prevstat !~? '\<then\>'
let ind = ind - &sw
endif

View File

@@ -2,7 +2,7 @@
" Header: "{{{
" Maintainer: Bram Moolenaar
" Original Author: Andy Wokula <anwoku@yahoo.de>
" Last Change: 2014 Aug 23
" Last Change: 2015 Jun 12
" Version: 1.0
" Description: HTML indent script with cached state for faster indenting on a
" range of lines.
@@ -94,7 +94,7 @@ func! HtmlIndent_CheckUserSettings()
let autotags = g:html_indent_autotags
endif
let b:hi_removed_tags = {}
if autotags
if len(autotags) > 0
call s:RemoveITags(b:hi_removed_tags, split(autotags, ","))
endif
@@ -245,6 +245,10 @@ call s:AddITags(s:indent_tags, [
\ 'header', 'group', 'keygen', 'mark', 'math', 'meter', 'nav', 'output',
\ 'progress', 'ruby', 'section', 'svg', 'texture', 'time', 'video',
\ 'wbr', 'text'])
" Tags added for web components:
call s:AddITags(s:indent_tags, [
\ 'content', 'shadow', 'template'])
"}}}
" Add Block Tags: these contain alien content
@@ -287,7 +291,7 @@ func! s:CountITags(text)
let s:nextrel = 0 " relative indent steps for next line [unit &sw]:
let s:block = 0 " assume starting outside of a block
let s:countonly = 1 " don't change state
call substitute(a:text, '<\zs/\=\w\+\>\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
call substitute(a:text, '<\zs/\=\w\+\(-\w\+\)*\>\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
let s:countonly = 0
endfunc "}}}
@@ -299,7 +303,7 @@ func! s:CountTagsAndState(text)
let s:nextrel = 0 " relative indent steps for next line [unit &sw]:
let s:block = b:hi_newstate.block
let tmp = substitute(a:text, '<\zs/\=\w\+\>\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
let tmp = substitute(a:text, '<\zs/\=\w\+\(-\w\+\)*\>\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
if s:block == 3
let b:hi_newstate.scripttype = s:GetScriptType(matchstr(tmp, '\C.*<SCRIPT\>\zs[^>]*'))
endif
@@ -311,6 +315,9 @@ func! s:CheckTag(itag)
"{{{
" Returns an empty string or "SCRIPT".
" a:itag can be "tag" or "/tag" or "<!--" or "-->"
if (s:CheckCustomTag(a:itag))
return ""
endif
let ind = s:get_tag(a:itag)
if ind == -1
" closing tag
@@ -365,6 +372,36 @@ func! s:CheckBlockTag(blocktag, ind)
return ""
endfunc "}}}
" Used by s:CheckTag().
func! s:CheckCustomTag(ctag)
"{{{
" Returns 1 if ctag is the tag for a custom element, 0 otherwise.
" a:ctag can be "tag" or "/tag" or "<!--" or "-->"
let pattern = '\%\(\w\+-\)\+\w\+'
if match(a:ctag, pattern) == -1
return 0
endif
if matchstr(a:ctag, '\/\ze.\+') == "/"
" closing tag
if s:block != 0
" ignore ctag within a block
return 1
endif
if s:nextrel == 0
let s:curind -= 1
else
let s:nextrel -= 1
endif
else
" opening tag
if s:block != 0
return 1
endif
let s:nextrel += 1
endif
return 1
endfunc "}}}
" Return the <script> type: either "javascript" or ""
func! s:GetScriptType(str)
"{{{
@@ -883,7 +920,7 @@ endfunc "}}}
" THE MAIN INDENT FUNCTION. Return the amount of indent for v:lnum.
func! HtmlIndent()
"{{{
if prevnonblank(v:lnum - 1) <= 1
if prevnonblank(v:lnum - 1) < 1
" First non-blank line has no indent.
return 0
endif

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: 2015-01-11
if exists('b:did_indent')
finish
@@ -26,25 +26,25 @@ if !exists('g:j_indent_definitions')
endif
function GetJIndent() abort
let prevlnum = prevnonblank(v:lnum-1)
if prevlnum == 0
let l:prevlnum = prevnonblank(v:lnum - 1)
if l:prevlnum == 0
return 0
endif
let indent = indent(prevlnum)
let prevline = getline(prevlnum)
if prevline =~# '^\s*\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|fcase\|for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.\%(\%(\<end\.\)\@!.\)*$'
let l:indent = indent(l:prevlnum)
let l:prevline = getline(l:prevlnum)
if l:prevline =~# '^\s*\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|fcase\|for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.\%(\%(\<end\.\)\@!.\)*$'
" Increase indentation after an initial control word that starts or
" continues a block and is not terminated by "end."
let indent += shiftwidth()
elseif g:j_indent_definitions && (prevline =~# '\<\%([1-4]\|13\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>' || prevline =~# '^\s*:\s*$')
let l:indent += shiftwidth()
elseif g:j_indent_definitions && (l:prevline =~# '\<\%([1-4]\|13\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>' || l:prevline =~# '^\s*:\s*$')
" Increase indentation in explicit definitions of adverbs, conjunctions,
" and verbs
let indent += shiftwidth()
let l:indent += shiftwidth()
endif
" Decrease indentation in lines that start with either control words that
" continue or end a block, or the special items ")" and ":"
if getline(v:lnum) =~# '^\s*\%()\|:\|\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|end\|fcase\)\.\)'
let indent -= shiftwidth()
let l:indent -= shiftwidth()
endif
return indent
return l:indent
endfunction

View File

@@ -1,7 +1,7 @@
" Vim indent file
" Language: Vim script
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2014 Sep 19
" Last Change: 2014 Dec 12
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@@ -89,7 +89,7 @@ function GetVimIndentIntern()
" Subtract a 'shiftwidth' on a :endif, :endwhile, :catch, :finally, :endtry,
" :endfun, :else and :augroup END.
if cur_text =~ '^\s*\(ene\@!\|cat\|fina\|el\|aug\%[roup]\s*!\=\s\+END\)'
if cur_text =~ '^\s*\(ene\@!\|cat\|fina\|el\|aug\%[roup]\s*!\=\s\+[eE][nN][dD]\)'
let ind = ind - &sw
endif

View File

@@ -540,10 +540,6 @@ if has("title")
call append("$", "iconstring\twhen not empty, text for the icon of this window")
call <SID>OptionG("iconstring", &iconstring)
endif
if has("win32")
call append("$", "restorescreen\trestore the screen contents when exiting Vim")
call <SID>BinOptionG("rs", &rs)
endif
call <SID>Header("using the mouse")
@@ -926,6 +922,9 @@ call <SID>BinOptionL("bin")
call append("$", "endofline\tlast line in the file has an end-of-line")
call append("$", "\t(local to buffer)")
call <SID>BinOptionL("eol")
call append("$", "fixeol\tfixes missing end-of-line at end of text file")
call append("$", "\t(local to buffer)")
call <SID>BinOptionL("fixeol")
if has("multi_byte")
call append("$", "bomb\tprepend a Byte Order Mark to the file")
call append("$", "\t(local to buffer)")
@@ -973,8 +972,6 @@ call <SID>OptionG("dir", &dir)
call append("$", "swapfile\tuse a swap file for this buffer")
call append("$", "\t(local to buffer)")
call <SID>BinOptionL("swf")
call append("$", "swapsync\t\"sync\", \"fsync\" or empty; how to flush a swap file to disk")
call <SID>OptionG("sws", &sws)
call append("$", "updatecount\tnumber of characters typed to cause a swap file update")
call append("$", " \tset uc=" . &uc)
call append("$", "updatetime\ttime in msec after which the swap file will be updated")

View File

@@ -1,41 +0,0 @@
" ---------------------------------------------------------------------
" getscriptPlugin.vim
" Author: Charles E. Campbell
" Date: Nov 29, 2013
" Installing: :help glvs-install
" Usage: :help glvs
"
" GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim
"
" (Rom 15:11 WEB) Again, "Praise the Lord, all you Gentiles! Let
" all the peoples praise Him."
" ---------------------------------------------------------------------
" Initialization: {{{1
" if you're sourcing this file, surely you can't be
" expecting vim to be in its vi-compatible mode
if exists("g:loaded_getscriptPlugin")
finish
endif
if &cp
if &verbose
echo "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
endif
finish
endif
let g:loaded_getscriptPlugin = "v36"
let s:keepcpo = &cpo
set cpo&vim
" ---------------------------------------------------------------------
" Public Interface: {{{1
com! -nargs=0 GetLatestVimScripts call getscript#GetLatestVimScripts()
com! -nargs=0 GetScripts call getscript#GetLatestVimScripts()
silent! com -nargs=0 GLVS call getscript#GetLatestVimScripts()
" ---------------------------------------------------------------------
" Restore Options: {{{1
let &cpo= s:keepcpo
unlet s:keepcpo
" ---------------------------------------------------------------------
" vim: ts=8 sts=2 fdm=marker nowrap

View File

@@ -1,9 +1,9 @@
" Vim syntax file
" Language: AmigaDos
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Sep 11, 2006
" Version: 6
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Oct 23, 2014
" Version: 7
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_AMIGA
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded

View File

@@ -1,8 +1,9 @@
" Vim syntax file
" Language: Asterisk config file
" Maintainer: brc007
" Maintainer: Jean Aunis <jean.aunis@yahoo.fr>
" Previous Maintainer: brc007
" Updated for 1.2 by Tilghman Lesher (Corydon76)
" Last Change: 2006 Mar 20
" Last Change: 2015 Feb 27
" version 0.4
"
if version < 600
@@ -17,18 +18,19 @@ syn sync fromstart
syn keyword asteriskTodo TODO contained
syn match asteriskComment ";.*" contains=asteriskTodo
syn match asteriskContext "\[.\{-}\]"
syn match asteriskExten "^\s*exten\s*=>\?\s*[^,]\+" contains=asteriskPattern
syn match asteriskExten "^\s*\zsexten\s*=>\?\s*[^,]\+\ze," contains=asteriskPattern nextgroup=asteriskPriority
syn match asteriskExten "^\s*\zssame\s*=>\?\s*\ze" nextgroup=asteriskPriority
syn match asteriskExten "^\s*\(register\|channel\|ignorepat\|include\|\(no\)\?load\)\s*=>\?"
syn match asteriskPattern "_\(\[[[:alnum:]#*\-]\+\]\|[[:alnum:]#*]\)*\.\?" contained
syn match asteriskPattern "[^A-Za-z0-9,]\zs[[:alnum:]#*]\+\ze" contained
syn match asteriskApp ",\zs[a-zA-Z]\+\ze$"
syn match asteriskApp ",\zs[a-zA-Z]\+\ze("
" Digits plus oldlabel (newlabel)
syn match asteriskPriority ",\zs[[:digit:]]\+\(+[[:alpha:]][[:alnum:]_]*\)\?\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel
syn match asteriskPriority "\zs[[:digit:]]\+\(+[[:alpha:]][[:alnum:]_]*\)\?\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel
" oldlabel plus digits (newlabel)
syn match asteriskPriority ",\zs[[:alpha:]][[:alnum:]_]*+[[:digit:]]\+\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel
syn match asteriskPriority "\zs[[:alpha:]][[:alnum:]_]*+[[:digit:]]\+\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel
" s or n plus digits (newlabel)
syn match asteriskPriority ",\zs[sn]\(+[[:digit:]]\+\)\?\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel
syn match asteriskPriority "\zs[sn]\(+[[:digit:]]\+\)\?\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel
syn match asteriskLabel "(\zs[[:alpha:]][[:alnum:]]*\ze)" contained
syn match asteriskError "^\s*#\s*[[:alnum:]]*"
syn match asteriskInclude "^\s*#\s*\(include\|exec\)\s.*"

View File

@@ -1,13 +1,15 @@
" Vim syntax file
" Language: awk, nawk, gawk, mawk
" Maintainer: Antonio Colombo <azc100@gmail.com>
" Last Change: 2012 May 18
" Last Change: 2014 Oct 21
" AWK ref. is: Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger
" The AWK Programming Language, Addison-Wesley, 1988
" GAWK ref. is: Arnold D. Robbins
" Effective AWK Programming, Third Edition, O'Reilly, 2001
" Effective AWK Programming, Fourth Edition, O'Reilly, 2015
" (also available with the gawk source distribution)
" MAWK is a "new awk" meaning it implements AWK ref.
" mawk conforms to the Posix 1003.2 (draft 11.3)
@@ -33,17 +35,27 @@ set cpo&vim
syn keyword awkStatement break continue delete exit
syn keyword awkStatement function getline next
syn keyword awkStatement print printf return
" GAWK ref. p. 117
" GAWK ref. Chapter 7
syn keyword awkStatement nextfile
" AWK ref. p. 42, GAWK ref. p. 142-166
syn keyword awkFunction atan2 close cos exp fflush int log rand sin sqrt srand
syn keyword awkFunction gsub index length match split sprintf sub
syn keyword awkFunction substr system
" GAWK ref. p. 142-166
syn keyword awkFunction asort gensub mktime strftime strtonum systime
"
" GAWK ref. Chapter 9, Functions
"
" Numeric Functions
syn keyword awkFunction atan2 cos div exp int log rand sin sqrt srand
" String Manipulation Functions
syn keyword awkFunction asort asort1 gensub gsub index length match
syn keyword awkFunction patsplit split sprintf strtonum sub substr
syn keyword awkFunction tolower toupper
syn keyword awkFunction and or xor compl lshift rshift
syn keyword awkFunction dcgettext bindtextdomain
" Input Output Functions
syn keyword awkFunction close fflush system
" Time Functions
syn keyword awkFunction mktime strftime systime
" Bit Manipulation Functions
syn keyword awkFunction and compl lshift or rshift xor
" Getting Type Function
syn keyword awkFunction isarray
" String-Translation Functions
syn keyword awkFunction bindtextdomain dcgettext dcngetext
syn keyword awkConditional if else
syn keyword awkRepeat while for
@@ -51,13 +63,16 @@ syn keyword awkRepeat while for
syn keyword awkTodo contained TODO
syn keyword awkPatterns BEGIN END
" AWK ref. p. 36
syn keyword awkVariables ARGC ARGV FILENAME FNR FS NF NR
syn keyword awkVariables OFMT OFS ORS RLENGTH RS RSTART SUBSEP
" GAWK ref. p. 120-126
syn keyword awkVariables ARGIND BINMODE CONVFMT ENVIRON ERRNO
syn keyword awkVariables FIELDWIDTHS IGNORECASE LINT PROCINFO
syn keyword awkVariables RT RLENGTH TEXTDOMAIN
" GAWK ref. Chapter 7
" Built-in Variables That Control awk
syn keyword awkVariables BINMODE CONVFMT FIELDWIDTHS FPAT FS
syn keyword awkVariables IGNORECASE LINT OFMT OFS ORS PREC
syn keyword awkVariables ROUNDMODE RS SUBSEP TEXTDOMAIN
" Built-in Variables That Convey Information
syn keyword awkVariables ARGC ARGV ARGIND ENVIRON ERRNO FILENAME
syn keyword awkVariables FNR NF FUNCTAB NR PROCINFO RLENGTH RSTART
syn keyword awkVariables RT SYMTAB
syn keyword awkRepeat do
@@ -115,15 +130,15 @@ syn case match
"syn match awkIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>"
" Arithmetic operators: +, and - take care of ++, and --
"syn match awkOperator "+\|-\|\*\|/\|%\|="
"syn match awkOperator "+=\|-=\|\*=\|/=\|%="
"syn match awkOperator "^\|^="
syn match awkOperator "+\|-\|\*\|/\|%\|="
syn match awkOperator "+=\|-=\|\*=\|/=\|%="
syn match awkOperator "^\|^="
" Comparison expressions.
"syn match awkExpression "==\|>=\|=>\|<=\|=<\|\!="
"syn match awkExpression "\~\|\!\~"
"syn match awkExpression "?\|:"
"syn keyword awkExpression in
syn match awkExpression "==\|>=\|=>\|<=\|=<\|\!="
syn match awkExpression "\~\|\!\~"
syn match awkExpression "?\|:"
syn keyword awkExpression in
" Boolean Logic (OR, AND, NOT)
"syn match awkBoolLogic "||\|&&\|\!"
@@ -187,8 +202,8 @@ if version >= 508 || !exists("did_awk_syn_inits")
HiLink awkFloat Float
HiLink awkFileIO Special
"HiLink awkOperator Special
"HiLink awkExpression Special
HiLink awkOperator Special
HiLink awkExpression Special
HiLink awkBoolLogic Special
HiLink awkPatterns Special

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2014 Nov 13
" Last Change: 2015 Mar 05
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -47,16 +47,17 @@ if !exists("c_no_cformat")
endif
" cCppString: same as cString, but ends at end of line
if s:ft ==# "cpp" && !exists("cpp_no_cpp11")
if s:ft ==# "cpp" && !exists("cpp_no_cpp11") && !exists("c_no_cformat")
" ISO C++11
syn region cString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
syn region cCppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
elseif s:ft ==# "c" && !exists("c_no_c11")
elseif s:ft ==# "c" && !exists("c_no_c11") && !exists("c_no_cformat")
" ISO C99
syn region cString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
syn region cCppString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
else
" older C or C++
syn match cFormat display "%%" contained
syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
endif
@@ -80,7 +81,11 @@ syn match cSpecialCharacter display "L'\\x\x\+'"
if (s:ft ==# "c" && !exists("c_no_c11")) || (s:ft ==# "cpp" && !exists("cpp_no_cpp11"))
" ISO C11 or ISO C++ 11
syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
if exists("c_no_cformat")
syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell extend
else
syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
endif
syn match cCharacter "[Uu]'[^\\]'"
syn match cCharacter "[Uu]'[^']*'" contains=cSpecial
if exists("c_gnu")
@@ -330,6 +335,8 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
" POSIX 2001
syn keyword cConstant SIGBUS SIGPOLL SIGPROF SIGSYS SIGURG
syn keyword cConstant SIGVTALRM SIGXCPU SIGXFSZ
" non-POSIX signals
syn keyword cConstant SIGWINCH SIGINFO
" Add POSIX errors as well
syn keyword cConstant E2BIG EACCES EAGAIN EBADF EBADMSG EBUSY
syn keyword cConstant ECANCELED ECHILD EDEADLK EDOM EEXIST EFAULT
@@ -387,8 +394,13 @@ endif
syn cluster cLabelGroup contains=cUserLabel
syn match cUserCont display "^\s*\I\i*\s*:$" contains=@cLabelGroup
syn match cUserCont display ";\s*\I\i*\s*:$" contains=@cLabelGroup
syn match cUserCont display "^\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
syn match cUserCont display ";\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
if s:ft ==# 'cpp'
syn match cUserCont display "^\s*\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
syn match cUserCont display ";\s*\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
else
syn match cUserCont display "^\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
syn match cUserCont display ";\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
endif
syn match cUserLabel display "\I\i*" contained

View File

@@ -1,10 +1,10 @@
" Vim syntax file
" Language: COBOL
" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
" Language: COBOL
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" (formerly Davyd Ondrejko <vondraco@columbus.rr.com>)
" (formerly Sitaram Chamarty <sitaram@diac.com> and
" James Mitchell <james_mitchell@acm.org>)
" $Id: cobol.vim,v 1.2 2007/05/05 18:23:43 vimboss Exp $
" James Mitchell <james_mitchell@acm.org>)
" Last Change: 2015 Feb 13
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -145,7 +145,7 @@ syn match cobolString /'[^']*\('\|$\)/
syn match cobolIndicator "\%7c[D-]" contained
if exists("cobol_legacy_code")
syn region cobolCondFlow contains=ALLBUT,cobolLine start="\<\(IF\|INVALID\|END\|EOP\)\>" skip=/\('\|"\)[^"]\{-}\("\|'\|$\)/ end="\." keepend
syn region cobolCondFlow contains=ALLBUT,cobolLine,cobolBadLine start="\<\(IF\|INVALID\|END\|EOP\)\>" skip=/\('\|"\)[^"]\{-}\("\|'\|$\)/ end="\." keepend
endif
" many legacy sources have junk in columns 1-6: must be before others

View File

@@ -1,11 +1,13 @@
" Vim syntax file
" Language: configure.in script: M4 with sh
" Maintainer: Christian Hammesr <ch@lathspell.westend.com>
" Last Change: 2008 Sep 03
" Last Change: 2015 Jan 14
" (patch from Yngve Inntjore Levinsen to detect AC_MSG)
" (patch from Khym Chanur to add @Spell)
" Well, I actually even do not know much about m4. This explains why there
" is probably very much missing here, yet !
" But I missed a good hilighting when editing my GNU autoconf/automake
" But I missed good highlighting when editing my GNU autoconf/automake
" script, so I wrote this quick and dirty patch.
@@ -20,14 +22,19 @@ endif
" define the config syntax
syn match configdelimiter "[()\[\];,]"
syn match configoperator "[=|&\*\+\<\>]"
syn match configcomment "\(dnl.*\)\|\(#.*\)"
syn match configcomment "\(dnl.*\)\|\(#.*\)" contains=configDnl,@Spell
syn match configfunction "\<[A-Z_][A-Z0-9_]*\>"
syn match confignumber "[-+]\=\<\d\+\(\.\d*\)\=\>"
syn keyword configDnl dnl contained
syn keyword configkeyword if then else fi test for in do done
syn keyword configspecial cat rm eval
syn region configstring start=+"+ skip=+\\"+ end=+"+
syn region configstring start=+'+ skip=+\\'+ end=+'+
syn region configstring start=+`+ skip=+\\'+ end=+`+
" This shortens the script, see syn-ext-match..
syn region configstring start=+\z(["'`]\)+ skip=+\\\z1+ end=+\z1+ contains=@Spell
" Anything inside AC_MSG_TYPE([...]) and AC_MSG_TYPE(...) is a string.
syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" matchgroup=configdelimiter end="\])" contains=configdelimiter,@Spell
syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
@@ -43,6 +50,7 @@ if version >= 508 || !exists("did_config_syntax_inits")
HiLink configdelimiter Delimiter
HiLink configoperator Operator
HiLink configcomment Comment
HiLink configDnl Comment
HiLink configfunction Function
HiLink confignumber Number
HiLink configkeyword Keyword

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