Make Startify a scratch buffer again
This commit is contained in:
parent
77a14e70a8
commit
53019cc309
3 changed files with 13 additions and 7 deletions
|
@ -29,11 +29,17 @@ function! startify#insane_in_the_membrane() abort
|
||||||
endfor
|
endfor
|
||||||
endif
|
endif
|
||||||
|
|
||||||
setlocal nonumber noswapfile nolist bufhidden=wipe statusline=\
|
enew
|
||||||
|
|
||||||
|
setfiletype startify
|
||||||
|
silent file startify
|
||||||
|
|
||||||
|
setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile
|
||||||
|
setlocal nonumber nolist statusline=\ %t
|
||||||
|
|
||||||
if (v:version >= 703)
|
if (v:version >= 703)
|
||||||
setlocal norelativenumber
|
setlocal norelativenumber
|
||||||
endif
|
endif
|
||||||
setfiletype startify
|
|
||||||
|
|
||||||
let s:offset_header = 0
|
let s:offset_header = 0
|
||||||
|
|
||||||
|
@ -78,7 +84,7 @@ function! startify#insane_in_the_membrane() abort
|
||||||
nnoremap <buffer> <cr> :call <SID>open_buffers(expand('<cword>'))<cr>
|
nnoremap <buffer> <cr> :call <SID>open_buffers(expand('<cword>'))<cr>
|
||||||
nnoremap <buffer> <2-LeftMouse> :execute 'normal '. matchstr(getline('.'), '\w\+')<cr>
|
nnoremap <buffer> <2-LeftMouse> :execute 'normal '. matchstr(getline('.'), '\w\+')<cr>
|
||||||
nnoremap <buffer><silent> q
|
nnoremap <buffer><silent> q
|
||||||
\ :if (len(filter(range(0, bufnr('$')), 'buflisted(v:val)')) > 1) <bar>
|
\ :if len(filter(range(0, bufnr('$')), 'buflisted(v:val)')) <bar>
|
||||||
\ bd <bar>
|
\ bd <bar>
|
||||||
\ else <bar>
|
\ else <bar>
|
||||||
\ quit <bar>
|
\ quit <bar>
|
||||||
|
|
|
@ -19,6 +19,6 @@ augroup END
|
||||||
command! -nargs=? -bar -complete=customlist,startify#session_list SSave call startify#session_save(<f-args>)
|
command! -nargs=? -bar -complete=customlist,startify#session_list SSave call startify#session_save(<f-args>)
|
||||||
command! -nargs=? -bar -complete=customlist,startify#session_list SLoad call startify#session_load(<f-args>)
|
command! -nargs=? -bar -complete=customlist,startify#session_list SLoad call startify#session_load(<f-args>)
|
||||||
command! -nargs=? -bar -complete=customlist,startify#session_list SDelete call startify#session_delete(<f-args>)
|
command! -nargs=? -bar -complete=customlist,startify#session_list SDelete call startify#session_delete(<f-args>)
|
||||||
command! -nargs=0 -bar Startify enew | call startify#insane_in_the_membrane()
|
command! -nargs=0 -bar Startify call startify#insane_in_the_membrane()
|
||||||
|
|
||||||
" vim: et sw=2 sts=2
|
" vim: et sw=2 sts=2
|
||||||
|
|
|
@ -21,9 +21,9 @@ if exists('g:startify_custom_header')
|
||||||
execute 'syntax region StartifyHeader start=/\%1l/ end=/\%'. (len(g:startify_custom_header) + 2) .'l/'
|
execute 'syntax region StartifyHeader start=/\%1l/ end=/\%'. (len(g:startify_custom_header) + 2) .'l/'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
highlight link StartifyHeader Normal
|
highlight default link StartifyHeader Normal
|
||||||
highlight link StartifyBracket Delimiter
|
highlight default link StartifyBracket Delimiter
|
||||||
highlight link StartifyNumber Number
|
highlight default link StartifyNumber Number
|
||||||
|
|
||||||
let b:current_syntax = 'startify'
|
let b:current_syntax = 'startify'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue