aboutsummaryrefslogtreecommitdiff
path: root/doc/clear_local_maps.txt
blob: f53ffb0e27374feba1c1331657bc2538df503611 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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: