Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Vim     - Virtual Judge environment to build and configure under Ubuntu (Server)

- Ubuntu 14.04 Trusty Tahr User How to install Banshee 2.9.1 (Linux)

- Encounter ORA-00600: internal error code, arguments: [4194] ORA-1552 (Database)

- CentOS 6.6 running level (Linux)

- Comparison of one-time transaction and CTE insert data (Database)

- Windows 7 hard disk to install Ubuntu 14.10 (Linux)

- Linux Bash share tips for getting started (Linux)

- When the master key encounter NULL (Database)

- Android thread mechanism --AsyncTask (Programming)

- Linux, C programming language library file handling and preparation of Makefile (Programming)

- First start with Kali Linux 2.0 (Linux)

- The Samba service does not have permission to access (Server)

- Oracle database with test data insertion speed (Database)

- RPM package management under Linux (Linux)

- Servlet 3.0 interfaces of AsyncListener (Programming)

- The method of Linux into the rescue mode (Linux)

- To install HDRMerge 0.4.3 under ubuntu (Linux)

- OpenSUSE GPG Comments (Linux)

- Java development environment to build under Ubuntu (Linux)

- Android studio multi-channel ultra-compact version of the package (Programming)

 
         
  Vim
     
  Add Date : 2018-11-21      
         
         
         
  As an ancient and enduring vitality of the editor, Vim power of its own. Many people feel that Vim learning curve is too steep, in order to be able to use Vim too fast, and had a large amount of memory command. If you are a novice Vim, just to get started learning the face of the multitude of commands one by one, I'm sure you will gradually lose interest in it. Actually, Vim in an almost natural language way to help you complete text editing. Only need to know a few simple syntax, you would sit around the round and round on the swivel seat, feeling wonderful life back.

We assume you already know several common Vim mode (normal mode, insert mode, command mode, etc.), if you do not know, read here. Let us work together to learn about Vim language bar.

verb

Verb represents what we intend to operate the text. E.g:

d represents Delete (delete)
r represents replace (replace)
c represents a modification (change)
y indicates a copy (yank)
v represents select (visual select)
 
noun

Noun represents the text we are about to deal with. Vim has a special term called the text objects (text object), the following are some examples of text objects:

w represents a word (word)
s a sentence (sentence)
p represents a paragraph (paragraph)
t represents an HTML tag (tag)
Quotes or various text contained brackets referred to a text block.
 
preposition

Preposition defining the scope of the text to be edited or location. E.g:

i means "... within" (inside)
It represents a "surround ..." (around)
t means "to ... former position" (to)
f means "to ... position" (forward)
Here is a diagram of a few questions about the scope, you feel:

Prepositions

Group of words for the sentence

With these basic elements of the language, we can begin to construct a few simple commands. The basic syntax for text editing commands are as follows:

Noun verb preposition
Here are some examples (if you are familiar with the concept of the above, you will see these examples are very easy to understand), please test some person in Vim.

# Delete a paragraph: delete inside paragraph
dip
# Select a sentence: visual select inside sentence
vis
# Modify a word: change inside word
ciw
# Modify a word: change around word
caw
# Delete the text until the character "x" (not including the character "x"): delete to x
dtx
# Delete the text until the character "x" (including the character "x"): delete forward x
dfx
 
numeral

Numeral specifies the number to be edited text objects, from this perspective, numerals can also be seen as a preposition. After the introduction of numerals, grammar text editing commands to upgrade would be the following:

Preposition verb / noun Numerals
Here are a few examples:

# Modify three words: change three words
c3w
# Delete two words: delete two words
d2w
In addition, numerals can also modify a verb, indicating that the operation is performed n times. Thus, we have the following syntax:

Numerals Verbs
Below is an example:

# Delete the word twice (equivalent to delete two words): twice delete word
2dw
# Delete three characters (equivalent to delete three characters): three times delete character
3x
How, it is not very easy to understand?
     
         
         
         
  More:      
 
- GRUB2 boot Ubuntu Manual (Linux)
- Linux host system monitoring implement the cgi (Server)
- Linux installation skynet issue summary (Linux)
- Ordinary users how to use the firewall software (Linux)
- How MAT Android application memory leak analysis (Programming)
- HTTPS Encryption Algorithm (Linux)
- Bash environment is automatically install and initialize oh-my-zsh & autojump zsh (Linux)
- Ubuntu FAQ solutions (Linux)
- ORA-00911 invalid character error Solution (Database)
- Oracle index visible and hidden (visible / invisible) (Database)
- Linux Shell debugging (Programming)
- PostgreSQL vacuum principle of a function and parameters (Database)
- SSH without password (Linux)
- Linux package management (Linux)
- How to modify the Sublime in Tab four spaces (Linux)
- To create a file in Linux directory by setfacl (Linux)
- How to configure SNMPv3 on Ubuntu, CentOS and Cisco systems (Linux)
- Linux file compression and archiving (Linux)
- Cobbler automatic mass deployment of CentOS 6 and CentOS 7 (Linux)
- A process of how to get the current traffic in GNU Linux (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.