Add .bashrc, .vimrc, .vim/colors/PaperColor.vim

This commit is contained in:
Timo Schmidt 2023-03-21 09:19:29 +01:00
commit c496cd171a
3 changed files with 2489 additions and 0 deletions

54
.bashrc Normal file
View File

@ -0,0 +1,54 @@
alias v='vim'
alias ..='cd ..'
alias ...='cd ../..'
alias tmux='tmux -2'
alias ft='cc -Wall -Wextra -Werror -o main -xc <(grep -v "////" *.c) && ./main; rm ./main 2>/dev/null; :'
alias ft2='cc -Wall -Wextra -Werror -o main -xc <(grep -v "////" *.c) && ./main'
alias git='EDITOR=vim git'
alias cmatrix='cmatrix -cu3 -Cred'
alias gca='git add * && git commit -m *'
alias watch='watch -cn.1'
alias norm='alacritty -e sh -c '\''git rev-parse --show-toplevel || { echo "Exiting in 5"; sleep 1; echo "Exiting in 4"; sleep 1; echo "Exiting in 3"; sleep 1; echo "Exiting in 2"; sleep 1; echo "Exiting in 1"; sleep 1; } && cd "$(git rev-parse --show-toplevel)" && watch -cn.5 norminette -R CheckForbiddenSourceHeader'\'' &'
jmp () {
cd "$(find . -name "${1}" -print -quit)"
if [ "${?}" = "0" ]; then
cd "$(find .. -name "${1}" -print -quit)"
fi
}
xset r rate 200 60
PATH="${PATH}:/nfs/homes/tischmid/.local/bin"
##-----------------------------------------------------
## synth-shell-greeter.sh
if [ -f /nfs/homes/tischmid/.config/synth-shell/synth-shell-greeter.sh ] && [ -n "$( echo $- | grep i )" ]; then
:
# source /nfs/homes/tischmid/.config/synth-shell/synth-shell-greeter.sh
fi
##-----------------------------------------------------
## synth-shell-prompt.sh
if [ -f /nfs/homes/tischmid/.config/synth-shell/synth-shell-prompt.sh ] && [ -n "$( echo $- | grep i )" ]; then
:
# source /nfs/homes/tischmid/.config/synth-shell/synth-shell-prompt.sh
PS1='\[\033[31m\]\u\[\033[m\]@\[\033[32m\]\h\[\033[m\] \[\033[33m\]\w\[\033[m\]\n$ '
fi
##-----------------------------------------------------
## better-ls
if [ -f /nfs/homes/tischmid/.config/synth-shell/better-ls.sh ] && [ -n "$( echo $- | grep i )" ]; then
source /nfs/homes/tischmid/.config/synth-shell/better-ls.sh
fi
##-----------------------------------------------------
## alias
if [ -f /nfs/homes/tischmid/.config/synth-shell/alias.sh ] && [ -n "$( echo $- | grep i )" ]; then
source /nfs/homes/tischmid/.config/synth-shell/alias.sh
fi
##-----------------------------------------------------
## better-history
if [ -f /nfs/homes/tischmid/.config/synth-shell/better-history.sh ] && [ -n "$( echo $- | grep i )" ]; then
source /nfs/homes/tischmid/.config/synth-shell/better-history.sh
fi

2353
.vim/colors/PaperColor.vim Normal file

File diff suppressed because it is too large Load Diff

82
.vimrc Normal file
View File

@ -0,0 +1,82 @@
" 42 cluster defaults
syntax on
syntax enable
set tabstop=4
set background=dark
colorscheme PaperColor
set shiftwidth=4
set autoindent
set smartindent
set cursorline
" set cursorcolumn
set relativenumber
set laststatus=2
set showcmd
set noswapfile
set hlsearch
filetype plugin on
filetype indent on
" set autoread
set so=7
set paste
" Ignore case when searching
set ignorecase
" When searching try to be smart about cases
set smartcase
" Highlight search results
set hlsearch
" Makes search act like search in modern browsers
set incsearch
" Don't redraw while executing macros (good performance config)
set lazyredraw
" Show matching brackets when text indicator is over them
set showmatch
" Ignore compiled files
set wildignore=*.o,*~,*.pyc
if has("win16") || has("win32")
set wildignore+=.git\*,.hg\*,.svn\*
else
set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
endif
" Put plugins and dictionaries in this dir (also on Windows)
let vimDir = '$HOME/.vim'
if stridx(&runtimepath, expand(vimDir)) == -1
" vimDir is not on runtimepath, add it
let &runtimepath.=','.vimDir
endif
" Keep undo history across sessions by storing it in a file
if has('persistent_undo')
let myUndoDir = expand(vimDir . '/undodir')
" Create dirs
call system('mkdir ' . vimDir)
call system('mkdir ' . myUndoDir)
let &undodir = myUndoDir
set undofile
endif
" Return to last edit position when opening files (You want this!)
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal! g`\"zz" |
\ endif
let @w='gg^/START cc/* ////Go*/ ////<C-o>'
let @q='gg^/\/\/\/\/ cc#define STARTndd<C-o>'
let @c='G:Stdheader o #define START #include <stdio.h> int main(void) { }O return (0);k'