fun! Qwf(l,c) "如果尾符为c,则去掉,否则不变 "这里l为行,不是列 let l=a:l let i=len(l)-1 if (i<0) return l endif let j='' if l[i]==a:c if i==0 return j endif let l=l[0:i-1] "很怪的,两边都包含,只有这样了. endif return l "太怪了. endf