In a Linux environment, if you use the Vi/vim command to edit files without modifying permissions directly, the user will be prompted to save when saved, and the general solution is to turn off the file again with sudo permission to open the file
In Vim can set a number of personality keys, where the TAB key is one of them, but the use of the TAB key in Vim is very troublesome, is back 8 spaces, feel more wasted space. Then how to set up will be more simple! Now go and see it together!
God operation
Writing code in vim often comes across multiple lines of comments and uncomment, and in VS we can use the default shortcut keys or customize shortcuts in settings to solve this problem.
Since Vim is so powerful, it must also
Programmer's favorite editor: Vimfirst figure out the three modes of vim:1. Command mode: Enter the "Vim file name" in the Linux terminal to enter the command mode, but cannot enter the text.2. Edit mode: Press I in command mode will enter the
1. Background informationSince joining Redhat, I have switched the default login user Veli of the home desktop (Ubuntu 16.04 LTS) to Huanli, primarily to align with the company's computer configuration to facilitate future WFH, but have triggered a
I am installing Ubuntu under VM, using Vim to write run Hello WorldOpen Terminal in UbuntuTo check if g++ or GCC is installed, enter the command sudo apt-get install gccCheck if Vim is installed, enter command to install sudo apt-get install vimThen
1. Select a text block. Using V to enter the visual mode, move the cursor key selection.2. The command to copy is Y, which is yank (lifted), and the commonly used commands are as follows:Y Copies the selected block to the buffer when a piece is
Ctags-vim code Quick Jump 1, descriptionWhen using Vim for driver writing and maintenance in a Linux environment, it is often necessary to call a function or macro definition of the Linux kernel, and frequent jumps between the driver and the kernel
Vi (Visual Interface) is a text editor with a common text compiler that has ASCII encoding, Unicode encoding, and so on. Vim is VI improved: is the enhanced version of VI, Vim is a modal editor.There are 3 modes of VIM in the work:- edit mode: Also
Before https://www.ibm.com/developerworks/cn/linux/l-cn-vimcolumn/startsThe human brain's processing of words is flat, so we browse articles, find materials, or refactor code, either horizontally or vertically, or use search to make text as a whole.
Compiling Vim from the source is actually isn't that difficult. Here's what's should do:
First, install all the prerequisite libraries, including Git. For a debian-like Linux distribution like Ubuntu, which would be the the following:sudo
1. Download:Download page: http://vimcdoc.sourceforge.net/Select "Latest platform independent Tarball, including an Linux/bsd installation Script" "1" download.2. Installation:Many people on the internet said that "decompression, the doc directory
Multi-line Comments:1. Enter command-line mode, press CTRL + V to enter Visual block mode, then press J, or K to select multiple lines to mark the lines that need comment2. Press the uppercase letter I, and then insert the comment, for example #3.
Reference: http://blog.csdn.net/hk2291976/article/details/51280816Common commands:K,w: Move up;J,s: Move Down;H: Left;L: Right;U: Top Half pageD: Lower half pageGG: Web HeaderG: End of page0: Left of the page$: page Most RightCopy and paste in
Symptom: ^m appears when you open a text file that is edited by Windows under LinuxWhy: Move files from one system to another, and you'll encounter issues related to line breaks.Workaround:
Use regular expressions for full-text null
Guide
There is no doubt that Vim is a very powerful text editor. It provides a number of features, which means learning and remembering all of the functions of Vim is virtually impossible. But we can at least continue to learn simple ways to do
Summary of the first lecture1. The cursor can be moved in the screen text using either the arrow keys or the HJKL letter key.H (Shift left) J (downlink) K (upstream) L (shift right)2. To enter the Vim editor (from the command line prompt), enter:
How to use FG to quickly return to vim?When you use VIM to modify a parameter in a file, you cannot remember the parameters for a long time. It often appears that when we just opened this file with Vim, we forgot the parameters just now. At this
Vi/vim Basic Use MethodThis article describes the basic use of VI (VIM), but for the average user is basically enough! I/vim the difference is simple, they are multi-mode editor, the difference is that Vim is the upgrade version of VI, it is not
When we use plug-ins, we do not want the plug-in installation is very messy, it is not an invisible black box, but also for the next convenient installation in other places.Due to the convenience of plug-in management, so there are vundle, the
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