5

Here are some examples:

from man page of a command:

$ man man
man [-acdfFhkKtwW] [--path] [-m system] [-p string] [-C config_file] [-M pathlist] [-P pager] [-S section_list] [section] name ...
...

from http://vim.wikia.com/wiki/Power_of_g:

:[range]g/<pattern>/cmd

from http://bullium.com/support/vim.html:

:wq {file}
  1. What's the meaning of [...], <...>, {...}, and those things without any surroundings?
  2. Is there a standardized definition of the usage of symbols?
Charles
  • 50,943
  • 13
  • 104
  • 142
Yishu Fang
  • 9,448
  • 21
  • 65
  • 102

1 Answers1

3

The examples you gave vary because the vim commands are to be used within Vim itself, not on the shell command line.

[] is usually reserved for optional arguments on shell commands.

<> in your example is used for required arguments to a vim commmand. {} in your example is used for an optional argument on a vim command.

The later two seem to be VIM specific, but [] is pretty standard notation for signifying optional arguments.

Alex Moore
  • 3,415
  • 1
  • 23
  • 39
  • 1
    What about `()`? As shown in [git-reset](http://git-scm.com/docs/git-reset)'s SYNOPSIS. – nn0p Aug 18 '15 at 09:20