| version 1.13, 2002/03/21 19:44:50 |
version 1.14, 2002/03/23 16:25:51 |
|
|
| " 2. planning a second release for this. |
" 2. planning a second release for this. |
| " }}} |
" }}} |
| |
|
| |
" $ID: $ |
| |
|
| if exists("b:didLocalTex") |
if exists("b:didLocalTex") |
| finish |
finish |
| end |
end |
| Line 452 let g:smartBS_tex = '\(' . |
|
| Line 454 let g:smartBS_tex = '\(' . |
|
| \ '\\-' . |
\ '\\-' . |
| \ '\)' . "$" |
\ '\)' . "$" |
| |
|
| " This function comes from Benji Fisher <benji@e-math.AMS.org> |
" This function comes from Benji Fisher <benji AT e-mathDOTAMSDOTorg> |
| " http://vim.sourceforge.net/scripts/download.php?src_id=409 |
" http://vim.sourceforge.net/scripts/download.php?src_id=409 |
| " (modified/patched by Lubomir Host 'rajo' <host8 AT keplerDOTfmphDOTuniba.sk>) |
" (modified/patched by: Lubomir Host 'rajo' <host8 AT keplerDOTfmphDOTuniba.sk> |
| fun! s:SmartBS() |
" Srinath Avadhanula <srinath AT fastmailDOTfm> ) |
| let init = strpart(getline("."), 0, col(".")) |
function! s:SmartBS() |
| let len = strlen(matchstr(init, g:smartBS_tex)) - 1 |
let init = strpart(getline("."), 0, col(".")-1) |
| if len > 0 |
let matchtxt = matchstr(init, g:smartBS_tex) |
| execute "normal!" . len . "Xx" |
echo "SmartBS(" . matchtxt . ")" |
| |
if matchtxt != '' |
| |
let bstxt = substitute(matchtxt, '.', "\<bs>", 'g') |
| |
return bstxt |
| else |
else |
| execute "normal! x" |
return "\<bs>" |
| endif |
endif |
| endfun |
endfun |
| "inoremap <buffer> <BS> x<Esc>:call <SID>SmartBS()<CR>a<BS><BS> |
inoremap <buffer> <BS> <C-R>=<SID>SmartBS()<CR> |
| inoremap <buffer> <BS> <Esc>:call <SID>SmartBS()<CR>a |
" }}} |
| " }}} |
|
| |
|
| " MakeTexFolds: see ../plugin/syntaxFolds.vim for documentation {{{ |
" MakeTexFolds: see ../plugin/syntaxFolds.vim for documentation {{{ |
| function! MakeTexFolds(force) |
function! MakeTexFolds(force) |