mirror of
https://github.com/amix/vimrc
synced 2025-08-04 12:25:00 +08:00
Updated plugins
This commit is contained in:
@ -77,26 +77,6 @@ function! ale#path#ResolveLocalPath(buffer, search_string, global_fallback) abor
|
||||
return l:path
|
||||
endfunction
|
||||
|
||||
" Output 'cd <directory> && '
|
||||
" This function can be used changing the directory for a linter command.
|
||||
function! ale#path#CdString(directory) abort
|
||||
if has('win32')
|
||||
return 'cd /d ' . ale#Escape(a:directory) . ' && '
|
||||
endif
|
||||
|
||||
return 'cd ' . ale#Escape(a:directory) . ' && '
|
||||
endfunction
|
||||
|
||||
" Output 'cd <buffer_filename_directory> && '
|
||||
" This function can be used changing the directory for a linter command.
|
||||
function! ale#path#BufferCdString(buffer) abort
|
||||
if has('win32')
|
||||
return 'cd /d %s:h && '
|
||||
endif
|
||||
|
||||
return 'cd %s:h && '
|
||||
endfunction
|
||||
|
||||
" Return 1 if a path is an absolute path.
|
||||
function! ale#path#IsAbsolute(filename) abort
|
||||
if has('win32') && a:filename[:0] is# '\'
|
||||
@ -136,7 +116,7 @@ function! ale#path#Dirname(path) abort
|
||||
endif
|
||||
|
||||
" For /foo/bar/ we need :h:h to get /foo
|
||||
if a:path[-1:] is# '/'
|
||||
if a:path[-1:] is# '/' || (has('win32') && a:path[-1:] is# '\')
|
||||
return fnamemodify(a:path, ':h:h')
|
||||
endif
|
||||
|
||||
|
Reference in New Issue
Block a user