aboutsummaryrefslogtreecommitdiff
path: root/vim/plugin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-22 16:59:28 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-22 17:06:36 +1200
commit9929ca9ec20867cc910bf6b17839ee20dcd35f46 (patch)
tree9d0803f2fb8401832589d378fbf16cf5567fb63e /vim/plugin
parentBeginnings of new alternate_filetypes.vim plugin (diff)
downloaddotfiles-9929ca9ec20867cc910bf6b17839ee20dcd35f46.tar.gz
dotfiles-9929ca9ec20867cc910bf6b17839ee20dcd35f46.zip
Round out and apply alternate filetypes plugin
This is a good one.
Diffstat (limited to 'vim/plugin')
-rw-r--r--vim/plugin/alternate_filetypes.vim13
1 files changed, 2 insertions, 11 deletions
diff --git a/vim/plugin/alternate_filetypes.vim b/vim/plugin/alternate_filetypes.vim
index 6e765feb..d530b874 100644
--- a/vim/plugin/alternate_filetypes.vim
+++ b/vim/plugin/alternate_filetypes.vim
@@ -1,13 +1,4 @@
-function! s:AlternateFileType() abort
- let filetypes = get(b:, 'alternate_filetypes', [&filetype])
- if &filetype !=# filetypes[0]
- let &filetype = filetypes[0]
- endif
- set filetype?
-endfunction
command -bar AlternateFileType
- \ call s:AlternateFileType()
-nnoremap <Plug>(AlternateFileType)
+ \ call alternate_filetypes#()
+nnoremap <silent> <Plug>(AlternateFileType)
\ :<C-U>AlternateFileType<CR>
-nmap <Leader># <Plug>(AlternateFileType)
-nmap <Leader>3 <Leader>#