Jan'uary » 日志 » Making your vim like textmate
Making your vim like textmate
Jan 发表于 2008-03-13 22:07:22
textmate is great, but vim is greater. Vim can acts_as_textmate, but textmate can't acts_as_vim. To make your vim more kindly to rails development, you need some well-known plugins:
* gem i vim-ruby: <must have>
* rails.vim: <must have>
* grep.vim: fast locate the code in current directory
* minibufexpl.vim: show a buffer tab above your edit area
* surround.vim: hard to use, but sometimes useful. When you have lots of html work you need this to insert html tags quickly
* matchit.vim: it will help you to eliminate un-closed tags/blocks/etc.
And finally, I strongly recommend the very new plugin - FuzzyFinder - who comes with vim7's release. It's so useful and unbelieveable ignored by people ... You'll get the great fuzzy find & open function from this, like you open a file in textmate or intellij. MUST HAVE!
Dig more from my .vimrc:
set nocompatible " We're running Vim, not Vi!
syntax on " Enable syntax highlighting
colorscheme vividchalk "Textmate color scheme on VIM. Use GVIM to get the best looking
set guifont=Terminus\ 12 "Popluar terminal fonts in archlinux community
filetype plugin indent on " Enable filetype-specific indenting and plugins
" Load matchit (% to bounce from do to end, etc.)
runtime! macros/matchit.vim
augroup myfiletypes
" Clear old autocmds in group
autocmd!
" autoindent with two spaces, always expand tabs
autocmd FileType ruby,eruby,yaml,html,erb set si sw=2 sts=2 et
augroup END
let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1
nmap <leader>rci :%!ruby-code-indenter<cr>
"noremap <C-f> :TSelectFiles<cr>
nnoremap <C-f> :FuzzyFinderFile <C-r>=expand('%:~:.')[:-1-len(expand('%:~:.:t'))]<CR><CR>
nnoremap <C-o> :FilesystemExplorer<cr>
* gem i vim-ruby: <must have>
* rails.vim: <must have>
* grep.vim: fast locate the code in current directory
* minibufexpl.vim: show a buffer tab above your edit area
* surround.vim: hard to use, but sometimes useful. When you have lots of html work you need this to insert html tags quickly
* matchit.vim: it will help you to eliminate un-closed tags/blocks/etc.
And finally, I strongly recommend the very new plugin - FuzzyFinder - who comes with vim7's release. It's so useful and unbelieveable ignored by people ... You'll get the great fuzzy find & open function from this, like you open a file in textmate or intellij. MUST HAVE!
Dig more from my .vimrc:
set nocompatible " We're running Vim, not Vi!
syntax on " Enable syntax highlighting
colorscheme vividchalk "Textmate color scheme on VIM. Use GVIM to get the best looking
set guifont=Terminus\ 12 "Popluar terminal fonts in archlinux community
filetype plugin indent on " Enable filetype-specific indenting and plugins
" Load matchit (% to bounce from do to end, etc.)
runtime! macros/matchit.vim
augroup myfiletypes
" Clear old autocmds in group
autocmd!
" autoindent with two spaces, always expand tabs
autocmd FileType ruby,eruby,yaml,html,erb set si sw=2 sts=2 et
augroup END
let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1
nmap <leader>rci :%!ruby-code-indenter<cr>
"noremap <C-f> :TSelectFiles<cr>
nnoremap <C-f> :FuzzyFinderFile <C-r>=expand('%:~:.')[:-1-len(expand('%:~:.:t'))]<CR><CR>
nnoremap <C-o> :FilesystemExplorer<cr>
曾经的这一天...
- » 2007年: 又回到Gentoo鸟
- » 2006年: 再次强烈鄙视老白
- » 2005年: KPDF 0.4
- » 2005年: Torsmo [III]
相关日志:
收藏:
QQ书签
del.icio.us
订阅:
Google
抓虾
