to replace text in VIM: 1. Replace the contents of the current line:: s/from/to/(S is substitude): s/from/to/: Replaces the first from in the current row with the to. If the current row contains more than onefrom, only the first one is replaced. : s/
Replace the current line: S/xxx/yyy/gxxx is the string that needs to be replaced, and YYY is the replacement string. Global substitution:% s/xxx/yyy/g. Replace the specified part with V into visual mode, and then: s/xxx/yyy/g. or specify line range
1. Insert command:A specifier insert in the word cursorA at the end of the line where the cursor is insertedI match either insert in the word cursorI Insert at the beginning of the line where the cursoro Insert a new line under the cursorO insert a
The simplest solution: simply search the document for a nonexistent string, and then save the document.or other methods:Remove document highlighting search string: command-line mode : NohlsearchRemove document highlighting search string:
I want to say, I've been tossing it for a long time. Editor, tried nine waysIn the end, I only succeeded in oneBut I still want to sort out my messy logic.At the beginning of one or one, I tried to start with the ipad coding software, about $9,
Common commands1, vi Basic concept of basically VI can be divided into three states, namely the command mode insert mode (the last line mode), the bottom row (last command mode) 1) control the movement of the screen cursor, character, Delete the
Https://github.com/derekwyatt/vim-scala provides a choiceLook at the install manual and find that two commands are required.mkdir -P ~/.vim/{ftdetect,indent,syntax} for in ftdetect indent syntax Do wget --no-check-certificate-o ~/.vim/$d/scala.vim
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
Sometimes many files, want to know the current file name, shortcut key: CTRL + G canIf you feel that it is not enough, then modify the vim configuration:Vi/etc/vim/vimrcAdd the following to the last side: Let &titlestring = expand ( %:p " ) if
Solarized is not really a strict plug-in, it is just a theme, this theme seems to be very good. One thing, because the final effect of Vim is also related to the Ubuntu terminal color, so we also need to make other settings. The specific process is
There is no shortage of drawing software (such as yed, etc.) on Linux, so why you need to use Vim to draw:
Lighter, no need to install too many things
Smaller, just some text, much smaller than the picture, and easier to use.
More
The Vim tool on the Linux platform can be said to be very well known and powerful, so this tool has to be said!Use the command vi file name directly to create and edit the file.Three modes of VIM:Command mode;Insert mode:Bottom line mode;The default
Vundle This plugin is mainly used for plug-in management. It can be based on your configured plug-in address, automatically download, update, delete plug-ins, very usefulAddress Https://github.com/gmarik/vundleThen you wear a bundle directory under.
Vim-instant-maRkdown Plug-inThis plugin supports vim when editing markdown files in real-time preview, do not need to do anything manually!Using VIM to open a xxx.md file, the browser will automatically open a preview page, in the process of editing
EditI Enter the insert mode, the new character is inserted before the cursor a into the edit mode, the new character inserted after the cursor C modified d Delete p placed, you can delete the contents of D, placed behind the cursor y copy r
It is generally not recommended to change/ETC/VIMRC This file because this file change takes effect for all users,So generally only change the current user that changes the file Vim ~/.VIMRC (. indicates hidden files)The comments in the file are ",
Ctags (Generate tag files for source code) is a handy code reading tool under Vim. Although Ctags can also support other editors, it officially supports only vim. And Ctags is already installed by default in Vim, which can help programmers navigate
The default installed Vim does not have multi-character support, so Chinese is not supported. Whether to change the original CentOS language to Chinese or to change the language setting of Vim to Chinese, it is not possible to display Chinese
First of all, I'm using sublime text2.Sublime to open Vim mode:In preference-Setting-user, add1 " ignored_packages " 23 ]You can use some of the basic functions of vim.To modify ESC:ESC super is super inconvenient to press, so we can change the ESC.
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.