Make copy_dotfiles POSIX, simplify zsh files, minor nvim changes
This commit is contained in:
@@ -22,13 +22,13 @@ vim.keymap.set("n", "N", "Nzv")
|
||||
-- maintain cursor position after paragraph formatting
|
||||
vim.keymap.set("n", "=ap", "mF=ap'F")
|
||||
|
||||
-- shortcuts for deleting into the void register
|
||||
vim.keymap.set({ "n", "v" }, "<leader>d", [["_d]])
|
||||
vim.keymap.set("x", "<leader>P", [["_dP]]) -- replace selected text, keep main register
|
||||
-- replace selected text, keep main register
|
||||
vim.keymap.set("x", "<leader>P", [["_dP]])
|
||||
|
||||
-- shortcuts for using + register (system clipboard)
|
||||
vim.keymap.set({ "n", "v" }, "<leader>y", [["+y]])
|
||||
vim.keymap.set("n", "<leader>Y", [["+Y]])
|
||||
vim.keymap.set({ "n", "v" }, "<leader>d", [["+d]])
|
||||
vim.keymap.set("n", "<leader>D", [["+D]])
|
||||
vim.keymap.set("n", "<leader>p", [["+p]])
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@ function ToggleWritingMode()
|
||||
vim.opt_local.relativenumber = true
|
||||
vim.opt_local.signcolumn = "yes"
|
||||
vim.opt_local.cursorline = true
|
||||
vim.api.nvim_set_hl(0, 'SpellCap', vim.g.wrmode_prev_hl_spellcap or {})
|
||||
vim.opt_local.spell = false
|
||||
-- vim.opt_local.wrap = true -- TODO: needed?
|
||||
vim.opt_local.textwidth = 0
|
||||
@@ -98,6 +99,8 @@ function ToggleWritingMode()
|
||||
local writing_pane = vim.api.nvim_get_current_win()
|
||||
EnableWritingModeUiForCurrentWindow()
|
||||
vim.opt_local.spell = true
|
||||
vim.g.wrmode_prev_hl_spellcap = vim.api.nvim_get_hl(0, { name = 'SpellCap' })
|
||||
vim.api.nvim_set_hl(0, 'SpellCap', {})
|
||||
vim.opt_local.textwidth = window_width
|
||||
vim.opt_local.scrolloff = 14
|
||||
vim.opt_local.formatoptions:append('t')
|
||||
|
||||
@@ -5,6 +5,9 @@ set -o vi
|
||||
export PATH=$DIR_BIN:$DIR_SCRIPTS:$PATH:$XDG_DATA_HOME
|
||||
export PATH=$PATH:/opt/homebrew/opt/ccache/libexec:/opt/homebrew/bin
|
||||
|
||||
# set env vars specific to this box, if any
|
||||
[ -r "$HOME/.local-box-vars" ] && . $HOME/.local-box-vars
|
||||
|
||||
# shortcuts for common commands
|
||||
alias 3e='echo;echo;echo'
|
||||
alias 12e='3e;3e;3e;3e'
|
||||
@@ -28,15 +31,36 @@ alias note="cd $DIR_NOTES/inbox; $EDITOR"
|
||||
alias todo="cd $DIR_NOTES/rhythm; $EDITOR todo.md"
|
||||
alias budget="open $DIR_HOME_BOX/finance/budget/.current"
|
||||
|
||||
# login shortcuts
|
||||
alias assume="source assume"
|
||||
alias login-aws='aws sso login --profile'
|
||||
alias login-aws-id-list="grep sso_account_id $HOME/.aws/config"
|
||||
|
||||
# git stuff
|
||||
alias gfo='git fetch origin'
|
||||
alias gfl='git fetch origin; git log'
|
||||
alias gpo='git pull origin'
|
||||
alias gppo='git push origin'
|
||||
alias gst='git status'
|
||||
alias git-push-to-temp='git branch -D temp; git checkout -b temp; git push origin temp -uf; git checkout -'
|
||||
alias gptemp='git-push-to-temp'
|
||||
|
||||
# code/test/linter run and build commands
|
||||
alias bel='bundle exec standardrb'
|
||||
alias bet='bundle exec rspec'
|
||||
alias lintjs='npx prettier --write'
|
||||
alias prl='poetry run black'
|
||||
alias prt='poetry run pytest'
|
||||
|
||||
# containerization
|
||||
alias docker=podman
|
||||
|
||||
# misc commands
|
||||
alias pdt='ping -c 2 drinkingtea.net'
|
||||
alias ppw='ping -c 2 pinewoods.xyz'
|
||||
alias weather='curl "wttr.in/dfw?2&F"'
|
||||
alias shrug='echo "¯\\_(ツ)_/¯"'
|
||||
|
||||
# source extensions and system-specific files
|
||||
[[ -a "$ZDOTDIR/zsh-general-dev" ]] && . "$ZDOTDIR/zsh-general-dev"
|
||||
|
||||
# programming and language setup
|
||||
[[ -n $(command -v mise) ]] && eval "$(mise activate zsh)"
|
||||
export DEVKITARM=/opt/devkitpro/devkitARM
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# set env vars, path updates, etc
|
||||
[[ -a $HOME/.local-box-vars ]] && . $HOME/.local-box-vars
|
||||
|
||||
# login shortcuts
|
||||
alias assume="source assume"
|
||||
alias login-aws='aws sso login --profile'
|
||||
alias login-aws-id-list="grep sso_account_id $HOME/.aws/config"
|
||||
|
||||
# git stuff
|
||||
alias gfo='git fetch origin'
|
||||
alias gfl='git fetch origin; git log'
|
||||
alias gpo='git pull origin'
|
||||
alias gppo='git push origin'
|
||||
alias gst='git status'
|
||||
alias git-push-to-temp='git branch -D temp; git checkout -b temp; git push origin temp -uf; git checkout -'
|
||||
alias gptemp='git-push-to-temp'
|
||||
|
||||
# code/test/linter run and build commands
|
||||
alias bel='bundle exec standardrb'
|
||||
alias bet='bundle exec rspec'
|
||||
alias lintjs='npx prettier --write'
|
||||
alias prl='poetry run black'
|
||||
alias prt='poetry run pytest'
|
||||
|
||||
# containerization
|
||||
alias docker=podman
|
||||
Reference in New Issue
Block a user