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 capital letter I, then insert the comment, for example//3. Press
1. Install VimYum Install-y vim-enhanced2. Common commandsDisplay to the first few lines of the fileVim +10/etc/init.d/iptables (shown to line tenth of the file)Show the number of file lines: Set NuVIM Tri-Medium modeGeneral modeThe movement of the
Linux command line
1. Open the command line Ctrl+alt+t2. Catalogue
Displays a list of files for the current directory
Ls
Jump to the X folder in the current directory
CD x
Return to the root
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,
In Linux, the main editor is VI or VIM, this article around vim to do a simple explanation:The Linux default comes with the VI (VIM) editor, and its packages are:[email protected] ~]# RPM-QF 'which vi ' vim-minimal-7.2. 411-1.8 . el6.x86_64
Note: These commands have a colon before them:When you are finished editing the document, you are ready to exit VI when you return to the shell, you can use one of the following methods.In command mode, double-press two capital Letter Z, if the
I. Three modes of VIMThere are three modes in vim: edit mode, input mode, last line modeWhen you open a file by using the VIM command, it is in edit mode by default.1. Edit mode--Input modeI: Convert to input mode before the current cursor
Vim file Editor Common operations Summary:CopyYY Copy a row10yy Copy from the current cursor line to the following 10 linesY1G Copy all data from the row to the first row of the cursorYG copies all data from the row to the last row of the
Vim Common Commands Summary.-You can let us repeat the last Operation command y-Copy the command. It can be followed by a displacement, or an object selection. For example it's actually with C-The Cut command is very similar yaw-copy a word,
Vim is known as the ancient artifact. A small editor, the appearance is not very humble, the name of the artifact from? This is what attracts me. --In this memo.Vim is a free software that also admires the author's philanthropic behavior and helps
Problem:Linux System, Tab key defaults to 8 characters, you need to change it to 4 characters in a way that usesSteps:1. Create a system file with a. vimrc file name under the user's root650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/77/
This chapter we learn the automatic completion function1. Auto-Complete priority gets the complete list from the current edit areaFor example:Let's write down the following:AaaaaaabbbaaabWhen we enter AA again, and then we press TAB, a list
Linux under Vi/vim use notesStart and close vimVI OpenVi/vimOpen Vi/vim and load file VI ZQ Unconditional Exit: q! Unconditional exitZZ Disk and exit: Wq Disk and exitThree modes of the VIM Editor: General mode, edit mode, and command line modeYou
First enter the following directoryCd/usr/share/vimThen open VIMRC.sudo vim VIMRCInsert the following code in the "Set backspace=2" line in VIMRC:Set AI "Auto indentingset history=100 " keep lines of Historyset ruler
We all find that when writing code, sometimes it is possible to have more information for the variable name, and the name may be longer,To use the variable name again, I find it seems to be unable to remember the previous VC 6.0, you can use aTool,
:e! EnterEliminate all of this editing, back to the original file look. However, this file is still open.:q! EnterEliminate all edits, return to the original file, and leave Vim.:w! FileName: w! NewfilenameIf the file exists, overwrites the existing
Python automatically complements all of the vim editing and Python interactive modes, and below describes how to implement tab completion in these 2 situations.One, vim python automatic completion plug-in: pydictionYou can implement the following
Windows Vim uses Vundle, reported "E303, cannot open * * Exchange file, recovery will not be possible" solution.Under Windows vim using Vundle, the "E303, cannot open * * Exchange file, recovery will not be possible", such as:650) this.width=650;
Vim: error while loading shared libraries:/usr/lib/libgpm. s
[Root @ localhost etc] # vim my. cnfVim: error while loading shared libraries:/usr/lib/libgpm. so.2: file too short[Root @ localhost etc] #See the figure, get it, or report an error.
Run
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