diff --git a/doc/startify.txt b/doc/startify.txt index fb81e19..543e5b0 100644 --- a/doc/startify.txt +++ b/doc/startify.txt @@ -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 or afterwards. + :Startify + +Open the startify buffer. + + ============================================================================== 5. FAQ *startify-faq* diff --git a/plugin/startify.vim b/plugin/startify.vim index 717bef1..1ec92eb 100644 --- a/plugin/startify.vim +++ b/plugin/startify.vim @@ -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() command! -nargs=? -bar -complete=customlist,startify#get_session_names SLoad call startify#load_session() +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 call cursor(line('.') < 4 ? 4 : 0, 5) autocmd startify BufLeave autocmd! startify * + + call cursor(6, 5) endfunction " vim: et sw=2 sts=2