0. Written in front of the nonsense
The development environment is migrated to Ubuntu, and all the tools that are handy with windows are looking for a replacement.
Windows has been using the souce Insight to read the source code, need to find a
Reference: http://www.cnblogs.com/ma6174/archive/2011/12/10/2283393.htmland VIM Help documentationThis code can be used to achieve F5 compilation
"C,c++ F5 compile run
map : Call COMPILERUNGCC ()
func! COMPILERUNGCC ()
exec "W"
if &filetype
Command History
Commands with: and/start with history, you can first type: or/And then press the up and down arrows to select a history command. start Vim
Enter the following command in the Command line window
Vim starts vim directly
Vim filename
Vim test.c +24 opens and navigates to 24 rowsCommand mode1. Edit modeH LeftJ DownK UpL RightI input insertGg=g can be indented in the first lineYY copyP PasteR Replacement ModeR replaces the current position, back to command modeDD Delete When
1. Vim Base operationVim is a text editor developed from VI. Code completion, compilation and error jumps have done some enhancements1.1 Entering edit mode
Command
meaning
I and I
I insert before the
VI Common usagedescription, all commands do not include "", If "" "(half-width double quotes), is a command character, please note the distinction. Insert:"I" starts before the cursor positionthe "I" cursor moves to the beginning of the current
The three modes of VI and the conversion relationship between the various modesThe VIM editor modifies the configuration file to implement indentation settings to display line numbers, etc.Vim configuration file default exists /ETC/VIM/VIMRCAt the
System: LinuxMulti-line Comments:
Go to command line mode--
Move the cursor to the first line where you want to comment-
Press CTRL + V to enter Visual block mode--
Press the letter J, or K (or move the key up or down) to select the
Vim's commands are too many to forget, so I decided to sort out the various commands of VIM, including vim insertion and deletion, cursor Movement, Multi-window editing, copy-and-paste, find-and-replace, and some common commandsDelete operationDD
VIVI is a computer text editor, written by the American computer scientist Bill Joy Bill Joy, and released in 1976 with the BSD license.VimVim is a text editor developed from VI. Its code completion, compilation and error jump and other convenient
VI Most original versionVim modified version, more powerfulOpen FileVim file path (command line mode)The command line mode enters edit mode:A append to the current positionI insert forward in the current positiono Edit the next line in the current
1, display line number: Setnumber2, cancel the line number; Setnonumber3, in normal mode (press ESC to enter) The key v into the visual mode, and then press the keyboard or h,l key to achieve the text selection.Other Related commands:V: Select by
Programmer's favorite editor: Vimfirst figure out the three modes of vim:1. Command mode: Enter the "Vim file name" in the Linux terminal to enter the command mode, but cannot enter the text.2. Edit mode: Press I in command mode will enter the
CentOS 7 has its own VI,There are three modes of VI:Commande modeInsert modeLast line modeEnter VI vi+ file name (corresponding directory)----go to the VI Full screen editing screenAfter entering VI, is under command mode, you need to switch to
=============================================================================VI/VIM Command Review and Practice:---------------------------------------The Command mode yy copies the contents of the line where the cursor is located 4yy the copy
Vim command quite a lot, the basis of the preservation, exit, insert, move, etc., trouble points of multi-line selection, split screen and so on.Vim commands are also available in three modes, command mode, edit mode, and bottom line mode. There are
1. Background informationSince joining Redhat, I have switched the default login user Veli of the home desktop (Ubuntu 16.04 LTS) to Huanli, primarily to align with the company's computer configuration to facilitate future WFH, but have triggered a
5.5vim entering edit mode5.6vim Command mode5.7vim Practice5.5vim entering edit modeEverything entered in edit mode is entered in front of the cursor.press the "I" cursor to enter the editing mode at the current position. Press the "I (shift+i)"
Vi/vim Key DescriptionIn addition to the simple example above I, ESC,: Wq, in fact, Vim has a lot of keys can be used.Part I: General mode available cursor movement, copy and paste, search and replace, etc.
How to move the cursor
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