mirror of
https://github.com/amix/vimrc
synced 2025-06-30 11:54:59 +08:00
Updated plugins
This commit is contained in:
@ -30,6 +30,16 @@ endfunction
|
||||
" SECTION: General Functions {{{1
|
||||
"============================================================
|
||||
|
||||
" FUNCTION: nerdtree#closeTreeOnOpen() {{{2
|
||||
function! nerdtree#closeTreeOnOpen() abort
|
||||
return g:NERDTreeQuitOnOpen == 1 || g:NERDTreeQuitOnOpen == 3
|
||||
endfunction
|
||||
|
||||
" FUNCTION: nerdtree#closeBookmarksOnOpen() {{{2
|
||||
function! nerdtree#closeBookmarksOnOpen() abort
|
||||
return g:NERDTreeQuitOnOpen == 2 || g:NERDTreeQuitOnOpen == 3
|
||||
endfunction
|
||||
|
||||
" FUNCTION: nerdtree#slash() {{{2
|
||||
" Return the path separator used by the underlying file system. Special
|
||||
" consideration is taken for the use of the 'shellslash' option on Windows
|
||||
@ -46,28 +56,6 @@ function! nerdtree#slash() abort
|
||||
return '/'
|
||||
endfunction
|
||||
|
||||
"FUNCTION: nerdtree#and(x,y) {{{2
|
||||
" Implements and() function for Vim <= 7.4
|
||||
function! nerdtree#and(x,y) abort
|
||||
if exists('*and')
|
||||
return and(a:x, a:y)
|
||||
else
|
||||
let l:x = a:x
|
||||
let l:y = a:y
|
||||
let l:n = 0
|
||||
let l:result = 0
|
||||
while l:x > 0 && l:y > 0
|
||||
if (l:x % 2) && (l:y % 2)
|
||||
let l:result += float2nr(pow(2, l:n))
|
||||
endif
|
||||
let l:x = float2nr(l:x / 2)
|
||||
let l:y = float2nr(l:y / 2)
|
||||
let l:n += 1
|
||||
endwhile
|
||||
return l:result
|
||||
endif
|
||||
endfunction
|
||||
|
||||
"FUNCTION: nerdtree#checkForBrowse(dir) {{{2
|
||||
"inits a window tree in the current buffer if appropriate
|
||||
function! nerdtree#checkForBrowse(dir) abort
|
||||
|
Reference in New Issue
Block a user