|
" Specify a directory for plugins |
|
" - For Neovim: stdpath('data') . '/plugged' |
|
" - Avoid using standard Vim directory names like 'plugin' |
|
" More info: https://github.com/junegunn/vim-plug" |
|
call plug#begin('~/.vim/plugged') |
|
|
|
" Insert plugins here" |
|
Plug 'airblade/vim-gitgutter' |
|
Plug 'editorconfig/editorconfig-vim' |
|
Plug 'itchyny/lightline.vim' |
|
Plug 'junegunn/fzf' |
|
Plug 'junegunn/fzf.vim' |
|
Plug 'mattn/emmet-vim' |
|
Plug 'preservim/nerdtree' |
|
Plug 'preservim/nerdcommenter' |
|
Plug 'terryma/vim-multiple-cursors' |
|
Plug 'tpope/vim-eunuch' |
|
Plug 'tpope/vim-surround' |
|
"Plug 'w0rp/ale' |
|
Plug 'frazrepo/vim-rainbow' |
|
Plug 'sickill/vim-monokai' |
|
Plug 'mileszs/ack.vim' |
|
Plug 'majutsushi/tagbar' |
|
Plug 'tpope/vim-fugitive' |
|
Plug 'scrooloose/syntastic' |
|
Plug 'psf/black', { 'branch': 'stable' } |
|
Plug 'jiangmiao/auto-pairs' |
|
Plug 'vim-scripts/django.vim' |
|
|
|
" Enable if you want autocomple |
|
" It requires to be compile after installing the plugin |
|
" Full instructions here: |
|
" https://github.com/ycm-core/YouCompleteMe/ |
|
Plug 'valloric/youcompleteme' |
|
|
|
" Initialize plugin system |
|
call plug#end() |
|
|
|
" Use silver-searcher (ag) instead of ack |
|
let g:ackprg = 'ag --nogroup --nocolor --column' |
|
|
|
" Syntastic settings |
|
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 |
|
let g:syntastic_check_on_wq = 0 |
|
|
|
" Turn on syntax highlighting. |
|
syntax on |
|
|
|
" Set colorscheme to monokai |
|
colorscheme monokai |
|
|
|
" Enable rainbow brackets |
|
let g:rainbow_active = 1 |
|
|
|
" Black settings (python autoformatter) |
|
autocmd BufWritePre *.py execute ':Black' |
|
|
|
" Toggle to enable past mode (necessary to avoid issues with autoindentation) |
|
set pastetoggle=<F2> |
|
|
|
" Custom key mapping |
|
map <C-p> :Files<CR> |
|
map <C-b> :NERDTreeToggle<CR> |
|
map <C-t> :tabnew<CR> |
|
map <F3> :TagbarToggle<CR> |
|
map <F4> :botright terminal ++rows=15<CR> |
|
map <F6> :Black<CR> |
|
|
|
" Autofocus on tagbar when it gets opened |
|
let g:tagbar_autofocus = 1 |
|
|
|
" Automatically wrap text that extends beyond the screen length. |
|
set wrap |
|
|
|
" Uncomment below to set the max textwidth. Use a value corresponding to the width of your screen. |
|
" set textwidth=79 |
|
set formatoptions=tcqrn1 |
|
set tabstop=2 |
|
set autoindent |
|
set shiftwidth=2 |
|
set softtabstop=2 |
|
set expandtab |
|
set noshiftround |
|
|
|
" Highlight current line |
|
set cursorline |
|
|
|
" Status bar |
|
set laststatus=2 |
|
|
|
" Display options |
|
set showmode |
|
set showcmd |
|
|
|
" Highlight matching pairs of brackets. Use the '%' character to jump between them. |
|
set matchpairs+=<:> |
|
|
|
" Display different types of white spaces. |
|
set list |
|
set listchars=tab:›\ ,trail:•,extends:#,nbsp:. |
|
|
|
" Show line numbers |
|
set number |
|
|
|
" Highlight matching search patterns |
|
set hlsearch |
|
" Enable incremental search |
|
set incsearch |
|
" Include matching uppercase words with lowercase search term |
|
set ignorecase |
|
" Include only uppercase words with uppercase search term |
|
set smartcase |
|
|
|
" Display 5 lines above/below the cursor when scrolling with a mouse. |
|
set scrolloff=5 |
|
" Fixes common backspace problems |
|
set backspace=indent,eol,start |