From 3da3d0412079f2cd361d37e261a8d126c2ea0eef Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Wed, 10 Nov 2021 00:39:21 -0800 Subject: [PATCH 1/3] nvim: sign column is on and ruler is off --- .config/nvim/lua/blake/settings.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/nvim/lua/blake/settings.lua b/.config/nvim/lua/blake/settings.lua index 7719e1d..a869e05 100644 --- a/.config/nvim/lua/blake/settings.lua +++ b/.config/nvim/lua/blake/settings.lua @@ -35,8 +35,9 @@ set.shortmess = 'filnxtToOFc' --set.spell = true set.spelllang = 'en_us' set.showcmd = true -set.signcolumn = 'auto' +set.signcolumn = 'yes' set.makeprg = 'make -j$(nproc)' +set.ruler = false -- Things that can't be translated to lua vim.cmd 'syntax on' From fe246744756bc035f03ea66c1f7d8c6ae3320267 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Wed, 10 Nov 2021 10:22:08 -0800 Subject: [PATCH 2/3] zsh: organize various `cd` functions --- .zshrc | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/.zshrc b/.zshrc index 482d2a4..0edc6b7 100644 --- a/.zshrc +++ b/.zshrc @@ -197,13 +197,28 @@ 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 # requires that `fzy` is installed - cdf() { + cdt() { 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 chx() { for FILE in "$@";do @@ -293,22 +308,6 @@ 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 error() { ERROR_CODE="$?" From 1c383283c761f1d363e1b6c1f43ed7f251af758e Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Mon, 15 Nov 2021 20:01:20 -0800 Subject: [PATCH 3/3] zsh: new alias for `make` --- .zshrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.zshrc b/.zshrc index fb327a8..2c85b7c 100644 --- a/.zshrc +++ b/.zshrc @@ -86,6 +86,9 @@ # 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?'" + # tell make to use all cpu cores + alias make='make -j$(nproc)' + # Colors alias \ ls='ls -hN --color=auto --group-directories-first' \