`
oaklet
  • 浏览: 108879 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Vim初级用法速查

阅读更多
Chapter 2. Simple Editing (简单的编辑命令)
Table 2.1. Edit Commands
Text Object Change Delete Copy
1 word cw dw yw
2 words, not counting punctuation 2cW or c2W 2dW or d2W 2yW or y2W
3 words back 3cb or c3b 3db or d3b 3yb or y3b
1 line cc dd yy or Y
To end of line c$ or C d$ or D y$
To beginning of line c0 d0 y0
Single character r x or X yl or yh
Five characters 5s 5x 5yl

Table 2.2. Movement
Movement Commands
←,↓,↑,→ h, j, k, l
To first character of next line +
To first character of previous line -
To end of word e or E
Forward by word w or W
Backward by word b or B
To end of line $
To beginning of line 0

Table 2.3. Other Operations
Operations Commands
Place text from buffer P or p
Start vi, open file if specified vi file
Save edits, quit file ZZ
No saving of edits, quit file :q!

Table 2.4. Text Creation and Manipulation Commands
Editing Action Command
Insert text at current position i
Insert text at beginning of line I
Append text at current position a
Append text at beginning of line A
Open new line below cursor for new text o
Open new line above cursor for new text O
Delete line and substitute text S
Overstrike existing characters with new text R
Join current and next line J
Toggle case ~
Repeat last action .
Undo last change u
Restore line to original state U

Chapter 3. Moving Around in a Hurry (快速移动命令)
Table 3.1. Movement Commands
Movement Command
Scroll forward one screen. ^F
Scroll backward one screen. ^B
Scroll forward half screen. ^D
Scroll backward half screen. ^U
Scroll forward one line. ^E
Scroll backward one line. ^Y
Move current line to top of screen and scroll. z RETURN
Move current line to center of screen and scroll. z.
Move current line to bottom of screen and scroll. z-
Redraw the screen. ^L
Move to home—top line of screen. H
Move to middle line of screen. M
Move to bottom line of screen. L
Move to first character of next line. RETURN
Move to first character of next line. +
Move to first character of previous line. -
Move to first non-blank character of current line. ^
Move to column n of current line. n|
Move to end of word. e
Move to end of word (ignore punctuation). E
Move to beginning of current sentence. (
Move to beginning of next sentence. )
Move to beginning of current paragraph. {
Move to beginning of next paragraph. }
Move to beginning of current section. [[
Move to beginning of next section. ]]
Search forward for pattern. /pattern
Search backward for pattern. ?pattern
Repeat last search. n
Repeat last search in opposite direction. N
Repeat last search forward. /
Repeat last search backward. ?
Move to next occurrence of x in current line. fx
Move to previous occurrence of x in current line. Fx
Move to just before next occurrence of x in current line. tx
Move to just after previous occurrence of x in current line. Tx
Repeat previous find command in same direction. ;
Repeat previous find command in opposite direction. ,
Go to given line n. nG
Go to end of file. G
Return to previous mark or context. ` `
Return to beginning of line containing previous mark. ' '
Show current line (not a movement command). ^G

Chapter 4. Beyond the Basics
Table 4.1. More Editing Commands
Change Delete Copy from Cursor to ...
cH dH yH top of screen
cL dL yL bottom of screen
c+ d+ y+ next line
c5| d5| y5| column 5 of current line
2c) 2d) 2y) second sentence following
c{ d{ y{ previous paragraph
c/pattern d/pattern y/pattern pattern
cn dn yn next pattern
cG dG yG end of file
c13G d13G y13G line number 13

复制内容可以指定剪贴板
Table 4.3. Buffer Names
Buffer Names Buffer Use
1-9 The last nine deletions, from most to least recent.
a-z Named buffers for you to use as needed. Uppercase letters append to the buffer.

作标签
Table 4.4. Buffer and Marking Commands
Command Meaning
"bcommand Do command with buffer b.
mx Mark current position with x.
'x Move cursor to first character of line marked by x.
`x Move cursor to character marked by x.
`` Return to exact position of previous mark or context.
'' Return to beginning of the line of previous mark or context.
分享到:
评论

