From 2a193c2a441f0abc6d7032044cc90fc8eaa06ba8 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 11 Jun 2025 11:03:42 +0200 Subject: [PATCH 1/4] zk: Quicknote alias defaults to current date When creating a quick note with `nnn` on the command line, instead of creating an 'untitled note' if no title is passed, we create a note that is named after its creation date. --- writing/zk/config/sh/alias.d/zk.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/writing/zk/config/sh/alias.d/zk.sh b/writing/zk/config/sh/alias.d/zk.sh index 2a632ad..845650f 100644 --- a/writing/zk/config/sh/alias.d/zk.sh +++ b/writing/zk/config/sh/alias.d/zk.sh @@ -27,7 +27,7 @@ if [ -n "${WIKIROOT}" ]; then _zk_wiki new "$@" } nnn() { # 'new quicknote' - _zk_wiki new -t "${*}" inbox + _zk_wiki new -t "${*:-$(date)}" inbox } nnl() { # 'new note log' _zk_wiki log "$@" From 43ae4ea7d4b47ff86540351f9a9de82b2427d160 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 11 Jun 2025 11:03:42 +0200 Subject: [PATCH 2/4] papis: Fix config setting including comment Comments apparently are only comments at the beginning of a line in the config file for papis. Noted. --- writing/papis/config/papis/config | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/writing/papis/config/papis/config b/writing/papis/config/papis/config index 2729f4e..2852fab 100644 --- a/writing/papis/config/papis/config +++ b/writing/papis/config/papis/config @@ -12,7 +12,8 @@ file-browser = vifm add-edit = True # ref-format = {doc[author_list][0][family]}{doc[year]} ref-format = bbt: -add-folder-name = {doc[author_list][0][family]}-{doc[title]} # NOTE: Has issues if no author list +# NOTE: Has issues if no author list +add-folder-name = {doc[author_list][0][family]}-{doc[title]} add-file-name = {doc[author_list][0][family]}{doc[year]} header-format-file = ~/.config/papis/headerformat extra-bibtex-keys = ["tags", "readstatus", "priority"] @@ -72,3 +73,4 @@ tags = {"red": "important", "green": "extra", "blue": "toread"} full-year = True title-words = 2 title-chars = 20 +title-case = lower From 3f4c057ffe03755dc480423d385c78c85ca760f4 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 12 Jun 2025 10:13:52 +0200 Subject: [PATCH 3/4] nvim: Add option switch to italicize/normalize comments --- nvim/.config/nvim/lua/plugins/base.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/nvim/.config/nvim/lua/plugins/base.lua b/nvim/.config/nvim/lua/plugins/base.lua index da44839..a83507a 100644 --- a/nvim/.config/nvim/lua/plugins/base.lua +++ b/nvim/.config/nvim/lua/plugins/base.lua @@ -289,6 +289,22 @@ return { end, desc = "floating file browser", }, + { + "[oi", + function() + local c = vim.api.nvim_get_hl(0, { name = "Comment" }) + vim.api.nvim_set_hl(0, "Comment", vim.tbl_extend("force", c, { italic = false })) + end, + desc = "no italic comments", + }, + { + "]oi", + function() + local c = vim.api.nvim_get_hl(0, { name = "Comment" }) + vim.api.nvim_set_hl(0, "Comment", vim.tbl_extend("force", {}, c, { italic = true })) + end, + desc = "italic comments", + }, }, }, -- try to avoid putting files in util buffers, e.g. filetree, aerial, undotree, .. From b0ed357037bf80a6477aafec2daeb6e801ecb04e Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 12 Jun 2025 12:12:49 +0200 Subject: [PATCH 4/4] nvim: Move switch options from ]o to ]s maps Function is the same, `]s` for [S]witching something 'off', and `]s` for [S]witching something on. --- nvim/.config/nvim/lua/core/mappings.lua | 4 ++-- nvim/.config/nvim/lua/plugins/base.lua | 4 ++-- nvim/.config/nvim/lua/plugins/prose.lua | 4 ++-- nvim/.config/nvim/lua/plugins/ui.lua | 30 ++++++++++++++----------- 4 files changed, 23 insertions(+), 19 deletions(-) diff --git a/nvim/.config/nvim/lua/core/mappings.lua b/nvim/.config/nvim/lua/core/mappings.lua index dab1ef0..c4be2ee 100644 --- a/nvim/.config/nvim/lua/core/mappings.lua +++ b/nvim/.config/nvim/lua/core/mappings.lua @@ -7,8 +7,8 @@ if is_available("which-key") then { "v", group = "vim" }, { "s", group = "show" }, { "Z", group = "spelling" }, - { "]o", group = "options" }, - { "[o", group = "options" }, + { "]s", group = "switch" }, + { "[s", group = "switch" }, }) end diff --git a/nvim/.config/nvim/lua/plugins/base.lua b/nvim/.config/nvim/lua/plugins/base.lua index a83507a..e0fcfb1 100644 --- a/nvim/.config/nvim/lua/plugins/base.lua +++ b/nvim/.config/nvim/lua/plugins/base.lua @@ -290,7 +290,7 @@ return { desc = "floating file browser", }, { - "[oi", + "[si", function() local c = vim.api.nvim_get_hl(0, { name = "Comment" }) vim.api.nvim_set_hl(0, "Comment", vim.tbl_extend("force", c, { italic = false })) @@ -298,7 +298,7 @@ return { desc = "no italic comments", }, { - "]oi", + "]si", function() local c = vim.api.nvim_get_hl(0, { name = "Comment" }) vim.api.nvim_set_hl(0, "Comment", vim.tbl_extend("force", {}, c, { italic = true })) diff --git a/nvim/.config/nvim/lua/plugins/prose.lua b/nvim/.config/nvim/lua/plugins/prose.lua index 169faa0..542bca4 100644 --- a/nvim/.config/nvim/lua/plugins/prose.lua +++ b/nvim/.config/nvim/lua/plugins/prose.lua @@ -48,7 +48,7 @@ local prose_plugs = { ft = prose_ft, keys = { { - "[ow", + "[sw", function() require("wrapping").soft_wrap_mode() end, @@ -56,7 +56,7 @@ local prose_plugs = { desc = "soft wrap", }, { - "]ow", + "]sw", function() require("wrapping").hard_wrap_mode() end, diff --git a/nvim/.config/nvim/lua/plugins/ui.lua b/nvim/.config/nvim/lua/plugins/ui.lua index 22e5b26..49b614f 100644 --- a/nvim/.config/nvim/lua/plugins/ui.lua +++ b/nvim/.config/nvim/lua/plugins/ui.lua @@ -57,32 +57,36 @@ return { }, keys = { { - "[oc", + "[sc", function() require("colorizer").detach_from_buffer(0) end, - { silent = true, desc = "colorize disable" }, + silent = true, + desc = "colorize disable", }, { - "]oc", + "]sc", function() require("colorizer").attach_to_buffer(0) end, - { silent = true, desc = "colorize enable" }, + silent = true, + desc = "colorize enable", }, { - "]oC", - function() - require("colorizer").attach_to_buffer(0, { mode = "background" }) - end, - { silent = true, desc = "colorize bg" }, - }, - { - "[oC", + "[sC", function() require("colorizer").attach_to_buffer(0, { mode = "virtualtext" }) end, - { silent = true, desc = "colorize eol" }, + silent = true, + desc = "colorize eol", + }, + { + "]sC", + function() + require("colorizer").attach_to_buffer(0, { mode = "background" }) + end, + silent = true, + desc = "colorize bg", }, }, },