use either 'e' or 'i' for empty buffer

People seem to like both, so I made both of them defaults.
(I changed [i] back to [e] nevertheless.)
This commit is contained in:
Marco Hinz 2013-04-30 00:03:47 +02:00
parent b5ec1605cc
commit a5021aacdd
4 changed files with 17 additions and 6 deletions

View file

@ -11,8 +11,15 @@ _1)_ If you start Vim without giving any filenames to it (or pipe stuff to it so
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 even
double-click anywhere on the line now.)
is written between the square brackets on that line. You can even
double-click anywhere on the line now.
Per default the startify buffer gets closed automatically, if an entry was
selected.
You can reopen the screen via :Startify.
If you want to open an empty buffer, hit either 'e' or 'i'. Quit via 'q'.
_2)_ It eases handling of loading and saving sessions by only working with a
certain directory. Two commands are used for convenience:

View file

@ -46,13 +46,16 @@ Startify basically provides two things:
should be available in the start screen.
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.
key in whatever is written between the square brackets on that line. You
can even double-click anywhere on the line now.
Per default the startify buffer gets closed automatically, if an entry was
selected.
You can reopen the screen via :Startify.
If you want to open an empty buffer, hit either 'e' or 'i'. Quit via 'q'.
2) It eases handling of loading and saving sessions by only working with a
certain directory. Two commands are used for convenience:
@ -153,7 +156,7 @@ start screen.
let g:startify_enable_special = 1
Don't show [i] and [q].
Don't show <empty buffer> and <quit>.
==============================================================================

View file

@ -47,7 +47,7 @@ function! s:insane_in_the_membrane() abort
let cnt = 0
if special
call append('$', ' [i] <empty buffer>')
call append('$', ' [e] <empty buffer>')
endif
if get(g:, 'startify_show_files', 1) && !empty(v:oldfiles)
@ -99,6 +99,7 @@ function! s:insane_in_the_membrane() abort
setlocal nomodifiable nomodified
nnoremap <buffer><silent> e :enew<cr>
nnoremap <buffer><silent> i :enew<cr>
nnoremap <buffer> <cr> :normal <c-r><c-w><cr>
nnoremap <buffer> <2-LeftMouse> :execute 'normal '. matchstr(getline('.'), '\w\+')<cr>

View file

@ -11,7 +11,7 @@ let s:sep = startify#get_sep()
syntax match StartifySpecial /\V<empty buffer>\|<quit>/
syntax match StartifyBracket /\[\|\]/
syntax match StartifyNumber /\v\[[iq[:digit:]]+\]/hs=s+1,he=e-1 contains=StartifyBracket
syntax match StartifyNumber /\v\[[eq[:digit:]]+\]/hs=s+1,he=e-1 contains=StartifyBracket
execute 'syntax match StartifySlash /\'. s:sep .'/'
execute 'syntax match StartifyPath /\%9c.*\'. s:sep .'/ contains=StartifySlash'