Alibabacloud.com offers a wide variety of articles about difference between vi and vim, easily find your difference between vi and vim information here online.
When opening a Test.java file with VI or VIM under Linux[Email protected] tmp]# VI Test.javaThe following information appears:e325:attentionfoundaswapfilebythename " . TEST.JAVA.SWP "ownedby: rootdated:WedDec713:52:562011 filename:/var/tmp/Test.java modified:yesusername :roothostname:localhost processID:26153 (stillrunning) Whileopening file "Test.java" dated:Wed
line of the file.----:%s/string1/string2/g Replace "string1" into "string2" throughout the file.----: 3,7s/string1/string2/replaces only "string1" in the 3rd line of the file to the 7th line as "string2".----Note: where S is substitute,% for all rows, G represents global.----5. Edit 2 files Simultaneously, copy the text from one file and paste it into another file.----VI file1 file2----YY in the cursor at the file 1 copy the row----: n Switch to File
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
h or LEFT ARROW key (←)
The cursor moves one character to the left
J or DOWN ARROW key (
Is definitely a boutique, strongly not exclusive, Vi/vim keyboard map. VI is first used in Unix system, it is a text editor, almost all Unix-like machines are provided, learning Linux will need to learn vi/vim, familiar with this keyboard diagram, can help you learn
Tag: Unit is identity shift move operating system image. com forced exitLinux System Vi/vim Editor simple Introduction, installation/uninstallation, common command 1, IntroductionThe VI (Visual Interface) Editor is the most basic text editor on Linux and Unix, working in character mode. Because no graphical interface is required,
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 easy to have been Niang, mod
, including the use of numbers. d cut the selected block to the buffer; dd cut the entire row d ^ cut to the first row d $ cut to the end of the row dw cut a word dG cut to the end of the file 4. paste the imperative p, that is, put (put down) p lowercase p stands for sticking to the cursor (bottom), because the cursor is at the position of a specific character, therefore, P is followed by this character. P indicates that the entire row is copied and pasted before the cursor. The cursor is one r
Tags: ubunt paste code Font shift Delete share picture shareThe editor on Ubuntu has gedit, VI, sublime and so on. Gedit generally in the absence of other editors temporarily used, most of the time, VI and sublime use more, Linux system built-in VI and Sublime, wherein, Sublime is a visual editor can be operated by the mouse can achieve a variety of functions, le
Tags: text editor move page multiple shift description function AST andLinux Vi/vimAll UNIX like systems will be built into the VI document editor, and other document editors will not necessarily exist.But at the moment we use more of the Vim editor.Vim has the ability to edit the program, can be active in font color to identify the correctness of the grammar, co
This article introduces the basic usage of VI (Vim), but it is enough for common users!
The VI editor is a standard editor for all UNIX and Linux systems. It is not inferior to any of the latest text editors. Here we just briefly introduce its usage and a few instructions. The VI editor is identical for any version of
Vi and vim Editor (7): ex editor Overview (2), vimex
Next, I wrote an article to learn about the ex editor.
Change the buffer Name:You can use ": w new_file_name" to save the current editing buffer as a new file. In this way, the current editing result can be saved without modifying the original file (provided that the current file has not been saved ).
Save some files:You can save a part of the file as a
Vi and vim Editor (7): ex editor Overview (2)
Next, I wrote an article to learn about the ex editor.
Change the buffer Name:You can use ": w new_file_name" to save the current editing buffer as a new file. In this way, the current editing result can be saved without modifying the original file (provided that the current file has not been saved ).
Save some files:You can save a part of the file as a new fil
inserts the contents of the file into the next line where the current cursor is located, and you can specify the location of the insertion by entering the line number before the Read or R command.To edit multiple files:The EX command allows us to switch between multiple files.open multiple files at the same time with VI: when using VI, you can give multiple filenames at the same time, and then switch betwe
can use the command: w! NewFileOtherwise, you can select a different document name to save the current document.In the last line mode, enter the command: QSystem Exit VI returns to the shell. If the edit document is not saved when you exit VI with this command, VI displays the following information in the last line of the display window:No write since last chang
For users who often need to switch to Linux/Unix terminals, VI is often used to edit text. EmacsAlthough powerful, it is more steep to learn, and some systems do not have Emacs by default. For those who do not have a lot of attention about VI, maybe they will be used for January 1, year 45,I, O, DD,: WQ, direction keys move cursor ears, Y, P copy and paste are rarely used.
I always thought that since I oft
Match Spark or Sperk
Spark, Sperk
4. Text substitutionText substitution uses the following syntax format::[g][address]s/search-string/replace-string[/option]Where address is used to specify a replacement scope, the following table shows common examples:1 s/Downloading/Download//将当前缓冲区中的第一行到第五行中的Spark替换为spark:1,5 s/Spark/spark//将当前缓冲区中的第一行到当前光标所在行的Spark替换为spark:1,. s/Spark/spark//将当前光标所在行到缓冲区最后一行的Spark替换为spark:.,$ s/Spark/spark//将整个缓冲区中的Spark替换为spark:% s/Spark/spark//当前行中第一次搜
Tags: vimvim 存文本编辑器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 mode.Vim three modes of conversionSeveral ways to open vim1.
C compilation process
Step 1: Use VI to compile the. C code file
Step 2: gcc-G. C-o. Debug
Step 3 GDB
Step 4 file. Debug
List
Start debugging
Or GCC. C directly generates an executable file named A. Out.
./A. Out.
Run the VI command (for details about tab indentation and VIM configuration, refer to other articles in this blog)
Vi vim move cursor scroll screen Abstract: 1) move the cursor in the screen; 2) move the cursor in the row; 3) screen scroll; vi vim has the compilation mode and command mode, the following cursor movement operations are performed in command mode. The ^ character below indicates that the Ctrl key is pressed. For exam
Tags: java localhost command operation Root Linu swap OtherThe reason is that the VI or vim before the operation of the use of VI or VIM operation Test.java file when an abnormal interruption, so in the current directory produced a. Test.java.swp file, this file using the LS command to view can not be found, using LS-
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.