[Vim-latex-cvs] vimfiles/ftplugin/tex smartspace.vim,1.6,1.7
Brought to you by:
srinathava,
tmaas
From: <sri...@us...> - 2003-01-07 01:51:17
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/tex In directory sc8-pr-cvs1:/tmp/cvs-serv18483 Modified Files: smartspace.vim Log Message: Change from Carl: One little improvement in TexFormatLine. First, my treatment of \$ isn't working, so I deleted it. But I was able to take care of the following. Sometimes people write $$...$$ in a single line, so the function should be able to tell that you are within a math expression. Also, I didn't think that your command for clearing memory deserved its own variable, so I just put an extra line in the function. For the moment, I don't know what to do about \$ Index: smartspace.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/tex/smartspace.vim,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** smartspace.vim 6 Jan 2003 00:17:53 -0000 1.6 --- smartspace.vim 7 Jan 2003 01:51:13 -0000 1.7 *************** *** 35,40 **** endif ! " TexFormatLine: format line retaining $$'s on the same line. ! function! s:TexFill(width) " {{{ if a:width != 0 && col(".") > a:width " For future use, record the current line and the number of the current column --- 35,40 ---- endif ! " TexFormatLine: format line retaining $$'s on the same line. {{{ ! function! s:TexFill(width) if a:width != 0 && col(".") > a:width " For future use, record the current line and the number of the current column *************** *** 43,48 **** exe "normal! a##\<Esc>" call <SID>TexFormatLine(a:width,current_line,current_column) " Remove ## from the search history. ! exe "normal! ?##\<CR>2s\<Esc>".s:RemoveLastHistoryItem endif endfunction --- 43,49 ---- exe "normal! a##\<Esc>" call <SID>TexFormatLine(a:width,current_line,current_column) + exe "normal! ?##\<CR>2s\<Esc>" " Remove ## from the search history. ! call histdel("/", -1)|let @/=histget("/", -1) endif endfunction *************** *** 63,67 **** let counter = 0 while counter <= a:width-1 ! if string[counter] == '$' && string[counter-1] != '\' " Skip \$. let evendollars = 1 - evendollars let number_of_dollars = number_of_dollars + 1 --- 64,69 ---- let counter = 0 while counter <= a:width-1 ! " Pay attention to '$$'. ! if string[counter] == '$' && string[counter-1] != '$' let evendollars = 1 - evendollars let number_of_dollars = number_of_dollars + 1 *************** *** 73,77 **** if evendollars " Then you are not between dollars. ! exe "normal! ?\\$\\| \<CR>W" else " Then you are between dollars. --- 75,79 ---- if evendollars " Then you are not between dollars. ! exe "normal! ?\\$\\+\\| \<CR>W" else " Then you are between dollars. *************** *** 95,103 **** endif endfunction - - " }}} - " s:RemoveLastHistoryItem: removes last search item from search history {{{ - " Description: Execute this string to clean up the search history. - let s:RemoveLastHistoryItem = ':call histdel("/", -1)|let @/=histget("/", -1)' " }}} --- 97,100 ---- |