Global find substitution:%s/stext/rtext/gLike what::%s/text/txt/g is to replace all the text into txt. How does vim collectively indent a piece of code or vice versa?
Very simple, by V into the visual mode, select the code to indent, press > Indent
Often, during the development process, we often write code, compile, and modify compilation errors, a process that can be repeated hundreds of 10 of times. If you are based on the compiler output error information, open the wrong file, find the
Java EE Development of various types of resources download list, the history of the most complete IT resources, personal collection summary.
Vim replacement and batch modification
1 Simple substitution Expressions:%s/four/4/gThe "%" range prefix
The global catalog under Linux and Mac is in the/usr/vim/share/vim directory
• The user's words must be changed ${HOME}/.VIMRC
It is best to configure one individually for each user or for your own users:
First step: Copy the. vimrc file
: ~#
Transferred from: http://os.51cto.com/art/201507/484174.htmVim is a versatile, lightweight text editing tool on Linux. Although it is quite difficult for ordinary Linux users to start learning, it is worth learning because of the benefits. As for
Vim Basic IntroductionThe VI command is the most versatile full-screen plain text editor in Unix operating systems and UNIX-like operating systems. The VI editor in Linux is called Vim, which is the enhanced version of VI (VI improved), fully
Two steps:1. Remove the annoying VI consistency pattern and avoid some bugs and limitations of previous versionsSet nocompatible2.backspace has several ways of working, which are VI compatible by default. Very unaccustomed to beginners. People who
Delete command-delete character before deleting the character: x (uppercase X) Delete the character after the cursor: x (lowercase x)-word: DW Deletes the entire word, the cursor should be at the top of the word-delete the cursor before the string:
Vim enters vim on the command line and goes to the VIM editorI press the I key and the lower end shows the--insert--insert commandESC exit I (insert) command for other commands to use: R file name reads into a file content and writes to the current
Related knowledge /relevant knowledge 1 _VIMRC Programming /_VIMRC Program1. Annotation ", for comment2. Keyword set, for setting functions, etc.3. Keyword IMAP, which indicates a re-map in insert mode4. Keyword Inoremap, indicating the re-map in
ProblemToday simple Match (Chao) Set (xi) a bit tmux, the results found that tmux inside to open vim every time you press ESC to reflect a second, as Ctrl + [ wellSolvePossible causes are: terminal emulator, Nvim, Tmux. Multiple control variables
Original Blog Address: https://www.cnblogs.com/BaiYiShaoNian/p/4831022.htmlShell Common Commands Summary:1. ls command: List filesLs-a list all files and folders in the current directoryLS A * lists all files starting with the A letter in the
1, first use VIM to open the binary form of the file, if not binary may produce a conversion error.Vim-b File-to-open.dat2. convert files to hexadecimal format with XXD:%!xxdYou can now view and edit binary files just like normal text.3. Vim Single
The important task of a system administrator is to modify and set up configuration files for some important software, so at least you have to learn more than one command-line interface for this article editor.At the end of this article, we will look
Vim has an-X option that allows you to encrypt files when you create them. Once you run the following VIM command, you will be prompted to enter a key:$ vim-x file.txt Warning: Weak encryption method is being used; see: Help ' cm ' Input encryption
You can learn Vim step by step based on the solution example-the following comments are drunk and explained by yourself based on the illustration and your own practices. The capabilities are limited and errors are incorrect. you can remind me to
Original article: http://hi.baidu.com/flost_li/blog/item/acbccd2355952d47935807d0.html
Usage:
1: Use vim-D file1 file2 to directly open two files for comparisonOr: Use Vim file1 to open the first file, and then use vert diffsplit file2 to open the
In ubuntu, the vim configuration file is stored in the/etc/Vim directory. The configuration file name is vimrc.
In fedora, the vim configuration file is stored in the/etc directory. The configuration file name is vimrc.
1. display the row numberAdd
Go to: http://zhwen.org /? P = articles/cs1_tags
The linux Source Code provides the make command to create a cssag index file and a tags file.I. Software Installation
Install cscope first:
sudo apt-get install cscope
After installing
1. The directory tree is the same
The source code 6.0 and 6.2 usually have the same directory tree structure. For example, all files exist.
Sys/i386/i386/machdep. c, and all of them have the init386 function.
If we want to compare the differences
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