blob: 45e8009be39759423c095160ccf289e2d2ce6dcb (
plain) (
tree)
|
|
"
" alternate_filetypes.vim: Switch buffer to related filetypes, e.g. HTML while
" editing PHP, or AWK/sed while editing shell script.
"
" Author: Tom Ryder <tom@sanctum.geek.nz>
" License: Same as Vim itself
"
if exists('loaded_alternate_filetypes') || &compatible
finish
endif
" User command to switch to alternate filetype and display it
command -bar AlternateFileType
\ call alternate_filetypes#() | set filetype?
" Mapping target to run user command
nnoremap <Plug>(AlternateFileType)
\ :<C-U>AlternateFileType<CR>
|