Basic VI command - VI Shortcut Keys
Enter Text
i Insert text left of cursor
a Append text right of cursor
Editing Text
x Delete selected character
nx Delete n characters from selected characters
X Delete all character before cursor
dw Delete word
ndw (eg 3dw) Delete n words
dd Delete line
ndd Delete n lines
D Delete characters from cursor to end of line
r Replace character under cursor
cw Replace a word
ncw Replace n words
C Change text from cursor to end of line
o Insert blank line below cursor (ready for insertion)
O Insert blank line above cursor (ready for insertion)
J Join succeeding line to current cursor line
nJ Join n succeeding lines to current cursor line
u Undo last change
U Restore current line
Navigating Text
H Move left one space
j Move down one line
k Move up one line
l Move right one space
w Forward word by word
b Backward word by word
$ Moveto end of line
0 (zero) Move to beginning of line
H Move to top line of screen
M Move to middle line of screen
L Move to last line of screen
G Move to last line of file
1G Move to first line of file
<Control>f Scroll forward one screen
<Control>b Scroll backward one screen
<Control>d Scroll down one-half screen
<Control>u Scroll up one-half screen
n Repeat last search in same direction
N Repeat last search in opposite direction
Save and Close File
ZZ Save file and then quit
:w Save file
:q! Discard changes and quit file
Search & Replace
/i Search for a pattern which will you take you to the next occurrence of it.
?i Search for a pattern which will you take you to the previous occurrence of it.
* Go to the next occurrence of the current word under the cursor.
# Go to the previous occurrence of the current word under the cursor.
% Go to the matching braces, or parenthesis inside code.
:s/searchStr/newStr/g Search and replace all occurrences of searchStr in a line
:s/searchStr/newStr/gi Search and replace all occurrences of searchStr in a line (case insensative)
:%s/searchStr/newStr/g Search all lines and replace all occurrences of searchStr in a line with newStr
:%s/searchStr/newStr/gc Search and replace all occurrences of searchStr in all lines interactively. It will highlight the search string and ask you to replace it or move to next search string
参考:
http://feeds.dzone.com/~r/dzone/frontpage/~3/EN-VW-Kui1k/getting_back_to_vi_editor.html
http://www.catswhocode.com/blog/100-vim-commands-every-programmer-should-know
分享到:
相关推荐
最新 instantclient-basic-linux.x64-11.2.0.4.0最新 instantclient-basic-linux.x64-11.2.0.4.0最新 instantclient-basic-linux.x64-11.2.0.4.0最新 instantclient-basic-linux.x64-11.2.0.4.0最新 instantclient-...
将 jpgc-graphs-basic-2.0.zip 解压缩后只有一个 lib 目录,该目录下有一个 ext 文件夹和一个 jmeter-plugins-cmn-jmeter-0.3.jar 包,ext 文件夹中有 jmeter-plugins-graphs-basic-2.0.jar 和 jmeter-plugins-...
1. 解压 sh confd-basic-7.6.linux.x86_64.installer.bin /home/tmpconfd 2. 编译crypto.so 修改 confd-basic-7.6.linux.x86_64/confd-basic-7.6/libconfd/src/include.mk cd confd-basic-7.6.linux.x86_64/confd-...
instantclient-basic-windows.x64-12.2.0.1.0,免去安装本地oracle数据库,配合第三方连接工具(如navicat for oracle)简单配置即可连接上项目开发库。 关于 Navicat 连接Oracel出现 probable Oracel ...
instantclient-basic-windows.x64-19.8.0.0.0dbru 是 Oracle 数据库 Instant Client 的一个特定版本和配置的下载包名称。 Instant Client:Oracle Instant Client 是一个轻量级的客户端库,它允许应用程序连接到...
"instantclient-basic-windows.x64-11.2.0.4.0"是Oracle Instant Client的一个特定版本,适用于64位的Windows操作系统。这个版本号(11.2.0.4.0)表明它基于Oracle Database 11g Release 2,这是Oracle在2009年发布...
instantclient-basic-windows.x64-11.2.0.4.0.zip,Oracle1164位官方客户端,可用于本地电脑未安装数据库的情况下,PLSQL连接Oracle数据库,注意,PLSQL也需要是64位版本的,客户端版本为11.2.0.4.0
这个版本,"instantclient-basic-windows.x64-11.2.0.4.0",是专为64位Windows系统设计的,提供基础的数据库访问功能,包括SQL*Plus、OCI(Oracle Call Interface)和TNS(Transparent Network Substrate)。...
标题中的"instantclient-basic-windows.x64-12.1.0.2.0.zip"指的是Oracle Instant Client的基础版,适用于64位的Windows操作系统,版本号为12.1.0.2.0。 **Oracle Instant Client的组成部分** Oracle Instant ...
标题 "instantclient-basic-linux.x64-21.1.0.0.0.zip" 提供的信息表明,这是一个Oracle数据库的即时客户端(Instant Client)的压缩包,适用于64位的Linux操作系统,版本号为21.1.0.0.0。这个客户端是Oracle公司...
navicat 链接 oracle 数据库oci.dll 版本,这是 instantclient for windows x64的配置文件,【instantclient-basic-windows.x64-19.10.0.0.0dbru.zip】
这个“instantclient-basic-windows.x64-19.3.0.0.0dbru”是针对Windows 64位系统的最新版本,19.3.0代表的是发布年份和版本号,dbru可能是特定的构建标识。 1. **Oracle Instant Client的核心功能**: - 数据库...
适合最新Navicate 15 64位使用,解决连接Oracle 11g 64位时 Oracle library is not loaded,经测试instantclient-basic-windows.x64-11.2.0.4.0死活连接不上 不要被误导。换12.1完美解决。 32位的navicate 可以用...
oracle 数据库驱动 instantclient-basic-linux.x64-12.2.0.1.0.zip instantclient-basiclite-linux.x64-12.2.0.1.0.zip
这个压缩包文件`instantclient-basic-windows.x64-11.2.0.4.0.rar`是Oracle Instant Client的Windows 64位版本,版本号为11.2.0.4.0。它包含了必要的库文件和工具,使得开发者和管理员可以在不安装完整版Oracle ...
在本例中,我们讨论的是"Instant Client"的Windows 64位版本,具体为`instantclient-basic-windows.x64-19.19.0.0.0dbru`。 1. **Oracle Instant Client**: 这是Oracle公司提供的一种快速部署的客户端软件,它包括...
sudo alien -i /home/ubuntu/oracle-instantclient-basic-21.1.0.0.0-1.x86_64.rpm sudo alien -i /home/ubuntu/oracle-instantclient-devel-21.1.0.0.0-1.x86_64.rpm sudo alien -i /home/ubuntu/oracle-instant...