I am using Ubuntu 15.04 and vim-gnome 7.4.
When I run:
vim --version | grep -i +ruby
It returns:
+ruby
Based on: Vim Ruby Support site:
I can add the following to my .vimrc file:
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:
:map <S-CR>
to see if it returns a maping I don't get anything.
I do however have a line within my 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. I was typing the [<--cursor], which it obviously doesn't recognize. If I "hit enter" after "John". it closes the if statement.
Sorry! thanks for the help.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.