Diff for vimconfig/vim/ftplugin/tex.vim between version 1.12 and 1.13
| version 1.12, 2002/03/21 19:18:53 |
version 1.13, 2002/03/21 19:44:50 |
| Line 454 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@e-math.AMS.org> |
| " http://vim.sourceforge.net/scripts/download.php?src_id=409 |
" http://vim.sourceforge.net/scripts/download.php?src_id=409 |
| " (modified) |
" (modified/patched by Lubomir Host 'rajo' <host8 AT keplerDOTfmphDOTuniba.sk>) |
| fun! s:SmartBS() |
fun! s:SmartBS() |
| let init = strpart(getline("."), 0, col(".")-1) |
let init = strpart(getline("."), 0, col(".")) |
| let len = strlen(matchstr(init, g:smartBS_tex)) - 1 |
let len = strlen(matchstr(init, g:smartBS_tex)) - 1 |
| if len > 0 |
if len > 0 |
| execute "normal!" . len . "X" |
execute "normal!" . len . "Xx" |
| endif |
else |
| |
execute "normal! x" |
| |
endif |
| endfun |
endfun |
| inoremap <buffer> <BS> x<Esc>:call <SID>SmartBS()<CR>a<BS><BS> |
"inoremap <buffer> <BS> x<Esc>:call <SID>SmartBS()<CR>a<BS><BS> |
| |
inoremap <buffer> <BS> <Esc>:call <SID>SmartBS()<CR>a |
| " }}} |
" }}} |
| |
|
| " MakeTexFolds: see ../plugin/syntaxFolds.vim for documentation {{{ |
" MakeTexFolds: see ../plugin/syntaxFolds.vim for documentation {{{ |
Platon Group <platon@platon.org> http://platon.org/
|
|