aboutsummaryrefslogtreecommitdiff
path: root/vim/autoload/vimrc.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-06-30 00:36:10 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-06-30 00:36:10 +1200
commit2685c0ab8280f65ddd59e59f6e2fd7dbcd3dfe28 (patch)
treec6077ec5d5eaad42eb9032341d8689647a0c8e91 /vim/autoload/vimrc.vim
parentAdd g:no_plugin_maps checks for ftplugin maps.vim (diff)
downloaddotfiles-2685c0ab8280f65ddd59e59f6e2fd7dbcd3dfe28.tar.gz
dotfiles-2685c0ab8280f65ddd59e59f6e2fd7dbcd3dfe28.zip
Remove stray vim/autoload/vimrc.vim file
Diffstat (limited to 'vim/autoload/vimrc.vim')
-rw-r--r--vim/autoload/vimrc.vim39
1 files changed, 0 insertions, 39 deletions
diff --git a/vim/autoload/vimrc.vim b/vim/autoload/vimrc.vim
deleted file mode 100644
index eaeefd5d..00000000
--- a/vim/autoload/vimrc.vim
+++ /dev/null
@@ -1,39 +0,0 @@
-" Get all buffer-local mappings into a string variable
-function! vimrc#GetBufferLocalMaps() abort
- redir => l:out
- map <buffer>
- redir END
- let g:vimrc#buffer_local_maps = l:out
-endfunction
-
-" Clear all buffer-local mappings beginning with <LocalLeader>
-function! vimrc#ClearLocalLeaderMaps() abort
-
- " Do nothing if there isn't a defined local leader
- if !exists('g:maplocalleader')
- return
- endif
-
- " Get all the buffer-local mappings into a list
- silent call vimrc#GetBufferLocalMaps()
- let l:mappings = split(g:vimrc#buffer_local_maps, '\n')
-
- " Iterate through the mappings
- for l:mapping in l:mappings
-
- " Match the list mapping and mode; skip if no match
- let l:matchlist = matchlist(l:mapping, '\m\C^\(.\)\s\+\(\S\+\)')
- if !len(l:matchlist)
- continue
- endif
- let l:mode = l:matchlist[1]
- let l:sequence = l:matchlist[2]
-
- " If the mapping starts with our local leader, clear it
- if stridx(l:sequence, g:maplocalleader) == 0
- execute l:mode.'unmap <buffer> '.l:sequence
- endif
-
- endfor
-
-endfunction