Created
June 18, 2020 00:57
-
-
Save pkage/d4306831f7e52e59a5b0ebf93c5fa48a to your computer and use it in GitHub Desktop.
06.17.2020 dotfiles dump
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autoload bashcompinit | |
bashcompinit | |
# Lines configured by zsh-newuser-install | |
HISTFILE=~/.histfile | |
HISTSIZE=1000 | |
SAVEHIST=1000 | |
setopt autocd | |
bindkey -v | |
# quality of life stuff | |
alias l="ls -AFG" | |
alias ll="ls -AFGhl" | |
alias res="cd ~/repositories" | |
alias ..="cd .." | |
alias ...="cd ../.." | |
alias .="source" | |
# random compat stuff | |
alias tmux="tmux -u" | |
export HOMEBREW_VERBOSE=1 | |
# text editor setup | |
alias vi="nvim" | |
alias vim="nvim" | |
export EDITOR="nvim" | |
# git aliases | |
alias gB="git blame" | |
alias gC="git checkout" | |
alias gP="git push" | |
alias ga="git add" | |
alias gb="git branch" | |
alias gc="git commit" | |
alias gd="git diff" | |
alias gf="git fetch" | |
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" | |
alias gp="git pull" | |
alias gs="git status" | |
# render manpages nicely | |
export LESS_TERMCAP_mb=$'\e[1;32m' | |
export LESS_TERMCAP_md=$'\e[1;32m' | |
export LESS_TERMCAP_me=$'\e[0m' | |
export LESS_TERMCAP_se=$'\e[0m' | |
export LESS_TERMCAP_so=$'\e[01;33m' | |
export LESS_TERMCAP_ue=$'\e[0m' | |
export LESS_TERMCAP_us=$'\e[1;4;31m' | |
# rust | |
export PATH="$HOME/.cargo/bin:$PATH" | |
# prompt | |
autoload -Uz vcs_info # git | |
zstyle ':vcs_info:git:*' formats '%b' | |
setopt PROMPT_SUBST | |
precmd() { | |
vcs_info | |
gbranch="" | |
gdirty="" | |
# quick n dirty status formatter | |
if [[ -n $vcs_info_msg_0_ ]]; then | |
gbranch=" $vcs_info_msg_0_" | |
gdirty=$(git status --porcelain 2> /dev/null) | |
if [[ -n $gdirty ]]; then | |
gdirty="*" | |
fi | |
gitslug="%F{5}$gbranch%F{1}$gdirty%F{8}" | |
fi | |
# virtualenv slug | |
if [[ -n $VIRTUAL_ENV ]]; then | |
venvslug=" %F{4}$VIRTUAL_ENV:t%F{8}" | |
else | |
venvslug="" | |
fi | |
# conda slug | |
if [[ -n $CONDA_DEFAULT_ENV ]]; then | |
condaslug=" %F{6}$CONDA_DEFAULT_ENV:t%F{8}" | |
else | |
condaslug="" | |
fi | |
PROMPT="%F{8}%? > %1~$gitslug$venvslug$condaslug λ%f%k " | |
} | |
export PATH="/usr/local/sbin:$PATH" | |
# >>> conda initialize >>> | |
# !! Contents within this block are managed by 'conda init' !! | |
__conda_setup="$('/usr/local/Caskroom/miniconda/base/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)" | |
if [ $? -eq 0 ]; then | |
eval "$__conda_setup" | |
else | |
if [ -f "/usr/local/Caskroom/miniconda/base/etc/profile.d/conda.sh" ]; then | |
. "/usr/local/Caskroom/miniconda/base/etc/profile.d/conda.sh" | |
else | |
export PATH="/usr/local/Caskroom/miniconda/base/bin:$PATH" | |
fi | |
fi | |
unset __conda_setup | |
# <<< conda initialize <<< | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
call plug#begin('~/.local/share/nvim/plugged') | |
" Quality of life | |
Plug 'tpope/vim-sensible' | |
Plug 'vim-airline/vim-airline' | |
Plug 'scrooloose/nerdtree' | |
Plug 'ctrlpvim/ctrlp.vim' | |
Plug 'mhinz/vim-startify' | |
Plug 'mbbill/undotree' | |
Plug 'w0rp/ale' | |
Plug 'mtth/scratch.vim' | |
Plug 'godlygeek/tabular' | |
Plug 'chrisbra/Colorizer' | |
Plug 'tpope/vim-dispatch' | |
" Git | |
Plug 'airblade/vim-gitgutter' | |
Plug 'tpope/vim-fugitive' | |
Plug 'jaxbot/github-issues.vim' | |
" Text editing | |
Plug 'junegunn/vim-easy-align' | |
Plug 'terryma/vim-multiple-cursors' | |
Plug 'easymotion/vim-easymotion' | |
Plug 'tpope/vim-commentary' | |
"Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } | |
Plug 'plasticboy/vim-markdown' | |
" Orgmode deps | |
Plug 'jceb/vim-orgmode' | |
Plug 'tpope/vim-speeddating' | |
" JS support | |
Plug 'pangloss/vim-javascript' | |
Plug 'elzr/vim-json' | |
Plug 'maksimr/vim-jsbeautify' | |
Plug 'mxw/vim-jsx' | |
Plug 'leafgarland/typescript-vim' | |
Plug 'tikhomirov/vim-glsl' | |
" Rust | |
Plug 'rust-lang/rust.vim' | |
Plug 'cespare/vim-toml' | |
" JS tagbars | |
Plug 'majutsushi/tagbar' | |
" Indentation/Project Mgmt | |
" Plug 'tpope/vim-sleuth' | |
" Markdown | |
Plug 'gabrielelana/vim-markdown' | |
" HTML | |
Plug 'rstacruz/sparkup' | |
" Python | |
"Plug 'heavenshell/vim-pydocstring' | |
" Haskell | |
Plug 'neovimhaskell/haskell-vim' | |
Plug 'bitc/vim-hdevtools' | |
" GraphQL | |
Plug 'jparise/vim-graphql' | |
" PDDL | |
Plug 'PontusPersson/pddl.vim' | |
" TeX | |
Plug 'lervag/vimtex' | |
call plug#end() | |
filetype plugin indent on | |
" editor configuration | |
set background=dark | |
set nu | |
set laststatus=2 | |
set pastetoggle=<F2> | |
set foldlevelstart=99 | |
set encoding=UTF-8 | |
" movement (turned off) | |
"nmap j jzz | |
"nmap k kzz | |
" set termguicolors | |
nnoremap <space> za | |
" indentation | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
" tabgar | |
nmap <F8> :TagbarToggle<CR> | |
" highlight extraneous whitespace | |
highlight BadWhitespace guifg=red guibg=red | |
" au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/ | |
au BufRead,BufNewFile * match BadWhitespace /\s\+$/ | |
" nerdtree | |
map <C-n> :NERDTreeToggle<CR> | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif | |
" vim multiple cursors config | |
let g:multi_cursor_use_default_mapping=0 | |
let g:multi_cursor_next_key='<C-b>' | |
let g:multi_cursor_prev_key='<C-p>' | |
let g:multi_cursor_skip_key='<C-x>' | |
let g:multi_cursor_quit_key='<Esc>' | |
" easyalign configuration | |
xmap ga <Plug>(EasyAlign) | |
nmap ga <Plug>(EasyAlign) | |
" orgmode config | |
let g:org_todo_keywords=['GOAL', 'SCHEDULED', 'ACTIVE', 'TODO', 'DONE', 'PUNTED'] | |
let g:org_agenda_files=['~/.config/org/index.org'] | |
autocmd FileType org set expandtab | set shiftwidth=4 | set tabstop=4 | |
" ctrl-p configuration | |
let g:ctrlp_map = '<c-p>' | |
let g:ctrlp_cmd = 'CtrlPMixed' | |
let g:ctrlp_custom_ignore = '\v[\/](env_*|node_modules|\.(git|hg|svn))$' | |
" undotree | |
nnoremap <F5> :UndotreeToggle<cr> | |
" Disable ALE unless we need it | |
let g:ale_enabled=0 | |
" javascript lang-specific setup | |
augroup javascript_folding | |
au FileType javascript setlocal foldmethod=syntax | |
augroup END | |
let g:javascript_plugin_jsdoc = 1 | |
autocmd FileType javascript noremap <buffer> <c-f> :call JsxBeautify()<cr> | |
autocmd FileType json noremap <buffer> <c-f> :call JsonBeautify()<cr> | |
autocmd FileType jsx noremap <buffer> <c-f> :call JsxBeautify()<cr> | |
autocmd FileType html noremap <buffer> <c-f> :call HtmlBeautify()<cr> | |
autocmd FileType css noremap <buffer> <c-f> :call CSSBeautify()<cr> | |
let g:ale_linters = { | |
\ 'javascript': ['eslint'], | |
\ 'python': [] | |
\} | |
" 80/100 width color column | |
highlight ColorColumn ctermbg=black | |
set colorcolumn=80,100 | |
" CSS/SCSS color config | |
let g:Hexokinase_ftAutoload = ['css', 'xml', 'scss'] | |
" deoplete config | |
let g:deoplete#enable_at_startup = 1 | |
" haskell | |
au FileType haskell ALEEnable | |
" disable line numbers in terminal | |
autocmd TermOpen * setlocal nonumber norelativenumber | |
" for live notetaking - save on enter | |
command LiveSaving inoremap <enter> <Esc>:w<enter>A<enter> | |
" EJS template highlighting | |
au BufNewFile,BufRead *.ejs set filetype=html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment