You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
1.5 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

vim9script
call plug#begin('~/.vim/plugged')
Plug 'sainnhe/sonokai'
Plug 'dstein64/vim-startuptime'
call plug#end()
# ASSORTED SHIT
syntax on
set termguicolors
set mouse=a
set number
set tabstop=4
set shiftwidth=4
# SONOKAI CONFIG
g:sonokai_style = 'atlantis'
g:sonokai_diagnostic_line_highlight = 1
g:sonokai_diagnostic_virtual_text = 'colored'
g:sonokai_current_word = 'underline'
g:sonokai_better_performance = 1
colorscheme sonokai
# STATUSLINE SHIT
set laststatus=2
set statusline=
set statusline+=%1*
set statusline+= 
set statusline+=%{StatuslineMode()}
set statusline+= 
set statusline+=%2*
set statusline+=
set statusline+=%4*
set statusline+= 
set statusline+=%f
set statusline+=%=
set statusline+=%2*
set statusline+=
set statusline+=%1*
set statusline+= 
set statusline+=%y
set statusline+= 
hi User1 gui=bold cterm=bold guibg=#7ad5f1 guifg=black
hi User2 guifg=#7ad5f1 guibg=#2a2f38
hi User4 guibg=#2a2f38 guifg=white
def g:StatuslineMode(): string
var mode = mode()
if mode ==# "n"
return "NORMAL"
elseif mode ==? "v"
return "VISUAL"
elseif mode ==# "i"
return "INSERT"
elseif mode ==# "R"
return "REPLACE"
elseif mode ==? "s"
return "SELECT"
elseif mode ==# "t"
return "TERMINAL"
elseif mode ==# "c"
return "COMMAND"
elseif mode ==# "!"
return "SHELL"
else
return "UNKNOWN"
endif
enddef
def CheckUserAndComplainOtherwise()
if $USER == "root"
call input("You are running as root. Here be dragons! ")
endif
enddef
autocmd VimEnter * call CheckUserAndComplainOtherwise()