-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_vimrc
107 lines (94 loc) · 2.72 KB
/
dot_vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
let s:vim_home = '$HOME/.vim/'
let plugStatus = 1
let plugFile = expand('~/.vim/autoload/plug.vim')
if !filereadable(plugFile)
echo "Installing vim-plug..."
silent !mkdir -p $HOME/.vim/autoload
silent !mkdir -p $HOME/.vim/plugged
silent !curl -fLo ~/.vim/autoload/plug.vim https://raw.github.com/junegunn/vim-plug/master/plug.vim
let plugStatus = 0
endif
set nocompatible
set mouse=a
call plug#begin('~/.vim/plugged')
let g:plug_threads = 4
let g:plug_timeout = 3600
" Essentials
Plug 'tpope/vim-sensible'
Plug 'kien/ctrlp.vim'
Plug 'ervandew/supertab'
Plug 'Lokaltog/vim-easymotion'
Plug 'vitalk/vim-shebang'
Plug 'bling/vim-airline'
Plug 'airblade/vim-gitgutter'
Plug 'scrooloose/nerdtree'
Plug 'nathanaelkane/vim-indent-guides'
Plug 'godlygeek/tabular'
Plug 'tpope/vim-surround'
Plug 'jiangmiao/auto-pairs'
Plug 'altercation/vim-colors-solarized'
Plug 'morhetz/gruvbox'
Plug 'chriskempson/base16-vim'
" File types
Plug 'kchmck/vim-coffee-script', { 'for': 'coffee' }
Plug 'pangloss/vim-javascript', { 'for': 'javascript' }
Plug 'vim-scripts/groovy.vim', { 'for': 'groovy' }
Plug 'tfnico/vim-gradle', { 'for': 'groovy' }
Plug 'plasticboy/vim-markdown', { 'for': 'markdown' }
Plug 'elzr/vim-json', { 'for': 'json' }
Plug 'ekalinin/Dockerfile.vim', { 'for': 'Dockerfile' }
Plug 'vim-scripts/nginx.vim', { 'for': 'nginx' }
Plug 'vim-ruby/vim-ruby', { 'for': 'ruby' }
" Extras
Plug 'wakatime/vim-wakatime'
call plug#end()
if plugStatus == 0
echo "Installing Bundles"
echo ""
:PlugInstall
endif
syntax on
syntax enable
colorscheme gruvbox
let g:gruvbox_contrast_dark = 'hard'
nnoremap <F2> :set invpaste paste?<CR>
set pastetoggle=<F2>
"set showmode
set number
set laststatus=2
"set encoding=utf-8
set t_Co=256
set nobackup
set noswapfile
set noerrorbells
set history=1000
set background=dark
" ================ Indentation ======================
set autoindent
set smartindent
set smarttab
set shiftwidth=2
set softtabstop=2
set tabstop=2
set expandtab
filetype plugin on
filetype indent on
set list listchars=tab:\ \ ,trail:· " Display tabs and trailing spaces visually
set nowrap "Don't wrap lines
set linebreak "Wrap lines at convenient points
au BufRead,BufNewFile */nginx.conf,/etc/nginx/*,/usr/local/nginx/conf/* if &ft == '' | setfiletype nginx | endif
" Enable the list of buffers
"let g:airline#extensions#tabline#enabled = 1
" Show just the filename
"let g:airline#extensions#tabline#fnamemod = ':t'
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
"let g:airline_theme = 'simple'
let g:airline_extensions = [ ]
"let g:airline_powerline_fonts = 0
let g:airline_left_sep = ""
let g:airline_right_sep = ""
let g:airline_left_alt_sep = ""
let g:airline_right_alt_sep = ""
" sudo trick
cmap w!! w !sudo tee % >/dev/null