aboutsummaryrefslogtreecommitdiff
path: root/vim/doc/user_indent.txt
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-07 13:48:45 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-07 13:48:45 +1300
commite10d9dfb621c210d99aff61fd20de5105455b220 (patch)
treead1cc192db6e8a8c59392c08148c9129cf172453 /vim/doc/user_indent.txt
parentMerge branch 'release/v0.10.0' (diff)
parentBump version number to v0.11.0 (diff)
downloaddotfiles-e10d9dfb621c210d99aff61fd20de5105455b220.tar.gz
dotfiles-e10d9dfb621c210d99aff61fd20de5105455b220.zip
Merge branch 'release/v0.11.0'v0.11.0
* release/v0.11.0: Bump version number to v0.11.0 Add user_ftplugin.vim and user_indent.vim plugins Bind <Leader>f to show current 'formatoptions' Add leader bindings for date stamping Use b:undo variables correctly Add \p Vim binding to show filetype Update <Leader>b mapping to use new mapping name Add commands to copy_linebreak.vim Give copy_linebreak.vim enable/disable funcs, maps Add :FixedJoin command Add :StripTrailingWhitespace command Add "do", "then" keywords to Bash completion Break bash/bashrc.d/completion.bash inline lists Use consistent comment layout for Vim plugins Simplify 'formatoptions' config Refactor toggle_option_flag.vim
Diffstat (limited to 'vim/doc/user_indent.txt')
-rw-r--r--vim/doc/user_indent.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/vim/doc/user_indent.txt b/vim/doc/user_indent.txt
new file mode 100644
index 00000000..ff71d575
--- /dev/null
+++ b/vim/doc/user_indent.txt
@@ -0,0 +1,27 @@
+*user_indent.txt* "Undo" for local indent files
+
+Author: Tom Ryder <tom@sanctum.geek.nz>
+License: Same terms as Vim itself (see |license|)
+
+This plugin adds an |autocmd| hook to |FileType| to run before the one that the
+core indent.vim sets, to allow setting a b:undo_user_indent variable with
+code to |:execute| when the filetype is next changed, in much the same way that
+the core files in Vim >= 7.0x support a b:|undo_indent| variable.
+
+This will only work if it's loaded *before* indent.vim so that the autocmd
+hooks run in the right order. There are a couple of ways to do this:
+
+1. Create your own ~/.vim/indent.vim with the following contents:
+
+ silent! runtime plugin/user_indent.vim
+
+ This will then be sourced before the core indent.vim runs. This is the
+ suggested method.
+
+2. Run the same line in your ~/.vimrc before your `filetype indent on` line.
+
+See also: user_ftplugin.vim.
+
+This plugin lives in Tom Ryder's "dotfiles" suite, and will eventually be spun
+off into a separate distribution as it solidifies and this documentation
+improves.