I open man pages in vim, per

export MANPAGER="vim -M +MANPAGER -"

in my zshrc.

However, vim has syntax highlighting enabled when it opens a man page. Is there a way to ensure man pages always have syntax off / that vim, when opening man pages, respects the vimrc?

1 Answer 1


You can pass an additional syntax off command to the vim command line in $MANPAGER, using the -c option argument to pass Vim an Ex command to run during startup:

export MANPAGER="vim -M +MANPAGER -c 'syntax off' -"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.