When To Vibe Code
This one is one that I’ve been using quite often, I did’t have a hotkey for it,
I just used the rm shell command.
!!rm %<TAB><CR>
When you type !! from normal mode it will automatically put you in command
mode with .! pre-filled, then you just type rm and <TAB> to
auto-complete the current file name, and <CR> to execute the command.
:.!rm %<TAB><CR>
Making it better #
The one quirk that I don’t like about this is that the buffer remains open
after deleting, and sometimes I forget to close it and end up re-creating it by
mistake when running :wall or :xall.
Create a DeleteFile command with vim command.
:command! DeleteFile execute "!rm %" | bdelete!
Create a DeleteFile command with lua.
vim.api.nvim_create_user_command(
'DeleteFile',
function()
-- Delete the current file from disk
vim.cmd('!rm %')
-- Close the buffer without saving
vim.cmd('bdelete!')
end,
{}
)
Keycap Cut Away
Knife Sharpener Small Upgrade
Vim :noa is a command that runs what you call without autocommands on. This
is typically used when you have some BufWritePre commands for formatting,
most auto formatters are implemented this way in vim. It can be super useful
if you have something like a yaml/json file that you have crafted perfectly how
you want it, maybe it has some source code for a small script or sql embeded
and your formatter wants to turn it into one line. You could get a better
formatter, but for these one off cases that aren’t a big bother to me I run
:noa w.
:noa w
I'm Out On Agents
Today I gave modd a try, and it seems like a good file watcher executor. I tried using libnotify to send desktop notifications, but all I got was modd, I might not have notifications setup right on the awesomewm machine.
config goes in modd.conf
**/*.py {
# check formatting via ruff
prep: ruff format --check .
# check docstring formatting
prep: pydocstyle .
#
# # check type hints via ty
prep: ty check .
#
# # run linter via ruff
prep: ruff check .
}
I installed it using installer from jpillora, pulling pre-built binaries right out of the github repo.
curl https://i.jpillora.com/cortesi/modd | bash
Then you can install it, and on file change it will run the commands you configured.
modd
2025-08-25 Notes
Gave modd a try and it seems pretty good, will likely be slotting it in next to my justfile usage.
2025-08-23 Notes
Today, some great work on the knife sharpener re-design. I've been using the same one since I first got my ender 3 3d printer, and have wanted to make some...