mirror of
https://github.com/Raimondi/delimitMate.git
synced 2025-12-07 21:24:51 +08:00
Fix &ft check in QuoteDelim: handle dotted filetypes
From `:h 'filetype'`: When a dot appears in the value then this separates two filetype names. Example: /* vim: set filetype=c.doxygen : */ ~ I am using `ft=pentadactyl.vim` for my Pentadactyl/Vimperator configuration files.
This commit is contained in:
@@ -382,9 +382,9 @@ function! delimitMate#QuoteDelim(char) "{{{
|
|||||||
elseif char_at == a:char
|
elseif char_at == a:char
|
||||||
" Inside an empty pair, jump out
|
" Inside an empty pair, jump out
|
||||||
return a:char . "\<Del>"
|
return a:char . "\<Del>"
|
||||||
elseif &ft == "vim" && a:char == '"' && getline('.') =~ '^\s*$'
|
elseif a:char == '"' && index(split(&ft, '\.'), "vim") != -1 && getline('.') =~ '^\s*$'
|
||||||
" If we are in a vim file and it looks like we're starting a comment, do
|
" If we are in a vim file and it looks like we're starting a comment, do
|
||||||
" not add a second
|
" not add a closing char.
|
||||||
return a:char
|
return a:char
|
||||||
elseif delimitMate#IsSmartQuote(a:char)
|
elseif delimitMate#IsSmartQuote(a:char)
|
||||||
" Seems like a smart quote, insert a single char.
|
" Seems like a smart quote, insert a single char.
|
||||||
|
|||||||
Reference in New Issue
Block a user