我一直想知道如何制作vim快捷方式,该快捷方式将使大多数常用/所有寄存器的内容弹出完成。现在这就是我所拥有的
fun! Reg_to_list(findstart,base)
let l:regs=[]
let l:lvals=["+","%","0","1","2","3","4","5","6","7","8","9",":","*"]
for a in range(0,len(l:lvals)-1)
let l:tmpval=substitute(getreg(l:lvals[a]),'^ *\(.*\)','\1','')
if ( l:tmpval =~ "[[:graph:]]" )
call add(l:regs, l:tmpval)
endif
endfor
return uniq(l:regs)
endfun
inoremap <C-\> <C-x><C-u>
但是我有三个问题: