Linux is often encountered with vim edited the file, save when prompted the current file is read-only.
E45: ' readonly ' option is set (add! To override)
The reason is also simple, because the user does not have write permission to the currently
Split-screen start vim
Use the uppercase O parameter to split the screen vertically.
vim-on file1 file2 ...
Use the lowercase o parameter to horizontally split the screen
vim-on file1 file2 ...
Note: N is a number that is
In the terminal under the use of Vim for editing, by default, the editing interface is not displayed line number, syntax high-brightness display, intelligent indentation and other functions.
In order to better work under VIM, you need to manually
Summary of the first lecture1. The cursor can be moved in the screen text using either the arrow keys or the HJKL letter key.H (Shift left) J (downlink) K (upstream) L (shift right)2. To enter the Vim editor (from the command line prompt), enter:
Reprinted from: http://blog.csdn.net/chuanj1985/article/details/6873830 in Ubuntu the configuration file for vim is stored in the/etc/vim directory with the configuration file named VIMRCThe configuration file for vim in Fedora is stored in the/etc
Vi:linux text editor, all Linux distribution will be taken by default.Vim:vi's enhanced version, it can automatically call the program's syntax judgment based on the file's suffix or the information at the beginning of the file to determine the
The recent use of Git to push code to the Origin development Branch, also appeared several times vim window, to prevent forgetting or record it better;First press the ESC key to exit the editing state, and then press shift+; key, and then press wq!
from:http://blog.csdn.net/commshare/article/details/6215088 Thanks to the cattle people for their articles. Solved me in vim use, A headache. When Vim creates a new file, the sticky code is automatically indented, resulting in a very confusing
After adding the following code to the. VIMRC, restart Vim to create 4 spaces by pressing TAB:Set ts=4 (Note: TS is the abbreviation for TabStop, set tab width 4 spaces)Set ExpandtabFor a saved file, you can use the following method to replace the
Character editing:X: Delete the character at the cursor;#x: Delete the # characters at the beginning of the cursor;XP: Swap the position of the character where the cursor is located and the character behind it;Replace command (R, replace)R: the
Single-line copy: Move the cursor to the desired copy line yy move to paste line pMultiRow copy: Some people say Nyy P Forgive me I don't know if this is blowing ratio or my vim is sick, it is not good to make[Start line],[end Line] Co [copy to
1. Folding 1.1 folding in six different ways manual: Define the range of folding spans in a standard vim structure, like the move command & nbsp; indent: Collapsed and collapsed hierarchy, corresponding to the indentation of
1. Copy the/etc/profile to/tmp/directory and use the Find replacement command to remove the white space characters from the beginning of the/tmp/profile file650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/85/9B/wKioL1ep0naTId0XAAAHBfRpwpQ2
Learn about Linux, please refer to the book "Linux should Learn"
This could be 2016, between many developers and system administrators, who still live well in the editor wars. VIM (vi) or Emacs: both have very strong functions, of
Recently in research Kali LinuxDebian7 's kernelFound that vim has no color,650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/84/54/wKioL1eNlofildlYAACvliH9fN4187.png-wh_500x0-wm_3 -wmp_4-s_1957463101.png "title=" Debian_7_x64_kali.png "alt=
role: Can make markdown syntax highlighting. 1. Install. Managed using the pathogen plugin. CD ~/.vim/bundlegit clone https://github.com/plasticboy/vim-markdown.git2. Configuration, after the installation is completed, automatically by pathogen, but
Vim operation1. Insert command
Command
Operation
I
Insert before cursor position
I
line where the cursor is located, beginning with insertion
A
Insert after cursor position
Multi-line Comments:1. Enter command-line mode, press CTRL + V to enter Visual block mode, then press J, or K to select multiple lines to mark the lines that need comment2. Press the capital letter I, then insert the comment, for example//3. Press
Syntax highlighting settingsIn linux, the vim or vi editor does not highlight nginx Syntax by default.Manual configuration is required.1. Download vi syntax highlighting configuration ~ /. Vim/syntax. This directory is created if it does not exist.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service