aboutsummaryrefslogtreecommitdiff
path: root/vim/doc
Commit message (Collapse)AuthorAgeFilesLines
* Correct monospaced blocks in Vim plugin docsTom Ryder2018-01-083-4/+4
| | | | Close unclosed blocks, and remove an unwanted block.
* Move 'hlsearch' insert-mode suspension into pluginTom Ryder2017-11-131-0/+28
| | | | | | It's easily repackaged and it makes the configuration that much shorter, so I may as well. This version also correctly handles 'hlsearch' not being on in the first place.
* Mention req of toggle_option_flag.vimTom Ryder2017-11-121-1/+2
|
* Adjust first sentence of format_option_toggle.txtTom Ryder2017-11-121-1/+1
|
* Add help links to toggle_option_flag.vim interfaceTom Ryder2017-11-121-0/+1
|
* Flesh out strip_trailing_whitespace.vim helpTom Ryder2017-11-121-6/+21
|
* Specify type of example in mail_mutt.vim docTom Ryder2017-11-121-3/+3
|
* Adjust layout of headings/links in Vim plugin helpTom Ryder2017-11-121-6/+3
|
* Flesh out fixed_join.vim interface documentationTom Ryder2017-11-121-8/+27
|
* Add help tag for detect_background.vim functionTom Ryder2017-11-121-0/+1
|
* Flesh out copy_linebreak.vim interface docsTom Ryder2017-11-121-12/+27
|
* Remove nonexistent keyword references from Vim docTom Ryder2017-11-121-1/+1
|
* Move Vim doc requirement to correct sectionTom Ryder2017-11-121-3/+2
|
* Apply boilerplate to Vim plugin docsTom Ryder2017-11-1210-68/+230
| | | | | | The DESCRIPTION heading for each of these is filled out now, but some of them probably need a bit more explanation. The mail_mutt.txt plugin is good, though.
* Update and correct detect_background.vim helpTom Ryder2017-11-121-4/+10
|
* Complete mail_mutt.vim documentationTom Ryder2017-11-121-9/+65
|
* Bind norm J on fixed_join.vim load if appropriateTom Ryder2017-11-121-3/+6
| | | | | | | If there are no mappings to the <Plug>FixedJoin target that the fixed_join.vim plugin provides at the time it is loaded, and the line-joining function of normal-mode J is not already mapped, the plugin will try to map it itself, for a more plug-and-play.
* Move lots of local Vim config into vim/afterTom Ryder2017-11-122-54/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge branch 'feature/vim-mutt-plug' into developTom Ryder2017-11-111-0/+13
|\ | | | | | | | | | | | | * feature/vim-mutt-plug: Move mutt_mail.vim line select logic into plugin Add new mail_mutt.vim plugin, apply mappings Beginnings of a buffer-to-Mutt mailer plugin
| * Add new mail_mutt.vim plugin, apply mappingsTom Ryder2017-11-111-0/+13
| | | | | | | | | | This plugin provides a shortcut for staring email messages in Mutt with a range of lines.
* | Move backup, swap, and undo dir logic into pluginsTom Ryder2017-11-103-0/+38
|/
* Remove asterisks flagging keyword in Vim helpTom Ryder2017-11-072-3/+3
| | | | | | I didn't realise that using asterisks for emphasis in VimL documentation in the middle of a paragraph counted as a help tag. This was causing a call to `:helptags ~/.vim/doc` to error out.
* Add user_ftplugin.vim and user_indent.vim pluginsTom Ryder2017-11-072-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 09b83b6 and replaces it with a working version. Because of the order in which the autocmd hooks run, the attempted method of adding unloading instructions for my custom ftplugin and indent rules to the b:undo_ftplugin and b:undo_indent doesn't actually work. This is because the custom rules for both groups from ~/.vim are sourced *first*, before their core versions, so the changes the custom rules made to b:undo_ftplugin and b:undo_indent are simply clobbered by the core version when it loads itself. Therefore we need to arrange for two things: 1. A custom variable needs to be checked and executed when the filetype changes to revert the changes for the custom ftplugin or indent rules. 2. That execution needs to take place *first* when the filetype changes. I wrote two simple plugins with very similar code that are designed to run as a user's custom ftplugin.vim and indent.vim implementations, running before their brethren in the Vim core, and setting up an autocmd hook to :execute b:undo_user_ftplugin and b:undo_user_indent plugin respectively. This seemed to work well, so I've implemented it. It involves adding a shim to ~/.vim/indent.vim and ~/.vim/ftplugin.vim to "preload" the plugin when the `filetype indent plugin on` call is made. I've added that to the relevant Makefile targets.
* Add commands to copy_linebreak.vimTom Ryder2017-11-071-0/+6
| | | | | | Just to be thorough; if +user_commands are available, offer :CopyLinebreakEnable, :CopyLinebreakDisable, and :CopyLinebreakToggle commands.
* Give copy_linebreak.vim enable/disable funcs, mapsTom Ryder2017-11-071-4/+10
| | | | | Add s:CopylinebreakDisable() and s:CopylinebreakEnable functions, and mapping targets for each of them, just to be thorough.
* Add :FixedJoin commandTom Ryder2017-11-071-1/+4
| | | | | This is optiona; if the user's Vim doesn't have the 'user_commands' feature, the command will just quietly not be created.
* Add :StripTrailingWhitespace commandTom Ryder2017-11-071-0/+3
| | | | | This is optional; if the user's Vim doesn't have the 'user_commands' feature, the command will just quietly not be created.
* Extend toggle_option_flag.vim for string flagsTom Ryder2017-11-061-3/+4
| | | | | | | | This commit extends toggle_option_flag.vim to allow the exported commands to toggle values of more than one character, for comma-separated options like 'switchbuf', e.g.: :ToggleOptionFlag switchbuf useopen
* Adjust plugin code layout a lotTom Ryder2017-11-041-1/+1
| | | | | | | | | | | | | Including renaming big_file.vim and accompanying functions yet again, to big_file_options.vim. Trying to keep complex autocmd and mapping definitions on long lines broken up semantically; definition and options on one line, patterns or mapping key on the next, and the command to run on the last. Also trying to make sure that <silent>, <buffer>, and <unique> are applied in the correct places, and that all mapping commands are using the :<C-U> idiom for the command prefix.
* Rename toggle plugin again, use commands not funcsTom Ryder2017-11-042-15/+16
| | | | | | This method makes a bit more sense, and amounts to slightly less verbose mapping commands. It does really on the +user_commands feature being available, however.
* Add short documentation for new custom pluginsTom Ryder2017-11-046-0/+77
| | | | | | | | | I'm using the plugin_name.txt syntax suggested by the Vim documentation. That may change in future as I study plugins written by experienced authors like Tim Pope. There will almost certainly be a lot more detail to add to each of these.
* Rename bigfile plugin to big_fileTom Ryder2017-11-041-1/+1
| | | | | | | | Just for consistency with the other plugins I'm making. I don't think I really like the cutesy names given to Vim plugins. I prefer the slightly longer and maybe even namespaced names like Perl distributions and modules have. Let's see how well this works.
* Move Vim big file options config into pluginTom Ryder2017-11-021-0/+12
Created targets install-vim-doc and install-vim-plugin with accompanying subdirectories of "vim". Added a very short summary of what the plugin does to bigfile.txt. I intend to spin off at least a couple of the blocks of my Vim configuration that are starting to coalesce into distinct plugins unto themselves, and will place the files in these directories.