Batch comments and uncomments are implemented in vim, and vim uncomments
When debugging code, you can easily comment out or cancel code comments in batches. Many ides use shortcuts to comment out or uncomment selected code blocks in batches, how can this function be completed in Vim?
Method 1 selection mode
Batch comment:
Ctrl + v enter the block selection mode,
Use of the vim editor in linux and the vim editor in linux
Vi or vim editor is an indispensable editor. There are many editors available on windows, such as notepad, notepad ++, and edit,
But in linux, it is basically vi or vim. vim is bigger than vi, and it is an enhanced
VIM tutorial, vim
Vim environment setting parameters
: Set nu
: Set nonu is to set and cancel the row number!
: Set hlsearch
: Set nohlsearch hlsearch is high light search ). This is to set whether to reverse the white value of the searched string. The default value is hlsearch.
: Set autoindent
: Is set noautoindent automatically scaled down? Autoindent m
The above is, all can be listed in my resources, and the instructions for use are attached below:
Usage:1. Put. vimrc in the vimrc package in the/home or/root directory (depending on your identity ).2. Put the files in plugin and Doc in the other two zip packages into Vim/DOC and VIM/plugin respectively.The specific contents depend on your system and VIM v
For a whole bunch of vim files online, here's just a few steps to record my new configuration environment. for viewing reference.Installation Configuration VundleThe first step is to create a vim directory and configuration file:Under the ~ directory, add the. vimrc file and the. Vim/bundle/vundle directory.The second step is to add the configuration contents of
Vim environment variable configuration, background color configuration, and vim environment variable background color
When we use vi or vim, if we want to display the row number, we may do this: switch to the command mode, enter set nu, and then press the Enter key to display it; in addition, when programming, sometimes we want to press the Enter key, the cursor
Vimdiff --- VIM comparison and merge tool, vimdiff --- vim merge
This article comes from the IBMDW http://www.ibm.com/developerworks/cn/linux/l-vimdiff/
Comparing and merging source program files (usually plain text files) has always been an important part of software development. Many powerful dedicated comparison and merge tools on the market, such as BeyondCompare. Many IDE or software configuration mana
1. Vim Common copy and Paste commandVim's copy-paste command is undoubtedly y (Yank), p (paster), plus yy,pPs:Vim has a very interesting convention (I think it is a convention), that is, the case of a command is to achieve a certain function, but the direction is different, such as:W Jump to the next word,w: Jump to the last WORDF a line forward to find and jump F: Reverse ....Then some double-written letters have line operations:YY Copy line dd
One, vim repeat command 1. Repeat the last commandIn normal mode . (decimal point) means the last command operation is repeatedCopy test files to a local directory$ cp /etc/protocols .Open a file for editing$ vim protocolsNormal mode input x , delete the first character, the input . (decimal point) will be deleted again a character, in addition to also can be repeated dd delete operation2. Execute commands
Source: ChinaUnix blog Date: 2008.07.30 (1 comment in total) I want to comment
Software requiredVimHttp://www.vim.orgCode_complete.vim plug-inHttp://www.vim.org/scripts/script.php? Script_id = 1, 1764Ctags are usually available after vim is installed. It is not supported in ubuntu and needs to be downloaded.1. vim ConfigurationReprinted Eric's article, source of the original articleHttp:/
Basic operations in vim mode and basic operations in vim ModeAuthor: fengxueting Source: http://www.cnblogs.com/fengxueting-px/
Preface
Although Emacs can complete most editing operations, vim is sometimes used for convenience. Therefore, a simple vim operation is recorded. You only need to get started.
This document b
Common vim commands, vim
VIM is generally divided into several modes to distinguish whether the input is a text or a command through different modes:1. Normal mode (common mode, c-mode ):Once you enter VIM, it is in c-mode. You can only enter commands and text. These commands may be commands for moving the cursor, edit
Linux learning notes (10) Text Editor vim, learning notes vim
Vim is a powerful full-screen text editor, the most common text editor for Linux/Unix. It is used to create, edit, and display text files. Vim features no menus and only commands.
Vim mainly has three working mode
VIM editor Usage Details, vim editor details
The Vim text editor is installed on all Linux operating systems by default. It is a very useful editor.Three Modes
It has three modes: Command mode and last line mode.
Command mode: controls the movement of the cursor to copy, paste, delete, and search the text.
Input mode: normal text input.
Last line mode: Save or ex
Vim shortcut, vim1. vim Environment Settings
Vim behavior record file path ~ /. Viminfo
Set the file path in the vim environment ~ /. Vimrc
In ~ /. Manually write the following content in vimrc (double quotation marks "indicate comments ):
Set nohlsearch "highlightSet backspace = 2 "deleted with backkeySet autoindent "
VI/Vim is one of the most powerful and popular text editors in the liux system. Learn Vim while reading learning the VI and VIM editor, and write simple notes for future queries.Before reading this book, we often used Vim to edit some simple files and some basic simple commands. But while reading the book, I found that
[vim] with sudo permission to save vim open readonly file
The following command is to be stated in this article:
: W! sudo tee% >/dev/null
In the Linux configuration, you will change to read-only files, such as/etc/profile
$ ls-al/etc/profile-rw-r–r–1 root root 1139 Mar 17:30/etc/profile
Use VIM to open the file/etc/profile modified, save will be wrong:
: WE45:
1. Command operation scope
In fact, many Vim commands are only edited within a text range. A text range can be one character, one word, one line, or another specified character range. You can use the vim command and the text range control key to better complete the editing task. The command format is as follows:
Command + Operation Range
The command can be:
D: delete command. Delete the text of the spe
Vim shortcut keys and vim common shortcut keys
# Vim filename
: Scriptname// View scripts loaded by vim
: Set nu// Set the row number
: Set tabstop = 4// Set a tab to 4 spaces
: Set ai// Set Automatic indent
Space key// Move one cell to the right
X// Delete the subsequent characters (in command mode)
X// Delete the fir
Vim Advanced Skills-use vim to compare two files: 1: Use vim-d file1 file2 to directly open two files or: Use vim file1 to open the first file, use vert diffsplit file2 to open the second file for comparison. (vert indicates the Vertical Split Window, which is the horizontal split window by default.) 2: directly compar
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.