aboutsummaryrefslogtreecommitdiff
path: root/vim/after
Commit message (Collapse)AuthorAgeFilesLines
* Add after/ftplugin for gitcommit to quote with >Tom Ryder2018-06-201-0/+25
| | | | | | I love the way this works when writing mail, and find myself missing it when writing Git commits that include block quotes. This is ported from ftplugin/mail.vim.
* Use autoload function for tidy filtersTom Ryder2018-06-172-26/+12
|
* Use autoload function for temp-makeprg :lmakeTom Ryder2018-06-178-165/+55
|
* Arrange for tidiers to hold window positionTom Ryder2018-06-172-2/+16
|
* Completely overhaul after/ftplugin filesTom Ryder2018-06-1718-356/+346
| | | | | | | | | | | | | Should have done some of this in separate commits; oh well. * Rewrite headers for each ftplugin * Require Vim version >= 7.0, and thereby: * Switch back to location list * Don't check for b:undo_ftplugin existence, assume it * Save and restore compiler instead of internal options * Add bash, ksh, sh, and shellcheck compilers * Rename mail/format_flowed.vim to mail/flowed.vim * Rename sh/bash_han.vim to sh/han.vim
* Use short-circuit for no-mapping checkTom Ryder2018-06-1611-197/+197
|
* Use `function!` consistently in ftpluginsTom Ryder2018-06-168-104/+88
|
* Spin off markdown_autoformat as its own distroTom Ryder2018-06-051-108/+0
|
* Restore ftplugin extras to vim/after dirTom Ryder2018-06-053-0/+186
| | | | | This reverts commit a14bc50. Changed my mind; decided it's tidier this way.
* Move Markdown and PHP ftplugins from after dirTom Ryder2018-06-043-174/+0
| | | | | | | Because we use our own private copies of the primary filetype plugins, they'll get loaded in the correct order from here. Also adjust Makefile to accommodate the extra level.
* Support counts and registers in paste wrappingTom Ryder2018-06-041-3/+3
|
* Rearrange/correct markdown_autoformat.vimTom Ryder2018-06-041-19/+9
|
* Use case-insensitive Vim ==#Tom Ryder2018-06-043-3/+3
|
* Clear markdown_autoformat.vim autocmds correctlyTom Ryder2018-06-041-1/+1
|
* Move markdown_autoformat.vim funcs back to localTom Ryder2018-06-041-4/+64
| | | | No advantage to making them autoload
* Don't load my HTML ftplugins for Markdown typesTom Ryder2018-06-043-3/+15
| | | | | | The stock markdown.vim file loads in all the html.vim ftplugins too. This is probably a good idea for the stock files, but none of my HTML extension plugins are appropriate for Markdown, so exclude them.
* Set and clear Markdown autocmd in groupTom Ryder2018-06-041-4/+13
|
* Use heuristics on Markdown to guess autoformatTom Ryder2018-06-041-0/+4
|
* Refactor suspend_autoformat.vim, add autoloadTom Ryder2018-06-042-34/+33
| | | | | | | | * Add a function to suspend autoformatting for the duration of pasting lines. * Factor the ftplugin's functions out to be autoloaded; this requires Vim >=7.0, but it already needed that. * Add Makefile infrastructure for new autoload directories/files.
* Correct logic of Markdown/text spell checkingTom Ryder2018-06-032-14/+18
|
* Vim ftplugin: hold autoformat in *.md code blocksTom Ryder2018-06-031-0/+34
|
* Refactor Vim distribution plugin/macro handlingTom Ryder2018-06-021-0/+10
| | | | | | Intelligently choose how to load matchit.vim, and clean up the short-circuit variables for the unwanted distribution plugins in an "after" plugin script.
* Suspend 'C' from 'cpoptions' for sh syn extensionsTom Ryder2018-01-211-0/+12
| | | | This allows me to use line-breaking to keep the file readable.
* Break some continued lines in Vim indent filesTom Ryder2018-01-211-2/+2
| | | | | This will mean they load correctly when the 'C' flag preventing line-breaking is in 'cpoptions', and 'compatible' is set.
* Remove HTML and PHP syntax highlighting tweaksTom Ryder2018-01-172-5/+0
| | | | | The things they were intended to fix aren't actually that bad, on review.
* Clear unwanted syntax group, don't link to NONETom Ryder2018-01-171-1/+1
|
* Add syntax checking with zsh -n for Z shellTom Ryder2017-11-231-0/+49
|
* 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.
* Force g:current_compiler removal before check/lintTom Ryder2017-11-194-0/+4
| | | | 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-192-4/+2
| | | | | | | | | | | | 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.
* 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.
* 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-1215-0/+389
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove false error flagging for sh char class globTom Ryder2017-11-091-0/+5
| | | | | | The syntax highlighter flags this code with an error on the final square bracket: `case $foo in [![:ascii:]]) ;; esac`, but that's all legal. I'm not yet sure how to fix it, so will just turn the error group for now.
* Fix 'while'/'until' highlighting in syntax/sh.vimTom Ryder2017-11-091-0/+14
| | | | | | | These two changes coax syntax/sh.vim into realising that POSIX shell does not specify 'until' as a builtin (that's a Bash/Ksh thing), and that POSIX shell is able to nest 'while' loops within other blocks (that's not a Bash/Ksh thing).
* Add clustering for POSIX shell syntax groupsTom Ryder2017-11-081-0/+3
| | | | | | This is what was missing after I initially redefined these groups and stopped all POSIX shell scripts thinking they were POSIX. The words now highlight correctly when within control structures again.
* Add `kill` as shStatementTom Ryder2017-11-081-0/+1
| | | | | It's not a shell builtin in `dash`, but it is in `Bash`, and I kind of think of it that way.
* Add `break`, `continue`, `return` as shStatementTom Ryder2017-11-081-1/+5
|
* Override commands and variables for syntax/sh.vimTom Ryder2017-11-081-0/+76
| | | | | | | | | | The defaults for these groups don't make much sense to me, so I completely reset them. This isn't quite complete yet; for some reason as soon as e.g. an IFS= setting is contained in e.g. an "if" or "while" block, they don't highlight correctly anymore. There's probably some other part of the core syntax/sh.vim file I need to include here.
* Disable unwanted shell error syntax for any shellTom Ryder2017-11-081-12/+7
|
* Use sh.vim local vars not global POSIX hacksTom Ryder2017-11-081-7/+9
| | | | | | | | | | | | | | | | | | | Rather than setting g:is_posix and working around core syntax/sh.vim's ideas about Korn and POSIX shells, forego sh.vim's efforts to guess what shell the system /bin/sh is entirely. It's irrelevant to me anyway, since I'll often be writing shell scripts to run on an entirely different system. Instead, if we have a #!/bin/sh shebang reflected in the b:is_sh variable set by core filetype.vim, and we don't have any other buffer-level indication of what shell this is, assume it's POSIX, because I very rarely write Bourne. Then, after the syntax file is loaded, clear away all but one of the resulting b:is_* variables. I have a feeling this is going to end with me re-implementing this syntax file, possibly as separate sh.vim, bash.vim, and ksh.vim files.