vim插入模式中不能使用backspace键?

2011-10-21 22:10:11 +08:00
 lbj96347
我已经设置了set backspace=indent,eol,start?但是仍然不奏效,求高手配置,感谢!
6286 次点击
所在节点    问与答
5 条回复
WarWithinMe
2011-10-21 22:12:03 +08:00
你用的是Windows的gVim还是Mac的MacVim?
WarWithinMe
2011-10-21 22:15:54 +08:00
MacVim本身好像就不用怎么设置。但是gVim要用函数:
func Backspace()
if col('.') == 1
if line('.') != 1
return "\<ESC>kA\<Del>"
else
return ""
endif
else
return "\<Left>\<Del>"
endif
endfunc
if MySys() == "windows"
inoremap <BS> <c-r>=Backspace()<CR>
endif

MacVim只需要设置
set backspace=2
lbj96347
2011-10-21 22:24:33 +08:00
@WarWithinMe 我是在ubuntu下使用vim的,之前还是好好的,但是升级ubuntu11.10后就变成这样了,我看了配置文件,感觉好像又没有问题。
lbj96347
2011-10-21 22:33:14 +08:00
@WarWithinMe 感谢你,我设置了set backspace=2后修复了这个问题。不过真的不知道是什么原理。虽然不是macvim。
WarWithinMe
2011-10-21 22:48:32 +08:00
其实我一般是搜vim wiki的。。。vim自带的帮助感觉太折腾了。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/19966

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX