Tags: paste copy paste Undo Insert Line file vim go to Ctr left shiftare 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 the last line of the file1G, or GG----> Quick position to First lineDelete command:X: Delete one character after cursorX: Delete one charac
Split-screen start vim
Use the uppercase O parameter to split the screen vertically.
vim-on file1 file2 ...
Use the lowercase o parameter to horizontally split the screen
vim-on file1 file2 ...
Note: N is a number that is divided into several screens
Turn off the split screen
Close the current window
Ctrl+w C
Closes the c
Multi-Window Segmentation": sp/vsp" Portrait/Landscape Split window"Ctrl+w" jumps in the windowMultiple Files OpenVim name1 name2 Name3": n/n filename/bn/bp" When opening multiple files jump/Next File/previous file in multiple files (cannot jump in multiple windows)Skip transfer Warning Save when multiple files are not open at the same time": q/q!/x" closed window/force close window/write and close window":e/e file/e! file/e# or ctrl+^"Reload current file/close current file Open new File/force c
Copy:YY: Copy the line where the cursor is locatedNyy:n is a number, the copy cursor is in the down n line, for example, 20yy is copied 20 rowsY1G: Copy all data from the row to the first row of the cursorYG: Copy all data from the row to the last line of the cursorY0: Copy the character of the cursor to all data at the line of a rowy$: Copy the character of the cursor to all data at the end of the linePaste:P,p:p to paste the copied data on the next line of the cursor, P for the pasted line on
Tags: paste htm. com delete www. Completing the Search code stringA good tutorial on the story:nohCancel Search highlightingxDeletes the character of the current cursor.:wqDisk + exitddDelete the current row and save the deleted row to the ClipboardpPaste Clipboarda→ inserted after the cursor/pattern→ searches for the pattern string, and if more than one match is found, press the N key to the nextyy→ copy Current line of business in DdP, auto-completion functionVim commonly used and easy to forg
Vim note (6) -- a more comprehensive introduction of vim (for example, vim -- vim)
Vim configuration file~ /. Vimrc user's default configuration file ~ /. Vim/plugin/user's default script file storage directory ~ /.
http://blog.csdn.net/pipisorry/article/details/395084171. Replace VI with VIMVim is more powerful than VI, Vim is a superset of VI, and can solve many of the problems of habit, so it is necessary to use Vim to replace VI. Simply speaking, you can directly use the "Alias Vi=vim" command, but this can only be useful in this launch, the next time after the start, t
:
Exit command is, press ESC to jump to command mode, and then enter: Q (not saved) or: Wq (save) exit. more exit Commands:
: w save file but not exit VI: W file will be modified to save in file, do not exit VI: w! Mandatory save, do not launch VI: Wq save file and Exit VI: wq! Force file to save and Exit VI: Q Do not save files, exit VI: q! Do not save file, Force exit VI: e! Discard all modifications and edit command history from the last save file
17. Vim Introduction, Vim color display and move cursor, VIM general mode move cursor, VIM general mode copy, cut and pasteI. Introduction of VIMVim:vi version of the upgrade, the difference is: VI when editing text will not display color, and vim will.Its configuration file
5.1 Vim Introduction 5.2 Vim color display and move cursor
5.3 Vim General mode move cursor
5.4 Vim General mode copy, cut and paste
Vim is an upgraded version of VIVim with color displayInstalling Vim:yum install-y vim
I. Introduction of VIMVim is a powerful text editor, the upgrade version of VI, with color display, the default has three modes: General mode, command mode, edit modeInstall Vim[Email protected] ~]# VIM/ETC/PASSWD-bash:vim: Command not found[Email protected] ~]#[email protected] ~]# Yum install-y vim-enhanced...second, color display, Move Cursor[[email protected
The help entry for the commands used in this section:
:help vimgdb
At the beginning of the UNIX system design, there was a very important idea: each program only implements a single function and connects multiple programs through pipelines to make them work together, to provide more powerful functions. The program only implements a single function. On the one hand, it reduces the complexity of the program, and on the other hand, it also enables it to
Vim has made a lot of improvements to VI, and this chapter discusses the main features added to Vim: including built-in Help features, startup and initialization options, new move commands, extended regular expressions, extended undo, custom executables, and more.Built-in Help features:Vim's documentation of more than 100,000 lines, almost all of the instructions
When using the VI Editor, we found that the ESC key cannot be returned to the default mode. input the: HELP command, and we found that vim-tiny installed by default in Ubuntu is not complete in many functions. Install complete Vim for convenience. Note: In ubuntu, the VI and VIM commands actually use
Label:Vi/vim Use advanced: Use GDB debugging in Vim – use Vimgdb The help entry for the commands used in this section: In the original design of Unix system, there is a very important idea: each program only to achieve a single function, through the pipeline and other ways to connect multiple programs, so that they work together to achieve more powerful function
/ftplugin/directory for storing script files of the user's default file type
Programming support provided by vim
Text Information (line number, file name, etc)Code indentSyntax highlightingQuick PositioningMark locationFull-text searchCompletionMulti-file editingMulti-Window editingFunction listFile ListFunction jumpSyntax ErrorCharacter Set EncodingBinary viewing
And so on...
Test vim
Run the
Concise Vim leveling strategy (transfer) and vim leveling strategy
Original article: http://coolshell.cn/articles/5426.html
Vim's learning curve is quite large (see the learning curve of various text editors). Therefore, if you see a lot of VIM command classification at the beginning, you will lose interest in this editor. The following article is translated from
Common commands for Mac terminalsBasic commands1. List FilesLS parameter catalog name: see what's in the drive directory: ls/system/library/extensionsPARAMETER-W displays chinese,-l details,-a including hidden files2. Converting a directoryCD
next two rows.
It can also be used with numbers, such as y + enter5. Copy the following five rows: 1, 20d + enter to delete 1 ~ 20 rowsSwitch insert mode
I enters the insert mode. The current insert cursor position is inserted.
A enters the insert mode, insert at the next cursor position
O enters the insert mode and inserts data in the next row of the current row.
O enters the insert mode and inserts a row on the current row
You can configure vim
Vim and vim
The following article is translated from "Learn Vim Progressively". I think this is the best VIM Upgrade tutorial for beginners. I did not list all the commands, but just listed the most useful commands. Very good.
---
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:
[email protected]
and provide relevant evidence. A staff member will contact you within 5 working days.