- expansion of `g to \gamma makes writing german quotes difficult because

correct german quotes are "` and '". Protect this expansion as well...
  TODO: This seems to getting wierd. A better way would have been to check
  for math mode. But how to do that? Checking for synIDattr() =~? 'math' is
  not good enough because \cite and \sum are both 'texStatement's.
  TODO: Is this getting too annoying to be left enabled by default? Benji
        suggests disabling this by default.
This commit is contained in:
Srinath Avadhanula
2003-01-14 22:46:56 +00:00
parent 0b9337155e
commit e4015d66a4
+2
View File
@@ -140,6 +140,7 @@ if !exists('s:doneMappings')
" This function sets up fake maps of the following forms:
" ``[aA] -> ``[aA] (for writing in quotations)
" \`[aA] -> \`[aA] (for writing diacritics)
" "`[aA] -> "`[aA] (for writing german quotations)
" It does this for all printable lower ascii characters just to make sure
" we dont let anything slip by.
function! s:ProtectLetters(first, last)
@@ -148,6 +149,7 @@ if !exists('s:doneMappings')
if nr2char(i) =~ '[[:print:]]'
call IMAP('``'.nr2char(i), '``'.nr2char(i), 'tex')
call IMAP('\`'.nr2char(i), '\`'.nr2char(i), 'tex')
call IMAP('"`'.nr2char(i), '\`'.nr2char(i), 'tex')
endif
let i = i + 1
endwhile