0%

MacVim和Bundle

Fiddler是通过改写HTTP代理,让数据从它那通过,来监控并且截取到数据。

一、概念

      Mac预装了vim,但官方的vim在Mac上只有一个很不完善的,长期没人维护的Carbon图形用户界面。Macvim主要是在此基础上添加了一个完整的Cocoa用户界面,其核心部分和vim同步。

      MacVim采用了分离进程的方式,一个MacVim程序可以启动多个vim进程,每个显示在一个MacVim窗口中,这是官方的vim和其他平台下的gvim所不支持的。MacVim还支持很多MacOS X原生的界面特性,比如工具栏、滚动条、全屏显示、Mac 菜单快捷键的绑定等。

二、使用

  1. MacVim

    • 安装
      • 通过dmg安装,传送门
      • 通过homebrew安装,brew install macvim
    • 设置PATH:export PATH=$PATH:/Applications/MacVim.app/Contents/bin
  2. 设置

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    set nocompatible              " be iMproved, required
    filetype off " required

    " set the runtime path to include Vundle and initialize
    set rtp+=~/.vim/bundle/vundle/
    call vundle#rc()
    " alternatively, pass a path where Vundle should install plugins
    "let path = '~/some/path/here'
    "call vundle#rc(path)

    " let Vundle manage Vundle, required
    Plugin 'gmarik/vundle'

    " The following are examples of different formats supported.
    " Keep Plugin commands between here and filetype plugin indent on.
    " scripts on GitHub repos
    Plugin 'tpope/vim-fugitive'
    Plugin 'Lokaltog/vim-easymotion'
    Plugin 'tpope/vim-rails.git'
    " The sparkup vim script is in a subdirectory of this repo called vim.
    " Pass the path to set the runtimepath properly.
    Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
    " scripts from http://vim-scripts.org/vim/scripts.html
    Plugin 'L9'
    Plugin 'FuzzyFinder'
    " scripts not on GitHub
    Plugin 'git://git.wincent.com/command-t.git'
    " git repos on your local machine (i.e. when working on your own plugin)
    Plugin 'file:///home/gmarik/path/to/plugin'
    " ...

    filetype plugin indent on " required
    " To ignore plugin indent changes, instead use:
    "filetype plugin on
    "
    " Brief help
    " :PluginList - list configured plugins
    " :PluginInstall(!) - install (update) plugins
    " :PluginSearch(!) foo - search (or refresh cache first) for foo
    " :PluginClean(!) - confirm (or auto-approve) removal of unused plugins
    "
    " see :h vundle for more details or wiki for FAQ
    " NOTE: comments after Plugin commands are not allowed.
    " Put your stuff after this line
    • command + t 新开一个终端
    • 输入:vim
    • 进入vim命令行模式,输入:PluginInstall,即可安装指定的插件
      • 编辑~/.vimrc,加入自己想安装的插件,然后再执行:PluginInstall即可安装

三、参考

  1. MacVim