Recently I have been documenting a lot of code which are usually in markdown files (.md). And I frequently come across texts where I have to retype previously written word. Like,
cp file_1 file_2 mv -v file1 file2 git clone --bare repo_name repo_name.git etc ...
Currently, I have been using the following sequence to achieve copying and pasting the previous word without using mouse:
some_word Esc+v+b+y+A+Esc+p+A rest of the sentence.
BUT this seems rather having to press more keys strokes than the word itself (< 8 strokes), and doesn't seems like a wise thing to do.
So the question,
- Is there a better way to achieving this using default VIM sequences. Kindly do not suggest
key mappingunless there is no other alternative.
- Can I copy-paste text without leaving the
vim insert mode?