autoload: add marker folds

This commit is contained in:
Marco Hinz 2013-05-02 23:34:45 +02:00
parent 679b3284a5
commit 7724dde313

View file

@ -8,22 +8,27 @@ if exists('g:autoloaded_startify') || &cp
endif endif
let g:autoloaded_startify = 1 let g:autoloaded_startify = 1
" Function: startify#get_session_names {{{1
function! startify#get_session_names(lead, ...) abort function! startify#get_session_names(lead, ...) abort
return map(split(globpath(g:startify_session_dir, '*'.a:lead.'*', '\n')), 'fnamemodify(v:val, ":t")') return map(split(globpath(g:startify_session_dir, '*'.a:lead.'*', '\n')), 'fnamemodify(v:val, ":t")')
endfunction endfunction
" Function: startify#get_session_names_as_string {{{1
function! startify#get_session_names_as_string(lead, ...) abort function! startify#get_session_names_as_string(lead, ...) abort
return join(map(split(globpath(g:startify_session_dir, '*'.a:lead.'*', '\n')), 'fnamemodify(v:val, ":t")'), "\n") return join(map(split(globpath(g:startify_session_dir, '*'.a:lead.'*', '\n')), 'fnamemodify(v:val, ":t")'), "\n")
endfunction endfunction
" Function: startify#escape {{{1
function! startify#escape(path) abort function! startify#escape(path) abort
return !exists('+shellslash') || &shellslash ? fnameescape(a:path) : escape(a:path, '\') return !exists('+shellslash') || &shellslash ? fnameescape(a:path) : escape(a:path, '\')
endfunction endfunction
" Function: startify#get_separator {{{1
function! startify#get_separator() abort function! startify#get_separator() abort
return !exists('+shellslash') || &shellslash ? '/' : '\' return !exists('+shellslash') || &shellslash ? '/' : '\'
endfunction endfunction
" Function: startify#is_in_skiplist {{{1
function! startify#is_in_skiplist(arg) abort function! startify#is_in_skiplist(arg) abort
for regexp in g:startify_skiplist for regexp in g:startify_skiplist
if (a:arg =~# regexp) if (a:arg =~# regexp)
@ -32,6 +37,7 @@ function! startify#is_in_skiplist(arg) abort
endfor endfor
endfunction endfunction
" Function: startify#delete_session {{{1
function! startify#delete_session(...) abort function! startify#delete_session(...) abort
if !isdirectory(g:startify_session_dir) if !isdirectory(g:startify_session_dir)
echo 'The session directory does not exist: '. g:startify_session_dir echo 'The session directory does not exist: '. g:startify_session_dir
@ -56,6 +62,7 @@ function! startify#delete_session(...) abort
endif endif
endfunction endfunction
" Function: startify#save_session {{{1
function! startify#save_session(...) abort function! startify#save_session(...) abort
if !isdirectory(g:startify_session_dir) if !isdirectory(g:startify_session_dir)
if exists('*mkdir') if exists('*mkdir')
@ -87,6 +94,7 @@ function! startify#save_session(...) abort
endif endif
endfunction endfunction
" Function: startify#load_session {{{1
function! startify#load_session(...) abort function! startify#load_session(...) abort
if !isdirectory(g:startify_session_dir) if !isdirectory(g:startify_session_dir)
echo 'The session directory does not exist: '. g:startify_session_dir echo 'The session directory does not exist: '. g:startify_session_dir