Last active
November 22, 2016 04:51
-
-
Save dnavas77/275d451d22e9fe064762b6e1506d8c74 to your computer and use it in GitHub Desktop.
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
"------------- Vundle and Plugins ------------ | |
set nocompatible | |
filetype off | |
syntax off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'tpope/vim-surround' | |
Plugin 'gregsexton/Matchtag' | |
Plugin 'tpope/vim-commentary' | |
Plugin 'itchyny/lightline.vim' | |
Plugin 'leafgarland/typescript-vim' | |
Plugin 'raimondi/delimitmate' | |
Plugin 'flazz/vim-colorschemes' | |
Plugin 'rking/ag.vim' | |
Plugin 'fatih/vim-go' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'mattn/emmet-vim' | |
Plugin 'vim-scripts/indentpython.vim' | |
"Plugin 'Yggdroot/indentLine' | |
Plugin 'kkoenig/wimproved.vim' | |
Plugin 'tmhedberg/SimpylFold' | |
Plugin 'scrooloose/syntastic' | |
" Plugin 'herrbischoff/cobalt2.vim' | |
Plugin 'ElmCast/elm-vim' | |
Plugin 'mxw/vim-jsx' | |
Plugin 'pangloss/vim-javascript' | |
Plugin 'chriskempson/base16-vim' | |
Plugin 'mustache/vim-mustache-handlebars' | |
Plugin 'elixir-lang/vim-elixir' | |
Bundle 'Lokaltog/powerline', {'rtp':'powerline/bindings/vim/'} | |
call vundle#end() | |
filetype plugin indent on | |
let python_highlight_all=1 | |
syntax on | |
" Set Vim Settings | |
let mapleader = ";" | |
set t_Co=256 | |
set backspace=indent,eol,start | |
set shortmess=atI "don't show message at startup | |
set title "show filename in widow titlebar | |
set clipboard+=unnamed "allow copy from vim and paste into system | |
set autoindent | |
set smartindent | |
set lazyredraw | |
set nobackup | |
set nowb | |
set history=10000 | |
set noswapfile | |
set laststatus=2 | |
set noshowmode | |
set smarttab | |
set linebreak | |
set cindent | |
set showmatch | |
set mat=2 | |
set cc=100 | |
set tabstop=2 | |
set shiftwidth=2 | |
set softtabstop=2 | |
set expandtab | |
set nowrap | |
set ignorecase | |
set smartcase | |
set hlsearch | |
set wildmenu | |
set modifiable | |
set encoding=utf-8 | |
"set number | |
set belloff=all | |
"set cursorline | |
set linespace=2 | |
"set relativenumber | |
"set cursorcolumn | |
let g:Powerline_symbols="fancy" | |
set fillchars+=stl:\ ,stlnc:\ | |
set timeoutlen=500 ttimeoutlen=500 | |
" YouCompleteMe settings | |
let g:ycm_error_symbol = '>' | |
let g:ycm_filepath_completion_use_working_dir = 0 | |
let g:ycm_warning_symbol = '>' | |
let g:ycm_autoclose_preview_window_after_completion=1 | |
map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR> | |
" Open Nerdtree with Ctrl + n | |
map <C-n> :NERDTreeToggle<CR> | |
let g:lightline = { | |
\ 'colorscheme': 'wombat', | |
\ } | |
" Enable folding | |
set foldmethod=indent | |
set foldlevel=99 | |
let g:SimpylFold_docstring_preview=1 | |
" Wimproved Aplha | |
autocmd GUIEnter * silent! WToggleClean | |
autocmd GUIEnter * silent! WSetAlpha 240 | |
"python with virtualenv support | |
py << EOF | |
import os | |
import sys | |
if 'VIRTUAL_ENV' in os.environ: | |
project_base_dir = os.environ['VIRTUAL_ENV'] | |
activate_this = os.path.join(project_base_dir, 'bin/activate_this.py') | |
execfile(activate_this, dict(__file__=activate_this)) | |
EOF | |
au BufNewFile,BufRead *.py,*.go,*.elm | |
\ set tabstop=4 | | |
\ set softtabstop=4 | | |
\ set shiftwidth=4 | | |
\ set textwidth=100 | | |
\ set expandtab | | |
\ set autoindent | | |
\ set fileformat=unix | |
au BufNewFile,BufRead *.js,*.html,*.css,*.hbs | |
\ set tabstop=2 | | |
\ set softtabstop=2 | | |
\ set shiftwidth=2 | | |
\ set textwidth=100 | | |
\ set expandtab | | |
\ set autoindent | | |
\ set fileformat=unix | |
" JSX and Babel Stuff | |
let g:jsx_ext_required = 0 " Allow JSX in normal JS files | |
" Enable Vim Tag Matching | |
runtime macros/matchit.vim | |
" Silver Searcher | |
let g:ag_working_path_mode = "r" | |
" SYNTASTIC | |
set statusline+=%#warningmsg# | |
set statusline+=%{SyntasticStatuslineFlag()} | |
set statusline+=%* | |
let g:syntastic_always_populate_loc_list = 1 | |
let g:syntastic_auto_loc_list = 0 | |
let g:syntastic_check_on_open = 0 | |
let g:syntastic_enable_signs = 1 | |
let g:syntastic_check_on_wq = 1 | |
let g:syntastic_auto_jump = 0 | |
let g:syntastic_mode_map = { | |
\ "mode": "active", | |
\ "active_filetypes": ['javascript', 'python'], | |
\ "passive_filetypes": ['html', 'hbs'] | |
\ } | |
let g:syntastic_stl_format = '[%E{%e Errors}%B{, }%W{%w Warnings}]' " syntastic status line format | |
let g:syntastic_error_symbol = '✗' | |
let g:syntastic_style_error_symbol = '⚡' | |
let g:syntastic_warning_symbol = '⚠' | |
let g:syntastic_style_warning_symbol = '!' | |
let g:syntastic_javascript_checkers = ['eslint', 'jshint'] | |
" cd sets path to the path of the file in the current buffer. | |
nnoremap cd :cd %:p:h | |
" Open the NERDTree on the path of the file in the current buffer. | |
set autochdir | |
let NERDTreeChDirMode=2 | |
let NERDTreeShowHidden=1 | |
nnoremap t :NERDTree %:p:h | |
" Control P Settings | |
set runtimepath^=~/.vim/bundle/ctrlp.vim | |
let g:ctrlp_working_path_mode = 'r' | |
set wildignore+=*\\tmp\\*,*.swp,*.zip,*.exe " Windows | |
set wildignore+=**/node_modules " ignores node_modules | |
set wildignore+=**/bower_components " ignores bower_components | |
set wildignore+=**/tmp "ignores tmp created by Ember | |
set wildignore+=**/dist "ignores dist created by Ember | |
" Elm | |
let g:elm_syntastic_show_warnings = 1 | |
let g:elm_format_autosave = 1 | |
" DANI's SHORTCUTS / KEYBINDINGS | |
nnoremap <leader>rv :source $MYVIMRC<CR> | |
nnoremap <leader>av :tabnew $MYVIMRC<CR> | |
nnoremap <leader>a :bprevious<CR> | |
nnoremap <leader>d :bnext<CR> | |
nnoremap <leader>t :tabnew<CR> | |
nnoremap <leader>w :bw<CR> | |
nnoremap <leader>q :q<CR> | |
nnoremap <leader>h :sp<CR> | |
nnoremap <leader>v :vsp<CR> | |
nnoremap <S-n> :tabprevious<CR> | |
nnoremap <S-m> :tabnext<CR> | |
nnoremap <space><space> :w<CR> | |
nnoremap <space> :set hlsearch! hlsearch?<CR> | |
" Maps Shift + [h,j,k,l] to resize splits | |
map <silent> <S-H> <C-w>< | |
map <silent> <S-J> <C-W>+ | |
map <silent> <S-K> <C-W>- | |
map <silent> <S-L> <C-w>> | |
" Switch between opened buffers splits by holding Ctrl and using HJKL | |
nnoremap <C-J> <C-W>j | |
nnoremap <C-K> <C-W>k | |
nnoremap <C-L> <C-W>l | |
nnoremap <C-H> <C-W>h | |
inoremap lk <Esc> | |
vnoremap lk <Esc> | |
cnoremap lk <Esc> | |
" Better indentation | |
vnoremap < <gv | |
vnoremap > >gv | |
" Set theme | |
set background=dark | |
if has('gui_running') | |
let g:solarized_termtrans=0 | |
" set guifont=Dejavu\ Sans\ Mono\ for\ Powerline:h10 | |
" set guifont=Hack:h10 | |
set guifont=Powerline\ Consolas:h10.2 | |
set guioptions-=L | |
set guioptions-=T | |
set guioptions-=r | |
set guioptions-=m | |
else | |
let g:solarized_termtrans=1 | |
endif | |
let g:solarized_termcolors=16 | |
let g:solarized_visibility="normal" | |
let g:solarized_contrast="normal" | |
let g:hybrid_custom_term_colors = 1 | |
let g:hybrid_reduced_contrast = 1 " Remove this line if using the default palette. | |
let g:gruvbox_contrast_dark='soft' | |
colo materialbox |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment