Really get rid of % mapping on tag input

This commit is contained in:
Tim Pope 2009-07-08 19:04:15 -04:00
parent 298858f6a2
commit 50cea14534

View File

@ -193,17 +193,8 @@ function! s:wrap(string,char,type,...)
let dounmapb= 1 let dounmapb= 1
" Hide from AsNeeded " Hide from AsNeeded
exe "cn"."oremap > <CR>" exe "cn"."oremap > <CR>"
exe "cn"."oremap % %<C-V>"
"cm ap > <C-R>=getcmdline() =~ '^[^%?].*[%?]$' ? "\026\076" : "\026\076\015"<CR>
endif endif
let default = "" let default = ""
if !maparg("%","c")
" This is to help when typing things like
" <a href="/images/<%= @image.filename %>">
" The downside is it breaks backspace, so lets disable it for now
"let dounmapp= 1
"exe "cn"."oremap % %<C-V>"
endif
if newchar ==# "T" if newchar ==# "T"
if !exists("s:lastdel") if !exists("s:lastdel")
let s:lastdel = "" let s:lastdel = ""
@ -212,15 +203,9 @@ function! s:wrap(string,char,type,...)
endif endif
let tag = input("<",default) let tag = input("<",default)
echo "<".substitute(tag,'>*$','>','') echo "<".substitute(tag,'>*$','>','')
"if dounmapr
"silent! cunmap <CR>
"endif
if dounmapb if dounmapb
silent! cunmap > silent! cunmap >
endif endif
if dounmapp
silent! cunmap %
endif
if tag != "" if tag != ""
let tag = substitute(tag,'>*$','','') let tag = substitute(tag,'>*$','','')
let before = '<'.tag.'>' let before = '<'.tag.'>'