First commit

This commit is contained in:
Daan Vanoverloop 2019-07-20 12:08:57 +02:00
commit a700ff0c6a
2 changed files with 329 additions and 0 deletions

107
.vimrc Normal file
View File

@ -0,0 +1,107 @@
set nocompatible " be iMproved, required
filetype off " required
call plug#begin()
Plug 'itchyny/lightline.vim'
Plug 'vim-scripts/c.vim'
Plug 'arcticicestudio/nord-vim'
Plug 'scrooloose/nerdtree'
Plug 'jistr/vim-nerdtree-tabs'
Plug 'ervandew/supertab'
Plug 'fweep/vim-tabber.git'
Plug 'rhysd/vim-clang-format'
Plug 'kana/vim-operator-user'
Plug 'https://github.com/antoyo/vim-licenses'
Plug 'Valloric/YouCompleteMe'
call plug#end() " required
filetype plugin indent on " required
set tags+=./.tags
"----------------------
" move between tabs
nnoremap <A-Left> :tabprevious<CR>
nnoremap <A-Right> :tabnext<CR>
" prevent mouse vanishing
set nomousehide
set mousemodel=popup
" toggles menu in graphical mode
function! ToggleGUICruft()
if &guioptions=='ir'
exec('set guioptions=imrLn')
else
exec('set guioptions=ir')
endif
endfunction
map <F12> <Esc>:call ToggleGUICruft()<cr>
set tabline=%!tabber#TabLine()
let g:tabber_filename_style = 'filename' " README.md\
let g:tabber_divider_style = 'compatible'
set number
set linebreak
set nobackup
set noswapfile
"set shortmess+=I
set backspace=indent,eol,start
set visualbell t_vb=
set showmode
"set smartcase
nnoremap <F1> <nop>
nnoremap Q <nop>
nnoremap K <nop>
runtime! ftplugin/man.vim
nnoremap K :Man <cword>
noremap <C-S> :update<CR><CR>
vnoremap <C-S> <C-C>:update<CR><CR>
inoremap <C-S> <C-O>:update<CR><CR>
set mouse=a
set nu
let g:clang_format#code_style="webkit"
set spell spelllang=en_us
set clipboard=unnamed
set backspace=indent,eol,start " allow backspacing over everything in insert mode
" Allow saving of files as sudo when I forgot to start vim using sudo.
cmap w!! w !sudo tee > /dev/null %
"spell checking
" Spell check on
set spell spelllang=en_us
setlocal spell spelllang=en_us
" where it should get the dictionary files
let g:spellfile_URL = 'http://ftp.vim.org/vim/runtime/spell'
set laststatus=2
let g:nord_uniform_diff_background = 1
let g:nord_cursor_line_number_background = 1
let g:lightline = {
\ 'colorscheme': 'nord',
\ }
colorscheme nord
filetype plugin indent on
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
let g:C_MapLeader = ','
nnoremap <cr> :noh<CR><CR>:<backspace>

222
.zshrc Normal file
View File

