Updated runtime files.

This commit is contained in:
Bram Moolenaar
2014-03-22 21:02:50 +01:00
parent ed287f9a4e
commit a687837516
23 changed files with 5026 additions and 7059 deletions

View File

@ -1,9 +1,10 @@
" Vim indent file
" Language: J
" Maintainer: David Bürgin <676c7473@gmail.com>
" Last Change: 2013-09-21
" URL: https://github.com/glts/vim-j
" Last Change: 2014-03-17
if exists("b:did_indent")
if exists('b:did_indent')
finish
endif
let b:did_indent = 1
@ -12,9 +13,9 @@ setlocal indentexpr=GetJIndent()
setlocal indentkeys-=0{,0},\:,0#
setlocal indentkeys+=0),=case.,=catch.,=catchd.,=catcht.,=do.,=else.,=elseif.,=end.,=fcase.
let b:undo_indent = "setl indk< inde<"
let b:undo_indent = 'setlocal indentkeys< indentexpr<'
if exists("*GetJIndent")
if exists('*GetJIndent')
finish
endif
@ -27,11 +28,11 @@ function GetJIndent()
let indent = indent(prevlnum)
if getline(prevlnum) =~# '^\s*\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|fcase\|for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.'
if getline(prevlnum) !~# '\<end\.'
let indent += &shiftwidth
let indent += shiftwidth()
endif
endif
if getline(v:lnum) =~# '^\s*\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|end\|fcase\)\.'
let indent -= &shiftwidth
if getline(v:lnum) =~# '^\s*\%(\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|end\|fcase\)\.\)\|)'
let indent -= shiftwidth()
endif
return indent
endfunction