Clippy No Simpy
"Clippy no Simpy" is a term coined by Louis Rossmann, when people try to stand up for companies doing scummy things like charging your for features that you...
"Clippy no Simpy" is a term coined by Louis Rossmann, when people try to stand up for companies doing scummy things like charging your for features that you...
Clippy is a virtual office assistant from Microsoft, shipped from office 97 to office 2003. It was used to help train people how to use the software that was...
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>
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,
{}
)