Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More aliases #159

Merged
merged 2 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[bumpversion]
current_version = 0.1.157
current_version = 0.1.158
7 changes: 6 additions & 1 deletion git/aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ if command -v git >/dev/null 2>&1; then
alias grmr='git rm -r'
alias grmrf='git rm -rf'
# status
alias gs='git status'
gs() { git status "$@"; }
# stash
alias gst='git stash'
alias gstd='git stash drop'
Expand Down Expand Up @@ -233,4 +233,9 @@ if command -v git >/dev/null 2>&1; then
# push
alias gpw='gp && gitweb'
alias gpfw='gpf && gitweb'

# watchexec
if command -v gitweb >/dev/null 2>&1; then
gsw() { watchexec -- git status "$@"; }
fi
fi
4 changes: 4 additions & 0 deletions install-mac.conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@
Installing stylua,
]
- ["command -v tmux >/dev/null 2>&1 || brew install tmux", Installing tmux]
- [
"command -v topgrade >/dev/null 2>&1 || brew install topgrade",
Installing topgrade,
]
- ["command -v uv >/dev/null 2>&1 || brew install uv", Installing uv]
- [
"command -v watch >/dev/null 2>&1 || brew install watch",
Expand Down
30 changes: 15 additions & 15 deletions nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
},
"conform.nvim": {
"branch": "master",
"commit": "9a06e83527407a7600a2fe4e0d10adf432b6215e"
"commit": "c26dadf8a47a547768d1048a0d698ecec33494ce"
},
"dial.nvim": {
"branch": "master",
"commit": "7af2daaaf933b0617ded0f78b49f4d5fc45f9f64"
"commit": "750f802879c90ea51f92b68c35fa562ee575804a"
},
"fidget.nvim": {
"branch": "main",
Expand All @@ -53,27 +53,27 @@
},
"fzf-lua": {
"branch": "main",
"commit": "1ec6eeda11c3a3dcd544e1c61ad4b8c9b49903c4"
"commit": "41ea49cfc1b3f0586753bbeb7850474f28dc22cf"
},
"gitsigns.nvim": {
"branch": "main",
"commit": "8df63f2ddc615feb71fd4aee45a4cee022876df1"
"commit": "6b1a14eabcebbcca1b9e9163a26b2f8371364cb7"
},
"inc-rename.nvim": {
"branch": "main",
"commit": "535b508c0cb14d00c1836ad901b3c531cb1152bb"
},
"indent-blankline.nvim": {
"branch": "master",
"commit": "4036c8ae9cc29faf8e6443fa5b23e679db055d24"
"commit": "65e20ab94a26d0e14acac5049b8641336819dfc7"
},
"iswap.nvim": {
"branch": "master",
"commit": "e02cc91f2a8feb5c5a595767d208c54b6e3258ec"
},
"lazy.nvim": {
"branch": "main",
"commit": "4ea9fe060042f345960ad0c01aa7bca91405e10a"
"commit": "a1fffe18f9355030fbb483156c762f50f5e0db73"
},
"leap.nvim": {
"branch": "main",
Expand All @@ -89,7 +89,7 @@
},
"luasnip": {
"branch": "master",
"commit": "50fcf17db7c75af80e6b6109acfbfb4504768780"
"commit": "ce0a05ab4e2839e1c48d072c5236cce846a387bc"
},
"marks.nvim": {
"branch": "master",
Expand Down Expand Up @@ -145,23 +145,23 @@
},
"nvim-lint": {
"branch": "master",
"commit": "941fa1220a61797a51f3af9ec6b7d74c8c7367ce"
"commit": "efc6fc83f0772283e064c53a8f9fb5645bde0bc0"
},
"nvim-lspconfig": {
"branch": "master",
"commit": "9c9eb07fecc578e25e28db8dc9002b43fff2ed79"
"commit": "95b2fc427353e42318c974d10685d500441b821b"
},
"nvim-neoclip.lua": {
"branch": "main",
"commit": "709c97fabec9da7d04f7d2f5e207423af8c02871"
},
"nvim-spectre": {
"branch": "master",
"commit": "ec67d4b5370094b923dfcf6b09b39142f2964861"
"commit": "49fae98ef2bfa8342522b337892992e3495065d5"
},
"nvim-surround": {
"branch": "main",
"commit": "b36bf49d097a09781ad6ac0cfea28b40b74570a3"
"commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f"
},
"nvim-tree-pairs": {
"branch": "main",
Expand All @@ -173,11 +173,11 @@
},
"nvim-treesitter": {
"branch": "master",
"commit": "9d80c1497ec343f81c0c5800b65f2e73ca569025"
"commit": "3e535e826da265748b875b18dbfb361bd1a1701c"
},
"nvim-treesitter-context": {
"branch": "master",
"commit": "5efba33af0f39942e426340da7bc15d7dec16474"
"commit": "f2cbd231e296a282aa9aedb2a411539801557307"
},
"nvim-treesitter-textobjects": {
"branch": "master",
Expand Down Expand Up @@ -221,11 +221,11 @@
},
"tokyonight.nvim": {
"branch": "main",
"commit": "81c867c5f638597a82c82094dcb90ed42444dabc"
"commit": "30d7be361a7fbf187a881f17e574e9213d5108ea"
},
"trouble.nvim": {
"branch": "main",
"commit": "57761ba7148164f0315ed203e714ac242329abd4"
"commit": "88c3be40c061ce053ab326ce4fdcb973a1f785ff"
},
"vim-caser": {
"branch": "master",
Expand Down
9 changes: 9 additions & 0 deletions nvim/lua/snippets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ local s = ls.snippet
local t = ls.text_node

ls.add_snippets("python", {
-- breakpoints
s("bp", { t({ "breakpoint()", "" }) }),
s("index-bp", {
t({ "if index == " }),
i(1, "Index"),
t({ ":", " breakpoint()" }),
}),

-- miscellaneous
s("fu-annotations", { t({ "from __future__ import annotations", "" }) }),
Expand Down Expand Up @@ -110,6 +116,8 @@ ls.add_snippets("python", {
s("po-int64", { t({ "from polars import Int64", "" }) }),
s("po-list", { t({ "from polars import List", "" }) }),
s("po-lit", { t({ "from polars import lit", "" }) }),
s("po-max-horizontal", { t({ "from polars import max_horizontal", "" }) }),
s("po-min-horizontal", { t({ "from polars import min_horizontal", "" }) }),
s("po-series", { t({ "from polars import Series", "" }) }),
s("po-struct", { t({ "from polars import struct", "" }) }),
s("po-utf8", { t({ "from polars import Utf8", "" }) }),
Expand All @@ -128,6 +136,7 @@ ls.add_snippets("python", {
s("py-approx", { t({ "from pytest import approx", "" }) }),
s("py-fixture", { t({ "from pytest import fixture", "" }) }),
s("py-mark", { t({ "from pytest import mark, param", "" }) }),
s("py-param", { t({ "from pytest import param", "" }) }),
s("py-raises", { t({ "from pytest import raises", "" }) }),

-- pytest-benchmark
Expand Down
9 changes: 7 additions & 2 deletions shell/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ fi

# ps
alias pst='ps -fLu "$USER"| wc -l'
if [ "$(command -v watch)" ]; then
if command -v watch >/dev/null 2>&1; then
alias wpst='watch -d -n0.1 "ps -fLu \"$USER\" | wc -l"'
fi

# pyright
if [ "$(command -v pyright)" ]; then
if command -v pyright >/dev/null 2>&1; then
pyr() { pyright "$@"; }
pyrw() { pyr -w "$@"; }
fi
Expand All @@ -184,6 +184,11 @@ pyproject() { ${EDITOR} "$(groot)"/pyproject.toml; }
# q
start_q() { QHOME="${HOME}"/q rlwrap -r "$HOME"/q/m64/q "$@"; }

# rg
if command -v pyright >/dev/null 2>&1 && command -v watchexec >/dev/null 2>&1; then
rgw() { watchexec rg "$@"; }
fi

# rm
alias rmr='rm -r'
alias rmf='rm -f'
Expand Down