Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " vim-plug (https://github.com/junegunn/vim-plug)
- " Automatically install vim-plug and run PlugInstall if vim-plug not found
- if empty(glob('~/.vim/autoload/plug.vim'))
- silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
- https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
- autocmd VimEnter * PlugInstall | source $MYVIMRC
- endif
- "*****************************************************************************
- "" Plug install packages
- "*****************************************************************************
- " Specify a directory for plugins
- call plug#begin('~/.vim/plugged')
- Plug 'tyrannicaltoucan/vim-quantum' " let g:quantum_black = 1
- Plug 'ctrlpvim/ctrlp.vim'
- Plug 'scrooloose/nerdtree'
- Plug 'Xuyuanp/nerdtree-git-plugin'
- Plug 'airblade/vim-gitgutter'
- Plug 'bronson/vim-trailing-whitespace'
- Plug 'editorconfig/editorconfig-vim'
- Plug 'Raimondi/delimitMate'
- Plug 'scrooloose/syntastic'
- Plug 'Yggdroot/indentLine'
- Plug 'tpope/vim-commentary'
- Plug 'sheerun/vim-polyglot'
- Plug 'valloric/matchtagalways' " doesn't work properly in neovim, cursor jumps about
- Plug 'ap/vim-buftabline'
- Plug 'ConradIrwin/vim-bracketed-paste'
- " Initialize plugin system
- call plug#end()
- "*****************************************************************************
- "" Visual Settings
- "*****************************************************************************
- set number
- set ruler
- set nowrap
- if $TERM_PROGRAM =~ "iTerm"
- set termguicolors
- endif
- let &t_8f = "<Esc>[38;2;%lu;%lu;%lum"
- let &t_8b = "<Esc>[48;2;%lu;%lu;%lum"
- let g:quantum_black = 1
- colorscheme quantum
- "*****************************************************************************
- "" NERDTree config
- "*****************************************************************************
- let NERDTreeShowHidden = 1
- let NERDTreeIgnore=['.git$[[dir]]', '.swp']
- map <C-n> :NERDTreeToggle<CR>
- "*****************************************************************************
- "" Optimizations
- "*****************************************************************************
- set lazyredraw
- let g:python_host_skip_check = 1
- let g:python3_host_skip_check = 1
- "*****************************************************************************
- "" syntastic
- "*****************************************************************************
- 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
- "*****************************************************************************
- "" yank and cut to osx clipboard
- "*****************************************************************************
- noremap YY "+y<CR>
- noremap XX "+x<CR>
- "*****************************************************************************
- "" indent
- "*****************************************************************************
- " tabs
- set listchars=tab:˗ ,eol:¬
- set list
- " spaces
- let g:indentLine_enabled = 1
- let g:indentLine_concealcursor = 0
- let g:indentLine_char = '·'
- let g:indentLine_faster = 1
- set tabstop=2
- set softtabstop=2
- set shiftwidth=2
- set ai
- filetype plugin indent on
- " make < > indents keep selection
- vnoremap < <gv
- vnoremap > >gv
- "*****************************************************************************
- "" matchtagalways
- "*****************************************************************************
- let g:mta_filetypes = { 'html' : 1, 'xhtml' : 1, 'xml' : 1, 'jinja' : 1, 'php': 1 }
- "*****************************************************************************
- "" ctrlp
- "*****************************************************************************
- set wildignore+=*.o,*.obj,.git,*.rbc,*.pyc,__pycache__
- let g:ctrlp_custom_ignore = 'v[/](node_modules|target|dist)|(.(swp|tox|ico|git|hg|svn))$'
- "*****************************************************************************
- "" buffers
- "*****************************************************************************
- noremap <Tab> :bnext<CR>
- noremap <S-Tab> :bprevious<CR>
- noremap <C-w> :bd<CR>
- "*****************************************************************************
- "" general
- "*****************************************************************************
- set autoread
- set backspace=indent,eol,start
- " :h last-position-jump
- au BufReadPost * if line("'"") > 1 && line("'"") <= line("$") | exe "normal! g`"" | endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement