vim commands

Want to know vim commands? we have a huge selection of vim commands information on alibabacloud.com

Summary of COMMON commands for LINUX vim compilers

9. vim Editor the enhanced version of the Vi editor supports multiple language scripts, file type plugins, text completion modes, and many other options. Command mode: For file navigation, cut and paste both simple commands. Undo recovery and other operations, also in this modeInsert mode: For general text compilation, substitution mode is a variant of the insert pattern.Ex mode : used to save, exit, and op

Vim simple text editing commands

Eliminate all of this editing, back to the original file look. However, this file is still open.Eliminate all edits, return to the original file, and leave Vim.: w! NewfilenameIf the file exists, overwrites the existing file, creates a new file if the file does not exist, and writes the content to the new file.Move up or down.nbsp;Move in one line:$ move to the end of a lineW e B-word movement To change the text:C2B 2 Words forward from the cursorC $

Vi/vim Common Commands

Vi/vim Common Commands Command mode Cursor movement h or left ARROW key The cursor moves one character to the left J or DOWN ARROW key Move the cursor down one character k or up ARROW key Move the cursor up one character l or right ARROW key The cursor moves one character to the right Ctrl+f Scr

Embedded Basics-C language (1) common commands for the-vim editor

file path file copy NBSP;CP dir 1 DIR2 -R -r recursive copy file [ten] MV file's mobile file rename N BSP;MV Source file path destination file path Mobile NBSP;MV source file nbs P target file Rename [one] rm Delete NBSP;RM NBSP;-RF Force delete NBSP;RM *.txt Delete all txt files [12] Create a shared folder NB Sp CP -r source files /mnt/hgfs/share from Linux copy windows CP /mnt/hgfs/share/test.txt ./ Use from Windows Copy to

"Go" vim multi-line indent and advanced commands

str1: S/str1/str2/g replaces all occurrences of strings in a line with a string str2 str1:., $ s/str1/str2/g Replace all occurrences of the current line to the end of the string with the string str2 str1: 1,$ s/str1/str2/g replaces all occurrences of strings in the body with a string str2 str1: g/str1/s//str2/g function Ibid.You can see from the Replace command above that the G is placed at the end of the command to replace each occurrence of the search string, without g, which means that only

Vim Common commands

1. Exit VI:wq! 强制保存退出:wq 保存退出:x 保存退出(作用和:wq一样)ZZ ZZ大写,并且不是在命令行模式(作用跟:wq一样):q 退出:q! 强制退出2. Mobileh 在当前行向左移动一个字符j 移动到下一行k 移动到上一行l 在当前行向右移动一个字符Ctrl+f 向前滚动一页Ctrl+b 向后滚动一页:n 将光标定位到第n行:$ 将光标定位到最后一行0 将光标定位到本行行首$ 将光标定位到本行行尾G 将光标定位到文章的最后一行(与:$功能相同)H 将光标定位到屏幕顶端M 将光标定位到屏幕中间L 将光标定位到屏幕底端3. Search/ 后面跟要搜索的东西,在文件中向前搜索? 后面跟要搜索的东西,在文件中向后搜索n 向前重复搜索N 向后从发搜索4. Copyingyy 复制当前行nyy 复制光标当前行到当前行以下n-1行:1,100 co 200 将1~100的内容复制到第200行:100,102 co 200 $ 将100~102的内容复制到最后一行

Linux commands: Vim Edit script Exercise

Practice One:Add or remove users by accepting user-entered user names,./adminuser.sh --add User1,user2,jack,donggen means adding 4 users who are automatically entered, with the same password as the username entered--del means to delete user-established user, and, the user that exists, need to prompt already exist the user that cannot add, does not existThis user is not present when the deletion is prompted.#!/bin/bash#program:#练习接收用户输入的用户名, decide to delete or add users#history Donggen 2016-10-2

Vim Common commands

vim Three modes: General mode edit mode Command modeCopy and paste content can be deleted in general modeTo move the cursor :[Ctrl]+[f]: The screen moves down one page, equivalent to the [PageDown] button.[Ctrl]+[b]: The screen moves up one page, equivalent to the [PageUp] button.0 or function key [Home]: Moves to the front character of this line.$ or Function key [end]: moves to the last face character of this line.G: Move to the last line of this fi

Linux commands-vim General mode copy cut paste

Delete a character after the cursor XDelete a character before the cursor shift+xDeletes the specified number of character digits +xDelete a line of characters DDCut the specified number of rows dd 3DD cut 3 linesActually, it's not erased, but it's kept in the Clipboard.Paste on the line below the cursor pPaste a line on the top of the cursor shift+pWithdraw one step u max drawdown 50 timesFormer further Ctrl+r/////////////////////////////////////////////////////////////////Copy a line yyCopy th

Vim Common commands

