-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.vimrc.color
300 lines (276 loc) · 15.1 KB
/
.vimrc.color
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
" .vim-color.vim
" (c) 1998-2025 George Georgalis <[email protected]> unlimited use with this notice
if &t_Co > 1
syntax enable
endif
" use POSIX for shell highlighting
let g:is_posix= 1
" light background has less saturation...
set background=dark
" Treat .tex and .lst files as text files for spellchecking
autocmd BufNewFile,BufRead *.tex,*.lst setlocal filetype=text
" Syntax highlight .tex and .lst files as TeX
autocmd BufNewFile,BufRead *.tex,*.lst setlocal syntax=tex
" 664ba544-20240520_123210 claude
try
if exists("*ToggleReset")
delfunc ToggleReset
endif
let s:reset_sourced = 0
function! ToggleReset()
if s:reset_sourced
source $HOME/.vimrc
let s:reset_sourced = 0
" echom "Sourced default .vimrc"
else
if filereadable($HOME . "/.vimrc-reset")
source $HOME/.vimrc-reset
let s:reset_sourced = 1
" echom "Sourced .vimrc-reset"
else
echom ".vimrc-reset not found"
endif
endif
endfunction
nnoremap <silent> gc :call ToggleReset()<CR>
catch /^Vim\%((\a\+)\)\=:E/
echohl ErrorMsg
echo v:errmsg
echohl None
endtry
" " 664baac3-20240520_125537 claude
" " Define a script-local function to toggle between .vimrc and .vimrc-reset
" function! s:ToggleReset()
" if exists('s:reset_sourced') && s:reset_sourced
" source $HOME/.vimrc
" let s:reset_sourced = 0
" echom "Sourced default .vimrc"
" else
" if filereadable($HOME . "/.vimrc-reset")
" source $HOME/.vimrc-reset
" let s:reset_sourced = 1
" echom "Sourced .vimrc-reset"
" else
" echom ".vimrc-reset not found"
" endif
" endif
" endfunction
" " Initialize the script-local variable
" let s:reset_sourced = 0
" " Create the keybinding to call the script-local function
" nnoremap <silent> gc :call <SID>ToggleReset()<CR>
" :scriptnames all the files sourced in the configuratioon
" :highlight (:hi) shows all highlight settings, with arg1 the settings for that highlight, otherwise sets arg1 settings
" level the deck, least artifacts remain...
highlight clear
syntax reset
set background=dark
set termguicolors
syntax on
" idntify the highlight attribute at cursor with "gm"
" https://stackoverflow.com/questions/9464844/how-to-get-group-name-of-highlighting-under-cursor-in-vim/58244921#58244921
function! SynStack ()
for i1 in synstack(line("."), col("."))
let i2 = synIDtrans(i1)
let n1 = synIDattr(i1, "name")
let n2 = synIDattr(i2, "name")
echo n1 "->" n2
endfor
endfunction
map gm :call SynStack()<CR>
" ctermbg=42
" cterm: NONE,bold,underline,reverse
"1 2 3 4 5 6 7 8 9
"hi Name term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
hi Comment term=NONE cterm=NONE ctermfg=DarkCyan ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
hi Constant term=NONE cterm=underline ctermfg=109 ctermbg=NONE gui=NONE guifg=#ceebfd guibg=NONE
hi CurSearch term=NONE cterm=reverse ctermfg=24 ctermbg=NONE gui=NONE guifg=#c77a0e guibg=NONE
hi Identifier term=NONE cterm=NONE ctermfg=69 ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
hi NonText term=NONE cterm=NONE ctermfg=23 ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
hi PreProc term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=#9167a9 guibg=NONE
hi Search term=NONE cterm=reverse ctermfg=24 ctermbg=NONE gui=NONE guifg=#600982 guibg=#5da3a9
hi Special term=NONE cterm=NONE ctermfg=5 ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
hi SpecialKey term=NONE cterm=reverse ctermfg=237 ctermbg=NONE gui=NONE guifg=#36261a guibg=NONE
hi Statement term=NONE cterm=NONE ctermfg=3 ctermbg=NONE gui=NONE guifg=#b6b500 guibg=NONE
hi Todo term=NONE cterm=NONE ctermfg=NONE ctermbg=208 gui=NONE guifg=NONE guibg=NONE
hi Visual term=none cterm=none ctermfg=none ctermbg=NONE gui=NONE guifg=NONE guibg=#505006
hi makeCommands term=NONE cterm=NONE ctermfg=7 ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
hi makeComment term=NONE cterm=NONE ctermfg=6 ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
hi makeIdent term=NONE cterm=NONE ctermfg=5 ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
hi makeImplicit term=NONE cterm=NONE ctermfg=2 ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
hi makeTarget term=NONE cterm=bold ctermfg=3 ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
hi shCmdParenRegion term=NONE cterm=NONE ctermfg=130 ctermbg=NONE gui=NONE guifg=#8f8029 guibg=NONE
hi shCmdSubRegion term=NONE cterm=NONE ctermfg=197 ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
hi shCommandSub term=NONE cterm=NONE ctermfg=90 ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
hi shDeref term=NONE cterm=underline ctermfg=130 ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
hi shDerefPattern term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=#6e6c64 guibg=NONE
hi shExpr term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=#8f8029 guibg=NONE
hi shFunctionOne term=NONE cterm=NONE ctermfg=182 ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
hi shOption term=NONE cterm=NONE ctermfg=22 ctermbg=NONE gui=NONE guifg=#d5c8ab guibg=NONE
hi shParen term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=#b499bf guibg=NONE
hi vim9Comment term=NONE cterm=bold ctermfg=red ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
hi vimSetEqual term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=#e1af68 guibg=NONE
hi User1 term=NONE cterm=bold ctermfg=11 ctermbg=1 gui=NONE guifg=NONE guibg=NONE
hi User2 term=NONE cterm=bold ctermfg=221 ctermbg=196 gui=NONE guifg=NONE guibg=NONE
hi User3 term=NONE cterm=bold ctermfg=19 ctermbg=208 gui=NONE guifg=NONE guibg=NONE
hi User4 term=NONE cterm=bold ctermfg=19 ctermbg=221 gui=NONE guifg=NONE guibg=NONE
hi User5 term=NONE cterm=bold ctermfg=19 ctermbg=11 gui=NONE guifg=NONE guibg=NONE
hi User6 term=NONE cterm=bold ctermfg=19 ctermbg=123 gui=NONE guifg=NONE guibg=NONE
hi User7 term=NONE cterm=bold ctermfg=123 ctermbg=33 gui=NONE guifg=NONE guibg=NONE
hi User8 term=NONE cterm=bold ctermfg=11 ctermbg=19 gui=NONE guifg=NONE guibg=NONE
hi User9 term=NONE cterm=bold ctermfg=1 ctermbg=0 gui=NONE guifg=NONE guibg=NONE
" priority/overlap unclear...
highlight CustLead term=NONE cterm=NONE ctermfg=6 ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
highlight CustLeadTab term=NONE cterm=NONE ctermfg=6 ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
highlight CustMultiSpace term=NONE cterm=NONE ctermfg=6 ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
highlight CustTab term=NONE cterm=NONE ctermfg=6 ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
highlight CustTrail term=NONE cterm=NONE ctermfg=6 ctermbg=NONE gui=NONE guifg=NONE guibg=NONE
match CustLead "/^[ ]+/"
match CustLeadTab "/^[\t]+/"
match CustMultiSpace "/ [ ]+/"
match CustTab "/\t/"
match CustTrail "/[ ]+$/"
set statusline=
"set statusline+=%1*1\ %2*2\ %3*3\ %4*4\ %5*5\ %6*6\ %7*7\ %8*8\ %9*9\
set statusline+=%9*%n " buffer number
set statusline+=%6*\ %<%F\ " left, File+path
set statusline+=%1*%{(&bomb?\",\ BOM\ \":\"\")} " BOM status (Byte Order Mark, for utf-8, or the little/big endian variants)
set statusline+=%7*\ %M%R%Y\ " Modified? Readonly? Help?
set statusline+=%3*\ %{&ff}\ " FileFormat (dos/unix..)
set statusline+=%5*\ %{''.(&fenc!=''?&fenc:&enc).''}\ " FileType Encoding
set statusline+=%4*\ %{&spelllang}\ " spell language
set statusline+=%4*\ %=%o,0x%B\ " begin right, with (under cursor) 'file byte, hex value'
set statusline+=%8*\ %v,%l\ %P/%L\ " column,line line-percent/line-total
" 8 bit colors
" for c in {0..16} ; do printf "\x1b[48;5;${c}m" ; printf "%3d" "${c}" ; done ; echo
" n normal bright
" 0 black 8
" 1 red 9
" 2 green 10
" 3 yellow 11
" 4 blue 12
" 5 megenta 13
" 6 cyan 14
" 7 white 15
" interface color and attribute varables
"
" term attributes in a B&W terminal
" cterm attributes in a color terminal
" ctermfg foreground color in a color terminal
" ctermbg background color in a color terminal
" gui attributes in the GUI
" guifg foreground color in the GUI
" guibg background color in the GUI
"
" atributes: none,bold,underline,reverse
" color (per term capacity): name,8-bit,16-bit,web
"
"
""" Syntax group
""hi Comment gui=NONE guifg=#c0c0d0 guibg=NONE
""hi Error gui=BOLD guifg=#ffffff guibg=#ff0088 cterm=none ctermfg=white ctermbg=DarkBlue
""hi Identifier gui=NONE guifg=#40f0f0 guibg=NONE
""hi Ignore gui=NONE guifg=#000000 guibg=NONE
""hi PreProc gui=NONE guifg=#40f0a0 guibg=NONE
""hi Special gui=NONE guifg=#e0e080 guibg=NONE
""hi Statement gui=NONE guifg=#ffa0ff guibg=NONE
""hi Todo gui=BOLD,UNDERLINE guifg=#ffa0a0 guibg=NONE
""hi Type gui=NONE guifg=#ffc864 guibg=NONE
""hi Underlined gui=UNDERLINE guifg=#f0f0f8 guibg=NONE
""
""" HTML
""hi htmlLink gui=UNDERLINE
""hi htmlBold gui=BOLD
""hi htmlBoldItalic gui=BOLD,ITALIC
""hi htmlBoldUnderline gui=BOLD,UNDERLINE
""hi htmlBoldUnderlineItalic gui=BOLD,UNDERLINE,ITALIC
""hi htmlItalic gui=ITALIC
""hi htmlUnderline gui=UNDERLINE
""hi htmlUnderlineItalic gui=UNDERLINE,ITALIC
"
"" *cterm-colors*
"0Black
""DarkBlue
""DarkGreen
""DarkCyan
""DarkRed
""DarkMagenta
""Brown
""LightGray, LightGrey, Gray, Grey
""DarkGray, DarkGrey
""Blue, LightBlue
""Green, LightGreen
""Cyan, LightCyan
""Red, LightRed
""LightMagenta
""Yellow
""White
"
"" Black =DarkGray =DarkGrey
"" White =LightGray =LightGrey
"" Blue =DarkBlue LightBlue
"" Green DarkGreen =LightGreen
"" Cyan DarkCyan =LightCyan
"" Red =DarkRed LightRed
"" DarkMagenta LightMagenta
"" Yellow Brown =Darkyellow
""
"" black blue brown cyan darkBlue darkcyan darkgray darkgreen darkgrey
"" darkmagenta darkred darkyellow gray green grey lightblue lightcyan
"" lightgray lightgreen lightgrey lightmagenta lightred magenta red white
"" yellow
""
""0=Black =DarkGray =DarkGrey
""1=Red =DarkRed =LightRed
""2=Green =DarkGreen =LightGreen
""3=Yellow =Brown
""4=Blue =DarkBlue =LightBlue
""5=LightMagenta =DarkMagenta
""6=Cyan =DarkCyan =LightCyan
""7=White =LightGray =LightGrey
"" 0 Black 8 DarkGrey
"" 1 DarkBlue 9 Blue
"" 2 DarkGreen 10 Green
"" 3 DarkCyan 11 Cyan
"" 4 DarkRed 12 Red
"" 5 DarkMagenta 13 LightMagenta
"" 6 Brown 14 Yellow
"" 7 Grey 15 White
"" The color terminal (cterm) palette (and bash escape codes)
""
"" (background colors begin with 40 verses 30)
"" Black 0;30 Dark Gray 1;30
"" Red 0;31 Light Red 1;31
"" Green 0;32 Light Green 1;32
"" Brown 0;33 Yellow 1;33
"" Blue 0;34 Light Blue 1;34
"" Purple 0;35 Light Purple 1;35
"" Cyan 0;36 Light Cyan 1;36
"" Light Gray 0;37 White 1;37
""
"" Attribute codes: 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
" see xterm-true-color
" let &t_8f = "^[[38;2;%lu;%lu;%lum"
" let &t_8b = "^[[48;2;%lu;%lu;%lum"
" let &t_8f = "\<Esc>[38:2:%lu:%lu:%lum"
" let &t_8b = "\<Esc>[48:2:%lu:%lu:%lum"
" for c in 1 196 130 202 209 220 226 156 49 27 57 ; do printf "\x1b[38;5;${c}m" ; printf "%4d" "${c}" ; done ; echo
" for c in 139 198 94 222 112 34 123 141 91 ; do printf "\x1b[48;5;${c}m" ; printf "%4d" "${c}" ; done ; echo
" for c in 0 94 166 167 208 214 112 34 ; do printf "\x1b[48;5;${c}m" ; printf "%4d\x1b[38;5;7m\x1b[48;5;0m" "${c}" ; done ; echo
" for c in {16..51} ; do export c ; for d in {1..6} ; do export d ; for e in {1..5} ; do export e ; f=$((c+35*d*e)) ; printf "\x1b[48;5;${f}m" ; printf "%4d" "${f}" ; test "$(( ( f - 15 ) % 36 ))" -ne "0" && printf "" || printf "\n" ; done ; done; done
" for c in {232..255} ; do printf "\x1b[48;5;${c}m" ; printf "%4d\x1b[38;5;7m\x1b[48;5;0m" "${c}" ; done ; echo ; for c in 1 196 208 221 11 123 32 20 91 0 94 166 167 208 214 112 34 ; do printf "\x1b[48;5;${c}m" ; printf "%4d\x1b[38;5;7m\x1b[48;5;0m" "${c}" ; done ; echo
"for c in {232..255} ; do printf "\x1b[48;5;${c}m" ; printf "%4d\x1b[38;5;7m\x1b[48;5;0m" "${c}" ; done ; echo
"for c in {0..7} ; do printf "\x1b[48;5;${c}m" ; printf "%3d" "${c}" ; done ; echo
"for c in {8..15} ; do printf "\x1b[48;5;${c}m" ; printf "%3d" "${c}" ; done ; echo
"for c in {16..231} ; do printf "\x1b[48;5;${c}m" ; printf "%4d" "${c}" ; test "$(( ( c - 15 ) % 36 ))" -ne "0" && printf "" || printf "\x1b[0m\n" ; done ;
" for c in {0..15} ; do printf "\x1b[48;5;${c}m" ; printf "%3d" "${c}" ; done ; echo
" for c in {8..15} {0..7} ; do printf "\x1b[48;5;${c}m" ; printf "%3d" "${c}" ; done ; echo ;
" for c in 1 196 208 221 11 123 33 19 91 0 94 64 34 112 123 103 166 167 208 214 ; do printf "\x1b[48;5;${c}m" ; printf "%4d\x1b[38;5;7m\x1b[48;5;0m" "${c}" ; done ; echo
" for c in {16..231} ; do printf "\x1b[48;5;${c}m" ; printf "%4d" "${c}" ; test "$(( ( c - 15 ) % 36 ))" -ne "0" && printf "" || printf "\n" ; done ;
" for c in {232..255} ; do printf "\x1b[48;5;${c}m" ; printf "%4d\x1b[38;5;7m\x1b[48;5;0m" "${c}" ; done ; echo ;
" awk 'BEGIN{for(y=0;y<6;y++){for(x=0;x<36;x++){c=16+6*x+y;printf("\033[48;5;%dm\033[%dm%4d\033[0m",c,x%6<2?97:30,c)}print""}}'
" awk 'BEGIN{for(i=0;i<6;i++){for(j=0;j<6;j++){for(k=0;k<6;k++){c=16+36*i+6*j+k;printf("\033[48;5;%dm\033[%dm%4d\033[0m",c,k<2?97:30,c)}printf("")}print""}}'
" awk 'BEGIN{for(t=0;t<6;t++){for(y=0;y<6;y++){for(x=0;x<6;x++){c=16+36*x+6*y+t;printf("\033[48;5;%dm\033[%dm%4d\033[0m",c,t<3?97:30,c)}printf("")}print""}}'
" awk 'BEGIN{for(t=0;t<6;t++){for(y=0;y<6;y++){for(x=0;x<6;x++){c=16+36*t+6*x+y;printf("\033[48;5;%dm\033[%dm%4d\033[0m",c,y<3?97:30,c)}printf("")}print""}}'
" awk 'BEGIN{for(t=0;t<6;t++){for(y=0;y<6;y++){for(x=0;x<6;x++){c=16+t+6*x+36*y;printf("\033[48;5;%dm\033[%dm%4d\033[0m",c,(x+y)%2?97:30,c)}printf("")}print""}}'
" awk 'BEGIN{for(t=0;t<6;t++){for(y=0;y<6;y++){for(x=0;x<6;x++){c=16+36*y+t*6+x;printf("\033[48;5;%dm\033[%dm%4d\033[0m",c,x<3?97:30,c)}printf("")}print""}}'