summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/todo.txt1
-rw-r--r--runtime/doc/version7.txt15
-rw-r--r--runtime/filetype.vim6
-rw-r--r--runtime/ftplugin/cucumber.vim1
-rw-r--r--runtime/ftplugin/git.vim32
-rw-r--r--runtime/ftplugin/gitcommit.vim62
-rw-r--r--runtime/ftplugin/gitrebase.vim13
-rw-r--r--runtime/ftplugin/haml.vim5
-rw-r--r--runtime/ftplugin/liquid.vim61
-rw-r--r--runtime/ftplugin/markdown.vim19
-rw-r--r--runtime/ftplugin/sass.vim3
-rw-r--r--runtime/indent/cucumber.vim1
-rw-r--r--runtime/indent/gitconfig.vim30
-rw-r--r--runtime/indent/haml.vim14
-rw-r--r--runtime/indent/liquid.vim63
-rw-r--r--runtime/indent/sass.vim8
-rw-r--r--runtime/syntax/cucumber.vim25
-rw-r--r--runtime/syntax/git.vim4
-rw-r--r--runtime/syntax/gitcommit.vim8
-rw-r--r--runtime/syntax/gitconfig.vim4
-rw-r--r--runtime/syntax/gitrebase.vim12
-rw-r--r--runtime/syntax/gitsendemail.vim4
-rw-r--r--runtime/syntax/haml.vim66
-rw-r--r--runtime/syntax/liquid.vim137
-rw-r--r--runtime/syntax/markdown.vim105
-rw-r--r--runtime/syntax/sass.vim13
26 files changed, 578 insertions, 134 deletions
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index fcc4f9b87f..cd89dba7e9 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1102,6 +1102,7 @@ Patches to include:
- Patch for Lisp support with ECL (Mikael Jansson, 2008 Oct 25)
- Minor patches from Dominique Pelle, 2010 May 15
- Gvimext patch to support wide file names. (Szabolcs Horvat 2008 Sep 10)
+- More float functions.
- Patch to support netbeans for Mac. (Kazuki Sakamoto, 2009 Jun 25)
- Patch to support clipboard for Mac terminal. (Jjgod Jiang, 2009 Aug 1)
- Patch to support :browse for more commands. (Lech Lorens, 2009 Jul 18)
diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt
index a49eae7635..1a59616c6a 100644
--- a/runtime/doc/version7.txt
+++ b/runtime/doc/version7.txt
@@ -3,7 +3,7 @@
VIM REFERENCE MANUAL by Bram Moolenaar
- *vim7*
+ *vim7* *version-7.0* *version7.0*
Welcome to Vim 7! A large number of features has been added. This file
mentions all the new items, changes to existing features and bug fixes
since Vim 6.x. Use this command to see the version you are using: >
@@ -2984,7 +2984,7 @@ CTRL-N or a printable character while still searching for matches.
==============================================================================
-VERSION 7.1 *version-7.1*
+VERSION 7.1 *version-7.1* *version7.1*
This section is about improvements made between version 7.0 and 7.1.
@@ -4626,7 +4626,7 @@ Solution: Use the same mechanism as in mch_total_mem(): first reduce the
Files: src/memfile.c
==============================================================================
-VERSION 7.2 *version-7.2*
+VERSION 7.2 *version-7.2* *version7.2*
This section is about improvements made between version 7.1 and 7.2.
@@ -7148,7 +7148,7 @@ Pelle)
Mac: Could not build with Perl interface.
==============================================================================
-VERSION 7.3 *version-7.3*
+VERSION 7.3 *version-7.3* *version7.3*
This section is about improvements made between version 7.2 and 7.3.
@@ -7188,6 +7188,13 @@ Support GDK_SUPER_MASK for GTK on Mac. (Stephan Schulz)
Fixed *fixed-7.3*
-----
+When writing a file, switching tab pages and selecting a word the file write
+message would be displayed again. This in Insert mode and with 'cmdheight'
+set to 2.
+
+When using ":lang" to set a locale that uses a comma for decimal separator and
+using GTK floating point numbers stop working. Use gtk_disable_setlocale().
+(James Vega)
vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 1705fdc544..1e62d8561f 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -981,6 +981,9 @@ endif
" SBCL implementation of Common Lisp
au BufNewFile,BufRead sbclrc,.sbclrc setf lisp
+" Liquid
+au BufNewFile,BufRead *.liquid setf liquid
+
" Lite
au BufNewFile,BufRead *.lite,*.lt setf lite
@@ -1045,6 +1048,9 @@ au BufNewFile,BufRead *.mv,*.mpl,*.mws setf maple
" Map (UMN mapserver config file)
au BufNewFile,BufRead *.map setf map
+" Markdown
+au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,README.md setf markdown
+
" Mason
au BufNewFile,BufRead *.mason,*.mhtml setf mason
diff --git a/runtime/ftplugin/cucumber.vim b/runtime/ftplugin/cucumber.vim
index 8ef8c2399b..63cfbcf336 100644
--- a/runtime/ftplugin/cucumber.vim
+++ b/runtime/ftplugin/cucumber.vim
@@ -1,6 +1,7 @@
" Vim filetype plugin
" Language: Cucumber
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
+" Last Change: 2010 May 21
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
diff --git a/runtime/ftplugin/git.vim b/runtime/ftplugin/git.vim
index 63d4f338ed..e043c7587e 100644
--- a/runtime/ftplugin/git.vim
+++ b/runtime/ftplugin/git.vim
@@ -1,33 +1,33 @@
" Vim filetype plugin
" Language: generic git output
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
-" Last Change: 2009 Dec 24
+" Last Change: 2010 May 21
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
- finish
+ finish
endif
let b:did_ftplugin = 1
if !exists('b:git_dir')
- if expand('%:p') =~# '\.git\>'
- let b:git_dir = matchstr(expand('%:p'),'.*\.git\>')
- elseif $GIT_DIR != ''
- let b:git_dir = $GIT_DIR
- endif
- if (has('win32') || has('win64')) && exists('b:git_dir')
- let b:git_dir = substitute(b:git_dir,'\\','/','g')
- endif
+ if expand('%:p') =~# '\.git\>'
+ let b:git_dir = matchstr(expand('%:p'),'.*\.git\>')
+ elseif $GIT_DIR != ''
+ let b:git_dir = $GIT_DIR
+ endif
+ if (has('win32') || has('win64')) && exists('b:git_dir')
+ let b:git_dir = substitute(b:git_dir,'\\','/','g')
+ endif
endif
if exists('*shellescape') && exists('b:git_dir') && b:git_dir != ''
- if b:git_dir =~# '/\.git$' " Not a bare repository
- let &l:path = escape(fnamemodify(b:git_dir,':h'),'\, ').','.&l:path
- endif
- let &l:path = escape(b:git_dir,'\, ').','.&l:path
- let &l:keywordprg = 'git --git-dir='.shellescape(b:git_dir).' show'
+ if b:git_dir =~# '/\.git$' " Not a bare repository
+ let &l:path = escape(fnamemodify(b:git_dir,':h'),'\, ').','.&l:path
+ endif
+ let &l:path = escape(b:git_dir,'\, ').','.&l:path
+ let &l:keywordprg = 'git --git-dir='.shellescape(b:git_dir).' show'
else
- setlocal keywordprg=git\ show
+ setlocal keywordprg=git\ show
endif
if has('gui_running')
let &l:keywordprg = substitute(&l:keywordprg,'^git\>','git --no-pager','')
diff --git a/runtime/ftplugin/gitcommit.vim b/runtime/ftplugin/gitcommit.vim
index f8788c8444..94d635c5dd 100644
--- a/runtime/ftplugin/gitcommit.vim
+++ b/runtime/ftplugin/gitcommit.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: git commit file
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
-" Last Change: 2009 Dec 24
+" Last Change: 2010 May 21
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
@@ -15,7 +15,7 @@ if &textwidth == 0
" make sure that log messages play nice with git-log on standard terminals
setlocal textwidth=72
if !exists("b:undo_ftplugin")
- let b:undo_ftplugin = ""
+ let b:undo_ftplugin = ""
endif
let b:undo_ftplugin = b:undo_ftplugin . "|setl tw<"
endif
@@ -25,7 +25,7 @@ if exists("g:no_gitcommit_commands") || v:version < 700
endif
if !exists("b:git_dir")
- let b:git_dir = expand("%:p:h")
+ let b:git_dir = expand("%:p:h")
endif
" Automatically diffing can be done with:
@@ -33,36 +33,36 @@ endif
command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0,b:git_dir,<f-args>)
function! s:diffcomplete(A,L,P)
- let args = ""
- if a:P <= match(a:L." -- "," -- ")+3
- let args = args . "-p\n--stat\n--shortstat\n--summary\n--patch-with-stat\n--no-renames\n-B\n-M\n-C\n"
- end
- if exists("b:git_dir") && a:A !~ '^-'
- let tree = fnamemodify(b:git_dir,':h')
- if strpart(getcwd(),0,strlen(tree)) == tree
- let args = args."\n".system("git diff --cached --name-only")
- endif
+ let args = ""
+ if a:P <= match(a:L." -- "," -- ")+3
+ let args = args . "-p\n--stat\n--shortstat\n--summary\n--patch-with-stat\n--no-renames\n-B\n-M\n-C\n"
+ end
+ if exists("b:git_dir") && a:A !~ '^-'
+ let tree = fnamemodify(b:git_dir,':h')
+ if strpart(getcwd(),0,strlen(tree)) == tree
+ let args = args."\n".system("git diff --cached --name-only")
endif
- return args
+ endif
+ return args
endfunction
function! s:gitdiffcached(bang,gitdir,...)
- let tree = fnamemodify(a:gitdir,':h')
- let name = tempname()
- let git = "git"
- if strpart(getcwd(),0,strlen(tree)) != tree
- let git .= " --git-dir=".(exists("*shellescape") ? shellescape(a:gitdir) : '"'.a:gitdir.'"')
- endif
- if a:0
- let extra = join(map(copy(a:000),exists("*shellescape") ? 'shellescape(v:val)' : "'\"'.v:val.'\"'"))
- else
- let extra = "-p --stat=".&columns
- endif
- call system(git." diff --cached --no-color ".extra." > ".(exists("*shellescape") ? shellescape(name) : name))
- exe "pedit ".(exists("*fnameescape") ? fnameescape(name) : name)
- wincmd P
- let b:git_dir = a:gitdir
- command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0,b:git_dir,<f-args>)
- nnoremap <silent> q :q<CR>
- setlocal buftype=nowrite nobuflisted noswapfile nomodifiable filetype=git
+ let tree = fnamemodify(a:gitdir,':h')
+ let name = tempname()
+ let git = "git"
+ if strpart(getcwd(),0,strlen(tree)) != tree
+ let git .= " --git-dir=".(exists("*shellescape") ? shellescape(a:gitdir) : '"'.a:gitdir.'"')
+ endif
+ if a:0
+ let extra = join(map(copy(a:000),exists("*shellescape") ? 'shellescape(v:val)' : "'\"'.v:val.'\"'"))
+ else
+ let extra = "-p --stat=".&columns
+ endif
+ call system(git." diff --cached --no-color ".extra." > ".(exists("*shellescape") ? shellescape(name) : name))
+ exe "pedit ".(exists("*fnameescape") ? fnameescape(name) : name)
+ wincmd P
+ let b:git_dir = a:gitdir
+ command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0,b:git_dir,<f-args>)
+ nnoremap <silent> q :q<CR>
+ setlocal buftype=nowrite nobuflisted noswapfile nomodifiable filetype=git
endfunction
diff --git a/runtime/ftplugin/gitrebase.vim b/runtime/ftplugin/gitrebase.vim
index 4680d285e7..0200ba1acc 100644
--- a/runtime/ftplugin/gitrebase.vim
+++ b/runtime/ftplugin/gitrebase.vim
@@ -1,11 +1,11 @@
" Vim filetype plugin
" Language: git rebase --interactive
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
-" Last Change: 2009 Dec 24
+" Last Change: 2010 May 21
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
- finish
+ finish
endif
runtime! ftplugin/git.vim
@@ -13,28 +13,29 @@ let b:did_ftplugin = 1
setlocal comments=:# commentstring=#\ %s formatoptions-=t
if !exists("b:undo_ftplugin")
- let b:undo_ftplugin = ""
+ let b:undo_ftplugin = ""
endif
let b:undo_ftplugin = b:undo_ftplugin."|setl com< cms< fo<"
function! s:choose(word)
- s/^\(\w\+\>\)\=\(\s*\)\ze\x\{4,40\}\>/\=(strlen(submatch(1)) == 1 ? a:word[0] : a:word) . substitute(submatch(2),'^$',' ','')/e
+ s/^\(\w\+\>\)\=\(\s*\)\ze\x\{4,40\}\>/\=(strlen(submatch(1)) == 1 ? a:word[0] : a:word) . substitute(submatch(2),'^$',' ','')/e
endfunction
function! s:cycle()
- call s:choose(get({'s':'edit','p':'squash','e':'reword'},getline('.')[0],'pick'))
+ call s:choose(get({'s':'edit','p':'squash','e':'reword','r':'fixup'},getline('.')[0],'pick'))
endfunction
command! -buffer -bar Pick :call s:choose('pick')
command! -buffer -bar Squash :call s:choose('squash')
command! -buffer -bar Edit :call s:choose('edit')
command! -buffer -bar Reword :call s:choose('reword')
+command! -buffer -bar Fixup :call s:choose('fixup')
command! -buffer -bar Cycle :call s:cycle()
" The above are more useful when they are mapped; for example:
"nnoremap <buffer> <silent> S :Cycle<CR>
if exists("g:no_plugin_maps") || exists("g:no_gitrebase_maps")
- finish
+ finish
endif
nnoremap <buffer> <expr> K col('.') < 7 && expand('<Lt>cword>') =~ '\X' && getline('.') =~ '^\w\+\s\+\x\+\>' ? 'wK' : 'K'
diff --git a/runtime/ftplugin/haml.vim b/runtime/ftplugin/haml.vim
index 0a39d5ef3a..b2c1eca3fc 100644
--- a/runtime/ftplugin/haml.vim
+++ b/runtime/ftplugin/haml.vim
@@ -1,6 +1,7 @@
" Vim filetype plugin
" Language: Haml
-" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
+" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
+" Last Change: 2010 May 21
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -56,7 +57,7 @@ if exists("loaded_matchit")
let b:match_words = s:match_words
endif
-setlocal commentstring=-#\ %s
+setlocal comments= commentstring=-#\ %s
let b:undo_ftplugin = "setl cms< com< "
\ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin
diff --git a/runtime/ftplugin/liquid.vim b/runtime/ftplugin/liquid.vim
new file mode 100644
index 0000000000..b211a884c6
--- /dev/null
+++ b/runtime/ftplugin/liquid.vim
@@ -0,0 +1,61 @@
+" Vim filetype plugin
+" Language: Liquid
+" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
+" Last Change: 2010 May 21
+
+if exists('b:did_ftplugin')
+ finish
+endif
+
+if !exists('g:liquid_default_subtype')
+ let g:liquid_default_subtype = 'html'
+endif
+
+if !exists('b:liquid_subtype')
+ let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$")
+ let b:liquid_subtype = matchstr(s:lines,'liquid_subtype=\zs\w\+')
+ if b:liquid_subtype == ''
+ let b:liquid_subtype = matchstr(&filetype,'^liquid\.\zs\w\+')
+ endif
+ if b:liquid_subtype == ''
+ let b:liquid_subtype = matchstr(substitute(expand('%:t'),'\c\%(\.liquid\)\+$','',''),'\.\zs\w\+$')
+ endif
+ if b:liquid_subtype == ''
+ let b:liquid_subtype = g:liquid_default_subtype
+ endif
+endif
+
+if exists('b:liquid_subtype') && b:liquid_subtype != ''
+ exe 'runtime! ftplugin/'.b:liquid_subtype.'.vim ftplugin/'.b:liquid_subtype.'_*.vim ftplugin/'.b:liquid_subtype.'/*.vim'
+else
+ runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
+endif
+let b:did_ftplugin = 1
+
+if exists('b:undo_ftplugin')
+ let b:undo_ftplugin .= '|'
+else
+ let b:undo_ftplugin = ''
+endif
+if exists('b:browsefilter')
+ let b:browsefilter = "\n".b:browsefilter
+else
+ let b:browsefilter = ''
+endif
+if exists('b:match_words')
+ let b:match_words .= ','
+elseif exists('loaded_matchit')
+ let b:match_words = ''
+endif
+
+if has('gui_win32')
+ let b:browsefilter="Liquid Files (*.liquid)\t*.liquid" . b:browsefilter
+endif
+
+if exists('loaded_matchit')
+ let b:match_words .= '\<\%(if\w*\|unless\|case\)\>:\<\%(elsif\|else\|when\)\>:\<end\%(if\w*\|unless\|case\)\>,\<\%(for\|tablerow\)\>:\%({%\s*\)\@<=empty\>:\<end\%(for\|tablerow\)\>,<\(capture\|comment\|highlight\)\>:\<end\1\>'
+endif
+
+setlocal commentstring={%\ comment\ %}%s{%\ endcomment\ %}
+
+let b:undo_ftplugin .= 'setl cms< | unlet! b:browsefilter b:match_words'
diff --git a/runtime/ftplugin/markdown.vim b/runtime/ftplugin/markdown.vim
new file mode 100644
index 0000000000..946208203c
--- /dev/null
+++ b/runtime/ftplugin/markdown.vim
@@ -0,0 +1,19 @@
+" Vim filetype plugin
+" Language: Markdown
+" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
+" Last Change: 2010 May 21
+
+if exists("b:did_ftplugin")
+ finish
+endif
+
+runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
+unlet! b:did_ftplugin
+
+setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s
+setlocal formatoptions+=tcqln
+setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^[-*+]\\s\\+
+
+let b:undo_ftplugin .= "|setl cms< com< fo<"
+
+" vim:set sw=2:
diff --git a/runtime/ftplugin/sass.vim b/runtime/ftplugin/sass.vim
index ad039772ad..9a99931731 100644
--- a/runtime/ftplugin/sass.vim
+++ b/runtime/ftplugin/sass.vim
@@ -1,6 +1,7 @@
" Vim filetype plugin
" Language: Sass
-" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
+" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
+" Last Change: 2010 May 21
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
diff --git a/runtime/indent/cucumber.vim b/runtime/indent/cucumber.vim
index 8cbbc39743..a19d123f7e 100644
--- a/runtime/indent/cucumber.vim
+++ b/runtime/indent/cucumber.vim
@@ -1,6 +1,7 @@
" Vim indent file
" Language: Cucumber
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
+" Last Change: 2010 May 21
if exists("b:did_indent")
finish
diff --git a/runtime/indent/gitconfig.vim b/runtime/indent/gitconfig.vim
index 28d95b7cd2..fa57e56ab6 100644
--- a/runtime/indent/gitconfig.vim
+++ b/runtime/indent/gitconfig.vim
@@ -1,7 +1,7 @@
" Vim indent file
" Language: git config file
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
-" Last Change: 2009 Dec 24
+" Last Change: 2010 May 21
if exists("b:did_indent")
finish
@@ -18,18 +18,18 @@ if exists("*GetGitconfigIndent")
endif
function! GetGitconfigIndent()
- let line = getline(prevnonblank(v:lnum-1))
- let cline = getline(v:lnum)
- if line =~ '\\\@<!\%(\\\\\)*\\$'
- " odd number of slashes, in a line continuation
- return 2 * &sw
- elseif cline =~ '^\s*\['
- return 0
- elseif cline =~ '^\s*\a'
- return &sw
- elseif cline == '' && line =~ '^\['
- return &sw
- else
- return -1
- endif
+ let line = getline(prevnonblank(v:lnum-1))
+ let cline = getline(v:lnum)
+ if line =~ '\\\@<!\%(\\\\\)*\\$'
+ " odd number of slashes, in a line continuation
+ return 2 * &sw
+ elseif cline =~ '^\s*\['
+ return 0
+ elseif cline =~ '^\s*\a'
+ return &sw
+ elseif cline == '' && line =~ '^\['
+ return &sw
+ else
+ return -1
+ endif
endfunction
diff --git a/runtime/indent/haml.vim b/runtime/indent/haml.vim
index c1feee09a9..079bd0513b 100644
--- a/runtime/indent/haml.vim
+++ b/runtime/indent/haml.vim
@@ -1,7 +1,7 @@
" Vim indent file
-" Language: HAML
-" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
-" Last Change: 2007 Dec 16
+" Language: Haml
+" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
+" Last Change: 2008 Sep 11
if exists("b:did_indent")
finish
@@ -44,8 +44,6 @@ function! GetHamlIndent()
if indent == indent(lnum)
let indent = cindent <= indent ? -1 : increase
endif
- "let indent = indent == indent(lnum) ? -1 : indent
- "let indent = indent > indent(lnum) + &sw ? indent(lnum) + &sw : indent
let group = synIDattr(synID(lnum,lastcol,1),'name')
@@ -53,9 +51,11 @@ function! GetHamlIndent()
return indent
elseif line =~ '^/\%(\[[^]]*\]\)\=$'
return increase
- elseif line =~ '^:'
+ elseif group == 'hamlFilter'
return increase
- elseif line =~ '^'.s:tag.'[=~-]\s*\%(\%(if\|else\|elsif\|unless\|case\|when\|while\|until\|for\|begin\|module\|class\|def\)\>\%(.*\<end\>\)\@!\|.*do |[^|]*|\s*$\)'
+ elseif line =~ '^'.s:tag.'[&!]\=[=~-]\s*\%(\%(if\|else\|elsif\|unless\|case\|when\|while\|until\|for\|begin\|module\|class\|def\)\>\%(.*\<end\>\)\@!\|.*do\%(\s*|[^|]*|\)\=\s*$\)'
+ return increase
+ elseif line =~ '^'.s:tag.'[&!]\=[=~-].*,\s*$'
return increase
elseif line == '-#'
return increase
diff --git a/runtime/indent/liquid.vim b/runtime/indent/liquid.vim
new file mode 100644
index 0000000000..08341b04f6
--- /dev/null
+++ b/runtime/indent/liquid.vim
@@ -0,0 +1,63 @@
+" Vim indent file
+" Language: Liquid
+" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
+" Last Change: 2010 May 21
+
+if exists('b:did_indent')
+ finish
+endif
+
+set indentexpr=
+if exists('b:liquid_subtype')
+ exe 'runtime! indent/'.b:liquid_subtype.'.vim'
+else
+ runtime! indent/html.vim
+endif
+unlet! b:did_indent
+
+if &l:indentexpr == ''
+ if &l:cindent
+ let &l:indentexpr = 'cindent(v:lnum)'
+ else
+ let &l:indentexpr = 'indent(prevnonblank(v:lnum-1))'
+ endif
+endif
+let b:liquid_subtype_indentexpr = &l:indentexpr
+
+let b:did_indent = 1
+
+setlocal indentexpr=GetLiquidIndent()
+setlocal indentkeys=o,O,*<Return>,<>>,{,},0),0],o,O,!^F,=end,=endif,=endunless,=endifchanged,=endcase,=endfor,=endtablerow,=endcapture,=else,=elsif,=when,=empty
+
+" Only define the function once.
+if exists('*GetLiquidIndent')
+ finish
+endif
+
+function! s:count(string,pattern)
+ let string = substitute(a:string,'\C'.a:pattern,"\n",'g')
+ return strlen(substitute(string,"[^\n]",'','g'))
+endfunction
+
+function! GetLiquidIndent(...)
+ if a:0 && a:1 == '.'
+ let v:lnum = line('.')
+ elseif a:0 && a:1 =~ '^\d'
+ let v:lnum = a:1
+ endif
+ let vcol = col('.')
+ call cursor(v:lnum,1)
+ exe "let ind = ".b:liquid_subtype_indentexpr
+ let lnum = prevnonblank(v:lnum-1)
+ let line = getline(lnum)
+ let cline = getline(v:lnum)
+ let line = substitute(line,'\C^\%(\s*{%\s*end\w*\s*%}\)\+','','')
+ let line .= matchstr(cline,'\C^\%(\s*{%\s*end\w*\s*%}\)\+')
+ let cline = substitute(cline,'\C^\%(\s*{%\s*end\w*\s*%}\)\+','','')
+ let ind += &sw * s:count(line,'{%\s*\%(if\|elsif\|else\|unless\|ifchanged\|case\|when\|for\|tablerow\|capture\)\>')
+ let ind -= &sw * s:count(line,'{%\s*end\%(if\|unless\|ifchanged\|case\|for\|tablerow\|capture\)\>')
+ let ind += &sw * s:count(line,'{%\s*\%(elsif\|else\|when\|empty\)\>')
+ let ind -= &sw * s:count(cline,'{%\s*\%(elsif\|else\|when\|empty\)\>')
+ let ind -= &sw * s:count(cline,'{%\s*end\w*$')
+ return ind
+endfunction
diff --git a/runtime/indent/sass.vim b/runtime/indent/sass.vim
index 45ca50f689..4622f00ff8 100644
--- a/runtime/indent/sass.vim
+++ b/runtime/indent/sass.vim
@@ -1,7 +1,7 @@
" Vim indent file
-" Language: SASS
-" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
-" Last Change: 2007 Dec 16
+" Language: Sass
+" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
+" Last Change: 2010 May 21
if exists("b:did_indent")
finish
@@ -17,7 +17,7 @@ if exists("*GetSassIndent")
finish
endif
-let s:property = '^\s*:\|^\s*[[:alnum:]-]\+:'
+let s:property = '^\s*:\|^\s*[[:alnum:]-]\+\%(:\|\s*=\)'
function! GetSassIndent()
let lnum = prevnonblank(v:lnum-1)
diff --git a/runtime/syntax/cucumber.vim b/runtime/syntax/cucumber.vim
index 258471a5b7..d85268143c 100644
--- a/runtime/syntax/cucumber.vim
+++ b/runtime/syntax/cucumber.vim
@@ -2,6 +2,7 @@
" Language: Cucumber
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Filenames: *.feature
+" Last Change: 2010 May 21
if exists("b:current_syntax")
finish
@@ -14,13 +15,16 @@ let g:cucumber_languages = {
\"en": {"and": "And\\>", "background": "Background\\>", "but": "But\\>", "examples": "Scenarios\\>\\|Examples\\>", "feature": "Feature\\>", "given": "Given\\>", "scenario": "Scenario\\>", "scenario_outline": "Scenario Outline\\>", "then": "Then\\>", "when": "When\\>"},
\"ar": {"and": "\\%u0648\\>", "background": "\\%u0627\\%u0644\\%u062e\\%u0644\\%u0641\\%u064a\\%u0629\\>", "but": "\\%u0644\\%u0643\\%u0646\\>", "examples": "\\%u0627\\%u0645\\%u062b\\%u0644\\%u0629\\>", "feature": "\\%u062e\\%u0627\\%u0635\\%u064a\\%u0629\\>", "given": "\\%u0628\\%u0641\\%u0631\\%u0636\\>", "scenario": "\\%u0633\\%u064a\\%u0646\\%u0627\\%u0631\\%u064a\\%u0648\\>", "scenario_outline": "\\%u0633\\%u064a\\%u0646\\%u0627\\%u0631\\%u064a\\%u0648 \\%u0645\\%u062e\\%u0637\\%u0637\\>", "then": "\\%u0627\\%u0630\\%u0627\\%u064b\\>\\|\\%u062b\\%u0645\\>", "when": "\\%u0639\\%u0646\\%u062f\\%u0645\\%u0627\\>\\|\\%u0645\\%u062a\\%u0649\\>"},
\"bg": {"and": "\\%u0418\\>", "background": "\\%u041f\\%u0440\\%u0435\\%u0434\\%u0438\\%u0441\\%u0442\\%u043e\\%u0440\\%u0438\\%u044f\\>", "but": "\\%u041d\\%u043e\\>", "examples": "\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\%u0438\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\%u043d\\%u043e\\%u0441\\%u0442\\>", "given": "\\%u0414\\%u0430\\%u0434\\%u0435\\%u043d\\%u043e\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "scenario_outline": "\\%u0420\\%u0430\\%u043c\\%u043a\\%u0430 \\%u043d\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "then": "\\%u0422\\%u043e\\>", "when": "\\%u041a\\%u043e\\%u0433\\%u0430\\%u0442\\%u043e\\>"},
- \"cat": {"and": "I\\>", "background": "Antecedents\\>\\|Rerefons\\>", "but": "Per\\%u00f2\\>", "examples": "Exemples\\>", "feature": "Caracter\\%u00edstica\\>", "given": "Donada\\>\\|Donat\\>", "scenario": "Escenari\\>", "scenario_outline": "Esquema de l'escenari\\>", "then": "Aleshores\\>", "when": "Quan\\>"},
+ \"ca": {"and": "I\\>", "background": "Antecedents\\>\\|Rerefons\\>", "but": "Per\\%u00f2\\>", "examples": "Exemples\\>", "feature": "Caracter\\%u00edstica\\>\\|Funcionalitat\\>", "given": "At\\%u00e8s\\>\\|Donada\\>\\|Donat\\>\\|Atesa\\>", "scenario": "Escenari\\>", "scenario_outline": "Esquema de l'escenari\\>", "then": "Aleshores\\>\\|Cal\\>", "when": "Quan\\>"},
\"cs": {"and": "A tak\\%u00e9\\>\\|A\\>", "background": "Pozad\\%u00ed\\>\\|Kontext\\>", "but": "Ale\\>", "examples": "P\\%u0159\\%u00edklady\\>", "feature": "Po\\%u017eadavek\\>", "given": "Pokud\\>", "scenario": "Sc\\%u00e9n\\%u00e1\\%u0159\\>", "scenario_outline": "N\\%u00e1\\%u010drt Sc\\%u00e9n\\%u00e1\\%u0159e\\>\\|Osnova sc\\%u00e9n\\%u00e1\\%u0159e\\>", "then": "Pak\\>", "when": "Kdy\\%u017e\\>"},
- \"cy": {"and": "A\\>", "background": "Cefndir\\>", "but": "Ond\\>", "examples": "Enghreifftiau\\>", "feature": "Arwedd\\>", "given": "anrhegedig a\\>", "scenario": "Scenario\\>", "scenario_outline": "Scenario Amlinellol\\>", "then": "Yna\\>", "when": "Pryd\\>"},
+ \"cy-GB": {"and": "A\\>", "background": "Cefndir\\>", "but": "Ond\\>", "examples": "Enghreifftiau\\>", "feature": "Arwedd\\>", "given": "Anrhegedig a\\>", "scenario": "Scenario\\>", "scenario_outline": "Scenario Amlinellol\\>", "then": "Yna\\>", "when": "Pryd\\>"},
\"da": {"and": "Og\\>", "background": "Baggrund\\>", "but": "Men\\>", "examples": "Eksempler\\>", "feature": "Egenskab\\>", "given": "Givet\\>", "scenario": "Scenarie\\>", "scenario_outline": "Abstrakt Scenario\\>", "then": "S\\%u00e5\\>", "when": "N\\%u00e5r\\>"},
- \"de": {"and": "Und\\>", "background": "Grundlage\\>", "but": "Aber\\>", "examples": "Beispiele\\>", "feature": "Funktionalit\\%u00e4t\\>", "given": "Gegeben sei\\>", "scenario": "Szenario\\>", "scenario_outline": "Szenariogrundriss\\>", "then": "Dann\\>", "when": "Wenn\\>"},
+ \"de": {"and": "Und\\>", "background": "Grundlage\\>", "but": "Aber\\>", "examples": "Beispiele\\>", "feature": "Funktionalit\\%u00e4t\\>", "given": "Gegeben sei\\>\\|Angenommen\\>", "scenario": "Szenario\\>", "scenario_outline": "Szenariogrundriss\\>", "then": "Dann\\>", "when": "Wenn\\>"},
+ \"en-Scouse": {"and": "An\\>", "background": "Dis is what went down\\>", "but": "Buh\\>", "examples": "Examples\\>", "feature": "Feature\\>", "given": "Youse know when youse got\\>\\|Givun\\>", "scenario": "The thing of it is\\>", "scenario_outline": "Wharrimean is\\>", "then": "Den youse gotta\\>\\|Dun\\>", "when": "Youse know like when\\>\\|Wun\\>"},
\"en-au": {"and": "N\\>", "background": "Background\\>", "but": "Cept\\>", "examples": "Cobber\\>", "feature": "Crikey\\>", "given": "Ya know how\\>", "scenario": "Mate\\>", "scenario_outline": "Blokes\\>", "then": "Ya gotta\\>", "when": "When\\>"},
\"en-lol": {"and": "AN\\>", "background": "B4\\>", "but": "BUT\\>", "examples": "EXAMPLZ\\>", "feature": "OH HAI\\>", "given": "I CAN HAZ\\>", "scenario": "MISHUN\\>", "scenario_outline": "MISHUN SRSLY\\>", "then": "DEN\\>", "when": "WEN\\>"},
+ \"en-tx": {"and": "And y'all\\>", "background": "Background\\>", "but": "But y'all\\>", "examples": "Examples\\>", "feature": "Feature\\>", "given": "Given y'all\\>", "scenario": "Scenario\\>", "scenario_outline": "All y'all\\>", "then": "Then y'all\\>", "when": "When y'all\\>"},
+ \"eo": {"and": "Kaj\\>", "background": "Fono\\>", "but": "Sed\\>", "examples": "Ekzemploj\\>", "feature": "Trajto\\>", "given": "Donita\\%u0135o\\>", "scenario": "Scenaro\\>", "scenario_outline": "Konturo de la scenaro\\>", "then": "Do\\>", "when": "Se\\>"},
\"es": {"and": "Y\\>", "background": "Antecedentes\\>", "but": "Pero\\>", "examples": "Ejemplos\\>", "feature": "Caracter\\%u00edstica\\>", "given": "Dado\\>", "scenario": "Escenario\\>", "scenario_outline": "Esquema del escenario\\>", "then": "Entonces\\>", "when": "Cuando\\>"},
\"et": {"and": "Ja\\>", "background": "Taust\\>", "but": "Kuid\\>", "examples": "Juhtumid\\>", "feature": "Omadus\\>", "given": "Eeldades\\>", "scenario": "Stsenaarium\\>", "scenario_outline": "Raamstsenaarium\\>", "then": "Siis\\>", "when": "Kui\\>"},
\"fi": {"and": "Ja\\>", "background": "Tausta\\>", "but": "Mutta\\>", "examples": "Tapaukset\\>", "feature": "Ominaisuus\\>", "given": "Oletetaan\\>", "scenario": "Tapaus\\>", "scenario_outline": "Tapausaihio\\>", "then": "Niin\\>", "when": "Kun\\>"},
@@ -31,21 +35,23 @@ let g:cucumber_languages = {
\"id": {"and": "Dan\\>", "background": "Dasar\\>", "but": "Tapi\\>", "examples": "Contoh\\>", "feature": "Fitur\\>", "given": "Dengan\\>", "scenario": "Skenario\\>", "scenario_outline": "Skenario konsep\\>", "then": "Maka\\>", "when": "Ketika\\>"},
\"it": {"and": "E\\>", "background": "Contesto\\>", "but": "Ma\\>", "examples": "Esempi\\>", "feature": "Funzionalit\\%u00e0\\>", "given": "Dato\\>", "scenario": "Scenario\\>", "scenario_outline": "Schema dello scenario\\>", "then": "Allora\\>", "when": "Quando\\>"},
\"ja": {"and": "\\%u304b\\%u3064", "background": "\\%u80cc\\%u666f\\>", "but": "\\%u3057\\%u304b\\%u3057\\|\\%u305f\\%u3060\\%u3057\\|\\%u4f46\\%u3057", "examples": "\\%u30b5\\%u30f3\\%u30d7\\%u30eb\\>\\|\\%u4f8b\\>", "feature": "\\%u30d5\\%u30a3\\%u30fc\\%u30c1\\%u30e3\\>\\|\\%u6a5f\\%u80fd\\>", "given": "\\%u524d\\%u63d0", "scenario": "\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\>", "scenario_outline": "\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\%u30a2\\%u30a6\\%u30c8\\%u30e9\\%u30a4\\%u30f3\\>\\|\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\%u30c6\\%u30f3\\%u30d7\\%u30ec\\%u30fc\\%u30c8\\>\\|\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\%u30c6\\%u30f3\\%u30d7\\%u30ec\\>\\|\\%u30c6\\%u30f3\\%u30d7\\%u30ec\\>", "then": "\\%u306a\\%u3089\\%u3070", "when": "\\%u3082\\%u3057"},
- \"ko": {"and": "\\%uadf8\\%ub9ac\\%uace0", "background": "\\%ubc30\\%uacbd\\>", "but": "\\%ud558\\%uc9c0\\%ub9cc", "examples": "\\%uc608\\>", "feature": "\\%uae30\\%ub2a5\\>", "given": "\\%uc870\\%uac74", "scenario": "\\%uc2dc\\%ub098\\%ub9ac\\%uc624\\>", "scenario_outline": "\\%uc2dc\\%ub098\\%ub9ac\\%uc624 \\%uac1c\\%uc694\\>", "then": "\\%uadf8\\%ub7ec\\%uba74", "when": "\\%ub9cc\\%uc77c"},
+ \"ko": {"and": "\\%uadf8\\%ub9ac\\%uace0", "background": "\\%ubc30\\%uacbd\\>", "but": "\\%ud558\\%uc9c0\\%ub9cc\\|\\%ub2e8", "examples": "\\%uc608\\>", "feature": "\\%uae30\\%ub2a5\\>", "given": "\\%uc870\\%uac74\\|\\%uba3c\\%uc800", "scenario": "\\%uc2dc\\%ub098\\%ub9ac\\%uc624\\>", "scenario_outline": "\\%uc2dc\\%ub098\\%ub9ac\\%uc624 \\%uac1c\\%uc694\\>", "then": "\\%uadf8\\%ub7ec\\%uba74", "when": "\\%ub9cc\\%uc77c\\|\\%ub9cc\\%uc57d"},
\"lt": {"and": "Ir\\>", "background": "Kontekstas\\>", "but": "Bet\\>", "examples": "Pavyzd\\%u017eiai\\>\\|Scenarijai\\>\\|Variantai\\>", "feature": "Savyb\\%u0117\\>", "given": "Duota\\>", "scenario": "Scenarijus\\>", "scenario_outline": "Scenarijaus \\%u0161ablonas\\>", "then": "Tada\\>", "when": "Kai\\>"},
+ \"lu": {"and": "an\\>\\|a\\>", "background": "Hannergrond\\>", "but": "m\\%u00e4\\>\\|awer\\>", "examples": "Beispiller\\>", "feature": "Funktionalit\\%u00e9it\\>", "given": "ugeholl\\>", "scenario": "Szenario\\>", "scenario_outline": "Plang vum Szenario\\>", "then": "dann\\>", "when": "wann\\>"},
\"lv": {"and": "Un\\>", "background": "Situ\\%u0101cija\\>\\|Konteksts\\>", "but": "Bet\\>", "examples": "Piem\\%u0113ri\\>\\|Paraugs\\>", "feature": "Funkcionalit\\%u0101te\\>\\|F\\%u012b\\%u010da\\>", "given": "Kad\\>", "scenario": "Scen\\%u0101rijs\\>", "scenario_outline": "Scen\\%u0101rijs p\\%u0113c parauga\\>", "then": "Tad\\>", "when": "Ja\\>"},
\"nl": {"and": "En\\>", "background": "Achtergrond\\>", "but": "Maar\\>", "examples": "Voorbeelden\\>", "feature": "Functionaliteit\\>", "given": "Gegeven\\>\\|Stel\\>", "scenario": "Scenario\\>", "scenario_outline": "Abstract Scenario\\>", "then": "Dan\\>", "when": "Als\\>"},
\"no"