add :Startify

This commit is contained in:
Marco Hinz 2013-04-25 09:33:07 +02:00
parent 93a639ef55
commit edcae997e7
2 changed files with 16 additions and 6 deletions

View file

@ -44,8 +44,13 @@ Startify basically provides two things:
Additionally, you can define bookmarks, thus entries for files that always
should be available in the start screen.
You can either navigate to a certain menu entry or you just key in whatever
is written between the square brackets on that line.
You can either navigate to a certain menu entry and hit enter or you just
key in whatever is written between the square brackets on that line.
Per default the startify buffer gets closed automatically, if an entry was
selected.
You can reopen the screen via :Startify.
2) It eases handling of loading and saving sessions by only working with a
certain directory. Two commands are used for convenience:
@ -112,8 +117,6 @@ start screen.
==============================================================================
4. Commands *startify-commands*
There are only two commands for handling sessions:
:SLoad load a session
:SSave save a session
@ -124,6 +127,11 @@ Providing only a part of the session name works too, if you complete the
argument with either <c-d> or <tab> afterwards.
:Startify
Open the startify buffer.
==============================================================================
5. FAQ *startify-faq*

View file

@ -16,12 +16,12 @@ augroup startify
autocmd VimEnter *
\ if !argc() && (line2byte('$') == -1) |
\ call s:start() |
\ call cursor(6, 5) |
\endif
\ endif
augroup END
command! -nargs=? -bar -complete=customlist,startify#get_session_names SSave call startify#save_session(<f-args>)
command! -nargs=? -bar -complete=customlist,startify#get_session_names SLoad call startify#load_session(<f-args>)
command! -nargs=0 -bar Startify enew | call s:start()
" Function: s:start {{{1
function! s:start() abort
@ -90,6 +90,8 @@ function! s:start() abort
autocmd! startify *
autocmd startify CursorMoved <buffer> call cursor(line('.') < 4 ? 4 : 0, 5)
autocmd startify BufLeave <buffer> autocmd! startify *
call cursor(6, 5)
endfunction
" vim: et sw=2 sts=2