mirror of
https://github.com/vim/vim
synced 2025-07-15 16:51:57 +00:00
Update runtime files.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.0. Last change: 2017 Apr 29
|
||||
*eval.txt* For Vim version 8.0. Last change: 2017 May 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -10692,12 +10692,6 @@ When the |+eval| feature is available the command is skipped because of the
|
||||
"while 0". Without the |+eval| feature the "while 0" is an error, which is
|
||||
silently ignored, and the command is executed.
|
||||
|
||||
The "<CR>" here is a real CR character, type CTRL-V Enter to get it.
|
||||
|
||||
When the |+eval| feature is available the ":" is remapped to add a double
|
||||
quote, which has the effect of commenting-out the command. Without the
|
||||
|+eval| feature the nnoremap command is skipped and the command is executed.
|
||||
|
||||
==============================================================================
|
||||
11. The sandbox *eval-sandbox* *sandbox* *E48*
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.0. Last change: 2017 Mar 22
|
||||
*options.txt* For Vim version 8.0. Last change: 2017 May 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -862,6 +862,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
< Vim will guess the value. In the GUI this should work correctly,
|
||||
in other cases Vim might not be able to guess the right value.
|
||||
|
||||
When the t_BG option is set, Vim will use it to request the background
|
||||
color from the terminal. If the returned RGB value is dark/light and
|
||||
'background' is not dark/light, 'background' will be set and the
|
||||
screen is redrawn. This may have side effects, make t_BG empty in
|
||||
your .vimrc if you suspect this problem.
|
||||
|
||||
When starting the GUI, the default value for 'background' will be
|
||||
"light". When the value is not set in the .gvimrc, and Vim detects
|
||||
that the background is actually quite dark, 'background' is set to
|
||||
@ -2700,7 +2706,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Makes the 'g' and 'c' flags of the ":substitute" command to be
|
||||
toggled each time the flag is given. See |complex-change|. See
|
||||
also 'gdefault' option.
|
||||
Switching this option on is discouraged!
|
||||
Switching this option on may break plugins!
|
||||
|
||||
*'emoji'* *'emo'* *'noemoji'* *'noemo'*
|
||||
'emoji' 'emo' boolean (default: on)
|
||||
|
@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.0. Last change: 2017 Apr 28
|
||||
*todo.txt* For Vim version 8.0. Last change: 2017 May 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -35,13 +35,9 @@ entered there will not be repeated below, unless there is extra information.
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Remove the Farsi code?
|
||||
|
||||
+channel:
|
||||
- job_stop() should not always close the channel, e.g. for "int".
|
||||
(Martin Gammelsæter, 2017 Apr 11, #1632)
|
||||
Only assume killed on "kill".
|
||||
Check job->jv_status not to be JOB_ENDED.
|
||||
- When redrawing for the channel buffer, command line completion is cleared.
|
||||
(Ramel Eshed, 2017 May 4)
|
||||
- Try out background make plugin:
|
||||
https://github.com/AndrewVos/vim-make-background
|
||||
- Problem with stderr on Windows? (Vincent Rischmann, 2016 Aug 31, #1026)
|
||||
@ -110,13 +106,102 @@ Regexp problems:
|
||||
had_endbrace[] is set but not initialized or used.
|
||||
- Difference between two engines: ".*\zs\/\@>\/" on text "///"
|
||||
(Chris Paul, 2016 Nov 13) New engine not greedy enough?
|
||||
Another one: echom matchstr(" sdfsfsf\n sfdsdfsdf",'[^\n]*')
|
||||
(2017 May 15, #1252)
|
||||
|
||||
With foldmethod=syntax and nofoldenable comment highlighting isn't removed.
|
||||
(Marcin Szewczyk, 2017 Apr 26)
|
||||
|
||||
Patch for Murphy filetype detection. (Matthew Fernandez, 2017 May 17)
|
||||
|
||||
ZoomWin plugin ratings went down a lot. Bot problem? (Charles Campbell, 2017
|
||||
May 18)
|
||||
|
||||
ml_get errors with buggy script. (Dominique, 2017 Apr 30)
|
||||
|
||||
Error in emsg with buggy script. (Dominique, 2017 Apr 30)
|
||||
|
||||
Patch to update 'runtimepath' earlier. (Ingo Karkat, 2017 May 5, #1680)
|
||||
|
||||
Patch to make float2nr() more accurate. (Hirohito Higashi, 2017 May 7, #1688)
|
||||
|
||||
Patch to make :hardcopy handle spaces correctly. (Christian Brabandt, 2017 May
|
||||
7, #1682)
|
||||
|
||||
Add options_default() / options_restore() to set several options to Vim
|
||||
defaults for a plugin. Comments from Zyx, 2017 May 10.
|
||||
Perhaps use a vimcontext / endvimcontext command block.
|
||||
|
||||
Patch to recognize 'bg' detection. (Lemonboy, 2017 May 18, #1710)
|
||||
|
||||
Patch to recognize 1.0 as a whole as a float. (Yasuhiro Matsumoto, 2017 May
|
||||
11)
|
||||
|
||||
Problem with three-piece comment. (Michael Lee, 2017 May 11, #1696)
|
||||
|
||||
When checking if a bufref is valid, also check the buffer number, to catch the
|
||||
case of :bwipe followed by :new.
|
||||
|
||||
Files for Latvian language. (Vitolins, 2017 May 3, #1675)
|
||||
|
||||
Adding a filetype in a "start" package is not picked up as expected.
|
||||
(comment by Ingo Karkat, #1679)
|
||||
Patch for a fix, Ingo Karkat, #1693.
|
||||
|
||||
Patch to fix character class detection in NFA engine.
|
||||
(James McCoy, 2017 May 12, update May 24, #1703)
|
||||
|
||||
Setting 'clipboard' to "unnamed" makes a global command very slow (Daniel
|
||||
Drucker, 2017 May 8).
|
||||
This was supposed to be fixed, did it break again somehow?
|
||||
Christian cannot reproduce it.
|
||||
|
||||
Better TeX indent file. (Christian Brabandt, 2017 May 3)
|
||||
|
||||
Openhab syntax file (mueller, #1678)
|
||||
|
||||
Followup patch for 8.0.0590 for "context" in locations. (Yegappan, 2017 May 4)
|
||||
|
||||
Use gvimext.dll from the nightly build? (Issue #249)
|
||||
|
||||
Patch to remove HAVE_GTK_MULTIHEAD-relevant code. (Kazunobu Kuriyama, 2017 May
|
||||
5) Update May 11
|
||||
|
||||
Problem with using :cd when remotely editing a file. (Gerd Wachsmuth, 2017 May
|
||||
8, #1690)
|
||||
|
||||
'equalalways' only works for one column. (Glacambre, 2017 May 15, #1707)
|
||||
|
||||
Include solarized color scheme?
|
||||
|
||||
Updates to GTK help. (Kazunobu Kuriyama, 2017 May 4)
|
||||
|
||||
Running test_gui and test_gui_init with Motif sometimes kills the window
|
||||
manager. Problem with Motif?
|
||||
|
||||
Bogus characters inserted when triggering indent while changing text.
|
||||
(Vitor Antunes, 2016 Nov 22, #1269)
|
||||
|
||||
Patch to have ":stag" respect 'switchbuf'. (Ingo Karkat, 2017 May 5, #1681)
|
||||
|
||||
Wrong selection of quoted text (Guraga, #1687)
|
||||
Patch to fix selection of quoted text. (Christian Brabandt, 2017 May 7, #1687)
|
||||
|
||||
Patch to use separate error message for regex range. (Itchyny, Ken Hamada,
|
||||
2017 May 16)
|
||||
|
||||
Segmentation fault with complete(). (Lifepillar, 2017 Apr 29, #1668)
|
||||
Check for "pat" to be NULL in search_for_exact_line()?
|
||||
How did it get NULL? Comment by Christian, Apr 30.
|
||||
|
||||
Is it possible to keep the complete menu open when calling complete()?
|
||||
(Prabir Shrestha, 2017 May 19, #1713)
|
||||
|
||||
Calling may_req_ambiguous_char_width() and may_req_bg_color() only after
|
||||
executing command line commands may not work properly.
|
||||
Set "starting" to 0 earlier, and move the may_req calls above exe_commands()?
|
||||
(Rastislav Barlink, 2017 May 18)
|
||||
|
||||
Memory leak in test97? The string is actually freed. Weird.
|
||||
|
||||
Patch for shellescape(). (Christian Brabandt, 2017 Apr 20, #1590)
|
||||
@ -127,6 +212,26 @@ New value "uselast" for 'switchbuf'. (Lemonboy, 2017 Apr 23, #1652)
|
||||
|
||||
Add a toolbar in the terminal. Can be global, above all windows, or specific
|
||||
for one window.
|
||||
|
||||
Make maparg() also return the raw rhs, so that it doesn't depend on 'cpo'.
|
||||
(Brett Stahlman, 2017 May 23)
|
||||
Even better: add a way to disable a mapping temporarily and re-enable it
|
||||
later. This is for a sub-mode that is active for a short while (one buffer).
|
||||
Still need maplist() to find the mappings. What can we use to identify a
|
||||
mapping? Something unique would be better than the LHS.
|
||||
|
||||
Patch to support chinese wordcount in utf-8. (Rain, 2017 May 24, #1722)
|
||||
Or not?
|
||||
|
||||
"gn" selects one character instead of the searched text. (keyboardfire, #1683)
|
||||
Patch by Christian, 2017 May 7.
|
||||
|
||||
Wrong memory access using p_fdm, found in patch to add tests for diff mode
|
||||
(#1658) (Dominique Pelle, 2017 May 6)
|
||||
|
||||
Patch to improve test coverage for diff mode. (Dominique Pelle, 2017 May 11,
|
||||
#1685)
|
||||
|
||||
Use tb_set(winid, [{'text': 'stop', 'cb': callback, 'hi': 'Green'}])
|
||||
tb_highlight(winid, 'ToolBar')
|
||||
tb_get(winid)
|
||||
@ -194,6 +299,10 @@ writefile() does not abort as soon as an error is found. (Nikolai Pavlov,
|
||||
Patch to support on-the-spot and over-the-spot input method. (Ken Takata, 2017
|
||||
Feb 14).
|
||||
|
||||
Change the Farsi code to work with UTF-8. Possibly combined with the Arabic
|
||||
support, or similar.
|
||||
Invalid read error in Farsi mode. (Dominique Pelle, 2009 Aug 2)
|
||||
|
||||
Add a command to take a range of lines, filter them and put the output
|
||||
somewhere else. :{range}copy {dest} !cmd
|
||||
|
||||
@ -369,15 +478,9 @@ Autocommands blocked in do_arg_all(). Supposed to happen later?
|
||||
|
||||
'hlsearch' interferes with a Conceal match. (Rom Grk, 2016 Aug 9)
|
||||
|
||||
Patch to add context information to quickfix/location list. (Yegappan
|
||||
Lakshmanan, 2016 Aug 25, #1012)
|
||||
|
||||
MS-Windows: use WS_HIDE instead of SW_SHOWMINNOACTIVE in os_win32.c?
|
||||
Otherwise task flickers in taskbar.
|
||||
|
||||
Bogus characters inserted when triggering indent while changing test.
|
||||
(Vitor Antunes, 2016 Nov 22, #1269)
|
||||
|
||||
Should make ":@r" handle line continuation. (Cesar Romani, 2016 Jun 26)
|
||||
Also for ":@.".
|
||||
|
||||
@ -444,6 +547,8 @@ No test, needs some work to include.
|
||||
Patch to improve indenting for C++ constructor with initializer list.
|
||||
(Hirohito Higashi, 2016 Mar 31)
|
||||
|
||||
Zero-out krypt key information when no longer in use. (Ben Fritz, 2017 May 15)
|
||||
|
||||
Add stronger encryption. Could use libsodium (NaCl).
|
||||
https://github.com/jedisct1/libsodium/
|
||||
Possibly include the needed code so that it can be build everywhere.
|
||||
@ -1519,8 +1624,6 @@ When a:base in 'completefunc' starts with a number it's passed as a number,
|
||||
not a string. (Sean Ma) Need to add flag to call_func_retlist() to force a
|
||||
string value.
|
||||
|
||||
Invalid read error in Farsi mode. (Dominique Pelle, 2009 Aug 2)
|
||||
|
||||
For running gvim on a USB stick: avoid the OLE registration. Use a command
|
||||
line argument -noregister.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*usr_44.txt* For Vim version 8.0. Last change: 2008 Dec 28
|
||||
*usr_44.txt* For Vim version 8.0. Last change: 2017 May 06
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@ -686,7 +686,7 @@ that included files do this too, you might have to reset "b:current_syntax" if
|
||||
you include two files.
|
||||
|
||||
If you want your syntax file to work with Vim 5.x, add a check for v:version.
|
||||
See yacc.vim for an example.
|
||||
Find an syntax file in the Vim 7.2 distribution for an example.
|
||||
|
||||
Do not include anything that is a user preference. Don't set 'tabstop',
|
||||
'expandtab', etc. These belong in a filetype plugin.
|
||||
|
@ -15117,7 +15117,7 @@ Files: src/option.c
|
||||
|
||||
Patch 8.0.0101
|
||||
Problem: Some options are not strictly checked.
|
||||
Solution: Add flags for strickter checks.
|
||||
Solution: Add flags for stricter checks.
|
||||
Files: src/option.c
|
||||
|
||||
Patch 8.0.0102 (after 8.0.0101)
|
||||
@ -15766,7 +15766,7 @@ Solution: Change #ifdef around ins_char_bytes.
|
||||
Files: src/misc1.c
|
||||
|
||||
Patch 8.0.0212
|
||||
Problem: The buffer used to store a key name theoreticaly could be too
|
||||
Problem: The buffer used to store a key name theoretically could be too
|
||||
small. (Coverity)
|
||||
Solution: Count all possible modifier characters. Add a check for the
|
||||
length just in case.
|
||||
@ -15834,7 +15834,7 @@ Files: src/ops.c, src/testdir/test_put.vim, src/Makefile,
|
||||
|
||||
Patch 8.0.0223
|
||||
Problem: Coverity gets confused by the flags passed to find_tags() and
|
||||
warnts for an uninitialized variable.
|
||||
warns about uninitialized variable.
|
||||
Solution: Disallow using cscope and help tags at the same time.
|
||||
Files: src/tag.c
|
||||
|
||||
@ -15955,7 +15955,7 @@ Files: src/testdir/test_usercommands.vim
|
||||
|
||||
Patch 8.0.0243
|
||||
Problem: When making a character lower case with tolower() changes the byte
|
||||
cound, it is not made lower case.
|
||||
count, it is not made lower case.
|
||||
Solution: Add strlow_save(). (Dominique Pelle, closes #1406)
|
||||
Files: src/evalfunc.c, src/misc2.c, src/proto/misc2.pro,
|
||||
src/testdir/test_functions.vim
|
||||
@ -16032,9 +16032,9 @@ Files: src/Makefile, src/charset.c, src/kword_test.c, src/mbyte.c,
|
||||
src/proto/mbyte.pro
|
||||
|
||||
Patch 8.0.0253
|
||||
Problem: When creating a session when winminheight is 2 or larger and
|
||||
Problem: When creating a session when 'winminheight' is 2 or larger and
|
||||
loading that session gives an error.
|
||||
Solution: Also set winminheight before setting winheight to 1. (Rafael
|
||||
Solution: Also set 'winminheight' before setting 'winheight' to 1. (Rafael
|
||||
Bodill, neovim #5717)
|
||||
Files: src/ex_docmd.c, src/testdir/test_mksession.vim
|
||||
|
||||
@ -16541,7 +16541,7 @@ Solution: For quoted text objects bail out if the Visual area spans more
|
||||
Files: src/search.c, src/testdir/test_visual.vim
|
||||
|
||||
Patch 8.0.0340
|
||||
Problem: Not checking return valud of dict_add(). (Coverity)
|
||||
Problem: Not checking return value of dict_add(). (Coverity)
|
||||
Solution: Handle a failure.
|
||||
Files: src/buffer.c
|
||||
|
||||
@ -16612,12 +16612,12 @@ Files: src/testdir/test_expr.vim
|
||||
Patch 8.0.0352
|
||||
Problem: The condition for when a typval needs to be cleared is too
|
||||
complicated.
|
||||
Solution: Init the type to VAR_UNKNOWN and clear it always.
|
||||
Solution: Init the type to VAR_UNKNOWN and always clear it.
|
||||
Files: src/eval.c
|
||||
|
||||
Patch 8.0.0353
|
||||
Problem: If [RO] in the status line is translated to a longer string, it is
|
||||
trunctted to 4 bytes.
|
||||
truncated to 4 bytes.
|
||||
Solution: Skip over the resulting string. (Jente Hidskes, closes #1499)
|
||||
Files: src/screen.c
|
||||
|
||||
@ -17294,7 +17294,7 @@ Files: src/misc2.c
|
||||
|
||||
Patch 8.0.0461 (after 8.0.0457)
|
||||
Problem: Test 45 hangs on MS-Windows.
|
||||
Solution: Reset 'shiftwidth'. Also remove redundent function.
|
||||
Solution: Reset 'shiftwidth'. Also remove redundant function.
|
||||
Files: src/fold.c, src/testdir/test45.in
|
||||
|
||||
Patch 8.0.0462
|
||||
@ -17597,7 +17597,7 @@ Solution: Remove duplicate https:.
|
||||
Files: README.md
|
||||
|
||||
Patch 8.0.0511
|
||||
Problem: Menuage for skipping client-server tests is unclear.
|
||||
Problem: Message for skipping client-server tests is unclear.
|
||||
Solution: Be more specific about what's missing (Hirohito Higashi, Kazunobu
|
||||
Kuriyama)
|
||||
Files: src/testdir/test_quotestar.vim, src/testdir/test_clientserver.vim
|
||||
@ -17688,7 +17688,7 @@ Solution: Include the whole character.
|
||||
Files: src/search.c, src/testdir/test_normal.vim
|
||||
|
||||
Patch 8.0.0524 (after 8.0.0518)
|
||||
Problem: Folds are messed up when 'encodin' is "utf-8".
|
||||
Problem: Folds are messed up when 'encoding' is "utf-8".
|
||||
Solution: Also set the fold character when it's not multi-byte.
|
||||
Files: src/screen.c, src/testdir/test_display.vim
|
||||
|
||||
@ -17882,7 +17882,7 @@ Solution: Add a test. (Dominique Pelle, closes #1622)
|
||||
Files: src/testdir/test_syntax.vim
|
||||
|
||||
Patch 8.0.0559
|
||||
Problem: Setting ttytype to xxx does not always fail as expected. (Marvin
|
||||
Problem: Setting 'ttytype' to xxx does not always fail as expected. (Marvin
|
||||
Schmidt)
|
||||
Solution: Catch both possible errors. (closes #1601)
|
||||
Files: src/testdir/test_options.vim
|
||||
@ -17919,7 +17919,7 @@ Solution: Set qf_last to NULL.
|
||||
Files: src/quickfix.c
|
||||
|
||||
Patch 8.0.0566
|
||||
Problem: Setting nocompatible for the tiny version moves the cursor.
|
||||
Problem: Setting 'nocompatible' for the tiny version moves the cursor.
|
||||
Solution: Use another trick to skip commands when the +eval feature is
|
||||
present. (Christian Brabandt, closes #1630)
|
||||
Files: runtime/defaults.vim
|
||||
@ -17938,7 +17938,7 @@ Files: src/testdir/test_goto.vim, src/normal.c
|
||||
Patch 8.0.0569
|
||||
Problem: Bracketed paste is still enabled when executing a shell command.
|
||||
(Michael Smith)
|
||||
Solution: Disable brackted paste when going into cooked mode. (closes #1638)
|
||||
Solution: Disable bracketed paste when going into cooked mode. (closes #1638)
|
||||
Files: src/term.c
|
||||
|
||||
Patch 8.0.0570
|
||||
@ -17978,7 +17978,7 @@ Solution: Make a copy of 'indentexpr'.
|
||||
Files: src/misc1.c, src/testdir/test_options.vim
|
||||
|
||||
Patch 8.0.0576 (after 8.0.0570 and 8.0.0573)
|
||||
Problem: Can't build when configure choses "install-sh". (Daniel Hahler)
|
||||
Problem: Can't build when configure chooses "install-sh". (Daniel Hahler)
|
||||
Solution: Always use install-sh. Fix remaining use of mkinstalldirs.
|
||||
(closes #1647)
|
||||
Files: src/installman.sh, src/installml.sh, src/config.mk.in,
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2017 Apr 20
|
||||
" Last Change: 2017 May 27
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@ -981,7 +981,7 @@ au BufNewFile,BufRead */etc/initng/*/*.i,*.ii setf initng
|
||||
|
||||
" Innovation Data Processing
|
||||
au BufRead,BufNewFile upstream.dat\c,upstream.*.dat\c,*.upstream.dat\c setf upstreamdat
|
||||
au BufRead,BufNewFile upstream.log\c,upstream.*.log\c,*.upstream.log\c setf upstreamlog
|
||||
au BufRead,BufNewFile fdrupstream.log,upstream.log\c,upstream.*.log\c,*.upstream.log\c,UPSTREAM-*.log\c setf upstreamlog
|
||||
au BufRead,BufNewFile upstreaminstall.log\c,upstreaminstall.*.log\c,*.upstreaminstall.log\c setf upstreaminstalllog
|
||||
au BufRead,BufNewFile usserver.log\c,usserver.*.log\c,*.usserver.log\c setf usserverlog
|
||||
au BufRead,BufNewFile usw2kagt.log\c,usw2kagt.*.log\c,*.usw2kagt.log\c setf usw2kagtlog
|
||||
@ -1419,7 +1419,7 @@ if has("fname_case")
|
||||
else
|
||||
au BufNewFile,BufRead *.pl call s:FTpl()
|
||||
endif
|
||||
au BufNewFile,BufRead *.plx,*.al setf perl
|
||||
au BufNewFile,BufRead *.plx,*.al,*.psgi setf perl
|
||||
au BufNewFile,BufRead *.p6,*.pm6,*.pl6 setf perl6
|
||||
|
||||
func! s:FTpl()
|
||||
@ -1807,6 +1807,9 @@ au BufNewFile,BufRead *.sa setf sather
|
||||
" Scala
|
||||
au BufNewFile,BufRead *.scala setf scala
|
||||
|
||||
" SBT - Scala Build Tool
|
||||
au BufNewFile,BufRead *.sbt setf sbt
|
||||
|
||||
" Scilab
|
||||
au BufNewFile,BufRead *.sci,*.sce setf scilab
|
||||
|
||||
|
15
runtime/ftplugin/sbt.vim
Normal file
15
runtime/ftplugin/sbt.vim
Normal file
@ -0,0 +1,15 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: sbt
|
||||
" Maintainer: Steven Dobay <stevendobay at protonmail.com>
|
||||
" License: Same as Vim
|
||||
" Last Change: 2017.04.30
|
||||
" ----------------------------------------------------------------------------
|
||||
|
||||
if exists('b:did_ftplugin') || &cp
|
||||
finish
|
||||
endif
|
||||
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
runtime! ftplugin/scala.vim
|
||||
|
@ -3,10 +3,12 @@
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Previous Maintainer: Peter Aronoff <telemachus@arpinum.org>
|
||||
" Original Author: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2016-06-27
|
||||
" Latest Revision: 2017-05-02
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-sh-indent
|
||||
" Changelog:
|
||||
" 20170502: - get rid of buffer-shiftwidth function
|
||||
" 20160912: - preserve indentation of here-doc blocks
|
||||
" 20160627: - detect heredocs correctly
|
||||
" 20160213: - detect function definition correctly
|
||||
" 20160202: - use shiftwidth() function
|
||||
@ -33,15 +35,11 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function s:buffer_shiftwidth()
|
||||
return shiftwidth()
|
||||
endfunction
|
||||
|
||||
let s:sh_indent_defaults = {
|
||||
\ 'default': function('s:buffer_shiftwidth'),
|
||||
\ 'continuation-line': function('s:buffer_shiftwidth'),
|
||||
\ 'case-labels': function('s:buffer_shiftwidth'),
|
||||
\ 'case-statements': function('s:buffer_shiftwidth'),
|
||||
\ 'default': function('shiftwidth'),
|
||||
\ 'continuation-line': function('shiftwidth'),
|
||||
\ 'case-labels': function('shiftwidth'),
|
||||
\ 'case-statements': function('shiftwidth'),
|
||||
\ 'case-breaks': 0 }
|
||||
|
||||
function! s:indent_value(option)
|
||||
@ -110,6 +108,9 @@ function! GetShIndent()
|
||||
let ind -= s:indent_value('case-breaks')
|
||||
elseif s:is_here_doc(line)
|
||||
let ind = 0
|
||||
" statements, executed within a here document. Keep the current indent
|
||||
elseif match(map(synstack(v:lnum, 1), 'synIDattr(v:val, "name")'), '\c\mheredoc') > -1
|
||||
return indent(v:lnum)
|
||||
endif
|
||||
|
||||
return ind
|
||||
|
@ -1,8 +1,8 @@
|
||||
" Vim indent file
|
||||
" Language: LaTeX
|
||||
" Maintainer: YiChao Zhou <broken.zhou AT gmail.com>
|
||||
" Maintainer: Yichao Zhou <broken.zhou AT gmail.com>
|
||||
" Created: Sat, 16 Feb 2002 16:50:19 +0100
|
||||
" Version: 0.9.2
|
||||
" Version: 0.9.4
|
||||
" Please email me if you found something I can do. Comments, bug report and
|
||||
" feature request are welcome.
|
||||
|
||||
@ -15,49 +15,53 @@
|
||||
" 2005/06/15, Moshe Kaminsky <kaminsky AT math.huji.ac.il>
|
||||
" (*) New variables:
|
||||
" g:tex_items, g:tex_itemize_env, g:tex_noindent_env
|
||||
" 2011/3/6, by Zhou YiChao <broken.zhou AT gmail.com>
|
||||
" 2011/3/6, by Yichao Zhou <broken.zhou AT gmail.com>
|
||||
" (*) Don't change indentation of lines starting with '%'
|
||||
" I don't see any code with '%' and it doesn't work properly
|
||||
" so I add some code.
|
||||
" (*) New features: Add smartindent-like indent for "{}" and "[]".
|
||||
" (*) New variables: g:tex_indent_brace
|
||||
" 2011/9/25, by Zhou Yichao <broken.zhou AT gmail.com>
|
||||
" 2011/9/25, by Yichao Zhou <broken.zhou AT gmail.com>
|
||||
" (*) Bug fix: smartindent-like indent for "[]"
|
||||
" (*) New features: Align with "&".
|
||||
" (*) New variable: g:tex_indent_and.
|
||||
" 2011/10/23 by Zhou Yichao <broken.zhou AT gmail.com>
|
||||
" 2011/10/23 by Yichao Zhou <broken.zhou AT gmail.com>
|
||||
" (*) Bug fix: improve the smartindent-like indent for "{}" and
|
||||
" "[]".
|
||||
" 2012/02/27 by Zhou Yichao <broken.zhou AT gmail.com>
|
||||
" 2012/02/27 by Yichao Zhou <broken.zhou AT gmail.com>
|
||||
" (*) Bug fix: support default folding marker.
|
||||
" (*) Indent with "&" is not very handy. Make it not enable by
|
||||
" default.
|
||||
" 2012/03/06 by Zhou Yichao <broken.zhou AT gmail.com>
|
||||
" 2012/03/06 by Yichao Zhou <broken.zhou AT gmail.com>
|
||||
" (*) Modify "&" behavior and make it default again. Now "&"
|
||||
" won't align when there are more then one "&" in the previous
|
||||
" line.
|
||||
" (*) Add indent "\left(" and "\right)"
|
||||
" (*) Trust user when in "verbatim" and "lstlisting"
|
||||
" 2012/03/11 by Zhou Yichao <broken.zhou AT gmail.com>
|
||||
" 2012/03/11 by Yichao Zhou <broken.zhou AT gmail.com>
|
||||
" (*) Modify "&" so that only indent when current line start with
|
||||
" "&".
|
||||
" 2012/03/12 by Zhou Yichao <broken.zhou AT gmail.com>
|
||||
" 2012/03/12 by Yichao Zhou <broken.zhou AT gmail.com>
|
||||
" (*) Modify indentkeys.
|
||||
" 2012/03/18 by Zhou Yichao <broken.zhou AT gmail.com>
|
||||
" 2012/03/18 by Yichao Zhou <broken.zhou AT gmail.com>
|
||||
" (*) Add &cpo
|
||||
" 2013/05/02 by Zhou Yichao <broken.zhou AT gmail.com>
|
||||
" 2013/05/02 by Yichao Zhou <broken.zhou AT gmail.com>
|
||||
" (*) Fix problem about GetTeXIndent checker. Thank Albert Netymk
|
||||
" for reporting this.
|
||||
" 2014/06/23 by Zhou Yichao <broken.zhou AT gmail.com>
|
||||
" 2014/06/23 by Yichao Zhou <broken.zhou AT gmail.com>
|
||||
" (*) Remove the feature g:tex_indent_and because it is buggy.
|
||||
" (*) If there is not any obvious indentation hints, we do not
|
||||
" alert our user's current indentation.
|
||||
" (*) g:tex_indent_brace now only works if the open brace is the
|
||||
" last character of that line.
|
||||
" 2014/08/03 by Zhou Yichao <broken.zhou AT gmail.com>
|
||||
" 2014/08/03 by Yichao Zhou <broken.zhou AT gmail.com>
|
||||
" (*) Indent current line if last line has larger indentation
|
||||
" 2014/08/09 by Zhou Yichao <broken.zhou AT gmail.com>
|
||||
" (*) Add missing return value for s:GetEndIndentation(...)
|
||||
" 2016/11/08 by Yichao Zhou <broken.zhou AT gmail.com>
|
||||
" (*) Fix problems for \[ and \]. Thanks Bruno for reporting.
|
||||
" 2017/04/30 by Yichao Zhou <broken.zhou AT gmail.com>
|
||||
" (*) Fix a bug between g:tex_noindent_env and g:tex_indent_items
|
||||
" Now g:tex_noindent_env='document\|verbatim\|itemize' (Emacs
|
||||
" style) is supported. Thanks Miles Wheeler for reporting.
|
||||
"
|
||||
" }}}
|
||||
|
||||
@ -81,44 +85,44 @@
|
||||
" % Example 2
|
||||
" \tikzexternalize[
|
||||
" prefix=tikz]
|
||||
"
|
||||
"
|
||||
" * g:tex_indent_items
|
||||
"
|
||||
" If this variable is set, item-environments are indented like Emacs does
|
||||
" it, i.e., continuation lines are indented with a shiftwidth.
|
||||
"
|
||||
"
|
||||
" NOTE: I've already set the variable below; delete the corresponding line
|
||||
" if you don't like this behaviour.
|
||||
"
|
||||
" Per default, it is unset.
|
||||
"
|
||||
"
|
||||
" set unset
|
||||
" ----------------------------------------------------------------
|
||||
" \begin{itemize} \begin{itemize}
|
||||
" \begin{itemize} \begin{itemize}
|
||||
" \item blablabla \item blablabla
|
||||
" bla bla bla bla bla bla
|
||||
" bla bla bla bla bla bla
|
||||
" \item blablabla \item blablabla
|
||||
" bla bla bla bla bla bla
|
||||
" \end{itemize} \end{itemize}
|
||||
" bla bla bla bla bla bla
|
||||
" \end{itemize} \end{itemize}
|
||||
"
|
||||
"
|
||||
" * g:tex_items
|
||||
"
|
||||
" A list of tokens to be considered as commands for the beginning of an item
|
||||
" command. The tokens should be separated with '\|'. The initial '\' should
|
||||
" A list of tokens to be considered as commands for the beginning of an item
|
||||
" command. The tokens should be separated with '\|'. The initial '\' should
|
||||
" be escaped. The default is '\\bibitem\|\\item'.
|
||||
"
|
||||
" * g:tex_itemize_env
|
||||
"
|
||||
" A list of environment names, separated with '\|', where the items (item
|
||||
" commands matching g:tex_items) may appear. The default is
|
||||
"
|
||||
" A list of environment names, separated with '\|', where the items (item
|
||||
" commands matching g:tex_items) may appear. The default is
|
||||
" 'itemize\|description\|enumerate\|thebibliography'.
|
||||
"
|
||||
" * g:tex_noindent_env
|
||||
"
|
||||
" A list of environment names. separated with '\|', where no indentation is
|
||||
" A list of environment names. separated with '\|', where no indentation is
|
||||
" required. The default is 'document\|verbatim'.
|
||||
" }}}
|
||||
" }}}
|
||||
|
||||
" Only define the function once
|
||||
if exists("b:did_indent")
|
||||
@ -146,7 +150,7 @@ if g:tex_indent_items
|
||||
let g:tex_itemize_env = 'itemize\|description\|enumerate\|thebibliography'
|
||||
endif
|
||||
if !exists('g:tex_items')
|
||||
let g:tex_items = '\\bibitem\|\\item'
|
||||
let g:tex_items = '\\bibitem\|\\item'
|
||||
endif
|
||||
else
|
||||
let g:tex_items = ''
|
||||
@ -177,7 +181,7 @@ function! GetTeXIndent() " {{{
|
||||
|
||||
" At the start of the file use zero indent.
|
||||
if lnum == 0
|
||||
return 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let line = substitute(getline(lnum), '\s*%.*', '','g') " last line
|
||||
@ -191,9 +195,9 @@ function! GetTeXIndent() " {{{
|
||||
return indent(v:lnum)
|
||||
end
|
||||
endif
|
||||
|
||||
|
||||
if lnum == 0
|
||||
return 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ind = indent(lnum)
|
||||
@ -206,12 +210,14 @@ function! GetTeXIndent() " {{{
|
||||
|
||||
" Add a 'shiftwidth' after beginning of environments.
|
||||
" Don't add it for \begin{document} and \begin{verbatim}
|
||||
""if line =~ '^\s*\\begin{\(.*\)}' && line !~ 'verbatim'
|
||||
" if line =~ '^\s*\\begin{\(.*\)}' && line !~ 'verbatim'
|
||||
" LH modification : \begin does not always start a line
|
||||
" ZYC modification : \end after \begin won't cause wrong indent anymore
|
||||
if line =~ '\\begin{.*}' && line !~ g:tex_noindent_env
|
||||
let ind = ind + &sw
|
||||
let stay = 0
|
||||
if line =~ '\\begin{.*}'
|
||||
if line !~ g:tex_noindent_env
|
||||
let ind = ind + &sw
|
||||
let stay = 0
|
||||
endif
|
||||
|
||||
if g:tex_indent_items
|
||||
" Add another sw for item-environments
|
||||
@ -245,29 +251,27 @@ function! GetTeXIndent() " {{{
|
||||
endif
|
||||
|
||||
if g:tex_indent_brace
|
||||
let char = line[strlen(line)-1]
|
||||
if char == '[' || char == '{'
|
||||
if line =~ '[[{]$'
|
||||
let ind += &sw
|
||||
let stay = 0
|
||||
endif
|
||||
|
||||
let cind = indent(v:lnum)
|
||||
let char = cline[cind]
|
||||
if (char == ']' || char == '}') &&
|
||||
\ s:CheckPairedIsLastCharacter(v:lnum, cind)
|
||||
if cline =~ '^\s*\\\?[\]}]' && s:CheckPairedIsLastCharacter(v:lnum, indent(v:lnum))
|
||||
let ind -= &sw
|
||||
let stay = 0
|
||||
endif
|
||||
|
||||
for i in range(indent(lnum)+1, strlen(line)-1)
|
||||
let char = line[i]
|
||||
if char == ']' || char == '}'
|
||||
if s:CheckPairedIsLastCharacter(lnum, i)
|
||||
let ind -= &sw
|
||||
let stay = 0
|
||||
if line !~ '^\s*\\\?[\]}]'
|
||||
for i in range(indent(lnum)+1, strlen(line)-1)
|
||||
let char = line[i]
|
||||
if char == ']' || char == '}'
|
||||
if s:CheckPairedIsLastCharacter(lnum, i)
|
||||
let ind -= &sw
|
||||
let stay = 0
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
endfor
|
||||
endif
|
||||
endif
|
||||
|
||||
" Special treatment for 'item'
|
||||
@ -309,12 +313,12 @@ function! s:GetLastBeginIndentation(lnum) " {{{
|
||||
let matchend -= 1
|
||||
endif
|
||||
if matchend == 0
|
||||
if line =~ g:tex_itemize_env
|
||||
return indent(lnum) + 2 * &sw
|
||||
endif
|
||||
if line =~ g:tex_noindent_env
|
||||
return indent(lnum)
|
||||
endif
|
||||
if line =~ g:tex_itemize_env
|
||||
return indent(lnum) + 2 * &sw
|
||||
endif
|
||||
return indent(lnum) + &sw
|
||||
endif
|
||||
endfor
|
||||
@ -348,12 +352,15 @@ endfunction
|
||||
|
||||
" Most of the code is from matchparen.vim
|
||||
function! s:CheckPairedIsLastCharacter(lnum, col) "{{{
|
||||
" Get the character under the cursor and check if it's in 'matchpairs'.
|
||||
let c_lnum = a:lnum
|
||||
let c_col = a:col+1
|
||||
|
||||
let line = getline(c_lnum)
|
||||
if line[c_col-1] == '\'
|
||||
let c_col = c_col + 1
|
||||
endif
|
||||
let c = line[c_col-1]
|
||||
|
||||
let c = getline(c_lnum)[c_col-1]
|
||||
let plist = split(&matchpairs, '.\zs[:,]')
|
||||
let i = index(plist, c)
|
||||
if i < 0
|
||||
|
@ -4,7 +4,7 @@ For instructions on installing this file, type
|
||||
:help matchit-install
|
||||
inside Vim.
|
||||
|
||||
For Vim version 6.3. Last change: 2016 Mar 28
|
||||
For Vim version 6.3. Last change: 2017 May 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Benji Fisher
|
||||
@ -242,7 +242,7 @@ Examples:
|
||||
In LaTeX, since "%" is used as the comment character, you can >
|
||||
:let b:match_skip = 'r:%'
|
||||
< Unfortunately, this will skip anything after "\%", an escaped "%". To
|
||||
allow for this, and also "\\%" (an excaped backslash followed by the
|
||||
allow for this, and also "\\%" (an escaped backslash followed by the
|
||||
comment character) you can >
|
||||
:let b:match_skip = 'r:\(^\|[^\\]\)\(\\\\\)*%'
|
||||
<
|
||||
@ -392,7 +392,8 @@ a while. Moral: if a bug (known or not) bothers you, let me know.
|
||||
The various |:vmap|s defined in the script (%, |g%|, |[%|, |]%|, |a%|) may
|
||||
have undesired effects in Select mode |Select-mode-mapping|. At least, if you
|
||||
want to replace the selection with any character in "ag%[]" there will be a
|
||||
pause of |'updatetime'| first.
|
||||
pause of |'updatetime'| first. E.g., "yV%" would normally work linewise, but
|
||||
the plugin mapping makes it characterwise.
|
||||
|
||||
It would be nice if "\0" were recognized as the entire pattern. That is, it
|
||||
would be nice if "foo:\end\0" had the same effect as "\(foo\):\end\1". I may
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2016 Nov 18
|
||||
" Last Change: 2017 Apr 30
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@ -311,44 +311,32 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
|
||||
syn keyword cConstant PTRDIFF_MIN PTRDIFF_MAX SIG_ATOMIC_MIN SIG_ATOMIC_MAX
|
||||
syn keyword cConstant SIZE_MAX WCHAR_MIN WCHAR_MAX WINT_MIN WINT_MAX
|
||||
endif
|
||||
syn keyword cConstant FLT_RADIX FLT_ROUNDS
|
||||
syn keyword cConstant FLT_DIG FLT_MANT_DIG FLT_EPSILON
|
||||
syn keyword cConstant DBL_DIG DBL_MANT_DIG DBL_EPSILON
|
||||
syn keyword cConstant LDBL_DIG LDBL_MANT_DIG LDBL_EPSILON
|
||||
syn keyword cConstant FLT_MIN FLT_MAX FLT_MIN_EXP FLT_MAX_EXP
|
||||
syn keyword cConstant FLT_MIN_10_EXP FLT_MAX_10_EXP
|
||||
syn keyword cConstant DBL_MIN DBL_MAX DBL_MIN_EXP DBL_MAX_EXP
|
||||
syn keyword cConstant DBL_MIN_10_EXP DBL_MAX_10_EXP
|
||||
syn keyword cConstant LDBL_MIN LDBL_MAX LDBL_MIN_EXP LDBL_MAX_EXP
|
||||
syn keyword cConstant LDBL_MIN_10_EXP LDBL_MAX_10_EXP
|
||||
syn keyword cConstant HUGE_VAL CLOCKS_PER_SEC NULL
|
||||
syn keyword cConstant LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY
|
||||
syn keyword cConstant LC_NUMERIC LC_TIME
|
||||
syn keyword cConstant SIG_DFL SIG_ERR SIG_IGN
|
||||
syn keyword cConstant SIGABRT SIGFPE SIGILL SIGHUP SIGINT SIGSEGV SIGTERM
|
||||
syn keyword cConstant FLT_RADIX FLT_ROUNDS FLT_DIG FLT_MANT_DIG FLT_EPSILON DBL_DIG DBL_MANT_DIG DBL_EPSILON
|
||||
syn keyword cConstant LDBL_DIG LDBL_MANT_DIG LDBL_EPSILON FLT_MIN FLT_MAX FLT_MIN_EXP FLT_MAX_EXP FLT_MIN_10_EXP FLT_MAX_10_EXP
|
||||
syn keyword cConstant DBL_MIN DBL_MAX DBL_MIN_EXP DBL_MAX_EXP DBL_MIN_10_EXP DBL_MAX_10_EXP LDBL_MIN LDBL_MAX LDBL_MIN_EXP LDBL_MAX_EXP
|
||||
syn keyword cConstant LDBL_MIN_10_EXP LDBL_MAX_10_EXP HUGE_VAL CLOCKS_PER_SEC NULL LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY
|
||||
syn keyword cConstant LC_NUMERIC LC_TIME SIG_DFL SIG_ERR SIG_IGN SIGABRT SIGFPE SIGILL SIGHUP SIGINT SIGSEGV SIGTERM
|
||||
" Add POSIX signals as well...
|
||||
syn keyword cConstant SIGABRT SIGALRM SIGCHLD SIGCONT SIGFPE SIGHUP
|
||||
syn keyword cConstant SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT SIGSEGV
|
||||
syn keyword cConstant SIGSTOP SIGTERM SIGTRAP SIGTSTP SIGTTIN SIGTTOU
|
||||
syn keyword cConstant SIGUSR1 SIGUSR2
|
||||
syn keyword cConstant _IOFBF _IOLBF _IONBF BUFSIZ EOF WEOF
|
||||
syn keyword cConstant FOPEN_MAX FILENAME_MAX L_tmpnam
|
||||
syn keyword cConstant SEEK_CUR SEEK_END SEEK_SET
|
||||
syn keyword cConstant TMP_MAX stderr stdin stdout
|
||||
syn keyword cConstant EXIT_FAILURE EXIT_SUCCESS RAND_MAX
|
||||
syn keyword cConstant SIGABRT SIGALRM SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT SIGSEGV
|
||||
syn keyword cConstant SIGSTOP SIGTERM SIGTRAP SIGTSTP SIGTTIN SIGTTOU SIGUSR1 SIGUSR2
|
||||
syn keyword cConstant _IOFBF _IOLBF _IONBF BUFSIZ EOF WEOF FOPEN_MAX FILENAME_MAX L_tmpnam
|
||||
syn keyword cConstant SEEK_CUR SEEK_END SEEK_SET TMP_MAX stderr stdin stdout EXIT_FAILURE EXIT_SUCCESS RAND_MAX
|
||||
" POSIX 2001
|
||||
syn keyword cConstant SIGBUS SIGPOLL SIGPROF SIGSYS SIGURG
|
||||
syn keyword cConstant SIGVTALRM SIGXCPU SIGXFSZ
|
||||
syn keyword cConstant SIGBUS SIGPOLL SIGPROF SIGSYS SIGURG SIGVTALRM SIGXCPU SIGXFSZ
|
||||
" non-POSIX signals
|
||||
syn keyword cConstant SIGWINCH SIGINFO
|
||||
" Add POSIX errors as well
|
||||
syn keyword cConstant E2BIG EACCES EAGAIN EBADF EBADMSG EBUSY
|
||||
syn keyword cConstant ECANCELED ECHILD EDEADLK EDOM EEXIST EFAULT
|
||||
syn keyword cConstant EFBIG EILSEQ EINPROGRESS EINTR EINVAL EIO EISDIR
|
||||
syn keyword cConstant EMFILE EMLINK EMSGSIZE ENAMETOOLONG ENFILE ENODEV
|
||||
syn keyword cConstant ENOENT ENOEXEC ENOLCK ENOMEM ENOSPC ENOSYS
|
||||
syn keyword cConstant ENOTDIR ENOTEMPTY ENOTSUP ENOTTY ENXIO EPERM
|
||||
syn keyword cConstant EPIPE ERANGE EROFS ESPIPE ESRCH ETIMEDOUT EXDEV
|
||||
" Add POSIX errors as well. List comes from:
|
||||
" http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html
|
||||
syn keyword cConstant E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY EBADF
|
||||
syn keyword cConstant EBADMSG EBUSY ECANCELED ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK
|
||||
syn keyword cConstant EDESTADDRREQ EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTUNREACH EIDRM EILSEQ
|
||||
syn keyword cConstant EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK EMSGSIZE
|
||||
syn keyword cConstant EMULTIHOP ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS ENODATA
|
||||
syn keyword cConstant ENODEV ENOENT ENOEXEC ENOLCK ENOLINK ENOMEM ENOMSG ENOPROTOOPT ENOSPC ENOSR
|
||||
syn keyword cConstant ENOSTR ENOSYS ENOTCONN ENOTDIR ENOTEMPTY ENOTRECOVERABLE ENOTSOCK ENOTSUP
|
||||
syn keyword cConstant ENOTTY ENXIO EOPNOTSUPP EOVERFLOW EOWNERDEAD EPERM EPIPE EPROTO
|
||||
syn keyword cConstant EPROTONOSUPPORT EPROTOTYPE ERANGE EROFS ESPIPE ESRCH ESTALE ETIME ETIMEDOUT
|
||||
syn keyword cConstant ETXTBSY EWOULDBLOCK EXDEV
|
||||
" math.h
|
||||
syn keyword cConstant M_E M_LOG2E M_LOG10E M_LN2 M_LN10 M_PI M_PI_2 M_PI_4
|
||||
syn keyword cConstant M_1_PI M_2_PI M_2_SQRTPI M_SQRT2 M_SQRT1_2
|
||||
|
32
runtime/syntax/sbt.vim
Normal file
32
runtime/syntax/sbt.vim
Normal file
@ -0,0 +1,32 @@
|
||||
" Vim syntax file
|
||||
" Language: sbt
|
||||
" Maintainer: Steven Dobay <stevendobay at protonmail.com>
|
||||
" Last Change: 2017.04.30
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
runtime! syntax/scala.vim
|
||||
|
||||
syn region sbtString start="\"[^"]" skip="\\\"" end="\"" contains=sbtStringEscape
|
||||
syn match sbtStringEscape "\\u[0-9a-fA-F]\{4}" contained
|
||||
syn match sbtStringEscape "\\[nrfvb\\\"]" contained
|
||||
|
||||
syn match sbtIdentitifer "^\S\+\ze\s*\(:=\|++=\|+=\|<<=\|<+=\)"
|
||||
syn match sbtBeginningSeq "^[Ss]eq\>"
|
||||
|
||||
syn match sbtSpecial "\(:=\|++=\|+=\|<<=\|<+=\)"
|
||||
|
||||
syn match sbtLineComment "//.*"
|
||||
syn region sbtComment start="/\*" end="\*/"
|
||||
syn region sbtDocComment start="/\*\*" end="\*/" keepend
|
||||
|
||||
hi link sbtString String
|
||||
hi link sbtIdentitifer Keyword
|
||||
hi link sbtBeginningSeq Keyword
|
||||
hi link sbtSpecial Special
|
||||
hi link sbtComment Comment
|
||||
hi link sbtLineComment Comment
|
||||
hi link sbtDocComment Comment
|
||||
|
Reference in New Issue
Block a user