Commit 8a89bb88 authored by Murukesh Mohanan's avatar Murukesh Mohanan

added new manpage settings based on http://unix.stackexchange.com/a/271905/70524

parent cabd6ff6
Pipeline #26 skipped
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
if exists("b:did_man")
finish
endif
let b:did_man = 1
setlocal nolist
setlocal readonly
setlocal buftype=nofile
setlocal bufhidden=hide
setlocal noswapfile
setlocal nomodifiable
setlocal nowrap
setlocal conceallevel=3
setlocal iskeyword+=,_
setlocal concealcursor=nvic
function! PrepManPager()
setlocal modifiable
if !empty ($MAN_PN)
silent %! col -b -x
file $MAN_PN
endif
setlocal nomodified
setlocal nomodifiable
endfunction
if !exists("*s:MMan")
function! s:MMan()
let l:word = substitute(expand('<cword>'), '.\b', '', 'g')
if winnr('$') == 1
vsplit
endif
exec 'Man' l:word
endfunction
autocmd BufEnter $MAN_PN call PrepManPager()
nnoremap q :q!<CR>
nnoremap <Space> <PageDown>
map <expr> <CR> winnr('$') == 1 ? ':vs<CR><C-]>' : '<C-]>'
function s:PrepManPager()
setlocal modifiable
if !empty ($MAN_PN)
"silent %! col -b -x
%s/.\b//g
file $MAN_PN
endif
setlocal nomodified
setlocal nomodifiable
endfunction
endif
"autocmd BufEnter $MAN_PN call PrepManPager()
nnoremap <buffer> q :q!<CR>
nnoremap <buffer> <Space> <PageDown>
nnoremap <buffer> <CR> :call <SID>MMan()<CR>
nnoremap <buffer> <c-]> :call <SID>MMan()<CR>
inoremap <buffer> [[ \begin{}<Esc>i
imap ]] <Plug>LatexCloseCurEnv
setlocal colorcolumn=+1
setlocal spell spelllang=en_gb
......
if has("gui_running")
if has("gui_gtk2")
set guifont=Ubuntu\ Mono\ 11
set guioptions-=r
endif
endif
if has("gui_running")
if has("gui_gtk2")
set guifont=Ubuntu\ Mono\ derivative\ Powerline\ 13
set guioptions-=r
endif
endif
let g:airline_powerline_fonts = 1
set textwidth=80
......@@ -67,3 +67,6 @@ Gavroche
Daneel
Anathem
bullwhip
manpage
manpages
filetype
......@@ -118,6 +118,7 @@ autocmd! User YouCompleteMe if !has('vim_starting') | call youcompleteme#Enable(
Plug 'godlygeek/tabular'
Plug 'vim-scripts/deb.vim'
Plug 'moon-musick/vim-logrotate'
call plug#end()
function! EnableYCM()
......@@ -143,7 +144,6 @@ set foldmethod=syntax
set foldlevelstart=3
let g:syntastic_cpp_compiler_options = ' -std=c++11'
let g:syntastic_python_python_exec = '/usr/bin/python3'
let g:airline#extensions#tabline#enabled = 1
"let g:LatexBox_latexmk_options = ' -xelatex '
"let g:LatexBox_latexmk_async = 1
"let g:LatexBox_latexmk_preview_continuously = 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment