aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin
AgeCommit message (Collapse)AuthorFilesLines
2017-11-12Add guards for presence of b:undo_* varTom Ryder14-76/+154
This variable is not set in older Vims (early 6.x), and I think it's worth guarding for.
2017-11-12Exclude SC1090 (failed source) shellcheck errorTom Ryder1-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.
2017-11-12Move lots of local Vim config into vim/afterTom Ryder14-0/+384
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.
2017-10-30Move vim/after/ftplugin files into vim/ftpluginTom Ryder5-34/+0
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.
2017-10-30Set whitespace options for VimL locallyTom Ryder1-3/+3
Setting these options globally is probably what's been causing me to get so confused by my indentation level changing to zero when editing other files in the same Vim instance as a VimL file. This should correct it.
2016-12-11Still untangling the shell highlighting messTom Ryder1-12/+6
2016-12-11Disable sh error syntax highlighting for nowTom Ryder1-0/+5
Until I can figure out what's wrong with this syntax, or why the syntax highlighter thinks it's an error
2016-12-11Set buffer type (not global type) for sh properlyTom Ryder1-3/+6
2016-12-11Make POSIX default for shell more specificTom Ryder1-2/+4
2016-12-11Reset most of my sh.vim customizationsTom Ryder1-4/+0
There's been a lot of work done to sh.vim since these customisations were made, and I can't remember why I made some of them. I'll work without them for a while and reapply any of them if needed.
2016-08-26Put dotfiles manuals into their own sectionTom Ryder1-1/+1
This probably contains a few mistakes
2016-08-20Assume POSIX shTom Ryder1-0/+3
2016-03-28Remove blank lines at end of filesTom Ryder5-5/+0
2015-10-21Consistent quotingTom Ryder1-1/+1
2015-06-17Use surround commands to get current wordTom Ryder1-1/+1
2015-06-17Add tidy(1) function with \vTom Ryder1-0/+3
2015-06-17Add a function to make quick linksTom Ryder1-0/+9
2015-05-21Add han(1)Tom Ryder1-0/+5
2015-01-15Safer syntax for command callsTom Ryder1-6/+4
2015-01-15Some Perl shortcuts I use oftenTom Ryder1-0/+9
2014-12-03No more auto-wrappingTom Ryder2-6/+0
Annoys me more often than it helps
2014-10-30Refine 'isk' setting in sh.vimTom Ryder1-0/+4
2013-07-21Respect VimL conventionTom Ryder1-0/+5
2013-05-07formatoptions should not be set in vimrcTom Ryder2-2/+8
I have learned my lesson
2013-05-03Settings to make flowed plaintext work wellTom Ryder1-0/+3
Thanks very much to W. Caleb McDaniel for his awesome Mutt page: <http://wcm1.web.rice.edu/mutt-tips.html>