I find that sometimes I copy something into a register linewise (e.g. with dd) and then want to paste it characterwise (i.e. inline).
Example
e.g. when I have something like the following what I want is get_record('ABC-123')
If I delete ABC-123 with dd it gets stored linewise in the register, which I can see with :registers
Which means when I paste ABC-123 it will be pasted on the next line instead of inside the line.
Avoiding the Issue
I can prevent this by deleting ABC-123 with something like d$, in which case it goes stored characterwise in the register
Now when I paste, it will be pasted inline - so I can position my cursor inside the ('') and paste there successfully.
However, the problem here is I need to think of this when I'm copying the entry.
Desired Behavior
Even when I have data in the register stored linewise (e.g. when I use dd), I would like to be able to paste it inline.
Related Reading
I find that sometimes I copy something into a register linewise (e.g. with
dd) and then want to paste it characterwise (i.e. inline).Example
e.g. when I have something like the following what I want is
get_record('ABC-123')If I delete
ABC-123withddit gets stored linewise in the register, which I can see with:registersWhich means when I paste
ABC-123it will be pasted on the next line instead of inside the line.Avoiding the Issue
I can prevent this by deleting
ABC-123with something liked$, in which case it goes stored characterwise in the registerNow when I paste, it will be pasted inline - so I can position my cursor inside the
('')and paste there successfully.However, the problem here is I need to think of this when I'm copying the entry.
Desired Behavior
Even when I have data in the register stored linewise (e.g. when I use
dd), I would like to be able to paste it inline.Related Reading