path: root/vim/after/indent
Commit message (Collapse)AuthorAgeFilesLines
* Adjust 'indentkeys' in HTML indentingTom Ryder2018-07-241-0/+4
* Remove line continuations from VimL indent afterTom Ryder2018-07-181-3/+2
* Rearrange Vim's VimL indent fileTom Ryder2018-07-061-8/+9
* Correct 'softtabstop' test in indent/vim.vimTom Ryder2018-07-051-1/+1
* Add variable existence guard to after/indent/vimTom Ryder2018-06-301-1/+3
* Review vim/ftplugin and vim/indent filesTom Ryder2018-06-301-4/+8
* 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.
* Add guards for presence of b:undo_* varTom Ryder2017-11-121-2/+4
| | | | | This variable is not set in older Vims (early 6.x), and I think it's worth guarding for.
* Move lots of local Vim config into vim/afterTom Ryder2017-11-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Move PHP indent nixing into ~/.vim/indentTom Ryder2017-10-301-4/+0
| | | | | | | | | This method short-circuits the unwanted PHP expression-based indenting configuration completely, rather than running it all and then undoing it after the fact. This involves creating a new direction ~/.vim/indent, and a Makefile target install-vim-indent to copy everything into it.
* Remove blank lines at end of filesTom Ryder2016-03-281-1/+0
* Discard PHP's indentingTom Ryder2015-01-151-0/+5
It keeps doing things I don't expect, and the code looks hard to change. autoindent should do the job. I might have a go at writing my own later to handle obvious cases like an opening brace or case statement on the previous line.