免费预览已结束,剩余1页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Vim使用经验技巧Vim挂起:ctrl + Z返回vim:fgVim替换:%s/pattern1/pattern2/g(%范围前缀表示在所有行中执行替换。g代表替换行中的所有匹配点,如果需要逐个确认则在其后加c,)N,$s/pattern1/pattern2/则代表替换从n到$行如果替换内容有/时,则把分隔符/变为#修改文本模式下分辨率问题:/boot/grub/grub.conf里的后面加上vga=0x317(1024X768)即可Command Actioni insert text just before the cursorI insert text at the start of the linea append text just after the cursorA append text at the end of the lineo open a new line belowO open a new line aboves substitute the current characterS substitute the current liner replace the current characterR replace continuous charactersWant to move the cursor to the next word? Press w.Want to move to to the next paragraph? Press .Want to move to the 3rd occurrence of the letter h? Press 3fh.Want to move 35 lines downwards? Press 35j.After one of the above movements, want to jump back to the previous location? Pressctrl-o.h You have to stretch your index finger (which is on j) to the left to press the h. This is the left-most keyand signifies going left.j The drooping j key signifies going down.k The upward pointing k key signifies going up.l The right-most l key signifies going right.Traditional Vimhome key moves to the start of the line key (think anchored to the start)end key moves to the end of the line $ key (think the buck stops here)pgup key moves one screen up ctrl-b which means move one screen backwardpgdn key moves one screen down ctrl-f which means move one screen forwardMove the cursor to the first line by pressing 1G. Move 20 characters to the right by pressing 20l. Move back to the first character by pressing . Jump to the last character by pressing $. Press G to jump to the last line.Press H to jump as high as possible (first line of the window)Press M to jump to the middle of the windowPress L to jump as low as possible (last line being displayed)First, lets position the cursor on the first character by pressing .Want to move to the next word? Press w.How about moving 2 words forward? Just add the prefix count to w: 2w.Similarly, to move to the end of the next word, press e.To move one word backward, press b. By prefixing a count, 2b will go back by 2 wordsPosition the cursor at the first character ().To move to the next sentence, press ).To move to the previous sentence, press (.Notice that the bigger brackets is for the bigger text object. If you had already noticedthis, then congratulations, you have already started to think like a winner, err, think like aVimmer.Use ma to create a mark named a. Move the cursor towherever you want, for example 4j.simply press ctrl-oto jump to the previous location and ctrl-i to jump forward to the next location again.Press v to start the visual mode, and press ap to select a paragraph. Press to flip thecase of the text. If you want to cancel the selection, simply press .Other text object mnemonics are aw which means a word, a means a quoted string (likethis is a quoted string), ab means a block which means anything within a pair ofparentheses, and so on.NoteTo make saving easier, add the following line to your vimrc file: To save, ctrl-s.nmap :wimap :wacd is short for change directory.pwd is short for print working directory.Desktop world vim world operation cut delete dcopy yank ypaste paste pyap will copy the current paragraphp (lower case) paste after current cursor positionP (upper case) paste before current cursor positionx delete one character at curre
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 保安考试试题及答案
- 村会计考试题目及答案
- 德院思政考模拟试题及答案详解
- 《古代商业发展》课件
- 《河流补给类型》课件
- 高中体育与健康人教版必修第一册《大腿停球》教案
- 初中化学九年级《燃烧与灭火》专题复习教学设计
- 九年级语文醉翁亭记教学设计:山水之乐与太守之志的深层对话
- 七年级英语新教材人教版 Starter Unit 2 Section B 1a-1d 教学设计
- 小学五年级劳动教育“风雨无阻的骑士·快递员”教学设计
- 2026年廉政知识专题测试题及答案
- 城乡教育公平之困与破局:现状、成因与路径探索
- 2026-2027学年人美版(新版)初中美术九年级上册(全册)教学设计(附目录p89)
- 2026年机关事业单位工勤人员计算机操作员高级工考试试题及答案
- 大连船舶重工集团笔试题目及答案
- (正式版)DB11∕T 1733-2020 《绿地保育式生物防治技术规程》
- 2026年中小学教师师德师风知识考试试题及答案
- T∕CSIA 022-2025企业体验式安全教育基地建设规范
- 2026浙江国检检测技术股份有限公司第一轮招聘员工拟录用对象笔试历年常考点试题专练附带答案详解
- GB/T 5124.1-2026硬质合金化学分析方法第1部分:总碳量的测定重量法和气体容量法
- Unit 6 课时8 Project(大单元课时课件)英语新教材人教版八年级下册
评论
0/150
提交评论