-
-
Save Saidbek/3099883 to your computer and use it in GitHub Desktop.
My vimrc for Ruby on Rails development
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call pathogen#runtime_append_all_bundles() | |
" language messages en | |
set encoding=utf-8 | |
if has('win32') | |
set guifont=Monaco:h10:cRUSSIAN | |
else | |
set guifont=Monaco\ 11 | |
end | |
" base for vimrc file taken from http://biodegradablegeek.com/2007/12/using-vim-as-a-complete-ruby-on-rails-ide/ | |
filetype on " Automatically detect file types. | |
set nocompatible " We don't want vi compatibility. | |
" Add recently accessed projects menu (project plugin) | |
set viminfo^=! | |
" Minibuffer Explorer Settings | |
let g:miniBufExplMapWindowNavVim = 1 | |
let g:miniBufExplMapWindowNavArrows = 1 | |
let g:miniBufExplMapCTabSwitchBufs = 1 | |
let g:miniBufExplModSelTarget = 1 | |
" alt+n or alt+p to navigate between entries in QuickFix | |
map <silent> <m-p> :cp <cr> | |
map <silent> <m-n> :cn <cr> | |
" Change which file opens after executing :Rails command | |
let g:rails_default_file='config/database.yml' | |
syntax enable | |
set nocompatible | |
"------------------------- | |
set cf " Enable error files & error jumping. | |
set clipboard+=unnamed " Yanks go on clipboard instead. | |
set history=256 " Number of things to remember in history. | |
set autowrite " Writes on make/shell commands | |
set ruler " Ruler on | |
set nu " Line numbers on | |
set nowrap " Line wrapping off | |
set timeoutlen=1000 " Time to wait after ESC (default causes an annoying delay) | |
" colorscheme vividchalk " Uncomment this to set a default theme | |
" Formatting (some of these are for coding in C and C++) | |
set ts=2 " Tabs are 2 spaces | |
set bs=2 " Backspace over everything in insert mode | |
set shiftwidth=2 " Tabs under smart indent | |
set nocp incsearch | |
set cinoptions=:0,p0,t0 | |
set cinwords=if,else,while,do,for,switch,case | |
set formatoptions=tcqr | |
set cindent | |
set autoindent | |
set smarttab | |
set expandtab | |
" Visual | |
set showmatch " Show matching brackets. | |
set mat=5 " Bracket blinking. | |
" set list | |
" Show $ at end of line and trailing space as ~ | |
set lcs=tab:\ \ ,eol:$,trail:~,extends:>,precedes:< | |
" set novisualbell " No blinking . | |
" set noerrorbells " No noise. | |
set laststatus=2 " Always show status line. | |
" gvim specific | |
set mousehide " Hide mouse after chars typed | |
set mouse=a " Mouse in all modes | |
"------------------------- | |
winsize 180 40 | |
colorscheme desert | |
set splitright | |
set splitbelow | |
set go-=m | |
set go-=T | |
command! -nargs=1 -bang -complete=customlist,genutils#UserFileComplete2 FindInPath :find<bang> <args> | |
set backupdir=~/.vim_backups,. | |
set directory=~/.vim_backups,. | |
filetype off | |
filetype plugin indent on | |
noremap <C-J> <C-W>j | |
noremap <C-K> <C-W>k | |
noremap <C-H> <C-W>h | |
noremap <C-L> <C-W>l | |
inoremap jj <ESC> | |
au Bufread,BufNewFile *.as set filetype=actionscript | |
let g:ackprg="ack-grep -H --nocolor --nogroup --column" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment