diff --git a/autoload/startify.vim b/autoload/startify.vim index 6ec4b2e..905d7e0 100644 --- a/autoload/startify.vim +++ b/autoload/startify.vim @@ -24,9 +24,9 @@ function! startify#get_sep() abort return !exists('+shellslash') || &shellslash ? '/' : '\' endfunction -function! startify#process_skiplist(arg) abort +function! startify#is_in_skiplist(arg) abort for regexp in g:startify_skiplist - if a:arg =~# regexp + if (a:arg =~# regexp) return 1 endif endfor @@ -36,7 +36,7 @@ function! startify#save_session(...) abort if !isdirectory(g:startify_session_dir) if exists('*mkdir') echo 'The session directory does not exist: '. g:startify_session_dir .'. Create it? [y/n]' | redraw - if nr2char(getchar()) == 'y' + if (nr2char(getchar()) == 'y') call mkdir(g:startify_session_dir, 'p') else echo diff --git a/plugin/startify.vim b/plugin/startify.vim index 20779ad..268fa99 100644 --- a/plugin/startify.vim +++ b/plugin/startify.vim @@ -28,13 +28,13 @@ command! -nargs=0 -bar Startify enew | call s:insane_in_the_membrane() function! s:insane_in_the_membrane() abort if !empty(v:servername) && exists('g:startify_skiplist_server') for servname in g:startify_skiplist_server - if servname == v:servername + if (servname == v:servername) return endif endfor endif setlocal nonumber noswapfile bufhidden=wipe - if v:version >= 703 + if (v:version >= 703) setlocal norelativenumber endif if get(g:, 'startify_unlisted_buffer', 1) @@ -57,13 +57,13 @@ function! s:insane_in_the_membrane() abort endif for fname in v:oldfiles let expfname = expand(fname) - if !filereadable(expfname) || (exists('g:startify_skiplist') && startify#process_skiplist(expfname)) + if !filereadable(expfname) || (exists('g:startify_skiplist') && startify#is_in_skiplist(expfname)) continue endif call append('$', ' ['. cnt .']'. repeat(' ', 3 - strlen(string(cnt))) . fname) execute 'nnoremap '. cnt .' :edit '. startify#escape(fname) .' lcd %:h' let cnt += 1 - if cnt == numfiles + if (cnt == numfiles) break endif endfor @@ -103,7 +103,7 @@ function! s:insane_in_the_membrane() abort nnoremap :normal nnoremap <2-LeftMouse> :execute 'normal '. matchstr(getline('.'), '\w\+') nnoremap q - \ :if len(filter(range(0, bufnr('$')), 'buflisted(v:val)')) > 1 + \ :if (len(filter(range(0, bufnr('$')), 'buflisted(v:val)')) > 1) \ bd \ else \ quit @@ -125,7 +125,7 @@ function! s:set_cursor() abort let s:line_old = exists('s:line_new') ? s:line_new : 5 let s:line_new = line('.') if empty(getline(s:line_new)) - if s:line_new > s:line_old + if (s:line_new > s:line_old) let s:line_new += 1 call cursor(s:line_new, 5) " going down else diff --git a/syntax/startify.vim b/syntax/startify.vim index b3ec8e6..c8af2fd 100644 --- a/syntax/startify.vim +++ b/syntax/startify.vim @@ -9,9 +9,9 @@ endif let s:sep = startify#get_sep() -syntax match StartifySpecial /\V\|/ +syntax match StartifySpecial /\V\|/ syntax match StartifyBracket /\[\|\]/ -syntax match StartifyNumber /\v\[[iq[:digit:]]+\]/hs=s+1,he=e-1 contains=StartifyBracket +syntax match StartifyNumber /\v\[[iq[:digit:]]+\]/hs=s+1,he=e-1 contains=StartifyBracket execute 'syntax match StartifySlash /\'. s:sep .'/' execute 'syntax match StartifyPath /\%9c.*\'. s:sep .'/ contains=StartifySlash'