Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
home
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Murukesh Mohanan
home
Commits
d157bb07
Commit
d157bb07
authored
Mar 26, 2016
by
Murukesh Mohanan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shift manpager stuff to plugin
parent
93d888be
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
49 deletions
+2
-49
.vim/after/syntax/man.vim
.vim/after/syntax/man.vim
+0
-5
.vim/ftplugin/man.vim
.vim/ftplugin/man.vim
+0
-41
.vim/vimrc
.vim/vimrc
+2
-3
No files found.
.vim/after/syntax/man.vim
deleted
100644 → 0
View file @
93d888be
syntax
match
BACKHIDE
'.\b'
conceal contained
syntax
match
BOLD
'\(.\)\b\1'
contains
=
BACKHIDE
syntax
match
Underlined
'_\b.'
contains
=
BACKHIDE
highlight link BOLD Constant
.vim/ftplugin/man.vim
deleted
100644 → 0
View file @
93d888be
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
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
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
>
.vim/vimrc
View file @
d157bb07
...
...
@@ -95,6 +95,7 @@ nnoremap <Up> gk
"execute pathogen#infect()
call plug#begin('~/.vim/plugged')
Plug 'murukeshm/vim-manpager'
Plug 'vim-scripts/diffchar.vim'
Plug 'scrooloose/nerdtree'
...
...
@@ -169,9 +170,7 @@ let g:ycm_collect_identifiers_from_tags_files = 1
let g:ycm_seed_identifiers_with_syntax = 1
let g:ycm_python_binary_path = '/usr/bin/python3'
if !empty($MAN_PN)
autocmd StdinReadPost * set ft=man | file $MAN_PN
elseif @% == "" && getcwd() == "/tmp"
if empty($MAN_PN) && @% == "" && getcwd() == "/tmp"
" From http://vi.stackexchange.com/questions/239/
" with exception for reading manpages
try
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment