-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
90 lines (72 loc) · 3.09 KB
/
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
call plug#begin('~/.vim/plugged')
Plug 'fatih/vim-go'
Plug 'Raimondi/delimitMate'
Plug 'itchyny/lightline.vim'
Plug 'tomasr/molokai'
Plug 'altercation/vim-colors-solarized'
Plug 'tpope/vim-fugitive'
Plug 'mhinz/vim-signify'
Plug 'unblevable/quick-scope'
Plug 'Shougo/neocomplete.vim'
" filetype plugins
Plug 'elzr/vim-json', {'for' : 'json'}
Plug 'ekalinin/Dockerfile.vim', {'for' : 'Dockerfile'}
Plug 'fatih/vim-nginx' , {'for' : 'nginx'}
Plug 'corylanou/vim-present', {'for' : 'present'}
call plug#end()
"=====================================================
"===================== SETTINGS ======================
" These needs to enabled so we can make Vim usable again
set nocompatible
filetype off
filetype plugin indent on
set ttyfast
set ttymouse=xterm2
set ttyscroll=3
set laststatus=2
set encoding=utf-8 " Set default encoding to UTF-8
set autoread " Automatically reread changed files without asking me anything
set autoindent
set backspace=indent,eol,start " Makes backspace key more powerful.
set incsearch " Shows the match while typing
set hlsearch " Highlight found searches
set mouse=a
set noerrorbells " No beeps
set number " Show line numbers
set showcmd " Show me what I'm typing
set noswapfile " Don't use swapfile
set nobackup " Don't create annoying backup files
set splitright " Split vertical windows right to the current windows
set splitbelow " Split horizontal windows below to the current windows
set autowrite " Automatically save before :next, :make etc.
set hidden
set fileformats=unix,dos,mac " Prefer Unix over Windows over OS 9 formats
set noshowmatch " Do not show matching brackets by flickering
set noshowmode " We show the mode with airline or lightline
set ignorecase " Search case insensitive...
set smartcase " ... but not it begins with upper case
set completeopt=menu,menuone
set nocursorcolumn " speed up syntax highlighting
set nocursorline
set pumheight=10 " Completion window max size
set lazyredraw " Wait to redraw
" Trigger a highlight in the appropriate direction when pressing these keys:
let g:qs_highlight_on_keys = ['f', 'F', 't', 'T']
" Colorscheme settings
let g:solarized_termcolors=256
let g:rehash256 = 1
syntax enable
set background=dark
colorscheme solarized "molokai
" open help vertically
command! -nargs=* -complete=help Help vertical belowright help <args>
autocmd FileType help wincmd L
autocmd BufNewFile,BufRead *.go setlocal noexpandtab tabstop=4 shiftwidth=4
autocmd BufNewFile,BufRead *.txt setlocal noet ts=4 sw=4
autocmd BufNewFile,BufRead *.md setlocal noet ts=4 sw=4
autocmd BufNewFile,BufRead *.vim setlocal expandtab shiftwidth=2 tabstop=2
autocmd FileType json setlocal expandtab shiftwidth=2 tabstop=2
augroup filetypedetect
autocmd BufNewFile,BufRead .tmux.conf*,tmux.conf* setf tmux
autocmd BufNewFile,BufRead .nginx.conf*,nginx.conf* setf nginx
augroup END