Use case: I have a buffer
variable1
variable2
variable3
i want to replace variable1 with variable3 using
:%s/vari<TAB>/vari<TAB><TAB><TAB>
can this be done somehow? I don't want to have to type out or manually copy words
Use case: I have a buffer
variable1
variable2
variable3
i want to replace variable1 with variable3 using
:%s/vari<TAB>/vari<TAB><TAB><TAB>
can this be done somehow? I don't want to have to type out or manually copy words
You can use the command-line window (see :help cmdline-window) to use regular Insert mode to write an Ex command-line such as :s.
You can either use q: from Normal mode to access the command-line window, or use Control+F from the Ex command-line (after typing : and even starting to write a command such as :%s/vari...)
Once in the command-line window, you can use i (or a, A, etc.) to enter Insert mode, and then you can use the usual completion keystrokes such as Control+N or Control+P to complete from contents of other visible buffers.
Once the :%s command is complete, you can simply press Return to have the command from the command-line window executed as a regular Ex command.