Compare commits
15 commits
18ce017b8a
...
72eda6a992
| Author | SHA1 | Date | |
|---|---|---|---|
| 72eda6a992 | |||
| 225641c1f0 | |||
| 068fc77019 | |||
| 613df98520 | |||
| 44cd4481a2 | |||
| 5ab95c724f | |||
| 89737536ea | |||
| 5a9be5479d | |||
| dc7bf66052 | |||
| 98dca7ec04 | |||
| f9d0401132 | |||
| 66005a9948 | |||
| 612b92d148 | |||
| 86306afc08 | |||
| dc1a02ebeb |
7 changed files with 74 additions and 35 deletions
|
|
@ -11,12 +11,19 @@ if require("core.util").is_available("zk") and require("zk.util").notebook_root(
|
|||
map("n", "<CR>", "<cmd>lua vim.lsp.buf.definition()<cr>", { silent = true })
|
||||
end
|
||||
|
||||
-- execute code cells
|
||||
if vim.fn.mapcheck("<localleader>cc") == "" then
|
||||
map("n", "<localleader>cc", require("mdeval").eval_code_block, { silent = true, desc = "evaluate code block" })
|
||||
end
|
||||
if vim.fn.mapcheck("<localleader>cx") == "" then
|
||||
map("n", "<localleader>cx", require("mdeval").eval_clean_results, { silent = true, desc = "clear code results" })
|
||||
if require("core.util").is_available("mdeval") then
|
||||
-- execute code cells
|
||||
if vim.fn.mapcheck("<localleader>cc") == "" then
|
||||
map("n", "<localleader>cc", require("mdeval").eval_code_block, { silent = true, desc = "evaluate code block" })
|
||||
end
|
||||
if vim.fn.mapcheck("<localleader>cx") == "" then
|
||||
map(
|
||||
"n",
|
||||
"<localleader>cx",
|
||||
require("mdeval").eval_clean_results,
|
||||
{ silent = true, desc = "clear code results" }
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
-- jump to beginning of previous/ next cell code
|
||||
|
|
|
|||
|
|
@ -65,10 +65,22 @@ default_services = [
|
|||
),
|
||||
Service(source=["quora.com"], target=["quetre"]),
|
||||
Service(source=["google.com"], target=["whoogle"]),
|
||||
Service(source=["genius.com"], target=["dumb"]),
|
||||
Service(source=["translate.google.com"], target=["lingva", "simplytranslate"]),
|
||||
Service(source=["deepl.com"], target=["simplytranslate"]),
|
||||
Service(source=["bandcamp.com"], target=["tent"]),
|
||||
Service(
|
||||
custom_targets=True,
|
||||
source=["genius.com"],
|
||||
target=[
|
||||
"dumb.privacydev.net",
|
||||
"dumb.privacydev.net",
|
||||
"dm.vern.cc",
|
||||
"sing.whatever.social",
|
||||
"dumb.nunosempere.com",
|
||||
"dumb.lunar.icu",
|
||||
"dumb.esmailelbob.xyz",
|
||||
],
|
||||
),
|
||||
Service(
|
||||
custom_targets=True,
|
||||
source=["pinterest.com"],
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
" Specific directories
|
||||
set classify+=' :dir:/, :exe:, :reg:, :link:,? :?:, ::../::/,
|
||||
\ ::.git/::/,
|
||||
\ ::.config/,,Makefile::/,
|
||||
\ ::.config/::/,
|
||||
\ ::Desktop/::/,
|
||||
\ ::Documents/::/,
|
||||
\ ::Development/::/,
|
||||
|
|
@ -24,7 +24,7 @@ set classify+=' :dir:/, :exe:, :reg:, :link:,? :?:, ::../::
|
|||
\ ::node_modules/::/'
|
||||
|
||||
" Specific files
|
||||
set classify+=' ::.Xdefaults,,.Xresources,,.bashprofile,,.bash_profile,,.bashrc,,.dmrc,,.d_store,,.fasd,,.gitconfig,,.gitignore,,.jack-settings,,.mime.types,,.nvidia-settings-rc,,.pam_environment,,.profile,,.recently-used,,.selected_editor,,.xinitpurc,,.zprofile,,.yarnc,,.snclirc,,.tmux.conf,,.urlview,,.config,,.ini,,.user-dirs.dirs,,.mimeapps.list,,.offlineimaprc,,.msmtprc,,.Xauthority,,config::/,
|
||||
set classify+=' ::.Xdefaults,,.Xresources,,.bashprofile,,.bash_profile,,.bashrc,,.dmrc,,.d_store,,.fasd,,.gitconfig,,.gitignore,,.jack-settings,,.mime.types,,.nvidia-settings-rc,,.pam_environment,,.profile,,.recently-used,,.selected_editor,,.xinitpurc,,.zprofile,,.yarnc,,.snclirc,,.tmux.conf,,.urlview,,.config,,.ini,,.user-dirs.dirs,,.mimeapps.list,,.offlineimaprc,,.msmtprc,,.Xauthority,,Makefile::,
|
||||
\ ::favicon.*,,README,,readme::,
|
||||
\ ::.vim,,.vimrc,,.gvimrc,,.vifm::,
|
||||
\ ::gruntfile.coffee,,gruntfile.js,,gruntfile.ls::,
|
||||
|
|
@ -45,7 +45,7 @@ set classify+='λ ::*.ml,,*.mli::,
|
|||
\ ::*.bmp,,*.gif,,*.ico,,*.jpeg,,*.jpg,,*.png,,*.svg,,*.svgz,,*.tga,,*.tiff,,*.xmb,,*.xcf,,*.xpm,,*.xspf,,*.xwd,,*.cr2,,*.dng,,*.3fr,,*.ari,,*.arw,,*.bay,,*.crw,,*.cr3,,*.cap,,*.data,,*.dcs,,*.dcr,,*.drf,,*.eip,,*.erf,,*.fff,,*.gpr,,*.iiq,,*.k25,,*.kdc,,*.mdc,,*.mef,,*.mos,,*.mrw,,*.obm,,*.orf,,*.pef,,*.ptx,,*.pxn,,*.r3d,,*.raf,,*.raw,,*.rwl,,*.rw2,,*.rwz,,*.sr2,,*.srf,,*.srw,,*.tif,,*.x3f,,*.webp,,*.avif,,*.jxl::,
|
||||
\ ::*.ejs,,*.htm,,*.html,,*.slim,,*.xml::,
|
||||
\ ::*.mustasche::,
|
||||
\ ::*.css,,*.less,,*.bat,,*.conf,,*.ini,,*.rc,,*.yml,,*.cfg::,
|
||||
\ ::*.css,,*.less,,*.bat,,*.conf,,*.ini,,*.rc,,*.yml,,*.yaml,,*.cfg::,
|
||||
\ ::*.rss::,
|
||||
\ ::*.coffee::,
|
||||
\ ::*.twig::,
|
||||
|
|
|
|||
|
|
@ -9,9 +9,10 @@ key = "73BA40D5AFAF49C9"
|
|||
[git]
|
||||
sign-on-push = true
|
||||
subprocess = true
|
||||
private-commits = "description(glob:'wip:*') | description(glob:'private:*')" # refuse to push WIP commits
|
||||
private-commits = "description(glob-i:'WIP:*') | description(glob-i:'PRIVATE:*')" # refuse to push WIP commits
|
||||
|
||||
[ui]
|
||||
default-command = "log"
|
||||
diff-editor = ["nvim", "-c", "DiffEditor $left $right $output"]
|
||||
pager = "delta"
|
||||
|
||||
|
|
@ -39,3 +40,4 @@ log = "ancestors(@, 5) | ancestors(trunk()..(visible_heads() & mine()), 2) | tru
|
|||
"downstream(x,y)" = "(x::y) & y"
|
||||
"branches" = "downstream(trunk(), bookmarks()) & mine()"
|
||||
"curbranch" = "latest(branches::@- & branches)"
|
||||
"githead" = "::git_head()"
|
||||
|
|
|
|||
|
|
@ -14,20 +14,17 @@ alias jds="jj describe"
|
|||
alias jc="jj commit"
|
||||
|
||||
# finding out the current snapshot
|
||||
js() {
|
||||
if [ "$#" -eq 0 ]; then
|
||||
jj status
|
||||
else
|
||||
jj show "$*"
|
||||
fi
|
||||
}
|
||||
alias js="jj status"
|
||||
alias jw="jj show"
|
||||
alias jd="jj diff"
|
||||
|
||||
# for describe-and-edit workflows
|
||||
# https://steveklabnik.github.io/jujutsu-tutorial/real-world-workflows/the-edit-workflow.html
|
||||
alias je="jj edit"
|
||||
alias jee="jj next --edit"
|
||||
alias jen="jj next --edit"
|
||||
alias jep="jj prev --edit"
|
||||
alias jenn="jj next"
|
||||
alias jepp="jj prev"
|
||||
|
||||
# for squash-and-go workflows
|
||||
# https://steveklabnik.github.io/jujutsu-tutorial/real-world-workflows/the-squash-workflow.html
|
||||
|
|
@ -36,16 +33,19 @@ alias jsi="jj squash --interactive"
|
|||
|
||||
# oops buttons
|
||||
alias ju="jj undo"
|
||||
# for damn,-forgot-to-split-this-commit workflow
|
||||
# Creates a new commit before with your selected changes, lets you describe it and carry on
|
||||
alias ji="jj new -B@ --no-edit && jj squash --interactive && jj edit '@-' && jj describe && jj edit '@+'"
|
||||
# allows you to split the current change into multiple
|
||||
alias ji="jj split"
|
||||
# quickly get rid of a change
|
||||
alias jab="jj abandon"
|
||||
|
||||
# revset info
|
||||
alias J="jj log -r 'all()'" # mirror default command being log
|
||||
alias jl="jj log -T builtin_log_oneline"
|
||||
alias jL="jj log -r 'all()'"
|
||||
alias JL="jj log -T builtin_log_oneline -r 'all()'"
|
||||
alias jlo="jj log --summary"
|
||||
alias jLO="jj log --summary -r 'all()'"
|
||||
alias JLO="jj log --summary -r 'all()'"
|
||||
alias jloo="jj log --patch"
|
||||
alias JLOO="jj log --patch -r 'all()'"
|
||||
alias jol="jj op log"
|
||||
jlf() {
|
||||
jj log -r "description($*)"
|
||||
|
|
@ -64,7 +64,9 @@ alias jrb="jj rebase"
|
|||
|
||||
# 'branching' bookmark work
|
||||
alias jb="jj bookmark"
|
||||
alias jbm="jj bookmark set main"
|
||||
jbm() {
|
||||
jj bookmark set -r "${1:-@}" main
|
||||
}
|
||||
|
||||
# remote work
|
||||
alias jrv="jj git remote list"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ highlight: true
|
|||
indent_character: '|'
|
||||
journals:
|
||||
default:
|
||||
journal: ~/documents/records/jrnl.md
|
||||
journal: ~/documents/notes/journal/jrnl.md
|
||||
linewrap: 79
|
||||
tagsymbols: +
|
||||
template: false
|
||||
|
|
|
|||
|
|
@ -1,19 +1,35 @@
|
|||
#!/usr/bin/env sh
|
||||
#
|
||||
|
||||
_zk_wiki() {
|
||||
zk --notebook-dir="$WIKIROOT" "$@"
|
||||
}
|
||||
|
||||
n() {
|
||||
if [ $# -eq 0 ]; then
|
||||
zk edit -i
|
||||
_zk_wiki edit -i
|
||||
else
|
||||
zk "${@}"
|
||||
_zk_wiki "${@}"
|
||||
fi
|
||||
}
|
||||
|
||||
# open notes with my vim zettelkasten plugin
|
||||
# TODO better implementation conditional on zk.nvim & zettelkasten existing
|
||||
# nvim +'lua pcall(require "zk.commands"') --headless +qa 2>&1 or similar to check - but slow
|
||||
if command -v nvim >/dev/null 2>&1; then
|
||||
alias ni='nvim +"lua require \"zk.commands\".get(\"ZkCd\")()" +"edit $WIKIROOT/index.md"'
|
||||
fi
|
||||
# We have a local wiki
|
||||
if [ -n "${WIKIROOT}" ]; then
|
||||
# open notes with my vim zettelkasten plugin
|
||||
# TODO better implementation conditional on zk.nvim & zettelkasten existing
|
||||
# nvim +'lua pcall(require "zk.commands"') --headless +qa 2>&1 or similar to check - but slow
|
||||
if command -v nvim >/dev/null 2>&1; then
|
||||
alias ni='nvim +"lua require \"zk.commands\".get(\"ZkCd\")()" +"edit $WIKIROOT/index.md"'
|
||||
fi
|
||||
|
||||
alias ncd='pushd $WIKIROOT'
|
||||
alias ncd='cd $WIKIROOT'
|
||||
nn() { # 'new note'
|
||||
_zk_wiki new "$@"
|
||||
}
|
||||
nnl() { # 'new note log'
|
||||
_zk_wiki log "$@"
|
||||
}
|
||||
nnd() { # 'new note draft'
|
||||
_zk_wiki draft "$@"
|
||||
}
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue