[Vim-latex-devel] patch proposal
Brought to you by:
srinathava,
tmaas
From: corentin b. <cor...@gm...> - 2013-08-27 22:42:36
|
Hi, I've been trying knitr ultimately and the smart quotes make the use of knitr impossible. In order to keep the functionality of the smart quotes but being able to use knitr I propose to disable the smart quotes in comments, just like it's done within math expressions. The following is working perfectly on my machine: in ftplugin/latex-suite/main.vim in function! s:TexQuotes() " In math mode or when preceded by a \, just move the cursor past the " already-inserted " character. if (synIDattr(synID(l, c, 1), "name") =~ "^texMath") \ || (c > 1 && (getline(l)[c-2] == '\')) becomes " In math mode, comments or when preceded by a \, just move the cursor past the " already-inserted " character. let colComment = match(getline(l),"%",0) if (synIDattr(synID(l, c, 1), "name") =~ "^texMath") \ || (c > 1 && (getline(l)[c-2] == '\')) \ || ((colComment > -1) && (colComment < c)) Please tell me if I can do something else to get that into the code: any git repository where I can make a pull request? Corentin -- ___________________ Corentin Barbu-Covantes (484) 843-1580 http://scholar.google.com/citations?hl=en&user=sxDMRdQAAAAJ "For what does it profit a man to gain the whole world, and forfeit his soul?" Mark 8:36 |