Skip to content

Instantly share code, notes, and snippets.

@gnuget
Created October 4, 2014 00:44
Show Gist options
  • Save gnuget/16a2fdd0fe1b8bce99d9 to your computer and use it in GitHub Desktop.
Save gnuget/16a2fdd0fe1b8bce99d9 to your computer and use it in GitHub Desktop.
David's vimrc
syntax on
" Usando features exclusivas de VIM que no tiene VI
set nocompatible
set showmatch " Matching brackets.
set ignorecase " Do case insensitive matching
set incsearch " Incremental search
set ruler " show the line number on the bar
set autoread " watch for file changes
set scrolloff=10
set guifont=Monaco:h12
set laststatus=2
set statusline=%t[%{strlen(&fenc)?&fenc:'none'},%{&ff}]%h%m%r%y%=%c,%l/%L\ %P
set listchars=tab:>-,trail:-
set list
" Para el autocomplete con :e
set wildmenu
set wildmode=list:longest
" Vundle
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
" Vim-scripts
Bundle 'vim-scripts/php.vim'
" Github
Bundle 'scrooloose/nerdtree'
Bundle 'scrooloose/syntastic'
Bundle 'Lokaltog/powerline'
Bundle 'kien/ctrlp.vim'
Bundle 'nathanaelkane/vim-indent-guides'
" Colorschemes
Bundle 'vim-scripts/candy.vim'
Bundle 'tomasr/molokai'
Bundle 'vim-scripts/proton'
filetype plugin indent on " required!
" Vundle end
" Theme
set background=dark
let g:rehash256 = 1
colorscheme desert
" Numeros
set number
" Tabs de 2 Espacios en lugar de tabs
set expandtab
set tabstop=2
set shiftwidth=2
set autoindent
set smartindent
" Que nos avise cuando nos pasemos de los 80 caracteres
set colorcolumn=80
" Quitando el beep
set noerrorbells visualbell t_vb=
" Todos los temporales de VIM en el mismo lugar
set backup
set backupdir=~/.vim/backup
set directory=~/.vim/tmp
" Automatically cd into the directory that the file is in
autocmd BufEnter * execute "chdir ".escape(expand("%:p:h"), ' ')
" Buscar entre archivos
let g:ctrlp_map = '<c-p>'
" Para que se vea el indentado por default
let g:indent_guides_enable_on_vim_startup = 1
" Ignorando algunos archivos
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,cache/*
" La extensión engine será tratado como un archivo de PHP
au BufRead,BufNewFile *.drush set filetype=php
au BufRead,BufNewFile *.engine set filetype=php
" UTF8
if has("multi_byte")
if &termencoding == ""
let &termencoding = &encoding
endif
set encoding=utf-8
setglobal fileencoding=utf-8
"setglobal bomb
set fileencodings=ucs-bom,utf-8,latin1
endif
" Archivos de PHP con diferente extension
if has("autocmd")
" Drupal *.module and *.install files.
augroup module
autocmd BufRead,BufNewFile *.module set filetype=php
autocmd BufRead,BufNewFile *.install set filetype=php
autocmd BufRead,BufNewFile *.test set filetype=php
autocmd BufRead,BufNewFile *.inc set filetype=php
autocmd BufRead,BufNewFile *.profile set filetype=php
autocmd BufRead,BufNewFile *.view set filetype=php
augroup END
endif
syntax on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment