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
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
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.
You can use a plugin like AutoComplPop to get automatic code completion as you type. 2015 Edit: I personally use YouCompleteMe now.
Unix uses 0xA for a newline character. Windows uses a combination of two characters: 0xD 0xA. 0xD is the carriage return character. ^M happens to be the way vim displays 0xD (0x0D = 13, M is the 13th letter in the English alphabet). You can remove all the ^M characters by running the following: Where ^M is entered by holding down Ctrl and … Read more
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
(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.
Your .vimrc file goes in your $HOME directory. In *nix, cd ~; vim .vimrc. The commands in the .vimrc are the same as you type in ex-mode in vim, only without the leading colon, so colo evening would suffice. Comments in the .vimrc are indicated with a leading double-quote. To see an example vimrc, open $VIMRUNTIME/vimrc_example.vim from within vim
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
You need to create it. In most installations I’ve used it hasn’t been created by default. You usually create it as ~/.vimrc.
Type :colorscheme then Space followed by TAB. or as Peter said, :colorscheme then Space followed by CTRLd The short version of the command is :colo so you can use it in the two previous commands, instead of using the “long form”. If you want to find and preview more themes, there are various websites like … Read more