mirror of
https://github.com/Raimondi/delimitMate.git
synced 2026-10-04 19:28:55 +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:
1 parent
35280c1444
commit
06c1f31632
1 file changed
+2
-2
@@ -382,9 +382,9 @@ function! delimitMate#QuoteDelim(char) "{{{
|
||||
elseif char_at == a:char
|
||||
" Inside an empty pair, jump out
|
||||
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
|
||||
" not add a second
|
||||
" not add a closing char.
|
||||
return a:char
|
||||
elseif delimitMate#IsSmartQuote(a:char)
|
||||
" Seems like a smart quote, insert a single char.
|
||||
|
||||
Reference in new issue
Block a user