10 + Tips to save time for vim novice2016-04-28 Linux Enthusiasts(Click the public number above for a quick follow-up)
from: Specs ' blog-love PHP
Links: http://9iphp.com/linux/time-saving-tips-for-unix-vim-beginners.html
Vim is the
[2016-04-12] [Vim common Commands]
Esc //退出编辑模式
i //进入编辑模式,光标停留在当前位置
o //进入编辑模式,在当前行之后新建一行,光标停留在新行行首
dd //删除当前光标所在行,在命令前加数字可以删除多行,如 5dd 将删除从当前行开始向下5行
yy //复制当前光标所在行,在命令前加数字可以复制多行,如 5yy 将复制从当前行开始向下5行
p
Delete Column1. Position the cursor where you want to operate.2.ctrl+v into "visual block" mode, select how many rows this column operates.3.d deleted.Insert ColumnKnowledge is slightly different when inserting operations. For example, we insert "()"
Watch video tutorial: Brother even Linux cloud computing Video tutorial 5.1 text editor Vim-5.2Insert commandA: Insert the word specifier in the cursor position;A: Insert at the end of the line where the cursor is located;I: Insert the word match
I. Source of the problemAfter the Ubuntu system is installed, enter the command in the terminal: sudo apt-get install vim, and after you type the root password, the system prompts you not to install Vim errors. Then follow the error prompts, change
VimX: Delete the character of the cursor (same as delete)De: Delete the ending of the word from the position of the cursorDW: Delete the first word from the cursor position until the next wordDB: Delete the contents of the word before the cursorDG:
First of all, I'm using sublime text2.Sublime to open Vim mode:In preference-Setting-user, add1 " ignored_packages " 23 ]You can use some of the basic functions of vim.To modify ESC:ESC super is super inconvenient to press, so we can change the ESC.
VimZR all ExpandedZM All mergerVim shortcut keysSHIFT + I (' I ') for editingSHIFT + 4 (' $ ') jumps to the end of the lineShift + V (' V ') select rowSHIFT + 0 (') ') jumps to the beginning of the lineCtrl + V module Edit FirstThen s, or SHIFT + $,
First,GCC compilation : preprocessing---> Compiling---> Assembly---> Link---> Executable file1.GCC-E xxx.c preprocessing the source file (XXX.I): The conditions beginning with # will be resolved in the preprocessing phase;2.gcc-s xxx.i compiling a
The use of vim for so long, but has been unable to remember some basic operating instructions. Today when looking for a keyword, can't think of how to find "next", so Google and solve, by the way to paste the useful all over.Find directives:/xxx
vim mode of OperationCommand modeInsert Mode inputEnd Line Mode VIM ABC if the file exists open, if it does not exist then createvim is in command mode by default when it startsThe command mode starts at the start of the cursor position, press A to
1, VIM Tutor enter--into the VIM tutorial Study 2, VIM filename return--Into the Vim editor 3, : q! Enter--Exit the Vim editor to save, then: Wq4, i--Normal mode, inserts text at the cursor position, into the text insertion state. return to normal
Reference: http://blog.csdn.net/xiyuan1999/article/details/5680102It is necessary to copy and paste entire lines (multiple lines) in the VI editor.1. Copy1) Single-line copyIn command mode, move the cursor to the line that will be copied, and press "
Delete Column 1. Position the cursor where you want to operate. 2.ctrl+v into "visual block" mode, select how many rows this column operates. 3.d deleted. Insert Column insert operation knowledge slightly different. For example, we insert "()"
Let's look at the color configuration scheme provided by the VIM editor:First enter the VIM's color directory (/usr/share/vim/vim74/colors, different system directories, it is recommended to set up in ~/. Vim directory, and then in some directories
This page collects some simple VIM operations that either cannot be done by other ordinary text editors or is slow to complete. Through this web page, you can be determined to learn VIM's determination and confidence. If you have any good
With vim for almost two years to see the tutorial also a lot, in general, you have to practice more, when you feel the need, and then add features. Here to share a view of the best tutorial, from the bar of a friend, write very wellZeroLearn to play
Tag identifiers are stored in files generated by Ctags and other programs.: Tag and command jumps to the point where the cursor is located (if the cursor is no longer on the symbol, the first symbol on the right)Also g+ left mouse button and ,g+
@ three states:Command: Any input will be used as an edit command and will not appear on the screen, and any input will immediately cause a reaction.Insert: Any input data as for the edit register, press ESC to jump back to common mode.Escape: With '
Vim configuration file (my favorite style)
In the/etc/vimrc File
If v: lang = ~ "Utf8 $" | v: lang = ~ UTF-8 $"
Set fileencodings = UTF-8, latin1
Endif
Set nu
Set tabstop = 4
Set nocompatible "Use Vim defaults (much better !)
Set bs = indent, eol,
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