Diff for vimconfig/vim/ftplugin/tex.vim between version 1.8 and 1.9
| version 1.8, 2002/02/17 01:00:35 |
version 1.9, 2002/02/17 03:24:58 |
| Line 215 if !exists("no_plugin_maps") && !exists( |
|
| Line 215 if !exists("no_plugin_maps") && !exists( |
|
| " To avoid complications (start of line, end of line, etc.) the |
" To avoid complications (start of line, end of line, etc.) the |
| " mapping inserts a character, the function deletes all but two |
" mapping inserts a character, the function deletes all but two |
| " characters, and the mapping deletes the last two. |
" characters, and the mapping deletes the last two. |
| inoremap <buffer> <BS> x<Esc>:call <SID>SmartBS('\(\\.{\S}\)')<CR>a<BS><BS> |
inoremap <buffer> <BS> x<Esc>:call <SID>SmartBS()<CR>a<BS><BS> |
| |
|
| endif |
endif |
| " }}} end mappings |
" }}} end mappings |
| |
|
| " 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 |
| fun! s:SmartBS(pat, ...) |
fun! s:SmartBS() |
| let init = strpart(getline("."), 0, col(".")-1) |
let init = strpart(getline("."), 0, col(".")-1) |
| let len = strlen(matchstr(init, a:pat . "$")) - 1 |
let len = strlen(matchstr(init, '\(' . |
| |
\ '\\[^\"]{\S}' . '\|' . |
| |
\ '\\[^\"]{\\[iI]}' . '\|' . |
| |
\ '\\q \S' . '\|' . |
| |
\ '\\[^\"]\S' . '\|' . |
| |
\ '\\-' . '\|' . |
| |
\ '\\v \S' . |
| |
\ '\)' . "$")) - 1 |
| if len > 0 |
if len > 0 |
| execute "normal!" . len . "X" |
execute "normal!" . len . "X" |
| endif |
endif |
Platon Group <platon@platon.org> http://platon.org/
|
|