From b7d2fdea3d1775cd6d1adf420f6802cffc2ade1a Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 11 Dec 2025 18:09:54 +0100 Subject: [PATCH 1/7] nvim: Add csvview for tablelike csv files Gives a very nice viewing and editing experience for csv files. Not sure what the performance impact is for bigger files, but certainly is worth it for the smaller ones. Automatically switches on the view for `.csv` and `.tsv` files. Additionally, adds some keymaps whenever a csv-like file is loaded (i.e. when the `CsvViewEnable` mode is on): and to traverse up and down rows, and to traverse columns left and right. Adds a 'field' textobject (`if` and `af`), though only a single field can currently be changed at once. --- nvim/.config/nvim/after/ftplugin/csv.lua | 4 ++++ nvim/.config/nvim/after/ftplugin/tsv.lua | 4 ++++ nvim/.config/nvim/lazy-lock.json | 1 + .../nvim/lua/modules/data_analysis.lua | 20 +++++++++++++++++++ 4 files changed, 29 insertions(+) create mode 100644 nvim/.config/nvim/after/ftplugin/csv.lua create mode 100644 nvim/.config/nvim/after/ftplugin/tsv.lua diff --git a/nvim/.config/nvim/after/ftplugin/csv.lua b/nvim/.config/nvim/after/ftplugin/csv.lua new file mode 100644 index 0000000..80ea44c --- /dev/null +++ b/nvim/.config/nvim/after/ftplugin/csv.lua @@ -0,0 +1,4 @@ +-- turn on a nice table view if we have it +if require("core.util").is_available("csvview") then + require("csvview").enable() +end diff --git a/nvim/.config/nvim/after/ftplugin/tsv.lua b/nvim/.config/nvim/after/ftplugin/tsv.lua new file mode 100644 index 0000000..80ea44c --- /dev/null +++ b/nvim/.config/nvim/after/ftplugin/tsv.lua @@ -0,0 +1,4 @@ +-- turn on a nice table view if we have it +if require("core.util").is_available("csvview") then + require("csvview").enable() +end diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 588fa04..ec5a304 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -16,6 +16,7 @@ "conform.nvim": { "branch": "master", "commit": "a6f5bdb78caa305496357d17e962bbc4c0b392e2" }, "copilot-lualine": { "branch": "main", "commit": "6bc29ba1fcf8f0f9ba1f0eacec2f178d9be49333" }, "copilot.lua": { "branch": "master", "commit": "c1bb86abbed1a52a11ab3944ef00c8410520543d" }, + "csvview.nvim": { "branch": "main", "commit": "a4c45eadb03a462a80dd1a545d0f9cb636b73664" }, "dial.nvim": { "branch": "master", "commit": "2c7e2750372918f072a20f3cf754d845e143d7c9" }, "dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" }, "fidget.nvim": { "branch": "main", "commit": "b61e8af9b8b68ee0ec7da5fb7a8c203aae854f2e" }, diff --git a/nvim/.config/nvim/lua/modules/data_analysis.lua b/nvim/.config/nvim/lua/modules/data_analysis.lua index 008218c..0050da3 100644 --- a/nvim/.config/nvim/lua/modules/data_analysis.lua +++ b/nvim/.config/nvim/lua/modules/data_analysis.lua @@ -1,4 +1,24 @@ return { + { + -- pretty table-view and movement for CSV-like files + "hat0uma/csvview.nvim", + opts = { + view = { + display_mode = "border", + spacing = 1, + }, + keymaps = { + jump_next_field_end = { "", mode = { "n", "v" } }, + jump_prev_field_end = { "", mode = { "n", "v" } }, + jump_next_row = { "", mode = { "n", "v" } }, + jump_prev_row = { "", mode = { "n", "v" } }, + textobject_field_inner = { "if", mode = { "o", "x" } }, + textobject_field_outer = { "af", mode = { "o", "x" } }, + }, + }, + cmd = { "CsvViewEnable", "CsvViewDisable", "CsvViewToggle" }, + ft = { "csv", "tsv", "dsv", "psv", "ssv", "scsv" }, + }, { "jmbuhr/otter.nvim", config = function() From ab3a104a858080a8bbda436e0a828b456390e6d0 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 11 Dec 2025 18:37:23 +0100 Subject: [PATCH 2/7] nvim: Move flash.nvim and spellsync out of base modules Since flash, while integral to my day-to-day editing is not about providing a _base_ to other plugins, but editing, it moved to the editing module. Spellsync is only really useful in a prose context in my workflows, so this is where it went. --- nvim/.config/nvim/lua/modules/base.lua | 40 ----------------------- nvim/.config/nvim/lua/modules/editing.lua | 38 +++++++++++++++++++++ nvim/.config/nvim/lua/modules/prose.lua | 2 ++ 3 files changed, 40 insertions(+), 40 deletions(-) diff --git a/nvim/.config/nvim/lua/modules/base.lua b/nvim/.config/nvim/lua/modules/base.lua index 988eb8d..68ac21f 100644 --- a/nvim/.config/nvim/lua/modules/base.lua +++ b/nvim/.config/nvim/lua/modules/base.lua @@ -43,44 +43,6 @@ return { }, }, }, - -- jump between letters with improved fFtT quicksearch, mimics sneak - { - "folke/flash.nvim", - event = "VeryLazy", - opts = { - modes = { - search = { - enabled = false, - }, - }, - }, - keys = { - { - "s", - mode = { "n", "x" }, - function() - require("flash").jump() - end, - desc = "Flash", - }, - { - "S", - mode = { "n", "x", "o" }, - function() - require("flash").treesitter() - end, - desc = "Flash Treesitter", - }, - { - "r", - mode = "o", - function() - require("flash").remote() - end, - desc = "Remote Flash", - }, - }, - }, -- generic tool installer; automatic external dependency mgmt for neovim -- used in my config for LSPs, formatters and linters @@ -100,8 +62,6 @@ return { { "vm", ":Mason", desc = "Mason" }, }, }, - -- personal dict improvements for git sync - { "micarmst/vim-spellsync", event = "VeryLazy" }, { "folke/which-key.nvim", event = "CursorHold", diff --git a/nvim/.config/nvim/lua/modules/editing.lua b/nvim/.config/nvim/lua/modules/editing.lua index 2c37409..e73c6ec 100644 --- a/nvim/.config/nvim/lua/modules/editing.lua +++ b/nvim/.config/nvim/lua/modules/editing.lua @@ -2,6 +2,44 @@ return { -- surround things with other things using ys/cs/ds { "kylechui/nvim-surround", config = true, event = { "CursorHold", "InsertEnter" } }, + -- jump between letters with improved fFtT quicksearch, mimics sneak + { + "folke/flash.nvim", + event = "VeryLazy", + opts = { + modes = { + search = { + enabled = false, + }, + }, + }, + keys = { + { + "s", + mode = { "n", "x" }, + function() + require("flash").jump() + end, + desc = "Flash", + }, + { + "S", + mode = { "n", "x", "o" }, + function() + require("flash").treesitter() + end, + desc = "Flash Treesitter", + }, + { + "r", + mode = "o", + function() + require("flash").remote() + end, + desc = "Remote Flash", + }, + }, + }, -- extend the ^x / ^a possibilities to dates, hex, alphabets, markdown headers -- REMAPPED TO C-X / C-S for decrement/increment { diff --git a/nvim/.config/nvim/lua/modules/prose.lua b/nvim/.config/nvim/lua/modules/prose.lua index 0d277f3..3c2bed1 100644 --- a/nvim/.config/nvim/lua/modules/prose.lua +++ b/nvim/.config/nvim/lua/modules/prose.lua @@ -340,6 +340,8 @@ local prose_plugs = { dependencies = { "nvim-treesitter/nvim-treesitter" }, event = { "BufEnter *.mdx" }, -- since the plug itself defines mdx ft }, + -- personal dict improvements for git sync + { "micarmst/vim-spellsync", event = "VeryLazy" }, } return prose_plugs From 585a48ff94d101478612e94754112bccb1d44e10 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 11 Dec 2025 20:24:38 +0100 Subject: [PATCH 3/7] nvim: Add mapping to flash.nvim current word Use to jump to any word that is the same as the current word under the cursor using flash. Moved the previous flash treesitter binding and updated it to `treesitter_search` so any word in the current buffer view can be used as starting point for a tresitter-based selection. Mapping moved to as is (somewhat) mimics the remote-based mappings for flash. --- nvim/.config/nvim/lua/modules/editing.lua | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/nvim/.config/nvim/lua/modules/editing.lua b/nvim/.config/nvim/lua/modules/editing.lua index e73c6ec..88d0fb7 100644 --- a/nvim/.config/nvim/lua/modules/editing.lua +++ b/nvim/.config/nvim/lua/modules/editing.lua @@ -24,11 +24,13 @@ return { }, { "S", - mode = { "n", "x", "o" }, + mode = { "n", "x" }, function() - require("flash").treesitter() + require("flash").jump({ + pattern = vim.fn.expand(""), + }) end, - desc = "Flash Treesitter", + desc = "Flash", }, { "r", @@ -38,6 +40,14 @@ return { end, desc = "Remote Flash", }, + { + "R", + mode = { "n", "x", "o" }, + function() + require("flash").treesitter_search() + end, + desc = "Flash Treesitter", + }, }, }, -- extend the ^x / ^a possibilities to dates, hex, alphabets, markdown headers From 23cb8d32e592b86a70c2cd5fb3278c0025254441 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 11 Dec 2025 20:39:05 +0100 Subject: [PATCH 4/7] nvim: Add spider plugin for better web key movement Improves the 'subword' and punctuation jumps of the w/e/b keys, by adhering to snake_case and CamelCase words and jumping to subparts of them, as well as ignoring 'useless' punctuation when jumping. --- nvim/.config/nvim/lazy-lock.json | 1 + nvim/.config/nvim/lua/modules/editing.lua | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index ec5a304..bcb0216 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -74,6 +74,7 @@ "nvim-lint": { "branch": "master", "commit": "f126af5345c7472e9a0cdbe1d1a29209be72c4c4" }, "nvim-lspconfig": { "branch": "master", "commit": "77d3fdfb3554632c7a3b101ded643d422de7626f" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, + "nvim-spider": { "branch": "main", "commit": "fed9f683db005e6eb676e11a615b0e249a21142e" }, "nvim-surround": { "branch": "main", "commit": "8dd9150ca7eae5683660ea20cec86edcd5ca4046" }, "nvim-toggleterm.lua": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, diff --git a/nvim/.config/nvim/lua/modules/editing.lua b/nvim/.config/nvim/lua/modules/editing.lua index 88d0fb7..a306205 100644 --- a/nvim/.config/nvim/lua/modules/editing.lua +++ b/nvim/.config/nvim/lua/modules/editing.lua @@ -2,6 +2,16 @@ return { -- surround things with other things using ys/cs/ds { "kylechui/nvim-surround", config = true, event = { "CursorHold", "InsertEnter" } }, + -- more intelligent w/e/b key jumps including CamelCase, snake_case words and + -- ignoring some punctuation + { + "chrisgrieser/nvim-spider", + keys = { + { "w", "lua require('spider').motion('w')", mode = { "n", "o", "x" } }, + { "e", "lua require('spider').motion('e')", mode = { "n", "o", "x" } }, + { "b", "lua require('spider').motion('b')", mode = { "n", "o", "x" } }, + }, + }, -- jump between letters with improved fFtT quicksearch, mimics sneak { "folke/flash.nvim", From 93a8adb02b69be8236864bc2828645a69bc1151b Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 12 Dec 2025 09:29:18 +0100 Subject: [PATCH 5/7] xdg: Move music and videos into right media dir Default to have both videos and audio (music) in the correct dirs under `~/media/{audio,video}` directly. This makes logical sense but also fits much better to my current organization scheme. --- desktop/.config/user-dirs.dirs | 2 +- sh/.config/sh/xdg | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop/.config/user-dirs.dirs b/desktop/.config/user-dirs.dirs index 7514136..5907530 100644 --- a/desktop/.config/user-dirs.dirs +++ b/desktop/.config/user-dirs.dirs @@ -8,7 +8,7 @@ XDG_DESKTOP_DIR="$HOME/desktop" XDG_DOCUMENTS_DIR="$HOME/documents" XDG_DOWNLOAD_DIR="$HOME/downloads" -XDG_MUSIC_DIR="$HOME/media/audio/music" +XDG_MUSIC_DIR="$HOME/media/music" XDG_PICTURES_DIR="$HOME/pictures" XDG_PUBLICSHARE_DIR="$HOME/" XDG_TEMPLATES_DIR="$HOME/" diff --git a/sh/.config/sh/xdg b/sh/.config/sh/xdg index 024e330..63648aa 100644 --- a/sh/.config/sh/xdg +++ b/sh/.config/sh/xdg @@ -26,9 +26,9 @@ test "$XDG_DOCUMENTS_DIR" || export XDG_DOCUMENTS_DIR="$HOME/documents" test "$XDG_DOWNLOAD_DIR" || export XDG_DOWNLOAD_DIR="$HOME/downloads" export XDG_MEDIA_DIR="$HOME/media" -export XDG_MUSIC_DIR="$XDG_MEDIA_DIR/audio/music" +export XDG_MUSIC_DIR="$XDG_MEDIA_DIR/music" export XDG_PICTURES_DIR="$HOME/pictures" -export XDG_VIDEOS_DIR="$HOME/videos" +export XDG_VIDEOS_DIR="$XDG_MEDIA_DIR/videos" ## Non-Standard additions # non-standard, is added to path to enable execution of any files herein From 4e06f2e23b35653d978629b679059b695d588106 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 12 Dec 2025 09:29:18 +0100 Subject: [PATCH 6/7] zsh: Remove carapace It was a nice experiment but carapace and fzf-tab simply do not work together currently. The main issue is double-backlashes whenever a file with spaces it selected. This is a _huge_ issue since it simply does not allow completing _any_ file with spaces and is extremely tedious. Issue tracked here: https://github.com/carapace-sh/carapace-bin/issues/2667 https://github.com/Aloxaf/fzf-tab/issues/503 There are smaller issues like `cd folder/` completion adding a space after the word so you cannot complete further 'into' the directory, and some other small problems. All of that only even works with a 'empty query string' hack to get the two working together in the first place: https://github.com/carapace-sh/carapace-bin/issues/2819#issuecomment-3092307945%3E Ultimately it just seems not worth it to me. --- sh/.config/carapace/specs/cat.yaml | 3 --- terminal/.config/bash/bashrc | 2 -- terminal/.config/nushell/config.nu | 2 -- terminal/.config/nushell/env.nu | 23 ----------------------- terminal/.config/zsh/zshrc | 5 ----- 5 files changed, 35 deletions(-) delete mode 100644 sh/.config/carapace/specs/cat.yaml delete mode 100644 terminal/.config/nushell/env.nu diff --git a/sh/.config/carapace/specs/cat.yaml b/sh/.config/carapace/specs/cat.yaml deleted file mode 100644 index c73491b..0000000 --- a/sh/.config/carapace/specs/cat.yaml +++ /dev/null @@ -1,3 +0,0 @@ -# yaml-language-server: $schema=https://carapace.sh/schemas/command.json -name: cat -run: "[bat]" diff --git a/terminal/.config/bash/bashrc b/terminal/.config/bash/bashrc index 9a03b5a..2374192 100644 --- a/terminal/.config/bash/bashrc +++ b/terminal/.config/bash/bashrc @@ -28,8 +28,6 @@ alias ls='ls --color=auto' eval "$(starship init bash)" eval "$(zoxide init bash)" -export CARAPACE_BRIDGES='zsh,fish,bash,inshellisense' # optional -source <(carapace _carapace) set -o vi stty time 0 diff --git a/terminal/.config/nushell/config.nu b/terminal/.config/nushell/config.nu index d483f7a..49cc9e5 100644 --- a/terminal/.config/nushell/config.nu +++ b/terminal/.config/nushell/config.nu @@ -39,8 +39,6 @@ starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.n atuin init nu | save -f ($nu.data-dir | path join "vendor/autoload/atuin.nu") # load zoxide bookmarks zoxide init nushell | save -f ($nu.data-dir | path join "vendor/autoload/zoxide.nu") -# load carapace completions -source ~/.cache/carapace/init.nu # keybinds $env.config.keybindings = [ diff --git a/terminal/.config/nushell/env.nu b/terminal/.config/nushell/env.nu deleted file mode 100644 index 0751a07..0000000 --- a/terminal/.config/nushell/env.nu +++ /dev/null @@ -1,23 +0,0 @@ -# env.nu -# -# Installed by: -# version = "0.102.0" -# -# Previously, environment variables were typically configured in `env.nu`. -# In general, most configuration can and should be performed in `config.nu` -# or one of the autoload directories. -# -# This file is generated for backwards compatibility for now. -# It is loaded before config.nu and login.nu -# -# See https://www.nushell.sh/book/configuration.html -# -# Also see `help config env` for more options. -# -# You can remove these comments if you want or leave -# them for future reference. - -## create carapace completions -$env.CARAPACE_BRIDGES = 'zsh,fish,bash,inshellisense' # optional -mkdir ~/.cache/carapace -carapace _carapace nushell | save --force ~/.cache/carapace/init.nu diff --git a/terminal/.config/zsh/zshrc b/terminal/.config/zsh/zshrc index cbd33b5..a546f9e 100644 --- a/terminal/.config/zsh/zshrc +++ b/terminal/.config/zsh/zshrc @@ -140,11 +140,6 @@ TRANSIENT_PROMPT_RPROMPT='$(starship prompt --right --terminal-width="$COLUMNS" TRANSIENT_PROMPT_TRANSIENT_PROMPT='$(starship module character)' eval "$(zoxide init zsh)" eval "$(atuin init zsh)" -export CARAPACE_BRIDGES='zsh,fish,bash,inshellisense' # optional -source <(carapace _carapace) -# make fzf-tab compatible with carapace -# see -zstyle ':fzf-tab:*' query-string '' # Speed up autocomplete, force prefix mapping zstyle ':completion:*' accept-exact '*(N)' From 0a6f591817174dcd940b006a434dfd93e72d08e2 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 12 Dec 2025 23:46:37 +0100 Subject: [PATCH 7/7] jj: Rename head log alias to jlh `jlh` shows all heads (leaf changes) without any additional commits, while `JLH` shows all heads with 3 ancestor commits each for some additional context. --- vcs/jj/config/nushell/autoload/jj.nu | 3 ++- vcs/jj/config/sh/alias.d/jj.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/vcs/jj/config/nushell/autoload/jj.nu b/vcs/jj/config/nushell/autoload/jj.nu index 43184cc..009fa7c 100644 --- a/vcs/jj/config/nushell/autoload/jj.nu +++ b/vcs/jj/config/nushell/autoload/jj.nu @@ -58,7 +58,8 @@ def --wrapped jloof [search: string, ...flags] { alias jlfw = jj log -r "wip()" # Find 'WIP:'-prefixed changes alias jlfp = jj log -r "private()" # Find 'PRIVATE:'-prefixed changes -alias jh = jj log -r 'ancestors(heads(all()), 3)' +alias jlh = jj log -r 'heads(all())' +alias JLH = jj log -r 'ancestors(heads(all()), 3)' alias jrb = jj rebase diff --git a/vcs/jj/config/sh/alias.d/jj.sh b/vcs/jj/config/sh/alias.d/jj.sh index d36e44b..fa9538b 100644 --- a/vcs/jj/config/sh/alias.d/jj.sh +++ b/vcs/jj/config/sh/alias.d/jj.sh @@ -70,7 +70,8 @@ alias jlfw='jj log -r "wip()"' alias jlfp='jj log -r "private()"' # show branches (i.e. head commits) w a couple previous commits -alias jh="jj log -r 'ancestors(heads(all()), 3)'" +alias jlh="jj log -r 'heads(all())'" +alias JLH="jj log -r 'ancestors(heads(all()), 3)'" alias jrb="jj rebase"