aboutsummaryrefslogtreecommitdiff
path: root/doc/clear_local_maps.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/clear_local_maps.txt')
-rw-r--r--doc/clear_local_maps.txt38
1 files changed, 38 insertions, 0 deletions
diff --git a/doc/clear_local_maps.txt b/doc/clear_local_maps.txt
new file mode 100644
index 0000000..f53ffb0
--- /dev/null
+++ b/doc/clear_local_maps.txt
@@ -0,0 +1,38 @@
+*clear_local_maps.txt* For Vim version 7.0 Last change: 2018 June 25
+
+DESCRIPTION *clear_local_maps*
+
+This plugin provides an autoload function that clears all buffer-local mappings
+that begin with |maplocalleader|. It's intended for use at the start of an
+|augroup| that sets up filetype mappings, to clear away existing ones in the
+buffer first.
+
+REQUIREMENTS *clear_local_maps-requirements*
+
+This plugin is only available if 'compatible' is not set. It also requires the
+|+autocmd| feature.
+
+FUNCTIONS *clear_local_maps-functions*
+ *clear_local_maps#Clear()*
+The autoloaded function `clear_local_maps#Clear()` examines the list of
+|map-local| mappings and clears any that begin with `g:maplocalleader`. If
+`g:maplocalleader` is unset, it does nothing.
+
+You might use it in your |vimrc| like this:
+>
+ let g:maplocalleader = '_'
+ augroup vimrc_filetype_mappings
+ autocmd!
+ autocmd FileType * call clear_local_maps#Clear()
+ " Filetype-local mappings go here...
+ augroup END
+<
+AUTHOR *clear_local_maps-author*
+
+Written and maintained by Tom Ryder <tom@sanctum.geek.nz>.
+
+LICENSE *clear_local_maps-license*
+
+Licensed for distribution under the same terms as Vim itself (see |license|).
+
+ vim:tw=78:ts=8:ft=help:norl: