Skip to content

Instantly share code, notes, and snippets.

@ricardosiri68
Last active January 6, 2016 10:04
Show Gist options
  • Save ricardosiri68/4796baaf5f18efed6c43 to your computer and use it in GitHub Desktop.
Save ricardosiri68/4796baaf5f18efed6c43 to your computer and use it in GitHub Desktop.
" https://gist.github.com/ricardosiri68/4796baaf5f18efed6c43
" https://goo.gl/gBjGXn
" VUNDLE
set nocompatible " be iMproved, required
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle
" required!
Bundle 'VundleVim/Vundle.vim'
" The bundles you install will be listed here
Bundle 'bling/vim-airline'
Bundle 'tpope/vim-fugitive'
Bundle 'Shougo/vimproc.vim'
Bundle 'Shougo/unite.vim'
Bundle 'Shougo/neomru.vim'
Bundle 'Shougo/neoyank.vim'
Bundle 'klen/python-mode'
Bundle 'mattn/emmet-vim'
Bundle 'scrooloose/syntastic'
Bundle 'wakatime/vim-wakatime'
Bundle 'davidhalter/jedi-vim'
Bundle 'drmingdrmer/xptemplate'
Bundle 'morhetz/gruvbox'
call vundle#end()
filetype plugin indent on
" The rest of your config follows here
augroup vimrc_autocmds
autocmd!
" highlight characters past column 120
autocmd FileType python highlight Excess ctermbg=DarkGrey guibg=Black
autocmd FileType python match Excess /\%120v.*/
autocmd FileType python set nowrap
augroup END
" AIRLINE
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = ''
let g:airline_symbols.linenr = ''
let g:airline#extensions#tabline#enabled = 1
let g:airline_theme='badwolf'
" PYTHON-MODE
" Activate rope
" Keys:
" K Show python docs
" <Ctrl-Space> Rope autocomplete
" <Ctrl-c>g Rope goto definition
" <Ctrl-c>d Rope show documentation
" <Ctrl-c>f Rope find occurrences
" <Leader>b Set, unset breakpoint (g:pymode_breakpoint enabled)
" [[ Jump on previous class or function (normal, visual, operator modes)
" ]] Jump on next class or function (normal, visual, operator modes)
" [M Jump on previous class or method (normal, visual, operator modes)
" ]M Jump on next class or method (normal, visual, operator modes)
let g:pymode_rope = 0
" Documentation
let g:pymode_doc = 1
let g:pymode_doc_key = 'K'
"Linting
let g:pymode_lint = 1
let g:pymode_lint_checker = "pyflakes,pep8"
" Auto check on save
let g:pymode_lint_write = 1
" Support virtualenv
let g:pymode_virtualenv = 1
" Enable breakpoints plugin
let g:pymode_breakpoint = 1
let g:pymode_breakpoint_bind = '<leader>b'
" syntax highlighting
let g:pymode_syntax = 1
let g:pymode_syntax_all = 1
let g:pymode_syntax_indent_errors = g:pymode_syntax_all
let g:pymode_syntax_space_errors = g:pymode_syntax_all
" Don't autofold code
let g:pymode_folding = 0
" EMMET
let g:user_emmet_mode='a'
let g:user_emmet_install_global = 0
autocmd FileType html,htmldjango,css,php EmmetInstall
" SYNTASTIC
let g:syntastic_ignore_files = ["\.py$"]
let g:syntastic_check_on_open = 1
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_mode_map = { 'mode': 'active',
\ 'active_filetypes': [
\'php',
\'javascript',
\'css',
\'html',
\'py'],
\ 'passive_filetypes': ['puppet'] }
let g:syntasctic_html_checkers = ['jshint', 'w3', 'tidy']
let g:syntasctic_css_checkers = ['csslint', 'phpcs', 'prettycss']
let g:syntasctic_javascript_checkers = ['jshint', 'jslint']
let g:syntasctic_javascript_jslint_args = "--browser --console"
let g:syntasctic_php_checkers = ['php', 'phpcs', 'phpmd']
" UNITE
let g:unite_source_history_yank_enable = 1
call unite#filters#matcher_default#use(['matcher_fuzzy'])
" file_rec/async command
let g:unite_source_rec_async_command = ['ag', '--follow', '--nocolor', '--nogroup', '--hidden', '-g', '']
let g:unite_source_grep_command = 'ag'
let g:unite_source_grep_default_opts =
\ '-i --vimgrep --hidden --ignore ' .
\ '''.hg'' --ignore ''.svn'' --ignore ''.git'' --ignore ''.bzr'''
nnoremap <C-p> :Unite -start-insert file_rec/async<cr>
nnoremap <space>/ :Unite grep:.<CR>
nnoremap <space>y :Unite history/yank<CR>
nnoremap <space>s :Unite -quick-match buffer<CR>
" Mapings personalizados para el buffer de unite
autocmd FileType unite call s:unite_settings()
function! s:unite_settings()
" Play nice with supertab
let b:SuperTabDisabled=1
" Habilita la navegacion con <C-j|C-k>
imap <buffer> <C-j> <Plug>(unite_select_next_line)
imap <buffer> <C-k> <Plug>(unite_select_previous_line)
endfunction
" Mapings personalizados para el buffer de unite
autocmd FileType unite call s:unite_settings()
function! s:unite_settings()
" Play nice with supertab
let b:SuperTabDisabled=1
" Habilita la navegacion con <C-j|C-k>
imap <buffer> <C-j> <Plug>(unite_select_next_line)
imap <buffer> <C-k> <Plug>(unite_select_previous_line)
endfunction
" CONFIGURACIONES COMUNES
let mapleader = ","
set pastetoggle=<F2>
set clipboard+=unnamedplus
" quitando los archivos de respaldo
set nobackup
set nowritebackup
set noswapfile
" " Espacios en lugar de tabs
set tabstop=4
set softtabstop=4
set shiftwidth=4
set shiftround
set expandtab
"
"
" " vuelve las busquedas caseinsensive
set ignorecase
set smartcase
" ancho y numero de linea
set number " show line numbers
set tw=78 " width of document (used by gd)
set nowrap " don't automatically wrap on load
set fo-=t " don't automatically wrap text when typing
set colorcolumn=80
highlight ColorColumn ctermbg=0*
" comandos para salir rapido
noremap <Leader>e :quit<CR> " Quit current window
noremap <Leader>E :qa!<CR> " Quit all windows
"
" Movimientos con CTRL+
map <c-j> <c-w>j
map <c-k> <c-w>k
map <c-l> <c-w>l
map <c-h> <c-w>h
map <c-b> :bp<CR>
map <c-n> :bn<CR>
" mover el identado de los bloques
vnoremap < <gv " better indentation
vnoremap > >gv " better indentation
" folding desaactivado
set nofoldenable
" colorscheme
syntax on
set background=dark
let g:gruvbox_contrast_dark = 'hard'
colorscheme gruvbox
" MOUSE SUPPORT
if !has('nvim')
set ttymouse=xterm2
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment