Permalink
Browse files

Some general tunning

  • Loading branch information...
1 parent 00ea79d commit 351e3b42799b864eb57e71dcfcdd52fd60c19458 Francisco J committed Mar 10, 2012
Showing with 48 additions and 35 deletions.
  1. +0 −1 gvimrc/gvimrc
  2. +37 −28 gvimrc/vimrc
  3. +11 −6 zsh/zshrc
View
@@ -3,5 +3,4 @@ if has("gui_macvim")
set lines=55 columns=150
" Set the macvim font
set guifont=Inconsolata:h16
- set background=light
endif
View
@@ -20,21 +20,22 @@ Bundle 'kchmck/vim-coffee-script'
Bundle 'tpope/vim-haml'
Bundle 'tpope/vim-rails'
Bundle 'bronson/vim-ruby-block-conv'
-Bundle 'nginx.vim'
-Bundle 'Puppet-Syntax-Highlighting'
+Bundle 'andersjanmyr/nginx-vim-syntax'
+Bundle 'puppetlabs/puppet-syntax-vim'
Bundle 'groenewege/vim-less'
+Bundle 'postmodern/vim-yard'
"}}}
" External tools"{{{
Bundle 'gmarik/vundle'
-Bundle 'ack.vim'
+Bundle 'mileszs/ack.vim'
Bundle 'tpope/vim-git'
Bundle 'tpope/vim-fugitive'
Bundle 'int3/vim-extradite'
"}}}
" Edition tools"{{{
Bundle 'tpope/vim-surround'
Bundle 'tpope/vim-ragtag'
-Bundle 'tComment'
+Bundle 'vim-scripts/tComment'
Bundle 'ervandew/supertab'
Bundle 'edsono/vim-matchit'
Bundle 'Raimondi/delimitMate'
@@ -48,22 +49,23 @@ Bundle 'scrooloose/syntastic'
"}}}
" Exploring and buffers"{{{
Bundle 'scrooloose/nerdtree'
-Bundle 'ZoomWin'
Bundle 'nathanaelkane/vim-indent-guides'
-" Bundle 'YankRing.vim'
+Bundle 'vim-scripts/YankRing.vim'
Bundle 'tpope/vim-repeat'
-Bundle 'kien/ctrlp.vim'
-" Tags
+"}}}
+" Tags "{{{
Bundle 'xolox/vim-easytags'
Bundle 'tpope/vim-bundler'
"}}}
-" Testing stuff
+
+" Testing stuff "{{{
Bundle 'xolox/vim-notes'
-" Bundle 'astashov/vim-ruby-debugger'
+"}}}
" ******************************************************************************
" Make it pretty
" ******************************************************************************
+set background=light
colorscheme solarized
set guioptions=ac
set number
@@ -75,8 +77,18 @@ set diffopt+=iwhite
set cpoptions+=$ " Mark with a $ at the end of a 'change' command
set showcmd
-" Some NERDTree options {{{
+" Some plugins options {{{
+
let NERDTreeDirArrows=1
+" That fixes a problem with NERDTree and vim-bundler
+let g:NERDTreeHijackNetrw = 0
+" Sintastic.vim config
+let g:syntastic_enable_signs=1
+" Notes config
+let g:notes_directory = '~/Documents/Notes'
+" Force easytags.vim to take ctags from homebrew
+let g:easytags_cmd = "/usr/local/bin/ctags"
+
"}}}
" Filetype highlighting and indentation activation"{{{
@@ -94,11 +106,11 @@ set expandtab
" Statusline config"{{{
set laststatus=2 " Always show status line.
" Filename
-set statusline=%<%f\ " Filename
+set statusline=%<%f\
" Preview, help, modified and readonly flags
set statusline+=%w%h%m%r
" Show fugitive.vim's GIT status
-set statusline+=%{fugitive#statusline()} " Git Hotness
+set statusline+=%{fugitive#statusline()}
" Filetype
set statusline+=\%y
" Current dir
@@ -111,23 +123,14 @@ set statusline+=%*
set statusline+=%=%-14.(%l,%c%V%)\ %p%%
"}}}
-" Sintastic.vim config
-let g:syntastic_enable_signs=1
-
-" Notes config
-let g:notes_directory = '~/Documents/Notes'
-
-" That fixes a problem with NERDTree and vim-bundler
-let g:NERDTreeHijackNetrw = 0
-
" ******************************************************************************
" Some defaults I like/need
" ******************************************************************************
-set scrolloff=8 " Leave 8 lines before start scrolling
+set scrolloff=3 " Leave 8 lines before start scrolling
runtime macros/matchit.vim " Needed for the ruby block object plugin
set spell
set spelllang=en_us
-set directory=~/.vim/swap,. " Store swap files in a common directory
+
" Searching"{{{
set hlsearch
set incsearch
@@ -136,8 +139,7 @@ set smartcase
"}}}
" Don't forget to set ft for Ruby files
-au BufRead,BufNewFile {caprc,autotest,Capfile,Rakefile,Thorfile,Vagrantfile,Guardfile,config.ru,.caprc,*.thor} set ft=ruby
-au BufRead,BufNewFile *_spec.rb set fdm=indent
+au BufRead,BufNewFile {caprc,autotest,.caprc} set ft=ruby
" ******************************************************************************
" Auto completion
@@ -148,12 +150,20 @@ set wildignore+=*.o,*.obj,.git,*.rbc
set wildmode=longest,list:full
set complete=.,t,w
"}}}
+
" Auto complete for ruby"{{{
autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete
autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1
autocmd FileType ruby,eruby let g:rubycomplete_rails = 1
autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1
"}}}
+
+" Some extras to rails.vim "{{{
+autocmd User Rails Rnavcommand steps features/step_definitions -glob=**/*
+autocmd User Rails Rnavcommand routes config -glob=*.* -suffix= -default=routes.rb
+autocmd User Rails Rnavcommand initializer config/initializers -glob=**/*
+autocmd User Rails Rnavcommand factories spec test -glob=**/* -default=factories
+"}}}
" ******************************************************************************
" Some custom key mapping
" ******************************************************************************
@@ -163,7 +173,7 @@ imap jj <ESC>
nnoremap <space> za
map <silent> <F2> :FixWhitespace<CR>
map <silent> ,n :noh<CR>
-map <silent> ,t :NERDTreeToggle<CR>
+nnoremap <silent> ,<space> :NERDTreeToggle<CR>
noremap ,a :Ack<space>
"}}}
" VIMRC mappings"{{{
@@ -273,5 +283,4 @@ function! s:FixDistrinetXml()
endfunction
command! FixDistrinetXml call <SID>FixDistrinetXml()
-
" vim: set fdm=marker:
View
@@ -1,10 +1,11 @@
# Path oh-my-zsh configuration.
+
export ZSH=$HOME/.oh-my-zsh
# export ZSH_THEME="eastwood"
export ZSH_THEME="gallois"
-plugins=(cap thor brew github git gem rails rails3 osx pow rvm)
+plugins=(cap thor brew github git gem rails rails3 osx pow)
source $ZSH/oh-my-zsh.sh
@@ -16,6 +17,7 @@ export ANDROID_SDK_ROOT=/usr/local/Cellar/android-sdk/r6
export NODE_PATH=/usr/local/lib/node_modules
# Set macvim as the default editor
export EDITOR='/usr/local/bin/mvim -f'
+export PAGER='/usr/local/bin/vimpager'
# Load RVM
rvm_project_rvmrc=1
@@ -46,9 +48,12 @@ alias rvmnginx='rvmsudo /opt/nginx/sbin/nginx'
alias nginxconf='_ mvim /opt/nginx/conf/nginx.conf'
alias redisserv='redis-server /usr/local/etc/redis.conf'
+alias less=$PAGER
+alias zless=$PAGER
+
# Tweack REE GC
-export RUBY_HEAP_MIN_SLOTS=1000000
-export RUBY_HEAP_SLOTS_INCREMENT=1000000
-export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
-export RUBY_GC_MALLOC_LIMIT=1000000000
-export RUBY_HEAP_FREE_MIN=500000
+# export RUBY_HEAP_MIN_SLOTS=1000000
+# export RUBY_HEAP_SLOTS_INCREMENT=1000000
+# export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
+# export RUBY_GC_MALLOC_LIMIT=1000000000
+# export RUBY_HEAP_FREE_MIN=500000

0 comments on commit 351e3b4

Please sign in to comment.