{
    "mode": "man",
    "parameter": "VIM",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/VIM/1/json",
    "generated": "2026-05-30T05:11:42Z",
    "synopsis": "vim [options] [file ..]\nvim [options] -\nvim [options] -t tag\nvim [options] -q [errorfile]\nex",
    "sections": {
        "NAME": {
            "content": "vim - Vi IMproved, a programmer's text editor\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "vim [options] [file ..]\nvim [options] -\nvim [options] -t tag\nvim [options] -q [errorfile]\n\nex",
            "subsections": [
                {
                    "name": "view",
                    "content": ""
                },
                {
                    "name": "gvim gview evim eview",
                    "content": ""
                },
                {
                    "name": "rvim rview rgvim rgview",
                    "content": ""
                }
            ]
        },
        "DESCRIPTION": {
            "content": "Vim  is  a text editor that is upwards compatible to Vi.  It can be used to edit all kinds of\nplain text.  It is especially useful for editing programs.\n\nThere are a lot of enhancements above Vi: multi level undo, multi windows and buffers, syntax\nhighlighting,  command  line  editing,  filename  completion, on-line help, visual selection,\netc..  See \":help vidiff.txt\" for a summary of the differences between Vim and Vi.\n\nWhile running Vim a lot of help can be obtained  from  the  on-line  help  system,  with  the\n\":help\" command.  See the ON-LINE HELP section below.\n\nMost often Vim is started to edit a single file with the command\n\nvim file\n\nMore generally Vim is started with:\n\nvim [options] [filelist]\n\nIf  the  filelist  is missing, the editor will start with an empty buffer.  Otherwise exactly\none out of the following four may be used to choose one or more files to be edited.\n\nfile ..     A list of filenames.  The first one will be the current file and  read  into  the\nbuffer.   The cursor will be positioned on the first line of the buffer.  You can\nget to the other files with the \":next\" command.  To edit a file that starts with\na dash, precede the filelist with \"--\".\n\n-           The file to edit is read from stdin.  Commands are read from stderr, which should\nbe a tty.\n\n-t {tag}    The file to edit and the initial cursor position depends on a \"tag\",  a  sort  of\ngoto label.  {tag} is looked up in the tags file, the associated file becomes the\ncurrent file and the associated command is executed.  Mostly this is used  for  C\nprograms,  in  which case {tag} could be a function name.  The effect is that the\nfile containing that function becomes the current file and the  cursor  is  posi‐\ntioned on the start of the function.  See \":help tag-commands\".\n",
            "subsections": [
                {
                    "name": "-q [errorfile]",
                    "content": "Start in quickFix mode.  The file [errorfile] is read and the first error is dis‐\nplayed.  If [errorfile] is omitted, the filename is obtained from the 'errorfile'\noption  (defaults  to \"AztecC.Err\" for the Amiga, \"errors.err\" on other systems).\nFurther errors can be jumped to with the \":cn\" command.  See \":help quickfix\".\n\nVim behaves differently, depending on the name of the command (the executable  may  still  be\nthe same file).\n\nvim       The \"normal\" way, everything is default.\n\nex        Start in Ex mode.  Go to Normal mode with the \":vi\" command.  Can also be done with\nthe \"-e\" argument.\n\nview      Start in read-only mode.  You will be protected from writing the files.   Can  also\nbe done with the \"-R\" argument.\n\ngvim gview\nThe GUI version.  Starts a new window.  Can also be done with the \"-g\" argument.\n\nevim eview\nThe GUI version in easy mode.  Starts a new window.  Can also be done with the \"-y\"\nargument.\n\nrvim rview rgvim rgview\nLike the above, but with restrictions.  It will not be possible to start shell com‐\nmands, or suspend Vim.  Can also be done with the \"-Z\" argument.\n",
                    "flag": "-q",
                    "arg": "[errorfile]"
                }
            ]
        },
        "OPTIONS": {
            "content": "The  options  may be given in any order, before or after filenames.  Options without an argu‐\nment can be combined after a single dash.\n\n+[num]      For the first file the cursor will be positioned on  line  \"num\".   If  \"num\"  is\nmissing, the cursor will be positioned on the last line.\n\n+/{pat}     For  the  first file the cursor will be positioned in the line with the first oc‐\ncurrence of {pat}.  See \":help search-pattern\" for the available search patterns.\n\n+{command}\n\n-c {command}\n{command} will be executed after the first file has been read.  {command} is  in‐\nterpreted as an Ex command.  If the {command} contains spaces it must be enclosed\nin double quotes (this depends on the shell that is used).   Example:  vim  \"+set\nsi\" main.c\nNote: You can use up to 10 \"+\" or \"-c\" commands.\n\n-S {file}   {file} will be sourced after the first file has been read.  This is equivalent to\n-c \"source {file}\".  {file} cannot start with '-'.  If {file}  is  omitted  \"Ses‐\nsion.vim\" is used (only works when -S is the last argument).\n\n--cmd {command}\nLike  using  \"-c\",  but  the command is executed just before processing any vimrc\nfile.  You can use up to 10 of these commands, independently from \"-c\" commands.\n\n-A          If Vim has been compiled with ARABIC support for editing  right-to-left  oriented\nfiles  and  Arabic  keyboard mapping, this option starts Vim in Arabic mode, i.e.\n'arabic' is set.  Otherwise an error message is given and Vim aborts.\n\n-b          Binary mode.  A few options will be set that makes it possible to edit  a  binary\nor executable file.\n\n-C          Compatible.   Set the 'compatible' option.  This will make Vim behave mostly like\nVi, even though a .vimrc file exists.\n\n-d          Start in diff mode.  There should between two to eight file name arguments.   Vim\nwill  open  all  the  files  and show differences between them.  Works like vimd‐\niff(1).\n\n-d {device} Open {device}  for  use  as  a  terminal.   Only  on  the  Amiga.   Example:  \"-d\ncon:20/30/600/150\".\n\n-D          Debugging.  Go to debugging mode when executing the first command from a script.\n\n-e          Start Vim in Ex mode, just like the executable was called \"ex\".\n\n-E          Start Vim in improved Ex mode, just like the executable was called \"exim\".\n\n-f          Foreground.   For the GUI version, Vim will not fork and detach from the shell it\nwas started in.  On the Amiga, Vim is not restarted to open a new  window.   This\noption  should  be  used when Vim is executed by a program that will wait for the\nedit session to finish (e.g. mail).  On the Amiga the  \":sh\"  and  \":!\"  commands\nwill not work.\n\n--nofork    Foreground.   For the GUI version, Vim will not fork and detach from the shell it\nwas started in.\n\n-F          If Vim has been compiled with FKMAP support for  editing  right-to-left  oriented\nfiles  and  Farsi  keyboard  mapping,  this option starts Vim in Farsi mode, i.e.\n'fkmap' and 'rightleft' are set.  Otherwise an error message  is  given  and  Vim\naborts.\n\n-g          If  Vim  has  been compiled with GUI support, this option enables the GUI.  If no\nGUI support was compiled in, an error message is given and Vim aborts.\n\n-h          Give a bit of help about the command line arguments and options.  After this  Vim\nexits.\n\n-H          If  Vim  has  been compiled with RIGHTLEFT support for editing right-to-left ori‐\nented files and Hebrew keyboard mapping, this option starts Vim in  Hebrew  mode,\ni.e.  'hkmap'  and  'rightleft' are set.  Otherwise an error message is given and\nVim aborts.\n\n-i {viminfo}\nSpecifies the filename to use when reading or writing the viminfo  file,  instead\nof  the default \"~/.viminfo\".  This can also be used to skip the use of the .vim‐\ninfo file, by giving the name \"NONE\".\n\n-L          Same as -r.\n\n-l          Lisp mode.  Sets the 'lisp' and 'showmatch' options on.\n\n-m          Modifying files is disabled.  Resets the 'write' option.  You  can  still  modify\nthe buffer, but writing a file is not possible.\n\n-M          Modifications  not  allowed.  The 'modifiable' and 'write' options will be unset,\nso that changes are not allowed and files can not be written.   Note  that  these\noptions can be set to enable making modifications.\n\n-N          No-compatible mode.  Resets the 'compatible' option.  This will make Vim behave a\nbit better, but less Vi compatible, even though a .vimrc file does not exist.\n\n-n          No swap file will be used.  Recovery after a crash will be impossible.  Handy  if\nyou  want  to  edit a file on a very slow medium (e.g. floppy).  Can also be done\nwith \":set uc=0\".  Can be undone with \":set uc=200\".\n\n-nb         Become an editor server for NetBeans.  See the docs for details.\n\n-o[N]       Open N windows stacked.  When N is omitted, open one window for each file.\n\n-O[N]       Open N windows side by side.  When N is omitted, open one window for each file.\n\n-p[N]       Open N tab pages.  When N is omitted, open one tab page for each file.\n\n-R          Read-only mode.  The 'readonly' option will be set.  You can still edit the  buf‐\nfer,  but will be prevented from accidentally overwriting a file.  If you do want\nto overwrite a file, add an exclamation mark to the Ex command, as in \":w!\".  The\n-R  option  also implies the -n option (see above).  The 'readonly' option can be\nreset with \":set noro\".  See \":help 'readonly'\".\n\n-r          List swap files, with information about using them for recovery.\n\n-r {file}   Recovery mode.  The swap file is used to recover a crashed editing session.   The\nswap file is a file with the same filename as the text file with \".swp\" appended.\nSee \":help recovery\".\n\n-s          Silent mode.  Only when started as \"Ex\" or when the \"-e\" option was given  before\nthe \"-s\" option.\n\n-s {scriptin}\nThe  script  file {scriptin} is read.  The characters in the file are interpreted\nas if you had typed them.  The same  can  be  done  with  the  command  \":source!\n{scriptin}\".   If the end of the file is reached before the editor exits, further\ncharacters are read from the keyboard.\n\n-T {terminal}\nTells Vim the name of the terminal you are using.  Only required when  the  auto‐\nmatic  way  doesn't work.  Should be a terminal known to Vim (builtin) or defined\nin the termcap or terminfo file.\n\n-u {vimrc}  Use the commands in the file {vimrc} for initializations.  All the other initial‐\nizations  are skipped.  Use this to edit a special kind of files.  It can also be\nused to skip all initializations by giving the name \"NONE\".  See \":help  initial‐\nization\" within vim for more details.\n\n-U {gvimrc} Use the commands in the file {gvimrc} for GUI initializations.  All the other GUI\ninitializations are skipped.  It can also be used to skip all GUI initializations\nby giving the name \"NONE\".  See \":help gui-init\" within vim for more details.\n\n-V[N]       Verbose.  Give messages about which files are sourced and for reading and writing\na viminfo file.  The optional number N is the value for  'verbose'.   Default  is\n10.\n\n-v          Start  Vim  in  Vi mode, just like the executable was called \"vi\".  This only has\neffect when the executable is called \"ex\".\n\n-w {scriptout}\nAll the characters that you type are recorded in the file {scriptout}, until  you\nexit  Vim.   This  is  useful if you want to create a script file to be used with\n\"vim -s\" or \":source!\".  If the {scriptout} file exists, characters are appended.\n\n-W {scriptout}\nLike -w, but an existing file is overwritten.\n\n-x          Use encryption when writing files.  Will prompt for a crypt key.\n\n-X          Don't connect to the X server.  Shortens startup time in a terminal, but the win‐\ndow title and clipboard will not be used.\n\n-y          Start  Vim  in  easy mode, just like the executable was called \"evim\" or \"eview\".\nMakes Vim behave like a click-and-type editor.\n\n-Z          Restricted mode.  Works like the executable starts with \"r\".\n\n--          Denotes the end of the options.  Arguments after this will be handled as  a  file\nname.  This can be used to edit a filename that starts with a '-'.\n\n--clean     Do not use any personal configuration (vimrc, plugins, etc.).  Useful to see if a\nproblem reproduces with a clean Vim setup.\n\n--echo-wid  GTK GUI only: Echo the Window ID on stdout.\n\n--help      Give a help message and exit, just like \"-h\".\n\n--literal   Take file name arguments literally, do not expand wildcards.  This has no  effect\non Unix where the shell expands wildcards.\n\n--noplugin  Skip loading plugins.  Implied by -u NONE.\n\n--remote    Connect to a Vim server and make it edit the files given in the rest of the argu‐\nments.  If no server is found a warning is given and the files are edited in  the\ncurrent Vim.\n\n--remote-expr {expr}\nConnect to a Vim server, evaluate {expr} in it and print the result on stdout.\n\n--remote-send {keys}\nConnect to a Vim server and send {keys} to it.\n",
            "subsections": [
                {
                    "name": "--remote-silent",
                    "content": "As --remote, but without the warning when no server is found.\n",
                    "long": "--remote-silent"
                },
                {
                    "name": "--remote-wait",
                    "content": "As --remote, but Vim does not exit until the files have been edited.\n",
                    "long": "--remote-wait"
                },
                {
                    "name": "--remote-wait-silent",
                    "content": "As --remote-wait, but without the warning when no server is found.\n",
                    "long": "--remote-wait-silent"
                },
                {
                    "name": "--serverlist",
                    "content": "List the names of all Vim servers that can be found.\n\n--servername {name}\nUse  {name}  as  the  server  name.  Used for the current Vim, unless used with a\n--remote argument, then it's the name of the server to connect to.\n\n--socketid {id}\nGTK GUI only: Use the GtkPlug mechanism to run gvim in another window.\n\n--startuptime {file}\nDuring startup write timing messages to the file {fname}.\n\n--version   Print version information and exit.\n",
                    "long": "--serverlist"
                }
            ]
        },
        "ON-LINE HELP": {
            "content": "Type \":help\" in Vim to get started.  Type \":help subject\" to get help on a specific  subject.\nFor  example:  \":help ZZ\" to get help for the \"ZZ\" command.  Use <Tab> and CTRL-D to complete\nsubjects (\":help cmdline-completion\").  Tags are present to jump from one  place  to  another\n(sort  of  hypertext links, see \":help\").  All documentation files can be viewed in this way,\nfor example \":help syntax.txt\".\n",
            "subsections": []
        },
        "FILES": {
            "content": "/usr/share/vim/vim82/doc/*.txt\nThe Vim documentation files.  Use \":help doc-file-list\" to  get  the  complete\nlist.\n\n/usr/share/vim/vim82/doc/tags\nThe tags file used for finding information in the documentation files.\n\n/usr/share/vim/vim82/syntax/syntax.vim\nSystem wide syntax initializations.\n\n/usr/share/vim/vim82/syntax/*.vim\nSyntax files for various languages.\n\n/usr/share/vim/vimrc\nSystem wide Vim initializations.\n\n~/.vimrc       Your personal Vim initializations.\n\n/usr/share/vim/gvimrc\nSystem wide gvim initializations.\n\n~/.gvimrc      Your personal gvim initializations.\n\n/usr/share/vim/vim82/optwin.vim\nScript used for the \":options\" command, a nice way to view and set options.\n\n/usr/share/vim/vim82/menu.vim\nSystem wide menu initializations for gvim.\n\n/usr/share/vim/vim82/bugreport.vim\nScript to generate a bug report.  See \":help bugs\".\n\n/usr/share/vim/vim82/filetype.vim\nScript to detect the type of a file by its name.  See \":help 'filetype'\".\n\n/usr/share/vim/vim82/scripts.vim\nScript to detect the type of a file by its contents.  See \":help 'filetype'\".\n\n/usr/share/vim/vim82/print/*.ps\nFiles used for PostScript printing.\n\nFor recent info read the VIM home page:\n<URL:http://www.vim.org/>\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "vimtutor(1)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Most  of Vim was made by Bram Moolenaar, with a lot of help from others.  See \":help credits\"\nin Vim.\nVim is based on Stevie, worked on by: Tim Thompson, Tony Andrews and G.R. (Fred) Walter.  Al‐\nthough hardly any of the original code remains.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "Probably.  See \":help todo\" for a list of known problems.\n\nNote  that  a  number of things that may be regarded as bugs by some, are in fact caused by a\ntoo-faithful reproduction of Vi's behaviour.  And if you think other things are bugs \"because\nVi does it differently\", you should take a closer look at the vidiff.txt file (or type :help\nvidiff.txt when in Vim).  Also have a look at the 'compatible' and 'cpoptions' options.\n\n\n\n2006 Apr 11                                      VIM(1)",
            "subsections": []
        }
    },
    "summary": "vim - Vi IMproved, a programmer's text editor",
    "flags": [
        {
            "flag": "",
            "long": "--remote-silent",
            "arg": null,
            "description": "As --remote, but without the warning when no server is found."
        },
        {
            "flag": "",
            "long": "--remote-wait",
            "arg": null,
            "description": "As --remote, but Vim does not exit until the files have been edited."
        },
        {
            "flag": "",
            "long": "--remote-wait-silent",
            "arg": null,
            "description": "As --remote-wait, but without the warning when no server is found."
        },
        {
            "flag": "",
            "long": "--serverlist",
            "arg": null,
            "description": "List the names of all Vim servers that can be found. --servername {name} Use {name} as the server name. Used for the current Vim, unless used with a --remote argument, then it's the name of the server to connect to. --socketid {id} GTK GUI only: Use the GtkPlug mechanism to run gvim in another window. --startuptime {file} During startup write timing messages to the file {fname}. --version Print version information and exit."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "vimtutor",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/vimtutor/1/json"
        }
    ]
}