diff --git a/.vimrc b/.vimrc index ea5bbbc..3fe478a 100644 --- a/.vimrc +++ b/.vimrc @@ -1,3 +1,5 @@ +vim9script + call plug#begin('~/.vim/plugged') Plug 'sainnhe/sonokai' @@ -5,7 +7,7 @@ Plug 'dstein64/vim-startuptime' call plug#end() -" ASSORTED SHIT +# ASSORTED SHIT syntax on set termguicolors set mouse=a @@ -13,15 +15,15 @@ set number set tabstop=4 set shiftwidth=4 -" SONOKAI CONFIG -let g:sonokai_style = 'atlantis' -let g:sonokai_diagnostic_line_highlight = 1 -let g:sonokai_diagnostic_virtual_text = 'colored' -let g:sonokai_current_word = 'underline' -let g:sonokai_better_performance = 1 +# 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 +# STATUSLINE SHIT set laststatus=2 set statusline= set statusline+=%1* @@ -44,30 +46,32 @@ hi User1 gui=bold cterm=bold guibg=#7ad5f1 guifg=black hi User2 guifg=#7ad5f1 guibg=#2a2f38 hi User4 guibg=#2a2f38 guifg=white -function! StatuslineMode() - let l:mode=mode() - if l:mode==#"n" +def g:StatuslineMode(): string + var mode = mode() + if mode ==# "n" return "NORMAL" - elseif l:mode==?"v" + elseif mode ==? "v" return "VISUAL" - elseif l:mode==#"i" + elseif mode ==# "i" return "INSERT" - elseif l:mode==#"R" + elseif mode ==# "R" return "REPLACE" - elseif l:mode==?"s" + elseif mode ==? "s" return "SELECT" - elseif l:mode==#"t" + elseif mode ==# "t" return "TERMINAL" - elseif l:mode==#"c" + elseif mode ==# "c" return "COMMAND" - elseif l:mode==#"!" + elseif mode ==# "!" return "SHELL" + else + return "UNKNOWN" endif -endfunction +enddef -function! CheckUserAndComplainOtherwise() - if $USER=="root" +def CheckUserAndComplainOtherwise() + if $USER == "root" call input("You are running as root. Here be dragons! ") endif -endfunction +enddef autocmd VimEnter * call CheckUserAndComplainOtherwise() diff --git a/.zshrc b/.zshrc index e04fe2d..70ce821 100644 --- a/.zshrc +++ b/.zshrc @@ -1,6 +1,7 @@ #Drake's Early Shit #Apparently, P10k removes tty access, so we need to define it up here to fix that export GPG_TTY=$(tty) +[[ "$TERM_PROGRAM" == "vscode" ]] && . "$(code --locate-shell-integration-path zsh)" SCRIPT_SOURCE=$(readlink -f ~/.zshrc) SCRIPT_SOURCE=${SCRIPT_SOURCE:a:h}