In command mode, the first execution of GGThis jumps to the first line of the file.Re-execution: DGThis clears the entire file!There is also a way to exit vim and then use echo >> file to quickly clear the contents of the file, but you can also
^ Represents the beginning of a line, and $ represents the end of a row. GG document header, G document footer.Here is the basic command for VIM copy and paste:yy duplicates the row where the cursor is located. or uppercase one Y.2yy or y2y copy two
Start using Vim (i) vim被称为是编辑器之神,如果可以学好vim的话,就可以在键盘上 “健指如飞” 了,可以完全摆脱鼠标来进行文本的定位编辑。 当然,vim还可以进行各种配置,装上各种插件,做成 IDE ,会有很炫酷的感觉,而且做为 伟大 的软件工程师,能在键盘上 刷刷刷地,灵活地超控自己的代码也是一种非常值得 自豪的事,所以,我觉得,掌握 vim 是做为一个计算机方向专业的人的基础课程,很有必要去接触一下 vim 这个“编辑器之神”。
Vim mode:Edit mode (Command mode) (default)Input modeLast-line modeMode conversion:Edit ————) Input:I: Enter in front of the character where the current cursor is locatedA: Enter after the character of the current cursorO: At the bottom of the
1. Write original articles in Vim, or reprint the classic articles you see;2. After writing in Vim, arrange the version, then, the shortcut key operation: GG, SHIFT+V, SHIFT + G,"+y, explain:" +y is to copy the selection into the system clipboard3.
The most commonly used is the SECURECRT to log on to the Linux class system, but the default settings under the SECURECRT display Hue single not much from the color to distinguish the file. In particular, it is inconvenient to use vim without color
1. Background When pasting the code in the terminal vim, it is found that the inserted code will have extra indentation and will accumulate line by row. The reason is that the terminal puts the pasted text into the keyboard cache (Keyboard buffer),
common skills in Vi/vim workrecently has been in the Linux system terminal using the Vi/vim to modify the code, because of the coding problems and Vim configuration file problems, so that the review code and modify the code is more laborious, not
CD ~Ls-al will find a. vimrc fileOverwrite the following code with the. VIMRC contentMap : Call Saveinputdata () func! Saveinputdata ()Exec "Tabnew"exec ' normal ' +GP 'Exec "w! /tmp/input_data "Endfunc"ColorScheme Torte"ColorScheme
In the maintenance of online services, often to edit some files that do not belong to the operation of the user, that is, only the type of R permission, each save will prompt read only. Can only be noted to change what, and then quit, and then sudo
Install VimApt-get Install VimOpen a document with Vim vim XXXThere are three modes of vim:Command mode: You can move the cursor, delete characters, and so on.Insert mode: You can enter characters in this mode and press ESC to return to command mode.
To achieve similar sourceinsight functionality, the Vim+ctags+cscope+taglist+source Explore +nerd tree is implemented.One, install the plug-in1) Install Ctags and CscopeUbuntu can be installed directly from the command:sudo Install ctags cscopeNote:
Reprinted from Http://blog.chinaunix.net/uid-22891521-id-2109310.htmlSince has been in a very old Linux version of the development, the inside of the vim is also a very old version, today in the case of the completion of the work, the upgrade of the
Enter Vi/vim VI/vim filenamethree modes of Operation:text editing mode: I,a,o into the text editor, press ESC to exit the text edit and convert to command mode. 1) I insert text at the cursor location. ·2) a The text is inserted at the next
~ (SHIFT + ') case toggleK (Shift + K) man page# (SHIFT + 3) check up to find* (SHIFT + 8) check down to find> left and Right tab. Repeat Last ActionWwee jump to the next wordBB Previous Word$ (SHIFT + 4) End of line^ (SHIFT + 6) beginning of the
Learn the basic operation of VIM by Vimtutor this brief tutorialTwo move cursor: H: Left L: Right K: Upper J: LowerThree Vim entry and exit1. Enter: Vim + filename Enter or VIM + ENTER2. Exit: 1:q Key Exit-Do not save2:q! force not to save exit3:w
The cursor can be moved in the screen text using the arrow keys, or the H J k L Letter KeyK (upstream) J (downlink) H (shift left) L (shift right)delete the cursor position character in normal mode, press Xin normal mode, insert or add text:I insert
Play with Vim's heavily armed vim Lazy cancer at the end of my seemingly a long time did not write a blog, has owed many in the planned blog I have already embarrassed to say. OK, so, in the first three, after introducing vim as the code editor,
Vim column block Operation1. There are three ways to enter the visual mode: v, V, CTRL + V (1) Enable the visual mode by v. You can select the content by a single character and move the cursor to select. For example:(2) Press V to enable visual mode.
Ubuntu1204 vim Chinese garbled solution, ubuntu1204vim
Add Chinese character encoding
Sudo vi/var/lib/locales/supported. d/local # Add the following Chinese Character Set zh_cn.gbkzh_cn.gb2312 GB2312zh_CN.GB18030 GB18030 # Save and exit
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