简体   繁体   English

崇高文字2/3:如何沿缩进移动光标? 苹果系统

[英]Sublime text 2/3: How to move cursor along indentation? Mac OS

I'm trying to move the cursor along the indentation level. 我试图在缩进级别上移动光标。 A "jump to the next or previous same-indentation-line"-command. “跳转到下一个或上一个相同的压痕线”命令。

To illustrate: The "|" 为了说明:“ |” is supposed to be the cursor. 应该是光标。

def way_too_big_method
  |block1
    block2
      Way too many things happening...
    end
  end
end

Command: Move down along indentation 命令:沿缩进向下移动

def way_too_big_method
  block1
    block2
      Way too many things happening...
    end
  |end
end

I know you can do that in vim (maybe you need a plugin) and I know I could use cold folding for that, but it would be three commands (fold, move down, unfold). 我知道您可以在vim中做到这一点(也许您需要一个插件),并且我知道可以为此使用冷折叠功能,但这将是三个命令(折叠,向下移动,展开)。 I used Textmate some years ago and I thought it was just ALT+UP/DOWN but I might be wrong. 几年前我使用Textmate,但我以为只是ALT + UP / DOWN,但我可能错了。

Do you know a way to do that? 你知道这样做的方法吗? I would go for a plugin if it's sublime 3 compatible (It would be quite easy to create as well, I guess), but I have the feeling that this must be implemented in sublime-core somewhere, right? 如果兼容Sublime 3,我会选择一个插件(我想这也很容易创建),但是我有感觉,必须在某个地方的Sublime-Core中实现它,对吗?

Thanks for any idea on this one! 感谢您对此有任何想法!
Andy 安迪

I've been missing this functionality from TextMate too, so I wrote a plugin that does it. 我也一直缺少TextMate的此功能,所以我写了一个插件来做到这一点。 You can find it here . 你可以在这里找到它。 I wrote it specifically on ST3, but it should probably also work on ST2. 我专门在ST3上编写了它,但它可能也可以在ST2上工作。 Make an issue in Github if you have any issues with it. 如果您有任何问题,请在Github中发布。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM