You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,6 +103,14 @@ As I explained above the plug-in by default doesn't update or highlight your tag
103
103
104
104
Note: Like the `g:easytags_always_enabled` option, if you change this option it won't apply until you restart Vim, so you'll have to set this option in your [vimrc script][vimrc].
105
105
106
+
### The `g:easytags_updatetime_min` option
107
+
108
+
Vim has a setting which influences how often the plug-in is automatically executed. When this setting is too low, the plug-in can break. For this reason the plug-in warns you when ['updatetime'][updatetime] is lower than 4000 milliseconds. If you really want the plug-in to be executed more than once every 4 seconds (without a warning) you can lower the minimum acceptable updatetime by setting this option (number of milliseconds).
109
+
110
+
### The `g:easytags_updatetime_autodisable` option
111
+
112
+
Other plug-ins may lower the ['updatetime'][updatetime] value in certain contexts, e.g. insert mode in the case of the [neocomplcache][neocomplcache] plug-in. By setting this option to 1 (true) you can configure the easytags plug-in so that it doesn't give warnings about the updatetime option but instead skip updating and highlighting while the updatetime is set too low. When the updatetime is restored to a reasonable value the plug-in resumes.
113
+
106
114
### The `g:easytags_auto_update` option
107
115
108
116
By default the plug-in automatically updates and highlights your tags when you stop typing for a moment. If you want to disable automatic updating while keeping automatic highlighting enabled you can set this option to false:
@@ -264,13 +272,15 @@ This software is licensed under the [MIT license](http://en.wikipedia.org/wiki/M
" Public interface through (automatic) commands. {{{1
9
9
@@ -36,9 +36,24 @@ endfunction
36
36
37
37
function!xolox#easytags#autoload(event)" {{{2
38
38
try
39
-
" Check for unreasonable &updatetime values.
40
-
ifa:event=~? 'cursorhold'&& &updatetime < 4000
41
-
callxolox#misc#msg#warn("easytags.vim %s: I'm being executed every %i milliseconds! Please set the 'updatetime' option to >= 4000 (4 seconds). To find where 'updatetime' was changed execute ':verbose set updatetime?'", g:xolox#easytags#version, &updatetime)
39
+
ifa:event=~? 'cursorhold'
40
+
" Only for the CursorHold automatic command: check for unreasonable
41
+
" &updatetime values. The minimum value 4000 is kind of arbitrary
42
+
" (apart from being Vim's default) so I made it configurable:
43
+
let updatetime_min =xolox#misc#option#get('easytags_updatetime_min', 4000)
44
+
if &updatetime < updatetime_min
45
+
" Other plug-ins may lower &updatetime in certain contexts, e.g.
46
+
" insert mode in the case of the neocomplcache plug-in. The following
47
+
" option (disabled by default unless neocomplcache is loaded) silences
48
+
" the warning and makes the easytags plug-in skip the update and
49
+
" highlight. When the &updatetime is restored to a reasonable value
callxolox#misc#msg#warn("easytags.vim %s: I'm being executed every %i milliseconds! Please :set updatetime=%i. To find where 'updatetime' was changed execute ':verb set ut?'", g:xolox#easytags#version, &updatetime, updatetime_min)
55
+
endif
56
+
endif
42
57
endif
43
58
let do_update =xolox#misc#option#get('easytags_auto_update', 1)
44
59
let do_highlight =xolox#misc#option#get('easytags_auto_highlight', 1) && &eventignore!~?'\<syntax\>'
0 commit comments