Completely reset dotfiles (#2)
This commit is contained in:
parent
4abd1a6ffc
commit
bf26003ab3
38 changed files with 305 additions and 1101 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,2 +1,5 @@
|
||||||
|
*.swp
|
||||||
|
|
||||||
alacritty/.config/alacritty/alacritty.yml
|
alacritty/.config/alacritty/alacritty.yml
|
||||||
atomaka/.config/atomaka/color.yml
|
zsh/.config/zsh/.zcompdump
|
||||||
|
|
||||||
|
|
48
Makefile
48
Makefile
|
@ -1,25 +1,24 @@
|
||||||
STOWED = bin git ruby tmux vim zsh alacritty atomaka
|
STOWED = alacritty bin git ruby tmux vim zsh
|
||||||
|
|
||||||
all: install
|
all: install
|
||||||
|
|
||||||
install: vim-setup initialize-colors
|
install:
|
||||||
stow $(STOWED)
|
stow $(STOWED)
|
||||||
|
|
||||||
uninstall:
|
alacritty:
|
||||||
stow -D $(STOWED)
|
curl -fLo /tmp/alacritty.info https://raw.githubusercontent.com/alacritty/alacritty/master/extra/alacritty.info
|
||||||
|
sudo tic -xe alacritty,alacritty-direct /tmp/alacritty.info
|
||||||
|
toggle-color-bin
|
||||||
|
|
||||||
vim-setup:
|
javascript: nodenv-base nodenv-build
|
||||||
mkdir -p $$HOME/.vim/undo
|
|
||||||
if test ! -f ~/.vim/autoload/plug.vim ; then \
|
|
||||||
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
|
|
||||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim ; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
initialize-colors:
|
linux:
|
||||||
cat alacritty/.config/alacritty/alacritty-base.yml alacritty/.config/alacritty/themes/dark.yml > alacritty/.config/alacritty/alacritty.yml
|
sudo apt-get install direnv fzf silversearcher-ag stow tmux vim zsh
|
||||||
cp atomaka/.config/atomaka/color.sample.yml atomaka/.config/atomaka/color.yml
|
|
||||||
|
|
||||||
rbenv: rbenv-base rbenv-build
|
ruby: rbenv-base rbenv-build
|
||||||
|
|
||||||
|
vim:
|
||||||
|
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
|
|
||||||
rbenv-base:
|
rbenv-base:
|
||||||
if test ! -d ~/.rbenv ; then \
|
if test ! -d ~/.rbenv ; then \
|
||||||
|
@ -31,17 +30,12 @@ rbenv-build:
|
||||||
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build ; \
|
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build ; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
update: update-repo
|
nodenv-base:
|
||||||
|
if test ! -d ~/.nodenv ; then \
|
||||||
|
git clone https://github.com/nodenv/nodenv.git ~/.nodenv ; \
|
||||||
|
fi
|
||||||
|
|
||||||
update-repo:
|
nodenv-build:
|
||||||
git pull --rebase
|
if test ! -d ~/.nodenv ; then \
|
||||||
|
git clone https://github.com/nodenv/node-build.git ~/.nodenv/plugins/node-build ; \
|
||||||
clean:
|
fi
|
||||||
rm -f $$HOME/bin/,
|
|
||||||
bash remove-symlinks
|
|
||||||
|
|
||||||
mac:
|
|
||||||
sudo mv /etc/{zprofile,zprofile.old}
|
|
||||||
infocmp -x tmux-256color > ~/tmux-256color.src
|
|
||||||
sed -i "" -e "s/pairs#0x10000/pairs#0x1000/" ~/tmux-256color.src
|
|
||||||
/usr/bin/tic -x ~/tmux-256color.src
|
|
||||||
|
|
25
README.md
25
README.md
|
@ -1,25 +0,0 @@
|
||||||
# dotfiles
|
|
||||||
|
|
||||||
|
|
||||||
## Dependencies
|
|
||||||
|
|
||||||
* [stow](https://www.gnu.org/software/stow/)
|
|
||||||
* [tmux](https://github.com/tmux/tmux)
|
|
||||||
* [zsh](https://github.com/zsh-users/zsh)
|
|
||||||
* [neovim](https://github.com/neovim/neovim)
|
|
||||||
* [fzf](https://github.com/junegunn/fzf)
|
|
||||||
* [ag](https://github.com/ggreer/the_silver_searcher)
|
|
||||||
|
|
||||||
## Setup
|
|
||||||
|
|
||||||
* Install dependencies
|
|
||||||
* Clone this repository
|
|
||||||
* Run `make`
|
|
||||||
* Uses GNU stow to generate symlinks
|
|
||||||
* Config files must already exist
|
|
||||||
* Install vim plugins
|
|
||||||
|
|
||||||
```
|
|
||||||
nvim
|
|
||||||
,pi
|
|
||||||
```
|
|
|
@ -1,7 +1,3 @@
|
||||||
background_opacity: 0.9
|
background_opacity: 0.9
|
||||||
key_bindings:
|
|
||||||
- { key: Return, mods: Command, action: ToggleFullscreen }
|
|
||||||
font:
|
font:
|
||||||
size: 14
|
size: 14
|
||||||
env:
|
|
||||||
TERM: xterm-256color
|
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
# Colors (One Dark)
|
# Colors (Ayu Mirage)
|
||||||
colors:
|
colors:
|
||||||
# Default colors
|
# Default colors
|
||||||
primary:
|
primary:
|
||||||
background: '0x1e2127'
|
background: '#202734'
|
||||||
foreground: '0xabb2bf'
|
foreground: '#CBCCC6'
|
||||||
|
|
||||||
# Normal colors
|
# Normal colors
|
||||||
normal:
|
normal:
|
||||||
black: '0x1e2127'
|
black: '#191E2A'
|
||||||
red: '0xe06c75'
|
red: '#FF3333'
|
||||||
green: '0x98c379'
|
green: '#BAE67E'
|
||||||
yellow: '0xd19a66'
|
yellow: '#FFA759'
|
||||||
blue: '0x61afef'
|
blue: '#73D0FF'
|
||||||
magenta: '0xc678dd'
|
magenta: '#FFD580'
|
||||||
cyan: '0x56b6c2'
|
cyan: '#95E6CB'
|
||||||
white: '0xabb2bf'
|
white: '#C7C7C7'
|
||||||
|
|
||||||
# Bright colors
|
# Bright colors
|
||||||
bright:
|
bright:
|
||||||
black: '0x5c6370'
|
black: '#686868'
|
||||||
red: '0xe06c75'
|
red: '#F27983'
|
||||||
green: '0x98c379'
|
green: '#A6CC70'
|
||||||
yellow: '0xd19a66'
|
yellow: '#FFCC66'
|
||||||
blue: '0x61afef'
|
blue: '#5CCFE6'
|
||||||
magenta: '0xc678dd'
|
magenta: '#FFEE99'
|
||||||
cyan: '0x56b6c2'
|
cyan: '#95E6CB'
|
||||||
white: '0xffffff'
|
white: '#FFFFFF'
|
||||||
|
|
|
@ -1,24 +1,27 @@
|
||||||
|
# ayu-light
|
||||||
colors:
|
colors:
|
||||||
primary:
|
primary:
|
||||||
background: '0xf8f8f8'
|
background: '0xfafafa'
|
||||||
foreground: '0x2a2b33'
|
foreground: '0x5b6672'
|
||||||
|
|
||||||
|
# Normal colors
|
||||||
normal:
|
normal:
|
||||||
black: '0x000000'
|
black: '0x000000' #0
|
||||||
red: '0xde3d35'
|
red: '0xf2590b' #1
|
||||||
green: '0x3e953a'
|
green: '0x76cc00' #2
|
||||||
yellow: '0xd2b67b'
|
yellow: '0xf29717' #3
|
||||||
blue: '0x2f5af3'
|
blue: '0x41a5d9' #4
|
||||||
magenta: '0xa00095'
|
magenta: '0x9965cc' #5
|
||||||
cyan: '0x3e953a'
|
cyan: '0x4dbf98' #6
|
||||||
white: '0xbbbbbb'
|
white: '0xc7c7c7' #7
|
||||||
|
|
||||||
|
# Bright colors
|
||||||
bright:
|
bright:
|
||||||
black: '0x000000'
|
black: '0x676767'
|
||||||
red: '0xde3d35'
|
red: '0xd6646a' #9
|
||||||
green: '0x3e953a'
|
green: '0xa3d900' #10
|
||||||
yellow: '0xd2b67b'
|
yellow: '0xe7c446' #11
|
||||||
blue: '0x2f5af3'
|
blue: '0x6871ff' #12
|
||||||
magenta: '0xa00095'
|
magenta: '0xa37acc' #13
|
||||||
cyan: '0x3e953a'
|
cyan: '0x56d9ad' #14
|
||||||
white: '0xffffff'
|
white: '0xfeffff' #15
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
# Colors (Solarized Dark)
|
|
||||||
colors:
|
|
||||||
# Default colors
|
|
||||||
primary:
|
|
||||||
background: '0x002b36'
|
|
||||||
foreground: '0x839496'
|
|
||||||
|
|
||||||
# Normal colors
|
|
||||||
normal:
|
|
||||||
black: '0x073642'
|
|
||||||
red: '0xdc322f'
|
|
||||||
green: '0x859900'
|
|
||||||
yellow: '0xb58900'
|
|
||||||
blue: '0x268bd2'
|
|
||||||
magenta: '0xd33682'
|
|
||||||
cyan: '0x2aa198'
|
|
||||||
white: '0xeee8d5'
|
|
||||||
|
|
||||||
# Bright colors
|
|
||||||
bright:
|
|
||||||
black: '0x002b36'
|
|
||||||
red: '0xcb4b16'
|
|
||||||
green: '0x586e75'
|
|
||||||
yellow: '0x657b83'
|
|
||||||
blue: '0x839496'
|
|
||||||
magenta: '0x6c71c4'
|
|
||||||
cyan: '0x93a1a1'
|
|
||||||
white: '0xfdf6e3'
|
|
|
@ -1,28 +0,0 @@
|
||||||
# Colors (Solarized Light)
|
|
||||||
colors:
|
|
||||||
# Default colors
|
|
||||||
primary:
|
|
||||||
background: '0xfdf6e3'
|
|
||||||
foreground: '0x586e75'
|
|
||||||
|
|
||||||
# Normal colors
|
|
||||||
normal:
|
|
||||||
black: '0x073642'
|
|
||||||
red: '0xdc322f'
|
|
||||||
green: '0x859900'
|
|
||||||
yellow: '0xb58900'
|
|
||||||
blue: '0x268bd2'
|
|
||||||
magenta: '0xd33682'
|
|
||||||
cyan: '0x2aa198'
|
|
||||||
white: '0xeee8d5'
|
|
||||||
|
|
||||||
# Bright colors
|
|
||||||
bright:
|
|
||||||
black: '0x002b36'
|
|
||||||
red: '0xcb4b16'
|
|
||||||
green: '0x586e75'
|
|
||||||
yellow: '0x657b83'
|
|
||||||
blue: '0x839496'
|
|
||||||
magenta: '0x6c71c4'
|
|
||||||
cyan: '0x93a1a1'
|
|
||||||
white: '0xfdf6e3'
|
|
|
@ -1 +0,0 @@
|
||||||
dark
|
|
25
bin/bin/,
25
bin/bin/,
|
@ -1,25 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
function find-local-bin {
|
|
||||||
local readonly prefix=$1; shift
|
|
||||||
local bin_dir="$prefix-bin"
|
|
||||||
local found_bin_dir=""
|
|
||||||
|
|
||||||
current_dir=$(pwd)
|
|
||||||
found_bin_dir=$current_dir/$bin_dir
|
|
||||||
while [ ! -d $found_bin_dir ]; do
|
|
||||||
if [[ $current_dir == $HOME ]]; then
|
|
||||||
found_bin_dir=$HOME/bin
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
|
|
||||||
current_dir=$(realpath "$current_dir/..")
|
|
||||||
found_bin_dir=$current_dir/$bin_dir
|
|
||||||
done
|
|
||||||
|
|
||||||
echo $found_bin_dir
|
|
||||||
}
|
|
||||||
|
|
||||||
dir=$(find-local-bin aet)
|
|
||||||
|
|
||||||
exec $dir/$@
|
|
|
@ -1,99 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# This file echoes a bunch of 24-bit color codes
|
|
||||||
# to the terminal to demonstrate its functionality.
|
|
||||||
# The foreground escape sequence is ^[38;2;<r>;<g>;<b>m
|
|
||||||
# The background escape sequence is ^[48;2;<r>;<g>;<b>m
|
|
||||||
# <r> <g> <b> range from 0 to 255 inclusive.
|
|
||||||
# The escape sequence ^[0m returns output to default
|
|
||||||
|
|
||||||
setBackgroundColor()
|
|
||||||
{
|
|
||||||
echo -en "\x1b[48;2;$1;$2;$3""m"
|
|
||||||
}
|
|
||||||
|
|
||||||
resetOutput()
|
|
||||||
{
|
|
||||||
echo -en "\x1b[0m\n"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Gives a color $1/255 % along HSV
|
|
||||||
# Who knows what happens when $1 is outside 0-255
|
|
||||||
# Echoes "$red $green $blue" where
|
|
||||||
# $red $green and $blue are integers
|
|
||||||
# ranging between 0 and 255 inclusive
|
|
||||||
rainbowColor()
|
|
||||||
{
|
|
||||||
let h=$1/43
|
|
||||||
let f=$1-43*$h
|
|
||||||
let t=$f*255/43
|
|
||||||
let q=255-t
|
|
||||||
|
|
||||||
if [ $h -eq 0 ]
|
|
||||||
then
|
|
||||||
echo "255 $t 0"
|
|
||||||
elif [ $h -eq 1 ]
|
|
||||||
then
|
|
||||||
echo "$q 255 0"
|
|
||||||
elif [ $h -eq 2 ]
|
|
||||||
then
|
|
||||||
echo "0 255 $t"
|
|
||||||
elif [ $h -eq 3 ]
|
|
||||||
then
|
|
||||||
echo "0 $q 255"
|
|
||||||
elif [ $h -eq 4 ]
|
|
||||||
then
|
|
||||||
echo "$t 0 255"
|
|
||||||
elif [ $h -eq 5 ]
|
|
||||||
then
|
|
||||||
echo "255 0 $q"
|
|
||||||
else
|
|
||||||
# execution should never reach here
|
|
||||||
echo "0 0 0"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
for i in `seq 0 127`; do
|
|
||||||
setBackgroundColor $i 0 0
|
|
||||||
echo -en " "
|
|
||||||
done
|
|
||||||
resetOutput
|
|
||||||
for i in `seq 255 128`; do
|
|
||||||
setBackgroundColor $i 0 0
|
|
||||||
echo -en " "
|
|
||||||
done
|
|
||||||
resetOutput
|
|
||||||
|
|
||||||
for i in `seq 0 127`; do
|
|
||||||
setBackgroundColor 0 $i 0
|
|
||||||
echo -n " "
|
|
||||||
done
|
|
||||||
resetOutput
|
|
||||||
for i in `seq 255 128`; do
|
|
||||||
setBackgroundColor 0 $i 0
|
|
||||||
echo -n " "
|
|
||||||
done
|
|
||||||
resetOutput
|
|
||||||
|
|
||||||
for i in `seq 0 127`; do
|
|
||||||
setBackgroundColor 0 0 $i
|
|
||||||
echo -n " "
|
|
||||||
done
|
|
||||||
resetOutput
|
|
||||||
for i in `seq 255 128`; do
|
|
||||||
setBackgroundColor 0 0 $i
|
|
||||||
echo -n " "
|
|
||||||
done
|
|
||||||
resetOutput
|
|
||||||
|
|
||||||
for i in `seq 0 127`; do
|
|
||||||
setBackgroundColor `rainbowColor $i`
|
|
||||||
echo -n " "
|
|
||||||
done
|
|
||||||
resetOutput
|
|
||||||
for i in `seq 255 128`; do
|
|
||||||
setBackgroundColor `rainbowColor $i`
|
|
||||||
echo -n " "
|
|
||||||
done
|
|
||||||
resetOutput
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
for branch in $(git branch --all | grep '^\s*remotes' | egrep --invert-match '(:?HEAD|master)$'); do
|
|
||||||
git branch --track "${branch##*/}" "$branch"
|
|
||||||
done
|
|
|
@ -1,6 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
color_file=$HOME/.config/atomaka/color.yml
|
color_file=$HOME/.config/atomaka/color.yml
|
||||||
|
if ! test -f $color_file; then
|
||||||
|
mkdir -p $HOME/.config/atomaka
|
||||||
|
echo light > $color_file
|
||||||
|
fi
|
||||||
old_color=$(cat $color_file)
|
old_color=$(cat $color_file)
|
||||||
|
|
||||||
if [[ $old_color == "dark" ]]; then
|
if [[ $old_color == "dark" ]]; then
|
||||||
|
@ -16,7 +20,3 @@ echo $alacritty_header > $alacritty/alacritty.yml
|
||||||
cat $alacritty/alacritty-base.yml $alacritty/themes/$new_color.yml >> $alacritty/alacritty.yml
|
cat $alacritty/alacritty-base.yml $alacritty/themes/$new_color.yml >> $alacritty/alacritty.yml
|
||||||
|
|
||||||
echo $new_color > $color_file
|
echo $new_color > $color_file
|
||||||
|
|
||||||
if [[ $TMUX ]]; then
|
|
||||||
tmux source-file $HOME/.tmux/${new_color}.conf
|
|
||||||
fi
|
|
|
@ -1,8 +1,5 @@
|
||||||
*.sw?
|
*.sw?
|
||||||
*.o
|
|
||||||
*.exe
|
*.exe
|
||||||
*.stackdump
|
|
||||||
*.out
|
|
||||||
*.DS_Store
|
*.DS_Store
|
||||||
|
|
||||||
.envrc
|
.envrc
|
|
@ -1 +0,0 @@
|
||||||
*.yml.enc diff=enc
|
|
|
@ -1,60 +1,33 @@
|
||||||
[user]
|
|
||||||
email = atomaka@gmail.com
|
|
||||||
name = Andrew Tomaka
|
|
||||||
signingkey = 61209BF70A5B18BE
|
|
||||||
[github]
|
|
||||||
user = atomaka
|
|
||||||
|
|
||||||
[includeIf "gitdir:~/Source/benefitbay/"]
|
|
||||||
path = ~/.gitconfig_work
|
|
||||||
|
|
||||||
[apply]
|
|
||||||
whitespace = fix
|
|
||||||
[alias]
|
[alias]
|
||||||
fancy-graph = log --graph --decorate --pretty=oneline --abbrev-commit
|
fancy-graph = log --graph --decorate --pretty=oneline --abbrev-commit
|
||||||
hist = log --graph --pretty=format:'%Cred%h%Creset - %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
|
hist = log --graph --pretty=format:'%Cred%h%Creset - %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
|
||||||
hist-details = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
|
hist-details = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
|
||||||
hist-tags = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
|
hist-tags = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
|
||||||
most-recent-by-branch = for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
|
most-recent-by-branch = for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
|
||||||
undo = reset --soft HEAD^
|
|
||||||
[color]
|
|
||||||
ui = auto
|
|
||||||
[color "branch"]
|
|
||||||
current = yellow reverse
|
|
||||||
local = yellow
|
|
||||||
remote = green
|
|
||||||
[color "diff"]
|
|
||||||
frag = magenta
|
|
||||||
new = green
|
|
||||||
old = red
|
|
||||||
meta = yellow bold
|
|
||||||
[color "status"]
|
|
||||||
added = yellow
|
|
||||||
changed = green
|
|
||||||
untracked = cyan
|
|
||||||
[commit]
|
[commit]
|
||||||
gpgsign = true
|
gpgsign = true
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
autocrlf = input
|
autocrlf = input
|
||||||
excludesfile = ~/.gitignore_global
|
excludesfile = ~/.config/git/gitignore_global
|
||||||
attributesfile = ~/.gitattributes_global
|
|
||||||
filemode = false
|
[github]
|
||||||
|
username = atomaka
|
||||||
|
|
||||||
[gpg]
|
[gpg]
|
||||||
program = gpg
|
program = gpg
|
||||||
|
|
||||||
[merge]
|
[merge]
|
||||||
tool = vimdiff
|
tool = vimdiff
|
||||||
[push]
|
|
||||||
default = upstream
|
|
||||||
[status]
|
|
||||||
showUntrackedFiles = all
|
|
||||||
# show all files instead of just directories
|
|
||||||
[transfer]
|
|
||||||
fsckobjects = false
|
|
||||||
# https://groups.google.com/forum/#!topic/binary-transparency/f-BI4o8HZW0
|
|
||||||
[diff "enc"]
|
|
||||||
textconv = bundle exec rails encrypted:show
|
|
||||||
cachetextconv = false
|
|
||||||
[pull]
|
[pull]
|
||||||
rebase = false
|
rebase = false
|
||||||
[init]
|
|
||||||
defaultBranch = master
|
[status]
|
||||||
|
showUntrackedFiles = all
|
||||||
|
|
||||||
|
[user]
|
||||||
|
email = atomaka@gmail.com
|
||||||
|
name = Andrew Tomaka
|
||||||
|
signingkey = 61209BF70A5B18BE
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
[user]
|
|
||||||
email = andrew.tomaka@benefitbay.com
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
find $HOME -maxdepth 1 -type l | while IFS= read -r symlink; do
|
|
||||||
if readlink "$symlink" | grep -q 'dotfiles'; then
|
|
||||||
echo "removing $symlink"
|
|
||||||
rm "$symlink"
|
|
||||||
fi
|
|
||||||
done
|
|
|
@ -1,67 +0,0 @@
|
||||||
# Reconstructed via infocmp from file: /Users/atomaka/.terminfo/74/tmux-256color
|
|
||||||
tmux-256color|tmux with 256 colors,
|
|
||||||
OTbs, OTpt, am, hs, km, mir, msgr, xenl, AX, G0,
|
|
||||||
colors#256, cols#80, it#8, lines#24, pairs#4096, U8#1,
|
|
||||||
acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
|
|
||||||
bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
|
|
||||||
clear=\E[H\E[J, cnorm=\E[34h\E[?25h, cr=^M,
|
|
||||||
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
|
|
||||||
cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
|
|
||||||
cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\EM,
|
|
||||||
cvvis=\E[34l, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m,
|
|
||||||
dl=\E[%p1%dM, dl1=\E[M, dsl=\E]0;\007, ed=\E[J, el=\E[K,
|
|
||||||
el1=\E[1K, enacs=\E(B\E)0, flash=\Eg, fsl=^G, home=\E[H,
|
|
||||||
hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@,
|
|
||||||
il=\E[%p1%dL, il1=\E[L, ind=^J, indn=\E[%p1%dS,
|
|
||||||
invis=\E[8m, is2=\E)0, kDC=\E[3;2~, kEND=\E[1;2F,
|
|
||||||
kHOM=\E[1;2H, kIC=\E[2;2~, kLFT=\E[1;2D, kNXT=\E[6;2~,
|
|
||||||
kPRV=\E[5;2~, kRIT=\E[1;2C, kbs=^H, kcbt=\E[Z, kcub1=\EOD,
|
|
||||||
kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kdch1=\E[3~,
|
|
||||||
kend=\E[4~, kf1=\EOP, kf10=\E[21~, kf11=\E[23~,
|
|
||||||
kf12=\E[24~, kf13=\E[1;2P, kf14=\E[1;2Q, kf15=\E[1;2R,
|
|
||||||
kf16=\E[1;2S, kf17=\E[15;2~, kf18=\E[17;2~,
|
|
||||||
kf19=\E[18;2~, kf2=\EOQ, kf20=\E[19;2~, kf21=\E[20;2~,
|
|
||||||
kf22=\E[21;2~, kf23=\E[23;2~, kf24=\E[24;2~,
|
|
||||||
kf25=\E[1;5P, kf26=\E[1;5Q, kf27=\E[1;5R, kf28=\E[1;5S,
|
|
||||||
kf29=\E[15;5~, kf3=\EOR, kf30=\E[17;5~, kf31=\E[18;5~,
|
|
||||||
kf32=\E[19;5~, kf33=\E[20;5~, kf34=\E[21;5~,
|
|
||||||
kf35=\E[23;5~, kf36=\E[24;5~, kf37=\E[1;6P, kf38=\E[1;6Q,
|
|
||||||
kf39=\E[1;6R, kf4=\EOS, kf40=\E[1;6S, kf41=\E[15;6~,
|
|
||||||
kf42=\E[17;6~, kf43=\E[18;6~, kf44=\E[19;6~,
|
|
||||||
kf45=\E[20;6~, kf46=\E[21;6~, kf47=\E[23;6~,
|
|
||||||
kf48=\E[24;6~, kf49=\E[1;3P, kf5=\E[15~, kf50=\E[1;3Q,
|
|
||||||
kf51=\E[1;3R, kf52=\E[1;3S, kf53=\E[15;3~, kf54=\E[17;3~,
|
|
||||||
kf55=\E[18;3~, kf56=\E[19;3~, kf57=\E[20;3~,
|
|
||||||
kf58=\E[21;3~, kf59=\E[23;3~, kf6=\E[17~, kf60=\E[24;3~,
|
|
||||||
kf61=\E[1;4P, kf62=\E[1;4Q, kf63=\E[1;4R, kf7=\E[18~,
|
|
||||||
kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~,
|
|
||||||
kind=\E[1;2B, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
|
|
||||||
kri=\E[1;2A, nel=\EE, op=\E[39;49m, rc=\E8, rev=\E[7m,
|
|
||||||
ri=\EM, ritm=\E[23m, rmacs=^O, rmcup=\E[?1049l, rmir=\E[4l,
|
|
||||||
rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m,
|
|
||||||
rs2=\Ec\E[?1000l\E[?25h, sc=\E7,
|
|
||||||
setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m,
|
|
||||||
setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
|
|
||||||
sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
|
|
||||||
sgr0=\E[m\017, sitm=\E[3m, smacs=^N, smcup=\E[?1049h,
|
|
||||||
smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m,
|
|
||||||
tbc=\E[3g, tsl=\E]0;, vpa=\E[%i%p1%dd, Cr=\E]112\007,
|
|
||||||
Cs=\E]12;%p1%s\007, E0=\E(B, E3=\E[3J,
|
|
||||||
Ms=\E]52;%p1%s;%p2%s\007, S0=\E(%p1%c, Se=\E[2 q,
|
|
||||||
Smulx=\E[4\:%p1%dm, Ss=\E[%p1%d q, TS=\E]0;,
|
|
||||||
kDC3=\E[3;3~, kDC4=\E[3;4~, kDC5=\E[3;5~, kDC6=\E[3;6~,
|
|
||||||
kDC7=\E[3;7~, kDN=\E[1;2B, kDN3=\E[1;3B, kDN4=\E[1;4B,
|
|
||||||
kDN5=\E[1;5B, kDN6=\E[1;6B, kDN7=\E[1;7B, kEND3=\E[1;3F,
|
|
||||||
kEND4=\E[1;4F, kEND5=\E[1;5F, kEND6=\E[1;6F,
|
|
||||||
kEND7=\E[1;7F, kHOM3=\E[1;3H, kHOM4=\E[1;4H,
|
|
||||||
kHOM5=\E[1;5H, kHOM6=\E[1;6H, kHOM7=\E[1;7H,
|
|
||||||
kIC3=\E[2;3~, kIC4=\E[2;4~, kIC5=\E[2;5~, kIC6=\E[2;6~,
|
|
||||||
kIC7=\E[2;7~, kLFT3=\E[1;3D, kLFT4=\E[1;4D,
|
|
||||||
kLFT5=\E[1;5D, kLFT6=\E[1;6D, kLFT7=\E[1;7D,
|
|
||||||
kNXT3=\E[6;3~, kNXT4=\E[6;4~, kNXT5=\E[6;5~,
|
|
||||||
kNXT6=\E[6;6~, kNXT7=\E[6;7~, kPRV3=\E[5;3~,
|
|
||||||
kPRV4=\E[5;4~, kPRV5=\E[5;5~, kPRV6=\E[5;6~,
|
|
||||||
kPRV7=\E[5;7~, kRIT3=\E[1;3C, kRIT4=\E[1;4C,
|
|
||||||
kRIT5=\E[1;5C, kRIT6=\E[1;6C, kRIT7=\E[1;7C, kUP=\E[1;2A,
|
|
||||||
kUP3=\E[1;3A, kUP4=\E[1;4A, kUP5=\E[1;5A, kUP6=\E[1;6A,
|
|
||||||
kUP7=\E[1;7A, rmxx=\E[29m, smxx=\E[9m,
|
|
35
tmux/.config/tmux/tmux.conf
Normal file
35
tmux/.config/tmux/tmux.conf
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
bind-key r source-file ~/.config/tmux/tmux.conf \; display-message " ✱ tmux.conf is reloaded"
|
||||||
|
|
||||||
|
# for muxception
|
||||||
|
bind-key b send-prefix
|
||||||
|
|
||||||
|
set -g automatic-rename off
|
||||||
|
set -g renumber-windows on
|
||||||
|
set-option -sg escape-time 10
|
||||||
|
set-option -g base-index 1
|
||||||
|
set-window-option -g monitor-activity off
|
||||||
|
set-window-option -g pane-base-index 1
|
||||||
|
|
||||||
|
bind-key C-b last-window
|
||||||
|
|
||||||
|
bind < resize-pane -L 10
|
||||||
|
bind > resize-pane -R 10
|
||||||
|
bind - resize-pane -D 10
|
||||||
|
bind + resize-pane -U 10
|
||||||
|
|
||||||
|
# status bar stuff
|
||||||
|
set -g status on
|
||||||
|
set -g status-left '#H '
|
||||||
|
set-option -g status-right '%Y-%m-%d @ %k:%M'
|
||||||
|
|
||||||
|
# be more like vim
|
||||||
|
set-window-option -g mode-keys vi
|
||||||
|
|
||||||
|
unbind c; bind c new-window -c "#{pane_current_path}"
|
||||||
|
bind s split-window -v -c "#{pane_current_path}"
|
||||||
|
bind v split-window -h -c "#{pane_current_path}"
|
||||||
|
|
||||||
|
bind h select-pane -L # left pane
|
||||||
|
bind j select-pane -D # bottom pane
|
||||||
|
bind k select-pane -U # top pane
|
||||||
|
bind l select-pane -R # right pane
|
|
@ -1,70 +0,0 @@
|
||||||
# for setting up
|
|
||||||
bind-key r source-file ~/.tmux.conf \; display-message " ✱ ~/.tmux.conf is reloaded"
|
|
||||||
|
|
||||||
# fixup some colors
|
|
||||||
set -g default-terminal "tmux-256color"
|
|
||||||
set -ag terminal-overrides ",xterm-256color:RGB"
|
|
||||||
|
|
||||||
set-option -g default-shell /opt/homebrew/bin/zsh
|
|
||||||
|
|
||||||
# faster escaping? From neovim CheckHealth
|
|
||||||
set-option -sg escape-time 10
|
|
||||||
|
|
||||||
# double tap for back and forth
|
|
||||||
bind-key C-b last-window
|
|
||||||
|
|
||||||
# for muxception
|
|
||||||
bind-key b send-prefix
|
|
||||||
|
|
||||||
# close window
|
|
||||||
bind q confirm kill-window
|
|
||||||
|
|
||||||
# clear history
|
|
||||||
bind -n C-g clear-history
|
|
||||||
|
|
||||||
# 0 is way over there
|
|
||||||
set-option -g base-index 1
|
|
||||||
setw -g pane-base-index 1
|
|
||||||
|
|
||||||
# history should be longer
|
|
||||||
set -g history-limit 100000
|
|
||||||
|
|
||||||
# no autorename
|
|
||||||
set -g automatic-rename off
|
|
||||||
|
|
||||||
# renumber windows
|
|
||||||
set -g renumber-windows on
|
|
||||||
|
|
||||||
# move windows around
|
|
||||||
bind H swap-window -t -1
|
|
||||||
bind L swap-window -t +1
|
|
||||||
|
|
||||||
# activity stuff
|
|
||||||
set-window-option -g monitor-activity off
|
|
||||||
|
|
||||||
# copy mode stuff
|
|
||||||
set-window-option -g mode-keys vi # emulate vim movement in copy mode
|
|
||||||
|
|
||||||
# be more like vim
|
|
||||||
bind h select-pane -L # left pane
|
|
||||||
bind j select-pane -D # bottom pane
|
|
||||||
bind k select-pane -U # top pane
|
|
||||||
bind l select-pane -R # right pane
|
|
||||||
|
|
||||||
bind < resize-pane -L 10
|
|
||||||
bind > resize-pane -R 10
|
|
||||||
bind - resize-pane -D 10
|
|
||||||
bind + resize-pane -U 10
|
|
||||||
|
|
||||||
# status bar stuff
|
|
||||||
set -g status on
|
|
||||||
set -g status-left '#[fg=green]#H'
|
|
||||||
set-option -g status-right '%Y-%m-%d @ %k:%M'
|
|
||||||
|
|
||||||
# 1.9 stuff moved in here
|
|
||||||
unbind c; bind c new-window -c "#{pane_current_path}"
|
|
||||||
bind s split-window -v -c "#{pane_current_path}"
|
|
||||||
bind v split-window -h -c "#{pane_current_path}"
|
|
||||||
|
|
||||||
# load current scheme
|
|
||||||
run-shell "bash ~/.tmux/startup"
|
|
|
@ -1,29 +0,0 @@
|
||||||
#### COLOUR (Solarized dark)
|
|
||||||
|
|
||||||
# default statusbar colors
|
|
||||||
set-option -g status-style fg=yellow,bg=black #yellow and base02
|
|
||||||
|
|
||||||
# default window title colors
|
|
||||||
set-window-option -g window-status-style fg=brightblue,bg=default #base0 and default
|
|
||||||
#set-window-option -g window-status-style dim
|
|
||||||
|
|
||||||
# active window title colors
|
|
||||||
set-window-option -g window-status-current-style fg=brightred,bg=default #orange and default
|
|
||||||
#set-window-option -g window-status-current-style bright
|
|
||||||
|
|
||||||
# pane border
|
|
||||||
set-option -g pane-border-style fg=black #base02
|
|
||||||
set-option -g pane-active-border-style fg=brightgreen #base01
|
|
||||||
|
|
||||||
# message text
|
|
||||||
set-option -g message-style fg=brightred,bg=black #orange and base01
|
|
||||||
|
|
||||||
# pane number display
|
|
||||||
set-option -g display-panes-active-colour blue #blue
|
|
||||||
set-option -g display-panes-colour brightred #orange
|
|
||||||
|
|
||||||
# clock
|
|
||||||
set-window-option -g clock-mode-colour green #green
|
|
||||||
|
|
||||||
# bell
|
|
||||||
set-window-option -g window-status-bell-style fg=black,bg=red #base02, red
|
|
|
@ -1,29 +0,0 @@
|
||||||
#### COLOUR (Solarized light)
|
|
||||||
|
|
||||||
# default statusbar colors
|
|
||||||
set-option -g status-style fg=yellow,bg=white #yellow and base2
|
|
||||||
|
|
||||||
# default window title colors
|
|
||||||
set-window-option -g window-status-style fg=brightyellow,bg=default #base0 and default
|
|
||||||
#set-window-option -g window-status-style dim
|
|
||||||
|
|
||||||
# active window title colors
|
|
||||||
set-window-option -g window-status-current-style fg=brightred,bg=default #orange and default
|
|
||||||
#set-window-option -g window-status-current-style bright
|
|
||||||
|
|
||||||
# pane border
|
|
||||||
set-option -g pane-border-style fg=white #base2
|
|
||||||
set-option -g pane-active-border-style fg=brightcyan #base1
|
|
||||||
|
|
||||||
# message text
|
|
||||||
set-option -g message-style fg=brightred,bg=white #orange and base2
|
|
||||||
|
|
||||||
# pane number display
|
|
||||||
set-option -g display-panes-active-colour blue #blue
|
|
||||||
set-option -g display-panes-colour brightred #orange
|
|
||||||
|
|
||||||
# clock
|
|
||||||
set-window-option -g clock-mode-colour green #green
|
|
||||||
|
|
||||||
# bell
|
|
||||||
set-window-option -g window-status-bell-style fg=white,bg=red #base2, red
|
|
|
@ -1,29 +0,0 @@
|
||||||
#### COLOUR (Solarized dark)
|
|
||||||
|
|
||||||
# default statusbar colors
|
|
||||||
set-option -g status-style fg=yellow,bg=black #yellow and base02
|
|
||||||
|
|
||||||
# default window title colors
|
|
||||||
set-window-option -g window-status-style fg=brightblue,bg=default #base0 and default
|
|
||||||
#set-window-option -g window-status-style dim
|
|
||||||
|
|
||||||
# active window title colors
|
|
||||||
set-window-option -g window-status-current-style fg=brightred,bg=default #orange and default
|
|
||||||
#set-window-option -g window-status-current-style bright
|
|
||||||
|
|
||||||
# pane border
|
|
||||||
set-option -g pane-border-style fg=black #base02
|
|
||||||
set-option -g pane-active-border-style fg=brightgreen #base01
|
|
||||||
|
|
||||||
# message text
|
|
||||||
set-option -g message-style fg=brightred,bg=black #orange and base01
|
|
||||||
|
|
||||||
# pane number display
|
|
||||||
set-option -g display-panes-active-colour blue #blue
|
|
||||||
set-option -g display-panes-colour brightred #orange
|
|
||||||
|
|
||||||
# clock
|
|
||||||
set-window-option -g clock-mode-colour green #green
|
|
||||||
|
|
||||||
# bell
|
|
||||||
set-window-option -g window-status-bell-style fg=black,bg=red #base02, red
|
|
|
@ -1,29 +0,0 @@
|
||||||
#### COLOUR (Solarized light)
|
|
||||||
|
|
||||||
# default statusbar colors
|
|
||||||
set-option -g status-style fg=yellow,bg=white #yellow and base2
|
|
||||||
|
|
||||||
# default window title colors
|
|
||||||
set-window-option -g window-status-style fg=brightyellow,bg=default #base0 and default
|
|
||||||
#set-window-option -g window-status-style dim
|
|
||||||
|
|
||||||
# active window title colors
|
|
||||||
set-window-option -g window-status-current-style fg=brightred,bg=default #orange and default
|
|
||||||
#set-window-option -g window-status-current-style bright
|
|
||||||
|
|
||||||
# pane border
|
|
||||||
set-option -g pane-border-style fg=white #base2
|
|
||||||
set-option -g pane-active-border-style fg=brightcyan #base1
|
|
||||||
|
|
||||||
# message text
|
|
||||||
set-option -g message-style fg=brightred,bg=white #orange and base2
|
|
||||||
|
|
||||||
# pane number display
|
|
||||||
set-option -g display-panes-active-colour blue #blue
|
|
||||||
set-option -g display-panes-colour brightred #orange
|
|
||||||
|
|
||||||
# clock
|
|
||||||
set-window-option -g clock-mode-colour green #green
|
|
||||||
|
|
||||||
# bell
|
|
||||||
set-window-option -g window-status-bell-style fg=white,bg=red #base2, red
|
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
startup_color=$(cat $HOME/.config/atomaka/color.yml)
|
|
||||||
|
|
||||||
tmux source-file $HOME/.tmux/$startup_color.conf
|
|
0
vim/.config/vim/undo/.gitinclude
Normal file
0
vim/.config/vim/undo/.gitinclude
Normal file
202
vim/.vimrc
202
vim/.vimrc
|
@ -1,112 +1,51 @@
|
||||||
" PLUGINS
|
|
||||||
call plug#begin('~/.vim/plugged')
|
call plug#begin('~/.vim/plugged')
|
||||||
|
|
||||||
" colors
|
Plug 'chrisbra/matchit'
|
||||||
Plug 'altercation/vim-colors-solarized'
|
Plug 'junegunn/fzf'
|
||||||
Plug 'rakr/vim-one'
|
|
||||||
|
|
||||||
" keepers
|
|
||||||
Plug 'airblade/vim-gitgutter'
|
|
||||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
|
||||||
Plug 'junegunn/fzf.vim'
|
|
||||||
Plug 'ntpeters/vim-better-whitespace'
|
|
||||||
Plug 'moll/vim-bbye'
|
Plug 'moll/vim-bbye'
|
||||||
Plug 'tpope/vim-eunuch' " move files
|
Plug 'ntpeters/vim-better-whitespace'
|
||||||
Plug 'tpope/vim-fugitive'
|
Plug 'tpope/vim-eunuch'
|
||||||
Plug 'tpope/vim-fugitive'
|
|
||||||
Plug 'tpope/vim-surround'
|
Plug 'tpope/vim-surround'
|
||||||
Plug 'troydm/zoomwintab.vim'
|
Plug 'troydm/zoomwintab.vim'
|
||||||
Plug 'chrisbra/matchit'
|
|
||||||
|
|
||||||
" languages
|
" languages
|
||||||
Plug 'leafgarland/typescript-vim'
|
|
||||||
Plug 'tpope/vim-markdown'
|
|
||||||
Plug 'tpope/vim-rails'
|
Plug 'tpope/vim-rails'
|
||||||
Plug 'vim-ruby/vim-ruby'
|
Plug 'vim-ruby/vim-ruby'
|
||||||
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
|
|
||||||
Plug 'hashivim/vim-terraform'
|
|
||||||
|
|
||||||
" Testing
|
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
|
" SETTINGS
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
|
|
||||||
" STATUS LINE
|
|
||||||
set statusline=
|
|
||||||
set statusline+=%<\ %f%{ZoomState()}
|
|
||||||
set statusline+=\ %m%r%y%w%= " what am i doing here
|
|
||||||
set statusline+=\ Line:\ %l\/%L\ [%p%%]
|
|
||||||
set statusline+=\ Col:\ %v
|
|
||||||
set statusline+=\ Buf:\ #%n
|
|
||||||
set statusline+=\ " trailing space is with purpose
|
|
||||||
|
|
||||||
" OPTIONS
|
|
||||||
set fileformats=unix,mac,dos " File format prefer unix endings
|
|
||||||
set endofline " Add newline at end of file
|
|
||||||
set shellslash " Forward slashes
|
|
||||||
set nobackup " No backup files
|
|
||||||
set noswapfile " Hope for the best
|
|
||||||
set formatoptions=crq
|
|
||||||
set textwidth=80
|
|
||||||
set cpoptions+=$ " delimit end of change text
|
|
||||||
set laststatus=2 " Always show status line
|
|
||||||
set showmode " Show current mode
|
|
||||||
set history=100 " History length
|
|
||||||
set nowrap " Disable wrapping by default
|
|
||||||
set backspace=2 " Backspace over indent, eol, start of insert
|
set backspace=2 " Backspace over indent, eol, start of insert
|
||||||
set hlsearch " Search highlights
|
set cpoptions+=$ " delimit end of change text
|
||||||
set wrapscan " Wrapped search
|
set endofline " Add newline to end of file
|
||||||
set incsearch " Search as you type
|
set nobackup
|
||||||
set ignorecase " Ignore case with search
|
set noswapfile
|
||||||
set smartcase " Search will not ignore uppercase
|
set nowrap " Disable wrapping by default
|
||||||
set showcmd " Show command as you type
|
|
||||||
set ruler " Show cursor position
|
|
||||||
set autoindent " autoindent AND be smart about it
|
|
||||||
set smartindent
|
|
||||||
set colorcolumn=80,120 " Ruler at line 80, 120
|
|
||||||
set nomodeline
|
|
||||||
set relativenumber " Relative line numbers
|
|
||||||
set number
|
|
||||||
set virtualedit=all " Cursor can go anywhere
|
|
||||||
set scrolloff=3 " Keep cursor from touching edges
|
set scrolloff=3 " Keep cursor from touching edges
|
||||||
|
set showmode " Show current mode
|
||||||
set timeoutlen=500 " Don't wait too long (ambiguous leaders)
|
set timeoutlen=500 " Don't wait too long (ambiguous leaders)
|
||||||
set showmatch " Show matching brackets
|
set virtualedit=all " Cursor can go anywhere
|
||||||
set hidden " Allow unsaved buffers to be hidden
|
|
||||||
set wildcharm=<tab> " Allow use of tab in macros
|
set hlsearch " Search highlights
|
||||||
set wildmenu " Command line completion
|
set ignorecase " Ignore case with search
|
||||||
set wildmode=list:longest,full " Better file completion
|
set incsearch " Search as you type
|
||||||
set infercase " Adjust completions to match case
|
set smartcase " Search will not ignore uppercase
|
||||||
set wildignorecase " Ignore case on commandline
|
set wrapscan " Wrapped search
|
||||||
set autowrite " Save file when focus is lost
|
|
||||||
set updatetime=250 " Make gitgutter autoupdate
|
set number
|
||||||
|
set relativenumber " Relative line numbers
|
||||||
|
|
||||||
|
set textwidth=80
|
||||||
|
set colorcolumn=80,120 " Ruler at line 80, 120
|
||||||
|
|
||||||
" Tabs are 2 spaces
|
" Tabs are 2 spaces
|
||||||
set tabstop=2
|
set tabstop=2
|
||||||
set softtabstop=2
|
set softtabstop=2
|
||||||
set shiftwidth=2
|
set shiftwidth=2
|
||||||
set expandtab
|
set expandtab
|
||||||
set shiftround " make >> go to next tab
|
set shiftround " make >> go to next tab
|
||||||
" some performance stuff
|
|
||||||
set lazyredraw
|
|
||||||
set ttyfast
|
|
||||||
set synmaxcol=256
|
|
||||||
" Show whitespace markers before cursor in insert mode
|
|
||||||
set list listchars=tab:\ \ ,trail:·
|
|
||||||
" Ignore stuff
|
|
||||||
set wildignore+=*/\.git/*
|
|
||||||
" Java
|
|
||||||
" set wildignore+=*/build/*,*/grade/*,*\.class
|
|
||||||
" Frontend
|
|
||||||
set wildignore+=*/node_modules/*,*/bower_components/*,*/dist/*
|
|
||||||
" Persistent undo stuff
|
|
||||||
if has('persistent_undo')
|
|
||||||
set undolevels=5000
|
|
||||||
set undodir=$HOME/.vim/undo
|
|
||||||
set undofile
|
|
||||||
endif
|
|
||||||
|
|
||||||
" KEYBINDS
|
|
||||||
" quick replaceement
|
|
||||||
nmap S :%s//g<LEFT><LEFT>
|
|
||||||
|
|
||||||
" consistency is key - Y should act like C, D
|
" consistency is key - Y should act like C, D
|
||||||
map Y y$
|
map Y y$
|
||||||
|
@ -115,70 +54,51 @@ map Y y$
|
||||||
vnoremap > >gv
|
vnoremap > >gv
|
||||||
vnoremap < <gv
|
vnoremap < <gv
|
||||||
|
|
||||||
" Make fzf act like ctrlp
|
" typo-city
|
||||||
nnoremap <C-p> :Files<CR>
|
:command W w
|
||||||
|
:command Wq wq
|
||||||
|
|
||||||
" ZoomWin
|
" quick replaceement
|
||||||
nnoremap <C-w>z :ZoomWinTabToggle<CR>
|
nmap S :%s//g<LEFT><LEFT>
|
||||||
nnoremap <C-w><C-z> :ZoomWinTabToggle<CR>
|
|
||||||
|
|
||||||
" Fugitive
|
|
||||||
autocmd FileType fugitiveblame nmap <buffer> q gq
|
|
||||||
command! Gblame :G blame
|
|
||||||
|
|
||||||
" LEADERS
|
" LEADERS
|
||||||
let mapleader = ","
|
let mapleader = ","
|
||||||
|
|
||||||
" tab swaps
|
map <Leader>sz :so ~/.vimrc<cr>
|
||||||
map <Leader>2 :set tabstop=2 softtabstop=2 shiftwidth=2 expandtab<cr>
|
|
||||||
map <Leader>4 :set tabstop=4 softtabstop=4 shiftwidth=4 expandtab<cr>
|
|
||||||
map <Leader>a :set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab<cr>
|
|
||||||
|
|
||||||
" plugin
|
" copy/paste (system buffer)
|
||||||
|
map <Leader>cp "+y
|
||||||
|
map <Leader>pa "+p
|
||||||
|
|
||||||
|
" clear search
|
||||||
|
map <Leader>cs :let @/ = ""<cr>
|
||||||
|
|
||||||
|
" github
|
||||||
|
map <Leader>gg :exe "!hub gist create -o %:p"<cr><cr>
|
||||||
|
|
||||||
|
" PLUGIN CONFIGURATION
|
||||||
|
" fzf
|
||||||
|
let $FZF_DEFAULT_COMMAND = 'ag --hidden --ignore .git -g ""'
|
||||||
|
noremap <C-p> :FZF<CR>
|
||||||
|
|
||||||
|
" vim-bbye
|
||||||
|
nnoremap <silent> <Leader>bd :Bdelete<CR>
|
||||||
|
|
||||||
|
" vim-better-whitespace
|
||||||
|
highlight ExtraWhitespace ctermbg=red
|
||||||
|
map <Leader>fw :StripWhitespace<cr>
|
||||||
|
|
||||||
|
" vim-eunuch
|
||||||
|
map <Leader>sa :Move %<tab>
|
||||||
|
|
||||||
|
" vim-plug
|
||||||
map <Leader>pc :PlugClean<cr>
|
map <Leader>pc :PlugClean<cr>
|
||||||
map <Leader>pi :PlugInstall<cr>
|
map <Leader>pi :PlugInstall<cr>
|
||||||
map <Leader>pu :PlugUpdate<cr>
|
map <Leader>pu :PlugUpdate<cr>
|
||||||
|
|
||||||
" clear search
|
" zoomwintab
|
||||||
map <Leader>cs :let @/ = ""<cr>
|
nnoremap <C-w>z :ZoomWinTabToggle<CR>
|
||||||
" bclose
|
nnoremap <C-w><C-z> :ZoomWinTabToggle<CR>
|
||||||
nnoremap <silent> <Leader>bd :Bdelete<CR>
|
|
||||||
|
|
||||||
" other
|
|
||||||
map <Leader>cp "+y
|
|
||||||
map <Leader>pa "+p
|
|
||||||
map <Leader>fj :%!python -m json.tool<cr>
|
|
||||||
map <Leader>fw :StripWhitespace<cr>
|
|
||||||
map <Leader>gg :exe "!hub gist create -o %:p"<cr><cr>
|
|
||||||
map <Leader>gi :GoImports<cr>
|
|
||||||
map <Leader>pm :set paste!<cr>
|
|
||||||
map <Leader>sa :Move %<tab>
|
|
||||||
map <Leader>sb :exe "!code --goto %:p:" . line(".")<cr><cr>
|
|
||||||
map <Leader>se :e ~/.vimrc<cr>
|
|
||||||
map <Leader>sc :pclose<cr>
|
|
||||||
map <Leader>sw :SudoWrite<cr>
|
|
||||||
map <Leader>sz :so ~/.vimrc<cr>
|
|
||||||
|
|
||||||
" PLUGIN CONFIGURATION
|
|
||||||
set cursorline " Highlight current line
|
|
||||||
set cursorcolumn " Highlight current column
|
|
||||||
|
|
||||||
let &t_8f = "\<Esc>[38:2:%lu:%lu:%lum"
|
|
||||||
let &t_8b = "\<Esc>[48:2:%lu:%lu:%lum"
|
|
||||||
set termguicolors
|
|
||||||
syntax enable
|
|
||||||
colorscheme one
|
|
||||||
|
|
||||||
highlight ExtraWhitespace ctermbg=196
|
|
||||||
|
|
||||||
" fzf
|
|
||||||
let $FZF_DEFAULT_COMMAND = 'ag --hidden --ignore .git -g ""'
|
|
||||||
let g:fzf_preview_window = []
|
|
||||||
|
|
||||||
" terraform
|
|
||||||
let g:terraform_align=1
|
|
||||||
|
|
||||||
" ZoomWin
|
|
||||||
function! ZoomState()
|
function! ZoomState()
|
||||||
if exists('t:zoomwintab')
|
if exists('t:zoomwintab')
|
||||||
return 'Z'
|
return 'Z'
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
alias google-chrome="open -a Google\ Chrome"
|
|
||||||
alias fixbar="killall ControlStrip"
|
|
32
zsh/.config/zsh/.zshrc
Normal file
32
zsh/.config/zsh/.zshrc
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
typeset -U PATH
|
||||||
|
|
||||||
|
source $ZDOTDIR/aliases
|
||||||
|
source $ZDOTDIR/functions
|
||||||
|
|
||||||
|
source $ZDOTDIR/prompt
|
||||||
|
|
||||||
|
# Larger history
|
||||||
|
HISTSIZE=20000
|
||||||
|
HISTFILE=~/.zsh_history
|
||||||
|
SAVEHIST=20000
|
||||||
|
|
||||||
|
# be like vim
|
||||||
|
bindkey -v
|
||||||
|
|
||||||
|
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
|
||||||
|
|
||||||
|
setopt auto_cd
|
||||||
|
|
||||||
|
if which direnv > /dev/null; then
|
||||||
|
eval "$(direnv hook zsh)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if which rbenv > /dev/null; then
|
||||||
|
eval "$(rbenv init --no-rehash -)"
|
||||||
|
(rbenv rehash &) 2> /dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
if which nodenv > /dev/null; then
|
||||||
|
eval "$(nodenv init --no-rehash -)"
|
||||||
|
(nodenv rehash &) 2> /dev/null
|
||||||
|
fi
|
|
@ -1,9 +1,4 @@
|
||||||
alias zbm="/usr/bin/time zsh -i -c exit"
|
|
||||||
|
|
||||||
alias ..="cd .."
|
alias ..="cd .."
|
||||||
alias ...="cd ../.."
|
|
||||||
alias ....="cd ../../.."
|
|
||||||
alias .....="cd ../../../.."
|
|
||||||
alias a="ls -l --human-readable --all --color=auto"
|
alias a="ls -l --human-readable --all --color=auto"
|
||||||
alias agc="ag-count"
|
alias agc="ag-count"
|
||||||
alias agh="ag --hidden"
|
alias agh="ag --hidden"
|
||||||
|
@ -14,21 +9,16 @@ alias be="bundle exec"
|
||||||
alias bea="bundle exec rails"
|
alias bea="bundle exec rails"
|
||||||
alias ber="bundle exec rake"
|
alias ber="bundle exec rake"
|
||||||
alias bet="test-rails"
|
alias bet="test-rails"
|
||||||
alias betd="bundle exec rspec --format documentation"
|
|
||||||
alias c="clear"
|
alias c="clear"
|
||||||
alias dc="docker compose"
|
alias cs="toggle-color-mode"
|
||||||
alias dft="docker run --rm --privileged alpine hwclock -s"
|
alias dc="docker-compose-call"
|
||||||
alias g="g" # overwrite g alias in git plugin so function will work
|
alias g="g" # overwrite g alias
|
||||||
alias ga="git add"
|
alias ga="git add"
|
||||||
alias gaa="git add --all"
|
alias gaa="git add --all"
|
||||||
alias gap="git add --patch"
|
alias gap="git add --patch"
|
||||||
alias gb="git branch"
|
alias gb="git branch"
|
||||||
alias gbc="git-branch-cleanup"
|
|
||||||
alias gbda="git branch | grep -v master | xargs git branch -D"
|
|
||||||
alias gbdm="git-branch-delete-merged"
|
|
||||||
alias gc="git commit"
|
alias gc="git commit"
|
||||||
alias gca="git commit --amend"
|
alias gca="git commit --amend"
|
||||||
alias gcm="echo Do not specify message at command line. Use gc"
|
|
||||||
alias gcn="git commit --allow-empty --message 'noop'"
|
alias gcn="git commit --allow-empty --message 'noop'"
|
||||||
alias gco="git checkout"
|
alias gco="git checkout"
|
||||||
alias gcp="git cherry-pick"
|
alias gcp="git cherry-pick"
|
||||||
|
@ -37,11 +27,7 @@ alias gct="git commit -m '( ͡° ͜ʖ ͡°)'"
|
||||||
alias gd="git diff"
|
alias gd="git diff"
|
||||||
alias gdc="git diff --cached"
|
alias gdc="git diff --cached"
|
||||||
alias gds="git diff --stat"
|
alias gds="git diff --stat"
|
||||||
alias gdss="git diff --shortstat"
|
|
||||||
alias gfa="git-date-added"
|
alias gfa="git-date-added"
|
||||||
alias gfl="git log --patch"
|
|
||||||
alias gg="hub gist create --browse"
|
|
||||||
alias gi="gitignore-io"
|
|
||||||
alias gl="git fancy-graph"
|
alias gl="git fancy-graph"
|
||||||
alias ghi="git hist"
|
alias ghi="git hist"
|
||||||
alias ghd="git hist-details"
|
alias ghd="git hist-details"
|
||||||
|
@ -63,40 +49,19 @@ alias grbi="git rebase --interactive"
|
||||||
alias grc="git rm --cached"
|
alias grc="git rm --cached"
|
||||||
alias grh="git reset --hard"
|
alias grh="git reset --hard"
|
||||||
alias grm="git rm"
|
alias grm="git rm"
|
||||||
alias gs="git status"
|
|
||||||
alias gu="git undo"
|
|
||||||
alias gup="git-branch-delete-merged"
|
alias gup="git-branch-delete-merged"
|
||||||
alias gw="git diff --check"
|
|
||||||
alias Grep='grep'
|
alias Grep='grep'
|
||||||
alias l="ls"
|
alias l="ls"
|
||||||
alias ll="ls -lv --human-readable --color=auto"
|
alias ll="ls -lv --human-readable --color=auto"
|
||||||
alias ls="ls --color=auto"
|
alias ls="ls --color=auto"
|
||||||
alias m="more"
|
alias m="more"
|
||||||
alias md="cd ~/dotfiles > /dev/null 2>&1; make; cd -1 > /dev/null 2>&1"
|
|
||||||
alias mf="mkdir"
|
alias mf="mkdir"
|
||||||
alias mw="tmux new-session -A -s work"
|
alias mw="tmux attach || tmux -f $HOME/.config/tmux/tmux.conf"
|
||||||
alias ne="npm-exec"
|
|
||||||
alias pf="port-forward"
|
|
||||||
alias pwdgen="password-generator"
|
alias pwdgen="password-generator"
|
||||||
alias r="ssh"
|
|
||||||
alias rd="popd"
|
|
||||||
alias s="cd ~/Source"
|
alias s="cd ~/Source"
|
||||||
alias sci="ssh-copy-id -i .ssh/id_rsa.pub"
|
alias sz="source $ZDOTDIR/.zshrc"
|
||||||
alias sd="pwd | pushd"
|
|
||||||
alias subl="code"
|
|
||||||
alias sw="stopwatch"
|
|
||||||
alias sz="source ~/.zshrc"
|
|
||||||
alias pf="port-forward"
|
|
||||||
alias t="tmux new-session -A -s"
|
|
||||||
alias tf="terraform"
|
alias tf="terraform"
|
||||||
alias tls="tmux list-sessions"
|
|
||||||
alias ts="tmuxinator start"
|
|
||||||
alias v="$EDITOR"
|
alias v="$EDITOR"
|
||||||
alias w="ruby -rwebrick -e'WEBrick::HTTPServer.new(:Port => 8000, :DocumentRoot => Dir.pwd).start'"
|
alias w="ruby -rwebrick -e'WEBrick::HTTPServer.new(Port: 8000, DocumentRoot: Dir.pwd).start'"
|
||||||
alias wo="curl 'http://wttr.in/48823'"
|
alias wo="curl 'http://wttr.in/48823'"
|
||||||
alias y="yarn"
|
|
||||||
alias ya="yarn add"
|
|
||||||
alias yad="yarn add --dev"
|
|
||||||
alias ye="yarn-exec"
|
|
||||||
alias yi="yarn-install-like-bundle"
|
|
||||||
alias x="exit"
|
alias x="exit"
|
78
zsh/.config/zsh/functions
Normal file
78
zsh/.config/zsh/functions
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
function ag-count {
|
||||||
|
if [ $# -lt 1 ]; then
|
||||||
|
echo Usage: ag-count SEARCHTERM
|
||||||
|
else
|
||||||
|
searchterm=$1; shift
|
||||||
|
|
||||||
|
ag --stats $searchterm | tail -n5
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function aws-profile {
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
echo Current AWS Profile: $AWS_DEFAULT_PROFILE
|
||||||
|
else
|
||||||
|
export AWS_DEFAULT_PROFILE=$1
|
||||||
|
export AWS_PROFILE=$1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function docker-compose-call {
|
||||||
|
if docker compose > /dev/null 2>&1; then
|
||||||
|
docker compose $@
|
||||||
|
else
|
||||||
|
docker-compose $@
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function g {
|
||||||
|
if [[ $# > 0 ]]; then
|
||||||
|
git $@
|
||||||
|
else
|
||||||
|
git status
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function git-date-added {
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
echo Usage: git-date-added FILENAME
|
||||||
|
else
|
||||||
|
git log --format=%aD $1 | tail -1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function password-generator {
|
||||||
|
if [ -x "$(command -v openssl)" ]; then
|
||||||
|
password=$(
|
||||||
|
openssl rand -base64 32 \
|
||||||
|
| head -c 32
|
||||||
|
)
|
||||||
|
else
|
||||||
|
password=$(
|
||||||
|
date +%s \
|
||||||
|
| sha256sum \
|
||||||
|
| base64 \
|
||||||
|
| head -c 32
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo $password
|
||||||
|
}
|
||||||
|
|
||||||
|
function test-rails {
|
||||||
|
if bundle exec rspec --help > /dev/null 2>&1; then
|
||||||
|
if [ -d spec ]; then
|
||||||
|
bundle exec rspec $@
|
||||||
|
else
|
||||||
|
ruby *_test.rb
|
||||||
|
fi
|
||||||
|
elif bundle exec rails version > /dev/null 2>&1; then
|
||||||
|
bundle exec rails test $@
|
||||||
|
else
|
||||||
|
if [[ $# > 0 ]]; then
|
||||||
|
ruby $@
|
||||||
|
else
|
||||||
|
ruby *_test.rb
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
4
zsh/.config/zsh/prompt
Normal file
4
zsh/.config/zsh/prompt
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
local current_dir='%~%f'
|
||||||
|
local result="%B%(?.%F{green}✓%b.%F{red}✗)%b%f"
|
||||||
|
|
||||||
|
PROMPT="${current_dir} ${result} "
|
169
zsh/.functions
169
zsh/.functions
|
@ -1,169 +0,0 @@
|
||||||
function ag-count {
|
|
||||||
if [ $# -lt 1 ]; then
|
|
||||||
echo Usage: ag-count SEARCHTERM
|
|
||||||
else
|
|
||||||
searchterm=$1; shift
|
|
||||||
|
|
||||||
ag --stats $searchterm | tail -n5
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function aet-bin-exec {
|
|
||||||
local readonly script=$1; shift
|
|
||||||
|
|
||||||
./aet-bin/$script $@
|
|
||||||
}
|
|
||||||
|
|
||||||
function aws-profile {
|
|
||||||
if [ $# -eq 0 ]; then
|
|
||||||
echo Current AWS Profile: $AWS_DEFAULT_PROFILE
|
|
||||||
else
|
|
||||||
export AWS_DEFAULT_PROFILE=$1
|
|
||||||
export AWS_PROFILE=$1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function fix-permissions {
|
|
||||||
find . -type d -print0 | xargs -0 chmod 0755
|
|
||||||
find . -type f -print0 | xargs -0 chmod 0644
|
|
||||||
}
|
|
||||||
|
|
||||||
function g {
|
|
||||||
if [[ $# > 0 ]]; then
|
|
||||||
git $@
|
|
||||||
else
|
|
||||||
git status
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function git-branch-cleanup {
|
|
||||||
if [ $# -eq 0 ]; then
|
|
||||||
branch=master
|
|
||||||
else
|
|
||||||
branch=$1
|
|
||||||
fi
|
|
||||||
|
|
||||||
git branch --merged $branch | grep -v $branch | xargs git branch -d
|
|
||||||
}
|
|
||||||
|
|
||||||
function git-branch-delete-merged {
|
|
||||||
git branch --merged \
|
|
||||||
| grep -v "\*" \
|
|
||||||
| grep -v master \
|
|
||||||
| grep -v staging \
|
|
||||||
| grep -v development \
|
|
||||||
| xargs -n 1 git branch -d
|
|
||||||
}
|
|
||||||
|
|
||||||
function git-date-added {
|
|
||||||
if [ $# -eq 0 ]; then
|
|
||||||
echo Usage: git-date-added FILENAME
|
|
||||||
else
|
|
||||||
git log --format=%aD $1 | tail -1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function gitignore-io {
|
|
||||||
curl https://www.gitignore.io/api/$@
|
|
||||||
}
|
|
||||||
|
|
||||||
function insert-sudo {
|
|
||||||
zle beginning-of-line
|
|
||||||
zle -U "sudo "
|
|
||||||
}
|
|
||||||
|
|
||||||
function npm-exec {
|
|
||||||
(PATH=$(npm bin):$PATH; eval $@;)
|
|
||||||
}
|
|
||||||
|
|
||||||
function password-generator {
|
|
||||||
if [ -x "$(command -v openssl)" ]; then
|
|
||||||
password=$(
|
|
||||||
openssl rand -base64 32 \
|
|
||||||
| head -c 32
|
|
||||||
)
|
|
||||||
else
|
|
||||||
password=$(
|
|
||||||
date +%s \
|
|
||||||
| sha256sum \
|
|
||||||
| base64 \
|
|
||||||
| head -c 32
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo $password
|
|
||||||
}
|
|
||||||
|
|
||||||
function port-forward {
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
echo Usage: port-forward HOST LOCAL_PORT \[REMOTE_PORT\]
|
|
||||||
else
|
|
||||||
ssh $1 -R ${3:-$2}":localhost:"$2 -g
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function run {
|
|
||||||
if [ $# -lt 2 ]; then
|
|
||||||
echo Usage: run NUMBER COMMAND
|
|
||||||
else
|
|
||||||
number=$1; shift
|
|
||||||
|
|
||||||
for i in `seq $number`; do
|
|
||||||
eval "$@"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function stopwatch {
|
|
||||||
date1=`date +%s`
|
|
||||||
while true; do
|
|
||||||
echo -ne "$(date -u --date @$((`date +%s` - $date1)) +%H:%M:%S)\r"
|
|
||||||
sleep 0.1
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
function test-rails {
|
|
||||||
if bundle exec rspec --help > /dev/null 2>&1; then
|
|
||||||
if [ -d spec ]; then
|
|
||||||
bundle exec rspec $@
|
|
||||||
else
|
|
||||||
ruby *_test.rb
|
|
||||||
fi
|
|
||||||
elif bundle exec rails version > /dev/null 2>&1; then
|
|
||||||
bundle exec rails test $@
|
|
||||||
else
|
|
||||||
if [[ $# > 0 ]]; then
|
|
||||||
ruby $@
|
|
||||||
else
|
|
||||||
ruby *_test.rb
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function true-colors {
|
|
||||||
awk 'BEGIN{
|
|
||||||
s="/\\/\\/\\/\\/\\"; s=s s s s s s s s;
|
|
||||||
for (colnum = 0; colnum<77; colnum++) {
|
|
||||||
r = 255-(colnum*255/76);
|
|
||||||
g = (colnum*510/76);
|
|
||||||
b = (colnum*255/76);
|
|
||||||
if (g>255) g = 510-g;
|
|
||||||
printf "\033[48;2;%d;%d;%dm", r,g,b;
|
|
||||||
printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b;
|
|
||||||
printf "%s\033[0m", substr(s,colnum+1,1);
|
|
||||||
}
|
|
||||||
printf "\n";
|
|
||||||
}'
|
|
||||||
}
|
|
||||||
|
|
||||||
function yarn-exec {
|
|
||||||
(PATH=$(yarn bin):$PATH; eval $@;)
|
|
||||||
}
|
|
||||||
|
|
||||||
function yarn-install-like-bundle {
|
|
||||||
if [ -f yarn.lock ]; then
|
|
||||||
yarn install --pure-lockfile
|
|
||||||
else
|
|
||||||
yarn install
|
|
||||||
fi
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
#compdef ,
|
|
||||||
local bin_dir="aet-bin"
|
|
||||||
local found_bin_dir=""
|
|
||||||
|
|
||||||
current_dir=$(pwd)
|
|
||||||
found_bin_dir=$current_dir/$bin_dir
|
|
||||||
while [ ! -d $found_bin_dir ]; do
|
|
||||||
if [[ $current_dir == $HOME ]]; then
|
|
||||||
found_bin_dir=$HOME/bin
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
|
|
||||||
current_dir=$(realpath "$current_dir/..")
|
|
||||||
found_bin_dir=$current_dir/$bin_dir
|
|
||||||
done
|
|
||||||
|
|
||||||
_files -g "^," -W $found_bin_dir
|
|
|
@ -1,30 +0,0 @@
|
||||||
local current_time="[%B%D{%T}%b]"
|
|
||||||
local current_dir='%B%F{blue}%~%f%b'
|
|
||||||
|
|
||||||
# user
|
|
||||||
local user="%F{green}%n%f"
|
|
||||||
|
|
||||||
# host
|
|
||||||
local host=""
|
|
||||||
if [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]]; then
|
|
||||||
host='%F{yellow}%M%f' #SSH
|
|
||||||
else
|
|
||||||
host='%F{green}%M%f' # no SSH
|
|
||||||
fi
|
|
||||||
|
|
||||||
# vcs
|
|
||||||
precmd() {
|
|
||||||
setopt promptsubst
|
|
||||||
autoload -Uz vcs_info
|
|
||||||
|
|
||||||
zstyle ':vcs_info:*' enable git hg svn
|
|
||||||
zstyle ':vcs_info:*:prompt:*' nvcsformats ""
|
|
||||||
zstyle ':vcs_info:*:prompt:*' formats "[%F{cyan}%b%f%u%c]"
|
|
||||||
vcs_info 'prompt'
|
|
||||||
}
|
|
||||||
local vcs='${vcs_info_msg_0_}'
|
|
||||||
|
|
||||||
local prompt="%B%(?.%F{green}✓%b.%F{red}✗)%b%f"
|
|
||||||
|
|
||||||
PROMPT="${current_time} ${user}@${host} ${current_dir} ${vcs}
|
|
||||||
$prompt "
|
|
33
zsh/.zshenv
33
zsh/.zshenv
|
@ -1,40 +1,13 @@
|
||||||
|
PERSONAL_BIN_PATH="$HOME/bin"
|
||||||
|
|
||||||
NODENV_PATH="$HOME/.nodenv/bin"
|
NODENV_PATH="$HOME/.nodenv/bin"
|
||||||
RBENV_PATH="$HOME/.rbenv/bin"
|
RBENV_PATH="$HOME/.rbenv/bin"
|
||||||
|
|
||||||
LOCAL_HOME_BIN_PATH="$HOME/.local/bin"
|
ZDOTDIR=$HOME/.config/zsh
|
||||||
PERSONAL_BIN_PATH="$HOME/bin"
|
|
||||||
PERSONAL_COMPLETIONS_PATH="$HOME/.zsh-completions"
|
|
||||||
|
|
||||||
GNU_TOOLS_PATH="/opt/homebrew/opt/coreutils/libexec/gnubin"
|
|
||||||
GNU_TOOLS_MAN_PATH="/opt/homebrew/opt/coreutils/libexec/gnuman"
|
|
||||||
|
|
||||||
if [[ "$OSTYPE" == darwin* ]]; then
|
|
||||||
HOMEBREW_PREFIX="/opt/homebrew";
|
|
||||||
HOMEBREW_CELLAR="/opt/homebrew/Cellar";
|
|
||||||
HOMEBREW_REPOSITORY="/opt/homebrew";
|
|
||||||
|
|
||||||
# Added by .zprofile that we've moved
|
|
||||||
PATH="/usr/local/bin:/Library/Apple/usr/bin:$PATH"
|
|
||||||
|
|
||||||
PATH="/opt/homebrew/bin:/opt/homebrew/sbin${PATH+:$PATH}";
|
|
||||||
MANPATH="/opt/homebrew/share/man${MANPATH+:$MANPATH}:";
|
|
||||||
INFOPATH="/opt/homebrew/share/info:${INFOPATH:-}";
|
|
||||||
|
|
||||||
[[ -d "$GNU_TOOLS_PATH" ]] && PATH="$GNU_TOOLS_PATH:$PATH"
|
|
||||||
[[ -d "$GNU_TOOLS_MAN_PATH" ]] && MANPATH="$GNU_TOOLS_MAN_PATH:$MANPATH"
|
|
||||||
|
|
||||||
GO_DIR="/usr/local/opt/go/libexec"
|
|
||||||
else
|
|
||||||
GO_DIR="/usr/local/go/bin"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# BIN
|
|
||||||
[[ -d "$RBENV_PATH" ]] && PATH="$RBENV_PATH:$PATH"
|
[[ -d "$RBENV_PATH" ]] && PATH="$RBENV_PATH:$PATH"
|
||||||
[[ -d "$NODENV_PATH" ]] && PATH="$NODENV_PATH:$PATH"
|
[[ -d "$NODENV_PATH" ]] && PATH="$NODENV_PATH:$PATH"
|
||||||
|
|
||||||
[[ -d "$LOCAL_HOME_BIN_PATH" ]] && PATH="$LOCAL_HOME_BIN_PATH:$PATH"
|
|
||||||
[[ -d "$PERSONAL_BIN_PATH" ]] && PATH="$PERSONAL_BIN_PATH:$PATH"
|
[[ -d "$PERSONAL_BIN_PATH" ]] && PATH="$PERSONAL_BIN_PATH:$PATH"
|
||||||
[[ -d "$PERSONAL_COMPLETIONS_PATH" ]] && FPATH="$PERSONAL_COMPLETIONS_PATH:$FPATH"
|
|
||||||
|
|
||||||
# EDITOR
|
# EDITOR
|
||||||
EDITOR=vim
|
EDITOR=vim
|
||||||
|
|
73
zsh/.zshrc
73
zsh/.zshrc
|
@ -1,73 +0,0 @@
|
||||||
GPG_TTY=$(tty)
|
|
||||||
export GPG_TTY
|
|
||||||
|
|
||||||
# clean up duplicate paths
|
|
||||||
typeset -U PATH
|
|
||||||
|
|
||||||
# Larger history
|
|
||||||
HISTSIZE=20000
|
|
||||||
HISTFILE=~/.zsh_history
|
|
||||||
SAVEHIST=20000
|
|
||||||
|
|
||||||
# Make sure C-s works in vim
|
|
||||||
stty start undef
|
|
||||||
stty stop undef
|
|
||||||
|
|
||||||
# Aliases/Functions files
|
|
||||||
source $HOME/.aliases
|
|
||||||
source $HOME/.functions
|
|
||||||
|
|
||||||
source $HOME/.zsh/prompt
|
|
||||||
|
|
||||||
if [[ "$OSTYPE" == darwin* ]]; then
|
|
||||||
source $HOME/.aliases-mac
|
|
||||||
fi
|
|
||||||
|
|
||||||
# vim mode
|
|
||||||
bindkey -v
|
|
||||||
|
|
||||||
# Bind insert_sudo function
|
|
||||||
zle -N insert-sudo
|
|
||||||
bindkey "^z" insert-sudo
|
|
||||||
|
|
||||||
# init rbenv
|
|
||||||
if which rbenv > /dev/null; then
|
|
||||||
eval "$(rbenv init --no-rehash -)"
|
|
||||||
(rbenv rehash &) 2> /dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
# init nodenv
|
|
||||||
if which nodenv > /dev/null; then
|
|
||||||
eval "$(nodenv init --no-rehash -)"
|
|
||||||
(nodenv rehash &) 2> /dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
# init direnv
|
|
||||||
if which direnv > /dev/null; then
|
|
||||||
eval "$(direnv hook zsh)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# completion
|
|
||||||
autoload -U compinit
|
|
||||||
autoload bashcompinit && bashcompinit
|
|
||||||
|
|
||||||
autoload compinit -Uz
|
|
||||||
setopt EXTENDEDGLOB
|
|
||||||
if [[ -n ${ZDOTDIR}/.zcompdump(#qN.mh+24) ]]; then
|
|
||||||
compinit
|
|
||||||
else
|
|
||||||
compinit -C
|
|
||||||
fi
|
|
||||||
unsetopt EXTENDEDGLOB
|
|
||||||
|
|
||||||
setopt completeinword
|
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
|
|
||||||
|
|
||||||
# directory
|
|
||||||
setopt auto_cd
|
|
||||||
|
|
||||||
# better word definition
|
|
||||||
autoload -U select-word-style
|
|
||||||
select-word-style bash
|
|
||||||
|
|
||||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
|
Loading…
Reference in a new issue