Configuration file path:/ETC/VIM/VIMRC
SYN on; syntax highlighting
Set tabstop=4 tab width
Set shiftwidth=4, line indent width
Set backspace=2, setting backspace available
Set Incsearch Search Auto-complement
Set ai! ; Set Automatic
Sometimes the project has been deployed in Tomcat, but you need to modify some of the contents of the configuration file or modify the content of a JSP file, you will think of the local modified files uploaded to the server and then replace it, in
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
configuration file
Vim has multiple configuration file vimrc, such as/ETC/VIMRC, which affects vim throughout the system. And ~/.VIMRC, this file only affects the vim of the user. Also, the configuration in the ~/.VIMRC file overrides the
The font color that is commented out in VI defaults to blue and cannot be seen clearly, you can change the color configuration by setting the. vimrc file in the user's root directory.
Use the Hi command to modify the color of the annotation,
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
First, Linux common commands-Has learnedCD (Path switching) RM (after-RF can delete files or folders) ls (view files and folders under current path) mkdir (Create folder) Touch (create file)Cat (view file contents) MV (move or rename files) rmdir
Shear Board SharingThis is very important, or every time the right-click menu will be dashed.In the 用户设置 add: "vim.useSystemClipboard": true,Changes in the cursorI think this is also important, after all, in the Vscode, the status bar is
vim 存文本编辑器Syntax format: VIM "option" "File" vim [options] [file]Attention:1.vim command and subsequent options and files, there must be at least one space between each element2.vim can be divided into three modes: normal mode, edit mode, command
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
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
are all moving in command mode:J----> DownK----> UpL----> rightH----> LeftSave:W----> SaveExit:Q----> ExitQ!---> do not save forced exitPositioning:Number, G: Quickly navigate to the beginning of a lineG----> Navigate directly to the beginning of
Why does ^m appear?1. 在windows下的文本文件的每一行结尾,都有一个回车(‘\n‘)和换行(‘\r‘)2. 在linux下的文本文件的每一行结尾,只有一个回车(‘\n‘);3. 而在linux下打开windows编辑过的文件,就会在行末尾显示^M; 4. 注:^M在vim中为crtl+MHow to fix? Method one in the VIM command line
The three modes of VIM in Linux are: command mode , last line mode , and edit mode . here is a diagram of the three:Switch between the three modes:The command mode is the default mode in Vim.Command mode switch to last line mode : Use colon (:) in
Call Pathogen#infect () call Pathogen#helptags () Let g:syntastic_always_populate_loc_list = 1let G:syntastic_auto_jump = 1set Numberset encoding=utf-8 "wrap" set textwidth=80 "automatic line wrapping set Wrapnnoremap " Ctrl-j to Move down a split
Use the Vim editor in Ubuntu in edit mode to use the next key will become the letter ABCD, using the HJKL key will become up and down around.This is because Ubuntu is preinstalled with the vim tiny version and requires a vim full version. Execute
1, vi Multi-window editing command: vi-o file1 file2 Display multiple files vertically, inter-window shortcut key:ctrl+w(need to press two times W)Save and exit all windows:WQAExit all windows:QA650) this.width=650; "title=" Vi.png "alt="
VI and VIM1. Introduction:The VI Editor is the standard editor for all UNIX and Linux systems, and he is the equivalent of a notepad in the Windows system, which is no less powerful than any of the latest text editors. He is a tool we cannot use
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