V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
donwa
V2EX  ›  问与答

Sublime Text 2 有没有列编辑模式?

  •  
  •   donwa · 2012-02-15 20:50:11 +08:00 · 31279 次点击
    这是一个创建于 4446 天前的主题,其中的信息可能已经有所发展或是发生改变。
    刚开始用Sublime Text 2,很好用。但是还有很多不习惯的地方。

    1.有没有列编辑模式
    2.怎么调整行高
    3.有没有复制行的命令

    有没有同学分享下 eclipse的键位配置。

    谢谢!
    11 条回复    1970-01-01 08:00:00 +08:00
    lucifr
        1
    lucifr  
       2012-02-15 21:06:47 +08:00
    1. http://lucifr.com/139225/sublime-text-2-tricks-and-tips/#multi-selection

    2. 行高控制可以在 Setting - User 中添加:

    [
    "line_padding_top": 2,
    "line_padding_bottom": 2
    ]

    3. 可以自定义下快捷键达到这个目的,在 keymap - User 里添加:

    [
    { "keys": ["super+shift+l"], "command": "expand_selection", "args": {"to": "line"}, "command": "copy" }
    ]
    donwa
        2
    donwa  
    OP
       2012-02-15 21:22:33 +08:00
    @lucifr 非常感谢。
    行高搞定了。
    1.没有介绍列编辑
    3.多command不能执行。
    lucifr
        3
    lucifr  
       2012-02-15 21:41:40 +08:00
    @donwa

    1. 你所谓的列编辑是什么效果?我怎么觉得通过 Shift + Command + L 或是中键选择文本块的多重选择形式应该能实现呢?

    3. 我用 Mac 的 dev 版是可以一个快捷键对应多个命令的,不知道你用的什么版本
    fanzeyi
        4
    fanzeyi  
       2012-02-15 21:55:17 +08:00
    donwa
        5
    donwa  
    OP
       2012-02-15 22:03:39 +08:00
    @lucifr 谢谢,确实是中键
    donwa
        6
    donwa  
    OP
       2012-02-15 22:06:17 +08:00
    @lucifr 最新的版本。
    参考了下这个
    { "keys": ["ctrl+k"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },

    Delete Line.sublime-macro:
    [
    {"command": "expand_selection", "args": {"to": "line"}},
    {"command": "add_to_kill_ring", "args": {"forward": true}},
    {"command": "left_delete"}
    ]

    默认也是有用宏来实现多命令的。

    但是我搞定不了向上复制。
    donwa
        7
    donwa  
    OP
       2012-02-15 22:06:44 +08:00
    @fanzeyi 谢谢,使用中键
    freefcw
        8
    freefcw  
       2012-02-15 22:25:16 +08:00
    @lucifr 咔咔,你也出现在这儿了。。。话说sublime确实是一个好东西啊
    lucifr
        9
    lucifr  
       2012-02-15 22:29:03 +08:00
    @donwa 有错误提示么?

    @freefcw 我一直用它~ ^_^
    hengz
        10
    hengz  
       2012-10-08 19:39:31 +08:00
    @lucifr mac触摸板木有中键,如何拖动多列呢?
    sunus
        11
    sunus  
       2013-05-27 14:23:46 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3207 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 13:59 · PVG 21:59 · LAX 06:59 · JFK 09:59
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.