macvim为什么不总是使用ruby 1.9.3? [英] Why won't macvim always use ruby 1.9.3?

查看:67
本文介绍了macvim为什么不总是使用ruby 1.9.3?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装 YADR点文件时,一组VIM的,红宝石等的插件.

I have installed yadr dotfiles, a set of vim, ruby, etc plugins.

我的Ruby代码下面的行中一个文件:

I have the following line of Ruby code in a file foo.rb:

foo: bar

请注意我用红宝石1.9.3语法符号分配/定义.

Note I used the ruby 1.9.3 syntax for symbol assignment/definition.

当我使用命令行启动的MacVim 并保存文件,一切工作正常.

When I start macvim from command line using mvim foo.rb and save that file, everything works fine.

然而,当使用并导航到并打开,当我试图挽救我得到红宝石,VIM语法错误的文件我开的MacVim.当我将其更改为<6>我不明白语法错误.

However, when I open macvim using open -a macvim and navigate to and open foo.rb, when I try to save the file I get a ruby-vim syntax error on foo: bar. When I change it to :foo => bar I don't get syntax errors.

  • 使用到开放的MacVim,然后进入打印
  • 使用到开放的MacVim,然后进入打印

根据我怎么开的MacVim,我得到了不同版本的Ruby 的.如何保证的MacVim总是使用红宝石1.9.3评价我的Ruby代码?

Depending on how I open macvim, I get a different version of Ruby. How do I ensure that macvim always uses ruby 1.9.3 to evaluate my ruby code?

谢谢

推荐答案

我花了一段时间来寻找一个解决,但问题是由不的MacVim的zsh加载同样的方式终端负载的zsh引起的.

It took me awhile to find a fix, but the issue is caused by MacVim not loading zsh the same way Terminal loads zsh.

该修复非常简单,可以放入您的zshrc中.看到从我的点文件提交:

The fix is easy enough and can be placed into your zshrc. See a commit from my dotfiles:

https://github.com/simeonwillbanks/dotfiles/commit/e0e19cfeff13f8dcd43c

https://github.com/simeonwillbanks/dotfiles/commit/e0e19cfeff13f8bc99d8164217ddd84c6d7f9529

在提交的引用,其可以在这里找到的完整说明:

The commit references a full explanation which can be found here:

HTTP://vim.1045645.n5 .nabble.com/的MacVim和 - PATH-tt3388705.html#a3392363

希望这会有所帮助!

这篇关于macvim为什么不总是使用ruby 1.9.3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