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.
...
