From 50d7e462be7e51bb049b53f6c972f3ca989d4248 Mon Sep 17 00:00:00 2001 From: Sohrab Behdani Date: Wed, 1 May 2024 10:01:59 +0330 Subject: [PATCH] removed un-needed files --- aliases | 21 --- asdfrc | 1 - bin/bundler-search | 15 --- bin/clear-port | 15 --- bin/git-ca | 3 - bin/git-co-pr | 6 - bin/git-create-branch | 9 -- bin/git-ctags | 6 - bin/git-current-branch | 5 - bin/git-delete-branch | 6 - bin/git-merge-branch | 26 ---- bin/git-rename-branch | 8 -- bin/git-trust-bin | 3 - bin/git-up | 16 --- bin/replace | 22 ---- bin/tat | 31 ----- bin/whats-in-port | 16 --- ctags | 23 ---- ctags.d/config.ctags | 9 -- gemrc | 1 - git_template/hooks/commit-msg | 7 - git_template/hooks/ctags | 10 -- git_template/hooks/post-checkout | 9 -- git_template/hooks/post-commit | 9 -- git_template/hooks/post-merge | 9 -- git_template/hooks/post-rewrite | 4 - git_template/hooks/pre-commit | 7 - git_template/hooks/pre-push | 7 - git_template/hooks/prepare-commit-msg | 7 - git_template/info/exclude | 6 - gitconfig | 30 ----- gitignore | 17 --- gitmessage | 16 --- hooks/post-up | 35 ----- hushlogin | 0 local/aliases.local | 66 ---------- local/zshrc.local | 6 - psqlrc | 28 ---- rcrc | 3 - rspec | 2 - tmux.conf | 41 ------ vim/ftplugin/css.vim | 1 - vim/ftplugin/gitcommit.vim | 4 - vim/ftplugin/go.vim | 6 - vim/ftplugin/markdown.vim | 5 - vim/ftplugin/sass.vim | 1 - vim/ftplugin/scss.vim | 1 - vim/plugin/ctags.vim | 22 ---- vimrc | 182 -------------------------- vimrc.bundles | 56 -------- 50 files changed, 839 deletions(-) delete mode 100644 aliases delete mode 100644 asdfrc delete mode 100755 bin/bundler-search delete mode 100755 bin/clear-port delete mode 100755 bin/git-ca delete mode 100755 bin/git-co-pr delete mode 100755 bin/git-create-branch delete mode 100755 bin/git-ctags delete mode 100755 bin/git-current-branch delete mode 100755 bin/git-delete-branch delete mode 100755 bin/git-merge-branch delete mode 100755 bin/git-rename-branch delete mode 100755 bin/git-trust-bin delete mode 100755 bin/git-up delete mode 100755 bin/replace delete mode 100755 bin/tat delete mode 100755 bin/whats-in-port delete mode 100644 ctags delete mode 100644 ctags.d/config.ctags delete mode 100644 gemrc delete mode 100755 git_template/hooks/commit-msg delete mode 100755 git_template/hooks/ctags delete mode 100755 git_template/hooks/post-checkout delete mode 100755 git_template/hooks/post-commit delete mode 100755 git_template/hooks/post-merge delete mode 100755 git_template/hooks/post-rewrite delete mode 100755 git_template/hooks/pre-commit delete mode 100755 git_template/hooks/pre-push delete mode 100755 git_template/hooks/prepare-commit-msg delete mode 100644 git_template/info/exclude delete mode 100644 gitconfig delete mode 100644 gitignore delete mode 100644 gitmessage delete mode 100755 hooks/post-up delete mode 100644 hushlogin delete mode 100644 local/aliases.local delete mode 100644 local/zshrc.local delete mode 100644 psqlrc delete mode 100644 rcrc delete mode 100644 rspec delete mode 100644 tmux.conf delete mode 100644 vim/ftplugin/css.vim delete mode 100644 vim/ftplugin/gitcommit.vim delete mode 100644 vim/ftplugin/go.vim delete mode 100644 vim/ftplugin/markdown.vim delete mode 100644 vim/ftplugin/sass.vim delete mode 100644 vim/ftplugin/scss.vim delete mode 100644 vim/plugin/ctags.vim delete mode 100644 vimrc delete mode 100644 vimrc.bundles diff --git a/aliases b/aliases deleted file mode 100644 index e0e3f49..0000000 --- a/aliases +++ /dev/null @@ -1,21 +0,0 @@ -# Unix -alias ll="ls -al" -alias ln="ln -v" -alias mkdir="mkdir -p" -alias e="$EDITOR" -alias v="$VISUAL" - -# Bundler -alias b="bundle" - -# Rails -alias migrate="bin/rails db:migrate db:rollback && bin/rails db:migrate db:test:prepare" -alias s="rspec" - -# Pretty print the path -alias path='echo $PATH | tr -s ":" "\n"' - -# Include custom aliases -if [[ -f ~/.aliases.local ]]; then - source ~/.aliases.local -fi diff --git a/asdfrc b/asdfrc deleted file mode 100644 index e600bd0..0000000 --- a/asdfrc +++ /dev/null @@ -1 +0,0 @@ -legacy_version_file = yes diff --git a/bin/bundler-search b/bin/bundler-search deleted file mode 100755 index 18a973f..0000000 --- a/bin/bundler-search +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Search your bundle for the provided pattern -# Requires bundler 1.8+ for execution as a bundler subcommand. -# Examples: -# bundle search Kernel.warn -# bundle search current_user clearance -# bundle search "Change your password" clearance -# -# Arguments: -# 1. What to search for -# 2. Which gem names to search (defaults to all gems) - -pattern="$1"; shift -ag "$pattern" $(bundle show --paths "$@") diff --git a/bin/clear-port b/bin/clear-port deleted file mode 100755 index bc3f4d0..0000000 --- a/bin/clear-port +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Kills the process running on the provided port -# -# clear-port 3000 - -if [ -n "$1" ]; then - port_num="$(lsof -ti4TCP:"$1")" - if [ $? -eq 0 ]; then - kill "$port_num" - fi -else - echo >&2 Usage: clear-port port-number - exit 1 -fi diff --git a/bin/git-ca b/bin/git-ca deleted file mode 100755 index 23cd313..0000000 --- a/bin/git-ca +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -git commit --amend -v --date="$(date +%Y-%m-%dT%H:%M:%S)" diff --git a/bin/git-co-pr b/bin/git-co-pr deleted file mode 100755 index ebe81f9..0000000 --- a/bin/git-co-pr +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -set -e - -git fetch origin "pull/$1/head:pr/$1" -git checkout "pr/$1" diff --git a/bin/git-create-branch b/bin/git-create-branch deleted file mode 100755 index 8ad2fb4..0000000 --- a/bin/git-create-branch +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -set -e - -git push origin "HEAD:refs/heads/$1" -git fetch origin -git branch --track "$1" "origin/$1" -cd . -git checkout "$1" diff --git a/bin/git-ctags b/bin/git-ctags deleted file mode 100755 index a966557..0000000 --- a/bin/git-ctags +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -set -e - -[ -f .git/hooks/ctags ] || git init -.git/hooks/ctags diff --git a/bin/git-current-branch b/bin/git-current-branch deleted file mode 100755 index 1cbb3e6..0000000 --- a/bin/git-current-branch +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -set -e - -git rev-parse --abbrev-ref HEAD diff --git a/bin/git-delete-branch b/bin/git-delete-branch deleted file mode 100755 index a357e55..0000000 --- a/bin/git-delete-branch +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -set -e - -git push origin :refs/heads/"$1" -git branch --delete "$1" diff --git a/bin/git-merge-branch b/bin/git-merge-branch deleted file mode 100755 index c1cf14c..0000000 --- a/bin/git-merge-branch +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -set -e - -if git symbolic-ref --short refs/remotes/origin/HEAD >/dev/null; then - main_branch="$(git symbolic-ref --short refs/remotes/origin/HEAD | sed 's@^origin/@@')" "$@" -else - echo "You don't have a primary branch reference set for your origin remote. - Use: - git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/{name_of_your_primary_branch} - - to set the reference and then try merging again." - - exit 1 -fi - -git fetch origin -line_count=$(git diff origin/$main_branch..$main_branch | wc -l) - -if [ $line_count -gt 0 ]; then - printf "failed: $main_branch is not up to date with origin/$main_branch\n" - exit 1 -fi - -git checkout $main_branch -git merge "@{-1}" diff --git a/bin/git-rename-branch b/bin/git-rename-branch deleted file mode 100755 index 8cb2b16..0000000 --- a/bin/git-rename-branch +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -set -e - -old=$(git current-branch) -git branch -m "$old" "$1" -git push origin --set-upstream "$1" -git push origin --delete "$old" diff --git a/bin/git-trust-bin b/bin/git-trust-bin deleted file mode 100755 index 16546d9..0000000 --- a/bin/git-trust-bin +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -mkdir -p .git/safe diff --git a/bin/git-up b/bin/git-up deleted file mode 100755 index 7f27f87..0000000 --- a/bin/git-up +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -set -e - -git fetch origin - -if git symbolic-ref --short refs/remotes/origin/HEAD >/dev/null; then - git fetch origin - git rebase "$(git symbolic-ref --short refs/remotes/origin/HEAD)" "$@" -else - echo "You don't have a primary branch reference set for your origin remote. -Use: -git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/{name_of_your_primary_branch} - -to set the reference and then try rebasing again." -fi diff --git a/bin/replace b/bin/replace deleted file mode 100755 index c762d13..0000000 --- a/bin/replace +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# -# Find and replace by a given list of files. -# -# replace foo bar **/*.rb - -find_this="$1" -shift -replace_with="$1" -shift - -if command -v rg &>/dev/null ; then - items=$(rg -l --color never "$find_this" "$@") -else - items=$(ag -l --nocolor "$find_this" "$@") -fi - -temp="${TMPDIR:-/tmp}/replace_temp_file.$$" -IFS=$'\n' -for item in $items; do - sed "s/$find_this/$replace_with/g" "$item" > "$temp" && mv "$temp" "$item" -done diff --git a/bin/tat b/bin/tat deleted file mode 100755 index 901f252..0000000 --- a/bin/tat +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# -# Attach or create tmux session named the same as current directory. - -path_name="$(basename "$PWD" | tr . -)" -session_name=${1-$path_name} - -not_in_tmux() { - [ -z "$TMUX" ] -} - -session_exists() { - tmux has-session -t "=$session_name" -} - -create_detached_session() { - (TMUX='' tmux new-session -Ad -s "$session_name") -} - -create_if_needed_and_attach() { - if not_in_tmux; then - tmux new-session -As "$session_name" - else - if ! session_exists; then - create_detached_session - fi - tmux switch-client -t "$session_name" - fi -} - -create_if_needed_and_attach diff --git a/bin/whats-in-port b/bin/whats-in-port deleted file mode 100755 index 8c56f02..0000000 --- a/bin/whats-in-port +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -# List process running on provided port -# -# whats-in-port 3000 -# -# output: -# COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME -# ruby 25583 root 11u IPv4 0xee20607697a79bf7 0t0 TCP *:irdmi (LISTEN) - -if [ -n "$1" ]; then - lsof -ni4TCP:"$1" -else - echo >&2 Usage: whats-in-port port-number - exit 1 -fi diff --git a/ctags b/ctags deleted file mode 100644 index ebd9091..0000000 --- a/ctags +++ /dev/null @@ -1,23 +0,0 @@ ---regex-ruby=/(^|[:;])[ \t]*([A-Z][[:alnum:]_]+) *=/\2/c,class,constant/ ---regex-ruby=/^[ \t]*attr_(reader|writer|accessor) (:[a-z0-9_]+, )*:([a-z0-9_]+)/\3/A,attr/ ---langdef=Elixir ---langmap=Elixir:.ex.exs ---regex-Elixir=/^[ \t]*def(p?)[ \t]+([a-z_][a-zA-Z0-9_?!]*)/\2/f,functions,functions (def ...)/ ---regex-Elixir=/^[ \t]*defcallback[ \t]+([a-z_][a-zA-Z0-9_?!]*)/\1/c,callbacks,callbacks (defcallback ...)/ ---regex-Elixir=/^[ \t]*defdelegate[ \t]+([a-z_][a-zA-Z0-9_?!]*)/\1/d,delegates,delegates (defdelegate ...)/ ---regex-Elixir=/^[ \t]*defexception[ \t]+([A-Z][a-zA-Z0-9_]*\.)*([A-Z][a-zA-Z0-9_?!]*)/\2/e,exceptions,exceptions (defexception ...)/ ---regex-Elixir=/^[ \t]*defimpl[ \t]+([A-Z][a-zA-Z0-9_]*\.)*([A-Z][a-zA-Z0-9_?!]*)/\2/i,implementations,implementations (defimpl ...)/ ---regex-Elixir=/^[ \t]*defmacro(p?)[ \t]+([a-z_][a-zA-Z0-9_?!]*)\(/\2/a,macros,macros (defmacro ...)/ ---regex-Elixir=/^[ \t]*defmacro(p?)[ \t]+([a-zA-Z0-9_?!]+)?[ \t]+([^ \tA-Za-z0-9_]+)[ \t]*[a-zA-Z0-9_!?!]/\3/o,operators,operators (e.g. "defmacro a <<< b")/ ---regex-Elixir=/^[ \t]*defmodule[ \t]+([A-Z][a-zA-Z0-9_]*\.)*([A-Z][a-zA-Z0-9_?!]*)/\2/m,modules,modules (defmodule ...)/ ---regex-Elixir=/^[ \t]*defprotocol[ \t]+([A-Z][a-zA-Z0-9_]*\.)*([A-Z][a-zA-Z0-9_?!]*)/\2/p,protocols,protocols (defprotocol...)/ ---regex-Elixir=/^[ \t]*Record\.defrecord[ \t]+:([a-zA-Z0-9_]+)/\1/r,records,records (defrecord...)/ ---regex-Elixir=/^[ \t]*test[ \t]+\"([a-z_][a-zA-Z0-9_?! ]*)\"*/\1/t,tests,tests (test ...)/ ---exclude=bower_components ---exclude=node_modules ---exclude=vendor ---languages=-javascript ---langdef=js ---langmap=js:.js ---langmap=js:+.jsx ---regex-js=/[ \t.]([A-Z][A-Z0-9._$]+)[ \t]*[=:][ \t]*([0-9"'\[\{]|null)/\1/n,constant/ diff --git a/ctags.d/config.ctags b/ctags.d/config.ctags deleted file mode 100644 index f1c6511..0000000 --- a/ctags.d/config.ctags +++ /dev/null @@ -1,9 +0,0 @@ ---regex-ruby=/(^|[:;])[ \t]*([A-Z][[:alnum:]_]+) *=/\2/c,class,constant/ ---exclude=bower_components ---exclude=node_modules ---exclude=vendor ---languages=-javascript ---langdef=js ---langmap=js:.js ---langmap=js:+.jsx ---regex-js=/[ \t.]([A-Z][A-Z0-9._$]+)[ \t]*[=:][ \t]*([0-9"'\[\{]|null)/\1/n,constant/ diff --git a/gemrc b/gemrc deleted file mode 100644 index 154cd47..0000000 --- a/gemrc +++ /dev/null @@ -1 +0,0 @@ -gem: --no-document diff --git a/git_template/hooks/commit-msg b/git_template/hooks/commit-msg deleted file mode 100755 index 0766fc7..0000000 --- a/git_template/hooks/commit-msg +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -local_hook="$HOME"/.git_template.local/hooks/commit-msg - -if [ -f "$local_hook" ]; then - . "$local_hook" -fi diff --git a/git_template/hooks/ctags b/git_template/hooks/ctags deleted file mode 100755 index 0f99f7d..0000000 --- a/git_template/hooks/ctags +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -set -e - -PATH="/usr/local/bin:$PATH" -dir="$(git rev-parse --git-dir)" -trap 'rm -f "$dir/$$.tags"' EXIT -git ls-files | \ - "${CTAGS:-ctags}" --tag-relative=yes -L - -f"$dir/$$.tags" --languages=-javascript,sql -mv "$dir/$$.tags" "$dir/tags" diff --git a/git_template/hooks/post-checkout b/git_template/hooks/post-checkout deleted file mode 100755 index 992ebfa..0000000 --- a/git_template/hooks/post-checkout +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -local_hook="$HOME"/.git_template.local/hooks/post-checkout - -if [ -f "$local_hook" ]; then - . "$local_hook"; -fi - -.git/hooks/ctags >/dev/null 2>&1 & diff --git a/git_template/hooks/post-commit b/git_template/hooks/post-commit deleted file mode 100755 index d2bab05..0000000 --- a/git_template/hooks/post-commit +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -local_hook="$HOME"/.git_template.local/hooks/post-commit - -if [ -f "$local_hook" ]; then - . "$local_hook"; -fi - -.git/hooks/ctags >/dev/null 2>&1 & diff --git a/git_template/hooks/post-merge b/git_template/hooks/post-merge deleted file mode 100755 index 2d49b9c..0000000 --- a/git_template/hooks/post-merge +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -local_hook="$HOME"/.git_template.local/hooks/post-merge - -if [ -f "$local_hook" ]; then - . "$local_hook"; -fi - -.git/hooks/ctags >/dev/null 2>&1 & diff --git a/git_template/hooks/post-rewrite b/git_template/hooks/post-rewrite deleted file mode 100755 index fe8972d..0000000 --- a/git_template/hooks/post-rewrite +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -case "$1" in - rebase) exec .git/hooks/post-merge ;; -esac diff --git a/git_template/hooks/pre-commit b/git_template/hooks/pre-commit deleted file mode 100755 index 39637c8..0000000 --- a/git_template/hooks/pre-commit +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -local_hook="$HOME"/.git_template.local/hooks/pre-commit - -if [ -f "$local_hook" ]; then - . "$local_hook" -fi diff --git a/git_template/hooks/pre-push b/git_template/hooks/pre-push deleted file mode 100755 index 8535335..0000000 --- a/git_template/hooks/pre-push +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -local_hook="$HOME"/.git_template.local/hooks/pre-push - -if [ -f "$local_hook" ]; then - . "$local_hook" -fi diff --git a/git_template/hooks/prepare-commit-msg b/git_template/hooks/prepare-commit-msg deleted file mode 100755 index 1a2c2bc..0000000 --- a/git_template/hooks/prepare-commit-msg +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -local_hook="$HOME"/.git_template.local/hooks/prepare-commit-msg - -if [ -f "$local_hook" ]; then - . "$local_hook" -fi diff --git a/git_template/info/exclude b/git_template/info/exclude deleted file mode 100644 index a5196d1..0000000 --- a/git_template/info/exclude +++ /dev/null @@ -1,6 +0,0 @@ -# git ls-files --others --exclude-from=.git/info/exclude -# Lines that start with '#' are comments. -# For a project mostly in C, the following would be a good set of -# exclude patterns (uncomment them if you want to use them): -# *.[oa] -# *~ diff --git a/gitconfig b/gitconfig deleted file mode 100644 index 83bfd5d..0000000 --- a/gitconfig +++ /dev/null @@ -1,30 +0,0 @@ -[init] - defaultBranch = main - templatedir = ~/.git_template -[push] - default = current -[color] - ui = auto -[alias] - aa = add --all - ap = add --patch - branches = for-each-ref --sort=-committerdate --format=\"%(color:blue)%(authordate:relative)\t%(color:red)%(authorname)\t%(color:white)%(color:bold)%(refname:short)\" refs/remotes - ci = commit -v - co = checkout - pf = push --force-with-lease - st = status -[core] - excludesfile = ~/.gitignore - autocrlf = input -[merge] - ff = only -[commit] - template = ~/.gitmessage -[fetch] - prune = true -[rebase] - autosquash = true -[include] - path = ~/.gitconfig.local -[diff] - colorMoved = zebra diff --git a/gitignore b/gitignore deleted file mode 100644 index b9c9b47..0000000 --- a/gitignore +++ /dev/null @@ -1,17 +0,0 @@ -*.pyc -*.sw[nop] -.DS_Store -.bundle -.byebug_history -.env -.git/ -/bower_components/ -/log -/node_modules/ -/tmp -/vendor -db/*.sqlite3 -log/*.log -rerun.txt -tmp/**/* -/tags diff --git a/gitmessage b/gitmessage deleted file mode 100644 index 91df68d..0000000 --- a/gitmessage +++ /dev/null @@ -1,16 +0,0 @@ - - -# 50-character subject line -# -# 72-character wrapped longer description. This should answer: -# -# * Why was this change necessary? -# * How does it address the problem? -# * Are there any side effects? -# -# Include a link to the ticket, if any. -# -# Add co-authors if you worked on this code with others: -# -# Co-authored-by: Full Name -# Co-authored-by: Full Name diff --git a/hooks/post-up b/hooks/post-up deleted file mode 100755 index bd527ab..0000000 --- a/hooks/post-up +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -touch "$HOME"/.psqlrc.local - -if [ -e "$HOME"/.vim/autoload/plug.vim ]; then - vim -E -s +PlugUpgrade +qa -else - curl -fLo "$HOME"/.vim/autoload/plug.vim --create-dirs \ - https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim -fi - -vim -u "$HOME"/.vimrc.bundles +PlugUpdate +PlugClean! +qa - -reset -Q - -if [ -f "$HOME/.git_template/HEAD" ] && \ - [ "$(cat "$HOME/.git_template/HEAD")" = "ref: refs/heads/main" ]; then - echo "Removing ~/.git_template/HEAD in favor of defaultBranch" >&2 - rm -f ~/.git_template/HEAD -fi - -# detect old OS X broken /etc/zshenv and suggest rename -if grep -qw path_helper /etc/zshenv 2>/dev/null; then - dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P) - - cat <&2 -Warning: \`/etc/zshenv' configuration file on your system may cause unexpected -PATH changes on subsequent invocations of the zsh shell. The solution is to -rename the file to \`zprofile': - sudo mv /etc/{zshenv,zprofile} - -(called from ${dir}/post-up:${LINENO}) - -MSG -fi diff --git a/hushlogin b/hushlogin deleted file mode 100644 index e69de29..0000000 diff --git a/local/aliases.local b/local/aliases.local deleted file mode 100644 index c9a509f..0000000 --- a/local/aliases.local +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env zsh - -## root privileges -alias doas="doas --" - -## vim and emacs -alias vi=vim -alias em="/usr/bin/emacs -nw" -alias emacs="emacsclient -c -a 'emacs'" - -## doomemacs -alias doomsync="~/.emacs.d/bin/doom sync" -alias doomdoctor="~/.emacs.d/bin/doom doctor" -alias doomupgrade="~/.emacs.d/bin/doom upgrade" -alias doompurge="~/.emacs.d/bin/doom purge" - -## add color to grep(s) -alias grep='grep --color=auto' -alias egrep='egrep --color=auto' -alias fgrep='fgrep --color=auto' - -## confirm before overwriting something -alias cp="cp -i" -alias mv='mv -i' -alias rm='rm -i' - -# alias "l" to exa with icons -alias l='exa -lah --git --icons' - -## cp/mv with progress bar -alias cpg="cpg -g" -alias mvg="mvg -g" - -## human-readable sizes -alias free='free -h' -alias df='df -h' -alias du='du -h' - -## xdg -alias open='xdg-open' - -## Terminals' command -if [ -f `which kitty` ]; then - ## show img in terminal - alias icat="kitty +kitten icat" - - ## connect via ssh - alias issh="kitty +kitten ssh" -fi - -# youtube-dl -alias yta-aac="youtube-dl --extract-audio --audio-format aac " -alias yta-best="youtube-dl --extract-audio --audio-format best " -alias yta-flac="youtube-dl --extract-audio --audio-format flac " -alias yta-m4a="youtube-dl --extract-audio --audio-format m4a " -alias yta-mp3="youtube-dl --extract-audio --audio-format mp3 " -alias yta-opus="youtube-dl --extract-audio --audio-format opus " -alias yta-vorbis="youtube-dl --extract-audio --audio-format vorbis " -alias yta-wav="youtube-dl --extract-audio --audio-format wav " -alias ytv-best="youtube-dl -f bestvideo+bestaudio " - -# switch between shells -alias tobash="sudo chsh $USER -s /bin/bash && echo 'Now log out.'" -alias tozsh="sudo chsh $USER -s /bin/zsh && echo 'Now log out.'" -alias tofish="sudo chsh $USER -s /bin/fish && echo 'Now log out.'" - diff --git a/local/zshrc.local b/local/zshrc.local deleted file mode 100644 index e27a9f7..0000000 --- a/local/zshrc.local +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env zsh - -## BASH INSULTER (works in zsh though) -if [ -f /etc/bash.command-not-found ]; then - . /etc/bash.command-not-found -fi diff --git a/psqlrc b/psqlrc deleted file mode 100644 index 9845bbe..0000000 --- a/psqlrc +++ /dev/null @@ -1,28 +0,0 @@ --- Official docs: http://www.postgresql.org/docs/9.3/static/app-psql.html --- Unofficial docs: http://robots.thoughtbot.com/improving-the-command-line-postgres-experience - --- Don't display the "helpful" message on startup. -\set QUIET 1 -\pset null '[NULL]' - --- http://www.postgresql.org/docs/9.3/static/app-psql.html#APP-PSQL-PROMPTING -\set PROMPT1 '%[%033[1m%]%M %n@%/%R%[%033[0m%]%# ' --- PROMPT2 is printed when the prompt expects more input, like when you type --- SELECT * FROM. %R shows what type of input it expects. -\set PROMPT2 '[more] %R > ' - --- Show how long each query takes to execute -\timing - --- Use best available output format -\x auto -\set VERBOSITY verbose -\set HISTFILE ~/.psql_history- :DBNAME -\set HISTCONTROL ignoredups -\set COMP_KEYWORD_CASE upper -\unset QUIET - --- psql can't check for a file's existence, so we'll provide an empty local --- file that users can override with their custom dotfiles. To set your own --- personal settings, place your own file in ~/.psqlrc.local -\i ~/.psqlrc.local diff --git a/rcrc b/rcrc deleted file mode 100644 index 9985ef4..0000000 --- a/rcrc +++ /dev/null @@ -1,3 +0,0 @@ -EXCLUDES="*.md LICENSE" -DOTFILES_DIRS="$HOME/dotfiles-local $HOME/dotfiles" -COPY_ALWAYS="git_template/HEAD" diff --git a/rspec b/rspec deleted file mode 100644 index edec62c..0000000 --- a/rspec +++ /dev/null @@ -1,2 +0,0 @@ ---colour ---order random diff --git a/tmux.conf b/tmux.conf deleted file mode 100644 index dd02b01..0000000 --- a/tmux.conf +++ /dev/null @@ -1,41 +0,0 @@ -# improve colors -set -g default-terminal 'screen-256color' - -# act like vim -setw -g mode-keys vi -bind-key h select-pane -L -bind-key j select-pane -D -bind-key k select-pane -U -bind-key l select-pane -R -bind-key -r C-h select-window -t :- -bind-key -r C-l select-window -t :+ - -set -g prefix2 C-s - -# start window numbers at 1 to match keyboard order with tmux window order -set -g base-index 1 -set-window-option -g pane-base-index 1 - -# renumber windows sequentially after closing any of them -set -g renumber-windows on - -# soften status bar color from harsh green to light gray -set -g status-style bg='#666666',fg='#aaaaaa' - -# remove administrative debris (session name, hostname, time) in status bar -set -g status-left '' -set -g status-right '' - -# increase scrollback lines -set -g history-limit 10000 - -# prefix -> back-one-character -bind-key C-b send-prefix -# prefix-2 -> forward-incremental-history-search -bind-key C-s send-prefix -2 - -# don't suspend-client -unbind-key C-z - -# Local config -if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local' diff --git a/vim/ftplugin/css.vim b/vim/ftplugin/css.vim deleted file mode 100644 index df4fe48..0000000 --- a/vim/ftplugin/css.vim +++ /dev/null @@ -1 +0,0 @@ -setlocal iskeyword+=- diff --git a/vim/ftplugin/gitcommit.vim b/vim/ftplugin/gitcommit.vim deleted file mode 100644 index 2f2ec1e..0000000 --- a/vim/ftplugin/gitcommit.vim +++ /dev/null @@ -1,4 +0,0 @@ -" Automatically wrap at 72 characters and spell check commit messages -autocmd BufNewFile,BufRead PULLREQ_EDITMSG set syntax=gitcommit -setlocal textwidth=72 -setlocal spell diff --git a/vim/ftplugin/go.vim b/vim/ftplugin/go.vim deleted file mode 100644 index fde0644..0000000 --- a/vim/ftplugin/go.vim +++ /dev/null @@ -1,6 +0,0 @@ -let g:go_fmt_command = "goimports" - -setlocal listchars=tab:\ \ ,trail:·,nbsp:· -setlocal noexpandtab - -compiler go diff --git a/vim/ftplugin/markdown.vim b/vim/ftplugin/markdown.vim deleted file mode 100644 index 840939b..0000000 --- a/vim/ftplugin/markdown.vim +++ /dev/null @@ -1,5 +0,0 @@ -" Enable spellchecking -setlocal spell - -" Automatically wrap at 80 characters -setlocal textwidth=80 diff --git a/vim/ftplugin/sass.vim b/vim/ftplugin/sass.vim deleted file mode 100644 index df4fe48..0000000 --- a/vim/ftplugin/sass.vim +++ /dev/null @@ -1 +0,0 @@ -setlocal iskeyword+=- diff --git a/vim/ftplugin/scss.vim b/vim/ftplugin/scss.vim deleted file mode 100644 index df4fe48..0000000 --- a/vim/ftplugin/scss.vim +++ /dev/null @@ -1 +0,0 @@ -setlocal iskeyword+=- diff --git a/vim/plugin/ctags.vim b/vim/plugin/ctags.vim deleted file mode 100644 index 3050af5..0000000 --- a/vim/plugin/ctags.vim +++ /dev/null @@ -1,22 +0,0 @@ -" Exclude Javascript files in :Rtags via rails.vim due to warnings when parsing -let g:Tlist_Ctags_Cmd="ctags --exclude='*.js'" - -" Index ctags from any project, including those outside Rails -function! ReindexCtags() - let l:ctags_hook_file = "$(git rev-parse --show-toplevel)/.git/hooks/ctags" - let l:ctags_hook_path = system("echo " . l:ctags_hook_file) - let l:ctags_hook_path = substitute(l:ctags_hook_path, '\n\+$', '', '') - - if filereadable(expand(l:ctags_hook_path)) - exec '!'. l:ctags_hook_file - else - exec "!ctags -R ." - endif -endfunction - -" to stop this mapping from being added, put this in $MYVIMRC: -" let g:thoughtbot_ctags_mappings_enabled = 0 -let g:thoughtbot_ctags_mappings_enabled = get(g:, 'thoughtbot_ctags_mappings_enabled', 1) -if g:thoughtbot_ctags_mappings_enabled != 0 - nmap ct :call ReindexCtags() -endif diff --git a/vimrc b/vimrc deleted file mode 100644 index 8f9d078..0000000 --- a/vimrc +++ /dev/null @@ -1,182 +0,0 @@ -set encoding=utf-8 - -" Leader -let mapleader = " " - -set backspace=2 " Backspace deletes like most programs in insert mode -set nobackup -set nowritebackup -set noswapfile " http://robots.thoughtbot.com/post/18739402579/global-gitignore#comment-458413287 -set history=50 -set ruler " show the cursor position all the time -set showcmd " display incomplete commands -set incsearch " do incremental searching -set laststatus=2 " Always display the status line -set autowrite " Automatically :write before running commands -set modelines=0 " Disable modelines as a security precaution -set nomodeline - -" Switch syntax highlighting on, when the terminal has colors -" Also switch on highlighting the last used search pattern. -if (&t_Co > 2 || has("gui_running")) && !exists("syntax_on") - syntax on -endif - -if filereadable(expand("~/.vimrc.bundles")) - source ~/.vimrc.bundles -endif - -" Load matchit.vim, but only if the user hasn't installed a newer version. -if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# '' - runtime! macros/matchit.vim -endif - -filetype plugin indent on - -augroup vimrcEx - autocmd! - - " When editing a file, always jump to the last known cursor position. - " Don't do it for commit messages, when the position is invalid, or when - " inside an event handler (happens when dropping a file on gvim). - autocmd BufReadPost * - \ if &ft != 'gitcommit' && line("'\"") > 0 && line("'\"") <= line("$") | - \ exe "normal g`\"" | - \ endif - - " Set syntax highlighting for specific file types - autocmd BufRead,BufNewFile *.md set filetype=markdown - autocmd BufRead,BufNewFile .{jscs,jshint,eslint}rc set filetype=json - autocmd BufRead,BufNewFile - \ aliases.local, - \zshenv.local,zlogin.local,zlogout.local,zshrc.local,zprofile.local, - \*/zsh/configs/* - \ set filetype=sh - autocmd BufRead,BufNewFile gitconfig.local set filetype=gitconfig - autocmd BufRead,BufNewFile tmux.conf.local set filetype=tmux - autocmd BufRead,BufNewFile vimrc.local set filetype=vim -augroup END - -" ALE linting events -augroup ale - autocmd! - - if g:has_async - autocmd VimEnter * - \ set updatetime=1000 | - \ let g:ale_lint_on_text_changed = 0 - autocmd CursorHold * call ale#Queue(0) - autocmd CursorHoldI * call ale#Queue(0) - autocmd InsertEnter * call ale#Queue(0) - autocmd InsertLeave * call ale#Queue(0) - else - echoerr "The thoughtbot dotfiles require NeoVim or Vim 8" - endif -augroup END - -" When the type of shell script is /bin/sh, assume a POSIX-compatible -" shell for syntax highlighting purposes. -let g:is_posix = 1 - -" Softtabs, 2 spaces -set tabstop=2 -set shiftwidth=2 -set shiftround -set expandtab - -" Display extra whitespace -set list listchars=tab:»·,trail:·,nbsp:· - -" Use one space, not two, after punctuation. -set nojoinspaces - -" Use The Silver Searcher https://github.com/ggreer/the_silver_searcher -if executable('ag') - " Use Ag over Grep - set grepprg=ag\ --nogroup\ --nocolor - - " Use ag in fzf for listing files. Lightning fast and respects .gitignore - let $FZF_DEFAULT_COMMAND = 'ag --literal --files-with-matches --nocolor --hidden -g ""' - - nnoremap \ :Ag -endif - -" Make it obvious where 80 characters is -set textwidth=80 -set colorcolumn=+1 - -" Numbers -set number -set numberwidth=5 - -" Tab completion -" will insert tab at beginning of line, -" will use completion if not at beginning -set wildmode=list:longest,list:full -function! InsertTabWrapper() - let col = col('.') - 1 - if !col || getline('.')[col - 1] !~ '\k' - return "\" - else - return "\" - endif -endfunction -inoremap =InsertTabWrapper() -inoremap - -" Switch between the last two files -nnoremap - -" Get off my lawn -nnoremap :echoe "Use h" -nnoremap :echoe "Use l" -nnoremap :echoe "Use k" -nnoremap :echoe "Use j" - -" vim-test mappings -nnoremap t :TestFile -nnoremap s :TestNearest -nnoremap l :TestLast -nnoremap a :TestSuite -nnoremap gt :TestVisit - -" Run commands that require an interactive shell -nnoremap r :RunInInteractiveShell - -" Treat
  • and

    tags like the block tags they are -let g:html_indent_tags = 'li\|p' - -" Set tags for vim-fugitive -set tags^=.git/tags - -" Open new split panes to right and bottom, which feels more natural -set splitbelow -set splitright - -" Quicker window movement -nnoremap j -nnoremap k -nnoremap h -nnoremap l - -" Move between linting errors -nnoremap ]r :ALENextWrap -nnoremap [r :ALEPreviousWrap - -" Map Ctrl + p to open fuzzy find (FZF) -nnoremap :Files - -" Set spellfile to location that is guaranteed to exist, can be symlinked to -" Dropbox or kept in Git and managed outside of thoughtbot/dotfiles using rcm. -set spellfile=$HOME/.vim-spell-en.utf-8.add - -" Autocomplete with dictionary words when spell check is on -set complete+=kspell - -" Always use vertical diffs -set diffopt+=vertical - -" Local config -if filereadable($HOME . "/.vimrc.local") - source ~/.vimrc.local -endif diff --git a/vimrc.bundles b/vimrc.bundles deleted file mode 100644 index 633a44f..0000000 --- a/vimrc.bundles +++ /dev/null @@ -1,56 +0,0 @@ -if &compatible - set nocompatible -end - -" Remove declared plugins -function! s:UnPlug(plug_name) - if has_key(g:plugs, a:plug_name) - call remove(g:plugs, a:plug_name) - endif -endfunction -command! -nargs=1 UnPlug call s:UnPlug() - -let g:has_async = v:version >= 800 || has('nvim') - -call plug#begin('~/.vim/bundle') - -" Define bundles via Github repos -Plug 'christoomey/vim-run-interactive' - -" If fzf has already been installed via Homebrew, use the existing fzf -" Otherwise, install fzf. The `--all` flag makes fzf accessible outside of vim -if isdirectory("/usr/local/opt/fzf") - Plug '/usr/local/opt/fzf' -else - Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } -endif - -Plug 'junegunn/fzf.vim' -Plug 'elixir-lang/vim-elixir' -Plug 'fatih/vim-go' -Plug 'janko-m/vim-test' -Plug 'pangloss/vim-javascript' -Plug 'pbrisbin/vim-mkdir' -Plug 'slim-template/vim-slim' -Plug 'tpope/vim-bundler' -Plug 'tpope/vim-endwise' -Plug 'tpope/vim-eunuch' -Plug 'tpope/vim-fugitive' -Plug 'tpope/vim-projectionist' -Plug 'tpope/vim-rails' -Plug 'tpope/vim-rake' -Plug 'tpope/vim-repeat' -Plug 'tpope/vim-rhubarb' -Plug 'tpope/vim-surround' -Plug 'vim-ruby/vim-ruby' -Plug 'vim-scripts/tComment' - -if g:has_async - Plug 'dense-analysis/ale' -endif - -if filereadable(expand("~/.vimrc.bundles.local")) - source ~/.vimrc.bundles.local -endif - -call plug#end()