-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.vim
170 lines (144 loc) · 5.81 KB
/
init.vim
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
" An example for a init.vim file.
"
" Maintainer: pupperemeritus
" Last change: 2022 Jan 16
"
" To use it, copy it to
" for Unix: ~/.vimrc
" for Amiga: s:.vimrc
" for MS-Windows: $VIM\_vimrc
" for Haiku: ~/config/settings/vim/vimrc
" for OpenVMS: sys$login:.vimrc
" When started as "evim", evim.vim will already have done these settings, bail
" out.
if v:progname =~? "evim"
finish
endif
" Get the defaults that most users want.
if has("vms")
set nobackup " do not keep a backup file, use versions instead
else
set backup " keep a backup file (restore to previous version)
if has('persistent_undo')
set undofile " keep an undo file (undo changes after closing)
endif
endif
if &t_Co > 2 || has("gui_running")
" Switch on highlighting the last used search pattern.
set hlsearch
endif
" Put these in an autocmd group, so that we can delete them easily.
augroup vimrcEx
au!
" For all text files set 'textwidth' to 78 characters.
autocmd FileType text setlocal textwidth=78
augroup END
" Add optional packages.
"
" The matchit plugin makes the % command work better, but it is not backwards
" compatible.
" The ! means the package won't be loaded right away but when plugins are
" loaded during initialization.
if has('syntax') && has('eval')
packadd! matchit
endif
set number
filetype plugin on
syntax on
set hidden " Required to keep multiple buffers open multiple buffers
set nowrap " Display long lines as just one line
set encoding=utf-8 " The encoding displayed
set pumheight=10 " Makes popup menu smaller
set fileencoding=utf-8 " The encoding written to file
set ruler " Show the cursor position all the time
set cmdheight=2 " More space for displaying messages
set iskeyword+=- " treat dash separated words as a word text object"
set mouse=a " Enable your mouse
set splitbelow " Horizontal splits will automatically be below
set splitright " Vertical splits will automatically be to the right
set t_Co=256 " Support 256 colors
set conceallevel=0 " So that I can see `` in markdown files
set tabstop=4 " Insert 2 spaces for a tab
set shiftwidth=4 " Change the number of space characters inserted for indentation
set smarttab " Makes tabbing smarter will realize you have 2 vs 4
set expandtab " Converts tabs to spaces
set smartindent " Makes indenting smart
set autoindent " Good auto indent
set laststatus=0 " Always display the status line
set number " Line numbers
set cursorline " Enable highlighting of the current line
set showtabline=2 " Always show tabs
set noshowmode " We don't need to see things like -- INSERT -- anymore
set nobackup " This is recommended by coc
set nowritebackup " This is recommended by coc
set updatetime=50 " Faster completion
set timeoutlen=500 " By default timeoutlen is 1000 ms
set formatoptions=cro " Stop newline continution of comments
set clipboard=unnamedplus " Copy paste between vim and everything else
set autochdir
set nocompatible
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | source $MYVIMRC
\| endif
call plug#begin('~/.vim/plugged')
Plug 'preservim/nerdtree'
Plug 'mhinz/vim-startify'
Plug 'vim-airline/vim-airline'
Plug 'joshdick/onedark.vim'
Plug 'vim-airline/vim-airline-themes'
Plug 'tek256/simple-dark'
Plug 'chriskempson/base16-vim'
Plug 'godlygeek/tabular'
Plug 'plasticboy/vim-markdown'
Plug 'farmergreg/vim-lastplace'
Plug 'Raimondi/delimitMate'
Plug 'rust-lang/rust.vim'
Plug 'djoshea/vim-autoread'
Plug 'tpope/vim-fugitive'
Plug 'xavierd/clang_complete'
Plug 'sheerun/vim-polyglot'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'tpope/vim-commentary'
Plug 'danilo-augusto/vim-afterglow'
Plug 'tyrannicaltoucan/vim-deep-space'
Plug 'psliwka/vim-smoothie'
Plug 'bronson/vim-trailing-whitespace'
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}
Plug 'junegunn/goyo.vim'
Plug 'junegunn/limelight.vim'
Plug 'tc50cal/vim-terminal'
Plug 'ryanoasis/vim-devicons'
Plug 'bagrat/vim-buffet'
Plug 'preservim/tagbar'
Plug 'lilydjwg/colorizer'
Plug 'jtratner/vim-flavored-markdown'
call plug#end()
set termguicolors
set background=dark
colorscheme deep-space
let g:lightline = {
\ 'colorscheme': 'deep_space',
\ }
let g:airline_theme='deep_space'
nnoremap <F12> :NERDTreeToggle<CR>
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
map <F9> :Goyo <bar> <CR>
map <F8> :Limelight! <bar> <CR>
map <F7> :Limelight <bar> <CR>
map <F10> :Terminal bash <CR>
map <F11> :TagbarToggle <CR>
map <F12> :MarkdownPreviewToggle <CR>
let vim_markdown_preview_github=1
" sets foreground color (ANSI, true-color mode)
let &t_8f = "\e[38;2;%lu;%lu;%lum"
" sets background color (ANSI, true-color mode)
let &t_8b = "\e[48;2;%lu;%lu;%lum"
set termguicolors
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
" Coc extensions - coc-prettier,coc-pyright,coc-pydocstring,coc-tabnine
command! -nargs=0 Prettier :CocCommand prettier.formatFile