-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
172 lines (141 loc) · 4.48 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
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
171
172
" this file is no longer actively maintained by sponege!
" I use neovim now and it works great :)
set nocompatible
filetype off
set number
packloadall
call plug#begin()
" For Github, just author/repo
Plug 'neoclide/coc.nvim', {'branch': 'release'}
let g:coc_global_extensions = ['coc-prettier', 'coc-tsserver', 'coc-html', 'coc-css', 'coc-python', 'coc-pairs']
" Prettify files on save
let g:coc_user_config = {
\ 'coc.preferences': {
\ 'formatOnSaveFiletypes': ['*']
\ }
\ }
" File Tree
Plug 'preservim/nerdtree'
" Sexy Bottom Bar
Plug 'itchyny/lightline.vim'
" Rainbow-colored Parenthesis
Plug 'kien/rainbow_parentheses.vim'
" Sublime Text Theme
" Plug 'ErichDonGubler/vim-sublime-monokai'
" LennyPhoenix's Theme
Plug 'LennyPhoenix/sweet_dracula_vim', {'as': 'dracula-theme'}
hi! link VertSplit DraculaCyan
" Formatting
Plug 'pangloss/vim-javascript'
" Discord Rich Presence
Plug 'vimsence/vimsence'
let g:vimsence_client_id = '439476230543245312'
let g:vimsence_small_text = 'NeoVim'
let g:vimsence_small_image = 'neovim'
let g:vimsence_editing_details = 'Editing: {}'
let g:vimsence_editing_state = 'Working on: {}'
let g:vimsence_file_explorer_text = 'In NERDTree'
let g:vimsence_file_explorer_details = 'Looking for files'
" let g:vimsence_custom_icons = {'filetype': 'iconname'}
" Prettify Code
" post install (yarn install | npm install) then load plugin only for editing supported files
Plug 'prettier/vim-prettier', {
\ 'do': 'npm install --frozen-lockfile --production',
\ 'for': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'graphql', 'markdown', 'vue', 'svelte', 'yaml', 'html'] }
" Plug 'neoclide/coc.nvim'
" Plug 'ayu-theme/ayu-vim'
" Plug 'dense-analysis/ale'
Plug 'editorconfig/editorconfig-vim'
call plug#end()
" sponeges script to install coc extensions: turned out to be unneccesary :/
" function! ExtensionInstall()
" for extension in g:coc_global_extensions
" echo extension
" endfor
" endfunction
" command ExtensionInstall :call ExtensionInstall()
filetype plugin indent on
" Enable Themeing
syntax on
" colorscheme sublimemonokai
" syntax enable
" set termguicolors
" let ayucolor="dark" " mirage looks cool too
" colorscheme ayu
" set number
command! -nargs=0 Prettier :CocCommand prettier.formatFile
" Lightline setup
set laststatus=2
set noshowmode
let g:lightline = {
\ 'colorscheme': 'wombat'
\ }
" RainbowParenthesesToggle
au VimEnter * RainbowParenthesesToggle
au Syntax * RainbowParenthesesLoadRound
au Syntax * RainbowParenthesesLoadSquare
au Syntax * RainbowParenthesesLoadBraces
" NERDTree
autocmd VimEnter * NERDTree | wincmd p
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() |
\ quit | endif
" auto-expansion
" https://www.reddit.com/r/vim/comments/6h0dy7/which_autoclosing_plugin_do_you_use/
" inoremap {<CR> {<CR>}<C-c>O
" inoremap [<CR> [<CR>]<C-c>O
" inoremap (<CR> (<CR>)<C-c>O
" easily switch from insert mode to normal mode by jkjlkjasdflkjasldkjf-ing
" https://stackoverflow.com/questions/9221769/whats-the-meaning-of-inoremap-in-vimrc
inoremap jk <ESC>
inoremap jj <Esc>
filetype plugin indent on
" On pressing tab, insert 2 spaces
set expandtab
" show existing tab with 2 spaces width
set tabstop=2
set softtabstop=2
" when indenting with '>', use 2 spaces width
set shiftwidth=2
" vim:fdm=marker
" Editor basics {{{
" Behave like Vim instead of Vi
set nocompatible
" Show a status line
set laststatus=2
" Show the current cursor position
set ruler
" Enable syntax highlighting
syn on
" }}}
" Mouse {{{
" Send more characters for redraws
set ttyfast
" Enable mouse use in all modes
set mouse=a
" Set this to the name of your terminal that supports mouse codes.
" Must be one of: xterm, xterm2, netterm, dec, jsbterm, pterm
set ttymouse=xterm2
" }}}
" Custom cursor
" au VimEnter,InsertLeave * silent execute '!echo -ne "\e[2 q"' | redraw!
" au InsertEnter,InsertChange *
" \ if v:insertmode == 'i' |
" \ silent execute '!echo -ne "\e[6 q"' | redraw! |
" \ elseif v:insertmode == 'r' |
" \ silent execute '!echo -ne "\e[4 q"' | redraw! |
" \ endif
" au VimLeave * silent execute '!echo -ne "\e[ q"' | redraw!
" Use a line cursor within insert mode and a block cursor everywhere else.
"
" Reference chart of values:
" 0 -> blinking block.
" 1 -> blinking block (default).
" 2 -> steady block.
" 3 -> blinking underline.
" 4 -> steady underline.
" 5 -> blinking bar (xterm).
" 6 -> steady bar (xterm).
" insert mode
let &t_SI = "\e[5 q"
" everywhere else
let &t_EI = "\e[2 q"