mirror of
https://github.com/vim-latex/vim-latex.git
synced 2026-06-13 15:37:23 +02:00
- 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user