-
-
Save pamag/5c6dba013a7ae0bb720a540d2c378665 to your computer and use it in GitHub Desktop.
My .vimrc file
This file contains 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
" | |
" Installation: | |
" 1. Set up vundle for vim (https://github.com/VundleVim/Vundle.vim): | |
" $ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim | |
" 2. Download this `.vimrc` file and save it in your home folder. | |
" 3. Launch vim in your console and run :PluginInstall. | |
" | |
set nocompatible | |
syntax on | |
set nowrap | |
set encoding=utf8 | |
"""" START Vundle Configuration | |
" Disable file type for vundle | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" let Vundle manage Vundle, required | |
Plugin 'gmarik/Vundle.vim' | |
" Syntax plugins | |
Plugin 'JulesWang/css.vim' | |
Plugin 'cakebaker/scss-syntax.vim' | |
Plugin 'elzr/vim-json' | |
Plugin 'othree/html5.vim' | |
Plugin 'mustache/vim-mustache-handlebars' | |
Plugin 'pangloss/vim-javascript' | |
Plugin 'mxw/vim-jsx' | |
Plugin 'briancollins/vim-jst' | |
Plugin 'mhinz/vim-grepper' " https://github.com/mhinz/vim-grepper | |
"Plugin 'othree/xml.vim' | |
" Utility plugins | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'vim-syntastic/syntastic' | |
"Plugin 'wfxr/minimap.vim' | |
" Theme plugins | |
" Plugin 'ryanoasis/vim-devicons' | |
Plugin 'vim-airline/vim-airline' | |
Plugin 'vim-airline/vim-airline-themes' | |
"Plugin 'ajh17/Spacegray.vim' | |
"Plugin 'cocopon/iceberg.vim' | |
"Plugin 'colepeters/spacemacs-theme.vim' | |
Plugin 'yuttie/hydrangea-vim' | |
Plugin 'wadackel/vim-dogrun' | |
Plugin 'liuchengxu/space-vim-dark' | |
" Git integration | |
Plugin 'tpope/vim-fugitive' | |
" Plugin 'airblade/vim-gitgutter' | |
Plugin 'Xuyuanp/nerdtree-git-plugin' | |
Plugin 'mhinz/vim-signify' | |
" OSX stupid backspace fix | |
set backspace=indent,eol,start | |
call vundle#end() " required | |
filetype plugin indent on " required | |
"""" END Vundle Configuration | |
""""""""""""""""""""""""""""""""""""" | |
" Configuration Section | |
""""""""""""""""""""""""""""""""""""" | |
" Change shell | |
" https://stackoverflow.com/a/9092644 | |
" For OSX, the --login will search for .bash_profile --> https://stackoverflow.com/a/18773150 | |
set shell=bash\ --login | |
" Clipboard support | |
set clipboard=unnamed | |
" Show linenumbers | |
set number | |
set ruler | |
" Set Proper Tabs | |
set tabstop=4 | |
set shiftwidth=4 | |
set smarttab | |
set expandtab | |
" Always display the status line | |
set laststatus=2 | |
" Quit VIM if NERDTree is the last and only buffer | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif | |
" Theme and Styling | |
set background=dark | |
colorscheme dogrun | |
" colorscheme space-vim-dark | |
" colorscheme iceberg | |
" colorscheme spacegray | |
" Fix termguicolors with tmux https://github.com/vim/vim/issues/3608 | |
" This is only necessary if you use "set termguicolors". | |
if exists('+termguicolors') | |
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum" | |
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum" | |
set termguicolors | |
endif | |
set t_Co=256 | |
" Vim-Airline Configuration | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline_powerline_fonts = 1 | |
let g:airline_theme='hybrid' | |
" Syntax checking | |
let g:syntastic_javascript_checkers = ['eslint'] | |
" Syntax configuration | |
let g:syntastic_always_populate_loc_list = 1 | |
let g:syntastic_loc_list_height = 5 | |
let g:syntastic_auto_loc_list = 0 | |
let g:syntastic_check_on_open = 0 | |
let g:syntastic_check_on_wq = 0 | |
" Disable JSON conceal | |
" (https://github.com/elzr/vim-json?source=cc#specific-customizations) | |
let g:vim_json_syntax_conceal = 0 | |
" Minimap configuration | |
" https://github.com/wfxr/minimap.vim | |
" Remember that you should install the code-minimap utility (https://github.com/wfxr/code-minimap) | |
"let g:minimap_width = 10 | |
"let g:minimap_auto_start = 1 | |
"let g:minimap_auto_start_win_enter = 1 | |
""""""""""""""""""""""""""""""""""""" | |
" Commands to run on save | |
""""""""""""""""""""""""""""""""""""" | |
" Remove trailing spaces on save | |
" https://vim.fandom.com/wiki/Remove_unwanted_spaces | |
autocmd BufWritePre *.py %s/\s\+$//e | |
""""""""""""""""""""""""""""""""""""" | |
" Mappings | |
""""""""""""""""""""""""""""""""""""" | |
nmap <C-n> :NERDTreeToggle<CR> | |
nmap <C-k> :bprevious<CR> | |
nmap <C-l> :bnext<CR> | |
nmap <C-i> :edit!<CR> | |
nmap <C-t> :terminal<CR> | |
nmap <C-x> :NERDTreeClose<CR> :bd<CR> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment