aboutsummaryrefslogtreecommitdiff
path: root/vim/ftplugin
Commit message (Collapse)AuthorAgeFilesLines
...
* Adjust UrlLink() to yank word without text objectsTom Ryder2017-11-031-1/+3
|
* Refactor UrlLink() function normal! commandsTom Ryder2017-11-031-2/+10
| | | | | | | | | Tidy up the 'normal!' commands and comment them in appropriate groups. Take advantage of the natural command-termination at the end of a 'normal!' string to end insert mode. It would be better to do all of this with pure VimL functions, but I don't know how yet.
* Use single quotes for HTML link mapping :executeTom Ryder2017-11-031-2/+2
| | | | Saves some backslashing, just like in shell and Perl!
* Refactor HTML tidy(1) mappingTom Ryder2017-11-031-1/+4
| | | | | Move the logic into a script function. Use single quotes for the strings, too, since we don't need interpolation.
* Use <Leader>/<LocalLeader> correctly in Vim configTom Ryder2017-11-032-5/+5
| | | | | | | From ":help <LocalLeader>": > In a global plugin <Leader> should be used and in a filetype plugin > <LocalLeader>. "mapleader" and "maplocalleader" can be equal.
* Apply name conventions, scoping to Vim identifiersTom Ryder2017-10-301-2/+2
| | | | | | | | | | | | | | | | | | The Google VimScript Style Guide says <https://google.github.io/styleguide/vimscriptguide.xml#Naming>: >In general, use plugin-names-like-this, FunctionNamesLikeThis, >CommandNamesLikeThis, augroup_names_like_this, >variable_names_like_this. Adjusted variable, function, and `augroup` names accordingly, including setting script scope for some of the functions and their calls (`s:` and `<SID>` prefixes). Initially I tried using `prefix#`, but it turns out that this is a namespacing contention for publically callable functions like `pathogen#infect`, and none of these functions need to be publically callable.
* Merge branch 'vim/vint'Tom Ryder2017-10-301-4/+4
|\ | | | | | | | | | | The Vim configuration, excluding the submodule plugin bundles, now passes a strict run of the vim-vint tool. There's also now a `lint-vim` target in the Makefile.
* | Move non-indent HTML Vim config indent->ftpluginTom Ryder2017-10-301-0/+11
|/ | | | | This was mistakenly moved along with some indentation settings in 9858af6.
* Rearrange and better explain ksh syntax workaroundTom Ryder2017-10-301-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | Move the rule setting the custom b:is_ksh variable used for this workaround (established in 52615f6) into an ftplugin file, rather than into ftdetect; the latter seems a much more appropriate place since by this point we've definitely decided the file type is "sh". From the revised comment in this changeset: >Setting g:is_posix above also prompts Vim's core syntax/sh.vim script >to set g:is_kornshell and thereby b:is_kornshell to the same value as >g:is_posix. > >That's very confusing, so before it happens we'll copy b:is_kornshell's >value as determined by filetype.vim and ~/.vim/ftdetect/sh.vim into a >custom variable b:is_ksh, before its meaning gets confused. > >b:is_ksh as a name is more inline with b:is_bash and b:is_sh, anyway, >so we'll just treat b:is_kornshell like it's both misnamed and broken. > >We can then switch on our custom variable in ~/.vim/after/syntax/sh.vim >to apply settings that actually *are* unique to Korn shell and its >derivatives.
* Move filetype-specific indent options into indent/Tom Ryder2017-10-308-54/+0
| | | | | | I'm still getting used to the structure of the configuration here, and had mistakenly put these indent-related settings into files in the ftplugin directory.
* Add some more file-specific indent preferencesTom Ryder2017-10-305-0/+33
| | | | | | | | | | For some languages in which I write often: C, HTML, Perl, PHP, and shell scripts. All of these values presently match the defaults specified in config/indent.vim, but for languages I commonly use it's probably appropriate to have files to set the indent settings explicitly anyway, especially if we switched from a filetype with different values.
* Add detection, tweak indent/whitespace for CSV/TSVTom Ryder2017-10-302-0/+6
| | | | | | | | | | | | | | Vim does not seem to have any built-in detection or settings for CSV or TSV files, so I've added a couple here, based on filename patterns matching the .csv and .tsv extensions. If either of these types are detected, the 'autoindent' and 'expandtab' options are both switched off, as they're undesirable, especially in TSVs where a literal tab is almost certainly what's intended. Ideally, these same two setting would apply to any filetype not otherwise categorisable, but I can't figure out a way to do that safely yet; there was an attempt made in d3d998c.
* Move vim/after/ftplugin files into vim/ftpluginTom Ryder2017-10-305-0/+34
None of the settings in here need to be run after the core configuration files are loaded, so I'll put them in a slightly more accessible or logical place. This adds a new target `install-vim-ftplugin`, and makes that a prerequisite of the `install-vim` target.