Created
January 25, 2016 04:51
-
-
Save quietcricket/37502286ad88f2ef2a66 to your computer and use it in GitHub Desktop.
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
set nocompatible " be iMproved, required | |
filetype off " required | |
let mapleader = "\<Space>" | |
" Use Vundle to install packages, the path may be ~/.vim/bundle/vundle depending on how vundle was installed | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" Bundles/Plugins | |
Plugin 'gmarik/Vundle.vim' | |
Plugin 'bling/vim-airline' " The info bar at the bottom | |
Plugin 'scrooloose/nerdtree' " Ani nfamous plugin | |
Plugin 'kien/ctrlp.vim' " Search file in current directory, Ctrl+P (same as sublime) | |
Plugin 'mitsuhiko/fruity-vim-colorscheme' " Colorful theme, from our Python superhero | |
Plugin 'mattn/webapi-vim' " Help to make HTTP calls, used by other plugins (gist-vim) | |
Plugin 'mattn/gist-vim' " Create gist by :Gist command | |
Plugin 'tpope/vim-git' " Git integration | |
Plugin 'pangloss/vim-javascript' " Javascript enhancement | |
Plugin 'maksimr/vim-jsbeautify' " Javascript enhancement | |
Plugin 'jelera/vim-javascript-syntax' " Javascript enhancement | |
Plugin 'Shougo/neocomplete.vim' " Better autocomplete | |
Plugin 'tpope/vim-commentary' " Comment lines or selections, gt to activate | |
Plugin 'Raimondi/delimitMate' " Auto close brackets and quotes | |
Plugin 'nathanaelkane/vim-indent-guides' " Better Intentation | |
Plugin 'majutsushi/tagbar' " Display class structure, F8 to activate | |
Plugin 'wakatime/vim-wakatime' " Time tracking plugin, need to register to get API key to use | |
set nu " Show line number | |
set mouse=a " Activate mouse for all modes, Insert and edit mode | |
set t_Co=256 | |
set backspace=2 " Backspace for dummies | |
set linespace=0 " No extra spaces between rows | |
set scrolloff=0 " Minimum lines to keep above and below cursor | |
set splitright " New file open at the right | |
set hidden " When a buffer is brought to foreground, remember undo history and marks. | |
set history=200 " Increase history from 20 default to 1000 | |
set laststatus=2 " Always show status line | |
set noerrorbells " Disable error bells. | |
set nostartofline | |
set ruler " Show the cursor position | |
set title " Show the filename in the window titlebar. | |
scriptencoding utf-8 | |
" Disable the scrollbars | |
set guioptions-=r | |
set guioptions-=L | |
set encoding=utf-8 | |
set nobackup | |
set noswapfile | |
set pastetoggle=<F2> | |
nnoremap ; : | |
nmap <silent> <leader>vimrc :e ~/.vimrc<CR> | |
map <leader>y "*y | |
map <leader>p "*p | |
cmap w!! %!sudo tee > /dev/null % | |
autocmd BufWritePre * :%s/\s\+$//e | |
nmap <F8> :TagbarToggle<CR> | |
" Add the virtualenv's site-packages to vim path | |
if has('python') | |
py << EOF | |
import os.path | |
import sys | |
import vim | |
if 'VIRTUAL_ENV' in os.environ: | |
project_base_dir = os.environ['VIRTUAL_ENV'] | |
sys.path.insert(0, project_base_dir) | |
activate_this = os.path.join(project_base_dir, 'bin/activate_this.py') | |
execfile(activate_this, dict(__file__=activate_this)) | |
EOF | |
endif | |
" Load up virtualenv's vimrc if it exists | |
if filereadable($VIRTUAL_ENV . '/vimrc') | |
source $VIRTUAL_ENV/vimrc | |
endif | |
if &term == 'xterm' || &term == 'screen' | |
set t_Co=256 " Enable 256 colors to stop the CSApprox warning and make xterm vim shine | |
endif | |
" Gist related settings | |
let g:gist_detect_filetype = 1 | |
let g:gist_open_browser_after_post = 1 | |
let g:gist_clip_command = 'pbcopy' | |
let g:gist_post_private = 1 | |
let g:gist_get_multiplefile = 1 | |
" Colorcolumns | |
if version >= 703 | |
autocmd FileType * setlocal colorcolumn=0 | |
" autocmd FileType ruby,python,javascript,c,cpp,objc,rst | |
" \ let &colorcolumn="80,".join(range(84,300),",") | |
autocmd FileType ruby,python,javascript,c,cpp,objc,rst let &colorcolumn="100" | |
endif | |
"Nerdtree | |
"nmap <C-u> :NERDTreeToggle<CR> | |
"let NERDTreeIgnore = ['\.pyc$'] | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" Spell check always on | |
set spell spelllang=en_us | |
set expandtab | |
let g:acp_enableAtStartup = 0 | |
let g:neocomplete#enable_at_startup = 1 | |
let g:neocomplete#enable_smart_case = 1 | |
let g:neocomplete#sources#syntax#min_keyword_length = 3 | |
inoremap <expr><C-g> neocomplete#undo_completion() | |
inoremap <expr><C-l> neocomplete#complete_common_string() | |
inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR> | |
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard'] | |
let g:ctrlp_match_window_bottom = 0 " show the match window at the top of the screen | |
let g:ctrlp_by_filename = 1 | |
let g:ctrlp_max_height = 10 " maxiumum height of match window | |
let g:ctrlp_switch_buffer = 'et' " jump to a file if it's open already | |
function! s:my_cr_function() | |
return neocomplete#close_popup() . "\<CR>" | |
endfunction | |
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" | |
inoremap <expr><C-h> neocomplete#smart_close_popup()."\<C-h>" | |
inoremap <expr><BS> neocomplete#smart_close_popup()."\<C-h>" | |
inoremap <expr><C-y> neocomplete#close_popup() | |
inoremap <expr><C-e> neocomplete#cancel_popup() | |
"Nerdtree | |
nmap <C-u> :NERDTreeToggle<CR> | |
nmap <C-c> :NERDTreeCWD<CR> | |
let NERDTreeIgnore = ['\.pyc$'] | |
highlight ExtraWhitespace ctermbg=darkgreen guibg=lightgreen | |
colorscheme fruity | |
set guifont=Inconsolata\ for\ Powerline:h14 | |
set sw=4 | |
set ts=4 | |
set sts=4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment