|
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 'VundleVim/Vundle.vim' |
|
" Git inside vim |
|
Plugin 'tpope/vim-fugitive' |
|
" Nerd Tree for checking files while in vim |
|
Plugin 'scrooloose/nerdtree' |
|
Plugin 'scrooloose/nerdcommenter' |
|
" Solarize color theme |
|
Plugin 'altercation/vim-colors-solarized' |
|
" Text surrounding |
|
Plugin 'tpope/vim-surround' |
|
" Allow to repeat using . the commands from surround |
|
Plugin 'tpope/vim-repeat' |
|
" Power Line fontsfor vim airline bar proper display |
|
Plugin 'powerline/fonts' |
|
" File finder plugin |
|
Plugin 'kien/ctrlp.vim' |
|
" Python Autocomplete plugin |
|
Plugin 'Valloric/YouCompleteMe' |
|
" Syntax highlighting |
|
Plugin 'scrooloose/syntastic' |
|
" Python PEP8 |
|
Plugin 'nvie/vim-flake8' |
|
" Status Bar |
|
Plugin 'vim-airline/vim-airline' |
|
Plugin 'vim-airline/vim-airline-themes' |
|
" JSX syntax highlighting |
|
Plugin 'mxw/vim-jsx' |
|
" Proper Highlight Json files |
|
Plugin 'elzr/vim-json' |
|
" Closing tags on files |
|
Plugin 'alvan/vim-closetag' |
|
" Indentation lines for code guidance |
|
Plugin 'Yggdroot/indentLine' |
|
" Match tags |
|
Plugin 'gregsexton/MatchTag' |
|
" Quikly switch between buffers |
|
Plugin 'sjbach/lusty' |
|
|
|
call vundle#end() " required |
|
filetype plugin indent on " required |
|
" To ignore plugin indent changes, instead use: |
|
"filetype plugin on |
|
" |
|
" Brief help |
|
" :PluginList - lists configured plugins |
|
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate |
|
" :PluginSearch foo - searches for foo; append `!` to refresh local cache |
|
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal |
|
" |
|
" see :h vundle for more details or wiki for FAQ |
|
" Put your non-Plugin stuff after this line |
|
|
|
" Leade mapping char |
|
let mapleader = "," |
|
|
|
" Set UTF-8 encoding |
|
set encoding=utf-8 |
|
|
|
" Enable airline bar |
|
set laststatus=2 |
|
let g:airline_powerline_fonts = 1 |
|
if !exists('g:airline_symbols') |
|
let g:airline_symbols = {} |
|
endif |
|
let g:airline_theme='solarized' |
|
" Airline bar configuration |
|
" Enable the list of buffers |
|
let g:airline#extensions#tabline#enabled = 1 |
|
" Show just the filename |
|
let g:airline#extensions#tabline#fnamemod = ':t' |
|
|
|
" Vim styling |
|
set number |
|
syntax enable |
|
set autochdir |
|
set background=dark |
|
set t_Co=256 |
|
let g:solarized_termcolors=256 |
|
colorscheme solarized |
|
|
|
" Ignore files on MacOSx/Linux |
|
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.pyc,*/ven* |
|
set hlsearch |
|
set incsearch |
|
" This allows buffers to be hidden if you've modified a buffer. |
|
" This is almost a must if you wish to use buffers in this way. |
|
set hidden |
|
|
|
" NERDTree shortcut |
|
nmap <leader>m :NERDTreeToggle<cr> |
|
let NERDTreeIgnore=['\.pyc$', '\~$'] "ignore files in NERDTree |
|
|
|
" CtrlP shortcut |
|
nmap <leader>p :CtrlP<cr> |
|
let g:ctrlp_working_path_mode = 'r' |
|
|
|
" More natural mapping when jumping between vim screen splits |
|
nnoremap <C-J> <C-W><C-J> |
|
nnoremap <C-K> <C-W><C-K> |
|
nnoremap <C-L> <C-W><C-L> |
|
nnoremap <C-H> <C-W><C-H> |
|
|
|
" Tabing code short cuts |
|
vnoremap < <gv |
|
vnoremap > >gv |
|
vmap <Tab> > |
|
vmap <S-Tab> < |
|
|
|
set wildmenu " turn on tab completion for commands |
|
set wildmode=list:longest,list:full |
|
|
|
" python PEP8 indentation |
|
au BufRead,BufNewFile *.py,*.pyw set expandtab |
|
au BufRead,BufNewFile *.py,*.pyw set textwidth=139 |
|
au BufRead,BufNewFile *.py,*.pyw set tabstop=4 |
|
au BufRead,BufNewFile *.py,*.pyw set softtabstop=4 |
|
au BufNewFile *.py,*.pyw set fileformat=unix |
|
au BufRead,BufNewFile *.py,*.pyw set shiftwidth=4 |
|
au BufRead,BufNewFile *.py,*.pyw set autoindent |
|
|
|
" Auto complete settings |
|
let g:ycm_autoclose_preview_window_after_completion=1 |
|
map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR> "Go to the definition of whatever I am currently on |
|
|
|
" JS HTML & CSS 2 tab indentation |
|
au BufNewFile,BufRead *.js,*.html,*.css set softtabstop=2 |
|
au BufNewFile,BufRead *.js,*.html,*.css set softtabstop=2 |
|
au BufNewFile,BufRead *.js,*.html,*.css set shiftwidth=2 |
|
|
|
" Syntastic configuration |
|
set statusline+=%#warningmsg# |
|
set statusline+=%{SyntasticStatuslineFlag()} |
|
set statusline+=%* |
|
let g:syntastic_always_populate_loc_list = 1 |
|
"let g:syntastic_auto_loc_list = 1 |
|
let g:syntastic_check_on_open = 1 "Errors window auto open |
|
let g:syntastic_check_on_wq = 0 |
|
let g:syntastic_python_checkers = ['flake8'] "Python linter used |
|
let g:syntastic_javascript_checkers = ['eslint'] " Requires global installaiton of eslint |
|
let g:jsx_ext_required = 0 " Allow JSX in normal JS files |
|
|
|
" Proper linting for json |
|
au BufRead,BufNewFile *.json set filetype=json |
|
let g:syntastic_json_checkers=['jsonlint'] |
|
|
|
" CLose tags on the specified file types |
|
let g:closetag_filenames = "*.html,*.xhtml,*.phtml,*.js,*.jsx" |
|
|
|
" Disable arrows |
|
noremap <Up> <NOP> |
|
noremap <Down> <NOP> |
|
noremap <Left> <NOP> |
|
noremap <Right> <NOP> |