-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
103 lines (87 loc) · 2.65 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
91
92
93
94
95
96
97
98
99
100
101
102
set nocompatible
set autoindent " always set autoindenting on
set colorcolumn=+1
set copyindent " copy the previous indentation on autoindenting
set encoding=utf-8
set expandtab
set history=1000
set hlsearch " highlight search terms
set ignorecase " ignore case when searching
set incsearch " show search matches as you type
set mouse-=a
set mouse=""
set nobackup
set nobackup
set nowrap
set number " always show line numbers
set shiftround " use multiple of shiftwidth when indenting with '<' and '>'
set shiftwidth=2
set showmatch " set show matching parenthesis
set smartcase " ignore case if search pattern is all lowercase case-sensitive otherwise
set tabstop=2
set textwidth=150
set undolevels=1000
set visualbell
set wildmenu
set wildmode=list:longest
set cursorline cursorcolumn
set laststatus=2
filetype plugin indent on
syntax on
let mapleader=","
source ~/.vim/abbreviations.vim
source ~/.vim/remaps.vim
source ~/.vim/trbjs.vim
""" Theme
syntax enable
set background=dark
colorscheme solarized
colors dogrun
highlight Normal ctermbg=0
highlight ColorColumn ctermbg=5
highlight LineNr ctermfg=5
highlight CursorLine ctermfg=11
""" airline
let g:airline_section_b='%4*\ %<%F%*' "full pathk
let g:airline_detect_whitespace=1
let g:airline_theme='solarized'
let g:airline_powerline_fonts = 1
""" COC
let g:coc_global_extensions = ['coc-tsserver']
""" ALE
let g:ale_open_list = 0
let g:ale_keep_list_window_open = 0
let g:ale_fix_on_save = 0
let g:ale_lint_on_text_changed = 'never'
let g:ale_list_window_size = 0
let g:ale_lint_delay = 1000
let g:ale_set_quickfix = 0
let g:ale_set_loclist = 0
let g:ale_linters = {
\ 'javascript': ['eslint', 'prettier'],
\ 'typescript': ['eslint', 'prettier'],
\ 'less': ['stylelint'],
\ 'css': ['stylelint'],
\ 'yaml': ['yamllint'],
\}
let g:ale_fixers = {
\ 'javascript': ['eslint', 'prettier'],
\ 'typescript': ['eslint', 'prettier'],
\ 'css': ['stylelint'],
\}
let g:ale_fix_on_save = 1
let g:ale_javascript_eslint_executable = '/usr/local/bin/eslint'
""" FZF
let g:fzf_layout = { 'down': '~20%' }
let g:fzf_action = {
\ 'ctrl-t': 'tab split',
\ 'ctrl-x': 'split',
\ 'ctrl-v': 'vsplit' }
"This expression seems to be responsible for coc formatting on enter
inoremap <silent><expr> <cr> "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
"I this just says autocomplete with the first option if pop up menu is open.
"If it is not open, just do a regular tab.
inoremap <silent><expr> <tab> pumvisible() ? coc#select_confirm() : "\<C-g>u\<tab>"
inoremap <silent><expr> <tab> coc#pum#visible() ? coc#pum#confirm() : "\<tab>"
""" Load Plugins
packloadall