How can I cut a word under cursor in Vim?
vim
Solution
Type `diw`
This means delete in word.
Related commands:
- To copy: `yiw`
- To cut: `ciw`
Problem
I usually want to cut the word under cursor and paste it somewhere else, is there any existing command can do this? For example, if the cursor is under `x` in `AA BXB CC DD`, the result should be `AA CC DD` while `BXB` is copied to system clipboard.