Browse code

vimrc - v1.3 - Update settings for Vim 9 compatibility

Fred authored on22/12/2025 18:01:39
Showing1 changed files
... ...
@@ -1,6 +1,7 @@
1 1
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
2 2
 " Versions
3 3
 "
4
+" v1.3 - 2025-12-22: add commands to set interface colors and transparency / Set file types for specific extensions
4 5
 " v1.2 - 2024-08-07: remove trailing whitespace
5 6
 " v1.1 - 2020-08-16: status line improved / comment symbol for R filetype added / comment shortcut improved / replacement shortcut improved / tabedit shortcut improved
6 7
 " v1.0 - 2020-03-15: backup, undo and swap improved / text duplication mapping / search and replace mapping / plugins added / code cleaned
... ...
@@ -195,6 +196,15 @@ set encoding=utf8
195 196
 " Use Unix as the standard file type
196 197
 set ffs=unix,dos,mac
197 198
 
199
+" Transparent background
200
+autocmd vimenter * hi Normal guibg=NONE ctermbg=NONE
201
+autocmd vimenter * hi EndOfBuffer guibg=NONE ctermbg=NONE
202
+
203
+" Tab colors
204
+autocmd vimenter * hi TabLineSel term=bold cterm=bold gui=bold ctermbg=None ctermfg=white
205
+autocmd vimenter * hi TabLine term=underline cterm=underline ctermfg=15 ctermbg=242 gui=underline guibg=DarkGrey
206
+autocmd vimenter * hi TabLineFill term=reverse cterm=reverse gui=reverse
207
+
198 208
 
199 209
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
200 210
 " => Files, backups and undo
... ...
@@ -260,6 +270,9 @@ set wrap "Wrap lines
260 270
 " Comment symbol for filetype
261 271
 autocmd FileType r setlocal commentstring=#\ %s
262 272
 
273
+" Set file types for specific extensions
274
+autocmd BufRead,BufNewFile *.smk setlocal filetype=python
275
+
263 276
 " Remove trailing whitespace
264 277
 " Note: use *.{sh,R,etc} to restrict filetype
265 278
 autocmd BufWritePre * :%s/\s\+$//e
... ...
@@ -341,7 +354,7 @@ au InsertChange * call InsertStatuslineColor(v:insertmode)
341 354
 au InsertLeave * hi statusline term=reverse ctermfg=15 ctermbg=0
342 355
 
343 356
 " Default the statusline when entering Vim
344
-hi statusline term=reverse ctermfg=15 ctermbg=0
357
+hi statusline term=reverse cterm=bold,reverse ctermfg=15 ctermbg=0
345 358
 
346 359
 " Format the status line
347 360
 set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l\ \ \ Col.:\ %c