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/after/ftplugin/php.vim | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'vim/after/ftplugin/php.vim') diff --git a/vim/after/ftplugin/php.vim b/vim/after/ftplugin/php.vim index 3b023f9e..c7f77ece 100644 --- a/vim/after/ftplugin/php.vim +++ b/vim/after/ftplugin/php.vim @@ -21,12 +21,7 @@ let b:undo_ftplugin .= '|setlocal keywordprg<' let b:regex_escape_flavor = 'ere' let b:undo_ftplugin .= '|unlet b:regex_escape_flavor' -" Stop here if the user doesn't want ftplugin mappings -if exists('no_plugin_maps') || exists('no_php_maps') - finish +" Set HTML as an alternative filetype +if !exists('b:alternate_filetypes') + let b:alternate_filetypes = [&filetype, 'html'] endif - -" Switch to HTML filetype for templated PHP -nnoremap f - \ :setlocal filetype=html -let b:undo_ftplugin .= '|nunmap f' -- cgit v1.2.3