Use the Xhell to connect the server using the optimized Vim editor cannot appear option
Set nocompatibleSet history=100FileType onFileType plugin onFileType indent onSet AutoreadSet Mouse=aSyntax enableSet CursorlineHi cursorline guibg= #00ff00
1, the Replication/etc/skel directory is/home/tuser1, requires/home/tuser1 and its internal files belong to the group and other users do not have any access rights.~]# mkdir /home/tuser1~]# cp -r /etc/skel /home/tuesr1~]# chmod -R go-rwx /home/tuser1
Find and copyFind/boot-size 1m-exec cp-r {}/mytest/\;Vimd^ Delete from cursor to beginning of lined$ Delete from cursor to end of lineSave As: W/temp/mycp.txtRead: R/temp/mycp.txtReplace All%s/root/temproot/gReplace cursor at the beginning of
Introduction to Vim
Yum install-y vim-enhanced installation package
Vim is an upgraded version of VI
Vim is color-displayed
Sub-general mode, edit mode, command mode
Vim color display and move cursor in general mode
The same
Vim edit mode
I enter edit mode from where the cursor is located
I enter edit mode from the beginning of the cursor position
O Enter edit mode from below the line where the cursor is located
O Enter edit mode from the line where the
Today when using the Vim editor to find the default tab key is 8 characters, so think of it set to four spaces, after Baidu, got the following methods:First Enter/ETC/VIM/VIMRCThen add the following code at the end of the document:Set tabstop=4
Vim three modes set in the editor- Command efficiency, and users will feel quite handy after the habit. To manipulate the text efficiently, you must first understand the 4-1 ). ? Command mode: Control the movement of the cursor, you
Vim is a very useful text editor for Linux, and people who develop under Linux are familiar with VIM commands.1. Open on line 143thVim +143 filename.txt2. Read-only mode openVim-r/tmp/a.txt3. Force SaveCommand mode wq!4. Go to the end of the current
Under the user directoryCreate User Profiles ~/.VIMRC1. Command descriptionVSP Vertical Paging2. Basic ConfigurationSyntax on " syntax highlighting turn on set tabstop=4 "tab width set to 4set Expandtab " tab
Delete Cut X ---> Delete the character of the current cursor DD ---> cut the current line (delete the current row) P ---> Paste the current line (paste the next line) p -- -capital P paste yy in current line ---> Copy
First, Vim common operation1. Insert commandA specifier insert in the word cursorA at the end of the line where the cursor is insertedI match either insert in the word cursorI insert at the beginning of the line where the cursoro Insert a new line
Linux command line shortcut keysShortcut keys: Tab Auto-complete path directory name, +l (lowercase) Clear screen, CTRL ++ + +e (lowercase) to command line end shortcut: Ctrl+k Delete/ cut the contents of the cursor to the end of
Compiling VIM reference: 1190000005820066One, storage size of ' st ' isn ' t known (reference: https://www.cnblogs.com/davytitan/p/4452895.html)Willtypedef struct _STAT64 stat_t;Change totypedef struct _STAT64 stat_t; Second, undefined reference to
Reminder: VI Edit does not support multi-line comments, be sure to use vim1. Multi-line Comment:1. First press ESC to enter command line mode, press CTRL + V to enter the column (also known as block) mode;2. Use the upper and lower keys at the
Posted on November 7, 2011 by Sam This time has been in Python with the idle editor, but this idle code indentation really hurt, when you use the If:elif:, the Elif: not automatically aligned, which makes me often in the debugging time only to find
I. Working mode switchingTwo. Vim Command small copyThree. Operation Commands1. command to enter VI:(1) VI filename: Opens or creates a new file and places the cursor at the beginning of the first line(2) VI +n FileName: Opens the file and places
Vim starts multi-window editing and vim starts window editing.Vim provides the multi-window editing function to simplify compound editing tasks. The multi-window mode of vim does not mean that multiple vim instances are started on the
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