aboutsummaryrefslogtreecommitdiffhomepage
path: root/vim/init/config.vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim/init/config.vim')
-rw-r--r--vim/init/config.vim12
1 files changed, 6 insertions, 6 deletions
diff --git a/vim/init/config.vim b/vim/init/config.vim
index 9700c61..368be25 100644
--- a/vim/init/config.vim
+++ b/vim/init/config.vim
@@ -17,7 +17,7 @@ augroup END
17augroup TerminalSize 17augroup TerminalSize
18 au! 18 au!
19 function! LayoutForSmallTerminal(bound) 19 function! LayoutForSmallTerminal(bound)
20 let l:bound = a:bound ? a:bound : 19 20 let l:bound = a:bound ? a:bound : 20
21 if &lines < l:bound || g:alacritty_extra_padding 21 if &lines < l:bound || g:alacritty_extra_padding
22 silent! set cmdheight=0 laststatus=0 showtabline=0 signcolumn=no nowrap scrolloff=1 22 silent! set cmdheight=0 laststatus=0 showtabline=0 signcolumn=no nowrap scrolloff=1
23 else 23 else
@@ -124,7 +124,7 @@ augroup InitFileTypes
124 " Filetype for Vim {{{ 124 " Filetype for Vim {{{
125 125
126 " Help page 126 " Help page
127 autocmd BufEnter * if &filetype == 'help' | wincmd T | set buflisted | endif 127 autocmd BufEnter * if &filetype == 'help' | wincmd T | set buflisted nofoldenable | endif
128 128
129 " quickfix: hide line number 129 " quickfix: hide line number
130 autocmd FileType quickfix setlocal nonumber 130 autocmd FileType quickfix setlocal nonumber
@@ -177,8 +177,8 @@ augroup InitFileTypes
177 let origin = split(MarkdownFoldText()[2:], ' ') 177 let origin = split(MarkdownFoldText()[2:], ' ')
178 let heading = substitute(join(origin[:-3], ' '), '\#', ' ', 'g') 178 let heading = substitute(join(origin[:-3], ' '), '\#', ' ', 'g')
179 let lines = join(origin[-2:], ' ')[1:-2] 179 let lines = join(origin[-2:], ' ')[1:-2]
180 let spaces = repeat('.', 50 - len(heading) - len(lines)) 180 let fills = repeat('.', 48 - len(heading) - len(lines))
181 return heading..spaces.." "..lines 181 return heading.." "..fills.." "..lines
182 endfunc 182 endfunc
183 183
184 augroup END 184 augroup END
@@ -224,7 +224,7 @@ augroup InitFileTypes
224 " TODO a better way to determine a file is related to password-store, now use 224 " TODO a better way to determine a file is related to password-store, now use
225 " files under /dev/shm as filter 225 " files under /dev/shm as filter
226 autocmd BufRead /dev/shm/*.txt call SetPasswordFile() 226 autocmd BufRead /dev/shm/*.txt call SetPasswordFile()
227 function SetPasswordFile() 227 function! SetPasswordFile()
228 setlocal foldminlines=0 228 setlocal foldminlines=0
229 setlocal foldmethod=manual 229 setlocal foldmethod=manual
230 setlocal foldtext="Password" 230 setlocal foldtext="Password"
@@ -234,7 +234,7 @@ augroup InitFileTypes
234 " Beancount {{{ 234 " Beancount {{{
235 235
236 autocmd BufRead,BufNewFile *.bean call PrepareBean() 236 autocmd BufRead,BufNewFile *.bean call PrepareBean()
237 function PrepareBean() 237 function! PrepareBean()
238 set filetype=beancount 238 set filetype=beancount
239 silent !setsid fava ~/bean/main.bean &>/dev/null 239 silent !setsid fava ~/bean/main.bean &>/dev/null
240 autocmd VimLeave * silent !killall fava 240 autocmd VimLeave * silent !killall fava