參考文章
- Macvim官網(wǎng)
- What are the advantages of MacVim over Vim?
- MacVim 與 Vim 相比故痊,優(yōu)勢和劣勢都有哪些萤彩?
- 在mac上安裝macvim
摘錄一些觀點(diǎn)
官方的 vim [1] 在 Mac 上只有一個(gè)很不完善的稳吮,長期沒人維護(hù)的 Carbon 圖形用戶界面吉挣。MacVim 主要是在此基礎(chǔ)上添加了一個(gè)完整的 Cocoa 用戶界面裹驰,其核心部分和 vim 同步隧熙。MacVim 采用了分離進(jìn)程的方式,一個(gè) MacVim 程序可以啟動(dòng)多個(gè) vim 進(jìn)程幻林,每個(gè)顯示在一個(gè)MacVim 窗口中贞盯,這是官方的 vim 和其他平臺(tái)下的 gvim 所不支持的。MacVim 還支持很多 Mac OS X 原生的界面特性躏敢,比如工具欄件余、滾動(dòng)條攘烛、全屏顯示、Mac 菜單快捷鍵的綁定等。
-
MacVim 提供了一些 GUI editor 的特性觅捆,比如 menu bar。
裝了 Vimwiki 之后赢赊,menu bar 就會(huì)出現(xiàn)它的入口寥殖。
部分 plugins 也會(huì)如此熏纯,比如 NERD commenter。
還有 tools、syntax、buffers 等菜單對于剛?cè)腴T甚至上手沒多久的人都是很有幫助的艇棕。對于我來說,最重要的特性的它提供了 mvim 組件,用于在 Terminal 里打開 MacVim妆档。
這就非常方便開發(fā)者一邊使用 MacVim 一邊操作 Terminal胸梆。
如果使用 Vim,則只能多開一個(gè) tab须板。
而且受限于 Terminal碰镜,可視范圍和高亮的顏色數(shù)都比 MacVim 差。而劣勢逼纸,就只有一個(gè):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: