diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-05-01 13:19:45 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-05-01 13:23:12 +0200 |
commit | ac107f7fddc59ef286e3ef3979afe0ea5e94633a (patch) | |
tree | 4e529000dac782774d791af5bacec76c0b94f593 /runtime/indent/html.vim | |
parent | eb7ea6e12253d6fb9296113b01f5d257341a7a18 (diff) | |
download | rneovim-ac107f7fddc59ef286e3ef3979afe0ea5e94633a.tar.gz rneovim-ac107f7fddc59ef286e3ef3979afe0ea5e94633a.tar.bz2 rneovim-ac107f7fddc59ef286e3ef3979afe0ea5e94633a.zip |
vim-patch:690afe1fef87
Update runtime files.
https://github.com/vim/vim/commit/690afe1fef87e7eef6fb7343a926617d5f7315fa
Diffstat (limited to 'runtime/indent/html.vim')
-rw-r--r-- | runtime/indent/html.vim | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/runtime/indent/html.vim b/runtime/indent/html.vim index 13adaae54c..57ba53ecd4 100644 --- a/runtime/indent/html.vim +++ b/runtime/indent/html.vim @@ -2,7 +2,7 @@ " Header: "{{{ " Maintainer: Bram Moolenaar " Original Author: Andy Wokula <anwoku@yahoo.de> -" Last Change: 2016 Mar 30 +" Last Change: 2017 Jan 17 " Version: 1.0 " Description: HTML indent script with cached state for faster indenting on a " range of lines. @@ -25,27 +25,22 @@ if exists("b:did_indent") "{{{ finish endif + +" Load the Javascript indent script first, it defines GetJavascriptIndent(). +" Undo the rest. +" Load base python indent. +if !exists('*GetJavascriptIndent') + runtime! indent/javascript.vim +endif let b:did_indent = 1 setlocal indentexpr=HtmlIndent() setlocal indentkeys=o,O,<Return>,<>>,{,},!^F -" "j1" is included to make cindent() work better with Javascript. -setlocal cino=j1 -" "J1" should be included, but it doen't work properly before 7.4.355. -if has("patch-7.4.355") - setlocal cino+=J1 -endif -" Before patch 7.4.355 indenting after "(function() {" does not work well, add -" )2 to limit paren search. -if !has("patch-7.4.355") - setlocal cino+=)2 -endif - " Needed for % to work when finding start/end of a tag. setlocal matchpairs+=<:> -let b:undo_indent = "setlocal inde< indk< cino<" +let b:undo_indent = "setlocal inde< indk<" " b:hi_indent keeps state to speed up indenting consecutive lines. let b:hi_indent = {"lnum": -1} @@ -596,7 +591,7 @@ func! s:Alien3() return eval(b:hi_js1indent) endif if b:hi_indent.scripttype == "javascript" - return cindent(v:lnum) + return GetJavascriptIndent() else return -1 endif |