Created
August 4, 2014 11:44
-
-
Save victorb/c3b712c99cd3cbb623aa to your computer and use it in GitHub Desktop.
My Vimrc
This file contains hidden or 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
| execute pathogen#infect() | |
| syntax enable | |
| set background=dark | |
| let base16colorspace=256 " Access colors present in 256 colorspace | |
| colorscheme base16-default | |
| set nocompatible | |
| "filetype indent plugin on | |
| filetype off | |
| set number | |
| set incsearch | |
| set hlsearch | |
| set ignorecase | |
| set smartcase | |
| set backspace=indent,eol,start | |
| set autoindent | |
| set confirm | |
| set tabstop=2 | |
| set shiftwidth=2 | |
| set noswapfile | |
| set nobackup | |
| set showcmd | |
| set showmode | |
| "set visualbell | |
| set wildmenu | |
| set wildmode=list:longest,full | |
| set t_vb= | |
| set mouse=a | |
| "set cursorline | |
| set colorcolumn=80 | |
| set wildignore+=*vendor/*,*tests/_log/*,*node_modules/*,*.zip | |
| " Insert one character by pressing space | |
| "function! InsertSingle() | |
| " sleep 500m|let l:a = getchar(0) | |
| " if l:a != 0 | |
| " silent! exec "normal a" . nr2char(l:a) | |
| " else | |
| " silent! exec "normal a " | |
| " endif | |
| "endfunction | |
| " | |
| "nnoremap <silent> <Space> :call InsertSingle()<CR> | |
| "VUNDLE | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| " alternatively, pass a path where Vundle should install plugins | |
| "call vundle#begin('~/some/path/here') | |
| " let Vundle manage Vundle, required | |
| Plugin 'gmarik/Vundle.vim' | |
| " The following are examples of different formats supported. | |
| " Keep Plugin commands between vundle#begin/end. | |
| " plugin on GitHub repo | |
| "Plugin 'tpope/vim-fugitive' | |
| " plugin from http://vim-scripts.org/vim/scripts.html | |
| "Plugin 'L9' | |
| " Git plugin not hosted on GitHub | |
| "Plugin 'git://git.wincent.com/command-t.git' | |
| " git repos on your local machine (i.e. when working on your own plugin) | |
| " The sparkup vim script is in a subdirectory of this repo called vim. | |
| " Pass the path to set the runtimepath properly. | |
| "Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} | |
| "Bundle 'Lokaltog/vim-easymotion' | |
| " Solarized theme | |
| " Plugin 'altercation/vim-colors-solarized' | |
| " Airline | |
| Plugin 'bling/vim-airline' | |
| " NERDTree | |
| Plugin 'scrooloose/nerdtree' | |
| Plugin 'kien/ctrlp.vim' | |
| "Plugin 'Valloric/YouCompleteMe' | |
| Plugin 'kchmck/vim-coffee-script' | |
| Plugin 'evidens/vim-twig' | |
| " Indentation detection | |
| Plugin 'tpope/vim-sleuth' | |
| " Numbers in tabs | |
| "Plugin 'mkitt/tabline.vim' | |
| " Save sessions | |
| "Plugin 'xolox/vim-misc' | |
| "Plugin 'xolox/vim-session' | |
| " Emmet (Zencoding) | |
| "Plugin 'mattn/emmet-vim' | |
| " Autosave on change | |
| "Plugin 'vim-scripts/vim-auto-save' | |
| " Better marks | |
| "Plugin 'kshenoy/vim-signature' | |
| " Snippet stuff | |
| Plugin 'MarcWeber/vim-addon-mw-utils' | |
| Plugin 'tomtom/tlib_vim' | |
| Plugin 'garbas/vim-snipmate' | |
| Plugin 'honza/vim-snippets' | |
| " Howdoi Plugin | |
| "Plugin 'laurentgoudet/vim-howdoi.git' | |
| " Golang plugin | |
| Plugin 'fatih/vim-go' | |
| " Gitgutter plugin | |
| Plugin 'airblade/vim-gitgutter' | |
| " Color scheme | |
| Plugin 'chriskempson/base16-vim' | |
| " Multiple cursors | |
| Plugin 'terryma/vim-multiple-cursors' | |
| " PHP QA Tools | |
| Plugin 'joonty/vim-phpqa.git' | |
| "let g:snipMate = {} | |
| "let g:snipMate.scope_aliases = {} | |
| "let g:snipMate.scope_aliases['ruby'] = 'ruby,rails' | |
| "let g:snipMate.scope_aliases['javascript'] = 'coffee,javascript' | |
| " End snippet stuff | |
| " All of your Plugins must be added before the following line | |
| call vundle#end() " required | |
| filetype plugin indent on " required | |
| " To ignore plugin indent changes, instead use: | |
| "filetype plugin on | |
| " | |
| " Brief help | |
| " :PluginList - list configured plugins | |
| " :PluginInstall(!) - install (update) plugins | |
| " :PluginSearch(!) foo - search (or refresh cache first) for foo | |
| " :PluginClean(!) - confirm (or auto-approve) removal of unused plugins | |
| " | |
| " see :h vundle for more details or wiki for FAQ | |
| " Put your non-Plugin stuff after this line | |
| " | |
| "nmap <silent> <C-D> :NERDTreeToggle<CR> | |
| " Easy pane switching with ctrl-direction | |
| nmap <silent> <c-k> :wincmd k<CR> | |
| nmap <silent> <c-j> :wincmd j<CR> | |
| nmap <silent> <c-h> :wincmd h<CR> | |
| nmap <silent> <c-l> :wincmd l<CR> | |
| nmap <C-w> :NERDTreeToggle<CR> | |
| nmap <C-d> :NERDTreeFind<CR> | |
| " Fix copy paste | |
| vmap <C-c> "+yi | |
| vmap <C-x> "+c | |
| vmap <C-v> c<ESC>"+p | |
| imap <C-v> <C-r><C-o>+ | |
| " Emmet to ctrl+e | |
| "let g:user_emmet_leader_key='<C-E>' | |
| " enable AutoSave on Vim startup | |
| "let g:auto_save = 1 | |
| " Disable autoload of sessions | |
| "let g:session_autoload = 'no' | |
| " Save session in folder | |
| "function! MakeSession() | |
| " let b:sessiondir = $HOME . "/.vim/sessions" . getcwd() | |
| " if (filewritable(b:sessiondir) != 2) | |
| " exe 'silent !mkdir -p ' b:sessiondir | |
| " redraw! | |
| " endif | |
| " let b:filename = b:sessiondir . '/session.vim' | |
| " exe "mksession! " . b:filename | |
| "endfunction | |
| " | |
| "function! LoadSession() | |
| " let b:sessiondir = $HOME . "/.vim/sessions" . getcwd() | |
| " let b:sessionfile = b:sessiondir . "/session.vim" | |
| " if (filereadable(b:sessionfile)) | |
| " exe 'source ' b:sessionfile | |
| " else | |
| " echo "No session loaded." | |
| " endif | |
| "endfunction | |
| "au VimEnter * nested :call LoadSession() | |
| "au VimLeave * :call MakeSession() | |
| " | |
| "autocmd VimEnter * if &filetype !=# 'gitcommit' | NERDTree | endif | |
| let g:phpqa_codesniffer_autorun = 0 | |
| ":au FocusLost * :wa | |
| ":au FocusLost * silent! wa |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment