update jj config to also have 'p' as a shortcut, and jj diff

This commit is contained in:
Barak Michener 2025-10-29 11:46:00 -07:00
parent 46ac775d64
commit 16fddec80c
3 changed files with 16 additions and 7 deletions

View file

@ -40,7 +40,7 @@ size = 19.0
{{ else if eq .chezmoi.hostname "rosencrantz" -}}
size = 15.0
{{ else if eq .chezmoi.hostname "altair" -}}
size = 20.5
size = 22
{{ else -}}
size = 19.0
{{ end }}
@ -82,9 +82,13 @@ key = "U"
mods = "Control|Shift"
[[hints.enabled]]
command = "xdg-open"
post_processing = true
regex = "(magnet:|mailto:|https:|http:|news:|file:|git:|ssh:|ftp:)[^\u0000-\u001F\u007F-Ÿ<>\"\\s{-}\\^⟨⟩`]+"
{{if eq .chezmoi.os "darwin" -}}
command = "open"
{{ else -}}
command = "xdg-open"
{{ end }}
[hints.enabled.binding]
key = "L"

View file

@ -6,10 +6,12 @@ email = "me@barakmich.com"
editor = "nvim"
#default-command = ["log", "--reversed"]
default-command = ["util", "exec", "--", "bash", "-c", "jj log --reversed --no-pager && jj diff -s"]
diff-formatter = ":git"
diff-formatter = ["difft", "--display=inline", "--color=always", "$left", "$right"]
#diff-formatter = ":git"
[revset-aliases]
'nearby(x)' = 'descendants(ancestors(@, x))::'
'closest_bookmark(to)' = "heads(::to & bookmarks())"
[revsets]
log = "nearby(8) | @..main@origin | main@origin::@ | @:: | (visible_heads() & mine())"
@ -18,8 +20,10 @@ log = "nearby(8) | @..main@origin | main@origin::@ | @:: | (visible_heads() & mi
[colors]
"diff token" = { underline = false }
[templates]
git_push_bookmark = '"barakmich/" ++ change_id.short()'
[git]
push-bookmark-prefix = "barakmich/"
push-new-bookmarks = true
# Prevent pushing work in progress or anything explicitly labeled "private"
private-commits = "description(glob:'wip:*') | description(glob:'private:*') | description(glob:'XXX*')"
@ -27,10 +31,11 @@ private-commits = "description(glob:'wip:*') | description(glob:'private:*') | d
[aliases]
bm = ["bookmark", "move", "--to"]
"bm." = ["bookmark", "move", "--to", "@"]
tug = ["bookmark", "move", "--from", "heads(::@- & bookmarks())", "--to", "@-"]
"tug." = ["bookmark", "move", "--from", "heads(::@- & bookmarks())", "--to", "@"]
tug = ["bookmark", "move", "--from", "closest_bookmark(@-)", "--to", "@-"]
"tug." = ["bookmark", "move", "--from", "closest_bookmark(@-)", "--to", "@"]
pull = ["git", "fetch"]
fetch = ["git", "fetch"]
push = ["git", "push"]
p = ["git", "push", "-r", "closest_bookmark(@-)"]
d = ["describe", "-m"]
drop = ["abandon"]

View file

@ -189,7 +189,7 @@ Plug 'frankroeder/parrot.nvim'
Plug 'edolphin-ydf/goimpl.nvim'
Plug 'stevearc/quicker.nvim'
Plug 'sphamba/smear-cursor.nvim'
Plug 'rafikdraoui/jj-diffconflicts'
call plug#end()