Skip to content

Instantly share code, notes, and snippets.

@fuadnafiz98
Last active April 18, 2023 07:26
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save fuadnafiz98/d91e468c9bc4689868eb0984a29fef66 to your computer and use it in GitHub Desktop.
Save fuadnafiz98/d91e468c9bc4689868eb0984a29fef66 to your computer and use it in GitHub Desktop.
vim transparent background
" for transparent background
function! AdaptColorscheme()
highlight clear CursorLine
highlight Normal ctermbg=none
highlight LineNr ctermbg=none
highlight Folded ctermbg=none
highlight NonText ctermbg=none
highlight SpecialKey ctermbg=none
highlight VertSplit ctermbg=none
highlight SignColumn ctermbg=none
endfunction
autocmd ColorScheme * call AdaptColorscheme()
highlight Normal guibg=NONE ctermbg=NONE
highlight CursorColumn cterm=NONE ctermbg=NONE ctermfg=NONE
highlight CursorLine cterm=NONE ctermbg=NONE ctermfg=NONE
highlight CursorLineNr cterm=NONE ctermbg=NONE ctermfg=NONE
highlight clear LineNr
highlight clear SignColumn
highlight clear StatusLine
" Change Color when entering Insert Mode
autocmd InsertEnter * set nocursorline
" Revert Color to default when leaving Insert Mode
autocmd InsertLeave * set nocursorline
"" extra settings, uncomment them if necessary :)
"set cursorline
"set noshowmode
"set nocursorline
" trasparent end
@falcucci
Copy link

thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment