mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-02 11:19:22 +02:00
Compare commits
165 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ef743adcc1 | |||
| 7b125feed1 | |||
| e67d546f3c | |||
| 818078ddfb | |||
| 73d4e4c892 | |||
| 3056735ae8 | |||
| 9f8187c335 | |||
| ffdf08c94e | |||
| 821179809d | |||
| e17bdffff7 | |||
| 1195669f9e | |||
| 44ca54aeb9 | |||
| 9992237a3e | |||
| 76efafba2a | |||
| 2b529bb626 | |||
| 2f9bb2a226 | |||
| be7c0123e6 | |||
| d29459baa6 | |||
| 2570957607 | |||
| 7df0f6313a | |||
| e4a3bcf28d | |||
| dd74ab9b46 | |||
| 4d6f32cbfb | |||
| f1f0792e55 | |||
| 9f28953f0c | |||
| db249f26ed | |||
| ec42059b78 | |||
| 54b6352c6f | |||
| c2a58d5855 | |||
| 5b5a28c1ab | |||
| 78c7e274f2 | |||
| 424d74bb20 | |||
| 5b9f4455bf | |||
| 015efc32c1 | |||
| 5b30291785 | |||
| ba2099034f | |||
| 358308dd99 | |||
| b9a41370cf | |||
| 0e3e555cae | |||
| 2f31b6167c | |||
| 0a001725b6 | |||
| 25bc16eeb3 | |||
| 2ce1dbd777 | |||
| 1b4fddf63f | |||
| b58fe4588c | |||
| d6f2ee32dc | |||
| 77401add71 | |||
| 7b668e83d0 | |||
| c20131f0f8 | |||
| 247f8a5b5d | |||
| 2b0affaf2e | |||
| 1b58cdd160 | |||
| 17f1347b86 | |||
| 973365dcc4 | |||
| f267f8bdf7 | |||
| ab44a4c717 | |||
| 9baf297c99 | |||
| de7762a2c1 | |||
| 9b7f8ce9eb | |||
| 920694c1b6 | |||
| 989f592f7f | |||
| dd1248143e | |||
| 843b884461 | |||
| 54d43879bc | |||
| 854c1d8007 | |||
| a25feb981a | |||
| e07e797db0 | |||
| e11d61a3b1 | |||
| 66e29d7112 | |||
| f04507d132 | |||
| b97a43f27d | |||
| 61c3cf2197 | |||
| c2ff332dca | |||
| f9971749e5 | |||
| 8f76c0010f | |||
| 9e4d8215d3 | |||
| 7571d55f7d | |||
| 1381d79147 | |||
| 3392883770 | |||
| d618f0bb08 | |||
| 0de29e30dc | |||
| cf3c9283b0 | |||
| c617acfc46 | |||
| fa52c6497a | |||
| bfd096d020 | |||
| af9c4c9b57 | |||
| d3c907b5d2 | |||
| 7f4c26a9eb | |||
| 6bff02eb53 | |||
| 91984b9034 | |||
| e5a8f35b42 | |||
| f5a39447a8 | |||
| 13d216d302 | |||
| dc1f1645cb | |||
| 4f416e4124 | |||
| 22177f0c08 | |||
| 386600f0cb | |||
| 16350cb979 | |||
| 58b853460a | |||
| e59215c7dc | |||
| e56132bb41 | |||
| cff50f5ec9 | |||
| 35a4cfa200 | |||
| 2d1a248762 | |||
| d58b0f982a | |||
| 4ae209597c | |||
| e9d58a6459 | |||
| 0952131376 | |||
| b5ae48e9ff | |||
| ebcccad573 | |||
| b338483152 | |||
| 95ec9d6a6a | |||
| d823fa910c | |||
| 107abd2ca5 | |||
| 01c9e10e73 | |||
| 0e5d3a2940 | |||
| c257487035 | |||
| 50099467e9 | |||
| 24d6b9ae7d | |||
| 6480401b5c | |||
| b0501922f1 | |||
| 8df28f3029 | |||
| 91c5262b19 | |||
| bcc1dcc981 | |||
| 446a973ce3 | |||
| 717e196060 | |||
| a6b7a08ae0 | |||
| a357e44ccd | |||
| a1977aa8d2 | |||
| 8d7a68e9fa | |||
| 50fa8dd00c | |||
| f71d7b9ee5 | |||
| c9fb77c692 | |||
| 3a0c5e14c6 | |||
| 51073cf6d0 | |||
| 064b366275 | |||
| 7547a78446 | |||
| 36d1c0fef4 | |||
| 71dd9744cf | |||
| 7a9a5f4019 | |||
| 09de17536d | |||
| 2147746cf8 | |||
| fa4076a018 | |||
| a772ec5e91 | |||
| b73598e2f0 | |||
| e4a76ad0e7 | |||
| 3a93838339 | |||
| ba98bef191 | |||
| a8e691d449 | |||
| 812ad4f3a2 | |||
| c8ce615299 | |||
| 66dc68524d | |||
| 3321e9d8a3 | |||
| 472a0a880a | |||
| 00ff380295 | |||
| 8e97bd74b5 | |||
| 446cce6d53 | |||
| 5b4a3767f6 | |||
| c96a2f3b88 | |||
| 328604307b | |||
| 83b3c3d8a0 | |||
| 66459b7c98 | |||
| d76a0c15f8 | |||
| 7522f69821 | |||
| c6b93c1711 |
@@ -41,6 +41,8 @@ script:
|
||||
- rm -f result; $VIMCMD -g -f -c "redir>result" -c "py3 print(\"Test\")" -c "redir END" -c q; cat result; echo; grep -q -w Test result
|
||||
- rm -f result; $VIMCMD -g -f -c "redir>result" -c "ruby puts(\"Test\")" -c "redir END" -c q; cat result; echo; grep -q -w Test result
|
||||
- make test
|
||||
- make -C src/testdir clean
|
||||
- make -C src testgui
|
||||
|
||||
before_deploy:
|
||||
- make -C src macvim-dmg
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
Vim - the text editor - for Mac OS X
|
||||
|
||||
This is the official GitHub repository for MacVim, the macOS port of [vim](https://github.com/vim/vim). It is based on
|
||||
[Björn Winckler's repository](https://github.com/b4winckler/macvim), which was official until he stepped down as the
|
||||
maintainer of the port.
|
||||
|
||||
- MacVim homepage http://macvim-dev.github.io/macvim
|
||||
|
||||
- Vim README https://github.com/macvim-dev/macvim/blob/master/README_vim.md
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" The default vimrc file.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2016 Jul 29
|
||||
" Last change: 2016 Aug 21
|
||||
"
|
||||
" This is loaded if no vimrc file was found.
|
||||
" Except when Vim is run with "-u NONE" or "-C".
|
||||
@@ -25,6 +25,9 @@ set ruler " show the cursor position all the time
|
||||
set showcmd " display incomplete commands
|
||||
set wildmenu " display completion matches in a status line
|
||||
|
||||
set ttimeout " time out for key codes
|
||||
set ttimeoutlen=100 " wait up to 100ms after Esc for special key
|
||||
|
||||
" Show @@@ in the last line if it is truncated.
|
||||
set display=truncate
|
||||
|
||||
@@ -104,9 +107,9 @@ if !exists(":DiffOrig")
|
||||
\ | wincmd p | diffthis
|
||||
endif
|
||||
|
||||
if has('langmap') && exists('+langnoremap')
|
||||
if has('langmap') && exists('+langremap')
|
||||
" Prevent that the langmap option applies to characters that result from a
|
||||
" mapping. If unset (default), this may break plugins (but it's backward
|
||||
" mapping. If set (default), this may break plugins (but it's backward
|
||||
" compatible).
|
||||
set langnoremap
|
||||
set nolangremap
|
||||
endif
|
||||
|
||||
+14
-5
@@ -1,4 +1,4 @@
|
||||
*channel.txt* For Vim version 7.4. Last change: 2016 Jul 15
|
||||
*channel.txt* For Vim version 7.4. Last change: 2016 Aug 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -54,7 +54,7 @@ Common combination are:
|
||||
- Using a job connected through pipes in NL mode. E.g., to run a style
|
||||
checker and receive errors and warnings.
|
||||
- Using a deamon, connecting over a socket in JSON mode. E.g. to lookup
|
||||
crosss-refrences in a database.
|
||||
cross-references in a database.
|
||||
|
||||
==============================================================================
|
||||
2. Channel demo *channel-demo* *demoserver.py*
|
||||
@@ -247,9 +247,15 @@ In which {number} is different every time. It must be used in the response
|
||||
This way Vim knows which sent message matches with which received message and
|
||||
can call the right handler. Also when the messages arrive out of order.
|
||||
|
||||
A newline character is terminating the JSON text. This can be used to
|
||||
separate the read text. For example, in Python:
|
||||
splitidx = read_text.find('\n')
|
||||
message = read_text[:splitidx]
|
||||
rest = read_text[splitidx + 1:]
|
||||
|
||||
The sender must always send valid JSON to Vim. Vim can check for the end of
|
||||
the message by parsing the JSON. It will only accept the message if the end
|
||||
was received.
|
||||
was received. A newline after the message is optional.
|
||||
|
||||
When the process wants to send a message to Vim without first receiving a
|
||||
message, it must use the number zero:
|
||||
@@ -389,6 +395,9 @@ This {string} can also be JSON, use |json_encode()| to create it and
|
||||
|
||||
It is not possible to use |ch_evalexpr()| or |ch_sendexpr()| on a raw channel.
|
||||
|
||||
A String in Vim cannot contain NUL bytes. To send or receive NUL bytes read
|
||||
or write from a buffer. See |in_io-buffer| and |out_io-buffer|.
|
||||
|
||||
==============================================================================
|
||||
7. More channel functions *channel-more*
|
||||
|
||||
@@ -474,7 +483,7 @@ For example, to start a job and write its output in buffer "dummy": >
|
||||
|
||||
|
||||
Job input from a buffer ~
|
||||
|
||||
*in_io-buffer*
|
||||
To run a job that reads from a buffer: >
|
||||
let job = job_start({command},
|
||||
\ {'in_io': 'buffer', 'in_name': 'mybuffer'})
|
||||
@@ -648,7 +657,7 @@ See |job_setoptions()| and |ch_setoptions()|.
|
||||
|
||||
|
||||
Writing to a buffer ~
|
||||
|
||||
*out_io-buffer*
|
||||
When the out_io or err_io mode is "buffer" and there is a callback, the text
|
||||
is appended to the buffer before invoking the callback.
|
||||
|
||||
|
||||
+15
-1
@@ -1,4 +1,4 @@
|
||||
*cmdline.txt* For Vim version 7.4. Last change: 2015 Dec 17
|
||||
*cmdline.txt* For Vim version 7.4. Last change: 2016 Aug 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -423,12 +423,26 @@ CTRL-L A match is done on the pattern in front of the cursor. If
|
||||
If there are multiple matches the longest common part is
|
||||
inserted in place of the pattern. If the result is shorter
|
||||
than the pattern, no completion is done.
|
||||
*/_CTRL-L*
|
||||
When 'incsearch' is set, entering a search pattern for "/" or
|
||||
"?" and the current match is displayed then CTRL-L will add
|
||||
one character from the end of the current match. If
|
||||
'ignorecase' and 'smartcase' are set and the command line has
|
||||
no uppercase characters, the added character is converted to
|
||||
lowercase.
|
||||
*c_CTRL-G* */_CTRL-G*
|
||||
CTRL-G When 'incsearch' is set, entering a search pattern for "/" or
|
||||
"?" and the current match is displayed then CTRL-G will move
|
||||
to the next match (does not take |search-offset| into account)
|
||||
Use CTRL-T to move to the previous match. Hint: on a regular
|
||||
keyboard T is above G.
|
||||
*c_CTRL-T* */_CTRL-T*
|
||||
CTRL-T When 'incsearch' is set, entering a search pattern for "/" or
|
||||
"?" and the current match is displayed then CTRL-T will move
|
||||
to the previous match (does not take |search-offset| into
|
||||
account).
|
||||
Use CTRL-G to move to the next match. Hint: on a regular
|
||||
keyboard T is above G.
|
||||
|
||||
The 'wildchar' option defaults to <Tab> (CTRL-E when in Vi compatible mode; in
|
||||
a previous version <Esc> was used). In the pattern standard wildcards '*' and
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
*diff.txt* For Vim version 7.4. Last change: 2015 Nov 01
|
||||
*diff.txt* For Vim version 7.4. Last change: 2016 Aug 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
|
||||
*diff* *vimdiff* *gvimdiff* *diff-mode*
|
||||
This file describes the |+diff| feature: Showing differences between two,
|
||||
three or four versions of the same file.
|
||||
This file describes the |+diff| feature: Showing differences between two to
|
||||
eight versions of the same file.
|
||||
|
||||
The basics are explained in section |08.7| of the user manual.
|
||||
|
||||
@@ -117,7 +117,7 @@ To make these commands use a vertical split, prepend |:vertical|. Examples: >
|
||||
If you always prefer a vertical split include "vertical" in 'diffopt'.
|
||||
|
||||
*E96*
|
||||
There can be up to four buffers with 'diff' set.
|
||||
There can be up to eight buffers with 'diff' set.
|
||||
|
||||
Since the option values are remembered with the buffer, you can edit another
|
||||
file for a moment and come back to the same file and be in diff mode again.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 7.4. Last change: 2016 Mar 28
|
||||
*editing.txt* For Vim version 7.4. Last change: 2016 Aug 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1114,10 +1114,12 @@ The names can be in upper- or lowercase.
|
||||
edited. See |:confirm| and 'confirm'. {not in Vi}
|
||||
|
||||
:q[uit]! Quit without writing, also when the current buffer has
|
||||
changes. If this is the last window and there is a
|
||||
modified hidden buffer, the current buffer is
|
||||
abandoned and the first changed hidden buffer becomes
|
||||
the current buffer.
|
||||
changes. The buffer is unloaded, also when it has
|
||||
'hidden' set.
|
||||
If this is the last window and there is a modified
|
||||
hidden buffer, the current buffer is abandoned and the
|
||||
first changed hidden buffer becomes the current
|
||||
buffer.
|
||||
Use ":qall!" to exit always.
|
||||
|
||||
:cq[uit] Quit always, without writing, and return an error
|
||||
|
||||
+452
-198
File diff suppressed because it is too large
Load Diff
+39
-23
@@ -1,4 +1,4 @@
|
||||
*gui_x11.txt* For Vim version 7.4. Last change: 2016 Apr 08
|
||||
*gui_x11.txt* For Vim version 7.4. Last change: 2016 Aug 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -430,6 +430,9 @@ These are the different looks:
|
||||
GNOME is compiled with if it was found by configure and the
|
||||
--enable-gnome-check argument was used.
|
||||
|
||||
Note: Avoid use of --enable-gnome-check with GTK+ 3 GUI build. The
|
||||
functionality mentioned above is consolidated in GTK+ 3.
|
||||
|
||||
|
||||
GNOME session support *gui-gnome-session* *gnome-session*
|
||||
|
||||
@@ -466,20 +469,37 @@ continues on Yzis: https://github.com/chrizel/Yzis.
|
||||
==============================================================================
|
||||
8. Compiling *gui-x11-compiling*
|
||||
|
||||
If using X11, Vim's Makefile will by default first try to find the necessary
|
||||
GTK+ files on your system. If the GTK+ files cannot be found, then the Motif
|
||||
files will be searched for. Finally, if this fails, the Athena files will be
|
||||
searched for. If all three fail, the GUI will be disabled.
|
||||
If using X11, Vim's configure will by default first try to find the necessary
|
||||
GTK+ files on your system. When both GTK+ 2 and GTK+ 3 are available, GTK+ 2
|
||||
will be chosen unless --enable-gui=gtk3 is passed explicitly to configure.
|
||||
|
||||
For GTK+, Vim's configuration process requires that GTK+ be properly
|
||||
installed. That is, the shell script 'gtk-config' must be in your PATH, and
|
||||
you can already successful compile, build, and execute a GTK+ program. The
|
||||
reason for this is that the compiler flags (CFLAGS) and link flags (LDFLAGS)
|
||||
are obtained through the 'gtk-config' shell script.
|
||||
If the GTK+ files cannot be found, then the Motif files will be searched for.
|
||||
Finally, if this fails, the Athena files will be searched for. If all three
|
||||
fail, the GUI will be disabled.
|
||||
|
||||
If you want to build with GTK+ 2 support pass the --enable-gtk2-check argument
|
||||
to ./configure. Optionally, support for GNOME 2 will be compiled if the
|
||||
--enable-gnome-check option is also given.
|
||||
For GTK+, Vim's configuration process uses pkg-config(1) to check if the
|
||||
GTK+ required for a specified build is properly installed and usable.
|
||||
Accordingly, it is a good idea to make sure before running configure that
|
||||
your system has a working pkg-config together with the .pc file of the
|
||||
required GTK+. For that, say, run the following on the command line to see if
|
||||
your pkg-config works with your GTK+ 2: >
|
||||
|
||||
$ pkgconfig --modversion gtk+-2.0
|
||||
|
||||
Replace gtk+-2.0 with gtk+-3.0 for GTK+ 3. If you get the correct version
|
||||
number of your GTK+, you can proceed; if not, you probably need to do some
|
||||
system administration chores to set up pkg-config and GTK+ correctly.
|
||||
|
||||
The GTK+ 2 GUI is built by default. Therefore, you usually don't need to pass
|
||||
any options such as --enable-gui=gtk2 to configure and build that.
|
||||
|
||||
Optionally, the GTK+ 2 GUI can consolidate the GNOME 2 support. This support
|
||||
is enabled by passing --enable-gnome-check to configure.
|
||||
|
||||
If you want to build the GTK+ 3 GUI, you have to pass --enable-gui=gtk3
|
||||
explicitly to configure, and avoid passing --enable-gnome-check to that, as
|
||||
the functionality of the GNOME 2 support has already been consolidated in
|
||||
GTK+ 3.
|
||||
|
||||
Otherwise, if you are using Motif or Athena, when you have the Motif or Athena
|
||||
files in a directory where configure doesn't look, edit the Makefile to enter
|
||||
@@ -487,18 +507,14 @@ the names of the directories. Search for "GUI_INC_LOC" for an example to set
|
||||
the Motif directories, "CONF_OPT_X" for Athena.
|
||||
|
||||
*gui-x11-gtk*
|
||||
At the time of this writing, GTK+ version 1.0.6 and 1.2 are outdated. It
|
||||
is suggested that you use GTK 2. The GTK 1 support will most likely be
|
||||
dropped soon.
|
||||
Currently, Vim supports both GTK+ 2 and GTK+ 3.
|
||||
|
||||
For the GTK+ 2 GUI, using the latest release of the GTK+ 2.0 or GTK+ 2.2
|
||||
series is recommended.
|
||||
The GTK+ 2 GUI requires GTK+ 2.2 or later.
|
||||
|
||||
Lastly, although GTK+ has supposedly been ported to the Win32 platform, this
|
||||
has not been tested with Vim and is also unsupported. Also, it's unlikely to
|
||||
even compile since GTK+ GUI uses parts of the generic X11 code. This might
|
||||
change in distant future; particularly because getting rid of the X11 centric
|
||||
code parts is also required for GTK+ framebuffer support.
|
||||
Although the GTK+ 3 GUI is written in such a way that the source code can be
|
||||
compiled against all versions of the 3.x series, we recommend GTK+ 3.10 or
|
||||
later because of its substantial implementation changes in redraw done at
|
||||
that version.
|
||||
|
||||
*gui-x11-motif*
|
||||
For Motif, you need at least Motif version 1.2 and/or X11R5. Motif 2.0 and
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 7.4. Last change: 2016 Jul 16
|
||||
*index.txt* For Vim version 7.4. Last change: 2016 Aug 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -984,7 +984,7 @@ tag command action in Command-line editing mode ~
|
||||
|c_CTRL-E| CTRL-E cursor to end of command-line
|
||||
|'cedit'| CTRL-F default value for 'cedit': opens the
|
||||
command-line window; otherwise not used
|
||||
CTRL-G not used
|
||||
|c_CTRL-G| CTRL-G next match when 'incsearch' is active
|
||||
|c_<BS>| <BS> delete the character in front of the cursor
|
||||
|c_digraph| {char1} <BS> {char2}
|
||||
enter digraph when 'digraph' is on
|
||||
@@ -1017,7 +1017,7 @@ tag command action in Command-line editing mode ~
|
||||
insert the contents of a register or object
|
||||
under the cursor literally
|
||||
CTRL-S (used for terminal control flow)
|
||||
CTRL-T not used
|
||||
|c_CTRL-T| CTRL-T previous match when 'incsearch' is active
|
||||
|c_CTRL-U| CTRL-U remove all characters
|
||||
|c_CTRL-V| CTRL-V insert next non-digit literally, insert three
|
||||
digit decimal number as a single byte.
|
||||
@@ -1207,7 +1207,7 @@ tag command action ~
|
||||
|:display| :di[splay] display registers
|
||||
|:djump| :dj[ump] jump to #define
|
||||
|:dl| :dl short for |:delete| with the 'l' flag
|
||||
|:dl| :del[ete]l short for |:delete| with the 'l' flag
|
||||
|:del| :del[ete]l short for |:delete| with the 'l' flag
|
||||
|:dlist| :dli[st] list #defines
|
||||
|:doautocmd| :do[autocmd] apply autocommands to current buffer
|
||||
|:doautoall| :doautoa[ll] apply autocommands for all loaded buffers
|
||||
@@ -1239,6 +1239,7 @@ tag command action ~
|
||||
|:file| :f[ile] show or set the current file name
|
||||
|:files| :files list all files in the buffer list
|
||||
|:filetype| :filet[ype] switch file type detection on/off
|
||||
|:filter| :filt[er] filter output of following command
|
||||
|:find| :fin[d] find file in 'path' and edit it
|
||||
|:finally| :fina[lly] part of a :try command
|
||||
|:finish| :fini[sh] quit sourcing a Vim script
|
||||
|
||||
+8
-1
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 7.4. Last change: 2016 Jul 30
|
||||
*map.txt* For Vim version 7.4. Last change: 2016 Aug 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -431,6 +431,9 @@ with a space.
|
||||
Note: When using mappings for Visual mode, you can use the "'<" mark, which
|
||||
is the start of the last selected Visual area in the current buffer |'<|.
|
||||
|
||||
The |:filter| command can be used to select what mappings to list. The
|
||||
pattern is matched against the {lhs} and {rhs} in the raw form.
|
||||
|
||||
*:map-verbose*
|
||||
When 'verbose' is non-zero, listing a key map will also display where it was
|
||||
last defined. Example: >
|
||||
@@ -1177,6 +1180,10 @@ scripts.
|
||||
" Command has the -register attribute
|
||||
b Command is local to current buffer
|
||||
(see below for details on attributes)
|
||||
The list can be filtered on command name with
|
||||
|:filter|, e.g., to list all commands with "Pyth" in
|
||||
the name: >
|
||||
filter Pyth command
|
||||
|
||||
:com[mand] {cmd} List the user-defined commands that start with {cmd}
|
||||
|
||||
|
||||
+57
-27
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.4. Last change: 2016 Jul 29
|
||||
*options.txt* For Vim version 7.4. Last change: 2016 Aug 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -261,10 +261,10 @@ global value, which is used for new buffers. With ":set" both the local and
|
||||
global value is changed. With "setlocal" only the local value is changed,
|
||||
thus this value is not used when editing a new buffer.
|
||||
|
||||
When editing a buffer that has been edited before, the last used window
|
||||
options are used again. If this buffer has been edited in this window, the
|
||||
values from back then are used. Otherwise the values from the window where
|
||||
the buffer was edited last are used.
|
||||
When editing a buffer that has been edited before, the options from the window
|
||||
that was last closed are used again. If this buffer has been edited in this
|
||||
window, the values from back then are used. Otherwise the values from the
|
||||
last closed window where the buffer was edited last are used.
|
||||
|
||||
It's possible to set a local window option specifically for a type of buffer.
|
||||
When you edit another buffer in the same window, you don't want to keep
|
||||
@@ -3751,7 +3751,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
qXX - quality XX. Valid quality names are: PROOF, DRAFT,
|
||||
ANTIALIASED, NONANTIALIASED, CLEARTYPE, DEFAULT.
|
||||
Normally you would use "qDEFAULT".
|
||||
Some quality values isn't supported in legacy OSs.
|
||||
Some quality values are not supported in legacy OSs.
|
||||
|
||||
Use a ':' to separate the options.
|
||||
- A '_' can be used in the place of a space, so you don't need to use
|
||||
@@ -4058,17 +4058,16 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
*'highlight'* *'hl'*
|
||||
'highlight' 'hl' string (default (as a single string):
|
||||
"8:SpecialKey,@:NonText,d:Directory,
|
||||
e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,
|
||||
M:ModeMsg,n:LineNr,N:CursorLineNr,
|
||||
r:Question,s:StatusLine,S:StatusLineNC,
|
||||
c:VertSplit, t:Title,v:Visual,
|
||||
w:WarningMsg,W:WildMenu,
|
||||
f:Folded,F:FoldColumn,A:DiffAdd,
|
||||
C:DiffChange,D:DiffDelete,T:DiffText,
|
||||
>:SignColumn,B:SpellBad,P:SpellCap,
|
||||
R:SpellRare,L:SpellLocal,-:Conceal,
|
||||
+:Pmenu,=:PmenuSel,
|
||||
"8:SpecialKey,~:EndOfBuffer,@:NonText,
|
||||
d:Directory,e:ErrorMsg,i:IncSearch,
|
||||
l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,
|
||||
N:CursorLineNr,r:Question,s:StatusLine,
|
||||
S:StatusLineNC,c:VertSplit,t:Title,
|
||||
v:Visual,w:WarningMsg,W:WildMenu,f:Folded,
|
||||
F:FoldColumn,A:DiffAdd,C:DiffChange,
|
||||
D:DiffDelete,T:DiffText,>:SignColumn,
|
||||
B:SpellBad,P:SpellCap,R:SpellRare,
|
||||
L:SpellLocal,-:Conceal,+:Pmenu,=:PmenuSel,
|
||||
x:PmenuSbar,X:PmenuThumb")
|
||||
global
|
||||
{not in Vi}
|
||||
@@ -4077,7 +4076,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
first character in a pair gives the occasion, the second the mode to
|
||||
use for that occasion. The occasions are:
|
||||
|hl-SpecialKey| 8 Meta and special keys listed with ":map"
|
||||
|hl-NonText| @ '~' and '@' at the end of the window and
|
||||
|hl-EndOfBuffer| ~ lines after the last line in the buffer
|
||||
|hl-NonText| @ '@' at the end of the window and
|
||||
characters from 'showbreak'
|
||||
|hl-Directory| d directories in CTRL-D listing and other special
|
||||
things in listings
|
||||
@@ -4433,6 +4433,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
original position when no match is found and when pressing <Esc>. You
|
||||
still need to finish the search command with <Enter> to move the
|
||||
cursor to the match.
|
||||
You can use the CTRL-N and CTRL-P keys to move to the next and
|
||||
previous match. |c_CTRL-N| |c_CTRL-P|
|
||||
When compiled with the |+reltime| feature Vim only searches for about
|
||||
half a second. With a complicated pattern and/or a lot of text the
|
||||
match may not be found. This is to avoid that Vim hangs while you
|
||||
@@ -4517,7 +4519,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
if you want to use Vim as a modeless editor. Used for |evim|.
|
||||
These Insert mode commands will be useful:
|
||||
- Use the cursor keys to move around.
|
||||
- Use CTRL-O to execute one Normal mode command |i_CTRL-O|). When
|
||||
- Use CTRL-O to execute one Normal mode command |i_CTRL-O|. When
|
||||
this is a mapping, it is executed as if 'insertmode' was off.
|
||||
Normal mode remains active until the mapping is finished.
|
||||
- Use CTRL-L to execute a number of Normal mode commands, then use
|
||||
@@ -4746,7 +4748,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
be able to execute Normal mode commands.
|
||||
This is the opposite of the 'keymap' option, where characters are
|
||||
mapped in Insert mode.
|
||||
Also consider setting 'langnoremap' to avoid 'langmap' applies to
|
||||
Also consider resetting 'langremap' to avoid 'langmap' applies to
|
||||
characters resulting from a mapping.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
@@ -4809,10 +4811,20 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+langmap|
|
||||
feature}
|
||||
When on, setting 'langmap' does not apply to characters resulting from
|
||||
This is just like 'langremap' but with the value inverted. It only
|
||||
exists for backwards compatibility. When setting 'langremap' then
|
||||
'langnoremap' is set to the inverted value, and the other way around.
|
||||
|
||||
*'langremap'* *'lrm'* *'nolangremap'* *'nolrm'*
|
||||
'langremap' 'lrm' boolean (default on, reset in |defaults.vim|)
|
||||
global
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+langmap|
|
||||
feature}
|
||||
When off, setting 'langmap' does not apply to characters resulting from
|
||||
a mapping. This basically means, if you noticed that setting
|
||||
'langmap' disables some of your mappings, try setting this option.
|
||||
This option defaults to off for backwards compatibility. Set it on if
|
||||
'langmap' disables some of your mappings, try resetting this option.
|
||||
This option defaults to on for backwards compatibility. Set it off if
|
||||
that works for you to avoid mappings to break.
|
||||
|
||||
*'laststatus'* *'ls'*
|
||||
@@ -4865,7 +4877,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
use this command to get the tallest window possible: >
|
||||
:set lines=999
|
||||
< Minimum value is 2, maximum value is 1000.
|
||||
If you get less lines than expected, check the 'guiheadroom' option.
|
||||
If you get fewer lines than expected, check the 'guiheadroom' option.
|
||||
When you set this option and Vim is unable to change the physical
|
||||
number of lines of the display, the display may be messed up.
|
||||
|
||||
@@ -6385,6 +6397,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
"inclusive" means that the last character of the selection is included
|
||||
in an operation. For example, when "x" is used to delete the
|
||||
selection.
|
||||
When "old" is used and 'virtualedit' allows the cursor to move past
|
||||
the end of line the line break still isn't included.
|
||||
Note that when "exclusive" is used and selecting from the end
|
||||
backwards, you cannot include the last character of a line, when
|
||||
starting in Normal mode and 'virtualedit' empty.
|
||||
@@ -6873,10 +6887,21 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
Example: Try this together with 'sidescroll' and 'listchars' as
|
||||
in the following example to never allow the cursor to move
|
||||
onto the "extends" character:
|
||||
onto the "extends" character: >
|
||||
|
||||
:set nowrap sidescroll=1 listchars=extends:>,precedes:<
|
||||
:set sidescrolloff=1
|
||||
<
|
||||
*'signcolumn'* *'scl'*
|
||||
'signcolumn' 'scl' string (default "auto")
|
||||
local to window
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+signs|
|
||||
feature}
|
||||
Whether or not to draw the signcolumn. Valid values are:
|
||||
"auto" only when there is a sign to display
|
||||
"no" never
|
||||
"yes" always
|
||||
|
||||
|
||||
*'smartcase'* *'scs'* *'nosmartcase'* *'noscs'*
|
||||
@@ -7546,6 +7571,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
By default, tag searches are case-sensitive. Case is ignored when
|
||||
'ignorecase' is set and 'tagcase' is "followic", or when 'tagcase' is
|
||||
"ignore".
|
||||
Also when 'tagcase' is "followscs" and 'smartcase' is set, or
|
||||
'tagcase' is "smart", and the pattern contains only lowercase
|
||||
characters.
|
||||
|
||||
When 'tagbsearch' is off, tags searching is slower when a full match
|
||||
exists, but faster when no full match exists. Tags in unsorted tags
|
||||
@@ -7564,8 +7592,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
This option specifies how case is handled when searching the tags
|
||||
file:
|
||||
followic Follow the 'ignorecase' option
|
||||
followscs Follow the 'smartcase' and 'ignorecase' options
|
||||
ignore Ignore case
|
||||
match Match case
|
||||
smart Ignore case unless an upper case letter is used
|
||||
|
||||
*'taglength'* *'tl'*
|
||||
'taglength' 'tl' number (default 0)
|
||||
@@ -8079,8 +8109,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
"xterm", "xterm2", "urxvt" or "sgr" (because dec mouse codes conflict
|
||||
with them).
|
||||
This option is automatically set to "xterm", when the 'term' option is
|
||||
set to a name that starts with "xterm", "mlterm", or "screen", and
|
||||
'ttymouse' is not set already.
|
||||
set to a name that starts with "xterm", "mlterm", "screen", "st" (full
|
||||
match only), "st-" or "stterm", and 'ttymouse' is not set already.
|
||||
Additionally, if vim is compiled with the |+termresponse| feature and
|
||||
|t_RV| is set to the escape sequence to request the xterm version
|
||||
number, more intelligent detection process runs.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 7.4. Last change: 2016 Jun 14
|
||||
*quickref.txt* For Vim version 7.4. Last change: 2016 Aug 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -770,7 +770,7 @@ Short explanation of each option: *option-list*
|
||||
'keywordprg' 'kp' program to use for the "K" command
|
||||
'langmap' 'lmap' alphabetic characters for other language mode
|
||||
'langmenu' 'lm' language to be used for the menus
|
||||
'langnoremap' 'lnr' do not apply 'langmap' to mapped characters
|
||||
'langremap' 'lrm' do apply 'langmap' to mapped characters
|
||||
'laststatus' 'ls' tells when last window has status lines
|
||||
'lazyredraw' 'lz' don't redraw while executing macros
|
||||
'linebreak' 'lbr' wrap long lines at a blank
|
||||
@@ -888,6 +888,7 @@ Short explanation of each option: *option-list*
|
||||
'showtabline' 'stal' tells when the tab pages line is displayed
|
||||
'sidescroll' 'ss' minimum number of columns to scroll horizontal
|
||||
'sidescrolloff' 'siso' min. nr. of columns to left and right of cursor
|
||||
'signcolumn' 'scl' when to display the sign column
|
||||
'smartcase' 'scs' no ignore case when pattern has uppercase
|
||||
'smartindent' 'si' smart autoindenting for C programs
|
||||
'smarttab' 'sta' use 'shiftwidth' when inserting <Tab>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*sign.txt* For Vim version 7.4. Last change: 2014 May 07
|
||||
*sign.txt* For Vim version 7.4. Last change: 2016 Aug 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur
|
||||
@@ -45,8 +45,10 @@ There are two steps in using signs:
|
||||
|
||||
When signs are defined for a file, Vim will automatically add a column of two
|
||||
characters to display them in. When the last sign is unplaced the column
|
||||
disappears again. The color of the column is set with the SignColumn group
|
||||
|hl-SignColumn|. Example to set the color: >
|
||||
disappears again. This behavior can be changed with the 'signcolumn' option.
|
||||
|
||||
The color of the column is set with the SignColumn group |hl-SignColumn|.
|
||||
Example to set the color: >
|
||||
|
||||
:highlight SignColumn guibg=darkgrey
|
||||
|
||||
@@ -195,7 +197,9 @@ JUMPING TO A SIGN *:sign-jump* *E157*
|
||||
If the file isn't displayed in window and the current file can
|
||||
not be |abandon|ed this fails.
|
||||
|
||||
:sign jump {id} buffer={nr}
|
||||
Same, but use buffer {nr}.
|
||||
:sign jump {id} buffer={nr} *E934*
|
||||
Same, but use buffer {nr}. This fails if buffer {nr} does not
|
||||
have a name.
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 7.4. Last change: 2016 Jul 29
|
||||
*starting.txt* For Vim version 7.4. Last change: 2016 Aug 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -859,6 +859,8 @@ accordingly. Vim proceeds in this order:
|
||||
searched for the "plugin" sub-directory and all files ending in ".vim"
|
||||
will be sourced (in alphabetical order per directory), also in
|
||||
subdirectories.
|
||||
However, directories in 'runtimepath' ending in "after" are skipped
|
||||
here and only loaded after packages, see below.
|
||||
Loading plugins won't be done when:
|
||||
- The 'loadplugins' option was reset in a vimrc file.
|
||||
- The |--noplugin| command line argument is used.
|
||||
@@ -866,13 +868,18 @@ accordingly. Vim proceeds in this order:
|
||||
- When Vim was compiled without the |+eval| feature.
|
||||
Note that using "-c 'set noloadplugins'" doesn't work, because the
|
||||
commands from the command line have not been executed yet. You can
|
||||
use "--cmd 'set noloadplugins'" |--cmd|.
|
||||
use "--cmd 'set noloadplugins'" or "--cmd 'set loadplugins'" |--cmd|.
|
||||
|
||||
Packages are loaded. These are plugins, as above, but found in the
|
||||
"start" directory of each entry in 'packpath'. Every plugin directory
|
||||
found is added in 'runtimepath' and then the plugins are sourced. See
|
||||
|packages|.
|
||||
|
||||
The plugins scripts are loaded, as above, but now only the directories
|
||||
ending in "after" are used. Note that 'runtimepath' will have changed
|
||||
if packages have been found, but that should not add a directory
|
||||
ending in "after".
|
||||
|
||||
5. Set 'shellpipe' and 'shellredir'
|
||||
The 'shellpipe' and 'shellredir' options are set according to the
|
||||
value of the 'shell' option, unless they have been set before.
|
||||
@@ -917,7 +924,8 @@ accordingly. Vim proceeds in this order:
|
||||
The $MYVIMRC or $MYGVIMRC file will be set to the first found vimrc and/or
|
||||
gvimrc file.
|
||||
|
||||
Some hints on using initializations:
|
||||
|
||||
Some hints on using initializations ~
|
||||
|
||||
Standard setup:
|
||||
Create a vimrc file to set the default settings and mappings for all your edit
|
||||
@@ -940,27 +948,37 @@ want to set the defaults for all users. Create a vimrc file with commands
|
||||
for default settings and mappings and put it in the place that is given with
|
||||
the ":version" command.
|
||||
|
||||
Saving the current state of Vim to a file:
|
||||
|
||||
Saving the current state of Vim to a file ~
|
||||
|
||||
Whenever you have changed values of options or when you have created a
|
||||
mapping, then you may want to save them in a vimrc file for later use. See
|
||||
|save-settings| about saving the current state of settings to a file.
|
||||
|
||||
Avoiding setup problems for Vi users:
|
||||
|
||||
Avoiding setup problems for Vi users ~
|
||||
|
||||
Vi uses the variable EXINIT and the file "~/.exrc". So if you do not want to
|
||||
interfere with Vi, then use the variable VIMINIT and the file "vimrc" instead.
|
||||
|
||||
Amiga environment variables:
|
||||
|
||||
Amiga environment variables ~
|
||||
|
||||
On the Amiga, two types of environment variables exist. The ones set with the
|
||||
DOS 1.3 (or later) setenv command are recognized. See the AmigaDos 1.3
|
||||
manual. The environment variables set with the old Manx Set command (before
|
||||
version 5.0) are not recognized.
|
||||
|
||||
MS-DOS line separators:
|
||||
|
||||
MS-DOS line separators ~
|
||||
|
||||
On MS-DOS-like systems (MS-DOS itself, Win32, and OS/2), Vim assumes that all
|
||||
the vimrc files have <CR> <NL> pairs as line separators. This will give
|
||||
problems if you have a file with only <NL>s and have a line like
|
||||
":map xx yy^M". The trailing ^M will be ignored.
|
||||
|
||||
|
||||
Vi compatible default value ~
|
||||
*compatible-default*
|
||||
When Vim starts, the 'compatible' option is on. This will be used when Vim
|
||||
starts its initializations. But as soon as:
|
||||
@@ -993,6 +1011,8 @@ 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.
|
||||
|
||||
|
||||
Defaults without a .vimrc file ~
|
||||
*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,
|
||||
@@ -1012,7 +1032,8 @@ revert individual settings. See the defaults.vim file for hints on how to
|
||||
revert each item.
|
||||
|
||||
|
||||
Avoiding trojan horses: *trojan-horse*
|
||||
Avoiding trojan horses ~
|
||||
*trojan-horse*
|
||||
While reading the "vimrc" or the "exrc" file in the current directory, some
|
||||
commands can be disabled for security reasons by setting the 'secure' option.
|
||||
This is always done when executing the command from a tags file. Otherwise it
|
||||
@@ -1035,6 +1056,8 @@ Be careful!
|
||||
part of the line in the tags file) is always done in secure mode. This works
|
||||
just like executing a command from a vimrc/exrc in the current directory.
|
||||
|
||||
|
||||
If Vim startup is slow ~
|
||||
*slow-start*
|
||||
If Vim takes a long time to start up, use the |--startuptime| argument to find
|
||||
out what happens. There are a few common causes:
|
||||
@@ -1049,6 +1072,8 @@ out what happens. There are a few common causes:
|
||||
moment (use the Vim argument "-i NONE", |-i|). Try reducing the number of
|
||||
lines stored in a register with ":set viminfo='20,<50,s10". |viminfo-file|.
|
||||
|
||||
|
||||
Intro message ~
|
||||
*:intro*
|
||||
When Vim starts without a file name, an introductory message is displayed (for
|
||||
those who don't know what Vim is). It is removed as soon as the display is
|
||||
@@ -1605,8 +1630,11 @@ most of the information will be restored).
|
||||
*:ol* *:oldfiles*
|
||||
:ol[dfiles] List the files that have marks stored in the viminfo
|
||||
file. This list is read on startup and only changes
|
||||
afterwards with ":rviminfo!". Also see |v:oldfiles|.
|
||||
afterwards with `:rviminfo!`. Also see |v:oldfiles|.
|
||||
The number can be used with |c_#<|.
|
||||
The output can be filtered with |:filter|, e.g.: >
|
||||
filter /\.vim/ oldfiles
|
||||
< The filtering happens on the file name.
|
||||
{not in Vi, only when compiled with the |+eval|
|
||||
feature}
|
||||
|
||||
|
||||
+11
-6
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 7.4. Last change: 2016 May 28
|
||||
*syntax.txt* For Vim version 7.4. Last change: 2016 Aug 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -949,6 +949,8 @@ Variable Highlight ~
|
||||
*c_no_bracket_error* don't highlight {}; inside [] as errors
|
||||
*c_no_curly_error* don't highlight {}; inside [] and () as errors;
|
||||
except { and } in first column
|
||||
Default is to highlight them, otherwise you
|
||||
can't spot a missing ")".
|
||||
*c_curly_error* highlight a missing }; this forces syncing from the
|
||||
start of the file, can be slow
|
||||
*c_no_ansi* don't do standard ANSI types and constants
|
||||
@@ -3762,7 +3764,7 @@ Whether or not it is actually concealed depends on the value of the
|
||||
'conceallevel' option. The 'concealcursor' option is used to decide whether
|
||||
concealable items in the current line are displayed unconcealed to be able to
|
||||
edit the line.
|
||||
Another way to conceal text with with |matchadd()|.
|
||||
Another way to conceal text is with |matchadd()|.
|
||||
|
||||
concealends *:syn-concealends*
|
||||
|
||||
@@ -4868,6 +4870,9 @@ DiffChange diff mode: Changed line |diff.txt|
|
||||
DiffDelete diff mode: Deleted line |diff.txt|
|
||||
*hl-DiffText*
|
||||
DiffText diff mode: Changed text within a changed line |diff.txt|
|
||||
*hl-EndOfBuffer*
|
||||
EndOfBuffer filler lines (~) after the last line in the buffer.
|
||||
By default, this is highlighted like |hl-NonText|.
|
||||
*hl-ErrorMsg*
|
||||
ErrorMsg error messages on the command line
|
||||
*hl-VertSplit*
|
||||
@@ -4896,10 +4901,10 @@ ModeMsg 'showmode' message (e.g., "-- INSERT --")
|
||||
*hl-MoreMsg*
|
||||
MoreMsg |more-prompt|
|
||||
*hl-NonText*
|
||||
NonText '~' and '@' at the end of the window, characters from
|
||||
'showbreak' and other characters that do not really exist in
|
||||
the text (e.g., ">" displayed when a double-wide character
|
||||
doesn't fit at the end of the line).
|
||||
NonText '@' at the end of the window, characters from 'showbreak'
|
||||
and other characters that do not really exist in the text
|
||||
(e.g., ">" displayed when a double-wide character doesn't
|
||||
fit at the end of the line).
|
||||
*hl-Normal*
|
||||
Normal normal text
|
||||
*hl-Pmenu*
|
||||
|
||||
+16
-8
@@ -87,14 +87,21 @@ In the GUI tab pages line you can use the right mouse button to open menu.
|
||||
Execute {cmd} and when it opens a new window open a new tab
|
||||
page instead. Doesn't work for |:diffsplit|, |:diffpatch|,
|
||||
|:execute| and |:normal|.
|
||||
When [count] is omitted the tab page appears after the current
|
||||
one.
|
||||
When [count] is specified the new tab page comes after tab
|
||||
page [count]. Use ":0tab cmd" to get the new tab page as the
|
||||
first one.
|
||||
If [count] is given the new tab page appears after the tab
|
||||
page [count] otherwise the new tab page will appear after the
|
||||
current one.
|
||||
Examples: >
|
||||
:tab split " opens current buffer in new tab page
|
||||
:tab help gt " opens tab page with help for "gt"
|
||||
:tab split " opens current buffer in new tab page
|
||||
:tab help gt " opens tab page with help for "gt"
|
||||
:.tab help gt " as above
|
||||
:+tab help " opens tab page with help after the next
|
||||
" tab page
|
||||
:-tab help " opens tab page with help before the
|
||||
" current one
|
||||
:0tab help " opens tab page with help before the
|
||||
" first one
|
||||
:$tab help " opens tab page with help after the last
|
||||
" one
|
||||
|
||||
CTRL-W gf Open a new tab page and edit the file name under the cursor.
|
||||
See |CTRL-W_gf|.
|
||||
@@ -141,10 +148,11 @@ something else.
|
||||
given, then they become hidden. But modified buffers are
|
||||
never abandoned, so changes cannot get lost. >
|
||||
:tabonly " close all tab pages except the current
|
||||
" one
|
||||
|
||||
:{count}tabo[nly][!]
|
||||
Close all tab pages except the {count}th one. >
|
||||
:.tabonly " one
|
||||
:.tabonly " as above
|
||||
:-tabonly " close all tab pages except the previous
|
||||
" one
|
||||
:+tabonly " close all tab pages except the next one
|
||||
|
||||
+45
-10
@@ -406,6 +406,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
'langmap' options.txt /*'langmap'*
|
||||
'langmenu' options.txt /*'langmenu'*
|
||||
'langnoremap' options.txt /*'langnoremap'*
|
||||
'langremap' options.txt /*'langremap'*
|
||||
'laststatus' options.txt /*'laststatus'*
|
||||
'lazyredraw' options.txt /*'lazyredraw'*
|
||||
'lbr' options.txt /*'lbr'*
|
||||
@@ -422,6 +423,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
'lnr' options.txt /*'lnr'*
|
||||
'loadplugins' options.txt /*'loadplugins'*
|
||||
'lpl' options.txt /*'lpl'*
|
||||
'lrm' options.txt /*'lrm'*
|
||||
'ls' options.txt /*'ls'*
|
||||
'lsp' options.txt /*'lsp'*
|
||||
'luadll' options.txt /*'luadll'*
|
||||
@@ -597,6 +599,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
'nojoinspaces' options.txt /*'nojoinspaces'*
|
||||
'nojs' options.txt /*'nojs'*
|
||||
'nolangnoremap' options.txt /*'nolangnoremap'*
|
||||
'nolangremap' options.txt /*'nolangremap'*
|
||||
'nolazyredraw' options.txt /*'nolazyredraw'*
|
||||
'nolbr' options.txt /*'nolbr'*
|
||||
'nolinebreak' options.txt /*'nolinebreak'*
|
||||
@@ -605,6 +608,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
'nolnr' options.txt /*'nolnr'*
|
||||
'noloadplugins' options.txt /*'noloadplugins'*
|
||||
'nolpl' options.txt /*'nolpl'*
|
||||
'nolrm' options.txt /*'nolrm'*
|
||||
'nolz' options.txt /*'nolz'*
|
||||
'noma' options.txt /*'noma'*
|
||||
'nomacatsui' options.txt /*'nomacatsui'*
|
||||
@@ -820,6 +824,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
'sbr' options.txt /*'sbr'*
|
||||
'sc' options.txt /*'sc'*
|
||||
'scb' options.txt /*'scb'*
|
||||
'scl' options.txt /*'scl'*
|
||||
'scr' options.txt /*'scr'*
|
||||
'scroll' options.txt /*'scroll'*
|
||||
'scrollbind' options.txt /*'scrollbind'*
|
||||
@@ -862,6 +867,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
'si' options.txt /*'si'*
|
||||
'sidescroll' options.txt /*'sidescroll'*
|
||||
'sidescrolloff' options.txt /*'sidescrolloff'*
|
||||
'signcolumn' options.txt /*'signcolumn'*
|
||||
'siso' options.txt /*'siso'*
|
||||
'sj' options.txt /*'sj'*
|
||||
'slm' options.txt /*'slm'*
|
||||
@@ -1610,6 +1616,9 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
/\{- pattern.txt /*\/\\{-*
|
||||
/\~ pattern.txt /*\/\\~*
|
||||
/^ pattern.txt /*\/^*
|
||||
/_CTRL-G cmdline.txt /*\/_CTRL-G*
|
||||
/_CTRL-L cmdline.txt /*\/_CTRL-L*
|
||||
/_CTRL-T cmdline.txt /*\/_CTRL-T*
|
||||
/atom pattern.txt /*\/atom*
|
||||
/bar pattern.txt /*\/bar*
|
||||
/branch pattern.txt /*\/branch*
|
||||
@@ -2284,6 +2293,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:filetype-overview filetype.txt /*:filetype-overview*
|
||||
:filetype-plugin-off filetype.txt /*:filetype-plugin-off*
|
||||
:filetype-plugin-on filetype.txt /*:filetype-plugin-on*
|
||||
:filt various.txt /*:filt*
|
||||
:filter various.txt /*:filter*
|
||||
:fin editing.txt /*:fin*
|
||||
:fina eval.txt /*:fina*
|
||||
:finally eval.txt /*:finally*
|
||||
@@ -4521,6 +4532,8 @@ E930 eval.txt /*E930*
|
||||
E931 message.txt /*E931*
|
||||
E932 eval.txt /*E932*
|
||||
E933 eval.txt /*E933*
|
||||
E934 sign.txt /*E934*
|
||||
E935 eval.txt /*E935*
|
||||
E94 windows.txt /*E94*
|
||||
E95 message.txt /*E95*
|
||||
E96 diff.txt /*E96*
|
||||
@@ -5119,6 +5132,7 @@ beval_lnum-variable eval.txt /*beval_lnum-variable*
|
||||
beval_text-variable eval.txt /*beval_text-variable*
|
||||
beval_winid-variable eval.txt /*beval_winid-variable*
|
||||
beval_winnr-variable eval.txt /*beval_winnr-variable*
|
||||
binary-number eval.txt /*binary-number*
|
||||
bitwise-function usr_41.txt /*bitwise-function*
|
||||
blockwise-examples visual.txt /*blockwise-examples*
|
||||
blockwise-operators visual.txt /*blockwise-operators*
|
||||
@@ -5214,6 +5228,7 @@ c_CTRL-C cmdline.txt /*c_CTRL-C*
|
||||
c_CTRL-D cmdline.txt /*c_CTRL-D*
|
||||
c_CTRL-E cmdline.txt /*c_CTRL-E*
|
||||
c_CTRL-F cmdline.txt /*c_CTRL-F*
|
||||
c_CTRL-G cmdline.txt /*c_CTRL-G*
|
||||
c_CTRL-H cmdline.txt /*c_CTRL-H*
|
||||
c_CTRL-I cmdline.txt /*c_CTRL-I*
|
||||
c_CTRL-J cmdline.txt /*c_CTRL-J*
|
||||
@@ -5230,6 +5245,7 @@ c_CTRL-R_CTRL-O cmdline.txt /*c_CTRL-R_CTRL-O*
|
||||
c_CTRL-R_CTRL-P cmdline.txt /*c_CTRL-R_CTRL-P*
|
||||
c_CTRL-R_CTRL-R cmdline.txt /*c_CTRL-R_CTRL-R*
|
||||
c_CTRL-R_CTRL-W cmdline.txt /*c_CTRL-R_CTRL-W*
|
||||
c_CTRL-T cmdline.txt /*c_CTRL-T*
|
||||
c_CTRL-U cmdline.txt /*c_CTRL-U*
|
||||
c_CTRL-V cmdline.txt /*c_CTRL-V*
|
||||
c_CTRL-W cmdline.txt /*c_CTRL-W*
|
||||
@@ -6450,6 +6466,7 @@ gdb debug.txt /*gdb*
|
||||
ge motion.txt /*ge*
|
||||
get() eval.txt /*get()*
|
||||
get-ms-debuggers debug.txt /*get-ms-debuggers*
|
||||
getbufinfo() eval.txt /*getbufinfo()*
|
||||
getbufline() eval.txt /*getbufline()*
|
||||
getbufvar() eval.txt /*getbufvar()*
|
||||
getchar() eval.txt /*getchar()*
|
||||
@@ -6482,8 +6499,10 @@ getscript-data pi_getscript.txt /*getscript-data*
|
||||
getscript-history pi_getscript.txt /*getscript-history*
|
||||
getscript-plugins pi_getscript.txt /*getscript-plugins*
|
||||
getscript-start pi_getscript.txt /*getscript-start*
|
||||
gettabinfo() eval.txt /*gettabinfo()*
|
||||
gettabvar() eval.txt /*gettabvar()*
|
||||
gettabwinvar() eval.txt /*gettabwinvar()*
|
||||
getwininfo() eval.txt /*getwininfo()*
|
||||
getwinposx() eval.txt /*getwinposx()*
|
||||
getwinposy() eval.txt /*getwinposy()*
|
||||
getwinvar() eval.txt /*getwinvar()*
|
||||
@@ -6692,6 +6711,7 @@ hl-DiffChange syntax.txt /*hl-DiffChange*
|
||||
hl-DiffDelete syntax.txt /*hl-DiffDelete*
|
||||
hl-DiffText syntax.txt /*hl-DiffText*
|
||||
hl-Directory syntax.txt /*hl-Directory*
|
||||
hl-EndOfBuffer syntax.txt /*hl-EndOfBuffer*
|
||||
hl-ErrorMsg syntax.txt /*hl-ErrorMsg*
|
||||
hl-FoldColumn syntax.txt /*hl-FoldColumn*
|
||||
hl-Folded syntax.txt /*hl-Folded*
|
||||
@@ -6904,6 +6924,7 @@ improvements-7 version7.txt /*improvements-7*
|
||||
improvements-8 version8.txt /*improvements-8*
|
||||
in_bot channel.txt /*in_bot*
|
||||
in_buf channel.txt /*in_buf*
|
||||
in_io-buffer channel.txt /*in_io-buffer*
|
||||
in_mode channel.txt /*in_mode*
|
||||
in_name channel.txt /*in_name*
|
||||
in_top channel.txt /*in_top*
|
||||
@@ -7679,6 +7700,7 @@ new-search-path version6.txt /*new-search-path*
|
||||
new-searchpat version6.txt /*new-searchpat*
|
||||
new-session-files version5.txt /*new-session-files*
|
||||
new-spell version7.txt /*new-spell*
|
||||
new-style-testing eval.txt /*new-style-testing*
|
||||
new-tab-pages version7.txt /*new-tab-pages*
|
||||
new-undo-branches version7.txt /*new-undo-branches*
|
||||
new-unlisted-buffers version6.txt /*new-unlisted-buffers*
|
||||
@@ -7723,6 +7745,7 @@ octal eval.txt /*octal*
|
||||
octal-nrformats options.txt /*octal-nrformats*
|
||||
octal-number eval.txt /*octal-number*
|
||||
odbeditor gui_mac.txt /*odbeditor*
|
||||
old-style-testing eval.txt /*old-style-testing*
|
||||
oldfiles-variable eval.txt /*oldfiles-variable*
|
||||
ole-activation if_ole.txt /*ole-activation*
|
||||
ole-eval if_ole.txt /*ole-eval*
|
||||
@@ -7767,6 +7790,7 @@ os_win32.txt os_win32.txt /*os_win32.txt*
|
||||
other-features vi_diff.txt /*other-features*
|
||||
out_buf channel.txt /*out_buf*
|
||||
out_cb channel.txt /*out_cb*
|
||||
out_io-buffer channel.txt /*out_io-buffer*
|
||||
out_mode channel.txt /*out_mode*
|
||||
out_name channel.txt /*out_name*
|
||||
out_timeout channel.txt /*out_timeout*
|
||||
@@ -7879,10 +7903,12 @@ print-options print.txt /*print-options*
|
||||
print.txt print.txt /*print.txt*
|
||||
printf() eval.txt /*printf()*
|
||||
printf-% eval.txt /*printf-%*
|
||||
printf-B eval.txt /*printf-B*
|
||||
printf-E eval.txt /*printf-E*
|
||||
printf-G eval.txt /*printf-G*
|
||||
printf-S eval.txt /*printf-S*
|
||||
printf-X eval.txt /*printf-X*
|
||||
printf-b eval.txt /*printf-b*
|
||||
printf-c eval.txt /*printf-c*
|
||||
printf-d eval.txt /*printf-d*
|
||||
printf-e eval.txt /*printf-e*
|
||||
@@ -8535,11 +8561,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_bool-variable eval.txt /*t_bool-variable*
|
||||
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_channel-variable eval.txt /*t_channel-variable*
|
||||
t_ci version4.txt /*t_ci*
|
||||
t_cil version4.txt /*t_cil*
|
||||
t_cl term.txt /*t_cl*
|
||||
@@ -8551,7 +8577,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_dict-variable eval.txt /*t_dict-variable*
|
||||
t_dl term.txt /*t_dl*
|
||||
t_ed version4.txt /*t_ed*
|
||||
t_el version4.txt /*t_el*
|
||||
@@ -8565,12 +8591,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_float-variable eval.txt /*t_float-variable*
|
||||
t_fs term.txt /*t_fs*
|
||||
t_func-varialble eval.txt /*t_func-varialble*
|
||||
t_func-variable eval.txt /*t_func-variable*
|
||||
t_help version4.txt /*t_help*
|
||||
t_il version4.txt /*t_il*
|
||||
t_job-varialble eval.txt /*t_job-varialble*
|
||||
t_job-variable eval.txt /*t_job-variable*
|
||||
t_k1 term.txt /*t_k1*
|
||||
t_k2 term.txt /*t_k2*
|
||||
t_k3 term.txt /*t_k3*
|
||||
@@ -8595,15 +8621,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_list-variable eval.txt /*t_list-variable*
|
||||
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_none-variable eval.txt /*t_none-variable*
|
||||
t_number-variable eval.txt /*t_number-variable*
|
||||
t_op term.txt /*t_op*
|
||||
t_se term.txt /*t_se*
|
||||
t_sf1 version4.txt /*t_sf1*
|
||||
@@ -8623,7 +8649,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_string-variable eval.txt /*t_string-variable*
|
||||
t_tb version4.txt /*t_tb*
|
||||
t_te term.txt /*t_te*
|
||||
t_ti term.txt /*t_ti*
|
||||
@@ -8767,6 +8793,7 @@ 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 eval.txt /*testing*
|
||||
testing-variable eval.txt /*testing-variable*
|
||||
tex-cchar syntax.txt /*tex-cchar*
|
||||
tex-cole syntax.txt /*tex-cole*
|
||||
@@ -8797,9 +8824,14 @@ 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 eval.txt /*timer*
|
||||
timer-functions usr_41.txt /*timer-functions*
|
||||
timer_info() eval.txt /*timer_info()*
|
||||
timer_pause() eval.txt /*timer_pause()*
|
||||
timer_start() eval.txt /*timer_start()*
|
||||
timer_stop() eval.txt /*timer_stop()*
|
||||
timer_stopall() eval.txt /*timer_stopall()*
|
||||
timers eval.txt /*timers*
|
||||
timestamp editing.txt /*timestamp*
|
||||
timestamps editing.txt /*timestamps*
|
||||
tips tips.txt /*tips*
|
||||
@@ -9283,6 +9315,7 @@ win_id2win() eval.txt /*win_id2win()*
|
||||
winbufnr() eval.txt /*winbufnr()*
|
||||
wincol() eval.txt /*wincol()*
|
||||
window windows.txt /*window*
|
||||
window-ID windows.txt /*window-ID*
|
||||
window-contents intro.txt /*window-contents*
|
||||
window-exit editing.txt /*window-exit*
|
||||
window-functions usr_41.txt /*window-functions*
|
||||
@@ -9293,6 +9326,7 @@ window-size term.txt /*window-size*
|
||||
window-size-functions usr_41.txt /*window-size-functions*
|
||||
window-tag windows.txt /*window-tag*
|
||||
window-variable eval.txt /*window-variable*
|
||||
windowid windows.txt /*windowid*
|
||||
windowid-variable eval.txt /*windowid-variable*
|
||||
windows windows.txt /*windows*
|
||||
windows-3.1 os_win32.txt /*windows-3.1*
|
||||
@@ -9302,6 +9336,7 @@ windows-starting windows.txt /*windows-starting*
|
||||
windows.txt windows.txt /*windows.txt*
|
||||
windows95 os_win32.txt /*windows95*
|
||||
winheight() eval.txt /*winheight()*
|
||||
winid windows.txt /*winid*
|
||||
winline() eval.txt /*winline()*
|
||||
winnr() eval.txt /*winnr()*
|
||||
winrestcmd() eval.txt /*winrestcmd()*
|
||||
|
||||
+46
-32
@@ -1,4 +1,4 @@
|
||||
*tagsrch.txt* For Vim version 7.4. Last change: 2013 Oct 01
|
||||
*tagsrch.txt* For Vim version 7.4. Last change: 2016 Aug 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -84,14 +84,23 @@ Note that when the current file changes, the priority list is mostly not
|
||||
changed, to avoid confusion when using ":tnext". It is changed when using
|
||||
":tag {ident}".
|
||||
|
||||
The ignore-case matches are not found for a ":tag" command when the
|
||||
'ignorecase' option is off and 'tagcase' is "followic" or when 'tagcase' is
|
||||
"match". They are found when a pattern is used (starting with a "/") and for
|
||||
":tselect", also when 'ignorecase' is off and 'tagcase' is "followic" or when
|
||||
'tagcase' is "match". Note that using ignore-case tag searching disables
|
||||
binary searching in the tags file, which causes a slowdown. This can be
|
||||
avoided by fold-case sorting the tag file. See the 'tagbsearch' option for an
|
||||
explanation.
|
||||
The ignore-case matches are not found for a ":tag" command when:
|
||||
- the 'ignorecase' option is off and 'tagcase' is "followic"
|
||||
- 'tagcase' is "match"
|
||||
- 'tagcase' is "smart" and the pattern contains an upper case character.
|
||||
- 'tagcase' is "followscs" and 'smartcase' option is on and the pattern
|
||||
contains an upper case character.
|
||||
|
||||
The gnore-case matches are found when:
|
||||
- a pattern is used (starting with a "/")
|
||||
- for ":tselect"
|
||||
- when 'tagcase' is "followic" and 'ignorecase' is off
|
||||
- when 'tagcase' is "match"
|
||||
- when 'tagcase' is "followscs" and the 'smartcase' option is off
|
||||
|
||||
Note that using ignore-case tag searching disables binary searching in the
|
||||
tags file, which causes a slowdown. This can be avoided by fold-case sorting
|
||||
the tag file. See the 'tagbsearch' option for an explanation.
|
||||
|
||||
==============================================================================
|
||||
2. Tag stack *tag-stack* *tagstack* *E425*
|
||||
@@ -442,13 +451,18 @@ file "tags". It can also be used to access a common tags file.
|
||||
The next file in the list is not used when:
|
||||
- A matching static tag for the current buffer has been found.
|
||||
- A matching global tag has been found.
|
||||
This also depends on whether case is ignored. Case is ignored when
|
||||
'ignorecase' is set and 'tagcase' is "followic", or when 'tagcase' is
|
||||
"ignore". If case is not ignored, and the tags file only has a match without
|
||||
matching case, the next tags file is searched for a match with matching case.
|
||||
If no tag with matching case is found, the first match without matching case
|
||||
is used. If case is ignored, and a matching global tag with or without
|
||||
matching case is found, this one is used, no further tags files are searched.
|
||||
This also depends on whether case is ignored. Case is ignored when:
|
||||
- 'tagcase' is "followic" and 'ignorecase' is set
|
||||
- 'tagcase' is "ignore"
|
||||
- 'tagcase' is "smart" and the pattern only contains lower case
|
||||
characters.
|
||||
- 'tagcase' is "followscs" and 'smartcase' is set and the pattern only
|
||||
contains lower case characters.
|
||||
If case is not ignored, and the tags file only has a match without matching
|
||||
case, the next tags file is searched for a match with matching case. If no
|
||||
tag with matching case is found, the first match without matching case is
|
||||
used. If case is ignored, and a matching global tag with or without matching
|
||||
case is found, this one is used, no further tags files are searched.
|
||||
|
||||
When a tag file name starts with "./", the '.' is replaced with the path of
|
||||
the current file. This makes it possible to use a tags file in the directory
|
||||
@@ -819,24 +833,24 @@ CTRL-W d Open a new window, with the cursor on the first
|
||||
|
||||
*:search-args*
|
||||
Common arguments for the commands above:
|
||||
[!] When included, find matches in lines that are recognized as comments.
|
||||
When excluded, a match is ignored when the line is recognized as a
|
||||
comment (according to 'comments'), or the match is in a C comment (after
|
||||
"//" or inside /* */). Note that a match may be missed if a line is
|
||||
recognized as a comment, but the comment ends halfway the line.
|
||||
And if the line is a comment, but it is not recognized (according to
|
||||
'comments') a match may be found in it anyway. Example: >
|
||||
[!] When included, find matches in lines that are recognized as comments.
|
||||
When excluded, a match is ignored when the line is recognized as a
|
||||
comment (according to 'comments'), or the match is in a C comment
|
||||
(after "//" or inside /* */). Note that a match may be missed if a
|
||||
line is recognized as a comment, but the comment ends halfway the line.
|
||||
And if the line is a comment, but it is not recognized (according to
|
||||
'comments') a match may be found in it anyway. Example: >
|
||||
/* comment
|
||||
foobar */
|
||||
< A match for "foobar" is found, because this line is not recognized as a
|
||||
comment (even though syntax highlighting does recognize it).
|
||||
Note: Since a macro definition mostly doesn't look like a comment, the
|
||||
[!] makes no difference for ":dlist", ":dsearch" and ":djump".
|
||||
[/] A pattern can be surrounded by '/'. Without '/' only whole words are
|
||||
matched, using the pattern "\<pattern\>". Only after the second '/' a
|
||||
next command can be appended with '|'. Example: >
|
||||
< A match for "foobar" is found, because this line is not recognized as
|
||||
a comment (even though syntax highlighting does recognize it).
|
||||
Note: Since a macro definition mostly doesn't look like a comment, the
|
||||
[!] makes no difference for ":dlist", ":dsearch" and ":djump".
|
||||
[/] A pattern can be surrounded by '/'. Without '/' only whole words are
|
||||
matched, using the pattern "\<pattern\>". Only after the second '/' a
|
||||
next command can be appended with '|'. Example: >
|
||||
:isearch /string/ | echo "the last one"
|
||||
< For a ":djump", ":dsplit", ":dlist" and ":dsearch" command the pattern
|
||||
is used as a literal string, not as a search pattern.
|
||||
< For a ":djump", ":dsplit", ":dlist" and ":dsearch" command the pattern
|
||||
is used as a literal string, not as a search pattern.
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
+46
-89
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 7.4. Last change: 2016 Aug 02
|
||||
*todo.txt* For Vim version 7.4. Last change: 2016 Aug 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -34,9 +34,11 @@ 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?
|
||||
Make ":filter" work with more commands.
|
||||
Search for: msg_putchar('\n')
|
||||
|
||||
+channel:
|
||||
- Implement |job-term| ?
|
||||
- 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
|
||||
@@ -53,6 +55,8 @@ Later
|
||||
With xterm could use -S{pty}.
|
||||
|
||||
Regexp problems:
|
||||
- The new engine does not do the example in change.txt correctly, where the
|
||||
meaning of \1 and \2 is explained. (Harm te Hennepe, #990)
|
||||
- Since 7.4.704 the old regex engine fails to match [[:print:]] in 0xf6.
|
||||
(Manuel Ortega, 2016 Apr 24)
|
||||
Test fails on Mac. Avoid using isalpha(), isalnum(), etc? Depends on
|
||||
@@ -107,17 +111,12 @@ 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)
|
||||
Error in test_startup_utf8 on Solaris. (Danek Duvall, 2016 Aug 17)
|
||||
|
||||
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.
|
||||
|
||||
Javascript indent wrong after /* in single quoted string:
|
||||
@@ -134,60 +133,29 @@ Invalid behavior with NULL list. (Nikolai Pavlov, #768)
|
||||
For current Windows build .pdb file is missing. (Gabriele Fava, 2016 May 11)
|
||||
5)
|
||||
|
||||
Patch to fix compiler warning with gtk3. (Kazunobu Kuriyama, 2016 Aug 24)
|
||||
|
||||
Problem with whitespace in errorformat. (Gerd Wachsmuth, 2016 May 15, #807)
|
||||
|
||||
Undo problem: "g-" doesn't go back, gets stuck. (Björn Linse, 2016 Jul 18)
|
||||
|
||||
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)
|
||||
cmap using execute() has side effects. (Killthemule, 2016 Aug 17, #983)
|
||||
|
||||
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.
|
||||
|
||||
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)
|
||||
|
||||
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.
|
||||
'hlsearch' interferes with a Conceal match. (Rom Grk, 2016 Aug 9)
|
||||
|
||||
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.
|
||||
Patch to add context information to quickfix/location list. (Yegappan
|
||||
Lakshmanan, 2016 Aug 25)
|
||||
|
||||
MS-Windows: use WS_HIDE instead of SW_SHOWMINNOACTIVE in os_win32.c?
|
||||
Otherwise task flickers in taskbar.
|
||||
@@ -195,23 +163,10 @@ 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.
|
||||
Might be related to:
|
||||
Test 44 fails when [[=A=]] is changed to [[=À=]]. Caused by getcmdline() not
|
||||
handling the 0x80 as a second byte correctly? (Dominique Pelle, 2015 Jun 10)
|
||||
|
||||
Patch to add 'topbot' to 'belloff' option. (Coot, 2016 Mar 18, #695)
|
||||
|
||||
Patch for C syntax HL. (Bradley Garagan, 2016 Apr 17) #763
|
||||
|
||||
Patch to make matchit work better, respect 'matchpairs'. (Ken Takata, 2016 Mar
|
||||
25)
|
||||
Second problem in #966: ins_compl_add_tv() uses get_dict_string() multiple
|
||||
times, overwrites the one buffer. (Nikolay Pavlov, 2016 Aug 5)
|
||||
|
||||
This does not work: :set cscopequickfix=a-
|
||||
(Linewi, 2015 Jul 12, #914)
|
||||
@@ -226,6 +181,8 @@ Patch for restoring wide characters in the console buffer.
|
||||
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 .)?
|
||||
|
||||
Ramel Eshed: system() is much slower than job_start(), why? (Aug 26)
|
||||
|
||||
Patch for Python: #622. (Roland Puntaier, 2016 Feb 2)
|
||||
What does it change?
|
||||
|
||||
@@ -245,9 +202,6 @@ 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)
|
||||
|
||||
@@ -265,7 +219,7 @@ No test, needs some work to include.
|
||||
Patch to improve indenting for C++ constructor with initializer list.
|
||||
(Hirohito Higashi, 2016 Mar 31)
|
||||
|
||||
After 7.5 is released:
|
||||
After 8.0 is released:
|
||||
- Drop support for older MS-Windows systems, before XP.
|
||||
Patch from Ken Takata, 2016 Mar 8.
|
||||
|
||||
@@ -294,6 +248,9 @@ Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15)
|
||||
|
||||
Patch to make tests pass with EBCDIC. (Owen Leibman, 2016 Apr 10)
|
||||
|
||||
Add ":read :command", to insert the output of an Ex command?
|
||||
Can already do it with ":$put =execute('command')".
|
||||
|
||||
When repeating the 'confirm' dialog one needs to press Enter. (ds26gte, 2016
|
||||
Apr 17) #762
|
||||
|
||||
@@ -320,6 +277,24 @@ Should use /usr/local/share/applications or /usr/share/applications.
|
||||
Or use $XDG_DATA_DIRS.
|
||||
Also need to run update-desktop-database (Kuriyama Kazunobu, 2015 Nov 4)
|
||||
|
||||
Patch to test popupmenu. Fails, possibly due to a bug.
|
||||
(Christian Brabandt, 2016 Jul 23)
|
||||
|
||||
Patch to introduce 'cmdencoding'. (Ken Takata, Aug 18?)
|
||||
Better help Aug 19.
|
||||
Problem: applies to too many commands, such as :cbuffer.
|
||||
Should there be a different value for :make and :grep?
|
||||
Win32: When running ":make" and 'encoding' differs from the system locale,
|
||||
the output should be converted. Esp. when 'encoding' is "utf-8". (Yongwei
|
||||
Wu) Should we use 'termencoding' for this?
|
||||
|
||||
Patch to have text objects defined by arbitrary single characters. (Daniel
|
||||
Thau, 2013 Nov 20, 2014 Jan 29, 2014 Jan 31)
|
||||
Added tests (James McCoy, 2016 Aug 3). Still needs more work.
|
||||
|
||||
Patch to add CTRL-N / CTRL-P while searching. (Christian Brabandt, 2016 Aug
|
||||
3) Problem: two matches in one line and using CTRL-P does not move back.
|
||||
|
||||
Access to uninitialized memory in match_backref() regexp_nda.c:4882
|
||||
(Dominique Pelle, 2015 Nov 6)
|
||||
|
||||
@@ -341,9 +316,6 @@ Patch to avoid redrawing tabline when the popup menu is visible.
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
@@ -422,6 +394,10 @@ inconsistent with the documentation.
|
||||
Can we cache the syntax attributes, so that updates for 'relativenumber' and
|
||||
'cursorline'/'cursorcolumn' are a lot faster?
|
||||
|
||||
C highlighting: modern C allows: /* comment */ #ifdef
|
||||
and also line continuation after #include.
|
||||
I can't recommend it though.
|
||||
|
||||
Build with Python on Mac does not always use the right library.
|
||||
(Kazunobu Kuriyama, 2015 Mar 28)
|
||||
|
||||
@@ -540,7 +516,7 @@ Mixup of highlighting when there is a match and SpellBad. (ZyX, 2015 Jan 1)
|
||||
Patch for drag&drop reordering of GUI tab pages reordering.
|
||||
(Ken Takata, 2013 Nov 22, second one, also by Masamichi Abe)
|
||||
Now on Git: https://gist.github.com/nocd5/165286495c782b815b94
|
||||
Update 2016 Mar 15.
|
||||
Update 2016 Aug 10.
|
||||
|
||||
Patch on Issue 72: 'autochdir' causes problems for :vimgrep.
|
||||
|
||||
@@ -560,9 +536,6 @@ any one-character from the previous line. (Kartik Agaram, 2014 Sep 19)
|
||||
|
||||
Syntax highlighting slow (hangs) in SASS file. (Niek Bosch, 2013 Aug 21)
|
||||
|
||||
Patch to add the EndOfBuffer highlight group, used instead of NonText for "~"
|
||||
lines. (Marco Hinz, 2014 Nov 2)
|
||||
|
||||
Adding "~" to 'cdpath' doesn't work for completion? (Davido, 2013 Aug 19)
|
||||
|
||||
Should be easy to highlight all matches with 'incsearch'. Idea by Itchyny,
|
||||
@@ -571,8 +544,6 @@ Should be easy to highlight all matches with 'incsearch'. Idea by Itchyny,
|
||||
Wrong scrolling when using incsearch. Patch by Christian Brabandt, 2014 Dec 4.
|
||||
Is this a good solution?
|
||||
|
||||
Patch to add /pattern/ to :oldfiles. Pull #575.
|
||||
|
||||
Patch: Let rare word highlighting overrule good word highlighting.
|
||||
(Jakson A. Aquino, 2010 Jul 30, again 2011 Jul 2)
|
||||
|
||||
@@ -646,8 +617,7 @@ 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.
|
||||
Saito, 2013 Apr 24) Update 2016 Aug 12.
|
||||
Also see issue #609.
|
||||
We could add the enable/disable sequences to t_ti/t_te or t_ks/t_ke.
|
||||
|
||||
@@ -776,9 +746,6 @@ Patch by Thomas Tuegel, also for GTK, 2013 Nov 24
|
||||
Patch to add funcref to Lua. (Luis Carvalho, 2013 Sep 4)
|
||||
With tests: Sep 5.
|
||||
|
||||
Patch to fix that on suckless Terminal mousewheel up does not work.
|
||||
(Ralph Eastwood, 2013 Nov 25)
|
||||
|
||||
Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10)
|
||||
|
||||
Checking runtime scripts: Thilo Six, 2012 Jun 6.
|
||||
@@ -871,9 +838,6 @@ Improve the installer for MS-Windows. There are a few alternatives:
|
||||
Problem: they all work slightly different (e.g. don't install vimrun.exe).
|
||||
How to test that it works well for all Vim users?
|
||||
|
||||
Patch to check whether a buffer is quickfix or a location list.
|
||||
(Yasuhiro Matsumoto, 2014 Dec 9)
|
||||
|
||||
Patch to make fold updates much faster. (Christian Brabandt, 2012 Dec)
|
||||
|
||||
Issue 54: document behavior of -complete, also expands arg.
|
||||
@@ -1383,7 +1347,7 @@ https://scan.coverity.com/projects/241
|
||||
Patch to support :undo absolute jump to file save number. (Christian Brabandt,
|
||||
2010 Nov 5)
|
||||
|
||||
Patch to use 'foldnextmax' also for "marker" foldmethod. (Arnaud Lacombe, 2011
|
||||
Patch to use 'foldnestmax' also for "marker" foldmethod. (Arnaud Lacombe, 2011
|
||||
Jan 7)
|
||||
|
||||
Bug with 'incsearch' going to wrong line. (Wolfram Kresse, 2009 Aug 17)
|
||||
@@ -2251,10 +2215,6 @@ only set after Visual moded is ended.
|
||||
Also add a variable for the Visual mode. So that this mode and '< '> can be
|
||||
used to set what "gv" selects. (Ben Schmidt)
|
||||
|
||||
Win32: When running ":make" and 'encoding' differs from the system locale, the
|
||||
output should be converted. Esp. when 'encoding' is "utf-8". (Yongwei Wu)
|
||||
Should we use 'termencoding' for this?
|
||||
|
||||
Win32, NTFS: When editing a specific infostream directly and 'backupcopy' is
|
||||
"auto" should detect this situation and work like 'backupcopy' is "yes". File
|
||||
name is something like "c:\path\foo.txt:bar", includes a colon. (Alex
|
||||
@@ -2452,9 +2412,6 @@ Awaiting updated patches:
|
||||
done for filetype detection. Patch from Walter Briscoe, 2003 Jul 1.
|
||||
7 Add a "-@ filelist" argument: read file names from a file. (David
|
||||
Kotchan has a patch for it)
|
||||
8 Include a connection to an external program through a pipe? See
|
||||
patches from Felbinger for a mathematica interface.
|
||||
Or use emacs server kind of thing?
|
||||
7 Add ":justify" command. Patch from Vit Stradal 2002 Nov 25.
|
||||
- findmatch() should be adjusted for Lisp. See remark at
|
||||
get_lisp_indent(). Esp. \( and \) should be skipped. (Dorai Sitaram,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 7.4. Last change: 2016 Jul 24
|
||||
*usr_41.txt* For Vim version 7.4. Last change: 2016 Aug 07
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -803,6 +803,9 @@ Buffers, windows and the argument list:
|
||||
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
|
||||
getbufinfo() get a list with buffer information
|
||||
gettabinfo() get a list with tab page information
|
||||
getwininfo() get a list with window information
|
||||
|
||||
Command line: *command-line-functions*
|
||||
getcmdline() get the current command line
|
||||
@@ -957,7 +960,10 @@ Jobs: *job-functions*
|
||||
|
||||
Timers: *timer-functions*
|
||||
timer_start() create a timer
|
||||
timer_pause() pause or unpause a timer
|
||||
timer_stop() stop a timer
|
||||
timer_stopall() stop all timers
|
||||
timer_info() get information about timers
|
||||
|
||||
Various: *various-functions*
|
||||
mode() get current editing mode
|
||||
|
||||
+24
-1
@@ -1,4 +1,4 @@
|
||||
*various.txt* For Vim version 7.4. Last change: 2016 Jul 29
|
||||
*various.txt* For Vim version 7.4. Last change: 2016 Aug 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -91,6 +91,8 @@ g8 Print the hex values of the bytes used in the
|
||||
on paper see |:hardcopy|. In the GUI you can use the
|
||||
File.Print menu entry.
|
||||
See |ex-flags| for [flags].
|
||||
The |:filter| command can be used to only show lines
|
||||
matching a pattern.
|
||||
|
||||
:[range]p[rint] {count} [flags]
|
||||
Print {count} lines, starting with [range] (default
|
||||
@@ -527,6 +529,27 @@ N *+X11* Unix only: can restore window title |X11|
|
||||
|
||||
:redi[r] END End redirecting messages. {not in Vi}
|
||||
|
||||
*:filt* *:filter*
|
||||
:filt[er] {pat} {command}
|
||||
:filt[er] /{pat}/ {command}
|
||||
Restrict the output of {command} to matches with {pat}.
|
||||
For example, to list only xml files: >
|
||||
:filter /\.xml$/ oldfiles
|
||||
<
|
||||
{pat} is a Vim search pattern. Instead of enclosing
|
||||
it in / any non-ID character (see |'isident'|) can be
|
||||
used, so long as it does not appear in {pat}. Without
|
||||
the enclosing character the pattern cannot include the
|
||||
bar character.
|
||||
|
||||
The pattern is matched against the relevant part of
|
||||
the output, not necessarily the whole line. Only some
|
||||
commands support filtering, try it out to check if it
|
||||
works.
|
||||
|
||||
Only normal messages are filtered, error messages are
|
||||
not.
|
||||
|
||||
*:sil* *:silent* *:silent!*
|
||||
:sil[ent][!] {command} Execute {command} silently. Normal messages will not
|
||||
be given or added to the message history.
|
||||
|
||||
@@ -4028,7 +4028,7 @@ Solution: Check for NULL pointer returned from mch_open().
|
||||
Files: src/if_cscope.c
|
||||
|
||||
Patch 7.0.154
|
||||
Problem: When 'foldnextmax' is negative Vim can hang. (James Vega)
|
||||
Problem: When 'foldnestmax' is negative Vim can hang. (James Vega)
|
||||
Solution: Avoid the fold level becoming negative.
|
||||
Files: src/fold.c, src/syntax.c
|
||||
|
||||
|
||||
+1120
-53
File diff suppressed because it is too large
Load Diff
+14
-2
@@ -1,4 +1,4 @@
|
||||
*vi_diff.txt* For Vim version 7.4. Last change: 2016 Feb 12
|
||||
*vi_diff.txt* For Vim version 7.4. Last change: 2016 Aug 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -147,7 +147,7 @@ Support for different systems.
|
||||
resource usage, esp. on MS-DOS. For some outdated systems you need to
|
||||
use an older Vim version.
|
||||
|
||||
Multi level undo. |undo|
|
||||
Multi level persistent undo. |undo|
|
||||
'u' goes backward in time, 'CTRL-R' goes forward again. Set option
|
||||
'undolevels' to the number of changes to be remembered (default 1000).
|
||||
Set 'undolevels' to 0 for a Vi-compatible one level undo. Set it to
|
||||
@@ -158,6 +158,9 @@ Multi level undo. |undo|
|
||||
create a branch in the undo tree. This means you can go back to any
|
||||
state of the text, there is no risk of a change causing text to be
|
||||
lost forever. |undo-tree|
|
||||
The undo information is stored in a file when the 'undofile' option is
|
||||
set. This means you can exit Vim, start Vim on a previously edited
|
||||
file and undo changes that were made before exiting Vim.
|
||||
|
||||
Graphical User Interface (GUI). |gui|
|
||||
Included support for GUI: menu's, mouse, scrollbars, etc. You can
|
||||
@@ -212,6 +215,15 @@ Plugins. |add-plugin|
|
||||
right directory. That's an easy way to start using Vim scripts
|
||||
written by others. Plugins can be for all kind of files, or
|
||||
specifically for a filetype.
|
||||
Packages make this even easier. |packages|
|
||||
|
||||
Asynchronous communication and timers. |channel| |job| |timer|
|
||||
Vim can exchange messages with other processes in the background.
|
||||
This makes it possible to have servers do work and send back the
|
||||
results to Vim. |channel|
|
||||
Vim can start a job, communicate with it and stop it. |job|
|
||||
Timers can fire once or repeatedly and invoke a function to do any
|
||||
work. |timer|
|
||||
|
||||
Repeat a series of commands. |q|
|
||||
"q{c}" starts recording typed characters into named register {c}.
|
||||
|
||||
+1
-1
@@ -222,7 +222,7 @@ OPTIONS
|
||||
|
||||
-R Read-only mode. The 'readonly' option will be set. You
|
||||
can still edit the buffer, but will be prevented from acci‐
|
||||
dently overwriting a file. If you do want to overwrite a
|
||||
dentally overwriting a file. If you do want to overwrite a
|
||||
file, add an exclamation mark to the Ex command, as in
|
||||
":w!". The -R option also implies the -n option (see
|
||||
below). The 'readonly' option can be reset with ":set
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 7.4. Last change: 2016 Jul 30
|
||||
*windows.txt* For Vim version 7.4. Last change: 2016 Aug 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -75,7 +75,7 @@ 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.
|
||||
|
||||
*window-ID* *winid* *windowid*
|
||||
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
|
||||
@@ -1042,6 +1042,10 @@ list of buffers. |unlisted-buffer|
|
||||
h+ hidden buffers which are modified
|
||||
a+ active buffers which are modified
|
||||
|
||||
When using |:filter| the pattern is matched against the
|
||||
displayed buffer name, e.g.: >
|
||||
filter /\.vim/ ls
|
||||
<
|
||||
*:bad* *:badd*
|
||||
:bad[d] [+lnum] {fname}
|
||||
Add file name {fname} to the buffer list, without loading it.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2016 Jul 21
|
||||
" Last Change: 2016 Aug 26
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -692,8 +692,8 @@ func! s:FTe()
|
||||
let n = 1
|
||||
while n < 100 && n < line("$")
|
||||
if getline(n) =~ "^\\s*\\(<'\\|'>\\)\\s*$"
|
||||
setf specman
|
||||
return
|
||||
setf specman
|
||||
return
|
||||
endif
|
||||
let n = n + 1
|
||||
endwhile
|
||||
@@ -779,8 +779,7 @@ au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
|
||||
au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
|
||||
|
||||
" Git
|
||||
au BufNewFile,BufRead COMMIT_EDITMSG setf gitcommit
|
||||
au BufNewFile,BufRead MERGE_MSG setf gitcommit
|
||||
au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
|
||||
au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig
|
||||
au BufNewFile,BufRead *.git/modules/*/config setf gitconfig
|
||||
au BufNewFile,BufRead */.config/git/config setf gitconfig
|
||||
@@ -1781,6 +1780,9 @@ au BufNewFile,BufRead *.sass setf sass
|
||||
" Sather
|
||||
au BufNewFile,BufRead *.sa setf sather
|
||||
|
||||
" Scala
|
||||
au BufNewFile,BufRead *.scala setf scala
|
||||
|
||||
" Scilab
|
||||
au BufNewFile,BufRead *.sci,*.sce setf scilab
|
||||
|
||||
@@ -2053,7 +2055,7 @@ func! s:FTRules()
|
||||
if line =~ s:ft_rules_udev_rules_pattern
|
||||
let udev_rules = substitute(line, s:ft_rules_udev_rules_pattern, '\1', "")
|
||||
if dir == udev_rules
|
||||
setf udevrules
|
||||
setf udevrules
|
||||
endif
|
||||
break
|
||||
endif
|
||||
@@ -2302,7 +2304,7 @@ au BufNewFile,BufRead */etc/updatedb.conf setf updatedb
|
||||
au BufNewFile,BufRead */usr/share/upstart/*.conf setf upstart
|
||||
au BufNewFile,BufRead */usr/share/upstart/*.override setf upstart
|
||||
au BufNewFile,BufRead */etc/init/*.conf,*/etc/init/*.override setf upstart
|
||||
au BufNewFile,BufRead */.init/*.conf,*/.init/*.override setf upstart
|
||||
au BufNewFile,BufRead */.init/*.conf,*/.init/*.override setf upstart
|
||||
au BufNewFile,BufRead */.config/upstart/*.conf setf upstart
|
||||
au BufNewFile,BufRead */.config/upstart/*.override setf upstart
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: R help file
|
||||
" Language: R Markdown file
|
||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Tue Apr 07, 2015 04:37PM
|
||||
" Original work by Alex Zvoleff (adjusted for rmd by Michel Kuhlmann)
|
||||
" Last Change: Mon Jun 06, 2016 09:41PM
|
||||
" Original work by Alex Zvoleff (adjusted from R help for rmd by Michel Kuhlmann)
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -12,6 +12,16 @@ endif
|
||||
|
||||
runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
|
||||
|
||||
" Nvim-R plugin needs this
|
||||
if exists("*CompleteR")
|
||||
if &omnifunc == "CompleteR"
|
||||
let b:rplugin_nonr_omnifunc = ""
|
||||
else
|
||||
let b:rplugin_nonr_omnifunc = &omnifunc
|
||||
endif
|
||||
set omnifunc=CompleteR
|
||||
endif
|
||||
|
||||
setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s
|
||||
setlocal formatoptions+=tcqln
|
||||
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Scala
|
||||
" Maintainer: Derek Wyatt
|
||||
" URL: https://github.com/derekwyatt/vim-scala
|
||||
" License: Same as Vim
|
||||
" Last Change: 02 August 2016
|
||||
" ----------------------------------------------------------------------------
|
||||
|
||||
if exists('b:did_ftplugin') || &cp
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
" j is fairly new in Vim, so don't complain if it's not there
|
||||
setlocal formatoptions-=t formatoptions+=croqnl
|
||||
silent! setlocal formatoptions+=j
|
||||
|
||||
" Just like c.vim, but additionally doesn't wrap text onto /** line when
|
||||
" formatting. Doesn't bungle bulleted lists when formatting.
|
||||
if get(g:, 'scala_scaladoc_indent', 0)
|
||||
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s2:/**,mb:*,ex:*/,s1:/*,mb:*,ex:*/,://
|
||||
else
|
||||
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/**,mb:*,ex:*/,s1:/*,mb:*,ex:*/,://
|
||||
endif
|
||||
setlocal commentstring=//\ %s
|
||||
|
||||
setlocal shiftwidth=2 softtabstop=2 expandtab
|
||||
|
||||
setlocal include='^\s*import'
|
||||
setlocal includeexpr='substitute(v:fname,"\\.","/","g")'
|
||||
|
||||
setlocal path+=src/main/scala,src/test/scala
|
||||
setlocal suffixesadd=.scala
|
||||
|
||||
compiler sbt
|
||||
|
||||
" vim:set sw=2 sts=2 ts=8 et:
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
|
||||
" Version: 0.44
|
||||
" Last Change: 2016 Jan. 26
|
||||
" Version: 0.45
|
||||
" Last Change: 2016 Aug. 18
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
||||
" Usage: For instructions, do :help fortran-indent from Vim
|
||||
" Credits:
|
||||
@@ -121,7 +121,7 @@ function FortranGetIndent(lnum)
|
||||
let prefix='\(\(pure\|impure\|elemental\|recursive\)\s\+\)\{,2}'
|
||||
let type='\(\(integer\|real\|double\s\+precision\|complex\|logical'
|
||||
\.'\|character\|type\|class\)\s*\S*\s\+\)\='
|
||||
if prevstat =~? '^\s*\(module\|contains\|program\)\>'
|
||||
if prevstat =~? '^\s*\(module\|contains\/submodule\|program\)\>'
|
||||
\ ||prevstat =~? '^\s*'.prefix.'subroutine\>'
|
||||
\ ||prevstat =~? '^\s*'.prefix.type.'function\>'
|
||||
\ ||prevstat =~? '^\s*'.type.prefix.'function\>'
|
||||
@@ -129,14 +129,14 @@ function FortranGetIndent(lnum)
|
||||
endif
|
||||
if getline(v:lnum) =~? '^\s*contains\>'
|
||||
\ ||getline(v:lnum)=~? '^\s*end\s*'
|
||||
\ .'\(function\|subroutine\|module\|program\)\>'
|
||||
\ .'\(function\|subroutine\|module\/submodule\|program\)\>'
|
||||
let ind = ind - shiftwidth()
|
||||
endif
|
||||
endif
|
||||
|
||||
"Subtract a shiftwidth from else, else if, elsewhere, case, end if,
|
||||
" end where, end select, end forall, end interface, end associate,
|
||||
" end enum, and end type statements
|
||||
" end enum, end type, end block and end type statements
|
||||
if getline(v:lnum) =~? '^\s*\(\d\+\s\)\=\s*'
|
||||
\. '\(else\|else\s*if\|else\s*where\|case\|'
|
||||
\. 'end\s*\(if\|where\|select\|interface\|'
|
||||
|
||||
+186
-10
@@ -1,18 +1,194 @@
|
||||
" Vim indent file
|
||||
" Language: Javascript
|
||||
" Maintainer: Going to be Darrick Wiebe
|
||||
" Last Change: 2015 Jun 09
|
||||
" Language: Javascript
|
||||
" Maintainer: Chris Paul ( https://github.com/bounceme )
|
||||
" URL: https://github.com/pangloss/vim-javascript
|
||||
" Last Change: August 25, 2016
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
if exists('b:did_indent')
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
" C indenting is not too bad.
|
||||
setlocal cindent
|
||||
" Now, set up our indentation expression and keys that trigger it.
|
||||
setlocal indentexpr=GetJavascriptIndent()
|
||||
setlocal nolisp noautoindent nosmartindent
|
||||
setlocal indentkeys=0{,0},0),0],:,!^F,o,O,e
|
||||
setlocal cinoptions+=j1,J1
|
||||
setlocal cinkeys-=0#
|
||||
setlocal cinkeys+=0]
|
||||
|
||||
let b:undo_indent = "setl cin<"
|
||||
let b:undo_indent = 'setlocal indentexpr< smartindent< autoindent< indentkeys< cinoptions<'
|
||||
|
||||
" Only define the function once.
|
||||
if exists('*GetJavascriptIndent')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Get shiftwidth value
|
||||
if exists('*shiftwidth')
|
||||
function s:sw()
|
||||
return shiftwidth()
|
||||
endfunction
|
||||
else
|
||||
function s:sw()
|
||||
return &sw
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:line_pre = '^\s*\%(\%(\%(\/\*.\{-}\)\=\*\+\/\s*\)\=\)\@>'
|
||||
let s:expr_case = s:line_pre . '\%(\%(case\>.\+\)\|default\)\s*:'
|
||||
" Regex of syntax group names that are or delimit string or are comments.
|
||||
let s:syng_strcom = '\%(s\%(tring\|pecial\)\|comment\|regex\|doc\|template\)'
|
||||
|
||||
" Regex of syntax group names that are strings or documentation.
|
||||
let s:syng_comment = '\%(comment\|doc\)'
|
||||
|
||||
" Expression used to check whether we should skip a match with searchpair().
|
||||
let s:skip_expr = "synIDattr(synID(line('.'),col('.'),0),'name') =~? '".s:syng_strcom."'"
|
||||
|
||||
if has('reltime')
|
||||
function s:GetPair(start,end,flags,time)
|
||||
return searchpair(a:start,'',a:end,a:flags,s:skip_expr,max([prevnonblank(v:lnum) - 2000,0]),a:time)
|
||||
endfunction
|
||||
else
|
||||
function s:GetPair(start,end,flags,n)
|
||||
return searchpair(a:start,'',a:end,a:flags,0,max([prevnonblank(v:lnum) - 2000,0]))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:line_term = '\s*\%(\%(\/\%(\%(\*.\{-}\*\/\)\|\%(\*\+\)\)\)\s*\)\=$'
|
||||
|
||||
" configurable regexes that define continuation lines, not including (, {, or [.
|
||||
if !exists('g:javascript_opfirst')
|
||||
let g:javascript_opfirst = '\%([<>,:?^%|*&]\|\/[^/*]\|\([-.+]\)\1\@!\|=>\@!\|in\%(stanceof\)\=\>\)'
|
||||
endif
|
||||
if !exists('g:javascript_continuation')
|
||||
let g:javascript_continuation = '\%([<=,.?/*:^%|&]\|+\@<!+\|-\@<!-\|=\@<!>\|\<in\%(stanceof\)\=\)'
|
||||
endif
|
||||
|
||||
let g:javascript_opfirst = s:line_pre . g:javascript_opfirst
|
||||
let g:javascript_continuation .= s:line_term
|
||||
|
||||
function s:OneScope(lnum,text,add)
|
||||
return a:text =~# '\%(\<else\|\<do\|=>\)' . s:line_term ? 'no b' :
|
||||
\ ((a:add && a:text =~ s:line_pre . '$' && search('\%' . s:PrevCodeLine(a:lnum - 1) . 'l.)' . s:line_term)) ||
|
||||
\ cursor(a:lnum, match(a:text, ')' . s:line_term)) > -1) &&
|
||||
\ s:GetPair('(', ')', 'cbW', 100) > 0 && search('\C\l\+\_s*\%#','bW') &&
|
||||
\ (a:add || ((expand('<cword>') !=# 'while' || !s:GetPair('\C\<do\>', '\C\<while\>','nbW',100)) &&
|
||||
\ (expand('<cword>') !=# 'each' || search('\C\<for\_s\+\%#','nbW')))) ? expand('<cword>') : ''
|
||||
endfunction
|
||||
|
||||
" https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader
|
||||
function s:IsBlock()
|
||||
return getline(line('.'))[col('.')-1] == '{' && !search(
|
||||
\ '\C\%(\<return\s*\|\%([-=~!<*+,.?^%|&\[(]\|=\@<!>\|\*\@<!\/\|\<\%(var\|const\|let\|import\|export\%(\_s\+default\)\=\|yield\|delete\|void\|t\%(ypeof\|hrow\)\|new\|in\%(stanceof\)\=\)\)\_s*\)\%#','bnW') &&
|
||||
\ (!search(':\_s*\%#','bW') || (!s:GetPair('[({[]','[])}]','bW',200) || s:IsBlock()))
|
||||
endfunction
|
||||
|
||||
" Auxiliary Functions {{{2
|
||||
|
||||
" Find line above 'lnum' that isn't empty, in a comment, or in a string.
|
||||
function s:PrevCodeLine(lnum)
|
||||
let l:lnum = prevnonblank(a:lnum)
|
||||
while l:lnum
|
||||
if synIDattr(synID(l:lnum,matchend(getline(l:lnum), '^\s*[^''"]'),0),'name') !~? s:syng_strcom
|
||||
return l:lnum
|
||||
endif
|
||||
let l:lnum = prevnonblank(l:lnum - 1)
|
||||
endwhile
|
||||
endfunction
|
||||
|
||||
" Check if line 'lnum' has a balanced amount of parentheses.
|
||||
function s:Balanced(lnum)
|
||||
let [open_0,open_2,open_4] = [0,0,0]
|
||||
let l:line = getline(a:lnum)
|
||||
let pos = match(l:line, '[][(){}]', 0)
|
||||
while pos != -1
|
||||
if synIDattr(synID(a:lnum,pos + 1,0),'name') !~? s:syng_strcom
|
||||
let idx = stridx('(){}[]', l:line[pos])
|
||||
if idx % 2 == 0
|
||||
let open_{idx} = open_{idx} + 1
|
||||
else
|
||||
let open_{idx - 1} = open_{idx - 1} - 1
|
||||
endif
|
||||
endif
|
||||
let pos = match(l:line, '[][(){}]', pos + 1)
|
||||
endwhile
|
||||
return (!open_4 + !open_2 + !open_0) - 2
|
||||
endfunction
|
||||
" }}}
|
||||
|
||||
function GetJavascriptIndent()
|
||||
if !exists('b:js_cache')
|
||||
let b:js_cache = [0,0,0]
|
||||
endif
|
||||
" Get the current line.
|
||||
let l:line = getline(v:lnum)
|
||||
let syns = synIDattr(synID(v:lnum, 1, 0), 'name')
|
||||
|
||||
" start with strings,comments,etc.{{{2
|
||||
if (l:line !~ '^[''"`]' && syns =~? '\%(string\|template\)') ||
|
||||
\ (l:line !~ '^\s*[/*]' && syns =~? s:syng_comment)
|
||||
return -1
|
||||
endif
|
||||
if l:line !~ '^\%(\/\*\|\s*\/\/\)' && syns =~? s:syng_comment
|
||||
return cindent(v:lnum)
|
||||
endif
|
||||
let l:lnum = s:PrevCodeLine(v:lnum - 1)
|
||||
if l:lnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
if (l:line =~# s:expr_case)
|
||||
let cpo_switch = &cpo
|
||||
set cpo+=%
|
||||
let ind = cindent(v:lnum)
|
||||
let &cpo = cpo_switch
|
||||
return ind
|
||||
endif
|
||||
"}}}
|
||||
|
||||
" the containing paren, bracket, curly. Memoize, last lineNr either has the
|
||||
" same scope or starts a new one, unless if it closed a scope.
|
||||
call cursor(v:lnum,1)
|
||||
if b:js_cache[0] >= l:lnum && b:js_cache[0] < v:lnum && b:js_cache[0] &&
|
||||
\ (b:js_cache[0] > l:lnum || s:Balanced(l:lnum) > 0)
|
||||
let num = b:js_cache[1]
|
||||
elseif syns != '' && l:line[0] =~ '\s'
|
||||
let pattern = syns =~? 'block' ? ['{','}'] : syns =~? 'jsparen' ? ['(',')'] :
|
||||
\ syns =~? 'jsbracket'? ['\[','\]'] : ['[({[]','[])}]']
|
||||
let num = s:GetPair(pattern[0],pattern[1],'bW',2000)
|
||||
else
|
||||
let num = s:GetPair('[({[]','[])}]','bW',2000)
|
||||
endif
|
||||
let b:js_cache = [v:lnum,num,line('.') == v:lnum ? b:js_cache[2] : col('.')]
|
||||
|
||||
if l:line =~ s:line_pre . '[])}]'
|
||||
return indent(num)
|
||||
endif
|
||||
|
||||
call cursor(b:js_cache[1],b:js_cache[2])
|
||||
|
||||
let swcase = getline(l:lnum) =~# s:expr_case
|
||||
let pline = swcase ? getline(l:lnum) : substitute(getline(l:lnum), '\%(:\@<!\/\/.*\)$', '','')
|
||||
let inb = num == 0 || num < l:lnum && ((l:line !~ s:line_pre . ',' && pline !~ ',' . s:line_term) || s:IsBlock())
|
||||
let switch_offset = num == 0 || s:OneScope(num, strpart(getline(num),0,b:js_cache[2] - 1),1) !=# 'switch' ? 0 :
|
||||
\ &cino !~ ':' || !has('float') ? s:sw() :
|
||||
\ float2nr(str2float(matchstr(&cino,'.*:\zs[-0-9.]*')) * (&cino =~# '.*:[^,]*s' ? s:sw() : 1))
|
||||
|
||||
" most significant, find the indent amount
|
||||
if inb && !swcase && ((l:line =~# g:javascript_opfirst || pline =~# g:javascript_continuation) ||
|
||||
\ num < l:lnum && s:OneScope(l:lnum,pline,0) =~# '\<\%(for\|each\|if\|let\|no\sb\|w\%(hile\|ith\)\)\>' &&
|
||||
\ l:line !~ s:line_pre . '{')
|
||||
return (num > 0 ? indent(num) : -s:sw()) + (s:sw() * 2) + switch_offset
|
||||
elseif num > 0
|
||||
return indent(num) + s:sw() + switch_offset
|
||||
endif
|
||||
|
||||
endfunction
|
||||
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Rnoweb
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Tue Apr 07, 2015 04:38PM
|
||||
" Last Change: Fri Apr 15, 2016 10:58PM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
@@ -10,7 +10,17 @@ if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
runtime indent/tex.vim
|
||||
let s:TeXIndent = function(substitute(&indentexpr, "()", "", ""))
|
||||
|
||||
function! s:NoTeXIndent()
|
||||
return indent(line("."))
|
||||
endfunction
|
||||
|
||||
if &indentexpr == "" || &indentexpr == "GetRnowebIndent()"
|
||||
let s:TeXIndent = function("s:NoTeXIndent")
|
||||
else
|
||||
let s:TeXIndent = function(substitute(&indentexpr, "()", "", ""))
|
||||
endif
|
||||
|
||||
unlet b:did_indent
|
||||
runtime indent/r.vim
|
||||
let s:RIndent = function(substitute(&indentexpr, "()", "", ""))
|
||||
|
||||
@@ -0,0 +1,609 @@
|
||||
" Vim indent file
|
||||
" Language: Scala (http://scala-lang.org/)
|
||||
" Original Author: Stefan Matthias Aust
|
||||
" Modifications By: Derek Wyatt
|
||||
" URL: https://github.com/derekwyatt/vim-scala
|
||||
" Last Change: 2016 Aug 26
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal autoindent
|
||||
setlocal indentexpr=GetScalaIndent()
|
||||
setlocal indentkeys=0{,0},0),!^F,<>>,o,O,e,=case,<CR>
|
||||
|
||||
if exists("*GetScalaIndent")
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
let s:defMatcher = '\%(\%(private\|protected\)\%(\[[^\]]*\]\)\?\s\+\|abstract\s\+\|override\s\+\)*\<def\>'
|
||||
let s:funcNameMatcher = '\w\+'
|
||||
let s:typeSpecMatcher = '\%(\s*\[\_[^\]]*\]\)'
|
||||
let s:defArgMatcher = '\%((\_.\{-})\)'
|
||||
let s:returnTypeMatcher = '\%(:\s*\w\+' . s:typeSpecMatcher . '\?\)'
|
||||
let g:fullDefMatcher = '^\s*' . s:defMatcher . '\s\+' . s:funcNameMatcher . '\s*' . s:typeSpecMatcher . '\?\s*' . s:defArgMatcher . '\?\s*' . s:returnTypeMatcher . '\?\s*[={]'
|
||||
|
||||
function! scala#ConditionalConfirm(msg)
|
||||
if 0
|
||||
call confirm(a:msg)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! scala#GetLine(lnum)
|
||||
let line = substitute(getline(a:lnum), '//.*$', '', '')
|
||||
let line = substitute(line, '"\(.\|\\"\)\{-}"', '""', 'g')
|
||||
return line
|
||||
endfunction
|
||||
|
||||
function! scala#CountBrackets(line, openBracket, closedBracket)
|
||||
let line = substitute(a:line, '"\(.\|\\"\)\{-}"', '', 'g')
|
||||
let open = substitute(line, '[^' . a:openBracket . ']', '', 'g')
|
||||
let close = substitute(line, '[^' . a:closedBracket . ']', '', 'g')
|
||||
return strlen(open) - strlen(close)
|
||||
endfunction
|
||||
|
||||
function! scala#CountParens(line)
|
||||
return scala#CountBrackets(a:line, '(', ')')
|
||||
endfunction
|
||||
|
||||
function! scala#CountCurlies(line)
|
||||
return scala#CountBrackets(a:line, '{', '}')
|
||||
endfunction
|
||||
|
||||
function! scala#LineEndsInIncomplete(line)
|
||||
if a:line =~ '[.,]\s*$'
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! scala#LineIsAClosingXML(line)
|
||||
if a:line =~ '^\s*</\w'
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! scala#LineCompletesXML(lnum, line)
|
||||
let savedpos = getpos('.')
|
||||
call setpos('.', [savedpos[0], a:lnum, 0, savedpos[3]])
|
||||
let tag = substitute(a:line, '^.*</\([^>]*\)>.*$', '\1', '')
|
||||
let [lineNum, colnum] = searchpairpos('<' . tag . '>', '', '</' . tag . '>', 'Wbn')
|
||||
call setpos('.', savedpos)
|
||||
let pline = scala#GetLine(prevnonblank(lineNum - 1))
|
||||
if pline =~ '=\s*$'
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! scala#IsParentCase()
|
||||
let savedpos = getpos('.')
|
||||
call setpos('.', [savedpos[0], savedpos[1], 0, savedpos[3]])
|
||||
let [l, c] = searchpos('^\s*\%(' . s:defMatcher . '\|\%(\<case\>\)\)', 'bnW')
|
||||
let retvalue = -1
|
||||
if l != 0 && search('\%' . l . 'l\s*\<case\>', 'bnW')
|
||||
let retvalue = l
|
||||
endif
|
||||
call setpos('.', savedpos)
|
||||
return retvalue
|
||||
endfunction
|
||||
|
||||
function! scala#CurlyMatcher()
|
||||
let matchline = scala#GetLineThatMatchesBracket('{', '}')
|
||||
if scala#CountParens(scala#GetLine(matchline)) < 0
|
||||
let savedpos = getpos('.')
|
||||
call setpos('.', [savedpos[0], matchline, 9999, savedpos[3]])
|
||||
call searchpos('{', 'Wbc')
|
||||
call searchpos(')', 'Wb')
|
||||
let [lnum, colnum] = searchpairpos('(', '', ')', 'Wbn')
|
||||
call setpos('.', savedpos)
|
||||
let line = scala#GetLine(lnum)
|
||||
if line =~ '^\s*' . s:defMatcher
|
||||
return lnum
|
||||
else
|
||||
return matchline
|
||||
endif
|
||||
else
|
||||
return matchline
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! scala#GetLineAndColumnThatMatchesCurly()
|
||||
return scala#GetLineAndColumnThatMatchesBracket('{', '}')
|
||||
endfunction
|
||||
|
||||
function! scala#GetLineAndColumnThatMatchesParen()
|
||||
return scala#GetLineAndColumnThatMatchesBracket('(', ')')
|
||||
endfunction
|
||||
|
||||
function! scala#GetLineAndColumnThatMatchesBracket(openBracket, closedBracket)
|
||||
let savedpos = getpos('.')
|
||||
let curline = scala#GetLine(line('.'))
|
||||
if curline =~ a:closedBracket . '.*' . a:openBracket . '.*' . a:closedBracket
|
||||
call setpos('.', [savedpos[0], savedpos[1], 0, savedpos[3]])
|
||||
call searchpos(a:closedBracket . '\ze[^' . a:closedBracket . a:openBracket . ']*' . a:openBracket, 'W')
|
||||
else
|
||||
call setpos('.', [savedpos[0], savedpos[1], 9999, savedpos[3]])
|
||||
call searchpos(a:closedBracket, 'Wbc')
|
||||
endif
|
||||
let [lnum, colnum] = searchpairpos(a:openBracket, '', a:closedBracket, 'Wbn')
|
||||
call setpos('.', savedpos)
|
||||
return [lnum, colnum]
|
||||
endfunction
|
||||
|
||||
function! scala#GetLineThatMatchesCurly()
|
||||
return scala#GetLineThatMatchesBracket('{', '}')
|
||||
endfunction
|
||||
|
||||
function! scala#GetLineThatMatchesParen()
|
||||
return scala#GetLineThatMatchesBracket('(', ')')
|
||||
endfunction
|
||||
|
||||
function! scala#GetLineThatMatchesBracket(openBracket, closedBracket)
|
||||
let [lnum, colnum] = scala#GetLineAndColumnThatMatchesBracket(a:openBracket, a:closedBracket)
|
||||
return lnum
|
||||
endfunction
|
||||
|
||||
function! scala#NumberOfBraceGroups(line)
|
||||
let line = substitute(a:line, '[^()]', '', 'g')
|
||||
if strlen(line) == 0
|
||||
return 0
|
||||
endif
|
||||
let line = substitute(line, '^)*', '', 'g')
|
||||
if strlen(line) == 0
|
||||
return 0
|
||||
endif
|
||||
let line = substitute(line, '^(', '', 'g')
|
||||
if strlen(line) == 0
|
||||
return 0
|
||||
endif
|
||||
let c = 1
|
||||
let counter = 0
|
||||
let groupCount = 0
|
||||
while counter < strlen(line)
|
||||
let char = strpart(line, counter, 1)
|
||||
if char == '('
|
||||
let c = c + 1
|
||||
elseif char == ')'
|
||||
let c = c - 1
|
||||
endif
|
||||
if c == 0
|
||||
let groupCount = groupCount + 1
|
||||
endif
|
||||
let counter = counter + 1
|
||||
endwhile
|
||||
return groupCount
|
||||
endfunction
|
||||
|
||||
function! scala#MatchesIncompleteDefValr(line)
|
||||
if a:line =~ '^\s*\%(' . s:defMatcher . '\|\<va[lr]\>\).*[=({]\s*$'
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! scala#LineIsCompleteIf(line)
|
||||
if scala#CountBrackets(a:line, '{', '}') == 0 &&
|
||||
\ scala#CountBrackets(a:line, '(', ')') == 0 &&
|
||||
\ a:line =~ '^\s*\<if\>\s*([^)]*)\s*\S.*$'
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! scala#LineCompletesIfElse(lnum, line)
|
||||
if a:line =~ '^\s*\%(\<if\>\|\%(}\s*\)\?\<else\>\)'
|
||||
return 0
|
||||
endif
|
||||
let result = search('^\%(\s*\<if\>\s*(.*).*\n\|\s*\<if\>\s*(.*)\s*\n.*\n\)\%(\s*\<else\>\s*\<if\>\s*(.*)\s*\n.*\n\)*\%(\s*\<else\>\s*\n\|\s*\<else\>[^{]*\n\)\?\%' . a:lnum . 'l', 'Wbn')
|
||||
if result != 0 && scala#GetLine(prevnonblank(a:lnum - 1)) !~ '{\s*$'
|
||||
return result
|
||||
endif
|
||||
return 0
|
||||
endfunction
|
||||
|
||||
function! scala#GetPrevCodeLine(lnum)
|
||||
" This needs to skip comment lines
|
||||
return prevnonblank(a:lnum - 1)
|
||||
endfunction
|
||||
|
||||
function! scala#InvertBracketType(openBracket, closedBracket)
|
||||
if a:openBracket == '('
|
||||
return [ '{', '}' ]
|
||||
else
|
||||
return [ '(', ')' ]
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! scala#Testhelper(lnum, line, openBracket, closedBracket, iteration)
|
||||
let bracketCount = scala#CountBrackets(a:line, a:openBracket, a:closedBracket)
|
||||
" There are more '}' braces than '{' on this line so it may be completing the function definition
|
||||
if bracketCount < 0
|
||||
let [matchedLNum, matchedColNum] = scala#GetLineAndColumnThatMatchesBracket(a:openBracket, a:closedBracket)
|
||||
if matchedLNum == a:lnum
|
||||
return -1
|
||||
endif
|
||||
let matchedLine = scala#GetLine(matchedLNum)
|
||||
if ! scala#MatchesIncompleteDefValr(matchedLine)
|
||||
let bracketLine = substitute(substitute(matchedLine, '\%' . matchedColNum . 'c.*$', '', ''), '[^{}()]', '', 'g')
|
||||
if bracketLine =~ '}$'
|
||||
return scala#Testhelper(matchedLNum, matchedLine, '{', '}', a:iteration + 1)
|
||||
elseif bracketLine =~ ')$'
|
||||
return scala#Testhelper(matchedLNum, matchedLine, '(', ')', a:iteration + 1)
|
||||
else
|
||||
let prevCodeLNum = scala#GetPrevCodeLine(matchedLNum)
|
||||
if scala#MatchesIncompleteDefValr(scala#GetLine(prevCodeLNum))
|
||||
return prevCodeLNum
|
||||
else
|
||||
return -1
|
||||
endif
|
||||
endif
|
||||
else
|
||||
" return indent value instead
|
||||
return matchedLNum
|
||||
endif
|
||||
" There's an equal number of '{' and '}' on this line so it may be a single line function definition
|
||||
elseif bracketCount == 0
|
||||
if a:iteration == 0
|
||||
let otherBracketType = scala#InvertBracketType(a:openBracket, a:closedBracket)
|
||||
return scala#Testhelper(a:lnum, a:line, otherBracketType[0], otherBracketType[1], a:iteration + 1)
|
||||
else
|
||||
let prevCodeLNum = scala#GetPrevCodeLine(a:lnum)
|
||||
let prevCodeLine = scala#GetLine(prevCodeLNum)
|
||||
if scala#MatchesIncompleteDefValr(prevCodeLine) && prevCodeLine !~ '{\s*$'
|
||||
return prevCodeLNum
|
||||
else
|
||||
let possibleIfElse = scala#LineCompletesIfElse(a:lnum, a:line)
|
||||
if possibleIfElse != 0
|
||||
let defValrLine = prevnonblank(possibleIfElse - 1)
|
||||
let possibleDefValr = scala#GetLine(defValrLine)
|
||||
if scala#MatchesIncompleteDefValr(possibleDefValr) && possibleDefValr =~ '^.*=\s*$'
|
||||
return possibleDefValr
|
||||
else
|
||||
return -1
|
||||
endif
|
||||
else
|
||||
return -1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
else
|
||||
return -1
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! scala#Test(lnum, line, openBracket, closedBracket)
|
||||
return scala#Testhelper(a:lnum, a:line, a:openBracket, a:closedBracket, 0)
|
||||
endfunction
|
||||
|
||||
function! scala#LineCompletesDefValr(lnum, line)
|
||||
let bracketCount = scala#CountBrackets(a:line, '{', '}')
|
||||
if bracketCount < 0
|
||||
let matchedBracket = scala#GetLineThatMatchesBracket('{', '}')
|
||||
if ! scala#MatchesIncompleteDefValr(scala#GetLine(matchedBracket))
|
||||
let possibleDefValr = scala#GetLine(prevnonblank(matchedBracket - 1))
|
||||
if matchedBracket != -1 && scala#MatchesIncompleteDefValr(possibleDefValr)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
elseif bracketCount == 0
|
||||
let bracketCount = scala#CountBrackets(a:line, '(', ')')
|
||||
if bracketCount < 0
|
||||
let matchedBracket = scala#GetLineThatMatchesBracket('(', ')')
|
||||
if ! scala#MatchesIncompleteDefValr(scala#GetLine(matchedBracket))
|
||||
let possibleDefValr = scala#GetLine(prevnonblank(matchedBracket - 1))
|
||||
if matchedBracket != -1 && scala#MatchesIncompleteDefValr(possibleDefValr)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
elseif bracketCount == 0
|
||||
let possibleDefValr = scala#GetLine(prevnonblank(a:lnum - 1))
|
||||
if scala#MatchesIncompleteDefValr(possibleDefValr) && possibleDefValr =~ '^.*=\s*$'
|
||||
return 1
|
||||
else
|
||||
let possibleIfElse = scala#LineCompletesIfElse(a:lnum, a:line)
|
||||
if possibleIfElse != 0
|
||||
let possibleDefValr = scala#GetLine(prevnonblank(possibleIfElse - 1))
|
||||
if scala#MatchesIncompleteDefValr(possibleDefValr) && possibleDefValr =~ '^.*=\s*$'
|
||||
return 2
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
endif
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! scala#SpecificLineCompletesBrackets(lnum, openBracket, closedBracket)
|
||||
let savedpos = getpos('.')
|
||||
call setpos('.', [savedpos[0], a:lnum, 9999, savedpos[3]])
|
||||
let retv = scala#LineCompletesBrackets(a:openBracket, a:closedBracket)
|
||||
call setpos('.', savedpos)
|
||||
|
||||
return retv
|
||||
endfunction
|
||||
|
||||
function! scala#LineCompletesBrackets(openBracket, closedBracket)
|
||||
let savedpos = getpos('.')
|
||||
let offline = 0
|
||||
while offline == 0
|
||||
let [lnum, colnum] = searchpos(a:closedBracket, 'Wb')
|
||||
let [lnumA, colnumA] = searchpairpos(a:openBracket, '', a:closedBracket, 'Wbn')
|
||||
if lnum != lnumA
|
||||
let [lnumB, colnumB] = searchpairpos(a:openBracket, '', a:closedBracket, 'Wbnr')
|
||||
let offline = 1
|
||||
endif
|
||||
endwhile
|
||||
call setpos('.', savedpos)
|
||||
if lnumA == lnumB && colnumA == colnumB
|
||||
return lnumA
|
||||
else
|
||||
return -1
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! GetScalaIndent()
|
||||
" Find a non-blank line above the current line.
|
||||
let prevlnum = prevnonblank(v:lnum - 1)
|
||||
|
||||
" Hit the start of the file, use zero indent.
|
||||
if prevlnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ind = indent(prevlnum)
|
||||
let originalIndentValue = ind
|
||||
let prevline = scala#GetLine(prevlnum)
|
||||
let curlnum = v:lnum
|
||||
let curline = scala#GetLine(curlnum)
|
||||
if get(g:, 'scala_scaladoc_indent', 0)
|
||||
let star_indent = 2
|
||||
else
|
||||
let star_indent = 1
|
||||
end
|
||||
|
||||
if prevline =~ '^\s*/\*\*'
|
||||
if prevline =~ '\*/\s*$'
|
||||
return ind
|
||||
else
|
||||
return ind + star_indent
|
||||
endif
|
||||
endif
|
||||
|
||||
if curline =~ '^\s*\*'
|
||||
return cindent(curlnum)
|
||||
endif
|
||||
|
||||
" If this line starts with a { then make it indent the same as the previous line
|
||||
if curline =~ '^\s*{'
|
||||
call scala#ConditionalConfirm("1")
|
||||
" Unless, of course, the previous one is a { as well
|
||||
if prevline !~ '^\s*{'
|
||||
call scala#ConditionalConfirm("2")
|
||||
return indent(prevlnum)
|
||||
endif
|
||||
endif
|
||||
|
||||
" '.' continuations
|
||||
if curline =~ '^\s*\.'
|
||||
if prevline =~ '^\s*\.'
|
||||
return ind
|
||||
else
|
||||
return ind + &shiftwidth
|
||||
endif
|
||||
endif
|
||||
|
||||
" Indent html literals
|
||||
if prevline !~ '/>\s*$' && prevline =~ '^\s*<[a-zA-Z][^>]*>\s*$'
|
||||
call scala#ConditionalConfirm("3")
|
||||
return ind + &shiftwidth
|
||||
endif
|
||||
|
||||
" assumes curly braces around try-block
|
||||
if curline =~ '^\s*}\s*\<catch\>'
|
||||
return ind - &shiftwidth
|
||||
elseif curline =~ '^\s*\<catch\>'
|
||||
return ind
|
||||
endif
|
||||
|
||||
" Add a 'shiftwidth' after lines that start a block
|
||||
" If 'if', 'for' or 'while' end with ), this is a one-line block
|
||||
" If 'val', 'var', 'def' end with =, this is a one-line block
|
||||
if (prevline =~ '^\s*\<\%(\%(}\?\s*else\s\+\)\?if\|for\|while\)\>.*[)=]\s*$' && scala#NumberOfBraceGroups(prevline) <= 1)
|
||||
\ || prevline =~ '^\s*' . s:defMatcher . '.*=\s*$'
|
||||
\ || prevline =~ '^\s*\<va[lr]\>.*[=]\s*$'
|
||||
\ || prevline =~ '^\s*\%(}\s*\)\?\<else\>\s*$'
|
||||
\ || prevline =~ '=\s*$'
|
||||
call scala#ConditionalConfirm("4")
|
||||
let ind = ind + &shiftwidth
|
||||
elseif prevline =~ '^\s*\<\%(}\?\s*else\s\+\)\?if\>' && curline =~ '^\s*}\?\s*\<else\>'
|
||||
return ind
|
||||
endif
|
||||
|
||||
let lineCompletedBrackets = 0
|
||||
let bracketCount = scala#CountBrackets(prevline, '{', '}')
|
||||
if bracketCount > 0 || prevline =~ '.*{\s*$'
|
||||
call scala#ConditionalConfirm("5b")
|
||||
let ind = ind + &shiftwidth
|
||||
elseif bracketCount < 0
|
||||
call scala#ConditionalConfirm("6b")
|
||||
" if the closing brace actually completes the braces entirely, then we
|
||||
" have to indent to line that started the whole thing
|
||||
let completeLine = scala#LineCompletesBrackets('{', '}')
|
||||
if completeLine != -1
|
||||
call scala#ConditionalConfirm("8b")
|
||||
let prevCompleteLine = scala#GetLine(prevnonblank(completeLine - 1))
|
||||
" However, what actually started this part looks like it was a function
|
||||
" definition, so we need to indent to that line instead. This is
|
||||
" actually pretty weak at the moment.
|
||||
if prevCompleteLine =~ '=\s*$'
|
||||
call scala#ConditionalConfirm("9b")
|
||||
let ind = indent(prevnonblank(completeLine - 1))
|
||||
else
|
||||
call scala#ConditionalConfirm("10b")
|
||||
let ind = indent(completeLine)
|
||||
endif
|
||||
else
|
||||
let lineCompletedBrackets = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
if ind == originalIndentValue
|
||||
let bracketCount = scala#CountBrackets(prevline, '(', ')')
|
||||
if bracketCount > 0 || prevline =~ '.*(\s*$'
|
||||
call scala#ConditionalConfirm("5a")
|
||||
let ind = ind + &shiftwidth
|
||||
elseif bracketCount < 0
|
||||
call scala#ConditionalConfirm("6a")
|
||||
" if the closing brace actually completes the braces entirely, then we
|
||||
" have to indent to line that started the whole thing
|
||||
let completeLine = scala#LineCompletesBrackets('(', ')')
|
||||
if completeLine != -1 && prevline !~ '^.*{\s*$'
|
||||
call scala#ConditionalConfirm("8a")
|
||||
let prevCompleteLine = scala#GetLine(prevnonblank(completeLine - 1))
|
||||
" However, what actually started this part looks like it was a function
|
||||
" definition, so we need to indent to that line instead. This is
|
||||
" actually pretty weak at the moment.
|
||||
if prevCompleteLine =~ '=\s*$'
|
||||
call scala#ConditionalConfirm("9a")
|
||||
let ind = indent(prevnonblank(completeLine - 1))
|
||||
else
|
||||
call scala#ConditionalConfirm("10a")
|
||||
let ind = indent(completeLine)
|
||||
endif
|
||||
else
|
||||
" This is the only part that's different from from the '{', '}' one below
|
||||
" Yup... some refactoring is necessary at some point.
|
||||
let ind = ind + (bracketCount * &shiftwidth)
|
||||
let lineCompletedBrackets = 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if curline =~ '^\s*}\?\s*\<else\>\%(\s\+\<if\>\s*(.*)\)\?\s*{\?\s*$' &&
|
||||
\ ! scala#LineIsCompleteIf(prevline) &&
|
||||
\ prevline !~ '^.*}\s*$'
|
||||
let ind = ind - &shiftwidth
|
||||
endif
|
||||
|
||||
" Subtract a 'shiftwidth' on '}' or html
|
||||
let curCurlyCount = scala#CountCurlies(curline)
|
||||
if curCurlyCount < 0
|
||||
call scala#ConditionalConfirm("14a")
|
||||
let matchline = scala#CurlyMatcher()
|
||||
return indent(matchline)
|
||||
elseif curline =~ '^\s*</[a-zA-Z][^>]*>'
|
||||
call scala#ConditionalConfirm("14c")
|
||||
return ind - &shiftwidth
|
||||
endif
|
||||
|
||||
let prevParenCount = scala#CountParens(prevline)
|
||||
if prevline =~ '^\s*\<for\>.*$' && prevParenCount > 0
|
||||
call scala#ConditionalConfirm("15")
|
||||
let ind = indent(prevlnum) + 5
|
||||
endif
|
||||
|
||||
let prevCurlyCount = scala#CountCurlies(prevline)
|
||||
if prevCurlyCount == 0 && prevline =~ '^.*\%(=>\|⇒\)\s*$' && prevline !~ '^\s*this\s*:.*\%(=>\|⇒\)\s*$' && curline !~ '^\s*\<case\>'
|
||||
call scala#ConditionalConfirm("16")
|
||||
let ind = ind + &shiftwidth
|
||||
endif
|
||||
|
||||
if ind == originalIndentValue && curline =~ '^\s*\<case\>'
|
||||
call scala#ConditionalConfirm("17")
|
||||
let parentCase = scala#IsParentCase()
|
||||
if parentCase != -1
|
||||
call scala#ConditionalConfirm("17a")
|
||||
return indent(parentCase)
|
||||
endif
|
||||
endif
|
||||
|
||||
if prevline =~ '^\s*\*/'
|
||||
\ || prevline =~ '*/\s*$'
|
||||
call scala#ConditionalConfirm("18")
|
||||
let ind = ind - star_indent
|
||||
endif
|
||||
|
||||
if scala#LineEndsInIncomplete(prevline)
|
||||
call scala#ConditionalConfirm("19")
|
||||
return ind
|
||||
endif
|
||||
|
||||
if scala#LineIsAClosingXML(prevline)
|
||||
if scala#LineCompletesXML(prevlnum, prevline)
|
||||
call scala#ConditionalConfirm("20a")
|
||||
return ind - &shiftwidth
|
||||
else
|
||||
call scala#ConditionalConfirm("20b")
|
||||
return ind
|
||||
endif
|
||||
endif
|
||||
|
||||
if ind == originalIndentValue
|
||||
"let indentMultiplier = scala#LineCompletesDefValr(prevlnum, prevline)
|
||||
"if indentMultiplier != 0
|
||||
" call scala#ConditionalConfirm("19a")
|
||||
" let ind = ind - (indentMultiplier * &shiftwidth)
|
||||
let defValrLine = scala#Test(prevlnum, prevline, '{', '}')
|
||||
if defValrLine != -1
|
||||
call scala#ConditionalConfirm("21a")
|
||||
let ind = indent(defValrLine)
|
||||
elseif lineCompletedBrackets == 0
|
||||
call scala#ConditionalConfirm("21b")
|
||||
if scala#GetLine(prevnonblank(prevlnum - 1)) =~ '^.*\<else\>\s*\%(//.*\)\?$'
|
||||
call scala#ConditionalConfirm("21c")
|
||||
let ind = ind - &shiftwidth
|
||||
elseif scala#LineCompletesIfElse(prevlnum, prevline)
|
||||
call scala#ConditionalConfirm("21d")
|
||||
let ind = ind - &shiftwidth
|
||||
elseif scala#CountParens(curline) < 0 && curline =~ '^\s*)' && scala#GetLine(scala#GetLineThatMatchesBracket('(', ')')) =~ '.*(\s*$'
|
||||
" Handles situations that look like this:
|
||||
"
|
||||
" val a = func(
|
||||
" 10
|
||||
" )
|
||||
"
|
||||
" or
|
||||
"
|
||||
" val a = func(
|
||||
" 10
|
||||
" ).somethingHere()
|
||||
call scala#ConditionalConfirm("21e")
|
||||
let ind = ind - &shiftwidth
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
call scala#ConditionalConfirm("returning " . ind)
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" vim:set sw=2 sts=2 ts=8 et:
|
||||
" vim600:fdm=marker fdl=1 fdc=0:
|
||||
@@ -1,9 +1,9 @@
|
||||
" Vim indent file
|
||||
" Language: Tera Term Language (TTL)
|
||||
" Based on Tera Term Version 4.86
|
||||
" Based on Tera Term Version 4.92
|
||||
" Maintainer: Ken Takata
|
||||
" URL: https://github.com/k-takata/vim-teraterm
|
||||
" Last Change: 2015 Jun 4
|
||||
" Last Change: 2016 Aug 17
|
||||
" Filenames: *.ttl
|
||||
" License: VIM License
|
||||
|
||||
@@ -25,9 +25,7 @@ endif
|
||||
" The shiftwidth() function is relatively new.
|
||||
" Don't require it to exist.
|
||||
if exists('*shiftwidth')
|
||||
function s:sw() abort
|
||||
return shiftwidth()
|
||||
endfunction
|
||||
let s:sw = function('shiftwidth')
|
||||
else
|
||||
function s:sw() abort
|
||||
return &shiftwidth
|
||||
@@ -48,7 +46,7 @@ function! GetTeraTermIndent(lnum)
|
||||
|
||||
let l:ind = l:previ
|
||||
|
||||
if l:prevl =~ '^\s*if\>.*\<then\s*$'
|
||||
if l:prevl =~ '^\s*if\>.*\<then\>'
|
||||
" previous line opened a block
|
||||
let l:ind += s:sw()
|
||||
endif
|
||||
|
||||
+30
-5
@@ -37,7 +37,7 @@ function s:FindPrevLessIndentedLine(lnum, ...)
|
||||
let curindent = a:0 ? a:1 : indent(a:lnum)
|
||||
while prevlnum
|
||||
\&& indent(prevlnum) >= curindent
|
||||
\&& getline(prevlnum) !~# '^\s*#'
|
||||
\&& getline(prevlnum) =~# '^\s*#'
|
||||
let prevlnum = prevnonblank(prevlnum-1)
|
||||
endwhile
|
||||
return prevlnum
|
||||
@@ -51,11 +51,33 @@ function s:FindPrevLEIndentedLineMatchingRegex(lnum, regex)
|
||||
return plilnum
|
||||
endfunction
|
||||
|
||||
let s:mapkeyregex='\v^\s*%(\''%([^'']|'''')*\'''.
|
||||
\ '|\"%([^"\\]|\\.)*\"'.
|
||||
\ '|%(%(\:\ )@!.)*)\:%(\ |$)'
|
||||
let s:mapkeyregex='\v^\s*\#@!\S@=%(\''%([^'']|\''\'')*\'''.
|
||||
\ '|\"%([^"\\]|\\.)*\"'.
|
||||
\ '|%(%(\:\ )@!.)*)\:%(\ |$)'
|
||||
let s:liststartregex='\v^\s*%(\-%(\ |$))'
|
||||
|
||||
let s:c_ns_anchor_char = '\v%([\n\r\uFEFF \t,[\]{}]@!\p)'
|
||||
let s:c_ns_anchor_name = s:c_ns_anchor_char.'+'
|
||||
let s:c_ns_anchor_property = '\v\&'.s:c_ns_anchor_name
|
||||
|
||||
let s:ns_word_char = '\v[[:alnum:]_\-]'
|
||||
let s:ns_tag_char = '\v%(%\x\x|'.s:ns_word_char.'|[#/;?:@&=+$.~*''()])'
|
||||
let s:c_named_tag_handle = '\v\!'.s:ns_word_char.'+\!'
|
||||
let s:c_secondary_tag_handle = '\v\!\!'
|
||||
let s:c_primary_tag_handle = '\v\!'
|
||||
let s:c_tag_handle = '\v%('.s:c_named_tag_handle.
|
||||
\ '|'.s:c_secondary_tag_handle.
|
||||
\ '|'.s:c_primary_tag_handle.')'
|
||||
let s:c_ns_shorthand_tag = '\v'.s:c_tag_handle . s:ns_tag_char.'+'
|
||||
let s:c_non_specific_tag = '\v\!'
|
||||
let s:ns_uri_char = '\v%(%\x\x|'.s:ns_word_char.'\v|[#/;?:@&=+$,.!~*''()[\]])'
|
||||
let s:c_verbatim_tag = '\v\!\<'.s:ns_uri_char.'+\>'
|
||||
let s:c_ns_tag_property = '\v'.s:c_verbatim_tag.
|
||||
\ '\v|'.s:c_ns_shorthand_tag.
|
||||
\ '\v|'.s:c_non_specific_tag
|
||||
|
||||
let s:block_scalar_header = '\v[|>]%([+-]?[1-9]|[1-9]?[+-])?'
|
||||
|
||||
function GetYAMLIndent(lnum)
|
||||
if a:lnum == 1 || !prevnonblank(a:lnum-1)
|
||||
return 0
|
||||
@@ -127,7 +149,10 @@ function GetYAMLIndent(lnum)
|
||||
" - List with
|
||||
" multiline scalar
|
||||
return previndent+2
|
||||
elseif prevline =~# s:mapkeyregex
|
||||
elseif prevline =~# s:mapkeyregex . '\v\s*%(%('.s:c_ns_tag_property.
|
||||
\ '\v|'.s:c_ns_anchor_property.
|
||||
\ '\v|'.s:block_scalar_header.
|
||||
\ '\v)%(\s+|\s*%(\#.*)?$))*'
|
||||
" Mapping with: value
|
||||
" that is multiline scalar
|
||||
return previndent+s:shiftwidth()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
" Vim Keymap file for Hanyu Pinyin tone marks through numbers.
|
||||
" Maintainer: Fredrik Roubert <roubert@df.lth.se>
|
||||
" Maintainer: Fredrik Roubert <fredrik@roubert.name>
|
||||
" Last Changed: February 15, 2004
|
||||
|
||||
" All characters are given literally.
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
" Vim Keymap file for russian characters, layout 'jcuken', Mac variant
|
||||
|
||||
" Derived from russian-jcuken.vim by Artem Chuprina <ran@ran.pp.ru>
|
||||
" Maintainer: Anton Fonarev <avfonarev@gmail.com>
|
||||
" Last Changed: 2016 August 17
|
||||
|
||||
" All characters are given literally, conversion to another encoding (e.g.,
|
||||
" UTF-8) should work.
|
||||
|
||||
scriptencoding utf-8
|
||||
|
||||
let b:keymap_name = "ru"
|
||||
|
||||
loadkeymap
|
||||
|
||||
\| Ё CYRILLIC CAPITAL LETTER IO
|
||||
\\ ё CYRILLIC SMALL LETTER IO
|
||||
|
||||
F А CYRILLIC CAPITAL LETTER A
|
||||
< Б CYRILLIC CAPITAL LETTER BE
|
||||
D В CYRILLIC CAPITAL LETTER VE
|
||||
U Г CYRILLIC CAPITAL LETTER GHE
|
||||
L Д CYRILLIC CAPITAL LETTER DE
|
||||
T Е CYRILLIC CAPITAL LETTER IE
|
||||
: Ж CYRILLIC CAPITAL LETTER ZHE
|
||||
P З CYRILLIC CAPITAL LETTER ZE
|
||||
B И CYRILLIC CAPITAL LETTER I
|
||||
Q Й CYRILLIC CAPITAL LETTER SHORT I
|
||||
R К CYRILLIC CAPITAL LETTER KA
|
||||
K Л CYRILLIC CAPITAL LETTER EL
|
||||
V М CYRILLIC CAPITAL LETTER EM
|
||||
Y Н CYRILLIC CAPITAL LETTER EN
|
||||
J О CYRILLIC CAPITAL LETTER O
|
||||
G П CYRILLIC CAPITAL LETTER PE
|
||||
H Р CYRILLIC CAPITAL LETTER ER
|
||||
C С CYRILLIC CAPITAL LETTER ES
|
||||
N Т CYRILLIC CAPITAL LETTER TE
|
||||
E У CYRILLIC CAPITAL LETTER U
|
||||
A Ф CYRILLIC CAPITAL LETTER EF
|
||||
{ Х CYRILLIC CAPITAL LETTER HA
|
||||
W Ц CYRILLIC CAPITAL LETTER TSE
|
||||
X Ч CYRILLIC CAPITAL LETTER CHE
|
||||
I Ш CYRILLIC CAPITAL LETTER SHA
|
||||
O Щ CYRILLIC CAPITAL LETTER SHCHA
|
||||
} Ъ CYRILLIC CAPITAL LETTER HARD SIGN
|
||||
S Ы CYRILLIC CAPITAL LETTER YERU
|
||||
M Ь CYRILLIC CAPITAL LETTER SOFT SIGN
|
||||
\" Э CYRILLIC CAPITAL LETTER E
|
||||
> Ю CYRILLIC CAPITAL LETTER YU
|
||||
Z Я CYRILLIC CAPITAL LETTER YA
|
||||
f а CYRILLIC SMALL LETTER A
|
||||
, б CYRILLIC SMALL LETTER BE
|
||||
d в CYRILLIC SMALL LETTER VE
|
||||
u г CYRILLIC SMALL LETTER GHE
|
||||
l д CYRILLIC SMALL LETTER DE
|
||||
t е CYRILLIC SMALL LETTER IE
|
||||
; ж CYRILLIC SMALL LETTER ZHE
|
||||
p з CYRILLIC SMALL LETTER ZE
|
||||
b и CYRILLIC SMALL LETTER I
|
||||
q й CYRILLIC SMALL LETTER SHORT I
|
||||
r к CYRILLIC SMALL LETTER KA
|
||||
k л CYRILLIC SMALL LETTER EL
|
||||
v м CYRILLIC SMALL LETTER EM
|
||||
y н CYRILLIC SMALL LETTER EN
|
||||
j о CYRILLIC SMALL LETTER O
|
||||
g п CYRILLIC SMALL LETTER PE
|
||||
h р CYRILLIC SMALL LETTER ER
|
||||
c с CYRILLIC SMALL LETTER ES
|
||||
n т CYRILLIC SMALL LETTER TE
|
||||
e у CYRILLIC SMALL LETTER U
|
||||
a ф CYRILLIC SMALL LETTER EF
|
||||
[ х CYRILLIC SMALL LETTER HA
|
||||
w ц CYRILLIC SMALL LETTER TSE
|
||||
x ч CYRILLIC SMALL LETTER CHE
|
||||
i ш CYRILLIC SMALL LETTER SHA
|
||||
o щ CYRILLIC SMALL LETTER SHCHA
|
||||
] ъ CYRILLIC SMALL LETTER HARD SIGN
|
||||
s ы CYRILLIC SMALL LETTER YERU
|
||||
m ь CYRILLIC SMALL LETTER SOFT SIGN
|
||||
' э CYRILLIC SMALL LETTER E
|
||||
. ю CYRILLIC SMALL LETTER YU
|
||||
z я CYRILLIC SMALL LETTER YA
|
||||
|
||||
§ >
|
||||
± <
|
||||
@ "
|
||||
# №
|
||||
$ %
|
||||
% :
|
||||
^ ,
|
||||
& .
|
||||
* ;
|
||||
` ]
|
||||
~ [
|
||||
+3
-2
@@ -389,6 +389,7 @@ endfun
|
||||
|
||||
" get NL separated string with file names
|
||||
let s:n = globpath(&runtimepath, "colors/*.vim")
|
||||
let s:n .= globpath(&packpath, "pack/*/{opt,start}/*/colors/*.vim")
|
||||
|
||||
" split at NL, Ignore case for VMS and windows, sort on name
|
||||
let s:names = sort(map(split(s:n, "\n"), 'substitute(v:val, "\\c.*[/\\\\:\\]]\\([^/\\\\:]*\\)\\.vim", "\\1", "")'), 1)
|
||||
@@ -436,7 +437,7 @@ elseif has("gui_macvim")
|
||||
an 20.475.20 &Edit.Font.-SEP5- <Nop>
|
||||
an 20.475.30 &Edit.Font.Bigger <Nop>
|
||||
an 20.475.40 &Edit.Font.Smaller <Nop>
|
||||
an 20.480 &Edit.Special\ Characters\.\.\. <Nop>
|
||||
an 20.480 &Edit.Emoji\ &&\ Symbols <Nop>
|
||||
endif
|
||||
|
||||
" Programming menu
|
||||
@@ -1208,7 +1209,7 @@ if has("gui_macvim")
|
||||
macm Edit.Font.Show\ Fonts action=orderFrontFontPanel:
|
||||
macm Edit.Font.Bigger key=<D-=> action=fontSizeUp:
|
||||
macm Edit.Font.Smaller key=<D--> action=fontSizeDown:
|
||||
macm Edit.Special\ Characters\.\.\. key=<D-M-t> action=orderFrontCharacterPalette:
|
||||
macm Edit.Emoji\ &&\ Symbols key=<D-C-Space> action=orderFrontCharacterPalette:
|
||||
|
||||
macm Tools.Spelling.To\ Next\ error<Tab>]s key=<D-;>
|
||||
macm Tools.Spelling.Suggest\ Corrections<Tab>z= key=<D-:>
|
||||
|
||||
+8
-3
@@ -1,7 +1,7 @@
|
||||
" These commands create the option window.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2016 Apr 30
|
||||
" Last Change: 2016 Aug 21
|
||||
|
||||
" If there already is an option window, jump to that one.
|
||||
if bufwinnr("option-window") > 0
|
||||
@@ -1218,8 +1218,8 @@ endif
|
||||
if has("langmap")
|
||||
call append("$", "langmap\tlist of characters that are translated in Normal mode")
|
||||
call <SID>OptionG("lmap", &lmap)
|
||||
call append("$", "langnoremap\tdon't apply 'langmap' to mapped characters")
|
||||
call <SID>BinOptionG("lnr", &lnr)
|
||||
call append("$", "langremap\tapply 'langmap' to mapped characters")
|
||||
call <SID>BinOptionG("lrm", &lrm)
|
||||
endif
|
||||
if has("xim")
|
||||
call append("$", "imdisable\twhen set never use IM; overrules following IM options")
|
||||
@@ -1322,6 +1322,11 @@ call append("$", "\t(local to buffer)")
|
||||
call <SID>BinOptionL("bl")
|
||||
call append("$", "debug\tset to \"msg\" to see all error messages")
|
||||
call append("$", " \tset debug=" . &debug)
|
||||
if has("signs")
|
||||
call append("$", "signcolumn\twhether to show the signcolumn")
|
||||
call append("$", "\t(local to window)")
|
||||
call <SID>OptionL("scl")
|
||||
endif
|
||||
if has("mzscheme")
|
||||
call append("$", "mzquantum\tinterval in milliseconds between polls for MzScheme threads")
|
||||
call append("$", " \tset mzq=" . &mzq)
|
||||
|
||||
+13
-10
@@ -1,8 +1,9 @@
|
||||
" matchit.vim: (global plugin) Extended "%" matching
|
||||
" Last Change: Fri Jan 25 10:00 AM 2008 EST
|
||||
" Last Change: 2016 Aug 21
|
||||
" Maintainer: Benji Fisher PhD <benji@member.AMS.org>
|
||||
" Version: 1.13.2, for Vim 6.3+
|
||||
" Fix from Fernando Torres included.
|
||||
" Improvement from Ken Takata included.
|
||||
" URL: http://www.vim.org/script.php?script_id=39
|
||||
|
||||
" Documentation:
|
||||
@@ -44,6 +45,7 @@ endif
|
||||
let loaded_matchit = 1
|
||||
let s:last_mps = ""
|
||||
let s:last_words = ":"
|
||||
let s:patBR = ""
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
@@ -121,8 +123,8 @@ function! s:Match_wrapper(word, forward, mode) range
|
||||
execute "let match_words =" b:match_words
|
||||
endif
|
||||
" Thanks to Preben "Peppe" Guldberg and Bram Moolenaar for this suggestion!
|
||||
if (match_words != s:last_words) || (&mps != s:last_mps) ||
|
||||
\ exists("b:match_debug")
|
||||
if (match_words != s:last_words) || (&mps != s:last_mps)
|
||||
\ || exists("b:match_debug")
|
||||
let s:last_mps = &mps
|
||||
" The next several lines were here before
|
||||
" BF started messing with this script.
|
||||
@@ -148,6 +150,10 @@ function! s:Match_wrapper(word, forward, mode) range
|
||||
if exists("b:match_debug")
|
||||
let b:match_pat = s:pat
|
||||
endif
|
||||
" Reconstruct the version with unresolved backrefs.
|
||||
let s:patBR = substitute(match_words.',',
|
||||
\ s:notslash.'\zs[,:]*,[,:]*', ',', 'g')
|
||||
let s:patBR = substitute(s:patBR, s:notslash.'\zs:\{2,}', ':', 'g')
|
||||
endif
|
||||
|
||||
" Second step: set the following local variables:
|
||||
@@ -192,14 +198,10 @@ function! s:Match_wrapper(word, forward, mode) range
|
||||
" group = colon-separated list of patterns, one of which matches
|
||||
" = ini:mid:fin or ini:fin
|
||||
"
|
||||
" Reconstruct the version with unresolved backrefs.
|
||||
let patBR = substitute(match_words.',',
|
||||
\ s:notslash.'\zs[,:]*,[,:]*', ',', 'g')
|
||||
let patBR = substitute(patBR, s:notslash.'\zs:\{2,}', ':', 'g')
|
||||
" Now, set group and groupBR to the matching group: 'if:endif' or
|
||||
" 'while:endwhile' or whatever. A bit of a kluge: s:Choose() returns
|
||||
" group . "," . groupBR, and we pick it apart.
|
||||
let group = s:Choose(s:pat, matchline, ",", ":", prefix, suffix, patBR)
|
||||
let group = s:Choose(s:pat, matchline, ",", ":", prefix, suffix, s:patBR)
|
||||
let i = matchend(group, s:notslash . ",")
|
||||
let groupBR = strpart(group, i)
|
||||
let group = strpart(group, 0, i-1)
|
||||
@@ -661,6 +663,7 @@ fun! s:MultiMatch(spflag, mode)
|
||||
\ exists("b:match_debug")
|
||||
let s:last_words = match_words
|
||||
let s:last_mps = &mps
|
||||
let match_words = match_words . (strlen(match_words) ? "," : "") . default
|
||||
if match_words !~ s:notslash . '\\\d'
|
||||
let s:do_BR = 0
|
||||
let s:pat = match_words
|
||||
@@ -668,8 +671,8 @@ fun! s:MultiMatch(spflag, mode)
|
||||
let s:do_BR = 1
|
||||
let s:pat = s:ParseWords(match_words)
|
||||
endif
|
||||
let s:all = '\%(' . substitute(s:pat . (strlen(s:pat)?",":"") . default,
|
||||
\ '[,:]\+','\\|','g') . '\)'
|
||||
let s:all = '\%(' . substitute(s:pat . (strlen(s:pat) ? "," : "") . default,
|
||||
\ '[,:]\+', '\\|', 'g') . '\)'
|
||||
if exists("b:match_debug")
|
||||
let b:match_pat = s:pat
|
||||
endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" dockerfile.vim - Syntax highlighting for Dockerfiles
|
||||
" Maintainer: Honza Pokorny <http://honza.ca>
|
||||
" Version: 0.5
|
||||
" Last Change: 2014 Aug 29
|
||||
" Maintainer: Honza Pokorny <https://honza.ca>
|
||||
" Version: 0.6
|
||||
" Last Change: 2016 Aug 9
|
||||
" License: BSD
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ let b:current_syntax = "dockerfile"
|
||||
|
||||
syntax case ignore
|
||||
|
||||
syntax match dockerfileKeyword /\v^\s*(ONBUILD\s+)?(ADD|CMD|ENTRYPOINT|ENV|EXPOSE|FROM|MAINTAINER|RUN|USER|VOLUME|WORKDIR|COPY)\s/
|
||||
syntax match dockerfileKeyword /\v^\s*(ONBUILD\s+)?(ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)\s/
|
||||
|
||||
syntax region dockerfileString start=/\v"/ skip=/\v\\./ end=/\v"/
|
||||
|
||||
|
||||
+22
-12
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
|
||||
" Version: 0.97
|
||||
" Last Change: 2016 Feb. 26
|
||||
" Version: 0.98
|
||||
" Last Change: 2016 Aug. 26
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
||||
" Usage: For instructions, do :help fortran-syntax from Vim
|
||||
" Credits:
|
||||
@@ -10,7 +10,8 @@
|
||||
" in chronological order, by:
|
||||
" Andrej Panjkov, Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile,
|
||||
" Walter Dieudonné, Alexander Wagner, Roman Bertle, Charles Rendleman,
|
||||
" Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, and Jan Hermann.
|
||||
" Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, Jan Hermann,
|
||||
" Stefano Zaghi and Vishnu Krishnan.
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -108,6 +109,7 @@ syn match fortranUnitHeader "\<subroutine\>"
|
||||
syn keyword fortranCall call
|
||||
syn match fortranUnitHeader "\<function\>"
|
||||
syn match fortranUnitHeader "\<program\>"
|
||||
syn match fortranUnitHeader "\<block\>"
|
||||
syn keyword fortranKeyword return stop
|
||||
syn keyword fortranConditional else then
|
||||
syn match fortranConditional "\<if\>"
|
||||
@@ -208,6 +210,7 @@ syn match fortranStorageClass "\<kind\s*="me=s+4
|
||||
syn match fortranStorageClass "\<len\s*="me=s+3
|
||||
|
||||
syn match fortranUnitHeader "\<module\>"
|
||||
syn match fortranUnitHeader "\<submodule\>"
|
||||
syn keyword fortranUnitHeader use only contains
|
||||
syn keyword fortranUnitHeader result operator assignment
|
||||
syn match fortranUnitHeader "\<interface\>"
|
||||
@@ -231,8 +234,10 @@ syn match fortranIntrinsic "\<kind\>\s*[(,]"me=s+4
|
||||
syn match fortranUnitHeader "\<end\s*function"
|
||||
syn match fortranUnitHeader "\<end\s*interface"
|
||||
syn match fortranUnitHeader "\<end\s*module"
|
||||
syn match fortranUnitHeader "\<end\s*submodule"
|
||||
syn match fortranUnitHeader "\<end\s*program"
|
||||
syn match fortranUnitHeader "\<end\s*subroutine"
|
||||
syn match fortranUnitHeader "\<end\s*block"
|
||||
syn match fortranRepeat "\<end\s*do"
|
||||
syn match fortranConditional "\<end\s*where"
|
||||
syn match fortranConditional "\<select\s*case"
|
||||
@@ -267,6 +272,7 @@ syn match fortranRepeat "\<end\s*forall"
|
||||
syn keyword fortranIntrinsic null cpu_time
|
||||
syn match fortranType "\<elemental\>"
|
||||
syn match fortranType "\<pure\>"
|
||||
syn match fortranType "\<impure\>"
|
||||
if exists("fortran_more_precise")
|
||||
syn match fortranConstructName "\(\<end\s*forall\s\+\)\@<=\a\w*\>"
|
||||
endif
|
||||
@@ -286,8 +292,9 @@ if b:fortran_dialect == "f08"
|
||||
|
||||
syn keyword fortranReadWrite flush wait
|
||||
syn keyword fortranIO decimal round iomsg
|
||||
syn keyword fortranType asynchronous nopass non_overridable pass protected volatile abstract extends import
|
||||
syn keyword fortranType asynchronous nopass non_overridable pass protected volatile extends import
|
||||
syn keyword fortranType non_intrinsic value bind deferred generic final enumerator
|
||||
syn match fortranType "\<abstract\>"
|
||||
syn match fortranType "\<class\>"
|
||||
syn match fortranType "\<associate\>"
|
||||
syn match fortranType "\<end\s*associate"
|
||||
@@ -305,6 +312,7 @@ if b:fortran_dialect == "f08"
|
||||
syn keyword fortranIntrinsic bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image
|
||||
syn keyword fortranIO newunit
|
||||
syn keyword fortranType contiguous
|
||||
syn keyword fortranRepeat concurrent
|
||||
|
||||
" CUDA fortran
|
||||
syn match fortranTypeCUDA "\<attributes\>"
|
||||
@@ -383,20 +391,22 @@ if exists("fortran_fold")
|
||||
|
||||
if (b:fortran_fixed_source == 1)
|
||||
syn region fortranProgram transparent fold keepend start="^\s*program\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\(program\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranModule
|
||||
syn region fortranModule transparent fold keepend start="^\s*submodule\s\+(\a\w*\s*\(:\a\w*\s*\)*)\s*\z\(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\(submodule\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranProgram,fortranModule
|
||||
syn region fortranModule transparent fold keepend start="^\s*module\s\+\(procedure\)\@!\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\(module\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranProgram
|
||||
syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|recursive \)\=\s*\(\(\(real \|integer \|logical \|complex \|double \s*precision \)\s*\((\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \((\(\s*len\s*=\)\=\s*\d\+\s*)\|(\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|function\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
|
||||
syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|subroutine\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
|
||||
syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*\(\(\(real \|integer \|logical \|complex \|double \s*precision \)\s*\((\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \((\(\s*len\s*=\)\=\s*\d\+\s*)\|(\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|function\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
|
||||
syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|subroutine\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
|
||||
syn region fortranBlockData transparent fold keepend start="\<block\s*data\(\s\+\z(\a\w*\)\)\=" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|block\s*data\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
|
||||
syn region fortranInterface transparent fold keepend extend start="^\s*interface\>" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
|
||||
syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\(,\s*\(public\|private\)\)\=\s*::" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*type\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
|
||||
syn region fortranInterface transparent fold keepend extend start="^\s*\(abstract \)\=\s*interface\>" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
|
||||
syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\(,\s*\(public\|private\|abstract\)\)\=\s*::" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*type\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock,fortranInterface
|
||||
else
|
||||
syn region fortranProgram transparent fold keepend start="^\s*program\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\(program\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranModule
|
||||
syn region fortranModule transparent fold keepend start="^\s*submodule\s\+(\a\w*\s*\(:\a\w*\s*\)*)\s*\z\(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\(submodule\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranProgram,fortranModule
|
||||
syn region fortranModule transparent fold keepend start="^\s*module\s\+\(procedure\)\@!\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\(module\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranProgram
|
||||
syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|recursive \)\=\s*\(\(\(real \|integer \|logical \|complex \|double \s*precision \)\s*\((\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \((\(\s*len\s*=\)\=\s*\d\+\s*)\|(\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|function\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
|
||||
syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|subroutine\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
|
||||
syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*\(\(\(real \|integer \|logical \|complex \|double \s*precision \)\s*\((\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \((\(\s*len\s*=\)\=\s*\d\+\s*)\|(\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|function\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
|
||||
syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|subroutine\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
|
||||
syn region fortranBlockData transparent fold keepend start="\<block\s*data\(\s\+\z(\a\w*\)\)\=" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|block\s*data\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
|
||||
syn region fortranInterface transparent fold keepend extend start="^\s*interface\>" skip="^\s*[!#].*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
|
||||
syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\(,\s*\(public\|private\)\)\=\s*::" skip="^\s*[!#].*$" excludenl end="\<end\s*type\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
|
||||
syn region fortranInterface transparent fold keepend extend start="^\s*\(abstract \)\=\s*interface\>" skip="^\s*[!#].*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
|
||||
syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\(,\s*\(public\|private\|abstract\)\)\=\s*::" skip="^\s*[!#].*$" excludenl end="\<end\s*type\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock,fortranInterface
|
||||
endif
|
||||
|
||||
if exists("fortran_fold_conditionals")
|
||||
|
||||
+174
-172
@@ -2,10 +2,9 @@
|
||||
" Language: Mutt setup files
|
||||
" Original: Preben 'Peppe' Guldberg <peppe-vim@wielders.org>
|
||||
" Maintainer: Kyle Wheeler <kyle-muttrc.vim@memoryhole.net>
|
||||
" Last Change: 2 Feb 2012
|
||||
" Last Change: 18 August 2016
|
||||
|
||||
" This file covers mutt version 1.5.21 (and most of the mercurial tip)
|
||||
" Included are also a few features from 1.4.2.1
|
||||
" This file covers mutt version 1.7.0
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@@ -98,7 +97,7 @@ syn match muttrcSetNumAssignment contained skipwhite /=\s*'\d\+'/hs=s+1 nextgrou
|
||||
|
||||
" Now catch some email addresses and headers (purified version from mail.vim)
|
||||
syn match muttrcEmail "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+"
|
||||
syn match muttrcHeader "\<\%(From\|To\|C[Cc]\|B[Cc][Cc]\|Reply-To\|Subject\|Return-Path\|Received\|Date\|Replied\|Attach\)\>:\="
|
||||
syn match muttrcHeader "\<\c\%(From\|To\|C[Cc]\|B[Cc][Cc]\|Reply-To\|Subject\|Return-Path\|Received\|Date\|Replied\|Attach\)\>:\="
|
||||
|
||||
syn match muttrcKeySpecial contained +\%(\\[Cc'"]\|\^\|\\[01]\d\{2}\)+
|
||||
syn match muttrcKey contained "\S\+" contains=muttrcKeySpecial,muttrcKeyName
|
||||
@@ -109,143 +108,146 @@ syn match muttrcKeyName contained "\\[trne]"
|
||||
syn match muttrcKeyName contained "\c<\%(BackSpace\|BackTab\|Delete\|Down\|End\|Enter\|Esc\|Home\|Insert\|Left\|PageDown\|PageUp\|Return\|Right\|Space\|Tab\|Up\)>"
|
||||
syn match muttrcKeyName contained "<F[0-9]\+>"
|
||||
|
||||
syn keyword muttrcVarBool skipwhite contained allow_8bit allow_ansi arrow_cursor ascii_chars askbcc askcc attach_split auto_tag autoedit beep beep_new nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained bounce_delivered braille_friendly check_new check_mbox_size nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained collapse_unread confirmappend confirmcreate crypt_autoencrypt nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained crypt_autopgp crypt_autosign crypt_autosmime crypt_replyencrypt nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained crypt_replysign crypt_replysignencrypted crypt_timestamp nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained crypt_use_gpgme crypt_use_pka delete_untag digest_collapse duplicate_threads nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained edit_hdrs edit_headers encode_from envelope_from fast_reply nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained fcc_clear followup_to force_name forw_decode nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained forw_decrypt forw_quote forward_decode forward_decrypt nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained forward_quote hdrs header help hidden_host hide_limited nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained hide_missing hide_thread_subject hide_top_limited nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained hide_top_missing honor_disposition ignore_linear_white_space ignore_list_reply_to imap_check_subscribed nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained imap_list_subscribed imap_passive imap_peek imap_servernoise nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained implicit_autoview include_onlyfirst keep_flagged nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained mailcap_sanitize maildir_header_cache_verify maildir_trash nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained mark_old markers menu_move_off menu_scroll message_cache_clean meta_key nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained metoo mh_purge mime_forward_decode narrow_tree pager_stop nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained pgp_auto_decode pgp_auto_traditional pgp_autoencrypt nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained pgp_autoinline pgp_autosign pgp_check_exit nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained pgp_create_traditional pgp_ignore_subkeys pgp_long_ids nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained pgp_replyencrypt pgp_replyinline pgp_replysign nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained pgp_replysignencrypted pgp_retainable_sigs pgp_show_unusable nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained pgp_strict_enc pgp_use_gpg_agent pipe_decode pipe_split nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained pop_auth_try_all pop_last print_decode print_split nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained prompt_after read_only reply_self resolve reverse_alias nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained reverse_name reverse_realname rfc2047_parameters save_address nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained save_empty save_name score sig_dashes sig_on_top nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained smart_wrap smime_ask_cert_label smime_decrypt_use_default_key nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained smime_is_default sort_re ssl_force_tls ssl_use_sslv2 nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained ssl_use_sslv3 ssl_use_tlsv1 ssl_usesystemcerts ssl_verify_dates ssl_verify_host status_on_top nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained strict_mime strict_threads suspend text_flowed thorough_search nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained thread_received tilde uncollapse_jump use_8bitmime nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained use_domain use_envelope_from use_from use_idn use_ipv6 nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained user_agent wait_key weed wrap_search write_bcc nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained
|
||||
\ allow_8bit allow_ansi arrow_cursor ascii_chars askbcc askcc attach_split
|
||||
\ auto_tag autoedit beep beep_new bounce_delivered braille_friendly
|
||||
\ check_mbox_size check_new collapse_unread confirmappend confirmcreate
|
||||
\ crypt_autoencrypt crypt_autopgp crypt_autosign crypt_autosmime
|
||||
\ crypt_confirmhook crypt_opportunistic_encrypt crypt_replyencrypt
|
||||
\ crypt_replysign crypt_replysignencrypted crypt_timestamp crypt_use_gpgme
|
||||
\ crypt_use_pka delete_untag digest_collapse duplicate_threads edit_hdrs
|
||||
\ edit_headers encode_from envelope_from fast_reply fcc_clear followup_to
|
||||
\ force_name forw_decode forw_decrypt forw_quote forward_decode forward_decrypt
|
||||
\ forward_quote hdrs header help hidden_host hide_limited hide_missing
|
||||
\ hide_thread_subject hide_top_limited hide_top_missing honor_disposition
|
||||
\ idn_decode idn_encode ignore_linear_white_space ignore_list_reply_to
|
||||
\ imap_check_subscribed imap_list_subscribed imap_passive imap_peek
|
||||
\ imap_servernoise implicit_autoview include_onlyfirst keep_flagged
|
||||
\ mail_check_recent mail_check_stats mailcap_sanitize maildir_check_cur
|
||||
\ maildir_header_cache_verify maildir_trash mark_old markers menu_move_off
|
||||
\ menu_scroll message_cache_clean meta_key metoo mh_purge mime_forward_decode
|
||||
\ narrow_tree pager_stop pgp_auto_decode pgp_auto_traditional pgp_autoencrypt
|
||||
\ pgp_autoinline pgp_autosign pgp_check_exit pgp_create_traditional
|
||||
\ pgp_ignore_subkeys pgp_long_ids pgp_replyencrypt pgp_replyinline pgp_replysign
|
||||
\ pgp_replysignencrypted pgp_retainable_sigs pgp_show_unusable pgp_strict_enc
|
||||
\ pgp_use_gpg_agent pipe_decode pipe_split pop_auth_try_all pop_last
|
||||
\ postpone_encrypt postpone_encrypt_as print_decode print_split prompt_after
|
||||
\ read_only reflow_space_quotes reflow_text reflow_wrap reply_self resolve
|
||||
\ resume_draft_files resume_edited_draft_files reverse_alias reverse_name
|
||||
\ reverse_realname rfc2047_parameters save_address save_empty save_name score
|
||||
\ sidebar_folder_indent sidebar_new_mail_only sidebar_next_new_wrap
|
||||
\ sidebar_short_path sidebar_sort sidebar_visible sig_dashes sig_on_top
|
||||
\ smart_wrap smime_ask_cert_label smime_decrypt_use_default_key smime_is_default
|
||||
\ sort_re ssl_force_tls ssl_use_sslv2 ssl_use_sslv3 ssl_use_tlsv1
|
||||
\ ssl_usesystemcerts ssl_verify_dates ssl_verify_host status_on_top strict_mime
|
||||
\ strict_threads suspend text_flowed thorough_search thread_received tilde
|
||||
\ ts_enabled uncollapse_jump use_8bitmime use_domain use_envelope_from use_from
|
||||
\ use_idn use_ipv6 user_agent wait_key weed wrap_search write_bcc
|
||||
\ nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
|
||||
syn keyword muttrcVarBool skipwhite contained noallow_8bit noallow_ansi noarrow_cursor noascii_chars noaskbcc nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained noaskcc noattach_split noauto_tag noautoedit nobeep nobeep_new nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nobounce_delivered nobraille_friendly nocheck_new nocollapse_unread nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained noconfirmappend noconfirmcreate nocrypt_autoencrypt nocrypt_autopgp nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nocrypt_autosign nocrypt_autosmime nocrypt_replyencrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nocrypt_replysign nocrypt_replysignencrypted nocrypt_timestamp nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nocrypt_use_gpgme nodelete_untag nodigest_collapse noduplicate_threads nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained noedit_hdrs noedit_headers noencode_from noenvelope_from nofast_reply nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nofcc_clear nofollowup_to noforce_name noforw_decode nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained noforw_decrypt noforw_quote noforward_decode noforward_decrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained noforward_quote nohdrs noheader nohelp nohidden_host nohide_limited nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nohide_missing nohide_thread_subject nohide_top_limited nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nohide_top_missing nohonor_disposition noignore_list_reply_to noimap_check_subscribed nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained noimap_list_subscribed noimap_passive noimap_peek noimap_servernoise nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained noimplicit_autoview noinclude_onlyfirst nokeep_flagged nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nomailcap_sanitize nomaildir_header_cache_verify nomaildir_trash nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nomark_old nomarkers nomenu_move_off nomenu_scroll nometa_key nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nometoo nomh_purge nomime_forward_decode nonarrow_tree nopager_stop nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nopgp_auto_decode nopgp_auto_traditional nopgp_autoencrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nopgp_autoinline nopgp_autosign nopgp_check_exit nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nopgp_create_traditional nopgp_ignore_subkeys nopgp_long_ids nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nopgp_replyencrypt nopgp_replyinline nopgp_replysign nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nopgp_replysignencrypted nopgp_retainable_sigs nopgp_show_unusable nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nopgp_strict_enc nopgp_use_gpg_agent nopipe_decode nopipe_split nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nopop_auth_try_all nopop_last noprint_decode noprint_split nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained noprompt_after noread_only noreply_self noresolve noreverse_alias nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained noreverse_name noreverse_realname norfc2047_parameters nosave_address nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nosave_empty nosave_name noscore nosig_dashes nosig_on_top nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nosmart_wrap nosmime_ask_cert_label nosmime_decrypt_use_default_key nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nosmime_is_default nosort_re nossl_force_tls nossl_use_sslv2 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nossl_use_sslv3 nossl_use_tlsv1 nossl_usesystemcerts nostatus_on_top nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nostrict_threads nosuspend notext_flowed nothorough_search nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nothread_received notilde nouncollapse_jump nouse_8bitmime nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nouse_domain nouse_envelope_from nouse_from nouse_idn nouse_ipv6 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained nouser_agent nowait_key noweed nowrap_search nowrite_bcc nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained
|
||||
\ noallow_8bit noallow_ansi noarrow_cursor noascii_chars noaskbcc noaskcc noattach_split
|
||||
\ noauto_tag noautoedit nobeep nobeep_new nobounce_delivered nobraille_friendly
|
||||
\ nocheck_mbox_size nocheck_new nocollapse_unread noconfirmappend noconfirmcreate
|
||||
\ nocrypt_autoencrypt nocrypt_autopgp nocrypt_autosign nocrypt_autosmime
|
||||
\ nocrypt_confirmhook nocrypt_opportunistic_encrypt nocrypt_replyencrypt
|
||||
\ nocrypt_replysign nocrypt_replysignencrypted nocrypt_timestamp nocrypt_use_gpgme
|
||||
\ nocrypt_use_pka nodelete_untag nodigest_collapse noduplicate_threads noedit_hdrs
|
||||
\ noedit_headers noencode_from noenvelope_from nofast_reply nofcc_clear nofollowup_to
|
||||
\ noforce_name noforw_decode noforw_decrypt noforw_quote noforward_decode noforward_decrypt
|
||||
\ noforward_quote nohdrs noheader nohelp nohidden_host nohide_limited nohide_missing
|
||||
\ nohide_thread_subject nohide_top_limited nohide_top_missing nohonor_disposition
|
||||
\ noidn_decode noidn_encode noignore_linear_white_space noignore_list_reply_to
|
||||
\ noimap_check_subscribed noimap_list_subscribed noimap_passive noimap_peek
|
||||
\ noimap_servernoise noimplicit_autoview noinclude_onlyfirst nokeep_flagged
|
||||
\ nomail_check_recent nomail_check_stats nomailcap_sanitize nomaildir_check_cur
|
||||
\ nomaildir_header_cache_verify nomaildir_trash nomark_old nomarkers nomenu_move_off
|
||||
\ nomenu_scroll nomessage_cache_clean nometa_key nometoo nomh_purge nomime_forward_decode
|
||||
\ nonarrow_tree nopager_stop nopgp_auto_decode nopgp_auto_traditional nopgp_autoencrypt
|
||||
\ nopgp_autoinline nopgp_autosign nopgp_check_exit nopgp_create_traditional
|
||||
\ nopgp_ignore_subkeys nopgp_long_ids nopgp_replyencrypt nopgp_replyinline nopgp_replysign
|
||||
\ nopgp_replysignencrypted nopgp_retainable_sigs nopgp_show_unusable nopgp_strict_enc
|
||||
\ nopgp_use_gpg_agent nopipe_decode nopipe_split nopop_auth_try_all nopop_last
|
||||
\ nopostpone_encrypt nopostpone_encrypt_as noprint_decode noprint_split noprompt_after
|
||||
\ noread_only noreflow_space_quotes noreflow_text noreflow_wrap noreply_self noresolve
|
||||
\ noresume_draft_files noresume_edited_draft_files noreverse_alias noreverse_name
|
||||
\ noreverse_realname norfc2047_parameters nosave_address nosave_empty nosave_name noscore
|
||||
\ nosidebar_folder_indent nosidebar_new_mail_only nosidebar_next_new_wrap
|
||||
\ nosidebar_short_path nosidebar_sort nosidebar_visible nosig_dashes nosig_on_top
|
||||
\ nosmart_wrap nosmime_ask_cert_label nosmime_decrypt_use_default_key nosmime_is_default
|
||||
\ nosort_re nossl_force_tls nossl_use_sslv2 nossl_use_sslv3 nossl_use_tlsv1
|
||||
\ nossl_usesystemcerts nossl_verify_dates nossl_verify_host nostatus_on_top nostrict_mime
|
||||
\ nostrict_threads nosuspend notext_flowed nothorough_search nothread_received notilde
|
||||
\ nots_enabled nouncollapse_jump nouse_8bitmime nouse_domain nouse_envelope_from nouse_from
|
||||
\ nouse_idn nouse_ipv6 nouser_agent nowait_key noweed nowrap_search nowrite_bcc
|
||||
\ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
|
||||
syn keyword muttrcVarBool skipwhite contained invallow_8bit invallow_ansi invarrow_cursor invascii_chars invaskbcc nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invaskcc invattach_split invauto_tag invautoedit invbeep invbeep_new nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invbounce_delivered invbraille_friendly invcheck_new invcollapse_unread nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invconfirmappend invconfirmcreate invcrypt_autoencrypt invcrypt_autopgp nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invcrypt_autosign invcrypt_autosmime invcrypt_replyencrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invcrypt_replysign invcrypt_replysignencrypted invcrypt_timestamp nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invcrypt_use_gpgme invdelete_untag invdigest_collapse invduplicate_threads nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invedit_hdrs invedit_headers invencode_from invenvelope_from invfast_reply nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invfcc_clear invfollowup_to invforce_name invforw_decode nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invforw_decrypt invforw_quote invforward_decode invforward_decrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invforward_quote invhdrs invheader invhelp invhidden_host invhide_limited nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invhide_missing invhide_thread_subject invhide_top_limited nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invhide_top_missing invhonor_disposition invignore_list_reply_to invimap_check_subscribed nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invimap_list_subscribed invimap_passive invimap_peek invimap_servernoise nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invimplicit_autoview invinclude_onlyfirst invkeep_flagged nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invmailcap_sanitize invmaildir_header_cache_verify invmaildir_trash nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invmark_old invmarkers invmenu_move_off invmenu_scroll invmeta_key nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invmetoo invmh_purge invmime_forward_decode invnarrow_tree invpager_stop nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invpgp_auto_decode invpgp_auto_traditional invpgp_autoencrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invpgp_autoinline invpgp_autosign invpgp_check_exit nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invpgp_create_traditional invpgp_ignore_subkeys invpgp_long_ids nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invpgp_replyencrypt invpgp_replyinline invpgp_replysign nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invpgp_replysignencrypted invpgp_retainable_sigs invpgp_show_unusable nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invpgp_strict_enc invpgp_use_gpg_agent invpipe_decode invpipe_split nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invpop_auth_try_all invpop_last invprint_decode invprint_split nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invprompt_after invread_only invreply_self invresolve invreverse_alias nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invreverse_name invreverse_realname invrfc2047_parameters invsave_address nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invsave_empty invsave_name invscore invsig_dashes invsig_on_top nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invsmart_wrap invsmime_ask_cert_label invsmime_decrypt_use_default_key nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invsmime_is_default invsort_re invssl_force_tls invssl_use_sslv2 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invssl_use_sslv3 invssl_use_tlsv1 invssl_usesystemcerts invstatus_on_top nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invstrict_threads invsuspend invtext_flowed invthorough_search nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invthread_received invtilde invuncollapse_jump invuse_8bitmime nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invuse_domain invuse_envelope_from invuse_from invuse_idn invuse_ipv6 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarBool skipwhite contained invuser_agent invwait_key invweed invwrap_search invwrite_bcc nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
if use_mutt_sidebar == 1
|
||||
syn keyword muttrcVarBool skipwhite contained sidebar_visible sidebar_sort nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
endif
|
||||
syn keyword muttrcVarBool skipwhite contained
|
||||
\ invallow_8bit invallow_ansi invarrow_cursor invascii_chars invaskbcc invaskcc invattach_split
|
||||
\ invauto_tag invautoedit invbeep invbeep_new invbounce_delivered invbraille_friendly
|
||||
\ invcheck_mbox_size invcheck_new invcollapse_unread invconfirmappend invconfirmcreate
|
||||
\ invcrypt_autoencrypt invcrypt_autopgp invcrypt_autosign invcrypt_autosmime
|
||||
\ invcrypt_confirmhook invcrypt_opportunistic_encrypt invcrypt_replyencrypt
|
||||
\ invcrypt_replysign invcrypt_replysignencrypted invcrypt_timestamp invcrypt_use_gpgme
|
||||
\ invcrypt_use_pka invdelete_untag invdigest_collapse invduplicate_threads invedit_hdrs
|
||||
\ invedit_headers invencode_from invenvelope_from invfast_reply invfcc_clear invfollowup_to
|
||||
\ invforce_name invforw_decode invforw_decrypt invforw_quote invforward_decode invforward_decrypt
|
||||
\ invforward_quote invhdrs invheader invhelp invhidden_host invhide_limited invhide_missing
|
||||
\ invhide_thread_subject invhide_top_limited invhide_top_missing invhonor_disposition
|
||||
\ invidn_decode invidn_encode invignore_linear_white_space invignore_list_reply_to
|
||||
\ invimap_check_subscribed invimap_list_subscribed invimap_passive invimap_peek
|
||||
\ invimap_servernoise invimplicit_autoview invinclude_onlyfirst invkeep_flagged
|
||||
\ invmail_check_recent invmail_check_stats invmailcap_sanitize invmaildir_check_cur
|
||||
\ invmaildir_header_cache_verify invmaildir_trash invmark_old invmarkers invmenu_move_off
|
||||
\ invmenu_scroll invmessage_cache_clean invmeta_key invmetoo invmh_purge invmime_forward_decode
|
||||
\ invnarrow_tree invpager_stop invpgp_auto_decode invpgp_auto_traditional invpgp_autoencrypt
|
||||
\ invpgp_autoinline invpgp_autosign invpgp_check_exit invpgp_create_traditional
|
||||
\ invpgp_ignore_subkeys invpgp_long_ids invpgp_replyencrypt invpgp_replyinline invpgp_replysign
|
||||
\ invpgp_replysignencrypted invpgp_retainable_sigs invpgp_show_unusable invpgp_strict_enc
|
||||
\ invpgp_use_gpg_agent invpipe_decode invpipe_split invpop_auth_try_all invpop_last
|
||||
\ invpostpone_encrypt invpostpone_encrypt_as invprint_decode invprint_split invprompt_after
|
||||
\ invread_only invreflow_space_quotes invreflow_text invreflow_wrap invreply_self invresolve
|
||||
\ invresume_draft_files invresume_edited_draft_files invreverse_alias invreverse_name
|
||||
\ invreverse_realname invrfc2047_parameters invsave_address invsave_empty invsave_name invscore
|
||||
\ invsidebar_folder_indent invsidebar_new_mail_only invsidebar_next_new_wrap
|
||||
\ invsidebar_short_path invsidebar_sort invsidebar_visible invsig_dashes invsig_on_top
|
||||
\ invsmart_wrap invsmime_ask_cert_label invsmime_decrypt_use_default_key invsmime_is_default
|
||||
\ invsort_re invssl_force_tls invssl_use_sslv2 invssl_use_sslv3 invssl_use_tlsv1
|
||||
\ invssl_usesystemcerts invssl_verify_dates invssl_verify_host invstatus_on_top invstrict_mime
|
||||
\ invstrict_threads invsuspend invtext_flowed invthorough_search invthread_received invtilde
|
||||
\ invts_enabled invuncollapse_jump invuse_8bitmime invuse_domain invuse_envelope_from invuse_from
|
||||
\ invuse_idn invuse_ipv6 invuser_agent invwait_key invweed invwrap_search invwrite_bcc
|
||||
\ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
|
||||
syn keyword muttrcVarQuad skipwhite contained abort_nosubject abort_unmodified bounce copy nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarQuad skipwhite contained crypt_verify_sig delete fcc_attach forward_edit honor_followup_to nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarQuad skipwhite contained include mime_forward mime_forward_rest mime_fwd move nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarQuad skipwhite contained pgp_mime_auto pgp_verify_sig pop_delete pop_reconnect nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarQuad skipwhite contained postpone print quit recall reply_to ssl_starttls nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarQuad skipwhite contained
|
||||
\ abort_nosubject abort_unmodified bounce copy crypt_verify_sig delete
|
||||
\ fcc_attach forward_edit honor_followup_to include mime_forward
|
||||
\ mime_forward_rest mime_fwd move pgp_mime_auto pgp_verify_sig pop_delete
|
||||
\ pop_reconnect postpone print quit recall reply_to ssl_starttls
|
||||
\ nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
|
||||
syn keyword muttrcVarQuad skipwhite contained noabort_nosubject noabort_unmodified nobounce nocopy nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarQuad skipwhite contained nocrypt_verify_sig nodelete nofcc_attach noforward_edit nohonor_followup_to nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarQuad skipwhite contained noinclude nomime_forward nomime_forward_rest nomime_fwd nomove nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarQuad skipwhite contained nopgp_mime_auto nopgp_verify_sig nopop_delete nopop_reconnect nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarQuad skipwhite contained nopostpone noprint noquit norecall noreply_to nossl_starttls nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarQuad skipwhite contained
|
||||
\ noabort_nosubject noabort_unmodified nobounce nocopy nocrypt_verify_sig nodelete
|
||||
\ nofcc_attach noforward_edit nohonor_followup_to noinclude nomime_forward
|
||||
\ nomime_forward_rest nomime_fwd nomove nopgp_mime_auto nopgp_verify_sig nopop_delete
|
||||
\ nopop_reconnect nopostpone noprint noquit norecall noreply_to nossl_starttls
|
||||
\ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
|
||||
syn keyword muttrcVarQuad skipwhite contained invabort_nosubject invabort_unmodified invbounce invcopy nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarQuad skipwhite contained invcrypt_verify_sig invdelete invfcc_attach invforward_edit invhonor_followup_to nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarQuad skipwhite contained invinclude invmime_forward invmime_forward_rest invmime_fwd invmove nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarQuad skipwhite contained invpgp_mime_auto invpgp_verify_sig invpop_delete invpop_reconnect nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarQuad skipwhite contained invpostpone invprint invquit invrecall invreply_to invssl_starttls nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarQuad skipwhite contained
|
||||
\ invabort_nosubject invabort_unmodified invbounce invcopy invcrypt_verify_sig invdelete
|
||||
\ invfcc_attach invforward_edit invhonor_followup_to invinclude invmime_forward
|
||||
\ invmime_forward_rest invmime_fwd invmove invpgp_mime_auto invpgp_verify_sig invpop_delete
|
||||
\ invpop_reconnect invpostpone invprint invquit invrecall invreply_to invssl_starttls
|
||||
\ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
|
||||
syn keyword muttrcVarNum skipwhite contained connect_timeout history imap_keepalive imap_pipeline_depth mail_check nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarNum skipwhite contained menu_context net_inc pager_context pager_index_lines pgp_timeout nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarNum skipwhite contained pop_checkinterval read_inc save_history score_threshold_delete nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarNum skipwhite contained score_threshold_flag score_threshold_read search_context sendmail_wait sleep_time nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarNum skipwhite contained smime_timeout ssl_min_dh_prime_bits timeout time_inc wrap wrapmargin nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarNum skipwhite contained write_inc nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
if use_mutt_sidebar == 1
|
||||
syn keyword muttrcVarNum skipwhite contained sidebar_width nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
endif
|
||||
syn keyword muttrcVarNum skipwhite contained
|
||||
\ connect_timeout history imap_keepalive imap_pipeline_depth mail_check
|
||||
\ mail_check_stats_interval menu_context net_inc pager_context pager_index_lines
|
||||
\ pgp_timeout pop_checkinterval read_inc save_history score_threshold_delete
|
||||
\ score_threshold_flag score_threshold_read search_context sendmail_wait
|
||||
\ sidebar_width sleep_time smime_timeout ssl_min_dh_prime_bits time_inc timeout
|
||||
\ wrap wrap_headers wrapmargin write_inc
|
||||
\ nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
|
||||
syn match muttrcFormatErrors contained /%./
|
||||
|
||||
@@ -349,7 +351,7 @@ syn keyword muttrcVarStr contained skipwhite query_format nextgroup=muttrcVarEqu
|
||||
syn match muttrcVarEqualsQueryFmt contained skipwhite "=" nextgroup=muttrcQueryFormatStr
|
||||
syn keyword muttrcVarStr contained skipwhite pgp_decode_command pgp_verify_command pgp_decrypt_command pgp_clearsign_command pgp_sign_command pgp_encrypt_sign_command pgp_encrypt_only_command pgp_import_command pgp_export_command pgp_verify_key_command pgp_list_secring_command pgp_list_pubring_command nextgroup=muttrcVarEqualsPGPCmdFmt
|
||||
syn match muttrcVarEqualsPGPCmdFmt contained skipwhite "=" nextgroup=muttrcPGPCmdFormatStr
|
||||
syn keyword muttrcVarStr contained skipwhite status_format nextgroup=muttrcVarEqualsStatusFmt
|
||||
syn keyword muttrcVarStr contained skipwhite ts_icon_format ts_status_format status_format nextgroup=muttrcVarEqualsStatusFmt
|
||||
syn match muttrcVarEqualsStatusFmt contained skipwhite "=" nextgroup=muttrcStatusFormatStr
|
||||
syn keyword muttrcVarStr contained skipwhite pgp_getkeys_command nextgroup=muttrcVarEqualsPGPGetKeysFmt
|
||||
syn match muttrcVarEqualsPGPGetKeysFmt contained skipwhite "=" nextgroup=muttrcPGPGetKeysFormatStr
|
||||
@@ -361,34 +363,29 @@ syn match muttrcVarEqualsStrftimeFmt contained skipwhite "=" nextgroup=muttrcStr
|
||||
syn match muttrcVPrefix contained /[?&]/ nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
|
||||
syn match muttrcVarStr contained skipwhite 'my_[a-zA-Z0-9_]\+' nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite alias_file assumed_charset attach_charset attach_sep nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite certificate_file charset config_charset content_type nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite default_hook display_filter dotlock_program dsn_notify nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite dsn_return editor entropy_file envelope_from_address escape folder nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite forw_format forward_format from gecos_mask hdr_format nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite header_cache header_cache_compress header_cache_pagesize nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite history_file hostname imap_authenticators nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite imap_delim_chars imap_headers imap_idle imap_login imap_pass nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite imap_user indent_str indent_string ispell locale mailcap_path nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite mask mbox mbox_type message_cachedir mh_seq_flagged mh_seq_replied nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite mh_seq_unseen mixmaster msg_format pager nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite pgp_good_sign nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite pgp_mime_signature_filename nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite pgp_mime_signature_description pgp_sign_as nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite pgp_sort_keys nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite pipe_sep pop_authenticators pop_host pop_pass pop_user post_indent_str nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite post_indent_string postponed preconnect print_cmd print_command nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite query_command quote_regexp realname record reply_regexp send_charset nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite sendmail shell signature simple_search smileys smime_ca_location nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite smime_certificates smime_default_key nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite smime_encrypt_with nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite smime_keys smime_sign_as nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite smtp_url smtp_authenticators smtp_pass sort sort_alias sort_aux nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite sort_browser spam_separator spoolfile ssl_ca_certificates_file ssl_client_cert nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syn keyword muttrcVarStr contained skipwhite status_chars tmpdir to_chars tunnel visual nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
if use_mutt_sidebar == 1
|
||||
syn keyword muttrcVarStr skipwhite contained sidebar_delim nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
endif
|
||||
syn keyword muttrcVarStr contained skipwhite
|
||||
\ alias_file assumed_charset attach_charset attach_sep certificate_file charset
|
||||
\ config_charset content_type default_hook display_filter dotlock_program
|
||||
\ dsn_notify dsn_return editor entropy_file envelope_from_address escape folder
|
||||
\ forw_format forward_format from gecos_mask hdr_format header_cache
|
||||
\ header_cache_compress header_cache_pagesize history_file hostname
|
||||
\ imap_authenticators imap_delim_chars imap_headers imap_idle imap_login
|
||||
\ imap_pass imap_user indent_str indent_string ispell locale mailcap_path mask
|
||||
\ mbox mbox_type message_cachedir mh_seq_flagged mh_seq_replied mh_seq_unseen
|
||||
\ mixmaster msg_format pager pgp_decryption_okay pgp_good_sign
|
||||
\ pgp_mime_signature_description pgp_mime_signature_filename pgp_sign_as
|
||||
\ pgp_sort_keys pipe_sep pop_authenticators pop_host pop_pass pop_user
|
||||
\ post_indent_str post_indent_string postpone_encrypt_as postponed preconnect
|
||||
\ print_cmd print_command query_command quote_regexp realname record
|
||||
\ reply_regexp send_charset sendmail shell sidebar_delim sidebar_delim_chars
|
||||
\ sidebar_divider_char sidebar_format sidebar_indent_string sidebar_sort_method
|
||||
\ signature simple_search smileys smime_ca_location smime_certificates
|
||||
\ smime_default_key smime_encrypt_with smime_keys smime_sign_as
|
||||
\ smime_sign_digest_alg smtp_authenticators smtp_pass smtp_url sort sort_alias
|
||||
\ sort_aux sort_browser spam_separator spoolfile ssl_ca_certificates_file
|
||||
\ ssl_ciphers ssl_client_cert status_chars tmpdir to_chars trash ts_icon_format
|
||||
\ ts_status_format tunnel visual
|
||||
\ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
|
||||
" Present in 1.4.2.1 (pgp_create_traditional was a bool then)
|
||||
syn keyword muttrcVarBool contained skipwhite imap_force_ssl noimap_force_ssl invimap_force_ssl nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
@@ -401,12 +398,11 @@ syn match muttrcMenuCommas /,/ contained
|
||||
|
||||
syn keyword muttrcHooks contained skipwhite account-hook charset-hook iconv-hook message-hook folder-hook mbox-hook save-hook fcc-hook fcc-save-hook send-hook send2-hook reply-hook crypt-hook
|
||||
|
||||
syn keyword muttrcCommand auto_view alternative_order exec unalternative_order
|
||||
syn keyword muttrcCommand hdr_order iconv-hook ignore mailboxes my_hdr unmailboxes
|
||||
syn keyword muttrcCommand pgp-hook push score source unauto_view unhdr_order
|
||||
syn keyword muttrcCommand unignore unmono unmy_hdr unscore
|
||||
syn keyword muttrcCommand mime_lookup unmime_lookup ungroup
|
||||
syn keyword muttrcCommand unalternative_order
|
||||
syn keyword muttrcCommand skipwhite
|
||||
\ alternative_order auto_view exec hdr_order iconv-hook ignore mailboxes
|
||||
\ mailto_allow mime_lookup my_hdr pgp-hook push score sidebar_whitelist source
|
||||
\ unalternative_order unalternative_order unauto_view ungroup unhdr_order
|
||||
\ unignore unmailboxes unmailto_allow unmime_lookup unmono unmy_hdr unscore
|
||||
syn keyword muttrcCommand skipwhite charset-hook nextgroup=muttrcRXString
|
||||
syn keyword muttrcCommand skipwhite unhook nextgroup=muttrcHooks
|
||||
|
||||
@@ -441,7 +437,7 @@ syn match muttrcVariableInner contained "\$[a-zA-Z_-]\+"
|
||||
syn match muttrcEscapedVariable contained "\\\$[a-zA-Z_-]\+"
|
||||
|
||||
syn match muttrcBadAction contained "[^<>]\+" contains=muttrcEmail
|
||||
syn match muttrcFunction contained "\<\%(attach\|bounce\|copy\|delete\|display\|flag\|forward\|parent\|pipe\|postpone\|print\|recall\|resend\|save\|send\|tag\|undelete\)-message\>"
|
||||
syn match muttrcFunction contained "\<\%(attach\|bounce\|copy\|delete\|display\|flag\|forward\|parent\|pipe\|postpone\|print\|purge\|recall\|resend\|save\|send\|tag\|undelete\)-message\>"
|
||||
syn match muttrcFunction contained "\<\%(delete\|next\|previous\|read\|tag\|break\|undelete\)-thread\>"
|
||||
syn match muttrcFunction contained "\<link-threads\>"
|
||||
syn match muttrcFunction contained "\<\%(backward\|capitalize\|downcase\|forward\|kill\|upcase\)-word\>"
|
||||
@@ -465,11 +461,13 @@ syn match muttrcFunction contained "\<show-\%(limit\|version\)\>"
|
||||
syn match muttrcFunction contained "\<sort-\%(mailbox\|reverse\)\>"
|
||||
syn match muttrcFunction contained "\<tag-\%(pattern\|\%(sub\)\?thread\|prefix\%(-cond\)\?\)\>"
|
||||
syn match muttrcFunction contained "\<end-cond\>"
|
||||
syn match muttrcFunction contained "\<sidebar-\%(next\|next-new\|open\|page-down\|page-up\|prev\|prev-new\|toggle-visible\)\>"
|
||||
syn match muttrcFunction contained "\<toggle-\%(mailboxes\|new\|quoted\|subscribed\|unlink\|write\)\>"
|
||||
syn match muttrcFunction contained "\<undelete-\%(pattern\|subthread\)\>"
|
||||
syn match muttrcFunction contained "\<collapse-\%(parts\|thread\|all\)\>"
|
||||
syn match muttrcFunction contained "\<view-\%(attach\|attachments\|file\|mailcap\|name\|text\)\>"
|
||||
syn match muttrcFunction contained "\<\%(backspace\|backward-char\|bol\|bottom\|bottom-page\|buffy-cycle\|clear-flag\|complete\%(-query\)\?\|copy-file\|create-alias\|detach-file\|eol\|exit\|extract-keys\|\%(imap-\)\?fetch-mail\|forget-passphrase\|forward-char\|group-reply\|help\|ispell\|jump\|limit\|list-reply\|mail\|mail-key\|mark-as-new\|middle-page\|new-mime\|noop\|pgp-menu\|query\|query-append\|quit\|quote-char\|read-subthread\|redraw-screen\|refresh\|rename-file\|reply\|select-new\|set-flag\|shell-escape\|skip-quoted\|sort\|subscribe\|sync-mailbox\|top\|top-page\|transpose-chars\|unsubscribe\|untag-pattern\|verify-key\|what-key\|write-fcc\)\>"
|
||||
syn keyword muttrcFunction contained imap-logout-all
|
||||
if use_mutt_sidebar == 1
|
||||
syn match muttrcFunction contained "\<sidebar-\%(prev\|next\|open\|scroll-up\|scroll-down\)"
|
||||
endif
|
||||
@@ -578,7 +576,11 @@ syn match muttrcColorMatchCount contained "[0-9]\+"
|
||||
syn match muttrcColorMatchCountNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL
|
||||
syn region muttrcColorRXPat contained start=+\s*'+ skip=+\\'+ end=+'\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL
|
||||
syn region muttrcColorRXPat contained start=+\s*"+ skip=+\\"+ end=+"\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL
|
||||
syn keyword muttrcColorField contained attachment body bold error hdrdefault header index indicator markers message normal quoted search signature status tilde tree underline
|
||||
syn keyword muttrcColorField skipwhite contained
|
||||
\ attachment body bold error hdrdefault header index indicator markers message
|
||||
\ normal prompt quoted search sidebar-divider sidebar-flagged sidebar-highlight
|
||||
\ sidebar-indicator sidebar-new sidebar-spoolfile signature status tilde tree
|
||||
\ underline
|
||||
syn match muttrcColorField contained "\<quoted\d\=\>"
|
||||
if use_mutt_sidebar == 1
|
||||
syn keyword muttrcColorField contained sidebar_new
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Python
|
||||
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
|
||||
" Last Change: 2016 Jul 21
|
||||
" Last Change: 2016 Aug 14
|
||||
" Credits: Neil Schemenauer <nas@python.ca>
|
||||
" Dmitry Vasiliev
|
||||
"
|
||||
@@ -84,14 +84,30 @@ syn keyword pythonInclude from import
|
||||
syn keyword pythonAsync async await
|
||||
|
||||
" Decorators (new in Python 2.4)
|
||||
syn match pythonDecorator "@" display nextgroup=pythonFunction skipwhite
|
||||
" The zero-length non-grouping match before the function name is
|
||||
" extremely important in pythonFunction. Without it, everything is
|
||||
" interpreted as a function inside the contained environment of
|
||||
" doctests.
|
||||
" Python 3.5 introduced the use of the same symbol for matrix
|
||||
" multiplication. We now have to exclude the symbol from being
|
||||
" highlighted when used in that context. Hence, the check that it's
|
||||
" preceded by empty space only (possibly in a docstring/doctest) and
|
||||
" followed by decorator name, optional parenthesized list of arguments,
|
||||
" and the next line with either def, class, or another decorator.
|
||||
syn match pythonDecorator
|
||||
\ "\%(\%(^\s*\)\%(\%(>>>\|\.\.\.\)\s\+\)\=\)\zs@\%(\s*\h\%(\w\|\.\)*\%(([^)]*)\)\=\s*\n\s*\%(\.\.\.\s\+\)\=\%(@\s*\h\|\%(def\|class\)\s\+\)\)\@="
|
||||
\ display nextgroup=pythonDecoratorName skipwhite
|
||||
|
||||
" A dot must be allowed because of @MyClass.myfunc decorators.
|
||||
" It must be preceded by a decorator symbol and on a separate line from
|
||||
" a function/class it decorates.
|
||||
syn match pythonDecoratorName
|
||||
\ "\%(@\s*\)\@<=\h\%(\w\|\.\)*\%(\%(([^)]*)\)\=\s*\n\)\@="
|
||||
\ contained display nextgroup=pythonFunction skipnl
|
||||
|
||||
" The zero-length non-grouping match of def or class before the function
|
||||
" name is extremely important in pythonFunction. Without it, everything
|
||||
" is interpreted as a function inside the contained environment of
|
||||
" doctests.
|
||||
syn match pythonFunction
|
||||
\ "\%(\%(def\s\|class\s\|@\)\s*\)\@<=\h\%(\w\|\.\)*" contained
|
||||
\ "\%(\%(^\s*\)\%(\%(>>>\|\.\.\.\)\s\+\)\=\%(def\|class\)\s\+\)\@<=\h\w*"
|
||||
\ contained
|
||||
|
||||
syn match pythonComment "#.*$" contains=pythonTodo,@Spell
|
||||
syn keyword pythonTodo FIXME NOTE NOTES TODO XXX contained
|
||||
@@ -293,6 +309,7 @@ if version >= 508 || !exists("did_python_syn_inits")
|
||||
HiLink pythonInclude Include
|
||||
HiLink pythonAsync Statement
|
||||
HiLink pythonDecorator Define
|
||||
HiLink pythonDecoratorName Function
|
||||
HiLink pythonFunction Function
|
||||
HiLink pythonComment Comment
|
||||
HiLink pythonTodo Todo
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
" Tom Payne <tom@tompayne.org>
|
||||
" Contributor: Johannes Ranke <jranke@uni-bremen.de>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Thu Mar 10, 2016 12:26PM
|
||||
" Last Change: Thu Aug 25, 2016 08:52PM
|
||||
" Filenames: *.R *.r *.Rhistory *.Rt
|
||||
"
|
||||
" NOTE: The highlighting of R functions is defined in
|
||||
@@ -26,7 +26,7 @@ if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
setlocal iskeyword=@,48-57,_,.
|
||||
syn iskeyword @,48-57,_,.
|
||||
|
||||
if exists("g:r_syntax_folding") && g:r_syntax_folding
|
||||
setlocal foldmethod=syntax
|
||||
@@ -174,8 +174,6 @@ endif
|
||||
if g:R_hi_fun
|
||||
" Nvim-R:
|
||||
runtime R/functions.vim
|
||||
" Vim-R-plugin:
|
||||
runtime r-plugin/functions.vim
|
||||
endif
|
||||
|
||||
syn match rDollar display contained "\$"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Jakson Aquino <jalvesaq@gmail.com>
|
||||
" Former Maintainer: Johannes Ranke <jranke@uni-bremen.de>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Sat Feb 06, 2016 11:34AM
|
||||
" Last Change: Tue Jun 28, 2016 08:53AM
|
||||
" Remarks: - Includes R syntax highlighting in the appropriate
|
||||
" sections if an r.vim file is in the same directory or in the
|
||||
" default debian location.
|
||||
@@ -17,7 +17,6 @@ if exists("b:current_syntax")
|
||||
endif
|
||||
|
||||
scriptencoding utf-8
|
||||
setlocal iskeyword=@,48-57,_,.
|
||||
|
||||
syn case match
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" markdown Text with R statements
|
||||
" Language: markdown with R code chunks
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Sat Feb 06, 2016 06:45AM
|
||||
" Last Change: Tue Jun 28, 2016 10:09AM
|
||||
"
|
||||
" CONFIGURATION:
|
||||
" To highlight chunk headers as R code, put in your vimrc:
|
||||
@@ -72,8 +72,6 @@ if rmdIsPandoc == 0
|
||||
hi def link rmdLaTeXRegDelim Special
|
||||
endif
|
||||
|
||||
setlocal iskeyword=@,48-57,_,.
|
||||
|
||||
syn sync match rmdSyncChunk grouphere rmdChunk "^[ \t]*``` *{r"
|
||||
|
||||
hi def link rmdChunkDelim Special
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: reST with R code chunks
|
||||
" Maintainer: Alex Zvoleff, azvoleff@mail.sdsu.edu
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Sat Feb 06, 2016 06:45AM
|
||||
" Last Change: Tue Jun 28, 2016 08:53AM
|
||||
"
|
||||
" CONFIGURATION:
|
||||
" To highlight chunk headers as R code, put in your vimrc:
|
||||
@@ -19,8 +19,6 @@ unlet b:current_syntax
|
||||
" load all of the r syntax highlighting rules into @R
|
||||
syntax include @R syntax/r.vim
|
||||
|
||||
setlocal iskeyword=@,48-57,_,.
|
||||
|
||||
" highlight R chunks
|
||||
if exists("g:rrst_syn_hl_chunk")
|
||||
" highlight R code inside chunk header
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
" Language: reStructuredText documentation format
|
||||
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2016-06-17
|
||||
" Website: https://github.com/marshallward/vim-restructuredtext
|
||||
" Latest Revision: 2016-08-18
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -89,7 +90,7 @@ function! s:DefineOneInlineMarkup(name, start, middle, end, char_left, char_righ
|
||||
\ ' start=+' . a:char_left . '\zs' . a:start .
|
||||
\ '\ze[^[:space:]' . a:char_right . a:start[strlen(a:start) - 1] . ']+' .
|
||||
\ a:middle .
|
||||
\ ' end=+\S' . a:end . '\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)+'
|
||||
\ ' end=+\S' . a:end . '\ze\%($\|\s\|[''"’)\]}>/:.,;!?\\-]\)+'
|
||||
endfunction
|
||||
|
||||
function! s:DefineInlineMarkup(name, start, middle, end)
|
||||
@@ -103,6 +104,8 @@ function! s:DefineInlineMarkup(name, start, middle, end)
|
||||
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\[', '\]')
|
||||
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '{', '}')
|
||||
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '<', '>')
|
||||
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '’', '’')
|
||||
" TODO: Additional Unicode Pd, Po, Pi, Pf, Ps characters
|
||||
|
||||
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\%(^\|\s\|[/:]\)', '')
|
||||
|
||||
@@ -186,11 +189,8 @@ hi def link rstHyperlinkTarget String
|
||||
hi def link rstExDirective String
|
||||
hi def link rstSubstitutionDefinition rstDirective
|
||||
hi def link rstDelimiter Delimiter
|
||||
hi def link rstEmphasis Underlined
|
||||
hi def link rstStrongEmphasis Special
|
||||
" 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 rstEmphasis ctermfg=13 term=italic cterm=italic gui=italic
|
||||
hi def rstStrongEmphasis ctermfg=1 term=bold cterm=bold gui=bold
|
||||
hi def link rstInterpretedTextOrHyperlinkReference Identifier
|
||||
hi def link rstInlineLiteral String
|
||||
hi def link rstSubstitutionReference PreProc
|
||||
|
||||
@@ -0,0 +1,231 @@
|
||||
" Vim syntax file
|
||||
" Language: Scala
|
||||
" Maintainer: Derek Wyatt
|
||||
" URL: https://github.com/derekwyatt/vim-scala
|
||||
" License: Same as Vim
|
||||
" Last Change: 20 May 2016
|
||||
" ----------------------------------------------------------------------------
|
||||
|
||||
if !exists('main_syntax')
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
let main_syntax = 'scala'
|
||||
endif
|
||||
|
||||
scriptencoding utf-8
|
||||
|
||||
let b:current_syntax = "scala"
|
||||
|
||||
" Allows for embedding, see #59; main_syntax convention instead? Refactor TOP
|
||||
"
|
||||
" The @Spell here is a weird hack, it means *exclude* if the first group is
|
||||
" TOP. Otherwise we get spelling errors highlighted on code elements that
|
||||
" match scalaBlock, even with `syn spell notoplevel`.
|
||||
function! s:ContainedGroup()
|
||||
try
|
||||
silent syn list @scala
|
||||
return '@scala,@NoSpell'
|
||||
catch /E392/
|
||||
return 'TOP,@Spell'
|
||||
endtry
|
||||
endfunction
|
||||
|
||||
unlet! b:current_syntax
|
||||
|
||||
syn case match
|
||||
syn sync minlines=200 maxlines=1000
|
||||
|
||||
syn keyword scalaKeyword catch do else final finally for forSome if
|
||||
syn keyword scalaKeyword match return throw try while yield macro
|
||||
syn keyword scalaKeyword class trait object extends with nextgroup=scalaInstanceDeclaration skipwhite
|
||||
syn keyword scalaKeyword case nextgroup=scalaKeyword,scalaCaseFollowing skipwhite
|
||||
syn keyword scalaKeyword val nextgroup=scalaNameDefinition,scalaQuasiQuotes skipwhite
|
||||
syn keyword scalaKeyword def var nextgroup=scalaNameDefinition skipwhite
|
||||
hi link scalaKeyword Keyword
|
||||
|
||||
exe 'syn region scalaBlock start=/{/ end=/}/ contains=' . s:ContainedGroup() . ' fold'
|
||||
|
||||
syn keyword scalaAkkaSpecialWord when goto using startWith initialize onTransition stay become unbecome
|
||||
hi link scalaAkkaSpecialWord PreProc
|
||||
|
||||
syn keyword scalatestSpecialWord shouldBe
|
||||
syn match scalatestShouldDSLA /^\s\+\zsit should/
|
||||
syn match scalatestShouldDSLB /\<should\>/
|
||||
hi link scalatestSpecialWord PreProc
|
||||
hi link scalatestShouldDSLA PreProc
|
||||
hi link scalatestShouldDSLB PreProc
|
||||
|
||||
syn match scalaSymbol /'[_A-Za-z0-9$]\+/
|
||||
hi link scalaSymbol Number
|
||||
|
||||
syn match scalaChar /'.'/
|
||||
syn match scalaChar /'\\[\\"'ntbrf]'/ contains=scalaEscapedChar
|
||||
syn match scalaChar /'\\u[A-Fa-f0-9]\{4}'/ contains=scalaUnicodeChar
|
||||
syn match scalaEscapedChar /\\[\\"'ntbrf]/
|
||||
syn match scalaUnicodeChar /\\u[A-Fa-f0-9]\{4}/
|
||||
hi link scalaChar Character
|
||||
hi link scalaEscapedChar Function
|
||||
hi link scalaUnicodeChar Special
|
||||
|
||||
syn match scalaOperator "||"
|
||||
syn match scalaOperator "&&"
|
||||
hi link scalaOperator Special
|
||||
|
||||
syn match scalaNameDefinition /\<[_A-Za-z0-9$]\+\>/ contained nextgroup=scalaPostNameDefinition,scalaVariableDeclarationList
|
||||
syn match scalaNameDefinition /`[^`]\+`/ contained nextgroup=scalaPostNameDefinition
|
||||
syn match scalaVariableDeclarationList /\s*,\s*/ contained nextgroup=scalaNameDefinition
|
||||
syn match scalaPostNameDefinition /\_s*:\_s*/ contained nextgroup=scalaTypeDeclaration
|
||||
hi link scalaNameDefinition Function
|
||||
|
||||
syn match scalaInstanceDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaInstanceHash
|
||||
syn match scalaInstanceDeclaration /`[^`]\+`/ contained
|
||||
syn match scalaInstanceHash /#/ contained nextgroup=scalaInstanceDeclaration
|
||||
hi link scalaInstanceDeclaration Special
|
||||
hi link scalaInstanceHash Type
|
||||
|
||||
syn match scalaUnimplemented /???/
|
||||
hi link scalaUnimplemented ERROR
|
||||
|
||||
syn match scalaCapitalWord /\<[A-Z][A-Za-z0-9$]*\>/
|
||||
hi link scalaCapitalWord Special
|
||||
|
||||
" Handle type declarations specially
|
||||
syn region scalaTypeStatement matchgroup=Keyword start=/\<type\_s\+\ze/ end=/$/ contains=scalaTypeTypeDeclaration,scalaSquareBrackets,scalaTypeTypeEquals,scalaTypeStatement
|
||||
|
||||
" Ugh... duplication of all the scalaType* stuff to handle special highlighting
|
||||
" of `type X =` declarations
|
||||
syn match scalaTypeTypeDeclaration /(/ contained nextgroup=scalaTypeTypeExtension,scalaTypeTypeEquals contains=scalaRoundBrackets skipwhite
|
||||
syn match scalaTypeTypeDeclaration /\%(⇒\|=>\)\ze/ contained nextgroup=scalaTypeTypeDeclaration contains=scalaTypeTypeExtension skipwhite
|
||||
syn match scalaTypeTypeDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaTypeTypeExtension,scalaTypeTypeEquals skipwhite
|
||||
syn match scalaTypeTypeEquals /=\ze[^>]/ contained nextgroup=scalaTypeTypePostDeclaration skipwhite
|
||||
syn match scalaTypeTypeExtension /)\?\_s*\zs\%(⇒\|=>\|<:\|:>\|=:=\|::\|#\)/ contained nextgroup=scalaTypeTypeDeclaration skipwhite
|
||||
syn match scalaTypeTypePostDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaTypeTypePostExtension skipwhite
|
||||
syn match scalaTypeTypePostExtension /\%(⇒\|=>\|<:\|:>\|=:=\|::\)/ contained nextgroup=scalaTypeTypePostDeclaration skipwhite
|
||||
hi link scalaTypeTypeDeclaration Type
|
||||
hi link scalaTypeTypeExtension Keyword
|
||||
hi link scalaTypeTypePostDeclaration Special
|
||||
hi link scalaTypeTypePostExtension Keyword
|
||||
|
||||
syn match scalaTypeDeclaration /(/ contained nextgroup=scalaTypeExtension contains=scalaRoundBrackets skipwhite
|
||||
syn match scalaTypeDeclaration /\%(⇒\|=>\)\ze/ contained nextgroup=scalaTypeDeclaration contains=scalaTypeExtension skipwhite
|
||||
syn match scalaTypeDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaTypeExtension skipwhite
|
||||
syn match scalaTypeExtension /)\?\_s*\zs\%(⇒\|=>\|<:\|:>\|=:=\|::\|#\)/ contained nextgroup=scalaTypeDeclaration skipwhite
|
||||
hi link scalaTypeDeclaration Type
|
||||
hi link scalaTypeExtension Keyword
|
||||
hi link scalaTypePostExtension Keyword
|
||||
|
||||
syn match scalaTypeAnnotation /\%([_a-zA-Z0-9$\s]:\_s*\)\ze[_=(\.A-Za-z0-9$]\+/ skipwhite nextgroup=scalaTypeDeclaration contains=scalaRoundBrackets
|
||||
syn match scalaTypeAnnotation /)\_s*:\_s*\ze[_=(\.A-Za-z0-9$]\+/ skipwhite nextgroup=scalaTypeDeclaration
|
||||
hi link scalaTypeAnnotation Normal
|
||||
|
||||
syn match scalaCaseFollowing /\<[_\.A-Za-z0-9$]\+\>/ contained
|
||||
syn match scalaCaseFollowing /`[^`]\+`/ contained
|
||||
hi link scalaCaseFollowing Special
|
||||
|
||||
syn keyword scalaKeywordModifier abstract override final lazy implicit implicitly private protected sealed null require super
|
||||
hi link scalaKeywordModifier Function
|
||||
|
||||
syn keyword scalaSpecial this true false ne eq
|
||||
syn keyword scalaSpecial new nextgroup=scalaInstanceDeclaration skipwhite
|
||||
syn match scalaSpecial "\%(=>\|⇒\|<-\|←\|->\|→\)"
|
||||
syn match scalaSpecial /`[^`]\+`/ " Backtick literals
|
||||
hi link scalaSpecial PreProc
|
||||
|
||||
syn keyword scalaExternal package import
|
||||
hi link scalaExternal Include
|
||||
|
||||
syn match scalaStringEmbeddedQuote /\\"/ contained
|
||||
syn region scalaString start=/"/ end=/"/ contains=scalaStringEmbeddedQuote,scalaEscapedChar,scalaUnicodeChar
|
||||
hi link scalaString String
|
||||
hi link scalaStringEmbeddedQuote String
|
||||
|
||||
syn region scalaIString matchgroup=scalaInterpolationBrackets start=/\<[a-zA-Z][a-zA-Z0-9_]*"/ skip=/\\"/ end=/"/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar
|
||||
syn region scalaTripleIString matchgroup=scalaInterpolationBrackets start=/\<[a-zA-Z][a-zA-Z0-9_]*"""/ end=/"""\%([^"]\|$\)/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar
|
||||
hi link scalaIString String
|
||||
hi link scalaTripleIString String
|
||||
|
||||
syn match scalaInterpolation /\$[a-zA-Z0-9_$]\+/ contained
|
||||
exe 'syn region scalaInterpolationB matchgroup=scalaInterpolationBoundary start=/\${/ end=/}/ contained contains=' . s:ContainedGroup()
|
||||
hi link scalaInterpolation Function
|
||||
hi link scalaInterpolationB Normal
|
||||
|
||||
syn region scalaFString matchgroup=scalaInterpolationBrackets start=/f"/ skip=/\\"/ end=/"/ contains=scalaFInterpolation,scalaFInterpolationB,scalaEscapedChar,scalaUnicodeChar
|
||||
syn match scalaFInterpolation /\$[a-zA-Z0-9_$]\+\(%[-A-Za-z0-9\.]\+\)\?/ contained
|
||||
exe 'syn region scalaFInterpolationB matchgroup=scalaInterpolationBoundary start=/${/ end=/}\(%[-A-Za-z0-9\.]\+\)\?/ contained contains=' . s:ContainedGroup()
|
||||
hi link scalaFString String
|
||||
hi link scalaFInterpolation Function
|
||||
hi link scalaFInterpolationB Normal
|
||||
|
||||
syn region scalaTripleString start=/"""/ end=/"""\%([^"]\|$\)/ contains=scalaEscapedChar,scalaUnicodeChar
|
||||
syn region scalaTripleFString matchgroup=scalaInterpolationBrackets start=/f"""/ end=/"""\%([^"]\|$\)/ contains=scalaFInterpolation,scalaFInterpolationB,scalaEscapedChar,scalaUnicodeChar
|
||||
hi link scalaTripleString String
|
||||
hi link scalaTripleFString String
|
||||
|
||||
hi link scalaInterpolationBrackets Special
|
||||
hi link scalaInterpolationBoundary Function
|
||||
|
||||
syn match scalaNumber /\<0[dDfFlL]\?\>/ " Just a bare 0
|
||||
syn match scalaNumber /\<[1-9]\d*[dDfFlL]\?\>/ " A multi-digit number - octal numbers with leading 0's are deprecated in Scala
|
||||
syn match scalaNumber /\<0[xX][0-9a-fA-F]\+[dDfFlL]\?\>/ " Hex number
|
||||
syn match scalaNumber /\%(\<\d\+\.\d*\|\.\d\+\)\%([eE][-+]\=\d\+\)\=[fFdD]\=/ " exponential notation 1
|
||||
syn match scalaNumber /\<\d\+[eE][-+]\=\d\+[fFdD]\=\>/ " exponential notation 2
|
||||
syn match scalaNumber /\<\d\+\%([eE][-+]\=\d\+\)\=[fFdD]\>/ " exponential notation 3
|
||||
hi link scalaNumber Number
|
||||
|
||||
syn region scalaRoundBrackets start="(" end=")" skipwhite contained contains=scalaTypeDeclaration,scalaSquareBrackets,scalaRoundBrackets
|
||||
|
||||
syn region scalaSquareBrackets matchgroup=scalaSquareBracketsBrackets start="\[" end="\]" skipwhite nextgroup=scalaTypeExtension contains=scalaTypeDeclaration,scalaSquareBrackets,scalaTypeOperator,scalaTypeAnnotationParameter
|
||||
syn match scalaTypeOperator /[-+=:<>]\+/ contained
|
||||
syn match scalaTypeAnnotationParameter /@\<[`_A-Za-z0-9$]\+\>/ contained
|
||||
hi link scalaSquareBracketsBrackets Type
|
||||
hi link scalaTypeOperator Keyword
|
||||
hi link scalaTypeAnnotationParameter Function
|
||||
|
||||
syn match scalaShebang "\%^#!.*" display
|
||||
syn region scalaMultilineComment start="/\*" end="\*/" contains=scalaMultilineComment,scalaDocLinks,scalaParameterAnnotation,scalaCommentAnnotation,scalaTodo,scalaCommentCodeBlock,@Spell keepend fold
|
||||
syn match scalaCommentAnnotation "@[_A-Za-z0-9$]\+" contained
|
||||
syn match scalaParameterAnnotation "\%(@tparam\|@param\|@see\)" nextgroup=scalaParamAnnotationValue skipwhite contained
|
||||
syn match scalaParamAnnotationValue /[.`_A-Za-z0-9$]\+/ contained
|
||||
syn region scalaDocLinks start="\[\[" end="\]\]" contained
|
||||
syn region scalaCommentCodeBlock matchgroup=Keyword start="{{{" end="}}}" contained
|
||||
syn match scalaTodo "\vTODO|FIXME|XXX" contained
|
||||
hi link scalaShebang Comment
|
||||
hi link scalaMultilineComment Comment
|
||||
hi link scalaDocLinks Function
|
||||
hi link scalaParameterAnnotation Function
|
||||
hi link scalaParamAnnotationValue Keyword
|
||||
hi link scalaCommentAnnotation Function
|
||||
hi link scalaCommentCodeBlockBrackets String
|
||||
hi link scalaCommentCodeBlock String
|
||||
hi link scalaTodo Todo
|
||||
|
||||
syn match scalaAnnotation /@\<[`_A-Za-z0-9$]\+\>/
|
||||
hi link scalaAnnotation PreProc
|
||||
|
||||
syn match scalaTrailingComment "//.*$" contains=scalaTodo,@Spell
|
||||
hi link scalaTrailingComment Comment
|
||||
|
||||
syn match scalaAkkaFSM /goto([^)]*)\_s\+\<using\>/ contains=scalaAkkaFSMGotoUsing
|
||||
syn match scalaAkkaFSM /stay\_s\+using/
|
||||
syn match scalaAkkaFSM /^\s*stay\s*$/
|
||||
syn match scalaAkkaFSM /when\ze([^)]*)/
|
||||
syn match scalaAkkaFSM /startWith\ze([^)]*)/
|
||||
syn match scalaAkkaFSM /initialize\ze()/
|
||||
syn match scalaAkkaFSM /onTransition/
|
||||
syn match scalaAkkaFSM /onTermination/
|
||||
syn match scalaAkkaFSM /whenUnhandled/
|
||||
syn match scalaAkkaFSMGotoUsing /\<using\>/
|
||||
syn match scalaAkkaFSMGotoUsing /\<goto\>/
|
||||
hi link scalaAkkaFSM PreProc
|
||||
hi link scalaAkkaFSMGotoUsing PreProc
|
||||
|
||||
let b:current_syntax = 'scala'
|
||||
|
||||
if main_syntax ==# 'scala'
|
||||
unlet main_syntax
|
||||
endif
|
||||
|
||||
" vim:set sw=2 sts=2 ts=8 et:
|
||||
+26
-22
@@ -2,8 +2,8 @@
|
||||
" 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: Jul 29, 2016
|
||||
" Version: 155
|
||||
" Last Change: Aug 26, 2016
|
||||
" Version: 162
|
||||
" 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)
|
||||
@@ -127,11 +127,11 @@ syn cluster shErrorList contains=shDoError,shIfError,shInError,shCaseError,shEsa
|
||||
if exists("b:is_kornshell")
|
||||
syn cluster ErrorList add=shDTestError
|
||||
endif
|
||||
syn cluster shArithParenList contains=shArithmetic,shCaseEsac,shComment,shDeref,shDo,shDerefSimple,shEcho,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement,shIf,shFor
|
||||
syn cluster shArithParenList contains=shArithmetic,shCaseEsac,shComment,shDeref,shDo,shDerefSimple,shEcho,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shHereString,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement,shIf,shFor
|
||||
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,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
|
||||
syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq
|
||||
syn cluster shCommandSubList contains=shAlias,shArithmetic,shComment,shCmdParenRegion,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,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
|
||||
@@ -139,7 +139,7 @@ syn cluster shDerefVarList contains=shDerefOff,shDerefOp,shDerefVarArray,shDeref
|
||||
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
|
||||
syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq
|
||||
syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq
|
||||
if exists("b:is_kornshell") || exists("b:is_bash")
|
||||
syn cluster shFunctionList add=shRepeat
|
||||
syn cluster shFunctionList add=shDblBrace,shDblParen
|
||||
@@ -147,11 +147,11 @@ endif
|
||||
syn cluster shHereBeginList contains=@shCommandSubList
|
||||
syn cluster shHereList contains=shBeginHere,shHerePayload
|
||||
syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload
|
||||
syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr
|
||||
syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo
|
||||
syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shHereString,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr
|
||||
syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo,shParen
|
||||
syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shForPP,shIf,shOption,shSet,shTest,shTestOpr,shTouch
|
||||
syn cluster shPPSRightList contains=shComment,shDeref,shDerefSimple,shEscape,shPosnParm
|
||||
syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator
|
||||
syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator
|
||||
syn cluster shTestList contains=shCharClass,shCommandSub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr
|
||||
|
||||
" Echo: {{{1
|
||||
@@ -216,8 +216,8 @@ syn match shPattern "\<\S\+\())\)\@=" contained contains=shExSingleQuote,shSin
|
||||
|
||||
" Subshells: {{{1
|
||||
" ==========
|
||||
syn region shExpr transparent matchgroup=shExprRegion start="{" end="}" contains=@shExprList2 nextgroup=shMoreSpecial
|
||||
syn region shSubSh transparent matchgroup=shSubShRegion start="[^(]\zs(" end=")" contains=@shSubShList nextgroup=shMoreSpecial
|
||||
syn region shExpr transparent matchgroup=shExprRegion start="{" end="}" contains=@shExprList2 nextgroup=shSpecialNxt
|
||||
syn region shSubSh transparent matchgroup=shSubShRegion start="[^(]\zs(" end=")" contains=@shSubShList nextgroup=shSpecialNxt
|
||||
|
||||
" Tests: {{{1
|
||||
"=======
|
||||
@@ -339,8 +339,8 @@ if exists("b:is_bash")
|
||||
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
|
||||
syn region shExDoubleQuote matchgroup=shQuote start=+\$"+ skip=+\\\\\|\\.\|\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,shSpecial
|
||||
syn region shExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial nextgroup=shSpecialNxt
|
||||
syn region shExDoubleQuote matchgroup=shQuote start=+\$"+ skip=+\\\\\|\\.\|\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,shSpecial nextgroup=shSpecialNxt
|
||||
elseif !exists("g:sh_no_error")
|
||||
syn region shExSingleQuote matchGroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial
|
||||
syn region shExDoubleQuote matchGroup=Error start=+\$"+ skip=+\\\\\|\\.+ end=+"+ contains=shStringSpecial
|
||||
@@ -351,7 +351,7 @@ syn match shStringSpecial "[^[:print:] \t]" contained
|
||||
syn match shStringSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]"
|
||||
syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shBkslshSnglQuote,shBkslshDblQuote
|
||||
syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]"
|
||||
syn match shMoreSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial contained
|
||||
syn match shSpecialNxt contained "\\[\\"'`$()#]"
|
||||
syn region shBkslshSnglQuote contained matchgroup=shQuote start=+'+ end=+'+ contains=@Spell
|
||||
syn region shBkslshDblQuote contained matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
|
||||
|
||||
@@ -386,7 +386,7 @@ ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<-\s*\\\z([^ \
|
||||
" =============
|
||||
" available for: bash; ksh (really should be ksh93 only) but not if its a posix
|
||||
if exists("b:is_bash") || (exists("b:is_kornshell") && !exists("g:is_posix"))
|
||||
syn match shRedir "<<<" skipwhite nextgroup=shCmdParenRegion
|
||||
syn match shHereString "<<<" skipwhite nextgroup=shCmdParenRegion
|
||||
endif
|
||||
|
||||
" Identifiers: {{{1
|
||||
@@ -431,6 +431,7 @@ syn match shDerefSimple "\$\%(\h\w*\|\d\)"
|
||||
syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray
|
||||
syn match shDerefSimple "\$[-#*@!?]"
|
||||
syn match shDerefSimple "\$\$"
|
||||
syn match shDerefSimple "\${\d}"
|
||||
if exists("b:is_bash") || exists("b:is_kornshell")
|
||||
syn region shDeref matchgroup=PreProc start="\${##\=" end="}" contains=@shDerefList
|
||||
syn region shDeref matchgroup=PreProc start="\${\$\$" end="}" contains=@shDerefList
|
||||
@@ -455,6 +456,7 @@ endif
|
||||
syn match shDerefSpecial contained "{\@<=[-*@?0]" nextgroup=shDerefOp,shDerefOpError
|
||||
syn match shDerefSpecial contained "\({[#!]\)\@<=[[:alnum:]*@_]\+" nextgroup=@shDerefVarList,shDerefOp
|
||||
syn match shDerefVar contained "{\@<=\h\w*" nextgroup=@shDerefVarList
|
||||
syn match shDerefVar contained '\d' nextgroup=@shDerefVarList
|
||||
if exists("b:is_kornshell")
|
||||
syn match shDerefVar contained "{\@<=\h\w*[[:alnum:]_.]*" nextgroup=@shDerefVarList
|
||||
endif
|
||||
@@ -482,24 +484,24 @@ endif
|
||||
syn match shDerefOp contained ":\=[-=?]" nextgroup=@shDerefPatternList
|
||||
syn match shDerefOp contained ":\=+" nextgroup=@shDerefPatternList
|
||||
if exists("b:is_bash") || exists("b:is_kornshell")
|
||||
syn match shDerefOp contained "#\{1,2}" nextgroup=@shDerefPatternList
|
||||
syn match shDerefOp contained "%\{1,2}" nextgroup=@shDerefPatternList
|
||||
syn match shDerefPattern contained "[^{}]\+" contains=shDeref,shDerefSimple,shDerefPattern,shDerefString,shCommandSub,shDerefEscape nextgroup=shDerefPattern
|
||||
syn match shDerefOp contained "#\{1,2}" nextgroup=@shDerefPatternList
|
||||
syn match shDerefOp contained "%\{1,2}" nextgroup=@shDerefPatternList
|
||||
syn match shDerefPattern contained "[^{}]\+" contains=shDeref,shDerefSimple,shDerefPattern,shDerefString,shCommandSub,shDerefEscape nextgroup=shDerefPattern
|
||||
syn region shDerefPattern contained start="{" end="}" contains=shDeref,shDerefSimple,shDerefString,shCommandSub nextgroup=shDerefPattern
|
||||
syn match shDerefEscape contained '\%(\\\\\)*\\.'
|
||||
endif
|
||||
if exists("b:is_bash")
|
||||
syn match shDerefOp contained "[,^]\{1,2}" nextgroup=@shDerefPatternList
|
||||
endif
|
||||
syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!'+ end=+'+ contains=shStringSpecial
|
||||
syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!'+ end=+'+ contains=shStringSpecial
|
||||
syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial
|
||||
syn match shDerefString contained "\\["']" nextgroup=shDerefPattern
|
||||
|
||||
if exists("b:is_bash")
|
||||
" bash : ${parameter:offset}
|
||||
" bash : ${parameter:offset:length}
|
||||
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 region shDerefOff contained start=':\ze[^-=?+]' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple
|
||||
syn region shDerefOff contained start=':\s-' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple
|
||||
syn match shDerefLen contained ":[^}]\+" contains=shDeref,shDerefSimple
|
||||
|
||||
" bash : ${parameter//pattern/string}
|
||||
@@ -602,14 +604,16 @@ hi def link shEcho shString
|
||||
hi def link shEchoDelim shOperator
|
||||
hi def link shEchoQuote shString
|
||||
hi def link shForPP shLoop
|
||||
hi def link shFunction Function
|
||||
hi def link shEmbeddedEcho shString
|
||||
hi def link shEscape shCommandSub
|
||||
hi def link shExDoubleQuote shDoubleQuote
|
||||
hi def link shExSingleQuote shSingleQuote
|
||||
hi def link shHereDoc shString
|
||||
hi def link shHereString shRedir
|
||||
hi def link shHerePayload shHereDoc
|
||||
hi def link shLoop shStatement
|
||||
hi def link shMoreSpecial shSpecial
|
||||
hi def link shSpecialNxt shSpecial
|
||||
hi def link shNoQuote shDoubleQuote
|
||||
hi def link shOption shCommandSub
|
||||
hi def link shPattern shString
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
" Maintainer: Dominik Fischer <d dot f dot fischer at web dot de>
|
||||
" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
|
||||
" Contributor: Karsten Hopp <karsten@redhat.com>
|
||||
" Last Change: 2016 Apr 7
|
||||
" SSH Version: 7.2p2
|
||||
" Contributor: Dean, Adam Kenneth <adam.ken.dean@hpe.com>
|
||||
" Last Change: 2016 Aug 11
|
||||
" SSH Version: 7.3p1
|
||||
"
|
||||
|
||||
" Setup
|
||||
@@ -205,6 +206,7 @@ syn keyword sshconfigKeyword Port
|
||||
syn keyword sshconfigKeyword PreferredAuthentications
|
||||
syn keyword sshconfigKeyword Protocol
|
||||
syn keyword sshconfigKeyword ProxyCommand
|
||||
syn keyword sshconfigKeyword ProxyJump
|
||||
syn keyword sshconfigKeyword ProxyUseFDPass
|
||||
syn keyword sshconfigKeyword PubkeyAcceptedKeyTypes
|
||||
syn keyword sshconfigKeyword PubkeyAuthentication
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
" Vim syntax file
|
||||
" Language: Tera Term Language (TTL)
|
||||
" Based on Tera Term Version 4.86
|
||||
" Based on Tera Term Version 4.92
|
||||
" Maintainer: Ken Takata
|
||||
" URL: https://github.com/k-takata/vim-teraterm
|
||||
" Last Change: 2015 Jun 24
|
||||
" Last Change: 2016 Aug 17
|
||||
" Filenames: *.ttl
|
||||
" License: VIM License
|
||||
|
||||
@@ -33,7 +33,7 @@ syn keyword ttlOperator and or xor not
|
||||
|
||||
syn match ttlVar "\<groupmatchstr\d\>"
|
||||
syn match ttlVar "\<param\d\>"
|
||||
syn keyword ttlVar inputstr matchstr paramcnt result timeout mtimeout
|
||||
syn keyword ttlVar inputstr matchstr paramcnt params result timeout mtimeout
|
||||
|
||||
|
||||
syn match ttlLine nextgroup=ttlStatement "^"
|
||||
|
||||
+22
-22
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim 7.4 script
|
||||
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Last Change: July 11, 2016
|
||||
" Version: 7.4-51
|
||||
" Last Change: August 26, 2016
|
||||
" Version: 7.4-52
|
||||
" Automatically generated keyword lists: {{{1
|
||||
|
||||
" Quit when a syntax file was already loaded {{{2
|
||||
@@ -18,24 +18,24 @@ 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] 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 keyword vimCommand contained a arga[dd] argu[ment] bad[d] bn[ext] breakd[el] bw[ipeout] cadde[xpr] cc cf[ile] changes cla[st] cnf[ile] comp[iler] cq[uit] cw[indow] delep dell diffg[et] dig[raphs] doau ea el[se] endt[ry] f[ile] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] ij[ump] isp[lit] keepa l[ist] lat lcl[ose] lex[pr] lgetb[uffer] lhi[story] 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] ccl[ose] cfdo chd[ir] cle[arjumps] co[py] con[tinue] cr[ewind] d[elete] deletel delm[arks] diffo[ff] dir dp earlier elsei[f] endw[hile] files fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] iuna[bbrev] keepalt la[st] later lcs lf[ile] lgete[xpr] 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] cd cfir[st] che[ckpath] clo[se] col[der] conf[irm] cs debug deletep delp diffp[atch] dj[ump] dr[op] ec em[enu] ene[w] filet fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] j[oin] keepj[umps] lad[dexpr] lb[uffer] lcscope lfdo lgr[ep] 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] cdo cg[etfile] checkt[ime] cmapc[lear] colo[rscheme] cope[n] cscope debugg[reedy] deletl dep diffpu[t] dl ds[earch] echoe[rr] en[dif] ex filetype fix[del] for gui helpg[rep] ia in ju[mps] keepp[atterns] laddb[uffer] lbo[ttom] ld[o] lfir[st] lgrepa[dd] 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] ce[nter] cgetb[uffer] chi[story] cn[ext] com cp[revious] cstag delc[ommand] deletp di[splay] diffs[plit] dli[st] dsp[lit] echom[sg] endf[unction] exi[t] filt[er] fo[ld] fu[nction] gvim helpt[ags] iabc[lear] intro k lN[ext] laddf[ile] lc[d] le[ft] lg[etfile] lh[elpgrep] 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] cbo[ttom] cex[pr] cgete[xpr] 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] fin[d] foldc[lose] g h[elp] hi if is[earch] kee[pmarks] lNf[ile] lan[guage] lch[dir] lefta[bove]
|
||||
syn match vimCommand contained "\<z[-+^.=]\=\>"
|
||||
syn keyword vimStdPlugin contained DiffOrig Man N[ext] P[rint] S TOhtml XMLent XMLns
|
||||
|
||||
" vimOptions are caught only when contained in a vimSet {{{2
|
||||
syn keyword vimOption contained acd ambw arshape background ballooneval bg bomb bs cb ch cinoptions cms commentstring copyindent cscopepathcomp csprg cul def diff display edcompatible enc errorbells expandtab fdl fenc fileencodings fixeol foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu lines lmap lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchexpr pexpr pmbfn printencoding prompt qe relativenumber rightleft rs runtimepath scroll sections sh shellslash shm showmode sj smd spell splitbelow ssl stl sw sxe tabpagemax tags tbs termguicolors tgst titleold top ttimeoutlen ttyscroll ul ur verbosefile visualbell wcm wi wildmenu winfixwidth wm wrapscan
|
||||
syn keyword vimOption contained ai anti autochdir backspace balloonexpr bh breakat bsdir cc charconvert cinw co compatible cot cscopeprg csqf cursorbind define diffexpr dy ef encoding errorfile exrc fdls fencs fileformat fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel langnoremap linespace lnr lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa patchmode pfn popt printexpr pt quoteescape remap rightleftcmd rtp sb scrollbind secure shcf shelltemp shortmess showtabline slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tagstack tc terse thesaurus titlestring tpm ttm ttytype undodir ut vfile vop wd wic wildmode winheight wmh write
|
||||
syn keyword vimOption contained akm antialias autoindent backup bdir bin breakindent bsk ccv ci cinwords cocu complete cp cscopequickfix csre cursorcolumn delcombine diffopt ea efm endofline errorformat fcl fdm fex fileformats fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imcmdline imsf indentexpr is isp keywordprg laststatus lisp loadplugins ma matchtime mco ml modeline mousefocus mousetime nrformats ofu packpath path ph pp printfont pumheight rdt renderoptions rl ru sbo scrolljump sel shell shelltype shortname shq sm so spellfile spr st sts swapsync syn tag tal tcldll textauto tildeop tl tr tty tw undofile vb vi wa weirdinvert wig wildoptions winminheight wmnu writeany
|
||||
syn keyword vimOption contained al ar autoread backupcopy bdlay binary breakindentopt bt cd cin clipboard cole completefunc cpo cscoperelative cst cursorline dex digraph ead ei eol esckeys fcs fdn ff fileignorecase flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km lazyredraw lispwords lpl macatsui maxcombine mef mls modelines mousehide mp nu omnifunc para pdev pheader preserveindent printheader pvh re report rlc rubydll sbr scrolloff selection shellcmdflag shellxescape showbreak si smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tb tenc textmode timeout tm ts ttybuiltin tx undolevels vbs viewdir wak wfh wildchar wim winminwidth wmw writebackup
|
||||
syn keyword vimOption contained aleph arab autowrite backupdir belloff bk bri bufhidden cdpath cindent cm colorcolumn completeopt cpoptions cscopetag csto cwh dg dip eadirection ek ep et fdc fdo ffs filetype fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lbr list ls magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paragraphs penc pi previewheight printmbcharset pvw readonly restorescreen rnu ruf sc scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartindent sol spellsuggest sr stal sua swf syntax tagcase tbi term textwidth timeoutlen to tsl ttyfast uc undoreload vdir viewoptions warn wfw wildcharm winaltkeys winwidth wop writedelay
|
||||
syn keyword vimOption contained allowrevins arabic autowriteall backupext beval bkc briopt buflisted cedit cink cmdheight columns concealcursor cpt cscopetagorder csverb debug dict dir eb emo equalalways eventignore fde fdt fic fillchars fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imactivatekey imi include inex isi js kp lcs listchars lsp makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc paste perldll pm previewwindow printmbfont pythondll redrawtime revins ro ruler scb scs sessionoptions shellquote shiftround showfulltag sidescrolloff smarttab sp spf srr startofline suffixes switchbuf ta taglength tbidi termbidi tf title toolbar tsr ttym udf updatecount ve viminfo wb wh wildignore window wiv wrap ws
|
||||
syn keyword vimOption contained altkeymap arabicshape aw backupskip bex bl brk buftype cf cinkeys cmdwinheight com conceallevel crb cscopeverbose cuc deco dictionary directory ed emoji equalprg ex fdi fen fileencoding fixendofline fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imaf iminsert includeexpr inf isident key langmap linebreak lm luadll makeprg maxmem mh mmp more mouses mzq nuw opfunc pastetoggle pex pmbcs printdevice printoptions pythonthreedll regexpengine ri rop rulerformat scr sect sft shellredir shiftwidth showmatch siso smc spc spl ss statusline suffixesadd sws tabline tagrelative tbis termencoding tgc titlelen toolbariconsize ttimeout ttymouse udir updatetime verbose virtualedit wc whichwrap wildignorecase winfixheight wiw wrapmargin ww
|
||||
syn keyword vimOption contained ambiwidth ari awa balloondelay bexpr bo browsedir casemap cfu cino cmp comments confirm cryptmethod cspc
|
||||
syn keyword vimOption contained acd ambw arshape background ballooneval bg bomb bs cb ch cinoptions cms commentstring copyindent cscopepathcomp csprg cursorbind delcombine diffopt ea efm endofline errorformat fcl fdm fex fileformats fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imcmdline imsf indentexpr is isp keywordprg laststatus lisp loadplugins ma matchtime mco ml modeline mousefocus mousetime nrformats ofu packpath path ph pp printfont pumheight rdt renderoptions rl ru sbo scrollbind secure shcf shelltemp shortmess showtabline sj smd spell splitbelow ssl stl sw sxe tabpagemax tags tbs termguicolors tgst titleold top ttimeoutlen ttyscroll ul ur verbosefile visualbell wcm wi wildmenu winfixwidth wm wrapscan
|
||||
syn keyword vimOption contained ai anti autochdir backspace balloonexpr bh breakat bsdir cc charconvert cinw co compatible cot cscopeprg csqf cursorcolumn dex digraph ead ei eol esckeys fcs fdn ff fileignorecase flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km lazyredraw lispwords lpl macatsui maxcombine mef mls modelines mousehide mp nu omnifunc para pdev pheader preserveindent printheader pvh re report rlc rubydll sbr scrolljump sel shell shelltype shortname shq slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tagstack tc terse thesaurus titlestring tpm ttm ttytype undodir ut vfile vop wd wic wildmode winheight wmh write
|
||||
syn keyword vimOption contained akm antialias autoindent backup bdir bin breakindent bsk ccv ci cinwords cocu complete cp cscopequickfix csre cursorline dg dip eadirection ek ep et fdc fdo ffs filetype fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lbr list ls magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paragraphs penc pi previewheight printmbcharset pvw readonly restorescreen rnu ruf sc scrolloff selection shellcmdflag shellxescape showbreak si sm so spellfile spr st sts swapsync syn tag tal tcldll textauto tildeop tl tr tty tw undofile vb vi wa weirdinvert wig wildoptions winminheight wmnu writeany
|
||||
syn keyword vimOption contained al ar autoread backupcopy bdlay binary breakindentopt bt cd cin clipboard cole completefunc cpo cscoperelative cst cwh dict dir eb emo equalalways eventignore fde fdt fic fillchars fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imactivatekey imi include inex isi js kp lcs listchars lsp makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc paste perldll pm previewwindow printmbfont pythondll redrawtime revins ro ruler scb scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tb tenc textmode timeout tm ts ttybuiltin tx undolevels vbs viewdir wak wfh wildchar wim winminwidth wmw writebackup
|
||||
syn keyword vimOption contained aleph arab autowrite backupdir belloff bk bri bufhidden cdpath cindent cm colorcolumn completeopt cpoptions cscopetag csto debug dictionary directory ed emoji equalprg ex fdi fen fileencoding fixendofline fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imaf iminsert includeexpr inf isident key langmap linebreak lm luadll makeprg maxmem mh mmp more mouses mzq nuw opfunc pastetoggle pex pmbcs printdevice printoptions pythonthreedll regexpengine ri rop rulerformat scl scs sessionoptions shellquote shiftround showfulltag sidescrolloff smartindent sol spellsuggest sr stal sua swf syntax tagcase tbi term textwidth timeoutlen to tsl ttyfast uc undoreload vdir viewoptions warn wfw wildcharm winaltkeys winwidth wop writedelay
|
||||
syn keyword vimOption contained allowrevins arabic autowriteall backupext beval bkc briopt buflisted cedit cink cmdheight columns concealcursor cpt cscopetagorder csverb deco diff display edcompatible enc errorbells expandtab fdl fenc fileencodings fixeol foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu lines lmap lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchexpr pexpr pmbfn printencoding prompt qe relativenumber rightleft rs runtimepath scr sect sft shellredir shiftwidth showmatch signcolumn smarttab sp spf srr startofline suffixes switchbuf ta taglength tbidi termbidi tf title toolbar tsr ttym udf updatecount ve viminfo wb wh wildignore window wiv wrap ws
|
||||
syn keyword vimOption contained altkeymap arabicshape aw backupskip bex bl brk buftype cf cinkeys cmdwinheight com conceallevel crb cscopeverbose cuc def diffexpr dy ef encoding errorfile exrc fdls fencs fileformat fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel langnoremap linespace lnr lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa patchmode pfn popt printexpr pt quoteescape remap rightleftcmd rtp sb scroll sections sh shellslash shm showmode siso smc spc spl ss statusline suffixesadd sws tabline tagrelative tbis termencoding tgc titlelen toolbariconsize ttimeout ttymouse udir updatetime verbose virtualedit wc whichwrap wildignorecase winfixheight wiw wrapmargin ww
|
||||
syn keyword vimOption contained ambiwidth ari awa balloondelay bexpr bo browsedir casemap cfu cino cmp comments confirm cryptmethod cspc cul define
|
||||
|
||||
" vimOptions: These are the turn-off setting variants {{{2
|
||||
syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobomb nobuflisted nocin noconfirm nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noendofline noerrorbells noex nofen nofixendofline nofkmap nofsync noguipty nohk nohkp noic noim noimd noinf noinsertmode nojoinspaces nolangnoremap nolbr nolisp nolnr nolpl noma nomagic noml nomodeline nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx noundofile novisualbell nowarn noweirdinvert nowfw nowildignorecase nowinfixheight nowiv nowrap nowrite nowritebackup
|
||||
@@ -65,21 +65,21 @@ syn keyword vimErrSetting contained bioskey biosk conskey consk autoprint beauti
|
||||
|
||||
" AutoCmd Events {{{2
|
||||
syn case ignore
|
||||
syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre CmdUndefined CmdwinEnter CmdwinLeave ColorScheme CompleteDone CursorHold CursorHoldI CursorMoved CursorMovedI EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave MenuPopup OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabEnter TabLeave TermChanged TermResponse TextChanged TextChangedI User VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave
|
||||
syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre CmdUndefined CmdwinEnter CmdwinLeave ColorScheme CompleteDone CursorHold CursorHoldI CursorMoved CursorMovedI EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave MenuPopup OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabClosed TabEnter TabLeave TabNew TermChanged TermResponse TextChanged TextChangedI User VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave WinNew
|
||||
|
||||
" Highlight commonly used Groupnames {{{2
|
||||
syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo
|
||||
|
||||
" Default highlighting groups {{{2
|
||||
syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineNr DiffAdd DiffChange DiffDelete DiffText Directory ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu
|
||||
syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineNr DiffAdd DiffChange DiffDelete DiffText Directory EndOfBuffer ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu
|
||||
syn match vimHLGroup contained "Conceal"
|
||||
syn case match
|
||||
|
||||
" Function Names {{{2
|
||||
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
|
||||
syn keyword vimFuncName contained abs append argv assert_fails assert_notequal atan2 buflisted bufwinid byteidxcomp char2nr ch_getbufnr ch_logfile ch_sendexpr cindent complete_add cos cursor diff_filler eval exepath extend filter floor foldclosed foldtextresult garbagecollect getbufvar getcmdline getcompletion getfperm getline getpos gettabinfo getwinposx glob2regpat haslocaldir histget hostname input inputsave isdirectory job_getchannel 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_garbagecollect_now test_null_job test_null_string timer_pause timer_stopall tr undofile values wildmenumode win_findbuf winheight winline winrestview wordcount
|
||||
syn keyword vimFuncName contained acos argc asin assert_false assert_notmatch browse bufloaded bufwinnr call ch_close ch_getjob ch_open ch_sendraw clearmatches complete_check cosh deepcopy diff_hlID eventhandler exists feedkeys finddir fmod foldclosedend foreground get getchar getcmdpos getcurpos getfsize getloclist getqflist gettabvar getwinposy globpath hasmapto histnr iconv inputdialog inputsecret islocked job_info 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_autochdir test_null_channel test_null_list test_settime timer_start tolower trunc undotree virtcol winbufnr win_getid win_id2tabwin winnr winsaveview writefile
|
||||
syn keyword vimFuncName contained add argidx assert_equal assert_inrange assert_true browsedir bufname byte2line ceil ch_evalexpr ch_info ch_read ch_setoptions col confirm count delete empty executable exp filereadable findfile fnameescape foldlevel funcref getbufinfo getcharmod getcmdtype getcwd getftime getmatches getreg gettabwinvar getwinvar has histadd hlexists indent inputlist insert isnan job_setoptions 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_disable_char_avail test_null_dict test_null_partial timer_info timer_stop toupper type uniq visualmode wincol win_gotoid win_id2win winrestcmd winwidth xor
|
||||
syn keyword vimFuncName contained and arglistid assert_exception assert_match atan bufexists bufnr byteidx changenr ch_evalraw ch_log ch_readraw ch_status complete copy cscope_connection did_filetype escape execute expand filewritable float2nr fnamemodify foldtext function getbufline getcharsearch getcmdwintype getfontname getftype getpid getregtype getwininfo glob has_key histdel hlID index inputrestore invert items job_start
|
||||
|
||||
"--- syntax here and above generated by mkvimvim ---
|
||||
" Special Vim Highlighting (not automatic) {{{1
|
||||
|
||||
@@ -478,7 +478,7 @@ Nota:
|
||||
|
||||
1. Ctrl-g muestra la posición del cursor en el fichero y su estado.
|
||||
Mayu-G mueve el cursor al final del fichero. Un número de línea
|
||||
sewguido de Mayu-G mueve el cursor a la línea con ese número.
|
||||
seguido de Mayu-G mueve el cursor a la línea con ese número.
|
||||
|
||||
2. Pulsando / seguido de una frase busca la frase hacia ADELANTE.
|
||||
Pulsando ? seguido de una frase busca la frase hacia ATRÁS.
|
||||
|
||||
@@ -478,7 +478,7 @@ Nota: ¡Esto es muy útil en la detección de errores en un programa con
|
||||
|
||||
1. Ctrl-g muestra la posición del cursor en el fichero y su estado.
|
||||
Mayu-G mueve el cursor al final del fichero. Un número de línea
|
||||
sewguido de Mayu-G mueve el cursor a la línea con ese número.
|
||||
seguido de Mayu-G mueve el cursor a la línea con ese número.
|
||||
|
||||
2. Pulsando / seguido de una frase busca la frase hacia ADELANTE.
|
||||
Pulsando ? seguido de una frase busca la frase hacia ATRÁS.
|
||||
|
||||
@@ -1255,7 +1255,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>105</string>
|
||||
<string>107</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
|
||||
@@ -1597,7 +1597,7 @@ gui_mch_get_color(char_u *name)
|
||||
/*
|
||||
* Return the RGB value of a pixel as long.
|
||||
*/
|
||||
long_u
|
||||
guicolor_T
|
||||
gui_mch_get_rgb(guicolor_T pixel)
|
||||
{
|
||||
// This is only implemented so that vim can guess the correct value for
|
||||
|
||||
+13
-7
@@ -2045,13 +2045,9 @@ test1 \
|
||||
test_listchars \
|
||||
test_listlbr \
|
||||
test_listlbr_utf8 \
|
||||
test_mapping \
|
||||
test_marks \
|
||||
test_nested_function \
|
||||
test_options \
|
||||
test_search_mbyte \
|
||||
test_signs \
|
||||
test_tagcase \
|
||||
test_utf8 \
|
||||
test_wordcount \
|
||||
test_writefile \
|
||||
@@ -2061,7 +2057,7 @@ test1 \
|
||||
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 test62 test63 test64 test65 test66 test67 test68 test69 \
|
||||
test60 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 \
|
||||
@@ -2075,6 +2071,7 @@ test_arglist \
|
||||
test_autochdir \
|
||||
test_autocmd \
|
||||
test_backspace_opt \
|
||||
test_bufwintabinfo \
|
||||
test_cdo \
|
||||
test_channel \
|
||||
test_cmdline \
|
||||
@@ -2092,6 +2089,7 @@ test_arglist \
|
||||
test_farsi \
|
||||
test_feedkeys \
|
||||
test_file_perm \
|
||||
test_filter_cmd \
|
||||
test_filter_map \
|
||||
test_fnamemodify \
|
||||
test_glob2regpat \
|
||||
@@ -2112,12 +2110,14 @@ test_arglist \
|
||||
test_largefile \
|
||||
test_lispwords \
|
||||
test_man \
|
||||
test_mapping \
|
||||
test_match \
|
||||
test_matchadd_conceal \
|
||||
test_matchadd_conceal_utf8 \
|
||||
test_matchstrpos \
|
||||
test_menu \
|
||||
test_messages \
|
||||
test_netbeans \
|
||||
test_options \
|
||||
test_packadd \
|
||||
test_partial \
|
||||
test_perl \
|
||||
@@ -2127,15 +2127,21 @@ test_arglist \
|
||||
test_regexp_utf8 \
|
||||
test_reltime \
|
||||
test_ruby \
|
||||
test_startup \
|
||||
test_search \
|
||||
test_searchpos \
|
||||
test_set \
|
||||
test_signs \
|
||||
test_sort \
|
||||
test_source_utf8 \
|
||||
test_startup \
|
||||
test_startup_utf8 \
|
||||
test_stat \
|
||||
test_statusline \
|
||||
test_syn_attr \
|
||||
test_syntax \
|
||||
test_tabline \
|
||||
test_tabpage \
|
||||
test_tagcase \
|
||||
test_tagjump \
|
||||
test_textobjects \
|
||||
test_timers \
|
||||
|
||||
Vendored
+1
-1
@@ -6049,7 +6049,7 @@ __:
|
||||
eof
|
||||
eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
|
||||
rm -f -- "${tmp_mkf}"
|
||||
if test "x$MACOSX" = "xyes" && ${vi_cv_path_python} -c \
|
||||
if test "x$MACOSX" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
|
||||
"import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
|
||||
vi_cv_path_python_plibs="-framework Python"
|
||||
if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
|
||||
|
||||
+97
-44
@@ -70,6 +70,64 @@ static char *e_auabort = N_("E855: Autocommands caused command to abort");
|
||||
/* Number of times free_buffer() was called. */
|
||||
static int buf_free_count = 0;
|
||||
|
||||
/* Read data from buffer for retrying. */
|
||||
static int
|
||||
read_buffer(
|
||||
int read_stdin, /* read file from stdin, otherwise fifo */
|
||||
exarg_T *eap, /* for forced 'ff' and 'fenc' or NULL */
|
||||
int flags) /* extra flags for readfile() */
|
||||
{
|
||||
int retval = OK;
|
||||
linenr_T line_count;
|
||||
|
||||
/*
|
||||
* Read from the buffer which the text is already filled in and append at
|
||||
* the end. This makes it possible to retry when 'fileformat' or
|
||||
* 'fileencoding' was guessed wrong.
|
||||
*/
|
||||
line_count = curbuf->b_ml.ml_line_count;
|
||||
retval = readfile(
|
||||
read_stdin ? NULL : curbuf->b_ffname,
|
||||
read_stdin ? NULL : curbuf->b_fname,
|
||||
(linenr_T)line_count, (linenr_T)0, (linenr_T)MAXLNUM, eap,
|
||||
flags | READ_BUFFER);
|
||||
if (retval == OK)
|
||||
{
|
||||
/* Delete the binary lines. */
|
||||
while (--line_count >= 0)
|
||||
ml_delete((linenr_T)1, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Delete the converted lines. */
|
||||
while (curbuf->b_ml.ml_line_count > line_count)
|
||||
ml_delete(line_count, FALSE);
|
||||
}
|
||||
/* Put the cursor on the first line. */
|
||||
curwin->w_cursor.lnum = 1;
|
||||
curwin->w_cursor.col = 0;
|
||||
|
||||
if (read_stdin)
|
||||
{
|
||||
/* Set or reset 'modified' before executing autocommands, so that
|
||||
* it can be changed there. */
|
||||
if (!readonlymode && !bufempty())
|
||||
changed();
|
||||
else if (retval != FAIL)
|
||||
unchanged(curbuf, FALSE);
|
||||
|
||||
#ifdef FEAT_AUTOCMD
|
||||
# ifdef FEAT_EVAL
|
||||
apply_autocmds_retval(EVENT_STDINREADPOST, NULL, NULL, FALSE,
|
||||
curbuf, &retval);
|
||||
# else
|
||||
apply_autocmds(EVENT_STDINREADPOST, NULL, NULL, FALSE, curbuf);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
/*
|
||||
* Open current buffer, that is: open the memfile and read the file into
|
||||
* memory.
|
||||
@@ -88,6 +146,7 @@ open_buffer(
|
||||
#ifdef FEAT_SYN_HL
|
||||
long old_tw = curbuf->b_p_tw;
|
||||
#endif
|
||||
int read_fifo = FALSE;
|
||||
|
||||
/*
|
||||
* The 'readonly' flag is only set when BF_NEVERLOADED is being reset.
|
||||
@@ -143,17 +202,45 @@ open_buffer(
|
||||
)
|
||||
{
|
||||
int old_msg_silent = msg_silent;
|
||||
|
||||
#ifdef UNIX
|
||||
int save_bin = curbuf->b_p_bin;
|
||||
int perm;
|
||||
#endif
|
||||
#ifdef FEAT_NETBEANS_INTG
|
||||
int oldFire = netbeansFireChanges;
|
||||
|
||||
netbeansFireChanges = 0;
|
||||
#endif
|
||||
#ifdef UNIX
|
||||
perm = mch_getperm(curbuf->b_ffname);
|
||||
if (perm >= 0 && (0
|
||||
# ifdef S_ISFIFO
|
||||
|| S_ISFIFO(perm)
|
||||
# endif
|
||||
# ifdef S_ISSOCK
|
||||
|| S_ISSOCK(perm)
|
||||
# endif
|
||||
# ifdef OPEN_CHR_FILES
|
||||
|| (S_ISCHR(perm) && is_dev_fd_file(curbuf->b_ffname))
|
||||
# endif
|
||||
))
|
||||
read_fifo = TRUE;
|
||||
if (read_fifo)
|
||||
curbuf->b_p_bin = TRUE;
|
||||
#endif
|
||||
if (shortmess(SHM_FILEINFO))
|
||||
msg_silent = 1;
|
||||
retval = readfile(curbuf->b_ffname, curbuf->b_fname,
|
||||
(linenr_T)0, (linenr_T)0, (linenr_T)MAXLNUM, eap,
|
||||
flags | READ_NEW);
|
||||
flags | READ_NEW | (read_fifo ? READ_FIFO : 0));
|
||||
#ifdef UNIX
|
||||
if (read_fifo)
|
||||
{
|
||||
curbuf->b_p_bin = save_bin;
|
||||
if (retval == OK)
|
||||
retval = read_buffer(FALSE, eap, flags);
|
||||
}
|
||||
#endif
|
||||
msg_silent = old_msg_silent;
|
||||
#ifdef FEAT_NETBEANS_INTG
|
||||
netbeansFireChanges = oldFire;
|
||||
@@ -164,8 +251,7 @@ open_buffer(
|
||||
}
|
||||
else if (read_stdin)
|
||||
{
|
||||
int save_bin = curbuf->b_p_bin;
|
||||
linenr_T line_count;
|
||||
int save_bin = curbuf->b_p_bin;
|
||||
|
||||
/*
|
||||
* First read the text in binary mode into the buffer.
|
||||
@@ -179,42 +265,7 @@ open_buffer(
|
||||
flags | (READ_NEW + READ_STDIN));
|
||||
curbuf->b_p_bin = save_bin;
|
||||
if (retval == OK)
|
||||
{
|
||||
line_count = curbuf->b_ml.ml_line_count;
|
||||
retval = readfile(NULL, NULL, (linenr_T)line_count,
|
||||
(linenr_T)0, (linenr_T)MAXLNUM, eap,
|
||||
flags | READ_BUFFER);
|
||||
if (retval == OK)
|
||||
{
|
||||
/* Delete the binary lines. */
|
||||
while (--line_count >= 0)
|
||||
ml_delete((linenr_T)1, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Delete the converted lines. */
|
||||
while (curbuf->b_ml.ml_line_count > line_count)
|
||||
ml_delete(line_count, FALSE);
|
||||
}
|
||||
/* Put the cursor on the first line. */
|
||||
curwin->w_cursor.lnum = 1;
|
||||
curwin->w_cursor.col = 0;
|
||||
|
||||
/* Set or reset 'modified' before executing autocommands, so that
|
||||
* it can be changed there. */
|
||||
if (!readonlymode && !bufempty())
|
||||
changed();
|
||||
else if (retval != FAIL)
|
||||
unchanged(curbuf, FALSE);
|
||||
#ifdef FEAT_AUTOCMD
|
||||
# ifdef FEAT_EVAL
|
||||
apply_autocmds_retval(EVENT_STDINREADPOST, NULL, NULL, FALSE,
|
||||
curbuf, &retval);
|
||||
# else
|
||||
apply_autocmds(EVENT_STDINREADPOST, NULL, NULL, FALSE, curbuf);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
retval = read_buffer(TRUE, eap, flags);
|
||||
}
|
||||
|
||||
/* if first time loading this buffer, init b_chartab[] */
|
||||
@@ -243,7 +294,7 @@ open_buffer(
|
||||
#endif
|
||||
)
|
||||
changed();
|
||||
else if (retval != FAIL && !read_stdin)
|
||||
else if (retval != FAIL && !read_stdin && !read_fifo)
|
||||
unchanged(curbuf, FALSE);
|
||||
save_file_ff(curbuf); /* keep this fileformat */
|
||||
|
||||
@@ -427,7 +478,7 @@ close_buffer(
|
||||
|
||||
if (win != NULL
|
||||
#ifdef FEAT_WINDOWS
|
||||
&& win_valid(win) /* in case autocommands closed the window */
|
||||
&& win_valid_any_tab(win) /* in case autocommands closed the window */
|
||||
#endif
|
||||
)
|
||||
{
|
||||
@@ -533,7 +584,7 @@ aucmd_abort:
|
||||
|
||||
if (
|
||||
#ifdef FEAT_WINDOWS
|
||||
win_valid(win) &&
|
||||
win_valid_any_tab(win) &&
|
||||
#else
|
||||
win != NULL &&
|
||||
#endif
|
||||
@@ -2884,12 +2935,14 @@ buflist_list(exarg_T *eap)
|
||||
|| (vim_strchr(eap->arg, '#')
|
||||
&& (buf == curbuf || curwin->w_alt_fnum != buf->b_fnum)))
|
||||
continue;
|
||||
msg_putchar('\n');
|
||||
if (buf_spname(buf) != NULL)
|
||||
vim_strncpy(NameBuff, buf_spname(buf), MAXPATHL - 1);
|
||||
else
|
||||
home_replace(buf, buf->b_fname, NameBuff, MAXPATHL, TRUE);
|
||||
if (message_filtered(NameBuff))
|
||||
continue;
|
||||
|
||||
msg_putchar('\n');
|
||||
len = vim_snprintf((char *)IObuff, IOSIZE - 20, "%3d%c%c%c%c%c \"%s\"",
|
||||
buf->b_fnum,
|
||||
buf->b_p_bl ? ' ' : 'u',
|
||||
|
||||
+11
-11
@@ -723,7 +723,7 @@ channel_open(
|
||||
if ((host = gethostbyname(hostname)) == NULL)
|
||||
{
|
||||
ch_error(channel, "in gethostbyname() in channel_open()");
|
||||
PERROR("E901: gethostbyname() in channel_open()");
|
||||
PERROR(_("E901: gethostbyname() in channel_open()"));
|
||||
channel_free(channel);
|
||||
return NULL;
|
||||
}
|
||||
@@ -750,7 +750,7 @@ channel_open(
|
||||
if (sd == -1)
|
||||
{
|
||||
ch_error(channel, "in socket() in channel_open().");
|
||||
PERROR("E898: socket() in channel_open()");
|
||||
PERROR(_("E898: socket() in channel_open()"));
|
||||
channel_free(channel);
|
||||
return NULL;
|
||||
}
|
||||
@@ -2091,7 +2091,7 @@ channel_exe_cmd(channel_T *channel, int part, typval_T *argv)
|
||||
{
|
||||
ch_error(channel, "received command with non-string argument");
|
||||
if (p_verbose > 2)
|
||||
EMSG("E903: received command with non-string argument");
|
||||
EMSG(_("E903: received command with non-string argument"));
|
||||
return;
|
||||
}
|
||||
arg = argv[1].vval.v_string;
|
||||
@@ -2150,13 +2150,13 @@ channel_exe_cmd(channel_T *channel, int part, typval_T *argv)
|
||||
{
|
||||
ch_error(channel, "last argument for expr/call must be a number");
|
||||
if (p_verbose > 2)
|
||||
EMSG("E904: last argument for expr/call must be a number");
|
||||
EMSG(_("E904: last argument for expr/call must be a number"));
|
||||
}
|
||||
else if (is_call && argv[2].v_type != VAR_LIST)
|
||||
{
|
||||
ch_error(channel, "third argument for call must be a list");
|
||||
if (p_verbose > 2)
|
||||
EMSG("E904: third argument for call must be a list");
|
||||
EMSG(_("E904: third argument for call must be a list"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2186,7 +2186,7 @@ channel_exe_cmd(channel_T *channel, int part, typval_T *argv)
|
||||
int id = argv[id_idx].vval.v_number;
|
||||
|
||||
if (tv != NULL)
|
||||
json = json_encode_nr_expr(id, tv, options);
|
||||
json = json_encode_nr_expr(id, tv, options | JSON_NL);
|
||||
if (tv == NULL || (json != NULL && *json == NUL))
|
||||
{
|
||||
/* If evaluation failed or the result can't be encoded
|
||||
@@ -2196,7 +2196,7 @@ channel_exe_cmd(channel_T *channel, int part, typval_T *argv)
|
||||
err_tv.v_type = VAR_STRING;
|
||||
err_tv.vval.v_string = (char_u *)"ERROR";
|
||||
tv = &err_tv;
|
||||
json = json_encode_nr_expr(id, tv, options);
|
||||
json = json_encode_nr_expr(id, tv, options | JSON_NL);
|
||||
}
|
||||
if (json != NULL)
|
||||
{
|
||||
@@ -2216,7 +2216,7 @@ channel_exe_cmd(channel_T *channel, int part, typval_T *argv)
|
||||
else if (p_verbose > 2)
|
||||
{
|
||||
ch_errors(channel, "Received unknown command: %s", (char *)cmd);
|
||||
EMSG2("E905: received unknown command: %s", cmd);
|
||||
EMSG2(_("E905: received unknown command: %s"), cmd);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3407,7 +3407,7 @@ channel_send(channel_T *channel, int part, char_u *buf, int len, char *fun)
|
||||
if (!channel->ch_error && fun != NULL)
|
||||
{
|
||||
ch_errors(channel, "%s(): write while not connected", fun);
|
||||
EMSG2("E630: %s(): write while not connected", fun);
|
||||
EMSG2(_("E630: %s(): write while not connected"), fun);
|
||||
}
|
||||
channel->ch_error = TRUE;
|
||||
return FAIL;
|
||||
@@ -3432,7 +3432,7 @@ channel_send(channel_T *channel, int part, char_u *buf, int len, char *fun)
|
||||
if (!channel->ch_error && fun != NULL)
|
||||
{
|
||||
ch_errors(channel, "%s(): write failed", fun);
|
||||
EMSG2("E631: %s(): write failed", fun);
|
||||
EMSG2(_("E631: %s(): write failed"), fun);
|
||||
}
|
||||
channel->ch_error = TRUE;
|
||||
return FAIL;
|
||||
@@ -3525,7 +3525,7 @@ ch_expr_common(typval_T *argvars, typval_T *rettv, int eval)
|
||||
|
||||
id = ++channel->ch_last_msg_id;
|
||||
text = json_encode_nr_expr(id, &argvars[1],
|
||||
ch_mode == MODE_JS ? JSON_JS : 0);
|
||||
(ch_mode == MODE_JS ? JSON_JS : 0) | JSON_NL);
|
||||
if (text == NULL)
|
||||
return;
|
||||
|
||||
|
||||
+1
-1
@@ -1223,7 +1223,7 @@ eof
|
||||
dnl -- delete the lines from make about Entering/Leaving directory
|
||||
eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
|
||||
rm -f -- "${tmp_mkf}"
|
||||
if test "x$MACOSX" = "xyes" && ${vi_cv_path_python} -c \
|
||||
if test "x$MACOSX" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
|
||||
"import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
|
||||
vi_cv_path_python_plibs="-framework Python"
|
||||
if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
|
||||
|
||||
+24
@@ -366,6 +366,30 @@ dict_add_list(dict_T *d, char *key, list_T *list)
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add a dict entry to dictionary "d".
|
||||
* Returns FAIL when out of memory and when key already exists.
|
||||
*/
|
||||
int
|
||||
dict_add_dict(dict_T *d, char *key, dict_T *dict)
|
||||
{
|
||||
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_DICT;
|
||||
item->di_tv.vval.v_dict = dict;
|
||||
if (dict_add(d, item) == FAIL)
|
||||
{
|
||||
dictitem_free(item);
|
||||
return FAIL;
|
||||
}
|
||||
++dict->dv_refcount;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the number of items in a Dictionary.
|
||||
*/
|
||||
|
||||
+6
-2
@@ -1236,10 +1236,14 @@ ex_diffoff(exarg_T *eap)
|
||||
: wp->w_p_fen_save;
|
||||
|
||||
foldUpdateAll(wp);
|
||||
/* make sure topline is not halfway a fold */
|
||||
changed_window_setting_win(wp);
|
||||
#endif
|
||||
}
|
||||
/* remove filler lines */
|
||||
wp->w_topfill = 0;
|
||||
|
||||
/* make sure topline is not halfway a fold and cursor is
|
||||
* invalidated */
|
||||
changed_window_setting_win(wp);
|
||||
|
||||
/* Note: 'sbo' is not restored, it's a global option. */
|
||||
diff_buf_adjust(wp);
|
||||
|
||||
+2
-6
@@ -3907,7 +3907,7 @@ ins_compl_prep(int c)
|
||||
|
||||
/* 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())
|
||||
if (c == Ctrl_E)
|
||||
{
|
||||
ins_compl_delete();
|
||||
if (compl_leader != NULL)
|
||||
@@ -6775,11 +6775,7 @@ comp_textwidth(
|
||||
textwidth -= curwin->w_p_fdc;
|
||||
#endif
|
||||
#ifdef FEAT_SIGNS
|
||||
if (curwin->w_buffer->b_signlist != NULL
|
||||
# ifdef FEAT_NETBEANS_INTG
|
||||
|| curwin->w_buffer->b_has_sign_column
|
||||
# endif
|
||||
)
|
||||
if (signcolumn_on(curwin))
|
||||
textwidth -= 1;
|
||||
#endif
|
||||
if (curwin->w_p_nu || curwin->w_p_rnu)
|
||||
|
||||
+23
-63
@@ -233,8 +233,6 @@ static int get_string_tv(char_u **arg, typval_T *rettv, int evaluate);
|
||||
static int get_lit_string_tv(char_u **arg, typval_T *rettv, int evaluate);
|
||||
static int free_unref_items(int copyID);
|
||||
static int get_env_tv(char_u **arg, typval_T *rettv, int evaluate);
|
||||
|
||||
|
||||
static int get_env_len(char_u **arg);
|
||||
static char_u * make_expanded_name(char_u *in_start, char_u *expr_start, char_u *expr_end, char_u *in_end);
|
||||
static void check_vars(char_u *name, int len);
|
||||
@@ -4089,11 +4087,11 @@ eval6(
|
||||
{
|
||||
#ifdef FEAT_NUM64
|
||||
if (n1 == 0)
|
||||
n1 = -0x7fffffffffffffff - 1; /* similar to NaN */
|
||||
n1 = -0x7fffffffffffffffLL - 1; /* similar to NaN */
|
||||
else if (n1 < 0)
|
||||
n1 = -0x7fffffffffffffff;
|
||||
n1 = -0x7fffffffffffffffLL;
|
||||
else
|
||||
n1 = 0x7fffffffffffffff;
|
||||
n1 = 0x7fffffffffffffffLL;
|
||||
#else
|
||||
if (n1 == 0)
|
||||
n1 = -0x7fffffffL - 1L; /* similar to NaN */
|
||||
@@ -4926,7 +4924,7 @@ get_string_tv(char_u **arg, typval_T *rettv, int evaluate)
|
||||
break;
|
||||
|
||||
/* Special key, e.g.: "\<C-W>" */
|
||||
case '<': extra = trans_special(&p, name, TRUE);
|
||||
case '<': extra = trans_special(&p, name, TRUE, TRUE);
|
||||
if (extra != 0)
|
||||
{
|
||||
name += extra;
|
||||
@@ -4943,7 +4941,9 @@ get_string_tv(char_u **arg, typval_T *rettv, int evaluate)
|
||||
|
||||
}
|
||||
*name = NUL;
|
||||
*arg = p + 1;
|
||||
if (*p != NUL) /* just in case */
|
||||
++p;
|
||||
*arg = p;
|
||||
|
||||
return OK;
|
||||
}
|
||||
@@ -8470,9 +8470,23 @@ getwinvar(
|
||||
|| switch_win(&oldcurwin, &oldtabpage, win, tp, TRUE) == OK)
|
||||
#endif
|
||||
{
|
||||
if (*varname == '&') /* window-local-option */
|
||||
if (*varname == '&')
|
||||
{
|
||||
if (get_option_tv(&varname, rettv, 1) == OK)
|
||||
if (varname[1] == NUL)
|
||||
{
|
||||
/* get all window-local options in a dict */
|
||||
dict_T *opts = get_winbuf_options(FALSE);
|
||||
|
||||
if (opts != NULL)
|
||||
{
|
||||
rettv->v_type = VAR_DICT;
|
||||
rettv->vval.v_dict = opts;
|
||||
++opts->dv_refcount;
|
||||
done = TRUE;
|
||||
}
|
||||
}
|
||||
else if (get_option_tv(&varname, rettv, 1) == OK)
|
||||
/* window-local-option */
|
||||
done = TRUE;
|
||||
}
|
||||
else
|
||||
@@ -8926,60 +8940,6 @@ last_set_msg(scid_T scriptID)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* List v:oldfiles in a nice way.
|
||||
*/
|
||||
void
|
||||
ex_oldfiles(exarg_T *eap UNUSED)
|
||||
{
|
||||
list_T *l = vimvars[VV_OLDFILES].vv_list;
|
||||
listitem_T *li;
|
||||
int nr = 0;
|
||||
|
||||
if (l == NULL)
|
||||
msg((char_u *)_("No old files"));
|
||||
else
|
||||
{
|
||||
msg_start();
|
||||
msg_scroll = TRUE;
|
||||
for (li = l->lv_first; li != NULL && !got_int; li = li->li_next)
|
||||
{
|
||||
msg_outnum((long)++nr);
|
||||
MSG_PUTS(": ");
|
||||
msg_outtrans(get_tv_string(&li->li_tv));
|
||||
msg_putchar('\n');
|
||||
out_flush(); /* output one line at a time */
|
||||
ui_breakcheck();
|
||||
}
|
||||
/* Assume "got_int" was set to truncate the listing. */
|
||||
got_int = FALSE;
|
||||
|
||||
#ifdef FEAT_BROWSE_CMD
|
||||
if (cmdmod.browse)
|
||||
{
|
||||
quit_more = FALSE;
|
||||
nr = prompt_for_number(FALSE);
|
||||
msg_starthere();
|
||||
if (nr > 0)
|
||||
{
|
||||
char_u *p = list_find_str(get_vim_var_list(VV_OLDFILES),
|
||||
(long)nr);
|
||||
|
||||
if (p != NULL)
|
||||
{
|
||||
p = expand_env_save(p);
|
||||
eap->arg = p;
|
||||
eap->cmdidx = CMD_edit;
|
||||
cmdmod.browse = FALSE;
|
||||
do_exedit(eap, NULL);
|
||||
vim_free(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/* reset v:option_new, v:option_old and v:option_type */
|
||||
void
|
||||
reset_v_option_vars(void)
|
||||
|
||||
+481
-46
@@ -152,6 +152,7 @@ static void f_funcref(typval_T *argvars, typval_T *rettv);
|
||||
static void f_function(typval_T *argvars, typval_T *rettv);
|
||||
static void f_garbagecollect(typval_T *argvars, typval_T *rettv);
|
||||
static void f_get(typval_T *argvars, typval_T *rettv);
|
||||
static void f_getbufinfo(typval_T *argvars, typval_T *rettv);
|
||||
static void f_getbufline(typval_T *argvars, typval_T *rettv);
|
||||
static void f_getbufvar(typval_T *argvars, typval_T *rettv);
|
||||
static void f_getchar(typval_T *argvars, typval_T *rettv);
|
||||
@@ -171,6 +172,7 @@ static void f_getfsize(typval_T *argvars, typval_T *rettv);
|
||||
static void f_getftime(typval_T *argvars, typval_T *rettv);
|
||||
static void f_getftype(typval_T *argvars, typval_T *rettv);
|
||||
static void f_getline(typval_T *argvars, typval_T *rettv);
|
||||
static void f_getloclist(typval_T *argvars UNUSED, typval_T *rettv UNUSED);
|
||||
static void f_getmatches(typval_T *argvars, typval_T *rettv);
|
||||
static void f_getpid(typval_T *argvars, typval_T *rettv);
|
||||
static void f_getcurpos(typval_T *argvars, typval_T *rettv);
|
||||
@@ -178,8 +180,10 @@ static void f_getpos(typval_T *argvars, typval_T *rettv);
|
||||
static void f_getqflist(typval_T *argvars, typval_T *rettv);
|
||||
static void f_getreg(typval_T *argvars, typval_T *rettv);
|
||||
static void f_getregtype(typval_T *argvars, typval_T *rettv);
|
||||
static void f_gettabinfo(typval_T *argvars, typval_T *rettv);
|
||||
static void f_gettabvar(typval_T *argvars, typval_T *rettv);
|
||||
static void f_gettabwinvar(typval_T *argvars, typval_T *rettv);
|
||||
static void f_getwininfo(typval_T *argvars, typval_T *rettv);
|
||||
static void f_getwinposx(typval_T *argvars, typval_T *rettv);
|
||||
static void f_getwinposy(typval_T *argvars, typval_T *rettv);
|
||||
static void f_getwinvar(typval_T *argvars, typval_T *rettv);
|
||||
@@ -396,8 +400,11 @@ static void f_tan(typval_T *argvars, typval_T *rettv);
|
||||
static void f_tanh(typval_T *argvars, typval_T *rettv);
|
||||
#endif
|
||||
#ifdef FEAT_TIMERS
|
||||
static void f_timer_info(typval_T *argvars, typval_T *rettv);
|
||||
static void f_timer_pause(typval_T *argvars, typval_T *rettv);
|
||||
static void f_timer_start(typval_T *argvars, typval_T *rettv);
|
||||
static void f_timer_stop(typval_T *argvars, typval_T *rettv);
|
||||
static void f_timer_stopall(typval_T *argvars, typval_T *rettv);
|
||||
#endif
|
||||
static void f_tolower(typval_T *argvars, typval_T *rettv);
|
||||
static void f_toupper(typval_T *argvars, typval_T *rettv);
|
||||
@@ -568,6 +575,7 @@ static struct fst
|
||||
{"function", 1, 3, f_function},
|
||||
{"garbagecollect", 0, 1, f_garbagecollect},
|
||||
{"get", 2, 3, f_get},
|
||||
{"getbufinfo", 0, 1, f_getbufinfo},
|
||||
{"getbufline", 2, 3, f_getbufline},
|
||||
{"getbufvar", 2, 3, f_getbufvar},
|
||||
{"getchar", 0, 1, f_getchar},
|
||||
@@ -578,7 +586,7 @@ static struct fst
|
||||
{"getcmdtype", 0, 0, f_getcmdtype},
|
||||
{"getcmdwintype", 0, 0, f_getcmdwintype},
|
||||
#if defined(FEAT_CMDL_COMPL)
|
||||
{"getcompletion", 2, 2, f_getcompletion},
|
||||
{"getcompletion", 2, 3, f_getcompletion},
|
||||
#endif
|
||||
{"getcurpos", 0, 0, f_getcurpos},
|
||||
{"getcwd", 0, 2, f_getcwd},
|
||||
@@ -588,15 +596,17 @@ static struct fst
|
||||
{"getftime", 1, 1, f_getftime},
|
||||
{"getftype", 1, 1, f_getftype},
|
||||
{"getline", 1, 2, f_getline},
|
||||
{"getloclist", 1, 1, f_getqflist},
|
||||
{"getloclist", 1, 2, f_getloclist},
|
||||
{"getmatches", 0, 0, f_getmatches},
|
||||
{"getpid", 0, 0, f_getpid},
|
||||
{"getpos", 1, 1, f_getpos},
|
||||
{"getqflist", 0, 0, f_getqflist},
|
||||
{"getqflist", 0, 1, f_getqflist},
|
||||
{"getreg", 0, 3, f_getreg},
|
||||
{"getregtype", 0, 1, f_getregtype},
|
||||
{"gettabinfo", 0, 1, f_gettabinfo},
|
||||
{"gettabvar", 2, 3, f_gettabvar},
|
||||
{"gettabwinvar", 3, 4, f_gettabwinvar},
|
||||
{"getwininfo", 0, 1, f_getwininfo},
|
||||
{"getwinposx", 0, 0, f_getwinposx},
|
||||
{"getwinposy", 0, 0, f_getwinposy},
|
||||
{"getwinvar", 2, 3, f_getwinvar},
|
||||
@@ -738,10 +748,10 @@ static struct fst
|
||||
{"setcmdpos", 1, 1, f_setcmdpos},
|
||||
{"setfperm", 2, 2, f_setfperm},
|
||||
{"setline", 2, 2, f_setline},
|
||||
{"setloclist", 2, 3, f_setloclist},
|
||||
{"setloclist", 2, 4, f_setloclist},
|
||||
{"setmatches", 1, 1, f_setmatches},
|
||||
{"setpos", 2, 2, f_setpos},
|
||||
{"setqflist", 1, 2, f_setqflist},
|
||||
{"setqflist", 1, 3, f_setqflist},
|
||||
{"setreg", 2, 3, f_setreg},
|
||||
{"settabvar", 3, 3, f_settabvar},
|
||||
{"settabwinvar", 4, 4, f_settabwinvar},
|
||||
@@ -815,8 +825,11 @@ static struct fst
|
||||
{"test_null_string", 0, 0, f_test_null_string},
|
||||
{"test_settime", 1, 1, f_test_settime},
|
||||
#ifdef FEAT_TIMERS
|
||||
{"timer_info", 0, 1, f_timer_info},
|
||||
{"timer_pause", 2, 2, f_timer_pause},
|
||||
{"timer_start", 2, 3, f_timer_start},
|
||||
{"timer_stop", 1, 1, f_timer_stop},
|
||||
{"timer_stopall", 0, 0, f_timer_stopall},
|
||||
#endif
|
||||
{"tolower", 1, 1, f_tolower},
|
||||
{"toupper", 1, 1, f_toupper},
|
||||
@@ -3278,10 +3291,10 @@ f_float2nr(typval_T *argvars, typval_T *rettv)
|
||||
if (get_float_arg(argvars, &f) == OK)
|
||||
{
|
||||
# ifdef FEAT_NUM64
|
||||
if (f < -0x7fffffffffffffff)
|
||||
rettv->vval.v_number = -0x7fffffffffffffff;
|
||||
else if (f > 0x7fffffffffffffff)
|
||||
rettv->vval.v_number = 0x7fffffffffffffff;
|
||||
if (f < -0x7fffffffffffffffLL)
|
||||
rettv->vval.v_number = -0x7fffffffffffffffLL;
|
||||
else if (f > 0x7fffffffffffffffLL)
|
||||
rettv->vval.v_number = 0x7fffffffffffffffLL;
|
||||
else
|
||||
rettv->vval.v_number = (varnumber_T)f;
|
||||
# else
|
||||
@@ -3574,8 +3587,7 @@ common_function(typval_T *argvars, typval_T *rettv, int is_funcref)
|
||||
use_string = TRUE;
|
||||
}
|
||||
|
||||
if (((use_string && vim_strchr(s, AUTOLOAD_CHAR) == NULL)
|
||||
|| is_funcref))
|
||||
if ((use_string && vim_strchr(s, AUTOLOAD_CHAR) == NULL) || is_funcref)
|
||||
{
|
||||
name = s;
|
||||
trans_name = trans_function_name(&name, FALSE,
|
||||
@@ -3584,7 +3596,8 @@ common_function(typval_T *argvars, typval_T *rettv, int is_funcref)
|
||||
s = NULL;
|
||||
}
|
||||
|
||||
if (s == NULL || *s == NUL || (use_string && VIM_ISDIGIT(*s)))
|
||||
if (s == NULL || *s == NUL || (use_string && VIM_ISDIGIT(*s))
|
||||
|| (is_funcref && trans_name == NULL))
|
||||
EMSG2(_(e_invarg2), s);
|
||||
/* Don't check an autoload name for existence here. */
|
||||
else if (trans_name != NULL && (is_funcref
|
||||
@@ -3875,6 +3888,152 @@ f_get(typval_T *argvars, typval_T *rettv)
|
||||
copy_tv(tv, rettv);
|
||||
}
|
||||
|
||||
#ifdef FEAT_SIGNS
|
||||
/*
|
||||
* Returns information about signs placed in a buffer as list of dicts.
|
||||
*/
|
||||
static void
|
||||
get_buffer_signs(buf_T *buf, list_T *l)
|
||||
{
|
||||
signlist_T *sign;
|
||||
|
||||
for (sign = buf->b_signlist; sign; sign = sign->next)
|
||||
{
|
||||
dict_T *d = dict_alloc();
|
||||
|
||||
if (d != NULL)
|
||||
{
|
||||
dict_add_nr_str(d, "id", sign->id, NULL);
|
||||
dict_add_nr_str(d, "lnum", sign->lnum, NULL);
|
||||
dict_add_nr_str(d, "name", 0L,
|
||||
vim_strsave(sign_typenr2name(sign->typenr)));
|
||||
|
||||
list_append_dict(l, d);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Returns buffer options, variables and other attributes in a dictionary.
|
||||
*/
|
||||
static dict_T *
|
||||
get_buffer_info(buf_T *buf)
|
||||
{
|
||||
dict_T *dict;
|
||||
tabpage_T *tp;
|
||||
win_T *wp;
|
||||
list_T *windows;
|
||||
|
||||
dict = dict_alloc();
|
||||
if (dict == NULL)
|
||||
return NULL;
|
||||
|
||||
dict_add_nr_str(dict, "bufnr", buf->b_fnum, NULL);
|
||||
dict_add_nr_str(dict, "name", 0L,
|
||||
buf->b_ffname != NULL ? buf->b_ffname : (char_u *)"");
|
||||
dict_add_nr_str(dict, "lnum", buflist_findlnum(buf), NULL);
|
||||
dict_add_nr_str(dict, "loaded", buf->b_ml.ml_mfp != NULL, NULL);
|
||||
dict_add_nr_str(dict, "listed", buf->b_p_bl, NULL);
|
||||
dict_add_nr_str(dict, "changed", bufIsChanged(buf), NULL);
|
||||
dict_add_nr_str(dict, "changedtick", buf->b_changedtick, NULL);
|
||||
dict_add_nr_str(dict, "hidden",
|
||||
buf->b_ml.ml_mfp != NULL && buf->b_nwindows == 0,
|
||||
NULL);
|
||||
|
||||
/* Get a reference to buffer variables */
|
||||
dict_add_dict(dict, "variables", buf->b_vars);
|
||||
|
||||
/* List of windows displaying this buffer */
|
||||
windows = list_alloc();
|
||||
if (windows != NULL)
|
||||
{
|
||||
FOR_ALL_TAB_WINDOWS(tp, wp)
|
||||
if (wp->w_buffer == buf)
|
||||
list_append_number(windows, (varnumber_T)wp->w_id);
|
||||
dict_add_list(dict, "windows", windows);
|
||||
}
|
||||
|
||||
#ifdef FEAT_SIGNS
|
||||
if (buf->b_signlist != NULL)
|
||||
{
|
||||
/* List of signs placed in this buffer */
|
||||
list_T *signs = list_alloc();
|
||||
if (signs != NULL)
|
||||
{
|
||||
get_buffer_signs(buf, signs);
|
||||
dict_add_list(dict, "signs", signs);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return dict;
|
||||
}
|
||||
|
||||
/*
|
||||
* "getbufinfo()" function
|
||||
*/
|
||||
static void
|
||||
f_getbufinfo(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
buf_T *buf = NULL;
|
||||
buf_T *argbuf = NULL;
|
||||
dict_T *d;
|
||||
int filtered = FALSE;
|
||||
int sel_buflisted = FALSE;
|
||||
int sel_bufloaded = FALSE;
|
||||
|
||||
if (rettv_list_alloc(rettv) != OK)
|
||||
return;
|
||||
|
||||
/* List of all the buffers or selected buffers */
|
||||
if (argvars[0].v_type == VAR_DICT)
|
||||
{
|
||||
dict_T *sel_d = argvars[0].vval.v_dict;
|
||||
|
||||
if (sel_d != NULL)
|
||||
{
|
||||
dictitem_T *di;
|
||||
|
||||
filtered = TRUE;
|
||||
|
||||
di = dict_find(sel_d, (char_u *)"buflisted", -1);
|
||||
if (di != NULL && get_tv_number(&di->di_tv))
|
||||
sel_buflisted = TRUE;
|
||||
|
||||
di = dict_find(sel_d, (char_u *)"bufloaded", -1);
|
||||
if (di != NULL && get_tv_number(&di->di_tv))
|
||||
sel_bufloaded = TRUE;
|
||||
}
|
||||
}
|
||||
else if (argvars[0].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
/* Information about one buffer. Argument specifies the buffer */
|
||||
(void)get_tv_number(&argvars[0]); /* issue errmsg if type error */
|
||||
++emsg_off;
|
||||
argbuf = get_buf_tv(&argvars[0], FALSE);
|
||||
--emsg_off;
|
||||
if (argbuf == NULL)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Return information about all the buffers or a specified buffer */
|
||||
FOR_ALL_BUFFERS(buf)
|
||||
{
|
||||
if (argbuf != NULL && argbuf != buf)
|
||||
continue;
|
||||
if (filtered && ((sel_bufloaded && buf->b_ml.ml_mfp == NULL)
|
||||
|| (sel_buflisted && !buf->b_p_bl)))
|
||||
continue;
|
||||
|
||||
d = get_buffer_info(buf);
|
||||
if (d != NULL)
|
||||
list_append_dict(rettv->vval.v_list, d);
|
||||
if (argbuf != NULL)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static void get_buffer_lines(buf_T *buf, linenr_T start, linenr_T end, int retlist, typval_T *rettv);
|
||||
|
||||
/*
|
||||
@@ -3991,9 +4150,23 @@ f_getbufvar(typval_T *argvars, typval_T *rettv)
|
||||
save_curbuf = curbuf;
|
||||
curbuf = buf;
|
||||
|
||||
if (*varname == '&') /* buffer-local-option */
|
||||
if (*varname == '&')
|
||||
{
|
||||
if (get_option_tv(&varname, rettv, TRUE) == OK)
|
||||
if (varname[1] == NUL)
|
||||
{
|
||||
/* get all buffer-local options in a dict */
|
||||
dict_T *opts = get_winbuf_options(TRUE);
|
||||
|
||||
if (opts != NULL)
|
||||
{
|
||||
rettv->v_type = VAR_DICT;
|
||||
rettv->vval.v_dict = opts;
|
||||
++opts->dv_refcount;
|
||||
done = TRUE;
|
||||
}
|
||||
}
|
||||
else if (get_option_tv(&varname, rettv, TRUE) == OK)
|
||||
/* buffer-local-option */
|
||||
done = TRUE;
|
||||
}
|
||||
else if (STRCMP(varname, "changedtick") == 0)
|
||||
@@ -4221,12 +4394,20 @@ f_getcompletion(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
char_u *pat;
|
||||
expand_T xpc;
|
||||
int filtered = FALSE;
|
||||
int options = WILD_SILENT | WILD_USE_NL | WILD_ADD_SLASH
|
||||
| WILD_NO_BEEP;
|
||||
|
||||
if (argvars[2].v_type != VAR_UNKNOWN)
|
||||
filtered = get_tv_number_chk(&argvars[2], NULL);
|
||||
|
||||
if (p_wic)
|
||||
options |= WILD_ICASE;
|
||||
|
||||
/* For filtered results, 'wildignore' is used */
|
||||
if (!filtered)
|
||||
options |= WILD_KEEP_ALL;
|
||||
|
||||
ExpandInit(&xpc);
|
||||
xpc.xp_pattern = get_tv_string(&argvars[0]);
|
||||
xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
|
||||
@@ -4254,6 +4435,13 @@ f_getcompletion(typval_T *argvars, typval_T *rettv)
|
||||
xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
|
||||
}
|
||||
#endif
|
||||
#ifdef FEAT_SIGNS
|
||||
if (xpc.xp_context == EXPAND_SIGN)
|
||||
{
|
||||
set_context_in_sign_cmd(&xpc, xpc.xp_pattern);
|
||||
xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
|
||||
}
|
||||
#endif
|
||||
|
||||
pat = addstar(xpc.xp_pattern, xpc.xp_pattern_len, xpc.xp_context);
|
||||
if ((rettv_list_alloc(rettv) != FAIL) && (pat != NULL))
|
||||
@@ -4523,6 +4711,49 @@ f_getline(typval_T *argvars, typval_T *rettv)
|
||||
get_buffer_lines(curbuf, lnum, end, retlist, rettv);
|
||||
}
|
||||
|
||||
#ifdef FEAT_QUICKFIX
|
||||
static void
|
||||
get_qf_loc_list(int is_qf, win_T *wp, typval_T *what_arg, typval_T *rettv)
|
||||
{
|
||||
if (what_arg->v_type == VAR_UNKNOWN)
|
||||
{
|
||||
if (rettv_list_alloc(rettv) == OK)
|
||||
if (is_qf || wp != NULL)
|
||||
(void)get_errorlist(wp, -1, rettv->vval.v_list);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rettv_dict_alloc(rettv) == OK)
|
||||
if (is_qf || (wp != NULL))
|
||||
{
|
||||
if (what_arg->v_type == VAR_DICT)
|
||||
{
|
||||
dict_T *d = what_arg->vval.v_dict;
|
||||
|
||||
if (d != NULL)
|
||||
get_errorlist_properties(wp, d, rettv->vval.v_dict);
|
||||
}
|
||||
else
|
||||
EMSG(_(e_dictreq));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* "getloclist()" function
|
||||
*/
|
||||
static void
|
||||
f_getloclist(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
{
|
||||
#ifdef FEAT_QUICKFIX
|
||||
win_T *wp;
|
||||
|
||||
wp = find_win_by_nr(&argvars[0], NULL);
|
||||
get_qf_loc_list(FALSE, wp, &argvars[1], rettv);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* "getmatches()" function
|
||||
*/
|
||||
@@ -4660,28 +4891,13 @@ f_getpos(typval_T *argvars, typval_T *rettv)
|
||||
}
|
||||
|
||||
/*
|
||||
* "getqflist()" and "getloclist()" functions
|
||||
* "getqflist()" function
|
||||
*/
|
||||
static void
|
||||
f_getqflist(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
{
|
||||
#ifdef FEAT_QUICKFIX
|
||||
win_T *wp;
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_QUICKFIX
|
||||
if (rettv_list_alloc(rettv) == OK)
|
||||
{
|
||||
wp = NULL;
|
||||
if (argvars[0].v_type != VAR_UNKNOWN) /* getloclist() */
|
||||
{
|
||||
wp = find_win_by_nr(&argvars[0], NULL);
|
||||
if (wp == NULL)
|
||||
return;
|
||||
}
|
||||
|
||||
(void)get_errorlist(wp, rettv->vval.v_list);
|
||||
}
|
||||
get_qf_loc_list(TRUE, NULL, &argvars[0], rettv);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -4780,6 +4996,77 @@ f_getregtype(typval_T *argvars, typval_T *rettv)
|
||||
rettv->vval.v_string = vim_strsave(buf);
|
||||
}
|
||||
|
||||
#ifdef FEAT_WINDOWS
|
||||
/*
|
||||
* Returns information (variables, options, etc.) about a tab page
|
||||
* as a dictionary.
|
||||
*/
|
||||
static dict_T *
|
||||
get_tabpage_info(tabpage_T *tp, int tp_idx)
|
||||
{
|
||||
win_T *wp;
|
||||
dict_T *dict;
|
||||
list_T *l;
|
||||
|
||||
dict = dict_alloc();
|
||||
if (dict == NULL)
|
||||
return NULL;
|
||||
|
||||
dict_add_nr_str(dict, "tabnr", tp_idx, NULL);
|
||||
|
||||
l = list_alloc();
|
||||
if (l != NULL)
|
||||
{
|
||||
for (wp = (tp == curtab) ? firstwin : tp->tp_firstwin;
|
||||
wp; wp = wp->w_next)
|
||||
list_append_number(l, (varnumber_T)wp->w_id);
|
||||
dict_add_list(dict, "windows", l);
|
||||
}
|
||||
|
||||
/* Make a reference to tabpage variables */
|
||||
dict_add_dict(dict, "variables", tp->tp_vars);
|
||||
|
||||
return dict;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* "gettabinfo()" function
|
||||
*/
|
||||
static void
|
||||
f_gettabinfo(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
#ifdef FEAT_WINDOWS
|
||||
tabpage_T *tp, *tparg = NULL;
|
||||
dict_T *d;
|
||||
int tpnr = 0;
|
||||
|
||||
if (rettv_list_alloc(rettv) != OK)
|
||||
return;
|
||||
|
||||
if (argvars[0].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
/* Information about one tab page */
|
||||
tparg = find_tabpage((int)get_tv_number_chk(&argvars[0], NULL));
|
||||
if (tparg == NULL)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Get information about a specific tab page or all tab pages */
|
||||
FOR_ALL_TABPAGES(tp)
|
||||
{
|
||||
tpnr++;
|
||||
if (tparg != NULL && tp != tparg)
|
||||
continue;
|
||||
d = get_tabpage_info(tp, tpnr);
|
||||
if (d != NULL)
|
||||
list_append_dict(rettv->vval.v_list, d);
|
||||
if (tparg != NULL)
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* "gettabvar()" function
|
||||
*/
|
||||
@@ -4832,6 +5119,86 @@ f_gettabwinvar(typval_T *argvars, typval_T *rettv)
|
||||
getwinvar(argvars, rettv, 1);
|
||||
}
|
||||
|
||||
#ifdef FEAT_WINDOWS
|
||||
/*
|
||||
* Returns information about a window as a dictionary.
|
||||
*/
|
||||
static dict_T *
|
||||
get_win_info(win_T *wp, short tpnr, short winnr)
|
||||
{
|
||||
dict_T *dict;
|
||||
|
||||
dict = dict_alloc();
|
||||
if (dict == NULL)
|
||||
return NULL;
|
||||
|
||||
dict_add_nr_str(dict, "tabnr", tpnr, NULL);
|
||||
dict_add_nr_str(dict, "winnr", winnr, NULL);
|
||||
dict_add_nr_str(dict, "winid", wp->w_id, NULL);
|
||||
dict_add_nr_str(dict, "height", wp->w_height, NULL);
|
||||
dict_add_nr_str(dict, "width", wp->w_width, NULL);
|
||||
dict_add_nr_str(dict, "bufnr", wp->w_buffer->b_fnum, NULL);
|
||||
|
||||
#ifdef FEAT_QUICKFIX
|
||||
dict_add_nr_str(dict, "quickfix", bt_quickfix(wp->w_buffer), NULL);
|
||||
dict_add_nr_str(dict, "loclist",
|
||||
(bt_quickfix(wp->w_buffer) && wp->w_llist_ref != NULL), NULL);
|
||||
#endif
|
||||
|
||||
/* Add a reference to window variables */
|
||||
dict_add_dict(dict, "variables", wp->w_vars);
|
||||
|
||||
return dict;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* "getwininfo()" function
|
||||
*/
|
||||
static void
|
||||
f_getwininfo(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
#ifdef FEAT_WINDOWS
|
||||
tabpage_T *tp;
|
||||
win_T *wp = NULL, *wparg = NULL;
|
||||
dict_T *d;
|
||||
short tabnr = 0, winnr;
|
||||
#endif
|
||||
|
||||
if (rettv_list_alloc(rettv) != OK)
|
||||
return;
|
||||
|
||||
#ifdef FEAT_WINDOWS
|
||||
if (argvars[0].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
wparg = win_id2wp(argvars);
|
||||
if (wparg == NULL)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Collect information about either all the windows across all the tab
|
||||
* pages or one particular window.
|
||||
*/
|
||||
FOR_ALL_TABPAGES(tp)
|
||||
{
|
||||
tabnr++;
|
||||
winnr = 0;
|
||||
FOR_ALL_WINDOWS_IN_TAB(tp, wp)
|
||||
{
|
||||
winnr++;
|
||||
if (wparg != NULL && wp != wparg)
|
||||
continue;
|
||||
d = get_win_info(wp, tabnr, winnr);
|
||||
if (d != NULL)
|
||||
list_append_dict(rettv->vval.v_list, d);
|
||||
if (wparg != NULL)
|
||||
/* found information about a specific window */
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* "getwinposx()" function
|
||||
*/
|
||||
@@ -5634,10 +6001,6 @@ f_has(typval_T *argvars, typval_T *rettv)
|
||||
#ifdef FEAT_GUI
|
||||
else if (STRICMP(name, "gui_running") == 0)
|
||||
n = (gui.in_use || gui.starting);
|
||||
# ifdef FEAT_GUI_W32
|
||||
else if (STRICMP(name, "gui_win32s") == 0)
|
||||
n = gui_is_win32s();
|
||||
# endif
|
||||
# ifdef FEAT_BROWSE
|
||||
else if (STRICMP(name, "browse") == 0)
|
||||
n = gui.in_use; /* gui_mch_browse() works when GUI is running */
|
||||
@@ -7058,7 +7421,7 @@ f_matchadd(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
return;
|
||||
if (id >= 1 && id <= 3)
|
||||
{
|
||||
EMSGN("E798: ID is reserved for \":match\": %ld", id);
|
||||
EMSGN(_("E798: ID is reserved for \":match\": %ld"), id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -7123,7 +7486,7 @@ f_matchaddpos(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
/* id == 3 is ok because matchaddpos() is supposed to substitute :3match */
|
||||
if (id == 1 || id == 2)
|
||||
{
|
||||
EMSGN("E798: ID is reserved for \":match\": %ld", id);
|
||||
EMSGN(_("E798: ID is reserved for \":match\": %ld"), id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -9539,7 +9902,7 @@ f_setline(typval_T *argvars, typval_T *rettv)
|
||||
appended_lines_mark(lcount, added);
|
||||
}
|
||||
|
||||
static void set_qf_ll_list(win_T *wp, typval_T *list_arg, typval_T *action_arg, typval_T *rettv);
|
||||
static void set_qf_ll_list(win_T *wp, typval_T *list_arg, typval_T *action_arg, typval_T *what_arg, typval_T *rettv);
|
||||
|
||||
/*
|
||||
* Used by "setqflist()" and "setloclist()" functions
|
||||
@@ -9549,6 +9912,7 @@ set_qf_ll_list(
|
||||
win_T *wp UNUSED,
|
||||
typval_T *list_arg UNUSED,
|
||||
typval_T *action_arg UNUSED,
|
||||
typval_T *what_arg UNUSED,
|
||||
typval_T *rettv)
|
||||
{
|
||||
#ifdef FEAT_QUICKFIX
|
||||
@@ -9565,6 +9929,8 @@ set_qf_ll_list(
|
||||
else
|
||||
{
|
||||
list_T *l = list_arg->vval.v_list;
|
||||
dict_T *d = NULL;
|
||||
int valid_dict = TRUE;
|
||||
|
||||
if (action_arg->v_type == VAR_STRING)
|
||||
{
|
||||
@@ -9581,8 +9947,20 @@ set_qf_ll_list(
|
||||
else
|
||||
EMSG(_(e_stringreq));
|
||||
|
||||
if (l != NULL && action && set_errorlist(wp, l, action,
|
||||
(char_u *)(wp == NULL ? "setqflist()" : "setloclist()")) == OK)
|
||||
if (action_arg->v_type != VAR_UNKNOWN
|
||||
&& what_arg->v_type != VAR_UNKNOWN)
|
||||
{
|
||||
if (what_arg->v_type == VAR_DICT)
|
||||
d = what_arg->vval.v_dict;
|
||||
else
|
||||
{
|
||||
EMSG(_(e_dictreq));
|
||||
valid_dict = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (l != NULL && action && valid_dict && set_errorlist(wp, l, action,
|
||||
(char_u *)(wp == NULL ? "setqflist()" : "setloclist()"), d) == OK)
|
||||
rettv->vval.v_number = 0;
|
||||
}
|
||||
#endif
|
||||
@@ -9600,7 +9978,7 @@ f_setloclist(typval_T *argvars, typval_T *rettv)
|
||||
|
||||
win = find_win_by_nr(&argvars[0], NULL);
|
||||
if (win != NULL)
|
||||
set_qf_ll_list(win, &argvars[1], &argvars[2], rettv);
|
||||
set_qf_ll_list(win, &argvars[1], &argvars[2], &argvars[3], rettv);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -9768,7 +10146,7 @@ f_setpos(typval_T *argvars, typval_T *rettv)
|
||||
static void
|
||||
f_setqflist(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
set_qf_ll_list(NULL, &argvars[0], &argvars[1], rettv);
|
||||
set_qf_ll_list(NULL, &argvars[0], &argvars[1], &argvars[2], rettv);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -10804,7 +11182,7 @@ f_strgetchar(typval_T *argvars, typval_T *rettv)
|
||||
break;
|
||||
}
|
||||
--charidx;
|
||||
byteidx += mb_cptr2len(str + byteidx);
|
||||
byteidx += MB_CPTR2LEN(str + byteidx);
|
||||
}
|
||||
}
|
||||
#else
|
||||
@@ -10964,7 +11342,7 @@ f_strcharpart(typval_T *argvars, typval_T *rettv)
|
||||
if (nchar > 0)
|
||||
while (nchar > 0 && nbyte < slen)
|
||||
{
|
||||
nbyte += mb_cptr2len(p + nbyte);
|
||||
nbyte += MB_CPTR2LEN(p + nbyte);
|
||||
--nchar;
|
||||
}
|
||||
else
|
||||
@@ -10979,7 +11357,7 @@ f_strcharpart(typval_T *argvars, typval_T *rettv)
|
||||
if (off < 0)
|
||||
len += 1;
|
||||
else
|
||||
len += mb_cptr2len(p + off);
|
||||
len += MB_CPTR2LEN(p + off);
|
||||
--charlen;
|
||||
}
|
||||
}
|
||||
@@ -11129,7 +11507,11 @@ f_submatch(typval_T *argvars, typval_T *rettv)
|
||||
no = (int)get_tv_number_chk(&argvars[0], &error);
|
||||
if (error)
|
||||
return;
|
||||
error = FALSE;
|
||||
if (no < 0 || no >= NSUBEXP)
|
||||
{
|
||||
EMSGN(_("E935: invalid submatch number: %d"), no);
|
||||
return;
|
||||
}
|
||||
if (argvars[1].v_type != VAR_UNKNOWN)
|
||||
retList = (int)get_tv_number_chk(&argvars[1], &error);
|
||||
if (error)
|
||||
@@ -11980,6 +12362,50 @@ free_callback(char_u *callback, partial_T *partial)
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_TIMERS
|
||||
/*
|
||||
* "timer_info([timer])" function
|
||||
*/
|
||||
static void
|
||||
f_timer_info(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
timer_T *timer = NULL;
|
||||
|
||||
if (rettv_list_alloc(rettv) != OK)
|
||||
return;
|
||||
if (argvars[0].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
if (argvars[0].v_type != VAR_NUMBER)
|
||||
EMSG(_(e_number_exp));
|
||||
else
|
||||
{
|
||||
timer = find_timer((int)get_tv_number(&argvars[0]));
|
||||
if (timer != NULL)
|
||||
add_timer_info(rettv, timer);
|
||||
}
|
||||
}
|
||||
else
|
||||
add_timer_info_all(rettv);
|
||||
}
|
||||
|
||||
/*
|
||||
* "timer_pause(timer, paused)" function
|
||||
*/
|
||||
static void
|
||||
f_timer_pause(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
{
|
||||
timer_T *timer = NULL;
|
||||
int paused = (int)get_tv_number(&argvars[1]);
|
||||
|
||||
if (argvars[0].v_type != VAR_NUMBER)
|
||||
EMSG(_(e_number_exp));
|
||||
else
|
||||
{
|
||||
timer = find_timer((int)get_tv_number(&argvars[0]));
|
||||
if (timer != NULL)
|
||||
timer->tr_paused = paused;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* "timer_start(time, callback [, options])" function
|
||||
*/
|
||||
@@ -12041,6 +12467,15 @@ f_timer_stop(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
if (timer != NULL)
|
||||
stop_timer(timer);
|
||||
}
|
||||
|
||||
/*
|
||||
* "timer_stopall()" function
|
||||
*/
|
||||
static void
|
||||
f_timer_stopall(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
{
|
||||
stop_all_timers();
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
+208
-67
@@ -1927,11 +1927,7 @@ write_viminfo(char_u *file, int forceit)
|
||||
#ifdef UNIX
|
||||
shortname,
|
||||
#else
|
||||
# ifdef FEAT_GUI_W32
|
||||
gui_is_win32s(),
|
||||
# else
|
||||
FALSE,
|
||||
# endif
|
||||
#endif
|
||||
fname,
|
||||
#ifdef VMS
|
||||
@@ -2530,7 +2526,7 @@ barline_writestring(FILE *fd, char_u *s, int remaining_start)
|
||||
else
|
||||
++len;
|
||||
}
|
||||
if (len > remaining)
|
||||
if (len > remaining - 2)
|
||||
{
|
||||
fprintf(fd, ">%d\n|<", len);
|
||||
remaining = LSIZE - 20;
|
||||
@@ -2922,6 +2918,10 @@ print_line(linenr_T lnum, int use_number, int list)
|
||||
{
|
||||
int save_silent = silent_mode;
|
||||
|
||||
/* apply :filter /pat/ */
|
||||
if (message_filtered(ml_get(lnum)))
|
||||
return;
|
||||
|
||||
msg_start();
|
||||
silent_mode = FALSE;
|
||||
info_message = TRUE; /* use mch_msg(), not mch_errmsg() */
|
||||
@@ -4747,6 +4747,20 @@ check_secure(void)
|
||||
static char_u *old_sub = NULL; /* previous substitute pattern */
|
||||
static int global_need_beginline; /* call beginline() after ":g" */
|
||||
|
||||
/*
|
||||
* Flags that are kept between calls to :substitute.
|
||||
*/
|
||||
typedef struct {
|
||||
int do_all; /* do multiple substitutions per line */
|
||||
int do_ask; /* ask for confirmation */
|
||||
int do_count; /* count only */
|
||||
int do_error; /* if false, ignore errors */
|
||||
int do_print; /* print last line with subs. */
|
||||
int do_list; /* list last line with subs. */
|
||||
int do_number; /* list last line with line nr*/
|
||||
int do_ic; /* ignore case flag */
|
||||
} subflags_T;
|
||||
|
||||
/* do_sub()
|
||||
*
|
||||
* Perform a substitution from line eap->line1 to line eap->line2 using the
|
||||
@@ -4762,14 +4776,11 @@ do_sub(exarg_T *eap)
|
||||
linenr_T lnum;
|
||||
long i = 0;
|
||||
regmmatch_T regmatch;
|
||||
static int do_all = FALSE; /* do multiple substitutions per line */
|
||||
static int do_ask = FALSE; /* ask for confirmation */
|
||||
static int do_count = FALSE; /* count only */
|
||||
static int do_error = TRUE; /* if false, ignore errors */
|
||||
static int do_print = FALSE; /* print last line with subs. */
|
||||
static int do_list = FALSE; /* list last line with subs. */
|
||||
static int do_number = FALSE; /* list last line with line nr*/
|
||||
static int do_ic = 0; /* ignore case flag */
|
||||
static subflags_T subflags = {FALSE, FALSE, FALSE, TRUE, FALSE,
|
||||
FALSE, FALSE, 0};
|
||||
#ifdef FEAT_EVAL
|
||||
subflags_T subflags_save;
|
||||
#endif
|
||||
int save_do_all; /* remember user specified 'g' flag */
|
||||
int save_do_ask; /* remember user specified 'c' flag */
|
||||
char_u *pat = NULL, *sub = NULL; /* init for GCC */
|
||||
@@ -4957,16 +4968,16 @@ do_sub(exarg_T *eap)
|
||||
if (!p_ed)
|
||||
{
|
||||
if (p_gd) /* default is global on */
|
||||
do_all = TRUE;
|
||||
subflags.do_all = TRUE;
|
||||
else
|
||||
do_all = FALSE;
|
||||
do_ask = FALSE;
|
||||
subflags.do_all = FALSE;
|
||||
subflags.do_ask = FALSE;
|
||||
}
|
||||
do_error = TRUE;
|
||||
do_print = FALSE;
|
||||
do_count = FALSE;
|
||||
do_number = FALSE;
|
||||
do_ic = 0;
|
||||
subflags.do_error = TRUE;
|
||||
subflags.do_print = FALSE;
|
||||
subflags.do_count = FALSE;
|
||||
subflags.do_number = FALSE;
|
||||
subflags.do_ic = 0;
|
||||
}
|
||||
while (*cmd)
|
||||
{
|
||||
@@ -4975,40 +4986,40 @@ do_sub(exarg_T *eap)
|
||||
* 'r' is never inverted.
|
||||
*/
|
||||
if (*cmd == 'g')
|
||||
do_all = !do_all;
|
||||
subflags.do_all = !subflags.do_all;
|
||||
else if (*cmd == 'c')
|
||||
do_ask = !do_ask;
|
||||
subflags.do_ask = !subflags.do_ask;
|
||||
else if (*cmd == 'n')
|
||||
do_count = TRUE;
|
||||
subflags.do_count = TRUE;
|
||||
else if (*cmd == 'e')
|
||||
do_error = !do_error;
|
||||
subflags.do_error = !subflags.do_error;
|
||||
else if (*cmd == 'r') /* use last used regexp */
|
||||
which_pat = RE_LAST;
|
||||
else if (*cmd == 'p')
|
||||
do_print = TRUE;
|
||||
subflags.do_print = TRUE;
|
||||
else if (*cmd == '#')
|
||||
{
|
||||
do_print = TRUE;
|
||||
do_number = TRUE;
|
||||
subflags.do_print = TRUE;
|
||||
subflags.do_number = TRUE;
|
||||
}
|
||||
else if (*cmd == 'l')
|
||||
{
|
||||
do_print = TRUE;
|
||||
do_list = TRUE;
|
||||
subflags.do_print = TRUE;
|
||||
subflags.do_list = TRUE;
|
||||
}
|
||||
else if (*cmd == 'i') /* ignore case */
|
||||
do_ic = 'i';
|
||||
subflags.do_ic = 'i';
|
||||
else if (*cmd == 'I') /* don't ignore case */
|
||||
do_ic = 'I';
|
||||
subflags.do_ic = 'I';
|
||||
else
|
||||
break;
|
||||
++cmd;
|
||||
}
|
||||
if (do_count)
|
||||
do_ask = FALSE;
|
||||
if (subflags.do_count)
|
||||
subflags.do_ask = FALSE;
|
||||
|
||||
save_do_all = do_all;
|
||||
save_do_ask = do_ask;
|
||||
save_do_all = subflags.do_all;
|
||||
save_do_ask = subflags.do_ask;
|
||||
|
||||
/*
|
||||
* check for a trailing count
|
||||
@@ -5017,7 +5028,7 @@ do_sub(exarg_T *eap)
|
||||
if (VIM_ISDIGIT(*cmd))
|
||||
{
|
||||
i = getdigits(&cmd);
|
||||
if (i <= 0 && !eap->skip && do_error)
|
||||
if (i <= 0 && !eap->skip && subflags.do_error)
|
||||
{
|
||||
EMSG(_(e_zerocount));
|
||||
return;
|
||||
@@ -5045,7 +5056,7 @@ do_sub(exarg_T *eap)
|
||||
if (eap->skip) /* not executing commands, only parsing */
|
||||
return;
|
||||
|
||||
if (!do_count && !curbuf->b_p_ma)
|
||||
if (!subflags.do_count && !curbuf->b_p_ma)
|
||||
{
|
||||
/* Substitution is not allowed in non-'modifiable' buffer */
|
||||
EMSG(_(e_modifiable));
|
||||
@@ -5054,15 +5065,15 @@ do_sub(exarg_T *eap)
|
||||
|
||||
if (search_regcomp(pat, RE_SUBST, which_pat, SEARCH_HIS, ®match) == FAIL)
|
||||
{
|
||||
if (do_error)
|
||||
if (subflags.do_error)
|
||||
EMSG(_(e_invcmd));
|
||||
return;
|
||||
}
|
||||
|
||||
/* the 'i' or 'I' flag overrules 'ignorecase' and 'smartcase' */
|
||||
if (do_ic == 'i')
|
||||
if (subflags.do_ic == 'i')
|
||||
regmatch.rmm_ic = TRUE;
|
||||
else if (do_ic == 'I')
|
||||
else if (subflags.do_ic == 'I')
|
||||
regmatch.rmm_ic = FALSE;
|
||||
|
||||
sub_firstline = NULL;
|
||||
@@ -5231,7 +5242,7 @@ do_sub(exarg_T *eap)
|
||||
* 2. If do_count is set only increase the counter.
|
||||
* If do_ask is set, ask for confirmation.
|
||||
*/
|
||||
if (do_count)
|
||||
if (subflags.do_count)
|
||||
{
|
||||
/* For a multi-line match, put matchcol at the NUL at
|
||||
* the end of the line and set nmatch to one, so that
|
||||
@@ -5253,7 +5264,7 @@ do_sub(exarg_T *eap)
|
||||
goto skip;
|
||||
}
|
||||
|
||||
if (do_ask)
|
||||
if (subflags.do_ask)
|
||||
{
|
||||
int typed = 0;
|
||||
|
||||
@@ -5274,19 +5285,20 @@ do_sub(exarg_T *eap)
|
||||
/*
|
||||
* Loop until 'y', 'n', 'q', CTRL-E or CTRL-Y typed.
|
||||
*/
|
||||
while (do_ask)
|
||||
while (subflags.do_ask)
|
||||
{
|
||||
if (exmode_active)
|
||||
{
|
||||
char_u *resp;
|
||||
colnr_T sc, ec;
|
||||
|
||||
print_line_no_prefix(lnum, do_number, do_list);
|
||||
print_line_no_prefix(lnum,
|
||||
subflags.do_number, subflags.do_list);
|
||||
|
||||
getvcol(curwin, &curwin->w_cursor, &sc, NULL, NULL);
|
||||
curwin->w_cursor.col = regmatch.endpos[0].col - 1;
|
||||
getvcol(curwin, &curwin->w_cursor, NULL, NULL, &ec);
|
||||
if (do_number || curwin->w_p_nu)
|
||||
if (subflags.do_number || curwin->w_p_nu)
|
||||
{
|
||||
int numw = number_width(curwin) + 1;
|
||||
sc += numw;
|
||||
@@ -5420,13 +5432,13 @@ do_sub(exarg_T *eap)
|
||||
if (typed == 'l')
|
||||
{
|
||||
/* last: replace and then stop */
|
||||
do_all = FALSE;
|
||||
subflags.do_all = FALSE;
|
||||
line2 = lnum;
|
||||
break;
|
||||
}
|
||||
if (typed == 'a')
|
||||
{
|
||||
do_ask = FALSE;
|
||||
subflags.do_ask = FALSE;
|
||||
break;
|
||||
}
|
||||
#ifdef FEAT_INS_EXPAND
|
||||
@@ -5469,23 +5481,29 @@ do_sub(exarg_T *eap)
|
||||
* 3. substitute the string.
|
||||
*/
|
||||
#ifdef FEAT_EVAL
|
||||
if (do_count)
|
||||
if (subflags.do_count)
|
||||
{
|
||||
/* prevent accidentally changing the buffer by a function */
|
||||
save_ma = curbuf->b_p_ma;
|
||||
curbuf->b_p_ma = FALSE;
|
||||
sandbox++;
|
||||
}
|
||||
/* Save flags for recursion. They can change for e.g.
|
||||
* :s/^/\=execute("s#^##gn") */
|
||||
subflags_save = subflags;
|
||||
#endif
|
||||
/* get length of substitution part */
|
||||
sublen = vim_regsub_multi(®match,
|
||||
sub_firstlnum - regmatch.startpos[0].lnum,
|
||||
sub, sub_firstline, FALSE, p_magic, TRUE);
|
||||
#ifdef FEAT_EVAL
|
||||
if (do_count)
|
||||
/* Don't keep flags set by a recursive call. */
|
||||
subflags = subflags_save;
|
||||
if (subflags.do_count)
|
||||
{
|
||||
curbuf->b_p_ma = save_ma;
|
||||
sandbox--;
|
||||
if (sandbox > 0)
|
||||
sandbox--;
|
||||
goto skip;
|
||||
}
|
||||
#endif
|
||||
@@ -5578,7 +5596,7 @@ do_sub(exarg_T *eap)
|
||||
if (sub_firstlnum <= line2)
|
||||
do_again = TRUE;
|
||||
else
|
||||
do_all = FALSE;
|
||||
subflags.do_all = FALSE;
|
||||
}
|
||||
|
||||
/* Remember next character to be copied. */
|
||||
@@ -5613,7 +5631,7 @@ do_sub(exarg_T *eap)
|
||||
ml_append(lnum - 1, new_start,
|
||||
(colnr_T)(p1 - new_start + 1), FALSE);
|
||||
mark_adjust(lnum + 1, (linenr_T)MAXLNUM, 1L, 0L);
|
||||
if (do_ask)
|
||||
if (subflags.do_ask)
|
||||
appended_lines(lnum - 1, 1L);
|
||||
else
|
||||
{
|
||||
@@ -5654,7 +5672,7 @@ skip:
|
||||
|| got_int
|
||||
|| got_quit
|
||||
|| lnum > line2
|
||||
|| !(do_all || do_again)
|
||||
|| !(subflags.do_all || do_again)
|
||||
|| (sub_firstline[matchcol] == NUL && nmatch <= 1
|
||||
&& !re_multiline(regmatch.regprog)));
|
||||
nmatch = -1;
|
||||
@@ -5708,7 +5726,7 @@ skip:
|
||||
ml_delete(lnum, (int)FALSE);
|
||||
mark_adjust(lnum, lnum + nmatch_tl - 1,
|
||||
(long)MAXLNUM, -nmatch_tl);
|
||||
if (do_ask)
|
||||
if (subflags.do_ask)
|
||||
deleted_lines(lnum, nmatch_tl);
|
||||
--lnum;
|
||||
line2 -= nmatch_tl; /* nr of lines decreases */
|
||||
@@ -5717,7 +5735,7 @@ skip:
|
||||
|
||||
/* When asking, undo is saved each time, must also set
|
||||
* changed flag each time. */
|
||||
if (do_ask)
|
||||
if (subflags.do_ask)
|
||||
changed_bytes(lnum, 0);
|
||||
else
|
||||
{
|
||||
@@ -5779,7 +5797,7 @@ outofmem:
|
||||
vim_free(sub_firstline); /* may have to free allocated copy of the line */
|
||||
|
||||
/* ":s/pat//n" doesn't move the cursor */
|
||||
if (do_count)
|
||||
if (subflags.do_count)
|
||||
curwin->w_cursor = old_cursor;
|
||||
|
||||
if (sub_nsubs > start_nsubs)
|
||||
@@ -5791,20 +5809,22 @@ outofmem:
|
||||
|
||||
if (!global_busy)
|
||||
{
|
||||
if (!do_ask) /* when interactive leave cursor on the match */
|
||||
/* when interactive leave cursor on the match */
|
||||
if (!subflags.do_ask)
|
||||
{
|
||||
if (endcolumn)
|
||||
coladvance((colnr_T)MAXCOL);
|
||||
else
|
||||
beginline(BL_WHITE | BL_FIX);
|
||||
}
|
||||
if (!do_sub_msg(do_count) && do_ask)
|
||||
if (!do_sub_msg(subflags.do_count) && subflags.do_ask)
|
||||
MSG("");
|
||||
}
|
||||
else
|
||||
global_need_beginline = TRUE;
|
||||
if (do_print)
|
||||
print_line(curwin->w_cursor.lnum, do_number, do_list);
|
||||
if (subflags.do_print)
|
||||
print_line(curwin->w_cursor.lnum,
|
||||
subflags.do_number, subflags.do_list);
|
||||
}
|
||||
else if (!global_busy)
|
||||
{
|
||||
@@ -5812,12 +5832,12 @@ outofmem:
|
||||
EMSG(_(e_interr));
|
||||
else if (got_match) /* did find something but nothing substituted */
|
||||
MSG("");
|
||||
else if (do_error) /* nothing found */
|
||||
else if (subflags.do_error) /* nothing found */
|
||||
EMSG2(_(e_patnotf2), get_search_pat());
|
||||
}
|
||||
|
||||
#ifdef FEAT_FOLDING
|
||||
if (do_ask && hasAnyFolding(curwin))
|
||||
if (subflags.do_ask && hasAnyFolding(curwin))
|
||||
/* Cursor position may require updating */
|
||||
changed_window_setting();
|
||||
#endif
|
||||
@@ -5825,8 +5845,8 @@ outofmem:
|
||||
vim_regfree(regmatch.regprog);
|
||||
|
||||
/* Restore the flag values, they can be used for ":&&". */
|
||||
do_all = save_do_all;
|
||||
do_ask = save_do_ask;
|
||||
subflags.do_all = save_do_all;
|
||||
subflags.do_ask = save_do_ask;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -7068,7 +7088,7 @@ helptags_one(
|
||||
|| filecount == 0)
|
||||
{
|
||||
if (!got_int)
|
||||
EMSG2("E151: No match: %s", NameBuff);
|
||||
EMSG2(_("E151: No match: %s"), NameBuff);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -7311,7 +7331,7 @@ do_helptags(char_u *dirname, int add_help_tags)
|
||||
EW_FILE|EW_SILENT) == FAIL
|
||||
|| filecount == 0)
|
||||
{
|
||||
EMSG2("E151: No match: %s", NameBuff);
|
||||
EMSG2(_("E151: No match: %s"), NameBuff);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -7841,6 +7861,11 @@ ex_sign(exarg_T *eap)
|
||||
{ /* ... not currently in a window */
|
||||
char_u *cmd;
|
||||
|
||||
if (buf->b_fname == NULL)
|
||||
{
|
||||
EMSG(_("E934: Cannot jump to a buffer that does not have a name"));
|
||||
return;
|
||||
}
|
||||
cmd = alloc((unsigned)STRLEN(buf->b_fname) + 25);
|
||||
if (cmd == NULL)
|
||||
return;
|
||||
@@ -8366,3 +8391,119 @@ ex_drop(exarg_T *eap)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Skip over the pattern argument of ":vimgrep /pat/[g][j]".
|
||||
* Put the start of the pattern in "*s", unless "s" is NULL.
|
||||
* If "flags" is not NULL put the flags in it: VGR_GLOBAL, VGR_NOJUMP.
|
||||
* If "s" is not NULL terminate the pattern with a NUL.
|
||||
* Return a pointer to the char just past the pattern plus flags.
|
||||
*/
|
||||
char_u *
|
||||
skip_vimgrep_pat(char_u *p, char_u **s, int *flags)
|
||||
{
|
||||
int c;
|
||||
|
||||
if (vim_isIDc(*p))
|
||||
{
|
||||
/* ":vimgrep pattern fname" */
|
||||
if (s != NULL)
|
||||
*s = p;
|
||||
p = skiptowhite(p);
|
||||
if (s != NULL && *p != NUL)
|
||||
*p++ = NUL;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* ":vimgrep /pattern/[g][j] fname" */
|
||||
if (s != NULL)
|
||||
*s = p + 1;
|
||||
c = *p;
|
||||
p = skip_regexp(p + 1, c, TRUE, NULL);
|
||||
if (*p != c)
|
||||
return NULL;
|
||||
|
||||
/* Truncate the pattern. */
|
||||
if (s != NULL)
|
||||
*p = NUL;
|
||||
++p;
|
||||
|
||||
/* Find the flags */
|
||||
while (*p == 'g' || *p == 'j')
|
||||
{
|
||||
if (flags != NULL)
|
||||
{
|
||||
if (*p == 'g')
|
||||
*flags |= VGR_GLOBAL;
|
||||
else
|
||||
*flags |= VGR_NOJUMP;
|
||||
}
|
||||
++p;
|
||||
}
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
#if defined(FEAT_EVAL) || defined(PROTO)
|
||||
/*
|
||||
* List v:oldfiles in a nice way.
|
||||
*/
|
||||
void
|
||||
ex_oldfiles(exarg_T *eap UNUSED)
|
||||
{
|
||||
list_T *l = get_vim_var_list(VV_OLDFILES);
|
||||
listitem_T *li;
|
||||
int nr = 0;
|
||||
char_u *fname;
|
||||
|
||||
if (l == NULL)
|
||||
msg((char_u *)_("No old files"));
|
||||
else
|
||||
{
|
||||
msg_start();
|
||||
msg_scroll = TRUE;
|
||||
for (li = l->lv_first; li != NULL && !got_int; li = li->li_next)
|
||||
{
|
||||
++nr;
|
||||
fname = get_tv_string(&li->li_tv);
|
||||
if (!message_filtered(fname))
|
||||
{
|
||||
msg_outnum((long)nr);
|
||||
MSG_PUTS(": ");
|
||||
msg_outtrans(fname);
|
||||
msg_putchar('\n');
|
||||
out_flush(); /* output one line at a time */
|
||||
ui_breakcheck();
|
||||
}
|
||||
}
|
||||
|
||||
/* Assume "got_int" was set to truncate the listing. */
|
||||
got_int = FALSE;
|
||||
|
||||
# ifdef FEAT_BROWSE_CMD
|
||||
if (cmdmod.browse)
|
||||
{
|
||||
quit_more = FALSE;
|
||||
nr = prompt_for_number(FALSE);
|
||||
msg_starthere();
|
||||
if (nr > 0)
|
||||
{
|
||||
char_u *p = list_find_str(get_vim_var_list(VV_OLDFILES),
|
||||
(long)nr);
|
||||
|
||||
if (p != NULL)
|
||||
{
|
||||
p = expand_env_save(p);
|
||||
eap->arg = p;
|
||||
eap->cmdidx = CMD_edit;
|
||||
cmdmod.browse = FALSE;
|
||||
do_exedit(eap, NULL);
|
||||
vim_free(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
# endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -544,6 +544,9 @@ EX(CMD_files, "files", buflist_list,
|
||||
EX(CMD_filetype, "filetype", ex_filetype,
|
||||
EXTRA|TRLBAR|CMDWIN,
|
||||
ADDR_LINES),
|
||||
EX(CMD_filter, "filter", ex_wrongmodifier,
|
||||
BANG|NEEDARG|EXTRA|NOTRLCOM,
|
||||
ADDR_LINES),
|
||||
EX(CMD_find, "find", ex_find,
|
||||
RANGE|NOTADR|BANG|FILE1|EDITCMD|ARGOPT|TRLBAR,
|
||||
ADDR_LINES),
|
||||
|
||||
+90
-4
@@ -1139,10 +1139,8 @@ create_timer(long msec, int repeat)
|
||||
timer->tr_id = ++last_timer_id;
|
||||
insert_timer(timer);
|
||||
if (repeat != 0)
|
||||
{
|
||||
timer->tr_repeat = repeat - 1;
|
||||
timer->tr_interval = msec;
|
||||
}
|
||||
timer->tr_interval = msec;
|
||||
|
||||
profile_setlimit(msec, &timer->tr_due);
|
||||
return timer;
|
||||
@@ -1191,6 +1189,8 @@ check_due_timer(void)
|
||||
next_due = -1;
|
||||
for (timer = first_timer; timer != NULL; timer = timer->tr_next)
|
||||
{
|
||||
if (timer->tr_paused)
|
||||
continue;
|
||||
# ifdef WIN3264
|
||||
this_due = (long)(((double)(timer->tr_due.QuadPart - now.QuadPart)
|
||||
/ (double)fr.QuadPart) * 1000);
|
||||
@@ -1253,6 +1253,76 @@ stop_timer(timer_T *timer)
|
||||
free_timer(timer);
|
||||
}
|
||||
|
||||
void
|
||||
stop_all_timers(void)
|
||||
{
|
||||
while (first_timer != NULL)
|
||||
stop_timer(first_timer);
|
||||
}
|
||||
|
||||
void
|
||||
add_timer_info(typval_T *rettv, timer_T *timer)
|
||||
{
|
||||
list_T *list = rettv->vval.v_list;
|
||||
dict_T *dict = dict_alloc();
|
||||
dictitem_T *di;
|
||||
long remaining;
|
||||
proftime_T now;
|
||||
# ifdef WIN3264
|
||||
LARGE_INTEGER fr;
|
||||
#endif
|
||||
|
||||
if (dict == NULL)
|
||||
return;
|
||||
list_append_dict(list, dict);
|
||||
|
||||
dict_add_nr_str(dict, "id", (long)timer->tr_id, NULL);
|
||||
dict_add_nr_str(dict, "time", (long)timer->tr_interval, NULL);
|
||||
|
||||
profile_start(&now);
|
||||
# ifdef WIN3264
|
||||
QueryPerformanceFrequency(&fr);
|
||||
remaining = (long)(((double)(timer->tr_due.QuadPart - now.QuadPart)
|
||||
/ (double)fr.QuadPart) * 1000);
|
||||
# else
|
||||
remaining = (timer->tr_due.tv_sec - now.tv_sec) * 1000
|
||||
+ (timer->tr_due.tv_usec - now.tv_usec) / 1000;
|
||||
# endif
|
||||
dict_add_nr_str(dict, "remaining", (long)remaining, NULL);
|
||||
|
||||
dict_add_nr_str(dict, "repeat",
|
||||
(long)(timer->tr_repeat < 0 ? -1 : timer->tr_repeat + 1), NULL);
|
||||
dict_add_nr_str(dict, "paused", (long)(timer->tr_paused), NULL);
|
||||
|
||||
di = dictitem_alloc((char_u *)"callback");
|
||||
if (di != NULL)
|
||||
{
|
||||
if (dict_add(dict, di) == FAIL)
|
||||
vim_free(di);
|
||||
else if (timer->tr_partial != NULL)
|
||||
{
|
||||
di->di_tv.v_type = VAR_PARTIAL;
|
||||
di->di_tv.vval.v_partial = timer->tr_partial;
|
||||
++timer->tr_partial->pt_refcount;
|
||||
}
|
||||
else
|
||||
{
|
||||
di->di_tv.v_type = VAR_FUNC;
|
||||
di->di_tv.vval.v_string = vim_strsave(timer->tr_callback);
|
||||
}
|
||||
di->di_tv.v_lock = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
add_timer_info_all(typval_T *rettv)
|
||||
{
|
||||
timer_T *timer;
|
||||
|
||||
for (timer = first_timer; timer != NULL; timer = timer->tr_next)
|
||||
add_timer_info(rettv, timer);
|
||||
}
|
||||
|
||||
/*
|
||||
* Mark references in partials of timers.
|
||||
*/
|
||||
@@ -3313,15 +3383,30 @@ do_in_path(
|
||||
rtp = rtp_copy;
|
||||
while (*rtp != NUL && ((flags & DIP_ALL) || !did_one))
|
||||
{
|
||||
size_t buflen;
|
||||
|
||||
/* Copy the path from 'runtimepath' to buf[]. */
|
||||
copy_option_part(&rtp, buf, MAXPATHL, ",");
|
||||
buflen = STRLEN(buf);
|
||||
|
||||
/* Skip after or non-after directories. */
|
||||
if (flags & (DIP_NOAFTER | DIP_AFTER))
|
||||
{
|
||||
int is_after = buflen >= 5
|
||||
&& STRCMP(buf + buflen - 5, "after") == 0;
|
||||
|
||||
if ((is_after && (flags & DIP_NOAFTER))
|
||||
|| (!is_after && (flags & DIP_AFTER)))
|
||||
continue;
|
||||
}
|
||||
|
||||
if (name == NULL)
|
||||
{
|
||||
(*callback)(buf, (void *) &cookie);
|
||||
if (!did_one)
|
||||
did_one = (cookie == NULL);
|
||||
}
|
||||
else if (STRLEN(buf) + STRLEN(name) + 2 < MAXPATHL)
|
||||
else if (buflen + STRLEN(name) + 2 < MAXPATHL)
|
||||
{
|
||||
add_pathsep(buf);
|
||||
tail = buf + STRLEN(buf);
|
||||
@@ -3585,6 +3670,7 @@ static int did_source_packages = FALSE;
|
||||
/*
|
||||
* ":packloadall"
|
||||
* Find plugins in the package directories and source them.
|
||||
* "eap" is NULL when invoked during startup.
|
||||
*/
|
||||
void
|
||||
ex_packloadall(exarg_T *eap)
|
||||
|
||||
+57
-9
@@ -1788,6 +1788,7 @@ do_one_cmd(
|
||||
linenr_T lnum;
|
||||
long n;
|
||||
char_u *errormsg = NULL; /* error message */
|
||||
char_u *after_modifier = NULL;
|
||||
exarg_T ea; /* Ex command arguments */
|
||||
long verbose_save = -1;
|
||||
int save_msg_scroll = msg_scroll;
|
||||
@@ -1865,9 +1866,7 @@ do_one_cmd(
|
||||
/*
|
||||
* 2. Handle command modifiers.
|
||||
*/
|
||||
p = ea.cmd;
|
||||
if (VIM_ISDIGIT(*ea.cmd))
|
||||
p = skipwhite(skipdigits(ea.cmd));
|
||||
p = skip_range(ea.cmd, NULL);
|
||||
switch (*p)
|
||||
{
|
||||
/* When adding an entry, also modify cmd_exists(). */
|
||||
@@ -1926,6 +1925,31 @@ do_one_cmd(
|
||||
cmdmod.keepjumps = TRUE;
|
||||
continue;
|
||||
|
||||
case 'f': /* only accept ":filter {pat} cmd" */
|
||||
{
|
||||
char_u *reg_pat;
|
||||
|
||||
if (!checkforcmd(&p, "filter", 4)
|
||||
|| *p == NUL || ends_excmd(*p))
|
||||
break;
|
||||
if (*p == '!')
|
||||
{
|
||||
cmdmod.filter_force = TRUE;
|
||||
p = skipwhite(p + 1);
|
||||
if (*p == NUL || ends_excmd(*p))
|
||||
break;
|
||||
}
|
||||
p = skip_vimgrep_pat(p, ®_pat, NULL);
|
||||
if (p == NULL || *p == NUL)
|
||||
break;
|
||||
cmdmod.filter_regmatch.regprog =
|
||||
vim_regcomp(reg_pat, RE_MAGIC);
|
||||
if (cmdmod.filter_regmatch.regprog == NULL)
|
||||
break;
|
||||
ea.cmd = p;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* ":hide" and ":hide | cmd" are not modifiers */
|
||||
case 'h': if (p != ea.cmd || !checkforcmd(&p, "hide", 3)
|
||||
|| *p == NUL || ends_excmd(*p))
|
||||
@@ -1999,10 +2023,19 @@ do_one_cmd(
|
||||
case 't': if (checkforcmd(&p, "tab", 3))
|
||||
{
|
||||
#ifdef FEAT_WINDOWS
|
||||
if (vim_isdigit(*ea.cmd))
|
||||
cmdmod.tab = atoi((char *)ea.cmd) + 1;
|
||||
else
|
||||
long tabnr = get_address(&ea, &ea.cmd, ADDR_TABS,
|
||||
ea.skip, FALSE);
|
||||
if (tabnr == MAXLNUM)
|
||||
cmdmod.tab = tabpage_index(curtab) + 1;
|
||||
else
|
||||
{
|
||||
if (tabnr < 0 || tabnr > LAST_TAB_NR)
|
||||
{
|
||||
errormsg = (char_u *)_(e_invrange);
|
||||
goto doend;
|
||||
}
|
||||
cmdmod.tab = tabnr + 1;
|
||||
}
|
||||
ea.cmd = p;
|
||||
#endif
|
||||
continue;
|
||||
@@ -2041,6 +2074,7 @@ do_one_cmd(
|
||||
}
|
||||
break;
|
||||
}
|
||||
after_modifier = ea.cmd;
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
ea.skip = did_emsg || got_int || did_throw || (cstack->cs_idx >= 0
|
||||
@@ -2374,7 +2408,14 @@ do_one_cmd(
|
||||
{
|
||||
STRCPY(IObuff, _("E492: Not an editor command"));
|
||||
if (!sourcing)
|
||||
append_command(*cmdlinep);
|
||||
{
|
||||
/* If the modifier was parsed OK the error must be in the
|
||||
* following command */
|
||||
if (after_modifier != NULL)
|
||||
append_command(after_modifier);
|
||||
else
|
||||
append_command(*cmdlinep);
|
||||
}
|
||||
errormsg = IObuff;
|
||||
did_emsg_syntax = TRUE;
|
||||
}
|
||||
@@ -2818,6 +2859,7 @@ do_one_cmd(
|
||||
case CMD_echomsg:
|
||||
case CMD_echon:
|
||||
case CMD_execute:
|
||||
case CMD_filter:
|
||||
case CMD_help:
|
||||
case CMD_hide:
|
||||
case CMD_ijump:
|
||||
@@ -2989,6 +3031,8 @@ doend:
|
||||
free_string_option(cmdmod.save_ei);
|
||||
}
|
||||
#endif
|
||||
if (cmdmod.filter_regmatch.regprog != NULL)
|
||||
vim_regfree(cmdmod.filter_regmatch.regprog);
|
||||
|
||||
cmdmod = save_cmdmod;
|
||||
|
||||
@@ -3323,6 +3367,7 @@ static struct cmdmod
|
||||
{"botright", 2, FALSE},
|
||||
{"browse", 3, FALSE},
|
||||
{"confirm", 4, FALSE},
|
||||
{"filter", 4, FALSE},
|
||||
{"hide", 3, FALSE},
|
||||
{"keepalt", 5, FALSE},
|
||||
{"keepjumps", 5, FALSE},
|
||||
@@ -3833,6 +3878,7 @@ set_one_cmd_context(
|
||||
case CMD_cfdo:
|
||||
case CMD_confirm:
|
||||
case CMD_debug:
|
||||
case CMD_filter:
|
||||
case CMD_folddoclosed:
|
||||
case CMD_folddoopen:
|
||||
case CMD_hide:
|
||||
@@ -5906,8 +5952,10 @@ uc_list(char_u *name, size_t name_len)
|
||||
cmd = USER_CMD_GA(gap, i);
|
||||
a = (long)cmd->uc_argt;
|
||||
|
||||
/* Skip commands which don't match the requested prefix */
|
||||
if (STRNCMP(name, cmd->uc_name, name_len) != 0)
|
||||
/* Skip commands which don't match the requested prefix and
|
||||
* commands filtered out. */
|
||||
if (STRNCMP(name, cmd->uc_name, name_len) != 0
|
||||
|| message_filtered(cmd->uc_name))
|
||||
continue;
|
||||
|
||||
/* Put out the title first time */
|
||||
|
||||
+142
-28
@@ -137,6 +137,9 @@ _RTLENTRYF
|
||||
#endif
|
||||
sort_func_compare(const void *s1, const void *s2);
|
||||
#endif
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
static void set_search_match(pos_T *t);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* getcmdline() - accept a command line starting with firstc.
|
||||
@@ -178,6 +181,9 @@ getcmdline(
|
||||
colnr_T old_curswant;
|
||||
colnr_T old_leftcol;
|
||||
linenr_T old_topline;
|
||||
pos_T cursor_start;
|
||||
pos_T match_start = curwin->w_cursor;
|
||||
pos_T match_end;
|
||||
# ifdef FEAT_DIFF
|
||||
int old_topfill;
|
||||
# endif
|
||||
@@ -223,7 +229,9 @@ getcmdline(
|
||||
|
||||
ccline.overstrike = FALSE; /* always start in insert mode */
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
clearpos(&match_end);
|
||||
old_cursor = curwin->w_cursor; /* needs to be restored later */
|
||||
cursor_start = old_cursor;
|
||||
old_curswant = curwin->w_curswant;
|
||||
old_leftcol = curwin->w_leftcol;
|
||||
old_topline = curwin->w_topline;
|
||||
@@ -996,6 +1004,15 @@ getcmdline(
|
||||
|
||||
/* Truncate at the end, required for multi-byte chars. */
|
||||
ccline.cmdbuff[ccline.cmdlen] = NUL;
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
if (ccline.cmdlen == 0)
|
||||
old_cursor = cursor_start;
|
||||
else
|
||||
{
|
||||
old_cursor = match_start;
|
||||
decl(&old_cursor);
|
||||
}
|
||||
#endif
|
||||
redrawcmd();
|
||||
}
|
||||
else if (ccline.cmdlen == 0 && c != Ctrl_W
|
||||
@@ -1021,6 +1038,10 @@ getcmdline(
|
||||
msg_col = 0;
|
||||
msg_putchar(' '); /* delete ':' */
|
||||
}
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
if (ccline.cmdlen == 0)
|
||||
old_cursor = cursor_start;
|
||||
#endif
|
||||
redraw_cmdline = TRUE;
|
||||
goto returncmd; /* back to cmd mode */
|
||||
}
|
||||
@@ -1104,6 +1125,10 @@ getcmdline(
|
||||
ccline.cmdbuff[i++] = ccline.cmdbuff[j++];
|
||||
/* Truncate at the end, required for multi-byte chars. */
|
||||
ccline.cmdbuff[ccline.cmdlen] = NUL;
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
if (ccline.cmdlen == 0)
|
||||
old_cursor = cursor_start;
|
||||
#endif
|
||||
redrawcmd();
|
||||
goto cmdline_changed;
|
||||
|
||||
@@ -1448,26 +1473,31 @@ getcmdline(
|
||||
if (p_is && !cmd_silent && (firstc == '/' || firstc == '?'))
|
||||
{
|
||||
/* Add a character from under the cursor for 'incsearch' */
|
||||
if (did_incsearch
|
||||
&& !equalpos(curwin->w_cursor, old_cursor))
|
||||
if (did_incsearch)
|
||||
{
|
||||
c = gchar_cursor();
|
||||
/* If 'ignorecase' and 'smartcase' are set and the
|
||||
* command line has no uppercase characters, convert
|
||||
* the character to lowercase */
|
||||
if (p_ic && p_scs && !pat_has_uppercase(ccline.cmdbuff))
|
||||
c = MB_TOLOWER(c);
|
||||
if (c != NUL)
|
||||
curwin->w_cursor = match_end;
|
||||
if (!equalpos(curwin->w_cursor, old_cursor))
|
||||
{
|
||||
if (c == firstc || vim_strchr((char_u *)(
|
||||
p_magic ? "\\^$.*[" : "\\^$"), c)
|
||||
!= NULL)
|
||||
c = gchar_cursor();
|
||||
/* If 'ignorecase' and 'smartcase' are set and the
|
||||
* command line has no uppercase characters, convert
|
||||
* the character to lowercase */
|
||||
if (p_ic && p_scs
|
||||
&& !pat_has_uppercase(ccline.cmdbuff))
|
||||
c = MB_TOLOWER(c);
|
||||
if (c != NUL)
|
||||
{
|
||||
/* put a backslash before special characters */
|
||||
stuffcharReadbuff(c);
|
||||
c = '\\';
|
||||
if (c == firstc || vim_strchr((char_u *)(
|
||||
p_magic ? "\\^$.*[" : "\\^$"), c)
|
||||
!= NULL)
|
||||
{
|
||||
/* put a backslash before special
|
||||
* characters */
|
||||
stuffcharReadbuff(c);
|
||||
c = '\\';
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
goto cmdline_not_changed;
|
||||
@@ -1486,8 +1516,9 @@ getcmdline(
|
||||
if (nextwild(&xpc, (c == Ctrl_P) ? WILD_PREV : WILD_NEXT,
|
||||
0, firstc != '@') == FAIL)
|
||||
break;
|
||||
goto cmdline_changed;
|
||||
goto cmdline_not_changed;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
|
||||
#ifdef FEAT_CMDHIST
|
||||
case K_UP:
|
||||
@@ -1631,6 +1662,77 @@ getcmdline(
|
||||
goto cmdline_changed;
|
||||
}
|
||||
beep_flush();
|
||||
#endif
|
||||
goto cmdline_not_changed;
|
||||
|
||||
case Ctrl_G: /* next match */
|
||||
case Ctrl_T: /* previous match */
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
if (p_is && !cmd_silent && (firstc == '/' || firstc == '?'))
|
||||
{
|
||||
pos_T t;
|
||||
int search_flags = SEARCH_KEEP + SEARCH_NOOF
|
||||
+ SEARCH_PEEK;
|
||||
|
||||
if (char_avail())
|
||||
continue;
|
||||
cursor_off();
|
||||
out_flush();
|
||||
if (c == Ctrl_G)
|
||||
{
|
||||
t = match_end;
|
||||
search_flags += SEARCH_COL;
|
||||
}
|
||||
else
|
||||
t = match_start;
|
||||
++emsg_off;
|
||||
i = searchit(curwin, curbuf, &t,
|
||||
c == Ctrl_G ? FORWARD : BACKWARD,
|
||||
ccline.cmdbuff, count, search_flags,
|
||||
RE_SEARCH, 0, NULL);
|
||||
--emsg_off;
|
||||
if (i)
|
||||
{
|
||||
old_cursor = match_start;
|
||||
match_end = t;
|
||||
match_start = t;
|
||||
if (c == Ctrl_T && firstc == '/')
|
||||
{
|
||||
/* move just before the current match, so that
|
||||
* when nv_search finishes the cursor will be
|
||||
* put back on the match */
|
||||
old_cursor = t;
|
||||
(void)decl(&old_cursor);
|
||||
}
|
||||
if (lt(t, old_cursor) && c == Ctrl_G)
|
||||
{
|
||||
/* wrap around */
|
||||
old_cursor = t;
|
||||
if (firstc == '?')
|
||||
(void)incl(&old_cursor);
|
||||
else
|
||||
(void)decl(&old_cursor);
|
||||
}
|
||||
|
||||
set_search_match(&match_end);
|
||||
curwin->w_cursor = match_start;
|
||||
changed_cline_bef_curs();
|
||||
update_topline();
|
||||
validate_cursor();
|
||||
highlight_match = TRUE;
|
||||
old_curswant = curwin->w_curswant;
|
||||
old_leftcol = curwin->w_leftcol;
|
||||
old_topline = curwin->w_topline;
|
||||
# ifdef FEAT_DIFF
|
||||
old_topfill = curwin->w_topfill;
|
||||
# endif
|
||||
old_botline = curwin->w_botline;
|
||||
update_screen(NOT_VALID);
|
||||
redrawcmdline();
|
||||
}
|
||||
else
|
||||
vim_beep(BO_ERROR);
|
||||
}
|
||||
goto cmdline_not_changed;
|
||||
#endif
|
||||
|
||||
@@ -1829,19 +1931,11 @@ cmdline_changed:
|
||||
{
|
||||
pos_T save_pos = curwin->w_cursor;
|
||||
|
||||
/*
|
||||
* First move cursor to end of match, then to the start. This
|
||||
* moves the whole match onto the screen when 'nowrap' is set.
|
||||
*/
|
||||
curwin->w_cursor.lnum += search_match_lines;
|
||||
curwin->w_cursor.col = search_match_endcol;
|
||||
if (curwin->w_cursor.lnum > curbuf->b_ml.ml_line_count)
|
||||
{
|
||||
curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count;
|
||||
coladvance((colnr_T)MAXCOL);
|
||||
}
|
||||
match_start = curwin->w_cursor;
|
||||
set_search_match(&curwin->w_cursor);
|
||||
validate_cursor();
|
||||
end_pos = curwin->w_cursor;
|
||||
match_end = end_pos;
|
||||
curwin->w_cursor = save_pos;
|
||||
}
|
||||
else
|
||||
@@ -1902,6 +1996,8 @@ returncmd:
|
||||
if (did_incsearch)
|
||||
{
|
||||
curwin->w_cursor = old_cursor;
|
||||
if (gotesc)
|
||||
curwin->w_cursor = cursor_start;
|
||||
curwin->w_curswant = old_curswant;
|
||||
curwin->w_leftcol = old_leftcol;
|
||||
curwin->w_topline = old_topline;
|
||||
@@ -6997,3 +7093,21 @@ script_get(exarg_T *eap, char_u *cmd)
|
||||
|
||||
return (char_u *)ga.ga_data;
|
||||
}
|
||||
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
static void
|
||||
set_search_match(pos_T *t)
|
||||
{
|
||||
/*
|
||||
* First move cursor to end of match, then to the start. This
|
||||
* moves the whole match onto the screen when 'nowrap' is set.
|
||||
*/
|
||||
t->lnum += search_match_lines;
|
||||
t->col = search_match_endcol;
|
||||
if (t->lnum > curbuf->b_ml.ml_line_count)
|
||||
{
|
||||
t->lnum = curbuf->b_ml.ml_line_count;
|
||||
coladvance((colnr_T)MAXCOL);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
+11
-11
@@ -27,10 +27,6 @@
|
||||
/* Is there any system that doesn't have access()? */
|
||||
#define USE_MCH_ACCESS
|
||||
|
||||
#if (defined(sun) || defined(__FreeBSD__)) && defined(S_ISCHR)
|
||||
# define OPEN_CHR_FILES
|
||||
static int is_dev_fd_file(char_u *fname);
|
||||
#endif
|
||||
#ifdef FEAT_MBYTE
|
||||
static char_u *next_fenc(char_u **pp);
|
||||
# ifdef FEAT_EVAL
|
||||
@@ -212,6 +208,7 @@ filemess(
|
||||
* stdin)
|
||||
* READ_DUMMY read into a dummy buffer (to check if file contents changed)
|
||||
* READ_KEEP_UNDO don't clear undo info or read it from a file
|
||||
* READ_FIFO read from fifo/socket instead of a file
|
||||
*
|
||||
* return FAIL for failure, OK otherwise
|
||||
*/
|
||||
@@ -231,6 +228,7 @@ readfile(
|
||||
int filtering = (flags & READ_FILTER);
|
||||
int read_stdin = (flags & READ_STDIN);
|
||||
int read_buffer = (flags & READ_BUFFER);
|
||||
int read_fifo = (flags & READ_FIFO);
|
||||
int set_options = newfile || read_buffer
|
||||
|| (eap != NULL && eap->read_edit);
|
||||
linenr_T read_buf_lnum = 1; /* next line to read from curbuf */
|
||||
@@ -431,7 +429,7 @@ readfile(
|
||||
}
|
||||
}
|
||||
|
||||
if (!read_stdin && !read_buffer)
|
||||
if (!read_stdin && !read_buffer && !read_fifo)
|
||||
{
|
||||
#ifdef UNIX
|
||||
/*
|
||||
@@ -489,7 +487,7 @@ readfile(
|
||||
if (check_readonly && !readonlymode)
|
||||
curbuf->b_p_ro = FALSE;
|
||||
|
||||
if (newfile && !read_stdin && !read_buffer)
|
||||
if (newfile && !read_stdin && !read_buffer && !read_fifo)
|
||||
{
|
||||
/* Remember time of file. */
|
||||
if (mch_stat((char *)fname, &st) >= 0)
|
||||
@@ -1101,6 +1099,7 @@ retry:
|
||||
* and we can't do it internally or with iconv().
|
||||
*/
|
||||
if (fio_flags == 0 && !read_stdin && !read_buffer && *p_ccv != NUL
|
||||
&& !read_fifo
|
||||
# ifdef USE_ICONV
|
||||
&& iconv_fd == (iconv_t)-1
|
||||
# endif
|
||||
@@ -1149,7 +1148,7 @@ retry:
|
||||
/* Set "can_retry" when it's possible to rewind the file and try with
|
||||
* another "fenc" value. It's FALSE when no other "fenc" to try, reading
|
||||
* stdin or fixed at a specific encoding. */
|
||||
can_retry = (*fenc != NUL && !read_stdin && !keep_dest_enc);
|
||||
can_retry = (*fenc != NUL && !read_stdin && !read_fifo && !keep_dest_enc);
|
||||
#endif
|
||||
|
||||
if (!skip_read)
|
||||
@@ -1166,6 +1165,7 @@ retry:
|
||||
&& curbuf->b_ffname != NULL
|
||||
&& curbuf->b_p_udf
|
||||
&& !filtering
|
||||
&& !read_fifo
|
||||
&& !read_stdin
|
||||
&& !read_buffer);
|
||||
if (read_undo_file)
|
||||
@@ -2666,7 +2666,7 @@ failed:
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_AUTOCMD
|
||||
if (!read_stdin && !read_buffer)
|
||||
if (!read_stdin && !read_fifo && (!read_buffer || sfname != NULL))
|
||||
{
|
||||
int m = msg_scroll;
|
||||
int n = msg_scrolled;
|
||||
@@ -2685,7 +2685,7 @@ failed:
|
||||
if (filtering)
|
||||
apply_autocmds_exarg(EVENT_FILTERREADPOST, NULL, sfname,
|
||||
FALSE, curbuf, eap);
|
||||
else if (newfile)
|
||||
else if (newfile || (read_buffer && sfname != NULL))
|
||||
{
|
||||
apply_autocmds_exarg(EVENT_BUFREADPOST, NULL, sfname,
|
||||
FALSE, curbuf, eap);
|
||||
@@ -2714,14 +2714,14 @@ failed:
|
||||
return OK;
|
||||
}
|
||||
|
||||
#ifdef OPEN_CHR_FILES
|
||||
#if defined(OPEN_CHR_FILES) || defined(PROTO)
|
||||
/*
|
||||
* Returns TRUE if the file name argument is of the form "/dev/fd/\d\+",
|
||||
* which is the name of files used for process substitution output by
|
||||
* some shells on some operating systems, e.g., bash on SunOS.
|
||||
* Do not accept "/dev/fd/[012]", opening these may hang Vim.
|
||||
*/
|
||||
static int
|
||||
int
|
||||
is_dev_fd_file(char_u *fname)
|
||||
{
|
||||
return (STRNCMP(fname, "/dev/fd/", 8) == 0
|
||||
|
||||
+19
-24
@@ -1919,7 +1919,7 @@ vungetc(int c)
|
||||
* This may do a blocking wait if "advance" is TRUE.
|
||||
*
|
||||
* if "advance" is TRUE (vgetc()):
|
||||
* really get the character.
|
||||
* Really get the character.
|
||||
* KeyTyped is set to TRUE in the case the user typed the key.
|
||||
* KeyStuffed is TRUE if the character comes from the stuff buffer.
|
||||
* if "advance" is FALSE (vpeekc()):
|
||||
@@ -3060,7 +3060,7 @@ inchar(
|
||||
if (typebuf_changed(tb_change_cnt))
|
||||
return 0;
|
||||
|
||||
return fix_input_buffer(buf, len, script_char >= 0);
|
||||
return fix_input_buffer(buf, len);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3069,10 +3069,7 @@ inchar(
|
||||
* Returns the new length.
|
||||
*/
|
||||
int
|
||||
fix_input_buffer(
|
||||
char_u *buf,
|
||||
int len,
|
||||
int script) /* TRUE when reading from a script */
|
||||
fix_input_buffer(char_u *buf, int len)
|
||||
{
|
||||
int i;
|
||||
char_u *p = buf;
|
||||
@@ -3083,7 +3080,6 @@ fix_input_buffer(
|
||||
* Replace NUL by K_SPECIAL KS_ZERO KE_FILLER
|
||||
* Replace K_SPECIAL by K_SPECIAL KS_SPECIAL KE_FILLER
|
||||
* Replace CSI by K_SPECIAL KS_EXTRA KE_CSI
|
||||
* Don't replace K_SPECIAL when reading a script file.
|
||||
*/
|
||||
for (i = len; --i >= 0; ++p)
|
||||
{
|
||||
@@ -3106,7 +3102,7 @@ fix_input_buffer(
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (p[0] == NUL || (p[0] == K_SPECIAL && !script
|
||||
if (p[0] == NUL || (p[0] == K_SPECIAL
|
||||
#ifdef FEAT_AUTOCMD
|
||||
/* timeout may generate K_CURSORHOLD */
|
||||
&& (i < 2 || p[1] != KS_EXTRA || p[2] != (int)KE_CURSORHOLD)
|
||||
@@ -3991,6 +3987,9 @@ showmap(
|
||||
int len = 1;
|
||||
char_u *mapchars;
|
||||
|
||||
if (message_filtered(mp->m_keys) && message_filtered(mp->m_str))
|
||||
return;
|
||||
|
||||
if (msg_didout || msg_silent != 0)
|
||||
{
|
||||
msg_putchar('\n');
|
||||
@@ -4662,8 +4661,16 @@ vim_strsave_escape_csi(
|
||||
char_u *res;
|
||||
char_u *s, *d;
|
||||
|
||||
/* Need a buffer to hold up to three times as much. */
|
||||
res = alloc((unsigned)(STRLEN(p) * 3) + 1);
|
||||
/* Need a buffer to hold up to three times as much. Four in case of an
|
||||
* illegal utf-8 byte:
|
||||
* 0xc0 -> 0xc3 0x80 -> 0xc3 K_SPECIAL KS_SPECIAL KE_FILLER */
|
||||
res = alloc((unsigned)(STRLEN(p) *
|
||||
#ifdef FEAT_MBYTE
|
||||
4
|
||||
#else
|
||||
3
|
||||
#endif
|
||||
) + 1);
|
||||
if (res != NULL)
|
||||
{
|
||||
d = res;
|
||||
@@ -4678,22 +4685,10 @@ vim_strsave_escape_csi(
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef FEAT_MBYTE
|
||||
int len = mb_char2len(PTR2CHAR(s));
|
||||
int len2 = mb_ptr2len(s);
|
||||
#endif
|
||||
/* Add character, possibly multi-byte to destination, escaping
|
||||
* CSI and K_SPECIAL. */
|
||||
* CSI and K_SPECIAL. Be careful, it can be an illegal byte! */
|
||||
d = add_char2buf(PTR2CHAR(s), d);
|
||||
#ifdef FEAT_MBYTE
|
||||
while (len < len2)
|
||||
{
|
||||
/* add following combining char */
|
||||
d = add_char2buf(PTR2CHAR(s + len), d);
|
||||
len += mb_char2len(PTR2CHAR(s + len));
|
||||
}
|
||||
#endif
|
||||
mb_ptr_adv(s);
|
||||
s += MB_CPTR2LEN(s);
|
||||
}
|
||||
}
|
||||
*d = NUL;
|
||||
|
||||
+3
-3
@@ -368,8 +368,8 @@ EXTERN int cterm_normal_fg_color INIT(= 0);
|
||||
EXTERN int cterm_normal_fg_bold INIT(= 0);
|
||||
EXTERN int cterm_normal_bg_color INIT(= 0);
|
||||
#ifdef FEAT_TERMGUICOLORS
|
||||
EXTERN long_u cterm_normal_fg_gui_color INIT(= INVALCOLOR);
|
||||
EXTERN long_u cterm_normal_bg_gui_color INIT(= INVALCOLOR);
|
||||
EXTERN guicolor_T cterm_normal_fg_gui_color INIT(= INVALCOLOR);
|
||||
EXTERN guicolor_T cterm_normal_bg_gui_color INIT(= INVALCOLOR);
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_AUTOCMD
|
||||
@@ -1513,7 +1513,7 @@ EXTERN char_u e_notread[] INIT(= N_("E485: Can't read file %s"));
|
||||
EXTERN char_u e_nowrtmsg[] INIT(= N_("E37: No write since last change (add ! to override)"));
|
||||
EXTERN char_u e_nowrtmsg_nobang[] INIT(= N_("E37: No write since last change"));
|
||||
EXTERN char_u e_null[] INIT(= N_("E38: Null argument"));
|
||||
#ifdef FEAT_DIGRAPHS
|
||||
#if defined(FEAT_DIGRAPHS) || defined(FEAT_TIMERS)
|
||||
EXTERN char_u e_number_exp[] INIT(= N_("E39: Number expected"));
|
||||
#endif
|
||||
#ifdef FEAT_QUICKFIX
|
||||
|
||||
@@ -447,7 +447,7 @@ gui_init_check(void)
|
||||
* See gui_do_fork().
|
||||
* Use a simpler check if the GUI window can probably be opened.
|
||||
*/
|
||||
result = gui.dofork ? gui_mch_early_init_check() : gui_mch_init_check();
|
||||
result = gui.dofork ? gui_mch_early_init_check(TRUE) : gui_mch_init_check();
|
||||
# else
|
||||
result = gui_mch_init_check();
|
||||
# endif
|
||||
@@ -1981,12 +1981,13 @@ gui_write(
|
||||
* gui_can_update_cursor() afterwards.
|
||||
*/
|
||||
void
|
||||
gui_dont_update_cursor(void)
|
||||
gui_dont_update_cursor(int undraw)
|
||||
{
|
||||
if (gui.in_use)
|
||||
{
|
||||
/* Undraw the cursor now, we probably can't do it after the change. */
|
||||
gui_undraw_cursor();
|
||||
if (undraw)
|
||||
gui_undraw_cursor();
|
||||
can_update_cursor = FALSE;
|
||||
}
|
||||
}
|
||||
@@ -4789,7 +4790,7 @@ gui_get_color(char_u *name)
|
||||
int
|
||||
gui_get_lightness(guicolor_T pixel)
|
||||
{
|
||||
long_u rgb = gui_mch_get_rgb(pixel);
|
||||
long_u rgb = (long_u)gui_mch_get_rgb(pixel);
|
||||
|
||||
return (int)( (((rgb >> 16) & 0xff) * 299)
|
||||
+ (((rgb >> 8) & 0xff) * 587)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
# include <X11/StringDefs.h>
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_BEVAL
|
||||
#if defined(FEAT_BEVAL) || defined(PROTO)
|
||||
# include "gui_beval.h"
|
||||
#endif
|
||||
|
||||
|
||||
+24
-16
@@ -542,8 +542,10 @@ gui_mch_prepare(int *argc, char **argv)
|
||||
}
|
||||
|
||||
/* These arguments make gnome_program_init() print a message and exit.
|
||||
* Must start the GUI for this, otherwise ":gui" will exit later! */
|
||||
if (option->flags & ARG_NEEDS_GUI)
|
||||
* Must start the GUI for this, otherwise ":gui" will exit later!
|
||||
* Only when the GUI can start. */
|
||||
if ((option->flags & ARG_NEEDS_GUI)
|
||||
&& gui_mch_early_init_check(FALSE) == OK)
|
||||
gui.starting = TRUE;
|
||||
|
||||
if (option->flags & ARG_KEEP)
|
||||
@@ -1663,7 +1665,7 @@ selection_get_cb(GtkWidget *widget UNUSED,
|
||||
* Return OK or FAIL.
|
||||
*/
|
||||
int
|
||||
gui_mch_early_init_check(void)
|
||||
gui_mch_early_init_check(int give_message)
|
||||
{
|
||||
char_u *p;
|
||||
|
||||
@@ -1672,7 +1674,8 @@ gui_mch_early_init_check(void)
|
||||
if (p == NULL || *p == NUL)
|
||||
{
|
||||
gui.dying = TRUE;
|
||||
EMSG(_((char *)e_opendisp));
|
||||
if (give_message)
|
||||
EMSG(_((char *)e_opendisp));
|
||||
return FAIL;
|
||||
}
|
||||
return OK;
|
||||
@@ -5236,7 +5239,7 @@ static PangoEngineShape *default_shape_engine = NULL;
|
||||
static void
|
||||
ascii_glyph_table_init(void)
|
||||
{
|
||||
char_u ascii_chars[128];
|
||||
char_u ascii_chars[2 * 128];
|
||||
PangoAttrList *attr_list;
|
||||
GList *item_list;
|
||||
int i;
|
||||
@@ -5249,12 +5252,16 @@ ascii_glyph_table_init(void)
|
||||
gui.ascii_glyphs = NULL;
|
||||
gui.ascii_font = NULL;
|
||||
|
||||
/* For safety, fill in question marks for the control characters. */
|
||||
for (i = 0; i < 32; ++i)
|
||||
ascii_chars[i] = '?';
|
||||
for (; i < 127; ++i)
|
||||
ascii_chars[i] = i;
|
||||
ascii_chars[i] = '?';
|
||||
/* For safety, fill in question marks for the control characters.
|
||||
* Put a space between characters to avoid shaping. */
|
||||
for (i = 0; i < 128; ++i)
|
||||
{
|
||||
if (i >= 32 && i < 127)
|
||||
ascii_chars[2 * i] = i;
|
||||
else
|
||||
ascii_chars[2 * i] = '?';
|
||||
ascii_chars[2 * i + 1] = ' ';
|
||||
}
|
||||
|
||||
attr_list = pango_attr_list_new();
|
||||
item_list = pango_itemize(gui.text_context, (const char *)ascii_chars,
|
||||
@@ -5943,7 +5950,7 @@ gui_gtk2_draw_string(int row, int col, char_u *s, int len, int flags)
|
||||
|
||||
for (i = 0; i < len; ++i)
|
||||
{
|
||||
glyphs->glyphs[i] = gui.ascii_glyphs->glyphs[s[i]];
|
||||
glyphs->glyphs[i] = gui.ascii_glyphs->glyphs[2 * s[i]];
|
||||
glyphs->log_clusters[i] = i;
|
||||
}
|
||||
|
||||
@@ -6695,7 +6702,7 @@ check_copy_area(void)
|
||||
* we don't want it to be. I'm not sure if it's correct to call
|
||||
* gui_dont_update_cursor() at this point but it works as a quick
|
||||
* fix for now. */
|
||||
gui_dont_update_cursor();
|
||||
gui_dont_update_cursor(TRUE);
|
||||
|
||||
do
|
||||
{
|
||||
@@ -7013,7 +7020,7 @@ gui_mch_enable_scrollbar(scrollbar_T *sb, int flag)
|
||||
/*
|
||||
* Return the RGB value of a pixel as long.
|
||||
*/
|
||||
long_u
|
||||
guicolor_T
|
||||
gui_mch_get_rgb(guicolor_T pixel)
|
||||
{
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
@@ -7024,9 +7031,10 @@ gui_mch_get_rgb(guicolor_T pixel)
|
||||
gdk_colormap_query_color(gtk_widget_get_colormap(gui.drawarea),
|
||||
(unsigned long)pixel, &color);
|
||||
|
||||
return (((unsigned)color.red & 0xff00) << 8)
|
||||
return (guicolor_T)(
|
||||
(((unsigned)color.red & 0xff00) << 8)
|
||||
| ((unsigned)color.green & 0xff00)
|
||||
| (((unsigned)color.blue & 0xff00) >> 8);
|
||||
| (((unsigned)color.blue & 0xff00) >> 8));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -4830,7 +4830,7 @@ gui_mch_add_menu_item(vimmenu_T *menu, int idx)
|
||||
char_u *p_actext;
|
||||
|
||||
p_actext = menu->actext;
|
||||
key = find_special_key(&p_actext, &modifiers, FALSE, FALSE);
|
||||
key = find_special_key(&p_actext, &modifiers, FALSE, FALSE, FALSE);
|
||||
if (*p_actext != 0)
|
||||
key = 0; /* error: trailing text */
|
||||
/* find_special_key() returns a keycode with as many of the
|
||||
@@ -5181,10 +5181,10 @@ gui_mch_start_blink(void)
|
||||
/*
|
||||
* Return the RGB value of a pixel as long.
|
||||
*/
|
||||
long_u
|
||||
guicolor_T
|
||||
gui_mch_get_rgb(guicolor_T pixel)
|
||||
{
|
||||
return (Red(pixel) << 16) + (Green(pixel) << 8) + Blue(pixel);
|
||||
return (guicolor_T)((Red(pixel) << 16) + (Green(pixel) << 8) + Blue(pixel));
|
||||
}
|
||||
|
||||
|
||||
|
||||
+3
-2
@@ -1933,10 +1933,11 @@ gui_mch_setmouse(int x, int y)
|
||||
/*
|
||||
* Return the RGB value of a pixel as a long.
|
||||
*/
|
||||
long_u
|
||||
guicolor_T
|
||||
gui_mch_get_rgb(guicolor_T pixel)
|
||||
{
|
||||
return PgRGB(PgRedValue(pixel), PgGreenValue(pixel), PgBlueValue(pixel));
|
||||
return (guicolor_T)(PgRGB(PgRedValue(pixel),
|
||||
PgGreenValue(pixel), PgBlueValue(pixel)));
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
+7
-14
@@ -247,6 +247,7 @@ gui_mch_set_rendering_options(char_u *s)
|
||||
# define CONST
|
||||
# define FAR
|
||||
# define NEAR
|
||||
# undef _cdecl
|
||||
# define _cdecl
|
||||
typedef int BOOL;
|
||||
typedef int BYTE;
|
||||
@@ -288,6 +289,7 @@ typedef void VOID;
|
||||
typedef int LPNMHDR;
|
||||
typedef int LONG;
|
||||
typedef int WNDPROC;
|
||||
typedef int UINT_PTR;
|
||||
#endif
|
||||
|
||||
#ifndef GET_X_LPARAM
|
||||
@@ -2261,11 +2263,11 @@ SaveInst(HINSTANCE hInst)
|
||||
/*
|
||||
* Return the RGB value of a pixel as a long.
|
||||
*/
|
||||
long_u
|
||||
guicolor_T
|
||||
gui_mch_get_rgb(guicolor_T pixel)
|
||||
{
|
||||
return (GetRValue(pixel) << 16) + (GetGValue(pixel) << 8)
|
||||
+ GetBValue(pixel);
|
||||
return (guicolor_T)((GetRValue(pixel) << 16) + (GetGValue(pixel) << 8)
|
||||
+ GetBValue(pixel));
|
||||
}
|
||||
|
||||
#if defined(FEAT_GUI_DIALOG) || defined(PROTO)
|
||||
@@ -3451,7 +3453,7 @@ gui_mch_settitle(
|
||||
set_window_title(s_hwnd, (title == NULL ? "VIM" : (char *)title));
|
||||
}
|
||||
|
||||
#ifdef FEAT_MOUSESHAPE
|
||||
#if defined(FEAT_MOUSESHAPE) || defined(PROTO)
|
||||
/* Table for shape IDCs. Keep in sync with the mshape_names[] table in
|
||||
* misc2.c! */
|
||||
static LPCSTR mshape_idcs[] =
|
||||
@@ -3514,7 +3516,7 @@ mch_set_mouse_shape(int shape)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_BROWSE
|
||||
#if defined(FEAT_BROWSE) || defined(PROTO)
|
||||
/*
|
||||
* The file browser exists in two versions: with "W" uses wide characters,
|
||||
* without "W" the current codepage. When FEAT_MBYTE is defined and on
|
||||
@@ -4531,15 +4533,6 @@ is_winnt_3(void)
|
||||
|| (os_version.dwPlatformId == VER_PLATFORM_WIN32s));
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE when running under Win32s.
|
||||
*/
|
||||
int
|
||||
gui_is_win32s(void)
|
||||
{
|
||||
return (os_version.dwPlatformId == VER_PLATFORM_WIN32s);
|
||||
}
|
||||
|
||||
#ifdef FEAT_MENU
|
||||
/*
|
||||
* Figure out how high the menu bar is at the moment.
|
||||
|
||||
+3
-3
@@ -3095,7 +3095,7 @@ gui_x11_blink_cb(
|
||||
/*
|
||||
* Return the RGB value of a pixel as a long.
|
||||
*/
|
||||
long_u
|
||||
guicolor_T
|
||||
gui_mch_get_rgb(guicolor_T pixel)
|
||||
{
|
||||
XColor xc;
|
||||
@@ -3105,8 +3105,8 @@ gui_mch_get_rgb(guicolor_T pixel)
|
||||
xc.pixel = pixel;
|
||||
XQueryColor(gui.dpy, colormap, &xc);
|
||||
|
||||
return ((xc.red & 0xff00) << 8) + (xc.green & 0xff00)
|
||||
+ ((unsigned)xc.blue >> 8);
|
||||
return (guicolor_T)(((xc.red & 0xff00) << 8) + (xc.green & 0xff00)
|
||||
+ ((unsigned)xc.blue >> 8));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+17
-17
@@ -1008,9 +1008,17 @@ static intptr_t _tls_index = 0;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* mzscheme_main() is called early in main().
|
||||
* We may call scheme_main_setup() which calls mzscheme_env_main() which then
|
||||
* trampolines into vim_main2(), which never returns.
|
||||
*/
|
||||
int
|
||||
mzscheme_main(int argc, char** argv)
|
||||
mzscheme_main(void)
|
||||
{
|
||||
int argc = 0;
|
||||
char *argv = NULL;
|
||||
|
||||
#ifdef DYNAMIC_MZSCHEME
|
||||
/*
|
||||
* Racket requires trampolined startup. We can not load it later.
|
||||
@@ -1019,23 +1027,22 @@ mzscheme_main(int argc, char** argv)
|
||||
if (!mzscheme_enabled(FALSE))
|
||||
{
|
||||
disabled = TRUE;
|
||||
return vim_main2(argc, argv);
|
||||
return vim_main2();
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_TLS_SPACE
|
||||
scheme_register_tls_space(&tls_space, _tls_index);
|
||||
#endif
|
||||
#ifdef TRAMPOLINED_MZVIM_STARTUP
|
||||
return scheme_main_setup(TRUE, mzscheme_env_main, argc, argv);
|
||||
return scheme_main_setup(TRUE, mzscheme_env_main, argc, &argv);
|
||||
#else
|
||||
return mzscheme_env_main(NULL, argc, argv);
|
||||
return mzscheme_env_main(NULL, argc, &argv);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int
|
||||
mzscheme_env_main(Scheme_Env *env, int argc, char **argv)
|
||||
mzscheme_env_main(Scheme_Env *env, int argc UNUSED, char **argv UNUSED)
|
||||
{
|
||||
int vim_main_result;
|
||||
#ifdef TRAMPOLINED_MZVIM_STARTUP
|
||||
/* Scheme has created the environment for us */
|
||||
environment = env;
|
||||
@@ -1052,17 +1059,10 @@ mzscheme_env_main(Scheme_Env *env, int argc, char **argv)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* mzscheme_main is called as a trampoline from main.
|
||||
* We trampoline into vim_main2
|
||||
* Passing argc, argv through from mzscheme_main
|
||||
*/
|
||||
vim_main_result = vim_main2(argc, argv);
|
||||
#if !defined(TRAMPOLINED_MZVIM_STARTUP) && defined(MZ_PRECISE_GC)
|
||||
/* releasing dummy */
|
||||
MZ_GC_REG();
|
||||
MZ_GC_UNREG();
|
||||
#endif
|
||||
return vim_main_result;
|
||||
vim_main2();
|
||||
/* not reached, vim_main2() will loop until exit() */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static Scheme_Object*
|
||||
|
||||
+2
-2
@@ -3009,9 +3009,9 @@ FunctionAttr(FunctionObject *self, char *name)
|
||||
return PyString_FromString((char *)(self->name));
|
||||
else if (strcmp(name, "args") == 0)
|
||||
{
|
||||
if (self->argv == NULL)
|
||||
if (self->argv == NULL || (list = list_alloc()) == NULL)
|
||||
return AlwaysNone(NULL);
|
||||
list = list_alloc();
|
||||
|
||||
for (i = 0; i < self->argc; ++i)
|
||||
list_append_tv(list, &self->argv[i]);
|
||||
return NEW_LIST(list);
|
||||
|
||||
+25
-10
@@ -21,11 +21,28 @@
|
||||
static int json_encode_item(garray_T *gap, typval_T *val, int copyID, int options);
|
||||
static int json_decode_item(js_read_T *reader, typval_T *res, int options);
|
||||
|
||||
/*
|
||||
* Encode "val" into a JSON format string.
|
||||
* The result is added to "gap"
|
||||
* Returns FAIL on failure and makes gap->ga_data empty.
|
||||
*/
|
||||
static int
|
||||
json_encode_gap(garray_T *gap, typval_T *val, int options)
|
||||
{
|
||||
if (json_encode_item(gap, val, get_copyID(), options) == FAIL)
|
||||
{
|
||||
ga_clear(gap);
|
||||
gap->ga_data = vim_strsave((char_u *)"");
|
||||
return FAIL;
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Encode "val" into a JSON format string.
|
||||
* The result is in allocated memory.
|
||||
* The result is empty when encoding fails.
|
||||
* "options" can be JSON_JS or zero;
|
||||
* "options" can contain JSON_JS, JSON_NO_NONE and JSON_NL.
|
||||
*/
|
||||
char_u *
|
||||
json_encode(typval_T *val, int options)
|
||||
@@ -34,17 +51,13 @@ json_encode(typval_T *val, int options)
|
||||
|
||||
/* Store bytes in the growarray. */
|
||||
ga_init2(&ga, 1, 4000);
|
||||
if (json_encode_item(&ga, val, get_copyID(), options) == FAIL)
|
||||
{
|
||||
vim_free(ga.ga_data);
|
||||
return vim_strsave((char_u *)"");
|
||||
}
|
||||
json_encode_gap(&ga, val, options);
|
||||
return ga.ga_data;
|
||||
}
|
||||
|
||||
/*
|
||||
* Encode ["nr", "val"] into a JSON format string in allocated memory.
|
||||
* "options" can be JSON_JS or zero;
|
||||
* "options" can contain JSON_JS, JSON_NO_NONE and JSON_NL.
|
||||
* Returns NULL when out of memory.
|
||||
*/
|
||||
char_u *
|
||||
@@ -52,7 +65,7 @@ json_encode_nr_expr(int nr, typval_T *val, int options)
|
||||
{
|
||||
typval_T listtv;
|
||||
typval_T nrtv;
|
||||
char_u *text;
|
||||
garray_T ga;
|
||||
|
||||
nrtv.v_type = VAR_NUMBER;
|
||||
nrtv.vval.v_number = nr;
|
||||
@@ -65,9 +78,11 @@ json_encode_nr_expr(int nr, typval_T *val, int options)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
text = json_encode(&listtv, options);
|
||||
ga_init2(&ga, 1, 4000);
|
||||
if (json_encode_gap(&ga, &listtv, options) == OK && (options & JSON_NL))
|
||||
ga_append(&ga, '\n');
|
||||
list_unref(listtv.vval.v_list);
|
||||
return text;
|
||||
return ga.ga_data;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
+4
-3
@@ -135,7 +135,7 @@
|
||||
do { \
|
||||
if (*p_langmap \
|
||||
&& (condition) \
|
||||
&& (!p_lnr || (p_lnr && typebuf_maplen() == 0)) \
|
||||
&& (p_lrm || (!p_lrm && KeyTyped)) \
|
||||
&& !KeyStuffed \
|
||||
&& (c) >= 0) \
|
||||
{ \
|
||||
@@ -150,7 +150,7 @@
|
||||
do { \
|
||||
if (*p_langmap \
|
||||
&& (condition) \
|
||||
&& (!p_lnr || (p_lnr && typebuf_maplen() == 0)) \
|
||||
&& (p_lrm || (!p_lrm && KeyTyped)) \
|
||||
&& !KeyStuffed \
|
||||
&& (c) >= 0 && (c) < 256) \
|
||||
c = langmap_mapchar[c]; \
|
||||
@@ -274,7 +274,7 @@
|
||||
/* Backup multi-byte pointer. Only use with "p" > "s" ! */
|
||||
# define mb_ptr_back(s, p) p -= has_mbyte ? ((*mb_head_off)(s, p - 1) + 1) : 1
|
||||
/* get length of multi-byte char, not including composing chars */
|
||||
# define mb_cptr2len(p) (enc_utf8 ? utf_ptr2len(p) : (*mb_ptr2len)(p))
|
||||
# define MB_CPTR2LEN(p) (enc_utf8 ? utf_ptr2len(p) : (*mb_ptr2len)(p))
|
||||
|
||||
# define MB_COPY_CHAR(f, t) if (has_mbyte) mb_copy_char(&f, &t); else *t++ = *f++
|
||||
# define MB_CHARLEN(p) (has_mbyte ? mb_charlen(p) : (int)STRLEN(p))
|
||||
@@ -282,6 +282,7 @@
|
||||
# define PTR2CHAR(p) (has_mbyte ? mb_ptr2char(p) : (int)*(p))
|
||||
#else
|
||||
# define MB_PTR2LEN(p) 1
|
||||
# define MB_CPTR2LEN(p) 1
|
||||
# define mb_ptr_adv(p) ++p
|
||||
# define mb_cptr_adv(p) ++p
|
||||
# define mb_ptr_back(s, p) --p
|
||||
|
||||
+51
-46
@@ -92,6 +92,9 @@ static char_u *start_dir = NULL; /* current working dir on startup */
|
||||
|
||||
static int has_dash_c_arg = FALSE;
|
||||
|
||||
/* Various parameters passed between main() and other functions. */
|
||||
static mparm_T params;
|
||||
|
||||
int
|
||||
# ifdef VIMDLL
|
||||
_export
|
||||
@@ -106,9 +109,6 @@ main
|
||||
# endif
|
||||
(int argc, char **argv)
|
||||
{
|
||||
char_u *fname = NULL; /* file name from command line */
|
||||
mparm_T params; /* various parameters passed between
|
||||
* main() and other functions. */
|
||||
#ifdef STARTUPTIME
|
||||
int i;
|
||||
#endif
|
||||
@@ -164,6 +164,7 @@ main
|
||||
#endif
|
||||
|
||||
#ifdef STARTUPTIME
|
||||
/* Need to find "--startuptime" before actually parsing arguments. */
|
||||
for (i = 1; i < argc; ++i)
|
||||
{
|
||||
if (STRICMP(argv[i], "--startuptime") == 0 && i + 1 < argc)
|
||||
@@ -256,7 +257,7 @@ main
|
||||
mch_chdir((char *)start_dir);
|
||||
}
|
||||
#endif
|
||||
fname = alist_name(&GARGLIST[0]);
|
||||
params.fname = alist_name(&GARGLIST[0]);
|
||||
}
|
||||
|
||||
#if defined(WIN32) && defined(FEAT_MBYTE)
|
||||
@@ -278,7 +279,7 @@ main
|
||||
* Hint: to avoid this when typing a command use a forward slash.
|
||||
* If the cd fails, it doesn't matter.
|
||||
*/
|
||||
(void)vim_chdirfile(fname);
|
||||
(void)vim_chdirfile(params.fname);
|
||||
if (start_dir != NULL)
|
||||
mch_dirname(start_dir, MAXPATHL);
|
||||
}
|
||||
@@ -296,7 +297,7 @@ main
|
||||
/*
|
||||
* When listing swap file names, don't do cursor positioning et. al.
|
||||
*/
|
||||
if (recoverymode && fname == NULL)
|
||||
if (recoverymode && params.fname == NULL)
|
||||
params.want_full_screen = FALSE;
|
||||
|
||||
/*
|
||||
@@ -328,8 +329,8 @@ main
|
||||
if (getcwd((char *)NameBuff, MAXPATHL) != NULL
|
||||
&& STRCMP(NameBuff, "/") == 0)
|
||||
{
|
||||
if (fname != NULL)
|
||||
(void)vim_chdirfile(fname);
|
||||
if (params.fname != NULL)
|
||||
(void)vim_chdirfile(params.fname);
|
||||
else
|
||||
{
|
||||
expand_env((char_u *)"$HOME", NameBuff, MAXPATHL);
|
||||
@@ -418,43 +419,42 @@ main
|
||||
debug_break_level = params.use_debug_break_level;
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_GUI_MACVIM
|
||||
gui_macvim_release_autoreleasepool(autoreleasePool);
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_MZSCHEME
|
||||
/*
|
||||
* Newer version of MzScheme (Racket) require earlier (trampolined)
|
||||
* initialisation via scheme_main_setup.
|
||||
* Implement this by initialising it as early as possible
|
||||
* and splitting off remaining Vim main into vim_main2
|
||||
* and splitting off remaining Vim main into vim_main2().
|
||||
*/
|
||||
{
|
||||
/* Pack up preprocessed command line arguments.
|
||||
* It is safe because Scheme does not access argc/argv. */
|
||||
char *args[2];
|
||||
args[0] = (char *)fname;
|
||||
args[1] = (char *)¶ms;
|
||||
return mzscheme_main(2, args);
|
||||
}
|
||||
}
|
||||
return mzscheme_main();
|
||||
#else
|
||||
return vim_main2();
|
||||
#endif
|
||||
}
|
||||
#endif /* NO_VIM_MAIN */
|
||||
#endif /* PROTO */
|
||||
|
||||
/* vim_main2() needs to be produced when FEAT_MZSCHEME is defined even when
|
||||
* NO_VIM_MAIN is defined. */
|
||||
#ifdef FEAT_MZSCHEME
|
||||
/*
|
||||
* vim_main2() is needed for FEAT_MZSCHEME, but we define it always to keep
|
||||
* things simple.
|
||||
* It is also defined when NO_VIM_MAIN is defined, but then it's empty.
|
||||
*/
|
||||
int
|
||||
vim_main2(int argc UNUSED, char **argv UNUSED)
|
||||
vim_main2(void)
|
||||
{
|
||||
# ifndef NO_VIM_MAIN
|
||||
char_u *fname = (char_u *)argv[0];
|
||||
mparm_T params;
|
||||
|
||||
memcpy(¶ms, argv[1], sizeof(params));
|
||||
# else
|
||||
return 0;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef NO_VIM_MAIN
|
||||
#ifdef FEAT_GUI_MACVIM
|
||||
void *autoreleasePool = gui_macvim_new_autoreleasepool();
|
||||
#endif
|
||||
/* Reset 'loadplugins' for "-u NONE" before "--cmd" arguments.
|
||||
* Allows for setting 'loadplugins' there. */
|
||||
if (params.use_vimrc != NULL && STRCMP(params.use_vimrc, "NONE") == 0)
|
||||
p_lpl = FALSE;
|
||||
|
||||
/* Execute --cmd arguments. */
|
||||
exe_pre_commands(¶ms);
|
||||
|
||||
@@ -469,14 +469,22 @@ vim_main2(int argc UNUSED, char **argv UNUSED)
|
||||
if (p_lpl)
|
||||
{
|
||||
# ifdef VMS /* Somehow VMS doesn't handle the "**". */
|
||||
source_runtime((char_u *)"plugin/*.vim", DIP_ALL);
|
||||
source_runtime((char_u *)"plugin/*.vim", DIP_ALL | DIP_NOAFTER);
|
||||
# else
|
||||
source_runtime((char_u *)"plugin/**/*.vim", DIP_ALL);
|
||||
source_runtime((char_u *)"plugin/**/*.vim", DIP_ALL | DIP_NOAFTER);
|
||||
# endif
|
||||
TIME_MSG("loading plugins");
|
||||
|
||||
ex_packloadall(NULL);
|
||||
TIME_MSG("loading packages");
|
||||
|
||||
# ifdef VMS /* Somehow VMS doesn't handle the "**". */
|
||||
source_runtime((char_u *)"plugin/*.vim", DIP_ALL | DIP_AFTER);
|
||||
# else
|
||||
source_runtime((char_u *)"plugin/**/*.vim", DIP_ALL | DIP_AFTER);
|
||||
# endif
|
||||
TIME_MSG("loading after plugins");
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -496,7 +504,7 @@ vim_main2(int argc UNUSED, char **argv UNUSED)
|
||||
* This uses the 'dir' option, therefore it must be after the
|
||||
* initializations.
|
||||
*/
|
||||
if (recoverymode && fname == NULL)
|
||||
if (recoverymode && params.fname == NULL)
|
||||
{
|
||||
recover_names(NULL, TRUE, 0, NULL);
|
||||
mch_exit(0);
|
||||
@@ -931,17 +939,16 @@ vim_main2(int argc UNUSED, char **argv UNUSED)
|
||||
#ifdef FEAT_GUI_MACVIM
|
||||
gui_macvim_release_autoreleasepool(autoreleasePool);
|
||||
#endif
|
||||
#endif /* NO_VIM_MAIN */
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* NO_VIM_MAIN */
|
||||
#endif /* PROTO */
|
||||
|
||||
/*
|
||||
* Initialisation shared by main() and some tests.
|
||||
*/
|
||||
void
|
||||
common_init(mparm_T *params)
|
||||
common_init(mparm_T *paramp)
|
||||
{
|
||||
|
||||
#ifdef FEAT_MBYTE
|
||||
@@ -958,7 +965,7 @@ common_init(mparm_T *params)
|
||||
#ifdef MAC_OS_CLASSIC
|
||||
/* Prepare for possibly starting GUI sometime */
|
||||
/* Macintosh needs this before any memory is allocated. */
|
||||
gui_prepare(¶ms->argc, params->argv);
|
||||
gui_prepare(¶mp->argc, paramp->argv);
|
||||
TIME_MSG("GUI prepared");
|
||||
#endif
|
||||
|
||||
@@ -1007,14 +1014,14 @@ common_init(mparm_T *params)
|
||||
* --socketid
|
||||
* --windowid
|
||||
*/
|
||||
early_arg_scan(params);
|
||||
early_arg_scan(paramp);
|
||||
|
||||
#ifdef FEAT_SUN_WORKSHOP
|
||||
findYourself(params->argv[0]);
|
||||
findYourself(paramp->argv[0]);
|
||||
#endif
|
||||
#if defined(FEAT_GUI) && !defined(MAC_OS_CLASSIC)
|
||||
/* Prepare for possibly starting GUI sometime */
|
||||
gui_prepare(¶ms->argc, params->argv);
|
||||
gui_prepare(¶mp->argc, paramp->argv);
|
||||
TIME_MSG("GUI prepared");
|
||||
#endif
|
||||
|
||||
@@ -1029,7 +1036,7 @@ common_init(mparm_T *params)
|
||||
* (needed for :! to * work). mch_check_win() will also handle the -d or
|
||||
* -dev argument.
|
||||
*/
|
||||
params->stdout_isatty = (mch_check_win(params->argc, params->argv) != FAIL);
|
||||
paramp->stdout_isatty = (mch_check_win(paramp->argc, paramp->argv) != FAIL);
|
||||
TIME_MSG("window checked");
|
||||
|
||||
/*
|
||||
@@ -3023,8 +3030,6 @@ source_startup_scripts(mparm_T *parmp)
|
||||
if (use_gvimrc == NULL) /* don't load gvimrc either */
|
||||
use_gvimrc = parmp->use_vimrc;
|
||||
#endif
|
||||
if (parmp->use_vimrc[2] == 'N')
|
||||
p_lpl = FALSE; /* don't load plugins either */
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+112
-15
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
|
||||
#define MESSAGE_FILE /* don't include prototype for smsg() */
|
||||
#define USING_FLOAT_STUFF
|
||||
|
||||
#include "vim.h"
|
||||
|
||||
@@ -137,6 +138,11 @@ msg_attr_keep(
|
||||
int retval;
|
||||
char_u *buf = NULL;
|
||||
|
||||
/* Skip messages not matching ":filter pattern".
|
||||
* Don't filter when there is an error. */
|
||||
if (!emsg_on_display && message_filtered(s))
|
||||
return TRUE;
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
if (attr == 0)
|
||||
set_vim_var_string(VV_STATUSMSG, s, -1);
|
||||
@@ -2153,6 +2159,21 @@ msg_puts_display(
|
||||
msg_check();
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE when ":filter pattern" was used and "msg" does not match
|
||||
* "pattern".
|
||||
*/
|
||||
int
|
||||
message_filtered(char_u *msg)
|
||||
{
|
||||
int match;
|
||||
|
||||
if (cmdmod.filter_regmatch.regprog == NULL)
|
||||
return FALSE;
|
||||
match = vim_regexec(&cmdmod.filter_regmatch, msg, (colnr_T)0);
|
||||
return cmdmod.filter_force ? match : !match;
|
||||
}
|
||||
|
||||
/*
|
||||
* Scroll the screen up one line for displaying the next message line.
|
||||
*/
|
||||
@@ -3891,7 +3912,7 @@ do_browse(
|
||||
static char *e_printf = N_("E766: Insufficient arguments for printf()");
|
||||
|
||||
static varnumber_T tv_nr(typval_T *tvs, int *idxp);
|
||||
static char *tv_str(typval_T *tvs, int *idxp);
|
||||
static char *tv_str(typval_T *tvs, int *idxp, char_u **tofree);
|
||||
# ifdef FEAT_FLOAT
|
||||
static double tv_float(typval_T *tvs, int *idxp);
|
||||
# endif
|
||||
@@ -3920,20 +3941,28 @@ tv_nr(typval_T *tvs, int *idxp)
|
||||
|
||||
/*
|
||||
* Get string argument from "idxp" entry in "tvs". First entry is 1.
|
||||
* If "tofree" is NULL get_tv_string_chk() is used. Some types (e.g. List)
|
||||
* are not converted to a string.
|
||||
* If "tofree" is not NULL echo_string() is used. All types are converted to
|
||||
* a string with the same format as ":echo". The caller must free "*tofree".
|
||||
* Returns NULL for an error.
|
||||
*/
|
||||
static char *
|
||||
tv_str(typval_T *tvs, int *idxp)
|
||||
tv_str(typval_T *tvs, int *idxp, char_u **tofree)
|
||||
{
|
||||
int idx = *idxp - 1;
|
||||
char *s = NULL;
|
||||
int idx = *idxp - 1;
|
||||
char *s = NULL;
|
||||
static char_u numbuf[NUMBUFLEN];
|
||||
|
||||
if (tvs[idx].v_type == VAR_UNKNOWN)
|
||||
EMSG(_(e_printf));
|
||||
else
|
||||
{
|
||||
++*idxp;
|
||||
s = (char *)get_tv_string_chk(&tvs[idx]);
|
||||
if (tofree != NULL)
|
||||
s = (char *)echo_string(&tvs[idx], tofree, numbuf, get_copyID());
|
||||
else
|
||||
s = (char *)get_tv_string_chk(&tvs[idx]);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
@@ -4087,12 +4116,14 @@ vim_vsnprintf(
|
||||
char length_modifier = '\0';
|
||||
|
||||
/* temporary buffer for simple numeric->string conversion */
|
||||
# ifdef FEAT_FLOAT
|
||||
# if defined(FEAT_FLOAT)
|
||||
# define TMP_LEN 350 /* On my system 1e308 is the biggest number possible.
|
||||
* That sounds reasonable to use as the maximum
|
||||
* printable. */
|
||||
# elif defined(FEAT_NUM64)
|
||||
# define TMP_LEN 66
|
||||
# else
|
||||
# define TMP_LEN 32
|
||||
# define TMP_LEN 34
|
||||
# endif
|
||||
char tmp[TMP_LEN];
|
||||
|
||||
@@ -4117,6 +4148,10 @@ vim_vsnprintf(
|
||||
/* current conversion specifier character */
|
||||
char fmt_spec = '\0';
|
||||
|
||||
/* buffer for 's' and 'S' specs */
|
||||
char_u *tofree = NULL;
|
||||
|
||||
|
||||
str_arg = NULL;
|
||||
p++; /* skip '%' */
|
||||
|
||||
@@ -4280,7 +4315,7 @@ vim_vsnprintf(
|
||||
case 'S':
|
||||
str_arg =
|
||||
# if defined(FEAT_EVAL)
|
||||
tvs != NULL ? tv_str(tvs, &arg_idx) :
|
||||
tvs != NULL ? tv_str(tvs, &arg_idx, &tofree) :
|
||||
# endif
|
||||
va_arg(ap, char *);
|
||||
if (str_arg == NULL)
|
||||
@@ -4335,9 +4370,13 @@ vim_vsnprintf(
|
||||
}
|
||||
break;
|
||||
|
||||
case 'd': case 'u': case 'o': case 'x': case 'X': case 'p':
|
||||
case 'd': case 'u':
|
||||
case 'b': case 'B':
|
||||
case 'o':
|
||||
case 'x': case 'X':
|
||||
case 'p':
|
||||
{
|
||||
/* NOTE: the u, o, x, X and p conversion specifiers
|
||||
/* NOTE: the u, b, o, x, X and p conversion specifiers
|
||||
* imply the value is unsigned; d implies a signed
|
||||
* value */
|
||||
|
||||
@@ -4362,6 +4401,9 @@ vim_vsnprintf(
|
||||
uvarnumber_T ullong_arg = 0;
|
||||
# endif
|
||||
|
||||
/* only defined for b convertion */
|
||||
uvarnumber_T bin_arg = 0;
|
||||
|
||||
/* pointer argument value -only defined for p
|
||||
* conversion */
|
||||
void *ptr_arg = NULL;
|
||||
@@ -4371,12 +4413,24 @@ vim_vsnprintf(
|
||||
length_modifier = '\0';
|
||||
ptr_arg =
|
||||
# if defined(FEAT_EVAL)
|
||||
tvs != NULL ? (void *)tv_str(tvs, &arg_idx) :
|
||||
tvs != NULL ? (void *)tv_str(tvs, &arg_idx,
|
||||
NULL) :
|
||||
# endif
|
||||
va_arg(ap, void *);
|
||||
if (ptr_arg != NULL)
|
||||
arg_sign = 1;
|
||||
}
|
||||
else if (fmt_spec == 'b' || fmt_spec == 'B')
|
||||
{
|
||||
bin_arg =
|
||||
# if defined(FEAT_EVAL)
|
||||
tvs != NULL ?
|
||||
(uvarnumber_T)tv_nr(tvs, &arg_idx) :
|
||||
# endif
|
||||
va_arg(ap, uvarnumber_T);
|
||||
if (bin_arg != 0)
|
||||
arg_sign = 1;
|
||||
}
|
||||
else if (fmt_spec == 'd')
|
||||
{
|
||||
/* signed */
|
||||
@@ -4483,7 +4537,8 @@ vim_vsnprintf(
|
||||
else if (alternate_form)
|
||||
{
|
||||
if (arg_sign != 0
|
||||
&& (fmt_spec == 'x' || fmt_spec == 'X') )
|
||||
&& (fmt_spec == 'b' || fmt_spec == 'B'
|
||||
|| fmt_spec == 'x' || fmt_spec == 'X') )
|
||||
{
|
||||
tmp[str_arg_l++] = '0';
|
||||
tmp[str_arg_l++] = fmt_spec;
|
||||
@@ -4499,7 +4554,7 @@ vim_vsnprintf(
|
||||
{
|
||||
/* When zero value is formatted with an explicit
|
||||
* precision 0, the resulting formatted string is
|
||||
* empty (d, i, u, o, x, X, p). */
|
||||
* empty (d, i, u, b, B, o, x, X, p). */
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4532,6 +4587,22 @@ vim_vsnprintf(
|
||||
|
||||
if (fmt_spec == 'p')
|
||||
str_arg_l += sprintf(tmp + str_arg_l, f, ptr_arg);
|
||||
else if (fmt_spec == 'b' || fmt_spec == 'B')
|
||||
{
|
||||
char b[8 * sizeof(uvarnumber_T)];
|
||||
size_t b_l = 0;
|
||||
uvarnumber_T bn = bin_arg;
|
||||
|
||||
do
|
||||
{
|
||||
b[sizeof(b) - ++b_l] = '0' + (bn & 0x1);
|
||||
bn >>= 1;
|
||||
}
|
||||
while (bn != 0);
|
||||
|
||||
memcpy(tmp + str_arg_l, b + sizeof(b) - b_l, b_l);
|
||||
str_arg_l += b_l;
|
||||
}
|
||||
else if (fmt_spec == 'd')
|
||||
{
|
||||
/* signed */
|
||||
@@ -4635,6 +4706,7 @@ vim_vsnprintf(
|
||||
char format[40];
|
||||
int l;
|
||||
int remove_trailing_zeroes = FALSE;
|
||||
char *s;
|
||||
|
||||
f =
|
||||
# if defined(FEAT_EVAL)
|
||||
@@ -4664,8 +4736,16 @@ vim_vsnprintf(
|
||||
)
|
||||
{
|
||||
/* Avoid a buffer overflow */
|
||||
strcpy(tmp, "inf");
|
||||
str_arg_l = 3;
|
||||
if (f < 0)
|
||||
{
|
||||
strcpy(tmp, "-inf");
|
||||
str_arg_l = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(tmp, "inf");
|
||||
str_arg_l = 3;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4687,6 +4767,22 @@ vim_vsnprintf(
|
||||
format[l + 1] = NUL;
|
||||
str_arg_l = sprintf(tmp, format, f);
|
||||
|
||||
/* Be consistent: Change "1.#IND" to "nan" and
|
||||
* "1.#INF" to "inf". */
|
||||
s = *tmp == '-' ? tmp + 1 : tmp;
|
||||
if (STRNCMP(s, "1.#INF", 6) == 0)
|
||||
STRCPY(s, "inf");
|
||||
else if (STRNCMP(s, "1.#IND", 6) == 0)
|
||||
STRCPY(s, "nan");
|
||||
|
||||
/* Remove sign before "nan". */
|
||||
if (STRNCMP(tmp, "-nan", 4) == 0)
|
||||
STRCPY(tmp, "nan");
|
||||
|
||||
/* Add sign before "inf" if needed. */
|
||||
if (isinf(f) == -1 && STRNCMP(tmp, "inf", 3) == 0)
|
||||
STRCPY(tmp, "-inf");
|
||||
|
||||
if (remove_trailing_zeroes)
|
||||
{
|
||||
int i;
|
||||
@@ -4881,6 +4977,7 @@ vim_vsnprintf(
|
||||
str_l += pn;
|
||||
}
|
||||
}
|
||||
vim_free(tofree);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+28
-12
@@ -3416,7 +3416,7 @@ get_keystroke(void)
|
||||
if (n > 0)
|
||||
{
|
||||
/* Replace zero and CSI by a special key code. */
|
||||
n = fix_input_buffer(buf + len, n, FALSE);
|
||||
n = fix_input_buffer(buf + len, n);
|
||||
len += n;
|
||||
waited = 0;
|
||||
}
|
||||
@@ -10520,18 +10520,34 @@ uniquefy_paths(garray_T *gap, char_u *pattern)
|
||||
/* Shorten the filename while maintaining its uniqueness */
|
||||
path_cutoff = get_path_cutoff(path, &path_ga);
|
||||
|
||||
/* we start at the end of the path */
|
||||
pathsep_p = path + len - 1;
|
||||
/* Don't assume all files can be reached without path when search
|
||||
* pattern starts with star star slash, so only remove path_cutoff
|
||||
* when possible. */
|
||||
if (pattern[0] == '*' && pattern[1] == '*'
|
||||
&& vim_ispathsep_nocolon(pattern[2])
|
||||
&& path_cutoff != NULL
|
||||
&& vim_regexec(®match, path_cutoff, (colnr_T)0)
|
||||
&& is_unique(path_cutoff, gap, i))
|
||||
{
|
||||
sort_again = TRUE;
|
||||
mch_memmove(path, path_cutoff, STRLEN(path_cutoff) + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Here all files can be reached without path, so get shortest
|
||||
* unique path. We start at the end of the path. */
|
||||
pathsep_p = path + len - 1;
|
||||
|
||||
while (find_previous_pathsep(path, &pathsep_p))
|
||||
if (vim_regexec(®match, pathsep_p + 1, (colnr_T)0)
|
||||
&& is_unique(pathsep_p + 1, gap, i)
|
||||
&& path_cutoff != NULL && pathsep_p + 1 >= path_cutoff)
|
||||
{
|
||||
sort_again = TRUE;
|
||||
mch_memmove(path, pathsep_p + 1, STRLEN(pathsep_p));
|
||||
break;
|
||||
}
|
||||
while (find_previous_pathsep(path, &pathsep_p))
|
||||
if (vim_regexec(®match, pathsep_p + 1, (colnr_T)0)
|
||||
&& is_unique(pathsep_p + 1, gap, i)
|
||||
&& path_cutoff != NULL && pathsep_p + 1 >= path_cutoff)
|
||||
{
|
||||
sort_again = TRUE;
|
||||
mch_memmove(path, pathsep_p + 1, STRLEN(pathsep_p));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (mch_isFullName(path))
|
||||
{
|
||||
|
||||
+21
-13
@@ -2680,13 +2680,14 @@ get_special_key_name(int c, int modifiers)
|
||||
trans_special(
|
||||
char_u **srcp,
|
||||
char_u *dst,
|
||||
int keycode) /* prefer key code, e.g. K_DEL instead of DEL */
|
||||
int keycode, /* prefer key code, e.g. K_DEL instead of DEL */
|
||||
int in_string) /* TRUE when inside a double quoted string */
|
||||
{
|
||||
int modifiers = 0;
|
||||
int key;
|
||||
int dlen = 0;
|
||||
|
||||
key = find_special_key(srcp, &modifiers, keycode, FALSE);
|
||||
key = find_special_key(srcp, &modifiers, keycode, FALSE, in_string);
|
||||
if (key == 0)
|
||||
return 0;
|
||||
|
||||
@@ -2726,7 +2727,8 @@ find_special_key(
|
||||
char_u **srcp,
|
||||
int *modp,
|
||||
int keycode, /* prefer key code, e.g. K_DEL instead of DEL */
|
||||
int keep_x_key) /* don't translate xHome to Home key */
|
||||
int keep_x_key, /* don't translate xHome to Home key */
|
||||
int in_string) /* TRUE in string, double quote is escaped */
|
||||
{
|
||||
char_u *last_dash;
|
||||
char_u *end_of_name;
|
||||
@@ -2757,10 +2759,14 @@ find_special_key(
|
||||
else
|
||||
#endif
|
||||
l = 1;
|
||||
/* Anything accepted, like <C-?>, except <C-">, because the "
|
||||
* ends the string. */
|
||||
if (bp[l] != '"' && bp[l + 1] == '>')
|
||||
/* Anything accepted, like <C-?>.
|
||||
* <C-"> or <M-"> are not special in strings as " is
|
||||
* the string delimiter. With a backslash it works: <M-\"> */
|
||||
if (!(in_string && bp[1] == '"') && bp[2] == '>')
|
||||
bp += l;
|
||||
else if (in_string && bp[1] == '\\' && bp[2] == '"'
|
||||
&& bp[3] == '>')
|
||||
bp += 2;
|
||||
}
|
||||
}
|
||||
if (bp[0] == 't' && bp[1] == '_' && bp[2] && bp[3])
|
||||
@@ -2804,20 +2810,22 @@ find_special_key(
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Modifier with single letter, or special key name.
|
||||
*/
|
||||
int off = 1;
|
||||
|
||||
/* Modifier with single letter, or special key name. */
|
||||
if (in_string && last_dash[1] == '\\' && last_dash[2] == '"')
|
||||
off = 2;
|
||||
#ifdef FEAT_MBYTE
|
||||
if (has_mbyte)
|
||||
l = mb_ptr2len(last_dash + 1);
|
||||
l = mb_ptr2len(last_dash + off);
|
||||
else
|
||||
#endif
|
||||
l = 1;
|
||||
if (modifiers != 0 && last_dash[l + 1] == '>')
|
||||
key = PTR2CHAR(last_dash + 1);
|
||||
if (modifiers != 0 && last_dash[l + off] == '>')
|
||||
key = PTR2CHAR(last_dash + off);
|
||||
else
|
||||
{
|
||||
key = get_special_key_code(last_dash + 1);
|
||||
key = get_special_key_code(last_dash + off);
|
||||
if (!keep_x_key)
|
||||
key = handle_x_keys(key);
|
||||
}
|
||||
|
||||
+1
-6
@@ -919,12 +919,7 @@ win_col_off(win_T *wp)
|
||||
+ wp->w_p_fdc
|
||||
#endif
|
||||
#ifdef FEAT_SIGNS
|
||||
+ (
|
||||
# ifdef FEAT_NETBEANS_INTG
|
||||
/* show glyph gutter in netbeans */
|
||||
wp->w_buffer->b_has_sign_column ||
|
||||
# endif
|
||||
wp->w_buffer->b_signlist != NULL ? 2 : 0)
|
||||
+ (signcolumn_on(wp) ? 2 : 0)
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6283,7 +6283,7 @@ write_viminfo_registers(FILE *fp)
|
||||
* 'permanent' of the two), otherwise the PRIMARY one.
|
||||
* For now, use a hard-coded sanity limit of 1Mb of data.
|
||||
*/
|
||||
#if defined(FEAT_X11) && defined(FEAT_CLIPBOARD)
|
||||
#if (defined(FEAT_X11) && defined(FEAT_CLIPBOARD)) || defined(PROTO)
|
||||
void
|
||||
x11_export_final_selection(void)
|
||||
{
|
||||
|
||||
+132
-16
@@ -256,6 +256,9 @@
|
||||
# define PV_COCU OPT_WIN(WV_COCU)
|
||||
# define PV_COLE OPT_WIN(WV_COLE)
|
||||
#endif
|
||||
#ifdef FEAT_SIGNS
|
||||
# define PV_SCL OPT_WIN(WV_SCL)
|
||||
#endif
|
||||
|
||||
/* WV_ and BV_ values get typecasted to this for the "indir" field */
|
||||
typedef enum
|
||||
@@ -474,7 +477,7 @@ struct vimoption
|
||||
#if defined(FEAT_DIFF) || defined(FEAT_FOLDING) || defined(FEAT_SPELL) \
|
||||
|| defined(FEAT_WINDOWS) || defined(FEAT_CLIPBOARD) \
|
||||
|| defined(FEAT_INS_EXPAND) || defined(FEAT_SYN_HL) || defined(FEAT_CONCEAL)
|
||||
# define HIGHLIGHT_INIT "8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,N:CursorLineNr,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,-:Conceal,B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel,x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine,o:ColorColumn"
|
||||
# define HIGHLIGHT_INIT "8:SpecialKey,~:EndOfBuffer,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,N:CursorLineNr,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,-:Conceal,B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel,x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine,o:ColorColumn"
|
||||
#else
|
||||
# define HIGHLIGHT_INIT "8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,N:CursorLineNr,r:Question,s:StatusLine,S:StatusLineNC,t:Title,v:Visual,w:WarningMsg,W:WildMenu,>:SignColumn,*:TabLine,#:TabLineSel,_:TabLineFill"
|
||||
#endif
|
||||
@@ -1736,6 +1739,13 @@ static struct vimoption options[] =
|
||||
(char_u *)&p_lnr, PV_NONE,
|
||||
#else
|
||||
(char_u *)NULL, PV_NONE,
|
||||
#endif
|
||||
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
|
||||
{"langremap", "lrm", P_BOOL|P_VI_DEF,
|
||||
#ifdef FEAT_LANGMAP
|
||||
(char_u *)&p_lrm, PV_NONE,
|
||||
#else
|
||||
(char_u *)NULL, PV_NONE,
|
||||
#endif
|
||||
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
|
||||
{"laststatus", "ls", P_NUM|P_VI_DEF|P_RALL,
|
||||
@@ -2458,6 +2468,15 @@ static struct vimoption options[] =
|
||||
{"sidescrolloff", "siso", P_NUM|P_VI_DEF|P_VIM|P_RBUF,
|
||||
(char_u *)&p_siso, PV_NONE,
|
||||
{(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
|
||||
{"signcolumn", "scl", P_STRING|P_ALLOCED|P_VI_DEF|P_RWIN,
|
||||
#ifdef FEAT_SIGNS
|
||||
(char_u *)VAR_WIN, PV_SCL,
|
||||
{(char_u *)"auto", (char_u *)0L}
|
||||
#else
|
||||
(char_u *)NULL, PV_NONE,
|
||||
{(char_u *)NULL, (char_u *)0L}
|
||||
#endif
|
||||
SCRIPTID_INIT},
|
||||
{"slowopen", "slow", P_BOOL|P_VI_DEF,
|
||||
(char_u *)NULL, PV_NONE,
|
||||
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
|
||||
@@ -3131,6 +3150,9 @@ static char *(p_fcl_values[]) = {"all", NULL};
|
||||
#ifdef FEAT_INS_EXPAND
|
||||
static char *(p_cot_values[]) = {"menu", "menuone", "longest", "preview", "noinsert", "noselect", NULL};
|
||||
#endif
|
||||
#ifdef FEAT_SIGNS
|
||||
static char *(p_scl_values[]) = {"yes", "no", "auto", NULL};
|
||||
#endif
|
||||
|
||||
static void set_option_default(int, int opt_flags, int compatible);
|
||||
static void set_options_default(int opt_flags);
|
||||
@@ -3333,16 +3355,6 @@ set_init_1(void)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef FEAT_GUI_W32
|
||||
/* force 'shortname' for Win32s */
|
||||
if (gui_is_win32s())
|
||||
{
|
||||
opt_idx = findoption((char_u *)"shortname");
|
||||
if (opt_idx >= 0)
|
||||
options[opt_idx].def_val[VI_DEFAULT] = (char_u *)TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_SEARCHPATH
|
||||
{
|
||||
char_u *cdpath;
|
||||
@@ -4995,12 +5007,30 @@ do_set(
|
||||
{
|
||||
/* Remove flags that appear twice. */
|
||||
for (s = newval; *s; ++s)
|
||||
if ((!(flags & P_COMMA) || *s != ',')
|
||||
&& vim_strchr(s + 1, *s) != NULL)
|
||||
{
|
||||
/* if options have P_FLAGLIST and
|
||||
* P_ONECOMMA such as 'whichwrap' */
|
||||
if (flags & P_ONECOMMA)
|
||||
{
|
||||
STRMOVE(s, s + 1);
|
||||
--s;
|
||||
if (*s != ',' && *(s + 1) == ','
|
||||
&& vim_strchr(s + 2, *s) != NULL)
|
||||
{
|
||||
/* Remove the duplicated value and
|
||||
* the next comma. */
|
||||
STRMOVE(s, s + 2);
|
||||
s -= 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((!(flags & P_COMMA) || *s != ',')
|
||||
&& vim_strchr(s + 1, *s) != NULL)
|
||||
{
|
||||
STRMOVE(s, s + 1);
|
||||
--s;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (save_arg != NULL) /* number for 'whichwrap' */
|
||||
@@ -7045,6 +7075,15 @@ did_set_string_option(
|
||||
}
|
||||
#endif /* FEAT_INS_EXPAND */
|
||||
|
||||
#ifdef FEAT_SIGNS
|
||||
/* 'signcolumn' */
|
||||
else if (varp == &curwin->w_p_scl)
|
||||
{
|
||||
if (check_opt_strings(*varp, p_scl_values, FALSE) != OK)
|
||||
errmsg = e_invarg;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32)
|
||||
else if (varp == &p_toolbar)
|
||||
@@ -7947,6 +7986,15 @@ set_bool_option(
|
||||
compatible_set();
|
||||
}
|
||||
|
||||
#ifdef FEAT_LANGMAP
|
||||
if ((int *)varp == &p_lrm)
|
||||
/* 'langremap' -> !'langnoremap' */
|
||||
p_lnr = !p_lrm;
|
||||
else if ((int *)varp == &p_lnr)
|
||||
/* 'langnoremap' -> !'langremap' */
|
||||
p_lrm = !p_lnr;
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_PERSISTENT_UNDO
|
||||
/* 'undofile' */
|
||||
else if ((int *)varp == &curbuf->b_p_udf || (int *)varp == &p_udf)
|
||||
@@ -9602,7 +9650,7 @@ find_key_option(char_u *arg)
|
||||
{
|
||||
--arg; /* put arg at the '<' */
|
||||
modifiers = 0;
|
||||
key = find_special_key(&arg, &modifiers, TRUE, TRUE);
|
||||
key = find_special_key(&arg, &modifiers, TRUE, TRUE, FALSE);
|
||||
if (modifiers) /* can't handle modifiers here */
|
||||
key = 0;
|
||||
}
|
||||
@@ -10583,6 +10631,9 @@ get_varp(struct vimoption *p)
|
||||
case PV_WM: return (char_u *)&(curbuf->b_p_wm);
|
||||
#ifdef FEAT_KEYMAP
|
||||
case PV_KMAP: return (char_u *)&(curbuf->b_p_keymap);
|
||||
#endif
|
||||
#ifdef FEAT_SIGNS
|
||||
case PV_SCL: return (char_u *)&(curwin->w_p_scl);
|
||||
#endif
|
||||
default: EMSG(_("E356: get_varp ERROR"));
|
||||
}
|
||||
@@ -10699,6 +10750,9 @@ copy_winopt(winopt_T *from, winopt_T *to)
|
||||
to->wo_fdt = vim_strsave(from->wo_fdt);
|
||||
# endif
|
||||
to->wo_fmr = vim_strsave(from->wo_fmr);
|
||||
#endif
|
||||
#ifdef FEAT_SIGNS
|
||||
to->wo_scl = vim_strsave(from->wo_scl);
|
||||
#endif
|
||||
check_winopt(to); /* don't want NULL pointers */
|
||||
}
|
||||
@@ -10729,6 +10783,9 @@ check_winopt(winopt_T *wop UNUSED)
|
||||
# endif
|
||||
check_string_option(&wop->wo_fmr);
|
||||
#endif
|
||||
#ifdef FEAT_SIGNS
|
||||
check_string_option(&wop->wo_scl);
|
||||
#endif
|
||||
#ifdef FEAT_RIGHTLEFT
|
||||
check_string_option(&wop->wo_rlc);
|
||||
#endif
|
||||
@@ -10762,6 +10819,9 @@ clear_winopt(winopt_T *wop UNUSED)
|
||||
# endif
|
||||
clear_string_option(&wop->wo_fmr);
|
||||
#endif
|
||||
#ifdef FEAT_SIGNS
|
||||
clear_string_option(&wop->wo_scl);
|
||||
#endif
|
||||
#ifdef FEAT_LINEBREAK
|
||||
clear_string_option(&wop->wo_briopt);
|
||||
#endif
|
||||
@@ -12520,3 +12580,59 @@ get_bkc_value(buf_T *buf)
|
||||
{
|
||||
return buf->b_bkc_flags ? buf->b_bkc_flags : bkc_flags;
|
||||
}
|
||||
|
||||
#if defined(FEAT_SIGNS) || defined(PROTO)
|
||||
/*
|
||||
* Return TRUE when window "wp" has a column to draw signs in.
|
||||
*/
|
||||
int
|
||||
signcolumn_on(win_T *wp)
|
||||
{
|
||||
if (*wp->w_p_scl == 'n')
|
||||
return FALSE;
|
||||
if (*wp->w_p_scl == 'y')
|
||||
return TRUE;
|
||||
return (wp->w_buffer->b_signlist != NULL
|
||||
# ifdef FEAT_NETBEANS_INTG
|
||||
|| wp->w_buffer->b_has_sign_column
|
||||
# endif
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_EVAL) || defined(PROTO)
|
||||
/*
|
||||
* Get window or buffer local options.
|
||||
*/
|
||||
dict_T *
|
||||
get_winbuf_options(int bufopt)
|
||||
{
|
||||
dict_T *d;
|
||||
int opt_idx;
|
||||
|
||||
d = dict_alloc();
|
||||
if (d == NULL)
|
||||
return NULL;
|
||||
|
||||
for (opt_idx = 0; !istermoption(&options[opt_idx]); opt_idx++)
|
||||
{
|
||||
struct vimoption *opt = &options[opt_idx];
|
||||
|
||||
if ((bufopt && (opt->indir & PV_BUF))
|
||||
|| (!bufopt && (opt->indir & PV_WIN)))
|
||||
{
|
||||
char_u *varp = get_varp(opt);
|
||||
|
||||
if (varp != NULL)
|
||||
{
|
||||
if (opt->flags & P_STRING)
|
||||
dict_add_nr_str(d, opt->fullname, 0L, *(char_u **)varp);
|
||||
else
|
||||
dict_add_nr_str(d, opt->fullname, *varp, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
||||
#endif
|
||||
|
||||
+10
-1
@@ -616,6 +616,7 @@ EXTERN char_u *p_km; /* 'keymodel' */
|
||||
#ifdef FEAT_LANGMAP
|
||||
EXTERN char_u *p_langmap; /* 'langmap'*/
|
||||
EXTERN int p_lnr; /* 'langnoremap' */
|
||||
EXTERN int p_lrm; /* 'langremap' */
|
||||
#endif
|
||||
#if defined(FEAT_MENU) && defined(FEAT_MULTI_LANG)
|
||||
EXTERN char_u *p_lm; /* 'langmenu' */
|
||||
@@ -648,6 +649,9 @@ EXTERN int p_magic; /* 'magic' */
|
||||
EXTERN char_u *p_mef; /* 'makeef' */
|
||||
EXTERN char_u *p_mp; /* 'makeprg' */
|
||||
#endif
|
||||
#ifdef FEAT_SIGNS
|
||||
EXTERN char_u *p_scl; /* signcolumn */
|
||||
#endif
|
||||
#ifdef FEAT_SYN_HL
|
||||
EXTERN char_u *p_cc; /* 'colorcolumn' */
|
||||
EXTERN int p_cc_cols[256]; /* array for 'colorcolumn' columns */
|
||||
@@ -834,11 +838,13 @@ EXTERN int p_tbs; /* 'tagbsearch' */
|
||||
EXTERN char_u *p_tc; /* 'tagcase' */
|
||||
EXTERN unsigned tc_flags; /* flags from 'tagcase' */
|
||||
#ifdef IN_OPTION_C
|
||||
static char *(p_tc_values[]) = {"followic", "ignore", "match", NULL};
|
||||
static char *(p_tc_values[]) = {"followic", "ignore", "match", "followscs", "smart", NULL};
|
||||
#endif
|
||||
#define TC_FOLLOWIC 0x01
|
||||
#define TC_IGNORE 0x02
|
||||
#define TC_MATCH 0x04
|
||||
#define TC_FOLLOWSCS 0x08
|
||||
#define TC_SMART 0x10
|
||||
EXTERN long p_tl; /* 'taglength' */
|
||||
EXTERN int p_tr; /* 'tagrelative' */
|
||||
EXTERN char_u *p_tags; /* 'tags' */
|
||||
@@ -1195,6 +1201,9 @@ enum
|
||||
, WV_WFW
|
||||
#endif
|
||||
, WV_WRAP
|
||||
#ifdef FEAT_SIGNS
|
||||
, WV_SCL
|
||||
#endif
|
||||
, WV_COUNT /* must be the last one */
|
||||
};
|
||||
|
||||
|
||||
+6
-2
@@ -2261,7 +2261,11 @@ vim_is_xterm(char_u *name)
|
||||
use_xterm_like_mouse(char_u *name)
|
||||
{
|
||||
return (name != NULL
|
||||
&& (term_is_xterm || STRNICMP(name, "screen", 6) == 0));
|
||||
&& (term_is_xterm
|
||||
|| STRNICMP(name, "screen", 6) == 0
|
||||
|| STRICMP(name, "st") == 0
|
||||
|| STRNICMP(name, "st-", 3) == 0
|
||||
|| STRNICMP(name, "stterm", 6) == 0));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -4820,7 +4824,7 @@ mch_call_shell(
|
||||
* round. */
|
||||
for (p = buffer; p < buffer + len; p += l)
|
||||
{
|
||||
l = mb_cptr2len(p);
|
||||
l = MB_CPTR2LEN(p);
|
||||
if (l == 0)
|
||||
l = 1; /* NUL byte? */
|
||||
else if (MB_BYTE2LEN(*p) != l)
|
||||
|
||||
+2
-3
@@ -2062,7 +2062,6 @@ mch_init(void)
|
||||
Columns = 80;
|
||||
|
||||
/* Look for 'vimrun' */
|
||||
if (!gui_is_win32s())
|
||||
{
|
||||
char_u vimrun_location[_MAX_PATH + 4];
|
||||
|
||||
@@ -4142,7 +4141,7 @@ mch_system_classic(char *cmd, int options)
|
||||
* Win32s either as it stops the synchronous spawn workaround working.
|
||||
* Don't activate the window to keep focus on Vim.
|
||||
*/
|
||||
if ((options & SHELL_DOOUT) && !mch_windows95() && !gui_is_win32s())
|
||||
if ((options & SHELL_DOOUT) && !mch_windows95())
|
||||
si.wShowWindow = SW_SHOWMINNOACTIVE;
|
||||
else
|
||||
si.wShowWindow = SW_SHOWNORMAL;
|
||||
@@ -4370,7 +4369,7 @@ dump_pipe(int options,
|
||||
* round. */
|
||||
for (p = buffer; p < buffer + len; p += l)
|
||||
{
|
||||
l = mb_cptr2len(p);
|
||||
l = MB_CPTR2LEN(p);
|
||||
if (l == 0)
|
||||
l = 1; /* NUL byte? */
|
||||
else if (MB_BYTE2LEN(*p) != l)
|
||||
|
||||
+55
-21
@@ -30,36 +30,66 @@ func! GetMline()
|
||||
return substitute(idline, '[^%]*\(%[-+ #''.0-9*]*l\=[dsuxXpoc%]\)\=', '\1', 'g')
|
||||
endfunc
|
||||
|
||||
" This only works when 'wrapscan' is set.
|
||||
" This only works when 'wrapscan' is not set.
|
||||
let s:save_wrapscan = &wrapscan
|
||||
set wrapscan
|
||||
set nowrapscan
|
||||
|
||||
" Start at the first "msgid" line.
|
||||
1
|
||||
/^msgid
|
||||
let startline = line('.')
|
||||
/^msgid\>
|
||||
|
||||
" When an error is detected this is set to the line number.
|
||||
" Note: this is used in the Makefile.
|
||||
let error = 0
|
||||
|
||||
while 1
|
||||
if getline(line('.') - 1) !~ "no-c-format"
|
||||
let fromline = GetMline()
|
||||
" go over the "msgid" and "msgid_plural" lines
|
||||
let prevfromline = 'foobar'
|
||||
while 1
|
||||
let fromline = GetMline()
|
||||
if prevfromline != 'foobar' && prevfromline != fromline
|
||||
echomsg 'Mismatching % in line ' . (line('.') - 1)
|
||||
echomsg 'msgid: ' . prevfromline
|
||||
echomsg 'msgid ' . fromline
|
||||
if error == 0
|
||||
let error = line('.')
|
||||
endif
|
||||
endif
|
||||
if getline('.') !~ 'msgid_plural'
|
||||
break
|
||||
endif
|
||||
let prevfromline = fromline
|
||||
endwhile
|
||||
|
||||
if getline('.') !~ '^msgstr'
|
||||
echo 'Missing "msgstr" in line ' . line('.')
|
||||
let error = 1
|
||||
endif
|
||||
let toline = GetMline()
|
||||
if fromline != toline
|
||||
echo 'Mismatching % in line ' . (line('.') - 1)
|
||||
echo 'msgid: ' . fromline
|
||||
echo 'msgstr: ' . toline
|
||||
let error = 1
|
||||
echomsg 'Missing "msgstr" in line ' . line('.')
|
||||
if error == 0
|
||||
let error = line('.')
|
||||
endif
|
||||
endif
|
||||
|
||||
" check all the 'msgstr' lines
|
||||
while getline('.') =~ '^msgstr'
|
||||
let toline = GetMline()
|
||||
if fromline != toline
|
||||
echomsg 'Mismatching % in line ' . (line('.') - 1)
|
||||
echomsg 'msgid: ' . fromline
|
||||
echomsg 'msgstr: ' . toline
|
||||
if error == 0
|
||||
let error = line('.')
|
||||
endif
|
||||
endif
|
||||
if line('.') == line('$')
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
endif
|
||||
|
||||
" Find next msgid.
|
||||
" Wrap around at the end of the file, quit when back at the first one.
|
||||
/^msgid
|
||||
if line('.') == startline
|
||||
" Find next msgid. Quit when there is no more.
|
||||
let lnum = line('.')
|
||||
silent! /^msgid\>
|
||||
if line('.') == lnum
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
@@ -74,12 +104,16 @@ endwhile
|
||||
"
|
||||
1
|
||||
if search('msgid "\("\n"\)\?\([EW][0-9]\+:\).*\nmsgstr "\("\n"\)\?[^"]\@=\2\@!') > 0
|
||||
echo 'Mismatching error/warning code in line ' . line('.')
|
||||
let error = 1
|
||||
echomsg 'Mismatching error/warning code in line ' . line('.')
|
||||
if error == 0
|
||||
let error = line('.')
|
||||
endif
|
||||
endif
|
||||
|
||||
if error == 0
|
||||
echo "OK"
|
||||
echomsg "OK"
|
||||
else
|
||||
exe error
|
||||
endif
|
||||
|
||||
let &wrapscan = s:save_wrapscan
|
||||
|
||||
+471
-390
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user