Permalink
Browse files

docs

  • Loading branch information...
1 parent b0a8aee commit 200e58cb95262203c6bb9a936ea4705d07dabedb @tomtom committed Dec 25, 2011
Showing with 39 additions and 51 deletions.
  1. +39 −51 doc/tplugin.txt
View
@@ -58,67 +58,48 @@ version 0.2) could cause problems and is deprecated.
Usage~
- *tplugin-autoload*
-With autoload:
- By default, tplugin has autoload enabled. With autoload, you can use
- tplugin by (1) loading the macro in your |vimrc| file and then (2)
- (optional step) setting non-standard root directories. The standard
- root-directory is where tplugin was installed in (see |:TPluginRoot|).
+By default, tplugin has autoload enabled. With autoload, you can use
+tplugin by
- Example: >
-
- runtime macros/tplugin.vim
- " Only necessary if you use a non-standard root directory
- TPluginRoot /home/x/src/bundle
-
-< (3) Collect the autoload information by running the |:TPluginScan|
- command. (4) Restart vim.
-
- The plugins will be loaded as soon as one of its functions or
- commands is called for the first time.
-
- When using autoload, for every known ROOT (see |:TPluginRoot|), the
- file ROOT/_tplugin.vim is loaded on startup. This file is created by
- the |:TPluginScan| command and should not be edited by the user.
+(1) loading the macro in your |vimrc| file >
+
+ " Put this close to the top of your vimrc file
+ runtime macros/tplugin.vim
- *tplugin-dependencies* *tplugin-metadata*
- When enabling a repository (ROOT/REPO), e.g., by calling |:TPlugin|,
- the files ROOT/_tplugin_REPO.vim and ROOT/REPO/_tplugin.vim are
- loaded. These files allows users (or plugin developers) to, e.g.,
- define dependencies (see |:TPluginBefore| and |:TPluginAfter|).
+(2) (optional step) setting non-standard root directories. The standard
+root-directory is where tplugin was installed in (see |:TPluginRoot|). >
+ " Only necessary if you use a non-standard root directory
+ TPluginRoot /home/x/src/bundle
-Without autoload:
+It might still be necessary to load certain plugins right on startup for them
+to work properly.
- (1) Load the macro and (2) set non-standard root directories. In
- addition, (3) load plugins as desired.
+(3) Start vim and collect the autoload information by running the
+|:TPluginScan| command.
- Example: >
+(4) Restart vim.
- runtime macros/tplugin.vim
- " Only necessary if you use a non-standard root directory
- TPluginRoot /home/x/src/bundle
- " Load all plugins in repo1
- TPlugin repo1
- " Load only specified plugins from repo2
- TPlugin repo2 foo bar
+The plugins will be loaded as soon as one of its functions or
+commands is called for the first time.
-< It is advantageous to source the macro rather at the top of your
- vimrc file before making any changes to the 'runtimepath'. If you
- don't change the 'runtimepath', the position is of no importance.
+Full example as it could be found in a |vimrc| file: >
- Then install your plugins/bundles/repos in the root directory. After
- restarting vim, type :TPluginScan!
+ runtime macros/tplugin.vim
+ TPluginRoot F:\vim-addons
+ TPlugin vim-surround
+ let g:snippets_dir = 'X:\vimfiles\snippets,F:\vim-addons\snipmate.vim\snippets'
+ TPlugin snipmate.vim
+ TPlugin! tlib_vim 02tlib
- Full example as it could be found in a |vimrc| file: >
- runtime macros/tplugin.vim
- TPluginRoot F:\vim-addons
- TPlugin vim-surround
- let g:snippets_dir = 'X:\vimfiles\snippets,F:\vim-addons\snipmate.vim\snippets'
- TPlugin snipmate.vim
- TPlugin! tlib_vim 02tlib
+ *tplugin-dependencies*
+ *tplugin-metadata*
+When enabling a repository (ROOT/REPO), e.g., by calling |:TPlugin|,
+the files ROOT/_tplugin_REPO.vim and ROOT/REPO/_tplugin.vim are
+loaded. These files allows users (or plugin developers) to, e.g.,
+define dependencies (see |:TPluginBefore| and |:TPluginAfter|).
CAVEAT: If you have a file after/plugin/foo.vim in you user vimfiles
@@ -209,6 +190,7 @@ Contents~
TPluginDependencies ................ |TPluginDependencies()|
g:tplugin#autoload_exclude ......... |g:tplugin#autoload_exclude|
g:tplugin#scan ..................... |g:tplugin#scan|
+ g:tplugin#shallow_scan ............. |g:tplugin#shallow_scan|
tplugin#ScanRoots .................. |tplugin#ScanRoots()|
g:tplugin#vcsdo#script ............. |g:tplugin#vcsdo#script|
g:tplugin#vcsdo#log_buffer ......... |g:tplugin#vcsdo#log_buffer|
@@ -268,11 +250,14 @@ g:tplugin_load_plugin (default: [])
loaded.
*:TPluginRoot*
-:TPluginRoot DIRECTORY
+:TPluginRoot[!] DIRECTORY
Define the root directory for the following |:TPlugin| commands.
Read autoload information if available (see |g:tplugin_autoload| and
|:TPluginScan|).
+ With the optional <bang>, don't register commands, functions etc. when
+ scanning the root with |:TPluginScan|.
+
If DIRECTORY ends with "*", it doesn't refer to a directory hierarchy
� la vimfiles but to a single "flat" directory.
@@ -423,8 +408,11 @@ g:tplugin#scan (default: 'cfptham_')
_ ... include _tplugin.vim files
all ... all of the above
+ *g:tplugin#shallow_scan*
+g:tplugin#shallow_scan (default: 'hm')
+
*tplugin#ScanRoots()*
-tplugin#ScanRoots(immediate, roots, args)
+tplugin#ScanRoots(immediate, roots, shallow_roots, args)
Write autoload information for each root directory to
"ROOT/_tplugin.vim".
Search in autoload/tplugin/autoload/*.vim for prefabricated autoload

0 comments on commit 200e58c

Please sign in to comment.