4

Is there a way to use :help to find commands that take arguments vs. no arguments?

For example: :map (w/o arguments) can list the key mappings for various modes. However, :help :map leads me to :map {lhs} {rhs} (around line 48) instead of line 114 which explains :map w/o arguments.

Currently, I have to type /:map then n over and over again to find it the section (around line 114) that contains :map w/o arguments.

  • 3
    Type :help subject without pressing enter and then press <C-d> (aka Ctrl-D). It looks like there isn't a direct link for :map with no args though. – Wildcard Jan 29 '16 at 23:32
  • Thanks, but I already tried that. I also tried it w/:set wildcard and <tab>. I still asked the question in case there was some other way to do it besides the ways described here: vim.wikia.com/wiki/Learn_to_use_help – dgo.a Jan 29 '16 at 23:50
  • 4
    You can use /^:map\s<Enter> which goes right to it. I see your point; but there just isn't any tag directly on that help entry. So there won't be any way to jump directly to it from the :help command. Improving your regex search is good, though. E.g., if you know you want something at the start of the line it's good to specify that. – Wildcard Jan 30 '16 at 0:28
  • 3
    Thanks. I also found out about :helpgrep ^:map\s, but you're way solves it: :help :map then /^:map\s – dgo.a Jan 30 '16 at 0:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.