Skip to content

Instantly share code, notes, and snippets.

@josuf107
Last active August 29, 2015 13:57
Show Gist options
  • Save josuf107/9391762 to your computer and use it in GitHub Desktop.
Save josuf107/9391762 to your computer and use it in GitHub Desktop.
Latex Quotes
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