Skip to content

Instantly share code, notes, and snippets.

@cmdcolin
Last active May 3, 2025 17:49
Show Gist options
  • Save cmdcolin/a0d883a39a926c9d6cc94cae709022f4 to your computer and use it in GitHub Desktop.
Save cmdcolin/a0d883a39a926c9d6cc94cae709022f4 to your computer and use it in GitHub Desktop.
changes.md

Text-editor saturday

My text editor avante.nvim is just going crazy. Previously it dumped diffs into the 'chat sidebar', and I'd accept them with "A" in the sidebar then accept all with "ca" in the main area...vibe coding. But the avante.nvim switched to running tools that run the edits instead, and is just going crazy with tool usage despite me having disable_tools enabled. I dunno. Maybe I should file a bug. But this spurred me to try to work holistically on my editing skills this morning. I just looked at my config and tweaked a million things...

Trying out rose-pine

Trying rose-pine color scheme. It is kinda funny with tons of italic but it's cute

Themery

Also trying themery for toggling color schemes https://github.com/zaldih/themery.nvim, with onedark, kanagawa, tokyonight, rose-pine, and gruvbox available for toggling. Once you select, it is persistent across sessions which is nice

Ctrl+[ to ESC

Neovim has a built-in shortcut to use Ctrl+[ to ESC

I am trying to avoid keyboard shortcuts or keys that involve left-hand-pinky contortions which are prone to giving me RSI, so trying Ctrl+[ instead of escape key

I use my right thumb to hit right-ctrl, and then index or middle finger to hit the [ on my keyboard (a dell laptop). I think mac laptops do not have a right-ctrl, so Mac users might not like this

Default blink.cmp config - Ctrl+Y to accept

I was using the 'enter' keymap from blink.cmp but the 'Enter' config is prone to false positive accepts. After seeing a reddit thread (https://www.reddit.com/r/neovim/comments/1kd5mbp/are_you_using_ctrly_or_tab_to_insert_completion/), I am considering using the default (Ctrl+Y to accept autocomplete). I use the right-ctrl key with right hand, and left hand for Y.

Search keymaps with <leader>sk

There are so many keymaps. For example using search keymaps I found <leader>ud (toggle diagnostics)

Super search current buffer <leader>sb

Instead of just / to search, can get a telescope-like picker to search from snacks.picker

Mini.surround

Working on using mini.surround for surround actions more. In React code I can

  • Visual select some stuff
  • Type <leader>sat (mnemonic: surround...add...tag)
  • Then it pops up what tag to surround it with, and type div (no brackets)

Working on quick select actions

I'm trying to work on using more efficient commands for selecting text blocks

Examples:

Most of the time...for many years now...I go into visual mode (V), and use arrow key or ctrl+d to visual-select blocks of code...not super efficient!

Disabling arrow keys

Adding this block from kickstart.nvim is very effective at forcing you to stop using arrow keys, and it also mentally prepares you to try to do even better keymaps e.g. the "vab" to select block, and not just reach for hjkl...

-- TIP: Disable arrow keys in normal mode
vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')

AI usage

My avante.nvim command is doing a lot of tool usage despite having disable_tools enabled. I could report this as a bug to them but I'm not even sure what the deal is. Therefore I am trying out codecompanion

Getting nightly from source repo with alias

I made an alias to update neovim nightly. I compile from the neovim source repo

alias upneo="cd ~/src/neovim/; git pull; rm -rf build; rm -rf .deps/; make CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=$HOME/.local"; make install; cd -"

I'm not sure if rm -rf .deps is needed but once I had trouble with a dep not able to update properly without it. This installs to e.g. ~/.local/bin/nvim

I previously would get the appimage but the 'containerization' of appimages behaved funny

New key shortcuts

  • pc for copying current filename to clipboard
-- Copy path to clipboard
vim.keymap.set('n', '<leader>pc', function()
  local filepath = vim.fn.expand '%'
  vim.fn.setreg('+', filepath)
end, {
  noremap = true,
  silent = true,
  desc = 'Copy path to clipboard',
})

Pretty-ts-errors

Trying to use pretty-ts-errors.nvim https://github.com/youyoumu/pretty-ts-errors.nvim haven't got to work but seems nice :)

Better-escape

https://github.com/max397574/better-escape.nvim quickly hit jj to go from insert mode to normal, this plugin makes it so that the keymap allows you to see the keys quickly rather than see a delay

Dinkllm

Not sure I'll use this but it is a very very minimal llm plugin. Interesting example compared to more advanced integrations

https://github.com/yacineMTB/dingllm.nvim

Feedback

I often feel like my way of neovimming is pretty weird so feedback welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment