Browse Source

new: g:startify_empty_buffer_key

This variable can be used to create a second mapping for creating the
empty buffer.

Closes #10.
Marco Hinz 12 years ago
parent
commit
674e49816d
2 changed files with 22 additions and 7 deletions
  1. 18 7
      doc/startify.txt
  2. 4 0
      plugin/startify.vim

+ 18 - 7
doc/startify.txt

@@ -68,6 +68,15 @@ configuration.
 Put these variables into your vimrc. The shown assignments are also the
 default values.
 
+============-
+
+    let g:startify_empty_buffer_key = ''
+
+This creates an additional, hidden mapping for the empty buffer.
+
+Example: let g:startify_empty_buffer_key = 'o'
+
+
 ============-
 
     let g:startify_session_dir = '~/.vim/session'
@@ -100,22 +109,24 @@ The amount of files to list.
 
 ============-
 
-    let g:startify_bookmarks = [ '~/.vimrc' ]
+    let g:startify_bookmarks = []
 
 A list of files to bookmark. Those files will always be shown at the bottom of
 the start screen.
 
+Example: let g:startify_bookmarks = [ '~/.vimrc' ]
+
 ============-
 
     let g:startify_skiplist = []
 
 A list of Vim regular expressions to filter recently used files.
 
-Example:   let g:startify_skiplist = [
-             \ 'COMMIT_EDITMSG',
-             \ $VIMRUNTIME .'/doc',
-             \ 'bundle/.*/doc'
-             \ ]
+Example: let g:startify_skiplist = [
+           \ 'COMMIT_EDITMSG',
+           \ $VIMRUNTIME .'/doc',
+           \ 'bundle/.*/doc'
+           \ ]
 
 
 ============-
@@ -125,7 +136,7 @@ Example:   let g:startify_skiplist = [
 Do not create the startify buffer, if this is a Vim server instance with a
 name contained in this list.
 
-Example:   let g:startify_skiplist_server = [ 'GVIM' ]
+Example: let g:startify_skiplist_server = [ 'GVIM' ]
 
 
 ============-

+ 4 - 0
plugin/startify.vim

@@ -92,6 +92,10 @@ function! s:insane_in_the_membrane() abort
   nnoremap <buffer><silent> e :enew<cr>
   nnoremap <buffer><silent> <cr> :normal <c-r><c-w><cr>
 
+  if exists('g:startify_empty_buffer_key')
+    execute 'nnoremap <buffer><silent> '. g:startify_empty_buffer_key .' :enew<cr>'
+  endif
+
   autocmd! startify *
   autocmd startify CursorMoved <buffer> call s:set_cursor()
   autocmd startify BufWipeout <buffer> autocmd! startify *