Vim – yank into search register

After pressing / to enter a search string, you can then use Ctrl-R and then type the letter representing the register that you want to use. eg. First, “Ayw to yank a word into register A Then, / ^R A to put the contents of register A into the search string.

Vim yanking range of lines

Yank lines 81-91 :81,91y<enter> If your fingers don’t like to find the : and , keys, this would work as well (go to line 81, yank 11 lines) 81gg11yy My only use of g is 5gg. To go to the 5th line. 22gg: 22nd line. As jimbo said, it’s really only a modifier for some … Read more

Find and Replace within selection in `vi`

Select the text in visual mode (I assume that’s what you’re doing), then press : to start typing a command, you’ll see something like this appear in the command line: :'<,’> That means that the command will apply to the selection. Then type s/search/replace/ and hit enter. (Add a g after the third slash if … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)