Tags: note format inux home directory copy share custom profile emailVim is a powerful full-screen text editor, which is the most commonly used text editor on Linux, and its role is to create, edit, display text files, vim no menus, only commands.Vim working mode$ VI myfile.msgESC back to command mode from insert mode1.vim Insert Command:
Command
Tags: basic usage of SEDBasic usage of the Linux BOC editor sedHow to deal with SEDReads the file into memory by default----> reads conforming rows into memory that belongs to SED (the mode space of sed) for editing----> display the contents of the post-processing mode space on the screenSed: line editor, which does not edit the source file by default, only handl
Knowledge of Linux commands, help, basic file operations, backup commands,vi editor usage1. Understanding Linux commands1)thelinux command is complete with a class of functions, options complete specifically. 2) command ----Shell(command interpreter)----- Kernel (kernel) This is the command execution process;Depending on whether the command is part of the Shell ,
Article Title: about searching strings in the VI editor in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
When using the vi editor
My linux Command Line C code editor configuration-Linux general technology-Linux programming and kernel information, the following is a detailed description. First download the latest editor from www.vim.org, compile and install it.
Install the ctags Program
Install the cs
The vi editor is a text tool that processes ASCII data. Most linux distributions have already installed the vi editor by default. Vi is short for visual interface. vim is visual interface improved (enhanced version) vi. By default, vim supports Code commands to highlight, making the text easier to understand. Vi has two types of configuration files: The global co
Tags: method paragraph by reading and saving mode text character filename useRecently, you need to develop a shell script on Linux to summarize how the Linux VI editor is used.1. Start VIVI filenameIf the file exists, open and display the content, or if the file does not exist, create a new file the first time you save it.2. Three Modes of VI:1) Command mode, mov
document to its original state
Zz
If the document does not change, then do not store away, if the document has been changed, then the store left, equivalent to: Wq
: w [filename]
Save the edited document as FileName
: R [FileName]
Reads the contents of the filename document below the line where the current cursor is located
: Set Nu
Show line numbers at the beginning of each line
: Set Nonu
Cancel lin
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//当前行中第一次搜
1. Enter the terminal;
[Lxiron@fedoraos ~]$ mkdir Studyfolder
2. New Folder Studyfolder;[Lxiron@fedoraos ~]$ CD Studyfolder
3. Enter the Studyfolder;[Lxiron@fedoraos studyfolder]$ VI hello.c4. Use VI Editor to write a hello.c C program;
5. Space+i into insert mode, write hello.c source program;
Include "stdio.h" int main (int argc,char **argv) {printf ("Hello Linux World"/n);}
6. Press ESC to exit Ins
The use of common commands for the Linux VI editor
There are many kinds of text editors under Linux, VI is the most commonly used, and it is also standard for each version of Linux. Note that VI is just a text editor that can color characters and can be auto-c
1. Why should we learn the vim editor?
There are many text editors in the command line interface of Linux. For example, we often hear about Emacs, pico, nano, joe, and vim. Vim can be viewed as the advanced version of vi. Why do we have to learn vim? There are several reasons:
(1) All Unix like systems have built-in vi text editors. Other text editors do not necessarily exist.
(2) Many software editing inte
VimVim is a powerful full-screen text editor, which is the most commonly used text editor on Linux/unix , and its function is to create, edit and display text files.Note:vim does not have a menu, only commandsVI [filename ] Enter command modeWQ Exit Command modeInput i a O from the command mode into insert modePress ESC to exit Insert mode and enter Command modeI
[-]
Vim Editor---Bulk comments and anti-annotations
Method Piece Selection Mode
Inserting comments
Cancel Comment
Method Two replace command
Bulk annotations
Cancel Comment
Example Demo
Vim Editor---Bulk comments and anti-annotationsWhen writing code using VIM, it is often necessary to use bulk annotations and counter-co
. Uninstall Vi:sudo apt-get Remove Vim-common2. Install the full version of the Vim:sudo apt-get install vimAfter that, wait for the file to be downloaded, it will be installed automatically, and then it can be used.If you feel that knocking on vim is more troublesome or unaccustomed than knocking over VI, you can use the alias command to set the name of Vim to VI and the command format as follows:Alias vi= "Vim"This allows you to enter VI under the shell and automatically enters the Vim
Simple operation of the Vi editor in LinuxThere are 3 modes in the Vi Editor: Naming mode (default), tail-line mode, edit mode. 3 modes need to switch between each other.First, enter the Vi Editor's commandVI filename//opens or creates a new file and places the cursor at the beginning of the first lineVI +n filename//Open the file and place the cursor at the beginning of nthVI + filename//Open the file and
Vim is a powerful full-screen text editor, Linux/unix's most commonly used text editor, to Create, edit, and display text files . vim is characterized by no menus, only commands .Vim mainly has three kinds of working modes, namely command mode, insert mode and edit mode . The relationship between the three can be expressed as:1 Vim common operation (1) Insert com
First searched the Internet some information, said is temporarily unable to solve.However, in the installation of the choice is the Chinese installation, so on the command page is displayed in the box garbled.Since it is the Linux service version, I think there is no need to install the Chinese package, decided to change back to the English display.================1. Use the command CD etc/default to switch to this directory, and then modify the conte
operation::w Save. :q exit directly, do not save. (quit) .:q! modified, not saved, forced to quit. :wq Save and exit. :wq! force save and exit. :x Save exit. :w file path Save as another file. Call external file or command: :!+ command replace (command line mode): format:% All content s replace old content new content default is the first qualifying word for each line (/g all) :%s/a/b: the first a in each row is replaced with b :%s/a/b/g: Replace all A in text with b. replaces only
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.