From 9929ca9ec20867cc910bf6b17839ee20dcd35f46 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 22 Jun 2019 16:59:28 +1200 Subject: Round out and apply alternate filetypes plugin This is a good one. --- vim/ftplugin/textarea.vim | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'vim/ftplugin/textarea.vim') 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 f - \ :setlocal filetype=mail -let b:undo_ftplugin = 'nunmap f' - " #s expands to the #signature tag used in Cerb inoreabbrev #s #signature -- cgit v1.2.3