Add vim "Zen mode" plugin
This commit is contained in:
parent
f24b6e1c5f
commit
ce5408975e
4 changed files with 23 additions and 2 deletions
|
@ -1,4 +1,3 @@
|
||||||
if has("nvim")
|
if has("nvim")
|
||||||
command -nargs=1 EOB set fillchars=eob:<args>
|
command -nargs=1 EOB set fillchars=eob:<args>
|
||||||
EOB \
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -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 <F1> :setl number!<CR>:
|
||||||
noremap <leader><F1> :setl relativenumber!<CR>:
|
noremap <leader><F1> :setl relativenumber!<CR>:
|
||||||
noremap <f2> :let &laststatus=!&laststatus*2<CR>:
|
noremap <f2> :let &laststatus=!&laststatus*2<CR>:
|
||||||
|
noremap <leader><F2> :call <SID>colorcolumn()<CR>
|
||||||
noremap <F3> :setl autowriteall!<CR>:setl autowriteall?<CR>:
|
noremap <F3> :setl autowriteall!<CR>:setl autowriteall?<CR>:
|
||||||
noremap <F4> :setl list!<CR>:
|
noremap <F4> :setl list!<CR>:
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
" exec 'hi TabLineFill' . s:fg_tabline_bg . s:bg_tabline_bg . s:ft_none
|
" 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
|
" 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=%#StatusBar#
|
||||||
set statusline+=%#TabLineSel#
|
set statusline+=%#TabLineSel#
|
||||||
set statusline+=%{&autowriteall?'\ \ 🖴\ ':''}%<
|
set statusline+=%{&autowriteall?'\ \ 🖴\ ':''}%<
|
||||||
|
|
13
vim/plugin/zen.vim
Normal file
13
vim/plugin/zen.vim
Normal 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>
|
Loading…
Reference in a new issue