mirror of
https://github.com/zoriya/vim.git
synced 2025-12-30 10:58:24 +00:00
Compare commits
240 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7cba71d7e3 | ||
|
|
edf634e0f1 | ||
|
|
abb71fbd39 | ||
|
|
472472898a | ||
|
|
86f2cd5bc5 | ||
|
|
796aa9c804 | ||
|
|
bc8801c931 | ||
|
|
bc7ce675b2 | ||
|
|
8dd3a43d75 | ||
|
|
ba96e9af38 | ||
|
|
acadbeabe1 | ||
|
|
0588d4f9d2 | ||
|
|
2d3d60a7d4 | ||
|
|
437bafe4c8 | ||
|
|
5801644819 | ||
|
|
89eaa4185e | ||
|
|
b54c3ff317 | ||
|
|
fc1f2015e8 | ||
|
|
31440a1f2b | ||
|
|
57e69ff2cc | ||
|
|
623e263ffb | ||
|
|
3ab14355ed | ||
|
|
1e2258297b | ||
|
|
3bcfca3ab4 | ||
|
|
90d121fa36 | ||
|
|
b20617b0b0 | ||
|
|
a5c0cc1133 | ||
|
|
623cf88f9c | ||
|
|
42093c0ec5 | ||
|
|
b822cb0f93 | ||
|
|
9532fe7fbe | ||
|
|
10ce39a0d5 | ||
|
|
1e96d9bf98 | ||
|
|
83a2a80d6f | ||
|
|
f2c4c39119 | ||
|
|
c73e4474b1 | ||
|
|
b9a46fec3e | ||
|
|
d05b191b91 | ||
|
|
170b10b421 | ||
|
|
b56195ed00 | ||
|
|
471a897569 | ||
|
|
8c08b5b569 | ||
|
|
eac784eced | ||
|
|
ad9c2a08f0 | ||
|
|
adfc5c2f9c | ||
|
|
d955a0971c | ||
|
|
ac77aec4da | ||
|
|
eec2981bbe | ||
|
|
97baee80f0 | ||
|
|
e99e84497b | ||
|
|
45a249513f | ||
|
|
2932359000 | ||
|
|
6835dc61ae | ||
|
|
73ac0c4281 | ||
|
|
6f1d9a096b | ||
|
|
00b24be454 | ||
|
|
d4f31dc454 | ||
|
|
b49edc11a1 | ||
|
|
61c04493b0 | ||
|
|
4658228262 | ||
|
|
a58c58b7e1 | ||
|
|
870b749ce1 | ||
|
|
2e45d21c81 | ||
|
|
df48fb456f | ||
|
|
36edf0685c | ||
|
|
f36213597d | ||
|
|
e25bc5abb4 | ||
|
|
ac105ed3c4 | ||
|
|
dfd63e30d1 | ||
|
|
6008433381 | ||
|
|
19df5cc04d | ||
|
|
397eadbe25 | ||
|
|
c1542744e7 | ||
|
|
b869c0da31 | ||
|
|
53bdec2ac9 | ||
|
|
ca8942c6e3 | ||
|
|
12c11d5530 | ||
|
|
4f0383bc3f | ||
|
|
c917da4b3e | ||
|
|
0a0f641b98 | ||
|
|
68015bbd84 | ||
|
|
72ab729c3d | ||
|
|
f562e72df7 | ||
|
|
6cfdb2a3ba | ||
|
|
9ccfebddc3 | ||
|
|
b9644433d2 | ||
|
|
16ec3c9be3 | ||
|
|
c1fb763184 | ||
|
|
69aa099641 | ||
|
|
4f5c5f2980 | ||
|
|
73dad1e64c | ||
|
|
840268400d | ||
|
|
e87e6dddc2 | ||
|
|
a9093fe094 | ||
|
|
6583c44857 | ||
|
|
a9b579f3d7 | ||
|
|
da861d631d | ||
|
|
1abc52c159 | ||
|
|
cd52459c38 | ||
|
|
42ebd06642 | ||
|
|
2cb70a2744 | ||
|
|
b2b050ab16 | ||
|
|
87776a1ac1 | ||
|
|
8de7465d77 | ||
|
|
1a9f947cde | ||
|
|
8211fcbdc9 | ||
|
|
e21d62435e | ||
|
|
c3e539fa70 | ||
|
|
502ae4ba63 | ||
|
|
015102e91e | ||
|
|
f6acffbe83 | ||
|
|
a06ecab7a5 | ||
|
|
bfafb4c4a0 | ||
|
|
269f595f9e | ||
|
|
e0d3797664 | ||
|
|
5ef2e76284 | ||
|
|
069c1e7fa9 | ||
|
|
93431df9eb | ||
|
|
fdadad994a | ||
|
|
603d657219 | ||
|
|
a6aa78a3e3 | ||
|
|
321efdd77a | ||
|
|
9280e3f95d | ||
|
|
7399895520 | ||
|
|
480778b805 | ||
|
|
da4127794a | ||
|
|
f62e797ffa | ||
|
|
6d20e17544 | ||
|
|
3e946fdc7b | ||
|
|
89b10421ca | ||
|
|
e048539195 | ||
|
|
38ee6b041e | ||
|
|
5498a41f5a | ||
|
|
4c06815c44 | ||
|
|
1436d8d51c | ||
|
|
da3a77d9ec | ||
|
|
7c0a2f367f | ||
|
|
ea3f2e7be4 | ||
|
|
25065ec375 | ||
|
|
19ff9bf454 | ||
|
|
453f37dbfd | ||
|
|
c4a927ca8d | ||
|
|
b25f9a97e9 | ||
|
|
8240433f48 | ||
|
|
2bc127f940 | ||
|
|
5c71994f4e | ||
|
|
32b808a4bd | ||
|
|
67081e5061 | ||
|
|
063b9d15ab | ||
|
|
0d3e24be56 | ||
|
|
aa4d73235b | ||
|
|
537ef08408 | ||
|
|
ed59aa60d3 | ||
|
|
79815f1ec7 | ||
|
|
fc4ad61607 | ||
|
|
30445cb6e9 | ||
|
|
ee1deb4a00 | ||
|
|
65549bdef5 | ||
|
|
144445d15f | ||
|
|
a06ec8f345 | ||
|
|
ba768495c2 | ||
|
|
245a7cb6d3 | ||
|
|
bc5d6dd1dd | ||
|
|
bf2cc5f36d | ||
|
|
dcb1700186 | ||
|
|
1e5e1231ac | ||
|
|
9d5d3c9c44 | ||
|
|
05e418d436 | ||
|
|
6bb450145e | ||
|
|
e381d3d5e0 | ||
|
|
00efded106 | ||
|
|
80632db65e | ||
|
|
b33c7eb5b8 | ||
|
|
ab9c89b68d | ||
|
|
dec85cf750 | ||
|
|
fef524bbff | ||
|
|
3b98b83001 | ||
|
|
e18dbe865d | ||
|
|
0fcc7c6dd1 | ||
|
|
75464dc434 | ||
|
|
951fa1819a | ||
|
|
ee2615af64 | ||
|
|
361c8f0e51 | ||
|
|
2acfbed9db | ||
|
|
c5af40ae64 | ||
|
|
bde9810d61 | ||
|
|
22fcfad292 | ||
|
|
8767f52fbf | ||
|
|
4a6c670b84 | ||
|
|
4c5717ed8a | ||
|
|
40de45664c | ||
|
|
e8fea0728a | ||
|
|
70e136e1d8 | ||
|
|
24cf233ef9 | ||
|
|
1d90a5a5af | ||
|
|
6747fabc73 | ||
|
|
bcf7772a23 | ||
|
|
adb78a77eb | ||
|
|
688e3d1fd9 | ||
|
|
97ff9b9cff | ||
|
|
52df117df7 | ||
|
|
00672e1d3f | ||
|
|
04e2b4b0c4 | ||
|
|
aad30bbcde | ||
|
|
eeb50ab522 | ||
|
|
7b61bf187a | ||
|
|
5d2ca04029 | ||
|
|
f4fba6dcd5 | ||
|
|
d388d2ac8b | ||
|
|
802a0d902f | ||
|
|
049cba9e97 | ||
|
|
b12e7ef956 | ||
|
|
85babd6db6 | ||
|
|
f50df3925b | ||
|
|
38df43bd13 | ||
|
|
ad5ca9bc1e | ||
|
|
ecefe71704 | ||
|
|
cf2d77987c | ||
|
|
ddf8d1c746 | ||
|
|
b5b95750a6 | ||
|
|
678e480529 | ||
|
|
d18f672fc9 | ||
|
|
a02a551e18 | ||
|
|
3ef5bf7d45 | ||
|
|
23c60f21b0 | ||
|
|
28607ba2b8 | ||
|
|
36f0f0686c | ||
|
|
ab47c61f46 | ||
|
|
67e3720a9d | ||
|
|
bee666f239 | ||
|
|
9bd3186052 | ||
|
|
72e697d189 | ||
|
|
ece74ab103 | ||
|
|
a641e1d4da | ||
|
|
bf2c0ee0b2 | ||
|
|
2016ae586b | ||
|
|
76ae22fef3 | ||
|
|
5b7d177e89 | ||
|
|
a890f5e348 | ||
|
|
c95a302a4c |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -79,3 +79,4 @@ src/testdir/messages
|
||||
src/testdir/viminfo
|
||||
src/memfile_test
|
||||
src/json_test
|
||||
src/message_test
|
||||
|
||||
56
.travis.yml
56
.travis.yml
@@ -1,19 +1,53 @@
|
||||
language: c
|
||||
|
||||
os:
|
||||
- osx
|
||||
- linux
|
||||
|
||||
compiler:
|
||||
- clang
|
||||
- gcc
|
||||
|
||||
env:
|
||||
- COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src
|
||||
- BUILD=yes TEST=scripttests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp'"
|
||||
CHECK_AUTOCONF=yes
|
||||
- COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no
|
||||
- COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
- COVERAGE=no FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
- BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
|
||||
- BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no
|
||||
- BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
- BUILD=yes TEST=test COVERAGE=no FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
# Mac OSX build
|
||||
- BUILD=yes TEST=test COVERAGE=no FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp'"
|
||||
|
||||
sudo: false
|
||||
|
||||
git:
|
||||
depth: 1
|
||||
|
||||
# instead of a 6*2*2 matrix (2*os + 2*compiler + 6*env),
|
||||
# exclude some builds on mac os x and linux
|
||||
# linux: 2*compiler + 5*env + mac: 2*compiler + 2*env
|
||||
matrix:
|
||||
exclude:
|
||||
- os: osx
|
||||
env: BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no
|
||||
- os: osx
|
||||
env: BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
|
||||
- os: osx
|
||||
env: BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
- os: osx
|
||||
env: BUILD=yes TEST=scripttests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp'"
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env: BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env: BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
- os: linux
|
||||
env: BUILD=yes TEST=test COVERAGE=no FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
|
||||
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp'"
|
||||
|
||||
branches:
|
||||
except:
|
||||
- /^v[0-9]/
|
||||
@@ -28,18 +62,22 @@ addons:
|
||||
- python3-dev
|
||||
- liblua5.1-0-dev
|
||||
- lua5.1
|
||||
- cscope
|
||||
|
||||
before_install:
|
||||
- pip install --user cpp-coveralls
|
||||
# Lua is not installed on Travis OSX
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install lua; export LUA_PREFIX=/usr/local; fi
|
||||
|
||||
script:
|
||||
- NPROC=$(getconf _NPROCESSORS_ONLN)
|
||||
- if [ "$CHECK_AUTOCONF" = "yes" -a "$CC" = "gcc" ]; then make -C src autoconf; fi
|
||||
- if [ "x$SHADOWOPT" != x ]; then make -C src shadow; fi && (cd ${SRCDIR} && ./configure --with-features=$FEATURES $CONFOPT --enable-fail-if-missing && make -j$NPROC)
|
||||
- ${SRCDIR}/vim --version
|
||||
- make $SHADOWOPT test
|
||||
- if [ "x$SHADOWOPT" != x ]; then make -C src shadow; fi
|
||||
- (cd ${SRCDIR} && ./configure --with-features=$FEATURES $CONFOPT --enable-fail-if-missing && if [ "$BUILD" = "yes" ]; then make -j$NPROC; fi)
|
||||
- if [ "$BUILD" = "yes" ]; then ${SRCDIR}/vim --version; fi
|
||||
- make $SHADOWOPT $TEST
|
||||
|
||||
after_success:
|
||||
- if [ x"$COVERAGE" = "xyes" ]; then ~/.local/bin/coveralls -b $SRCDIR -x .xs -e ${SRCDIR}/xxd -e ${SRCDIR}/if_perl.c --encodings utf-8 latin-1 EUC-KR; fi
|
||||
- if [ "$COVERAGE" = "yes" ]; then ~/.local/bin/coveralls -b $SRCDIR -x .xs -e ${SRCDIR}/xxd -e ${SRCDIR}/if_perl.c --encodings utf-8 latin-1 EUC-KR; fi
|
||||
|
||||
# vim:set sts=2 sw=2 tw=0 et:
|
||||
|
||||
23
Filelist
23
Filelist
@@ -18,10 +18,12 @@ SRC_ALL = \
|
||||
src/charset.c \
|
||||
src/crypt.c \
|
||||
src/crypt_zip.c \
|
||||
src/dict.c \
|
||||
src/diff.c \
|
||||
src/digraph.c \
|
||||
src/edit.c \
|
||||
src/eval.c \
|
||||
src/evalfunc.c \
|
||||
src/ex_cmds.c \
|
||||
src/ex_cmds.h \
|
||||
src/ex_cmds2.c \
|
||||
@@ -43,6 +45,7 @@ SRC_ALL = \
|
||||
src/hashtab.c \
|
||||
src/json.c \
|
||||
src/json_test.c \
|
||||
src/list.c \
|
||||
src/keymap.h \
|
||||
src/macros.h \
|
||||
src/main.c \
|
||||
@@ -53,6 +56,7 @@ SRC_ALL = \
|
||||
src/memline.c \
|
||||
src/menu.c \
|
||||
src/message.c \
|
||||
src/message_test.c \
|
||||
src/misc1.c \
|
||||
src/misc2.c \
|
||||
src/move.c \
|
||||
@@ -74,6 +78,8 @@ SRC_ALL = \
|
||||
src/sha256.c \
|
||||
src/structs.h \
|
||||
src/spell.c \
|
||||
src/spell.h \
|
||||
src/spellfile.c \
|
||||
src/syntax.c \
|
||||
src/tag.c \
|
||||
src/term.c \
|
||||
@@ -81,6 +87,7 @@ SRC_ALL = \
|
||||
src/termlib.c \
|
||||
src/ui.c \
|
||||
src/undo.c \
|
||||
src/userfunc.c \
|
||||
src/version.c \
|
||||
src/version.h \
|
||||
src/vim.h \
|
||||
@@ -95,6 +102,8 @@ SRC_ALL = \
|
||||
src/testdir/*.py \
|
||||
src/testdir/sautest/autoload/*.vim \
|
||||
src/testdir/runtest.vim \
|
||||
src/testdir/shared.vim \
|
||||
src/testdir/setup.vim \
|
||||
src/testdir/test[0-9]*.ok \
|
||||
src/testdir/test[0-9]*a.ok \
|
||||
src/testdir/test_[a-z]*.ok \
|
||||
@@ -116,21 +125,25 @@ SRC_ALL = \
|
||||
src/testdir/bench*.vim \
|
||||
src/testdir/samples/*.txt \
|
||||
src/proto.h \
|
||||
src/proto/arabic.pro \
|
||||
src/proto/blowfish.pro \
|
||||
src/proto/buffer.pro \
|
||||
src/proto/channel.pro \
|
||||
src/proto/charset.pro \
|
||||
src/proto/crypt.pro \
|
||||
src/proto/crypt_zip.pro \
|
||||
src/proto/dict.pro \
|
||||
src/proto/diff.pro \
|
||||
src/proto/digraph.pro \
|
||||
src/proto/edit.pro \
|
||||
src/proto/eval.pro \
|
||||
src/proto/evalfunc.pro \
|
||||
src/proto/ex_cmds.pro \
|
||||
src/proto/ex_cmds2.pro \
|
||||
src/proto/ex_docmd.pro \
|
||||
src/proto/ex_eval.pro \
|
||||
src/proto/ex_getln.pro \
|
||||
src/proto/farsi.pro \
|
||||
src/proto/fileio.pro \
|
||||
src/proto/fold.pro \
|
||||
src/proto/getchar.pro \
|
||||
@@ -139,6 +152,7 @@ SRC_ALL = \
|
||||
src/proto/hardcopy.pro \
|
||||
src/proto/hashtab.pro \
|
||||
src/proto/json.pro \
|
||||
src/proto/list.pro \
|
||||
src/proto/main.pro \
|
||||
src/proto/mark.pro \
|
||||
src/proto/mbyte.pro \
|
||||
@@ -160,12 +174,14 @@ SRC_ALL = \
|
||||
src/proto/search.pro \
|
||||
src/proto/sha256.pro \
|
||||
src/proto/spell.pro \
|
||||
src/proto/spellfile.pro \
|
||||
src/proto/syntax.pro \
|
||||
src/proto/tag.pro \
|
||||
src/proto/term.pro \
|
||||
src/proto/termlib.pro \
|
||||
src/proto/ui.pro \
|
||||
src/proto/undo.pro \
|
||||
src/proto/userfunc.pro \
|
||||
src/proto/version.pro \
|
||||
src/proto/winclip.pro \
|
||||
src/proto/window.pro \
|
||||
@@ -317,6 +333,8 @@ SRC_DOS = \
|
||||
src/if_ole.h \
|
||||
src/if_ole.idl \
|
||||
src/if_perl_msvc/stdbool.h \
|
||||
src/iscygpty.c \
|
||||
src/iscygpty.h \
|
||||
src/iid_ole.c \
|
||||
src/os_dos.h \
|
||||
src/os_w32dll.c \
|
||||
@@ -379,8 +397,10 @@ SRC_DOS_BIN = \
|
||||
src/xpm/include/*.h \
|
||||
src/xpm/x64/lib/libXpm.a \
|
||||
src/xpm/x64/lib/libXpm.lib \
|
||||
src/xpm/x64/lib-vc14/libXpm.lib \
|
||||
src/xpm/x86/lib/libXpm.a \
|
||||
src/xpm/x86/lib/libXpm.lib \
|
||||
src/xpm/x86/lib-vc14/libXpm.lib \
|
||||
nsis/icons/*.bmp \
|
||||
nsis/icons/*.ico \
|
||||
|
||||
@@ -506,8 +526,9 @@ RT_ALL = \
|
||||
runtime/macros/urm/examples \
|
||||
runtime/macros/urm/urm \
|
||||
runtime/macros/urm/urm.vim \
|
||||
runtime/mswin.vim \
|
||||
runtime/defaults.vim \
|
||||
runtime/evim.vim \
|
||||
runtime/mswin.vim \
|
||||
runtime/optwin.vim \
|
||||
runtime/ftplugin.vim \
|
||||
runtime/ftplugof.vim \
|
||||
|
||||
2
Makefile
2
Makefile
@@ -32,7 +32,7 @@ first:
|
||||
|
||||
# Some make programs use the last target for the $@ default; put the other
|
||||
# targets separately to always let $@ expand to "first" by default.
|
||||
all install uninstall tools config configure reconfig proto depend lint tags types test testclean clean distclean:
|
||||
all install uninstall tools config configure reconfig proto depend lint tags types test scripttests unittests testclean clean distclean:
|
||||
@if test ! -f src/auto/config.mk; then \
|
||||
cp src/config.mk.dist src/auto/config.mk; \
|
||||
fi
|
||||
|
||||
File diff suppressed because one or more lines are too long
112
runtime/defaults.vim
Normal file
112
runtime/defaults.vim
Normal file
@@ -0,0 +1,112 @@
|
||||
" The default vimrc file.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2016 Jul 29
|
||||
"
|
||||
" This is loaded if no vimrc file was found.
|
||||
" Except when Vim is run with "-u NONE" or "-C".
|
||||
" Individual settings can be reverted with ":set option&".
|
||||
" Other commands can be reverted as mentioned below.
|
||||
|
||||
" When started as "evim", evim.vim will already have done these settings.
|
||||
if v:progname =~? "evim"
|
||||
finish
|
||||
endif
|
||||
|
||||
" Use Vim settings, rather than Vi settings (much better!).
|
||||
" This must be first, because it changes other options as a side effect.
|
||||
set nocompatible
|
||||
|
||||
" Allow backspacing over everything in insert mode.
|
||||
set backspace=indent,eol,start
|
||||
|
||||
set history=200 " keep 200 lines of command line history
|
||||
set ruler " show the cursor position all the time
|
||||
set showcmd " display incomplete commands
|
||||
set wildmenu " display completion matches in a status line
|
||||
|
||||
" Show @@@ in the last line if it is truncated.
|
||||
set display=truncate
|
||||
|
||||
" Do incremental searching when it's possible to timeout.
|
||||
if has('reltime')
|
||||
set incsearch
|
||||
endif
|
||||
|
||||
" Do not recognize octal numbers for Ctrl-A and Ctrl-X, most users find it
|
||||
" confusing.
|
||||
set nrformats-=octal
|
||||
|
||||
" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries.
|
||||
if has('win32')
|
||||
set guioptions-=t
|
||||
endif
|
||||
|
||||
" Don't use Ex mode, use Q for formatting.
|
||||
" Revert with ":unmap Q".
|
||||
map Q gq
|
||||
|
||||
" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo,
|
||||
" so that you can undo CTRL-U after inserting a line break.
|
||||
" Revert with ":iunmap <C-U>".
|
||||
inoremap <C-U> <C-G>u<C-U>
|
||||
|
||||
" In many terminal emulators the mouse works just fine. By enabling it you
|
||||
" can position the cursor, Visually select and scroll with the mouse.
|
||||
if has('mouse')
|
||||
set mouse=a
|
||||
endif
|
||||
|
||||
" Switch syntax highlighting on when the terminal has colors or when using the
|
||||
" GUI (which always has colors).
|
||||
if &t_Co > 2 || has("gui_running")
|
||||
" Revert with ":syntax off".
|
||||
syntax on
|
||||
|
||||
" I like highlighting strings inside C comments.
|
||||
" Revert with ":unlet c_comment_strings".
|
||||
let c_comment_strings=1
|
||||
endif
|
||||
|
||||
" Only do this part when compiled with support for autocommands.
|
||||
if has("autocmd")
|
||||
|
||||
" Enable file type detection.
|
||||
" Use the default filetype settings, so that mail gets 'tw' set to 72,
|
||||
" 'cindent' is on in C files, etc.
|
||||
" Also load indent files, to automatically do language-dependent indenting.
|
||||
" Revert with ":filetype off".
|
||||
filetype plugin indent on
|
||||
|
||||
" Put these in an autocmd group, so that you can revert them with:
|
||||
" ":augroup vimStartup | au! | augroup END"
|
||||
augroup vimStartup
|
||||
au!
|
||||
|
||||
" When editing a file, always jump to the last known cursor position.
|
||||
" Don't do it when the position is invalid or when inside an event handler
|
||||
" (happens when dropping a file on gvim).
|
||||
autocmd BufReadPost *
|
||||
\ if line("'\"") >= 1 && line("'\"") <= line("$") |
|
||||
\ exe "normal! g`\"" |
|
||||
\ endif
|
||||
|
||||
augroup END
|
||||
|
||||
endif " has("autocmd")
|
||||
|
||||
" Convenient command to see the difference between the current buffer and the
|
||||
" file it was loaded from, thus the changes you made.
|
||||
" Only define it when not defined already.
|
||||
" Revert with: ":delcommand DiffOrig".
|
||||
if !exists(":DiffOrig")
|
||||
command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
|
||||
\ | wincmd p | diffthis
|
||||
endif
|
||||
|
||||
if has('langmap') && exists('+langnoremap')
|
||||
" Prevent that the langmap option applies to characters that result from a
|
||||
" mapping. If unset (default), this may break plugins (but it's backward
|
||||
" compatible).
|
||||
set langnoremap
|
||||
endif
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 7.4. Last change: 2016 Apr 20
|
||||
*autocmd.txt* For Vim version 7.4. Last change: 2016 Jul 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -52,9 +52,6 @@ effects. Be careful not to destroy your text.
|
||||
==============================================================================
|
||||
2. Defining autocommands *autocmd-define*
|
||||
|
||||
Note: The ":autocmd" command cannot be followed by another command, since any
|
||||
'|' is considered part of the command.
|
||||
|
||||
*:au* *:autocmd*
|
||||
:au[tocmd] [group] {event} {pat} [nested] {cmd}
|
||||
Add {cmd} to the list of commands that Vim will
|
||||
@@ -67,6 +64,12 @@ Note: The ":autocmd" command cannot be followed by another command, since any
|
||||
The special pattern <buffer> or <buffer=N> defines a buffer-local autocommand.
|
||||
See |autocmd-buflocal|.
|
||||
|
||||
Note: The ":autocmd" command can only be followed by another command when the
|
||||
'|' appears before {cmd}. This works: >
|
||||
:augroup mine | au! BufRead | augroup END
|
||||
But this sees "augroup" as part of the defined command: >
|
||||
:augroup mine | au BufRead * set tw=70 | augroup END
|
||||
|
||||
Note that special characters (e.g., "%", "<cword>") in the ":autocmd"
|
||||
arguments are not expanded when the autocommand is defined. These will be
|
||||
expanded when the Event is recognized, and the {cmd} is executed. The only
|
||||
@@ -293,6 +296,9 @@ Name triggered by ~
|
||||
|CursorMoved| the cursor was moved in Normal mode
|
||||
|CursorMovedI| the cursor was moved in Insert mode
|
||||
|
||||
|WinNew| after creating a new window
|
||||
|TabNew| after creating a new tab page
|
||||
|TabClosed| after closing a tab page
|
||||
|WinEnter| after entering another window
|
||||
|WinLeave| before leaving a window
|
||||
|TabEnter| after entering another tab page
|
||||
@@ -874,6 +880,8 @@ Syntax When the 'syntax' option has been set. The
|
||||
where this option was set, and <amatch> for
|
||||
the new value of 'syntax'.
|
||||
See |:syn-on|.
|
||||
*TabClosed*
|
||||
TabClosed After closing a tab page.
|
||||
*TabEnter*
|
||||
TabEnter Just after entering a tab page. |tab-page|
|
||||
After triggering the WinEnter and before
|
||||
@@ -882,6 +890,10 @@ TabEnter Just after entering a tab page. |tab-page|
|
||||
TabLeave Just before leaving a tab page. |tab-page|
|
||||
A WinLeave event will have been triggered
|
||||
first.
|
||||
*TabNew*
|
||||
TabNew When a tab page was created. |tab-page|
|
||||
A WinEnter event will have been triggered
|
||||
first, TabEnter follows.
|
||||
*TermChanged*
|
||||
TermChanged After the value of 'term' has changed. Useful
|
||||
for re-loading the syntax file to update the
|
||||
@@ -967,6 +979,11 @@ WinLeave Before leaving a window. If the window to be
|
||||
WinLeave autocommands (but not for ":new").
|
||||
Not used for ":qa" or ":q" when exiting Vim.
|
||||
|
||||
*WinNew*
|
||||
WinNew When a new window was created. Not done for
|
||||
the fist window, when Vim has just started.
|
||||
Before a WinEnter event.
|
||||
|
||||
==============================================================================
|
||||
6. Patterns *autocmd-patterns* *{pat}*
|
||||
|
||||
@@ -1146,10 +1163,11 @@ name!
|
||||
different from existing {event} names, as this
|
||||
most likely will not do what you intended.
|
||||
|
||||
*:augroup-delete* *E367*
|
||||
*:augroup-delete* *E367* *W19*
|
||||
:aug[roup]! {name} Delete the autocmd group {name}. Don't use
|
||||
this if there is still an autocommand using
|
||||
this group! This is not checked.
|
||||
this group! You will get a warning if doing
|
||||
it anyway.
|
||||
|
||||
To enter autocommands for a specific group, use this method:
|
||||
1. Select the group with ":augroup {name}".
|
||||
@@ -1204,6 +1222,8 @@ option will not cause any commands to be executed.
|
||||
argument is present. You probably want to use
|
||||
<nomodeline> for events that are not used when loading
|
||||
a buffer, such as |User|.
|
||||
Processing modelines is also skipped when no
|
||||
matching autocommands were executed.
|
||||
|
||||
*:doautoa* *:doautoall*
|
||||
:doautoa[ll] [<nomodeline>] [group] {event} [fname]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*channel.txt* For Vim version 7.4. Last change: 2016 Jun 02
|
||||
*channel.txt* For Vim version 7.4. Last change: 2016 Jul 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -6,13 +6,9 @@
|
||||
|
||||
Inter-process communication *channel*
|
||||
|
||||
DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT
|
||||
|
||||
Vim uses channels to communicate with other processes.
|
||||
A channel uses a socket or pipes *socket-interface*
|
||||
A channel uses a socket or pipes. *socket-interface*
|
||||
Jobs can be used to start processes and communicate with them.
|
||||
|
||||
Vim current supports up to 10 simultaneous channels.
|
||||
The Netbeans interface also uses a channel. |netbeans|
|
||||
|
||||
1. Overview |job-channel-overview|
|
||||
@@ -495,6 +491,9 @@ time a line is added to the buffer, the last-but-one line will be send to the
|
||||
job stdin. This allows for editing the last line and sending it when pressing
|
||||
Enter.
|
||||
|
||||
NUL bytes in the text will be passed to the job (internally Vim stores these
|
||||
as NL bytes).
|
||||
|
||||
|
||||
Reading job output in the close callback ~
|
||||
*read-in-close-cb*
|
||||
@@ -566,11 +565,13 @@ See |job_setoptions()| and |ch_setoptions()|.
|
||||
"out_cb": handler Callback for when there is something to read on
|
||||
stdout. Only for when the channel uses pipes. When
|
||||
"out_cb" wasn't set the channel callback is used.
|
||||
The two arguments are the channel and the message.
|
||||
|
||||
*job-err_cb* *err_cb*
|
||||
"err_cb": handler Callback for when there is something to read on
|
||||
stderr. Only for when the channel uses pipes. When
|
||||
"err_cb" wasn't set the channel callback is used.
|
||||
The two arguments are the channel and the message.
|
||||
*job-close_cb*
|
||||
"close_cb": handler Callback for when the channel is closed. Same as
|
||||
"close_cb" on |ch_open()|, see |close_cb|.
|
||||
@@ -684,7 +685,8 @@ When the buffer written to is displayed in a window and the cursor is in the
|
||||
first column of the last line, the cursor will be moved to the newly added
|
||||
line and the window is scrolled up to show the cursor if needed.
|
||||
|
||||
Undo is synced for every added line.
|
||||
Undo is synced for every added line. NUL bytes are accepted (internally Vim
|
||||
stores these as NL bytes).
|
||||
|
||||
|
||||
Writing to a file ~
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
*filetype.txt* For Vim version 7.4. Last change: 2016 May 24
|
||||
*filetype.txt* For Vim version 7.4. Last change: 2016 Jun 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -579,6 +579,11 @@ CTRL-] Jump to the manual page for the word under the cursor.
|
||||
CTRL-T Jump back to the previous manual page.
|
||||
q Same as ":quit"
|
||||
|
||||
To use a vertical split instead of horizontal: >
|
||||
let g:ft_man_open_mode = 'vert'
|
||||
To use a new tab: >
|
||||
let g:ft_man_open_mode = 'tab'
|
||||
|
||||
To enable folding use this: >
|
||||
let g:ft_man_folding_enable = 1
|
||||
If you do not like the default folding, use an autocommand to add your desired
|
||||
|
||||
@@ -129,6 +129,7 @@ The available subcommands are:
|
||||
6 or e: Find this egrep pattern
|
||||
7 or f: Find this file
|
||||
8 or i: Find files #including this file
|
||||
9 or a: Find places where this symbol is assigned a value
|
||||
|
||||
For all types, except 4 and 6, leading white space for {name} is
|
||||
removed. For 4 and 6 there is exactly one space between {querytype}
|
||||
@@ -255,13 +256,13 @@ started will have no effect!
|
||||
{not available when compiled without the |+quickfix| feature}
|
||||
'cscopequickfix' specifies whether to use quickfix window to show cscope
|
||||
results. This is a list of comma-separated values. Each item consists of
|
||||
|cscope-find| command (s, g, d, c, t, e, f or i) and flag (+, - or 0).
|
||||
|cscope-find| command (s, g, d, c, t, e, f, i or a) and flag (+, - or 0).
|
||||
'+' indicates that results must be appended to quickfix window,
|
||||
'-' implies previous results clearance, '0' or command absence - don't use
|
||||
quickfix. Search is performed from start until first command occurrence.
|
||||
The default value is "" (don't use quickfix anyway). The following value
|
||||
seems to be useful: >
|
||||
:set cscopequickfix=s-,c-,d-,i-,t-,e-
|
||||
:set cscopequickfix=s-,c-,d-,i-,t-,e-,a-
|
||||
<
|
||||
*cscopetag* *cst*
|
||||
If 'cscopetag' is set, the commands ":tag" and CTRL-] as well as "vim -t"
|
||||
@@ -422,6 +423,7 @@ Cscope Home Page (http://cscope.sourceforge.net/): >
|
||||
nmap <C-_>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
|
||||
nmap <C-_>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
|
||||
nmap <C-_>d :cs find d <C-R>=expand("<cword>")<CR><CR>
|
||||
nmap <C-_>a :cs find a <C-R>=expand("<cword>")<CR><CR>
|
||||
|
||||
" Using 'CTRL-spacebar' then a search type makes the vim window
|
||||
" split horizontally, with search result displayed in
|
||||
@@ -435,6 +437,7 @@ Cscope Home Page (http://cscope.sourceforge.net/): >
|
||||
nmap <C-Space>f :scs find f <C-R>=expand("<cfile>")<CR><CR>
|
||||
nmap <C-Space>i :scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
|
||||
nmap <C-Space>d :scs find d <C-R>=expand("<cword>")<CR><CR>
|
||||
nmap <C-Space>a :scs find a <C-R>=expand("<cword>")<CR><CR>
|
||||
|
||||
" Hitting CTRL-space *twice* before the search type does a vertical
|
||||
" split instead of a horizontal one
|
||||
@@ -453,6 +456,8 @@ Cscope Home Page (http://cscope.sourceforge.net/): >
|
||||
\:vert scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
|
||||
nmap <C-Space><C-Space>d
|
||||
\:vert scs find d <C-R>=expand("<cword>")<CR><CR>
|
||||
nmap <C-Space><C-Space>a
|
||||
\:vert scs find a <C-R>=expand("<cword>")<CR><CR>
|
||||
|
||||
==============================================================================
|
||||
7. Cscope availability and information *cscope-info*
|
||||
|
||||
@@ -813,7 +813,7 @@ PHP indenting can be altered in several ways by modifying the values of some
|
||||
global variables:
|
||||
|
||||
*php-comment* *PHP_autoformatcomment*
|
||||
To not enable auto-formating of comments by default (if you want to use your
|
||||
To not enable auto-formatting of comments by default (if you want to use your
|
||||
own 'formatoptions'): >
|
||||
:let g:PHP_autoformatcomment = 0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 7.4. Last change: 2016 Apr 12
|
||||
*index.txt* For Vim version 7.4. Last change: 2016 Jul 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1139,6 +1139,7 @@ tag command action ~
|
||||
|:caddfile| :caddf[ile] add error message to current quickfix list
|
||||
|:call| :cal[l] call a function
|
||||
|:catch| :cat[ch] part of a :try command
|
||||
|:cbottom| :cbo[ttom] scroll to the bottom of the quickfix window
|
||||
|:cbuffer| :cb[uffer] parse error messages and jump to first error
|
||||
|:cc| :cc go to specific error
|
||||
|:cclose| :ccl[ose] close quickfix window
|
||||
@@ -1156,8 +1157,10 @@ tag command action ~
|
||||
|:chdir| :chd[ir] change directory
|
||||
|:checkpath| :che[ckpath] list included files
|
||||
|:checktime| :checkt[ime] check timestamp of loaded buffers
|
||||
|:clist| :cl[ist] list all errors
|
||||
|:chistory| :chi[story] list the error lists
|
||||
|:clast| :cla[st] go to the specified error, default last one
|
||||
|:clearjumps| :cle[arjumps] clear the jump list
|
||||
|:clist| :cl[ist] list all errors
|
||||
|:close| :clo[se] close current window
|
||||
|:cmap| :cm[ap] like ":map" but for Command-line mode
|
||||
|:cmapclear| :cmapc[lear] clear all mappings for Command-line mode
|
||||
@@ -1298,6 +1301,7 @@ tag command action ~
|
||||
|:last| :la[st] go to the last file in the argument list
|
||||
|:language| :lan[guage] set the language (locale)
|
||||
|:later| :lat[er] go to newer change, redo
|
||||
|:lbottom| :lbo[ttom] scroll to the bottom of the location window
|
||||
|:lbuffer| :lb[uffer] parse locations and jump to first location
|
||||
|:lcd| :lc[d] change directory locally
|
||||
|:lchdir| :lch[dir] change directory locally
|
||||
@@ -1317,6 +1321,7 @@ tag command action ~
|
||||
|:lgrep| :lgr[ep] run 'grepprg' and jump to first match
|
||||
|:lgrepadd| :lgrepa[dd] like :grep, but append to current list
|
||||
|:lhelpgrep| :lh[elpgrep] like ":helpgrep" but uses location list
|
||||
|:lhistory| :lhi[story] list the location lists
|
||||
|:ll| :ll go to specific location
|
||||
|:llast| :lla[st] go to the specified location, default last one
|
||||
|:llist| :lli[st] list all locations
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 7.4. Last change: 2016 Jan 10
|
||||
*map.txt* For Vim version 7.4. Last change: 2016 Jul 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1274,6 +1274,7 @@ completion can be enabled:
|
||||
-complete=mapping mapping name
|
||||
-complete=menu menus
|
||||
-complete=option options
|
||||
-complete=packadd optional package |pack-add| names
|
||||
-complete=shellcmd Shell command
|
||||
-complete=sign |:sign| suboptions
|
||||
-complete=syntax syntax file names |'syntax'|
|
||||
@@ -1413,11 +1414,13 @@ The valid escape sequences are
|
||||
expands to nothing.
|
||||
*<mods>*
|
||||
<mods> The command modifiers, if specified. Otherwise, expands to
|
||||
nothing. Supported modifiers are |aboveleft|, |belowright|,
|
||||
|botright|, |browse|, |confirm|, |hide|, |keepalt|,
|
||||
|keepjumps|, |keepmarks|, |keeppatterns|, |lockmarks|,
|
||||
|noswapfile|, |silent|, |tab|, |topleft|, |verbose|, and
|
||||
|vertical|.
|
||||
nothing. Supported modifiers are |:aboveleft|, |:belowright|,
|
||||
|:botright|, |:browse|, |:confirm|, |:hide|, |:keepalt|,
|
||||
|:keepjumps|, |:keepmarks|, |:keeppatterns|, |:leftabove|,
|
||||
|:lockmarks|, |:noswapfile| |:rightbelow|, |:silent|, |:tab|,
|
||||
|:topleft|, |:verbose|, and |:vertical|.
|
||||
Note that these are not yet supported: |:noautocmd|,
|
||||
|:sandbox| and |:unsilent|.
|
||||
Examples: >
|
||||
command! -nargs=+ -complete=file MyEdit
|
||||
\ for f in expand(<q-args>, 0, 1) |
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*mbyte.txt* For Vim version 7.4. Last change: 2013 May 18
|
||||
*mbyte.txt* For Vim version 7.4. Last change: 2016 Jul 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar et al.
|
||||
@@ -1010,6 +1010,7 @@ text, you can use the 'keymap' option. This will translate one or more
|
||||
(English) characters to another (non-English) character. This only happens
|
||||
when typing text, not when typing Vim commands. This avoids having to switch
|
||||
between two keyboard settings.
|
||||
{only available when compiled with the |+keymap| feature}
|
||||
|
||||
The value of the 'keymap' option specifies a keymap file to use. The name of
|
||||
this file is one of these two:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*message.txt* For Vim version 7.4. Last change: 2016 Apr 14
|
||||
*message.txt* For Vim version 7.4. Last change: 2016 Jul 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -673,6 +673,12 @@ You must be using an awful lot of buffers. It's now possible that two buffers
|
||||
have the same number, which causes various problems. You might want to exit
|
||||
Vim and restart it.
|
||||
|
||||
*E931* >
|
||||
Buffer cannot be registered
|
||||
|
||||
Out of memory or a duplicate buffer number. May happen after W14. Looking up
|
||||
a buffer will not always work, better restart Vim.
|
||||
|
||||
*E296* *E297* >
|
||||
Seek error in swap file write
|
||||
Write error in swap file
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*motion.txt* For Vim version 7.4. Last change: 2015 Jun 06
|
||||
*motion.txt* For Vim version 7.4. Last change: 2016 Jul 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -586,7 +586,7 @@ i[ "inner [] block", select [count] '[' ']' blocks. This
|
||||
When used in Visual mode it is made characterwise.
|
||||
|
||||
a) *v_a)* *a)* *a(*
|
||||
a( *v_ab* *v_a(* *ab*
|
||||
a( *vab* *v_ab* *v_a(* *ab*
|
||||
ab "a block", select [count] blocks, from "[count] [(" to
|
||||
the matching ')', including the '(' and ')' (see
|
||||
|[(|). Does not include white space outside of the
|
||||
@@ -594,7 +594,7 @@ ab "a block", select [count] blocks, from "[count] [(" to
|
||||
When used in Visual mode it is made characterwise.
|
||||
|
||||
i) *v_i)* *i)* *i(*
|
||||
i( *v_ib* *v_i(* *ib*
|
||||
i( *vib* *v_ib* *v_i(* *ib*
|
||||
ib "inner block", select [count] blocks, from "[count] [("
|
||||
to the matching ')', excluding the '(' and ')' (see
|
||||
|[(|).
|
||||
@@ -1027,7 +1027,8 @@ unless the line containing that position was changed or deleted.
|
||||
|
||||
*CTRL-O*
|
||||
CTRL-O Go to [count] Older cursor position in jump list
|
||||
(not a motion command). {not in Vi}
|
||||
(not a motion command).
|
||||
{not in Vi}
|
||||
{not available without the |+jumplist| feature}
|
||||
|
||||
<Tab> or *CTRL-I* *<Tab>*
|
||||
@@ -1037,8 +1038,14 @@ CTRL-I Go to [count] newer cursor position in jump list
|
||||
{not available without the |+jumplist| feature}
|
||||
|
||||
*:ju* *:jumps*
|
||||
:ju[mps] Print the jump list (not a motion command). {not in
|
||||
Vi} {not available without the |+jumplist| feature}
|
||||
:ju[mps] Print the jump list (not a motion command).
|
||||
{not in Vi}
|
||||
{not available without the |+jumplist| feature}
|
||||
|
||||
*:cle* *:clearjumps*
|
||||
:cle[arjumps] Clear the jump list of the current window.
|
||||
{not in Vi}
|
||||
{not available without the |+jumplist| feature}
|
||||
|
||||
*jumplist*
|
||||
Jumps are remembered in a jump list. With the CTRL-O and CTRL-I command you
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*netbeans.txt* For Vim version 7.4. Last change: 2016 Feb 18
|
||||
*netbeans.txt* For Vim version 7.4. Last change: 2016 Jul 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur et al.
|
||||
@@ -59,6 +59,8 @@ Current projects using the NetBeans protocol of Vim are:
|
||||
|
||||
Check the specific project pages to see how to use Vim with these projects.
|
||||
|
||||
An alternative is to use a channel, see |channel|.
|
||||
|
||||
In the rest of this help page, we will use the term "Vim Controller" to
|
||||
describe the program controlling Vim through the NetBeans socket interface.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.4. Last change: 2016 Jun 04
|
||||
*options.txt* For Vim version 7.4. Last change: 2016 Jul 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -887,7 +887,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
done with ":syntax on".
|
||||
|
||||
*'backspace'* *'bs'*
|
||||
'backspace' 'bs' string (default "")
|
||||
'backspace' 'bs' string (default "", set to "indent,eol,start"
|
||||
in |defaults.vim|)
|
||||
global
|
||||
{not in Vi}
|
||||
Influences the working of <BS>, <Del>, CTRL-W and CTRL-U in Insert
|
||||
@@ -1427,8 +1428,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Only non-printable keys are allowed.
|
||||
The key can be specified as a single character, but it is difficult to
|
||||
type. The preferred way is to use the <> notation. Examples: >
|
||||
:set cedit=<C-Y>
|
||||
:set cedit=<Esc>
|
||||
:exe "set cedit=\<C-Y>"
|
||||
:exe "set cedit=\<Esc>"
|
||||
< |Nvi| also has this option, but it only uses the first character.
|
||||
See |cmdwin|.
|
||||
|
||||
@@ -1696,7 +1697,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
*'compatible'* *'cp'* *'nocompatible'* *'nocp'*
|
||||
'compatible' 'cp' boolean (default on, off when a |vimrc| or |gvimrc|
|
||||
file is found)
|
||||
file is found, reset in |defaults.vim|)
|
||||
global
|
||||
{not in Vi}
|
||||
This option has the effect of making Vim either more Vi-compatible, or
|
||||
@@ -2617,17 +2618,24 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{Vi: directory to put temp file in, defaults to "/tmp"}
|
||||
|
||||
*'display'* *'dy'*
|
||||
'display' 'dy' string (default "")
|
||||
'display' 'dy' string (default "", set to "truncate" in
|
||||
|defaults.vim|)
|
||||
global
|
||||
{not in Vi}
|
||||
Change the way text is displayed. This is comma separated list of
|
||||
flags:
|
||||
lastline When included, as much as possible of the last line
|
||||
in a window will be displayed. When not included, a
|
||||
last line that doesn't fit is replaced with "@" lines.
|
||||
in a window will be displayed. "@@@" is put in the
|
||||
last columns of the last screen line to indicate the
|
||||
rest of the line is not displayed.
|
||||
truncate Like "lastline", but "@@@" is displayed in the first
|
||||
column of the last screen line. Overrules "lastline".
|
||||
uhex Show unprintable characters hexadecimal as <xx>
|
||||
instead of using ^C and ~C.
|
||||
|
||||
When neither "lastline" or "truncate" is included, a last line that
|
||||
doesn't fit is replaced with "@" lines.
|
||||
|
||||
*'eadirection'* *'ead'*
|
||||
'eadirection' 'ead' string (default "both")
|
||||
global
|
||||
@@ -3337,6 +3345,41 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
It is not allowed to change text or jump to another window while
|
||||
evaluating 'foldtext' |textlock|.
|
||||
|
||||
*'formatexpr'* *'fex'*
|
||||
'formatexpr' 'fex' string (default "")
|
||||
local to buffer
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+eval|
|
||||
feature}
|
||||
Expression which is evaluated to format a range of lines for the |gq|
|
||||
operator or automatic formatting (see 'formatoptions'). When this
|
||||
option is empty 'formatprg' is used.
|
||||
|
||||
The |v:lnum| variable holds the first line to be formatted.
|
||||
The |v:count| variable holds the number of lines to be formatted.
|
||||
The |v:char| variable holds the character that is going to be
|
||||
inserted if the expression is being evaluated due to
|
||||
automatic formatting. This can be empty. Don't insert
|
||||
it yet!
|
||||
|
||||
Example: >
|
||||
:set formatexpr=mylang#Format()
|
||||
< This will invoke the mylang#Format() function in the
|
||||
autoload/mylang.vim file in 'runtimepath'. |autoload|
|
||||
|
||||
The expression is also evaluated when 'textwidth' is set and adding
|
||||
text beyond that limit. This happens under the same conditions as
|
||||
when internal formatting is used. Make sure the cursor is kept in the
|
||||
same spot relative to the text then! The |mode()| function will
|
||||
return "i" or "R" in this situation.
|
||||
|
||||
When the expression evaluates to non-zero Vim will fall back to using
|
||||
the internal format mechanism.
|
||||
|
||||
The expression will be evaluated in the |sandbox| when set from a
|
||||
modeline, see |sandbox-option|. That stops the option from working,
|
||||
since changing the buffer text is not allowed.
|
||||
|
||||
*'formatoptions'* *'fo'*
|
||||
'formatoptions' 'fo' string (Vim default: "tcq", Vi default: "vt")
|
||||
local to buffer
|
||||
@@ -3380,41 +3423,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'formatexpr'* *'fex'*
|
||||
'formatexpr' 'fex' string (default "")
|
||||
local to buffer
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+eval|
|
||||
feature}
|
||||
Expression which is evaluated to format a range of lines for the |gq|
|
||||
operator or automatic formatting (see 'formatoptions'). When this
|
||||
option is empty 'formatprg' is used.
|
||||
|
||||
The |v:lnum| variable holds the first line to be formatted.
|
||||
The |v:count| variable holds the number of lines to be formatted.
|
||||
The |v:char| variable holds the character that is going to be
|
||||
inserted if the expression is being evaluated due to
|
||||
automatic formatting. This can be empty. Don't insert
|
||||
it yet!
|
||||
|
||||
Example: >
|
||||
:set formatexpr=mylang#Format()
|
||||
< This will invoke the mylang#Format() function in the
|
||||
autoload/mylang.vim file in 'runtimepath'. |autoload|
|
||||
|
||||
The expression is also evaluated when 'textwidth' is set and adding
|
||||
text beyond that limit. This happens under the same conditions as
|
||||
when internal formatting is used. Make sure the cursor is kept in the
|
||||
same spot relative to the text then! The |mode()| function will
|
||||
return "i" or "R" in this situation.
|
||||
|
||||
When the expression evaluates to non-zero Vim will fall back to using
|
||||
the internal format mechanism.
|
||||
|
||||
The expression will be evaluated in the |sandbox| when set from a
|
||||
modeline, see |sandbox-option|. That stops the option from working,
|
||||
since changing the buffer text is not allowed.
|
||||
|
||||
*'fsync'* *'fs'* *'nofsync'* *'nofs'*
|
||||
'fsync' 'fs' boolean (default on)
|
||||
global
|
||||
@@ -3719,8 +3727,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
screen.
|
||||
|
||||
*'guioptions'* *'go'*
|
||||
'guioptions' 'go' string (default "egmrLtT" (MS-Windows),
|
||||
"aegimrLtT" (GTK, Motif and Athena))
|
||||
'guioptions' 'go' string (default "egmrLtT" (MS-Windows, "t" is
|
||||
removed in |defaults.vim|),
|
||||
"aegimrLtT" (GTK, Motif and Athena),
|
||||
)
|
||||
global
|
||||
{not in Vi}
|
||||
{only available when compiled with GUI enabled}
|
||||
@@ -4042,7 +4052,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
NOTE: This option is reset when 'compatible' is set.
|
||||
|
||||
*'history'* *'hi'*
|
||||
'history' 'hi' number (Vim default: 50, Vi default: 0)
|
||||
'history' 'hi' number (Vim default: 50, Vi default: 0,
|
||||
set to 200 in |defaults.vim|)
|
||||
global
|
||||
{not in Vi}
|
||||
A history of ":" commands, and a history of previous search patterns
|
||||
@@ -4294,7 +4305,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
evaluating 'includeexpr' |textlock|.
|
||||
|
||||
*'incsearch'* *'is'* *'noincsearch'* *'nois'*
|
||||
'incsearch' 'is' boolean (default off)
|
||||
'incsearch' 'is' boolean (default off, set in |defaults.vim| if the
|
||||
+reltime feature is supported)
|
||||
global
|
||||
{not in Vi}
|
||||
{not available when compiled without the
|
||||
@@ -4678,7 +4690,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
< Warning: This deletes all menus that you defined yourself!
|
||||
|
||||
*'langnoremap'* *'lnr'* *'nolangnoremap'* *'nolnr'*
|
||||
'langnoremap' 'lnr' boolean (default off)
|
||||
'langnoremap' 'lnr' boolean (default off, set in |defaults.vim|)
|
||||
global
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+langmap|
|
||||
@@ -5144,7 +5156,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
set and to the Vim default value when 'compatible' is reset.
|
||||
|
||||
*'mouse'* *E538*
|
||||
'mouse' string (default "", "a" for GUI, MS-DOS and Win32)
|
||||
'mouse' string (default "", "a" for GUI, MS-DOS and Win32,
|
||||
set to "a" in |defaults.vim|)
|
||||
global
|
||||
{not in Vi}
|
||||
Enable the use of the mouse. Only works for certain terminals
|
||||
@@ -5310,7 +5323,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Negative or zero value means no thread scheduling.
|
||||
|
||||
*'nrformats'* *'nf'*
|
||||
'nrformats' 'nf' string (default "bin,octal,hex")
|
||||
'nrformats' 'nf' string (default "bin,octal,hex",
|
||||
set to "bin,hex" in |defaults.vim|)
|
||||
local to buffer
|
||||
{not in Vi}
|
||||
This defines what bases Vim will consider for numbers when using the
|
||||
@@ -5980,7 +5994,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
security reasons.
|
||||
|
||||
*'ruler'* *'ru'* *'noruler'* *'noru'*
|
||||
'ruler' 'ru' boolean (default off)
|
||||
'ruler' 'ru' boolean (default off, set in |defaults.vim|)
|
||||
global
|
||||
{not in Vi}
|
||||
{not available when compiled without the
|
||||
@@ -6455,6 +6469,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
The |FilterReadPre|, |FilterReadPost| and |FilterWritePre|,
|
||||
|FilterWritePost| autocommands event are not triggered when
|
||||
'shelltemp' is off.
|
||||
The `system()` function does not respect this option and always uses
|
||||
temp files.
|
||||
|
||||
*'shelltype'* *'st'*
|
||||
'shelltype' 'st' number (default 0)
|
||||
@@ -6611,8 +6627,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
"n" flag to 'cpoptions'.
|
||||
|
||||
*'showcmd'* *'sc'* *'noshowcmd'* *'nosc'*
|
||||
'showcmd' 'sc' boolean (Vim default: on, off for Unix, Vi default:
|
||||
off)
|
||||
'showcmd' 'sc' boolean (Vim default: on, off for Unix,
|
||||
Vi default: off, set in |defaults.vim|)
|
||||
global
|
||||
{not in Vi}
|
||||
{not available when compiled without the
|
||||
@@ -8180,10 +8196,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
has been used since the last search command.
|
||||
*viminfo-n*
|
||||
n Name of the viminfo file. The name must immediately follow
|
||||
the 'n'. Must be the last one! If the "-i" argument was
|
||||
given when starting Vim, that file name overrides the one
|
||||
given here with 'viminfo'. Environment variables are expanded
|
||||
when opening the file, not when setting the option.
|
||||
the 'n'. Must be at the end of the option! If the "-i"
|
||||
argument was given when starting Vim, that file name overrides
|
||||
the one given here with 'viminfo'. Environment variables are
|
||||
expanded when opening the file, not when setting the option.
|
||||
*viminfo-r*
|
||||
r Removable media. The argument is a string (up to the next
|
||||
','). This parameter can be given several times. Each
|
||||
@@ -8369,7 +8385,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
|
||||
*'wildmenu'* *'wmnu'* *'nowildmenu'* *'nowmnu'*
|
||||
'wildmenu' 'wmnu' boolean (default off)
|
||||
'wildmenu' 'wmnu' boolean (default off, set in |defaults.vim|)
|
||||
global
|
||||
{not in Vi}
|
||||
{not available if compiled without the |+wildmenu|
|
||||
@@ -8668,7 +8684,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'writedelay' 'wd' number (default 0)
|
||||
global
|
||||
{not in Vi}
|
||||
The number of microseconds to wait for each character sent to the
|
||||
The number of milliseconds 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.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pattern.txt* For Vim version 7.4. Last change: 2016 Apr 26
|
||||
*pattern.txt* For Vim version 7.4. Last change: 2016 Jun 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -954,14 +954,18 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
|
||||
< When 'hlsearch' is set and you move the cursor around and make changes
|
||||
this will clearly show when the match is updated or not.
|
||||
To match the text up to column 17: >
|
||||
/.*\%17v
|
||||
< Column 17 is included, because that's where the "\%17v" matches,
|
||||
even though this is a |/zero-width| match. Adding a dot to match the
|
||||
next character has the same result: >
|
||||
/.*\%17v.
|
||||
/^.*\%17v
|
||||
< Column 17 is not included, because this is a |/zero-width| match. To
|
||||
include the column use: >
|
||||
/^.*\%17v.
|
||||
< This command does the same thing, but also matches when there is no
|
||||
character in column 17: >
|
||||
/.*\%<18v.
|
||||
/^.*\%<18v.
|
||||
< Note that without the "^" to anchor the match in the first column,
|
||||
this will also highlight column 17: >
|
||||
/.*\%17v
|
||||
< Column 17 is highlighted by 'hlsearch' because there is another match
|
||||
where ".*" matches zero characters.
|
||||
<
|
||||
|
||||
Character classes: {not in Vi}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickfix.txt* For Vim version 7.4. Last change: 2016 Jun 02
|
||||
*quickfix.txt* For Vim version 7.4. Last change: 2016 Jul 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -35,11 +35,13 @@ positions in files. For example, |:vimgrep| finds pattern matches. You can
|
||||
use the positions in a script with the |getqflist()| function. Thus you can
|
||||
do a lot more than the edit/compile/fix cycle!
|
||||
|
||||
If you are using Manx's Aztec C compiler on the Amiga look here for how to use
|
||||
it with Vim: |quickfix-manx|. If you are using another compiler you should
|
||||
save the error messages in a file and start Vim with "vim -q filename". An
|
||||
easy way to do this is with the |:make| command (see below). The
|
||||
'errorformat' option should be set to match the error messages from your
|
||||
If you have the error messages in a file you can start Vim with: >
|
||||
vim -q filename
|
||||
|
||||
From inside Vim an easy way to run a command and handle the output is with the
|
||||
|:make| command (see below).
|
||||
|
||||
The 'errorformat' option should be set to match the error messages from your
|
||||
compiler (see |errorformat| below).
|
||||
|
||||
*location-list* *E776*
|
||||
@@ -49,8 +51,8 @@ have a separate location list. A location list can be associated with only
|
||||
one window. The location list is independent of the quickfix list.
|
||||
|
||||
When a window with a location list is split, the new window gets a copy of the
|
||||
location list. When there are no references to a location list, the location
|
||||
list is destroyed.
|
||||
location list. When there are no longer any references to a location list,
|
||||
the location list is destroyed.
|
||||
|
||||
The following quickfix commands can be used. The location list commands are
|
||||
similar to the quickfix commands, replacing the 'c' prefix in the quickfix
|
||||
@@ -270,11 +272,24 @@ processing a quickfix or location list command, it will be aborted.
|
||||
The 'switchbuf' settings are respected when jumping
|
||||
to a buffer.
|
||||
|
||||
:cl[ist] +{count} List the current and next {count} valid errors. This
|
||||
is similar to ":clist from from+count", where "from"
|
||||
is the current error position.
|
||||
|
||||
:cl[ist]! [from] [, [to]]
|
||||
List all errors.
|
||||
|
||||
*:lli* *:llist*
|
||||
:lli[st] [from] [, [to]]
|
||||
:cl[ist]! +{count} List the current and next {count} error lines. This
|
||||
is useful to see unrecognized lines after the current
|
||||
one. For example, if ":clist" shows:
|
||||
8384 testje.java:252: error: cannot find symbol ~
|
||||
Then using ":cl! +3" shows the reason:
|
||||
8384 testje.java:252: error: cannot find symbol ~
|
||||
8385: ZexitCode = Fmainx(); ~
|
||||
8386: ^ ~
|
||||
8387: symbol: method Fmainx() ~
|
||||
|
||||
:lli[st] [from] [, [to]] *:lli* *:llist*
|
||||
Same as ":clist", except the location list for the
|
||||
current window is used instead of the quickfix list.
|
||||
|
||||
@@ -318,7 +333,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
|
||||
etc.
|
||||
< When the current file can't be |abandon|ed and the [!]
|
||||
is not present, the command fails.
|
||||
When an error is detected excecution stops.
|
||||
When an error is detected execution stops.
|
||||
The last buffer (or where an error occurred) becomes
|
||||
the current buffer.
|
||||
{cmd} can contain '|' to concatenate several commands.
|
||||
@@ -420,6 +435,17 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
|
||||
|
||||
*:lw* *:lwindow*
|
||||
:lw[indow] [height] Same as ":cwindow", except use the window showing the
|
||||
location list for the current window.
|
||||
|
||||
*:cbo* *:cbottom*
|
||||
:cbo[ttom] Put the cursor in the last line of the quickfix window
|
||||
and scroll to make it visible. This is useful for
|
||||
when errors are added by an asynchronous callback.
|
||||
Only call it once in a while if there are many
|
||||
updates to avoid a lot of redrawing.
|
||||
|
||||
*:lbo* *:lbottom*
|
||||
:lbo[ttom] Same as ":cbottom", except use the window showing the
|
||||
location list for the current window.
|
||||
|
||||
Normally the quickfix window is at the bottom of the screen. If there are
|
||||
@@ -504,7 +530,7 @@ lists. They set one of the existing error lists as the current one.
|
||||
list, an error message is given.
|
||||
|
||||
*:lolder* *:lol*
|
||||
:lol[der] [count] Same as ":colder", except use the location list for
|
||||
:lol[der] [count] Same as `:colder`, except use the location list for
|
||||
the current window instead of the quickfix list.
|
||||
|
||||
*:cnewer* *:cnew* *E381*
|
||||
@@ -513,9 +539,20 @@ lists. They set one of the existing error lists as the current one.
|
||||
list, an error message is given.
|
||||
|
||||
*:lnewer* *:lnew*
|
||||
:lnew[er] [count] Same as ":cnewer", except use the location list for
|
||||
:lnew[er] [count] Same as `:cnewer`, except use the location list for
|
||||
the current window instead of the quickfix list.
|
||||
|
||||
*:chistory* *:chi*
|
||||
:chi[story] Show the list of error lists. The current list is
|
||||
marked with ">". The output looks like:
|
||||
error list 1 of 3; 43 errors ~
|
||||
> error list 2 of 3; 0 errors ~
|
||||
error list 3 of 3; 15 errors ~
|
||||
|
||||
*:lhistory* *:lhi*
|
||||
:lhi[story] Show the list of location lists, otherwise like
|
||||
`:chistory`.
|
||||
|
||||
When adding a new error list, it becomes the current list.
|
||||
|
||||
When ":colder" has been used and ":make" or ":grep" is used to add a new error
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 7.4. Last change: 2016 Apr 29
|
||||
*quickref.txt* For Vim version 7.4. Last change: 2016 Jun 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -831,6 +831,7 @@ Short explanation of each option: *option-list*
|
||||
'printmbcharset' 'pmbcs' CJK character set to be used for :hardcopy
|
||||
'printmbfont' 'pmbfn' font names to be used for CJK output of :hardcopy
|
||||
'printoptions' 'popt' controls the format of :hardcopy output
|
||||
'prompt' 'prompt' enable prompt in Ex mode
|
||||
'pumheight' 'ph' maximum height of the popup menu
|
||||
'pythondll' name of the Python 2 dynamic library
|
||||
'pythonthreedll' name of the Python 3 dynamic library
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*repeat.txt* For Vim version 7.4. Last change: 2016 May 24
|
||||
*repeat.txt* For Vim version 7.4. Last change: 2016 Jul 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -295,7 +295,9 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|
||||
... not converted ...
|
||||
|
||||
< When conversion isn't supported by the system, there
|
||||
is no error message and no conversion is done.
|
||||
is no error message and no conversion is done. When a
|
||||
line can't be converted there is no error and the
|
||||
original line is kept.
|
||||
|
||||
Don't use "ucs-2" or "ucs-4", scripts cannot be in
|
||||
these encodings (they would contain NUL bytes).
|
||||
@@ -541,7 +543,7 @@ whether Vim supports a feature or a dependency is missing.
|
||||
You can also load an optional plugin at startup, by putting this command in
|
||||
your |.vimrc|: >
|
||||
:packadd! foodebug
|
||||
The extra "!" is so that the plugin isn't loaded with Vim was started with
|
||||
The extra "!" is so that the plugin isn't loaded if Vim was started with
|
||||
|--noplugin|.
|
||||
|
||||
It is perfectly normal for a package to only have files in the "opt"
|
||||
@@ -620,7 +622,7 @@ the command after changing the plugin help: >
|
||||
|
||||
Dependencies between plugins ~
|
||||
*packload-two-steps*
|
||||
Suppose you have a two plugins that depend on the same functionality. You can
|
||||
Suppose you have two plugins that depend on the same functionality. You can
|
||||
put the common functionality in an autoload directory, so that it will be
|
||||
found automatically. Your package would have these files:
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 7.4. Last change: 2016 Apr 22
|
||||
*starting.txt* For Vim version 7.4. Last change: 2016 Jul 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -806,13 +806,13 @@ accordingly. Vim proceeds in this order:
|
||||
For the Macintosh the $VIMRUNTIME/macmap.vim is read.
|
||||
|
||||
*VIMINIT* *.vimrc* *_vimrc* *EXINIT* *.exrc* *_exrc* *$MYVIMRC*
|
||||
c. Four places are searched for initializations. The first that exists
|
||||
c. Five places are searched for initializations. The first that exists
|
||||
is used, the others are ignored. The $MYVIMRC environment variable is
|
||||
set to the file that was first found, unless $MYVIMRC was already set
|
||||
and when using VIMINIT.
|
||||
- The environment variable VIMINIT (see also |compatible-default|) (*)
|
||||
The value of $VIMINIT is used as an Ex command line.
|
||||
- The user vimrc file(s):
|
||||
I The environment variable VIMINIT (see also |compatible-default|) (*)
|
||||
The value of $VIMINIT is used as an Ex command line.
|
||||
II The user vimrc file(s):
|
||||
"$HOME/.vimrc" (for Unix and OS/2) (*)
|
||||
"$HOME/.vim/vimrc" (for Unix and OS/2) (*)
|
||||
"s:.vimrc" (for Amiga) (*)
|
||||
@@ -829,13 +829,14 @@ accordingly. Vim proceeds in this order:
|
||||
Note: For MS-DOS and Win32, "$HOME" is checked first. If no
|
||||
"_vimrc" or ".vimrc" is found there, "$VIM" is tried.
|
||||
See |$VIM| for when $VIM is not set.
|
||||
- The environment variable EXINIT.
|
||||
The value of $EXINIT is used as an Ex command line.
|
||||
- The user exrc file(s). Same as for the user vimrc file, but with
|
||||
"vimrc" replaced by "exrc". But only one of ".exrc" and "_exrc" is
|
||||
used, depending on the system. And without the (*)!
|
||||
- You would usually have "syntax on" and/or "filetype on" commands,
|
||||
which trigger initializing filetype detection, see |syntax-loading|.
|
||||
III The environment variable EXINIT.
|
||||
The value of $EXINIT is used as an Ex command line.
|
||||
IV The user exrc file(s). Same as for the user vimrc file, but with
|
||||
"vimrc" replaced by "exrc". But only one of ".exrc" and "_exrc" is
|
||||
used, depending on the system. And without the (*)!
|
||||
V The default vimrc file, $VIMRUNTIME/defaults.vim. This sets up
|
||||
options values and has "syntax on" and "filetype on" commands,
|
||||
which is what most new users will want. See |defaults.vim|.
|
||||
|
||||
d. If the 'exrc' option is on (which is not the default), the current
|
||||
directory is searched for three files. The first that exists is used,
|
||||
@@ -912,6 +913,9 @@ accordingly. Vim proceeds in this order:
|
||||
The |v:vim_did_enter| variable is set to 1.
|
||||
The |VimEnter| autocommands are executed.
|
||||
|
||||
The $MYVIMRC or $MYGVIMRC file will be set to the first found vimrc and/or
|
||||
gvimrc file.
|
||||
|
||||
Some hints on using initializations:
|
||||
|
||||
Standard setup:
|
||||
@@ -958,16 +962,29 @@ problems if you have a file with only <NL>s and have a line like
|
||||
|
||||
*compatible-default*
|
||||
When Vim starts, the 'compatible' option is on. This will be used when Vim
|
||||
starts its initializations. But as soon as a user vimrc file is found, or a
|
||||
vimrc file in the current directory, or the "VIMINIT" environment variable is
|
||||
set, it will be set to 'nocompatible'. This has the side effect of setting or
|
||||
resetting other options (see 'compatible'). But only the options that have
|
||||
not been set or reset will be changed. This has the same effect like the
|
||||
value of 'compatible' had this value when starting Vim. Note that this
|
||||
doesn't happen for the system-wide vimrc file nor when Vim was started with
|
||||
the |-u| command line argument. It does also happen for gvimrc files. The
|
||||
$MYVIMRC or $MYGVIMRC file will be set to the first found vimrc and/or gvimrc
|
||||
file.
|
||||
starts its initializations. But as soon as:
|
||||
- a user vimrc file is found, or
|
||||
- a vimrc file in the current directory, or
|
||||
- the "VIMINIT" environment variable is set, or
|
||||
- the "-N" command line argument is given, or
|
||||
even when no vimrc file exists.
|
||||
- the |defaults.vim| script is loaded, or
|
||||
- gvimrc file was found,
|
||||
then it will be set to 'nocompatible'.
|
||||
|
||||
Note that this does NOT happen when a system-wide vimrc file was found.
|
||||
|
||||
This has the side effect of setting or resetting other options (see
|
||||
'compatible'). But only the options that have not been set or reset will be
|
||||
changed. This has the same effect like the value of 'compatible' had this
|
||||
value when starting Vim.
|
||||
|
||||
'compatible' is NOT reset, and |defaults.vim| is not loaded:
|
||||
- when Vim was started with the |-u| command line argument, especially with
|
||||
"-u NONE", or
|
||||
- when started with the |-C| command line argument, or
|
||||
- when the name of the executable ends in "ex". (This has been done to make
|
||||
Vim behave like "ex", when it is started as "ex")
|
||||
|
||||
But there is a side effect of setting or resetting 'compatible' at the moment
|
||||
a .vimrc file is found: Mappings are interpreted the moment they are
|
||||
@@ -975,16 +992,24 @@ encountered. This makes a difference when using things like "<CR>". If the
|
||||
mappings depend on a certain value of 'compatible', set or reset it before
|
||||
giving the mapping.
|
||||
|
||||
The above behavior can be overridden in these ways:
|
||||
- If the "-N" command line argument is given, 'nocompatible' will be used,
|
||||
even when no vimrc file exists.
|
||||
- If the "-C" command line argument is given, 'compatible' will be used, even
|
||||
when a vimrc file exists.
|
||||
- If the "-u {vimrc}" argument is used, 'compatible' will be used.
|
||||
- When the name of the executable ends in "ex", then this works like the "-C"
|
||||
argument was given: 'compatible' will be used, even when a vimrc file
|
||||
exists. This has been done to make Vim behave like "ex", when it is started
|
||||
as "ex".
|
||||
*defaults.vim*
|
||||
If Vim is started normally and no user vimrc file is found, the
|
||||
$VIMRUTIME/defaults.vim script is loaded. This will set 'compatible' off,
|
||||
switch on syntax highlighting and a few more things. See the script for
|
||||
details. NOTE: this is done since Vim 8.0, not in Vim 7.4. (it was added in
|
||||
patch 7.4.2111 to be exact).
|
||||
|
||||
This should work well for new Vim users. If you create your own .vimrc, it is
|
||||
recommended to add this line somewhere near the top: >
|
||||
source $VIMRUNTIME/defaults.vim
|
||||
Then Vim works like before you had a .vimrc. Copying $VIMRUNTIME/vimrc_example
|
||||
is way to do this. Alternatively, you can copy defaults.vim to your .vimrc
|
||||
and modify it.
|
||||
|
||||
If you don't like some of the defaults, you can still source defaults.vim and
|
||||
revert individual settings. See the defaults.vim file for hints on how to
|
||||
revert each item.
|
||||
|
||||
|
||||
Avoiding trojan horses: *trojan-horse*
|
||||
While reading the "vimrc" or the "exrc" file in the current directory, some
|
||||
@@ -1413,6 +1438,34 @@ file (it's actually merged with the existing one, if one exists). The
|
||||
'viminfo' option is a string containing information about what info should be
|
||||
stored, and contains limits on how much should be stored (see 'viminfo').
|
||||
|
||||
Merging happens in two ways. Most items that have been changed or set in the
|
||||
current Vim session are stored, and what was not changed is filled from what
|
||||
is currently in the viminfo file. For example:
|
||||
- Vim session A reads the viminfo, which contains variable START.
|
||||
- Vim session B does the same
|
||||
- Vim session A sets the variables AAA and BOTH and exits
|
||||
- Vim session B sets the variables BBB and BOTH and exits
|
||||
Now the viminfo will have:
|
||||
START - it was in the viminfo and wasn't changed in session A or B
|
||||
AAA - value from session A, session B kept it
|
||||
BBB - value from session B
|
||||
BOTH - value from session B, value from session A is lost
|
||||
|
||||
*viminfo-timestamp*
|
||||
For some items a timestamp is used to keep the last changed version. Here it
|
||||
doesn't matter in which sequence Vim sessions exit, the newest item(s) are
|
||||
always kept. This is used for:
|
||||
- The command line history.
|
||||
- The search string history.
|
||||
- The input-line history.
|
||||
- Contents of non-empty registers.
|
||||
- The jump list
|
||||
- File marks
|
||||
The timestamp feature was added before Vim 8.0. Older versions of Vim,
|
||||
starting with 7.4.1131, will keep the items with timestamp, but not use them.
|
||||
Thus when using both an older and a newer version of Vim the most recent data
|
||||
will be kept.
|
||||
|
||||
Notes for Unix:
|
||||
- The file protection for the viminfo file will be set to prevent other users
|
||||
from being able to read it, because it may contain any text or commands that
|
||||
@@ -1535,14 +1588,14 @@ most of the information will be restored).
|
||||
already set (registers, marks, |v:oldfiles|, etc.)
|
||||
will be overwritten {not in Vi}
|
||||
|
||||
*:wv* *:wviminfo* *E137* *E138* *E574* *E886*
|
||||
*:wv* *:wviminfo* *E137* *E138* *E574* *E886* *E929*
|
||||
:wv[iminfo][!] [file] Write to viminfo file [file] (default: see above).
|
||||
The information in the file is first read in to make
|
||||
a merge between old and new info. When [!] is used,
|
||||
the old information is not read first, only the
|
||||
internal info is written. If 'viminfo' is empty, marks
|
||||
for up to 100 files will be written.
|
||||
When you get error "E138: Can't write viminfo file"
|
||||
When you get error "E929: Too many viminfo temp files"
|
||||
check that no old temp files were left behind (e.g.
|
||||
~/.viminf*) and that you can write in the directory of
|
||||
the .viminfo file.
|
||||
|
||||
@@ -1043,6 +1043,21 @@ This works immediately.
|
||||
|
||||
CLOJURE *ft-clojure-syntax*
|
||||
|
||||
The default syntax groups can be augmented through the
|
||||
*g:clojure_syntax_keywords* and *b:clojure_syntax_keywords* variables. The
|
||||
value should be a |Dictionary| of syntax group names to a |List| of custom
|
||||
identifiers:
|
||||
>
|
||||
let g:clojure_syntax_keywords = {
|
||||
\ 'clojureMacro': ["defproject", "defcustom"],
|
||||
\ 'clojureFunc': ["string/join", "string/replace"]
|
||||
\ }
|
||||
<
|
||||
Refer to the Clojure syntax script for valid syntax group names.
|
||||
|
||||
If the |buffer-variable| *b:clojure_syntax_without_core_keywords* is set, only
|
||||
language constants and special forms are matched.
|
||||
|
||||
Setting *g:clojure_fold* enables folding Clojure code via the syntax engine.
|
||||
Any list, vector, or map that extends over more than one line can be folded
|
||||
using the standard Vim |fold-commands|.
|
||||
|
||||
@@ -1232,6 +1232,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
+job various.txt /*+job*
|
||||
+jumplist various.txt /*+jumplist*
|
||||
+keymap various.txt /*+keymap*
|
||||
+lambda various.txt /*+lambda*
|
||||
+langmap various.txt /*+langmap*
|
||||
+libcall various.txt /*+libcall*
|
||||
+linebreak various.txt /*+linebreak*
|
||||
@@ -1260,6 +1261,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
+mzscheme various.txt /*+mzscheme*
|
||||
+mzscheme/dyn various.txt /*+mzscheme\/dyn*
|
||||
+netbeans_intg various.txt /*+netbeans_intg*
|
||||
+num64 various.txt /*+num64*
|
||||
+ole various.txt /*+ole*
|
||||
+packages various.txt /*+packages*
|
||||
+path_extra various.txt /*+path_extra*
|
||||
@@ -1993,6 +1995,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:bmodified windows.txt /*:bmodified*
|
||||
:bn windows.txt /*:bn*
|
||||
:bnext windows.txt /*:bnext*
|
||||
:bo windows.txt /*:bo*
|
||||
:botright windows.txt /*:botright*
|
||||
:bp windows.txt /*:bp*
|
||||
:bprevious windows.txt /*:bprevious*
|
||||
@@ -2040,6 +2043,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:cat eval.txt /*:cat*
|
||||
:catch eval.txt /*:catch*
|
||||
:cb quickfix.txt /*:cb*
|
||||
:cbo quickfix.txt /*:cbo*
|
||||
:cbottom quickfix.txt /*:cbottom*
|
||||
:cbuffer quickfix.txt /*:cbuffer*
|
||||
:cc quickfix.txt /*:cc*
|
||||
:ccl quickfix.txt /*:ccl*
|
||||
@@ -2071,9 +2076,13 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:checkpath tagsrch.txt /*:checkpath*
|
||||
:checkt editing.txt /*:checkt*
|
||||
:checktime editing.txt /*:checktime*
|
||||
:chi quickfix.txt /*:chi*
|
||||
:chistory quickfix.txt /*:chistory*
|
||||
:cl quickfix.txt /*:cl*
|
||||
:cla quickfix.txt /*:cla*
|
||||
:clast quickfix.txt /*:clast*
|
||||
:cle motion.txt /*:cle*
|
||||
:clearjumps motion.txt /*:clearjumps*
|
||||
:clist quickfix.txt /*:clist*
|
||||
:clo windows.txt /*:clo*
|
||||
:close windows.txt /*:close*
|
||||
@@ -2279,6 +2288,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:for eval.txt /*:for*
|
||||
:fu eval.txt /*:fu*
|
||||
:func-abort eval.txt /*:func-abort*
|
||||
:func-closure eval.txt /*:func-closure*
|
||||
:func-dict eval.txt /*:func-dict*
|
||||
:func-range eval.txt /*:func-range*
|
||||
:function eval.txt /*:function*
|
||||
@@ -2390,6 +2400,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:lat undo.txt /*:lat*
|
||||
:later undo.txt /*:later*
|
||||
:lb quickfix.txt /*:lb*
|
||||
:lbo quickfix.txt /*:lbo*
|
||||
:lbottom quickfix.txt /*:lbottom*
|
||||
:lbuffer quickfix.txt /*:lbuffer*
|
||||
:lc editing.txt /*:lc*
|
||||
:lcd editing.txt /*:lcd*
|
||||
@@ -2434,6 +2446,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:lgrepadd quickfix.txt /*:lgrepadd*
|
||||
:lh helphelp.txt /*:lh*
|
||||
:lhelpgrep helphelp.txt /*:lhelpgrep*
|
||||
:lhi quickfix.txt /*:lhi*
|
||||
:lhistory quickfix.txt /*:lhistory*
|
||||
:list various.txt /*:list*
|
||||
:ll quickfix.txt /*:ll*
|
||||
:lla quickfix.txt /*:lla*
|
||||
@@ -3360,6 +3374,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
<line1> map.txt /*<line1>*
|
||||
<line2> map.txt /*<line2>*
|
||||
<lt> intro.txt /*<lt>*
|
||||
<mods> map.txt /*<mods>*
|
||||
<nomodeline> autocmd.txt /*<nomodeline>*
|
||||
<q-args> map.txt /*<q-args>*
|
||||
<reg> map.txt /*<reg>*
|
||||
@@ -4451,7 +4466,12 @@ E925 quickfix.txt /*E925*
|
||||
E926 quickfix.txt /*E926*
|
||||
E927 eval.txt /*E927*
|
||||
E928 eval.txt /*E928*
|
||||
E929 starting.txt /*E929*
|
||||
E93 windows.txt /*E93*
|
||||
E930 eval.txt /*E930*
|
||||
E931 message.txt /*E931*
|
||||
E932 eval.txt /*E932*
|
||||
E933 eval.txt /*E933*
|
||||
E94 windows.txt /*E94*
|
||||
E95 message.txt /*E95*
|
||||
E96 diff.txt /*E96*
|
||||
@@ -4467,6 +4487,7 @@ Ex intro.txt /*Ex*
|
||||
Ex-mode intro.txt /*Ex-mode*
|
||||
Exuberant_ctags tagsrch.txt /*Exuberant_ctags*
|
||||
F motion.txt /*F*
|
||||
FALSE eval.txt /*FALSE*
|
||||
FAQ intro.txt /*FAQ*
|
||||
Farsi farsi.txt /*Farsi*
|
||||
FileAppendCmd autocmd.txt /*FileAppendCmd*
|
||||
@@ -4681,11 +4702,14 @@ TOhtml-encoding-detect syntax.txt /*TOhtml-encoding-detect*
|
||||
TOhtml-performance syntax.txt /*TOhtml-performance*
|
||||
TOhtml-uncopyable-text syntax.txt /*TOhtml-uncopyable-text*
|
||||
TOhtml-wrap-text syntax.txt /*TOhtml-wrap-text*
|
||||
TRUE eval.txt /*TRUE*
|
||||
TSQL ft_sql.txt /*TSQL*
|
||||
TTpro-telnet syntax.txt /*TTpro-telnet*
|
||||
Tab intro.txt /*Tab*
|
||||
TabClosed autocmd.txt /*TabClosed*
|
||||
TabEnter autocmd.txt /*TabEnter*
|
||||
TabLeave autocmd.txt /*TabLeave*
|
||||
TabNew autocmd.txt /*TabNew*
|
||||
Tcl if_tcl.txt /*Tcl*
|
||||
TermChanged autocmd.txt /*TermChanged*
|
||||
TermResponse autocmd.txt /*TermResponse*
|
||||
@@ -4726,11 +4750,13 @@ W15 repeat.txt /*W15*
|
||||
W16 message.txt /*W16*
|
||||
W17 arabic.txt /*W17*
|
||||
W18 syntax.txt /*W18*
|
||||
W19 autocmd.txt /*W19*
|
||||
WORD motion.txt /*WORD*
|
||||
WWW intro.txt /*WWW*
|
||||
Win32 os_win32.txt /*Win32*
|
||||
WinEnter autocmd.txt /*WinEnter*
|
||||
WinLeave autocmd.txt /*WinLeave*
|
||||
WinNew autocmd.txt /*WinNew*
|
||||
X change.txt /*X*
|
||||
X11 options.txt /*X11*
|
||||
X11-icon gui_x11.txt /*X11-icon*
|
||||
@@ -4948,6 +4974,7 @@ assert_equal() eval.txt /*assert_equal()*
|
||||
assert_exception() eval.txt /*assert_exception()*
|
||||
assert_fails() eval.txt /*assert_fails()*
|
||||
assert_false() eval.txt /*assert_false()*
|
||||
assert_inrange() eval.txt /*assert_inrange()*
|
||||
assert_match() eval.txt /*assert_match()*
|
||||
assert_notequal() eval.txt /*assert_notequal()*
|
||||
assert_notmatch() eval.txt /*assert_notmatch()*
|
||||
@@ -4995,6 +5022,8 @@ b motion.txt /*b*
|
||||
b: eval.txt /*b:*
|
||||
b:changedtick eval.txt /*b:changedtick*
|
||||
b:changelog_name filetype.txt /*b:changelog_name*
|
||||
b:clojure_syntax_keywords syntax.txt /*b:clojure_syntax_keywords*
|
||||
b:clojure_syntax_without_core_keywords syntax.txt /*b:clojure_syntax_without_core_keywords*
|
||||
b:current_syntax-variable syntax.txt /*b:current_syntax-variable*
|
||||
b:netrw_lastfile pi_netrw.txt /*b:netrw_lastfile*
|
||||
b:tex_stylish syntax.txt /*b:tex_stylish*
|
||||
@@ -5244,6 +5273,7 @@ channel-callback channel.txt /*channel-callback*
|
||||
channel-close channel.txt /*channel-close*
|
||||
channel-commands channel.txt /*channel-commands*
|
||||
channel-demo channel.txt /*channel-demo*
|
||||
channel-functions usr_41.txt /*channel-functions*
|
||||
channel-mode channel.txt /*channel-mode*
|
||||
channel-more channel.txt /*channel-more*
|
||||
channel-open channel.txt /*channel-open*
|
||||
@@ -5316,6 +5346,7 @@ clipboard-unnamed options.txt /*clipboard-unnamed*
|
||||
clipboard-unnamedplus options.txt /*clipboard-unnamedplus*
|
||||
clojure-indent indent.txt /*clojure-indent*
|
||||
close_cb channel.txt /*close_cb*
|
||||
closure eval.txt /*closure*
|
||||
cmdarg-variable eval.txt /*cmdarg-variable*
|
||||
cmdbang-variable eval.txt /*cmdbang-variable*
|
||||
cmdline-arguments vi_diff.txt /*cmdline-arguments*
|
||||
@@ -5558,6 +5589,7 @@ debugger.txt debugger.txt /*debugger.txt*
|
||||
dec-mouse options.txt /*dec-mouse*
|
||||
decada_members ft_ada.txt /*decada_members*
|
||||
deepcopy() eval.txt /*deepcopy()*
|
||||
defaults.vim starting.txt /*defaults.vim*
|
||||
definition-search tagsrch.txt /*definition-search*
|
||||
definitions intro.txt /*definitions*
|
||||
delete() eval.txt /*delete()*
|
||||
@@ -5740,6 +5772,7 @@ exception-variable eval.txt /*exception-variable*
|
||||
exclusive motion.txt /*exclusive*
|
||||
exclusive-linewise motion.txt /*exclusive-linewise*
|
||||
executable() eval.txt /*executable()*
|
||||
execute() eval.txt /*execute()*
|
||||
execute-menus gui.txt /*execute-menus*
|
||||
exepath() eval.txt /*exepath()*
|
||||
exim starting.txt /*exim*
|
||||
@@ -5795,6 +5828,7 @@ expr-is? eval.txt /*expr-is?*
|
||||
expr-isnot eval.txt /*expr-isnot*
|
||||
expr-isnot# eval.txt /*expr-isnot#*
|
||||
expr-isnot? eval.txt /*expr-isnot?*
|
||||
expr-lambda eval.txt /*expr-lambda*
|
||||
expr-nesting eval.txt /*expr-nesting*
|
||||
expr-number eval.txt /*expr-number*
|
||||
expr-option eval.txt /*expr-option*
|
||||
@@ -6084,6 +6118,7 @@ ftplugin-name usr_05.txt /*ftplugin-name*
|
||||
ftplugin-overrule filetype.txt /*ftplugin-overrule*
|
||||
ftplugin-special usr_41.txt /*ftplugin-special*
|
||||
ftplugins usr_05.txt /*ftplugins*
|
||||
funcref() eval.txt /*funcref()*
|
||||
function() eval.txt /*function()*
|
||||
function-argument eval.txt /*function-argument*
|
||||
function-key intro.txt /*function-key*
|
||||
@@ -6142,6 +6177,7 @@ g:clojure_fuzzy_indent_blacklist indent.txt /*g:clojure_fuzzy_indent_blacklist*
|
||||
g:clojure_fuzzy_indent_patterns indent.txt /*g:clojure_fuzzy_indent_patterns*
|
||||
g:clojure_maxlines indent.txt /*g:clojure_maxlines*
|
||||
g:clojure_special_indent_words indent.txt /*g:clojure_special_indent_words*
|
||||
g:clojure_syntax_keywords syntax.txt /*g:clojure_syntax_keywords*
|
||||
g:colors_name options.txt /*g:colors_name*
|
||||
g:decada ft_ada.txt /*g:decada*
|
||||
g:decada.Error_Format ft_ada.txt /*g:decada.Error_Format*
|
||||
@@ -6367,6 +6403,7 @@ getcmdline() eval.txt /*getcmdline()*
|
||||
getcmdpos() eval.txt /*getcmdpos()*
|
||||
getcmdtype() eval.txt /*getcmdtype()*
|
||||
getcmdwintype() eval.txt /*getcmdwintype()*
|
||||
getcompletion() eval.txt /*getcompletion()*
|
||||
getcurpos() eval.txt /*getcurpos()*
|
||||
getcwd() eval.txt /*getcwd()*
|
||||
getfontname() eval.txt /*getfontname()*
|
||||
@@ -6894,6 +6931,7 @@ job-control channel.txt /*job-control*
|
||||
job-err_cb channel.txt /*job-err_cb*
|
||||
job-err_io channel.txt /*job-err_io*
|
||||
job-exit_cb channel.txt /*job-exit_cb*
|
||||
job-functions usr_41.txt /*job-functions*
|
||||
job-in_io channel.txt /*job-in_io*
|
||||
job-options channel.txt /*job-options*
|
||||
job-out_cb channel.txt /*job-out_cb*
|
||||
@@ -6952,6 +6990,7 @@ l: eval.txt /*l:*
|
||||
l:var eval.txt /*l:var*
|
||||
lCursor mbyte.txt /*lCursor*
|
||||
lace.vim syntax.txt /*lace.vim*
|
||||
lambda eval.txt /*lambda*
|
||||
lang-variable eval.txt /*lang-variable*
|
||||
language-mapping map.txt /*language-mapping*
|
||||
last-pattern pattern.txt /*last-pattern*
|
||||
@@ -8402,9 +8441,11 @@ t_ZH term.txt /*t_ZH*
|
||||
t_ZR term.txt /*t_ZR*
|
||||
t_al term.txt /*t_al*
|
||||
t_bc term.txt /*t_bc*
|
||||
t_bool-varialble eval.txt /*t_bool-varialble*
|
||||
t_cd term.txt /*t_cd*
|
||||
t_cdl version4.txt /*t_cdl*
|
||||
t_ce term.txt /*t_ce*
|
||||
t_channel-varialble eval.txt /*t_channel-varialble*
|
||||
t_ci version4.txt /*t_ci*
|
||||
t_cil version4.txt /*t_cil*
|
||||
t_cl term.txt /*t_cl*
|
||||
@@ -8416,6 +8457,7 @@ t_cv version4.txt /*t_cv*
|
||||
t_cvv version4.txt /*t_cvv*
|
||||
t_da term.txt /*t_da*
|
||||
t_db term.txt /*t_db*
|
||||
t_dict-varialble eval.txt /*t_dict-varialble*
|
||||
t_dl term.txt /*t_dl*
|
||||
t_ed version4.txt /*t_ed*
|
||||
t_el version4.txt /*t_el*
|
||||
@@ -8429,9 +8471,12 @@ t_f6 version4.txt /*t_f6*
|
||||
t_f7 version4.txt /*t_f7*
|
||||
t_f8 version4.txt /*t_f8*
|
||||
t_f9 version4.txt /*t_f9*
|
||||
t_float-varialble eval.txt /*t_float-varialble*
|
||||
t_fs term.txt /*t_fs*
|
||||
t_func-varialble eval.txt /*t_func-varialble*
|
||||
t_help version4.txt /*t_help*
|
||||
t_il version4.txt /*t_il*
|
||||
t_job-varialble eval.txt /*t_job-varialble*
|
||||
t_k1 term.txt /*t_k1*
|
||||
t_k2 term.txt /*t_k2*
|
||||
t_k3 term.txt /*t_k3*
|
||||
@@ -8456,12 +8501,15 @@ t_kr term.txt /*t_kr*
|
||||
t_ks term.txt /*t_ks*
|
||||
t_ku term.txt /*t_ku*
|
||||
t_le term.txt /*t_le*
|
||||
t_list-varialble eval.txt /*t_list-varialble*
|
||||
t_mb term.txt /*t_mb*
|
||||
t_md term.txt /*t_md*
|
||||
t_me term.txt /*t_me*
|
||||
t_mr term.txt /*t_mr*
|
||||
t_ms term.txt /*t_ms*
|
||||
t_nd term.txt /*t_nd*
|
||||
t_none-varialble eval.txt /*t_none-varialble*
|
||||
t_number-varialble eval.txt /*t_number-varialble*
|
||||
t_op term.txt /*t_op*
|
||||
t_se term.txt /*t_se*
|
||||
t_sf1 version4.txt /*t_sf1*
|
||||
@@ -8481,6 +8529,7 @@ t_sku version4.txt /*t_sku*
|
||||
t_so term.txt /*t_so*
|
||||
t_sr term.txt /*t_sr*
|
||||
t_star7 term.txt /*t_star7*
|
||||
t_string-varialble eval.txt /*t_string-varialble*
|
||||
t_tb version4.txt /*t_tb*
|
||||
t_te term.txt /*t_te*
|
||||
t_ti term.txt /*t_ti*
|
||||
@@ -8614,6 +8663,7 @@ terminfo term.txt /*terminfo*
|
||||
termresponse-variable eval.txt /*termresponse-variable*
|
||||
test-functions usr_41.txt /*test-functions*
|
||||
test_alloc_fail() eval.txt /*test_alloc_fail()*
|
||||
test_autochdir() eval.txt /*test_autochdir()*
|
||||
test_disable_char_avail() eval.txt /*test_disable_char_avail()*
|
||||
test_garbagecollect_now() eval.txt /*test_garbagecollect_now()*
|
||||
test_null_channel() eval.txt /*test_null_channel()*
|
||||
@@ -8622,6 +8672,7 @@ test_null_job() eval.txt /*test_null_job()*
|
||||
test_null_list() eval.txt /*test_null_list()*
|
||||
test_null_partial() eval.txt /*test_null_partial()*
|
||||
test_null_string() eval.txt /*test_null_string()*
|
||||
test_settime() eval.txt /*test_settime()*
|
||||
testing-variable eval.txt /*testing-variable*
|
||||
tex-cchar syntax.txt /*tex-cchar*
|
||||
tex-cole syntax.txt /*tex-cole*
|
||||
@@ -8652,6 +8703,7 @@ throw-from-catch eval.txt /*throw-from-catch*
|
||||
throw-variables eval.txt /*throw-variables*
|
||||
throwpoint-variable eval.txt /*throwpoint-variable*
|
||||
time-functions usr_41.txt /*time-functions*
|
||||
timer-functions usr_41.txt /*timer-functions*
|
||||
timer_start() eval.txt /*timer_start()*
|
||||
timer_stop() eval.txt /*timer_stop()*
|
||||
timestamp editing.txt /*timestamp*
|
||||
@@ -8820,6 +8872,17 @@ v:statusmsg eval.txt /*v:statusmsg*
|
||||
v:swapchoice eval.txt /*v:swapchoice*
|
||||
v:swapcommand eval.txt /*v:swapcommand*
|
||||
v:swapname eval.txt /*v:swapname*
|
||||
v:t_TYPE eval.txt /*v:t_TYPE*
|
||||
v:t_bool eval.txt /*v:t_bool*
|
||||
v:t_channel eval.txt /*v:t_channel*
|
||||
v:t_dict eval.txt /*v:t_dict*
|
||||
v:t_float eval.txt /*v:t_float*
|
||||
v:t_func eval.txt /*v:t_func*
|
||||
v:t_job eval.txt /*v:t_job*
|
||||
v:t_list eval.txt /*v:t_list*
|
||||
v:t_none eval.txt /*v:t_none*
|
||||
v:t_number eval.txt /*v:t_number*
|
||||
v:t_string eval.txt /*v:t_string*
|
||||
v:termresponse eval.txt /*v:termresponse*
|
||||
v:testing eval.txt /*v:testing*
|
||||
v:this_session eval.txt /*v:this_session*
|
||||
@@ -8940,6 +9003,7 @@ v_v visual.txt /*v_v*
|
||||
v_x change.txt /*v_x*
|
||||
v_y change.txt /*v_y*
|
||||
v_~ change.txt /*v_~*
|
||||
vab motion.txt /*vab*
|
||||
val-variable eval.txt /*val-variable*
|
||||
valgrind debug.txt /*valgrind*
|
||||
values() eval.txt /*values()*
|
||||
@@ -8987,6 +9051,7 @@ vi intro.txt /*vi*
|
||||
vi-differences vi_diff.txt /*vi-differences*
|
||||
vi: options.txt /*vi:*
|
||||
vi_diff.txt vi_diff.txt /*vi_diff.txt*
|
||||
vib motion.txt /*vib*
|
||||
view starting.txt /*view*
|
||||
view-diffs diff.txt /*view-diffs*
|
||||
view-file starting.txt /*view-file*
|
||||
@@ -9042,6 +9107,7 @@ viminfo-r options.txt /*viminfo-r*
|
||||
viminfo-read starting.txt /*viminfo-read*
|
||||
viminfo-read-write starting.txt /*viminfo-read-write*
|
||||
viminfo-s options.txt /*viminfo-s*
|
||||
viminfo-timestamp starting.txt /*viminfo-timestamp*
|
||||
viminfo-write starting.txt /*viminfo-write*
|
||||
vimrc starting.txt /*vimrc*
|
||||
vimrc-filetype usr_05.txt /*vimrc-filetype*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 7.4. Last change: 2016 Jun 04
|
||||
*todo.txt* For Vim version 7.4. Last change: 2016 Aug 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -34,7 +34,10 @@ not be repeated below, unless there is extra information.
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Should free_all_functions(void) skip numbered and lambda functions?
|
||||
|
||||
+channel:
|
||||
- Channel test fails with Motif. Sometimes kills the X11 server.
|
||||
- When a message in the queue but there is no callback, drop it after a while?
|
||||
Add timestamp to queued messages and callbacks with ID, remove after a
|
||||
minute. Option to set the droptime.
|
||||
@@ -95,83 +98,107 @@ Regexp problems:
|
||||
- The pattern "\1" with the old engine gives E65, with the new engine it
|
||||
matches the empty string. (Dominique Pelle, 2015 Oct 2, Nov 24)
|
||||
- Search for \\~ causes error E874.
|
||||
- Search for /\%d0\+ causes error E363 in a file with consecutive NUL
|
||||
characters. (Christian Brabandt, 2016 Jun 7)
|
||||
|
||||
Patch to reduce number of memory allocations for quickfix lines.
|
||||
(Yegappan Lakshmanan, 2016 May 22, #831)
|
||||
|
||||
User commands: add a <> item to pass on command modifiers, such as ":tab".
|
||||
Patch by Yegappan Lakshmanan, 2016 May 22, #829.
|
||||
|
||||
jsonencode(): should convert to utf-8. (Nikolai Pavlov, 2016 Jan 23)
|
||||
json_encode(): should convert to utf-8. (Nikolai Pavlov, 2016 Jan 23)
|
||||
What if there is an invalid character?
|
||||
|
||||
Should json_encode()/json_decode() restrict recursiveness?
|
||||
Or avoid recursiveness.
|
||||
|
||||
Patch to test popupmenu. Fails, possibly due to a bug.
|
||||
(Christian Brabandt, 2016 Jul 23)
|
||||
|
||||
Once .exe with updated installer is available: Add remark to download page
|
||||
about /S and /D options (Ken Takata, 2016 Apr 13)
|
||||
Or point to nightly builds: https://github.com/vim/vim-win32-installer/releases
|
||||
|
||||
Problem with completion on "**/" in $path. (issue #932)
|
||||
Happens in uniquefy_paths() ? More info Jul 22.
|
||||
Fix for this (Harm te Hennepe, 2016 Jul 21, #939)
|
||||
|
||||
Cursor positioned in the wrong place when editing src/testdir/test_viml.vim.
|
||||
|
||||
When using "k" at the hit-enter prompt only get the hit-enter prompt, not
|
||||
scrolling up. (Ramel Eshed, 2016 May 25)
|
||||
Related patches: Patch 7.4.1603, Patch 7.4.1594
|
||||
Patch by Hirohito Higashi, 2016 May 26.
|
||||
|
||||
Patch to make cursor blinking work better with GTK3. (Kazunobu Kuriyama, 2016
|
||||
Apr 19) Need to check this works on Linux.
|
||||
Alternative:
|
||||
- add gui_restart_blink flag, set when key typed.
|
||||
- in gui_mch_start_blink(): continue if possible.
|
||||
- in gui_mch_stop_blink(): remember last state.
|
||||
Javascript indent wrong after /* in single quoted string:
|
||||
var SRC = 'src/*.js';
|
||||
function log(tag) {
|
||||
a = b;
|
||||
}
|
||||
|
||||
Use ADDR_OTHER instead of ADDR_LINES for many more commands.
|
||||
Add tests for using number larger than number of lines in buffer.
|
||||
|
||||
Patch to fix escaping special characters for delete(). (tc-0, 2016 Mar 20,
|
||||
#700) Test fails on MS-Windows.
|
||||
|
||||
Invalid behavior with NULL list. (Nikolai Pavlov, #768)
|
||||
|
||||
Patch to fix using CTRL-] on "{address}." in help. (Hirohito Higashi, 2016 May
|
||||
18, #814)
|
||||
|
||||
Can we add a function to parse one line for 'errorformat'? Like ":caddexpr"
|
||||
for one line.
|
||||
|
||||
Patch to fix greying popup menu items. (Shane Harper, 2016 May 23, #834)
|
||||
|
||||
&t_ut not used with 'termguicolors' is set. (Jacob Niehus, 2016 May 14, #804)
|
||||
Patch to fix this, Jacob Niehus, 2016 May 14, #805)
|
||||
|
||||
For current Windows build .pdb file is missing. (Gabriele Fava, 2016 May 11)
|
||||
5)
|
||||
|
||||
Patch to support expression argument to sort() instead of a function name.
|
||||
Yasuhiro Matsumoto, 2013 May 31.
|
||||
Or should we add a more general mechanism, like a lambda() function?
|
||||
Patch by Yasuhiro Matsumoto, 2014 Sep 16, update 2016 Apr 17.
|
||||
Correction for test, Ken Takata, 2016 May 27.
|
||||
|
||||
Problem with whitespace in errorformat. (Gerd Wachsmuth, 2016 May 15, #807)
|
||||
|
||||
Patch to add filtering of the quickfix list. (Yegappan Lakshmanan, 2016 Mar
|
||||
13, last version) Update May 22, #830.
|
||||
Undo problem: "g-" doesn't go back, gets stuck. (Björn Linse, 2016 Jul 18)
|
||||
|
||||
When 'autochdir' is set, writing new file does not change the current dir.
|
||||
(Dan Church, issue #777)
|
||||
Patch to fix this. (mister fish (Allen Haim), 2016 May 14, #803)
|
||||
Do we need some way (option) to show the sign column even when there are no
|
||||
signs? Patch by Christian Brabandt, 2016 Jul 29.
|
||||
|
||||
Patch to allow setting w:quickfix_title via setqflist() and setloclist()
|
||||
functions. (Christian Brabandt, 2013 May 8, update May 21)
|
||||
Patch to add getlocstack() / setlocstack(). (Christian Brabandt, 2013 May 14)
|
||||
Second one. Update May 22.
|
||||
Update by Daniel Hahler, 2014 Jul 4, Aug 14, Oct 14, Oct 15.
|
||||
Updated patch: add an argument to setqflist() and getqflist() for these
|
||||
extra items: Yegappan, 2016 Jul 30.
|
||||
|
||||
Patch to detect st terminal supporting xterm mouse. (Manuel Schiller, 2016 Aug
|
||||
2, #963)
|
||||
|
||||
Syntax highlighting for messages with RFC3339 timestamp (#946)
|
||||
Did maintainer reply?
|
||||
|
||||
Patch to add filtering of the quickfix list. (Yegappan Lakshmanan, 2016 Mar
|
||||
13, last version) Update June 26, #830.
|
||||
Instead use a Vim script implementation, invoked from a Vim command.
|
||||
|
||||
ml_get errors when reloading file. (Chris Desjardins, 2016 Apr 19)
|
||||
Also with latest version.
|
||||
|
||||
Patch to load rgb.txt once. (Christian Brabandt, 2016 Apr 29)
|
||||
|
||||
Still problems with 'emoji'. See issue #721. Patch 7.4.1697 half-fixes it.
|
||||
Avoid PLAN_WRITE in windgoto() ?
|
||||
Should already never use utf-8 chars to position the cursor.
|
||||
|
||||
Cannot delete a file with square brackets with delete(). (#696)
|
||||
|
||||
Patch to add TabNew, TabNewEntered and TabClosed autocommand events.
|
||||
(Felipe Morales, 2015 Feb 1)
|
||||
No autocommand for when changing directory. Patch from allen haim, 2016 Jun
|
||||
27, #888
|
||||
Justin M Keyes: use "global" or "window" for the pattern. Can add "tab"
|
||||
later. What if entering a window where ":lcd" was used?
|
||||
|
||||
Completion for input() does not expand environment variables. (chdiza, 2016
|
||||
Jul 25, #948)
|
||||
|
||||
Patch to have text objects defined by arbitrary single characters. (Daniel
|
||||
Thau, 2013 Nov 20, 2014 Jan 29, 2014 Jan 31)
|
||||
Ben Fritz: problem with 'selection' set to "exclusive".
|
||||
Updated to current Vim, not quite right yet. (Ben Fritz, 2014 Mar 27)
|
||||
Updated to current Vim (James McCoy, 2016 Jul 30, #958)
|
||||
Still a bit of work left.
|
||||
|
||||
Patch to add CTRL-N / CTRL-P while searching. (Christian Brabandt, 2016 Jul
|
||||
29)
|
||||
|
||||
's$^$\=capture("s/^//gn")' locks Vim in sandbox mode (#950)
|
||||
Patch by Christian Brabandt, 2016 Jul 27.
|
||||
|
||||
MS-Windows: use WS_HIDE instead of SW_SHOWMINNOACTIVE in os_win32.c?
|
||||
Otherwise task flickers in taskbar.
|
||||
|
||||
Should make ":@r" handle line continuation. (Cesar Romani, 2016 Jun 26)
|
||||
Also for ":@.".
|
||||
|
||||
Patch to make printf() convert to string for %s items. (Ken Takata, 2016 Aug
|
||||
1)
|
||||
|
||||
Repeating 'opfunc' in a function only works once. (Tarmean, 2016 Jul 15, #925)
|
||||
|
||||
Patch on issue #728 by Christian Brabandt, 2016 Apr 7. Update with test: Apr 8.
|
||||
Explanation Apr 12.
|
||||
@@ -186,37 +213,41 @@ Patch for C syntax HL. (Bradley Garagan, 2016 Apr 17) #763
|
||||
Patch to make matchit work better, respect 'matchpairs'. (Ken Takata, 2016 Mar
|
||||
25)
|
||||
|
||||
This does not work: :set cscopequickfix=a-
|
||||
(Linewi, 2015 Jul 12, #914)
|
||||
|
||||
Possibly wrong value for seq_cur. (Florent Fayolle, 2016 May 15, #806)
|
||||
|
||||
Patch to improve map documentation. Issue #799.
|
||||
|
||||
Patch for restoring wide characters in the console buffer.
|
||||
(Ken Takata, 2016 Jun 7)
|
||||
|
||||
We can use '. to go to the last change in the current buffer, but how about
|
||||
the last change in any buffer? Can we use ', (, is next to .)?
|
||||
|
||||
Patch for Python: #622. (Roland Puntaier, 2016 Feb 2)
|
||||
What does it change?
|
||||
|
||||
When generating the Unicode tables with runtime/tools/unicode.vim the
|
||||
emoji_width table has only one entry.
|
||||
|
||||
It's possible to add ",," to 'wildignore', an empty entry. Causes problems.
|
||||
Reject the value? #710.
|
||||
|
||||
Patch to fix increment/decrement not working properly when 'virtualedit' is
|
||||
set. (Hirohito Higashi, 2016 Aug 1, #923)
|
||||
|
||||
Patch to support strikethrough next to bold and italic. (Christian Brabandt,
|
||||
2013 Jul 30) Update from Ken Takata, 2013 Oct 12.
|
||||
Update mentioned by Christian, 2016 Apr 25.
|
||||
Update from Ken Takata, 2016 Apr 26.
|
||||
|
||||
Win32: patch to use 64 bit stat() if possible. (Ken Takata, 2014 May 12)
|
||||
More tests May 14. Update May 29. Update Aug 10.
|
||||
Now part of large file patches. (Ken Takata, 2016 Feb 1)
|
||||
Win64: Seek error in swap file for a very big file (3 Gbyte). Check storing
|
||||
pointer in long and seek offset in 64 bit var.
|
||||
Patches from Ken Takata might help (2014 Apr 17)
|
||||
Update 2016 Mar 28. Can include all parts into one dist patch.
|
||||
|
||||
Patch to support 64 bit ints for Number. (Ken Takata, 2016 Jan 21)
|
||||
Update 2016 Apr 24.
|
||||
Update from Ken Takata, 2016 Jul 17.
|
||||
|
||||
Patch to improve cscope. (Adrian Kocis, #843)
|
||||
|
||||
Patch to add getbufinfo(), gettabinfo() and getwininfo(). (Yegappan
|
||||
Lakshmanan, 2016 Apr 2016) Update Jul 29. #833.
|
||||
|
||||
Patch for groovy multi-line comment highlighting. (Justin M. Keyes, 2016 May
|
||||
20 #644)
|
||||
|
||||
@@ -224,7 +255,9 @@ When doing "vi buf.md" a BufNew autocommand for *.md is not triggered.
|
||||
Because of using the initial buffer? (Dun Peal, 2016 May 12)
|
||||
|
||||
Patch to add the :bvimgrep command. (Christian Brabandt, 2014 Nov 12)
|
||||
Updated 2016 Feb 10
|
||||
Updated 2016 Jun 10, #858
|
||||
|
||||
Add redrawtabline command. (Naruhiko Nishino, 2016 Jun 11)
|
||||
|
||||
Neovim patch for utfc_ptr2char_len() https://github.com/neovim/neovim/pull/4574
|
||||
No test, needs some work to include.
|
||||
@@ -264,9 +297,6 @@ Patch to make tests pass with EBCDIC. (Owen Leibman, 2016 Apr 10)
|
||||
When repeating the 'confirm' dialog one needs to press Enter. (ds26gte, 2016
|
||||
Apr 17) #762
|
||||
|
||||
Should jsonencode()/jsondecode() restrict recursiveness?
|
||||
Or avoid recursiveness.
|
||||
|
||||
Use vim.vim syntax highlighting for help file examples, but without ":" in
|
||||
'iskeyword' for syntax.
|
||||
|
||||
@@ -275,6 +305,10 @@ Patch to make "%:h:h" return "." instead of the full path.
|
||||
|
||||
Remove SPACE_IN_FILENAME ? What could possibly go wrong?
|
||||
|
||||
When command names are very long :command output is difficult to read. Use a
|
||||
maximum for the column width? (#871)
|
||||
Patcy by varmanishant, 2016 Jun 18, #876
|
||||
|
||||
Patch to change GUI behavior: instead of changing the window size change the
|
||||
lines/columns when menu/toolbar/etc. is added/removed. (Ychin, 2016 Mar 20,
|
||||
#703)
|
||||
@@ -296,7 +330,7 @@ directory exists. (Sergio Gallelli, 2013 Dec 29)
|
||||
when evaluating to non-zero. Add the "watchadd expr" command, stop when
|
||||
the value of the expression changes. ":watchdel" deletes an item,
|
||||
":watchlist" lists the items. (Charles Campbell)
|
||||
Patch by Christian Brabandt, 2016 Feb 1.
|
||||
Patch by Christian Brabandt, 2016 Jun 10, #859
|
||||
|
||||
If ":bd" also closes a Tab page then the " mark is not set. (Harm te Hennepe,
|
||||
2016 Apr 25, #780)
|
||||
@@ -305,6 +339,7 @@ Patch to avoid redrawing tabline when the popup menu is visible.
|
||||
(Christian Brabandt, 2016 Jan 28)
|
||||
|
||||
Patch to add {skip} argument to search(). (Christian Brabandt, 2016 Feb 24)
|
||||
Update 2016 Jun 10, #861
|
||||
|
||||
Add value "smart" to 'tagcase': ignore case when tag is all lower case.
|
||||
Patch from Christian Brabandt, 2016 Mar 30, #712.
|
||||
@@ -312,6 +347,8 @@ Patch from Christian Brabandt, 2016 Mar 30, #712.
|
||||
Patch to be able to use hex numbers with :digraph. (Lcd, 2015 Sep 6)
|
||||
Update Sep 7. Update by Christian Brabandt, 2015 Sep 8, 2016 Feb 1.
|
||||
|
||||
Patch to show search statistics. (Christian Brabandt, 2016 Jul 22)
|
||||
|
||||
When the CursorMovedI event triggers, and CTRL-X was typed, a script cannot
|
||||
restore the mode properly. (Andrew Stewart, 2016 Apr 20)
|
||||
Do not trigger the event?
|
||||
@@ -376,10 +413,6 @@ wrong name. (Aram, 2014 Nov 7) Vim 7.4.
|
||||
Can't recognize the $ProgramFiles(x86) environment variable. Recognize it
|
||||
specifically? First try with the parens, then without.
|
||||
|
||||
Half-finished patch to fix the Problem using cgn to change a search hit when
|
||||
replacement includes hit. Reported by John Beckett, fix by Christian Brabandt,
|
||||
2016 Jan 11.
|
||||
|
||||
Patch to add :mapgroup, put mappings in a group like augroup.
|
||||
(Yasuhiro Matsumoto, 2016 Feb 19)
|
||||
|
||||
@@ -397,7 +430,7 @@ Use v:none. var == v:none
|
||||
|
||||
Patch to add arguments to argc() and argv(). (Yegappan Lakshmanan, 2016 Jan
|
||||
24) Also need a way to get the global arg list? Update later on Jan 24
|
||||
Update Mar 5. Update Apr 7.
|
||||
Update Mar 5. Update Apr 7. Update Jun 5.
|
||||
|
||||
To support Thai (and other languages) word boundaries, include the ICU
|
||||
library: http://userguide.icu-project.org/boundaryanalysis
|
||||
@@ -482,9 +515,6 @@ Breaks test_eval. Inefficient, can we only compute y_width when needed?
|
||||
Patch to use different terminal mode settings for system(). (Hayaki Saito)
|
||||
Does this work for everybody?
|
||||
|
||||
Patch to fix that wide characters do not work properly after exiting.
|
||||
(Yasuhiro Matsumoto, 2015 May 24) Better patch to come.
|
||||
|
||||
Patch to add wordcount(). Same info as g CTRL-G. (Christian Brabandt, 2015
|
||||
Nov 17)
|
||||
|
||||
@@ -543,12 +573,6 @@ Is this a good solution?
|
||||
|
||||
Patch to add /pattern/ to :oldfiles. Pull #575.
|
||||
|
||||
Patch to allow setting w:quickfix_title via setqflist() and setloclist()
|
||||
functions. (Christian Brabandt, 2013 May 8, update May 21)
|
||||
Patch to add getlocstack() / setlocstack(). (Christian Brabandt, 2013 May 14)
|
||||
Second one. Update May 22.
|
||||
Update by Daniel Hahler, 2014 Jul 4, Aug 14, Oct 14, Oct 15.
|
||||
|
||||
Patch: Let rare word highlighting overrule good word highlighting.
|
||||
(Jakson A. Aquino, 2010 Jul 30, again 2011 Jul 2)
|
||||
|
||||
@@ -564,7 +588,7 @@ Patch for ordered dict. (Ozaki Kiichi, 2015 May 7)
|
||||
Patch to make closed folds line up. (Charles Campbell, 2014 Sep 12)
|
||||
Remark from Roland Eggner: does it cause crashes? (2014 Dec 12)
|
||||
Updated patch by Roland Eggner, Dec 16
|
||||
Updated patch from Charles, 2016 Jan 4.
|
||||
Updated patch from Charles, 2016 Jul 2
|
||||
|
||||
Patch to open folds for 'incsearch'. (Christian Brabandt, 2015 Jan 6)
|
||||
|
||||
@@ -577,7 +601,7 @@ Patch: On MS-Windows shellescape() may have to triple double quotes.
|
||||
(Ingo Karkat, 2015 Jan 16)
|
||||
|
||||
Patch for variable tabstops. On github (Christian Brabandt, 2014 May 15)
|
||||
Update 2016 Jan 31 (email).
|
||||
Update 2016 Jun 10, # 857
|
||||
|
||||
Redo only remembers the last change. Could use "{count}g." to redo an older
|
||||
change. How does the user know which change? At least have a way to list
|
||||
@@ -618,6 +642,9 @@ Spell files use a latin single quote. Unicode also has another single quote:
|
||||
New OpenOffice spell files support this with ICONV. But they are not
|
||||
compatible with Vim spell files. The old files can no longer be downloaded.
|
||||
|
||||
xterm should be able to pass focus changes to Vim, so that Vim can check for
|
||||
buffers that changed. Perhaps in misc.c, function selectwindow().
|
||||
Xterm 224 supports it!
|
||||
Patch to make FocusGained and FocusLost work in modern terminals. (Hayaki
|
||||
Saito, 2013 Apr 24) Has a problem (email 2015 Jan 7).
|
||||
Update 2015 Jan 10.
|
||||
@@ -746,11 +773,6 @@ Patch by Thomas Tuegel, also for GTK, 2013 Nov 24
|
||||
|
||||
:help gives example for z?, but it does not work. m? and t? do work.
|
||||
|
||||
Python: Extended funcrefs: use func_T* structure in place of char_u* function
|
||||
names.
|
||||
(ZyX, 2013 Jul 15, update Sep 22, 24, 28; Update 2013 Dec 15, 2014 Jan 6)
|
||||
Also fixes Bug: E685 error for func_unref(). (ZyX, 2010 Aug 5)
|
||||
|
||||
Patch to add funcref to Lua. (Luis Carvalho, 2013 Sep 4)
|
||||
With tests: Sep 5.
|
||||
|
||||
@@ -828,9 +850,6 @@ May 17: with winlist() and tabpagelist().
|
||||
May 19: with local variables.
|
||||
May 28: with options
|
||||
|
||||
Patch to add getbufinfo(), gettabinfo() and getwininfo(). (Yegappan
|
||||
Lakshmanan, 2016 Apr 2016)
|
||||
|
||||
Patch to support 'u' in interactive substitute. (Christian Brabandt, 2012 Sep
|
||||
28) With tests: Oct 9.
|
||||
|
||||
@@ -869,11 +888,6 @@ In the ATTENTION message about an existing swap file, mention the name of the
|
||||
process that is running. It might actually be some other program, e.g. after
|
||||
a reboot.
|
||||
|
||||
Patch to have text objects defined by arbitrary single characters. (Daniel
|
||||
Thau, 2013 Nov 20, 2014 Jan 29, 2014 Jan 31)
|
||||
Ben Fritz: problem with 'selection' set to "exclusive".
|
||||
Updated to current Vim, not quite right yet. (Ben Fritz, 2014 Mar 27)
|
||||
|
||||
Patch to select the next or previous text object if there isn't one under the
|
||||
cursor. (Daniel Thau, 2013 Nov 20)
|
||||
|
||||
@@ -895,9 +909,6 @@ Patch to make confirm() display colors. (Christian Brabandt, 2012 Nov 9)
|
||||
|
||||
Patch to add functions for signs. (Christian Brabandt, 2013 Jan 27)
|
||||
|
||||
Do we need some way (option) to show the sign column even when there are no
|
||||
signs? Patch by Christian Brabandt, 2013 Aug 22.
|
||||
|
||||
Patch to remove flicker from popup menu. (Yasuhiro Matsumoto, 2013 Aug 15)
|
||||
|
||||
Problem with refresh:always in completion. (Tyler Wade, 2013 Mar 17)
|
||||
@@ -1144,7 +1155,7 @@ Build problem with small features on Mac OS X 10.6. (Rainer, 2011 Jan 24)
|
||||
|
||||
"0g@$" puts '] on last byte of multi-byte. (ZyX, 2011 Jan 22)
|
||||
|
||||
Patch to addd TextDeletePost and TextYankPost events. (Philippe Vaucher, 2011
|
||||
Patch to add TextDeletePost and TextYankPost events. (Philippe Vaucher, 2011
|
||||
May 24) Update May 26.
|
||||
|
||||
Patch for :tabrecently. (Hirokazu Yoshida, 2012 Jan 30)
|
||||
@@ -1316,12 +1327,6 @@ Gui menu edit/paste in block mode insert only inserts in one line (Bjorn
|
||||
Winckler, 2011 May 11)
|
||||
Requires a map mode for Insert mode started from blockwise Visual mode.
|
||||
|
||||
Use json format for new items in .viminfo:
|
||||
|["info","any info"]
|
||||
|["text","text text text"
|
||||
|"continuation line"]
|
||||
|["hist",242342342,{"arg":"value"}]
|
||||
|
||||
Writing nested List and Dict in viminfo gives error message and can't be read
|
||||
back. (Yukihiro Nakadaira, 2010 Nov 13)
|
||||
|
||||
@@ -2274,10 +2279,6 @@ Patch for adding ":lscscope". (Navdeep Parhar, 2007 Apr 26; update 2008 Apr
|
||||
tabs and the autocommand "autocmd BufWinLeave * mkview". (James Vega, 2007
|
||||
Jun 18)
|
||||
|
||||
xterm should be able to pass focus changes to Vim, so that Vim can check for
|
||||
buffers that changed. Perhaps in misc.c, function selectwindow().
|
||||
Xterm 224 supports it!
|
||||
|
||||
When completing from another file that uses a different encoding completion
|
||||
text has the wrong encoding. E.g., when 'encoding' is utf-8 and file is
|
||||
latin1. Example from Gombault Damien, 2007 Mar 24.
|
||||
@@ -3565,8 +3566,6 @@ Multi-byte characters:
|
||||
convert_input() for Mac GUI.
|
||||
- Add mnemonics from RFC1345 longer than two characters.
|
||||
Support CTRL-K _{mnemonic}_
|
||||
7 In "-- INSERT (lang) --" show the name of the keymap used instead of
|
||||
"lang". (Ilya Dogolazky)
|
||||
- Make 'breakat' accept multi-byte characters. Problem: can't use a lookup
|
||||
table anymore (breakat_flags[]).
|
||||
Simplistic solution: when 'formatoptions' contains "m" also break a line
|
||||
@@ -3845,7 +3844,7 @@ Vim script language:
|
||||
8 Pass the command line arguments to Vim scripts in some way. As v:args
|
||||
List? Or extra parameter to argv()?
|
||||
8 Add command arguments with three dashes, passed on to Vim scripts.
|
||||
7 Add optional arguments to user functions:
|
||||
9 Add optional arguments to user functions:
|
||||
:func myFunc(arg1, arg2, arg3 = "blah", arg4 = 17)
|
||||
6 User functions: Functions local to buffer "b:func()"?
|
||||
8 For Strings add ":let var[{expr}] = {expr}". When past the end of "var"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 7.4. Last change: 2016 Jun 04
|
||||
*usr_41.txt* For Vim version 7.4. Last change: 2016 Jul 24
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -592,7 +592,7 @@ String manipulation: *string-functions*
|
||||
match() position where a pattern matches in a string
|
||||
matchend() position where a pattern match ends in a string
|
||||
matchstr() match of a pattern in a string
|
||||
matchstrpos() match and postions of a pattern in a string
|
||||
matchstrpos() match and positions of a pattern in a string
|
||||
matchlist() like matchstr() and also return submatches
|
||||
stridx() first index of a short string in a long string
|
||||
strridx() last index of a short string in a long string
|
||||
@@ -602,13 +602,16 @@ String manipulation: *string-functions*
|
||||
strdisplaywidth() size of string when displayed, deals with tabs
|
||||
substitute() substitute a pattern match with a string
|
||||
submatch() get a specific match in ":s" and substitute()
|
||||
strpart() get part of a string
|
||||
strpart() get part of a string using byte index
|
||||
strcharpart() get part of a string using char index
|
||||
strgetchar() get character from a string using char index
|
||||
expand() expand special keywords
|
||||
iconv() convert text from one encoding to another
|
||||
byteidx() byte index of a character in a string
|
||||
byteidxcomp() like byteidx() but count composing characters
|
||||
repeat() repeat a string multiple times
|
||||
eval() evaluate a string expression
|
||||
execute() execute an Ex command and get the output
|
||||
|
||||
List manipulation: *list-functions*
|
||||
get() get an item without error for wrong index
|
||||
@@ -678,6 +681,7 @@ Floating point computation: *float-functions*
|
||||
sinh() hyperbolic sine
|
||||
cosh() hyperbolic cosine
|
||||
tanh() hyperbolic tangent
|
||||
isnan() check for not a number
|
||||
|
||||
Other computation: *bitwise-function*
|
||||
and() bitwise AND
|
||||
@@ -732,11 +736,14 @@ Working with text in the current buffer: *text-functions*
|
||||
searchpair() find the other end of a start/skip/end
|
||||
searchpairpos() find the other end of a start/skip/end
|
||||
searchdecl() search for the declaration of a name
|
||||
getcharsearch() return character search information
|
||||
setcharsearch() set character search information
|
||||
|
||||
*system-functions* *file-functions*
|
||||
System functions and manipulation of files:
|
||||
glob() expand wildcards
|
||||
globpath() expand wildcards in a number of directories
|
||||
glob2regpat() convert a glob pattern into a search pattern
|
||||
findfile() find a file in a list of directories
|
||||
finddir() find a directory in a list of directories
|
||||
resolve() find out where a shortcut points to
|
||||
@@ -748,6 +755,7 @@ System functions and manipulation of files:
|
||||
filereadable() check if a file can be read
|
||||
filewritable() check if a file can be written to
|
||||
getfperm() get the permissions of a file
|
||||
setfperm() set the permissions of a file
|
||||
getftype() get the kind of a file
|
||||
isdirectory() check if a directory exists
|
||||
getfsize() get the size of a file
|
||||
@@ -790,6 +798,11 @@ Buffers, windows and the argument list:
|
||||
bufwinnr() get the window number of a specific buffer
|
||||
winbufnr() get the buffer number of a specific window
|
||||
getbufline() get a list of lines from the specified buffer
|
||||
win_findbuf() find windows containing a buffer
|
||||
win_getid() get window ID of a window
|
||||
win_gotoid() go to window with ID
|
||||
win_id2tabwin() get tab and window nr from window ID
|
||||
win_id2win() get window nr from window ID
|
||||
|
||||
Command line: *command-line-functions*
|
||||
getcmdline() get the current command line
|
||||
@@ -797,6 +810,7 @@ Command line: *command-line-functions*
|
||||
setcmdpos() set position of the cursor in the command line
|
||||
getcmdtype() return the current command-line type
|
||||
getcmdwintype() return the current command-line window type
|
||||
getcompletion() list of command-line completion matches
|
||||
|
||||
Quickfix and location lists: *quickfix-functions*
|
||||
getqflist() list of quickfix errors
|
||||
@@ -894,20 +908,56 @@ Mappings: *mapping-functions*
|
||||
Testing: *test-functions*
|
||||
assert_equal() assert that two expressions values are equal
|
||||
assert_notequal() assert that two expressions values are not equal
|
||||
assert_inrange() assert that an expression is inside a range
|
||||
assert_match() assert that a pattern matches the value
|
||||
assert_notmatch() assert that a pattern does not match the value
|
||||
assert_false() assert that an expression is false
|
||||
assert_true() assert that an expression is true
|
||||
assert_exception() assert that a command throws an exception
|
||||
assert_fails() assert that a function call fails
|
||||
test_alloc_fail() make memory allocation fail
|
||||
test_autochdir() enable 'autochdir' during startup
|
||||
test_disable_char_avail() test without typeahead
|
||||
test_garbagecollect_now() free memory right now
|
||||
test_null_channel() return a null Channel
|
||||
test_null_dict() return a null Dict
|
||||
test_null_job() return a null Job
|
||||
test_null_list() return a null List
|
||||
test_null_partial() return a null Partial function
|
||||
test_null_string() return a null String
|
||||
|
||||
Inter-process communication:
|
||||
Inter-process communication: *channel-functions*
|
||||
ch_open() open a channel
|
||||
ch_close() close a channel
|
||||
ch_read() read a message from a channel
|
||||
ch_readraw() read a raw message from a channel
|
||||
ch_sendexpr() send a JSON message over a channel
|
||||
ch_sendraw() send a raw message over a channel
|
||||
jsonencode() encode an expression to a JSON string
|
||||
jsondecode() decode a JSON string to Vim types
|
||||
ch_evalexpr() evaluates an expression over channel
|
||||
ch_evalraw() evaluates a raw string over channel
|
||||
ch_status() get status of a channel
|
||||
ch_getbufnr() get the buffer number of a channel
|
||||
ch_getjob() get the job associated with a channel
|
||||
ch_info() get channel information
|
||||
ch_log() write a message in the channel log file
|
||||
ch_logfile() set the channel log file
|
||||
ch_setoptions() set the options for a channel
|
||||
json_encode() encode an expression to a JSON string
|
||||
json_decode() decode a JSON string to Vim types
|
||||
js_encode() encode an expression to a JSON string
|
||||
js_decode() decode a JSON string to Vim types
|
||||
|
||||
Jobs: *job-functions*
|
||||
job_start() start a job
|
||||
job_stop() stop a job
|
||||
job_status() get the status of a job
|
||||
job_getchannel() get the channel used by a job
|
||||
job_info() get information about a job
|
||||
job_setoptions() set options for a job
|
||||
|
||||
Timers: *timer-functions*
|
||||
timer_start() create a timer
|
||||
timer_stop() stop a timer
|
||||
|
||||
Various: *various-functions*
|
||||
mode() get current editing mode
|
||||
@@ -932,6 +982,8 @@ Various: *various-functions*
|
||||
|
||||
shiftwidth() effective value of 'shiftwidth'
|
||||
|
||||
wordcount() get byte/word/char count of buffer
|
||||
|
||||
taglist() get list of matching tags
|
||||
tagfiles() get a list of tags files
|
||||
|
||||
@@ -940,7 +992,6 @@ Various: *various-functions*
|
||||
perleval() evaluate Perl expression (|+perl|)
|
||||
py3eval() evaluate Python expression (|+python3|)
|
||||
pyeval() evaluate Python expression (|+python|)
|
||||
wordcount() get byte/word/char count of buffer
|
||||
|
||||
==============================================================================
|
||||
*41.7* Defining a function
|
||||
@@ -1408,9 +1459,9 @@ Now we can instantiate a Dutch translation object: >
|
||||
And a German translator: >
|
||||
|
||||
:let uk2de = copy(transdict)
|
||||
:let uk2de.words = {'one': 'ein', 'two': 'zwei', 'three': 'drei'}
|
||||
:let uk2de.words = {'one': 'eins', 'two': 'zwei', 'three': 'drei'}
|
||||
:echo uk2de.translate('three one')
|
||||
< drei ein ~
|
||||
< drei eins ~
|
||||
|
||||
You see that the copy() function is used to make a copy of the "transdict"
|
||||
Dictionary and then the copy is changed to add the words. The original
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*various.txt* For Vim version 7.4. Last change: 2016 May 24
|
||||
*various.txt* For Vim version 7.4. Last change: 2016 Jul 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -361,6 +361,7 @@ N *+insert_expand* |insert_expand| Insert mode completion
|
||||
m *+job* starting and stopping jobs |job|
|
||||
N *+jumplist* |jumplist|
|
||||
B *+keymap* |'keymap'|
|
||||
N *+lambda* |lambda| and |closure|
|
||||
B *+langmap* |'langmap'|
|
||||
N *+libcall* |libcall()|
|
||||
N *+linebreak* |'linebreak'|, |'breakat'| and |'showbreak'|
|
||||
@@ -390,6 +391,7 @@ N *+multi_lang* non-English language support |multi-lang|
|
||||
m *+mzscheme* Mzscheme interface |mzscheme|
|
||||
m *+mzscheme/dyn* Mzscheme interface |mzscheme-dynamic| |/dyn|
|
||||
m *+netbeans_intg* |netbeans|
|
||||
*+num64* 64-bit Number support |Number|
|
||||
m *+ole* Win32 GUI only: |ole-interface|
|
||||
N *+packages* Loading |packages|
|
||||
N *+path_extra* Up/downwards search in 'path' and 'tags'
|
||||
@@ -469,9 +471,12 @@ N *+X11* Unix only: can restore window title |X11|
|
||||
shown on the screen. When [!] is included, an
|
||||
existing file is overwritten. When [!] is omitted,
|
||||
and {file} exists, this command fails.
|
||||
|
||||
Only one ":redir" can be active at a time. Calls to
|
||||
":redir" will close any active redirection before
|
||||
starting redirection to the new target.
|
||||
starting redirection to the new target. For recursive
|
||||
use check out |execute()|.
|
||||
|
||||
To stop the messages and commands from being echoed to
|
||||
the screen, put the commands in a function and call it
|
||||
with ":silent call Function()".
|
||||
@@ -511,6 +516,8 @@ N *+X11* Unix only: can restore window title |X11|
|
||||
redirection starts, if the variable is removed or
|
||||
locked or the variable type is changed, then further
|
||||
command output messages will cause errors. {not in Vi}
|
||||
To get the output of one command the |execute()|
|
||||
function can be used.
|
||||
|
||||
:redi[r] =>> {var} Append messages to an existing variable. Only string
|
||||
variables can be used. {not in Vi}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version7.txt* For Vim version 7.4. Last change: 2016 Jun 04
|
||||
*version7.txt* For Vim version 7.4. Last change: 2016 Jul 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -18308,4 +18308,5 @@ Solution: Subtract the unsigned numbers and cast to int. (Ken Takata)
|
||||
Files: src/os_win32.c
|
||||
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
12355
runtime/doc/version8.txt
12355
runtime/doc/version8.txt
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 7.4. Last change: 2016 Feb 01
|
||||
*windows.txt* For Vim version 7.4. Last change: 2016 Jul 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -76,6 +76,16 @@ places where a Normal mode command can't be used or is inconvenient.
|
||||
The main Vim window can hold several split windows. There are also tab pages
|
||||
|tab-page|, each of which can hold multiple windows.
|
||||
|
||||
Each window has a unique identifier called the window ID. This identifier
|
||||
will not change within a Vim session. The |win_getid()| and |win_id2tabwin()|
|
||||
functions can be used to convert between the window/tab number and the
|
||||
identifier. There is also the window number, which may change whenever
|
||||
windows are opened or closed, see |winnr()|.
|
||||
|
||||
Each buffer has a unique number and the number will not change within a Vim
|
||||
session. The |bufnr()| and |bufname()| functions can be used to convert
|
||||
between a buffer name and the buffer number.
|
||||
|
||||
==============================================================================
|
||||
2. Starting Vim *windows-starting*
|
||||
|
||||
@@ -245,7 +255,7 @@ window will appear.
|
||||
far left and occupies the full height of the Vim window.
|
||||
Doesn't work for |:execute| and |:normal|.
|
||||
|
||||
*:botright*
|
||||
*:bo* *:botright*
|
||||
:bo[tright] {cmd}
|
||||
Execute {cmd}. If it contains a command that splits a window,
|
||||
it will appear at the bottom and occupy the full width of the
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim script for Evim key bindings
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2006 Mar 29
|
||||
" Last Change: 2016 Jul 24
|
||||
|
||||
" Don't use Vi-compatible mode.
|
||||
set nocompatible
|
||||
@@ -63,4 +63,12 @@ if has("autocmd")
|
||||
|
||||
endif " has("autocmd")
|
||||
|
||||
" Add optional packages.
|
||||
"
|
||||
" The matchit plugin makes the % command work better, but it is not backwards
|
||||
" compatible.
|
||||
if has('syntax') && has('eval')
|
||||
packadd matchit
|
||||
endif
|
||||
|
||||
" vim: set sw=2 :
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2016 Apr 29
|
||||
" Last Change: 2016 Jul 21
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -534,7 +534,7 @@ au BufNewFile,BufRead configure.in,configure.ac setf config
|
||||
au BufNewFile,BufRead *.cu setf cuda
|
||||
|
||||
" Dockerfile
|
||||
au BufNewFile,BufRead Dockerfile setf dockerfile
|
||||
au BufNewFile,BufRead Dockerfile,*.Dockerfile setf dockerfile
|
||||
|
||||
" WildPackets EtherPeek Decoder
|
||||
au BufNewFile,BufRead *.dcd setf dcd
|
||||
@@ -1019,7 +1019,7 @@ au BufNewFile,BufRead *.jgr setf jgraph
|
||||
au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial
|
||||
|
||||
" JSON
|
||||
au BufNewFile,BufRead *.json,*.jsonp setf json
|
||||
au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json
|
||||
|
||||
" Kixtart
|
||||
au BufNewFile,BufRead *.kix setf kix
|
||||
@@ -1621,11 +1621,9 @@ au BufNewFile,BufRead */etc/protocols setf protocols
|
||||
" Pyrex
|
||||
au BufNewFile,BufRead *.pyx,*.pxd setf pyrex
|
||||
|
||||
" Python
|
||||
au BufNewFile,BufRead *.py,*.pyw setf python
|
||||
|
||||
" Python, Python Shell Startup Files
|
||||
" Quixote (Python-based web framework)
|
||||
au BufNewFile,BufRead *.ptl setf python
|
||||
au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc,*.ptl setf python
|
||||
|
||||
" Radiance
|
||||
au BufNewFile,BufRead *.rad,*.mat setf radiance
|
||||
@@ -2645,6 +2643,8 @@ au BufNewFile,BufRead [rR]akefile* call s:StarSetf('ruby')
|
||||
" Mail (also matches muttrc.vim, so this is below the other checks)
|
||||
au BufNewFile,BufRead mutt[[:alnum:]._-]\\\{6\} setf mail
|
||||
|
||||
au BufNewFile,BufRead reportbug-* call s:StarSetf('mail')
|
||||
|
||||
" Modconf
|
||||
au BufNewFile,BufRead */etc/modutils/*
|
||||
\ if executable(expand("<afile>")) != 1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2012 Jul 10
|
||||
" Last Change: 2016 Jun 12
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -37,7 +37,7 @@ endif
|
||||
" When the matchit plugin is loaded, this makes the % command skip parens and
|
||||
" braces in comments.
|
||||
let b:match_words = &matchpairs . ',^\s*#\s*if\(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>'
|
||||
let b:match_skip = 's:comment\|string\|character'
|
||||
let b:match_skip = 's:comment\|string\|character\|special'
|
||||
|
||||
" Win32 can filter files in the browse dialog
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Clojure
|
||||
" Author: Meikel Brandmeyer <mb@kotka.de>
|
||||
" Language: Clojure
|
||||
" Author: Meikel Brandmeyer <mb@kotka.de>
|
||||
"
|
||||
" Maintainer: Sung Pae <self@sungpae.com>
|
||||
" URL: https://github.com/guns/vim-clojure-static
|
||||
" License: Same as Vim
|
||||
" Last Change: 27 March 2014
|
||||
" Maintainer: Sung Pae <self@sungpae.com>
|
||||
" URL: https://github.com/guns/vim-clojure-static
|
||||
" License: Same as Vim
|
||||
" Last Change: 18 July 2016
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -43,7 +43,7 @@ setlocal commentstring=;\ %s
|
||||
" specially and hence are not indented specially.
|
||||
"
|
||||
" -*- LISPWORDS -*-
|
||||
" Generated from https://github.com/guns/vim-clojure-static/blob/vim-release-010/clj/src/vim_clojure_static/generate.clj
|
||||
" Generated from https://github.com/guns/vim-clojure-static/blob/vim-release-011/clj/src/vim_clojure_static/generate.clj
|
||||
setlocal lispwords=as->,binding,bound-fn,case,catch,cond->,cond->>,condp,def,definline,definterface,defmacro,defmethod,defmulti,defn,defn-,defonce,defprotocol,defrecord,defstruct,deftest,deftest-,deftype,doseq,dotimes,doto,extend,extend-protocol,extend-type,fn,for,if,if-let,if-not,if-some,let,letfn,locking,loop,ns,proxy,reify,set-test,testing,when,when-first,when-let,when-not,when-some,while,with-bindings,with-in-str,with-local-vars,with-open,with-precision,with-redefs,with-redefs-fn,with-test
|
||||
|
||||
" Provide insert mode completions for special forms and clojure.core. As
|
||||
@@ -82,9 +82,9 @@ endif
|
||||
" Win32 can filter files in the browse dialog
|
||||
if has("gui_win32") && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Clojure Source Files (*.clj)\t*.clj\n" .
|
||||
\ "ClojureScript Source Files (*.cljs)\t*.cljs\n" .
|
||||
\ "Java Source Files (*.java)\t*.java\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
\ "ClojureScript Source Files (*.cljs)\t*.cljs\n" .
|
||||
\ "Java Source Files (*.java)\t*.java\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
let b:undo_ftplugin .= ' | unlet! b:browsefilter'
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: man
|
||||
" Maintainer: SungHyun Nam <goweol@gmail.com>
|
||||
" Last Change: 2016 Feb 04
|
||||
" Last Change: 2016 Jun 20
|
||||
|
||||
" To make the ":Man" command available before editing a manual page, source
|
||||
" this script from your startup vimrc file.
|
||||
@@ -150,7 +150,17 @@ func <SID>GetPage(...)
|
||||
endwhile
|
||||
endif
|
||||
if &filetype != "man"
|
||||
new
|
||||
if exists("g:ft_man_open_mode")
|
||||
if g:ft_man_open_mode == "vert"
|
||||
vnew
|
||||
elseif g:ft_man_open_mode == "tab"
|
||||
tabnew
|
||||
else
|
||||
new
|
||||
endif
|
||||
else
|
||||
new
|
||||
endif
|
||||
setl nonu fdc=0
|
||||
endif
|
||||
endif
|
||||
@@ -160,10 +170,15 @@ func <SID>GetPage(...)
|
||||
|
||||
setl ma nonu nornu nofen
|
||||
silent exec "norm 1GdG"
|
||||
let unsetwidth = 0
|
||||
if empty($MANWIDTH)
|
||||
let $MANWIDTH = winwidth(0)
|
||||
let unsetwidth = 1
|
||||
endif
|
||||
silent exec "r!/usr/bin/man ".s:GetCmdArg(sect, page)." | col -b"
|
||||
if unsetwidth
|
||||
let $MANWIDTH = ''
|
||||
endif
|
||||
" Remove blank lines from top and bottom.
|
||||
while getline(1) =~ '^\s*$'
|
||||
silent keepj norm ggdd
|
||||
@@ -175,6 +190,7 @@ func <SID>GetPage(...)
|
||||
setl ft=man nomod
|
||||
setl bufhidden=hide
|
||||
setl nobuflisted
|
||||
setl noma
|
||||
endfunc
|
||||
|
||||
func <SID>PopPage()
|
||||
@@ -195,4 +211,4 @@ endfunc
|
||||
|
||||
endif
|
||||
|
||||
" vim: set sw=2:
|
||||
" vim: set sw=2 ts=8 noet:
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: python
|
||||
" Maintainer: Johannes Zellner <johannes@zellner.org>
|
||||
" Last Change: 2014 Feb 09
|
||||
" Last Change By Johannes: Wed, 21 Apr 2004 13:13:08 CEST
|
||||
" Maintainer: James Sully <sullyj3@gmail.com>
|
||||
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
|
||||
" Last Change: Wed, 29 June 2016
|
||||
" https://github.com/sullyj3/vim-ftplugin-python
|
||||
|
||||
if exists("b:did_ftplugin") | finish | endif
|
||||
let b:did_ftplugin = 1
|
||||
@@ -21,28 +22,38 @@ setlocal omnifunc=pythoncomplete#Complete
|
||||
|
||||
set wildignore+=*.pyc
|
||||
|
||||
nnoremap <silent> <buffer> ]] :call <SID>Python_jump('/^\(class\\|def\)')<cr>
|
||||
nnoremap <silent> <buffer> [[ :call <SID>Python_jump('?^\(class\\|def\)')<cr>
|
||||
nnoremap <silent> <buffer> ]m :call <SID>Python_jump('/^\s*\(class\\|def\)')<cr>
|
||||
nnoremap <silent> <buffer> [m :call <SID>Python_jump('?^\s*\(class\\|def\)')<cr>
|
||||
nnoremap <silent> <buffer> ]] :call <SID>Python_jump('n', '\v%$\|^(class\|def)>', 'W')<cr>
|
||||
nnoremap <silent> <buffer> [[ :call <SID>Python_jump('n', '\v^(class\|def)>', 'Wb')<cr>
|
||||
nnoremap <silent> <buffer> ]m :call <SID>Python_jump('n', '\v%$\|^\s*(class\|def)>', 'W')<cr>
|
||||
nnoremap <silent> <buffer> [m :call <SID>Python_jump('n', '\v^\s*(class\|def)>', 'Wb')<cr>
|
||||
|
||||
xnoremap <silent> <buffer> ]] :call <SID>Python_jump('x', '\v%$\|^(class\|def)>', 'W')<cr>
|
||||
xnoremap <silent> <buffer> [[ :call <SID>Python_jump('x', '\v^(class\|def)>', 'Wb')<cr>
|
||||
xnoremap <silent> <buffer> ]m :call <SID>Python_jump('x', '\v%$\|^\s*(class\|def)>', 'W')<cr>
|
||||
xnoremap <silent> <buffer> [m :call <SID>Python_jump('x', '\v^\s*(class\|def)>', 'Wb')<cr>
|
||||
|
||||
if !exists('*<SID>Python_jump')
|
||||
fun! <SID>Python_jump(motion) range
|
||||
fun! <SID>Python_jump(mode, motion, flags) range
|
||||
if a:mode == 'x'
|
||||
normal! gv
|
||||
endif
|
||||
|
||||
normal! 0
|
||||
|
||||
let cnt = v:count1
|
||||
let save = @/ " save last search pattern
|
||||
mark '
|
||||
while cnt > 0
|
||||
silent! exe a:motion
|
||||
let cnt = cnt - 1
|
||||
call search(a:motion, a:flags)
|
||||
let cnt = cnt - 1
|
||||
endwhile
|
||||
call histdel('/', -1)
|
||||
let @/ = save " restore last search pattern
|
||||
|
||||
normal! ^
|
||||
endfun
|
||||
endif
|
||||
|
||||
if has("browsefilter") && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Python Files (*.py)\t*.py\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
" As suggested by PEP8.
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
" Vim indent file
|
||||
" Language: Clojure
|
||||
" Author: Meikel Brandmeyer <mb@kotka.de>
|
||||
" URL: http://kotka.de/projects/clojure/vimclojure.html
|
||||
" Language: Clojure
|
||||
" Author: Meikel Brandmeyer <mb@kotka.de>
|
||||
" URL: http://kotka.de/projects/clojure/vimclojure.html
|
||||
"
|
||||
" Maintainer: Sung Pae <self@sungpae.com>
|
||||
" URL: https://github.com/guns/vim-clojure-static
|
||||
" License: Same as Vim
|
||||
" Last Change: 27 March 2014
|
||||
|
||||
" TODO: Indenting after multibyte characters is broken:
|
||||
" (let [Δ (if foo
|
||||
" bar ; Indent error
|
||||
" baz)])
|
||||
" Maintainer: Sung Pae <self@sungpae.com>
|
||||
" URL: https://github.com/guns/vim-clojure-static
|
||||
" License: Same as Vim
|
||||
" Last Change: 18 July 2016
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@@ -57,36 +52,39 @@ if exists("*searchpairpos")
|
||||
let g:clojure_align_subforms = 0
|
||||
endif
|
||||
|
||||
function! s:SynIdName()
|
||||
function! s:syn_id_name()
|
||||
return synIDattr(synID(line("."), col("."), 0), "name")
|
||||
endfunction
|
||||
|
||||
function! s:CurrentChar()
|
||||
function! s:ignored_region()
|
||||
return s:syn_id_name() =~? '\vstring|regex|comment|character'
|
||||
endfunction
|
||||
|
||||
function! s:current_char()
|
||||
return getline('.')[col('.')-1]
|
||||
endfunction
|
||||
|
||||
function! s:CurrentWord()
|
||||
function! s:current_word()
|
||||
return getline('.')[col('.')-1 : searchpos('\v>', 'n', line('.'))[1]-2]
|
||||
endfunction
|
||||
|
||||
function! s:IsParen()
|
||||
return s:CurrentChar() =~# '\v[\(\)\[\]\{\}]' &&
|
||||
\ s:SynIdName() !~? '\vstring|regex|comment|character'
|
||||
function! s:is_paren()
|
||||
return s:current_char() =~# '\v[\(\)\[\]\{\}]' && !s:ignored_region()
|
||||
endfunction
|
||||
|
||||
" Returns 1 if string matches a pattern in 'patterns', which may be a
|
||||
" list of patterns, or a comma-delimited string of implicitly anchored
|
||||
" patterns.
|
||||
function! s:MatchesOne(patterns, string)
|
||||
function! s:match_one(patterns, string)
|
||||
let list = type(a:patterns) == type([])
|
||||
\ ? a:patterns
|
||||
\ : map(split(a:patterns, ','), '"^" . v:val . "$"')
|
||||
\ ? a:patterns
|
||||
\ : map(split(a:patterns, ','), '"^" . v:val . "$"')
|
||||
for pat in list
|
||||
if a:string =~# pat | return 1 | endif
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
function! s:MatchPairs(open, close, stopat)
|
||||
function! s:match_pairs(open, close, stopat)
|
||||
" Stop only on vector and map [ resp. {. Ignore the ones in strings and
|
||||
" comments.
|
||||
if a:stopat == 0
|
||||
@@ -95,11 +93,11 @@ if exists("*searchpairpos")
|
||||
let stopat = a:stopat
|
||||
endif
|
||||
|
||||
let pos = searchpairpos(a:open, '', a:close, 'bWn', "!s:IsParen()", stopat)
|
||||
return [pos[0], virtcol(pos)]
|
||||
let pos = searchpairpos(a:open, '', a:close, 'bWn', "!s:is_paren()", stopat)
|
||||
return [pos[0], col(pos)]
|
||||
endfunction
|
||||
|
||||
function! s:ClojureCheckForStringWorker()
|
||||
function! s:clojure_check_for_string_worker()
|
||||
" Check whether there is the last character of the previous line is
|
||||
" highlighted as a string. If so, we check whether it's a ". In this
|
||||
" case we have to check also the previous character. The " might be the
|
||||
@@ -113,17 +111,17 @@ if exists("*searchpairpos")
|
||||
|
||||
call cursor(nb, 0)
|
||||
call cursor(0, col("$") - 1)
|
||||
if s:SynIdName() !~? "string"
|
||||
if s:syn_id_name() !~? "string"
|
||||
return -1
|
||||
endif
|
||||
|
||||
" This will not work for a " in the first column...
|
||||
if s:CurrentChar() == '"'
|
||||
if s:current_char() == '"'
|
||||
call cursor(0, col("$") - 2)
|
||||
if s:SynIdName() !~? "string"
|
||||
if s:syn_id_name() !~? "string"
|
||||
return -1
|
||||
endif
|
||||
if s:CurrentChar() != '\\'
|
||||
if s:current_char() != '\\'
|
||||
return -1
|
||||
endif
|
||||
call cursor(0, col("$") - 1)
|
||||
@@ -138,40 +136,40 @@ if exists("*searchpairpos")
|
||||
return indent(".")
|
||||
endfunction
|
||||
|
||||
function! s:CheckForString()
|
||||
function! s:check_for_string()
|
||||
let pos = getpos('.')
|
||||
try
|
||||
let val = s:ClojureCheckForStringWorker()
|
||||
let val = s:clojure_check_for_string_worker()
|
||||
finally
|
||||
call setpos('.', pos)
|
||||
endtry
|
||||
return val
|
||||
endfunction
|
||||
|
||||
function! s:StripNamespaceAndMacroChars(word)
|
||||
function! s:strip_namespace_and_macro_chars(word)
|
||||
return substitute(a:word, "\\v%(.*/|[#'`~@^,]*)(.*)", '\1', '')
|
||||
endfunction
|
||||
|
||||
function! s:ClojureIsMethodSpecialCaseWorker(position)
|
||||
function! s:clojure_is_method_special_case_worker(position)
|
||||
" Find the next enclosing form.
|
||||
call search('\S', 'Wb')
|
||||
|
||||
" Special case: we are at a '(('.
|
||||
if s:CurrentChar() == '('
|
||||
if s:current_char() == '('
|
||||
return 0
|
||||
endif
|
||||
call cursor(a:position)
|
||||
|
||||
let nextParen = s:MatchPairs('(', ')', 0)
|
||||
let next_paren = s:match_pairs('(', ')', 0)
|
||||
|
||||
" Special case: we are now at toplevel.
|
||||
if nextParen == [0, 0]
|
||||
if next_paren == [0, 0]
|
||||
return 0
|
||||
endif
|
||||
call cursor(nextParen)
|
||||
call cursor(next_paren)
|
||||
|
||||
call search('\S', 'W')
|
||||
let w = s:StripNamespaceAndMacroChars(s:CurrentWord())
|
||||
let w = s:strip_namespace_and_macro_chars(s:current_word())
|
||||
if g:clojure_special_indent_words =~# '\V\<' . w . '\>'
|
||||
return 1
|
||||
endif
|
||||
@@ -179,27 +177,43 @@ if exists("*searchpairpos")
|
||||
return 0
|
||||
endfunction
|
||||
|
||||
function! s:IsMethodSpecialCase(position)
|
||||
function! s:is_method_special_case(position)
|
||||
let pos = getpos('.')
|
||||
try
|
||||
let val = s:ClojureIsMethodSpecialCaseWorker(a:position)
|
||||
let val = s:clojure_is_method_special_case_worker(a:position)
|
||||
finally
|
||||
call setpos('.', pos)
|
||||
endtry
|
||||
return val
|
||||
endfunction
|
||||
|
||||
function! GetClojureIndent()
|
||||
" Check if form is a reader conditional, that is, it is prefixed by #?
|
||||
" or @#?
|
||||
function! s:is_reader_conditional_special_case(position)
|
||||
if getline(a:position[0])[a:position[1] - 3 : a:position[1] - 2] == "#?"
|
||||
return 1
|
||||
endif
|
||||
|
||||
return 0
|
||||
endfunction
|
||||
|
||||
" Returns 1 for opening brackets, -1 for _anything else_.
|
||||
function! s:bracket_type(char)
|
||||
return stridx('([{', a:char) > -1 ? 1 : -1
|
||||
endfunction
|
||||
|
||||
" Returns: [opening-bracket-lnum, indent]
|
||||
function! s:clojure_indent_pos()
|
||||
" Get rid of special case.
|
||||
if line(".") == 1
|
||||
return 0
|
||||
return [0, 0]
|
||||
endif
|
||||
|
||||
" We have to apply some heuristics here to figure out, whether to use
|
||||
" normal lisp indenting or not.
|
||||
let i = s:CheckForString()
|
||||
let i = s:check_for_string()
|
||||
if i > -1
|
||||
return i + !!g:clojure_align_multiline_strings
|
||||
return [0, i + !!g:clojure_align_multiline_strings]
|
||||
endif
|
||||
|
||||
call cursor(0, 1)
|
||||
@@ -207,28 +221,28 @@ if exists("*searchpairpos")
|
||||
" Find the next enclosing [ or {. We can limit the second search
|
||||
" to the line, where the [ was found. If no [ was there this is
|
||||
" zero and we search for an enclosing {.
|
||||
let paren = s:MatchPairs('(', ')', 0)
|
||||
let bracket = s:MatchPairs('\[', '\]', paren[0])
|
||||
let curly = s:MatchPairs('{', '}', bracket[0])
|
||||
let paren = s:match_pairs('(', ')', 0)
|
||||
let bracket = s:match_pairs('\[', '\]', paren[0])
|
||||
let curly = s:match_pairs('{', '}', bracket[0])
|
||||
|
||||
" In case the curly brace is on a line later then the [ or - in
|
||||
" case they are on the same line - in a higher column, we take the
|
||||
" curly indent.
|
||||
if curly[0] > bracket[0] || curly[1] > bracket[1]
|
||||
if curly[0] > paren[0] || curly[1] > paren[1]
|
||||
return curly[1]
|
||||
return curly
|
||||
endif
|
||||
endif
|
||||
|
||||
" If the curly was not chosen, we take the bracket indent - if
|
||||
" there was one.
|
||||
if bracket[0] > paren[0] || bracket[1] > paren[1]
|
||||
return bracket[1]
|
||||
return bracket
|
||||
endif
|
||||
|
||||
" There are neither { nor [ nor (, ie. we are at the toplevel.
|
||||
if paren == [0, 0]
|
||||
return 0
|
||||
return paren
|
||||
endif
|
||||
|
||||
" Now we have to reimplement lispindent. This is surprisingly easy, as
|
||||
@@ -246,58 +260,120 @@ if exists("*searchpairpos")
|
||||
" - In any other case we use the column of the end of the word + 2.
|
||||
call cursor(paren)
|
||||
|
||||
if s:IsMethodSpecialCase(paren)
|
||||
return paren[1] + &shiftwidth - 1
|
||||
if s:is_method_special_case(paren)
|
||||
return [paren[0], paren[1] + &shiftwidth - 1]
|
||||
endif
|
||||
|
||||
if s:is_reader_conditional_special_case(paren)
|
||||
return paren
|
||||
endif
|
||||
|
||||
" In case we are at the last character, we use the paren position.
|
||||
if col("$") - 1 == paren[1]
|
||||
return paren[1]
|
||||
return paren
|
||||
endif
|
||||
|
||||
" In case after the paren is a whitespace, we search for the next word.
|
||||
call cursor(0, col('.') + 1)
|
||||
if s:CurrentChar() == ' '
|
||||
if s:current_char() == ' '
|
||||
call search('\v\S', 'W')
|
||||
endif
|
||||
|
||||
" If we moved to another line, there is no word after the (. We
|
||||
" use the ( position for indent.
|
||||
if line(".") > paren[0]
|
||||
return paren[1]
|
||||
return paren
|
||||
endif
|
||||
|
||||
" We still have to check, whether the keyword starts with a (, [ or {.
|
||||
" In that case we use the ( position for indent.
|
||||
let w = s:CurrentWord()
|
||||
if stridx('([{', w[0]) > -1
|
||||
return paren[1]
|
||||
let w = s:current_word()
|
||||
if s:bracket_type(w[0]) == 1
|
||||
return paren
|
||||
endif
|
||||
|
||||
" Test words without namespace qualifiers and leading reader macro
|
||||
" metacharacters.
|
||||
"
|
||||
" e.g. clojure.core/defn and #'defn should both indent like defn.
|
||||
let ww = s:StripNamespaceAndMacroChars(w)
|
||||
let ww = s:strip_namespace_and_macro_chars(w)
|
||||
|
||||
if &lispwords =~# '\V\<' . ww . '\>'
|
||||
return paren[1] + &shiftwidth - 1
|
||||
return [paren[0], paren[1] + &shiftwidth - 1]
|
||||
endif
|
||||
|
||||
if g:clojure_fuzzy_indent
|
||||
\ && !s:MatchesOne(g:clojure_fuzzy_indent_blacklist, ww)
|
||||
\ && s:MatchesOne(g:clojure_fuzzy_indent_patterns, ww)
|
||||
return paren[1] + &shiftwidth - 1
|
||||
\ && !s:match_one(g:clojure_fuzzy_indent_blacklist, ww)
|
||||
\ && s:match_one(g:clojure_fuzzy_indent_patterns, ww)
|
||||
return [paren[0], paren[1] + &shiftwidth - 1]
|
||||
endif
|
||||
|
||||
call search('\v\_s', 'cW')
|
||||
call search('\v\S', 'W')
|
||||
if paren[0] < line(".")
|
||||
return paren[1] + (g:clojure_align_subforms ? 0 : &shiftwidth - 1)
|
||||
return [paren[0], paren[1] + (g:clojure_align_subforms ? 0 : &shiftwidth - 1)]
|
||||
endif
|
||||
|
||||
call search('\v\S', 'bW')
|
||||
return virtcol(".") + 1
|
||||
return [line('.'), col('.') + 1]
|
||||
endfunction
|
||||
|
||||
function! GetClojureIndent()
|
||||
let lnum = line('.')
|
||||
let orig_lnum = lnum
|
||||
let orig_col = col('.')
|
||||
let [opening_lnum, indent] = s:clojure_indent_pos()
|
||||
|
||||
" Account for multibyte characters
|
||||
if opening_lnum > 0
|
||||
let indent -= indent - virtcol([opening_lnum, indent])
|
||||
endif
|
||||
|
||||
" Return if there are no previous lines to inherit from
|
||||
if opening_lnum < 1 || opening_lnum >= lnum - 1
|
||||
call cursor(orig_lnum, orig_col)
|
||||
return indent
|
||||
endif
|
||||
|
||||
let bracket_count = 0
|
||||
|
||||
" Take the indent of the first previous non-white line that is
|
||||
" at the same sexp level. cf. src/misc1.c:get_lisp_indent()
|
||||
while 1
|
||||
let lnum = prevnonblank(lnum - 1)
|
||||
let col = 1
|
||||
|
||||
if lnum <= opening_lnum
|
||||
break
|
||||
endif
|
||||
|
||||
call cursor(lnum, col)
|
||||
|
||||
" Handle bracket counting edge case
|
||||
if s:is_paren()
|
||||
let bracket_count += s:bracket_type(s:current_char())
|
||||
endif
|
||||
|
||||
while 1
|
||||
if search('\v[(\[{}\])]', '', lnum) < 1
|
||||
break
|
||||
elseif !s:ignored_region()
|
||||
let bracket_count += s:bracket_type(s:current_char())
|
||||
endif
|
||||
endwhile
|
||||
|
||||
if bracket_count == 0
|
||||
" Check if this is part of a multiline string
|
||||
call cursor(lnum, 1)
|
||||
if s:syn_id_name() !~? '\vstring|regex'
|
||||
call cursor(orig_lnum, orig_col)
|
||||
return indent(lnum)
|
||||
endif
|
||||
endif
|
||||
endwhile
|
||||
|
||||
call cursor(orig_lnum, orig_col)
|
||||
return indent
|
||||
endfunction
|
||||
|
||||
setlocal indentexpr=GetClojureIndent()
|
||||
|
||||
@@ -3,9 +3,15 @@
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Previous Maintainer: Peter Aronoff <telemachus@arpinum.org>
|
||||
" Original Author: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2016-02-15
|
||||
" Latest Revision: 2016-06-27
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-sh-indent
|
||||
" Changelog:
|
||||
" 20160627: - detect heredocs correctly
|
||||
" 20160213: - detect function definition correctly
|
||||
" 20160202: - use shiftwidth() function
|
||||
" 20151215: - set b:undo_indent variable
|
||||
" 20150728: - add foreach detection for zsh
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@@ -102,6 +108,8 @@ function! GetShIndent()
|
||||
endif
|
||||
elseif s:is_case_break(line)
|
||||
let ind -= s:indent_value('case-breaks')
|
||||
elseif s:is_here_doc(line)
|
||||
let ind = 0
|
||||
endif
|
||||
|
||||
return ind
|
||||
@@ -160,6 +168,14 @@ function! s:is_case_break(line)
|
||||
return a:line =~ '^\s*;[;&]'
|
||||
endfunction
|
||||
|
||||
function! s:is_here_doc(line)
|
||||
if a:line =~ '^\w\+$'
|
||||
let here_pat = '<<-\?'. s:escape(a:line). '\$'
|
||||
return search(here_pat, 'bnW') > 0
|
||||
endif
|
||||
return 0
|
||||
endfunction
|
||||
|
||||
function! s:is_case_ended(line)
|
||||
return s:is_case_break(a:line) || a:line =~ ';[;&]\s*\%(#.*\)\=$'
|
||||
endfunction
|
||||
@@ -172,5 +188,9 @@ function! s:is_case_empty(line)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:escape(pattern)
|
||||
return '\V'. escape(a:pattern, '\\')
|
||||
endfunction
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Vim script
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2016 Apr 19
|
||||
" Last Change: 2016 Jun 27
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -60,7 +60,7 @@ function GetVimIndentIntern()
|
||||
else
|
||||
let ind = ind + shiftwidth() * 3
|
||||
endif
|
||||
elseif prev_text =~ '^\s*aug\%[roup]' && prev_text !~ '^\s*aug\%[roup]\s*!\=\s\+[eE][nN][dD]'
|
||||
elseif prev_text =~ '^\s*aug\%[roup]\s\+' && prev_text !~ '^\s*aug\%[roup]\s\+[eE][nN][dD]\>'
|
||||
let ind = ind + shiftwidth()
|
||||
else
|
||||
" A line starting with :au does not increment/decrement 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\+[eE][nN][dD]\)'
|
||||
if cur_text =~ '^\s*\(ene\@!\|cat\|fina\|el\|aug\%[roup]\s\+[eE][nN][dD]\)'
|
||||
let ind = ind - shiftwidth()
|
||||
endif
|
||||
|
||||
|
||||
108
runtime/keymap/armenian-eastern_utf-8.vim
Normal file
108
runtime/keymap/armenian-eastern_utf-8.vim
Normal file
@@ -0,0 +1,108 @@
|
||||
" Maintainer: Benjamin Linskey <vim@benlinskey.com>
|
||||
" Last Changed: 2016 July 20
|
||||
" URL: https://github.com/blinskey/vim-armenian-keymaps
|
||||
|
||||
let b:keymap_name = "hy"
|
||||
|
||||
loadkeymap
|
||||
|
||||
" Capital letters
|
||||
A Ա
|
||||
B Բ
|
||||
C Գ
|
||||
D Դ
|
||||
Y Ե
|
||||
Z Զ
|
||||
E Է
|
||||
U Ը
|
||||
: Թ
|
||||
+ Ժ
|
||||
I Ի
|
||||
L Լ
|
||||
Q Խ
|
||||
? Ծ
|
||||
K Կ
|
||||
H Հ
|
||||
@ Ձ
|
||||
> Ղ
|
||||
J Ճ
|
||||
M Մ
|
||||
# Յ
|
||||
N Ն
|
||||
< Շ
|
||||
O Ո
|
||||
{ Չ
|
||||
P Պ
|
||||
} Ջ
|
||||
_ Ռ
|
||||
S Ս
|
||||
V Վ
|
||||
T Տ
|
||||
R Ր
|
||||
X Ց
|
||||
W Ւ
|
||||
\" Փ
|
||||
G Ք
|
||||
) Օ
|
||||
F Ֆ
|
||||
|
||||
" Lowercase letters
|
||||
a ա
|
||||
b բ
|
||||
c գ
|
||||
d դ
|
||||
y ե
|
||||
z զ
|
||||
e է
|
||||
u ը
|
||||
; թ
|
||||
= ժ
|
||||
i ի
|
||||
l լ
|
||||
q խ
|
||||
/ ծ
|
||||
k կ
|
||||
h հ
|
||||
2 ձ
|
||||
. ղ
|
||||
j ճ
|
||||
m մ
|
||||
3 յ
|
||||
n ն
|
||||
, շ
|
||||
o ո
|
||||
[ չ
|
||||
p պ
|
||||
] ջ
|
||||
- ռ
|
||||
s ս
|
||||
v վ
|
||||
t տ
|
||||
r ր
|
||||
x ց
|
||||
w ւ
|
||||
' փ
|
||||
g ք
|
||||
0 օ
|
||||
f ֆ
|
||||
|
||||
& և
|
||||
|
||||
" Punctuation
|
||||
` ՝
|
||||
~ ՜
|
||||
1 ։
|
||||
4 ՛
|
||||
5 ,
|
||||
6 -
|
||||
7 .
|
||||
8 «
|
||||
9 »
|
||||
\\ '
|
||||
| ՞
|
||||
|
||||
" Numbers
|
||||
! 1
|
||||
$ 3
|
||||
% 4
|
||||
^ 9
|
||||
108
runtime/keymap/armenian-western_utf-8.vim
Normal file
108
runtime/keymap/armenian-western_utf-8.vim
Normal file
@@ -0,0 +1,108 @@
|
||||
" Maintainer: Benjamin Linskey <vim@benlinskey.com>
|
||||
" Last Changed: 2016 July 20
|
||||
" URL: https://github.com/blinskey/vim-armenian-keymaps
|
||||
|
||||
let b:keymap_name = "hy"
|
||||
|
||||
loadkeymap
|
||||
|
||||
" Capital letters
|
||||
A Ա
|
||||
P Բ
|
||||
C Գ
|
||||
T Դ
|
||||
Y Ե
|
||||
Z Զ
|
||||
E Է
|
||||
U Ը
|
||||
: Թ
|
||||
+ Ժ
|
||||
I Ի
|
||||
L Լ
|
||||
Q Խ
|
||||
? Ծ
|
||||
G Կ
|
||||
H Հ
|
||||
@ Ձ
|
||||
> Ղ
|
||||
J Ճ
|
||||
M Մ
|
||||
# Յ
|
||||
N Ն
|
||||
< Շ
|
||||
O Ո
|
||||
{ Չ
|
||||
B Պ
|
||||
} Ջ
|
||||
_ Ռ
|
||||
S Ս
|
||||
W Վ
|
||||
D Տ
|
||||
R Ր
|
||||
X Ց
|
||||
V Ւ
|
||||
\" Փ
|
||||
K Ք
|
||||
) Օ
|
||||
F Ֆ
|
||||
|
||||
" Lowercase letters
|
||||
a ա
|
||||
p բ
|
||||
c գ
|
||||
t դ
|
||||
y ե
|
||||
z զ
|
||||
e է
|
||||
u ը
|
||||
; թ
|
||||
= ժ
|
||||
i ի
|
||||
l լ
|
||||
q խ
|
||||
/ ծ
|
||||
g կ
|
||||
h հ
|
||||
2 ձ
|
||||
. ղ
|
||||
j ճ
|
||||
m մ
|
||||
3 յ
|
||||
n ն
|
||||
, շ
|
||||
o ո
|
||||
[ չ
|
||||
b պ
|
||||
] ջ
|
||||
- ռ
|
||||
s ս
|
||||
w վ
|
||||
d տ
|
||||
r ր
|
||||
x ց
|
||||
v ւ
|
||||
' փ
|
||||
k ք
|
||||
0 օ
|
||||
f ֆ
|
||||
|
||||
& և
|
||||
|
||||
" Punctuation
|
||||
` ՝
|
||||
~ ՜
|
||||
1 ։
|
||||
4 ՛
|
||||
5 ,
|
||||
6 -
|
||||
7 .
|
||||
8 «
|
||||
9 »
|
||||
\\ '
|
||||
| ՞
|
||||
|
||||
" Numbers
|
||||
! 1
|
||||
$ 3
|
||||
% 4
|
||||
^ 9
|
||||
196
runtime/keymap/vietnamese-telex_utf-8.vim
Normal file
196
runtime/keymap/vietnamese-telex_utf-8.vim
Normal file
@@ -0,0 +1,196 @@
|
||||
" Vim Keymap file for Vietnamese through Telex method
|
||||
" Maintainer: Raphael McSinyx <vn.mcsinyx@gmail.com>
|
||||
" Last Change: 2016-06-13
|
||||
|
||||
scriptencoding utf-8
|
||||
|
||||
let b:keymap_name = "vi"
|
||||
|
||||
loadkeymap
|
||||
|
||||
A\\ A
|
||||
AF À
|
||||
AS Á
|
||||
AR Ả
|
||||
AX Ã
|
||||
AJ Ạ
|
||||
|
||||
AW Ă
|
||||
AW\\ Ă
|
||||
AWF Ằ
|
||||
AWS Ắ
|
||||
AWR Ẳ
|
||||
AWX Ẵ
|
||||
AWJ Ặ
|
||||
|
||||
AA Â
|
||||
AA\\ Â
|
||||
AAF Ầ
|
||||
AAS Ấ
|
||||
AAR Ẩ
|
||||
AAX Ẫ
|
||||
AAJ Ậ
|
||||
|
||||
D\\ D
|
||||
DD Đ
|
||||
|
||||
E E
|
||||
E\\ E
|
||||
EF È
|
||||
ES É
|
||||
ER Ẻ
|
||||
EX Ẽ
|
||||
EJ Ẹ
|
||||
|
||||
EE Ê
|
||||
EE\\ Ê
|
||||
EEF Ề
|
||||
EES Ế
|
||||
EER Ể
|
||||
EEX Ễ
|
||||
EEJ Ệ
|
||||
|
||||
I\\ I
|
||||
IF Ì
|
||||
IS Í
|
||||
IR Ỉ
|
||||
IX Ĩ
|
||||
IJ Ị
|
||||
|
||||
O\\ O
|
||||
OF Ò
|
||||
OS Ó
|
||||
OR Ỏ
|
||||
OX Õ
|
||||
OJ Ọ
|
||||
|
||||
OO Ô
|
||||
OO\\ Ô
|
||||
OOF Ồ
|
||||
OOS Ố
|
||||
OOR Ổ
|
||||
OOX Ỗ
|
||||
OOJ Ộ
|
||||
|
||||
OW Ơ
|
||||
OW\\ Ơ
|
||||
OWF Ờ
|
||||
OWS Ớ
|
||||
OWR Ở
|
||||
OWX Ỡ
|
||||
OWJ Ợ
|
||||
|
||||
U\\ U
|
||||
UF Ù
|
||||
US Ú
|
||||
UR Ủ
|
||||
UX Ũ
|
||||
UJ Ụ
|
||||
|
||||
UW Ư
|
||||
UW\\ Ư
|
||||
UWF Ừ
|
||||
UWS Ứ
|
||||
UWR Ử
|
||||
UWX Ữ
|
||||
UWJ Ự
|
||||
|
||||
Y\\ Y
|
||||
YF Ỳ
|
||||
YS Ý
|
||||
YR Ỷ
|
||||
YX Ỹ
|
||||
YJ Ỵ
|
||||
|
||||
a\\ a
|
||||
af à
|
||||
as á
|
||||
ar ả
|
||||
ax ã
|
||||
aj ạ
|
||||
|
||||
aw ă
|
||||
aw\\ ă
|
||||
awf ằ
|
||||
aws ắ
|
||||
awr ẳ
|
||||
awx ẵ
|
||||
awj ặ
|
||||
|
||||
aa â
|
||||
aa\\ â
|
||||
aaf ầ
|
||||
aas ấ
|
||||
aar ẩ
|
||||
aax ẫ
|
||||
aaj ậ
|
||||
|
||||
d\\ d
|
||||
dd đ
|
||||
|
||||
e\\ e
|
||||
ef è
|
||||
es é
|
||||
er ẻ
|
||||
ex ẽ
|
||||
ej ẹ
|
||||
|
||||
ee ê
|
||||
ee\\ ê
|
||||
eef ề
|
||||
ees ế
|
||||
eer ể
|
||||
eex ễ
|
||||
eej ệ
|
||||
|
||||
i\\ i
|
||||
if ì
|
||||
is í
|
||||
ir ỉ
|
||||
ix ĩ
|
||||
ij ị
|
||||
|
||||
o\\ o
|
||||
of ò
|
||||
os ó
|
||||
or ỏ
|
||||
ox õ
|
||||
oj ọ
|
||||
|
||||
oo ô
|
||||
oo\\ ô
|
||||
oof ồ
|
||||
oos ố
|
||||
oor ổ
|
||||
oox ỗ
|
||||
ooj ộ
|
||||
|
||||
ow ơ
|
||||
ow\\ ơ
|
||||
owf ờ
|
||||
ows ớ
|
||||
owr ở
|
||||
owx ỡ
|
||||
owj ợ
|
||||
|
||||
u\\ u
|
||||
uf ù
|
||||
us ú
|
||||
ur ủ
|
||||
ux ũ
|
||||
uj ụ
|
||||
|
||||
uw ư
|
||||
uw\\ ư
|
||||
uwf ừ
|
||||
uws ứ
|
||||
uwr ử
|
||||
uwx ữ
|
||||
uwj ự
|
||||
|
||||
y\\ y
|
||||
yf ỳ
|
||||
ys ý
|
||||
yr ỷ
|
||||
yx ỹ
|
||||
yj ỵ
|
||||
196
runtime/keymap/vietnamese-vni_utf-8.vim
Normal file
196
runtime/keymap/vietnamese-vni_utf-8.vim
Normal file
@@ -0,0 +1,196 @@
|
||||
" Vim Keymap file for Vietnamese through VNI method
|
||||
" Maintainer: Raphael McSinyx <vn.mcsinyx@gmail.com>
|
||||
" Last Change: 2016-06-13
|
||||
|
||||
scriptencoding utf-8
|
||||
|
||||
let b:keymap_name = "vi"
|
||||
|
||||
loadkeymap
|
||||
|
||||
A\\ A
|
||||
A1 Á
|
||||
A2 À
|
||||
A3 Ả
|
||||
A4 Ã
|
||||
A5 Ạ
|
||||
|
||||
A8 Ă
|
||||
A8\\ Ă
|
||||
A81 Ắ
|
||||
A82 Ằ
|
||||
A83 Ẳ
|
||||
A84 Ẵ
|
||||
A85 Ặ
|
||||
|
||||
A6 Â
|
||||
A6\\ Â
|
||||
A61 Ấ
|
||||
A62 Ầ
|
||||
A63 Ẩ
|
||||
A64 Ẫ
|
||||
A65 Ậ
|
||||
|
||||
D D
|
||||
D\\ D
|
||||
D9 Đ
|
||||
|
||||
E\\ E
|
||||
E1 É
|
||||
E2 È
|
||||
E3 Ẻ
|
||||
E4 Ẽ
|
||||
E5 Ẹ
|
||||
|
||||
E6 Ê
|
||||
E6\\ Ê
|
||||
E61 Ế
|
||||
E62 Ề
|
||||
E63 Ể
|
||||
E64 Ễ
|
||||
E65 Ệ
|
||||
|
||||
I\\ I
|
||||
I1 Í
|
||||
I2 Ì
|
||||
I3 Ỉ
|
||||
I4 Ĩ
|
||||
I5 Ị
|
||||
|
||||
O\\ O
|
||||
O1 Ó
|
||||
O2 Ò
|
||||
O3 Ỏ
|
||||
O4 Õ
|
||||
O5 Ọ
|
||||
|
||||
O6 Ô
|
||||
O6\\ Ô
|
||||
O61 Ố
|
||||
O62 Ồ
|
||||
O63 Ổ
|
||||
O64 Ỗ
|
||||
O65 Ộ
|
||||
|
||||
O7 Ơ
|
||||
O7\\ Ơ
|
||||
O71 Ớ
|
||||
O72 Ờ
|
||||
O73 Ở
|
||||
O74 Ỡ
|
||||
O75 Ợ
|
||||
|
||||
U\\ U
|
||||
U1 Ú
|
||||
U2 Ù
|
||||
U3 Ủ
|
||||
U4 Ũ
|
||||
U5 Ụ
|
||||
|
||||
U7 Ư
|
||||
U7\\ Ư
|
||||
U71 Ứ
|
||||
U72 Ừ
|
||||
U73 Ử
|
||||
U74 Ữ
|
||||
U75 Ự
|
||||
|
||||
Y\\ Y
|
||||
Y1 Ý
|
||||
Y2 Ỳ
|
||||
Y3 Ỷ
|
||||
Y4 Ỹ
|
||||
Y5 Ỵ
|
||||
|
||||
a\\ a
|
||||
a1 á
|
||||
a2 à
|
||||
a3 ả
|
||||
a4 ã
|
||||
a5 ạ
|
||||
|
||||
a8 ă
|
||||
a8\\ ă
|
||||
a81 ắ
|
||||
a82 ằ
|
||||
a83 ẳ
|
||||
a84 ẵ
|
||||
a85 ặ
|
||||
|
||||
a6 â
|
||||
a6\\ â
|
||||
a61 ấ
|
||||
a62 ầ
|
||||
a63 ẩ
|
||||
a64 ẫ
|
||||
a65 ậ
|
||||
|
||||
d\\ d
|
||||
d9 đ
|
||||
|
||||
e\\ e
|
||||
e1 é
|
||||
e2 è
|
||||
e3 ẻ
|
||||
e4 ẽ
|
||||
e5 ẹ
|
||||
|
||||
e6 ê
|
||||
e6\\ ê
|
||||
e61 ế
|
||||
e62 ề
|
||||
e63 ể
|
||||
e64 ễ
|
||||
e65 ệ
|
||||
|
||||
i\\ i
|
||||
i1 í
|
||||
i2 ì
|
||||
i3 ỉ
|
||||
i4 ĩ
|
||||
i5 ị
|
||||
|
||||
o\\ o
|
||||
o1 ó
|
||||
o2 ò
|
||||
o3 ỏ
|
||||
o4 õ
|
||||
o5 ọ
|
||||
|
||||
o6 ô
|
||||
o6\\ ô
|
||||
o61 ố
|
||||
o62 ồ
|
||||
o63 ổ
|
||||
o64 ỗ
|
||||
o65 ộ
|
||||
|
||||
o7 ơ
|
||||
o7\\ ơ
|
||||
o71 ớ
|
||||
o72 ờ
|
||||
o73 ở
|
||||
o74 ỡ
|
||||
o75 ợ
|
||||
|
||||
u\\ u
|
||||
u1 ú
|
||||
u2 ù
|
||||
u3 ủ
|
||||
u4 ũ
|
||||
u5 ụ
|
||||
|
||||
u7 ư
|
||||
u7\\ ư
|
||||
u71 ứ
|
||||
u72 ừ
|
||||
u73 ử
|
||||
u74 ữ
|
||||
u75 ự
|
||||
|
||||
y\\ y
|
||||
y1 ý
|
||||
y2 ỳ
|
||||
y3 ỷ
|
||||
y4 ỹ
|
||||
y5 ỵ
|
||||
@@ -2,7 +2,7 @@
|
||||
" Translated By: Martin Lacko <lacko@host.sk>
|
||||
" Last Change: 2002 May 27
|
||||
|
||||
if has("win32") || has("win16") || has("dos16") || has("dos32")
|
||||
if has("win32")
|
||||
source <sfile>:p:h/menu_sk_sk.1250.vim
|
||||
else
|
||||
source <sfile>:p:h/menu_sk_sk.iso_8859-2.vim
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" You can also use this as a start for your own set of menus.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2014 May 22
|
||||
" Last Change: 2016 Jul 27
|
||||
|
||||
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
|
||||
" in all modes and avoid side effects from mappings defined by the user.
|
||||
@@ -188,7 +188,7 @@ an 20.435 &Edit.Startup\ &Settings :call <SID>EditVimrc()<CR>
|
||||
fun! s:EditVimrc()
|
||||
if $MYVIMRC != ''
|
||||
let fname = $MYVIMRC
|
||||
elseif has("win32") || has("dos32") || has("dos16") || has("os2")
|
||||
elseif has("win32")
|
||||
if $HOME != ''
|
||||
let fname = $HOME . "/_vimrc"
|
||||
else
|
||||
@@ -566,7 +566,7 @@ endfun
|
||||
func! s:XxdFind()
|
||||
if !exists("g:xxdprogram")
|
||||
" On the PC xxd may not be in the path but in the install directory
|
||||
if (has("win32") || has("dos32")) && !executable("xxd")
|
||||
if has("win32") && !executable("xxd")
|
||||
let g:xxdprogram = $VIMRUNTIME . (&shellslash ? '/' : '\') . "xxd.exe"
|
||||
else
|
||||
let g:xxdprogram = "xxd"
|
||||
|
||||
@@ -540,7 +540,7 @@ call append("$", "scrolljump\tminimal number of lines to scroll at a time")
|
||||
call append("$", " \tset sj=" . &sj)
|
||||
call append("$", "ttyscroll\tmaximum number of lines to use scrolling instead of redrawing")
|
||||
call append("$", " \tset tsl=" . &tsl)
|
||||
if has("gui") || has("msdos") || has("win32")
|
||||
if has("gui") || has("win32")
|
||||
call append("$", "guicursor\tspecifies what the cursor looks like in different modes")
|
||||
call <SID>OptionG("gcr", &gcr)
|
||||
endif
|
||||
@@ -1016,11 +1016,9 @@ call append("$", "patchmode\tkeep oldest version of a file; specifies file name
|
||||
call <SID>OptionG("pm", &pm)
|
||||
call append("$", "fsync\tforcibly sync the file to disk after writing it")
|
||||
call <SID>BinOptionG("fs", &fs)
|
||||
if !has("msdos")
|
||||
call append("$", "shortname\tuse 8.3 file names")
|
||||
call append("$", "\t(local to buffer)")
|
||||
call <SID>BinOptionL("sn")
|
||||
endif
|
||||
call append("$", "shortname\tuse 8.3 file names")
|
||||
call append("$", "\t(local to buffer)")
|
||||
call <SID>BinOptionL("sn")
|
||||
call append("$", "cryptmethod\tencryption method for file writing: zip or blowfish")
|
||||
call append("$", "\t(local to buffer)")
|
||||
call <SID>OptionL("cm")
|
||||
@@ -1136,20 +1134,14 @@ if has("quickfix")
|
||||
endif
|
||||
|
||||
|
||||
if has("msdos") || has("os2") || has("win16") || has("win32") || has("osfiletype")
|
||||
if has("win32") || has("osfiletype")
|
||||
call <SID>Header("system specific")
|
||||
if has("msdos")
|
||||
call append("$", "bioskey\tcall the BIOS to get a keyoard character")
|
||||
call <SID>BinOptionG("biosk", &biosk)
|
||||
call append("$", "conskey\tuse direct console I/O to get a keyboard character")
|
||||
call <SID>BinOptionG("consk", &consk)
|
||||
endif
|
||||
if has("osfiletype")
|
||||
call append("$", "osfiletype\tOS-specific information about the type of file")
|
||||
call append("$", "\t(local to buffer)")
|
||||
call <SID>OptionL("oft")
|
||||
endif
|
||||
if has("msdos") || has("os2") || has("win16") || has("win32")
|
||||
if has("win32")
|
||||
call append("$", "shellslash\tuse forward slashes in file names; for Unix-like shells")
|
||||
call <SID>BinOptionG("ssl", &ssl)
|
||||
endif
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
! $XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp $
|
||||
255 250 250 snow
|
||||
248 248 255 ghost white
|
||||
248 248 255 GhostWhite
|
||||
@@ -58,6 +57,14 @@
|
||||
119 136 153 LightSlateGrey
|
||||
190 190 190 gray
|
||||
190 190 190 grey
|
||||
190 190 190 x11 gray
|
||||
190 190 190 X11Gray
|
||||
190 190 190 x11 grey
|
||||
190 190 190 X11Grey
|
||||
128 128 128 web gray
|
||||
128 128 128 WebGray
|
||||
128 128 128 web grey
|
||||
128 128 128 WebGrey
|
||||
211 211 211 light grey
|
||||
211 211 211 LightGrey
|
||||
211 211 211 light gray
|
||||
@@ -106,6 +113,7 @@
|
||||
72 209 204 MediumTurquoise
|
||||
64 224 208 turquoise
|
||||
0 255 255 cyan
|
||||
0 255 255 aqua
|
||||
224 255 255 light cyan
|
||||
224 255 255 LightCyan
|
||||
95 158 160 cadet blue
|
||||
@@ -132,6 +140,11 @@
|
||||
124 252 0 lawn green
|
||||
124 252 0 LawnGreen
|
||||
0 255 0 green
|
||||
0 255 0 lime
|
||||
0 255 0 x11 green
|
||||
0 255 0 X11Green
|
||||
0 128 0 web green
|
||||
0 128 0 WebGreen
|
||||
127 255 0 chartreuse
|
||||
0 250 154 medium spring green
|
||||
0 250 154 MediumSpringGreen
|
||||
@@ -203,11 +216,16 @@
|
||||
219 112 147 pale violet red
|
||||
219 112 147 PaleVioletRed
|
||||
176 48 96 maroon
|
||||
176 48 96 x11 maroon
|
||||
176 48 96 X11Maroon
|
||||
128 0 0 web maroon
|
||||
128 0 0 WebMaroon
|
||||
199 21 133 medium violet red
|
||||
199 21 133 MediumVioletRed
|
||||
208 32 144 violet red
|
||||
208 32 144 VioletRed
|
||||
255 0 255 magenta
|
||||
255 0 255 fuchsia
|
||||
238 130 238 violet
|
||||
221 160 221 plum
|
||||
218 112 214 orchid
|
||||
@@ -220,6 +238,10 @@
|
||||
138 43 226 blue violet
|
||||
138 43 226 BlueViolet
|
||||
160 32 240 purple
|
||||
160 32 240 x11 purple
|
||||
160 32 240 X11Purple
|
||||
128 0 128 web purple
|
||||
128 0 128 WebPurple
|
||||
147 112 219 medium purple
|
||||
147 112 219 MediumPurple
|
||||
216 191 216 thistle
|
||||
@@ -751,3 +773,10 @@
|
||||
139 0 0 DarkRed
|
||||
144 238 144 light green
|
||||
144 238 144 LightGreen
|
||||
220 20 60 crimson
|
||||
75 0 130 indigo
|
||||
128 128 0 olive
|
||||
102 51 153 rebecca purple
|
||||
102 51 153 RebeccaPurple
|
||||
192 192 192 silver
|
||||
0 128 128 teal
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
" Vim syntax file
|
||||
" Language: awk, nawk, gawk, mawk
|
||||
" Maintainer: Antonio Colombo <azc100@gmail.com>
|
||||
" Last Change: 2014 Oct 21
|
||||
" Last Change: 2016 Jul 15
|
||||
|
||||
" AWK ref. is: Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger
|
||||
" 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)
|
||||
" (also available and updated 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)
|
||||
@@ -19,11 +19,8 @@
|
||||
" TODO:
|
||||
" Dig into the commented out syntax expressions below.
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syn clear
|
||||
elseif exists("b:current_syntax")
|
||||
" Quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -35,13 +32,13 @@ set cpo&vim
|
||||
syn keyword awkStatement break continue delete exit
|
||||
syn keyword awkStatement function getline next
|
||||
syn keyword awkStatement print printf return
|
||||
" GAWK ref. Chapter 7
|
||||
syn keyword awkStatement nextfile
|
||||
" GAWK ref. Chapter 7-9
|
||||
syn keyword awkStatement switch nextfile
|
||||
syn keyword awkStatement func
|
||||
"
|
||||
" GAWK ref. Chapter 9, Functions
|
||||
"
|
||||
" Numeric Functions
|
||||
syn keyword awkFunction atan2 cos div exp int log rand sin sqrt srand
|
||||
syn keyword awkFunction atan2 cos exp int intdiv 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
|
||||
@@ -52,17 +49,17 @@ syn keyword awkFunction close fflush system
|
||||
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
|
||||
" Getting Type Functions
|
||||
syn keyword awkFunction isarray typeof
|
||||
" String-Translation Functions
|
||||
syn keyword awkFunction bindtextdomain dcgettext dcngetext
|
||||
|
||||
syn keyword awkConditional if else
|
||||
syn keyword awkRepeat while for
|
||||
syn keyword awkRepeat while for do
|
||||
|
||||
syn keyword awkTodo contained TODO
|
||||
syn keyword awkTodo contained TODO
|
||||
|
||||
syn keyword awkPatterns BEGIN END
|
||||
syn keyword awkPatterns BEGIN END BEGINFILE ENDFILE
|
||||
|
||||
" GAWK ref. Chapter 7
|
||||
" Built-in Variables That Control awk
|
||||
@@ -74,20 +71,18 @@ 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
|
||||
|
||||
" Octal format character.
|
||||
syn match awkSpecialCharacter display contained "\\[0-7]\{1,3\}"
|
||||
syn keyword awkStatement func nextfile
|
||||
" Hex format character.
|
||||
syn match awkSpecialCharacter display contained "\\x[0-9A-Fa-f]\+"
|
||||
|
||||
syn match awkFieldVars "\$\d\+"
|
||||
|
||||
"catch errors caused by wrong parenthesis
|
||||
syn region awkParen transparent start="(" end=")" contains=ALLBUT,awkParenError,awkSpecialCharacter,awkArrayElement,awkArrayArray,awkTodo,awkRegExp,awkBrktRegExp,awkBrackets,awkCharClass
|
||||
" catch errors caused by wrong parenthesis
|
||||
syn region awkParen transparent start="(" end=")" contains=ALLBUT,awkParenError,awkSpecialCharacter,awkArrayElement,awkArrayArray,awkTodo,awkRegExp,awkBrktRegExp,awkBrackets,awkCharClass,awkComment
|
||||
syn match awkParenError display ")"
|
||||
syn match awkInParen display contained "[{}]"
|
||||
"syn match awkInParen display contained "[{}]"
|
||||
|
||||
" 64 lines for complex &&'s, and ||'s in a big "if"
|
||||
syn sync ccomment awkParen maxlines=64
|
||||
@@ -141,7 +136,7 @@ syn match awkExpression "?\|:"
|
||||
syn keyword awkExpression in
|
||||
|
||||
" Boolean Logic (OR, AND, NOT)
|
||||
"syn match awkBoolLogic "||\|&&\|\!"
|
||||
syn match awkBoolLogic "||\|&&\|\!"
|
||||
|
||||
" This is overridden by less-than & greater-than.
|
||||
" Put this above those to override them.
|
||||
@@ -171,63 +166,42 @@ syn region awkArray transparent start="\[" end="\]" contains=awkArray,awkArrayE
|
||||
" (for the few instances where it would be more than "oneline")
|
||||
syn sync ccomment awkArray maxlines=10
|
||||
|
||||
" define the default highlighting
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
if version >= 508 || !exists("did_awk_syn_inits")
|
||||
if version < 508
|
||||
let did_awk_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink awkConditional Conditional
|
||||
HiLink awkFunction Function
|
||||
HiLink awkRepeat Repeat
|
||||
HiLink awkStatement Statement
|
||||
|
||||
HiLink awkString String
|
||||
HiLink awkSpecialPrintf Special
|
||||
HiLink awkSpecialCharacter Special
|
||||
|
||||
HiLink awkSearch String
|
||||
HiLink awkBrackets awkRegExp
|
||||
HiLink awkBrktRegExp awkNestRegExp
|
||||
HiLink awkCharClass awkNestRegExp
|
||||
HiLink awkNestRegExp Keyword
|
||||
HiLink awkRegExp Special
|
||||
|
||||
HiLink awkNumber Number
|
||||
HiLink awkFloat Float
|
||||
|
||||
HiLink awkFileIO Special
|
||||
HiLink awkOperator Special
|
||||
HiLink awkExpression Special
|
||||
HiLink awkBoolLogic Special
|
||||
|
||||
HiLink awkPatterns Special
|
||||
HiLink awkVariables Special
|
||||
HiLink awkFieldVars Special
|
||||
|
||||
HiLink awkLineSkip Special
|
||||
HiLink awkSemicolon Special
|
||||
HiLink awkComma Special
|
||||
"HiLink awkIdentifier Identifier
|
||||
|
||||
HiLink awkComment Comment
|
||||
HiLink awkTodo Todo
|
||||
|
||||
" Change this if you want nested array names to be highlighted.
|
||||
HiLink awkArrayArray awkArray
|
||||
HiLink awkArrayElement Special
|
||||
|
||||
HiLink awkParenError awkError
|
||||
HiLink awkInParen awkError
|
||||
HiLink awkError Error
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
" Define the default highlighting.
|
||||
" Only used when an item doesn't have highlighting yet
|
||||
hi def link awkConditional Conditional
|
||||
hi def link awkFunction Function
|
||||
hi def link awkRepeat Repeat
|
||||
hi def link awkStatement Statement
|
||||
hi def link awkString String
|
||||
hi def link awkSpecialPrintf Special
|
||||
hi def link awkSpecialCharacter Special
|
||||
hi def link awkSearch String
|
||||
hi def link awkBrackets awkRegExp
|
||||
hi def link awkBrktRegExp awkNestRegExp
|
||||
hi def link awkCharClass awkNestRegExp
|
||||
hi def link awkNestRegExp Keyword
|
||||
hi def link awkRegExp Special
|
||||
hi def link awkNumber Number
|
||||
hi def link awkFloat Float
|
||||
hi def link awkFileIO Special
|
||||
hi def link awkOperator Special
|
||||
hi def link awkExpression Special
|
||||
hi def link awkBoolLogic Special
|
||||
hi def link awkPatterns Special
|
||||
hi def link awkVariables Special
|
||||
hi def link awkFieldVars Special
|
||||
hi def link awkLineSkip Special
|
||||
hi def link awkSemicolon Special
|
||||
hi def link awkComma Special
|
||||
hi def link awkIdentifier Identifier
|
||||
hi def link awkComment Comment
|
||||
hi def link awkTodo Todo
|
||||
" Change this if you want nested array names to be highlighted.
|
||||
hi def link awkArrayArray awkArray
|
||||
hi def link awkArrayElement Special
|
||||
hi def link awkParenError awkError
|
||||
hi def link awkInParen awkError
|
||||
hi def link awkError Error
|
||||
|
||||
let b:current_syntax = "awk"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2016 Apr 10
|
||||
" Last Change: 2016 Jul 07
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -295,7 +295,7 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
|
||||
syn keyword cConstant SCHAR_MIN SINT_MIN SLONG_MIN SSHRT_MIN
|
||||
syn keyword cConstant SCHAR_MAX SINT_MAX SLONG_MAX SSHRT_MAX
|
||||
if !exists("c_no_c99")
|
||||
syn keyword cConstant __func__
|
||||
syn keyword cConstant __func__ __VA_ARGS__
|
||||
syn keyword cConstant LLONG_MIN LLONG_MAX ULLONG_MAX
|
||||
syn keyword cConstant INT8_MIN INT16_MIN INT32_MIN INT64_MIN
|
||||
syn keyword cConstant INT8_MAX INT16_MAX INT32_MAX INT64_MAX
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2,7 +2,7 @@
|
||||
" Language: C++
|
||||
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
|
||||
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
|
||||
" Last Change: 2015 Nov 10
|
||||
" Last Change: 2016 Jul 07
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@@ -80,6 +80,7 @@ if version >= 508 || !exists("did_cpp_syntax_inits")
|
||||
HiLink cppConstant Constant
|
||||
HiLink cppRawStringDelimiter Delimiter
|
||||
HiLink cppRawString String
|
||||
HiLink cppNumber Number
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
|
||||
@@ -2,30 +2,22 @@
|
||||
" Language: OpenBSD packet filter configuration (pf.conf)
|
||||
" Original Author: Camiel Dobbelaar <cd@sentia.nl>
|
||||
" Maintainer: Lauri Tirkkonen <lotheac@iki.fi>
|
||||
" Last Change: 2013 Apr 02
|
||||
" Last Change: 2016 Jul 06
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
setlocal foldmethod=syntax
|
||||
syn iskeyword @,48-57,_,-,+
|
||||
syn sync fromstart
|
||||
|
||||
syn cluster pfNotLS contains=pfTodo,pfVarAssign
|
||||
syn keyword pfCmd altq anchor antispoof binat nat pass
|
||||
syn keyword pfCmd queue rdr scrub table set
|
||||
syn keyword pfService auth bgp domain finger ftp http https ident
|
||||
syn keyword pfService imap irc isakmp kerberos mail nameserver nfs
|
||||
syn keyword pfService nntp ntp pop3 portmap pptp rpcbind rsync smtp
|
||||
syn keyword pfService snmp snmptrap socks ssh sunrpc syslog telnet
|
||||
syn keyword pfService tftp www
|
||||
syn keyword pfCmd anchor antispoof block include match pass queue
|
||||
syn keyword pfCmd queue set table
|
||||
syn match pfCmd /^\s*load\sanchor\>/
|
||||
syn keyword pfTodo TODO XXX contained
|
||||
syn keyword pfWildAddr all any
|
||||
syn match pfCmd /block\s/
|
||||
syn match pfComment /#.*$/ contains=pfTodo
|
||||
syn match pfCont /\\$/
|
||||
syn match pfErrClose /}/
|
||||
@@ -34,43 +26,81 @@ syn match pfIPv6 /[a-fA-F0-9:]*::[a-fA-F0-9:.]*/
|
||||
syn match pfIPv6 /[a-fA-F0-9:]\+:[a-fA-F0-9:]\+:[a-fA-F0-9:.]\+/
|
||||
syn match pfNetmask /\/\d\+/
|
||||
syn match pfNum /[a-zA-Z0-9_:.]\@<!\d\+[a-zA-Z0-9_:.]\@!/
|
||||
syn match pfTable /<\s*[a-zA-Z][a-zA-Z0-9_]*\s*>/
|
||||
syn match pfTable /<\s*[a-zA-Z0-9_:][a-zA-Z0-9_:.-]*\s*>/
|
||||
syn match pfVar /$[a-zA-Z][a-zA-Z0-9_]*/
|
||||
syn match pfVarAssign /^\s*[a-zA-Z][a-zA-Z0-9_]*\s*=/me=e-1
|
||||
syn region pfFold1 start=/^#\{1}>/ end=/^#\{1,3}>/me=s-1 transparent fold
|
||||
syn region pfFold2 start=/^#\{2}>/ end=/^#\{2,3}>/me=s-1 transparent fold
|
||||
syn region pfFold3 start=/^#\{3}>/ end=/^#\{3}>/me=s-1 transparent fold
|
||||
syn region pfList start=/{/ end=/}/ transparent contains=ALLBUT,pfErrClose,@pfNotLS
|
||||
syn region pfString start=/"/ end=/"/ transparent contains=ALLBUT,pfString,@pfNotLS
|
||||
syn region pfString start=/'/ end=/'/ transparent contains=ALLBUT,pfString,@pfNotLS
|
||||
syn region pfString start=/"/ skip=/\\"/ end=/"/ contains=pfIPv4,pfIPv6,pfNetmask,pfTable,pfVar
|
||||
syn region pfString start=/'/ skip=/\\'/ end=/'/ contains=pfIPv4,pfIPv6,pfNetmask,pfTable,pfVar
|
||||
|
||||
" Define the default highlighting.
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
if version >= 508 || !exists("did_c_syn_inits")
|
||||
if version < 508
|
||||
let did_c_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
syn keyword pfService 802-11-iapp Microsoft-SQL-Monitor
|
||||
syn keyword pfService Microsoft-SQL-Server NeXTStep NextStep
|
||||
syn keyword pfService afpovertcp afs3-bos afs3-callback afs3-errors
|
||||
syn keyword pfService afs3-fileserver afs3-kaserver afs3-prserver
|
||||
syn keyword pfService afs3-rmtsys afs3-update afs3-vlserver
|
||||
syn keyword pfService afs3-volser amt-redir-tcp amt-redir-tls
|
||||
syn keyword pfService amt-soap-http amt-soap-https asf-rmcp at-echo
|
||||
syn keyword pfService at-nbp at-rtmp at-zis auth authentication
|
||||
syn keyword pfService bfd-control bfd-echo bftp bgp bgpd biff bootpc
|
||||
syn keyword pfService bootps canna cddb cddbp chargen chat cmd
|
||||
syn keyword pfService cmip-agent cmip-man comsat conference
|
||||
syn keyword pfService conserver courier csnet-ns cso-ns cvspserver
|
||||
syn keyword pfService daap datametrics daytime dhcpd-sync
|
||||
syn keyword pfService dhcpv6-client dhcpv6-server discard domain
|
||||
syn keyword pfService echo efs eklogin ekshell ekshell2 epmap eppc
|
||||
syn keyword pfService exec finger ftp ftp-data git gopher hostname
|
||||
syn keyword pfService hostnames hprop http https hunt hylafax iapp
|
||||
syn keyword pfService icb ident imap imap2 imap3 imaps ingreslock
|
||||
syn keyword pfService ipp iprop ipsec-msft ipsec-nat-t ipx irc
|
||||
syn keyword pfService isakmp iscsi isisd iso-tsap kauth kdc kerberos
|
||||
syn keyword pfService kerberos-adm kerberos-iv kerberos-sec
|
||||
syn keyword pfService kerberos_master kf kip klogin kpasswd kpop
|
||||
syn keyword pfService krb524 krb_prop krbupdate krcmd kreg kshell kx
|
||||
syn keyword pfService l2tp ldap ldaps ldp link login mail mdns
|
||||
syn keyword pfService mdnsresponder microsoft-ds ms-sql-m ms-sql-s
|
||||
syn keyword pfService msa msp mtp mysql name nameserver netbios-dgm
|
||||
syn keyword pfService netbios-ns netbios-ssn netnews netplan netrjs
|
||||
syn keyword pfService netstat netwall newdate nextstep nfs nfsd
|
||||
syn keyword pfService nicname nnsp nntp ntalk ntp null openwebnet
|
||||
syn keyword pfService ospf6d ospfapi ospfd photuris pop2 pop3 pop3pw
|
||||
syn keyword pfService pop3s poppassd portmap postgresql postoffice
|
||||
syn keyword pfService pptp presence printer prospero prospero-np
|
||||
syn keyword pfService puppet pwdgen qotd quote radacct radius
|
||||
syn keyword pfService radius-acct rdp readnews remotefs resource rfb
|
||||
syn keyword pfService rfe rfs rfs_server ripd ripng rje rkinit rlp
|
||||
syn keyword pfService routed router rpc rpcbind rsync rtelnet rtsp
|
||||
syn keyword pfService sa-msg-port sane-port sftp shell sieve silc
|
||||
syn keyword pfService sink sip smtp smtps smux snmp snmp-trap
|
||||
syn keyword pfService snmptrap snpp socks source spamd spamd-cfg
|
||||
syn keyword pfService spamd-sync spooler spop3 ssdp ssh submission
|
||||
syn keyword pfService sunrpc supdup supfiledbg supfilesrv support
|
||||
syn keyword pfService svn svrloc swat syslog syslog-tls systat
|
||||
syn keyword pfService tacacs tacas+ talk tap tcpmux telnet tempo
|
||||
syn keyword pfService tftp time timed timeserver timserver tsap
|
||||
syn keyword pfService ttylink ttytst ub-dns-control ulistserv untp
|
||||
syn keyword pfService usenet users uucp uucp-path uucpd vnc vxlan
|
||||
syn keyword pfService wais webster who whod whois www x400 x400-snd
|
||||
syn keyword pfService xcept xdmcp xmpp-bosh xmpp-client xmpp-server
|
||||
syn keyword pfService z3950 zabbix-agent zabbix-trapper zebra
|
||||
syn keyword pfService zebrasrv
|
||||
|
||||
HiLink pfCmd Statement
|
||||
HiLink pfComment Comment
|
||||
HiLink pfCont Statement
|
||||
HiLink pfErrClose Error
|
||||
HiLink pfIPv4 Type
|
||||
HiLink pfIPv6 Type
|
||||
HiLink pfNetmask Constant
|
||||
HiLink pfNum Constant
|
||||
HiLink pfService Constant
|
||||
HiLink pfTable Identifier
|
||||
HiLink pfTodo Todo
|
||||
HiLink pfVar Identifier
|
||||
HiLink pfVarAssign Identifier
|
||||
HiLink pfWildAddr Type
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
hi def link pfCmd Statement
|
||||
hi def link pfComment Comment
|
||||
hi def link pfCont Statement
|
||||
hi def link pfErrClose Error
|
||||
hi def link pfIPv4 Type
|
||||
hi def link pfIPv6 Type
|
||||
hi def link pfNetmask Constant
|
||||
hi def link pfNum Constant
|
||||
hi def link pfService Constant
|
||||
hi def link pfString String
|
||||
hi def link pfTable Identifier
|
||||
hi def link pfTodo Todo
|
||||
hi def link pfVar Identifier
|
||||
hi def link pfVarAssign Identifier
|
||||
hi def link pfWildAddr Type
|
||||
|
||||
let b:current_syntax = "pf"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: php PHP 3/4/5
|
||||
" Language: php PHP 3/4/5/7
|
||||
" Maintainer: Jason Woofenden <jason@jasonwoof.com>
|
||||
" Last Change: Apr 18, 2016
|
||||
" Last Change: Jul 27, 2016
|
||||
" URL: https://jasonwoof.com/gitweb/?p=vim-syntax.git;a=blob;f=php.vim;hb=HEAD
|
||||
" Former Maintainers: Peter Hodge <toomuchphp-vim@yahoo.com>
|
||||
" Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
||||
@@ -377,29 +377,29 @@ syn keyword phpTodo todo fixme xxx contained
|
||||
|
||||
" Comment
|
||||
if exists("php_parent_error_open")
|
||||
syn region phpComment start="/\*" end="\*/" contained contains=phpTodo
|
||||
syn region phpComment start="/\*" end="\*/" contained contains=phpTodo,@Spell
|
||||
else
|
||||
syn region phpComment start="/\*" end="\*/" contained contains=phpTodo extend
|
||||
syn region phpComment start="/\*" end="\*/" contained contains=phpTodo,@Spell extend
|
||||
endif
|
||||
if version >= 600
|
||||
syn match phpComment "#.\{-}\(?>\|$\)\@=" contained contains=phpTodo
|
||||
syn match phpComment "//.\{-}\(?>\|$\)\@=" contained contains=phpTodo
|
||||
syn match phpComment "#.\{-}\(?>\|$\)\@=" contained contains=phpTodo,@Spell
|
||||
syn match phpComment "//.\{-}\(?>\|$\)\@=" contained contains=phpTodo,@Spell
|
||||
else
|
||||
syn match phpComment "#.\{-}$" contained contains=phpTodo
|
||||
syn match phpComment "#.\{-}?>"me=e-2 contained contains=phpTodo
|
||||
syn match phpComment "//.\{-}$" contained contains=phpTodo
|
||||
syn match phpComment "//.\{-}?>"me=e-2 contained contains=phpTodo
|
||||
syn match phpComment "#.\{-}$" contained contains=phpTodo,@Spell
|
||||
syn match phpComment "#.\{-}?>"me=e-2 contained contains=phpTodo,@Spell
|
||||
syn match phpComment "//.\{-}$" contained contains=phpTodo,@Spell
|
||||
syn match phpComment "//.\{-}?>"me=e-2 contained contains=phpTodo,@Spell
|
||||
endif
|
||||
|
||||
" String
|
||||
if exists("php_parent_error_open")
|
||||
syn region phpStringDouble matchgroup=phpStringDouble start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble contained keepend
|
||||
syn region phpStringDouble matchgroup=phpStringDouble start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble,@Spell contained keepend
|
||||
syn region phpBacktick matchgroup=phpBacktick start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpBackslashSequences,phpIdentifierSimply,phpIdentifierComplex contained keepend
|
||||
syn region phpStringSingle matchgroup=phpStringSingle start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote contained keepend
|
||||
syn region phpStringSingle matchgroup=phpStringSingle start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote,@Spell contained keepend
|
||||
else
|
||||
syn region phpStringDouble matchgroup=phpStringDouble start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble contained extend keepend
|
||||
syn region phpStringDouble matchgroup=phpStringDouble start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble,@Spell contained extend keepend
|
||||
syn region phpBacktick matchgroup=phpBacktick start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpBackslashSequences,phpIdentifierSimply,phpIdentifierComplex contained extend keepend
|
||||
syn region phpStringSingle matchgroup=phpStringSingle start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote contained keepend extend
|
||||
syn region phpStringSingle matchgroup=phpStringSingle start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote,@Spell contained keepend extend
|
||||
endif
|
||||
|
||||
" HereDoc and NowDoc
|
||||
@@ -407,18 +407,18 @@ if version >= 600
|
||||
syn case match
|
||||
|
||||
" HereDoc
|
||||
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\I\i*\)\2$" end="^\z1\(;\=$\)\@=" contained contains=phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar keepend extend
|
||||
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\I\i*\)\2$" end="^\z1\(;\=$\)\@=" contained contains=phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend
|
||||
" including HTML,JavaScript,SQL even if not enabled via options
|
||||
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar keepend extend
|
||||
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar keepend extend
|
||||
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar keepend extend
|
||||
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend
|
||||
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend
|
||||
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend
|
||||
|
||||
" NowDoc
|
||||
syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\I\i*\)'$" end="^\z1\(;\=$\)\@=" contained keepend extend
|
||||
syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\I\i*\)'$" end="^\z1\(;\=$\)\@=" contained contains=@Spell keepend extend
|
||||
" including HTML,JavaScript,SQL even if not enabled via options
|
||||
syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop keepend extend
|
||||
syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop keepend extend
|
||||
syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript keepend extend
|
||||
syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,@Spell keepend extend
|
||||
syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,@Spell keepend extend
|
||||
syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,@Spell keepend extend
|
||||
syn case ignore
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Python
|
||||
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
|
||||
" Last Change: 2016 Feb 20
|
||||
" Last Change: 2016 Jul 21
|
||||
" Credits: Neil Schemenauer <nas@python.ca>
|
||||
" Dmitry Vasiliev
|
||||
"
|
||||
@@ -72,7 +72,7 @@ set cpo&vim
|
||||
" built-in below (use 'from __future__ import print_function' in 2)
|
||||
" - async and await were added in Python 3.5 and are soft keywords.
|
||||
"
|
||||
syn keyword pythonStatement False, None, True
|
||||
syn keyword pythonStatement False None True
|
||||
syn keyword pythonStatement as assert break continue del exec global
|
||||
syn keyword pythonStatement lambda nonlocal pass print return with yield
|
||||
syn keyword pythonStatement class def nextgroup=pythonFunction skipwhite
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: reStructuredText documentation format
|
||||
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2016-01-05
|
||||
" Latest Revision: 2016-06-17
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -137,7 +137,7 @@ syn match rstStandaloneHyperlink contains=@NoSpell
|
||||
\ "\<\%(\%(\%(https\=\|file\|ftp\|gopher\)://\|\%(mailto\|news\):\)[^[:space:]'\"<>]\+\|www[[:alnum:]_-]*\.[[:alnum:]_-]\+\.[^[:space:]'\"<>]\+\)[[:alnum:]/]"
|
||||
|
||||
syn region rstCodeBlock contained matchgroup=rstDirective
|
||||
\ start=+\%(sourcecode\|code\%(-block\)\=\)::\_s*\n\ze\z(\s\+\)+
|
||||
\ start=+\%(sourcecode\|code\%(-block\)\=\)::\s\+\w*\_s*\n\ze\z(\s\+\)+
|
||||
\ skip=+^$+
|
||||
\ end=+^\z1\@!+
|
||||
\ contains=@NoSpell
|
||||
@@ -153,10 +153,11 @@ for code in g:rst_syntax_code_list
|
||||
" guard against setting 'isk' option which might cause problems (issue #108)
|
||||
let prior_isk = &l:iskeyword
|
||||
exe 'syn include @rst'.code.' syntax/'.code.'.vim'
|
||||
exe 'syn region rstDirective'.code.' matchgroup=rstDirective fold '
|
||||
\.'start=#\%(sourcecode\|code\%(-block\)\=\)::\s\+'.code.'\_s*\n\ze\z(\s\+\)# '
|
||||
\.'skip=#^$# '
|
||||
\.'end=#^\z1\@!# contains=@NoSpell,@rst'.code
|
||||
exe 'syn region rstDirective'.code.' matchgroup=rstDirective fold'
|
||||
\.' start=#\%(sourcecode\|code\%(-block\)\=\)::\s\+'.code.'\_s*\n\ze\z(\s\+\)#'
|
||||
\.' skip=#^$#'
|
||||
\.' end=#^\z1\@!#'
|
||||
\.' contains=@NoSpell,@rst'.code
|
||||
exe 'syn cluster rstDirectives add=rstDirective'.code
|
||||
" reset 'isk' setting, if it has been changed
|
||||
if &l:iskeyword !=# prior_isk
|
||||
@@ -185,10 +186,11 @@ hi def link rstHyperlinkTarget String
|
||||
hi def link rstExDirective String
|
||||
hi def link rstSubstitutionDefinition rstDirective
|
||||
hi def link rstDelimiter Delimiter
|
||||
" TODO: I dunno...
|
||||
hi def rstEmphasis term=italic cterm=italic gui=italic
|
||||
hi def link rstEmphasis Underlined
|
||||
hi def link rstStrongEmphasis Special
|
||||
"term=bold cterm=bold gui=bold
|
||||
" TODO Append these atttributes somehow
|
||||
"hi def rstEmphasis term=italic cterm=italic gui=italic
|
||||
"hi def rstStrongEmphasis term=bold cterm=bold gui=bold
|
||||
hi def link rstInterpretedTextOrHyperlinkReference Identifier
|
||||
hi def link rstInlineLiteral String
|
||||
hi def link rstSubstitutionReference PreProc
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
" Language: shell (sh) Korn shell (ksh) bash (sh)
|
||||
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
|
||||
" Last Change: May 02, 2016
|
||||
" Version: 151
|
||||
" Last Change: Jul 29, 2016
|
||||
" Version: 155
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
|
||||
" For options and settings, please use: :help ft-sh-syntax
|
||||
" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr)
|
||||
|
||||
" For version 5.x: Clear all syntax items {{{1
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
if v:version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
@@ -131,11 +131,11 @@ syn cluster shArithParenList contains=shArithmetic,shCaseEsac,shComment,shDeref,
|
||||
syn cluster shArithList contains=@shArithParenList,shParenError
|
||||
syn cluster shCaseEsacList contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange
|
||||
syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq
|
||||
syn cluster shCommandSubList contains=shAlias,shArithmetic,shComment,shCmdParenRegion,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shOption,shPosnParm,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
|
||||
syn cluster shCommandSubList contains=shAlias,shArithmetic,shComment,shCmdParenRegion,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
|
||||
syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial
|
||||
syn cluster shDblQuoteList contains=shCommandSub,shDeref,shDerefSimple,shEscape,shPosnParm,shCtrlSeq,shSpecial
|
||||
syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPSR,shDerefPPS
|
||||
syn cluster shDerefVarList contains=shDerefOp,shDerefVarArray,shDerefOpError
|
||||
syn cluster shDerefVarList contains=shDerefOff,shDerefOp,shDerefVarArray,shDerefOpError
|
||||
syn cluster shEchoList contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shEscape,shExpr,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote
|
||||
syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq
|
||||
syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest
|
||||
@@ -173,7 +173,7 @@ if exists("b:is_kornshell") || exists("b:is_bash")
|
||||
|
||||
" Touch: {{{1
|
||||
" =====
|
||||
syn match shTouch '\<touch\>[^;#]*' skipwhite nextgroup=shTouchList contains=shTouchCmd
|
||||
syn match shTouch '\<touch\>[^;#]*' skipwhite nextgroup=shComment contains=shTouchCmd
|
||||
syn match shTouchCmd '\<touch\>' contained
|
||||
endif
|
||||
|
||||
@@ -332,10 +332,11 @@ endif
|
||||
" String And Character Constants: {{{1
|
||||
"================================
|
||||
syn match shNumber "\<\d\+\>#\="
|
||||
syn match shNumber "-\=\.\=\d\+\>#\="
|
||||
syn match shCtrlSeq "\\\d\d\d\|\\[abcfnrtv0]" contained
|
||||
syn match shNumber "\<-\=\.\=\d\+\>#\="
|
||||
syn match shCtrlSeq "\\\d\d\d\|\\[abcfnrtv0]" contained
|
||||
if exists("b:is_bash")
|
||||
syn match shSpecial "\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained
|
||||
syn match shSpecial "[^\\]\(\\\\\)*\zs\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained
|
||||
syn match shSpecial "^\(\\\\\)*\zs\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained
|
||||
endif
|
||||
if exists("b:is_bash")
|
||||
syn region shExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial
|
||||
@@ -346,11 +347,13 @@ elseif !exists("g:sh_no_error")
|
||||
endif
|
||||
syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell
|
||||
syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
|
||||
syn match shStringSpecial "[^[:print:] \t]" contained
|
||||
syn match shStringSpecial "\%(\\\\\)*\\[\\"'`$()#]"
|
||||
syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]"
|
||||
syn match shStringSpecial "[^[:print:] \t]" contained
|
||||
syn match shStringSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]"
|
||||
syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shBkslshSnglQuote,shBkslshDblQuote
|
||||
syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]"
|
||||
syn match shMoreSpecial "\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial contained
|
||||
syn match shMoreSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial contained
|
||||
syn region shBkslshSnglQuote contained matchgroup=shQuote start=+'+ end=+'+ contains=@Spell
|
||||
syn region shBkslshDblQuote contained matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
|
||||
|
||||
" Comments: {{{1
|
||||
"==========
|
||||
@@ -363,31 +366,21 @@ syn match shQuickComment contained "#.*$"
|
||||
|
||||
" Here Documents: {{{1
|
||||
" =========================================
|
||||
if version < 600
|
||||
syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shHereDoc01 end="^END[a-zA-Z_0-9]*$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shHereDoc02 start="<<-\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shHereDoc02 end="^\s*END[a-zA-Z_0-9]*$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shHereDoc03 start="<<\s*\**EOF\**" matchgroup=shHereDoc03 end="^EOF$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*\**EOF\**" matchgroup=shHereDoc04 end="^\s*EOF$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*\**\.\**" matchgroup=shHereDoc05 end="^\.$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*\**\.\**" matchgroup=shHereDoc06 end="^\s*\.$" contains=@shDblQuoteList
|
||||
|
||||
else
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\\\=\z([^ \t|]\+\)" matchgroup=shHereDoc07 end="^\z1\s*$" contains=@shDblQuoteList
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<\s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc08 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<-\s*\z([^ \t|]\+\)" matchgroup=shHereDoc09 end="^\s*\z1\s*$" contains=@shDblQuoteList
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc10 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<\s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc11 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc12 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<\s*\\\_$\_s*\z([^ \t|]\+\)" matchgroup=shHereDoc13 end="^\z1\s*$" contains=@shDblQuoteList
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<\s*\\\_$\_s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc14 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<\s*\\\_$\_s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc15 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc16 start="<<-\s*\\\_$\_s*\z([^ \t|]\+\)" matchgroup=shHereDoc16 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc17 start="<<-\s*\\\_$\_s*\\\z([^ \t|]\+\)" matchgroup=shHereDoc17 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc18 start="<<-\s*\\\_$\_s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc18 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc19 start="<<-\s*\\\_$\_s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc19 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc20 start="<<\\\z([^ \t|]\+\)" matchgroup=shHereDoc20 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc21 start="<<-\s*\\\z([^ \t|]\+\)" matchgroup=shHereDoc21 end="^\s*\z1\s*$"
|
||||
endif
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\\\=\z([^ \t|>]\+\)" matchgroup=shHereDoc01 end="^\z1\s*$" contains=@shDblQuoteList
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc02 start="<<\s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc02 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc03 start="<<-\s*\z([^ \t|>]\+\)" matchgroup=shHereDoc03 end="^\s*\z1\s*$" contains=@shDblQuoteList
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*'\z([^ \t|>]\+\)'" matchgroup=shHereDoc04 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*'\z([^ \t|>]\+\)'" matchgroup=shHereDoc05 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc06 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc07 end="^\z1\s*$" contains=@shDblQuoteList
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<\s*\\\_$\_s*'\z([^ \t|>]\+\)'" matchgroup=shHereDoc08 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<\s*\\\_$\_s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc09 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc10 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<-\s*\\\_$\_s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc11 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\\\_$\_s*'\z([^ \t|>]\+\)'" matchgroup=shHereDoc12 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<-\s*\\\_$\_s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc13 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<\\\z([^ \t|>]\+\)" matchgroup=shHereDoc14 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<-\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc15 end="^\s*\z1\s*$"
|
||||
|
||||
" Here Strings: {{{1
|
||||
" =============
|
||||
@@ -434,7 +427,7 @@ endif
|
||||
if !exists("g:sh_no_error")
|
||||
syn match shDerefWordError "[^}$[~]" contained
|
||||
endif
|
||||
syn match shDerefSimple "\$\%(\k\+\|\d\)"
|
||||
syn match shDerefSimple "\$\%(\h\w*\|\d\)"
|
||||
syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray
|
||||
syn match shDerefSimple "\$[-#*@!?]"
|
||||
syn match shDerefSimple "\$\$"
|
||||
@@ -452,18 +445,18 @@ endif
|
||||
" bash: ${!prefix*} and ${#parameter}: {{{1
|
||||
" ====================================
|
||||
if exists("b:is_bash")
|
||||
syn region shDeref matchgroup=PreProc start="\${!" end="\*\=}" contains=@shDerefList,shDerefOp
|
||||
syn match shDerefVar contained "{\@<=!\k\+" nextgroup=@shDerefVarList
|
||||
syn region shDeref matchgroup=PreProc start="\${!" end="\*\=}" contains=@shDerefList,shDerefOff
|
||||
syn match shDerefVar contained "{\@<=!\h\w*" nextgroup=@shDerefVarList
|
||||
endif
|
||||
if exists("b:is_kornshell")
|
||||
syn match shDerefVar contained "{\@<=!\k[[:alnum:]_.]*" nextgroup=@shDerefVarList
|
||||
syn match shDerefVar contained "{\@<=!\h\w*[[:alnum:]_.]*" nextgroup=@shDerefVarList
|
||||
endif
|
||||
|
||||
syn match shDerefSpecial contained "{\@<=[-*@?0]" nextgroup=shDerefOp,shDerefOpError
|
||||
syn match shDerefSpecial contained "\({[#!]\)\@<=[[:alnum:]*@_]\+" nextgroup=@shDerefVarList,shDerefOp
|
||||
syn match shDerefVar contained "{\@<=\k\+" nextgroup=@shDerefVarList
|
||||
syn match shDerefVar contained "{\@<=\h\w*" nextgroup=@shDerefVarList
|
||||
if exists("b:is_kornshell")
|
||||
syn match shDerefVar contained "{\@<=\k[[:alnum:]_.]*" nextgroup=@shDerefVarList
|
||||
syn match shDerefVar contained "{\@<=\h\w*[[:alnum:]_.]*" nextgroup=@shDerefVarList
|
||||
endif
|
||||
|
||||
" sh ksh bash : ${var[... ]...} array reference: {{{1
|
||||
@@ -505,8 +498,9 @@ syn match shDerefString contained "\\["']" nextgroup=shDerefPattern
|
||||
if exists("b:is_bash")
|
||||
" bash : ${parameter:offset}
|
||||
" bash : ${parameter:offset:length}
|
||||
syn region shDerefOp contained start=":[$[:alnum:]_]"me=e-1 end=":"me=e-1 end="}"me=e-1 contains=@shCommandSubList nextgroup=shDerefPOL
|
||||
syn match shDerefPOL contained ":[^}]\+" contains=@shCommandSubList
|
||||
syn region shDerefOff contained start=':' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple nextgroup=shDerefLen,shDeref,shDerefSimple
|
||||
syn region shDerefOff contained start=':\s-' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple nextgroup=shDerefLen,shDeref,shDerefSimple
|
||||
syn match shDerefLen contained ":[^}]\+" contains=shDeref,shDerefSimple
|
||||
|
||||
" bash : ${parameter//pattern/string}
|
||||
" bash : ${parameter//pattern}
|
||||
@@ -643,6 +637,8 @@ if exists("b:is_bash")
|
||||
hi def link bashSpecialVariables shShellVariables
|
||||
hi def link bashStatement shStatement
|
||||
hi def link shCharClass shSpecial
|
||||
hi def link shDerefOff shDerefOp
|
||||
hi def link shDerefLen shDerefOff
|
||||
endif
|
||||
if exists("b:is_kornshell")
|
||||
hi def link kshSpecialVariables shShellVariables
|
||||
@@ -702,12 +698,6 @@ hi def link shHereDoc12 shRedir
|
||||
hi def link shHereDoc13 shRedir
|
||||
hi def link shHereDoc14 shRedir
|
||||
hi def link shHereDoc15 shRedir
|
||||
hi def link shHereDoc16 shRedir
|
||||
hi def link shHereDoc17 shRedir
|
||||
hi def link shHereDoc18 shRedir
|
||||
hi def link shHereDoc19 shRedir
|
||||
hi def link shHereDoc20 shRedir
|
||||
hi def link shHereDoc21 shRedir
|
||||
|
||||
" Delete shell folding commands {{{1
|
||||
" =============================
|
||||
|
||||
@@ -4,7 +4,12 @@
|
||||
" Repository: https://github.com/chrisbra/vim-sqloracle-syntax
|
||||
" License: Vim
|
||||
" Previous Maintainer: Paul Moore
|
||||
" Last Change: 2015 Nov 24
|
||||
" Last Change: 2016 Jul 22
|
||||
|
||||
" Changes:
|
||||
" 02.04.2016: Support for when keyword
|
||||
" 03.04.2016: Support for join related keywords
|
||||
" 22.07.2016: Support Oracle Q-Quote-Syntax
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -24,10 +29,11 @@ syn keyword sqlKeyword index initial initrans into is level link logging loop
|
||||
syn keyword sqlKeyword maxextents maxtrans mode modify monitoring
|
||||
syn keyword sqlKeyword nocache nocompress nologging noparallel nowait of offline on online start
|
||||
syn keyword sqlKeyword parallel successful synonym table tablespace then to trigger uid
|
||||
syn keyword sqlKeyword unique user validate values view whenever
|
||||
syn keyword sqlKeyword unique user validate values view when whenever
|
||||
syn keyword sqlKeyword where with option order pctfree pctused privileges procedure
|
||||
syn keyword sqlKeyword public resource return row rowlabel rownum rows
|
||||
syn keyword sqlKeyword session share size smallint type using
|
||||
syn keyword sqlKeyword join cross inner outer left right
|
||||
|
||||
syn keyword sqlOperator not and or
|
||||
syn keyword sqlOperator in any some all between exists
|
||||
@@ -47,8 +53,13 @@ syn keyword sqlType boolean char character date float integer long
|
||||
syn keyword sqlType mlslabel number raw rowid varchar varchar2 varray
|
||||
|
||||
" Strings:
|
||||
syn region sqlString start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
syn region sqlString start=+'+ skip=+\\\\\|\\'+ end=+'+
|
||||
syn region sqlString matchgroup=Quote start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
syn region sqlString matchgroup=Quote start=+'+ skip=+\\\\\|\\'+ end=+'+
|
||||
syn region sqlString matchgroup=Quote start=+n\?q'\z([^[(<{]\)+ end=+\z1'+
|
||||
syn region sqlString matchgroup=Quote start=+n\?q'<+ end=+>'+
|
||||
syn region sqlString matchgroup=Quote start=+n\?q'{+ end=+}'+
|
||||
syn region sqlString matchgroup=Quote start=+n\?q'(+ end=+)'+
|
||||
syn region sqlString matchgroup=Quote start=+n\?q'\[+ end=+]'+
|
||||
|
||||
" Numbers:
|
||||
syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>"
|
||||
@@ -118,6 +129,7 @@ syn keyword sqlTodo TODO FIXME XXX DEBUG NOTE contained
|
||||
|
||||
" Define the default highlighting.
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
HiLink Quote Special
|
||||
HiLink sqlComment Comment
|
||||
HiLink sqlFunction Function
|
||||
HiLink sqlKeyword sqlSpecial
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: TeX
|
||||
" Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM>
|
||||
" Last Change: May 02, 2016
|
||||
" Version: 95
|
||||
" Last Change: Jul 05, 2016
|
||||
" Version: 98
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
|
||||
"
|
||||
" Notes: {{{1
|
||||
@@ -83,12 +83,12 @@ else
|
||||
let s:tex_conceal= g:tex_conceal
|
||||
endif
|
||||
if !exists("g:tex_superscripts")
|
||||
let s:tex_superscripts= "[0-9a-zA-W.,:;+-<>/()=]"
|
||||
let s:tex_superscripts= '[0-9a-zA-W.,:;+-<>/()=]'
|
||||
else
|
||||
let s:tex_superscripts= g:tex_superscripts
|
||||
endif
|
||||
if !exists("g:tex_subscripts")
|
||||
let s:tex_subscripts= "[0-9aehijklmnoprstuvx,+-/().]"
|
||||
let s:tex_subscripts= '[0-9aehijklmnoprstuvx,+-/().]'
|
||||
else
|
||||
let s:tex_subscripts= g:tex_subscripts
|
||||
endif
|
||||
@@ -132,14 +132,20 @@ endif
|
||||
" One may override this iskeyword setting by providing
|
||||
" g:tex_isk
|
||||
if exists("g:tex_isk")
|
||||
exe "setlocal isk=".g:tex_isk
|
||||
elseif !has("patch-7.4.1142")
|
||||
setl isk=48-57,a-z,A-Z,192-255
|
||||
if b:tex_stylish && g:tex_isk !~ '@'
|
||||
let b:tex_isk= '@,'.g:tex_isk
|
||||
else
|
||||
let b:tex_isk= g:tex_isk
|
||||
endif
|
||||
elseif b:tex_stylish
|
||||
let b:tex_isk="@,48-57,a-z,A-Z,192-255"
|
||||
else
|
||||
syn iskeyword 48-57,a-z,A-Z,192-255
|
||||
let b:tex_isk="48-57,a-z,A-Z,192-255"
|
||||
endif
|
||||
if b:tex_stylish
|
||||
setlocal isk+=@-@
|
||||
if v:version > 704 || (v:version == 704 && has("patch-7.4.1142"))
|
||||
exe "syn iskeyword ".b:tex_isk
|
||||
else
|
||||
exe "setl isk=".b:tex_isk
|
||||
endif
|
||||
if exists("g:tex_no_error") && g:tex_no_error
|
||||
let s:tex_no_error= 1
|
||||
@@ -159,7 +165,7 @@ endif
|
||||
|
||||
" Clusters: {{{1
|
||||
" --------
|
||||
syn cluster texCmdGroup contains=texCmdBody,texComment,texDefParm,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texBeginEnd,texBeginEndName,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle
|
||||
syn cluster texCmdGroup contains=texCmdBody,texComment,texDefParm,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texBeginEnd,texBeginEndName,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,@texMathZones
|
||||
if !s:tex_no_error
|
||||
syn cluster texCmdGroup add=texMathError
|
||||
endif
|
||||
@@ -206,16 +212,16 @@ endif
|
||||
" Try to flag {} and () mismatches: {{{1
|
||||
if s:tex_fast =~# 'm'
|
||||
if !s:tex_no_error
|
||||
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError
|
||||
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell
|
||||
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError
|
||||
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell
|
||||
else
|
||||
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup
|
||||
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup
|
||||
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup
|
||||
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup
|
||||
endif
|
||||
if !s:tex_nospell
|
||||
syn region texParen start="(" end=")" transparent contains=@texMatchGroup,@Spell
|
||||
syn region texParen start="(" end=")" transparent contains=@texMatchGroup,@Spell
|
||||
else
|
||||
syn region texParen start="(" end=")" transparent contains=@texMatchGroup
|
||||
syn region texParen start="(" end=")" transparent contains=@texMatchGroup
|
||||
endif
|
||||
endif
|
||||
if !s:tex_no_error
|
||||
@@ -266,7 +272,7 @@ syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)$"
|
||||
syn match texBeginEnd "\\begin\>\|\\end\>" nextgroup=texBeginEndName
|
||||
if s:tex_fast =~# 'm'
|
||||
syn region texBeginEndName matchgroup=Delimiter start="{" end="}" contained nextgroup=texBeginEndModifier contains=texComment
|
||||
syn region texBeginEndModifier matchgroup=Delimiter start="\[" end="]" contained contains=texComment,@NoSpell
|
||||
syn region texBeginEndModifier matchgroup=Delimiter start="\[" end="]" contained contains=texComment,@texMathZones,@NoSpell
|
||||
endif
|
||||
|
||||
" \documentclass, \documentstyle, \usepackage: {{{1
|
||||
@@ -447,9 +453,8 @@ if !exists("g:tex_no_math")
|
||||
call TexNewMathZone("G","gather",1)
|
||||
call TexNewMathZone("H","math",1)
|
||||
call TexNewMathZone("I","multline",1)
|
||||
call TexNewMathZone("J","subequations",0)
|
||||
call TexNewMathZone("K","xalignat",1)
|
||||
call TexNewMathZone("L","xxalignat",0)
|
||||
call TexNewMathZone("J","xalignat",1)
|
||||
call TexNewMathZone("K","xxalignat",0)
|
||||
|
||||
" Inline Math Zones: {{{2
|
||||
if s:tex_fast =~# 'M'
|
||||
@@ -481,8 +486,9 @@ if !exists("g:tex_no_math")
|
||||
" \left..something.. and \right..something.. support: {{{2
|
||||
syn match texMathDelimBad contained "\S"
|
||||
if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~# 'm'
|
||||
syn match texMathDelim contained "\\left\\{\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar={
|
||||
syn match texMathDelim contained "\\right\\}\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar=}
|
||||
syn match texMathDelim contained "\\left\["
|
||||
syn match texMathDelim contained "\\left\\{" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar={
|
||||
syn match texMathDelim contained "\\right\\}" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar=}
|
||||
let s:texMathDelimList=[
|
||||
\ ['<' , '<'] ,
|
||||
\ ['>' , '>'] ,
|
||||
@@ -1136,9 +1142,21 @@ if has("conceal") && &enc == 'utf-8'
|
||||
call s:SuperSub('texSubscript','_','9','₉')
|
||||
call s:SuperSub('texSubscript','_','a','ₐ')
|
||||
call s:SuperSub('texSubscript','_','e','ₑ')
|
||||
call s:SuperSub('texSubscript','_','h','ₕ')
|
||||
call s:SuperSub('texSubscript','_','i','ᵢ')
|
||||
call s:SuperSub('texSubscript','_','j','ⱼ')
|
||||
call s:SuperSub('texSubscript','_','k','ₖ')
|
||||
call s:SuperSub('texSubscript','_','l','ₗ')
|
||||
call s:SuperSub('texSubscript','_','m','ₘ')
|
||||
call s:SuperSub('texSubscript','_','n','ₙ')
|
||||
call s:SuperSub('texSubscript','_','o','ₒ')
|
||||
call s:SuperSub('texSubscript','_','p','ₚ')
|
||||
call s:SuperSub('texSubscript','_','r','ᵣ')
|
||||
call s:SuperSub('texSubscript','_','s','ₛ')
|
||||
call s:SuperSub('texSubscript','_','t','ₜ')
|
||||
call s:SuperSub('texSubscript','_','u','ᵤ')
|
||||
call s:SuperSub('texSubscript','_','v','ᵥ')
|
||||
call s:SuperSub('texSubscript','_','x','ₓ')
|
||||
call s:SuperSub('texSubscript','_',',','︐')
|
||||
call s:SuperSub('texSubscript','_','+','₊')
|
||||
call s:SuperSub('texSubscript','_','-','₋')
|
||||
@@ -1154,6 +1172,7 @@ if has("conceal") && &enc == 'utf-8'
|
||||
call s:SuperSub('texSubscript','_','\\phi\>' ,'ᵩ')
|
||||
call s:SuperSub('texSubscript','_','\\gamma\>','ᵧ')
|
||||
call s:SuperSub('texSubscript','_','\\chi\>' ,'ᵪ')
|
||||
|
||||
delfun s:SuperSub
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim 7.4 script
|
||||
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Last Change: May 02, 2016
|
||||
" Version: 7.4-50
|
||||
" Last Change: July 11, 2016
|
||||
" Version: 7.4-51
|
||||
" Automatically generated keyword lists: {{{1
|
||||
|
||||
" Quit when a syntax file was already loaded {{{2
|
||||
@@ -18,12 +18,12 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX
|
||||
syn cluster vimCommentGroup contains=vimTodo,@Spell
|
||||
|
||||
" regular vim commands {{{2
|
||||
syn keyword vimCommand contained a arga[dd] argu[ment] bad[d] bn[ext] breakd[el] bw[ipeout] cadde[xpr] ccl[ose] cfdo chd[ir] cmapc[lear] colo[rscheme] cope[n] cscope debugg[reedy] deletl dep diffpu[t] dl ds[earch] echoe[rr] en[dif] ex filetype fo[ld] fu[nction] gvim helpt[ags] iabc[lear] intro ju[mps] keepj[umps] la[st] lat lcl[ose] lefta[bove] lg[etfile] lh[elpgrep] lmapc[lear] loadk lop[en] lt[ag] lvimgrepa[dd] marks mk[exrc] mod[e] nbc[lose] noautocmd nu[mber] opt[ions] pc[lose] popu[p] prof[ile] ptN[ext] ptn[ext] pw[d] pyf[ile] r[ead] redraws[tatus] rew[ind] rubyd[o] sIc sIp san[dbox] sbf[irst] sbr[ewind] sci scs setl[ocal] sgc sgp sie sin sm[agic] sn[ext] sor[t] spellr[epall] srI srl star[tinsert] sts[elect] sv[iew] syncbind tab tabf[ind] tabnew tags tf[irst] tn[ext] ts[elect] undol[ist] up[date] vi[sual] vmapc[lear] wa[ll] winp[os] ws[verb] xmapc[lear] xprop
|
||||
syn keyword vimCommand contained ab argd[elete] as[cii] bd[elete] bo[tright] breakl[ist] cN[ext] caddf[ile] cd cfir[st] che[ckpath] cn[ext] com cp[revious] cstag delc[ommand] deletp di[splay] diffs[plit] dli[st] dsp[lit] echom[sg] endf[unction] exi[t] fin[d] foldc[lose] g h[elp] hi if is[earch] k keepp[atterns] lad[dexpr] later lcs lex[pr] lgetb[uffer] ll lne[xt] loadkeymap lp[revious] lua lw[indow] mat[ch] mks[ession] mz[scheme] nbs[tart] noh[lsearch] o[pen] ownsyntax pe[rl] pp[op] profd[el] pta[g] ptp[revious] py3 python3 rec[over] reg[isters] ri[ght] rubyf[ile] sIe sIr sav[eas] sbl[ast] sc scl scscope sf[ind] sge sgr sig sip sm[ap] sno[magic] sp[lit] spellu[ndo] src srn startg[replace] sun[hide] sw[apname] syntime tabN[ext] tabfir[st] tabo[nly] tc[l] th[row] to[pleft] tu[nmenu] unh[ide] v vie[w] vne[w] wh[ile] wn[ext] wundo xme xunme
|
||||
syn keyword vimCommand contained abc[lear] argdo au bel[owright] bp[revious] bro[wse] cNf[ile] cal[l] cdo cg[etfile] checkt[ime] cnew[er] comc[lear] cpf[ile] cuna[bbrev] delel delf[unction] dif[fupdate] difft[his] do e[dit] echon endfo[r] exu[sage] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] ij[ump] isp[lit] kee[pmarks] lN[ext] laddb[uffer] lb[uffer] lcscope lf[ile] lgete[xpr] lla[st] lnew[er] loc[kmarks] lpf[ile] luado m[ove] menut[ranslate] mksp[ell] mzf[ile] new nor ol[dfiles] p[rint] ped[it] pre[serve] promptf[ind] ptf[irst] ptr[ewind] py3do q[uit] red[o] res[ize] rightb[elow] rundo sIg sN[ext] sbN[ext] sbm[odified] scI scp se[t] sfir[st] sgi sh[ell] sign sir sme snoreme spe[llgood] spellw[rong] sre[wind] srp startr[eplace] sunme sy t tabc[lose] tabl[ast] tabp[revious] tcld[o] tj[ump] tp[revious] u[ndo] unl ve[rsion] vim[grep] vs[plit] win[size] wp[revious] wv[iminfo] xmenu xunmenu
|
||||
syn keyword vimCommand contained abo[veleft] arge[dit] bN[ext] bf[irst] br[ewind] bufdo c[hange] cat[ch] ce[nter] cgetb[uffer] cl[ist] cnf[ile] comp[iler] cq[uit] cw[indow] delep dell diffg[et] dig[raphs] doau ea el[se] endt[ry] f[ile] fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] iuna[bbrev] keepa lNf[ile] laddf[ile] lc[d] ld[o] lfdo lgr[ep] lli[st] lnf[ile] lockv[ar] lr[ewind] luafile ma[rk] mes mkv[imrc] n[ext] nmapc[lear] nore omapc[lear] pa[ckadd] perld[o] prev[ious] promptr[epl] ptj[ump] pts[elect] py[thon] qa[ll] redi[r] ret[ab] ru[ntime] rv[iminfo] sIl sa[rgument] sb[uffer] sbn[ext] sce scr[iptnames] setf[iletype] sg sgl si sil[ent] sl[eep] smenu snoremenu spelld[ump] spr[evious] srg st[op] stj[ump] sunmenu syn tN[ext] tabd[o] tabm[ove] tabr[ewind] tclf[ile] tl[ast] tr[ewind] una[bbreviate] unlo[ckvar] verb[ose] vimgrepa[dd] wN[ext] winc[md] wq x[it] xnoreme xwininfo
|
||||
syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bl[ast] brea[k] buffers cabc[lear] cb[uffer] cex[pr] cgete[xpr] cla[st] co[py] con[tinue] cr[ewind] d[elete] deletel delm[arks] diffo[ff] dir dp earlier elsei[f] endw[hile] files fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] j[oin] keepalt l[ist] lan[guage] lch[dir] le[ft] lfir[st] lgrepa[dd] lmak[e] lo[adview] lol[der] ls lv[imgrep] mak[e] messages mkvie[w] nb[key] noa nos[wapfile] on[ly] packl[oadall] po[p] pro ps[earch] ptl[ast] pu[t] pydo quita[ll] redr[aw] retu[rn] rub[y] sI sIn sal[l] sba[ll] sbp[revious] scg scripte[ncoding] setg[lobal] sgI sgn sic sim[alt] sla[st] smile so[urce] spelli[nfo] sr sri sta[g] stopi[nsert] sus[pend] sync ta[g] tabe[dit] tabn[ext] tabs te[aroff] tm[enu] try undoj[oin] uns[ilent] vert[ical] viu[sage] w[rite] windo wqa[ll] xa[ll] xnoremenu y[ank]
|
||||
syn keyword vimCommand contained ar[gs] argl[ocal] ba[ll] bm[odified] breaka[dd] bun[load] cad[dbuffer] cc cf[ile] changes clo[se] col[der] conf[irm] cs debug deletep delp diffp[atch] dj[ump] dr[op] ec em[enu] ene[w] filet fix[del] for gui helpg[rep] ia in
|
||||
syn keyword vimCommand contained a arga[dd] argu[ment] bad[d] bn[ext] breakd[el] bw[ipeout] cadde[xpr] ccl[ose] cfdo chd[ir] clo[se] col[der] conf[irm] cs debug deletep delp diffp[atch] dj[ump] dr[op] ec em[enu] ene[w] filet fix[del] for gui helpg[rep] ia in ju[mps] keepj[umps] la[st] lat lcl[ose] lefta[bove] lg[etfile] lh[elpgrep] lmapc[lear] loadk lop[en] lt[ag] lvimgrepa[dd] marks mk[exrc] mod[e] nbc[lose] noautocmd nu[mber] opt[ions] pc[lose] popu[p] prof[ile] ptN[ext] ptn[ext] pw[d] pyf[ile] r[ead] redraws[tatus] rew[ind] rubyd[o] sIc sIp san[dbox] sbf[irst] sbr[ewind] sci scs setl[ocal] sgc sgp sie sin sm[agic] sn[ext] sor[t] spellr[epall] srI srl star[tinsert] sts[elect] sv[iew] syncbind tab tabf[ind] tabnew tags tf[irst] tn[ext] ts[elect] undol[ist] up[date] vi[sual] vmapc[lear] wa[ll] winp[os] ws[verb] xmapc[lear] xprop
|
||||
syn keyword vimCommand contained ab argd[elete] as[cii] bd[elete] bo[tright] breakl[ist] cN[ext] caddf[ile] cd cfir[st] che[ckpath] cmapc[lear] colo[rscheme] cope[n] cscope debugg[reedy] deletl dep diffpu[t] dl ds[earch] echoe[rr] en[dif] ex filetype fo[ld] fu[nction] gvim helpt[ags] iabc[lear] intro k keepp[atterns] lad[dexpr] later lcs lex[pr] lgetb[uffer] ll lne[xt] loadkeymap lp[revious] lua lw[indow] mat[ch] mks[ession] mz[scheme] nbs[tart] noh[lsearch] o[pen] ownsyntax pe[rl] pp[op] profd[el] pta[g] ptp[revious] py3 python3 rec[over] reg[isters] ri[ght] rubyf[ile] sIe sIr sav[eas] sbl[ast] sc scl scscope sf[ind] sge sgr sig sip sm[ap] sno[magic] sp[lit] spellu[ndo] src srn startg[replace] sun[hide] sw[apname] syntime tabN[ext] tabfir[st] tabo[nly] tc[l] th[row] to[pleft] tu[nmenu] unh[ide] v vie[w] vne[w] wh[ile] wn[ext] wundo xme xunme
|
||||
syn keyword vimCommand contained abc[lear] argdo au bel[owright] bp[revious] bro[wse] cNf[ile] cal[l] cdo cg[etfile] checkt[ime] cn[ext] com cp[revious] cstag delc[ommand] deletp di[splay] diffs[plit] dli[st] dsp[lit] echom[sg] endf[unction] exi[t] fin[d] foldc[lose] g h[elp] hi if is[earch] kee[pmarks] lN[ext] laddb[uffer] lb[uffer] lcscope lf[ile] lgete[xpr] lla[st] lnew[er] loc[kmarks] lpf[ile] luado m[ove] menut[ranslate] mksp[ell] mzf[ile] new nor ol[dfiles] p[rint] ped[it] pre[serve] promptf[ind] ptf[irst] ptr[ewind] py3do q[uit] red[o] res[ize] rightb[elow] rundo sIg sN[ext] sbN[ext] sbm[odified] scI scp se[t] sfir[st] sgi sh[ell] sign sir sme snoreme spe[llgood] spellw[rong] sre[wind] srp startr[eplace] sunme sy t tabc[lose] tabl[ast] tabp[revious] tcld[o] tj[ump] tp[revious] u[ndo] unl ve[rsion] vim[grep] vs[plit] win[size] wp[revious] wv[iminfo] xmenu xunmenu
|
||||
syn keyword vimCommand contained abo[veleft] arge[dit] bN[ext] bf[irst] br[ewind] bufdo c[hange] cat[ch] ce[nter] cgetb[uffer] cl[ist] cnew[er] comc[lear] cpf[ile] cuna[bbrev] delel delf[unction] dif[fupdate] difft[his] do e[dit] echon endfo[r] exu[sage] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] ij[ump] isp[lit] keepa lNf[ile] laddf[ile] lc[d] ld[o] lfdo lgr[ep] lli[st] lnf[ile] lockv[ar] lr[ewind] luafile ma[rk] mes mkv[imrc] n[ext] nmapc[lear] nore omapc[lear] pa[ckadd] perld[o] prev[ious] promptr[epl] ptj[ump] pts[elect] py[thon] qa[ll] redi[r] ret[ab] ru[ntime] rv[iminfo] sIl sa[rgument] sb[uffer] sbn[ext] sce scr[iptnames] setf[iletype] sg sgl si sil[ent] sl[eep] smenu snoremenu spelld[ump] spr[evious] srg st[op] stj[ump] sunmenu syn tN[ext] tabd[o] tabm[ove] tabr[ewind] tclf[ile] tl[ast] tr[ewind] una[bbreviate] unlo[ckvar] verb[ose] vimgrepa[dd] wN[ext] winc[md] wq x[it] xnoreme xwininfo
|
||||
syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bl[ast] brea[k] buffers cabc[lear] cb[uffer] cex[pr] cgete[xpr] cla[st] cnf[ile] comp[iler] cq[uit] cw[indow] delep dell diffg[et] dig[raphs] doau ea el[se] endt[ry] f[ile] fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] iuna[bbrev] keepalt l[ist] lan[guage] lch[dir] le[ft] lfir[st] lgrepa[dd] lmak[e] lo[adview] lol[der] ls lv[imgrep] mak[e] messages mkvie[w] nb[key] noa nos[wapfile] on[ly] packl[oadall] po[p] pro ps[earch] ptl[ast] pu[t] pydo quita[ll] redr[aw] retu[rn] rub[y] sI sIn sal[l] sba[ll] sbp[revious] scg scripte[ncoding] setg[lobal] sgI sgn sic sim[alt] sla[st] smile so[urce] spelli[nfo] sr sri sta[g] stopi[nsert] sus[pend] sync ta[g] tabe[dit] tabn[ext] tabs te[aroff] tm[enu] try undoj[oin] uns[ilent] vert[ical] viu[sage] w[rite] windo wqa[ll] xa[ll] xnoremenu y[ank]
|
||||
syn keyword vimCommand contained ar[gs] argl[ocal] ba[ll] bm[odified] breaka[dd] bun[load] cad[dbuffer] cc cf[ile] changes cle[arjumps] co[py] con[tinue] cr[ewind] d[elete] deletel delm[arks] diffo[ff] dir dp earlier elsei[f] endw[hile] files fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] j[oin]
|
||||
syn match vimCommand contained "\<z[-+^.=]\=\>"
|
||||
syn keyword vimStdPlugin contained DiffOrig Man N[ext] P[rint] S TOhtml XMLent XMLns
|
||||
|
||||
@@ -76,10 +76,10 @@ syn match vimHLGroup contained "Conceal"
|
||||
syn case match
|
||||
|
||||
" Function Names {{{2
|
||||
syn keyword vimFuncName contained abs and arglistid assert_exception assert_notequal atan2 buflisted bufwinnr call ch_close ch_getjob ch_open ch_sendraw clearmatches complete_check cosh deepcopy diff_hlID eval exists feedkeys finddir fmod foldclosedend foldtextresult garbagecollect getbufline getcharmod getcmdpos getcurpos getfperm getftype getmatches getqflist gettabvar getwinposy glob2regpat has_key histadd histnr hostname index inputlist inputsecret isdirectory items job_setoptions job_stop js_encode keys libcallnr lispindent log10 maparg matchadd matchdelete matchstr min mzeval or pow pumvisible range reltimefloat remote_foreground remote_send repeat round screencol searchdecl searchpos setbufvar setfperm setmatches setreg setwinvar shiftwidth sinh spellbadword sqrt strcharpart strftime string strridx submatch synID synstack tabpagebuflist tagfiles tanh timer_stop tr undofile values wildmenumode win_findbuf winheight winline winrestview wordcount
|
||||
syn keyword vimFuncName contained acos append argv assert_fails assert_notmatch browse bufloaded byte2line ceil ch_evalexpr ch_info ch_read ch_setoptions col confirm count delete disable_char_avail_for_testing eventhandler exp filereadable findfile fnameescape foldlevel foreground garbagecollect_for_testing getbufvar getcharsearch getcmdtype getcwd getfsize getline getpid getreg gettabwinvar getwinvar globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked job_getchannel job_start join json_decode len line localtime luaeval mapcheck matchaddpos matchend matchstrpos mkdir nextnonblank pathshorten prevnonblank py3eval readfile reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client setcharsearch setline setpos settabvar sha256 simplify sort spellsuggest str2float strchars strgetchar strlen strtrans substitute synIDattr system tabpagenr taglist tempname tolower trunc undotree virtcol winbufnr win_getid win_id2tabwin winnr winsaveview writefile
|
||||
syn keyword vimFuncName contained add argc asin assert_false assert_true browsedir bufname byteidx changenr ch_evalraw ch_log ch_readraw ch_status complete copy cscope_connection did_filetype empty executable expand filewritable float2nr fnamemodify foldtext function get getchar getcmdline getcmdwintype getfontname getftime getloclist getpos getregtype getwinposx glob has hasmapto histget hlID indent inputdialog inputsave invert isnan job_info job_status js_decode json_encode libcall line2byte log map match matcharg matchlist max mode nr2char perleval printf pyeval reltime remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setcmdpos setloclist setqflist settabwinvar shellescape sin soundfold split str2nr strdisplaywidth stridx strpart strwidth synconcealed synIDtrans systemlist tabpagewinnr tan timer_start toupper type uniq visualmode wincol win_gotoid win_id2win winrestcmd winwidth xor
|
||||
syn keyword vimFuncName contained alloc_fail argidx assert_equal assert_match atan bufexists bufnr byteidxcomp char2nr ch_getbufnr ch_logfile ch_sendexpr cindent complete_add cos cursor diff_filler escape exepath extend filter floor foldclosed
|
||||
syn keyword vimFuncName contained abs append argv assert_fails assert_notmatch browse bufloaded bufwinnr call ch_close ch_getjob ch_open ch_sendraw clearmatches complete_check cosh deepcopy diff_hlID eventhandler exp filereadable findfile fnameescape foldlevel function getbufvar getcmdline getcurpos getfsize getloclist getqflist gettabwinvar getwinvar globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked job_getchannel job_start join json_decode len line localtime luaeval mapcheck matchaddpos matchend matchstrpos mkdir nextnonblank pathshorten prevnonblank py3eval readfile reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client setcharsearch setline setpos settabvar sha256 simplify sort spellsuggest str2float strchars strgetchar strlen strtrans substitute synIDattr system tabpagenr taglist tempname test_garbagecollect_now test_null_job test_null_string timer_stop tr undofile values wildmenumode win_findbuf winheight winline winrestview wordcount
|
||||
syn keyword vimFuncName contained acos argc asin assert_false assert_true browsedir bufname byte2line ceil ch_evalexpr ch_info ch_read ch_setoptions col confirm count delete empty executable expand filewritable float2nr fnamemodify foldtext garbagecollect getchar getcmdpos getcwd getftime getmatches getreg getwinposx glob has hasmapto histget hlID indent inputdialog inputsave invert isnan job_info job_status js_decode json_encode libcall line2byte log map match matcharg matchlist max mode nr2char perleval printf pyeval reltime remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setcmdpos setloclist setqflist settabwinvar shellescape sin soundfold split str2nr strdisplaywidth stridx strpart strwidth synconcealed synIDtrans systemlist tabpagewinnr tan test_alloc_fail test_null_channel test_null_list test_settime tolower trunc undotree virtcol winbufnr win_getid win_id2tabwin winnr winsaveview writefile
|
||||
syn keyword vimFuncName contained add argidx assert_equal assert_match atan bufexists bufnr byteidx changenr ch_evalraw ch_log ch_readraw ch_status complete copy cscope_connection did_filetype escape exepath extend filter floor foldclosed foldtextresult get getcharmod getcmdtype getfontname getftype getpid getregtype getwinposy glob2regpat has_key histadd histnr hostname index inputlist inputsecret isdirectory items job_setoptions job_stop js_encode keys libcallnr lispindent log10 maparg matchadd matchdelete matchstr min mzeval or pow pumvisible range reltimefloat remote_foreground remote_send repeat round screencol searchdecl searchpos setbufvar setfperm setmatches setreg setwinvar shiftwidth sinh spellbadword sqrt strcharpart strftime string strridx submatch synID synstack tabpagebuflist tagfiles tanh test_disable_char_avail test_null_dict test_null_partial timer_start toupper type uniq visualmode wincol win_gotoid win_id2win winrestcmd winwidth xor
|
||||
syn keyword vimFuncName contained and arglistid assert_exception assert_notequal atan2 buflisted bufwinid byteidxcomp char2nr ch_getbufnr ch_logfile ch_sendexpr cindent complete_add cos cursor diff_filler eval exists feedkeys finddir fmod foldclosedend foreground getbufline getcharsearch getcmdwintype getfperm getline getpos gettabvar
|
||||
|
||||
"--- syntax here and above generated by mkvimvim ---
|
||||
" Special Vim Highlighting (not automatic) {{{1
|
||||
@@ -268,7 +268,7 @@ if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nousercmderror")
|
||||
endif
|
||||
syn case ignore
|
||||
syn keyword vimUserAttrbKey contained bar ban[g] cou[nt] ra[nge] com[plete] n[args] re[gister]
|
||||
syn keyword vimUserAttrbCmplt contained augroup buffer color command compiler cscope dir environment event expression file file_in_path filetype function help highlight locale mapping menu option shellcmd sign syntax tag tag_listfiles var
|
||||
syn keyword vimUserAttrbCmplt contained augroup buffer behave color command compiler cscope dir environment event expression file file_in_path filetype function help highlight history locale mapping menu option packadd shellcmd sign syntax syntime tag tag_listfiles user var
|
||||
syn keyword vimUserAttrbCmplt contained custom customlist nextgroup=vimUserAttrbCmpltFunc,vimUserCmdError
|
||||
syn match vimUserAttrbCmpltFunc contained ",\%([sS]:\|<[sS][iI][dD]>\)\=\%(\h\w*\%(#\h\w*\)\+\|\h\w*\)"hs=s+1 nextgroup=vimUserCmdError
|
||||
|
||||
@@ -418,7 +418,7 @@ syn match vimNotation "\(\\\|<lt>\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\
|
||||
syn match vimNotation "\(\\\|<lt>\)\=<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\)\=\(drag\|release\)\=>" contains=vimBracket
|
||||
syn match vimNotation "\(\\\|<lt>\)\=<\(bslash\|plug\|sid\|space\|bar\|nop\|nul\|lt\)>" contains=vimBracket
|
||||
syn match vimNotation '\(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket
|
||||
syn match vimNotation '\(\\\|<lt>\)\=<\%(q-\)\=\(line[12]\|count\|bang\|reg\|args\|f-args\|lt\)>' contains=vimBracket
|
||||
syn match vimNotation '\(\\\|<lt>\)\=<\%(q-\)\=\(line[12]\|count\|bang\|reg\|args\|mods\|f-args\|f-mods\|lt\)>' contains=vimBracket
|
||||
syn match vimNotation "\(\\\|<lt>\)\=<\([cas]file\|abuf\|amatch\|cword\|cWORD\|client\)>" contains=vimBracket
|
||||
syn match vimBracket contained "[\\<>]"
|
||||
syn case match
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim .viminfo file
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2012 Feb 03
|
||||
" Last Change: 2016 Jun 05
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -30,11 +30,15 @@ syn match viminfoOptionName "\*\a*"ms=s+1 contained
|
||||
" Comments
|
||||
syn match viminfoComment "^#.*"
|
||||
|
||||
" New style lines. TODO: highlight numbers and strings.
|
||||
syn match viminfoNew "^|.*"
|
||||
|
||||
" Define the default highlighting.
|
||||
" Only used when an item doesn't have highlighting yet
|
||||
hi def link viminfoComment Comment
|
||||
hi def link viminfoError Error
|
||||
hi def link viminfoStatement Statement
|
||||
hi def link viminfoNew String
|
||||
|
||||
let b:current_syntax = "viminfo"
|
||||
|
||||
|
||||
@@ -6,9 +6,10 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
main()
|
||||
main(void)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
|
||||
1037
runtime/tutor/tutor.bg.utf-8
Normal file
1037
runtime/tutor/tutor.bg.utf-8
Normal file
File diff suppressed because it is too large
Load Diff
@@ -160,7 +160,7 @@ RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo.
|
||||
|
||||
4. Konservu la dosieron kun <20>an<61>oj kaj eliru el Vim per: :wq <Enenklavo>
|
||||
|
||||
5. Se vi eliris la instruilon vimtutor en pa<70>o 1, restartigu la intruilon
|
||||
5. Se vi eliris el la instruilo vimtutor en pa<70>o 1, restartigu la instruilon
|
||||
vimtutor kaj movi<76>u suben al la sekvanta resumo.
|
||||
|
||||
6. Post kiam vi legis la suprajn pa<70>ojn, kaj komprenis ilin: faru ilin.
|
||||
@@ -229,7 +229,7 @@ Nun da
|
||||
|
||||
3. Movu la kursoron <20>e la fino de la <20>usta linio (POST la unua . ).
|
||||
|
||||
4. Tajpu d$ por foriv<69>i <20>is la fino de la linio.
|
||||
4. Tajpu d$ por forivi<EFBFBD>i <20>is la fino de la linio.
|
||||
|
||||
---> Iu tajpis la finon de <20>i tiu linio dufoje. fino de <20>i tiu linio dufoje.
|
||||
|
||||
@@ -670,7 +670,7 @@ RIMARKO: Se vi volus eliri el Vim kaj restartigi
|
||||
3. Premu la : signon. <20>e la fino de la ekrano :'<,'> aperos.
|
||||
|
||||
4. Tajpu w TESTO , kie TESTO estas dosiernomo, kiu ankora<72> ne ekzistas.
|
||||
Kontrolu, ke vi vidas :'<,'>w TESTO anta<74> premi <Enenklavo>.
|
||||
Kontrolu, ke vi vidas :'<,'>w TESTO anta<74> ol premi <Enenklavo>.
|
||||
|
||||
5. Vim konservos la apartigitajn liniojn al la dosiero TESTO. Uzu :dir
|
||||
a<> :!ls por vidigi <20>in. Ne forvi<76>u <20>in. Ni uzos <20>in en la sekvanta
|
||||
@@ -688,7 +688,7 @@ RIMARKO: Premo de v komencas Viduman apartigon. Vi povas movi la kursoron
|
||||
|
||||
** Por enmeti la enhavon de dosiero, tajpu :r DOSIERNOMON **
|
||||
|
||||
1. Movu la kursoron <EFBFBD>us super <20>i tiu linio.
|
||||
1. Movu la kursoron tuj super <20>i tiu linio.
|
||||
|
||||
RIMARKO: Post plenumo de pa<70>o 2, vi vidos tekston el la leciono 5.3. Tiam
|
||||
movi<76>u SUBEN por vidi tiun lecionon denove.
|
||||
@@ -741,7 +741,7 @@ RIMARKO: Vi nun povas legi la eliron de ekstera komando. Ekzemple,
|
||||
2. Tajpu la minusklan literon o por malfermi linion SUB la kursoro kaj
|
||||
eniri la Enmetan re<72>imon.
|
||||
|
||||
3. Nun tajpu tekston kaj premu <ESK> por eliri la Enmetan re<72>imon.
|
||||
3. Nun tajpu tekston kaj premu <ESK> por eliri el la Enmeta re<72>imo.
|
||||
|
||||
---> Post tajpo de o la kursoro movi<76>as al la malfermata linio en
|
||||
Enmeta re<72>imo.
|
||||
@@ -765,7 +765,7 @@ RIMARKO: Vi nun povas legi la eliron de ekstera komando. Ekzemple,
|
||||
3. Tajpu a (minuskle) por aldoni tekston POST la kursoro.
|
||||
|
||||
4. Kompletigu la vorton same kiel la linio sub <20>i. Premu <ESK> por
|
||||
eliri la Enmetan re<72>imon.
|
||||
eliri el la Enmeta re<72>imo.
|
||||
|
||||
5. Uzu e por movi<76>i al la sekvanta nekompleta vorto kaj ripetu
|
||||
pa<70>ojn 3 kaj 4.
|
||||
@@ -789,7 +789,7 @@ RIMARKO:
|
||||
2. Nun premu R kaj tajpu la nombron sub <20>i en la dua linio, por ke <20>i
|
||||
anstata<74>igu la xxx .
|
||||
|
||||
3. Premu <ESK> por foriri la Anstata<74>igan re<72>imon. Rimarku, ke la cetera
|
||||
3. Premu <ESK> por foriri el la Anstata<74>iga re<72>imo. Rimarku, ke la cetera
|
||||
parto de la linio restas ne<6E>an<61>ata.
|
||||
|
||||
4. Ripetu la pa<70>ojn por anstata<74>igi la restantajn xxx.
|
||||
@@ -810,7 +810,7 @@ RIMARKO: Anstata
|
||||
|
||||
1. Iru al la linio markita per ---> sube kaj poziciu la kursoron post "a)".
|
||||
|
||||
2. Komencu la Viduman re<72>imon per v kaj movu la kursoron <EFBFBD>us anta<74> "unua".
|
||||
2. Komencu la Viduman re<72>imon per v kaj movu la kursoron tuj anta<74> "unua".
|
||||
|
||||
3. Tajpu y por kopii la emfazitan tekston.
|
||||
|
||||
@@ -986,6 +986,6 @@ RIMARKO: Kompletigo funkcias por multaj komandoj. Nur provu premi CTRL-D kaj
|
||||
|
||||
Esperantigita fare de Dominique Pell<6C>, 2008-04-01
|
||||
Retpo<70>to: dominique.pelle@gmail.com
|
||||
Lasta <20>an<61>o: 2011-11-27
|
||||
Lasta <20>an<61>o: 2016-07-02
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -160,7 +160,7 @@ RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo.
|
||||
|
||||
4. Konservu la dosieron kun ŝanĝoj kaj eliru el Vim per: :wq <Enenklavo>
|
||||
|
||||
5. Se vi eliris la instruilon vimtutor en paŝo 1, restartigu la intruilon
|
||||
5. Se vi eliris el la instruilo vimtutor en paŝo 1, restartigu la instruilon
|
||||
vimtutor kaj moviĝu suben al la sekvanta resumo.
|
||||
|
||||
6. Post kiam vi legis la suprajn paŝojn, kaj komprenis ilin: faru ilin.
|
||||
@@ -229,7 +229,7 @@ Nun daŭrigu al la leciono 2.
|
||||
|
||||
3. Movu la kursoron ĉe la fino de la ĝusta linio (POST la unua . ).
|
||||
|
||||
4. Tajpu d$ por forivŝi ĝis la fino de la linio.
|
||||
4. Tajpu d$ por foriviŝi ĝis la fino de la linio.
|
||||
|
||||
---> Iu tajpis la finon de ĉi tiu linio dufoje. fino de ĉi tiu linio dufoje.
|
||||
|
||||
@@ -670,7 +670,7 @@ RIMARKO: Se vi volus eliri el Vim kaj restartigi ĝin denove per vim TESTO,
|
||||
3. Premu la : signon. Ĉe la fino de la ekrano :'<,'> aperos.
|
||||
|
||||
4. Tajpu w TESTO , kie TESTO estas dosiernomo, kiu ankoraŭ ne ekzistas.
|
||||
Kontrolu, ke vi vidas :'<,'>w TESTO antaŭ premi <Enenklavo>.
|
||||
Kontrolu, ke vi vidas :'<,'>w TESTO antaŭ ol premi <Enenklavo>.
|
||||
|
||||
5. Vim konservos la apartigitajn liniojn al la dosiero TESTO. Uzu :dir
|
||||
aŭ :!ls por vidigi ĝin. Ne forviŝu ĝin. Ni uzos ĝin en la sekvanta
|
||||
@@ -688,7 +688,7 @@ RIMARKO: Premo de v komencas Viduman apartigon. Vi povas movi la kursoron
|
||||
|
||||
** Por enmeti la enhavon de dosiero, tajpu :r DOSIERNOMON **
|
||||
|
||||
1. Movu la kursoron ĵus super ĉi tiu linio.
|
||||
1. Movu la kursoron tuj super ĉi tiu linio.
|
||||
|
||||
RIMARKO: Post plenumo de paŝo 2, vi vidos tekston el la leciono 5.3. Tiam
|
||||
moviĝu SUBEN por vidi tiun lecionon denove.
|
||||
@@ -741,7 +741,7 @@ RIMARKO: Vi nun povas legi la eliron de ekstera komando. Ekzemple,
|
||||
2. Tajpu la minusklan literon o por malfermi linion SUB la kursoro kaj
|
||||
eniri la Enmetan reĝimon.
|
||||
|
||||
3. Nun tajpu tekston kaj premu <ESK> por eliri la Enmetan reĝimon.
|
||||
3. Nun tajpu tekston kaj premu <ESK> por eliri el la Enmeta reĝimo.
|
||||
|
||||
---> Post tajpo de o la kursoro moviĝas al la malfermata linio en
|
||||
Enmeta reĝimo.
|
||||
@@ -765,7 +765,7 @@ RIMARKO: Vi nun povas legi la eliron de ekstera komando. Ekzemple,
|
||||
3. Tajpu a (minuskle) por aldoni tekston POST la kursoro.
|
||||
|
||||
4. Kompletigu la vorton same kiel la linio sub ĝi. Premu <ESK> por
|
||||
eliri la Enmetan reĝimon.
|
||||
eliri el la Enmeta reĝimo.
|
||||
|
||||
5. Uzu e por moviĝi al la sekvanta nekompleta vorto kaj ripetu
|
||||
paŝojn 3 kaj 4.
|
||||
@@ -789,7 +789,7 @@ RIMARKO: Ĉiu a, i kaj A iras al la sama Enmeta reĝimo, la nura malsamo
|
||||
2. Nun premu R kaj tajpu la nombron sub ĝi en la dua linio, por ke ĝi
|
||||
anstataŭigu la xxx .
|
||||
|
||||
3. Premu <ESK> por foriri la Anstataŭigan reĝimon. Rimarku, ke la cetera
|
||||
3. Premu <ESK> por foriri el la Anstataŭiga reĝimo. Rimarku, ke la cetera
|
||||
parto de la linio restas neŝanĝata.
|
||||
|
||||
4. Ripetu la paŝojn por anstataŭigi la restantajn xxx.
|
||||
@@ -810,7 +810,7 @@ RIMARKO: Anstataŭiga reĝimo estas same kiel Enmeta reĝimo, sed ĉiu signo
|
||||
|
||||
1. Iru al la linio markita per ---> sube kaj poziciu la kursoron post "a)".
|
||||
|
||||
2. Komencu la Viduman reĝimon per v kaj movu la kursoron ĵus antaŭ "unua".
|
||||
2. Komencu la Viduman reĝimon per v kaj movu la kursoron tuj antaŭ "unua".
|
||||
|
||||
3. Tajpu y por kopii la emfazitan tekston.
|
||||
|
||||
@@ -986,6 +986,6 @@ RIMARKO: Kompletigo funkcias por multaj komandoj. Nur provu premi CTRL-D kaj
|
||||
|
||||
Esperantigita fare de Dominique Pellé, 2008-04-01
|
||||
Retpoŝto: dominique.pelle@gmail.com
|
||||
Lasta ŝanĝo: 2011-11-27
|
||||
Lasta ŝanĝo: 2016-07-02
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -190,7 +190,7 @@ NOTE : En avan
|
||||
|
||||
5. Pour ins<6E>rer ou ajouter du texte tapez :
|
||||
i tapez le texte <20> ins<6E>rer avant le curseur <<3C>chap>
|
||||
A tapez le texte <20> ajouter apr<EFBFBD>s le curseur <<3C>chap>
|
||||
A tapez le texte <20> ajouter en fin de ligne <<3C>chap>
|
||||
|
||||
NOTE : Appuyer <<3C>chap> vous place en mode Normal ou annule une commande
|
||||
partiellement tap<61>e dont vous ne voulez plus.
|
||||
@@ -1034,5 +1034,5 @@ NOTE : Le compl
|
||||
Derni<6E>res mises <20> jour par Dominique Pell<6C>.
|
||||
|
||||
E-mail : dominique.pelle@gmail.com
|
||||
Last Change : 2014 Aug 18
|
||||
Last Change : 2016 Jul 02
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -190,7 +190,7 @@ NOTE : En avançant dans ce cours, n'essayez pas de mémoriser, apprenez par
|
||||
|
||||
5. Pour insérer ou ajouter du texte tapez :
|
||||
i tapez le texte à insérer avant le curseur <Échap>
|
||||
A tapez le texte à ajouter après le curseur <Échap>
|
||||
A tapez le texte à ajouter en fin de ligne <Échap>
|
||||
|
||||
NOTE : Appuyer <Échap> vous place en mode Normal ou annule une commande
|
||||
partiellement tapée dont vous ne voulez plus.
|
||||
@@ -1034,5 +1034,5 @@ NOTE : Le complètement fonctionne pour de nombreuses commandes. Essayez
|
||||
Dernières mises à jour par Dominique Pellé.
|
||||
|
||||
E-mail : dominique.pelle@gmail.com
|
||||
Last Change : 2014 Aug 18
|
||||
Last Change : 2016 Jul 02
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim tutor support file
|
||||
" Author: Eduardo F. Amatria <eferna1@platea.pntic.mec.es>
|
||||
" Maintainer: Bram Moolenaar
|
||||
" Last Change: 2014 Jun 25
|
||||
" Last Change: 2016 Jul 16
|
||||
|
||||
" This Vim script is used for detecting if a translation of the
|
||||
" tutor file exist, i.e., a tutor.xx file, where xx is the language.
|
||||
@@ -42,6 +42,8 @@ else
|
||||
let s:ext = ".cs"
|
||||
elseif s:lang =~ "Dutch"
|
||||
let s:ext = ".nl"
|
||||
elseif s:lang =~ "Bulgarian"
|
||||
let s:ext = ".bg"
|
||||
else
|
||||
let s:ext = "." . strpart(s:lang, 0, 2)
|
||||
endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" An example for a vimrc file.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2016 Apr 05
|
||||
" Last change: 2016 Jul 28
|
||||
"
|
||||
" To use it, copy it to
|
||||
" for Unix and OS/2: ~/.vimrc
|
||||
@@ -14,60 +14,26 @@ if v:progname =~? "evim"
|
||||
finish
|
||||
endif
|
||||
|
||||
" Use Vim settings, rather than Vi settings (much better!).
|
||||
" This must be first, because it changes other options as a side effect.
|
||||
set nocompatible
|
||||
|
||||
" allow backspacing over everything in insert mode
|
||||
set backspace=indent,eol,start
|
||||
" Get the defaults that most users want.
|
||||
source $VIMRUNTIME/defaults.vim
|
||||
|
||||
if has("vms")
|
||||
set nobackup " do not keep a backup file, use versions instead
|
||||
else
|
||||
set backup " keep a backup file (restore to previous version)
|
||||
set undofile " keep an undo file (undo changes after closing)
|
||||
endif
|
||||
set history=50 " keep 50 lines of command line history
|
||||
set ruler " show the cursor position all the time
|
||||
set showcmd " display incomplete commands
|
||||
set incsearch " do incremental searching
|
||||
|
||||
" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
|
||||
" let &guioptions = substitute(&guioptions, "t", "", "g")
|
||||
|
||||
" Don't use Ex mode, use Q for formatting
|
||||
map Q gq
|
||||
|
||||
" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo,
|
||||
" so that you can undo CTRL-U after inserting a line break.
|
||||
inoremap <C-U> <C-G>u<C-U>
|
||||
|
||||
" In many terminal emulators the mouse works just fine, thus enable it.
|
||||
if has('mouse')
|
||||
set mouse=a
|
||||
if has('persistent_undo')
|
||||
set undofile " keep an undo file (undo changes after closing)
|
||||
endif
|
||||
endif
|
||||
|
||||
" Switch syntax highlighting on when the terminal has colors or when using the
|
||||
" GUI (which always has colors).
|
||||
if &t_Co > 2 || has("gui_running")
|
||||
syntax on
|
||||
|
||||
" Also switch on highlighting the last used search pattern.
|
||||
" Switch on highlighting the last used search pattern.
|
||||
set hlsearch
|
||||
|
||||
" I like highlighting strings inside C comments.
|
||||
let c_comment_strings=1
|
||||
endif
|
||||
|
||||
" Only do this part when compiled with support for autocommands.
|
||||
if has("autocmd")
|
||||
|
||||
" Enable file type detection.
|
||||
" Use the default filetype settings, so that mail gets 'tw' set to 72,
|
||||
" 'cindent' is on in C files, etc.
|
||||
" Also load indent files, to automatically do language-dependent indenting.
|
||||
filetype plugin indent on
|
||||
|
||||
" Put these in an autocmd group, so that we can delete them easily.
|
||||
augroup vimrcEx
|
||||
au!
|
||||
@@ -75,14 +41,6 @@ if has("autocmd")
|
||||
" For all text files set 'textwidth' to 78 characters.
|
||||
autocmd FileType text setlocal textwidth=78
|
||||
|
||||
" When editing a file, always jump to the last known cursor position.
|
||||
" Don't do it when the position is invalid or when inside an event handler
|
||||
" (happens when dropping a file on gvim).
|
||||
autocmd BufReadPost *
|
||||
\ if line("'\"") >= 1 && line("'\"") <= line("$") |
|
||||
\ exe "normal! g`\"" |
|
||||
\ endif
|
||||
|
||||
augroup END
|
||||
|
||||
else
|
||||
@@ -91,24 +49,10 @@ else
|
||||
|
||||
endif " has("autocmd")
|
||||
|
||||
" Convenient command to see the difference between the current buffer and the
|
||||
" file it was loaded from, thus the changes you made.
|
||||
" Only define it when not defined already.
|
||||
if !exists(":DiffOrig")
|
||||
command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
|
||||
\ | wincmd p | diffthis
|
||||
endif
|
||||
|
||||
if has('langmap') && exists('+langnoremap')
|
||||
" Prevent that the langmap option applies to characters that result from a
|
||||
" mapping. If unset (default), this may break plugins (but it's backward
|
||||
" compatible).
|
||||
set langnoremap
|
||||
endif
|
||||
|
||||
|
||||
" Add optional packages.
|
||||
"
|
||||
" The matchit plugin makes the % command work better, but it is not backwards
|
||||
" compatible.
|
||||
packadd matchit
|
||||
if has('syntax') && has('eval')
|
||||
packadd matchit
|
||||
endif
|
||||
|
||||
@@ -49,7 +49,7 @@ Building with Visual Studio (VS 98, VS .NET, VS .NET 2003, VS 2005, VS 2008,
|
||||
VS2010, VS2012, VS2013 and VS2015) is straightforward. (These instructions
|
||||
should also work for VS 4 and VS 5.)
|
||||
|
||||
Using VS C++ 2008 Express is recommended, the binaries build with that run on
|
||||
Using VS C++ 2008 Express is recommended, the binaries built with that run on
|
||||
nearly all platforms. Binaries from later versions may not run on Windows 95
|
||||
or XP.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# Makefile for Vim.
|
||||
# Compiler: Borland C++ 5.0 and later 32-bit compiler
|
||||
# Targets: Dos16 or Win32 (Windows NT and Windows 95) (with/without GUI)
|
||||
# Targets: Win32 (Windows NT and Windows 95) (with/without GUI)
|
||||
#
|
||||
# NOTE: THIS IS OLD AND PROBABLY NO LONGER WORKS.
|
||||
#
|
||||
@@ -537,26 +537,31 @@ vimwinmain = \
|
||||
!endif
|
||||
|
||||
vimobj = \
|
||||
$(OBJDIR)\arabic.obj \
|
||||
$(OBJDIR)\blowfish.obj \
|
||||
$(OBJDIR)\buffer.obj \
|
||||
$(OBJDIR)\charset.obj \
|
||||
$(OBJDIR)\crypt.obj \
|
||||
$(OBJDIR)\crypt_zip.obj \
|
||||
$(OBJDIR)\dict.obj \
|
||||
$(OBJDIR)\diff.obj \
|
||||
$(OBJDIR)\digraph.obj \
|
||||
$(OBJDIR)\edit.obj \
|
||||
$(OBJDIR)\eval.obj \
|
||||
$(OBJDIR)\evalfunc.obj \
|
||||
$(OBJDIR)\ex_cmds.obj \
|
||||
$(OBJDIR)\ex_cmds2.obj \
|
||||
$(OBJDIR)\ex_docmd.obj \
|
||||
$(OBJDIR)\ex_eval.obj \
|
||||
$(OBJDIR)\ex_getln.obj \
|
||||
$(OBJDIR)\farsi.obj \
|
||||
$(OBJDIR)\fileio.obj \
|
||||
$(OBJDIR)\fold.obj \
|
||||
$(OBJDIR)\getchar.obj \
|
||||
$(OBJDIR)\hardcopy.obj \
|
||||
$(OBJDIR)\hashtab.obj \
|
||||
$(OBJDIR)\json.obj \
|
||||
$(OBJDIR)\list.obj \
|
||||
$(OBJDIR)\main.obj \
|
||||
$(OBJDIR)\mark.obj \
|
||||
$(OBJDIR)\memfile.obj \
|
||||
@@ -577,11 +582,13 @@ vimobj = \
|
||||
$(OBJDIR)\search.obj \
|
||||
$(OBJDIR)\sha256.obj \
|
||||
$(OBJDIR)\spell.obj \
|
||||
$(OBJDIR)\spellfile.obj \
|
||||
$(OBJDIR)\syntax.obj \
|
||||
$(OBJDIR)\tag.obj \
|
||||
$(OBJDIR)\term.obj \
|
||||
$(OBJDIR)\ui.obj \
|
||||
$(OBJDIR)\undo.obj \
|
||||
$(OBJDIR)\userfunc.obj \
|
||||
$(OBJDIR)\version.obj \
|
||||
$(OBJDIR)\window.obj \
|
||||
$(OBJDIR)\pathdef.obj
|
||||
|
||||
@@ -42,7 +42,8 @@ DIRECTX=no
|
||||
FEATURES=HUGE
|
||||
# Set to one of i386, i486, i586, i686 as the minimum target processor.
|
||||
# For amd64/x64 architecture set ARCH=x86-64 .
|
||||
ARCH=i686
|
||||
# If not set, it will be automatically detected. (Normally i686 or x86-64.)
|
||||
#ARCH=i686
|
||||
# Set to yes to cross-compile from unix; no=native Windows (and Cygwin).
|
||||
CROSS=no
|
||||
# Set to path to iconv.h and libiconv.a to enable using 'iconv.dll'.
|
||||
@@ -112,6 +113,46 @@ INTLLIB=gnu_gettext
|
||||
#INTLPATH=$(GETTEXT)/lib
|
||||
#INTLLIB=intl
|
||||
|
||||
|
||||
# Command definitions (depends on cross-compiling and shell)
|
||||
ifeq ($(CROSS),yes)
|
||||
# cross-compiler prefix:
|
||||
ifndef CROSS_COMPILE
|
||||
CROSS_COMPILE = i586-pc-mingw32msvc-
|
||||
endif
|
||||
DEL = rm
|
||||
MKDIR = mkdir -p
|
||||
DIRSLASH = /
|
||||
else
|
||||
# normal (Windows) compilation:
|
||||
ifndef CROSS_COMPILE
|
||||
CROSS_COMPILE =
|
||||
endif
|
||||
ifneq (sh.exe, $(SHELL))
|
||||
DEL = rm
|
||||
MKDIR = mkdir -p
|
||||
DIRSLASH = /
|
||||
else
|
||||
DEL = del
|
||||
MKDIR = mkdir
|
||||
DIRSLASH = \\
|
||||
endif
|
||||
endif
|
||||
CC := $(CROSS_COMPILE)gcc
|
||||
CXX := $(CROSS_COMPILE)g++
|
||||
ifeq ($(UNDER_CYGWIN),yes)
|
||||
WINDRES := $(CROSS_COMPILE)windres
|
||||
else
|
||||
WINDRES := windres
|
||||
endif
|
||||
WINDRES_CC = $(CC)
|
||||
|
||||
# Get the default ARCH.
|
||||
ifndef ARCH
|
||||
ARCH := $(shell $(CC) -dumpmachine | sed -e 's/-.*//' -e 's/_/-/' -e 's/^mingw32$$/i686/')
|
||||
endif
|
||||
|
||||
|
||||
# Perl interface:
|
||||
# PERL=[Path to Perl directory] (Set inside Make_cyg.mak or Make_ming.mak)
|
||||
# DYNAMIC_PERL=yes (to load the Perl DLL dynamically)
|
||||
@@ -379,41 +420,10 @@ endif # RUBY
|
||||
# Any other defines can be included here.
|
||||
DEF_GUI=-DFEAT_GUI_W32 -DFEAT_CLIPBOARD
|
||||
DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
|
||||
-DHAVE_PATHDEF -DFEAT_$(FEATURES)
|
||||
-DHAVE_PATHDEF -DFEAT_$(FEATURES) -DHAVE_STDINT_H
|
||||
ifeq ($(ARCH),x86-64)
|
||||
DEFINES+=-DMS_WIN64
|
||||
endif
|
||||
ifeq ($(CROSS),yes)
|
||||
# cross-compiler prefix:
|
||||
ifndef CROSS_COMPILE
|
||||
CROSS_COMPILE = i586-pc-mingw32msvc-
|
||||
endif
|
||||
DEL = rm
|
||||
MKDIR = mkdir -p
|
||||
DIRSLASH = /
|
||||
else
|
||||
# normal (Windows) compilation:
|
||||
ifndef CROSS_COMPILE
|
||||
CROSS_COMPILE =
|
||||
endif
|
||||
ifneq (sh.exe, $(SHELL))
|
||||
DEL = rm
|
||||
MKDIR = mkdir -p
|
||||
DIRSLASH = /
|
||||
else
|
||||
DEL = del
|
||||
MKDIR = mkdir
|
||||
DIRSLASH = \\
|
||||
endif
|
||||
endif
|
||||
CC := $(CROSS_COMPILE)gcc
|
||||
CXX := $(CROSS_COMPILE)g++
|
||||
ifeq ($(UNDER_CYGWIN),yes)
|
||||
WINDRES := $(CROSS_COMPILE)windres
|
||||
else
|
||||
WINDRES := windres
|
||||
endif
|
||||
WINDRES_CC = $(CC)
|
||||
|
||||
#>>>>> end of choices
|
||||
###########################################################################
|
||||
@@ -592,27 +602,33 @@ endif
|
||||
|
||||
LIB = -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lversion
|
||||
GUIOBJ = $(OUTDIR)/gui.o $(OUTDIR)/gui_w32.o $(OUTDIR)/gui_beval.o $(OUTDIR)/os_w32exe.o
|
||||
CUIOBJ = $(OUTDIR)/iscygpty.o
|
||||
OBJ = \
|
||||
$(OUTDIR)/arabic.o \
|
||||
$(OUTDIR)/blowfish.o \
|
||||
$(OUTDIR)/buffer.o \
|
||||
$(OUTDIR)/charset.o \
|
||||
$(OUTDIR)/crypt.o \
|
||||
$(OUTDIR)/crypt_zip.o \
|
||||
$(OUTDIR)/dict.o \
|
||||
$(OUTDIR)/diff.o \
|
||||
$(OUTDIR)/digraph.o \
|
||||
$(OUTDIR)/edit.o \
|
||||
$(OUTDIR)/eval.o \
|
||||
$(OUTDIR)/evalfunc.o \
|
||||
$(OUTDIR)/ex_cmds.o \
|
||||
$(OUTDIR)/ex_cmds2.o \
|
||||
$(OUTDIR)/ex_docmd.o \
|
||||
$(OUTDIR)/ex_eval.o \
|
||||
$(OUTDIR)/ex_getln.o \
|
||||
$(OUTDIR)/farsi.o \
|
||||
$(OUTDIR)/fileio.o \
|
||||
$(OUTDIR)/fold.o \
|
||||
$(OUTDIR)/getchar.o \
|
||||
$(OUTDIR)/hardcopy.o \
|
||||
$(OUTDIR)/hashtab.o \
|
||||
$(OUTDIR)/json.o \
|
||||
$(OUTDIR)/list.o \
|
||||
$(OUTDIR)/main.o \
|
||||
$(OUTDIR)/mark.o \
|
||||
$(OUTDIR)/memfile.o \
|
||||
@@ -637,11 +653,13 @@ OBJ = \
|
||||
$(OUTDIR)/search.o \
|
||||
$(OUTDIR)/sha256.o \
|
||||
$(OUTDIR)/spell.o \
|
||||
$(OUTDIR)/spellfile.o \
|
||||
$(OUTDIR)/syntax.o \
|
||||
$(OUTDIR)/tag.o \
|
||||
$(OUTDIR)/term.o \
|
||||
$(OUTDIR)/ui.o \
|
||||
$(OUTDIR)/undo.o \
|
||||
$(OUTDIR)/userfunc.o \
|
||||
$(OUTDIR)/version.o \
|
||||
$(OUTDIR)/vimrc.o \
|
||||
$(OUTDIR)/window.o
|
||||
@@ -727,6 +745,7 @@ OBJ += $(GUIOBJ)
|
||||
LFLAGS += -mwindows
|
||||
OUTDIR = gobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
|
||||
else
|
||||
OBJ += $(CUIOBJ)
|
||||
TARGET := vim$(DEBUG_SUFFIX).exe
|
||||
OUTDIR = obj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
|
||||
endif
|
||||
@@ -842,6 +861,7 @@ endif
|
||||
INCL = vim.h feature.h os_win32.h os_dos.h ascii.h keymap.h term.h macros.h \
|
||||
structs.h regexp.h option.h ex_cmds.h proto.h globals.h farsi.h \
|
||||
gui.h
|
||||
CUI_INCL = iscygpty.h
|
||||
|
||||
$(OUTDIR)/if_python.o : if_python.c if_py_both.h $(INCL)
|
||||
$(CC) -c $(CFLAGS) $(PYTHONINC) $(PYTHON_HOME_DEF) $< -o $@
|
||||
@@ -887,6 +907,12 @@ if_perl.c: if_perl.xs typemap
|
||||
$(XSUBPP) -prototypes -typemap \
|
||||
$(PERLTYPEMAP) if_perl.xs > $@
|
||||
|
||||
$(OUTDIR)/iscygpty.o: iscygpty.c $(CUI_INCL)
|
||||
$(CC) -c $(CFLAGS) iscygpty.c -o $(OUTDIR)/iscygpty.o -U_WIN32_WINNT -D_WIN32_WINNT=0x0600 -DUSE_DYNFILEID -DENABLE_STUB_IMPL
|
||||
|
||||
$(OUTDIR)/main.o: main.c $(INCL) $(CUI_INCL)
|
||||
$(CC) -c $(CFLAGS) main.c -o $(OUTDIR)/main.o
|
||||
|
||||
$(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_INCL) $(NBDEBUG_SRC)
|
||||
$(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o
|
||||
|
||||
|
||||
@@ -26,26 +26,31 @@ LD = dcc
|
||||
${CC} ${PRE} ${CFLAGS} $< -o $@
|
||||
|
||||
SRC = \
|
||||
arabic.c \
|
||||
blowfish.c \
|
||||
buffer.c \
|
||||
charset.c \
|
||||
crypt.c \
|
||||
crypt_zip.c \
|
||||
dict.c \
|
||||
diff.c \
|
||||
digraph.c \
|
||||
edit.c \
|
||||
eval.c \
|
||||
evalfunc.c \
|
||||
ex_cmds.c \
|
||||
ex_cmds2.c \
|
||||
ex_docmd.c \
|
||||
ex_eval.c \
|
||||
ex_getln.c \
|
||||
farsi.c \
|
||||
fileio.c \
|
||||
fold.c \
|
||||
getchar.c \
|
||||
hardcopy.c \
|
||||
hashtab.c \
|
||||
json.c \
|
||||
list.c \
|
||||
main.c \
|
||||
mark.c \
|
||||
memfile.c \
|
||||
@@ -67,34 +72,41 @@ SRC = \
|
||||
search.c \
|
||||
sha256.c \
|
||||
spell.c \
|
||||
spellfile.c \
|
||||
syntax.c \
|
||||
tag.c \
|
||||
term.c \
|
||||
ui.c \
|
||||
undo.c \
|
||||
userfunc.c \
|
||||
window.c \
|
||||
version.c
|
||||
|
||||
OBJ = o/blowfish.o \
|
||||
OBJ = o/arabic.o \
|
||||
o/blowfish.o \
|
||||
o/buffer.o \
|
||||
o/charset.o \
|
||||
o/crypt.o \
|
||||
o/crypt_zip.o \
|
||||
o/dict.o \
|
||||
o/diff.o \
|
||||
o/digraph.o \
|
||||
o/edit.o \
|
||||
o/eval.o \
|
||||
o/evalfunc.o \
|
||||
o/ex_cmds.o \
|
||||
o/ex_cmds2.o \
|
||||
o/ex_docmd.o \
|
||||
o/ex_eval.o \
|
||||
o/ex_getln.o \
|
||||
o/farsi.o \
|
||||
o/fileio.o \
|
||||
o/fold.o \
|
||||
o/getchar.o \
|
||||
o/hardcopy.o \
|
||||
o/hashtab.o \
|
||||
o/json.o \
|
||||
o/list.o \
|
||||
o/main.o \
|
||||
o/mark.o \
|
||||
o/memfile.o \
|
||||
@@ -116,11 +128,13 @@ OBJ = o/blowfish.o \
|
||||
o/search.o \
|
||||
o/sha256.o \
|
||||
o/spell.o \
|
||||
o/spellfile.o \
|
||||
o/syntax.o \
|
||||
o/tag.o \
|
||||
o/term.o \
|
||||
o/ui.o \
|
||||
o/undo.o \
|
||||
o/userfunc.o \
|
||||
o/window.o \
|
||||
$(TERMLIB)
|
||||
|
||||
@@ -143,6 +157,8 @@ $(SYMS) : vim.h globals.h keymap.h macros.h ascii.h term.h os_amiga.h structs.h
|
||||
|
||||
###########################################################################
|
||||
|
||||
o/arabic.o: arabic.c $(SYMS)
|
||||
|
||||
o/blowfish.o: blowfish.c $(SYMS)
|
||||
|
||||
o/buffer.o: buffer.c $(SYMS)
|
||||
@@ -153,6 +169,8 @@ o/crypt.o: crypt.c $(SYMS)
|
||||
|
||||
o/crypt_zip.o: crypt_zip.c $(SYMS)
|
||||
|
||||
o/dict.o: dict.c $(SYMS)
|
||||
|
||||
o/diff.o: diff.c $(SYMS)
|
||||
|
||||
o/digraph.o: digraph.c $(SYMS)
|
||||
@@ -161,6 +179,8 @@ o/edit.o: edit.c $(SYMS)
|
||||
|
||||
o/eval.o: eval.c $(SYMS)
|
||||
|
||||
o/evalfunc.o: evalfunc.c $(SYMS)
|
||||
|
||||
o/ex_cmds.o: ex_cmds.c $(SYMS)
|
||||
|
||||
o/ex_cmds2.o: ex_cmds2.c $(SYMS)
|
||||
@@ -171,6 +191,8 @@ o/ex_eval.o: ex_eval.c $(SYMS) ex_cmds.h
|
||||
|
||||
o/ex_getln.o: ex_getln.c $(SYMS)
|
||||
|
||||
o/farsi.o: farsi.c $(SYMS)
|
||||
|
||||
o/fileio.o: fileio.c $(SYMS)
|
||||
|
||||
o/fold.o: fold.c $(SYMS)
|
||||
@@ -183,6 +205,8 @@ o/hashtab.o: hashtab.c $(SYMS)
|
||||
|
||||
o/json.o: json.c $(SYMS)
|
||||
|
||||
o/list.o: list.c $(SYMS)
|
||||
|
||||
o/main.o: main.c $(SYMS)
|
||||
|
||||
o/mark.o: mark.c $(SYMS)
|
||||
@@ -228,7 +252,9 @@ o/search.o: search.c $(SYMS) regexp.h
|
||||
|
||||
o/sha256.o: sha256.c $(SYMS)
|
||||
|
||||
o/spell.o: spell.c $(SYMS)
|
||||
o/spell.o: spell.c $(SYMS) spell.h
|
||||
|
||||
o/spellfile.o: spellfile.c $(SYMS) spell.h
|
||||
|
||||
o/syntax.o: syntax.c $(SYMS)
|
||||
|
||||
@@ -238,8 +264,10 @@ o/term.o: term.c $(SYMS) term.h
|
||||
|
||||
o/termlib.o: termlib.c $(SYMS)
|
||||
|
||||
o/ui.o: ui.c $(SYMS)
|
||||
o/ui.o: ui.c $(SYMS)
|
||||
|
||||
o/undo.o: undo.c $(SYMS)
|
||||
o/undo.o: undo.c $(SYMS)
|
||||
|
||||
o/window.o: window.c $(SYMS)
|
||||
o/userfunc.o: userfunc.c $(SYMS)
|
||||
|
||||
o/window.o: window.c $(SYMS)
|
||||
|
||||
@@ -210,26 +210,31 @@ ALL : .\$(VIM).exe vimrun.exe install.exe uninstal.exe xxd/xxd.exe GvimExt/gvime
|
||||
|
||||
LINK32_OBJS= \
|
||||
$(EXTRAS) \
|
||||
"$(INTDIR)/arabic.obj" \
|
||||
"$(INTDIR)/blowfish.obj" \
|
||||
"$(INTDIR)/buffer.obj" \
|
||||
"$(INTDIR)/charset.obj" \
|
||||
"$(INTDIR)/crypt.obj" \
|
||||
"$(INTDIR)/crypt_zip.obj" \
|
||||
"$(INTDIR)/dict.obj" \
|
||||
"$(INTDIR)/diff.obj" \
|
||||
"$(INTDIR)/digraph.obj" \
|
||||
"$(INTDIR)/edit.obj" \
|
||||
"$(INTDIR)/eval.obj" \
|
||||
"$(INTDIR)/evalfunc.obj" \
|
||||
"$(INTDIR)/ex_cmds.obj" \
|
||||
"$(INTDIR)/ex_cmds2.obj" \
|
||||
"$(INTDIR)/ex_docmd.obj" \
|
||||
"$(INTDIR)/ex_eval.obj" \
|
||||
"$(INTDIR)/ex_getln.obj" \
|
||||
"$(INTDIR)/farsi.obj" \
|
||||
"$(INTDIR)/fileio.obj" \
|
||||
"$(INTDIR)/fold.obj" \
|
||||
"$(INTDIR)/getchar.obj" \
|
||||
"$(INTDIR)/hardcopy.obj" \
|
||||
"$(INTDIR)/hashtab.obj" \
|
||||
"$(INTDIR)/json.obj" \
|
||||
"$(INTDIR)/list.obj" \
|
||||
"$(INTDIR)/main.obj" \
|
||||
"$(INTDIR)/mark.obj" \
|
||||
"$(INTDIR)/mbyte.obj" \
|
||||
@@ -253,11 +258,13 @@ LINK32_OBJS= \
|
||||
"$(INTDIR)/search.obj" \
|
||||
"$(INTDIR)/sha256.obj" \
|
||||
"$(INTDIR)/spell.obj" \
|
||||
"$(INTDIR)/spellfile.obj" \
|
||||
"$(INTDIR)/syntax.obj" \
|
||||
"$(INTDIR)/tag.obj" \
|
||||
"$(INTDIR)/term.obj" \
|
||||
"$(INTDIR)/ui.obj" \
|
||||
"$(INTDIR)/undo.obj" \
|
||||
"$(INTDIR)/userfunc.obj" \
|
||||
"$(INTDIR)/version.obj" \
|
||||
"$(INTDIR)/window.obj"
|
||||
|
||||
@@ -330,6 +337,10 @@ GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
|
||||
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\arabic.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\blowfish.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -350,6 +361,10 @@ SOURCE=.\crypt_zip.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dict.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\diff.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -366,6 +381,10 @@ SOURCE=.\eval.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\evalfunc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ex_cmds.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -386,6 +405,10 @@ SOURCE=.\ex_getln.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\farsi.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\fileio.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -560,6 +583,10 @@ SOURCE=.\json.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\list.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\main.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -652,6 +679,10 @@ SOURCE=.\spell.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\spellfile.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\syntax.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -672,6 +703,10 @@ SOURCE=.\undo.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\userfunc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\version.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -36,26 +36,31 @@ SHELL = csh
|
||||
REN = $(SHELL) -c mv -f
|
||||
DEL = $(SHELL) -c rm -f
|
||||
|
||||
SRC = blowfish.c \
|
||||
SRC = arabic.c \
|
||||
blowfish.c \
|
||||
buffer.c \
|
||||
charset.c \
|
||||
crypt.c \
|
||||
crypt_zip.c \
|
||||
dict.c \
|
||||
diff.c \
|
||||
digraph.c \
|
||||
edit.c \
|
||||
eval.c \
|
||||
evalfunc.c \
|
||||
ex_cmds.c \
|
||||
ex_cmds2.c \
|
||||
ex_docmd.c \
|
||||
ex_eval.c \
|
||||
ex_getln.c \
|
||||
farsi.c \
|
||||
fileio.c \
|
||||
fold.c \
|
||||
getchar.c \
|
||||
hardcopy.c \
|
||||
hashtab.c \
|
||||
json.c \
|
||||
list.c \
|
||||
main.c \
|
||||
mark.c \
|
||||
memfile.c \
|
||||
@@ -77,36 +82,43 @@ SRC = blowfish.c \
|
||||
search.c \
|
||||
sha256.c \
|
||||
spell.c \
|
||||
spellfile.c \
|
||||
syntax.c \
|
||||
tag.c \
|
||||
term.c \
|
||||
ui.c \
|
||||
undo.c \
|
||||
userfunc.c \
|
||||
window.c \
|
||||
version.c
|
||||
|
||||
INCL = vim.h feature.h keymap.h macros.h ascii.h term.h structs.h os_amiga.h
|
||||
|
||||
OBJ = obj/blowfish.o \
|
||||
OBJ = obj/arabic.o \
|
||||
obj/blowfish.o \
|
||||
obj/buffer.o \
|
||||
obj/charset.o \
|
||||
obj/crypt.o \
|
||||
obj/crypt_zip.o \
|
||||
obj/dict.o \
|
||||
obj/diff.o \
|
||||
obj/digraph.o \
|
||||
obj/edit.o \
|
||||
obj/eval.o \
|
||||
obj/evalfunc.o \
|
||||
obj/ex_cmds.o \
|
||||
obj/ex_cmds2.o \
|
||||
obj/ex_docmd.o \
|
||||
obj/ex_eval.o \
|
||||
obj/ex_getln.o \
|
||||
obj/farsi.o \
|
||||
obj/fileio.o \
|
||||
obj/fold.o \
|
||||
obj/getchar.o \
|
||||
obj/hardcopy.o \
|
||||
obj/hashtab.o \
|
||||
obj/json.o \
|
||||
obj/list.o \
|
||||
obj/main.o \
|
||||
obj/mark.o \
|
||||
obj/memfile.o \
|
||||
@@ -128,34 +140,41 @@ OBJ = obj/blowfish.o \
|
||||
obj/search.o \
|
||||
obj/sha256.o \
|
||||
obj/spell.o \
|
||||
obj/spellfile.o \
|
||||
obj/syntax.o \
|
||||
obj/tag.o \
|
||||
obj/term.o \
|
||||
obj/ui.o \
|
||||
obj/undo.o \
|
||||
obj/userfunc.o \
|
||||
obj/window.o \
|
||||
$(TERMLIB)
|
||||
|
||||
PRO = proto/blowfish.pro \
|
||||
PRO = proto/arabic.pro \
|
||||
proto/blowfish.pro \
|
||||
proto/buffer.pro \
|
||||
proto/charset.pro \
|
||||
proto/crypt.pro \
|
||||
proto/crypt_zip.pro \
|
||||
proto/dict.pro \
|
||||
proto/diff.pro \
|
||||
proto/digraph.pro \
|
||||
proto/edit.pro \
|
||||
proto/eval.pro \
|
||||
proto/evalfunc.pro \
|
||||
proto/ex_cmds.pro \
|
||||
proto/ex_cmds2.pro \
|
||||
proto/ex_docmd.pro \
|
||||
proto/ex_eval.pro \
|
||||
proto/ex_getln.pro \
|
||||
proto/farsi.pro \
|
||||
proto/fileio.pro \
|
||||
proto/fold.pro \
|
||||
proto/getchar.pro \
|
||||
proto/hardcopy.pro \
|
||||
proto/hashtab.pro \
|
||||
proto/json.pro \
|
||||
proto/list.pro \
|
||||
proto/main.pro \
|
||||
proto/mark.pro \
|
||||
proto/memfile.pro \
|
||||
@@ -177,12 +196,14 @@ PRO = proto/blowfish.pro \
|
||||
proto/search.pro \
|
||||
proto/sha256.pro \
|
||||
proto/spell.pro \
|
||||
proto/spellfile.pro \
|
||||
proto/syntax.pro \
|
||||
proto/tag.pro \
|
||||
proto/term.pro \
|
||||
proto/termlib.pro \
|
||||
proto/ui.pro \
|
||||
proto/undo.pro \
|
||||
proto/userfunc.pro \
|
||||
proto/window.pro
|
||||
|
||||
all: Vim xxd/Xxd
|
||||
@@ -229,6 +250,9 @@ CCNOSYM = $(CC) $(CFLAGS) -o
|
||||
|
||||
$(OBJ): $(SYMS)
|
||||
|
||||
obj/arabic.o: arabic.c
|
||||
$(CCSYM) $@ arabic.c
|
||||
|
||||
obj/blowfish.o: blowfish.c
|
||||
$(CCSYM) $@ blowfish.c
|
||||
|
||||
@@ -244,6 +268,9 @@ obj/crypt.o: crypt.c
|
||||
obj/crypt_zip.o: crypt_zip.c
|
||||
$(CCSYM) $@ crypt_zip.c
|
||||
|
||||
obj/dict.o: dict.c
|
||||
$(CCSYM) $@ dict.c
|
||||
|
||||
obj/diff.o: diff.c
|
||||
$(CCSYM) $@ diff.c
|
||||
|
||||
@@ -256,6 +283,9 @@ obj/edit.o: edit.c
|
||||
obj/eval.o: eval.c
|
||||
$(CCSYM) $@ eval.c
|
||||
|
||||
obj/evalfunc.o: evalfunc.c
|
||||
$(CCSYM) $@ evalfunc.c
|
||||
|
||||
obj/ex_cmds.o: ex_cmds.c
|
||||
$(CCSYM) $@ ex_cmds.c
|
||||
|
||||
@@ -272,6 +302,9 @@ obj/ex_eval.o: ex_eval.c ex_cmds.h
|
||||
obj/ex_getln.o: ex_getln.c
|
||||
$(CCSYM) $@ ex_getln.c
|
||||
|
||||
obj/farsi.o: farsi.c
|
||||
$(CCSYM) $@ farsi.c
|
||||
|
||||
obj/fileio.o: fileio.c
|
||||
$(CCSYM) $@ fileio.c
|
||||
|
||||
@@ -290,6 +323,9 @@ obj/hashtab.o: hashtab.c
|
||||
obj/json.o: json.c
|
||||
$(CCSYM) $@ json.c
|
||||
|
||||
obj/list.o: list.c
|
||||
$(CCSYM) $@ list.c
|
||||
|
||||
# Don't use $(SYMS) here, because main.c defines EXTERN
|
||||
obj/main.o: main.c option.h globals.h
|
||||
$(CCNOSYM) $@ main.c
|
||||
@@ -356,6 +392,9 @@ obj/sha256.o: sha256.c
|
||||
obj/spell.o: spell.c
|
||||
$(CCSYM) $@ spell.c
|
||||
|
||||
obj/spellfile.o: spellfile.c
|
||||
$(CCSYM) $@ spellfile.c
|
||||
|
||||
obj/syntax.o: syntax.c
|
||||
$(CCSYM) $@ syntax.c
|
||||
|
||||
@@ -374,5 +413,8 @@ obj/ui.o: ui.c
|
||||
obj/undo.o: undo.c
|
||||
$(CCSYM) $@ undo.c
|
||||
|
||||
obj/userfunc.o: userfunc.c
|
||||
$(CCSYM) $@ userfunc.c
|
||||
|
||||
obj/window.o: window.c
|
||||
$(CCSYM) $@ window.c
|
||||
|
||||
@@ -24,26 +24,31 @@ RM = rm
|
||||
.c.o:
|
||||
${CC} ${CFLAGS} $< -o $@
|
||||
|
||||
SRC = blowfish.c \
|
||||
SRC = arabic.c \
|
||||
blowfish.c \
|
||||
buffer.c \
|
||||
charset.c \
|
||||
crypt.c \
|
||||
crypt_zip.c \
|
||||
dict.c \
|
||||
diff.c \
|
||||
digraph.c \
|
||||
edit.c \
|
||||
eval.c \
|
||||
evalfunc.c \
|
||||
ex_cmds.c \
|
||||
ex_cmds2.c \
|
||||
ex_docmd.c \
|
||||
ex_eval.c \
|
||||
ex_getln.c \
|
||||
farsi.c \
|
||||
fileio.c \
|
||||
fold.c \
|
||||
getchar.c \
|
||||
hardcopy.c \
|
||||
hashtab.c \
|
||||
json.c \
|
||||
list.c \
|
||||
main.c \
|
||||
mark.c \
|
||||
mbyte.c \
|
||||
@@ -65,11 +70,13 @@ SRC = blowfish.c \
|
||||
search.c \
|
||||
sha256.c \
|
||||
spell.c \
|
||||
spellfile.c \
|
||||
syntax.c \
|
||||
tag.c \
|
||||
term.c \
|
||||
ui.c \
|
||||
undo.c \
|
||||
userfunc.c \
|
||||
version.c \
|
||||
window.c \
|
||||
|
||||
|
||||
139
src/Make_mvc.mak
139
src/Make_mvc.mak
@@ -255,6 +255,45 @@ MAKEFLAGS_GVIMEXT = DEBUG=yes
|
||||
!endif
|
||||
|
||||
|
||||
# Check VC version.
|
||||
!if [echo MSVCVER=_MSC_VER> msvcver.c && $(CC) /EP msvcver.c > msvcver.~ 2> nul]
|
||||
!message *** ERROR
|
||||
!message Cannot run Visual C to determine its version. Make sure cl.exe is in your PATH.
|
||||
!message This can usually be done by running "vcvarsall.bat", located in the bin directory where Visual Studio was installed.
|
||||
!error Make aborted.
|
||||
!else
|
||||
!include msvcver.~
|
||||
!if [del msvcver.c msvcver.~]
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!if $(MSVCVER) < 1900
|
||||
MSVC_MAJOR = ($(MSVCVER) / 100 - 6)
|
||||
MSVCRT_VER = ($(MSVCVER) / 10 - 60)
|
||||
!else
|
||||
MSVC_MAJOR = ($(MSVCVER) / 100 - 5)
|
||||
MSVCRT_VER = ($(MSVCVER) / 10 - 50)
|
||||
!endif
|
||||
|
||||
# Calculate MSVCRT_VER
|
||||
!if [(set /a MSVCRT_VER="$(MSVCRT_VER)" > nul) && set MSVCRT_VER > msvcrtver.~] == 0
|
||||
!include msvcrtver.~
|
||||
!if [del msvcrtver.~]
|
||||
!endif
|
||||
!endif
|
||||
|
||||
# Base name of the msvcrXX.dll
|
||||
!if $(MSVCRT_VER) <= 60
|
||||
MSVCRT_NAME = msvcrt
|
||||
!else
|
||||
MSVCRT_NAME = msvcr$(MSVCRT_VER)
|
||||
!endif
|
||||
|
||||
!if $(MSVC_MAJOR) == 6
|
||||
CPU = ix86
|
||||
!endif
|
||||
|
||||
|
||||
# Flag to turn on Win64 compatibility warnings for VC7.x and VC8.
|
||||
WP64CHECK = /Wp64
|
||||
|
||||
@@ -294,8 +333,9 @@ CHANNEL = $(GUI)
|
||||
!endif
|
||||
!endif
|
||||
|
||||
# Only allow NETBEANS and XPM for a GUI build and CHANNEL.
|
||||
# GUI sepcific features.
|
||||
!if "$(GUI)" == "yes"
|
||||
# Only allow NETBEANS for a GUI build and CHANNEL.
|
||||
!if "$(NETBEANS)" == "yes" && "$(CHANNEL)" == "yes"
|
||||
# NETBEANS - Include support for Netbeans integration
|
||||
NETBEANS_PRO = proto/netbeans.pro
|
||||
@@ -317,8 +357,11 @@ DIRECTX_INCL = gui_dwrite.h
|
||||
DIRECTX_OBJ = $(OUTDIR)\gui_dwrite.obj
|
||||
!endif
|
||||
|
||||
# Only allow XPM for a GUI build.
|
||||
!ifndef XPM
|
||||
# XPM is not set, use the included xpm files, depending on the architecture.
|
||||
!ifndef USE_MSVCRT
|
||||
# Both XPM and USE_MSVCRT are not set, use the included xpm files, depending
|
||||
# on the architecture.
|
||||
!if "$(CPU)" == "AMD64"
|
||||
XPM = xpm\x64
|
||||
!elseif "$(CPU)" == "i386"
|
||||
@@ -326,13 +369,22 @@ XPM = xpm\x86
|
||||
!else
|
||||
XPM = no
|
||||
!endif
|
||||
!endif
|
||||
!else # USE_MSVCRT
|
||||
XPM = no
|
||||
!endif # USE_MSVCRT
|
||||
!endif # XPM
|
||||
!if "$(XPM)" != "no"
|
||||
# XPM - Include support for XPM signs
|
||||
# See the xpm directory for more information.
|
||||
XPM_OBJ = $(OBJDIR)/xpm_w32.obj
|
||||
XPM_DEFS = -DFEAT_XPM_W32
|
||||
!if $(MSVC_MAJOR) >= 14
|
||||
# VC14 cannot use a library built by VC12 or eariler, because VC14 uses
|
||||
# Universal CRT.
|
||||
XPM_LIB = $(XPM)\lib-vc14\libXpm.lib
|
||||
!else
|
||||
XPM_LIB = $(XPM)\lib\libXpm.lib
|
||||
!endif
|
||||
XPM_INC = -I $(XPM)\include -I $(XPM)\..\include
|
||||
!endif
|
||||
!endif
|
||||
@@ -395,43 +447,6 @@ DEL_TREE = deltree /y
|
||||
INTDIR=$(OBJDIR)
|
||||
OUTDIR=$(OBJDIR)
|
||||
|
||||
!if [echo MSVCVER=_MSC_VER> msvcver.c && $(CC) /EP msvcver.c > msvcver.~ 2> nul]
|
||||
!message *** ERROR
|
||||
!message Cannot run Visual C to determine its version. Make sure cl.exe is in your PATH.
|
||||
!message This can usually be done by running "vcvarsall.bat", located in the bin directory where Visual Studio was installed.
|
||||
!error Make aborted.
|
||||
!else
|
||||
!include msvcver.~
|
||||
!if [del msvcver.c msvcver.~]
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!if $(MSVCVER) < 1900
|
||||
MSVC_MAJOR = ($(MSVCVER) / 100 - 6)
|
||||
MSVCRT_VER = ($(MSVCVER) / 10 - 60)
|
||||
!else
|
||||
MSVC_MAJOR = ($(MSVCVER) / 100 - 5)
|
||||
MSVCRT_VER = ($(MSVCVER) / 10 - 50)
|
||||
!endif
|
||||
|
||||
# Calculate MSVCRT_VER
|
||||
!if [(set /a MSVCRT_VER="$(MSVCRT_VER)" > nul) && set MSVCRT_VER > msvcrtver.~] == 0
|
||||
!include msvcrtver.~
|
||||
!if [del msvcrtver.~]
|
||||
!endif
|
||||
!endif
|
||||
|
||||
# Base name of the msvcrXX.dll
|
||||
!if $(MSVCRT_VER) <= 60
|
||||
MSVCRT_NAME = msvcrt
|
||||
!else
|
||||
MSVCRT_NAME = msvcr$(MSVCRT_VER)
|
||||
!endif
|
||||
|
||||
!if $(MSVC_MAJOR) == 6
|
||||
CPU = ix86
|
||||
!endif
|
||||
|
||||
# Convert processor ID to MVC-compatible number
|
||||
!if $(MSVC_MAJOR) < 8
|
||||
!if "$(CPUNR)" == "i386"
|
||||
@@ -486,6 +501,11 @@ OPTFLAG = $(OPTFLAG) /GL
|
||||
CFLAGS=$(CFLAGS) $(WP64CHECK)
|
||||
!endif
|
||||
|
||||
# VC10 or later has stdint.h.
|
||||
!if $(MSVC_MAJOR) >= 10
|
||||
CFLAGS = $(CFLAGS) -DHAVE_STDINT_H
|
||||
!endif
|
||||
|
||||
# Static code analysis generally available starting with VS2012 (VC11) or
|
||||
# Windows SDK 7.1 (VC10)
|
||||
!if ("$(ANALYZE)" == "yes") && ($(MSVC_MAJOR) >= 10)
|
||||
@@ -528,26 +548,31 @@ INCL = vim.h os_win32.h ascii.h feature.h globals.h keymap.h macros.h \
|
||||
$(NBDEBUG_INCL)
|
||||
|
||||
OBJ = \
|
||||
$(OUTDIR)\arabic.obj \
|
||||
$(OUTDIR)\blowfish.obj \
|
||||
$(OUTDIR)\buffer.obj \
|
||||
$(OUTDIR)\charset.obj \
|
||||
$(OUTDIR)\crypt.obj \
|
||||
$(OUTDIR)\crypt_zip.obj \
|
||||
$(OUTDIR)\dict.obj \
|
||||
$(OUTDIR)\diff.obj \
|
||||
$(OUTDIR)\digraph.obj \
|
||||
$(OUTDIR)\edit.obj \
|
||||
$(OUTDIR)\eval.obj \
|
||||
$(OUTDIR)\evalfunc.obj \
|
||||
$(OUTDIR)\ex_cmds.obj \
|
||||
$(OUTDIR)\ex_cmds2.obj \
|
||||
$(OUTDIR)\ex_docmd.obj \
|
||||
$(OUTDIR)\ex_eval.obj \
|
||||
$(OUTDIR)\ex_getln.obj \
|
||||
$(OUTDIR)\farsi.obj \
|
||||
$(OUTDIR)\fileio.obj \
|
||||
$(OUTDIR)\fold.obj \
|
||||
$(OUTDIR)\getchar.obj \
|
||||
$(OUTDIR)\hardcopy.obj \
|
||||
$(OUTDIR)\hashtab.obj \
|
||||
$(OUTDIR)\json.obj \
|
||||
$(OUTDIR)\list.obj \
|
||||
$(OUTDIR)\main.obj \
|
||||
$(OUTDIR)\mark.obj \
|
||||
$(OUTDIR)\mbyte.obj \
|
||||
@@ -572,11 +597,13 @@ OBJ = \
|
||||
$(OUTDIR)\search.obj \
|
||||
$(OUTDIR)\sha256.obj \
|
||||
$(OUTDIR)\spell.obj \
|
||||
$(OUTDIR)\spellfile.obj \
|
||||
$(OUTDIR)\syntax.obj \
|
||||
$(OUTDIR)\tag.obj \
|
||||
$(OUTDIR)\term.obj \
|
||||
$(OUTDIR)\ui.obj \
|
||||
$(OUTDIR)\undo.obj \
|
||||
$(OUTDIR)\userfunc.obj \
|
||||
$(OUTDIR)\window.obj \
|
||||
$(OUTDIR)\vim.res
|
||||
|
||||
@@ -640,6 +667,8 @@ GUI_LIB = \
|
||||
/machine:$(CPU)
|
||||
!else
|
||||
SUBSYSTEM = console
|
||||
CUI_INCL = iscygpty.h
|
||||
CUI_OBJ = $(OUTDIR)\iscygpty.obj
|
||||
!endif
|
||||
|
||||
!if "$(SUBSYSTEM_VER)" != ""
|
||||
@@ -1011,12 +1040,12 @@ all: $(VIM).exe \
|
||||
tee/tee.exe \
|
||||
GvimExt/gvimext.dll
|
||||
|
||||
$(VIM).exe: $(OUTDIR) $(OBJ) $(GUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \
|
||||
$(VIM).exe: $(OUTDIR) $(OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \
|
||||
$(LUA_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) $(TCL_OBJ) \
|
||||
$(CSCOPE_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) $(XPM_OBJ) \
|
||||
version.c version.h
|
||||
$(CC) $(CFLAGS) version.c
|
||||
$(link) $(LINKARGS1) -out:$(VIM).exe $(OBJ) $(GUI_OBJ) $(OLE_OBJ) \
|
||||
$(link) $(LINKARGS1) -out:$(VIM).exe $(OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) \
|
||||
$(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) \
|
||||
$(TCL_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) \
|
||||
$(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2)
|
||||
@@ -1126,6 +1155,8 @@ testclean:
|
||||
!ENDIF
|
||||
$(CC) $(CFLAGS) $<
|
||||
|
||||
$(OUTDIR)/arabic.obj: $(OUTDIR) arabic.c $(INCL)
|
||||
|
||||
$(OUTDIR)/blowfish.obj: $(OUTDIR) blowfish.c $(INCL)
|
||||
|
||||
$(OUTDIR)/buffer.obj: $(OUTDIR) buffer.c $(INCL)
|
||||
@@ -1136,6 +1167,8 @@ $(OUTDIR)/crypt.obj: $(OUTDIR) crypt.c $(INCL)
|
||||
|
||||
$(OUTDIR)/crypt_zip.obj: $(OUTDIR) crypt_zip.c $(INCL)
|
||||
|
||||
$(OUTDIR)/dict.obj: $(OUTDIR) dict.c $(INCL)
|
||||
|
||||
$(OUTDIR)/diff.obj: $(OUTDIR) diff.c $(INCL)
|
||||
|
||||
$(OUTDIR)/digraph.obj: $(OUTDIR) digraph.c $(INCL)
|
||||
@@ -1144,6 +1177,8 @@ $(OUTDIR)/edit.obj: $(OUTDIR) edit.c $(INCL)
|
||||
|
||||
$(OUTDIR)/eval.obj: $(OUTDIR) eval.c $(INCL)
|
||||
|
||||
$(OUTDIR)/evalfunc.obj: $(OUTDIR) evalfunc.c $(INCL)
|
||||
|
||||
$(OUTDIR)/ex_cmds.obj: $(OUTDIR) ex_cmds.c $(INCL)
|
||||
|
||||
$(OUTDIR)/ex_cmds2.obj: $(OUTDIR) ex_cmds2.c $(INCL)
|
||||
@@ -1154,6 +1189,8 @@ $(OUTDIR)/ex_eval.obj: $(OUTDIR) ex_eval.c $(INCL) ex_cmds.h
|
||||
|
||||
$(OUTDIR)/ex_getln.obj: $(OUTDIR) ex_getln.c $(INCL)
|
||||
|
||||
$(OUTDIR)/farsi.obj: $(OUTDIR) farsi.c $(INCL)
|
||||
|
||||
$(OUTDIR)/fileio.obj: $(OUTDIR) fileio.c $(INCL)
|
||||
|
||||
$(OUTDIR)/fold.obj: $(OUTDIR) fold.c $(INCL)
|
||||
@@ -1208,9 +1245,14 @@ $(OUTDIR)/if_ruby.obj: $(OUTDIR) if_ruby.c $(INCL)
|
||||
$(OUTDIR)/if_tcl.obj: $(OUTDIR) if_tcl.c $(INCL)
|
||||
$(CC) $(CFLAGS) $(TCL_INC) if_tcl.c
|
||||
|
||||
$(OUTDIR)/iscygpty.obj: $(OUTDIR) iscygpty.c $(CUI_INCL)
|
||||
$(CC) $(CFLAGS) iscygpty.c -D_WIN32_WINNT=0x0600 -DUSE_DYNFILEID -DENABLE_STUB_IMPL
|
||||
|
||||
$(OUTDIR)/json.obj: $(OUTDIR) json.c $(INCL)
|
||||
|
||||
$(OUTDIR)/main.obj: $(OUTDIR) main.c $(INCL)
|
||||
$(OUTDIR)/list.obj: $(OUTDIR) list.c $(INCL)
|
||||
|
||||
$(OUTDIR)/main.obj: $(OUTDIR) main.c $(INCL) $(CUI_INCL)
|
||||
|
||||
$(OUTDIR)/mark.obj: $(OUTDIR) mark.c $(INCL)
|
||||
|
||||
@@ -1265,6 +1307,8 @@ $(OUTDIR)/sha256.obj: $(OUTDIR) sha256.c $(INCL)
|
||||
|
||||
$(OUTDIR)/spell.obj: $(OUTDIR) spell.c $(INCL)
|
||||
|
||||
$(OUTDIR)/spellfile.obj: $(OUTDIR) spellfile.c $(INCL)
|
||||
|
||||
$(OUTDIR)/syntax.obj: $(OUTDIR) syntax.c $(INCL)
|
||||
|
||||
$(OUTDIR)/tag.obj: $(OUTDIR) tag.c $(INCL)
|
||||
@@ -1275,6 +1319,8 @@ $(OUTDIR)/ui.obj: $(OUTDIR) ui.c $(INCL)
|
||||
|
||||
$(OUTDIR)/undo.obj: $(OUTDIR) undo.c $(INCL)
|
||||
|
||||
$(OUTDIR)/userfunc.obj: $(OUTDIR) userfunc.c $(INCL)
|
||||
|
||||
$(OUTDIR)/window.obj: $(OUTDIR) window.c $(INCL)
|
||||
|
||||
$(OUTDIR)/xpm_w32.obj: $(OUTDIR) xpm_w32.c
|
||||
@@ -1321,25 +1367,30 @@ auto:
|
||||
|
||||
# End Custom Build
|
||||
proto.h: \
|
||||
proto/arabic.pro \
|
||||
proto/blowfish.pro \
|
||||
proto/buffer.pro \
|
||||
proto/charset.pro \
|
||||
proto/crypt.pro \
|
||||
proto/crypt_zip.pro \
|
||||
proto/dict.pro \
|
||||
proto/diff.pro \
|
||||
proto/digraph.pro \
|
||||
proto/edit.pro \
|
||||
proto/eval.pro \
|
||||
proto/evalfunc.pro \
|
||||
proto/ex_cmds.pro \
|
||||
proto/ex_cmds2.pro \
|
||||
proto/ex_docmd.pro \
|
||||
proto/ex_eval.pro \
|
||||
proto/ex_getln.pro \
|
||||
proto/farsi.pro \
|
||||
proto/fileio.pro \
|
||||
proto/getchar.pro \
|
||||
proto/hardcopy.pro \
|
||||
proto/hashtab.pro \
|
||||
proto/json.pro \
|
||||
proto/list.pro \
|
||||
proto/main.pro \
|
||||
proto/mark.pro \
|
||||
proto/memfile.pro \
|
||||
@@ -1363,11 +1414,13 @@ proto.h: \
|
||||
proto/search.pro \
|
||||
proto/sha256.pro \
|
||||
proto/spell.pro \
|
||||
proto/spellfile.pro \
|
||||
proto/syntax.pro \
|
||||
proto/tag.pro \
|
||||
proto/term.pro \
|
||||
proto/ui.pro \
|
||||
proto/undo.pro \
|
||||
proto/userfunc.pro \
|
||||
proto/window.pro \
|
||||
$(NETBEANS_PRO) \
|
||||
$(CHANNEL_PRO)
|
||||
|
||||
@@ -89,26 +89,31 @@ CFLAGS4 = $(DEFINES) DATAMEMORY=$(MEMORYTYPE)
|
||||
PROPT = DEF=PROTO GPROTO GPPARM MAXIMUMERRORS=999 GENPROTOSTATICS GENPROTOPARAMETERS
|
||||
|
||||
SRC = \
|
||||
arabic.c \
|
||||
blowfish.c \
|
||||
buffer.c \
|
||||
charset.c \
|
||||
crypt.c \
|
||||
crypt_zip.c \
|
||||
dict.c \
|
||||
diff.c \
|
||||
digraph.c \
|
||||
edit.c \
|
||||
eval.c \
|
||||
evalfunc.c \
|
||||
ex_cmds.c \
|
||||
ex_cmds2.c \
|
||||
ex_docmd.c \
|
||||
ex_eval.c \
|
||||
ex_getln.c \
|
||||
farsi.c \
|
||||
fileio.c \
|
||||
fold.c \
|
||||
getchar.c \
|
||||
hardcopy.c \
|
||||
hashtab.c \
|
||||
json.c \
|
||||
list.c \
|
||||
main.c \
|
||||
mark.c \
|
||||
memfile.c \
|
||||
@@ -130,35 +135,42 @@ SRC = \
|
||||
search.c \
|
||||
sha256.c \
|
||||
spell.c \
|
||||
spellfile.c \
|
||||
syntax.c \
|
||||
tag.c \
|
||||
term.c \
|
||||
ui.c \
|
||||
undo.c \
|
||||
userfunc.c \
|
||||
window.c \
|
||||
version.c
|
||||
|
||||
OBJ = \
|
||||
arabic.o \
|
||||
blowfish.o \
|
||||
buffer.o \
|
||||
charset.o \
|
||||
crypt.o \
|
||||
crypt_zip.o \
|
||||
dict.o \
|
||||
diff.o \
|
||||
digraph.o \
|
||||
edit.o \
|
||||
eval.o \
|
||||
evalfunc.o \
|
||||
ex_cmds.o \
|
||||
ex_cmds2.o \
|
||||
ex_docmd.o \
|
||||
ex_eval.o \
|
||||
ex_getln.o \
|
||||
farsi.o \
|
||||
fileio.o \
|
||||
fold.o \
|
||||
getchar.o \
|
||||
hardcopy.o \
|
||||
hashtab.o \
|
||||
json.o \
|
||||
list.o \
|
||||
main.o \
|
||||
mark.o \
|
||||
memfile.o \
|
||||
@@ -180,35 +192,42 @@ OBJ = \
|
||||
search.o \
|
||||
sha256.o \
|
||||
spell.o \
|
||||
spellfile.o \
|
||||
syntax.o \
|
||||
tag.o \
|
||||
term.o \
|
||||
ui.o \
|
||||
undo.o \
|
||||
userfunc.o \
|
||||
window.o \
|
||||
$(TERMLIB)
|
||||
|
||||
PRO = \
|
||||
proto/arabic.pro \
|
||||
proto/blowfish.pro \
|
||||
proto/buffer.pro \
|
||||
proto/charset.pro \
|
||||
proto/crypt.pro \
|
||||
proto/crypt_zip.pro \
|
||||
proto/dict.pro \
|
||||
proto/diff.pro \
|
||||
proto/digraph.pro \
|
||||
proto/edit.pro \
|
||||
proto/eval.pro \
|
||||
proto/evalfunc.pro \
|
||||
proto/ex_cmds.pro \
|
||||
proto/ex_cmds2.pro \
|
||||
proto/ex_docmd.pro \
|
||||
proto/ex_eval.pro \
|
||||
proto/ex_getln.pro \
|
||||
proto/farsi.pro \
|
||||
proto/fileio.pro \
|
||||
proto/fold.pro \
|
||||
proto/getchar.pro \
|
||||
proto/hardcopy.pro \
|
||||
proto/hashtab.pro \
|
||||
proto/json.pro \
|
||||
proto/list.pro \
|
||||
proto/main.pro \
|
||||
proto/mark.pro \
|
||||
proto/memfile.pro \
|
||||
@@ -230,12 +249,14 @@ PRO = \
|
||||
proto/search.pro \
|
||||
proto/sha256.pro \
|
||||
proto/spell.pro \
|
||||
proto/spellfile.pro \
|
||||
proto/syntax.pro \
|
||||
proto/tag.pro \
|
||||
proto/term.pro \
|
||||
proto/termlib.pro \
|
||||
proto/ui.pro \
|
||||
proto/undo.pro \
|
||||
proto/userfunc.pro \
|
||||
proto/window.pro
|
||||
|
||||
all: proto Vim
|
||||
@@ -293,6 +314,8 @@ $(PRO): $(GST) vim.h
|
||||
$(CC) $(CFLAGS) GPFILE=proto/$*.pro $(PROPT) $*.c
|
||||
|
||||
# dependencies
|
||||
arabic.o: arabic.c
|
||||
proto/arabic.pro: arabic.c
|
||||
blowfish.o: blowfish.c
|
||||
proto/blowfish.pro: blowfish.c
|
||||
buffer.o: buffer.c
|
||||
@@ -303,6 +326,8 @@ crypt.o: crypt.c
|
||||
proto/crypt.pro: crypt.c
|
||||
crypt_zip.o: crypt_zip.c
|
||||
proto/crypt_zip.pro: crypt_zip.c
|
||||
dict.o: dict.c
|
||||
proto/dict.pro: dict.c
|
||||
diff.o: diff.c
|
||||
proto/diff.pro: diff.c
|
||||
digraph.o: digraph.c
|
||||
@@ -311,6 +336,8 @@ edit.o: edit.c
|
||||
proto/edit.pro: edit.c
|
||||
eval.o: eval.c
|
||||
proto/eval.pro: eval.c
|
||||
evalfunc.o: evalfunc.c
|
||||
proto/evalfunc.pro: evalfunc.c
|
||||
ex_cmds.o: ex_cmds.c
|
||||
proto/ex_cmds.pro: ex_cmds.c
|
||||
ex_cmds2.o: ex_cmds2.c
|
||||
@@ -321,6 +348,8 @@ ex_eval.o: ex_eval.c ex_cmds.h
|
||||
proto/ex_eval.pro: ex_eval.c ex_cmds.h
|
||||
ex_getln.o: ex_getln.c
|
||||
proto/ex_getln.pro: ex_getln.c
|
||||
farsi.o: farsi.c
|
||||
proto/farsi.pro: farsi.c
|
||||
fileio.o: fileio.c
|
||||
proto/fileio.pro: fileio.c
|
||||
fold.o: fold.c
|
||||
@@ -333,6 +362,8 @@ hashtab.o: hashtab.c
|
||||
proto/hashtab.pro: hashtab.c
|
||||
json.o: json.c
|
||||
proto/json.pro: json.c
|
||||
list.o: list.c
|
||||
proto/list.pro: list.c
|
||||
main.o: main.c
|
||||
proto/main.pro: main.c
|
||||
mark.o: mark.c
|
||||
@@ -375,6 +406,8 @@ sha256.o: sha256.c
|
||||
proto/sha256.pro: sha256.c
|
||||
spell.o: spell.c
|
||||
proto/spell.pro: spell.c
|
||||
spellfile.o: spellfile.c
|
||||
proto/spellfile.pro: spellfile.c
|
||||
syntax.o: syntax.c
|
||||
proto/syntax.pro: syntax.c
|
||||
tag.o: tag.c
|
||||
@@ -387,4 +420,6 @@ ui.o: ui.c
|
||||
proto/ui.pro: ui.c
|
||||
undo.o: undo.c
|
||||
proto/undo.pro: undo.c
|
||||
userfunc.o: userfunc.c
|
||||
proto/userfunc.pro: userfunc.c
|
||||
window.o: window.c
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Makefile for Vim on OpenVMS
|
||||
#
|
||||
# Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
|
||||
# Last change: 2016 Feb 27
|
||||
# Last change: 2016 Jul 02
|
||||
#
|
||||
# This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
|
||||
# with MMS and MMK
|
||||
@@ -299,8 +299,8 @@ ALL_CFLAGS_VER = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
|
||||
ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
|
||||
$(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
|
||||
|
||||
SRC = blowfish.c buffer.c charset.c crypt.c, crypt_zip.c diff.c digraph.c edit.c eval.c ex_cmds.c ex_cmds2.c \
|
||||
ex_docmd.c ex_eval.c ex_getln.c if_xcmdsrv.c fileio.c fold.c getchar.c \
|
||||
SRC = arabic.c blowfish.c buffer.c charset.c crypt.c, crypt_zip.c diff.c digraph.c edit.c eval.c ex_cmds.c ex_cmds2.c \
|
||||
ex_docmd.c ex_eval.c ex_getln.c if_xcmdsrv.c farsi.c fileio.c fold.c getchar.c \
|
||||
hardcopy.c hashtab.c json.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
|
||||
misc2.c move.c normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c sha256.c\
|
||||
spell.c syntax.c tag.c term.c termlib.c ui.c undo.c version.c screen.c \
|
||||
@@ -308,9 +308,9 @@ SRC = blowfish.c buffer.c charset.c crypt.c, crypt_zip.c diff.c digraph.c edit.c
|
||||
$(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
|
||||
$(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC)
|
||||
|
||||
OBJ = blowfish.obj buffer.obj charset.obj crypt.obj, crypt_zip.obj diff.obj digraph.obj edit.obj eval.obj \
|
||||
OBJ = arabic.obj blowfish.obj buffer.obj charset.obj crypt.obj, crypt_zip.obj diff.obj digraph.obj edit.obj eval.obj \
|
||||
ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj \
|
||||
if_xcmdsrv.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj json.obj main.obj mark.obj \
|
||||
if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj json.obj main.obj mark.obj \
|
||||
menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
|
||||
move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj quickfix.obj \
|
||||
regexp.obj search.obj sha256.obj spell.obj syntax.obj tag.obj term.obj termlib.obj \
|
||||
@@ -486,6 +486,8 @@ ruby_env :
|
||||
-@ !
|
||||
.ENDIF
|
||||
|
||||
arabic.obj : arabic.c vim.h
|
||||
blowfish.obj : blowfish.c vim.h
|
||||
buffer.obj : buffer.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
@@ -530,6 +532,7 @@ ex_getln.obj : ex_getln.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
farsi.obj : farsi.c vim.h
|
||||
fileio.obj : fileio.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
|
||||
491
src/Makefile
491
src/Makefile
@@ -368,6 +368,9 @@ CClink = $(CC)
|
||||
# Carbon GUI for Mac OS X
|
||||
#CONF_OPT_GUI = --enable-gui=carbon
|
||||
|
||||
# Uncomment this line to run an indivisual test with gvim.
|
||||
#GUI_TESTARG = GUI_FLAG=-g
|
||||
|
||||
# DARWIN - detecting Mac OS X
|
||||
# Uncomment this line when you want to compile a Unix version of Vim on
|
||||
# Darwin. None of the Mac specific options or files will be used.
|
||||
@@ -602,6 +605,10 @@ AUTOCONF = autoconf
|
||||
# PURIFY - remove the # to use the "purify" program (hoi Nia++!)
|
||||
#PURIFY = purify
|
||||
|
||||
# VALGRIND - remove the # to use valgrind for memory leaks and access errors.
|
||||
# Used for the unittest targets.
|
||||
# VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=25 --log-file=valgrind.$@
|
||||
|
||||
# NBDEBUG - debugging the netbeans interface.
|
||||
#EXTRA_DEFS = -DNBDEBUG
|
||||
|
||||
@@ -1064,7 +1071,8 @@ SCRIPTLOC = $(VIMRTLOC)
|
||||
### the runtime directory is not below it.
|
||||
#VIMRUNTIMEDIR = $(VIMRTLOC)
|
||||
|
||||
### Name of the evim file target.
|
||||
### Name of the defaults/evim/mswin file target.
|
||||
VIM_DEFAULTS_FILE = $(DESTDIR)$(SCRIPTLOC)/defaults.vim
|
||||
EVIM_FILE = $(DESTDIR)$(SCRIPTLOC)/evim.vim
|
||||
MSWIN_FILE = $(DESTDIR)$(SCRIPTLOC)/mswin.vim
|
||||
|
||||
@@ -1478,20 +1486,24 @@ DEST_MAN_RU_U = $(DEST_MAN_TOP)/ru.UTF-8$(MAN1DIR)
|
||||
TAGS_INCL = *.h
|
||||
|
||||
BASIC_SRC = \
|
||||
arabic.c \
|
||||
blowfish.c \
|
||||
buffer.c \
|
||||
charset.c \
|
||||
crypt.c \
|
||||
crypt_zip.c \
|
||||
dict.c \
|
||||
diff.c \
|
||||
digraph.c \
|
||||
edit.c \
|
||||
eval.c \
|
||||
evalfunc.c \
|
||||
ex_cmds.c \
|
||||
ex_cmds2.c \
|
||||
ex_docmd.c \
|
||||
ex_eval.c \
|
||||
ex_getln.c \
|
||||
farsi.c \
|
||||
fileio.c \
|
||||
fold.c \
|
||||
getchar.c \
|
||||
@@ -1500,6 +1512,7 @@ BASIC_SRC = \
|
||||
if_cscope.c \
|
||||
if_xcmdsrv.c \
|
||||
json.c \
|
||||
list.c \
|
||||
main.c \
|
||||
mark.c \
|
||||
memfile.c \
|
||||
@@ -1522,11 +1535,13 @@ BASIC_SRC = \
|
||||
search.c \
|
||||
sha256.c \
|
||||
spell.c \
|
||||
spellfile.c \
|
||||
syntax.c \
|
||||
tag.c \
|
||||
term.c \
|
||||
ui.c \
|
||||
undo.c \
|
||||
userfunc.c \
|
||||
version.c \
|
||||
window.c \
|
||||
$(OS_EXTRA_SRC)
|
||||
@@ -1556,9 +1571,12 @@ JSON_TEST_SRC = json_test.c
|
||||
JSON_TEST_TARGET = json_test$(EXEEXT)
|
||||
MEMFILE_TEST_SRC = memfile_test.c
|
||||
MEMFILE_TEST_TARGET = memfile_test$(EXEEXT)
|
||||
MESSAGE_TEST_SRC = message_test.c
|
||||
MESSAGE_TEST_TARGET = message_test$(EXEEXT)
|
||||
|
||||
UNITTEST_SRC = $(JSON_TEST_SRC) $(MEMFILE_TEST_SRC)
|
||||
UNITTEST_TARGETS = $(JSON_TEST_TARGET) $(MEMFILE_TEST_TARGET)
|
||||
UNITTEST_SRC = $(JSON_TEST_SRC) $(MEMFILE_TEST_SRC) $(MESSAGE_TEST_SRC)
|
||||
UNITTEST_TARGETS = $(JSON_TEST_TARGET) $(MEMFILE_TEST_TARGET) $(MESSAGE_TEST_TARGET)
|
||||
RUN_UNITTESTS = run_json_test run_memfile_test run_message_test
|
||||
|
||||
# All sources, also the ones that are not configured
|
||||
ALL_SRC = $(BASIC_SRC) $(ALL_GUI_SRC) $(UNITTEST_SRC) $(EXTRA_SRC)
|
||||
@@ -1575,20 +1593,24 @@ LINT_SRC = $(BASIC_SRC) $(GUI_SRC) $(HANGULIN_SRC) \
|
||||
#LINT_SRC = $(BASIC_SRC)
|
||||
|
||||
OBJ_COMMON = \
|
||||
objects/arabic.o \
|
||||
objects/buffer.o \
|
||||
objects/blowfish.o \
|
||||
objects/charset.o \
|
||||
objects/crypt.o \
|
||||
objects/crypt_zip.o \
|
||||
objects/dict.o \
|
||||
objects/diff.o \
|
||||
objects/digraph.o \
|
||||
objects/edit.o \
|
||||
objects/eval.o \
|
||||
objects/evalfunc.o \
|
||||
objects/ex_cmds.o \
|
||||
objects/ex_cmds2.o \
|
||||
objects/ex_docmd.o \
|
||||
objects/ex_eval.o \
|
||||
objects/ex_getln.o \
|
||||
objects/farsi.o \
|
||||
objects/fileio.o \
|
||||
objects/fold.o \
|
||||
objects/getchar.o \
|
||||
@@ -1597,10 +1619,10 @@ OBJ_COMMON = \
|
||||
$(HANGULIN_OBJ) \
|
||||
objects/if_cscope.o \
|
||||
objects/if_xcmdsrv.o \
|
||||
objects/list.o \
|
||||
objects/mark.o \
|
||||
objects/memline.o \
|
||||
objects/menu.o \
|
||||
objects/message.o \
|
||||
objects/misc1.o \
|
||||
objects/misc2.o \
|
||||
objects/move.o \
|
||||
@@ -1617,11 +1639,13 @@ OBJ_COMMON = \
|
||||
objects/search.o \
|
||||
objects/sha256.o \
|
||||
objects/spell.o \
|
||||
objects/spellfile.o \
|
||||
objects/syntax.o \
|
||||
objects/tag.o \
|
||||
objects/term.o \
|
||||
objects/ui.o \
|
||||
objects/undo.o \
|
||||
objects/userfunc.o \
|
||||
objects/version.o \
|
||||
objects/window.o \
|
||||
$(GUI_OBJ) \
|
||||
@@ -1638,34 +1662,47 @@ OBJ_COMMON = \
|
||||
$(CHANNEL_OBJ) \
|
||||
$(WSDEBUG_OBJ)
|
||||
|
||||
# The files included by tests are not in OBJ_COMMON.
|
||||
OBJ = $(OBJ_COMMON) \
|
||||
objects/json.o \
|
||||
objects/main.o \
|
||||
objects/memfile.o
|
||||
objects/memfile.o \
|
||||
objects/message.o
|
||||
|
||||
JSON_TEST_OBJ = $(OBJ_COMMON) \
|
||||
objects/json_test.o \
|
||||
objects/memfile.o
|
||||
objects/memfile.o \
|
||||
objects/message.o \
|
||||
objects/json_test.o
|
||||
|
||||
MEMFILE_TEST_OBJ = $(OBJ_COMMON) \
|
||||
objects/json.o \
|
||||
objects/message.o \
|
||||
objects/memfile_test.o
|
||||
|
||||
MESSAGE_TEST_OBJ = $(OBJ_COMMON) \
|
||||
objects/json.o \
|
||||
objects/memfile.o \
|
||||
objects/message_test.o
|
||||
|
||||
PRO_AUTO = \
|
||||
arabic.pro \
|
||||
blowfish.pro \
|
||||
buffer.pro \
|
||||
charset.pro \
|
||||
crypt.pro \
|
||||
crypt_zip.pro \
|
||||
dict.pro \
|
||||
diff.pro \
|
||||
digraph.pro \
|
||||
edit.pro \
|
||||
eval.pro \
|
||||
evalfunc.pro \
|
||||
ex_cmds.pro \
|
||||
ex_cmds2.pro \
|
||||
ex_docmd.pro \
|
||||
ex_eval.pro \
|
||||
ex_getln.pro \
|
||||
farsi.pro \
|
||||
fileio.pro \
|
||||
fold.pro \
|
||||
getchar.pro \
|
||||
@@ -1680,6 +1717,7 @@ PRO_AUTO = \
|
||||
if_ruby.pro \
|
||||
if_xcmdsrv.pro \
|
||||
json.pro \
|
||||
list.pro \
|
||||
main.pro \
|
||||
mark.pro \
|
||||
mbyte.pro \
|
||||
@@ -1703,12 +1741,14 @@ PRO_AUTO = \
|
||||
search.pro \
|
||||
sha256.pro \
|
||||
spell.pro \
|
||||
spellfile.pro \
|
||||
syntax.pro \
|
||||
tag.pro \
|
||||
term.pro \
|
||||
termlib.pro \
|
||||
ui.pro \
|
||||
undo.pro \
|
||||
userfunc.pro \
|
||||
version.pro \
|
||||
window.pro \
|
||||
gui_beval.pro \
|
||||
@@ -1921,6 +1961,11 @@ types.vim: $(TAGS_SRC) $(TAGS_INCL)
|
||||
{printf("%s ", $$1)}END{print ""}' > $@
|
||||
echo "syn keyword Constant OK FAIL TRUE FALSE MAYBE" >> $@
|
||||
|
||||
# TESTING
|
||||
#
|
||||
# Execute the test scripts and the unittests.
|
||||
test check: scripttests unittests
|
||||
|
||||
# Execute the test scripts. Run these after compiling Vim, before installing.
|
||||
# This doesn't depend on $(VIMTARGET), because that won't work when configure
|
||||
# wasn't run yet. Restart make to build it instead.
|
||||
@@ -1932,7 +1977,7 @@ types.vim: $(TAGS_SRC) $(TAGS_INCL)
|
||||
# If everything is alright, the final message will be "ALL DONE". If not you
|
||||
# get "TEST FAILURE".
|
||||
#
|
||||
test check:
|
||||
scripttests:
|
||||
$(MAKE) -f Makefile $(VIMTARGET)
|
||||
if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \
|
||||
cd $(PODIR); $(MAKE) -f Makefile check VIM=../$(VIMTARGET); \
|
||||
@@ -1941,7 +1986,7 @@ test check:
|
||||
ln -s $(VIMTARGET) vim; \
|
||||
fi
|
||||
cd testdir; $(MAKE) -f Makefile $(GUI_TESTTARGET) VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
|
||||
$(MAKE) -f Makefile unittest
|
||||
|
||||
|
||||
# Run the tests with the GUI. Assumes vim/gvim was already built
|
||||
testgui:
|
||||
@@ -1953,16 +1998,17 @@ benchmark:
|
||||
unittesttargets:
|
||||
$(MAKE) -f Makefile $(UNITTEST_TARGETS)
|
||||
|
||||
unittest unittests: $(UNITTEST_TARGETS)
|
||||
@for t in $(UNITTEST_TARGETS); do \
|
||||
./$$t || exit 1; echo $$t passed; \
|
||||
done
|
||||
# Execute the unittests one by one.
|
||||
unittest unittests: $(RUN_UNITTESTS)
|
||||
|
||||
run_json_test: $(JSON_TEST_TARGET)
|
||||
./$(JSON_TEST_TARGET)
|
||||
$(VALGRIND) ./$(JSON_TEST_TARGET) || exit 1; echo $* passed;
|
||||
|
||||
run_memfile_test: $(MEMFILE_TEST_TARGET)
|
||||
./$(MEMFILE_TEST_TARGET)
|
||||
$(VALGRIND) ./$(MEMFILE_TEST_TARGET) || exit 1; echo $* passed;
|
||||
|
||||
run_message_test: $(MESSAGE_TEST_TARGET)
|
||||
$(VALGRIND) ./$(MESSAGE_TEST_TARGET) || exit 1; echo $* passed;
|
||||
|
||||
# Run individual OLD style test, assuming that Vim was already compiled.
|
||||
test1 \
|
||||
@@ -1986,21 +2032,19 @@ test1 \
|
||||
test_marks \
|
||||
test_nested_function \
|
||||
test_options \
|
||||
test_ruby \
|
||||
test_search_mbyte \
|
||||
test_signs \
|
||||
test_tagcase \
|
||||
test_textobjects \
|
||||
test_utf8 \
|
||||
test_wordcount \
|
||||
test_writefile \
|
||||
test2 test3 test4 test5 test6 test7 test8 test9 \
|
||||
test11 test12 test13 test14 test15 test16 test17 test18 test19 \
|
||||
test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \
|
||||
test30 test31 test32 test33 test34 test35 test36 test37 test38 test39 \
|
||||
test40 test41 test42 test43 test44 test45 test46 test47 test48 test49 \
|
||||
test30 test31 test32 test33 test34 test36 test37 test38 test39 \
|
||||
test40 test41 test42 test43 test44 test45 test46 test48 test49 \
|
||||
test50 test51 test52 test53 test54 test55 test56 test57 test58 test59 \
|
||||
test60 test61 test62 test63 test64 test65 test66 test67 test68 test69 \
|
||||
test60 test62 test63 test64 test65 test66 test67 test68 test69 \
|
||||
test70 test71 test72 test73 test74 test75 test76 test77 test78 test79 \
|
||||
test80 test81 test82 test83 test84 test85 test86 test87 test88 test89 \
|
||||
test90 test91 test92 test93 test94 test95 test97 test98 test99 \
|
||||
@@ -2011,53 +2055,75 @@ test1 \
|
||||
test_arglist \
|
||||
test_assert \
|
||||
test_assign \
|
||||
test_autochdir \
|
||||
test_autocmd \
|
||||
test_backspace_opt \
|
||||
test_cdo \
|
||||
test_channel \
|
||||
test_cmdline \
|
||||
test_cscope \
|
||||
test_cursor_func \
|
||||
test_delete \
|
||||
test_diffmode \
|
||||
test_digraph \
|
||||
test_ex_undo \
|
||||
test_execute_func \
|
||||
test_expand \
|
||||
test_expand_dllpath \
|
||||
test_expr \
|
||||
test_expr_utf8 \
|
||||
test_farsi \
|
||||
test_feedkeys \
|
||||
test_file_perm \
|
||||
test_filter_map \
|
||||
test_fnamemodify \
|
||||
test_glob2regpat \
|
||||
test_gn \
|
||||
test_goto \
|
||||
test_hardcopy \
|
||||
test_help_tagjump \
|
||||
test_history \
|
||||
test_increment \
|
||||
test_increment_dbcs \
|
||||
test_join \
|
||||
test_json \
|
||||
test_jumps \
|
||||
test_lambda \
|
||||
test_langmap \
|
||||
test_largefile \
|
||||
test_lispwords \
|
||||
test_man \
|
||||
test_matchadd_conceal \
|
||||
test_matchadd_conceal_utf8 \
|
||||
test_matchstrpos \
|
||||
test_menu \
|
||||
test_messages \
|
||||
test_netbeans \
|
||||
test_packadd \
|
||||
test_partial \
|
||||
test_perl \
|
||||
test_popup \
|
||||
test_quickfix \
|
||||
test_regexp_latin \
|
||||
test_regexp_utf8 \
|
||||
test_reltime \
|
||||
test_ruby \
|
||||
test_startup \
|
||||
test_searchpos \
|
||||
test_set \
|
||||
test_sort \
|
||||
test_stat \
|
||||
test_statusline \
|
||||
test_syn_attr \
|
||||
test_syntax \
|
||||
test_tabline \
|
||||
test_tagjump \
|
||||
test_textobjects \
|
||||
test_timers \
|
||||
test_undolevels \
|
||||
test_true_false \
|
||||
test_undo \
|
||||
test_unlet \
|
||||
test_usercommands \
|
||||
test_viminfo \
|
||||
test_viml \
|
||||
test_visual \
|
||||
@@ -2101,6 +2167,13 @@ $(MEMFILE_TEST_TARGET): auto/config.mk objects $(MEMFILE_TEST_OBJ)
|
||||
MAKE="$(MAKE)" LINK_AS_NEEDED=$(LINK_AS_NEEDED) \
|
||||
sh $(srcdir)/link.sh
|
||||
|
||||
$(MESSAGE_TEST_TARGET): auto/config.mk objects $(MESSAGE_TEST_OBJ)
|
||||
$(CCC) version.c -o objects/version.o
|
||||
@LINK="$(PURIFY) $(SHRPENV) $(CClink) $(ALL_LIB_DIRS) $(LDFLAGS) \
|
||||
-o $(MESSAGE_TEST_TARGET) $(MESSAGE_TEST_OBJ) $(ALL_LIBS)" \
|
||||
MAKE="$(MAKE)" LINK_AS_NEEDED=$(LINK_AS_NEEDED) \
|
||||
sh $(srcdir)/link.sh
|
||||
|
||||
# install targets
|
||||
|
||||
install: $(GUI_INSTALL)
|
||||
@@ -2170,11 +2243,13 @@ installrtbase: $(HELPSOURCE)/vim.1 $(DEST_VIM) $(DEST_RT) \
|
||||
chmod $(VIMSCRIPTMOD) $(SYS_SYNMENU_FILE)
|
||||
$(INSTALL_DATA) $(SCRIPTSOURCE)/delmenu.vim $(SYS_DELMENU_FILE)
|
||||
chmod $(VIMSCRIPTMOD) $(SYS_DELMENU_FILE)
|
||||
# install the evim file
|
||||
$(INSTALL_DATA) $(SCRIPTSOURCE)/mswin.vim $(MSWIN_FILE)
|
||||
chmod $(VIMSCRIPTMOD) $(MSWIN_FILE)
|
||||
# install the defaults/evim/mswin file
|
||||
$(INSTALL_DATA) $(SCRIPTSOURCE)/defaults.vim $(VIM_DEFAULTS_FILE)
|
||||
chmod $(VIMSCRIPTMOD) $(VIM_DEFAULTS_FILE)
|
||||
$(INSTALL_DATA) $(SCRIPTSOURCE)/evim.vim $(EVIM_FILE)
|
||||
chmod $(VIMSCRIPTMOD) $(EVIM_FILE)
|
||||
$(INSTALL_DATA) $(SCRIPTSOURCE)/mswin.vim $(MSWIN_FILE)
|
||||
chmod $(VIMSCRIPTMOD) $(MSWIN_FILE)
|
||||
# install the rgb.txt file
|
||||
$(INSTALL_DATA) $(SCRIPTSOURCE)/rgb.txt $(SYS_RGB_FILE)
|
||||
chmod $(VIMSCRIPTMOD) $(SYS_RGB_FILE)
|
||||
@@ -2542,7 +2617,7 @@ uninstall_runtime:
|
||||
-rm -f $(DEST_HELP)/*.??x $(DEST_HELP)/tags-??
|
||||
-rm -f $(SYS_RGB_FILE)
|
||||
-rm -f $(SYS_MENU_FILE) $(SYS_SYNMENU_FILE) $(SYS_DELMENU_FILE)
|
||||
-rm -f $(SYS_BUGR_FILE) $(EVIM_FILE) $(MSWIN_FILE)
|
||||
-rm -f $(SYS_BUGR_FILE) $(VIM_DEFAULTS_FILE) $(EVIM_FILE) $(MSWIN_FILE)
|
||||
-rm -f $(DEST_SCRIPT)/gvimrc_example.vim $(DEST_SCRIPT)/vimrc_example.vim
|
||||
-rm -f $(SYS_FILETYPE_FILE) $(SYS_FTOFF_FILE) $(SYS_SCRIPTS_FILE)
|
||||
-rm -f $(SYS_INDOFF_FILE) $(SYS_INDENT_FILE)
|
||||
@@ -2740,6 +2815,9 @@ auto/gui_gtk_gresources.h: gui_gtk_res.xml $(GUI_GTK_RES_INPUTS)
|
||||
objects:
|
||||
mkdir objects
|
||||
|
||||
objects/arabic.o: arabic.c
|
||||
$(CCC) -o $@ arabic.c
|
||||
|
||||
objects/blowfish.o: blowfish.c
|
||||
$(CCC) -o $@ blowfish.c
|
||||
|
||||
@@ -2755,6 +2833,9 @@ objects/crypt.o: crypt.c
|
||||
objects/crypt_zip.o: crypt_zip.c
|
||||
$(CCC) -o $@ crypt_zip.c
|
||||
|
||||
objects/dict.o: dict.c
|
||||
$(CCC) -o $@ dict.c
|
||||
|
||||
objects/diff.o: diff.c
|
||||
$(CCC) -o $@ diff.c
|
||||
|
||||
@@ -2767,6 +2848,9 @@ objects/edit.o: edit.c
|
||||
objects/eval.o: eval.c
|
||||
$(CCC) -o $@ eval.c
|
||||
|
||||
objects/evalfunc.o: evalfunc.c
|
||||
$(CCC) -o $@ evalfunc.c
|
||||
|
||||
objects/ex_cmds.o: ex_cmds.c
|
||||
$(CCC) -o $@ ex_cmds.c
|
||||
|
||||
@@ -2782,6 +2866,9 @@ objects/ex_eval.o: ex_eval.c
|
||||
objects/ex_getln.o: ex_getln.c
|
||||
$(CCC) -o $@ ex_getln.c
|
||||
|
||||
objects/farsi.o: farsi.c
|
||||
$(CCC) -o $@ farsi.c
|
||||
|
||||
objects/fileio.o: fileio.c
|
||||
$(CCC) -o $@ fileio.c
|
||||
|
||||
@@ -2892,6 +2979,9 @@ objects/json.o: json.c
|
||||
objects/json_test.o: json_test.c
|
||||
$(CCC) -o $@ json_test.c
|
||||
|
||||
objects/list.o: list.c
|
||||
$(CCC) -o $@ list.c
|
||||
|
||||
objects/main.o: main.c
|
||||
$(CCC) -o $@ main.c
|
||||
|
||||
@@ -2913,6 +3003,9 @@ objects/menu.o: menu.c
|
||||
objects/message.o: message.c
|
||||
$(CCC) -o $@ message.c
|
||||
|
||||
objects/message_test.o: message_test.c
|
||||
$(CCC) -o $@ message_test.c
|
||||
|
||||
objects/misc1.o: misc1.c
|
||||
$(CCC) -o $@ misc1.c
|
||||
|
||||
@@ -2982,6 +3075,9 @@ objects/sha256.o: sha256.c
|
||||
objects/spell.o: spell.c
|
||||
$(CCC) -o $@ spell.c
|
||||
|
||||
objects/spellfile.o: spellfile.c
|
||||
$(CCC) -o $@ spellfile.c
|
||||
|
||||
objects/syntax.o: syntax.c
|
||||
$(CCC) -o $@ syntax.c
|
||||
|
||||
@@ -2997,6 +3093,9 @@ objects/ui.o: ui.c
|
||||
objects/undo.o: undo.c
|
||||
$(CCC) -o $@ undo.c
|
||||
|
||||
objects/userfunc.o: userfunc.c
|
||||
$(CCC) -o $@ userfunc.c
|
||||
|
||||
objects/window.o: window.c
|
||||
$(CCC) -o $@ window.c
|
||||
|
||||
@@ -3101,222 +3200,254 @@ $(APPDIR)/Contents:
|
||||
###############################################################################
|
||||
### (automatically generated by 'make depend')
|
||||
### Dependencies:
|
||||
objects/arabic.o: arabic.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/blowfish.o: blowfish.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h
|
||||
objects/buffer.o: buffer.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h version.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h version.h
|
||||
objects/charset.o: charset.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/crypt.o: crypt.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/crypt_zip.o: crypt_zip.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h
|
||||
objects/dict.o: dict.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/diff.o: diff.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/digraph.o: digraph.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/edit.o: edit.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/eval.o: eval.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h version.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h version.h
|
||||
objects/evalfunc.o: evalfunc.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h version.h
|
||||
objects/ex_cmds.o: ex_cmds.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h version.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h version.h
|
||||
objects/ex_cmds2.o: ex_cmds2.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h version.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h version.h
|
||||
objects/ex_docmd.o: ex_docmd.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h
|
||||
objects/ex_eval.o: ex_eval.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/ex_getln.o: ex_getln.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h
|
||||
objects/farsi.o: farsi.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/fileio.o: fileio.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/fold.o: fold.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/getchar.o: getchar.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/hardcopy.o: hardcopy.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h version.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h version.h
|
||||
objects/hashtab.o: hashtab.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/if_cscope.o: if_cscope.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h if_cscope.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h if_cscope.h
|
||||
objects/if_xcmdsrv.o: if_xcmdsrv.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h version.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h version.h
|
||||
objects/json.o: json.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/list.o: list.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/main.o: main.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h farsi.c arabic.c
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/mark.o: mark.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/memfile.o: memfile.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/memline.o: memline.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/menu.o: menu.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/message.o: message.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/misc1.o: misc1.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h version.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h version.h
|
||||
objects/misc2.o: misc2.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/move.o: move.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/mbyte.o: mbyte.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/normal.o: normal.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/ops.o: ops.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h ascii.h \
|
||||
keymap.h term.h macros.h option.h structs.h regexp.h gui.h gui_beval.h \
|
||||
proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h farsi.h arabic.h
|
||||
proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h globals.h farsi.h \
|
||||
arabic.h
|
||||
objects/option.o: option.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/os_unix.o: os_unix.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h os_unixx.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h os_unixx.h
|
||||
objects/pathdef.o: auto/pathdef.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h
|
||||
objects/popupmnu.o: popupmnu.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h
|
||||
objects/quickfix.o: quickfix.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h
|
||||
objects/regexp.o: regexp.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h regexp_nfa.c
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h regexp_nfa.c
|
||||
objects/screen.o: screen.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/search.o: search.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/sha256.o: sha256.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/spell.o: spell.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/spellfile.o: spellfile.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h
|
||||
objects/syntax.o: syntax.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/tag.o: tag.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h ascii.h \
|
||||
keymap.h term.h macros.h option.h structs.h regexp.h gui.h gui_beval.h \
|
||||
proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h farsi.h arabic.h
|
||||
proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h globals.h farsi.h \
|
||||
arabic.h
|
||||
objects/term.o: term.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/ui.o: ui.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h ascii.h \
|
||||
keymap.h term.h macros.h option.h structs.h regexp.h gui.h gui_beval.h \
|
||||
proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h farsi.h arabic.h
|
||||
proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h globals.h farsi.h \
|
||||
arabic.h
|
||||
objects/undo.o: undo.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/userfunc.o: userfunc.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h
|
||||
objects/version.o: version.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h version.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h version.h
|
||||
objects/window.o: window.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/gui.o: gui.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h ascii.h \
|
||||
keymap.h term.h macros.h option.h structs.h regexp.h gui.h gui_beval.h \
|
||||
proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h farsi.h arabic.h
|
||||
objects/gui_gtk.o: gui_gtk.c gui_gtk_f.h vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h globals.h farsi.h \
|
||||
arabic.h
|
||||
objects/gui_gtk.o: gui_gtk.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h gui_gtk_f.h
|
||||
objects/gui_gtk_f.o: gui_gtk_f.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h gui_gtk_f.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h gui_gtk_f.h
|
||||
objects/gui_motif.o: gui_motif.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h gui_xmebw.h ../pixmaps/alert.xpm \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h gui_xmebw.h ../pixmaps/alert.xpm \
|
||||
../pixmaps/error.xpm ../pixmaps/generic.xpm ../pixmaps/info.xpm \
|
||||
../pixmaps/quest.xpm gui_x11_pm.h ../pixmaps/tb_new.xpm \
|
||||
../pixmaps/tb_open.xpm ../pixmaps/tb_close.xpm ../pixmaps/tb_save.xpm \
|
||||
@@ -3336,16 +3467,16 @@ objects/gui_motif.o: gui_motif.c vim.h auto/config.h feature.h os_unix.h \
|
||||
../pixmaps/tb_minwidth.xpm
|
||||
objects/gui_xmdlg.o: gui_xmdlg.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h
|
||||
objects/gui_xmebw.o: gui_xmebw.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h gui_xmebwp.h gui_xmebw.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h gui_xmebwp.h gui_xmebw.h
|
||||
objects/gui_athena.o: gui_athena.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h gui_at_sb.h gui_x11_pm.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h gui_at_sb.h gui_x11_pm.h \
|
||||
../pixmaps/tb_new.xpm ../pixmaps/tb_open.xpm ../pixmaps/tb_close.xpm \
|
||||
../pixmaps/tb_save.xpm ../pixmaps/tb_print.xpm ../pixmaps/tb_cut.xpm \
|
||||
../pixmaps/tb_copy.xpm ../pixmaps/tb_paste.xpm ../pixmaps/tb_find.xpm \
|
||||
@@ -3363,88 +3494,94 @@ objects/gui_athena.o: gui_athena.c vim.h auto/config.h feature.h os_unix.h \
|
||||
../pixmaps/tb_minwidth.xpm
|
||||
objects/gui_gtk_x11.o: gui_gtk_x11.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h auto/gui_gtk_gresources.h gui_gtk_f.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h auto/gui_gtk_gresources.h gui_gtk_f.h \
|
||||
../runtime/vim32x32.xpm ../runtime/vim16x16.xpm ../runtime/vim48x48.xpm
|
||||
objects/gui_x11.o: gui_x11.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h ../runtime/vim32x32.xpm ../runtime/vim16x16.xpm \
|
||||
../runtime/vim48x48.xpm
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h ../runtime/vim32x32.xpm \
|
||||
../runtime/vim16x16.xpm ../runtime/vim48x48.xpm
|
||||
objects/gui_at_sb.o: gui_at_sb.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h gui_at_sb.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h gui_at_sb.h
|
||||
objects/gui_at_fs.o: gui_at_fs.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h gui_at_sb.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h gui_at_sb.h
|
||||
objects/pty.o: pty.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h ascii.h \
|
||||
keymap.h term.h macros.h option.h structs.h regexp.h gui.h gui_beval.h \
|
||||
proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h farsi.h arabic.h
|
||||
proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h globals.h farsi.h \
|
||||
arabic.h
|
||||
objects/json_test.o: json_test.c main.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h farsi.c arabic.c json.c
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h json.c
|
||||
objects/memfile_test.o: memfile_test.c main.c vim.h auto/config.h feature.h \
|
||||
os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h \
|
||||
structs.h regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h \
|
||||
ex_cmds.h proto.h globals.h farsi.h arabic.h farsi.c arabic.c memfile.c
|
||||
ex_cmds.h spell.h proto.h globals.h farsi.h arabic.h memfile.c
|
||||
objects/message_test.o: message_test.c main.c vim.h auto/config.h feature.h \
|
||||
os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h \
|
||||
structs.h regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h \
|
||||
ex_cmds.h spell.h proto.h globals.h farsi.h arabic.h message.c
|
||||
objects/hangulin.o: hangulin.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h
|
||||
objects/if_lua.o: if_lua.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/if_mzsch.o: if_mzsch.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h if_mzsch.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h if_mzsch.h
|
||||
objects/if_perl.o: auto/if_perl.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h
|
||||
objects/if_perlsfio.o: if_perlsfio.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h
|
||||
objects/if_python.o: if_python.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h if_py_both.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h if_py_both.h
|
||||
objects/if_python3.o: if_python3.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h if_py_both.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h if_py_both.h
|
||||
objects/if_tcl.o: if_tcl.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/if_ruby.o: if_ruby.c auto/config.h vim.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h version.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h version.h
|
||||
objects/gui_beval.o: gui_beval.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h
|
||||
objects/workshop.o: workshop.c auto/config.h integration.h vim.h feature.h \
|
||||
os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h \
|
||||
structs.h regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h \
|
||||
ex_cmds.h proto.h globals.h farsi.h arabic.h version.h workshop.h
|
||||
ex_cmds.h spell.h proto.h globals.h farsi.h arabic.h version.h \
|
||||
workshop.h
|
||||
objects/wsdebug.o: wsdebug.c
|
||||
objects/integration.o: integration.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h integration.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h integration.h
|
||||
objects/netbeans.o: netbeans.c vim.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h version.h
|
||||
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h version.h
|
||||
objects/channel.o: channel.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
|
||||
farsi.h arabic.h
|
||||
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
objects/gui_gtk_gresources.o: auto/gui_gtk_gresources.c
|
||||
|
||||
11
src/arabic.c
11
src/arabic.c
@@ -10,14 +10,13 @@
|
||||
/*
|
||||
* arabic.c: functions for Arabic language
|
||||
*
|
||||
* Included by main.c, when FEAT_ARABIC & FEAT_GUI is defined.
|
||||
*
|
||||
* --
|
||||
*
|
||||
* Author: Nadim Shaikli & Isam Bayazidi
|
||||
*
|
||||
*/
|
||||
|
||||
#include "vim.h"
|
||||
|
||||
#if defined(FEAT_ARABIC) || defined(PROTO)
|
||||
|
||||
static int A_is_a(int cur_c);
|
||||
static int A_is_s(int cur_c);
|
||||
static int A_is_f(int cur_c);
|
||||
@@ -1148,3 +1147,5 @@ A_is_special(int c)
|
||||
{
|
||||
return (c == a_HAMZA || c == a_s_HAMZA);
|
||||
}
|
||||
|
||||
#endif /* FEAT_ARABIC */
|
||||
|
||||
16
src/auto/configure
vendored
16
src/auto/configure
vendored
@@ -757,6 +757,7 @@ infodir
|
||||
docdir
|
||||
oldincludedir
|
||||
includedir
|
||||
runstatedir
|
||||
localstatedir
|
||||
sharedstatedir
|
||||
sysconfdir
|
||||
@@ -888,6 +889,7 @@ datadir='${datarootdir}'
|
||||
sysconfdir='${prefix}/etc'
|
||||
sharedstatedir='${prefix}/com'
|
||||
localstatedir='${prefix}/var'
|
||||
runstatedir='${localstatedir}/run'
|
||||
includedir='${prefix}/include'
|
||||
oldincludedir='/usr/include'
|
||||
docdir='${datarootdir}/doc/${PACKAGE}'
|
||||
@@ -1140,6 +1142,15 @@ do
|
||||
| -silent | --silent | --silen | --sile | --sil)
|
||||
silent=yes ;;
|
||||
|
||||
-runstatedir | --runstatedir | --runstatedi | --runstated \
|
||||
| --runstate | --runstat | --runsta | --runst | --runs \
|
||||
| --run | --ru | --r)
|
||||
ac_prev=runstatedir ;;
|
||||
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
|
||||
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
|
||||
| --run=* | --ru=* | --r=*)
|
||||
runstatedir=$ac_optarg ;;
|
||||
|
||||
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||
ac_prev=sbindir ;;
|
||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||
@@ -1277,7 +1288,7 @@ fi
|
||||
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
||||
datadir sysconfdir sharedstatedir localstatedir includedir \
|
||||
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
||||
libdir localedir mandir
|
||||
libdir localedir mandir runstatedir
|
||||
do
|
||||
eval ac_val=\$$ac_var
|
||||
# Remove trailing slashes.
|
||||
@@ -1430,6 +1441,7 @@ Fine tuning of the installation directories:
|
||||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||
--includedir=DIR C header files [PREFIX/include]
|
||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
||||
@@ -1512,7 +1524,7 @@ Optional Packages:
|
||||
--with-view-name=NAME what to call the View executable
|
||||
--with-global-runtime=DIR global runtime directory in 'runtimepath'
|
||||
--with-modified-by=NAME name of who modified a release version
|
||||
--with-features=TYPE tiny, small, normal, big or huge (default: normal)
|
||||
--with-features=TYPE tiny, small, normal, big or huge (default: huge)
|
||||
--with-compiledby=NAME name to show in :version message
|
||||
--with-lua-prefix=PFX Prefix where Lua is installed.
|
||||
--with-luajit Link with LuaJIT instead of Lua.
|
||||
|
||||
321
src/buffer.c
321
src/buffer.c
@@ -35,9 +35,9 @@ static char_u *fname_match(regmatch_T *rmp, char_u *name, int ignore_case);
|
||||
static void buflist_setfpos(buf_T *buf, win_T *win, linenr_T lnum, colnr_T col, int copy_options);
|
||||
static wininfo_T *find_wininfo(buf_T *buf, int skip_diff_buffer);
|
||||
#ifdef UNIX
|
||||
static buf_T *buflist_findname_stat(char_u *ffname, struct stat *st);
|
||||
static int otherfile_buf(buf_T *buf, char_u *ffname, struct stat *stp);
|
||||
static int buf_same_ino(buf_T *buf, struct stat *stp);
|
||||
static buf_T *buflist_findname_stat(char_u *ffname, stat_T *st);
|
||||
static int otherfile_buf(buf_T *buf, char_u *ffname, stat_T *stp);
|
||||
static int buf_same_ino(buf_T *buf, stat_T *stp);
|
||||
#else
|
||||
static int otherfile_buf(buf_T *buf, char_u *ffname);
|
||||
#endif
|
||||
@@ -67,6 +67,9 @@ static char *msg_qflist = N_("[Quickfix List]");
|
||||
static char *e_auabort = N_("E855: Autocommands caused command to abort");
|
||||
#endif
|
||||
|
||||
/* Number of times free_buffer() was called. */
|
||||
static int buf_free_count = 0;
|
||||
|
||||
/*
|
||||
* Open current buffer, that is: open the memfile and read the file into
|
||||
* memory.
|
||||
@@ -80,7 +83,7 @@ open_buffer(
|
||||
{
|
||||
int retval = OK;
|
||||
#ifdef FEAT_AUTOCMD
|
||||
buf_T *old_curbuf;
|
||||
bufref_T old_curbuf;
|
||||
#endif
|
||||
#ifdef FEAT_SYN_HL
|
||||
long old_tw = curbuf->b_p_tw;
|
||||
@@ -102,7 +105,7 @@ open_buffer(
|
||||
* If we can't create one for the current buffer, take another buffer
|
||||
*/
|
||||
close_buffer(NULL, curbuf, 0, FALSE);
|
||||
for (curbuf = firstbuf; curbuf != NULL; curbuf = curbuf->b_next)
|
||||
FOR_ALL_BUFFERS(curbuf)
|
||||
if (curbuf->b_ml.ml_mfp != NULL)
|
||||
break;
|
||||
/*
|
||||
@@ -126,7 +129,7 @@ open_buffer(
|
||||
#ifdef FEAT_AUTOCMD
|
||||
/* The autocommands in readfile() may change the buffer, but only AFTER
|
||||
* reading the file. */
|
||||
old_curbuf = curbuf;
|
||||
set_bufref(&old_curbuf, curbuf);
|
||||
modified_was_set = FALSE;
|
||||
#endif
|
||||
|
||||
@@ -281,12 +284,12 @@ open_buffer(
|
||||
* The autocommands may have changed the current buffer. Apply the
|
||||
* modelines to the correct buffer, if it still exists and is loaded.
|
||||
*/
|
||||
if (buf_valid(old_curbuf) && old_curbuf->b_ml.ml_mfp != NULL)
|
||||
if (bufref_valid(&old_curbuf) && old_curbuf.br_buf->b_ml.ml_mfp != NULL)
|
||||
{
|
||||
aco_save_T aco;
|
||||
|
||||
/* Go to the buffer that was opened. */
|
||||
aucmd_prepbuf(&aco, old_curbuf);
|
||||
aucmd_prepbuf(&aco, old_curbuf.br_buf);
|
||||
#endif
|
||||
do_modelines(0);
|
||||
curbuf->b_flags &= ~(BF_CHECK_RO | BF_NEVERLOADED);
|
||||
@@ -308,20 +311,66 @@ open_buffer(
|
||||
return retval;
|
||||
}
|
||||
|
||||
/*
|
||||
* Store "buf" in "bufref" and set the free count.
|
||||
*/
|
||||
void
|
||||
set_bufref(bufref_T *bufref, buf_T *buf)
|
||||
{
|
||||
bufref->br_buf = buf;
|
||||
bufref->br_buf_free_count = buf_free_count;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE if "bufref->br_buf" points to a valid buffer.
|
||||
* Only goes through the buffer list if buf_free_count changed.
|
||||
*/
|
||||
int
|
||||
bufref_valid(bufref_T *bufref)
|
||||
{
|
||||
return bufref->br_buf_free_count == buf_free_count
|
||||
? TRUE : buf_valid(bufref->br_buf);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE if "buf" points to a valid buffer (in the buffer list).
|
||||
* This can be slow if there are many buffers, prefer using bufref_valid().
|
||||
*/
|
||||
int
|
||||
buf_valid(buf_T *buf)
|
||||
{
|
||||
buf_T *bp;
|
||||
|
||||
for (bp = firstbuf; bp != NULL; bp = bp->b_next)
|
||||
/* Assume that we more often have a recent buffer, start with the last
|
||||
* one. */
|
||||
for (bp = lastbuf; bp != NULL; bp = bp->b_prev)
|
||||
if (bp == buf)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* A hash table used to quickly lookup a buffer by its number.
|
||||
*/
|
||||
static hashtab_T buf_hashtab;
|
||||
|
||||
static void
|
||||
buf_hashtab_add(buf_T *buf)
|
||||
{
|
||||
sprintf((char *)buf->b_key, "%x", buf->b_fnum);
|
||||
if (hash_add(&buf_hashtab, buf->b_key) == FAIL)
|
||||
EMSG(_("E931: Buffer cannot be registered"));
|
||||
}
|
||||
|
||||
static void
|
||||
buf_hashtab_remove(buf_T *buf)
|
||||
{
|
||||
hashitem_T *hi = hash_find(&buf_hashtab, buf->b_key);
|
||||
|
||||
if (!HASHITEM_EMPTY(hi))
|
||||
hash_remove(&buf_hashtab, hi);
|
||||
}
|
||||
|
||||
/*
|
||||
* Close the link to a buffer.
|
||||
* "action" is used when there is no longer a window for the buffer.
|
||||
@@ -349,6 +398,7 @@ close_buffer(
|
||||
#ifdef FEAT_AUTOCMD
|
||||
int is_curbuf;
|
||||
int nwindows;
|
||||
bufref_T bufref;
|
||||
#endif
|
||||
int unload_buf = (action != 0);
|
||||
int del_buf = (action == DOBUF_DEL || action == DOBUF_WIPE);
|
||||
@@ -393,13 +443,15 @@ close_buffer(
|
||||
}
|
||||
|
||||
#ifdef FEAT_AUTOCMD
|
||||
set_bufref(&bufref, buf);
|
||||
|
||||
/* When the buffer is no longer in a window, trigger BufWinLeave */
|
||||
if (buf->b_nwindows == 1)
|
||||
{
|
||||
buf->b_closing = TRUE;
|
||||
apply_autocmds(EVENT_BUFWINLEAVE, buf->b_fname, buf->b_fname,
|
||||
FALSE, buf);
|
||||
if (!buf_valid(buf))
|
||||
if (apply_autocmds(EVENT_BUFWINLEAVE, buf->b_fname, buf->b_fname,
|
||||
FALSE, buf)
|
||||
&& !bufref_valid(&bufref))
|
||||
{
|
||||
/* Autocommands deleted the buffer. */
|
||||
aucmd_abort:
|
||||
@@ -416,9 +468,9 @@ aucmd_abort:
|
||||
if (!unload_buf)
|
||||
{
|
||||
buf->b_closing = TRUE;
|
||||
apply_autocmds(EVENT_BUFHIDDEN, buf->b_fname, buf->b_fname,
|
||||
FALSE, buf);
|
||||
if (!buf_valid(buf))
|
||||
if (apply_autocmds(EVENT_BUFHIDDEN, buf->b_fname, buf->b_fname,
|
||||
FALSE, buf)
|
||||
&& !bufref_valid(&bufref))
|
||||
/* Autocommands deleted the buffer. */
|
||||
goto aucmd_abort;
|
||||
buf->b_closing = FALSE;
|
||||
@@ -459,29 +511,16 @@ aucmd_abort:
|
||||
#endif
|
||||
|
||||
buf_freeall(buf, (del_buf ? BFA_DEL : 0) + (wipe_buf ? BFA_WIPE : 0));
|
||||
if (
|
||||
#ifdef FEAT_WINDOWS
|
||||
win_valid(win) &&
|
||||
#else
|
||||
win != NULL &&
|
||||
#endif
|
||||
win->w_buffer == buf)
|
||||
win->w_buffer = NULL; /* make sure we don't use the buffer now */
|
||||
|
||||
#ifdef FEAT_AUTOCMD
|
||||
/* Autocommands may have deleted the buffer. */
|
||||
if (!buf_valid(buf))
|
||||
if (!bufref_valid(&bufref))
|
||||
return;
|
||||
# ifdef FEAT_EVAL
|
||||
if (aborting()) /* autocmds may abort script processing */
|
||||
return;
|
||||
# endif
|
||||
|
||||
/* Autocommands may have opened or closed windows for this buffer.
|
||||
* Decrement the count for the close we do here. */
|
||||
if (buf->b_nwindows > 0)
|
||||
--buf->b_nwindows;
|
||||
|
||||
/*
|
||||
* It's possible that autocommands change curbuf to the one being deleted.
|
||||
* This might cause the previous curbuf to be deleted unexpectedly. But
|
||||
@@ -491,6 +530,20 @@ aucmd_abort:
|
||||
*/
|
||||
if (buf == curbuf && !is_curbuf)
|
||||
return;
|
||||
|
||||
if (
|
||||
#ifdef FEAT_WINDOWS
|
||||
win_valid(win) &&
|
||||
#else
|
||||
win != NULL &&
|
||||
#endif
|
||||
win->w_buffer == buf)
|
||||
win->w_buffer = NULL; /* make sure we don't use the buffer now */
|
||||
|
||||
/* Autocommands may have opened or closed windows for this buffer.
|
||||
* Decrement the count for the close we do here. */
|
||||
if (buf->b_nwindows > 0)
|
||||
--buf->b_nwindows;
|
||||
#endif
|
||||
|
||||
/* Change directories when the 'acd' option is set. */
|
||||
@@ -572,25 +625,32 @@ buf_freeall(buf_T *buf, int flags)
|
||||
{
|
||||
#ifdef FEAT_AUTOCMD
|
||||
int is_curbuf = (buf == curbuf);
|
||||
bufref_T bufref;
|
||||
|
||||
buf->b_closing = TRUE;
|
||||
set_bufref(&bufref, buf);
|
||||
if (buf->b_ml.ml_mfp != NULL)
|
||||
{
|
||||
apply_autocmds(EVENT_BUFUNLOAD, buf->b_fname, buf->b_fname, FALSE, buf);
|
||||
if (!buf_valid(buf)) /* autocommands may delete the buffer */
|
||||
if (apply_autocmds(EVENT_BUFUNLOAD, buf->b_fname, buf->b_fname,
|
||||
FALSE, buf)
|
||||
&& !bufref_valid(&bufref))
|
||||
/* autocommands deleted the buffer */
|
||||
return;
|
||||
}
|
||||
if ((flags & BFA_DEL) && buf->b_p_bl)
|
||||
{
|
||||
apply_autocmds(EVENT_BUFDELETE, buf->b_fname, buf->b_fname, FALSE, buf);
|
||||
if (!buf_valid(buf)) /* autocommands may delete the buffer */
|
||||
if (apply_autocmds(EVENT_BUFDELETE, buf->b_fname, buf->b_fname,
|
||||
FALSE, buf)
|
||||
&& !bufref_valid(&bufref))
|
||||
/* autocommands deleted the buffer */
|
||||
return;
|
||||
}
|
||||
if (flags & BFA_WIPE)
|
||||
{
|
||||
apply_autocmds(EVENT_BUFWIPEOUT, buf->b_fname, buf->b_fname,
|
||||
FALSE, buf);
|
||||
if (!buf_valid(buf)) /* autocommands may delete the buffer */
|
||||
if (apply_autocmds(EVENT_BUFWIPEOUT, buf->b_fname, buf->b_fname,
|
||||
FALSE, buf)
|
||||
&& !bufref_valid(&bufref))
|
||||
/* autocommands deleted the buffer */
|
||||
return;
|
||||
}
|
||||
buf->b_closing = FALSE;
|
||||
@@ -657,6 +717,7 @@ buf_freeall(buf_T *buf, int flags)
|
||||
static void
|
||||
free_buffer(buf_T *buf)
|
||||
{
|
||||
++buf_free_count;
|
||||
free_buffer_stuff(buf, TRUE);
|
||||
#ifdef FEAT_EVAL
|
||||
unref_var_dict(buf->b_vars);
|
||||
@@ -682,8 +743,12 @@ free_buffer(buf_T *buf)
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
channel_buffer_free(buf);
|
||||
#endif
|
||||
|
||||
buf_hashtab_remove(buf);
|
||||
|
||||
#ifdef FEAT_AUTOCMD
|
||||
aubuflocal_remove(buf);
|
||||
|
||||
if (autocmd_busy)
|
||||
{
|
||||
/* Do not free the buffer structure while autocommands are executing,
|
||||
@@ -770,7 +835,9 @@ goto_buffer(
|
||||
int count)
|
||||
{
|
||||
# if defined(FEAT_WINDOWS) && defined(HAS_SWAP_EXISTS_ACTION)
|
||||
buf_T *old_curbuf = curbuf;
|
||||
bufref_T old_curbuf;
|
||||
|
||||
set_bufref(&old_curbuf, curbuf);
|
||||
|
||||
swap_exists_action = SEA_DIALOG;
|
||||
# endif
|
||||
@@ -799,7 +866,7 @@ goto_buffer(
|
||||
# endif
|
||||
}
|
||||
else
|
||||
handle_swap_exists(old_curbuf);
|
||||
handle_swap_exists(&old_curbuf);
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
@@ -810,7 +877,7 @@ goto_buffer(
|
||||
* It is allowed for "old_curbuf" to be NULL or invalid.
|
||||
*/
|
||||
void
|
||||
handle_swap_exists(buf_T *old_curbuf)
|
||||
handle_swap_exists(bufref_T *old_curbuf)
|
||||
{
|
||||
# if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
|
||||
cleanup_T cs;
|
||||
@@ -818,6 +885,7 @@ handle_swap_exists(buf_T *old_curbuf)
|
||||
#ifdef FEAT_SYN_HL
|
||||
long old_tw = curbuf->b_p_tw;
|
||||
#endif
|
||||
buf_T *buf;
|
||||
|
||||
if (swap_exists_action == SEA_QUIT)
|
||||
{
|
||||
@@ -833,11 +901,14 @@ handle_swap_exists(buf_T *old_curbuf)
|
||||
swap_exists_action = SEA_NONE; /* don't want it again */
|
||||
swap_exists_did_quit = TRUE;
|
||||
close_buffer(curwin, curbuf, DOBUF_UNLOAD, FALSE);
|
||||
if (!buf_valid(old_curbuf) || old_curbuf == curbuf)
|
||||
old_curbuf = buflist_new(NULL, NULL, 1L, BLN_CURBUF | BLN_LISTED);
|
||||
if (old_curbuf != NULL)
|
||||
if (old_curbuf == NULL || !bufref_valid(old_curbuf)
|
||||
|| old_curbuf->br_buf == curbuf)
|
||||
buf = buflist_new(NULL, NULL, 1L, BLN_CURBUF | BLN_LISTED);
|
||||
else
|
||||
buf = old_curbuf->br_buf;
|
||||
if (buf != NULL)
|
||||
{
|
||||
enter_buffer(old_curbuf);
|
||||
enter_buffer(buf);
|
||||
#ifdef FEAT_SYN_HL
|
||||
if (old_tw != curbuf->b_p_tw)
|
||||
check_colorcolumn(curwin);
|
||||
@@ -1022,6 +1093,7 @@ empty_curbuf(
|
||||
{
|
||||
int retval;
|
||||
buf_T *buf = curbuf;
|
||||
bufref_T bufref;
|
||||
|
||||
if (action == DOBUF_UNLOAD)
|
||||
{
|
||||
@@ -1029,13 +1101,12 @@ empty_curbuf(
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
if (close_others)
|
||||
{
|
||||
/* Close any other windows on this buffer, then make it empty. */
|
||||
set_bufref(&bufref, buf);
|
||||
#ifdef FEAT_WINDOWS
|
||||
if (close_others)
|
||||
/* Close any other windows on this buffer, then make it empty. */
|
||||
close_windows(buf, TRUE);
|
||||
#endif
|
||||
}
|
||||
|
||||
setpcmark();
|
||||
retval = do_ecmd(0, NULL, NULL, NULL, ECMD_ONE,
|
||||
@@ -1046,7 +1117,7 @@ empty_curbuf(
|
||||
* the old one. But do_ecmd() may have done that already, check
|
||||
* if the buffer still exists.
|
||||
*/
|
||||
if (buf != curbuf && buf_valid(buf) && buf->b_nwindows == 0)
|
||||
if (buf != curbuf && bufref_valid(&bufref) && buf->b_nwindows == 0)
|
||||
close_buffer(NULL, buf, action, FALSE);
|
||||
if (!close_others)
|
||||
need_fileinfo = FALSE;
|
||||
@@ -1172,6 +1243,11 @@ do_buffer(
|
||||
if (unload)
|
||||
{
|
||||
int forward;
|
||||
# if defined(FEAT_AUTOCMD) || defined(FEAT_WINDOWS)
|
||||
bufref_T bufref;
|
||||
|
||||
set_bufref(&bufref, buf);
|
||||
# endif
|
||||
|
||||
/* When unloading or deleting a buffer that's already unloaded and
|
||||
* unlisted: fail silently. */
|
||||
@@ -1185,7 +1261,7 @@ do_buffer(
|
||||
{
|
||||
dialog_changed(buf, FALSE);
|
||||
# ifdef FEAT_AUTOCMD
|
||||
if (!buf_valid(buf))
|
||||
if (!bufref_valid(&bufref))
|
||||
/* Autocommand deleted buffer, oops! It's not changed
|
||||
* now. */
|
||||
return FAIL;
|
||||
@@ -1208,7 +1284,7 @@ do_buffer(
|
||||
* If deleting the last (listed) buffer, make it empty.
|
||||
* The last (listed) buffer cannot be unloaded.
|
||||
*/
|
||||
for (bp = firstbuf; bp != NULL; bp = bp->b_next)
|
||||
FOR_ALL_BUFFERS(bp)
|
||||
if (bp->b_p_bl && bp != buf)
|
||||
break;
|
||||
if (bp == NULL && buf == curbuf)
|
||||
@@ -1238,9 +1314,10 @@ do_buffer(
|
||||
{
|
||||
#ifdef FEAT_WINDOWS
|
||||
close_windows(buf, FALSE);
|
||||
if (buf != curbuf && bufref_valid(&bufref))
|
||||
#endif
|
||||
if (buf != curbuf && buf_valid(buf) && buf->b_nwindows <= 0)
|
||||
close_buffer(NULL, buf, action, FALSE);
|
||||
if (buf->b_nwindows <= 0)
|
||||
close_buffer(NULL, buf, action, FALSE);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -1248,7 +1325,7 @@ do_buffer(
|
||||
* Deleting the current buffer: Need to find another buffer to go to.
|
||||
* There should be another, otherwise it would have been handled
|
||||
* above. However, autocommands may have deleted all buffers.
|
||||
* First use au_new_curbuf, if it is valid.
|
||||
* First use au_new_curbuf.br_buf, if it is valid.
|
||||
* Then prefer the buffer we most recently visited.
|
||||
* Else try to find one that is loaded, after the current buffer,
|
||||
* then before the current buffer.
|
||||
@@ -1257,8 +1334,8 @@ do_buffer(
|
||||
buf = NULL; /* selected buffer */
|
||||
bp = NULL; /* used when no loaded buffer found */
|
||||
#ifdef FEAT_AUTOCMD
|
||||
if (au_new_curbuf != NULL && buf_valid(au_new_curbuf))
|
||||
buf = au_new_curbuf;
|
||||
if (au_new_curbuf.br_buf != NULL && bufref_valid(&au_new_curbuf))
|
||||
buf = au_new_curbuf.br_buf;
|
||||
# ifdef FEAT_JUMPLIST
|
||||
else
|
||||
# endif
|
||||
@@ -1333,7 +1410,7 @@ do_buffer(
|
||||
buf = bp;
|
||||
if (buf == NULL) /* No loaded buffer, find listed one */
|
||||
{
|
||||
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
|
||||
FOR_ALL_BUFFERS(buf)
|
||||
if (buf->b_p_bl && buf != curbuf)
|
||||
break;
|
||||
}
|
||||
@@ -1385,9 +1462,14 @@ do_buffer(
|
||||
#if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
|
||||
if ((p_confirm || cmdmod.confirm) && p_write)
|
||||
{
|
||||
# ifdef FEAT_AUTOCMD
|
||||
bufref_T bufref;
|
||||
|
||||
set_bufref(&bufref, buf);
|
||||
# endif
|
||||
dialog_changed(curbuf, FALSE);
|
||||
# ifdef FEAT_AUTOCMD
|
||||
if (!buf_valid(buf))
|
||||
if (!bufref_valid(&bufref))
|
||||
/* Autocommand deleted buffer, oops! */
|
||||
return FAIL;
|
||||
# endif
|
||||
@@ -1438,6 +1520,7 @@ set_curbuf(buf_T *buf, int action)
|
||||
#ifdef FEAT_SYN_HL
|
||||
long old_tw = curbuf->b_p_tw;
|
||||
#endif
|
||||
bufref_T bufref;
|
||||
|
||||
setpcmark();
|
||||
if (!cmdmod.keepalt)
|
||||
@@ -1449,13 +1532,14 @@ set_curbuf(buf_T *buf, int action)
|
||||
|
||||
/* close_windows() or apply_autocmds() may change curbuf */
|
||||
prevbuf = curbuf;
|
||||
set_bufref(&bufref, prevbuf);
|
||||
|
||||
#ifdef FEAT_AUTOCMD
|
||||
apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf);
|
||||
if (!apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf)
|
||||
# ifdef FEAT_EVAL
|
||||
if (buf_valid(prevbuf) && !aborting())
|
||||
|| (bufref_valid(&bufref) && !aborting()))
|
||||
# else
|
||||
if (buf_valid(prevbuf))
|
||||
|| bufref_valid(&bufref))
|
||||
# endif
|
||||
#endif
|
||||
{
|
||||
@@ -1468,9 +1552,9 @@ set_curbuf(buf_T *buf, int action)
|
||||
close_windows(prevbuf, FALSE);
|
||||
#endif
|
||||
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
|
||||
if (buf_valid(prevbuf) && !aborting())
|
||||
if (bufref_valid(&bufref) && !aborting())
|
||||
#else
|
||||
if (buf_valid(prevbuf))
|
||||
if (bufref_valid(&bufref))
|
||||
#endif
|
||||
{
|
||||
#ifdef FEAT_WINDOWS
|
||||
@@ -1491,7 +1575,7 @@ set_curbuf(buf_T *buf, int action)
|
||||
}
|
||||
#ifdef FEAT_AUTOCMD
|
||||
/* An autocommand may have deleted "buf", already entered it (e.g., when
|
||||
* it did ":bunload") or aborted the script processing!
|
||||
* it did ":bunload") or aborted the script processing.
|
||||
* If curwin->w_buffer is null, enter_buffer() will make it valid again */
|
||||
if ((buf_valid(buf) && buf != curbuf
|
||||
# ifdef FEAT_EVAL
|
||||
@@ -1619,6 +1703,9 @@ enter_buffer(buf_T *buf)
|
||||
if (!curbuf->b_help && curwin->w_p_spell && *curwin->w_s->b_p_spl != NUL)
|
||||
(void)did_set_spelllang(curwin);
|
||||
#endif
|
||||
#ifdef FEAT_VIMINFO
|
||||
curbuf->b_last_used = vim_time();
|
||||
#endif
|
||||
|
||||
redraw_later(NOT_VALID);
|
||||
}
|
||||
@@ -1631,7 +1718,7 @@ enter_buffer(buf_T *buf)
|
||||
void
|
||||
do_autochdir(void)
|
||||
{
|
||||
if (starting == 0
|
||||
if ((starting == 0 || test_autochdir)
|
||||
&& curbuf->b_ffname != NULL
|
||||
&& vim_chdirfile(curbuf->b_ffname) == OK)
|
||||
shorten_fnames(TRUE);
|
||||
@@ -1642,6 +1729,8 @@ do_autochdir(void)
|
||||
* functions for dealing with the buffer list
|
||||
*/
|
||||
|
||||
static int top_file_num = 1; /* highest file number */
|
||||
|
||||
/*
|
||||
* Add a file name to the buffer list. Return a pointer to the buffer.
|
||||
* If the same file name already exists return a pointer to that buffer.
|
||||
@@ -1650,10 +1739,10 @@ do_autochdir(void)
|
||||
* If (flags & BLN_LISTED) is TRUE, add new buffer to buffer list.
|
||||
* If (flags & BLN_DUMMY) is TRUE, don't count it as a real buffer.
|
||||
* If (flags & BLN_NEW) is TRUE, don't use an existing buffer.
|
||||
* If (flags & BLN_NOOPT) is TRUE, don't copy options from the current buffer
|
||||
* if the buffer already exists.
|
||||
* This is the ONLY way to create a new buffer.
|
||||
*/
|
||||
static int top_file_num = 1; /* highest file number */
|
||||
|
||||
buf_T *
|
||||
buflist_new(
|
||||
char_u *ffname, /* full path of fname or relative */
|
||||
@@ -1663,9 +1752,12 @@ buflist_new(
|
||||
{
|
||||
buf_T *buf;
|
||||
#ifdef UNIX
|
||||
struct stat st;
|
||||
stat_T st;
|
||||
#endif
|
||||
|
||||
if (top_file_num == 1)
|
||||
hash_init(&buf_hashtab);
|
||||
|
||||
fname_expand(curbuf, &ffname, &sfname); /* will allocate ffname */
|
||||
|
||||
/*
|
||||
@@ -1688,17 +1780,24 @@ buflist_new(
|
||||
vim_free(ffname);
|
||||
if (lnum != 0)
|
||||
buflist_setfpos(buf, curwin, lnum, (colnr_T)0, FALSE);
|
||||
/* copy the options now, if 'cpo' doesn't have 's' and not done
|
||||
* already */
|
||||
buf_copy_options(buf, 0);
|
||||
|
||||
if ((flags & BLN_NOOPT) == 0)
|
||||
/* copy the options now, if 'cpo' doesn't have 's' and not done
|
||||
* already */
|
||||
buf_copy_options(buf, 0);
|
||||
|
||||
if ((flags & BLN_LISTED) && !buf->b_p_bl)
|
||||
{
|
||||
#ifdef FEAT_AUTOCMD
|
||||
bufref_T bufref;
|
||||
#endif
|
||||
buf->b_p_bl = TRUE;
|
||||
#ifdef FEAT_AUTOCMD
|
||||
set_bufref(&bufref, buf);
|
||||
if (!(flags & BLN_DUMMY))
|
||||
{
|
||||
apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, buf);
|
||||
if (!buf_valid(buf))
|
||||
if (apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, buf)
|
||||
&& !bufref_valid(&bufref))
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
@@ -1837,6 +1936,7 @@ buflist_new(
|
||||
}
|
||||
top_file_num = 1;
|
||||
}
|
||||
buf_hashtab_add(buf);
|
||||
|
||||
/*
|
||||
* Always copy the options from the current buffer.
|
||||
@@ -1874,16 +1974,19 @@ buflist_new(
|
||||
#ifdef FEAT_AUTOCMD
|
||||
if (!(flags & BLN_DUMMY))
|
||||
{
|
||||
bufref_T bufref;
|
||||
|
||||
/* Tricky: these autocommands may change the buffer list. They could
|
||||
* also split the window with re-using the one empty buffer. This may
|
||||
* result in unexpectedly losing the empty buffer. */
|
||||
apply_autocmds(EVENT_BUFNEW, NULL, NULL, FALSE, buf);
|
||||
if (!buf_valid(buf))
|
||||
set_bufref(&bufref, buf);
|
||||
if (apply_autocmds(EVENT_BUFNEW, NULL, NULL, FALSE, buf)
|
||||
&& !bufref_valid(&bufref))
|
||||
return NULL;
|
||||
if (flags & BLN_LISTED)
|
||||
{
|
||||
apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, buf);
|
||||
if (!buf_valid(buf))
|
||||
if (apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, buf)
|
||||
&& !bufref_valid(&bufref))
|
||||
return NULL;
|
||||
}
|
||||
# ifdef FEAT_EVAL
|
||||
@@ -2183,7 +2286,7 @@ buflist_findname_exp(char_u *fname)
|
||||
buflist_findname(char_u *ffname)
|
||||
{
|
||||
#ifdef UNIX
|
||||
struct stat st;
|
||||
stat_T st;
|
||||
|
||||
if (mch_stat((char *)ffname, &st) < 0)
|
||||
st.st_dev = (dev_T)-1;
|
||||
@@ -2198,12 +2301,13 @@ buflist_findname(char_u *ffname)
|
||||
static buf_T *
|
||||
buflist_findname_stat(
|
||||
char_u *ffname,
|
||||
struct stat *stp)
|
||||
stat_T *stp)
|
||||
{
|
||||
#endif
|
||||
buf_T *buf;
|
||||
|
||||
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
|
||||
/* Start at the last buffer, expect to find a match sooner. */
|
||||
for (buf = lastbuf; buf != NULL; buf = buf->b_prev)
|
||||
if ((buf->b_flags & BF_DUMMY) == 0 && !otherfile_buf(buf, ffname
|
||||
#ifdef UNIX
|
||||
, stp
|
||||
@@ -2288,7 +2392,7 @@ buflist_findpat(
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
|
||||
for (buf = lastbuf; buf != NULL; buf = buf->b_prev)
|
||||
if (buf->b_p_bl == find_listed
|
||||
#ifdef FEAT_DIFF
|
||||
&& (!diffmode || diff_mode_buf(buf))
|
||||
@@ -2302,7 +2406,7 @@ buflist_findpat(
|
||||
#ifdef FEAT_WINDOWS
|
||||
win_T *wp;
|
||||
|
||||
for (wp = firstwin; wp != NULL; wp = wp->w_next)
|
||||
FOR_ALL_WINDOWS(wp)
|
||||
if (wp->w_buffer == buf)
|
||||
break;
|
||||
if (wp == NULL)
|
||||
@@ -2404,7 +2508,7 @@ ExpandBufnames(
|
||||
for (round = 1; round <= 2; ++round)
|
||||
{
|
||||
count = 0;
|
||||
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
|
||||
FOR_ALL_BUFFERS(buf)
|
||||
{
|
||||
if (!buf->b_p_bl) /* skip unlisted buffers */
|
||||
continue;
|
||||
@@ -2505,18 +2609,22 @@ fname_match(
|
||||
#endif
|
||||
|
||||
/*
|
||||
* find file in buffer list by number
|
||||
* Find a file in the buffer list by buffer number.
|
||||
*/
|
||||
buf_T *
|
||||
buflist_findnr(int nr)
|
||||
{
|
||||
buf_T *buf;
|
||||
char_u key[VIM_SIZEOF_INT * 2 + 1];
|
||||
hashitem_T *hi;
|
||||
|
||||
if (nr == 0)
|
||||
nr = curwin->w_alt_fnum;
|
||||
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
|
||||
if (buf->b_fnum == nr)
|
||||
return buf;
|
||||
sprintf((char *)key, "%x", nr);
|
||||
hi = hash_find(&buf_hashtab, key);
|
||||
|
||||
if (!HASHITEM_EMPTY(hi))
|
||||
return (buf_T *)(hi->hi_key
|
||||
- ((unsigned)(curbuf->b_key - (char_u *)curbuf)));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -2626,7 +2734,7 @@ wininfo_other_tab_diff(wininfo_T *wip)
|
||||
|
||||
if (wip->wi_opt.wo_diff)
|
||||
{
|
||||
for (wp = firstwin; wp != NULL; wp = wp->w_next)
|
||||
FOR_ALL_WINDOWS(wp)
|
||||
/* return FALSE when it's a window in the current tab page, thus
|
||||
* the buffer was in diff mode here */
|
||||
if (wip->wi_win == wp)
|
||||
@@ -2847,7 +2955,7 @@ setfname(
|
||||
{
|
||||
buf_T *obuf = NULL;
|
||||
#ifdef UNIX
|
||||
struct stat st;
|
||||
stat_T st;
|
||||
#endif
|
||||
|
||||
if (ffname == NULL || *ffname == NUL)
|
||||
@@ -3045,7 +3153,7 @@ buflist_slash_adjust(void)
|
||||
{
|
||||
buf_T *bp;
|
||||
|
||||
for (bp = firstbuf; bp != NULL; bp = bp->b_next)
|
||||
FOR_ALL_BUFFERS(bp)
|
||||
{
|
||||
if (bp->b_ffname != NULL)
|
||||
slash_adjust(bp->b_ffname);
|
||||
@@ -3084,7 +3192,7 @@ otherfile_buf(
|
||||
buf_T *buf,
|
||||
char_u *ffname
|
||||
#ifdef UNIX
|
||||
, struct stat *stp
|
||||
, stat_T *stp
|
||||
#endif
|
||||
)
|
||||
{
|
||||
@@ -3095,9 +3203,9 @@ otherfile_buf(
|
||||
return FALSE;
|
||||
#ifdef UNIX
|
||||
{
|
||||
struct stat st;
|
||||
stat_T st;
|
||||
|
||||
/* If no struct stat given, get it now */
|
||||
/* If no stat_T given, get it now */
|
||||
if (stp == NULL)
|
||||
{
|
||||
if (!buf->b_dev_valid || mch_stat((char *)ffname, &st) < 0)
|
||||
@@ -3132,7 +3240,7 @@ otherfile_buf(
|
||||
void
|
||||
buf_setino(buf_T *buf)
|
||||
{
|
||||
struct stat st;
|
||||
stat_T st;
|
||||
|
||||
if (buf->b_fname != NULL && mch_stat((char *)buf->b_fname, &st) >= 0)
|
||||
{
|
||||
@@ -3150,7 +3258,7 @@ buf_setino(buf_T *buf)
|
||||
static int
|
||||
buf_same_ino(
|
||||
buf_T *buf,
|
||||
struct stat *stp)
|
||||
stat_T *stp)
|
||||
{
|
||||
return (buf->b_dev_valid
|
||||
&& stp->st_dev == buf->b_dev
|
||||
@@ -4006,7 +4114,7 @@ build_stl_str_hl(
|
||||
|
||||
case STL_KEYMAP:
|
||||
fillable = FALSE;
|
||||
if (get_keymap_str(wp, tmp, TMPLEN))
|
||||
if (get_keymap_str(wp, (char_u *)"<%s>", tmp, TMPLEN))
|
||||
str = tmp;
|
||||
break;
|
||||
case STL_PAGENUM:
|
||||
@@ -4695,10 +4803,15 @@ do_arg_all(
|
||||
if (!P_HID(buf) && buf->b_nwindows <= 1
|
||||
&& bufIsChanged(buf))
|
||||
{
|
||||
#ifdef FEAT_AUTOCMD
|
||||
bufref_T bufref;
|
||||
|
||||
set_bufref(&bufref, buf);
|
||||
#endif
|
||||
(void)autowrite(buf, FALSE);
|
||||
#ifdef FEAT_AUTOCMD
|
||||
/* check if autocommands removed the window */
|
||||
if (!win_valid(wp) || !buf_valid(buf))
|
||||
if (!win_valid(wp) || !bufref_valid(&bufref))
|
||||
{
|
||||
wpnext = firstwin; /* start all over... */
|
||||
continue;
|
||||
@@ -4970,7 +5083,7 @@ ex_buffer_all(exarg_T *eap)
|
||||
#endif
|
||||
{
|
||||
/* Check if this buffer already has a window */
|
||||
for (wp = firstwin; wp != NULL; wp = wp->w_next)
|
||||
FOR_ALL_WINDOWS(wp)
|
||||
if (wp->w_buffer == buf)
|
||||
break;
|
||||
/* If the buffer already has a window, move it */
|
||||
@@ -4980,6 +5093,11 @@ ex_buffer_all(exarg_T *eap)
|
||||
|
||||
if (wp == NULL && split_ret == OK)
|
||||
{
|
||||
#ifdef FEAT_AUTOCMD
|
||||
bufref_T bufref;
|
||||
|
||||
set_bufref(&bufref, buf);
|
||||
#endif
|
||||
/* Split the window and put the buffer in it */
|
||||
p_ea_save = p_ea;
|
||||
p_ea = TRUE; /* use space from all windows */
|
||||
@@ -4995,8 +5113,9 @@ ex_buffer_all(exarg_T *eap)
|
||||
#endif
|
||||
set_curbuf(buf, DOBUF_GOTO);
|
||||
#ifdef FEAT_AUTOCMD
|
||||
if (!buf_valid(buf)) /* autocommands deleted the buffer!!! */
|
||||
if (!bufref_valid(&bufref))
|
||||
{
|
||||
/* autocommands deleted the buffer!!! */
|
||||
#if defined(HAS_SWAP_EXISTS_ACTION)
|
||||
swap_exists_action = SEA_NONE;
|
||||
# endif
|
||||
@@ -5342,7 +5461,7 @@ write_viminfo_bufferlist(FILE *fp)
|
||||
#endif
|
||||
|
||||
fputs(_("\n# Buffer list:\n"), fp);
|
||||
for (buf = firstbuf; buf != NULL ; buf = buf->b_next)
|
||||
FOR_ALL_BUFFERS(buf)
|
||||
{
|
||||
if (buf->b_fname == NULL
|
||||
|| !buf->b_p_bl
|
||||
@@ -5728,7 +5847,7 @@ buf_delete_all_signs(void)
|
||||
{
|
||||
buf_T *buf; /* buffer we are checking for signs */
|
||||
|
||||
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
|
||||
FOR_ALL_BUFFERS(buf)
|
||||
if (buf->b_signlist != NULL)
|
||||
buf_delete_signs(buf);
|
||||
}
|
||||
|
||||
277
src/channel.c
277
src/channel.c
@@ -261,7 +261,10 @@ strerror_win32(int eno)
|
||||
char_u *ptr;
|
||||
|
||||
if (msgbuf)
|
||||
{
|
||||
LocalFree(msgbuf);
|
||||
msgbuf = NULL;
|
||||
}
|
||||
FormatMessage(
|
||||
FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
||||
FORMAT_MESSAGE_FROM_SYSTEM |
|
||||
@@ -272,21 +275,22 @@ strerror_win32(int eno)
|
||||
(LPTSTR) &msgbuf,
|
||||
0,
|
||||
NULL);
|
||||
/* chomp \r or \n */
|
||||
for (ptr = (char_u *)msgbuf; *ptr; ptr++)
|
||||
switch (*ptr)
|
||||
{
|
||||
case '\r':
|
||||
STRMOVE(ptr, ptr + 1);
|
||||
ptr--;
|
||||
break;
|
||||
case '\n':
|
||||
if (*(ptr + 1) == '\0')
|
||||
*ptr = '\0';
|
||||
else
|
||||
*ptr = ' ';
|
||||
break;
|
||||
}
|
||||
if (msgbuf != NULL)
|
||||
/* chomp \r or \n */
|
||||
for (ptr = (char_u *)msgbuf; *ptr; ptr++)
|
||||
switch (*ptr)
|
||||
{
|
||||
case '\r':
|
||||
STRMOVE(ptr, ptr + 1);
|
||||
ptr--;
|
||||
break;
|
||||
case '\n':
|
||||
if (*(ptr + 1) == '\0')
|
||||
*ptr = '\0';
|
||||
else
|
||||
*ptr = ' ';
|
||||
break;
|
||||
}
|
||||
return msgbuf;
|
||||
}
|
||||
#endif
|
||||
@@ -358,7 +362,7 @@ channel_still_useful(channel_T *channel)
|
||||
return TRUE;
|
||||
|
||||
/* If reading from or a buffer it's still useful. */
|
||||
if (channel->ch_part[PART_IN].ch_buffer != NULL)
|
||||
if (channel->ch_part[PART_IN].ch_bufref.br_buf != NULL)
|
||||
return TRUE;
|
||||
|
||||
/* If there is no callback then nobody can get readahead. If the fd is
|
||||
@@ -375,9 +379,11 @@ channel_still_useful(channel_T *channel)
|
||||
return (channel->ch_callback != NULL && (has_sock_msg
|
||||
|| has_out_msg || has_err_msg))
|
||||
|| ((channel->ch_part[PART_OUT].ch_callback != NULL
|
||||
|| channel->ch_part[PART_OUT].ch_buffer) && has_out_msg)
|
||||
|| channel->ch_part[PART_OUT].ch_bufref.br_buf != NULL)
|
||||
&& has_out_msg)
|
||||
|| ((channel->ch_part[PART_ERR].ch_callback != NULL
|
||||
|| channel->ch_part[PART_ERR].ch_buffer) && has_err_msg);
|
||||
|| channel->ch_part[PART_ERR].ch_bufref.br_buf != NULL)
|
||||
&& has_err_msg);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1042,19 +1048,19 @@ channel_set_job(channel_T *channel, job_T *job, jobopt_T *options)
|
||||
{
|
||||
chanpart_T *in_part = &channel->ch_part[PART_IN];
|
||||
|
||||
in_part->ch_buffer = job->jv_in_buf;
|
||||
set_bufref(&in_part->ch_bufref, job->jv_in_buf);
|
||||
ch_logs(channel, "reading from buffer '%s'",
|
||||
(char *)in_part->ch_buffer->b_ffname);
|
||||
(char *)in_part->ch_bufref.br_buf->b_ffname);
|
||||
if (options->jo_set & JO_IN_TOP)
|
||||
{
|
||||
if (options->jo_in_top == 0 && !(options->jo_set & JO_IN_BOT))
|
||||
{
|
||||
/* Special mode: send last-but-one line when appending a line
|
||||
* to the buffer. */
|
||||
in_part->ch_buffer->b_write_to_channel = TRUE;
|
||||
in_part->ch_bufref.br_buf->b_write_to_channel = TRUE;
|
||||
in_part->ch_buf_append = TRUE;
|
||||
in_part->ch_buf_top =
|
||||
in_part->ch_buffer->b_ml.ml_line_count + 1;
|
||||
in_part->ch_bufref.br_buf->b_ml.ml_line_count + 1;
|
||||
}
|
||||
else
|
||||
in_part->ch_buf_top = options->jo_in_top;
|
||||
@@ -1064,7 +1070,7 @@ channel_set_job(channel_T *channel, job_T *job, jobopt_T *options)
|
||||
if (options->jo_set & JO_IN_BOT)
|
||||
in_part->ch_buf_bot = options->jo_in_bot;
|
||||
else
|
||||
in_part->ch_buf_bot = in_part->ch_buffer->b_ml.ml_line_count;
|
||||
in_part->ch_buf_bot = in_part->ch_bufref.br_buf->b_ml.ml_line_count;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1107,6 +1113,31 @@ find_buffer(char_u *name, int err)
|
||||
return buf;
|
||||
}
|
||||
|
||||
static void
|
||||
set_callback(
|
||||
char_u **cbp,
|
||||
partial_T **pp,
|
||||
char_u *callback,
|
||||
partial_T *partial)
|
||||
{
|
||||
free_callback(*cbp, *pp);
|
||||
if (callback != NULL && *callback != NUL)
|
||||
{
|
||||
if (partial != NULL)
|
||||
*cbp = partial_name(partial);
|
||||
else
|
||||
{
|
||||
*cbp = vim_strsave(callback);
|
||||
func_ref(*cbp);
|
||||
}
|
||||
}
|
||||
else
|
||||
*cbp = NULL;
|
||||
*pp = partial;
|
||||
if (partial != NULL)
|
||||
++partial->pt_refcount;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set various properties from an "opt" argument.
|
||||
*/
|
||||
@@ -1114,8 +1145,6 @@ find_buffer(char_u *name, int err)
|
||||
channel_set_options(channel_T *channel, jobopt_T *opt)
|
||||
{
|
||||
int part;
|
||||
char_u **cbp;
|
||||
partial_T **pp;
|
||||
|
||||
if (opt->jo_set & JO_MODE)
|
||||
for (part = PART_SOCK; part <= PART_IN; ++part)
|
||||
@@ -1138,61 +1167,19 @@ channel_set_options(channel_T *channel, jobopt_T *opt)
|
||||
channel->ch_part[PART_IN].ch_block_write = 1;
|
||||
|
||||
if (opt->jo_set & JO_CALLBACK)
|
||||
{
|
||||
cbp = &channel->ch_callback;
|
||||
pp = &channel->ch_partial;
|
||||
vim_free(*cbp);
|
||||
partial_unref(*pp);
|
||||
if (opt->jo_callback != NULL && *opt->jo_callback != NUL)
|
||||
*cbp = vim_strsave(opt->jo_callback);
|
||||
else
|
||||
*cbp = NULL;
|
||||
*pp = opt->jo_partial;
|
||||
if (*pp != NULL)
|
||||
++(*pp)->pt_refcount;
|
||||
}
|
||||
set_callback(&channel->ch_callback, &channel->ch_partial,
|
||||
opt->jo_callback, opt->jo_partial);
|
||||
if (opt->jo_set & JO_OUT_CALLBACK)
|
||||
{
|
||||
cbp = &channel->ch_part[PART_OUT].ch_callback;
|
||||
pp = &channel->ch_part[PART_OUT].ch_partial;
|
||||
vim_free(*cbp);
|
||||
partial_unref(*pp);
|
||||
if (opt->jo_out_cb != NULL && *opt->jo_out_cb != NUL)
|
||||
*cbp = vim_strsave(opt->jo_out_cb);
|
||||
else
|
||||
*cbp = NULL;
|
||||
*pp = opt->jo_out_partial;
|
||||
if (*pp != NULL)
|
||||
++(*pp)->pt_refcount;
|
||||
}
|
||||
set_callback(&channel->ch_part[PART_OUT].ch_callback,
|
||||
&channel->ch_part[PART_OUT].ch_partial,
|
||||
opt->jo_out_cb, opt->jo_out_partial);
|
||||
if (opt->jo_set & JO_ERR_CALLBACK)
|
||||
{
|
||||
cbp = &channel->ch_part[PART_ERR].ch_callback;
|
||||
pp = &channel->ch_part[PART_ERR].ch_partial;
|
||||
vim_free(*cbp);
|
||||
partial_unref(*pp);
|
||||
if (opt->jo_err_cb != NULL && *opt->jo_err_cb != NUL)
|
||||
*cbp = vim_strsave(opt->jo_err_cb);
|
||||
else
|
||||
*cbp = NULL;
|
||||
*pp = opt->jo_err_partial;
|
||||
if (*pp != NULL)
|
||||
++(*pp)->pt_refcount;
|
||||
}
|
||||
set_callback(&channel->ch_part[PART_ERR].ch_callback,
|
||||
&channel->ch_part[PART_ERR].ch_partial,
|
||||
opt->jo_err_cb, opt->jo_err_partial);
|
||||
if (opt->jo_set & JO_CLOSE_CALLBACK)
|
||||
{
|
||||
cbp = &channel->ch_close_cb;
|
||||
pp = &channel->ch_close_partial;
|
||||
vim_free(*cbp);
|
||||
partial_unref(*pp);
|
||||
if (opt->jo_close_cb != NULL && *opt->jo_close_cb != NUL)
|
||||
*cbp = vim_strsave(opt->jo_close_cb);
|
||||
else
|
||||
*cbp = NULL;
|
||||
*pp = opt->jo_close_partial;
|
||||
if (*pp != NULL)
|
||||
++(*pp)->pt_refcount;
|
||||
}
|
||||
set_callback(&channel->ch_close_cb, &channel->ch_close_partial,
|
||||
opt->jo_close_cb, opt->jo_close_partial);
|
||||
|
||||
if ((opt->jo_set & JO_OUT_IO) && opt->jo_io[PART_OUT] == JIO_BUFFER)
|
||||
{
|
||||
@@ -1225,7 +1212,7 @@ channel_set_options(channel_T *channel, jobopt_T *opt)
|
||||
{
|
||||
ch_logs(channel, "writing out to buffer '%s'",
|
||||
(char *)buf->b_ffname);
|
||||
channel->ch_part[PART_OUT].ch_buffer = buf;
|
||||
set_bufref(&channel->ch_part[PART_OUT].ch_bufref, buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1240,7 +1227,7 @@ channel_set_options(channel_T *channel, jobopt_T *opt)
|
||||
if (!(opt->jo_set & JO_ERR_MODE))
|
||||
channel->ch_part[PART_ERR].ch_mode = MODE_NL;
|
||||
if (opt->jo_io[PART_ERR] == JIO_OUT)
|
||||
buf = channel->ch_part[PART_OUT].ch_buffer;
|
||||
buf = channel->ch_part[PART_OUT].ch_bufref.br_buf;
|
||||
else if (opt->jo_set & JO_ERR_BUF)
|
||||
{
|
||||
buf = buflist_findnr(opt->jo_io_buf[PART_ERR]);
|
||||
@@ -1262,7 +1249,7 @@ channel_set_options(channel_T *channel, jobopt_T *opt)
|
||||
{
|
||||
ch_logs(channel, "writing err to buffer '%s'",
|
||||
(char *)buf->b_ffname);
|
||||
channel->ch_part[PART_ERR].ch_buffer = buf;
|
||||
set_bufref(&channel->ch_part[PART_ERR].ch_bufref, buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1288,10 +1275,17 @@ channel_set_req_callback(
|
||||
|
||||
if (item != NULL)
|
||||
{
|
||||
item->cq_callback = vim_strsave(callback);
|
||||
item->cq_partial = partial;
|
||||
if (partial != NULL)
|
||||
{
|
||||
++partial->pt_refcount;
|
||||
item->cq_callback = callback;
|
||||
}
|
||||
else
|
||||
{
|
||||
item->cq_callback = vim_strsave(callback);
|
||||
func_ref(item->cq_callback);
|
||||
}
|
||||
item->cq_seq_nr = id;
|
||||
item->cq_prev = head->cq_prev;
|
||||
head->cq_prev = item;
|
||||
@@ -1309,14 +1303,20 @@ write_buf_line(buf_T *buf, linenr_T lnum, channel_T *channel)
|
||||
char_u *line = ml_get_buf(buf, lnum, FALSE);
|
||||
int len = (int)STRLEN(line);
|
||||
char_u *p;
|
||||
int i;
|
||||
|
||||
/* Need to make a copy to be able to append a NL. */
|
||||
if ((p = alloc(len + 2)) == NULL)
|
||||
return;
|
||||
STRCPY(p, line);
|
||||
memcpy((char *)p, (char *)line, len);
|
||||
|
||||
for (i = 0; i < len; ++i)
|
||||
if (p[i] == NL)
|
||||
p[i] = NUL;
|
||||
|
||||
p[len] = NL;
|
||||
p[len + 1] = NUL;
|
||||
channel_send(channel, PART_IN, p, "write_buf_line()");
|
||||
channel_send(channel, PART_IN, p, len + 1, "write_buf_line()");
|
||||
vim_free(p);
|
||||
}
|
||||
|
||||
@@ -1397,15 +1397,15 @@ channel_write_in(channel_T *channel)
|
||||
{
|
||||
chanpart_T *in_part = &channel->ch_part[PART_IN];
|
||||
linenr_T lnum;
|
||||
buf_T *buf = in_part->ch_buffer;
|
||||
buf_T *buf = in_part->ch_bufref.br_buf;
|
||||
int written = 0;
|
||||
|
||||
if (buf == NULL || in_part->ch_buf_append)
|
||||
return; /* no buffer or using appending */
|
||||
if (!buf_valid(buf) || buf->b_ml.ml_mfp == NULL)
|
||||
if (!bufref_valid(&in_part->ch_bufref) || buf->b_ml.ml_mfp == NULL)
|
||||
{
|
||||
/* buffer was wiped out or unloaded */
|
||||
in_part->ch_buffer = NULL;
|
||||
in_part->ch_bufref.br_buf = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1427,7 +1427,7 @@ channel_write_in(channel_T *channel)
|
||||
if (lnum > buf->b_ml.ml_line_count)
|
||||
{
|
||||
/* Writing is done, no longer need the buffer. */
|
||||
in_part->ch_buffer = NULL;
|
||||
in_part->ch_bufref.br_buf = NULL;
|
||||
ch_log(channel, "Finished writing all lines to channel");
|
||||
}
|
||||
else
|
||||
@@ -1436,7 +1436,7 @@ channel_write_in(channel_T *channel)
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle buffer "buf" beeing freed, remove it from any channels.
|
||||
* Handle buffer "buf" being freed, remove it from any channels.
|
||||
*/
|
||||
void
|
||||
channel_buffer_free(buf_T *buf)
|
||||
@@ -1449,11 +1449,11 @@ channel_buffer_free(buf_T *buf)
|
||||
{
|
||||
chanpart_T *ch_part = &channel->ch_part[part];
|
||||
|
||||
if (ch_part->ch_buffer == buf)
|
||||
if (ch_part->ch_bufref.br_buf == buf)
|
||||
{
|
||||
ch_logs(channel, "%s buffer has been wiped out",
|
||||
part_names[part]);
|
||||
ch_part->ch_buffer = NULL;
|
||||
ch_part->ch_bufref.br_buf = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1470,10 +1470,10 @@ channel_write_any_lines(void)
|
||||
{
|
||||
chanpart_T *in_part = &channel->ch_part[PART_IN];
|
||||
|
||||
if (in_part->ch_buffer != NULL)
|
||||
if (in_part->ch_bufref.br_buf != NULL)
|
||||
{
|
||||
if (in_part->ch_buf_append)
|
||||
channel_write_new_lines(in_part->ch_buffer);
|
||||
channel_write_new_lines(in_part->ch_bufref.br_buf);
|
||||
else
|
||||
channel_write_in(channel);
|
||||
}
|
||||
@@ -1497,7 +1497,7 @@ channel_write_new_lines(buf_T *buf)
|
||||
linenr_T lnum;
|
||||
int written = 0;
|
||||
|
||||
if (in_part->ch_buffer == buf && in_part->ch_buf_append)
|
||||
if (in_part->ch_bufref.br_buf == buf && in_part->ch_buf_append)
|
||||
{
|
||||
if (in_part->ch_fd == INVALID_FD)
|
||||
continue; /* pipe was closed */
|
||||
@@ -1543,8 +1543,8 @@ invoke_callback(channel_T *channel, char_u *callback, partial_T *partial,
|
||||
argv[0].v_type = VAR_CHANNEL;
|
||||
argv[0].vval.v_channel = channel;
|
||||
|
||||
call_func(callback, (int)STRLEN(callback),
|
||||
&rettv, 2, argv, 0L, 0L, &dummy, TRUE, partial, NULL);
|
||||
call_func(callback, (int)STRLEN(callback), &rettv, 2, argv, NULL,
|
||||
0L, 0L, &dummy, TRUE, partial, NULL);
|
||||
clear_tv(&rettv);
|
||||
channel_need_redraw = TRUE;
|
||||
}
|
||||
@@ -1612,7 +1612,7 @@ channel_get_all(channel_T *channel, int part)
|
||||
{
|
||||
readq_T *head = &channel->ch_part[part].ch_head;
|
||||
readq_T *node = head->rq_next;
|
||||
long_u len = 1;
|
||||
long_u len = 0;
|
||||
char_u *res;
|
||||
char_u *p;
|
||||
|
||||
@@ -1623,7 +1623,7 @@ channel_get_all(channel_T *channel, int part)
|
||||
/* Concatenate everything into one buffer. */
|
||||
for (node = head->rq_next; node != NULL; node = node->rq_next)
|
||||
len += node->rq_buflen;
|
||||
res = lalloc(len, TRUE);
|
||||
res = lalloc(len + 1, TRUE);
|
||||
if (res == NULL)
|
||||
return NULL;
|
||||
p = res;
|
||||
@@ -2181,7 +2181,7 @@ channel_exe_cmd(channel_T *channel, int part, typval_T *argv)
|
||||
{
|
||||
channel_send(channel,
|
||||
part == PART_SOCK ? PART_SOCK : PART_IN,
|
||||
json, (char *)cmd);
|
||||
json, (int)STRLEN(json), (char *)cmd);
|
||||
vim_free(json);
|
||||
}
|
||||
}
|
||||
@@ -2194,7 +2194,7 @@ channel_exe_cmd(channel_T *channel, int part, typval_T *argv)
|
||||
}
|
||||
else if (p_verbose > 2)
|
||||
{
|
||||
ch_errors(channel, "Receved unknown command: %s", (char *)cmd);
|
||||
ch_errors(channel, "Received unknown command: %s", (char *)cmd);
|
||||
EMSG2("E905: received unknown command: %s", cmd);
|
||||
}
|
||||
}
|
||||
@@ -2216,8 +2216,7 @@ invoke_one_time_callback(
|
||||
* invokes ch_close() the list will be cleared. */
|
||||
remove_cb_node(cbhead, item);
|
||||
invoke_callback(channel, item->cq_callback, item->cq_partial, argv);
|
||||
vim_free(item->cq_callback);
|
||||
partial_unref(item->cq_partial);
|
||||
free_callback(item->cq_callback, item->cq_partial);
|
||||
vim_free(item);
|
||||
}
|
||||
|
||||
@@ -2302,7 +2301,7 @@ append_to_buffer(buf_T *buffer, char_u *msg, channel_T *channel, int part)
|
||||
{
|
||||
chanpart_T *in_part = &ch->ch_part[PART_IN];
|
||||
|
||||
if (in_part->ch_buffer == buffer)
|
||||
if (in_part->ch_bufref.br_buf == buffer)
|
||||
in_part->ch_buf_bot = buffer->b_ml.ml_line_count;
|
||||
}
|
||||
}
|
||||
@@ -2364,11 +2363,11 @@ may_invoke_callback(channel_T *channel, int part)
|
||||
partial = channel->ch_partial;
|
||||
}
|
||||
|
||||
buffer = channel->ch_part[part].ch_buffer;
|
||||
if (buffer != NULL && !buf_valid(buffer))
|
||||
buffer = channel->ch_part[part].ch_bufref.br_buf;
|
||||
if (buffer != NULL && !bufref_valid(&channel->ch_part[part].ch_bufref))
|
||||
{
|
||||
/* buffer was wiped out */
|
||||
channel->ch_part[part].ch_buffer = NULL;
|
||||
channel->ch_part[part].ch_bufref.br_buf = NULL;
|
||||
buffer = NULL;
|
||||
}
|
||||
|
||||
@@ -2706,16 +2705,15 @@ channel_close(channel_T *channel, int invoke_close_cb)
|
||||
argv[0].v_type = VAR_CHANNEL;
|
||||
argv[0].vval.v_channel = channel;
|
||||
call_func(channel->ch_close_cb, (int)STRLEN(channel->ch_close_cb),
|
||||
&rettv, 1, argv, 0L, 0L, &dummy, TRUE,
|
||||
&rettv, 1, argv, NULL, 0L, 0L, &dummy, TRUE,
|
||||
channel->ch_close_partial, NULL);
|
||||
clear_tv(&rettv);
|
||||
channel_need_redraw = TRUE;
|
||||
}
|
||||
|
||||
/* the callback is only called once */
|
||||
vim_free(channel->ch_close_cb);
|
||||
free_callback(channel->ch_close_cb, channel->ch_close_partial);
|
||||
channel->ch_close_cb = NULL;
|
||||
partial_unref(channel->ch_close_partial);
|
||||
channel->ch_close_partial = NULL;
|
||||
|
||||
--channel->ch_refcount;
|
||||
@@ -2751,8 +2749,7 @@ channel_clear_one(channel_T *channel, int part)
|
||||
cbq_T *node = cb_head->cq_next;
|
||||
|
||||
remove_cb_node(cb_head, node);
|
||||
vim_free(node->cq_callback);
|
||||
partial_unref(node->cq_partial);
|
||||
free_callback(node->cq_callback, node->cq_partial);
|
||||
vim_free(node);
|
||||
}
|
||||
|
||||
@@ -2762,9 +2759,9 @@ channel_clear_one(channel_T *channel, int part)
|
||||
remove_json_node(json_head, json_head->jq_next);
|
||||
}
|
||||
|
||||
vim_free(channel->ch_part[part].ch_callback);
|
||||
free_callback(channel->ch_part[part].ch_callback,
|
||||
channel->ch_part[part].ch_partial);
|
||||
channel->ch_part[part].ch_callback = NULL;
|
||||
partial_unref(channel->ch_part[part].ch_partial);
|
||||
channel->ch_part[part].ch_partial = NULL;
|
||||
}
|
||||
|
||||
@@ -2781,13 +2778,11 @@ channel_clear(channel_T *channel)
|
||||
channel_clear_one(channel, PART_OUT);
|
||||
channel_clear_one(channel, PART_ERR);
|
||||
/* there is no callback or queue for PART_IN */
|
||||
vim_free(channel->ch_callback);
|
||||
free_callback(channel->ch_callback, channel->ch_partial);
|
||||
channel->ch_callback = NULL;
|
||||
partial_unref(channel->ch_partial);
|
||||
channel->ch_partial = NULL;
|
||||
vim_free(channel->ch_close_cb);
|
||||
free_callback(channel->ch_close_cb, channel->ch_close_partial);
|
||||
channel->ch_close_cb = NULL;
|
||||
partial_unref(channel->ch_close_partial);
|
||||
channel->ch_close_partial = NULL;
|
||||
}
|
||||
|
||||
@@ -2824,7 +2819,7 @@ channel_fill_wfds(int maxfd_arg, fd_set *wfds)
|
||||
{
|
||||
chanpart_T *in_part = &ch->ch_part[PART_IN];
|
||||
|
||||
if (in_part->ch_fd != INVALID_FD && in_part->ch_buffer != NULL)
|
||||
if (in_part->ch_fd != INVALID_FD && in_part->ch_bufref.br_buf != NULL)
|
||||
{
|
||||
FD_SET((int)in_part->ch_fd, wfds);
|
||||
if ((int)in_part->ch_fd >= maxfd)
|
||||
@@ -2847,7 +2842,7 @@ channel_fill_poll_write(int nfd_in, struct pollfd *fds)
|
||||
{
|
||||
chanpart_T *in_part = &ch->ch_part[PART_IN];
|
||||
|
||||
if (in_part->ch_fd != INVALID_FD && in_part->ch_buffer != NULL)
|
||||
if (in_part->ch_fd != INVALID_FD && in_part->ch_bufref.br_buf != NULL)
|
||||
{
|
||||
in_part->ch_poll_idx = nfd;
|
||||
fds[nfd].fd = in_part->ch_fd;
|
||||
@@ -3186,7 +3181,7 @@ channel_read_json_block(
|
||||
{
|
||||
more = channel_parse_json(channel, part);
|
||||
|
||||
/* search for messsage "id" */
|
||||
/* search for message "id" */
|
||||
if (channel_get_json(channel, part, id, rettv) == OK)
|
||||
{
|
||||
chanpart->ch_block_id = 0;
|
||||
@@ -3376,9 +3371,8 @@ channel_handle_events(void)
|
||||
* Return FAIL or OK.
|
||||
*/
|
||||
int
|
||||
channel_send(channel_T *channel, int part, char_u *buf, char *fun)
|
||||
channel_send(channel_T *channel, int part, char_u *buf, int len, char *fun)
|
||||
{
|
||||
int len = (int)STRLEN(buf);
|
||||
int res;
|
||||
sock_T fd;
|
||||
|
||||
@@ -3426,7 +3420,7 @@ channel_send(channel_T *channel, int part, char_u *buf, char *fun)
|
||||
/*
|
||||
* Common for "ch_sendexpr()" and "ch_sendraw()".
|
||||
* Returns the channel if the caller should read the response.
|
||||
* Sets "part_read" to the the read fd.
|
||||
* Sets "part_read" to the read fd.
|
||||
* Otherwise returns NULL.
|
||||
*/
|
||||
channel_T *
|
||||
@@ -3466,7 +3460,7 @@ send_common(
|
||||
opt->jo_callback, opt->jo_partial, id);
|
||||
}
|
||||
|
||||
if (channel_send(channel, part_send, text, fun) == OK
|
||||
if (channel_send(channel, part_send, text, (int)STRLEN(text), fun) == OK
|
||||
&& opt->jo_callback == NULL)
|
||||
return channel;
|
||||
return NULL;
|
||||
@@ -3634,8 +3628,8 @@ channel_poll_check(int ret_in, void *fds_in)
|
||||
{
|
||||
if (in_part->ch_buf_append)
|
||||
{
|
||||
if (in_part->ch_buffer != NULL)
|
||||
channel_write_new_lines(in_part->ch_buffer);
|
||||
if (in_part->ch_bufref.br_buf != NULL)
|
||||
channel_write_new_lines(in_part->ch_bufref.br_buf);
|
||||
}
|
||||
else
|
||||
channel_write_in(channel);
|
||||
@@ -3712,8 +3706,8 @@ channel_select_check(int ret_in, void *rfds_in, void *wfds_in)
|
||||
{
|
||||
if (in_part->ch_buf_append)
|
||||
{
|
||||
if (in_part->ch_buffer != NULL)
|
||||
channel_write_new_lines(in_part->ch_buffer);
|
||||
if (in_part->ch_bufref.br_buf != NULL)
|
||||
channel_write_new_lines(in_part->ch_bufref.br_buf);
|
||||
}
|
||||
else
|
||||
channel_write_in(channel);
|
||||
@@ -3935,14 +3929,24 @@ free_job_options(jobopt_T *opt)
|
||||
{
|
||||
if (opt->jo_partial != NULL)
|
||||
partial_unref(opt->jo_partial);
|
||||
else if (opt->jo_callback != NULL)
|
||||
func_unref(opt->jo_callback);
|
||||
if (opt->jo_out_partial != NULL)
|
||||
partial_unref(opt->jo_out_partial);
|
||||
else if (opt->jo_out_cb != NULL)
|
||||
func_unref(opt->jo_out_cb);
|
||||
if (opt->jo_err_partial != NULL)
|
||||
partial_unref(opt->jo_err_partial);
|
||||
else if (opt->jo_err_cb != NULL)
|
||||
func_unref(opt->jo_err_cb);
|
||||
if (opt->jo_close_partial != NULL)
|
||||
partial_unref(opt->jo_close_partial);
|
||||
else if (opt->jo_close_cb != NULL)
|
||||
func_unref(opt->jo_close_cb);
|
||||
if (opt->jo_exit_partial != NULL)
|
||||
partial_unref(opt->jo_exit_partial);
|
||||
else if (opt->jo_exit_cb != NULL)
|
||||
func_unref(opt->jo_exit_cb);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -4299,7 +4303,7 @@ job_free_contents(job_T *job)
|
||||
{
|
||||
/* The link from the channel to the job doesn't count as a reference,
|
||||
* thus don't decrement the refcount of the job. The reference from
|
||||
* the job to the channel does count the refrence, decrement it and
|
||||
* the job to the channel does count the reference, decrement it and
|
||||
* NULL the reference. We don't set ch_job_killed, unreferencing the
|
||||
* job doesn't mean it stops running. */
|
||||
job->jv_channel->ch_job = NULL;
|
||||
@@ -4308,8 +4312,7 @@ job_free_contents(job_T *job)
|
||||
mch_clear_job(job);
|
||||
|
||||
vim_free(job->jv_stoponexit);
|
||||
vim_free(job->jv_exit_cb);
|
||||
partial_unref(job->jv_exit_partial);
|
||||
free_callback(job->jv_exit_cb, job->jv_exit_partial);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -4474,8 +4477,7 @@ job_set_options(job_T *job, jobopt_T *opt)
|
||||
}
|
||||
if (opt->jo_set & JO_EXIT_CB)
|
||||
{
|
||||
vim_free(job->jv_exit_cb);
|
||||
partial_unref(job->jv_exit_partial);
|
||||
free_callback(job->jv_exit_cb, job->jv_exit_partial);
|
||||
if (opt->jo_exit_cb == NULL || *opt->jo_exit_cb == NUL)
|
||||
{
|
||||
job->jv_exit_cb = NULL;
|
||||
@@ -4483,10 +4485,17 @@ job_set_options(job_T *job, jobopt_T *opt)
|
||||
}
|
||||
else
|
||||
{
|
||||
job->jv_exit_cb = vim_strsave(opt->jo_exit_cb);
|
||||
job->jv_exit_partial = opt->jo_exit_partial;
|
||||
if (job->jv_exit_partial != NULL)
|
||||
{
|
||||
job->jv_exit_cb = opt->jo_exit_cb;
|
||||
++job->jv_exit_partial->pt_refcount;
|
||||
}
|
||||
else
|
||||
{
|
||||
job->jv_exit_cb = vim_strsave(opt->jo_exit_cb);
|
||||
func_ref(job->jv_exit_cb);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4776,7 +4785,7 @@ job_status(job_T *job)
|
||||
argv[1].v_type = VAR_NUMBER;
|
||||
argv[1].vval.v_number = job->jv_exitval;
|
||||
call_func(job->jv_exit_cb, (int)STRLEN(job->jv_exit_cb),
|
||||
&rettv, 2, argv, 0L, 0L, &dummy, TRUE,
|
||||
&rettv, 2, argv, NULL, 0L, 0L, &dummy, TRUE,
|
||||
job->jv_exit_partial, NULL);
|
||||
clear_tv(&rettv);
|
||||
--job->jv_refcount;
|
||||
|
||||
@@ -571,7 +571,7 @@ transchar(int c)
|
||||
(c >= ' ' && c <= '~')
|
||||
#endif
|
||||
#ifdef FEAT_FKMAP
|
||||
|| F_ischar(c)
|
||||
|| (p_altkeymap && F_ischar(c))
|
||||
#endif
|
||||
)) || (c < 256 && vim_isprintc_strict(c)))
|
||||
{
|
||||
@@ -1836,14 +1836,14 @@ vim_str2nr(
|
||||
is bin */
|
||||
int *len, /* return: detected length of number */
|
||||
int what, /* what numbers to recognize */
|
||||
long *nptr, /* return: signed result */
|
||||
unsigned long *unptr, /* return: unsigned result */
|
||||
varnumber_T *nptr, /* return: signed result */
|
||||
uvarnumber_T *unptr, /* return: unsigned result */
|
||||
int maxlen) /* max length of string to check */
|
||||
{
|
||||
char_u *ptr = start;
|
||||
int pre = 0; /* default is decimal */
|
||||
int negative = FALSE;
|
||||
unsigned long un = 0;
|
||||
uvarnumber_T un = 0;
|
||||
int n;
|
||||
|
||||
if (ptr[0] == '-')
|
||||
@@ -1912,7 +1912,7 @@ vim_str2nr(
|
||||
/* octal */
|
||||
while ('0' <= *ptr && *ptr <= '7')
|
||||
{
|
||||
un = 8 * un + (unsigned long)(*ptr - '0');
|
||||
un = 8 * un + (uvarnumber_T)(*ptr - '0');
|
||||
++ptr;
|
||||
if (n++ == maxlen)
|
||||
break;
|
||||
@@ -1925,7 +1925,7 @@ vim_str2nr(
|
||||
n += 2; /* skip over "0x" */
|
||||
while (vim_isxdigit(*ptr))
|
||||
{
|
||||
un = 16 * un + (unsigned long)hex2nr(*ptr);
|
||||
un = 16 * un + (uvarnumber_T)hex2nr(*ptr);
|
||||
++ptr;
|
||||
if (n++ == maxlen)
|
||||
break;
|
||||
@@ -1936,7 +1936,7 @@ vim_str2nr(
|
||||
/* decimal */
|
||||
while (VIM_ISDIGIT(*ptr))
|
||||
{
|
||||
un = 10 * un + (unsigned long)(*ptr - '0');
|
||||
un = 10 * un + (uvarnumber_T)(*ptr - '0');
|
||||
++ptr;
|
||||
if (n++ == maxlen)
|
||||
break;
|
||||
@@ -1950,9 +1950,9 @@ vim_str2nr(
|
||||
if (nptr != NULL)
|
||||
{
|
||||
if (negative) /* account for leading '-' for decimal numbers */
|
||||
*nptr = -(long)un;
|
||||
*nptr = -(varnumber_T)un;
|
||||
else
|
||||
*nptr = (long)un;
|
||||
*nptr = (varnumber_T)un;
|
||||
}
|
||||
if (unptr != NULL)
|
||||
*unptr = un;
|
||||
|
||||
@@ -437,7 +437,7 @@ fi
|
||||
dnl Check user requested features.
|
||||
|
||||
AC_MSG_CHECKING(--with-features argument)
|
||||
AC_ARG_WITH(features, [ --with-features=TYPE tiny, small, normal, big or huge (default: normal)],
|
||||
AC_ARG_WITH(features, [ --with-features=TYPE tiny, small, normal, big or huge (default: huge)],
|
||||
features="$withval"; AC_MSG_RESULT($features),
|
||||
features="huge"; AC_MSG_RESULT(Defaulting to huge))
|
||||
|
||||
|
||||
819
src/dict.c
Normal file
819
src/dict.c
Normal file
@@ -0,0 +1,819 @@
|
||||
/* vi:set ts=8 sts=4 sw=4:
|
||||
*
|
||||
* VIM - Vi IMproved by Bram Moolenaar
|
||||
*
|
||||
* Do ":help uganda" in Vim to read copying and usage conditions.
|
||||
* Do ":help credits" in Vim to see a list of people who contributed.
|
||||
* See README.txt for an overview of the Vim source code.
|
||||
*/
|
||||
|
||||
/*
|
||||
* dict.c: Dictionary support
|
||||
*/
|
||||
|
||||
#include "vim.h"
|
||||
|
||||
#if defined(FEAT_EVAL) || defined(PROTO)
|
||||
|
||||
/* List head for garbage collection. Although there can be a reference loop
|
||||
* from partial to dict to partial, we don't need to keep track of the partial,
|
||||
* since it will get freed when the dict is unused and gets freed. */
|
||||
static dict_T *first_dict = NULL; /* list of all dicts */
|
||||
|
||||
/*
|
||||
* Allocate an empty header for a dictionary.
|
||||
*/
|
||||
dict_T *
|
||||
dict_alloc(void)
|
||||
{
|
||||
dict_T *d;
|
||||
|
||||
d = (dict_T *)alloc(sizeof(dict_T));
|
||||
if (d != NULL)
|
||||
{
|
||||
/* Add the dict to the list of dicts for garbage collection. */
|
||||
if (first_dict != NULL)
|
||||
first_dict->dv_used_prev = d;
|
||||
d->dv_used_next = first_dict;
|
||||
d->dv_used_prev = NULL;
|
||||
first_dict = d;
|
||||
|
||||
hash_init(&d->dv_hashtab);
|
||||
d->dv_lock = 0;
|
||||
d->dv_scope = 0;
|
||||
d->dv_refcount = 0;
|
||||
d->dv_copyID = 0;
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocate an empty dict for a return value.
|
||||
* Returns OK or FAIL.
|
||||
*/
|
||||
int
|
||||
rettv_dict_alloc(typval_T *rettv)
|
||||
{
|
||||
dict_T *d = dict_alloc();
|
||||
|
||||
if (d == NULL)
|
||||
return FAIL;
|
||||
|
||||
rettv->vval.v_dict = d;
|
||||
rettv->v_type = VAR_DICT;
|
||||
rettv->v_lock = 0;
|
||||
++d->dv_refcount;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Free a Dictionary, including all non-container items it contains.
|
||||
* Ignores the reference count.
|
||||
*/
|
||||
static void
|
||||
dict_free_contents(dict_T *d)
|
||||
{
|
||||
int todo;
|
||||
hashitem_T *hi;
|
||||
dictitem_T *di;
|
||||
|
||||
/* Lock the hashtab, we don't want it to resize while freeing items. */
|
||||
hash_lock(&d->dv_hashtab);
|
||||
todo = (int)d->dv_hashtab.ht_used;
|
||||
for (hi = d->dv_hashtab.ht_array; todo > 0; ++hi)
|
||||
{
|
||||
if (!HASHITEM_EMPTY(hi))
|
||||
{
|
||||
/* Remove the item before deleting it, just in case there is
|
||||
* something recursive causing trouble. */
|
||||
di = HI2DI(hi);
|
||||
hash_remove(&d->dv_hashtab, hi);
|
||||
clear_tv(&di->di_tv);
|
||||
vim_free(di);
|
||||
--todo;
|
||||
}
|
||||
}
|
||||
hash_clear(&d->dv_hashtab);
|
||||
}
|
||||
|
||||
static void
|
||||
dict_free_dict(dict_T *d)
|
||||
{
|
||||
/* Remove the dict from the list of dicts for garbage collection. */
|
||||
if (d->dv_used_prev == NULL)
|
||||
first_dict = d->dv_used_next;
|
||||
else
|
||||
d->dv_used_prev->dv_used_next = d->dv_used_next;
|
||||
if (d->dv_used_next != NULL)
|
||||
d->dv_used_next->dv_used_prev = d->dv_used_prev;
|
||||
vim_free(d);
|
||||
}
|
||||
|
||||
static void
|
||||
dict_free(dict_T *d)
|
||||
{
|
||||
if (!in_free_unref_items)
|
||||
{
|
||||
dict_free_contents(d);
|
||||
dict_free_dict(d);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Unreference a Dictionary: decrement the reference count and free it when it
|
||||
* becomes zero.
|
||||
*/
|
||||
void
|
||||
dict_unref(dict_T *d)
|
||||
{
|
||||
if (d != NULL && --d->dv_refcount <= 0)
|
||||
dict_free(d);
|
||||
}
|
||||
|
||||
/*
|
||||
* Go through the list of dicts and free items without the copyID.
|
||||
* Returns TRUE if something was freed.
|
||||
*/
|
||||
int
|
||||
dict_free_nonref(int copyID)
|
||||
{
|
||||
dict_T *dd;
|
||||
int did_free = FALSE;
|
||||
|
||||
for (dd = first_dict; dd != NULL; dd = dd->dv_used_next)
|
||||
if ((dd->dv_copyID & COPYID_MASK) != (copyID & COPYID_MASK))
|
||||
{
|
||||
/* Free the Dictionary and ordinary items it contains, but don't
|
||||
* recurse into Lists and Dictionaries, they will be in the list
|
||||
* of dicts or list of lists. */
|
||||
dict_free_contents(dd);
|
||||
did_free = TRUE;
|
||||
}
|
||||
return did_free;
|
||||
}
|
||||
|
||||
void
|
||||
dict_free_items(int copyID)
|
||||
{
|
||||
dict_T *dd, *dd_next;
|
||||
|
||||
for (dd = first_dict; dd != NULL; dd = dd_next)
|
||||
{
|
||||
dd_next = dd->dv_used_next;
|
||||
if ((dd->dv_copyID & COPYID_MASK) != (copyID & COPYID_MASK))
|
||||
dict_free_dict(dd);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocate a Dictionary item.
|
||||
* The "key" is copied to the new item.
|
||||
* Note that the value of the item "di_tv" still needs to be initialized!
|
||||
* Returns NULL when out of memory.
|
||||
*/
|
||||
dictitem_T *
|
||||
dictitem_alloc(char_u *key)
|
||||
{
|
||||
dictitem_T *di;
|
||||
|
||||
di = (dictitem_T *)alloc((unsigned)(sizeof(dictitem_T) + STRLEN(key)));
|
||||
if (di != NULL)
|
||||
{
|
||||
STRCPY(di->di_key, key);
|
||||
di->di_flags = DI_FLAGS_ALLOC;
|
||||
}
|
||||
return di;
|
||||
}
|
||||
|
||||
/*
|
||||
* Make a copy of a Dictionary item.
|
||||
*/
|
||||
static dictitem_T *
|
||||
dictitem_copy(dictitem_T *org)
|
||||
{
|
||||
dictitem_T *di;
|
||||
|
||||
di = (dictitem_T *)alloc((unsigned)(sizeof(dictitem_T)
|
||||
+ STRLEN(org->di_key)));
|
||||
if (di != NULL)
|
||||
{
|
||||
STRCPY(di->di_key, org->di_key);
|
||||
di->di_flags = DI_FLAGS_ALLOC;
|
||||
copy_tv(&org->di_tv, &di->di_tv);
|
||||
}
|
||||
return di;
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove item "item" from Dictionary "dict" and free it.
|
||||
*/
|
||||
void
|
||||
dictitem_remove(dict_T *dict, dictitem_T *item)
|
||||
{
|
||||
hashitem_T *hi;
|
||||
|
||||
hi = hash_find(&dict->dv_hashtab, item->di_key);
|
||||
if (HASHITEM_EMPTY(hi))
|
||||
EMSG2(_(e_intern2), "dictitem_remove()");
|
||||
else
|
||||
hash_remove(&dict->dv_hashtab, hi);
|
||||
dictitem_free(item);
|
||||
}
|
||||
|
||||
/*
|
||||
* Free a dict item. Also clears the value.
|
||||
*/
|
||||
void
|
||||
dictitem_free(dictitem_T *item)
|
||||
{
|
||||
clear_tv(&item->di_tv);
|
||||
if (item->di_flags & DI_FLAGS_ALLOC)
|
||||
vim_free(item);
|
||||
}
|
||||
|
||||
/*
|
||||
* Make a copy of dict "d". Shallow if "deep" is FALSE.
|
||||
* The refcount of the new dict is set to 1.
|
||||
* See item_copy() for "copyID".
|
||||
* Returns NULL when out of memory.
|
||||
*/
|
||||
dict_T *
|
||||
dict_copy(dict_T *orig, int deep, int copyID)
|
||||
{
|
||||
dict_T *copy;
|
||||
dictitem_T *di;
|
||||
int todo;
|
||||
hashitem_T *hi;
|
||||
|
||||
if (orig == NULL)
|
||||
return NULL;
|
||||
|
||||
copy = dict_alloc();
|
||||
if (copy != NULL)
|
||||
{
|
||||
if (copyID != 0)
|
||||
{
|
||||
orig->dv_copyID = copyID;
|
||||
orig->dv_copydict = copy;
|
||||
}
|
||||
todo = (int)orig->dv_hashtab.ht_used;
|
||||
for (hi = orig->dv_hashtab.ht_array; todo > 0 && !got_int; ++hi)
|
||||
{
|
||||
if (!HASHITEM_EMPTY(hi))
|
||||
{
|
||||
--todo;
|
||||
|
||||
di = dictitem_alloc(hi->hi_key);
|
||||
if (di == NULL)
|
||||
break;
|
||||
if (deep)
|
||||
{
|
||||
if (item_copy(&HI2DI(hi)->di_tv, &di->di_tv, deep,
|
||||
copyID) == FAIL)
|
||||
{
|
||||
vim_free(di);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
copy_tv(&HI2DI(hi)->di_tv, &di->di_tv);
|
||||
if (dict_add(copy, di) == FAIL)
|
||||
{
|
||||
dictitem_free(di);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
++copy->dv_refcount;
|
||||
if (todo > 0)
|
||||
{
|
||||
dict_unref(copy);
|
||||
copy = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add item "item" to Dictionary "d".
|
||||
* Returns FAIL when out of memory and when key already exists.
|
||||
*/
|
||||
int
|
||||
dict_add(dict_T *d, dictitem_T *item)
|
||||
{
|
||||
return hash_add(&d->dv_hashtab, item->di_key);
|
||||
}
|
||||
|
||||
/*
|
||||
* Add a number or string entry to dictionary "d".
|
||||
* When "str" is NULL use number "nr", otherwise use "str".
|
||||
* Returns FAIL when out of memory and when key already exists.
|
||||
*/
|
||||
int
|
||||
dict_add_nr_str(
|
||||
dict_T *d,
|
||||
char *key,
|
||||
varnumber_T nr,
|
||||
char_u *str)
|
||||
{
|
||||
dictitem_T *item;
|
||||
|
||||
item = dictitem_alloc((char_u *)key);
|
||||
if (item == NULL)
|
||||
return FAIL;
|
||||
item->di_tv.v_lock = 0;
|
||||
if (str == NULL)
|
||||
{
|
||||
item->di_tv.v_type = VAR_NUMBER;
|
||||
item->di_tv.vval.v_number = nr;
|
||||
}
|
||||
else
|
||||
{
|
||||
item->di_tv.v_type = VAR_STRING;
|
||||
item->di_tv.vval.v_string = vim_strsave(str);
|
||||
}
|
||||
if (dict_add(d, item) == FAIL)
|
||||
{
|
||||
dictitem_free(item);
|
||||
return FAIL;
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add a list entry to dictionary "d".
|
||||
* Returns FAIL when out of memory and when key already exists.
|
||||
*/
|
||||
int
|
||||
dict_add_list(dict_T *d, char *key, list_T *list)
|
||||
{
|
||||
dictitem_T *item;
|
||||
|
||||
item = dictitem_alloc((char_u *)key);
|
||||
if (item == NULL)
|
||||
return FAIL;
|
||||
item->di_tv.v_lock = 0;
|
||||
item->di_tv.v_type = VAR_LIST;
|
||||
item->di_tv.vval.v_list = list;
|
||||
if (dict_add(d, item) == FAIL)
|
||||
{
|
||||
dictitem_free(item);
|
||||
return FAIL;
|
||||
}
|
||||
++list->lv_refcount;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the number of items in a Dictionary.
|
||||
*/
|
||||
long
|
||||
dict_len(dict_T *d)
|
||||
{
|
||||
if (d == NULL)
|
||||
return 0L;
|
||||
return (long)d->dv_hashtab.ht_used;
|
||||
}
|
||||
|
||||
/*
|
||||
* Find item "key[len]" in Dictionary "d".
|
||||
* If "len" is negative use strlen(key).
|
||||
* Returns NULL when not found.
|
||||
*/
|
||||
dictitem_T *
|
||||
dict_find(dict_T *d, char_u *key, int len)
|
||||
{
|
||||
#define AKEYLEN 200
|
||||
char_u buf[AKEYLEN];
|
||||
char_u *akey;
|
||||
char_u *tofree = NULL;
|
||||
hashitem_T *hi;
|
||||
|
||||
if (d == NULL)
|
||||
return NULL;
|
||||
if (len < 0)
|
||||
akey = key;
|
||||
else if (len >= AKEYLEN)
|
||||
{
|
||||
tofree = akey = vim_strnsave(key, len);
|
||||
if (akey == NULL)
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Avoid a malloc/free by using buf[]. */
|
||||
vim_strncpy(buf, key, len);
|
||||
akey = buf;
|
||||
}
|
||||
|
||||
hi = hash_find(&d->dv_hashtab, akey);
|
||||
vim_free(tofree);
|
||||
if (HASHITEM_EMPTY(hi))
|
||||
return NULL;
|
||||
return HI2DI(hi);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get a string item from a dictionary.
|
||||
* When "save" is TRUE allocate memory for it.
|
||||
* Returns NULL if the entry doesn't exist or out of memory.
|
||||
*/
|
||||
char_u *
|
||||
get_dict_string(dict_T *d, char_u *key, int save)
|
||||
{
|
||||
dictitem_T *di;
|
||||
char_u *s;
|
||||
|
||||
di = dict_find(d, key, -1);
|
||||
if (di == NULL)
|
||||
return NULL;
|
||||
s = get_tv_string(&di->di_tv);
|
||||
if (save && s != NULL)
|
||||
s = vim_strsave(s);
|
||||
return s;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get a number item from a dictionary.
|
||||
* Returns 0 if the entry doesn't exist.
|
||||
*/
|
||||
varnumber_T
|
||||
get_dict_number(dict_T *d, char_u *key)
|
||||
{
|
||||
dictitem_T *di;
|
||||
|
||||
di = dict_find(d, key, -1);
|
||||
if (di == NULL)
|
||||
return 0;
|
||||
return get_tv_number(&di->di_tv);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return an allocated string with the string representation of a Dictionary.
|
||||
* May return NULL.
|
||||
*/
|
||||
char_u *
|
||||
dict2string(typval_T *tv, int copyID, int restore_copyID)
|
||||
{
|
||||
garray_T ga;
|
||||
int first = TRUE;
|
||||
char_u *tofree;
|
||||
char_u numbuf[NUMBUFLEN];
|
||||
hashitem_T *hi;
|
||||
char_u *s;
|
||||
dict_T *d;
|
||||
int todo;
|
||||
|
||||
if ((d = tv->vval.v_dict) == NULL)
|
||||
return NULL;
|
||||
ga_init2(&ga, (int)sizeof(char), 80);
|
||||
ga_append(&ga, '{');
|
||||
|
||||
todo = (int)d->dv_hashtab.ht_used;
|
||||
for (hi = d->dv_hashtab.ht_array; todo > 0 && !got_int; ++hi)
|
||||
{
|
||||
if (!HASHITEM_EMPTY(hi))
|
||||
{
|
||||
--todo;
|
||||
|
||||
if (first)
|
||||
first = FALSE;
|
||||
else
|
||||
ga_concat(&ga, (char_u *)", ");
|
||||
|
||||
tofree = string_quote(hi->hi_key, FALSE);
|
||||
if (tofree != NULL)
|
||||
{
|
||||
ga_concat(&ga, tofree);
|
||||
vim_free(tofree);
|
||||
}
|
||||
ga_concat(&ga, (char_u *)": ");
|
||||
s = echo_string_core(&HI2DI(hi)->di_tv, &tofree, numbuf, copyID,
|
||||
FALSE, restore_copyID, TRUE);
|
||||
if (s != NULL)
|
||||
ga_concat(&ga, s);
|
||||
vim_free(tofree);
|
||||
if (s == NULL || did_echo_string_emsg)
|
||||
break;
|
||||
line_breakcheck();
|
||||
|
||||
}
|
||||
}
|
||||
if (todo > 0)
|
||||
{
|
||||
vim_free(ga.ga_data);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ga_append(&ga, '}');
|
||||
ga_append(&ga, NUL);
|
||||
return (char_u *)ga.ga_data;
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocate a variable for a Dictionary and fill it from "*arg".
|
||||
* Return OK or FAIL. Returns NOTDONE for {expr}.
|
||||
*/
|
||||
int
|
||||
get_dict_tv(char_u **arg, typval_T *rettv, int evaluate)
|
||||
{
|
||||
dict_T *d = NULL;
|
||||
typval_T tvkey;
|
||||
typval_T tv;
|
||||
char_u *key = NULL;
|
||||
dictitem_T *item;
|
||||
char_u *start = skipwhite(*arg + 1);
|
||||
char_u buf[NUMBUFLEN];
|
||||
|
||||
/*
|
||||
* First check if it's not a curly-braces thing: {expr}.
|
||||
* Must do this without evaluating, otherwise a function may be called
|
||||
* twice. Unfortunately this means we need to call eval1() twice for the
|
||||
* first item.
|
||||
* But {} is an empty Dictionary.
|
||||
*/
|
||||
if (*start != '}')
|
||||
{
|
||||
if (eval1(&start, &tv, FALSE) == FAIL) /* recursive! */
|
||||
return FAIL;
|
||||
if (*start == '}')
|
||||
return NOTDONE;
|
||||
}
|
||||
|
||||
if (evaluate)
|
||||
{
|
||||
d = dict_alloc();
|
||||
if (d == NULL)
|
||||
return FAIL;
|
||||
}
|
||||
tvkey.v_type = VAR_UNKNOWN;
|
||||
tv.v_type = VAR_UNKNOWN;
|
||||
|
||||
*arg = skipwhite(*arg + 1);
|
||||
while (**arg != '}' && **arg != NUL)
|
||||
{
|
||||
if (eval1(arg, &tvkey, evaluate) == FAIL) /* recursive! */
|
||||
goto failret;
|
||||
if (**arg != ':')
|
||||
{
|
||||
EMSG2(_("E720: Missing colon in Dictionary: %s"), *arg);
|
||||
clear_tv(&tvkey);
|
||||
goto failret;
|
||||
}
|
||||
if (evaluate)
|
||||
{
|
||||
key = get_tv_string_buf_chk(&tvkey, buf);
|
||||
if (key == NULL)
|
||||
{
|
||||
/* "key" is NULL when get_tv_string_buf_chk() gave an errmsg */
|
||||
clear_tv(&tvkey);
|
||||
goto failret;
|
||||
}
|
||||
}
|
||||
|
||||
*arg = skipwhite(*arg + 1);
|
||||
if (eval1(arg, &tv, evaluate) == FAIL) /* recursive! */
|
||||
{
|
||||
if (evaluate)
|
||||
clear_tv(&tvkey);
|
||||
goto failret;
|
||||
}
|
||||
if (evaluate)
|
||||
{
|
||||
item = dict_find(d, key, -1);
|
||||
if (item != NULL)
|
||||
{
|
||||
EMSG2(_("E721: Duplicate key in Dictionary: \"%s\""), key);
|
||||
clear_tv(&tvkey);
|
||||
clear_tv(&tv);
|
||||
goto failret;
|
||||
}
|
||||
item = dictitem_alloc(key);
|
||||
clear_tv(&tvkey);
|
||||
if (item != NULL)
|
||||
{
|
||||
item->di_tv = tv;
|
||||
item->di_tv.v_lock = 0;
|
||||
if (dict_add(d, item) == FAIL)
|
||||
dictitem_free(item);
|
||||
}
|
||||
}
|
||||
|
||||
if (**arg == '}')
|
||||
break;
|
||||
if (**arg != ',')
|
||||
{
|
||||
EMSG2(_("E722: Missing comma in Dictionary: %s"), *arg);
|
||||
goto failret;
|
||||
}
|
||||
*arg = skipwhite(*arg + 1);
|
||||
}
|
||||
|
||||
if (**arg != '}')
|
||||
{
|
||||
EMSG2(_("E723: Missing end of Dictionary '}': %s"), *arg);
|
||||
failret:
|
||||
if (evaluate)
|
||||
dict_free(d);
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
*arg = skipwhite(*arg + 1);
|
||||
if (evaluate)
|
||||
{
|
||||
rettv->v_type = VAR_DICT;
|
||||
rettv->vval.v_dict = d;
|
||||
++d->dv_refcount;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Go over all entries in "d2" and add them to "d1".
|
||||
* When "action" is "error" then a duplicate key is an error.
|
||||
* When "action" is "force" then a duplicate key is overwritten.
|
||||
* Otherwise duplicate keys are ignored ("action" is "keep").
|
||||
*/
|
||||
void
|
||||
dict_extend(dict_T *d1, dict_T *d2, char_u *action)
|
||||
{
|
||||
dictitem_T *di1;
|
||||
hashitem_T *hi2;
|
||||
int todo;
|
||||
char_u *arg_errmsg = (char_u *)N_("extend() argument");
|
||||
|
||||
todo = (int)d2->dv_hashtab.ht_used;
|
||||
for (hi2 = d2->dv_hashtab.ht_array; todo > 0; ++hi2)
|
||||
{
|
||||
if (!HASHITEM_EMPTY(hi2))
|
||||
{
|
||||
--todo;
|
||||
di1 = dict_find(d1, hi2->hi_key, -1);
|
||||
if (d1->dv_scope != 0)
|
||||
{
|
||||
/* Disallow replacing a builtin function in l: and g:.
|
||||
* Check the key to be valid when adding to any scope. */
|
||||
if (d1->dv_scope == VAR_DEF_SCOPE
|
||||
&& HI2DI(hi2)->di_tv.v_type == VAR_FUNC
|
||||
&& var_check_func_name(hi2->hi_key, di1 == NULL))
|
||||
break;
|
||||
if (!valid_varname(hi2->hi_key))
|
||||
break;
|
||||
}
|
||||
if (di1 == NULL)
|
||||
{
|
||||
di1 = dictitem_copy(HI2DI(hi2));
|
||||
if (di1 != NULL && dict_add(d1, di1) == FAIL)
|
||||
dictitem_free(di1);
|
||||
}
|
||||
else if (*action == 'e')
|
||||
{
|
||||
EMSG2(_("E737: Key already exists: %s"), hi2->hi_key);
|
||||
break;
|
||||
}
|
||||
else if (*action == 'f' && HI2DI(hi2) != di1)
|
||||
{
|
||||
if (tv_check_lock(di1->di_tv.v_lock, arg_errmsg, TRUE)
|
||||
|| var_check_ro(di1->di_flags, arg_errmsg, TRUE))
|
||||
break;
|
||||
clear_tv(&di1->di_tv);
|
||||
copy_tv(&HI2DI(hi2)->di_tv, &di1->di_tv);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the dictitem that an entry in a hashtable points to.
|
||||
*/
|
||||
dictitem_T *
|
||||
dict_lookup(hashitem_T *hi)
|
||||
{
|
||||
return HI2DI(hi);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE when two dictionaries have exactly the same key/values.
|
||||
*/
|
||||
int
|
||||
dict_equal(
|
||||
dict_T *d1,
|
||||
dict_T *d2,
|
||||
int ic, /* ignore case for strings */
|
||||
int recursive) /* TRUE when used recursively */
|
||||
{
|
||||
hashitem_T *hi;
|
||||
dictitem_T *item2;
|
||||
int todo;
|
||||
|
||||
if (d1 == NULL && d2 == NULL)
|
||||
return TRUE;
|
||||
if (d1 == NULL || d2 == NULL)
|
||||
return FALSE;
|
||||
if (d1 == d2)
|
||||
return TRUE;
|
||||
if (dict_len(d1) != dict_len(d2))
|
||||
return FALSE;
|
||||
|
||||
todo = (int)d1->dv_hashtab.ht_used;
|
||||
for (hi = d1->dv_hashtab.ht_array; todo > 0; ++hi)
|
||||
{
|
||||
if (!HASHITEM_EMPTY(hi))
|
||||
{
|
||||
item2 = dict_find(d2, hi->hi_key, -1);
|
||||
if (item2 == NULL)
|
||||
return FALSE;
|
||||
if (!tv_equal(&HI2DI(hi)->di_tv, &item2->di_tv, ic, recursive))
|
||||
return FALSE;
|
||||
--todo;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Turn a dict into a list:
|
||||
* "what" == 0: list of keys
|
||||
* "what" == 1: list of values
|
||||
* "what" == 2: list of items
|
||||
*/
|
||||
void
|
||||
dict_list(typval_T *argvars, typval_T *rettv, int what)
|
||||
{
|
||||
list_T *l2;
|
||||
dictitem_T *di;
|
||||
hashitem_T *hi;
|
||||
listitem_T *li;
|
||||
listitem_T *li2;
|
||||
dict_T *d;
|
||||
int todo;
|
||||
|
||||
if (argvars[0].v_type != VAR_DICT)
|
||||
{
|
||||
EMSG(_(e_dictreq));
|
||||
return;
|
||||
}
|
||||
if ((d = argvars[0].vval.v_dict) == NULL)
|
||||
return;
|
||||
|
||||
if (rettv_list_alloc(rettv) == FAIL)
|
||||
return;
|
||||
|
||||
todo = (int)d->dv_hashtab.ht_used;
|
||||
for (hi = d->dv_hashtab.ht_array; todo > 0; ++hi)
|
||||
{
|
||||
if (!HASHITEM_EMPTY(hi))
|
||||
{
|
||||
--todo;
|
||||
di = HI2DI(hi);
|
||||
|
||||
li = listitem_alloc();
|
||||
if (li == NULL)
|
||||
break;
|
||||
list_append(rettv->vval.v_list, li);
|
||||
|
||||
if (what == 0)
|
||||
{
|
||||
/* keys() */
|
||||
li->li_tv.v_type = VAR_STRING;
|
||||
li->li_tv.v_lock = 0;
|
||||
li->li_tv.vval.v_string = vim_strsave(di->di_key);
|
||||
}
|
||||
else if (what == 1)
|
||||
{
|
||||
/* values() */
|
||||
copy_tv(&di->di_tv, &li->li_tv);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* items() */
|
||||
l2 = list_alloc();
|
||||
li->li_tv.v_type = VAR_LIST;
|
||||
li->li_tv.v_lock = 0;
|
||||
li->li_tv.vval.v_list = l2;
|
||||
if (l2 == NULL)
|
||||
break;
|
||||
++l2->lv_refcount;
|
||||
|
||||
li2 = listitem_alloc();
|
||||
if (li2 == NULL)
|
||||
break;
|
||||
list_append(l2, li2);
|
||||
li2->li_tv.v_type = VAR_STRING;
|
||||
li2->li_tv.v_lock = 0;
|
||||
li2->li_tv.vval.v_string = vim_strsave(di->di_key);
|
||||
|
||||
li2 = listitem_alloc();
|
||||
if (li2 == NULL)
|
||||
break;
|
||||
list_append(l2, li2);
|
||||
copy_tv(&di->di_tv, &li2->li_tv);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* defined(FEAT_EVAL) */
|
||||
32
src/diff.c
32
src/diff.c
@@ -65,7 +65,7 @@ diff_buf_delete(buf_T *buf)
|
||||
int i;
|
||||
tabpage_T *tp;
|
||||
|
||||
for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
|
||||
FOR_ALL_TABPAGES(tp)
|
||||
{
|
||||
i = diff_buf_idx_tp(buf, tp);
|
||||
if (i != DB_COUNT)
|
||||
@@ -92,7 +92,7 @@ diff_buf_adjust(win_T *win)
|
||||
{
|
||||
/* When there is no window showing a diff for this buffer, remove
|
||||
* it from the diffs. */
|
||||
for (wp = firstwin; wp != NULL; wp = wp->w_next)
|
||||
FOR_ALL_WINDOWS(wp)
|
||||
if (wp->w_buffer == win->w_buffer && wp->w_p_diff)
|
||||
break;
|
||||
if (wp == NULL)
|
||||
@@ -135,7 +135,7 @@ diff_buf_add(buf_T *buf)
|
||||
return;
|
||||
}
|
||||
|
||||
EMSGN(_("E96: Can not diff more than %ld buffers"), DB_COUNT);
|
||||
EMSGN(_("E96: Cannot diff more than %ld buffers"), DB_COUNT);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -178,7 +178,7 @@ diff_invalidate(buf_T *buf)
|
||||
tabpage_T *tp;
|
||||
int i;
|
||||
|
||||
for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
|
||||
FOR_ALL_TABPAGES(tp)
|
||||
{
|
||||
i = diff_buf_idx_tp(buf, tp);
|
||||
if (i != DB_COUNT)
|
||||
@@ -204,7 +204,7 @@ diff_mark_adjust(
|
||||
tabpage_T *tp;
|
||||
|
||||
/* Handle all tab pages that use the current buffer in a diff. */
|
||||
for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
|
||||
FOR_ALL_TABPAGES(tp)
|
||||
{
|
||||
idx = diff_buf_idx_tp(curbuf, tp);
|
||||
if (idx != DB_COUNT)
|
||||
@@ -591,7 +591,7 @@ diff_redraw(
|
||||
win_T *wp;
|
||||
int n;
|
||||
|
||||
for (wp = firstwin; wp != NULL; wp = wp->w_next)
|
||||
FOR_ALL_WINDOWS(wp)
|
||||
if (wp->w_p_diff)
|
||||
{
|
||||
redraw_win_later(wp, SOME_VALID);
|
||||
@@ -888,7 +888,7 @@ ex_diffpatch(exarg_T *eap)
|
||||
char_u *browseFile = NULL;
|
||||
int browse_flag = cmdmod.browse;
|
||||
#endif
|
||||
struct stat st;
|
||||
stat_T st;
|
||||
|
||||
#ifdef FEAT_BROWSE
|
||||
if (cmdmod.browse)
|
||||
@@ -1069,8 +1069,9 @@ theend:
|
||||
ex_diffsplit(exarg_T *eap)
|
||||
{
|
||||
win_T *old_curwin = curwin;
|
||||
buf_T *old_curbuf = curbuf;
|
||||
bufref_T old_curbuf;
|
||||
|
||||
set_bufref(&old_curbuf, curbuf);
|
||||
#ifdef FEAT_GUI
|
||||
need_mouse_correct = TRUE;
|
||||
#endif
|
||||
@@ -1092,10 +1093,10 @@ ex_diffsplit(exarg_T *eap)
|
||||
{
|
||||
diff_win_options(old_curwin, TRUE);
|
||||
|
||||
if (buf_valid(old_curbuf))
|
||||
if (bufref_valid(&old_curbuf))
|
||||
/* Move the cursor position to that of the old window. */
|
||||
curwin->w_cursor.lnum = diff_get_corresponding_line(
|
||||
old_curbuf,
|
||||
old_curbuf.br_buf,
|
||||
old_curwin->w_cursor.lnum,
|
||||
curbuf,
|
||||
curwin->w_cursor.lnum);
|
||||
@@ -1197,7 +1198,7 @@ ex_diffoff(exarg_T *eap)
|
||||
int diffwin = FALSE;
|
||||
#endif
|
||||
|
||||
for (wp = firstwin; wp != NULL; wp = wp->w_next)
|
||||
FOR_ALL_WINDOWS(wp)
|
||||
{
|
||||
if (eap->forceit ? wp->w_p_diff : wp == curwin)
|
||||
{
|
||||
@@ -1557,7 +1558,8 @@ diff_check(win_T *wp, linenr_T lnum)
|
||||
/* Compare all lines. If they are equal the lines were inserted
|
||||
* in some buffers, deleted in others, but not changed. */
|
||||
for (i = 0; i < DB_COUNT; ++i)
|
||||
if (i != idx && curtab->tp_diffbuf[i] != NULL && dp->df_count[i] != 0)
|
||||
if (i != idx && curtab->tp_diffbuf[i] != NULL
|
||||
&& dp->df_count[i] != 0)
|
||||
if (!diff_equal_entry(dp, idx, i))
|
||||
return -1;
|
||||
}
|
||||
@@ -1877,7 +1879,7 @@ diffopt_changed(void)
|
||||
|
||||
/* If "icase" or "iwhite" was added or removed, need to update the diff. */
|
||||
if (diff_flags != diff_flags_new)
|
||||
for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
|
||||
FOR_ALL_TABPAGES(tp)
|
||||
tp->tp_diff_invalid = TRUE;
|
||||
|
||||
diff_flags = diff_flags_new;
|
||||
@@ -2432,7 +2434,7 @@ diff_fold_update(diff_T *dp, int skip_idx)
|
||||
int i;
|
||||
win_T *wp;
|
||||
|
||||
for (wp = firstwin; wp != NULL; wp = wp->w_next)
|
||||
FOR_ALL_WINDOWS(wp)
|
||||
for (i = 0; i < DB_COUNT; ++i)
|
||||
if (curtab->tp_diffbuf[i] == wp->w_buffer && i != skip_idx)
|
||||
foldUpdate(wp, dp->df_lnum[i],
|
||||
@@ -2448,7 +2450,7 @@ diff_mode_buf(buf_T *buf)
|
||||
{
|
||||
tabpage_T *tp;
|
||||
|
||||
for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
|
||||
FOR_ALL_TABPAGES(tp)
|
||||
if (diff_buf_idx_tp(buf, tp) != DB_COUNT)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
|
||||
@@ -2460,4 +2460,3 @@ keymap_unload(void)
|
||||
}
|
||||
|
||||
#endif /* FEAT_KEYMAP */
|
||||
|
||||
|
||||
@@ -1153,10 +1153,9 @@ install_vimrc(int idx)
|
||||
fprintf(fd, "set compatible\n");
|
||||
break;
|
||||
case compat_some_enhancements:
|
||||
fprintf(fd, "set nocompatible\n");
|
||||
fprintf(fd, "source $VIMRUNTIME/defaults.vim\n");
|
||||
break;
|
||||
case compat_all_enhancements:
|
||||
fprintf(fd, "set nocompatible\n");
|
||||
fprintf(fd, "source $VIMRUNTIME/vimrc_example.vim\n");
|
||||
break;
|
||||
}
|
||||
|
||||
15
src/edit.c
15
src/edit.c
@@ -649,7 +649,11 @@ edit(
|
||||
if (update_Insstart_orig)
|
||||
Insstart_orig = Insstart;
|
||||
|
||||
if (stop_insert_mode)
|
||||
if (stop_insert_mode
|
||||
#ifdef FEAT_INS_EXPAND
|
||||
&& !pum_visible()
|
||||
#endif
|
||||
)
|
||||
{
|
||||
/* ":stopinsert" used or 'insertmode' reset */
|
||||
count = 0;
|
||||
@@ -2827,6 +2831,7 @@ set_completion(colnr_T startcol, list_T *list)
|
||||
}
|
||||
else
|
||||
ins_complete(Ctrl_N, FALSE);
|
||||
compl_enter_selects = compl_no_insert;
|
||||
|
||||
/* Lazily show the popup menu, unless we got interrupted. */
|
||||
if (!compl_interrupted)
|
||||
@@ -3886,8 +3891,9 @@ ins_compl_prep(int c)
|
||||
&& pum_visible())
|
||||
retval = TRUE;
|
||||
|
||||
/* CTRL-E means completion is Ended, go back to the typed text. */
|
||||
if (c == Ctrl_E)
|
||||
/* CTRL-E means completion is Ended, go back to the typed text.
|
||||
* but only do this, if the Popup is still visible */
|
||||
if (c == Ctrl_E && pum_visible())
|
||||
{
|
||||
ins_compl_delete();
|
||||
if (compl_leader != NULL)
|
||||
@@ -4234,7 +4240,7 @@ ins_compl_get_exp(pos_T *ini)
|
||||
|
||||
if (!compl_started)
|
||||
{
|
||||
for (ins_buf = firstbuf; ins_buf != NULL; ins_buf = ins_buf->b_next)
|
||||
FOR_ALL_BUFFERS(ins_buf)
|
||||
ins_buf->b_scanned = 0;
|
||||
found_all = FALSE;
|
||||
ins_buf = curbuf;
|
||||
@@ -4676,6 +4682,7 @@ ins_compl_insert(void)
|
||||
EMPTY_IF_NULL(compl_shown_match->cp_text[CPT_INFO]));
|
||||
}
|
||||
set_vim_var_dict(VV_COMPLETED_ITEM, dict);
|
||||
compl_curr_match = compl_shown_match;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
19185
src/eval.c
19185
src/eval.c
File diff suppressed because it is too large
Load Diff
12619
src/evalfunc.c
Normal file
12619
src/evalfunc.c
Normal file
File diff suppressed because it is too large
Load Diff
171
src/ex_cmds.c
171
src/ex_cmds.c
@@ -289,10 +289,10 @@ typedef struct
|
||||
union {
|
||||
struct
|
||||
{
|
||||
long start_col_nr; /* starting column number */
|
||||
long end_col_nr; /* ending column number */
|
||||
varnumber_T start_col_nr; /* starting column number */
|
||||
varnumber_T end_col_nr; /* ending column number */
|
||||
} line;
|
||||
long value; /* value if sorting by integer */
|
||||
varnumber_T value; /* value if sorting by integer */
|
||||
#ifdef FEAT_FLOAT
|
||||
float_T value_flt; /* value if sorting by float */
|
||||
#endif
|
||||
@@ -1497,7 +1497,7 @@ do_shell(
|
||||
&& !autocmd_busy
|
||||
#endif
|
||||
&& msg_silent == 0)
|
||||
for (buf = firstbuf; buf; buf = buf->b_next)
|
||||
FOR_ALL_BUFFERS(buf)
|
||||
if (bufIsChanged(buf))
|
||||
{
|
||||
#ifdef FEAT_GUI_MSWIN
|
||||
@@ -1840,14 +1840,14 @@ write_viminfo(char_u *file, int forceit)
|
||||
FILE *fp_in = NULL; /* input viminfo file, if any */
|
||||
FILE *fp_out = NULL; /* output viminfo file */
|
||||
char_u *tempname = NULL; /* name of temp viminfo file */
|
||||
struct stat st_new; /* mch_stat() of potential new file */
|
||||
stat_T st_new; /* mch_stat() of potential new file */
|
||||
char_u *wp;
|
||||
#if defined(UNIX) || defined(VMS)
|
||||
mode_t umask_save;
|
||||
#endif
|
||||
#ifdef UNIX
|
||||
int shortname = FALSE; /* use 8.3 file name */
|
||||
struct stat st_old; /* mch_stat() of existing viminfo file */
|
||||
stat_T st_old; /* mch_stat() of existing viminfo file */
|
||||
#endif
|
||||
#ifdef WIN3264
|
||||
int hidden = FALSE;
|
||||
@@ -2148,10 +2148,11 @@ viminfo_filename(char_u *file)
|
||||
static void
|
||||
do_viminfo(FILE *fp_in, FILE *fp_out, int flags)
|
||||
{
|
||||
int count = 0;
|
||||
int eof = FALSE;
|
||||
vir_T vir;
|
||||
int merge = FALSE;
|
||||
int do_copy_marks = FALSE;
|
||||
garray_T buflist;
|
||||
|
||||
if ((vir.vir_line = alloc(LSIZE)) == NULL)
|
||||
return;
|
||||
@@ -2183,7 +2184,11 @@ do_viminfo(FILE *fp_in, FILE *fp_out, int flags)
|
||||
while (!(eof = viminfo_readline(&vir))
|
||||
&& vir.vir_line[0] != '>')
|
||||
;
|
||||
|
||||
do_copy_marks = (flags &
|
||||
(VIF_WANT_MARKS | VIF_GET_OLDFILES | VIF_FORCEIT));
|
||||
}
|
||||
|
||||
if (fp_out != NULL)
|
||||
{
|
||||
/* Write the info: */
|
||||
@@ -2209,11 +2214,18 @@ do_viminfo(FILE *fp_in, FILE *fp_out, int flags)
|
||||
finish_viminfo_marks();
|
||||
write_viminfo_bufferlist(fp_out);
|
||||
write_viminfo_barlines(&vir, fp_out);
|
||||
count = write_viminfo_marks(fp_out);
|
||||
|
||||
if (do_copy_marks)
|
||||
ga_init2(&buflist, sizeof(buf_T *), 50);
|
||||
write_viminfo_marks(fp_out, do_copy_marks ? &buflist : NULL);
|
||||
}
|
||||
|
||||
if (do_copy_marks)
|
||||
{
|
||||
copy_viminfo_marks(&vir, fp_out, &buflist, eof, flags);
|
||||
if (fp_out != NULL)
|
||||
ga_clear(&buflist);
|
||||
}
|
||||
if (fp_in != NULL
|
||||
&& (flags & (VIF_WANT_MARKS | VIF_GET_OLDFILES | VIF_FORCEIT)))
|
||||
copy_viminfo_marks(&vir, fp_out, count, eof, flags);
|
||||
|
||||
vim_free(vir.vir_line);
|
||||
#ifdef FEAT_MBYTE
|
||||
@@ -2310,7 +2322,11 @@ read_viminfo_up_to_marks(
|
||||
break;
|
||||
case '-':
|
||||
case '\'':
|
||||
eof = read_viminfo_filemark(virp, forceit);
|
||||
/* When file marks are in bar lines skip the old style lines. */
|
||||
if (virp->vir_version < VIMINFO_VERSION_WITH_MARKS)
|
||||
eof = read_viminfo_filemark(virp, forceit);
|
||||
else
|
||||
eof = viminfo_readline(virp);
|
||||
break;
|
||||
default:
|
||||
if (viminfo_error("E575: ", _("Illegal starting char"),
|
||||
@@ -2329,7 +2345,7 @@ read_viminfo_up_to_marks(
|
||||
#endif
|
||||
|
||||
/* Change file names to buffer numbers for fmarks. */
|
||||
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
|
||||
FOR_ALL_BUFFERS(buf)
|
||||
fmarks_check_names(buf);
|
||||
|
||||
return eof;
|
||||
@@ -2555,8 +2571,9 @@ barline_writestring(FILE *fd, char_u *s, int remaining_start)
|
||||
/*
|
||||
* Parse a viminfo line starting with '|'.
|
||||
* Add each decoded value to "values".
|
||||
* Returns TRUE if the next line is to be read after using the parsed values.
|
||||
*/
|
||||
static void
|
||||
static int
|
||||
barline_parse(vir_T *virp, char_u *text, garray_T *values)
|
||||
{
|
||||
char_u *p = text;
|
||||
@@ -2565,6 +2582,7 @@ barline_parse(vir_T *virp, char_u *text, garray_T *values)
|
||||
bval_T *value;
|
||||
int i;
|
||||
int allocated = FALSE;
|
||||
int eof;
|
||||
#ifdef FEAT_MBYTE
|
||||
char_u *sconv;
|
||||
int converted;
|
||||
@@ -2607,21 +2625,24 @@ barline_parse(vir_T *virp, char_u *text, garray_T *values)
|
||||
* |{bartype},>{length of "{text}{text2}"}
|
||||
* |<"{text1}
|
||||
* |<{text2}",{value}
|
||||
* Length includes the quotes.
|
||||
*/
|
||||
++p;
|
||||
len = getdigits(&p);
|
||||
buf = alloc((int)(len + 1));
|
||||
if (buf == NULL)
|
||||
return;
|
||||
return TRUE;
|
||||
p = buf;
|
||||
for (todo = len; todo > 0; todo -= n)
|
||||
{
|
||||
if (viminfo_readline(virp) || virp->vir_line[0] != '|'
|
||||
eof = viminfo_readline(virp);
|
||||
if (eof || virp->vir_line[0] != '|'
|
||||
|| virp->vir_line[1] != '<')
|
||||
{
|
||||
/* file was truncated or garbled */
|
||||
/* File was truncated or garbled. Read another line if
|
||||
* this one starts with '|'. */
|
||||
vim_free(buf);
|
||||
return;
|
||||
return eof || virp->vir_line[0] == '|';
|
||||
}
|
||||
/* Get length of text, excluding |< and NL chars. */
|
||||
n = STRLEN(virp->vir_line);
|
||||
@@ -2647,10 +2668,12 @@ barline_parse(vir_T *virp, char_u *text, garray_T *values)
|
||||
* |{bartype},{lots of values},>
|
||||
* |<{value},{value}
|
||||
*/
|
||||
if (viminfo_readline(virp) || virp->vir_line[0] != '|'
|
||||
eof = viminfo_readline(virp);
|
||||
if (eof || virp->vir_line[0] != '|'
|
||||
|| virp->vir_line[1] != '<')
|
||||
/* file was truncated or garbled */
|
||||
return;
|
||||
/* File was truncated or garbled. Read another line if
|
||||
* this one starts with '|'. */
|
||||
return eof || virp->vir_line[0] == '|';
|
||||
p = virp->vir_line + 2;
|
||||
}
|
||||
}
|
||||
@@ -2671,7 +2694,7 @@ barline_parse(vir_T *virp, char_u *text, garray_T *values)
|
||||
while (*p != '"')
|
||||
{
|
||||
if (*p == NL || *p == NUL)
|
||||
return; /* syntax error, drop the value */
|
||||
return TRUE; /* syntax error, drop the value */
|
||||
if (*p == '\\')
|
||||
{
|
||||
++p;
|
||||
@@ -2730,6 +2753,7 @@ barline_parse(vir_T *virp, char_u *text, garray_T *values)
|
||||
else
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -2740,6 +2764,7 @@ read_viminfo_barline(vir_T *virp, int got_encoding, int force, int writing)
|
||||
garray_T values;
|
||||
bval_T *vp;
|
||||
int i;
|
||||
int read_next = TRUE;
|
||||
|
||||
/* The format is: |{bartype},{value},...
|
||||
* For a very long string:
|
||||
@@ -2768,7 +2793,7 @@ read_viminfo_barline(vir_T *virp, int got_encoding, int force, int writing)
|
||||
* doesn't understand the version. */
|
||||
if (!got_encoding)
|
||||
{
|
||||
barline_parse(virp, p, &values);
|
||||
read_next = barline_parse(virp, p, &values);
|
||||
vp = (bval_T *)values.ga_data;
|
||||
if (values.ga_len > 0 && vp->bv_type == BVAL_NR)
|
||||
virp->vir_version = vp->bv_nr;
|
||||
@@ -2776,17 +2801,17 @@ read_viminfo_barline(vir_T *virp, int got_encoding, int force, int writing)
|
||||
break;
|
||||
|
||||
case BARTYPE_HISTORY:
|
||||
barline_parse(virp, p, &values);
|
||||
read_next = barline_parse(virp, p, &values);
|
||||
handle_viminfo_history(&values, writing);
|
||||
break;
|
||||
|
||||
case BARTYPE_REGISTER:
|
||||
barline_parse(virp, p, &values);
|
||||
read_next = barline_parse(virp, p, &values);
|
||||
handle_viminfo_register(&values, force);
|
||||
break;
|
||||
|
||||
case BARTYPE_MARK:
|
||||
barline_parse(virp, p, &values);
|
||||
read_next = barline_parse(virp, p, &values);
|
||||
handle_viminfo_mark(&values, force);
|
||||
break;
|
||||
|
||||
@@ -2804,7 +2829,9 @@ read_viminfo_barline(vir_T *virp, int got_encoding, int force, int writing)
|
||||
ga_clear(&values);
|
||||
}
|
||||
|
||||
return viminfo_readline(virp);
|
||||
if (read_next)
|
||||
return viminfo_readline(virp);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2819,23 +2846,32 @@ write_viminfo_barlines(vir_T *virp, FILE *fp_out)
|
||||
{
|
||||
int i;
|
||||
garray_T *gap = &virp->vir_barlines;
|
||||
int seen_useful = FALSE;
|
||||
char *line;
|
||||
|
||||
if (gap->ga_len > 0)
|
||||
{
|
||||
fputs(_("\n# Bar lines, copied verbatim:\n"), fp_out);
|
||||
|
||||
/* Skip over continuation lines until seeing a useful line. */
|
||||
for (i = 0; i < gap->ga_len; ++i)
|
||||
fputs(((char **)(gap->ga_data))[i], fp_out);
|
||||
{
|
||||
line = ((char **)(gap->ga_data))[i];
|
||||
if (seen_useful || line[1] != '<')
|
||||
{
|
||||
fputs(line, fp_out);
|
||||
seen_useful = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* FEAT_VIMINFO */
|
||||
|
||||
#if defined(FEAT_CMDHIST) || defined(FEAT_VIMINFO) || defined(PROTO)
|
||||
/*
|
||||
* Return the current time in seconds. Calls time(), unless test_settime()
|
||||
* was used.
|
||||
*/
|
||||
time_t
|
||||
time_T
|
||||
vim_time(void)
|
||||
{
|
||||
# ifdef FEAT_EVAL
|
||||
@@ -2844,7 +2880,6 @@ vim_time(void)
|
||||
return time(NULL);
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Implementation of ":fixdel", also used by get_stty().
|
||||
@@ -3022,6 +3057,7 @@ do_write(exarg_T *eap)
|
||||
char_u *browse_file = NULL;
|
||||
#endif
|
||||
buf_T *alt_buf = NULL;
|
||||
int name_was_missing;
|
||||
|
||||
if (not_writing()) /* check 'write' option */
|
||||
return FAIL;
|
||||
@@ -3189,6 +3225,8 @@ do_write(exarg_T *eap)
|
||||
#endif
|
||||
}
|
||||
|
||||
name_was_missing = curbuf->b_ffname == NULL;
|
||||
|
||||
retval = buf_write(curbuf, ffname, fname, eap->line1, eap->line2,
|
||||
eap, eap->append, eap->forceit, TRUE, FALSE);
|
||||
|
||||
@@ -3202,7 +3240,12 @@ do_write(exarg_T *eap)
|
||||
redraw_tabline = TRUE;
|
||||
#endif
|
||||
}
|
||||
/* Change directories when the 'acd' option is set. */
|
||||
}
|
||||
|
||||
/* Change directories when the 'acd' option is set and the file name
|
||||
* got changed or set. */
|
||||
if (eap->cmdidx == CMD_saveas || name_was_missing)
|
||||
{
|
||||
DO_AUTOCHDIR
|
||||
}
|
||||
}
|
||||
@@ -3368,7 +3411,7 @@ do_wqall(exarg_T *eap)
|
||||
if (eap->cmdidx == CMD_xall || eap->cmdidx == CMD_wqall)
|
||||
exiting = TRUE;
|
||||
|
||||
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
|
||||
FOR_ALL_BUFFERS(buf)
|
||||
{
|
||||
if (bufIsChanged(buf))
|
||||
{
|
||||
@@ -3402,11 +3445,16 @@ do_wqall(exarg_T *eap)
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef FEAT_AUTOCMD
|
||||
bufref_T bufref;
|
||||
|
||||
set_bufref(&bufref, buf);
|
||||
#endif
|
||||
if (buf_write_all(buf, eap->forceit) == FAIL)
|
||||
++error;
|
||||
#ifdef FEAT_AUTOCMD
|
||||
/* an autocommand may have deleted the buffer */
|
||||
if (!buf_valid(buf))
|
||||
if (!bufref_valid(&bufref))
|
||||
buf = firstbuf;
|
||||
#endif
|
||||
}
|
||||
@@ -3442,7 +3490,7 @@ not_writing(void)
|
||||
static int
|
||||
check_readonly(int *forceit, buf_T *buf)
|
||||
{
|
||||
struct stat st;
|
||||
stat_T st;
|
||||
|
||||
/* Handle a file being readonly when the 'readonly' option is set or when
|
||||
* the file exists and permissions are read-only.
|
||||
@@ -3614,8 +3662,9 @@ do_ecmd(
|
||||
int did_set_swapcommand = FALSE;
|
||||
#endif
|
||||
buf_T *buf;
|
||||
bufref_T bufref;
|
||||
#if defined(FEAT_AUTOCMD) || defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
|
||||
buf_T *old_curbuf = curbuf;
|
||||
bufref_T old_curbuf;
|
||||
#endif
|
||||
char_u *free_fname = NULL;
|
||||
#ifdef FEAT_BROWSE
|
||||
@@ -3640,6 +3689,9 @@ do_ecmd(
|
||||
|
||||
if (eap != NULL)
|
||||
command = eap->do_ecmd_cmd;
|
||||
#if defined(FEAT_AUTOCMD) || defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
|
||||
set_bufref(&old_curbuf, curbuf);
|
||||
#endif
|
||||
|
||||
if (fnum != 0)
|
||||
{
|
||||
@@ -3806,7 +3858,7 @@ do_ecmd(
|
||||
/* autocommands may change curwin and curbuf */
|
||||
if (oldwin != NULL)
|
||||
oldwin = curwin;
|
||||
old_curbuf = curbuf;
|
||||
set_bufref(&old_curbuf, curbuf);
|
||||
#endif
|
||||
}
|
||||
if (buf == NULL)
|
||||
@@ -3818,12 +3870,13 @@ do_ecmd(
|
||||
else /* existing memfile */
|
||||
{
|
||||
oldbuf = TRUE;
|
||||
set_bufref(&bufref, buf);
|
||||
(void)buf_check_timestamp(buf, FALSE);
|
||||
/* Check if autocommands made buffer invalid or changed the current
|
||||
* buffer. */
|
||||
if (!buf_valid(buf)
|
||||
if (!bufref_valid(&bufref)
|
||||
#ifdef FEAT_AUTOCMD
|
||||
|| curbuf != old_curbuf
|
||||
|| curbuf != old_curbuf.br_buf
|
||||
#endif
|
||||
)
|
||||
goto theend;
|
||||
@@ -3863,10 +3916,11 @@ do_ecmd(
|
||||
*/
|
||||
if (buf->b_fname != NULL)
|
||||
new_name = vim_strsave(buf->b_fname);
|
||||
au_new_curbuf = buf;
|
||||
set_bufref(&au_new_curbuf, buf);
|
||||
apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf);
|
||||
if (!buf_valid(buf)) /* new buffer has been deleted */
|
||||
if (!bufref_valid(&au_new_curbuf))
|
||||
{
|
||||
/* new buffer has been deleted */
|
||||
delbuf_msg(new_name); /* frees new_name */
|
||||
goto theend;
|
||||
}
|
||||
@@ -3881,7 +3935,7 @@ do_ecmd(
|
||||
auto_buf = TRUE;
|
||||
else
|
||||
{
|
||||
if (curbuf == old_curbuf)
|
||||
if (curbuf == old_curbuf.br_buf)
|
||||
#endif
|
||||
buf_copy_options(buf, BCO_ENTER);
|
||||
|
||||
@@ -3906,8 +3960,9 @@ do_ecmd(
|
||||
}
|
||||
# endif
|
||||
/* Be careful again, like above. */
|
||||
if (!buf_valid(buf)) /* new buffer has been deleted */
|
||||
if (!bufref_valid(&au_new_curbuf))
|
||||
{
|
||||
/* new buffer has been deleted */
|
||||
delbuf_msg(new_name); /* frees new_name */
|
||||
goto theend;
|
||||
}
|
||||
@@ -3950,7 +4005,8 @@ do_ecmd(
|
||||
#ifdef FEAT_AUTOCMD
|
||||
}
|
||||
vim_free(new_name);
|
||||
au_new_curbuf = NULL;
|
||||
au_new_curbuf.br_buf = NULL;
|
||||
au_new_curbuf.br_buf_free_count = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -4026,6 +4082,7 @@ do_ecmd(
|
||||
new_name = vim_strsave(buf->b_fname);
|
||||
else
|
||||
new_name = NULL;
|
||||
set_bufref(&bufref, buf);
|
||||
#endif
|
||||
if (p_ur < 0 || curbuf->b_ml.ml_line_count <= p_ur)
|
||||
{
|
||||
@@ -4034,7 +4091,12 @@ do_ecmd(
|
||||
u_sync(FALSE);
|
||||
if (u_savecommon(0, curbuf->b_ml.ml_line_count + 1, 0, TRUE)
|
||||
== FAIL)
|
||||
{
|
||||
#ifdef FEAT_AUTOCMD
|
||||
vim_free(new_name);
|
||||
#endif
|
||||
goto theend;
|
||||
}
|
||||
u_unchanged(curbuf);
|
||||
buf_freeall(curbuf, BFA_KEEP_UNDO);
|
||||
|
||||
@@ -4046,7 +4108,7 @@ do_ecmd(
|
||||
#ifdef FEAT_AUTOCMD
|
||||
/* If autocommands deleted the buffer we were going to re-edit, give
|
||||
* up and jump to the end. */
|
||||
if (!buf_valid(buf))
|
||||
if (!bufref_valid(&bufref))
|
||||
{
|
||||
delbuf_msg(new_name); /* frees new_name */
|
||||
goto theend;
|
||||
@@ -4141,7 +4203,7 @@ do_ecmd(
|
||||
#if defined(HAS_SWAP_EXISTS_ACTION)
|
||||
if (swap_exists_action == SEA_QUIT)
|
||||
retval = FAIL;
|
||||
handle_swap_exists(old_curbuf);
|
||||
handle_swap_exists(&old_curbuf);
|
||||
#endif
|
||||
}
|
||||
#ifdef FEAT_AUTOCMD
|
||||
@@ -4262,6 +4324,10 @@ do_ecmd(
|
||||
msg_scrolled_ign = FALSE;
|
||||
}
|
||||
|
||||
#ifdef FEAT_VIMINFO
|
||||
curbuf->b_last_used = vim_time();
|
||||
#endif
|
||||
|
||||
if (command != NULL)
|
||||
do_cmdline(command, NULL, NULL, DOCMD_VERBOSE);
|
||||
|
||||
@@ -4326,7 +4392,8 @@ delbuf_msg(char_u *name)
|
||||
EMSG2(_("E143: Autocommands unexpectedly deleted new buffer %s"),
|
||||
name == NULL ? (char_u *)"" : name);
|
||||
vim_free(name);
|
||||
au_new_curbuf = NULL;
|
||||
au_new_curbuf.br_buf = NULL;
|
||||
au_new_curbuf.br_buf_free_count = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -4357,7 +4424,7 @@ ex_append(exarg_T *eap)
|
||||
if (eap->cmdidx != CMD_append)
|
||||
--lnum;
|
||||
|
||||
/* when the buffer is empty append to line 0 and delete the dummy line */
|
||||
/* when the buffer is empty need to delete the dummy line */
|
||||
if (empty && lnum == 1)
|
||||
lnum = 0;
|
||||
|
||||
@@ -4441,7 +4508,7 @@ ex_append(exarg_T *eap)
|
||||
|
||||
did_undo = TRUE;
|
||||
ml_append(lnum, theline, (colnr_T)0, FALSE);
|
||||
appended_lines_mark(lnum, 1L);
|
||||
appended_lines_mark(lnum + (empty ? 1 : 0), 1L);
|
||||
|
||||
vim_free(theline);
|
||||
++lnum;
|
||||
@@ -6053,7 +6120,7 @@ prepare_tagpreview(
|
||||
*/
|
||||
if (!curwin->w_p_pvw)
|
||||
{
|
||||
for (wp = firstwin; wp != NULL; wp = wp->w_next)
|
||||
FOR_ALL_WINDOWS(wp)
|
||||
if (wp->w_p_pvw)
|
||||
break;
|
||||
if (wp != NULL)
|
||||
@@ -6210,7 +6277,7 @@ ex_help(exarg_T *eap)
|
||||
if (cmdmod.tab != 0)
|
||||
wp = NULL;
|
||||
else
|
||||
for (wp = firstwin; wp != NULL; wp = wp->w_next)
|
||||
FOR_ALL_WINDOWS(wp)
|
||||
if (wp->w_buffer != NULL && wp->w_buffer->b_help)
|
||||
break;
|
||||
if (wp != NULL && wp->w_buffer->b_nwindows > 0)
|
||||
@@ -7683,7 +7750,7 @@ ex_sign(exarg_T *eap)
|
||||
if (idx == SIGNCMD_UNPLACE && *arg == NUL)
|
||||
{
|
||||
/* ":sign unplace {id}": remove placed sign by number */
|
||||
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
|
||||
FOR_ALL_BUFFERS(buf)
|
||||
if ((lnum = buf_delsign(buf, id)) != 0)
|
||||
update_debug_sign(buf, lnum);
|
||||
return;
|
||||
|
||||
@@ -259,6 +259,9 @@ EX(CMD_catch, "catch", ex_catch,
|
||||
EX(CMD_cbuffer, "cbuffer", ex_cbuffer,
|
||||
BANG|RANGE|NOTADR|WORD1|TRLBAR,
|
||||
ADDR_LINES),
|
||||
EX(CMD_cbottom, "cbottom", ex_cbottom,
|
||||
TRLBAR,
|
||||
ADDR_LINES),
|
||||
EX(CMD_cc, "cc", ex_cc,
|
||||
RANGE|NOTADR|COUNT|TRLBAR|BANG,
|
||||
ADDR_LINES),
|
||||
@@ -307,6 +310,9 @@ EX(CMD_checkpath, "checkpath", ex_checkpath,
|
||||
EX(CMD_checktime, "checktime", ex_checktime,
|
||||
RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR,
|
||||
ADDR_LINES),
|
||||
EX(CMD_chistory, "chistory", qf_history,
|
||||
TRLBAR,
|
||||
ADDR_LINES),
|
||||
EX(CMD_clist, "clist", qf_list,
|
||||
BANG|EXTRA|TRLBAR|CMDWIN,
|
||||
ADDR_LINES),
|
||||
@@ -721,6 +727,9 @@ EX(CMD_laddfile, "laddfile", ex_cfile,
|
||||
EX(CMD_later, "later", ex_later,
|
||||
TRLBAR|EXTRA|NOSPC|CMDWIN,
|
||||
ADDR_LINES),
|
||||
EX(CMD_lbottom, "lbottom", ex_cbottom,
|
||||
TRLBAR,
|
||||
ADDR_LINES),
|
||||
EX(CMD_lbuffer, "lbuffer", ex_cbuffer,
|
||||
BANG|RANGE|NOTADR|WORD1|TRLBAR,
|
||||
ADDR_LINES),
|
||||
@@ -778,6 +787,9 @@ EX(CMD_lgrepadd, "lgrepadd", ex_make,
|
||||
EX(CMD_lhelpgrep, "lhelpgrep", ex_helpgrep,
|
||||
EXTRA|NOTRLCOM|NEEDARG,
|
||||
ADDR_LINES),
|
||||
EX(CMD_lhistory, "lhistory", qf_history,
|
||||
TRLBAR,
|
||||
ADDR_LINES),
|
||||
EX(CMD_ll, "ll", ex_cc,
|
||||
RANGE|NOTADR|COUNT|TRLBAR|BANG,
|
||||
ADDR_LINES),
|
||||
|
||||
107
src/ex_cmds2.c
107
src/ex_cmds2.c
@@ -1121,8 +1121,7 @@ remove_timer(timer_T *timer)
|
||||
static void
|
||||
free_timer(timer_T *timer)
|
||||
{
|
||||
vim_free(timer->tr_callback);
|
||||
partial_unref(timer->tr_partial);
|
||||
free_callback(timer->tr_callback, timer->tr_partial);
|
||||
vim_free(timer);
|
||||
}
|
||||
|
||||
@@ -1164,7 +1163,7 @@ timer_callback(timer_T *timer)
|
||||
argv[1].v_type = VAR_UNKNOWN;
|
||||
|
||||
call_func(timer->tr_callback, (int)STRLEN(timer->tr_callback),
|
||||
&rettv, 1, argv, 0L, 0L, &dummy, TRUE,
|
||||
&rettv, 1, argv, NULL, 0L, 0L, &dummy, TRUE,
|
||||
timer->tr_partial, NULL);
|
||||
clear_tv(&rettv);
|
||||
}
|
||||
@@ -1266,12 +1265,35 @@ set_ref_in_timer(int copyID)
|
||||
|
||||
for (timer = first_timer; timer != NULL; timer = timer->tr_next)
|
||||
{
|
||||
tv.v_type = VAR_PARTIAL;
|
||||
tv.vval.v_partial = timer->tr_partial;
|
||||
if (timer->tr_partial != NULL)
|
||||
{
|
||||
tv.v_type = VAR_PARTIAL;
|
||||
tv.vval.v_partial = timer->tr_partial;
|
||||
}
|
||||
else
|
||||
{
|
||||
tv.v_type = VAR_FUNC;
|
||||
tv.vval.v_string = timer->tr_callback;
|
||||
}
|
||||
abort = abort || set_ref_in_item(&tv, copyID, NULL, NULL);
|
||||
}
|
||||
return abort;
|
||||
}
|
||||
|
||||
# if defined(EXITFREE) || defined(PROTO)
|
||||
void
|
||||
timer_free_all()
|
||||
{
|
||||
timer_T *timer;
|
||||
|
||||
while (first_timer != NULL)
|
||||
{
|
||||
timer = first_timer;
|
||||
remove_timer(timer);
|
||||
free_timer(timer);
|
||||
}
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#if defined(FEAT_SYN_HL) && defined(FEAT_RELTIME) && defined(FEAT_FLOAT)
|
||||
@@ -1693,6 +1715,7 @@ prof_def_func(void)
|
||||
autowrite(buf_T *buf, int forceit)
|
||||
{
|
||||
int r;
|
||||
bufref_T bufref;
|
||||
|
||||
if (!(p_aw || p_awa) || !p_write
|
||||
#ifdef FEAT_QUICKFIX
|
||||
@@ -1701,11 +1724,12 @@ autowrite(buf_T *buf, int forceit)
|
||||
#endif
|
||||
|| (!forceit && buf->b_p_ro) || buf->b_ffname == NULL)
|
||||
return FAIL;
|
||||
set_bufref(&bufref, buf);
|
||||
r = buf_write_all(buf, forceit);
|
||||
|
||||
/* Writing may succeed but the buffer still changed, e.g., when there is a
|
||||
* conversion error. We do want to return FAIL then. */
|
||||
if (buf_valid(buf) && bufIsChanged(buf))
|
||||
if (bufref_valid(&bufref) && bufIsChanged(buf))
|
||||
r = FAIL;
|
||||
return r;
|
||||
}
|
||||
@@ -1720,13 +1744,18 @@ autowrite_all(void)
|
||||
|
||||
if (!(p_aw || p_awa) || !p_write)
|
||||
return;
|
||||
for (buf = firstbuf; buf; buf = buf->b_next)
|
||||
FOR_ALL_BUFFERS(buf)
|
||||
if (bufIsChanged(buf) && !buf->b_p_ro)
|
||||
{
|
||||
#ifdef FEAT_AUTOCMD
|
||||
bufref_T bufref;
|
||||
|
||||
set_bufref(&bufref, buf);
|
||||
#endif
|
||||
(void)buf_write_all(buf, FALSE);
|
||||
#ifdef FEAT_AUTOCMD
|
||||
/* an autocommand may have deleted the buffer */
|
||||
if (!buf_valid(buf))
|
||||
if (!bufref_valid(&bufref))
|
||||
buf = firstbuf;
|
||||
#endif
|
||||
}
|
||||
@@ -1739,7 +1768,12 @@ autowrite_all(void)
|
||||
int
|
||||
check_changed(buf_T *buf, int flags)
|
||||
{
|
||||
int forceit = (flags & CCGD_FORCEIT);
|
||||
int forceit = (flags & CCGD_FORCEIT);
|
||||
#ifdef FEAT_AUTOCMD
|
||||
bufref_T bufref;
|
||||
|
||||
set_bufref(&bufref, buf);
|
||||
#endif
|
||||
|
||||
if ( !forceit
|
||||
&& bufIsChanged(buf)
|
||||
@@ -1753,7 +1787,7 @@ check_changed(buf_T *buf, int flags)
|
||||
int count = 0;
|
||||
|
||||
if (flags & CCGD_ALLBUF)
|
||||
for (buf2 = firstbuf; buf2 != NULL; buf2 = buf2->b_next)
|
||||
FOR_ALL_BUFFERS(buf2)
|
||||
if (bufIsChanged(buf2)
|
||||
&& (buf2->b_ffname != NULL
|
||||
# ifdef FEAT_BROWSE
|
||||
@@ -1762,13 +1796,13 @@ check_changed(buf_T *buf, int flags)
|
||||
))
|
||||
++count;
|
||||
# ifdef FEAT_AUTOCMD
|
||||
if (!buf_valid(buf))
|
||||
if (!bufref_valid(&bufref))
|
||||
/* Autocommand deleted buffer, oops! It's not changed now. */
|
||||
return FALSE;
|
||||
# endif
|
||||
dialog_changed(buf, count > 1);
|
||||
# ifdef FEAT_AUTOCMD
|
||||
if (!buf_valid(buf))
|
||||
if (!bufref_valid(&bufref))
|
||||
/* Autocommand deleted buffer, oops! It's not changed now. */
|
||||
return FALSE;
|
||||
# endif
|
||||
@@ -1857,7 +1891,7 @@ dialog_changed(
|
||||
* Skip readonly buffers, these need to be confirmed
|
||||
* individually.
|
||||
*/
|
||||
for (buf2 = firstbuf; buf2 != NULL; buf2 = buf2->b_next)
|
||||
FOR_ALL_BUFFERS(buf2)
|
||||
{
|
||||
if (bufIsChanged(buf2)
|
||||
&& (buf2->b_ffname != NULL
|
||||
@@ -1867,6 +1901,11 @@ dialog_changed(
|
||||
)
|
||||
&& !buf2->b_p_ro)
|
||||
{
|
||||
#ifdef FEAT_AUTOCMD
|
||||
bufref_T bufref;
|
||||
|
||||
set_bufref(&bufref, buf2);
|
||||
#endif
|
||||
#ifdef FEAT_BROWSE
|
||||
/* May get file name, when there is none */
|
||||
browse_save_fname(buf2);
|
||||
@@ -1877,7 +1916,7 @@ dialog_changed(
|
||||
(void)buf_write_all(buf2, FALSE);
|
||||
#ifdef FEAT_AUTOCMD
|
||||
/* an autocommand may have deleted the buffer */
|
||||
if (!buf_valid(buf2))
|
||||
if (!bufref_valid(&bufref))
|
||||
buf2 = firstbuf;
|
||||
#endif
|
||||
}
|
||||
@@ -1888,7 +1927,7 @@ dialog_changed(
|
||||
/*
|
||||
* mark all buffers as unchanged
|
||||
*/
|
||||
for (buf2 = firstbuf; buf2 != NULL; buf2 = buf2->b_next)
|
||||
FOR_ALL_BUFFERS(buf2)
|
||||
unchanged(buf2, TRUE);
|
||||
}
|
||||
}
|
||||
@@ -1948,7 +1987,7 @@ check_changed_any(
|
||||
win_T *wp;
|
||||
#endif
|
||||
|
||||
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
|
||||
FOR_ALL_BUFFERS(buf)
|
||||
++bufcount;
|
||||
|
||||
if (bufcount == 0)
|
||||
@@ -1967,13 +2006,13 @@ check_changed_any(
|
||||
add_bufnum(bufnrs, &bufnum, wp->w_buffer->b_fnum);
|
||||
|
||||
/* buf in other tab */
|
||||
for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
|
||||
FOR_ALL_TABPAGES(tp)
|
||||
if (tp != curtab)
|
||||
for (wp = tp->tp_firstwin; wp != NULL; wp = wp->w_next)
|
||||
add_bufnum(bufnrs, &bufnum, wp->w_buffer->b_fnum);
|
||||
#endif
|
||||
/* any other buf */
|
||||
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
|
||||
FOR_ALL_BUFFERS(buf)
|
||||
add_bufnum(bufnrs, &bufnum, buf->b_fnum);
|
||||
|
||||
for (i = 0; i < bufnum; ++i)
|
||||
@@ -1983,11 +2022,14 @@ check_changed_any(
|
||||
continue;
|
||||
if ((!hidden || buf->b_nwindows == 0) && bufIsChanged(buf))
|
||||
{
|
||||
bufref_T bufref;
|
||||
|
||||
set_bufref(&bufref, buf);
|
||||
/* Try auto-writing the buffer. If this fails but the buffer no
|
||||
* longer exists it's not changed, that's OK. */
|
||||
if (check_changed(buf, (p_awa ? CCGD_AW : 0)
|
||||
| CCGD_MULTWIN
|
||||
| CCGD_ALLBUF) && buf_valid(buf))
|
||||
| CCGD_ALLBUF) && bufref_valid(&bufref))
|
||||
break; /* didn't save - still changes */
|
||||
}
|
||||
}
|
||||
@@ -2030,10 +2072,15 @@ check_changed_any(
|
||||
FOR_ALL_TAB_WINDOWS(tp, wp)
|
||||
if (wp->w_buffer == buf)
|
||||
{
|
||||
# ifdef FEAT_AUTOCMD
|
||||
bufref_T bufref;
|
||||
|
||||
set_bufref(&bufref, buf);
|
||||
# endif
|
||||
goto_tabpage_win(tp, wp);
|
||||
# ifdef FEAT_AUTOCMD
|
||||
/* Paranoia: did autocms wipe out the buffer with changes? */
|
||||
if (!buf_valid(buf))
|
||||
if (!bufref_valid(&bufref))
|
||||
{
|
||||
goto theend;
|
||||
}
|
||||
@@ -2900,7 +2947,7 @@ ex_listdo(exarg_T *eap)
|
||||
if (next_fnum < 0 || next_fnum > eap->line2)
|
||||
break;
|
||||
/* Check if the buffer still exists. */
|
||||
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
|
||||
FOR_ALL_BUFFERS(buf)
|
||||
if (buf->b_fnum == next_fnum)
|
||||
break;
|
||||
if (buf == NULL)
|
||||
@@ -3349,6 +3396,7 @@ add_pack_plugin(char_u *fname, void *cookie)
|
||||
char_u *afterdir;
|
||||
size_t afterlen = 0;
|
||||
char_u *ffname = fix_fname(fname);
|
||||
size_t fname_len;
|
||||
|
||||
if (ffname == NULL)
|
||||
return;
|
||||
@@ -3369,7 +3417,20 @@ add_pack_plugin(char_u *fname, void *cookie)
|
||||
* find the part up to "pack" in 'runtimepath' */
|
||||
c = *p4;
|
||||
*p4 = NUL;
|
||||
insp = (char_u *)strstr((char *)p_rtp, (char *)ffname);
|
||||
|
||||
/* Find "ffname" in "p_rtp", ignoring '/' vs '\' differences. */
|
||||
fname_len = STRLEN(ffname);
|
||||
insp = p_rtp;
|
||||
for (;;)
|
||||
{
|
||||
if (vim_fnamencmp(insp, ffname, fname_len) == 0)
|
||||
break;
|
||||
insp = vim_strchr(insp, ',');
|
||||
if (insp == NULL)
|
||||
break;
|
||||
++insp;
|
||||
}
|
||||
|
||||
if (insp == NULL)
|
||||
/* not found, append at the end */
|
||||
insp = p_rtp + STRLEN(p_rtp);
|
||||
@@ -3671,7 +3732,7 @@ do_source(
|
||||
int save_debug_break_level = debug_break_level;
|
||||
scriptitem_T *si = NULL;
|
||||
# ifdef UNIX
|
||||
struct stat st;
|
||||
stat_T st;
|
||||
int stat_ok;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -122,6 +122,7 @@ static int getargopt(exarg_T *eap);
|
||||
# define ex_cfile ex_ni
|
||||
# define qf_list ex_ni
|
||||
# define qf_age ex_ni
|
||||
# define qf_history ex_ni
|
||||
# define ex_helpgrep ex_ni
|
||||
# define ex_vimgrep ex_ni
|
||||
#endif
|
||||
@@ -129,6 +130,7 @@ static int getargopt(exarg_T *eap);
|
||||
# define ex_cclose ex_ni
|
||||
# define ex_copen ex_ni
|
||||
# define ex_cwindow ex_ni
|
||||
# define ex_cbottom ex_ni
|
||||
#endif
|
||||
#if !defined(FEAT_QUICKFIX) || !defined(FEAT_EVAL)
|
||||
# define ex_cexpr ex_ni
|
||||
@@ -1706,7 +1708,7 @@ current_win_nr(win_T *win)
|
||||
win_T *wp;
|
||||
int nr = 0;
|
||||
|
||||
for (wp = firstwin; wp != NULL; wp = wp->w_next)
|
||||
FOR_ALL_WINDOWS(wp)
|
||||
{
|
||||
++nr;
|
||||
if (wp == win)
|
||||
@@ -1721,7 +1723,7 @@ current_tab_nr(tabpage_T *tab)
|
||||
tabpage_T *tp;
|
||||
int nr = 0;
|
||||
|
||||
for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
|
||||
FOR_ALL_TABPAGES(tp)
|
||||
{
|
||||
++nr;
|
||||
if (tp == tab)
|
||||
@@ -1952,7 +1954,7 @@ do_one_cmd(
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
if (!checkforcmd(&ea.cmd, "noswapfile", 6))
|
||||
if (!checkforcmd(&ea.cmd, "noswapfile", 3))
|
||||
break;
|
||||
cmdmod.noswapfile = TRUE;
|
||||
continue;
|
||||
@@ -2341,7 +2343,7 @@ do_one_cmd(
|
||||
vim_free(p);
|
||||
/* If the autocommands did something and didn't cause an error, try
|
||||
* finding the command again. */
|
||||
p = (ret && !aborting()) ? find_command(&ea, NULL) : NULL;
|
||||
p = (ret && !aborting()) ? find_command(&ea, NULL) : ea.cmd;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -7048,6 +7050,18 @@ parse_compl_arg(
|
||||
# endif
|
||||
return OK;
|
||||
}
|
||||
|
||||
int
|
||||
cmdcomplete_str_to_type(char_u *complete_str)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; command_complete[i].expand != 0; ++i)
|
||||
if (STRCMP(complete_str, command_complete[i].name) == 0)
|
||||
return command_complete[i].expand;
|
||||
|
||||
return EXPAND_NOTHING;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
@@ -7259,7 +7273,7 @@ ex_close(exarg_T *eap)
|
||||
if (eap->addr_count == 0)
|
||||
ex_win_close(eap->forceit, curwin, NULL);
|
||||
else {
|
||||
for (win = firstwin; win != NULL; win = win->w_next)
|
||||
FOR_ALL_WINDOWS(win)
|
||||
{
|
||||
winnr++;
|
||||
if (winnr == eap->line2)
|
||||
@@ -7281,7 +7295,7 @@ ex_pclose(exarg_T *eap)
|
||||
{
|
||||
win_T *win;
|
||||
|
||||
for (win = firstwin; win != NULL; win = win->w_next)
|
||||
FOR_ALL_WINDOWS(win)
|
||||
if (win->w_p_pvw)
|
||||
{
|
||||
ex_win_close(eap->forceit, win, NULL);
|
||||
@@ -7309,8 +7323,11 @@ ex_win_close(
|
||||
# if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
|
||||
if ((p_confirm || cmdmod.confirm) && p_write)
|
||||
{
|
||||
bufref_T bufref;
|
||||
|
||||
set_bufref(&bufref, buf);
|
||||
dialog_changed(buf, FALSE);
|
||||
if (buf_valid(buf) && bufIsChanged(buf))
|
||||
if (bufref_valid(&bufref) && bufIsChanged(buf))
|
||||
return;
|
||||
need_hide = FALSE;
|
||||
}
|
||||
@@ -7398,7 +7415,7 @@ ex_tabonly(exarg_T *eap)
|
||||
* up the lists. */
|
||||
for (done = 0; done < 1000; ++done)
|
||||
{
|
||||
for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
|
||||
FOR_ALL_TABPAGES(tp)
|
||||
if (tp->tp_topframe != topframe)
|
||||
{
|
||||
tabpage_close_other(tp, eap->forceit);
|
||||
@@ -7457,6 +7474,10 @@ tabpage_close_other(tabpage_T *tp, int forceit)
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef FEAT_AUTOCMD
|
||||
apply_autocmds(EVENT_TABCLOSED, NULL, NULL, FALSE, curbuf);
|
||||
#endif
|
||||
|
||||
redraw_tabline = TRUE;
|
||||
if (h != tabline_height())
|
||||
shell_new_rows();
|
||||
@@ -7523,7 +7544,7 @@ ex_hide(exarg_T *eap)
|
||||
int winnr = 0;
|
||||
win_T *win;
|
||||
|
||||
for (win = firstwin; win != NULL; win = win->w_next)
|
||||
FOR_ALL_WINDOWS(win)
|
||||
{
|
||||
winnr++;
|
||||
if (winnr == eap->line2)
|
||||
@@ -7697,11 +7718,7 @@ ex_shell(exarg_T *eap UNUSED)
|
||||
* list. This function takes over responsibility for freeing the list.
|
||||
*
|
||||
* XXX The list is made into the argument list. This is freed using
|
||||
* FreeWild(), which does a series of vim_free() calls, unless the two defines
|
||||
* __EMX__ and __ALWAYS_HAS_TRAILING_NUL_POINTER are set. In this case, a
|
||||
* routine _fnexplodefree() is used. This may cause problems, but as the drop
|
||||
* file functionality is (currently) not in EMX this is not presently a
|
||||
* problem.
|
||||
* FreeWild(), which does a series of vim_free() calls.
|
||||
*/
|
||||
void
|
||||
handle_drop(
|
||||
@@ -7835,7 +7852,7 @@ alist_new(void)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if (!defined(UNIX) && !defined(__EMX__)) || defined(PROTO)
|
||||
#if !defined(UNIX) || defined(PROTO)
|
||||
/*
|
||||
* Expand the file names in the global argument list.
|
||||
* If "fnum_list" is not NULL, use "fnum_list[fnum_len]" as a list of buffer
|
||||
@@ -8673,7 +8690,7 @@ ex_syncbind(exarg_T *eap UNUSED)
|
||||
if (curwin->w_p_scb)
|
||||
{
|
||||
topline = curwin->w_topline;
|
||||
for (wp = firstwin; wp; wp = wp->w_next)
|
||||
FOR_ALL_WINDOWS(wp)
|
||||
{
|
||||
if (wp->w_p_scb && wp->w_buffer)
|
||||
{
|
||||
@@ -8694,7 +8711,7 @@ ex_syncbind(exarg_T *eap UNUSED)
|
||||
/*
|
||||
* Set all scrollbind windows to the same topline.
|
||||
*/
|
||||
for (curwin = firstwin; curwin; curwin = curwin->w_next)
|
||||
FOR_ALL_WINDOWS(curwin)
|
||||
{
|
||||
if (curwin->w_p_scb)
|
||||
{
|
||||
@@ -9454,6 +9471,14 @@ ex_redir(exarg_T *eap)
|
||||
char_u *fname;
|
||||
char_u *arg = eap->arg;
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
if (redir_execute)
|
||||
{
|
||||
EMSG(_("E930: Cannot use :redir inside execute()"));
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (STRICMP(eap->arg, "END") == 0)
|
||||
close_redir();
|
||||
else
|
||||
@@ -10936,7 +10961,7 @@ makeopens(
|
||||
return FAIL;
|
||||
|
||||
/* Now put the other buffers into the buffer list */
|
||||
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
|
||||
FOR_ALL_BUFFERS(buf)
|
||||
{
|
||||
if (!(only_save_windows && buf->b_nwindows == 0)
|
||||
&& !(buf->b_help && !(ssop_flags & SSOP_HELP))
|
||||
|
||||
@@ -1666,7 +1666,7 @@ getcmdline(
|
||||
case Ctrl__: /* CTRL-_: switch language mode */
|
||||
if (!p_ari)
|
||||
break;
|
||||
#ifdef FEAT_FKMAP
|
||||
# ifdef FEAT_FKMAP
|
||||
if (p_altkeymap)
|
||||
{
|
||||
cmd_fkmap = !cmd_fkmap;
|
||||
@@ -1674,7 +1674,7 @@ getcmdline(
|
||||
ccline.overstrike = FALSE;
|
||||
}
|
||||
else /* Hebrew is default */
|
||||
#endif
|
||||
# endif
|
||||
cmd_hkmap = !cmd_hkmap;
|
||||
goto cmdline_not_changed;
|
||||
#endif
|
||||
@@ -6005,7 +6005,7 @@ get_list_range(char_u **str, int *num1, int *num2)
|
||||
{
|
||||
int len;
|
||||
int first = FALSE;
|
||||
long num;
|
||||
varnumber_T num;
|
||||
|
||||
*str = skipwhite(*str);
|
||||
if (**str == '-' || vim_isdigit(**str)) /* parse "from" part of range */
|
||||
@@ -6318,6 +6318,8 @@ handle_viminfo_history(
|
||||
len = vp[3].bv_len;
|
||||
p = lalloc(len + 2, TRUE);
|
||||
}
|
||||
else
|
||||
len = 0; /* for picky compilers */
|
||||
if (p != NULL)
|
||||
{
|
||||
viminfo_history[type][idx].time_set = vp[1].bv_nr;
|
||||
@@ -6448,7 +6450,7 @@ merge_history(int type)
|
||||
else
|
||||
clear_hist_entry(&new_hist[i]);
|
||||
}
|
||||
hisidx[type] = len - 1;
|
||||
hisidx[type] = (i < len ? i : len) - 1;
|
||||
|
||||
/* Free what is not kept. */
|
||||
for (i = 0; i < viminfo_hisidx[type]; i++)
|
||||
@@ -6653,9 +6655,9 @@ cmd_gchar(int offset)
|
||||
ex_window(void)
|
||||
{
|
||||
struct cmdline_info save_ccline;
|
||||
buf_T *old_curbuf = curbuf;
|
||||
bufref_T old_curbuf;
|
||||
win_T *old_curwin = curwin;
|
||||
buf_T *bp;
|
||||
bufref_T bufref;
|
||||
win_T *wp;
|
||||
int i;
|
||||
linenr_T lnum;
|
||||
@@ -6684,6 +6686,7 @@ ex_window(void)
|
||||
beep_flush();
|
||||
return K_IGNORE;
|
||||
}
|
||||
set_bufref(&old_curbuf, curbuf);
|
||||
|
||||
/* Save current window sizes. */
|
||||
win_size_save(&winsizes);
|
||||
@@ -6830,7 +6833,7 @@ ex_window(void)
|
||||
|
||||
/* Safety check: The old window or buffer was deleted: It's a bug when
|
||||
* this happens! */
|
||||
if (!win_valid(old_curwin) || !buf_valid(old_curbuf))
|
||||
if (!win_valid(old_curwin) || !bufref_valid(&old_curbuf))
|
||||
{
|
||||
cmdwin_result = Ctrl_C;
|
||||
EMSG(_("E199: Active window or buffer deleted"));
|
||||
@@ -6901,14 +6904,14 @@ ex_window(void)
|
||||
curwin->w_p_cole = 0;
|
||||
# endif
|
||||
wp = curwin;
|
||||
bp = curbuf;
|
||||
set_bufref(&bufref, curbuf);
|
||||
win_goto(old_curwin);
|
||||
win_close(wp, TRUE);
|
||||
|
||||
/* win_close() may have already wiped the buffer when 'bh' is
|
||||
* set to 'wipe' */
|
||||
if (buf_valid(bp))
|
||||
close_buffer(NULL, bp, DOBUF_WIPE, FALSE);
|
||||
if (bufref_valid(&bufref))
|
||||
close_buffer(NULL, bufref.br_buf, DOBUF_WIPE, FALSE);
|
||||
|
||||
/* Restore window sizes. */
|
||||
win_size_restore(&winsizes);
|
||||
|
||||
477
src/farsi.c
477
src/farsi.c
@@ -9,10 +9,12 @@
|
||||
|
||||
/*
|
||||
* farsi.c: functions for Farsi language
|
||||
*
|
||||
* Included by main.c, when FEAT_FKMAP is defined.
|
||||
*/
|
||||
|
||||
#include "vim.h"
|
||||
|
||||
#if defined(FEAT_FKMAP) || defined(PROTO)
|
||||
|
||||
static int toF_Xor_X_(int c);
|
||||
static int F_is_TyE(int c);
|
||||
static int F_is_TyC_TyD(int c);
|
||||
@@ -35,7 +37,7 @@ static int toF_ending(int c);
|
||||
static void lrswapbuf(char_u *buf, int len);
|
||||
|
||||
/*
|
||||
** Convert the given Farsi character into a _X or _X_ type
|
||||
* Convert the given Farsi character into a _X or _X_ type
|
||||
*/
|
||||
static int
|
||||
toF_Xor_X_(int c)
|
||||
@@ -44,61 +46,35 @@ toF_Xor_X_(int c)
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case BE:
|
||||
return _BE;
|
||||
case PE:
|
||||
return _PE;
|
||||
case TE:
|
||||
return _TE;
|
||||
case SE:
|
||||
return _SE;
|
||||
case JIM:
|
||||
return _JIM;
|
||||
case CHE:
|
||||
return _CHE;
|
||||
case HE_J:
|
||||
return _HE_J;
|
||||
case XE:
|
||||
return _XE;
|
||||
case SIN:
|
||||
return _SIN;
|
||||
case SHIN:
|
||||
return _SHIN;
|
||||
case SAD:
|
||||
return _SAD;
|
||||
case ZAD:
|
||||
return _ZAD;
|
||||
case AYN:
|
||||
return _AYN;
|
||||
case AYN_:
|
||||
return _AYN_;
|
||||
case GHAYN:
|
||||
return _GHAYN;
|
||||
case GHAYN_:
|
||||
return _GHAYN_;
|
||||
case FE:
|
||||
return _FE;
|
||||
case GHAF:
|
||||
return _GHAF;
|
||||
case KAF:
|
||||
return _KAF;
|
||||
case GAF:
|
||||
return _GAF;
|
||||
case LAM:
|
||||
return _LAM;
|
||||
case MIM:
|
||||
return _MIM;
|
||||
case NOON:
|
||||
return _NOON;
|
||||
case BE: return _BE;
|
||||
case PE: return _PE;
|
||||
case TE: return _TE;
|
||||
case SE: return _SE;
|
||||
case JIM: return _JIM;
|
||||
case CHE: return _CHE;
|
||||
case HE_J: return _HE_J;
|
||||
case XE: return _XE;
|
||||
case SIN: return _SIN;
|
||||
case SHIN: return _SHIN;
|
||||
case SAD: return _SAD;
|
||||
case ZAD: return _ZAD;
|
||||
case AYN: return _AYN;
|
||||
case AYN_: return _AYN_;
|
||||
case GHAYN: return _GHAYN;
|
||||
case GHAYN_: return _GHAYN_;
|
||||
case FE: return _FE;
|
||||
case GHAF: return _GHAF;
|
||||
case KAF: return _KAF;
|
||||
case GAF: return _GAF;
|
||||
case LAM: return _LAM;
|
||||
case MIM: return _MIM;
|
||||
case NOON: return _NOON;
|
||||
case YE:
|
||||
case YE_:
|
||||
return _YE;
|
||||
case YE_: return _YE;
|
||||
case YEE:
|
||||
case YEE_:
|
||||
return _YEE;
|
||||
case YEE_: return _YEE;
|
||||
case IE:
|
||||
case IE_:
|
||||
return _IE;
|
||||
case IE_: return _IE;
|
||||
case F_HE:
|
||||
tempc = _HE;
|
||||
|
||||
@@ -128,86 +104,58 @@ toF_Xor_X_(int c)
|
||||
}
|
||||
|
||||
/*
|
||||
** Convert the given Farsi character into Farsi capital character .
|
||||
* Convert the given Farsi character into Farsi capital character.
|
||||
*/
|
||||
int
|
||||
toF_TyA(int c )
|
||||
static int
|
||||
toF_TyA(int c)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case ALEF_:
|
||||
return ALEF;
|
||||
case ALEF_U_H_:
|
||||
return ALEF_U_H;
|
||||
case _BE:
|
||||
return BE;
|
||||
case _PE:
|
||||
return PE;
|
||||
case _TE:
|
||||
return TE;
|
||||
case _SE:
|
||||
return SE;
|
||||
case _JIM:
|
||||
return JIM;
|
||||
case _CHE:
|
||||
return CHE;
|
||||
case _HE_J:
|
||||
return HE_J;
|
||||
case _XE:
|
||||
return XE;
|
||||
case _SIN:
|
||||
return SIN;
|
||||
case _SHIN:
|
||||
return SHIN;
|
||||
case _SAD:
|
||||
return SAD;
|
||||
case _ZAD:
|
||||
return ZAD;
|
||||
case ALEF_: return ALEF;
|
||||
case ALEF_U_H_: return ALEF_U_H;
|
||||
case _BE: return BE;
|
||||
case _PE: return PE;
|
||||
case _TE: return TE;
|
||||
case _SE: return SE;
|
||||
case _JIM: return JIM;
|
||||
case _CHE: return CHE;
|
||||
case _HE_J: return HE_J;
|
||||
case _XE: return XE;
|
||||
case _SIN: return SIN;
|
||||
case _SHIN: return SHIN;
|
||||
case _SAD: return SAD;
|
||||
case _ZAD: return ZAD;
|
||||
case _AYN:
|
||||
case AYN_:
|
||||
case _AYN_:
|
||||
return AYN;
|
||||
case _AYN_: return AYN;
|
||||
case _GHAYN:
|
||||
case GHAYN_:
|
||||
case _GHAYN_:
|
||||
return GHAYN;
|
||||
case _FE:
|
||||
return FE;
|
||||
case _GHAF:
|
||||
return GHAF;
|
||||
/* I am not sure what it is !!! case _KAF_H: */
|
||||
case _KAF:
|
||||
return KAF;
|
||||
case _GAF:
|
||||
return GAF;
|
||||
case _LAM:
|
||||
return LAM;
|
||||
case _MIM:
|
||||
return MIM;
|
||||
case _NOON:
|
||||
return NOON;
|
||||
case _GHAYN_: return GHAYN;
|
||||
case _FE: return FE;
|
||||
case _GHAF: return GHAF;
|
||||
/* I am not sure what it is !!! case _KAF_H: */
|
||||
case _KAF: return KAF;
|
||||
case _GAF: return GAF;
|
||||
case _LAM: return LAM;
|
||||
case _MIM: return MIM;
|
||||
case _NOON: return NOON;
|
||||
case _YE:
|
||||
case YE_:
|
||||
return YE;
|
||||
case YE_: return YE;
|
||||
case _YEE:
|
||||
case YEE_:
|
||||
return YEE;
|
||||
case TEE_:
|
||||
return TEE;
|
||||
case YEE_: return YEE;
|
||||
case TEE_: return TEE;
|
||||
case _IE:
|
||||
case IE_:
|
||||
return IE;
|
||||
case IE_: return IE;
|
||||
case _HE:
|
||||
case _HE_:
|
||||
return F_HE;
|
||||
case _HE_: return F_HE;
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
/*
|
||||
** Is the character under the cursor+offset in the given buffer a join type.
|
||||
** That is a character that is combined with the others.
|
||||
** Note: the offset is used only for command line buffer.
|
||||
* Is the character under the cursor+offset in the given buffer a join type.
|
||||
* That is a character that is combined with the others.
|
||||
* Note: the offset is used only for command line buffer.
|
||||
*/
|
||||
static int
|
||||
F_is_TyB_TyC_TyD(int src, int offset)
|
||||
@@ -258,7 +206,7 @@ F_is_TyB_TyC_TyD(int src, int offset)
|
||||
}
|
||||
|
||||
/*
|
||||
** Is the Farsi character one of the terminating only type.
|
||||
* Is the Farsi character one of the terminating only type.
|
||||
*/
|
||||
static int
|
||||
F_is_TyE(int c)
|
||||
@@ -281,7 +229,7 @@ F_is_TyE(int c)
|
||||
}
|
||||
|
||||
/*
|
||||
** Is the Farsi character one of the none leading type.
|
||||
* Is the Farsi character one of the none leading type.
|
||||
*/
|
||||
static int
|
||||
F_is_TyC_TyD(int c)
|
||||
@@ -305,7 +253,7 @@ F_is_TyC_TyD(int c)
|
||||
}
|
||||
|
||||
/*
|
||||
** Convert a none leading Farsi char into a leading type.
|
||||
* Convert a none leading Farsi char into a leading type.
|
||||
*/
|
||||
static int
|
||||
toF_TyB(int c)
|
||||
@@ -313,7 +261,7 @@ toF_TyB(int c)
|
||||
switch (c)
|
||||
{
|
||||
case ALEF_: return ALEF;
|
||||
case ALEF_U_H_: return ALEF_U_H;
|
||||
case ALEF_U_H_: return ALEF_U_H;
|
||||
case _AYN_: return _AYN;
|
||||
case AYN_: return AYN; /* exception - there are many of them */
|
||||
case _GHAYN_: return _GHAYN;
|
||||
@@ -328,7 +276,7 @@ toF_TyB(int c)
|
||||
}
|
||||
|
||||
/*
|
||||
** Overwrite the current redo and cursor characters + left adjust
|
||||
* Overwrite the current redo and cursor characters + left adjust.
|
||||
*/
|
||||
static void
|
||||
put_curr_and_l_to_X(int c)
|
||||
@@ -373,7 +321,7 @@ put_and_redo(int c)
|
||||
}
|
||||
|
||||
/*
|
||||
** Change the char. under the cursor to a X_ or X type
|
||||
* Change the char. under the cursor to a X_ or X type
|
||||
*/
|
||||
static void
|
||||
chg_c_toX_orX(void)
|
||||
@@ -497,7 +445,7 @@ chg_c_toX_orX(void)
|
||||
}
|
||||
|
||||
/*
|
||||
** Change the char. under the cursor to a _X_ or X_ type
|
||||
* Change the char. under the cursor to a _X_ or X_ type
|
||||
*/
|
||||
|
||||
static void
|
||||
@@ -549,7 +497,7 @@ chg_c_to_X_orX_(void)
|
||||
}
|
||||
|
||||
/*
|
||||
** Change the char. under the cursor to a _X_ or _X type
|
||||
* Change the char. under the cursor to a _X_ or _X type
|
||||
*/
|
||||
static void
|
||||
chg_c_to_X_or_X (void)
|
||||
@@ -580,10 +528,10 @@ chg_c_to_X_or_X (void)
|
||||
}
|
||||
|
||||
/*
|
||||
** Change the character left to the cursor to a _X_ or X_ type
|
||||
* Change the character left to the cursor to a _X_ or X_ type
|
||||
*/
|
||||
static void
|
||||
chg_l_to_X_orX_ (void)
|
||||
chg_l_to_X_orX_(void)
|
||||
{
|
||||
int tempc;
|
||||
|
||||
@@ -648,7 +596,7 @@ chg_l_to_X_orX_ (void)
|
||||
}
|
||||
|
||||
/*
|
||||
** Change the character left to the cursor to a X or _X type
|
||||
* Change the character left to the cursor to a X or _X type
|
||||
*/
|
||||
|
||||
static void
|
||||
@@ -717,7 +665,7 @@ chg_l_toXor_X (void)
|
||||
}
|
||||
|
||||
/*
|
||||
** Change the character right to the cursor to a _X or _X_ type
|
||||
* Change the character right to the cursor to a _X or _X_ type
|
||||
*/
|
||||
|
||||
static void
|
||||
@@ -742,7 +690,7 @@ chg_r_to_Xor_X_(void)
|
||||
}
|
||||
|
||||
/*
|
||||
** Map Farsi keyboard when in fkmap mode.
|
||||
* Map Farsi keyboard when in fkmap mode.
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -899,8 +847,8 @@ fkmap(int c)
|
||||
if (p_ri && c == NL && curwin->w_cursor.col)
|
||||
{
|
||||
/*
|
||||
** If the char before the cursor is _X_ or X_ do not change
|
||||
** the one under the cursor with X type.
|
||||
* If the char before the cursor is _X_ or X_ do not change
|
||||
* the one under the cursor with X type.
|
||||
*/
|
||||
|
||||
dec_cursor();
|
||||
@@ -914,8 +862,7 @@ fkmap(int c)
|
||||
inc_cursor();
|
||||
}
|
||||
|
||||
if (!p_ri)
|
||||
if (!curwin->w_cursor.col)
|
||||
if (!p_ri && !curwin->w_cursor.col)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
@@ -1154,43 +1101,42 @@ fkmap(int c)
|
||||
|
||||
case 'a':
|
||||
tempc = _SHIN;
|
||||
break;
|
||||
break;
|
||||
case 'A':
|
||||
tempc = WAW_H;
|
||||
break;
|
||||
break;
|
||||
case 'b':
|
||||
tempc = ZAL;
|
||||
break;
|
||||
break;
|
||||
case 'c':
|
||||
tempc = ZE;
|
||||
break;
|
||||
break;
|
||||
case 'C':
|
||||
tempc = JE;
|
||||
break;
|
||||
break;
|
||||
case 'd':
|
||||
tempc = _YE;
|
||||
break;
|
||||
break;
|
||||
case 'D':
|
||||
tempc = _YEE;
|
||||
break;
|
||||
break;
|
||||
case 'e':
|
||||
tempc = _SE;
|
||||
break;
|
||||
break;
|
||||
case 'f':
|
||||
tempc = _BE;
|
||||
break;
|
||||
break;
|
||||
case 'g':
|
||||
tempc = _LAM;
|
||||
break;
|
||||
break;
|
||||
case 'G':
|
||||
if (!curwin->w_cursor.col && STRLEN(ml_get_curline()))
|
||||
{
|
||||
{
|
||||
|
||||
if (gchar_cursor() == _LAM)
|
||||
chg_c_toX_orX ();
|
||||
else
|
||||
if (p_ri)
|
||||
chg_c_to_X_or_X ();
|
||||
else if (p_ri)
|
||||
chg_c_to_X_or_X ();
|
||||
}
|
||||
|
||||
if (!p_ri)
|
||||
@@ -1204,16 +1150,15 @@ fkmap(int c)
|
||||
{
|
||||
chg_c_toX_orX ();
|
||||
chg_l_toXor_X ();
|
||||
tempc = ALEF_U_H;
|
||||
tempc = ALEF_U_H;
|
||||
}
|
||||
else if (F_is_TyB_TyC_TyD(SRC_EDT, AT_CURSOR))
|
||||
{
|
||||
tempc = ALEF_U_H_;
|
||||
chg_l_toXor_X ();
|
||||
}
|
||||
else
|
||||
if (F_is_TyB_TyC_TyD(SRC_EDT, AT_CURSOR))
|
||||
{
|
||||
tempc = ALEF_U_H_;
|
||||
chg_l_toXor_X ();
|
||||
}
|
||||
else
|
||||
tempc = ALEF_U_H;
|
||||
tempc = ALEF_U_H;
|
||||
|
||||
if (!p_ri)
|
||||
inc_cursor();
|
||||
@@ -1249,11 +1194,11 @@ fkmap(int c)
|
||||
{
|
||||
if (F_is_TyB_TyC_TyD(SRC_EDT, AT_CURSOR))
|
||||
{
|
||||
tempc = ALEF_;
|
||||
tempc = ALEF_;
|
||||
chg_l_toXor_X ();
|
||||
}
|
||||
else
|
||||
tempc = ALEF;
|
||||
tempc = ALEF;
|
||||
}
|
||||
|
||||
if (!p_ri)
|
||||
@@ -1261,8 +1206,8 @@ fkmap(int c)
|
||||
|
||||
return tempc;
|
||||
case 'i':
|
||||
if (!curwin->w_cursor.col && STRLEN(ml_get_curline()))
|
||||
{
|
||||
if (!curwin->w_cursor.col && STRLEN(ml_get_curline()))
|
||||
{
|
||||
if (!p_ri && !F_is_TyE(tempc))
|
||||
chg_c_to_X_orX_ ();
|
||||
if (p_ri)
|
||||
@@ -1277,9 +1222,9 @@ fkmap(int c)
|
||||
dec_cursor();
|
||||
|
||||
if (F_is_TyB_TyC_TyD(SRC_EDT, AT_CURSOR))
|
||||
tempc = _HE_;
|
||||
tempc = _HE_;
|
||||
else
|
||||
tempc = _HE;
|
||||
tempc = _HE;
|
||||
|
||||
if (!p_ri)
|
||||
inc_cursor();
|
||||
@@ -1289,7 +1234,7 @@ fkmap(int c)
|
||||
break;
|
||||
case 'J':
|
||||
if (!curwin->w_cursor.col && STRLEN(ml_get_curline()))
|
||||
{
|
||||
{
|
||||
if (p_ri)
|
||||
chg_c_to_X_or_X ();
|
||||
|
||||
@@ -1304,11 +1249,11 @@ fkmap(int c)
|
||||
|
||||
if (F_is_TyB_TyC_TyD(SRC_EDT, AT_CURSOR))
|
||||
{
|
||||
tempc = TEE_;
|
||||
tempc = TEE_;
|
||||
chg_l_toXor_X ();
|
||||
}
|
||||
else
|
||||
tempc = TEE;
|
||||
tempc = TEE;
|
||||
|
||||
if (!p_ri)
|
||||
inc_cursor();
|
||||
@@ -1385,7 +1330,7 @@ fkmap(int c)
|
||||
break;
|
||||
case 'y':
|
||||
if (!curwin->w_cursor.col && STRLEN(ml_get_curline()))
|
||||
{
|
||||
{
|
||||
if (!p_ri && !F_is_TyE(tempc))
|
||||
chg_c_to_X_orX_ ();
|
||||
if (p_ri)
|
||||
@@ -1434,7 +1379,7 @@ fkmap(int c)
|
||||
if ((F_isalpha(tempc) || F_isdigit(tempc)))
|
||||
{
|
||||
if (!curwin->w_cursor.col && STRLEN(ml_get_curline()))
|
||||
{
|
||||
{
|
||||
if (!p_ri && !F_is_TyE(tempc))
|
||||
chg_c_to_X_orX_ ();
|
||||
if (p_ri)
|
||||
@@ -1461,7 +1406,7 @@ fkmap(int c)
|
||||
}
|
||||
|
||||
/*
|
||||
** Convert a none leading Farsi char into a leading type.
|
||||
* Convert a none leading Farsi char into a leading type.
|
||||
*/
|
||||
static int
|
||||
toF_leading(int c)
|
||||
@@ -1515,7 +1460,7 @@ toF_leading(int c)
|
||||
}
|
||||
|
||||
/*
|
||||
** Convert a given Farsi char into right joining type.
|
||||
* Convert a given Farsi char into right joining type.
|
||||
*/
|
||||
static int
|
||||
toF_Rjoin(int c)
|
||||
@@ -1571,7 +1516,7 @@ toF_Rjoin(int c)
|
||||
}
|
||||
|
||||
/*
|
||||
** Can a given Farsi character join via its left edj.
|
||||
* Can a given Farsi character join via its left edj.
|
||||
*/
|
||||
static int
|
||||
canF_Ljoin(int c)
|
||||
@@ -1645,7 +1590,7 @@ canF_Ljoin(int c)
|
||||
}
|
||||
|
||||
/*
|
||||
** Can a given Farsi character join via its right edj.
|
||||
* Can a given Farsi character join via its right edj.
|
||||
*/
|
||||
static int
|
||||
canF_Rjoin(int c)
|
||||
@@ -1673,7 +1618,7 @@ canF_Rjoin(int c)
|
||||
}
|
||||
|
||||
/*
|
||||
** is a given Farsi character a terminating type.
|
||||
* is a given Farsi character a terminating type.
|
||||
*/
|
||||
static int
|
||||
F_isterm(int c)
|
||||
@@ -1700,86 +1645,54 @@ F_isterm(int c)
|
||||
}
|
||||
|
||||
/*
|
||||
** Convert the given Farsi character into a ending type .
|
||||
* Convert the given Farsi character into a ending type .
|
||||
*/
|
||||
static int
|
||||
toF_ending(int c)
|
||||
{
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case _BE:
|
||||
return BE;
|
||||
case _PE:
|
||||
return PE;
|
||||
case _TE:
|
||||
return TE;
|
||||
case _SE:
|
||||
return SE;
|
||||
case _JIM:
|
||||
return JIM;
|
||||
case _CHE:
|
||||
return CHE;
|
||||
case _HE_J:
|
||||
return HE_J;
|
||||
case _XE:
|
||||
return XE;
|
||||
case _SIN:
|
||||
return SIN;
|
||||
case _SHIN:
|
||||
return SHIN;
|
||||
case _SAD:
|
||||
return SAD;
|
||||
case _ZAD:
|
||||
return ZAD;
|
||||
case _AYN:
|
||||
return AYN;
|
||||
case _AYN_:
|
||||
return AYN_;
|
||||
case _GHAYN:
|
||||
return GHAYN;
|
||||
case _GHAYN_:
|
||||
return GHAYN_;
|
||||
case _FE:
|
||||
return FE;
|
||||
case _GHAF:
|
||||
return GHAF;
|
||||
case _BE: return BE;
|
||||
case _PE: return PE;
|
||||
case _TE: return TE;
|
||||
case _SE: return SE;
|
||||
case _JIM: return JIM;
|
||||
case _CHE: return CHE;
|
||||
case _HE_J: return HE_J;
|
||||
case _XE: return XE;
|
||||
case _SIN: return SIN;
|
||||
case _SHIN: return SHIN;
|
||||
case _SAD: return SAD;
|
||||
case _ZAD: return ZAD;
|
||||
case _AYN: return AYN;
|
||||
case _AYN_: return AYN_;
|
||||
case _GHAYN: return GHAYN;
|
||||
case _GHAYN_: return GHAYN_;
|
||||
case _FE: return FE;
|
||||
case _GHAF: return GHAF;
|
||||
case _KAF_H:
|
||||
case _KAF:
|
||||
return KAF;
|
||||
case _GAF:
|
||||
return GAF;
|
||||
case _LAM:
|
||||
return LAM;
|
||||
case _MIM:
|
||||
return MIM;
|
||||
case _NOON:
|
||||
return NOON;
|
||||
case _YE:
|
||||
return YE_;
|
||||
case YE_:
|
||||
return YE;
|
||||
case _YEE:
|
||||
return YEE_;
|
||||
case YEE_:
|
||||
return YEE;
|
||||
case TEE:
|
||||
return TEE_;
|
||||
case _IE:
|
||||
return IE_;
|
||||
case IE_:
|
||||
return IE;
|
||||
case _KAF: return KAF;
|
||||
case _GAF: return GAF;
|
||||
case _LAM: return LAM;
|
||||
case _MIM: return MIM;
|
||||
case _NOON: return NOON;
|
||||
case _YE: return YE_;
|
||||
case YE_: return YE;
|
||||
case _YEE: return YEE_;
|
||||
case YEE_: return YEE;
|
||||
case TEE: return TEE_;
|
||||
case _IE: return IE_;
|
||||
case IE_: return IE;
|
||||
case _HE:
|
||||
case _HE_:
|
||||
return F_HE;
|
||||
case _HE_: return F_HE;
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
/*
|
||||
** Convert the Farsi 3342 standard into Farsi VIM.
|
||||
* Convert the Farsi 3342 standard into Farsi VIM.
|
||||
*/
|
||||
void
|
||||
static void
|
||||
conv_to_pvim(void)
|
||||
{
|
||||
char_u *ptr;
|
||||
@@ -1791,7 +1704,7 @@ conv_to_pvim(void)
|
||||
|
||||
llen = (int)STRLEN(ptr);
|
||||
|
||||
for ( i = 0; i < llen-1; i++)
|
||||
for (i = 0; i < llen-1; i++)
|
||||
{
|
||||
if (canF_Ljoin(ptr[i]) && canF_Rjoin(ptr[i+1]))
|
||||
{
|
||||
@@ -1817,8 +1730,8 @@ conv_to_pvim(void)
|
||||
* Following lines contains Farsi encoded character.
|
||||
*/
|
||||
|
||||
do_cmdline_cmd((char_u *)"%s/\202\231/\232/g");
|
||||
do_cmdline_cmd((char_u *)"%s/\201\231/\370\334/g");
|
||||
do_cmdline_cmd((char_u *)"%s/\202\231/\232/ge");
|
||||
do_cmdline_cmd((char_u *)"%s/\201\231/\370\334/ge");
|
||||
|
||||
/* Assume the screen has been messed up: clear it and redraw. */
|
||||
redraw_later(CLEAR);
|
||||
@@ -1828,7 +1741,7 @@ conv_to_pvim(void)
|
||||
/*
|
||||
* Convert the Farsi VIM into Farsi 3342 standard.
|
||||
*/
|
||||
void
|
||||
static void
|
||||
conv_to_pstd(void)
|
||||
{
|
||||
char_u *ptr;
|
||||
@@ -1837,20 +1750,15 @@ conv_to_pstd(void)
|
||||
/*
|
||||
* Following line contains Farsi encoded character.
|
||||
*/
|
||||
|
||||
do_cmdline_cmd((char_u *)"%s/\232/\202\231/g");
|
||||
do_cmdline_cmd((char_u *)"%s/\232/\202\231/ge");
|
||||
|
||||
for (lnum = 1; lnum <= curbuf->b_ml.ml_line_count; ++lnum)
|
||||
{
|
||||
ptr = ml_get((linenr_T)lnum);
|
||||
|
||||
llen = (int)STRLEN(ptr);
|
||||
|
||||
for ( i = 0; i < llen; i++)
|
||||
{
|
||||
for (i = 0; i < llen; i++)
|
||||
ptr[i] = toF_TyA(ptr[i]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* Assume the screen has been messed up: clear it and redraw. */
|
||||
@@ -2148,7 +2056,7 @@ cmdl_fkmap(int c)
|
||||
case 'f': return _BE;
|
||||
case 'g': return _LAM;
|
||||
case 'G':
|
||||
if (cmd_gchar(AT_CURSOR) == _LAM )
|
||||
if (cmd_gchar(AT_CURSOR) == _LAM)
|
||||
{
|
||||
cmd_pchar(LAM, AT_CURSOR);
|
||||
return ALEF_U_H;
|
||||
@@ -2159,7 +2067,7 @@ cmdl_fkmap(int c)
|
||||
else
|
||||
return ALEF_U_H;
|
||||
case 'h':
|
||||
if (cmd_gchar(AT_CURSOR) == _LAM )
|
||||
if (cmd_gchar(AT_CURSOR) == _LAM)
|
||||
{
|
||||
cmd_pchar(LA, AT_CURSOR);
|
||||
redrawcmdline();
|
||||
@@ -2215,9 +2123,9 @@ cmdl_fkmap(int c)
|
||||
case ',': return WAW;
|
||||
case '[': return _JIM;
|
||||
case ']': return _CHE;
|
||||
}
|
||||
}
|
||||
|
||||
return c;
|
||||
return c;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2226,7 +2134,7 @@ cmdl_fkmap(int c)
|
||||
int
|
||||
F_isalpha(int c)
|
||||
{
|
||||
return (( c >= TEE_ && c <= _YE)
|
||||
return ((c >= TEE_ && c <= _YE)
|
||||
|| (c >= ALEF_A && c <= YE)
|
||||
|| (c >= _IE && c <= YE_));
|
||||
}
|
||||
@@ -2246,45 +2154,42 @@ F_isdigit(int c)
|
||||
int
|
||||
F_ischar(int c)
|
||||
{
|
||||
return (c >= TEE_ && c <= YE_);
|
||||
return (c >= TEE_ && c <= YE_);
|
||||
}
|
||||
|
||||
void
|
||||
farsi_fkey(
|
||||
cmdarg_T *cap)
|
||||
farsi_f8(cmdarg_T *cap UNUSED)
|
||||
{
|
||||
int c = cap->cmdchar;
|
||||
|
||||
if (c == K_F8)
|
||||
if (p_altkeymap)
|
||||
{
|
||||
if (p_altkeymap)
|
||||
if (curwin->w_farsi & W_R_L)
|
||||
{
|
||||
if (curwin->w_farsi & W_R_L)
|
||||
{
|
||||
p_fkmap = 0;
|
||||
do_cmdline_cmd((char_u *)"set norl");
|
||||
MSG("");
|
||||
}
|
||||
else
|
||||
{
|
||||
p_fkmap = 1;
|
||||
do_cmdline_cmd((char_u *)"set rl");
|
||||
MSG("");
|
||||
}
|
||||
|
||||
curwin->w_farsi = curwin->w_farsi ^ W_R_L;
|
||||
p_fkmap = 0;
|
||||
do_cmdline_cmd((char_u *)"set norl");
|
||||
MSG("");
|
||||
}
|
||||
}
|
||||
|
||||
if (c == K_F9)
|
||||
{
|
||||
if (p_altkeymap && curwin->w_p_rl)
|
||||
else
|
||||
{
|
||||
curwin->w_farsi = curwin->w_farsi ^ W_CONV;
|
||||
if (curwin->w_farsi & W_CONV)
|
||||
conv_to_pvim();
|
||||
else
|
||||
conv_to_pstd();
|
||||
p_fkmap = 1;
|
||||
do_cmdline_cmd((char_u *)"set rl");
|
||||
MSG("");
|
||||
}
|
||||
|
||||
curwin->w_farsi = curwin->w_farsi ^ W_R_L;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
farsi_f9(cmdarg_T *cap UNUSED)
|
||||
{
|
||||
if (p_altkeymap && curwin->w_p_rl)
|
||||
{
|
||||
curwin->w_farsi = curwin->w_farsi ^ W_CONV;
|
||||
if (curwin->w_farsi & W_CONV)
|
||||
conv_to_pvim();
|
||||
else
|
||||
conv_to_pstd();
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* FEAT_FKMAP */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user