相关推荐

    vim常用命令速查

    vim常用命令速查 ,思维导图表示,方便快速记忆

    vim速查命令

    自己整理的关于超强编辑器gVim的命令速查一览表!

    vim常用命令速查表

    vim常用命令速查手册,是png图片格式的,使用方便。

    vim命令速查卡

    ### vim命令速查卡知识点详解 #### 一、概述 Vim是一款强大的文本编辑器,在Linux及类Unix系统中广泛使用。本篇文章将基于提供的“vim命令速查卡”进行详细解析,帮助读者快速掌握Vim的核心功能与常用操作。 #### ...

    vim速查图 速查表(全网最高清,适合打印)

    #vim速查图(全网最高清),#vim速查表,#vim速查卡,具体见博客vim速查图(可能是全网最高清版本)_兴趣斗士的博客-CSDN博客 https://blog.csdn.net/BjarneCpp/article/details/110923086

    5个最好的vim指南图(速查表)

    本篇文章将通过解析五个最佳的Vim速查表,帮助你快速理解和掌握这个神器。 1. **基本操作**: - **启动与退出**:在命令模式下输入`i`进入插入模式,按下`Esc`返回命令模式。要退出Vim,可以在命令模式下输入`:q`...

    vim中文速查表

    VIM CHEATSHEET (中文速查表) - by skywind (created on 2017/10/12) # Version: 42, Last Modified: 2018/07/19 19:04 # https://github.com/skywind3000/awesome-cheatsheets

    vim速查表 Beautiful Vim Cheat-Sheet by Max Cantor

    Beautiful Vim Cheat-Sheet by Max Cantor 非常NICE的vim速查表,高清5925*4125,在作者博客上售价25刀,参见:http://vimcheatsheet.com/

    vim速查表教程,共7课

    图形vi vim速查表和教程 学习vi或vim并不容易。但也不那么难。在任何情况下,它都比编辑任何其他编辑器更快、更强大、更高效,因此,您可以很好地投入时间和精力来学习它。 作为一个vi爱好者,我提出了一个想法,为...

    vim实用技巧快速入门与速查手册

    以下是从给定文件内容中提取的知识点,涵盖Vim的基础使用技巧和高级功能。 1. Vim的几种模式: - 普通模式(Normal mode):这是Vim的默认模式,可以通过按Esc键从其他模式返回。在普通模式下,可以移动光标,执行...

    速查表-vim,去新的地方下载

    速查表-vim包含内容: vim-cheatsheet.png 更好的内容在这里:vim速查图速查表(全网最高清,适合打印)-其它文档类资源-CSDN下载 https://download.csdn.net/download/BjarneCpp/13608675 VIM.docx

    vim初级教程.pptx

    VIM教程,包括常用命名,新手上手必看,学习LINUX编程必须项

    笨方法学 Vim Script

    《笨方法学 Vim Script》是一本专为 Vim 用户编写的指南,旨在帮助用户深入理解并掌握 Vim 的内置脚本语言——Vim Script。通过实践和探索,你可以逐步提升在 Vim 编辑器中的效率和定制化能力。Vim Script 是 Vim ...

    vim快捷键速查表,桌面背景

    黑色 vim快捷键速查表,可以做桌面背景

    vim plugin vim changes to ide update

    【vim plugin vim changes to ide update】这一主题表明我们将探讨如何使用Vim插件来提升其作为集成开发环境(IDE)的功能。在这个过程中,我们将重点分析新增的三个插件:wintagexplorer.vim、echofunc.vim以及vimrc...

    vim-configure.tar.gz_vim_vim_configure

    "vim-configure.tar.gz_vim_vim_configure" 是一个包含了 Vim 配置文件的压缩包,旨在帮助用户优化 Vim 的使用体验,提供自动提示、补全功能以及代码高亮等特性。 在 Vim 中配置这些功能,可以使编辑效率大幅提升。...

    Linux中vim安装包

    以下是在几种常见的Linux发行版中安装Vim的方法: 1. **Ubuntu/Debian**: 使用`apt`命令 ``` sudo apt-get update sudo apt-get install vim ``` 2. **Fedora/CentOS/RHEL**: 使用`yum`或`dnf`命令 ``` sudo...

    centos7离线安装vim

    在没有网络连接的情况下,为CentOS 7安装Vim需要通过手动下载所需软件包并使用本地安装方法。以下是离线安装Vim在CentOS 7中的详细步骤。 首先,你需要确保拥有一个包含所有必要依赖的软件仓库。CentOS 7的默认软件...

    VIM使用手册(初级/高级)

    这份"VIM使用手册"包含了初级和高级两个部分,旨在帮助用户从基础到深入地掌握这款工具。 在初级篇中,你将学习如何启动VIM,进入编辑模式以及基本的文本操作。VIM有三种主要模式:命令模式、插入模式和底行模式。...

Global site tag (gtag.js) - Google Analytics