Reply to message «Re: Unable to clear abbreviations», sent 02:17:48 09 June 2011, Thursday by Uri Moszkowicz:
> Those are possible workarounds but I don't know why you say "another > option" when none of those actually disables abbreviations. The first > disables abbreviations and more. As to the second, can you guarantee that > no plugin which ships with Vim defines abbreviations? Plugins shipped with vim come with options to disable partially their functionality that may be annoying. At least, they are more strictly moderated then most others. > As to the second, can you guarantee that > no plugin which ships with Vim defines abbreviations? Even so, "not > installing plugins with abbreviations" is definitely different than > "disable abbreviations". Also, you may want the other aspects of the > plugin. This is normally solved by convincing authors to make a new option for their plugin. > The third option results in deletion, not disablement, of the > abbreviations, not to mention that it's not obvious to any but those > intimately familiar with Vim internals. Not vim internals, but common things that may be present on the command-line. > Someone has yet to explain why > ":abc <buffer>" works but ":abc" does not. Perhaps because if :abc cleared local abbreviations it would have to clear local abbreviations in all buffers to make it consistent, but it is harder to implement. > Option (1) is similarly not > obvious. Yes, because it is intended to disable almost all input processing in order to paste code literally. I don't know how can one work with this option enabled when you are not pasting. > At a minimum, if option (1) or (3) is your preferred workaround then it > could be documented in the abbreviations section of the help page. I don't think so as (1) is to be enabled only when pasting and not intended to be used when not doing so and (3) should be solved by plugin authors: after/ directory is a hack for plugins that lack some options. If plugin does not define an option, after/ directory itself is documented as well is :au. One cannot document everything that you can do with after/ or autocommands, it will make too many noise in the documentation which is already very big. > I was > surprised given the number of other "no*" options that exist not to find a > "noabr" option and it seems inconsistent to me. autoindent is another > similar modify as you type feature which does have a "no" mode for example. 'autoindent' is poor example as there is no other way to purge out functionality defined in C code. 'eventignore' can be better example here, but there is a difference: the code that I wrote earlier can be used to restore any abbreviation that do not use <script> modifier, but autocommands cannot be saved and restored in this fashion as they must have access to script-local variables. I do not know any option other then 'eventignore' that temporary disables something defined by plugins, not something written in C code (though I can't say I remember clearly all vim options). Original message: > Those are possible workarounds but I don't know why you say "another > option" when none of those actually disables abbreviations. The first > disables abbreviations and more. As to the second, can you guarantee that > no plugin which ships with Vim defines abbreviations? Even so, "not > installing plugins with abbreviations" is definitely different than > "disable abbreviations". Also, you may want the other aspects of the > plugin. The third option results in deletion, not disablement, of the > abbreviations, not to mention that it's not obvious to any but those > intimately familiar with Vim internals. Someone has yet to explain why > ":abc <buffer>" works but ":abc" does not. Option (1) is similarly not > obvious. > > At a minimum, if option (1) or (3) is your preferred workaround then it > could be documented in the abbreviations section of the help page. I was > surprised given the number of other "no*" options that exist not to find a > "noabr" option and it seems inconsistent to me. autoindent is another > similar modify as you type feature which does have a "no" mode for example. > > On Wed, Jun 8, 2011 at 6:00 PM, Ben Fritz <[email protected]> wrote: > > > I don't think, another option for disabling abbreviations is actually > > > useful. > > > > I think that another option for disabling abbreviations is definitely > > not useful. I think the proper solutions are: > > 1. Temporarily set the 'paste' option. Maybe even write a command > > which sets it and then mitigates some of the side effects. > > 2. Don't set up the abbreviations in the first place, or don't install > > plugins which define them > > 3. Put an 'after' plugin or an autocmd in to undo the abbreviations > > you don't like from plugins which don't have an option to disable them
signature.asc
Description: This is a digitally signed message part.
