Procházet zdrojové kódy

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.)
Marco Hinz před 12 roky
rodič
revize
a5021aacdd
4 změnil soubory, kde provedl 17 přidání a 6 odebrání
  1. 9 2
      README.md
  2. 5 2
      doc/startify.txt
  3. 2 1
      plugin/startify.vim
  4. 1 1
      syntax/startify.vim

+ 9 - 2
README.md

@@ -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:

+ 5 - 2
doc/startify.txt

@@ -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>.
 
 
 ==============================================================================

+ 2 - 1
plugin/startify.vim

@@ -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>

+ 1 - 1
syntax/startify.vim

@@ -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'