aboutsummaryrefslogtreecommitdiff
path: root/vim/after
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Correct variable name in commentTom Ryder2017-11-011-3/+2
| | | | | | This was unintentionally committed in e36efd4. The correct name of the variable is b:is_ksh. b:is_kornshell_proper was a rejected first revision of the name.
* Remove extraneous spacing between wordsTom Ryder2017-11-011-1/+1
| | | | No functional effect.
* Rearrange and better explain ksh syntax workaroundTom Ryder2017-10-301-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Correct a path in vim/after/syntax/sh.vimTom Ryder2017-10-301-3/+2
| | | | | This and the other files in the now-removed vim/after/ftdetect directory were moved to vim/ftdetect in f8af47b.
* Move vim/after/ftplugin files into vim/ftpluginTom Ryder2017-10-305-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.
* Set whitespace options for VimL locallyTom Ryder2017-10-301-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.
* 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.
* Move vim/after/ftdetect to vim/ftdetectTom Ryder2017-10-303-49/+0
| | | | | | | | | There's no particular reason to run these file detection rules after the plugins have run, so we'll put them in a more expected directory. I've created a new Makefile target to install this, `install-vim-ftdetect`, which is included as a prerequisite of the `install-vim` target.
* Move netrw.vim "after" script to plain configTom Ryder2017-10-301-11/+0
| | | | | | | | | | There's no particular need to set these options after netrw has loaded; they can be set before it's loaded, and the plugin will still observe them. This empties the vim/after/plugin directory. It doesn't need to be removed from the Makefile as there are no references to it; it was installed by a glob cp(1).
* More generic Mutt configurationTom Ryder2017-01-281-0/+12
| | | | | Remove some person and system specific stuff, including my signature; nothing complex about that, after all.
* Add syntax detection for xresources subfilesTom Ryder2017-01-091-0/+6
|
* Complete a commentTom Ryder2016-12-281-1/+1
|
* Rename all pdksh stuff to kshTom Ryder2016-12-171-1/+1
| | | | As part of a foray into more active use of ksh and derivatives.
* Remove unused nwatch diff filetyperTom Ryder2016-12-111-4/+0
|
* Wrap sh autocmds in a group to be politeTom Ryder2016-12-111-23/+28
|
* Wrap b:is_ksh hack in an autocmdTom Ryder2016-12-111-3/+5
| | | | So that it actually runs at the right time ...
* Still untangling the shell highlighting messTom Ryder2016-12-113-12/+111
|
* Disable sh error syntax highlighting for nowTom Ryder2016-12-111-0/+5
| | | | | Until I can figure out what's wrong with this syntax, or why the syntax highlighter thinks it's an error
* Set buffer type (not global type) for sh properlyTom Ryder2016-12-112-6/+9
|
* Make POSIX default for shell more specificTom Ryder2016-12-111-2/+4
|
* Adjust shell type detection rulesTom Ryder2016-12-111-23/+9
|
* Reset most of my sh.vim customizationsTom Ryder2016-12-112-81/+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.