summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-11-24 19:18:36 +0100
committerBram Moolenaar <Bram@vim.org>2015-11-24 19:18:36 +0100
commitd042dc825c9b97dacd84d4728f88300da4d5b6b9 (patch)
tree035c5232653999ca8f7a84ba67e57eb6dcac8f42 /runtime
parent0f6562e9036f889185dff49a75c7fc5ffb28b307 (diff)
downloadvim-git-d042dc825c9b97dacd84d4728f88300da4d5b6b9.tar.gz
Update runtime files.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/filetype.txt6
-rw-r--r--runtime/doc/fold.txt18
-rw-r--r--runtime/doc/hangulin.txt6
-rw-r--r--runtime/doc/options.txt8
-rw-r--r--runtime/doc/tags2
-rw-r--r--runtime/doc/term.txt4
-rw-r--r--runtime/doc/todo.txt39
-rw-r--r--runtime/ftplugin/changelog.vim12
-rw-r--r--runtime/ftplugin/man.vim7
-rw-r--r--runtime/syntax/man.vim6
-rw-r--r--runtime/syntax/php.vim16
-rw-r--r--runtime/syntax/sqloracle.vim153
12 files changed, 165 insertions, 112 deletions
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt
index 94454fb46..e1e70950a 100644
--- a/runtime/doc/filetype.txt
+++ b/runtime/doc/filetype.txt
@@ -1,4 +1,4 @@
-*filetype.txt* For Vim version 7.4. Last change: 2013 Dec 15
+*filetype.txt* For Vim version 7.4. Last change: 2015 Nov 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -577,6 +577,10 @@ Global mapping:
Local mappings:
CTRL-] Jump to the manual page for the word under the cursor.
CTRL-T Jump back to the previous manual page.
+q Same as ":quit"
+
+To enable folding use this: >
+ let g:ft_man_folding_enable = 1
PDF *ft-pdf-plugin*
diff --git a/runtime/doc/fold.txt b/runtime/doc/fold.txt
index 20017d353..e2ea1ab66 100644
--- a/runtime/doc/fold.txt
+++ b/runtime/doc/fold.txt
@@ -1,4 +1,4 @@
-*fold.txt* For Vim version 7.4. Last change: 2013 Dec 04
+*fold.txt* For Vim version 7.4. Last change: 2015 Nov 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -97,9 +97,9 @@ These are the conditions with which the expression is evaluated:
lowest.
"=" use fold level from the previous line
"a1", "a2", .. add one, two, .. to the fold level of the previous
- line
+ line, use the result for the current line
"s1", "s2", .. subtract one, two, .. from the fold level of the
- previous line
+ previous line, use the result for the next line
"<1", "<2", .. a fold with this level ends at this line
">1", ">2", .. a fold with this level starts at this line
@@ -122,6 +122,18 @@ method can be very slow!
Try to avoid the "=", "a" and "s" return values, since Vim often has to search
backwards for a line for which the fold level is defined. This can be slow.
+An example of using "a1" and "s1": For a multi-line C comment, a line
+containing "/*" would return "a1" to start a fold, and a line containing "*/"
+would return "s1" to end the fold after that line: >
+ if match(thisline, '/\*') >= 0
+ return 'a1'
+ elseif match(thisline, '\*/') >= 0
+ return 's1'
+ else
+ return '='
+ endif
+However, this won't work for single line comments, strings, etc.
+
|foldlevel()| can be useful to compute a fold level relative to a previous
fold level. But note that foldlevel() may return -1 if the level is not known
yet. And it returns the level at the start of the line, while a fold might
diff --git a/runtime/doc/hangulin.txt b/runtime/doc/hangulin.txt
index 6aacca77f..99ce6fded 100644
--- a/runtime/doc/hangulin.txt
+++ b/runtime/doc/hangulin.txt
@@ -1,4 +1,4 @@
-*hangulin.txt* For Vim version 7.4. Last change: 2015 Nov 10
+*hangulin.txt* For Vim version 7.4. Last change: 2015 Nov 24
VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam
@@ -34,7 +34,7 @@ If you set LC_ALL variable, it should be set to Korean locale also.
VIM resource
------------
You may want to set 'encoding' and 'fileencodings'.
-Next are examples:
+Next are examples: >
:set encoding=euc-kr
:set encoding=utf-8
@@ -54,7 +54,7 @@ If both are set, VIM_KEYBOARD has higher priority.
Hangul Fonts
------------
If you use GTK version of GVIM, you should set 'guifont' and 'guifontwide'.
-For example:
+For example: >
set guifont=Courier\ 12
set guifontwide=NanumGothicCoding\ 12
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index a54e1c040..c813bc773 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 7.4. Last change: 2015 Nov 11
+*options.txt* For Vim version 7.4. Last change: 2015 Nov 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -8075,9 +8075,9 @@ A jump table for the options with a short description can be found at |Q_op|.
% When included, save and restore the buffer list. If Vim is
started with a file name argument, the buffer list is not
restored. If Vim is started without a file name argument, the
- buffer list is restored from the viminfo file. Buffers
- without a file name and buffers for help files are not written
- to the viminfo file.
+ buffer list is restored from the viminfo file. Quickfix
+ ('buftype'), unlisted ('buflisted'), unnamed and buffers on
+ removable media (|viminfo-r|) are not saved.
When followed by a number, the number specifies the maximum
number of buffers that are stored. Without a number all
buffers are stored.
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 4556fb5b7..6b76f9ac9 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -1022,6 +1022,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'tabstop' options.txt /*'tabstop'*
'tag' options.txt /*'tag'*
'tagbsearch' options.txt /*'tagbsearch'*
+'tagcase' options.txt /*'tagcase'*
'taglength' options.txt /*'taglength'*
'tagrelative' options.txt /*'tagrelative'*
'tags' options.txt /*'tags'*
@@ -1032,6 +1033,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'tbidi' options.txt /*'tbidi'*
'tbis' options.txt /*'tbis'*
'tbs' options.txt /*'tbs'*
+'tc' options.txt /*'tc'*
'tenc' options.txt /*'tenc'*
'term' options.txt /*'term'*
'termbidi' options.txt /*'termbidi'*
diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt
index 7e4942e3e..a56813ac0 100644
--- a/runtime/doc/term.txt
+++ b/runtime/doc/term.txt
@@ -1,4 +1,4 @@
-*term.txt* For Vim version 7.4. Last change: 2015 Jun 25
+*term.txt* For Vim version 7.4. Last change: 2015 Nov 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -852,7 +852,7 @@ Mouse clicks can be mapped. The codes for mouse clicks are:
The X1 and X2 buttons refer to the extra buttons found on some mice. The
'Microsoft Explorer' mouse has these buttons available to the right thumb.
-Currently X1 and X2 only work on Win32 environments.
+Currently X1 and X2 only work on Win32 and X11 environments.
Examples: >
:noremap <MiddleMouse> <LeftMouse><MiddleMouse>
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index b475598a9..2a9830593 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.4. Last change: 2015 Nov 19
+*todo.txt* For Vim version 7.4. Last change: 2015 Nov 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -35,9 +35,6 @@ not be repeated below, unless there is extra information.
-------------------- Known bugs and current work -----------------------
Regexp problems:
-- Instructions for reproducing issue #465 (crash in nfa_regtry):
- https://github.com/mgedmin/vim-bug-465
- More info on the issue
- The regexp engines are not reentrant, causing havoc when interrupted by a
remote expression or something else. Move global variables onto the stack
or into an allocated struct.
@@ -96,21 +93,12 @@ Also need to run update-desktop-database (Kuriyama Kazunobu, 2015 Nov 4)
Access to uninitialized memory in match_backref() regexp_nda.c:4882
(Dominique Pelle, 2015 Nov 6)
-Netrw update. (Charles 2015 Oct 23)
-
Patch to use local value of 'errorformat' in :cexpr. (Christian Brabandt,
2015 Oct 16) Only do this for :lexpr ?
-Update Oracle syntax file from:
-https://github.com/chrisbra/vim-sqloracle-syntax/blob/master/syntax/sqloracle.vim
-
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
directory exists. (Sergio Gallelli, 2013 Dec 29)
-Better changelog syntax file. (Martin Florian, 2015 Oct 25)
-
-Better readline syntax file. (Raphael Bazaud, 2015 Oct 25)
-
English spell checking has an error. Updating doesn't work.
(Dominique Pelle, 2015 Oct 15)
Hint for new URL: Christian Brabandt, 2015 Oct 15.
@@ -137,22 +125,16 @@ Same for src/xxd/Make_cyg.mak
Python: ":py raw_input('prompt')" doesn't work. (Manu Hack)
-Patch to fix memory leak. (Dominique Pelle, 2015 Nov 4)
+Plugin to use Vim in MANPAGER. Konfekt, PR #491
Using uninitialized memory. (Dominique Pelle, 2015 Nov 4)
Patch to recognize string slice for variable followed by colon.
(Hirohito Higashi, 2015 Nov 3)
-
-Patch to support hangul input with utf-8.
-
-Patch to support UTF-8 for Hangul. (Shawn Y.H. Kim, 2011 May 1)
-Needs more work. Pinged 2012 Jan 4.
+Patch to .ok file is missing.
Patch to add debug backtrace. (Alberto Fanjul, 2015 Sep 27)
-Asked for :frame command.
-
-vt52 terminal codes are not correct. Patch from Random, 2015 Nov 5.
+Needs fixes.
MS-Windows: When editing a file with a leading space, writing it uses the
wrong name. (Aram, 2014 Nov 7) Vim 7.4.
@@ -160,9 +142,6 @@ wrong name. (Aram, 2014 Nov 7) Vim 7.4.
Can't recognize the $ProgramFiles(x86) environment variable. Recognize it
specifically? First try with the parens, then without.
-Patch to add 'tagcase' option, whether to ignore case for tags.
-(Gary Johnson, 2015 Nov 6)
-
Patch to fix "." after CTRL-A in Visual block mode. (Ozaki Kiichi, 2015 Oct
24)
@@ -208,6 +187,9 @@ Update Aug 14.
Crash in :cnext on MS-Windows. (Ben Fritz, 2015 Oct 27)
+Patch to add GUI colors to the terminal, when it supports it. (ZyX, 2013 Jan
+26, update 2013 Dec 14, another 2014 Nov 22)
+
Patch for problem with restoring screen on Windows. (Nobuhiro Takasaki, 2015
Sep 10)
@@ -229,6 +211,9 @@ ml_updatechunk() is slow when retrying for another encoding. (John Little,
Patch to fix checking global option value when not using it.
(Arnaud Decara, 2015 Jul 23)
+Patch to support Python 'None' value in pyeval(). (Damien, 2015 Nov 21)
+Need a Vim equivalent of None and a way to test for it.
+
When 'showbreak' is set repeating a Visual operation counts the size of the
'showbreak' text as part of the operation. (Axel Bender, 2015 Jul 20)
@@ -283,6 +268,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
Patch on Issue 72: 'autochdir' causes problems for :vimgrep.
@@ -294,9 +280,6 @@ When two SIGWINCH arrive very quickly, the second one may be lost.
Make comments in the test Makefile silent. (Kartik Agaram, 2014 Sep 24)
-Patch to add GUI colors to the terminal, when it supports it. (ZyX, 2013 Jan
-26, update 2013 Dec 14, another 2014 Nov 22)
-
Patch to improve behavior of dead keys on MS-Windows. (John Wellesz, 2015 Aug
25) https://github.com/vim/vim/pull/399.diff
diff --git a/runtime/ftplugin/changelog.vim b/runtime/ftplugin/changelog.vim
index 244245e27..257e9cd9d 100644
--- a/runtime/ftplugin/changelog.vim
+++ b/runtime/ftplugin/changelog.vim
@@ -1,7 +1,8 @@
" Vim filetype plugin file
-" Language: generic Changelog file
-" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2014-01-10
+" Language: generic Changelog file
+" Maintainer: Martin Florian <marfl@posteo.de>
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2015-10-25
" Variables:
" g:changelog_timeformat (deprecated: use g:changelog_dateformat instead) -
" description: the timeformat used in ChangeLog entries.
@@ -167,7 +168,7 @@ if &filetype == 'changelog'
let cursor = stridx(line, '{cursor}')
call setline(lnum, substitute(line, '{cursor}', '', ''))
endif
- startinsert!
+ startinsert
endfunction
" Internal function to create a new entry in the ChangeLog.
@@ -223,7 +224,8 @@ if &filetype == 'changelog'
endfunction
if exists(":NewChangelogEntry") != 2
- noremap <buffer> <silent> <Leader>o <Esc>:call <SID>new_changelog_entry('')<CR>
+ nnoremap <buffer> <silent> <Leader>o :<C-u>call <SID>new_changelog_entry('')<CR>
+ xnoremap <buffer> <silent> <Leader>o :<C-u>call <SID>new_changelog_entry('')<CR>
command! -nargs=0 NewChangelogEntry call s:new_changelog_entry('')
endif
diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim
index 28b7e245b..24bcdd0e6 100644
--- a/runtime/ftplugin/man.vim
+++ b/runtime/ftplugin/man.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: man
" Maintainer: SungHyun Nam <goweol@gmail.com>
-" Last Change: 2014 Dec 29
+" Last Change: 2015 Nov 24
" To make the ":Man" command available before editing a manual page, source
" this script from your startup vimrc file.
@@ -33,6 +33,11 @@ if &filetype == "man"
nnoremap <buffer> <c-]> :call <SID>PreGetPage(v:count)<CR>
nnoremap <buffer> <c-t> :call <SID>PopPage()<CR>
+ nnoremap <buffer> <silent> q :q<CR>
+ endif
+
+ if exists('g:ft_man_folding_enable') && (g:ft_man_folding_enable == 1)
+ setlocal foldmethod=indent foldnestmax=1 foldenable
endif
let b:undo_ftplugin = "setlocal iskeyword<"
diff --git a/runtime/syntax/man.vim b/runtime/syntax/man.vim
index 4172a02fe..fbc1847e6 100644
--- a/runtime/syntax/man.vim
+++ b/runtime/syntax/man.vim
@@ -3,7 +3,7 @@
" Maintainer: SungHyun Nam <goweol@gmail.com>
" Previous Maintainer: Gautam H. Mudunuri <gmudunur@informatica.com>
" Version Info:
-" Last Change: 2008 Sep 17
+" Last Change: 2015 Nov 24
" Additional highlighting by Johannes Tanzler <johannes.tanzler@aon.at>:
" * manSubHeading
@@ -27,8 +27,8 @@ endif
syn case ignore
syn match manReference "\f\+([1-9][a-z]\=)"
syn match manTitle "^\f\+([0-9]\+[a-z]\=).*"
-syn match manSectionHeading "^[a-z][a-z ]*[a-z]$"
-syn match manSubHeading "^\s\{3\}[a-z][a-z ]*[a-z]$"
+syn match manSectionHeading "^[a-z][a-z -]*[a-z]$"
+syn match manSubHeading "^\s\{3\}[a-z][a-z -]*[a-z]$"
syn match manOptionDesc "^\s*[+-][a-z0-9]\S*"
syn match manLongOptionDesc "^\s*--[a-z0-9-]\S*"
" syn match manHistory "^[a-z].*last change.*$"
diff --git a/runtime/syntax/php.vim b/runtime/syntax/php.vim
index aac3e9923..958e2a66c 100644
--- a/runtime/syntax/php.vim
+++ b/runtime/syntax/php.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: php PHP 3/4/5
" Maintainer: Jason Woofenden <jason@jasonwoof.com>
-" Last Change: Mar 24, 2015
+" Last Change: Nov 23, 2015
" URL: https://jasonwoof.com/gitweb/?p=vim-syntax.git;a=blob;f=php.vim;hb=HEAD
" Former Maintainers: Peter Hodge <toomuchphp-vim@yahoo.com>
" Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
@@ -280,7 +280,7 @@ syn keyword phpStatement return break continue exit goto contained
syn keyword phpKeyword var const contained
" Type
-syn keyword phpType bool[ean] int[eger] real double float string array object NULL contained
+syn keyword phpType bool boolean int integer real double float string array object NULL contained
" Structure
syn keyword phpStructure namespace extends implements instanceof parent self contained
@@ -393,13 +393,13 @@ endif
" String
if exists("php_parent_error_open")
- syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble contained keepend
- syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpBackslashSequences,phpIdentifierSimply,phpIdentifierComplex contained keepend
- syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote contained keepend
+ syn region phpStringDouble matchgroup=phpStringDouble start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble contained keepend
+ syn region phpBacktick matchgroup=phpBacktick start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpBackslashSequences,phpIdentifierSimply,phpIdentifierComplex contained keepend
+ syn region phpStringSingle matchgroup=phpStringSingle start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote contained keepend
else
- syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble contained extend keepend
- syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpBackslashSequences,phpIdentifierSimply,phpIdentifierComplex contained extend keepend
- syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote contained keepend extend
+ syn region phpStringDouble matchgroup=phpStringDouble start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble contained extend keepend
+ syn region phpBacktick matchgroup=phpBacktick start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpBackslashSequences,phpIdentifierSimply,phpIdentifierComplex contained extend keepend
+ syn region phpStringSingle matchgroup=phpStringSingle start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote contained keepend extend
endif
" HereDoc and NowDoc
diff --git a/runtime/syntax/sqloracle.vim b/runtime/syntax/sqloracle.vim
index f9a7c19e3..8afe2686b 100644
--- a/runtime/syntax/sqloracle.vim
+++ b/runtime/syntax/sqloracle.vim
@@ -1,13 +1,12 @@
" Vim syntax file
-" Language: SQL, PL/SQL (Oracle 8i)
-" Maintainer: Paul Moore <pf_moore AT yahoo.co.uk>
-" Last Change: 2005 Dec 23
-
-" For version 5.x: Clear all syntax items
-" For version 6.x: Quit when a syntax file was already loaded
-if version < 600
- syntax clear
-elseif exists("b:current_syntax")
+" Language: SQL, PL/SQL (Oracle 11g)
+" Maintainer: Christian Brabandt
+" Repository: https://github.com/chrisbra/vim-sqloracle-syntax
+" License: Vim
+" Previous Maintainer: Paul Moore
+" Last Change: 2015 Nov 24
+
+if exists("b:current_syntax")
finish
endif
@@ -15,75 +14,121 @@ syn case ignore
" The SQL reserved words, defined as keywords.
-syn keyword sqlSpecial false null true
+syn keyword sqlSpecial false null true
-syn keyword sqlKeyword access add as asc begin by check cluster column
-syn keyword sqlKeyword compress connect current cursor decimal default desc
+syn keyword sqlKeyword access add as asc begin by case check cluster column
+syn keyword sqlKeyword cache compress connect current cursor decimal default desc
syn keyword sqlKeyword else elsif end exception exclusive file for from
syn keyword sqlKeyword function group having identified if immediate increment
-syn keyword sqlKeyword index initial into is level loop maxextents mode modify
-syn keyword sqlKeyword nocompress nowait of offline on online start
-syn keyword sqlKeyword successful synonym table then to trigger uid
+syn keyword sqlKeyword index initial initrans into is level link logging loop
+syn keyword sqlKeyword maxextents maxtrans mode modify monitoring
+syn keyword sqlKeyword nocache nocompress nologging noparallel nowait of offline on online start
+syn keyword sqlKeyword parallel successful synonym table tablespace then to trigger uid
syn keyword sqlKeyword unique user validate values view whenever
-syn keyword sqlKeyword where with option order pctfree privileges procedure
+syn keyword sqlKeyword where with option order pctfree pctused privileges procedure
syn keyword sqlKeyword public resource return row rowlabel rownum rows
syn keyword sqlKeyword session share size smallint type using
syn keyword sqlOperator not and or
syn keyword sqlOperator in any some all between exists
syn keyword sqlOperator like escape
-syn keyword sqlOperator union intersect minus
-syn keyword sqlOperator prior distinct
+syn keyword sqlOperator union intersect minus
+syn keyword sqlOperator prior distinct
syn keyword sqlOperator sysdate out
-syn keyword sqlStatement alter analyze audit comment commit create
-syn keyword sqlStatement delete drop execute explain grant insert lock noaudit
-syn keyword sqlStatement rename revoke rollback savepoint select set
-syn keyword sqlStatement truncate update
+syn keyword sqlStatement analyze audit comment commit
+syn keyword sqlStatement delete drop execute explain grant lock noaudit
+syn keyword sqlStatement rename revoke rollback savepoint set
+syn keyword sqlStatement truncate
+" next ones are contained, so folding works.
+syn keyword sqlStatement create update alter select insert contained
syn keyword sqlType boolean char character date float integer long
syn keyword sqlType mlslabel number raw rowid varchar varchar2 varray
-" Strings and characters:
-syn region sqlString start=+"+ skip=+\\\\\|\\"+ end=+"+
-syn region sqlString start=+'+ skip=+\\\\\|\\'+ end=+'+
+" Strings:
+syn region sqlString start=+"+ skip=+\\\\\|\\"+ end=+"+
+syn region sqlString start=+'+ skip=+\\\\\|\\'+ end=+'+
" Numbers:
-syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>"
+syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>"
" Comments:
-syn region sqlComment start="/\*" end="\*/" contains=sqlTodo
-syn match sqlComment "--.*$" contains=sqlTodo
+syn region sqlComment start="/\*" end="\*/" contains=sqlTodo,@Spell fold
+syn match sqlComment "--.*$" contains=sqlTodo,@Spell
+
+" Setup Folding:
+" this is a hack, to get certain statements folded.
+" the keywords create/update/alter/select/insert need to
+" have contained option.
+syn region sqlFold start='^\s*\zs\c\(Create\|Update\|Alter\|Select\|Insert\)' end=';$\|^$' transparent fold contains=ALL
syn sync ccomment sqlComment
-" Todo.
-syn keyword sqlTodo contained TODO FIXME XXX DEBUG NOTE
+" Functions:
+" (Oracle 11g)
+" Aggregate Functions
+syn keyword sqlFunction avg collect corr corr_s corr_k count covar_pop covar_samp cume_dist dense_rank first
+syn keyword sqlFunction group_id grouping grouping_id last max median min percentile_cont percentile_disc percent_rank rank
+syn keyword sqlFunction regr_slope regr_intercept regr_count regr_r2 regr_avgx regr_avgy regr_sxx regr_syy regr_sxy
+syn keyword sqlFunction stats_binomial_test stats_crosstab stats_f_test stats_ks_test stats_mode stats_mw_test
+syn keyword sqlFunction stats_one_way_anova stats_t_test_one stats_t_test_paired stats_t_test_indep stats_t_test_indepu
+syn keyword sqlFunction stats_wsr_test stddev stddev_pop stddev_samp sum
+syn keyword sqlFunction sys_xmlagg var_pop var_samp variance xmlagg
+" Char Functions
+syn keyword sqlFunction ascii chr concat initcap instr length lower lpad ltrim
+syn keyword sqlFunction nls_initcap nls_lower nlssort nls_upper regexp_instr regexp_replace
+syn keyword sqlFunction regexp_substr replace rpad rtrim soundex substr translate treat trim upper
+" Comparison Functions
+syn keyword sqlFunction greatest least
+" Conversion Functions
+syn keyword sqlFunction asciistr bin_to_num cast chartorowid compose convert
+syn keyword sqlFunction decompose hextoraw numtodsinterval numtoyminterval rawtohex rawtonhex rowidtochar
+syn keyword sqlFunction rowidtonchar scn_to_timestamp timestamp_to_scn to_binary_double to_binary_float
+syn keyword sqlFunction to_char to_char to_char to_clob to_date to_dsinterval to_lob to_multi_byte
+syn keyword sqlFunction to_nchar to_nchar to_nchar to_nclob to_number to_dsinterval to_single_byte
+syn keyword sqlFunction to_timestamp to_timestamp_tz to_yminterval to_yminterval translate unistr
+" DataMining Functions
+syn keyword sqlFunction cluster_id cluster_probability cluster_set feature_id feature_set
+syn keyword sqlFunction feature_value prediction prediction_bounds prediction_cost
+syn keyword sqlFunction prediction_details prediction_probability prediction_set
+" Datetime Functions
+syn keyword sqlFunction add_months current_date current_timestamp dbtimezone extract
+syn keyword sqlFunction from_tz last_day localtimestamp months_between new_time
+syn keyword sqlFunction next_day numtodsinterval numtoyminterval round sessiontimezone
+syn keyword sqlFunction sys_extract_utc sysdate systimestamp to_char to_timestamp
+syn keyword sqlFunction to_timestamp_tz to_dsinterval to_yminterval trunc tz_offset
+" Numeric Functions
+syn keyword sqlFunction abs acos asin atan atan2 bitand ceil cos cosh exp
+syn keyword sqlFunction floor ln log mod nanvl power remainder round sign
+syn keyword sqlFunction sin sinh sqrt tan tanh trunc width_bucket
+" NLS Functions
+syn keyword sqlFunction ls_charset_decl_len nls_charset_id nls_charset_name
+" Various Functions
+syn keyword sqlFunction bfilename cardin coalesce collect decode dump empty_blob empty_clob
+syn keyword sqlFunction lnnvl nullif nvl nvl2 ora_hash powermultiset powermultiset_by_cardinality
+syn keyword sqlFunction sys_connect_by_path sys_context sys_guid sys_typeid uid user userenv vsizeality
+" XML Functions
+syn keyword sqlFunction appendchildxml deletexml depth extract existsnode extractvalue insertchildxml
+syn keyword sqlFunction insertxmlbefore path sys_dburigen sys_xmlagg sys_xmlgen updatexml xmlagg xmlcast
+syn keyword sqlFunction xmlcdata xmlcolattval xmlcomment xmlconcat xmldiff xmlelement xmlexists xmlforest
+syn keyword sqlFunction xmlparse xmlpatch xmlpi xmlquery xmlroot xmlsequence xmlserialize xmltable xmltransform
+" Todo:
+syn keyword sqlTodo TODO FIXME XXX DEBUG NOTE contained
" Define the default highlighting.
-" For version 5.7 and earlier: only when not done already
-" For version 5.8 and later: only when an item doesn't have highlighting yet
-if version >= 508 || !exists("did_sql_syn_inits")
- if version < 508
- let did_sql_syn_inits = 1
- command -nargs=+ HiLink hi link <args>
- else
- command -nargs=+ HiLink hi def link <args>
- endif
-
- HiLink sqlComment Comment
- HiLink sqlKeyword sqlSpecial
- HiLink sqlNumber Number
- HiLink sqlOperator sqlStatement
- HiLink sqlSpecial Special
- HiLink sqlStatement Statement
- HiLink sqlString String
- HiLink sqlType Type
- HiLink sqlTodo Todo
-
- delcommand HiLink
-endif
-
+command -nargs=+ HiLink hi def link <args>
+HiLink sqlComment Comment
+HiLink sqlFunction Function
+HiLink sqlKeyword sqlSpecial
+HiLink sqlNumber Number
+HiLink sqlOperator sqlStatement
+HiLink sqlSpecial Special
+HiLink sqlStatement Statement
+HiLink sqlString String
+HiLink sqlType Type
+HiLink sqlTodo Todo
+
+delcommand HiLink
let b:current_syntax = "sql"
-
" vim: ts=8