diff options
-rw-r--r-- | .gitconfig | 8 | ||||
-rw-r--r-- | .vimrc | 57 | ||||
-rw-r--r-- | .zshrc | 80 |
3 files changed, 116 insertions, 29 deletions
@@ -7,4 +7,10 @@ a = add co = checkout br = branch - st = status + st = status + p = push + dc = diff --cached +[url "https://invent.kde.org/"] + insteadOf = kde: +[url "ssh://git@invent.kde.org/"] + pushInsteadOf = kde: @@ -1,6 +1,9 @@ set nocompatible " be iMproved, required filetype off " required +set timeoutlen=1000 +set ttimeoutlen=5 + " set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() @@ -8,17 +11,17 @@ call vundle#begin() Plugin 'VundleVim/Vundle.vim' " Keep Plugin commands between vundle#begin/end. -" Plugin 'file:///home/fakefred/.vim/bundle/vim-fugitive' -" Plugin 'file:///home/fakefred/.vim/bundle/indentpython.vim' -" Plugin 'file:///home/fakefred/.vim/bundle/YouCompleteMe' -" Plugin 'file:///home/fakefred/.vim/bundle/vdebug' -Plugin 'file:///home/fakefred/.vim/bundle/vim-airline' -Plugin 'file:///home/fakefred/.vim/bundle/vim-airline-themes' -" Plugin 'file:///home/fakefred/.vim/bundle/vim-multiple-cursors' -" Plugin 'file:///home/fakefred/.vim/bundle/nerdtree' -" Plugin 'file:///home/fakefred/.vim/bundle/nerdtree-git-plugin' -" Plugin 'file:///home/fakefred/.vim/bundle/vim-nerdtree-tabs' -" Plugin 'jedi-vim' +" LSP +Plugin 'dense-analysis/ale' +" Utilities +Plugin 'preservim/nerdtree' +Plugin 'reedes/vim-pencil' +Plugin 'thaerkh/vim-workspace' +" Appearance +Plugin 'vim-airline/vim-airline' +Plugin 'vim-airline/vim-airline-themes' +" Music +Plugin 'azadkuh/vim-cmus' " All of your Plugins must be added before the following line call vundle#end() " required @@ -33,26 +36,36 @@ filetype plugin indent on " required " see :h vundle for more details or wiki for FAQ " Put your non-Plugin stuff after this line -set encoding=utf-8 syntax on +set encoding=utf-8 +set fileformat=unix set number -set background=dark -" set mouse=a -" Enable Folding + set foldmethod=indent set foldlevel=99 -nnoremap <space> za -" Indentation -" au BufNewFile,BufRead *.py set tabstop=4 set softtabstop=4 set shiftwidth=4 -" set textwidth=79 set expandtab set autoindent -set fileformat=unix -" au BufRead,BufNewFile *.py match BadWhitespace /\s\+$/ +set background=dark +let g:airline_theme='onedark' + +inoremap <C-s> <esc>:w<CR>i<right> + +nnoremap <leader>f :NERDTreeFocus<CR> +nnoremap <C-n> :NERDTree<CR> +nnoremap <C-t> :NERDTreeToggle<CR> +nnoremap <C-f> :NERDTreeFind<CR> + +nnoremap <leader>s :ToggleWorkspace<CR> +let g:workspace_session_directory = $HOME . '/.vim/sessions/' +let g:workspace_session_disable_on_args = 1 +let g:workspace_autosave = 0 + +nnoremap <leader>c :Cmus<CR> -" autocmd vimenter * NERDTree +nnoremap <leader>p :PencilToggle<CR> +let g:pencil#map#suspend_af = 'K' @@ -7,6 +7,7 @@ plugins=( python pj urltools + mosh ) source $ZSH/oh-my-zsh.sh @@ -38,11 +39,11 @@ bright () { } mnt-cryfs () { - cryfs "~/.local/share/plasma-vault/$1.enc" "~/Vaults/$1" + cryfs "$HOME/.local/share/plasma-vault/$1.enc" "$HOME/Vaults/$1" } umnt-cryfs () { - cryfs-unmount "~/Vaults/$1" + cryfs-unmount "$HOME/Vaults/$1" } # ibus @@ -79,6 +80,7 @@ alias c="cat" alias ls="exa" alias v2="(v2ray -config ~/.v2ray.json&)" alias uv="(v2ray -config ~/.v2ray.json&) & (python -m utab&)" +alias dormshare="sudo python -m http.server -b 192.168.8.88 80" alias tlmgr="/usr/share/texmf-dist/scripts/texlive/tlmgr.pl --usermode" @@ -90,14 +92,80 @@ set -B 0 # something fucked up alias je="journalctl -e" +alias what-the-fuck-just-happened="journalctl -e -b -1" alias accel="killall kglobalaccel5 && kglobalaccel5&" +# VG151 +alias gccf="gcc -O2 -Werror -Wpedantic -Wall -Wextra -Wconversion -Wvla -std=c11" +gccc () { + if [[ $1 == '-j' ]]; then + gccf -o $2.out $2.c -D JOJ + elif [[ $1 == '-d' ]]; then + gccf -o $2.out $2.c -D DEBUG + else + gccf -o $1.out $1.c + fi +} + +alias g++f="g++ -Wall -Wextra -pedantic -Wvla -Werror -Wsign-conversion -std=c++17" +g+++ () { + if [[ $1 == '-j' ]]; then + g++f -o ex$2.out ex$2.cpp -D JOJ + elif [[ $1 == '-d' ]]; then + g++f -o ex$2.out ex$2.cpp -D DEBUG + else + g++f -o ex$1.out ex$1.cpp + fi +} + +extar () { + tar cf ex$1.tar ex$1.cpp homework.h +} + # auto-generated by kdesrc-build initial setup: do not remove! # Add the kdesrc-build directory to the path # export PATH="$HOME/kde/src/kdesrc-build:$PATH" # Create alias for running software built with kdesrc-build -# kdesrc-run () -# { -# source "$HOME/kde/build/$1/prefix.sh" && "$HOME/kde/usr/bin/$1" -# } +kdesrc-run () +{ + source "$HOME/kde/build/$1/prefix.sh" && "$HOME/kde/usr/bin/$1" +} + + +# kdesrc-build ################################################################# + +## Add kdesrc-build to PATH +export PATH="$HOME/kde/src/kdesrc-build:$PATH" + +## Autocomplete for kdesrc-run +function _comp-kdesrc-run +{ + local cur + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + + # Complete only the first argument + if [[ $COMP_CWORD != 1 ]]; then + return 0 + fi + + # Retrieve build modules through kdesrc-run + # If the exit status indicates failure, set the wordlist empty to avoid + # unrelated messages. + local modules + if ! modules=$(kdesrc-run --list-installed); + then + modules="" + fi + + # Return completions that match the current word + COMPREPLY=( $(compgen -W "${modules}" -- "$cur") ) + + return 0 +} + +## Register autocomplete function +# complete -o nospace -F _comp-kdesrc-run kdesrc-run + +################################################################################ |