Commit d157bb07 authored by Murukesh Mohanan's avatar Murukesh Mohanan

shift manpager stuff to plugin

parent 93d888be
syntax match BACKHIDE '.\b' conceal contained
syntax match BOLD '\(.\)\b\1' contains=BACKHIDE
syntax match Underlined '_\b.' contains=BACKHIDE
highlight link BOLD Constant
if exists("b:did_man")
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
if !exists("*s:MMan")
function! s:MMan()
let l:word = substitute(expand('<cword>'), '.\b', '', 'g')
if winnr('$') == 1
exec 'Man' l:word
function s:PrepManPager()
setlocal modifiable
if !empty ($MAN_PN)
"silent %! col -b -x
file $MAN_PN
setlocal nomodified
setlocal nomodifiable
"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>
...@@ -95,6 +95,7 @@ nnoremap <Up> gk ...@@ -95,6 +95,7 @@ nnoremap <Up> gk
"execute pathogen#infect() "execute pathogen#infect()
call plug#begin('~/.vim/plugged') call plug#begin('~/.vim/plugged')
Plug 'murukeshm/vim-manpager'
Plug 'vim-scripts/diffchar.vim' Plug 'vim-scripts/diffchar.vim'
Plug 'scrooloose/nerdtree' Plug 'scrooloose/nerdtree'
...@@ -169,9 +170,7 @@ let g:ycm_collect_identifiers_from_tags_files = 1 ...@@ -169,9 +170,7 @@ let g:ycm_collect_identifiers_from_tags_files = 1
let g:ycm_seed_identifiers_with_syntax = 1 let g:ycm_seed_identifiers_with_syntax = 1
let g:ycm_python_binary_path = '/usr/bin/python3' let g:ycm_python_binary_path = '/usr/bin/python3'
if !empty($MAN_PN) if empty($MAN_PN) && @% == "" && getcwd() == "/tmp"
autocmd StdinReadPost * set ft=man | file $MAN_PN
elseif @% == "" && getcwd() == "/tmp"
" From " From
" with exception for reading manpages " with exception for reading manpages
try try
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