Skip to content

Commit ff8a77e

Browse files
authored
Added global vim variable 'is_cppman_active', when using vim or nvim (#180)
1 parent af8f0a5 commit ff8a77e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

cppman/lib/pager.sh

+9-2
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,22 @@ case $pager_type in
8484
[ -z "$PAGER" ] && PAGER=less
8585
render | $PAGER
8686
;;
87-
vim|nvim)
8887

88+
vim|nvim)
8989
render | remove_escape 3<&- | {
90-
$pager_type -R -c "let g:page_name=\"$page_name\"" -S $vim_config /dev/fd/3 </dev/tty
90+
$pager_type \
91+
--cmd "let g:is_cppman_active=1" \
92+
-R \
93+
-c "let g:page_name=\"$page_name\"" \
94+
-S $vim_config \
95+
/dev/fd/3 </dev/tty
9196
} 3<&0
9297
;;
98+
9399
less)
94100
render | less -r
95101
;;
102+
96103
pipe)
97104
render | remove_escape
98105
esac

0 commit comments

Comments
 (0)