Re: [Vim-latex-devel] Feature suggestion: distinct tw for normal/math modes
Brought to you by:
srinathava,
tmaas
From: Ted P. <te...@te...> - 2009-01-09 17:51:04
|
Additionally, it's very important to check for a comment. That is, you don't want to gwap with comments in your selection. So I added a ^\s*% to get what's at: http://pastebin.com/f4015755d Here it is here, with possible wrapping: " Section: Paragraph formatting (autofill) {{{ " Correctly format paragraphs in LaTeX. " The exec command should be one line: watch out if the e-mail client " or server inserts any line breaks. function! g:Tex_SelectParagraph () exec "normal ?^$\\|^\s*%\\|^\s*\\\\\\(begin\\|end\\|\\(new\\|renew\\|provide\\)com\\|def\\|[ls]et\\|label\\|item\\)?1\<cr>v//-1\<cr>$" endfunction omap <buffer> lp :call g:Tex_SelectParagraph()<cr> vmap <buffer> lp <esc>:call g:Tex_SelectParagraph()<cr> " }}} --Ted On 1/7/09 10:23 PM, Mike Richman wrote: > " Section: Paragraph formatting (autofill) {{{ > " Correctly format paragraphs in LaTeX. > " The exec command should be one line: watch out if the e-mail client > " or server inserts any line breaks. > function! g:Tex_SelectParagraph () > exec "normal ?^$\\|^\s*\\(\\\\begin\\|\\\\end\\|\\\\renewcommand\\|\\\\label\\|\\\\item\\)?1\<cr>v//-1\<cr>$" > endfunction > omap<buffer> lp :call g:Tex_SelectParagraph()<cr> > vmap<buffer> lp<esc>:call g:Tex_SelectParagraph()<cr> > " }}} -- Ted Pavlic <te...@te...> Please visit my ALS association page: http://web.alsa.org/goto/tedpavlic My family appreciates your support in the fight to defeat ALS. |