背景: 我有一个相当customized vim的配置,在Linux和OS X(10.8 / 9)上多年来一直没有错误地工作。这个问题发生在Mac上;在Linux上未经测试。我使用Homebrew的最新版本的vim,我只在终端中使用它。
问题: 我正在学习Ruby。在某些时候,我将一些代码复制/粘贴到file.rb脚本和:wq - 没问题:
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
print "Thtring, pleathe!: "
user_input = gets.chomp
user_input.downcase!
if user_input.include? "s"
user_input.gsub!(/s/, "th")
user_input.capitalize!
else
puts "Nothing to do here!"
end
puts "Your string is: #{user_input}"
当我返回编辑该文件以添加另一个user_input方法时:
:r file.rb
:10
o
user_input
.
时,会话冻结了。 输出如下:
[Buf: 1][+] /private/tmp/vim.log [utf-8] [0x2E] [Line: 0011/0018 | Col: 13] (All)
Executing InsertEnter Auto commands for "*"
autocommand unlet! s:posLast s:lastUncompletable
Press ENTER or type command to continue
Executing CursorMovedI Auto commands for "*"
Press ENTER or type command to continue
autocommand call s:feedPopup()
Press ENTER or type command to continue
Executing CursorMovedI Auto commands for "*"
Press ENTER or type command to continue
autocommand call s:Highlight_Matching_Pair()
Press ENTER or type command to continue
我唯一得到的是 s:lastUncompletable - 有些东西是“不完整的”
我应该说我已经使用了AutoComplPop多年而没有错误。在过去的24小时内,我也尝试使用YouCompleteMe。我得到了相同的结果。
同时,在具有相同vim配置的另一个shell中,this ruby test工作得很好。但它确实表明ruby特有一个问题。
我只是不确定从哪里开始。如果有一些viml专家可以提供一些指导,我将不胜感激。
TT