aboutsummaryrefslogtreecommitdiff
path: root/vim/plugin/command_typos.vim
Commit message (Collapse)AuthorAgeFilesLines
* Use consistent comment layout for Vim pluginsTom Ryder2017-11-061-3/+4
|
* Don't overwrite plugin-specified user commandsTom Ryder2017-11-061-9/+9
| | | | | | | | | | | | | The Google Vimscript Style Guide says: <https://google.github.io/styleguide/vimscriptguide.xml#Commands> > Excluding [!] prevents your plugin from silently clobbering existing > commands. Command conflicts should be resolved by the user. This makes sense to me as we can think of <Plug> mapping and user commands as being the user-accessible portion of the interface, rather than the functions which can be properly namespaced with autoload#Syntax(), if exposed at all.
* Add short-circuit boilerplate to pluginsTom Ryder2017-11-041-29/+34
| | | | | | | | | | | | | | | | | | | | Set a g:loaded_* flag to prevent repeated reloads, and refuse to load at all if &compatible is set or if required features are missing. Some more accommodating plugins avoid the problems 'compatible' causes by saving its value at startup into a script variable, setting the option to the Vim default, and then restoring it when the plugin is done, to prevent any of its flags from interfering in the plugin code: let s:save_cpo = &cpo set cpo&vim ... let &cpo = s:save_cpo unlet s:save_cpo I don't want this boilerplate, so I'm going to do what Tim Pope's modules seem to, and just have the plugin refuse to do a single thing if 'compatible' is set.
* Adjust plugin code layout a lotTom Ryder2017-11-041-9/+28
| | | | | | | | | | | | | Including renaming big_file.vim and accompanying functions yet again, to big_file_options.vim. Trying to keep complex autocmd and mapping definitions on long lines broken up semantically; definition and options on one line, patterns or mapping key on the next, and the command to run on the last. Also trying to make sure that <silent>, <buffer>, and <unique> are applied in the correct places, and that all mapping commands are using the :<C-U> idiom for the command prefix.
* Use same comment boilerplate for custom pluginsTom Ryder2017-11-041-0/+5
| | | | A brief explanation, an author name, and the license should do fine.
* Check 'eval' feature for loading command_typos.vimTom Ryder2017-11-041-1/+1
| | | | | I strongly suspect the presence of 'user_commands' implies it, but I'm not sure.
* Separate command typos config to pluginTom Ryder2017-11-031-0/+14
Tentatively named command_typos.vim. I've just moved this as-is for now, but it will need review, especially the hardcoded mappings.