【CLI】MacVim调研

【CLI】MacVim调研_第1张图片
macvim

参考文章

  • Macvim官网
  • What are the advantages of MacVim over Vim?
  • MacVim 与 Vim 相比,优势和劣势都有哪些?
  • 在mac上安装macvim

摘录一些观点

  • 官方的 vim [1] 在 Mac 上只有一个很不完善的,长期没人维护的 Carbon 图形用户界面。MacVim 主要是在此基础上添加了一个完整的 Cocoa 用户界面,其核心部分和 vim 同步。MacVim 采用了分离进程的方式,一个 MacVim 程序可以启动多个 vim 进程,每个显示在一个MacVim 窗口中,这是官方的 vim 和其他平台下的 gvim 所不支持的。MacVim 还支持很多 Mac OS X 原生的界面特性,比如工具栏、滚动条、全屏显示、Mac 菜单快捷键的绑定等。

  • MacVim 提供了一些 GUI editor 的特性,比如 menu bar。
    装了 Vimwiki 之后,menu bar 就会出现它的入口。
    部分 plugins 也会如此,比如 NERD commenter。
    还有 tools、syntax、buffers 等菜单对于刚入门甚至上手没多久的人都是很有帮助的。

    对于我来说,最重要的特性的它提供了 mvim 组件,用于在 Terminal 里打开 MacVim。
    这就非常方便开发者一边使用 MacVim 一边操作 Terminal。
    如果使用 Vim,则只能多开一个 tab。
    而且受限于 Terminal,可视范围和高亮的颜色数都比 MacVim 差。

    而劣势,就只有一个:MacVim 不能很好地支持 sudo

  • MacVim is just Vim. Anything you are used to do in Vim will work exactly the same way in MacVim.  
    

    MacVim is more integrated in the whole OS than Vim in the Terminal or even GVim in Linux, it follows a lot of Mac OS X's conventions.

    If you work mainly with GUI apps (YummyFTP + GitX + Charles, for example) you may prefer MacVim.

    If you work mainly with CLI apps (ssh + svn + tcpdump, for example) you may prefer vim in the terminal.

    Entering and leaving one realm (CLI) for the other (GUI) and vice-versa can be "expensive"

    I use both MacVim and Vim depending on the task and the context: if I'm in CLI-land I'll just type vim filename and if I'm in GUI-land I'll just invoke Quicksilver and launch MacVim.

    When I switched from TextMate I kind of liked the fact that MacVim supported almost all of the regular shortcuts Mac users are accustomed to. I added some of my own, mimiking TextMate but, since I was working in multiple environments I forced my self to learn the vim way. Now I use both MacVim and Vim almost exactly the same way. Using one or the other is just a question of context for me.

    Also, like El Isra said, the default vim (CLI) in OS X is slightly outdated. You may install an up-to-date version via MacPorts or you can install MacVim and add an alias to your .profile:

alias vim='/path/to/MacVim.app/Contents/MacOS/Vim'

to have the same vim in MacVim and Terminal.app.  
  
    An even better way to use MacVim's CLI executable in your shell is to move the mvim script bundled with MacVim somewhere in your $PATH and use this command:  

    ```  
$ mvim -v  

macvim的安装

//TODO:


macvim的配置

//TODO:


macvim的使用

//TODO:

你可能感兴趣的:(【CLI】MacVim调研)