V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
WarWithinMe
V2EX  ›  Xcode

Vim binding For XCode

  •  
  •   WarWithinMe · 2011-12-20 00:17:55 +08:00 · 9169 次点击
    这是一个创建于 4482 天前的主题,其中的信息可能已经有所发展或是发生改变。
    详细的信息和使用说明,请浏览: https://github.com/WarWithinMe/xVim

    xVim利用SIMBL来提供类Vim的按键绑定,
    目前支持Normal mode, Insert mode, Replace mode。相当的alpha。
    实际上xVim其实是可以让系统里面所有的文本框都具有Vim按键绑定的,想想要是配合其他编辑器会有多爽。。

    xVim只是用于提供Vim的绑定,而其他Vim的功能(marco,register)并没有在实现的计划中。
    同时因为我自己只是初级vim user,所以一些我没用过的vim功能,就算你创建一个issue,我也是无能为力的。相比之下,倒不如抽空贡献一下代码(唯一要求是必须在贡献的代码开始署上贡献者自己的资料)。

    下一步要做的是(等我考完试):
    1.di{,di[等motion
    2.keymapping
    3.visual mode

    xVim会不定期更新,而且基本上更新不会有通知,所以如果想保持最新的话,请关注代码仓库。
    理论上只要是push到github上的代码,都是可编译使用的。。。
    21 条回复    1970-01-01 08:00:00 +08:00
    lldong
        1
    lldong  
       2011-12-20 00:23:35 +08:00
    可以参考下这个软件的一些功能 http://pqrs.org/macosx/keyremap4macbook/
    xell
        2
    xell  
       2011-12-20 00:27:07 +08:00
    Very Good!
    sinxccc
        3
    sinxccc  
       2011-12-20 01:59:55 +08:00
    这一点上是 Emacs 用户比较幸福。
    myrual
        4
    myrual  
       2012-02-11 14:58:09 +08:00
    freestyler
        5
    freestyler  
       2012-02-11 15:00:10 +08:00
    有这功夫不如学emacs
    ant_sz
        6
    ant_sz  
       2012-02-11 15:44:57 +08:00
    xcode4怎么使用呢?
    WarWithinMe
        7
    WarWithinMe  
    OP
       2012-02-14 16:50:00 +08:00
    @ant_sz 安装SIMBL,然后将bundle放到SIMBL的plugins目录,之后就可以用了.
    WarWithinMe
        8
    WarWithinMe  
    OP
       2012-02-14 16:56:49 +08:00
    @myrual 看了一下那个的源代码...貌似它的支持visual mode...不过它的很多东西例如,'w'移动到下一个word是用xcode提供的方法, 我记得xcode自己提供的方法其实跟Vim有很大差别.
    myrual
        9
    myrual  
       2012-02-14 17:34:05 +08:00
    @WarWithinMe 是的,支持visual mode是很方便的。
    移动起来快很多,而且支持:w。
    WarWithinMe
        10
    WarWithinMe  
    OP
       2012-02-23 12:53:35 +08:00
    @myrual

    xVim更新到0.2, 支持Visual Mode了.

    在这里卖个博文链接估计无伤大雅吧: http://warwithinme.com/blog/2012/02/23/xvim-v02/
    myrual
        11
    myrual  
       2012-02-25 15:55:16 +08:00
    开始用了。效果很好
    lldong
        12
    lldong  
       2012-02-29 12:26:37 +08:00
    xVim被加入到Chocolat beta6了
    WarWithinMe
        13
    WarWithinMe  
    OP
       2012-02-29 20:26:56 +08:00
    @lldong 是的。。。不过越来越感觉到目前的代码结构太难扩展下去了。。。"."命令真不知道怎么弄。。。打算跟另外一个XVim项目合并。
    lldong
        14
    lldong  
       2012-02-29 22:17:31 +08:00
    @WarWithinMe 另一个XVim的代码结构确实好一点,而且感觉通过xcode plugin的方式会比SIMBL好
    WarWithinMe
        15
    WarWithinMe  
    OP
       2012-02-29 23:16:17 +08:00
    @lldong 直接是plugin的话,起码方便一些。。
    ashchan
        16
    ashchan  
       2012-03-01 08:57:37 +08:00
    @WarWithinMe Virtual Mode+! Thanks for the awesome work!
    ashchan
        17
    ashchan  
       2012-03-01 09:14:26 +08:00
    @WarWithinMe master branch下不含Virtual Mode?find ?很不错,不过跳n/N好象上下顺序是返的。
    WarWithinMe
        18
    WarWithinMe  
    OP
       2012-03-01 09:29:52 +08:00
    @ashchan Master里面是有Visual的。。不过Visual里面很多命令还不支持。n/N的顺序应该是对的,因为这个是Chocolat那里的人给的代码。
    ashchan
        19
    ashchan  
       2012-03-01 09:35:07 +08:00
    @WarWithinMe 嗯,顺序确实是对的,不好意思。
    我似乎进不了Virtual Mode。一会连回家去试试另一台机器中。现在使用的本子上有些很怪异的行为,比方说去第20行,20G不起作用,会到最后一行,好像是0吃掉了这个命令。不过这在另一台机器上是正常的(那台上是Xcdoe 4.4,xVim跑得很欢:)。

    谢谢!
    fly2never
        20
    fly2never  
       2012-08-21 18:52:30 +08:00
    找到一个这个 https://github.com/JugglerShu/XVim
    和作者这个project什么关系?
    WarWithinMe
        21
    WarWithinMe  
    OP
       2012-08-21 21:07:58 +08:00
    @fly2never XVim比我的这个xVim要稍微后一点出来。。。两者几乎完全不同的实现。后来我将一些代码提交到XVim上,并且终止了xVim的开发。。现在应该直接用XVim就好了。。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3516 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 10:47 · PVG 18:47 · LAX 03:47 · JFK 06:47
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.