Move plugin.
[profile.git] / .vim / doc / localvimrc.txt
1 *localvimrc.txt*             For Vim version 7.3  Last change: 2012 September 25
2                           
3 localvimrc                 Version 2.1.0                     *localvimrc* *lvimrc*
4                           
5 |localvimrc-description|     Description
6 |localvimrc-commands|        Commands
7 |localvimrc-settings|        Settings
8 |localvimrc-contribute|      Contribute
9 |localvimrc-credits|         Credits
10 |localvimrc-changelog|       Changelog
11
12 ==============================================================================
13 DESCRIPTION                                             *localvimrc-description*
14
15 This plugin searches for local vimrc files in the file system tree of the
16 currently opened file. By default it searches for all ".lvimrc" files from the
17 file's directory up to the root directory and loads them in reverse order. The
18 filename and amount of loaded files are customizable through global variables.
19
20 For security reasons it the plugin asks for confirmation before loading a
21 local vimrc file and loads it using |:sandbox| command. The plugin asks once
22 per session and local vimrc before loading it, if the file didn't change since
23 previous loading.
24
25 It is possible to define a whitelist and a blacklist of local vimrc files that
26 are loaded or ignored unconditionally.
27
28
29 ==============================================================================
30 COMMANDS                                                   *localvimrc-commands*
31
32 ------------------------------------------------------------------------------
33 *LocalVimRCClear*
34
35 Clear all stored decisions made in the past, when the plugin asked about
36 sourcing a local vimrc file.
37
38 ==============================================================================
39 SETTINGS                                                   *localvimrc-settings*
40
41 Use: >
42     let g:option_name=option_value
43
44 to set them in your global vimrc.
45
46 ------------------------------------------------------------------------------
47 *g:localvimrc_name*
48
49 Filename of local vimrc files.
50
51 Default: ".lvimrc"
52
53 ------------------------------------------------------------------------------
54 *g:localvimrc_count*
55
56 On the way from root, the last localvimrc_count files are sourced.
57
58 Default: -1 (all)
59
60 ------------------------------------------------------------------------------
61 *g:localvimrc_sandbox*
62
63 Source the found local vimrc files in a sandbox for security reasons.
64
65 Value    Description~
66 0        Don't load vimrc file in a sandbox.
67 1        Load vimrc file in a sandbox.
68
69 Default: 1
70
71 ------------------------------------------------------------------------------
72 *g:localvimrc_ask*
73
74 Ask before sourcing any local vimrc file. In a vim session the question is
75 only asked once as long as the local vimrc file has not been changed.
76
77 Value    Description~
78 0        Don't ask before loading a vimrc file.
79 1        Ask before loading a vimrc file.
80
81 Default: 1
82
83 ------------------------------------------------------------------------------
84 *g:localvimrc_persistent*
85
86 Make the decisions given when asked before sourcing local vimrc files
87 persistent over multiple vim runs. This is done by storing the decisions in
88 viminfo. Therefore it is required to include the |viminfo-!| flag in your
89 viminfo setting.
90
91 Value    Description~
92 0        Don't store and restore any decisions.
93 1        Store and restore decisions only if the answer was given in upper
94          case (Y/N/A).
95 2        Store and restore all decisions.
96
97 Default: 0
98
99 ------------------------------------------------------------------------------
100 *g:localvimrc_whitelist*
101
102 If a local vimrc file matches the regular expression given by
103 |g:localvimrc_whitelist| this file is loaded unconditionally.
104
105 Files matching |g:localvimrc_whitelist| are sourced even if they are matched
106 by |g:localvimrc_blacklist|.
107
108 See |regular-expression| for patterns that are accepted.
109
110 Example:
111
112 " whitelist all local vimrc files in users project foo and bar
113 let g:localvimrc_whitelist='/home/user/projects/\(foo\|bar\)/.*'
114
115 Default:  No whitelist
116
117 ------------------------------------------------------------------------------
118 *g:localvimrc_blacklist*
119
120 If a local vimrc file matches the regular expression given by
121 |g:localvimrc_blacklist| this file is skipped unconditionally.
122
123 Files matching |g:localvimrc_whitelist| are sourced even if they are matched
124 by |g:localvimrc_blacklist|.
125
126 See |regular-expression| for patterns that are accepted.
127
128 Example:
129
130 " blacklist all local vimrc files in shared project directory
131 let g:localvimrc_whitelist='/share/projects/.*'
132
133 Default:  No blacklist
134
135 ------------------------------------------------------------------------------
136 *g:localvimrc_debug*
137
138 Debug level for this script.
139
140 Default: 0
141
142 ==============================================================================
143 CONTRIBUTE                                               *localvimrc-contribute*
144
145 To contact the author (Markus Braun), please email: markus.braun@krawel.de
146
147 If you think this plugin could be improved, fork on GitHub and send a pull
148 request or just tell me your ideas.
149
150 GitHub: https://github.com/embear/vim-localvimrc
151
152 ==============================================================================
153 CREDITS                                                     *localvimrc-credits*
154
155 - Simon Howard for his hint about "sandbox"
156 - Mark Weber for the idea of using checksums
157 - Daniel Hahler for various patches
158
159 ==============================================================================
160 CHANGELOG                                                 *localvimrc-changelog*
161
162 v2.1.0 : 2012-09-25
163   - add possibility to make decisions persistent
164   - use full file path when storing decisions
165
166 v2.0.0 : 2012-04-05
167   - added g:localvimrc_whitelist and g:localvimrc_blacklist settings.
168   - ask only once per session and local vimrc before loading it, if it didn't
169     change.
170
171 v2758 : 2009-05-11
172   - source .lvimrc in a sandbox to better maintain security, configurable
173     using g:localvimrc_sandbox.
174   - ask user before sourcing any local vimrc file, configurable using
175     g:localvimrc_ask.
176
177 v1870 : 2007-09-28
178   - new configuration variable g:localvimrc_name to change filename.
179   - new configuration variable g:localvimrc_count to limit number of loaded
180     files.
181
182 v1613 : 2007-04-05
183   - switched to arrays in vim 7.
184   - escape file/path names correctly.
185
186 v1.2 : 2002-10-09
187   - initial version
188
189 ==============================================================================
190
191 vim:tw=78:ts=8:ft=help:norl: