Skip to content

Instantly share code, notes, and snippets.

@adamency
Last active January 15, 2025 23:11
Show Gist options
  • Save adamency/dcd148c31b7ce7942961cbcad6f8b4db to your computer and use it in GitHub Desktop.
Save adamency/dcd148c31b7ce7942961cbcad6f8b4db to your computer and use it in GitHub Desktop.
Vim/Neovim Manpager Alias
alias vimman='vim +Man! -c "norm gO" -c "set nowrap" -c "%s/\v(-<\w>|--<\w+>)//n" -c "wincmd L" -c "vertical resize 60" -c "wincmd h"'
@adamency
Copy link
Author

adamency commented Jan 15, 2025

Pipe any command output (e.g. <command> --help or <command> help) to vimman in order to display it as a manpage with advanced capabilities:

  • Syntax Highlighting of options
  • Outline: overview of all options
  • In the outline window, cycle through all options via n/N.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment