Last active
August 29, 2015 13:57
-
-
Save josuf107/9391762 to your computer and use it in GitHub Desktop.
Latex Quotes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
augroup filetype_tex | |
autocmd! | |
autocmd Filetype tex let b:inquote = 0 | |
autocmd Filetype tex inoremap <buffer> " <esc>:call <SID>LQuote()<cr>a | |
augroup END | |
function! <SID>LQuote() | |
if b:inquote | |
let q = "''" | |
else | |
let q = "``" | |
endif | |
execute ':normal a' . q | |
let b:inquote = !b:inquote | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment