Ok… crazy question time. I seem to have discovered a feature, but I can’t make it work again. Does it really exist, and if so what’s the key shortcut I accidentally pressed?
I had this line:
'company_name' => $this->input->post('company_name', true),
I’d added a new variable lower down the code: “company_address”. I needed to add a duplicate of the above line and amend it accordingly.
I put the cursor on the company_name line, hit Ctrl-L, then - I thought - hit Ctrl-Shift-D.
Instead of an exact copy of the line appearing below it, I got the new line with the new variable name in it. As in, I magically got:
'company_address' => $this->input->post('company_address', true),
It’s likely that the string “company_address” was copied to my clipboard at the time. Prior to my selecting the company_name line, it was probably the selected text in the editor window.
However, I cannot reproduce this. And I can’t see it mentioned anywhere in the documentation.
Was I dreaming? Can sublime do an intelligent-line-duplication-with-parametric-replacement-thing? Is my computer better at coding than me?
Aaaaagh. Help.