Vim Tips Wiki
(Move categories to tip template)
(Fixed a typo)
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{review}}
 
 
{{TipImported
 
{{TipImported
 
|id=367
 
|id=367
 
|previous=366
 
|previous=366
|next=368
+
|next=369
|created=November 8, 2002
+
|created=2002
 
|complexity=basic
 
|complexity=basic
 
|author=vim_power
 
|author=vim_power
|version=5.7
+
|version=7.0
 
|rating=5/11
 
|rating=5/11
 
|category1=
 
|category1=
Line 14: Line 13:
 
$VIMRUNTIME points to a directory where most of the files needed by Vim are kept.
 
$VIMRUNTIME points to a directory where most of the files needed by Vim are kept.
   
As the name suggests these files are needed during "run-time". Though they are not necessary for Vim to run, but they help in adding extra functionality to the basic Vim.
+
As the name suggests these files are needed during "run time". Many of these are not strictly necessary for Vim to run, but they are used to provide extra functionality mostly not available in vi-compatible mode, such as syntax highlighting and filetype-based plugins.
   
Here is a brief overview of files and directories in $VIMRUNTIME.
+
Here is a brief overview of files and directories in $VIMRUNTIME (directories in '''bold''').
   
  +
*'''autoload''' – Contains utility scripts which are used by plugins and scripts in other directories. These scripts are only loaded when the functionality therein is needed. See {{help|autoload}}
bugreport.vim – Use this file if you think you have discovered a bug in Vim. See {{help|bugreport.vim}}.
+
*bugreport.vim – Use this file if you think you have discovered a bug in Vim. See {{help|bugreport.vim}}.
 
colors – Contains various clorschemes. See {{help|:colorscheme}}.
+
*'''colors''' – Contains various clorschemes. See {{help|:colorscheme}}.
 
*'''compiler''' – Contains compilation scripts for various languages. See {{help|:compiler}}.
 
 
*delmenu.vim – Deletes all Menu's
compiler – Contains compilation scripts for various languages. See {{help|:compiler}}.
 
  +
*'''doc''' – Contains Documentation (the Vim help files, accessed with the {{help|prefix=no|:help}} command.
 
  +
*diff.exe (Windows only) – allows Windows to use Vim's diff capabilities; Unix-like systems usually have an external diff utility pre-installed which is used instead.
delmenu.vim – Deletes all Menu's
 
 
*evim.vim – script for easy vim. See {{help|evim}}.
 
  +
*[[filetype.vim]] – Detects filetype of files based on their extensions. See {{help|filetype}}.
doc – Contains Documentation
 
 
*ftoff.vim – {{help|prefix=no|:source}} this to disable detection of filetypes.
 
 
*'''ftplugin''' – Contains plugins that are loaded based on the filetype.
evim.vim – script for easy vim. See {{help|evim}}.
 
 
*ftplugin.vim – Enables filetype plugins.
 
filetype.vim – Detects filetype of files based on their extensions. See {{help|filetype}}.
+
*ftplugof.vim – Disables filetype plugins.
  +
*gvim.exe (Windows only) – the GUI-enabled Vim executable.
 
  +
*gvimext.dll (Windows only) – used to provide an "Edit with Vim" context menu on 32-bit Windows systems.
ftoff.vim – SOurce this to disable ditection of filetypes.
 
  +
*gvimrc_example.vim – Example of gvimrc. The gvimrc is a config file which is automatically loaded when the gui starts. {{help|gvimrc}}
 
 
*'''indent''' – contains indentation scripts for various languages
ftplugin – Contains plugins that are loaded based on the filetype.
 
 
*indent.vim – Enables indentation based on filetype.
 
ftplugin.vim – Enables flietype plugins
+
*indoff.vim – Disables indentation based on filetype.
 
*'''keymap''' – Contains keymap files for various encodings. See {{help|'keymap'}}.
 
 
*'''lang''' – Contains Message files translated to different languages. See {{help|:language}}.
ftplugof.vim – Disables filetype plugins
 
  +
*macmap.vim – Script to enable default Mac-style mappings (not sourced by default, except maybe on the Mac distribution?)
 
  +
*'''macros''' – Contains variuos cool stuff which is not automatically loaded. read "macros/README.txt"
gvimrc_example.vim – Example of gvimrc
 
  +
*makemenu.vim – Used by Vim to create the Syntax menu in the GUI menu bar.
 
  +
*menu.vim – Creates the default menus on the GUI menu bar.
indent – contains indentaion scripts for various languages
 
  +
*mswin.vim – sets options for Vim to behave like Windows. This script is sourced by default on a new Windows installation, and overrides a bunch of very useful Vim commands with mappings to different functionality to make Vim behave more like other Windows programs. Not recommended for users who want to delve into Vim's power, but can be useful for those who only use Vim occasionally for specific tasks.
 
indent.vim – Enables indentation based on filetype.
+
*optwin.vim – commands to create Vim's option window. {{help|:options}}
 
*'''plugin''' – Contains global plugins. All .vim files in this directory are automatically sourced at startup, after the [[vimrc]].
 
  +
*'''print''' – Contains PostScript font encoding vectors for various 8-bit character encodings. See {{help|postscript-printing}}, {{help|postscript-print-encoding}}, {{help|postscript-print-trouble}} or try a {{help|:helpgrep}} command to find out more
indoff.vim – Disables indentation based on filetype.
 
  +
*scripts.vim – helps detect the proper filetype from a file, looking at file contents for when detection by "file extension" fails.
 
  +
*'''spell''' – contains spelling dictionaries and some utility scripts used by Vim for the built-in spell checker support {{help|spell}}
keymap – Contains keymap files for various encodings. See {{help|'keymap'}}.
 
  +
*synmenu.vim – creates the default Syntax menu in the GUI menu bar.
 
lang – Contains Message files in different language. See {{help|:language}}.
+
*'''syntax''' – Contains Syntax definition files for various programming languages. See {{help|syntax}}.
 
*'''tools''' &ndash; Some useful tools. Like <code>blink</code> to blink the cursor in xterm.
 
macros &ndash; Contains variuos cool stuff. read "macros/README.txt"
+
*'''tutor''' &ndash; Contains the Vim tutorial, in multiple languages. See {{help|tutor}}.
  +
*vim.exe (Windows only) &ndash; the non-gui console Vim application.
 
menu.vim &ndash; Default Menus
+
*vim32x32.xpm &ndash; Vim Logo.
 
*vimrc_example.vim &ndash; Example of [[vimrc]], sourced by default in a new Windows installation.
 
mswin.vim &ndash; sets options for Vim to behave like Windows.
+
*vimrun.exe (Windows only) &ndash; Used by Windows Vim to start external commands.
  +
*xxd.exe (Windows only) &ndash; utility program to convert a buffer to a hex view. Unix-like systems usually have a version of this utility already installed externally. See [[Improved hex editing]] for examples of use.
 
optwin.vim &ndash; commands to create option window.
 
 
plugin &ndash; Contains plugins. All .vim files in this directory are automatically sourced.
 
 
scripts.vim &ndash; helps detect filetype in Vim scripts.
 
 
syntax &ndash; Contains Syntax definition files for various programming languages. See {{help|syntax}}.
 
 
tools &ndash; Some useful tools. Like <tt>blink</tt> to blink the cursor in xterm.
 
 
tutor &ndash; Contains tutor.vim. See {{help|tutor}}.
 
 
vim32x32.xpm &ndash; Vim Logo.
 
 
vimrc_example.vim &ndash; Example of vimrc.
 
   
 
==Comments==
 
==Comments==
  +
Do we need to list out all the various other files? vimtutor.bat, VisVim.dll, icon files, etc.?
 
----
 

Revision as of 14:18, 17 September 2013

Tip 367 Printable Monobook Previous Next

created 2002 · complexity basic · author vim_power · version 7.0


$VIMRUNTIME points to a directory where most of the files needed by Vim are kept.

As the name suggests these files are needed during "run time". Many of these are not strictly necessary for Vim to run, but they are used to provide extra functionality mostly not available in vi-compatible mode, such as syntax highlighting and filetype-based plugins.

Here is a brief overview of files and directories in $VIMRUNTIME (directories in bold).

  • autoload – Contains utility scripts which are used by plugins and scripts in other directories. These scripts are only loaded when the functionality therein is needed. See :help autoload
  • bugreport.vim – Use this file if you think you have discovered a bug in Vim. See :help bugreport.vim.
  • colors – Contains various clorschemes. See :help :colorscheme.
  • compiler – Contains compilation scripts for various languages. See :help :compiler.
  • delmenu.vim – Deletes all Menu's
  • doc – Contains Documentation (the Vim help files, accessed with the :help command.
  • diff.exe (Windows only) – allows Windows to use Vim's diff capabilities; Unix-like systems usually have an external diff utility pre-installed which is used instead.
  • evim.vim – script for easy vim. See :help evim.
  • filetype.vim – Detects filetype of files based on their extensions. See :help filetype.
  • ftoff.vim – :source this to disable detection of filetypes.
  • ftplugin – Contains plugins that are loaded based on the filetype.
  • ftplugin.vim – Enables filetype plugins.
  • ftplugof.vim – Disables filetype plugins.
  • gvim.exe (Windows only) – the GUI-enabled Vim executable.
  • gvimext.dll (Windows only) – used to provide an "Edit with Vim" context menu on 32-bit Windows systems.
  • gvimrc_example.vim – Example of gvimrc. The gvimrc is a config file which is automatically loaded when the gui starts. :help gvimrc
  • indent – contains indentation scripts for various languages
  • indent.vim – Enables indentation based on filetype.
  • indoff.vim – Disables indentation based on filetype.
  • keymap – Contains keymap files for various encodings. See :help 'keymap'.
  • lang – Contains Message files translated to different languages. See :help :language.
  • macmap.vim – Script to enable default Mac-style mappings (not sourced by default, except maybe on the Mac distribution?)
  • macros – Contains variuos cool stuff which is not automatically loaded. read "macros/README.txt"
  • makemenu.vim – Used by Vim to create the Syntax menu in the GUI menu bar.
  • menu.vim – Creates the default menus on the GUI menu bar.
  • mswin.vim – sets options for Vim to behave like Windows. This script is sourced by default on a new Windows installation, and overrides a bunch of very useful Vim commands with mappings to different functionality to make Vim behave more like other Windows programs. Not recommended for users who want to delve into Vim's power, but can be useful for those who only use Vim occasionally for specific tasks.
  • optwin.vim – commands to create Vim's option window. :help :options
  • plugin – Contains global plugins. All .vim files in this directory are automatically sourced at startup, after the vimrc.
  • print – Contains PostScript font encoding vectors for various 8-bit character encodings. See :help postscript-printing, :help postscript-print-encoding, :help postscript-print-trouble or try a :help :helpgrep command to find out more
  • scripts.vim – helps detect the proper filetype from a file, looking at file contents for when detection by "file extension" fails.
  • spell – contains spelling dictionaries and some utility scripts used by Vim for the built-in spell checker support :help spell
  • synmenu.vim – creates the default Syntax menu in the GUI menu bar.
  • syntax – Contains Syntax definition files for various programming languages. See :help syntax.
  • tools – Some useful tools. Like blink to blink the cursor in xterm.
  • tutor – Contains the Vim tutorial, in multiple languages. See :help tutor.
  • vim.exe (Windows only) – the non-gui console Vim application.
  • vim32x32.xpm – Vim Logo.
  • vimrc_example.vim – Example of vimrc, sourced by default in a new Windows installation.
  • vimrun.exe (Windows only) – Used by Windows Vim to start external commands.
  • xxd.exe (Windows only) – utility program to convert a buffer to a hex view. Unix-like systems usually have a version of this utility already installed externally. See Improved hex editing for examples of use.

Comments

Do we need to list out all the various other files? vimtutor.bat, VisVim.dll, icon files, etc.?