首页 > 其他分享 >Vimtutor记录

Vimtutor记录

时间:2022-11-16 10:00:50浏览次数:50  
标签:Vimtutor 记录 text move cursor file line delete

Vimtutor记录

操作 功能
h,j,k,l The cursor is moved using either the arrow keys or the hjkl keys
:q! trash all changes and quit Vim
x delete the character at the cursor
i insert before the cursor
A append after the line
:wq save the changes and quit Vim
dw delete from the cursor up to the next word
d$ delete from the cursor to the end of a line
de delete from the cursor to the end of the current word
2w move the cursor two words forward
3e move the cursor to the end of the third word forward
0 move to the start of the line
d2w delete two words
dd delete a whole line
2dd delete two lines
u undo the last commands
dd=>p put back text that has just been deleted
r replace the character under the cursor
ce change until the end of a word
c [number] motion use with w,$,e to change
G move to the bottom of the file
gg move to the start of the file
[number] G move to the [number] line
/=>n&N Type / followed by a phrase to search for the phrase
?=>n&N Type ? followed by a phrase to search for the phrase inversely
% find a matching ),], or }
:s/thee/the <ENTER> changes the first occurrence of "thee" in the line
:s/thee/the/g substitute globally in the line, change all occurrences of "thee" in the line
:#,#s/old/new/g where #,# are the line numbers of the range of lines where the substitution is to be done.
:%s/old/new/g to change every occurrence in the whole file
:%s/old/new/gc to find every occurrence in the whole file,with a prompt whether to substitute or not.
:! followed by an external command to execute that command
:w FILENAME save the changes made to the text
v starts Visual selection
r FILENAME insert the contents of a file
o open a line BELOW the cursor and place you in Insert mode
O open up a line ABOVE the cursor
a insert text AFTER the cursor
R replace more than one character
y(Visual Model) copy text
p(Visual Model) paste text
:set ic search or substitute ignores case
:set noic
:set hls is set the 'hlsearch' and 'incsearch' options
:nohlsearch

标签:Vimtutor,记录,text,move,cursor,file,line,delete
From: https://www.cnblogs.com/I-am-Sino/p/16894904.html

相关文章

  • 智控测试记录
    测试目录一、上电整机基础测试电压输入24V12V模组正常工作以后(5V3.3V1.8V)二、通讯口测试板载串口(SIP1TTL电平)CAN0CAN1RS232RS485网络通讯(验证1000M)H......
  • 10.12起的调试记录
    1.按键的编码器长按的确会发送一次信息,但由于ke->status==0,因此发出去也不会有任何影响,只要我加上去一个判断意思一下就可以了。2. 用tar命令批量解压某个文件夹下所有......
  • Linux wifi+4G 模块驱动测试记录
    注意:此时WiFi模块的驱动已经修改好。RTL8188USBWIFI联网测试(记录操作步骤)首先使能驱动,在根目录/lib/modules/4.1.15里面。首先命令lsmod可以看到有没有驱动。然......
  • VueBaiduMap使用记录
    项目中有用到地图,之前采用的是腾讯地图,使用后发现在IE中地图展示空白,就想着换百度地图试试,又看到有基于Vue框架的百度地图插件VueBaiduMap,正好符合我的需求;本文记录一下。......
  • 记录一个gorm发生全局查询条件的问题
       正常情况下在使用gorm做修改操作时,会使用omit过滤一些字段,比如上图中修改的时候就不应该修改创建时间和创建人字段的值。关键点在于上图如果omit中没有增加id字......
  • mysql查询每张表有多少条记录
    mysql查询每个表有多少条记录的方法:执行【selecttable_name,table_rowsfromtableswhereTABLE_SCHEMA='数据库的名称';】语句即可。mysql查询每个表分别有多少条记......
  • 前后端架构技术记录-动态列与查询条件
    目前做过的许多项目都是后台管理的多,基本上页面上的参数和查询条件都是能够通过代码生成出来的。构想有几点动态配置条件与列,生成对于的vue的条件-列表,java的bean,sql代......
  • 【随手记录】关于maven package项目报错 Could not find artifact xxxx:pom:${version
    最近在开发时候,遇见mavenpackage项目报错Couldnotfindartifactxxxx:pom:${version}inmaven-public(xxxx)原因是私服仓库上传的jar包没有pom文件(理论上上传的ja......
  • 错题记录:单片机4个数码管分秒表 关于定义数组的细节问题
    废话不多说先上代码:查看代码 //定时器0分,秒的计时计数voidtimer0()interrupt1{ staticunsignedintspeed,count=0; TH0=0XEE; TL0=0X00; count++; if(s......
  • 记录一次11表关联查询的优化
    一、优化背景接收的历史项目有一个存储过程,查询涉及11张表。单个存储过程在线上查询一次耗时时间较长。获取该存储过程在无压力的测试库单独执行,最好的情况,执行单次需要......