恭喜SublimeREPL

时间:2012-07-01 04:39:43

标签: sublimetext2 pry sublimerepl

有没有人在SublimeREPL中使用交换机进行撬动有什么运气?我想,我很接近。我没有收到错误,但是当我输入命令时我也没有收到回复。它的行为类似于每次我返回时缓冲区都被重置。


我使用rbenv并设置了我的SublimeREPL PATH如下:

  "default_extend_env": {"PATH": "{HOME}/.rbenv/bin:{HOME}/.rbenv/shims:{PATH}"}

3 个答案:

答案 0 :(得分:1)

尝试将Pry.config.auto_indent = false添加到.pryrc

答案 1 :(得分:0)

除了在default_extend_env中设置PATH外,还必须设置GEMPATH。这是我的SublimeREPL设置:

{
"default_extend_env": {
    "PATH": "{HOME}/.rbenv/shims:{PATH}",
    "GEM_PATH": "{HOME}/.rbenv/shims"}
}

您可以在pry_repl.py的开头添加以下代码以打印出PATH以检查您的设置是否生效。

puts "PATH:#{ENV['PATH']}"
puts "GEM_PATH:#{ENV['GEM_PATH']}"

答案 2 :(得分:0)

我使用RVM和Ruby 2.1.2。我将/ Users / [my name] / Library / Application Support / Sublime Text 3 / Packages / User / SublimeREPL.sublime-settings更改为:

var ticks = '<div class="sliderTickmarks "><span>1</span></div>';
ticks += '<div class="sliderTickmarks "><span>2</span></div>';
ticks += '<div class="sliderTickmarks "><span>3</span></div>';
ticks += '<div class="sliderTickmarks "><span>4</span></div>';
ticks += '<div class="sliderTickmarks "><span>5</span></div>';
ticks += '<div class="sliderTickmarks "><span>6</span></div>';
ticks += '<div class="sliderTickmarks "><span>7</span></div>';
$("#rate ").closest(".ui-slider").find(".ui-slider-track").prepend(ticks);

.sliderTickmarks {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    height: 100%;
    width: 16.6%;
    float: left;
    border-right: 1px solid #888;
}
.sliderTickmarks span {
    position: relative;
    left: 100%;
    top: 125%;
    margin-left: -3px;
    font-size: 12px;
    font-weight: normal;
}
.ui-slider-track > div.sliderTickmarks:first-child {
    border-right: 0;
    width: 0;
}
.ui-slider-track > div.sliderTickmarks:first-child span {
    margin-left: -5px;
}
.ui-slider-track > div.sliderTickmarks:last-of-type {
    border-right: 0;
}

要获取您的GEM_PATH,请键入default_extend_env": { "PATH": "/usr/local/bin/:{PATH}", "GEM_PATH": "{HOME}/.rvm/gems/ruby-2.1.2/" } 并从&#34;安装目录获取路径:&#34;或者进入pry并输入gem env