說實在的,我比較笨
我以前是用ASP.NET的時候只有 Visual Studio 可以選擇,我根本沒機會摸到其他的編輯器,直到跳到Ruby on Rails
之後,也找了許多IDE,例如:RubyMine, Netbeans,但發現,好像沒有這好用,之後問了許多使用Rails的大大才發現,大家都不用這些,用的都是Sublime Text, Textmate, vim 。
剛開始的時候也是使用vim,然後找了一堆大大的vimrc來裝,但是裝一裝發現,好像還是不大會用 GG ,最後又跳到Sublime Text,因為我是寫Rails的,所以我在許多partial中進進出出的,很麻煩,我聽到vim有一個plugin叫做vim-rails
,可以按gt
就可以跳到該行的檔案,所以我又跳回了vim。XDDD
但我發現vim需多plugin的強大,是我真的不知道的,自從我一個一個慢慢把vimrc設定好之後,我才豁然開朗,靠~原來vim這麼屌~
所以….
但女人也可以用。不過不用就不是真男人了嗎?
唉呦~自己用習慣就好了啦
轉回正題:
我的vimrc:https://github.com/SammyLin/vimrc
加了什麼plugin
- pathogen.vim: Manages the runtime path of the plugins
- NERD Tree: A tree explorer plugin for vim
- vim-powerline: The ultimate vim statusline utility
- vim-fugitive: a Git wrapper so awesome, it should be illegal
- snipMate.vim: snipMate.vim aims to be a concise vim script that implements some of TextMate’s snippets features in Vim
- tlib_vim: Some utility functions for VIM
- vim-addon-mw-utils: interpret a file by function and cacim](https://github.com/kien/ctrlp.vim): Fuzzy file, buffer, mru and tag finder. In my config it’s mapped to
<Ctrl+F>
, because<Ctrl+P>
is used by YankRing - vim-rails: Ruby on Rails power tools
- mru.vim: Plugin to manage Most Recently Used (MRU) files
- tComment: An extensible & universal comment plugin that also handles embedded filetypes
- vim-indent-object.
- ZenCoding: zen-coding for vim: http://code.google.com/p/zen-coding/
- vim-smartinput: Vim plugin: Provide smart input assistant
- vim-ruby: Vim/Ruby Configuration Files
- matchit.zip: extended % matching for HTML, LaTeX, and many other languages
- AutoComplPop: Automatically opens popup menu for completions)
- vim-markdown: Markdown Vim Mode
- vim-coffee-script: CoffeeScript support for vim
- scss-syntax.vim: Vim syntax file for scss (Sassy CSS)
- vim-octopress: Octopress support for Vim
我的color scheme (kolor)
我比較常用的指令
Open/Close NERDTree
,n
Open CtrlP
Control + p
Display the MRU file list
,f
Display CtrlP CtrlPBuffer
,b
To suspend your running vim
Control + z
# will suspend the process and get back to your shell
$ fg
Toggle comment
Control + _
Finding a word
/<word>
or
?<word>
# Pressing the n key, will allow you to go directly to the next occurrence of the word.