diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-22 16:59:28 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-22 17:06:36 +1200 |
commit | 9929ca9ec20867cc910bf6b17839ee20dcd35f46 (patch) | |
tree | 9d0803f2fb8401832589d378fbf16cf5567fb63e /vim/ftplugin | |
parent | Beginnings of new alternate_filetypes.vim plugin (diff) | |
download | dotfiles-9929ca9ec20867cc910bf6b17839ee20dcd35f46.tar.gz dotfiles-9929ca9ec20867cc910bf6b17839ee20dcd35f46.zip |
Round out and apply alternate filetypes plugin
This is a good one.
Diffstat (limited to 'vim/ftplugin')
-rw-r--r-- | vim/ftplugin/textarea.vim | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/vim/ftplugin/textarea.vim b/vim/ftplugin/textarea.vim index 5cdb2bba..4db97b58 100644 --- a/vim/ftplugin/textarea.vim +++ b/vim/ftplugin/textarea.vim @@ -1,13 +1,12 @@ +" Set mail message as an alternative filetype +if !exists('b:alternate_filetypes') + let b:alternate_filetypes = [&filetype, 'mail'] +endif + " Stop here if the user doesn't want ftplugin mappings if exists('no_plugin_maps') || exists('no_textarea_maps') finish endif -" Local mapping to switch to mail filetype, just because that's very often the -" contents of text areas I edit using TextEditorAnywhere -nnoremap <buffer> <LocalLeader>f - \ :<C-U>setlocal filetype=mail<CR> -let b:undo_ftplugin = 'nunmap <buffer> <LocalLeader>f' - " #s expands to the #signature tag used in Cerb inoreabbrev #s #signature |