aboutsummaryrefslogtreecommitdiff
path: root/vim
Commit message (Collapse)AuthorAgeFilesLines
* Add `php -l` check binding for PHP filetypeTom Ryder2017-11-201-0/+57
| | | | | | Interestingly, the :compiler for the "php" filetype doesn't include the % or %:S bit in the `makeprg`, but that's easily worked around by moving that logic into the check script itself.
* Correct "fi" to "endif" in new compiler filesTom Ryder2017-11-202-2/+2
|
* Use %:S expansion only when availableTom Ryder2017-11-192-2/+14
|
* Force g:current_compiler removal before check/lintTom Ryder2017-11-196-2/+6
| | | | This seems to be necessary for Vim 6.
* Use quickfix window for check/lintTom Ryder2017-11-196-12/+12
|
* Use :compiler quickfix systems for Vim/HTML lintTom Ryder2017-11-192-2/+28
|
* Use :compiler scripts for makeprg setupTom Ryder2017-11-194-4/+24
| | | | | | | | | | | | I didn't know about :compiler until now. From :help write-compiler-plugin: > A compiler plugin sets options for use with a specific compiler. The > user can load it with the |:compiler| command. The main use is to set > the 'errorformat' and 'makeprg' options. Vim even has "perl" and "tidy" compilers already that seem to work really well. I'll just add in my own and install them.
* Add :lwindow support to Perl check/lintTom Ryder2017-11-192-2/+30
| | | | | | The checker is a bit dicey; I hope that format is reliable. It may turn out to be better to depend on Vi::QuickFix or a similar module. We'll see.
* Adapt sh check/lint to use :lmakeTom Ryder2017-11-192-10/+42
| | | | | This opens the error list in the location list for the error list if there were any. It seems to work well.
* Remove 'shellpipe' settingTom Ryder2017-11-191-3/+0
| | | | | This seems to be necessary for a location-list-based :lmake system to work for checking and linting. I'll figure out exactly why a bit later.
* Use single-quotes for strings in sh.vimTom Ryder2017-11-151-1/+1
|
* Use full word "syntax" in sh.vimTom Ryder2017-11-151-3/+3
|
* Merge branch 'feature/vim-sh' into developTom Ryder2017-11-151-0/+15
|\ | | | | | | | | * feature/vim-sh: Coax sh.vim into accepting #/% param expansion
| * Coax sh.vim into accepting #/% param expansionTom Ryder2017-11-151-0/+15
| | | | | | | | These forms of parameter expansion are specified in POSIX sh.
* | Correct URL link function name in HTML ftpluginTom Ryder2017-11-151-2/+2
|/ | | | | I missed the filetype prefix I had added to the function call in the actual declaration of the function itself.
* Correct stray elseif in auto_undodir.vimTom Ryder2017-11-141-1/+1
| | | | | | | | This was causing the following error on load: > Error detected while processing /home/tom/.vim/plugin/auto_undodir.vim: > line 48: > E580: :endif without :if: endif
* Move mapleader settings before .vimrc conf sourceTom Ryder2017-11-142-5/+6
| | | | | | | | | | From :help mapleader: > Note that the value of "mapleader" is used at the moment the mapping > is defined. Changing "mapleader" after that has no effect for already > defined mappings. So the order of evaluation matters.
* Merge branch 'feature/vim-plug' into developTom Ryder2017-11-133-18/+24
|\ | | | | | | | | * feature/vim-plug: Check for shellescape() function before using it
| * Check for shellescape() function before using itTom Ryder2017-11-133-18/+24
| | | | | | | | It was added in patch 111 for Vim 7.0.
* | Strip trailing whitespaceTom Ryder2017-11-135-11/+11
|/
* Force muttrc filetype from ftdetect rulesTom Ryder2017-11-131-1/+1
| | | | | Looks like these were getting categorised as "rc", or "M$ Resource files", in the core filetype.vim.
* Pre-emptively disable core Vim plugins in configTom Ryder2017-11-131-9/+22
| | | | Most of them, anyway. A couple of them are sane and useful.
* Limit \f mapping to normal modeTom Ryder2017-11-131-1/+1
|
* Move 'hlsearch' insert-mode suspension into pluginTom Ryder2017-11-133-14/+76
| | | | | | It's easily repackaged and it makes the configuration that much shorter, so I may as well. This version also correctly handles 'hlsearch' not being on in the first place.
* Separate g:loaded/&cp tests from feat testsTom Ryder2017-11-126-6/+24
| | | | | Keeping the tests at the beginning of plugins on one line without continuations is needed to work around &cpo-=C.
* Use :set not :setlocal for 'hlsearch'/'incsearch'Tom Ryder2017-11-121-4/+4
| | | | They don't have local analogues; they're global options.
* Correct nonexistent 'wildmode' value in Vim configTom Ryder2017-11-121-1/+1
| | | | | There is no such setting as "longest:list". What I meant was "list:longest".
* Document each 'backspace' flag in Vim configTom Ryder2017-11-121-3/+8
|
* Mention req of toggle_option_flag.vimTom Ryder2017-11-121-1/+2
|
* Adjust first sentence of format_option_toggle.txtTom Ryder2017-11-121-1/+1
|
* Add help links to toggle_option_flag.vim interfaceTom Ryder2017-11-121-0/+1
|
* Flesh out strip_trailing_whitespace.vim helpTom Ryder2017-11-121-6/+21
|
* Specify type of example in mail_mutt.vim docTom Ryder2017-11-121-3/+3
|
* Adjust layout of headings/links in Vim plugin helpTom Ryder2017-11-121-6/+3
|
* Flesh out fixed_join.vim interface documentationTom Ryder2017-11-121-8/+27
|
* Add help tag for detect_background.vim functionTom Ryder2017-11-121-0/+1
|
* Flesh out copy_linebreak.vim interface docsTom Ryder2017-11-121-12/+27
|
* Remove nonexistent keyword references from Vim docTom Ryder2017-11-121-1/+1
|
* Move Vim doc requirement to correct sectionTom Ryder2017-11-121-3/+2
|
* Apply boilerplate to Vim plugin docsTom Ryder2017-11-1210-68/+230
| | | | | | The DESCRIPTION heading for each of these is filled out now, but some of them probably need a bit more explanation. The mail_mutt.txt plugin is good, though.
* Update and correct detect_background.vim helpTom Ryder2017-11-121-4/+10
|
* Add path rules for detecting Vim help filesTom Ryder2017-11-121-0/+4
| | | | | This matches .txt files in any 'doc' directory with 'vim' or '.vim' in its ancestry.
* Complete mail_mutt.vim documentationTom Ryder2017-11-121-9/+65
|
* Remove stray blank line from mail_mutt.vimTom Ryder2017-11-121-1/+0
|
* Bind norm J on fixed_join.vim load if appropriateTom Ryder2017-11-123-10/+12
| | | | | | | If there are no mappings to the <Plug>FixedJoin target that the fixed_join.vim plugin provides at the time it is loaded, and the line-joining function of normal-mode J is not already mapped, the plugin will try to map it itself, for a more plug-and-play.
* Add guards for presence of b:undo_* varTom Ryder2017-11-1215-78/+158
| | | | | This variable is not set in older Vims (early 6.x), and I think it's worth guarding for.
* Exclude SC1090 (failed source) shellcheck errorTom Ryder2017-11-121-3/+3
| | | | | | This error seems to be raised when ShellCheck can't source a file because its filename is not known until runtime. I don't want it to do that anyway, so I've just excluded it by default.
* Move lots of local Vim config into vim/afterTom Ryder2017-11-1241-292/+413
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a relatively drastic change that should have been done progressively, but I got carried away in ripping everything out and putting it back in again. Reading the documentation for writing a Vim script (:help usr_41.txt), I am convinced that all of the content that was in the vim/ftplugin directory and some of the vim/indent directory actually belonged in vim/after/ftplugin and vim/after/indent respectively. This is because the section on filetypes makes the distinction between replacing the core filetype or indent plugins and merely adding to or editing them after the fact; from :help ftplugin: > If you do want to use the default plugin, but overrule one of the > settings, you can write the different setting in a script: > > setlocal textwidth=70 > > Now write this in the "after" directory, so that it gets sourced after > the distributed "vim.vim" ftplugin after-directory. For Unix this > would be "~/.vim/after/ftplugin/vim.vim". Note that the default > plugin will have set "b:did_ftplugin", but it is ignored here. Therefore, I have deleted the user_indent.vim and user_ftplugin.vim plugins and their documentation that I wrote, and their ftplugin.vim and indent.vim shims in ~/.vim, in an attempt to make these plugins elegantly undo-ready, and instead embraced the way the documentation and $VIMRUNTIME structure seems to suggest. I broke the ftplugin files up by function and put them under subdirectories of vim/after named by filetype, as the 'runtimepath' layout permits. In doing so, I also carefully applied the documentation's advice: * Short-circuiting repeated loads * Checking for existing mappings using the <Plug> prefix approach * Avoiding repeated function declarations overwriting each other * Guarding against 'cpotions' mangling things (by simply short-circuiting if 'compatible' is set). I've made the b:undo_ftplugin and b:undo_indent commands less forgiving, and append commands to it inline with the initial establishment of the setup they're reversing, including checking that the b:undo_* variable actually exists in the first place. For the indentation scripts, however, three of the four files originally in vim/indent actually do belong there: 1. csv.vim, because it doesn't have an indent file in the core. 2. tsv.vim, because it doesn't have an indent file in the core. 3. php.vim, because it does what ftplugins are allowed to do in preventing the core indent rules from running at all. The indent/vim.vim rules, however, have been moved to after/indent/vim.vim, because the tweaks it makes for two-space indentation are designed to supplement the core indent rules, not replace them. Finally, I've adjusted Makefile targets accordingly for the above, given the vim/ftplugin directory is now empty and there are three new directories in vim/after to install. We wrap these under a single `install-vim-after` parent target for convenience. The `install-vim-after-ftplugin` target accommodates the additional level of filetype directories beneath it.
* Add author/license boilerplate to all pluginsTom Ryder2017-11-112-0/+6
| | | | user_ftplugin.vim and user_indent.vim seem to be missing it.
* Merge branch 'feature/vim-mutt-plug' into developTom Ryder2017-11-113-0/+76
|\ | | | | | | | | | | | | * feature/vim-mutt-plug: Move mutt_mail.vim line select logic into plugin Add new mail_mutt.vim plugin, apply mappings Beginnings of a buffer-to-Mutt mailer plugin