I have this in my vimrc:
" Export text under the cursor
noremap <leader>e :w! >><Space>
This allows me to select text using visual mode, press leader e
, type a file name, and append the text under the cursor to that file.
I would like to also have the text under the cursor be deleted from the current file as part of this command, but I don't know how to accomplish that.