mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
@ -10,10 +10,10 @@
|
||||
" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
" sell copies of the Software, and to permit persons to whom the Software is
|
||||
" furnished to do so, subject to the following conditions:
|
||||
"
|
||||
"
|
||||
" The above copyright notice and this permission notice shall be included in
|
||||
" all copies or substantial portions of the Software.
|
||||
"
|
||||
"
|
||||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@ -41,6 +41,10 @@ let s:l1 = -1
|
||||
let s:c0 = -1
|
||||
let s:c1 = -1
|
||||
|
||||
if !exists("g:indent_object_except_first_level")
|
||||
let g:indent_object_except_first_level = 1
|
||||
endif
|
||||
|
||||
function! <Sid>TextObject(inner, incbelow, vis, range, count)
|
||||
|
||||
" Record the current state of the visual region.
|
||||
@ -109,7 +113,10 @@ function! <Sid>TextObject(inner, incbelow, vis, range, count)
|
||||
" Search backward for the first line with less indent than the target
|
||||
" indent (skipping blank lines).
|
||||
let blnk = getline(l_1) =~ "^\\s*$"
|
||||
while l_1 > 0 && ((idnt == 0 && !blnk) || (idnt != 0 && (blnk || indent(l_1) >= idnt)))
|
||||
while l_1 > 0 && (blnk || indent(l_1) >= idnt)
|
||||
if g:indent_object_except_first_level && idnt == 0 && blnk
|
||||
break
|
||||
endif
|
||||
if !blnk || !a:inner
|
||||
let l_1o = l_1
|
||||
endif
|
||||
@ -121,7 +128,10 @@ function! <Sid>TextObject(inner, incbelow, vis, range, count)
|
||||
" indent (skipping blank lines).
|
||||
let line_cnt = line("$")
|
||||
let blnk = getline(l2) =~ "^\\s*$"
|
||||
while l2 <= line_cnt && ((idnt == 0 && !blnk) || (idnt != 0 && (blnk || indent(l2) >= idnt)))
|
||||
while l2 <= line_cnt && (blnk || indent(l2) >= idnt)
|
||||
if g:indent_object_except_first_level && idnt == 0 && blnk
|
||||
break
|
||||
endif
|
||||
if !blnk || !a:inner
|
||||
let l2o = l2
|
||||
endif
|
||||
|
Reference in New Issue
Block a user