Insert I insert before the cursor A after the cursor is inserted Turn over a full page at a time Turn up page ctrl+f "F" meaning forward Scroll down full page ctrl+b "b" meaning backward Turn half a page at a time Flip up half page ctrl+u "u" meaning up Down half page ctrl+d "D" meaning down Turn one line at a time Turn up one line ctrl+y "y"meaning yield Turn down one line ctrl+e e meaning Earser

Vim Common commands

T+{char}: equals the reverse T /string Enter: Find string, return to the result can press N to move to the next result, n move to the previous result ? string: As opposed to/string %: Move between pairs of parentheses '.: Move to the last edited place Insert: I: Insert on the left of the current character I: Inserting at the beginning of the current line A: Insert to the right of the current character A: Insert at the end of the

Vim Common commands

Single-line copy: Move the cursor to the desired copy line yy move to paste line pMultiRow copy: Some people say Nyy P Forgive me I don't know if this is blowing ratio or my vim is sick, it is not good to make[Start line],[end Line] Co [copy to which line] For example 6,9 Co 12Multi-line clipping: [Start line],[end line] m [Cut to which line] such as 6,9 M 12Multiline Delete: [Start line],[end line] de such as 6,9 deUndo: U: Undo Last ActionU: Cancel

Introduction to VIM Code folding commands

Zhanhailiang Date: 2014-10-181. Implementing code Folding via FDM: Set fdm=xxx|fold-manual| Manual folds is created manually. |fold-indent| Indent Lines with equal indent form a fold. |fold-expr| Expr ' foldexpr ' gives the fold level of a line.| fold-marker| Marker markers is used to specify folds.| Fold-syntax| Syntax syntax highlighting items specify folds.| Fold-diff| Diff Fold Text that is not changed. 2. Configure set Fdm=syntax to collapse as a syntax block:[Root@~/Wa

Vim multi-line indent and advanced commands

Vim Multiple Line Indent tips 1. Enter the visual state by V, select multiple lines and indent or indent with > or 2. Automatic indent typesetting is usually used according to language features: in the command state = = Two for the current line, or for multiple rows with n== (n is the natural number) for automatic indentation from the current line below n rows. You can try to indent code arbitrarily and then use n== typesetting, equivalent to the Gene

Vim commands used in Linux

below the line where the cursor is locatedP paste to the top of the line where the cursor is locatedR replaces the character at which the cursor is locatedR replaces the character at the beginning of the cursor, ESC exitsU Cancel the previous action/String to search for the specified string (: Ignore case when set IC searches)N Next (Next):%s/old/new/g full text Replace specified string:%s/old/new/c full text Replace specified string (ask for confirmation): N1,n2s/old/new/g replaces specified s

Vim often forgets commands

contents of register a: G /book/y A Add all the rows containing the book to register A. Note: Here is a instead of a,a means that the line that meets the requirements is appended to register a, while a means that the line that meets the requirements overrides the contents of the register, and if A is used, it causes the last register to have only the last line that meets the requirement. At this point, all the rows containing the book are in register a. :p ut A to paste the contents of register

Vim Common commands

Content from https://www.cnblogs.com/chenlogin/p/6245958.htmlI picked a few that I think are most commonly used, as follows:Default to Normal mode (ESC enters this mode in any mode)I: Enter input mode: Enter Command mode: Q exit: Wq Save and exit: W SaveExit in edit modeZZ Save and exitUse Vim to edit multiple files: Next switches to the next file:p Rev Switch to the previous file: Last switch to final file: first to switch to file one: Q Exits the cu

Find and replace VIM commands

Tags: Linux VIFind and replace/pattern search pattern from the beginning of the cursor to the end of the file, then press N or NN repeats the last search command in the same directionN repeats the last search command in the opposite directionn or N from the word nextNote: Skip to the first line before/pattern, then full-text SearchReplace:%s/p1/p2g replaces all P1 in the file with P2:%S/P1/P2/GC need to be confirmed when replacingS:substitute replacementG:global GlobalC:confirm ConfirmationThis

Vi,vim Common editing commands

cursor and presses ESC to endU Undo Previous ActionCtrl+r Redo the previous undo operation6. Search and search for replacement commands/string search ignores case when searching for a specified string: Set ICn searches for the next occurrence of the specified string:%s/old/new/g full text Replace specified string: N1,n2s/old/new/g replaces specified string within a certain range7. Save and Exit commands: W

Vim Common commands

current row: CCReplace the first old of the current row with new: S/old/newReplace all old values of the current row with new: S/old/new/g.Replace the first old value from the current row to the last row with new:., $ S/old/newReplace all old values from the current row to the last row with new:., $ S/old/new/g.Replace the first old from row n to Row M with new: N, m s/old/newReplace all old values from row n to Row M with new: N, m s/old/new/g.Replace the first old of all rows with new: % S/ol

Total Pages: 15 1 .... 9 10 11 12 13 .... 15 Go to: Go

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.