From 5a872f8a3c1382a07db2dc373ec928a51c5e6c76 Mon Sep 17 00:00:00 2001 From: ksyasuda Date: Wed, 26 Jan 2022 18:18:53 -0800 Subject: [PATCH] force man/help pages into vertical splits in vim --- dotfiles/.vimrc | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/dotfiles/.vimrc b/dotfiles/.vimrc index a343699..55c244e 100644 --- a/dotfiles/.vimrc +++ b/dotfiles/.vimrc @@ -76,18 +76,29 @@ Plug 'vv9k/vim-github-dark' call plug#end() + +"------------------------------------------------------------------------------ +" Enable :Man +"------------------------------------------------------------------------------ +runtime ftplugin/man.vim +"------------------------------------------------------------------------------ +" Force help/man buffers into vertical split +"------------------------------------------------------------------------------ +autocmd FileType help wincmd L +autocmd FileType man wincmd L + +"------------------------------------------------------------------------------ +"jump to remembered position in file if available +"------------------------------------------------------------------------------ +if has("autocmd") + au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif +endif "------------------------------------------------------------------------------ " Carbon Now "------------------------------------------------------------------------------ " carbon now " let g:carbon_now_sh_base_url = 'http://localhost:8888' let g:carbon_now_sh_browser = 'firefox' - -"jump to remembered position in file if available -if has("autocmd") - au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif -endif - "------------------------------------------------------------------------------ "fzf "------------------------------------------------------------------------------