-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_vimrc
134 lines (100 loc) · 3.31 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
set nocompatible " get rid of Vi compatibility mode. SET FIRST!
" vim-plug
" https://github.com/junegunn/vim-plug
"
" Install:
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-unimpaired'
Plug 'flazz/vim-colorschemes'
Plug 'gruvbox-community/gruvbox'
" Linting
Plug 'dense-analysis/ale'
"Requires +conceal.
"macOS: `sudo port install vim +huge` and reload via `source ~/.bash_profile`
Plug 'Yggdroot/indentLine'
Plug 'vim-airline/vim-airline' | Plug 'vim-airline/vim-airline-themes'
Plug 'mhinz/vim-signify'
Plug 'ap/vim-css-color'
Plug 'ryanoasis/vim-devicons'
Plug 'sheerun/vim-polyglot'
" Javascript syntax highlighting
Plug 'pangloss/vim-javascript'
" Typescript syntax highlighting
Plug 'leafgarland/typescript-vim'
" Plug 'leafOfTree/vim-vue-plugin'
" Vue.js syntax highlighting
Plug 'posva/vim-vue'
" Web development auto-completion
Plug 'mattn/emmet-vim'
" Fuzzy finding and buffer management
Plug 'Shougo/denite.nvim'
" Intellisense code engine, auto-completion, linting, code fixing
Plug 'neoclide/coc.nvim', {'do': { -> coc#util#install() }}
" CocInstall coc-tsserver coc-eslint coc-json coc-prettier coc-css coc-vetur
" Add plugins to &runtimepath
call plug#end()
runtime! plugin/sensible.vim
map <Space> <Leader>
set showcmd
set encoding=utf-8
set hidden
" Buffer for cursor when using j/k
set so=7
set shiftwidth=2
set tabstop=2 " number of visual spaces per TAB
set softtabstop=2 " number of spaces in tab when editing
set expandtab " tabs are spaces
set list
"set listchars=nbsp:¬,eol:¶,tab:>-,extends:»,precedes:«,trail:•
set listchars=nbsp:¬,tab:>-,extends:»,precedes:«,trail:•
set cursorline " highlight current line
set lazyredraw " redraw only when we need to.
set showmatch " highlight matching [{()}]
set number
set relativenumber
set t_Co=256 " enable 256-color mode.
let g:gruvbox_contrast_dark = 'hard'
let g:gruvbox_invert_selection='0'
colorscheme gruvbox
set background=dark
" Highlight characters that go over 80 columns (by drawing a border on the 81st)
if exists('+colorcolumn')
set colorcolumn=101
highlight ColorColumn ctermbg=darkgray
else
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%101v.\+/
endif
set incsearch " search as characters are entered
set hlsearch " highlight matches
set ignorecase " Make searches case-insensitive.
set smartcase " Make searches case-sensitive upon the first capital letter
set shiftround " always indent/outdent to the nearest tabstop
if has('mac')
set guifont=DroidSansMono_Nerd_Font:h11
else " linux, bsd, etc
set guifont=DroidSansMono\ Nerd\ Font\ 11
endif
let g:vim_json_syntax_conceal = 0
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
function! ToggleClean()
if &number == 0
set number
set relativenumber
IndentLinesEnable
SignifyEnable
else
set nonumber
set norelativenumber
IndentLinesDisable
SignifyDisable
endif
endfunction
nnoremap <Leader>clip :tab sb +call\ ToggleClean()<CR>
nnoremap <Leader>clipq :tabclose<CR>
map <F3> :call ToggleClean()<CR>
set pastetoggle=<F2>