Fix for vimlint
This commit is contained in:
parent
8d61e62a65
commit
c871e0f84b
@ -79,9 +79,9 @@ function! neosnippet#view#_expand(cur_text, col, trigger_name) "{{{
|
|||||||
let end_line = line('.') + len(snippet_lines) - 1
|
let end_line = line('.') + len(snippet_lines) - 1
|
||||||
|
|
||||||
let snippet_lines[0] = cur_text . snippet_lines[0]
|
let snippet_lines[0] = cur_text . snippet_lines[0]
|
||||||
let next_col = len(snippet_lines[-1]) + 1
|
|
||||||
let snippet_lines[-1] = snippet_lines[-1] . next_line
|
let snippet_lines[-1] = snippet_lines[-1] . next_line
|
||||||
|
|
||||||
|
let foldmethod_save = ''
|
||||||
if has('folding')
|
if has('folding')
|
||||||
" Note: Change foldmethod to "manual". Because, if you use foldmethod is
|
" Note: Change foldmethod to "manual". Because, if you use foldmethod is
|
||||||
" expr, whole snippet is visually selected.
|
" expr, whole snippet is visually selected.
|
||||||
@ -172,8 +172,6 @@ function! s:indent_snippet(begin, end) "{{{
|
|||||||
|
|
||||||
let pos = getpos('.')
|
let pos = getpos('.')
|
||||||
|
|
||||||
let neosnippet = neosnippet#variables#current_neosnippet()
|
|
||||||
|
|
||||||
let equalprg = &l:equalprg
|
let equalprg = &l:equalprg
|
||||||
try
|
try
|
||||||
setlocal equalprg=
|
setlocal equalprg=
|
||||||
@ -211,8 +209,8 @@ function! neosnippet#view#_get_snippet_range(begin_line, begin_patterns, end_lin
|
|||||||
if empty(a:begin_patterns)
|
if empty(a:begin_patterns)
|
||||||
let begin = line('.') - 50
|
let begin = line('.') - 50
|
||||||
else
|
else
|
||||||
let [begin, _] = searchpos('^' . neosnippet#util#escape_pattern(
|
let begin = searchpos('^' . neosnippet#util#escape_pattern(
|
||||||
\ a:begin_patterns[0]) . '$', 'bnW')
|
\ a:begin_patterns[0]) . '$', 'bnW')[0]
|
||||||
if begin <= 0
|
if begin <= 0
|
||||||
let begin = line('.') - 50
|
let begin = line('.') - 50
|
||||||
endif
|
endif
|
||||||
@ -225,8 +223,8 @@ function! neosnippet#view#_get_snippet_range(begin_line, begin_patterns, end_lin
|
|||||||
if empty(a:end_patterns)
|
if empty(a:end_patterns)
|
||||||
let end = line('.') + 50
|
let end = line('.') + 50
|
||||||
else
|
else
|
||||||
let [end, _] = searchpos('^' . neosnippet#util#escape_pattern(
|
let end = searchpos('^' . neosnippet#util#escape_pattern(
|
||||||
\ a:end_patterns[0]) . '$', 'nW')
|
\ a:end_patterns[0]) . '$', 'nW')[0]
|
||||||
if end <= 0
|
if end <= 0
|
||||||
let end = line('.') + 50
|
let end = line('.') + 50
|
||||||
endif
|
endif
|
||||||
@ -366,7 +364,6 @@ function! s:expand_target_placeholder(line, col) "{{{
|
|||||||
|
|
||||||
let cur_text = getline(a:line)[: a:col-2]
|
let cur_text = getline(a:line)[: a:col-2]
|
||||||
let target_lines[0] = cur_text . target_lines[0]
|
let target_lines[0] = cur_text . target_lines[0]
|
||||||
let next_col = len(target_lines[-1]) + 1
|
|
||||||
let target_lines[-1] = target_lines[-1] . next_line
|
let target_lines[-1] = target_lines[-1] . next_line
|
||||||
|
|
||||||
let begin_line = a:line
|
let begin_line = a:line
|
||||||
@ -414,10 +411,10 @@ function! s:search_sync_placeholder(start, end, number) "{{{
|
|||||||
let pattern = substitute(
|
let pattern = substitute(
|
||||||
\ neosnippet#get_mirror_placeholder_marker_pattern(),
|
\ neosnippet#get_mirror_placeholder_marker_pattern(),
|
||||||
\ '\\d\\+', a:number, '')
|
\ '\\d\\+', a:number, '')
|
||||||
for line in filter(range(a:start, a:end),
|
if !empty(filter(range(a:start, a:end),
|
||||||
\ 'getline(v:val) =~ pattern')
|
\ 'getline(v:val) =~ pattern'))
|
||||||
return a:number
|
return a:number
|
||||||
endfor
|
endif
|
||||||
|
|
||||||
return -1
|
return -1
|
||||||
endfunction"}}}
|
endfunction"}}}
|
||||||
|
@ -322,7 +322,6 @@ endfunction
|
|||||||
function! s:_path2project_directory_others(vcs, path)
|
function! s:_path2project_directory_others(vcs, path)
|
||||||
let vcs = a:vcs
|
let vcs = a:vcs
|
||||||
let search_directory = a:path
|
let search_directory = a:path
|
||||||
let directory = ''
|
|
||||||
|
|
||||||
let find_directory = s:escape_file_searching(search_directory)
|
let find_directory = s:escape_file_searching(search_directory)
|
||||||
let d = finddir(vcs, find_directory . ';')
|
let d = finddir(vcs, find_directory . ';')
|
||||||
|
@ -29,6 +29,7 @@ let s:is_unix = has('unix')
|
|||||||
" Unix:
|
" Unix:
|
||||||
" using :! , execute program in the background by shell.
|
" using :! , execute program in the background by shell.
|
||||||
function! s:spawn(expr, ...)
|
function! s:spawn(expr, ...)
|
||||||
|
let shellslash = 0
|
||||||
if s:is_windows
|
if s:is_windows
|
||||||
let shellslash = &l:shellslash
|
let shellslash = &l:shellslash
|
||||||
setlocal noshellslash
|
setlocal noshellslash
|
||||||
|
Loading…
Reference in New Issue
Block a user