Copy all the lines to clipboard

You should yank the text to the * or + registers: gg”*yG Explanation: gg to get the cursor to the first character of the file “*y to start a yank command to the register * from the first line, until… G to go the end of the file

Categories vim

What is Vim recording and how can it be disabled?

You start recording by q<letter> and you can end it by typing q again. Recording is a really useful feature of Vim. It records everything you type. You can then replay it simply by typing @<letter>. Record search, movement, replacement… One of the best feature of Vim IMHO.

Vim Can’t Save File (E212)

This will ask you for the root password, then save your changes as you requested: Then type (L)oad at the prompt, to re-load the file after it is saved

How to copy to clipboard in Vim?

The * register will do this. In Windows, + and * are equivalent. In unix there is a subtle difference between + and *: Under Windows, the * and + registers are equivalent. For X11 systems, though, they differ. For X11 systems, * is the selection, and + is the cut buffer (like clipboard). http://vim.wikia.com/wiki/Accessing_the_system_clipboard * is probably what you want most of the time, so … Read more

How can I quickly delete a line in VIM starting at the cursor position?

(Edited to include commenter’s good additions:) D or its equivalent d$ will delete the rest of the line and leave you in command mode. C or c$ will delete the rest of the line and put you in insert mode, and new text will be appended to the line. This is part of vitutor and vimtutor, excellent “reads” for vim beginners.

How to make vim paste from (and copy to) system’s clipboard?

The “* and “+ registers are for the system’s clipboard (:help registers). Depending on your system, they may do different things. For instance, on systems that don’t use X11 like OSX or Windows, the “* register is used to read and write to the system clipboard. On X11 systems both registers can be used. See :help x11-selection for more details, but basically the “* is … Read more

Where is my .vimrc file?

You need to create it. In most installations I’ve used it hasn’t been created by default. You usually create it as ~/.vimrc.

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