ImageVerifierCode 换一换
格式:DOCX , 页数:13 ,大小:24.10KB ,
资源ID:22417408      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/22417408.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(vim与gvim技巧4Word下载.docx)为本站会员(b****8)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

vim与gvim技巧4Word下载.docx

1、bn goto next bufferbp goto previous bufferwn save file and move to next (super)wp save file and move to previousbd remove file from buffer list (super)bun Buffer unload (remove window but not from list)badd file.c file from buffer listb 3 go to buffer 3b main go to buffer with main in name eg main.c

2、 (ultra)sav php.html Save current file as php.html and move to php.htmlsav! %.bak Save Current file to alternative extension (old way) %:r.cfm Save Current file to alternative extensionsav %:s/fred/joe/ do a substitute on file names/fred/joe/:r.bak2 do a substitute on file name & ext.mv % %:r.bak re

3、name current file (DOS use Rename or DEL)e! return to unmodified filew c:/aaa/% save file elsewheree # edit alternative file (also cntrl-)rew return to beginning of edited files list (:args)brew buffer rewindsp fred.txt open fred.txt into a splitsball,:sb Split all buffers (super)scrollbind in each

4、split windowmap lse # : Pressing F5 lists all buffer, just type numberset hidden Allows to change buffer w/o saving current buffer Quick jumping between splitsmap C-Wjk Recording (BEST TIP of ALL)qq # record to qyour complex series of commandsq # end recordingq to execute to Repeat5 to Repeat 5 time

5、s editing a register/recordingqpdisplay contents of register q (normal mode)display contents of register q (insert mode) you can now see recording contents, edit as requiredqddput changed contacts back into qqexecute recording/register q Operating a Recording on a Visual BLOCK1) define recording/reg

6、isterqq:s/ to/ from/gMq2) Define Visual BLOCKV3) hit : and the following appears,4)Complete as followsnorm qcombining a recording with a map (to end up in command mode)nnoremap q:w!barbd Visual is the newest and usually the most intuitive editing mode Visual basicsv enter visual modeV visual mode wh

7、ole lineC-V enter VISUAL BLOCK modegv reselect last visual area (ultra)o navigate visual area*y yank visual area into paste bufferV% visualise what you matchVJ Join Visual block (great)VgJ Join Visual block w/o adding spaces Delete first 2 characters of 10 successive lines010j2ld how to copy a set o

8、f columns using VISUAL BLOCK visual block (AKA columnwise selection) (NOT BY ordinary v command) then select column(s) with motion commands (win32 then c,d,y,r etc how to overwrite a visual-block of text with another such blockPick the first block: ctrl-v move ayPick the second block: ctrl-v move c

9、ctrl-o aP _vimrc essentialsset incsearch : jumps to search word as you type (annoying but excellent)set wildignore=*.o,*.obj,*.bak,*.exe : tab complete now ignores theseset shiftwidth=3 for shift/tabbingset vb t_vb=. set silent (no beep)set browsedir=buffer Maki GUI File Open use current directory l

10、aunching Win IEnmap ,f :updatesilent !start c:progra1intern1iexplore.exe file:/%:pnmap ,i : !progra1intern1iexplore.exe FTPing from VIMcmap ,rNread ftp:/209.51.134.122/public_html/index.htmlcmap ,wNwrite ftp:gvim ftp:/ # uses netrw.vim appending to registers (use CAPITAL) yank 5 lines into a then ad

11、d a further 5a5yy10jA5yyI show lines matching word under cursor (super) Conventional Shifting/Indentingb visual shifting (builtin-repeat)vnoremap Block shifting (magic)ia also% and out.txt redirect to a file Working with Paste buffer*yy yank to paste*p insert from paste buffer yank to paste buffer (

12、ex mode)by* Yank range into paste%y* Yank whole buffer into paste.y* Yank Current line to paster filter non-printable characters from the paste buffer useful when pasting from some gui applicationnmap p :let * = substitute(*,:print:g)*p Re-Formatting textgq Format a paragraphgqapggVGgq Reformat enti

13、re fileVgq current line break lines at 70 chars, if possible after a ;s/.,69;s*|.,69s+/&r/g Operate command over multiple filesargdo %s/foo/bar/e operate on all files in :argsbufdo %s/foo/bar/ewindo %s/foo/bar/eargdo exe sort|w! include an external command Command line tricksgvim -h helpls | gvim -

14、edit a stream!cat xx | gvim - -c v/dd|3-9/d filter a streamgvim -o file1 file2 open into a split execute one command after opening filegvim.exe -c /main joe.c Open joe.c & jump to main execute multiple command on a single filevim -c %s/ABC/DEF/ge | update file1.c execute multiple command on a group

15、of filesargdo %s/ABC/DEF/ge | update *.c remove blocks of text from a series of filesargdo /begin/+1,/end/-1g/d | update Automate editing of a file (Ex commands in convert.vim)vim -s convert.vim file.c#load VIM without .vimrc and plugins (clean VIM)gvim -u NONE -U NONE -N Access paste buffer content

16、s (put in a script/batch file)gvim -c normal ggdG*p c:/aaa/xp print paste contents to default printers/=*/|hardcopy!|q! gvims use of external grep (win32 or *nix)grep somestring *.php creates a list of all matching files use :cn(ext) :cp(rev) to navigate listh grep GVIM Difference Function (Brillian

17、t)gvim -d file1 file2 vimdiff (compare differences)dp put difference under cursor to other filedoget difference under cursor from other file Vim trapsIn regular expressions you must backslash + (match 1 or more)In regular expressions you must backslash | (or)In regular expressions you must backslash

18、 ( (group)In regular expressions you must backslash (count)/fred+/ matches fred/freddy but not free/(fred)2,3/ note what you have to break v or very magic (usually) reduces backslashing/codes(n|s)*where normal regexp/vcodes(n|s)*where very magic pulling objects onto command/search line (SUPER)C-R pu

19、ll word under the cursor into a command line or searchC-A pull WORD under the cursor into a command line or search- pull small register (also insert mode)0-9a-z pull named registers (also insert mode)% pull file name (also #) (also insert mode)=somevar pull contents of a variable (eg :let sray=ray0-9 manipulating registerslet a=_ clear register alet a=let *=a copy register a to paste bufferf11qyy:let q=q.zzz-

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1