@ -0,0 +1,222 @@
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
export ZSH=/usr/share/oh-my-zsh
# Path to your oh-my-zsh installation.
#POWERLEVEL9K_MODE='nerdfont-complete'
#
#POWERLEVEL9K_FOLDER_ICON=""
#
#POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=0
#
#POWERLEVEL9K_DIR_OMIT_FIRST_CHARACTER=true
#
#POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND='black'
#POWERLEVEL9K_BACKGROUND_JOBS_BACKGROUND='178'
#POWERLEVEL9K_VCS_CLEAN_BACKGROUND='green'
#POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND='yellow'
#POWERLEVEL9K_VCS_MODIFIED_BACKGROUND='016'
#POWERLEVEL9K_VIRTUALENV_BACKGROUND='green'
#POWERLEVEL9K_CONTEXT_DEFAULT_FOREGROUND="blue"
#POWERLEVEL9K_DIR_WRITABLE_FORBIDDEN_FOREGROUND="015"
#POWERLEVEL9K_NODE_VERSION_BACKGROUND="034"
#POWERLEVEL9K_JAVA_VERSION_BACKGROUND="016"
#POWERLEVEL9K_TIME_BACKGROUND='255'
#POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND='245'
#POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND='black'
#POWERLEVEL9K_SHORTEN_DIR_LENGTH=2
#
#POWERLEVEL9K_TIME_FORMAT="%D{%H:%M}"
#P9K__LEFT=(root_indicator dir dir_writable virtualenv vcs)
#P9K__RIGHT=(status background_jobs command_execution_time)
#
#function chpwd {
# if [[ $PWD/ == ${HOME}/Documents/Development/Node/* ]]; then
# POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=("${P9K__RIGHT[@]:0:2}" "node_version" "${P9K__RIGHT[@]:2}")
# elif [[ $PWD/ == ${HOME}/Documents/Development/Java/* ]]; then
# POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=("${P9K__RIGHT[@]:0:2}" "java_version" "${P9K__RIGHT[@]:2}")
# elif [[ $PWD/ == ${HOME}/Documents/School/OGP/* ]]; then
# POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=("${P9K__RIGHT[@]:0:2}" "java_version" "${P9K__RIGHT[@]:2}")
# else
# POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(${P9K__RIGHT})
# fi
#}
#POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(${P9K__LEFT})
#POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(${P9K__RIGHT})
#POWERLEVEL9K_SHOW_CHANGESET=true
HYPHEN_INSENSITIVE="true"
COMPLETION_WAITING_DOTS="true"
#source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
ZSH_THEME="avit"
alias nodeindex="node lib/index.js"
plugins=(
git
archlinux
k tig gitfast colored-man colorize command-not-found cp dirhistory autojump sudo zsh-syntax-highlighting
)
ZSH_COMPDUMP=/tmp/zcompdump-$USER
source $ZSH/oh-my-zsh.sh
HYPHEN_INSENSITIVE="true"
COMPLETION_WAITING_DOTS="true"
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor)
# User configuration
export MANPATH="/usr/local/man:$MANPATH"
export LANG=en_US.UTF-8
export BROWSER=/usr/bin/chromium
export EDITOR=/usr/bin/vim
export TERM="xterm-256color"
export LC_ALL=en_GB.utf8
export QT_QPA_PLATFORMTHEME="qt5ct"
if [[ -d $HOME/.emacs.d/bin && -z $(echo $PATH | grep -o $HOME/.emacs.d/bin) ]]
then
export PATH="${PATH}:$HOME/.emacs.d/bin"
fi
# TP Stuff
declare -A beacons=(
[doc]="${HOME}/Documents"
[dev]="${HOME}/Docmuments/Development"
[node]="${HOME}/Documents/Development/Node"
[java]="${HOME}/Documents/Development/Java"
[python]="${HOME}/Documents/Development/Python"
[school]="${HOME}/Documents/School"
[iw]="${HOME}/Documents/School/IW"
[bvp]="${HOME}/Documents/School/BvP"
)
# tp() {
# cd ${beacons[$1]}
# }
export FFF_CD_ON_EXIT=1
alias f="fff"
# NNN Stuff
export NNN_USE_EDITOR=1
export NNN_DE_FILE_MANAGER=dolphin
export NNN_TMPFILE="/tmp/nnn"
n() {
nnn "$@"
if [ -f $NNN_TMPFILE ]; then
. $NNN_TMPFILE
rm $NNN_TMPFILE
fi
}
nh() {
NNN_SHOW_HIDDEN=1 n "$@"
}
export NNN_COPIER="echo -n $1 | xsel --clipboard --input"
# Python Virtualenv Stuff
export WORKON_HOME=~/Documents/Development/Python/virtualenvs
#source /usr/bin/virtualenvwrapper.sh
py() {
PY_PREV_DIR=$PWD
source "$1/bin/activate"
}
depy() {
deactivate
cd $PY_PREV_DIR
}
alias mkpy="python -m venv"
bindkey -v
HYPHEN_INSENSITIVE="true"
COMPLETION_WAITING_DOTS="true"
# Aliases
# Zsh
alias zshrc="vim ~/.zshrc"
alias reload="source ~/.zshrc"
# Yay
alias syu="yay -Syu"
alias s="yay -S $@"
alias r="yay -R $@"
# Code
c() {
code $PWD &
}
# Git
alias ga="git add ."
alias gc="git commit -m"
alias gpsh="git push"
alias gpll="git pull"
gacp() {
ga &&
gc $1 &&
gpsh
}
# Configs
alias polybarc="$EDITOR ~/.config/polybar/config"
alias i3c="$EDITOR ~/.config/i3/config"
alias termitec="$EDITOR ~/.config/termite/config"
alias rofic="$EDITOR ~/.config/rofi/config.rasi"
alias vi="vim"
alias v="vi"
# Scripts
alias rotate="~/.config/i3/rotate.sh"
alias tp='source tp'
alias ant="JAVA_HOME=/usr/lib/jvm/java-11-openjdk ant"
# /!\ do not use with zsh-autosuggestions
# /!\ zsh-syntax-highlighting and then zsh-autosuggestions must be at the end
#source /usr/share/nvm/init-nvm.sh
#source /usr/share/nvm/init-nvm.sh
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
#export ZSH=/usr/share/oh-my-zsh
eval $(thefuck --alias)
alias config='/usr/bin/git --git-dir=/home/daan/.cfg/ --work-tree=/home/daan'
alias config='/usr/bin/git --git-dir=/home/daan/.cfg/ --work-tree=/home/daan'