Alphabetize the Properties of each Rule in a CSS FileWhen combining a Ex command With:global, we can also specify a range for our chosen [cmd]. Vim allows us to set the range dynamically using The:g/{pattern} as a reference point.When used with:
Delete Lines containing a PatternCombining the :global and :delete commands allows us to cut down the size of a file rapidly. We can either keep or discard all lines that match a {pattern} .:globalthe Combine and: Delete command allows you to
Global command format: [Range]global/{pattern}/{command}The global command finds {pattern} within the range of text specified by [range] (the default is the entire file), and then executes the command ' {command} ' on the matching line, using the
Sublime support is not very good under Ubuntu, especially for Chinese input, and some plugins are not available under Ubuntu. Under Ubuntu, use Vim. Together we turn vim into sublime.It only takes three steps.First step: Install Vundle to manage
1,move command
: M 13
Move the line where the current cursor is located after 13 rows
: M 0
Drop the line where the current cursor is located before the first line
: M $
Drop the line
Edit commandC: Delete commandcc: Directly delete the cursor line, the cursor jumps to the beginning and transitions to the input mode#cc: Delete the next # line in the row where the cursor is located, and the cursor jumps to the beginning of the
Command historyCommands with: and/begin with a history, you can first type: or/Then press the up and down arrows to select a history command.Start vimEnter the following command in the Command line windowVim starts vim directlyVim filename opens vim
Vim's 3 Modes of operation: Command mode, input mode, last line modeCommand format: # VIM [option] ... [FILE] ...-O: Open multiple files in horizontal split screen-O: Open multiple Files in portrait split screenCtrl+w+s: Horizontal Split to display
The following article is translated from "Learn vim progressively", I think this is the best vim for the Novice upgrade tutorial, did not enumerate all the commands, just list the most useful commands. Very good.Start —————————— body ——————————Do
# Apt-get Install vim installs vim in Ubuntu systemDisplay line numbers, highlighting, and so on:The configuration file for vim in Ubuntu is stored in the/etc/vim directory with the configuration file named VIMRCIn the terminal, enter the following
Sometimes, when using vim to edit a file, for various reasons forget or too late to manually save (in the last line mode: w! and led to the cost of a lot of effort to do the changes lost, have to re-create, I have personally encountered 3 times, in
vim often encounter the phenomenon of abnormal Chinese display, which is the legendary garbled. A search, found a solution in http://www.chinalinuxpub.com/bbs/showthread.php?t=45475. But the GBK code is normal, and the UTF8 is wrong. So a little
Use Vim to edit documents today after connecting to CentOS with XshellBecause there was a temporary closure and no saving.Once again open the VIM prompt to restore, but each time you open the file to restore, so found the following methods and the
Vim Using tips Ctags pluginAfter joining ctags , the root of the project ctags -R will be executed automatically in this directory to generate tags filesIn the source file, you Ctrl + ] can jump to the definition of a function and Ctrl + o return to
1. Installing Ctags[Email protected]:~#apt-get Install Ctags2. Setting the ctags of the kernel directory[Email protected]:/study/linux-git/linux-git/linux-3.18.3# lsArch documentation include kernel NET securityBlock drivers init Lib README
Vim and Emac are the most popular two text editing tools in the Linux world, focusing on learning one, tentatively using Vim as the Learning object. In this article, some basic operations will no longer be introduced, only the most commonly used
Command historyCommands with: and/begin with a history, you can first type: or/Then press the up and down arrows to select a history command.Start vimEnter the following command in the Command line windowVim starts vim directlyVim filename opens vim
Modify Vim configurations in Ubuntu and UbuntuIn UBUNTU, the vim configuration file is stored in the/etc/vim directory. The configuration file name is vimrc.
Show row number
Syntax highlighting
Auto indent
Show commands in text
Show nearest
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