| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This is just me adapting Tim Pope's original code a little to fit with
how I normally write Vim script. We'll try this fold method out and see
if it suits.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Just for readability.
|
| |
|
|
|
|
|
| |
I never liked this much. Removing it from my own copy of the ftplugin
allows me to remove my working around it in the after script.
|
| |
|
|
|
|
|
|
| |
I disagree with just enough of this that I think it's worth writing it
out my own way. Adding the file as it is for now so I can track and
document what I change.
|
|
|
|
|
| |
This makes more sense than dancing around the potential availability of
the stock one.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This custom filetype is just a hook to hang functionality for
TextEditorAnywhere documents under Windows. Most of the time, it's me
writing email, or comments that benefit from email formatting, so I've
configured <LocalLeader>f to switch to the mail filetype. This
switching could probably benefit from a plugin, actually.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
An official one only got added in early 2016, and it does almost
nothing; may as well implement my own instead.
|
|
|
|
|
| |
Just with comment formatting rules--there's no stock ftplugin in Vim at
the moment, just a syntax file.
|
|
|
|
|
| |
Vim doesn't have a stock ftplugin for sed at all (just syntax), so this
can be our base one.
|
| |
|
| |
|
| |
|
|
|
|
| |
No longer needed
|
| |
|
| |
|
|
|
|
| |
Evidently copy-pasted from documentation.
|
| |
|
| |
|
|
|
|
|
| |
This reverts commit a14bc50. Changed my mind; decided it's tidier this
way.
|
|
|
|
| |
Preparing for spinoff release
|
| |
|
|
|
|
|
| |
We're already very dependent on Vim >=7 for this ftplugin, so we may as
well use all its syntactic sugar.
|
|
|
|
| |
This seems obvious now.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Per the comment in the new file, this is to avoid loading in HTML
ftplugins as well, a curiosity of the stock ftplugin/php.vim file that's
probably a well-intentioned way of accommodating templated files with a
mix of PHP and HTML in them.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This was causing nasty errors whenever I started editing a Perl file.
|
|
|
|
| |
We only want to remove the normal mode mapping, since that's all we set.
|
|
|
|
|
| |
I didn't realise that a null command at the front of .e.g '|cmd|cmd2'
printed the current line! Removed that.
|
|
|
|
| |
Unload all maps too, with silent! in case they don't exist.
|
|
|
|
| |
Just for legibility.
|