Add vim "Zen mode" plugin

This commit is contained in:
Talia 2020-10-01 09:40:55 +02:00
parent f24b6e1c5f
commit ce5408975e
4 changed files with 23 additions and 2 deletions

View file

@ -1,4 +1,3 @@
if has("nvim")
command -nargs=1 EOB set fillchars=eob:<args>
EOB \
end

View file

@ -1,5 +1,14 @@
function s:colorcolumn()
if &colorcolumn != "0"
set colorcolumn=0
else
set colorcolumn=+1
end
endfun
noremap <F1> :setl number!<CR>:
noremap <leader><F1> :setl relativenumber!<CR>:
noremap <f2> :let &laststatus=!&laststatus*2<CR>:
noremap <leader><F2> :call <SID>colorcolumn()<CR>
noremap <F3> :setl autowriteall!<CR>:setl autowriteall?<CR>:
noremap <F4> :setl list!<CR>:

View file

@ -2,7 +2,7 @@
" exec 'hi TabLineFill' . s:fg_tabline_bg . s:bg_tabline_bg . s:ft_none
" exec 'hi TabLineSel' . s:fg_tabline_active_fg . s:bg_tabline_active_bg . s:ft_none
set laststatus=0
set laststatus=2
set statusline=%#StatusBar#
set statusline+=%#TabLineSel#
set statusline+=%{&autowriteall?'\ \ 🖴\ ':''}%<

13
vim/plugin/zen.vim Normal file
View file

@ -0,0 +1,13 @@
function Zen()
set nonumber
set norelativenumber
set colorcolumn=0
set laststatus=0
if has("nvim")
set fillchars=eob:\
end
endfun
command! Zen call Zen()
nnoremap <F12> :Zen<CR>