" When started as "evim", evim.vim will already have done these settings, bail
" out.
if v:progname =~? "evim"
finish
endif
" Get the defaults that most users want.
source $VIMRUNTIME/defaults.vim
" Since we do NOT want to annoy other users on servers with our eye-bleeding
" ass config and customizations - enable them ONLY if our own personal envvar
" is set. This vay each sysadmin can do their own shit without being annoyed at
" each other
if $VIM_USER == 'utoecat'
" MY CONFIG. FOR GUI TERMINAL:
" USE ROBOTO MONO REULAR FONT!!1 SIZE=12
" Switch on highlighting of the last used search pattern.
" Literally the best feature of all time
set hlsearch
" use pre-setup default-shipped theme
" it's not the best, but it won't break at least
colorscheme desert
" process more lines for syntax highlighting
syntax sync minlines=250
" set spaces as the default for most languages
set expandtab
set tabstop=4
set shiftwidth=4
" force real tabs for Makefiles and Golang
autocmd FileType make setlocal noexpandtab tabstop=4 shiftwidth=4
autocmd FileType go setlocal noexpandtab tabstop=4 shiftwidth=4
" a bit less annoying to navigate. relatives, but current line shows
" an actual current line number
set relativenumber
set number
" a bit of user-friendliness
command! HideLineNum set norelativenumber | set nonumber
command! ShowLineNum set relativenumber | set number
command! TabIsTab set noexpandtab
command! TabIsSpace set expandtab
" useful for changes and repairing shit
command! ReloadVimRc source ~/.vimrc
" we use this ugly ass hack with a tmpfile because :w! on it's own is NOT
" enough. Because vim sucks. Just accept that as a fact
" But it's the best thing amonst everything else.
" Yes, every other editor sucks even more.
" This is intended to be used on ssh sessions to dump selected text raw into
" terminal so that i can manually copy it without vim fucking over me with his
" own handling of the mouse and SHIFT+CTRL+C
command! -range PrintSelection <line1>,<line2>w! /tmp/vimsel | !cat /tmp/vimsel
" very useful sometimes to convert shit to hex usable in source code or not
command! -range HexifySelectionC <line1>,<line2>w! /tmp/vimsel | !xxd -R never -i /tmp/vimsel
command! -range HexifySelectionPlain <line1>,<line2>w! /tmp/vimsel | !xxd -R never -p /tmp/vimsel
vnoremap <leader><CR> :PrintSelection<CR>
command! HelpMe echoerr "Help: Open your ~/.vimrc, idiot! And read all the comments!"
endif