Merge branch 'master' of git.blakenorth.net/home/git/dotfiles
This commit is contained in:
commit
8715300a8f
2 changed files with 22 additions and 19 deletions
|
@ -35,8 +35,9 @@ set.shortmess = 'filnxtToOFc'
|
||||||
--set.spell = true
|
--set.spell = true
|
||||||
set.spelllang = 'en_us'
|
set.spelllang = 'en_us'
|
||||||
set.showcmd = true
|
set.showcmd = true
|
||||||
set.signcolumn = 'auto'
|
set.signcolumn = 'yes'
|
||||||
set.makeprg = 'make -j$(nproc)'
|
set.makeprg = 'make -j$(nproc)'
|
||||||
|
set.ruler = false
|
||||||
|
|
||||||
-- Things that can't be translated to lua
|
-- Things that can't be translated to lua
|
||||||
vim.cmd 'syntax on'
|
vim.cmd 'syntax on'
|
||||||
|
|
38
.zshrc
38
.zshrc
|
@ -86,6 +86,9 @@
|
||||||
# I hate it when I get ghost script instead of git status. this will be removed
|
# I hate it when I get ghost script instead of git status. this will be removed
|
||||||
alias gs="echo 'you don'\''t really want ghost script, do you?'"
|
alias gs="echo 'you don'\''t really want ghost script, do you?'"
|
||||||
|
|
||||||
|
# tell make to use all cpu cores
|
||||||
|
alias make='make -j$(nproc)'
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
alias \
|
alias \
|
||||||
ls='ls -hN --color=auto --group-directories-first' \
|
ls='ls -hN --color=auto --group-directories-first' \
|
||||||
|
@ -199,13 +202,28 @@
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# cd file: cd to the containing dir of a file or folder, given part of its name
|
# cd to: cd to the containing dir of a file or folder, given part of its name
|
||||||
# can take an `fd` command
|
# can take an `fd` command
|
||||||
# requires that `fzy` is installed
|
# requires that `fzy` is installed
|
||||||
cdf() {
|
cdt() {
|
||||||
cd "$(dirname "$(fd $@ | fzy)")" && pwd
|
cd "$(dirname "$(fd $@ | fzy)")" && pwd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# cd all: opens a new shell in each of the directories below the one you're in, so
|
||||||
|
# you can execute commands in them until you type 'exit'
|
||||||
|
# If I use this enough, I may make something that can do more
|
||||||
|
# Ideas for what it could do in the future:
|
||||||
|
# - somehow record typed commands so they can be automatically repeated like a macro
|
||||||
|
# - maybe get the length of the histfile before and after, executing the last X number of commands
|
||||||
|
# - Maybe just add an argument that takes a command and executes it in all dirs
|
||||||
|
# (although that wouldn't be as good as recording actions bc it's easy to do
|
||||||
|
# that by just writing a for loop)
|
||||||
|
cda() {
|
||||||
|
for DIR in *; do
|
||||||
|
(cd "$DIR" && zsh)
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# toggles whether a file or group of files is executable
|
# toggles whether a file or group of files is executable
|
||||||
chx() {
|
chx() {
|
||||||
for FILE in "$@";do
|
for FILE in "$@";do
|
||||||
|
@ -295,22 +313,6 @@
|
||||||
echo "$FILEPATH" | grep -o 'site.*' | sed 's+^site+https://blakenorth.net+g'
|
echo "$FILEPATH" | grep -o 'site.*' | sed 's+^site+https://blakenorth.net+g'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Opens a subshell in each of the directories below the one you're in, so
|
|
||||||
# you can execute commands in them
|
|
||||||
# If I use this enough, I may make something that can do more
|
|
||||||
# Ideas for what it could do in the future:
|
|
||||||
# - somehow record typed commands so they can be automatically repeated
|
|
||||||
# - maybe get the length of the histfile before and after, executing the
|
|
||||||
# last X number of commands
|
|
||||||
# - Maybe just add an argument that takes a command and executes it in all dirs
|
|
||||||
# (although that wouldn't be as good as recording actions bc it's easy to do
|
|
||||||
# that by just writing a for loop)
|
|
||||||
foreachdir() {
|
|
||||||
for DIR in *; do
|
|
||||||
(cd "$DIR" && zsh)
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# for sending error messages from functions and whatnot
|
# for sending error messages from functions and whatnot
|
||||||
error() {
|
error() {
|
||||||
ERROR_CODE="$?"
|
ERROR_CODE="$?"
|
||||||
|
|
Loading…
Add table
Reference in a new issue