[英]linux ubuntu 15.04 vim ruby.vim imap <S-CR> <CR><CR>end<ESC>
I am using Ubuntu 15.04 and vim-gnome 7.4. 我正在使用Ubuntu 15.04和vim-gnome 7.4。
When I run: 当我跑步时:
vim --version | grep -i +ruby
It returns: 它返回:
+ruby
Based on: Vim Ruby Support site: 基于: Vim Ruby支持站点:
I can add the following to my .vimrc file: 我可以将以下内容添加到我的.vimrc文件中:
imap <S-CR> <CR><CR>end<ESC>-cc
and type: 并输入:
if name == "John"[<--cursor] (and hit Shift Enter)
should produce the following: 应该产生以下内容:
if name == "John"
[<--cursor]
end
but in my case it does not. 但就我而言,事实并非如此。
when I type in vim: 当我输入vim时:
:map <S-CR>
to see if it returns a maping I don't get anything. 看看它是否返回地图我什么也没得到。
I do however have a line within my vimrc: 但是我的vimrc中确实有一行:
map
map!
To see if everything maps correctly and I get no errors and everything looks as it should. 要查看所有内容是否正确映射,并且没有错误,并且所有内容看起来都应该正确。
Does anyone know why it is not working? 有谁知道为什么它不起作用?
Thanks in advance for any help. 在此先感谢您的帮助。
Cheers. 干杯。
Sorry I figured it out. 对不起,我知道了。 What isn't working is my brain.
不起作用的是我的大脑。 It is working just fine in vim-gnome.
它在vim-gnome中工作得很好。 I was typing the [<--cursor], which it obviously doesn't recognize.
我正在键入[<-cursor],显然它无法识别。 If I "hit enter" after "John".
如果我在“约翰”之后“点击进入”。 it closes the if statement.
它关闭if语句。
Sorry! 抱歉! thanks for the help.
谢谢您的帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.