[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-571583-105":53,"doc-detail-571583-en":126},{"code":4,"msg":5,"data":6},0,"success",[7,14,19,24,29,34,39,44,49],{"id":8,"doc_module":9,"doc_module_name":10,"category_name":11,"show_sort_weight":12,"slug":13},11,1,"Template","Presentations",90,"presentations",{"id":15,"doc_module":9,"doc_module_name":10,"category_name":16,"show_sort_weight":17,"slug":18},12,"Resumes",80,"resumes",{"id":20,"doc_module":9,"doc_module_name":10,"category_name":21,"show_sort_weight":22,"slug":23},14,"Invoices",70,"invoices",{"id":25,"doc_module":9,"doc_module_name":10,"category_name":26,"show_sort_weight":27,"slug":28},15,"Posters",60,"posters",{"id":30,"doc_module":9,"doc_module_name":10,"category_name":31,"show_sort_weight":32,"slug":33},16,"Social Media",50,"social-media",{"id":35,"doc_module":9,"doc_module_name":10,"category_name":36,"show_sort_weight":37,"slug":38},17,"Forms",40,"forms",{"id":40,"doc_module":9,"doc_module_name":10,"category_name":41,"show_sort_weight":42,"slug":43},18,"Letters",30,"letters",{"id":45,"doc_module":9,"doc_module_name":10,"category_name":46,"show_sort_weight":47,"slug":48},21,"Paper Templates",5,"papers-templates",{"id":50,"doc_module":9,"doc_module_name":10,"category_name":51,"show_sort_weight":4,"slug":52},158,"General","general-158",{"code":4,"msg":54,"data":55},"ok",{"site_id":56,"language":57,"slug":58,"title":59,"keywords":60,"description":61,"schema_data":62,"social_meta":119,"head_meta":121,"extra_data":123,"updated_unix":125},105,"en","vi-editor-cheat-sheet-acns-bulletin-ed-03-command-input-cursor-and-searchreplace","VI Editor Cheat Sheet - ACNS Bulletin ED-03 - Command, Input, Cursor and Search/Replace","","VI “Cheat” Sheet compiles practical guidance for using the vi editor, covering how to invoke vi with a filename, how command mode differs from input mode, and how to switch between modes safely using Esc. It lists core file, window, cursor, insertion, change, deletion, recovering, and rearrangement commands, plus parameter toggles like numbering and autoindent. It also provides search and replace syntax with addressable ranges and examples for substitutions across specific line sets.",{"@graph":63,"@context":118},[64,80,101],{"@type":65,"itemListElement":66},"BreadcrumbList",[67,71,74,77],{"item":68,"name":69,"@type":70,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":72,"name":10,"@type":70,"position":73},"https://docshare.wps.com/template/",2,{"item":75,"name":11,"@type":70,"position":76},"https://docshare.wps.com/template/presentations/",3,{"item":78,"name":59,"@type":70,"position":79},"https://docshare.wps.com/template/vi-editor-cheat-sheet-acns-bulletin-ed-03-command-input-cursor-and-searchreplace/571583/",4,{"url":78,"name":59,"@type":81,"image":82,"author":87,"headline":59,"publisher":90,"fileFormat":93,"inLanguage":57,"description":61,"dateModified":94,"datePublished":95,"encodingFormat":93,"isAccessibleForFree":96,"interactionStatistic":97},"DigitalDocument",{"url":83,"@type":84,"width":85,"height":86},"https://docshare.wps.com/thumbnails/vi-editor-cheat-sheet-acns-bulletin-ed-03-command-input-cursor-and-searchreplace/571583.png","ImageObject",442,249,{"name":88,"@type":89},"Aditya","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-10-20","2026-10-13",true,{"@type":98,"interactionType":99,"userInteractionCount":47},"InteractionCounter",{"@type":100},"ViewAction",{"@type":102,"mainEntity":103},"FAQPage",[104,110,114],{"name":105,"@type":106,"acceptedAnswer":107},"How do you switch between vi command mode and input mode?","Question",{"text":108,"@type":109},"vi starts in command mode. Enter any vi input command to switch to input mode, then press Esc to exit input mode so commands can be executed again.","Answer",{"name":111,"@type":106,"acceptedAnswer":112},"What commands save changes and quit vi?",{"text":113,"@type":109},"Use :w to write edits to a file, :wq to write and quit, :q! to quit without saving, or ZZ which is the same as :wq.",{"name":115,"@type":106,"acceptedAnswer":116},"How does vi search and replace work with line ranges and regular expressions?",{"text":117,"@type":109},"Use the format :[address]s/old_text/new_text/ where the address specifies the range (e.g., . for current line, .+10 for following lines, or % for the entire file). Examples include :.,.+10s/Banana/Kumquat and :%s/apple/pear/g for global replacements.","https://schema.org",{"og:url":78,"og:type":120,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":122,"canonical":78},"index,follow",{"doc_id":124,"site_id":56},571583,1792337700,{"code":4,"msg":5,"data":127},{"doc_id":124,"user_id":128,"nickname":88,"user_avatar":129,"doc_module":9,"category_id":8,"category_name":11,"doc_title":59,"doc_description":61,"doc_content":130,"file_id":131,"file_url":132,"file_type":133,"file_size":134,"view_count":47,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":73,"language":135,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":136,"faqs":137,"seo_title":138,"seo_description":61,"update_tm":139,"read_time":9},962085564549,"https://ap-avatar.wpscdn.com/davatar_085a072bc5b1113ac321206ff7593b45","VI “Cheat” Sheet ACNS Bulletin ED–03 February 1995  \nvi Editor “Cheat Sheet”  \nInvoking vi: vi filename  \nFormat of vi commands: [count][command] (count repeats the effect of the command)  \n\n| Command mode versus input mode | File management commands |\n| --- | --- |\n| Vi starts in command mode. The positioning commands operate only while vi is in command mode. You switch vito input mode by entering any one of several vi input commands. (See next section.) Once in input mode, any character you type is taken to be text and is added to the file. You cannot execute any commands until you exit input mode. To exit input mode, press the escape (Esc) key. | :w name Write edit buffer to file name\u003Cbr>:wq Write to file and quit\u003Cbr>:q! Quit without saving changes\u003Cbr>ZZ Same as :wq\u003Cbr>:sh Execute shell commands (\u003Cctrl>d) |\n|  | Window motions |\n| Input commands (end with Esc) |  |\n|  | \u003Cctrl>d Scroll down (half a screen)\u003Cctrl>u Scroll up (half a screen)\u003Cbr>\u003Cctrl>f Page forward\u003Cbr>\u003Cctrl>b Page backward\u003Cbr>/string Search forward\u003Cbr>?string Search backward\u003Cbr>\u003Cctrl>l Redraw screen\u003Cbr>\u003Cctrl>g Display current line number and\u003Cbr>file information n Repeat search\u003Cbr>N Repeat search reverse\u003Cbr>G Go to last line\u003Cbr>nG Go to line n\u003Cbr>:n Go to line n\u003Cbr>z\u003CCR> Reposition window: cursor at top\u003Cbr>z. Reposition window: cursor in middle\u003Cbr>z- Reposition window: cursor at bottom |\n| a Append after cursor\u003Cbr>i Insert before cursor\u003Cbr>o Open line below\u003Cbr>O Open line above\u003Cbr>:rfile Insert file after current line\u003Cbr>Any of these commands leaves vi in input mode until you press Esc. Pressing the RETURN key will not take you out of input mode. |  |\n| Change commands (Input mode) |  |\n| cw Change word (Esc)\u003Cbr>cc Change line (Esc) -blanks line\u003Cbr>c$ Change to end of line\u003Cbr>rc Replace character with c\u003Cbr>R Replace (Esc) -typeover\u003Cbr>s Substitute (Esc) -1 char with string\u003Cbr>S Substitute (Esc) -Rest of line with\u003Cbr>text\u003Cbr>. Repeat last change |  |\n|  | Cursor motions |\n|  | H Upper left corner (home)\u003Cbr>M Middle line\u003Cbr>L Lower left corner\u003Cbr>h Back a character\u003Cbr>j Down a line\u003Cbr>k Up a line\u003Cbr>^ Beginning of line\u003Cbr>$ End of line\u003Cbr>l Forward a character\u003Cbr>w One word forward\u003Cbr>b Back one word\u003Cbr>fc Find c\u003Cbr>; Repeat find (find next c) |\n| Changes during insert mode |  |\n| \u003Cctrl>h Back one character\u003Cbr>\u003Cctrl>w Back one word\u003Cbr>\u003Cctrl>u Back to beginning of insert |  |\n\n\n| Deletion commands |  |  |\n| --- | --- | --- |\n| dd or ndd |  | Delete n lines to general buffer |\n| dw |  | Delete word to general buffer |\n| dnw |  | Delete n words |\n| d) |  | Delete to end of sentence |\n| db |  | Delete previous word |\n| D |  | Delete to end of line |\n| x |  | Delete character |\n| Recovering |  | deletions |\n| p |  | Put general buffer after cursor |\n| P |  | Put general buffer before cursor |\n| Undo | commands |  |\n| u | Undo last change |  |\n| U | Undo all changes on line |  |\n| Rearrangement commands |  |  |\n| yy or Y |  | Yank (copy) line to general buffer |\n| “z6yy |  | Yank 6 lines to buffer z |\n| yw |  | Yank word to general buffer |\n| “a9dd |  | Delete 9 lines to buffer a |\n| “A9dd |  | Delete 9 lines; Append to buffer a |\n| “ap |  | Put text from buffer a after cursor |\n| p |  | Put general buffer after cursor |\n| P |  | Put general buffer before cursor |\n| J |  | Join lines |\n| Parameters |  |  |\n\n:set list  \n:set nolist  \n:set number  \n:set nonumber  \n:set autoindent  \n:set noautoindent  \n:set showmatch  \n:set noshowmatch:set showmode  \n:set noshowmode  \n:set all  \nShow invisible characters Don’t show invisible characters Show line numbers  \nDon’t show line numbers Indent after carriage return Turn off autoindent  \nShow matching sets of parentheses as they are typed Turn offshowmatch  \nDisplay mode on last line of screen Turn offshowmode  \nShow values of all possible parameters  \n\n| Move text from file old to file new |  |  |\n| --- | --- | --- |\n| vi old |  |  |\n| “a10yy |  | yank 10 lines to buffer a |\n| :w |  | write work buffer |\n| :e new |  | edit new fil","cbCaioZuZb4TtHGh","https://ap.wps.com/l/cbCaioZuZb4TtHGh","pdf",62661,"English","# Invoking vi\n# Command mode vs input mode\n## File management commands\n## Window motions and navigation\n## Input commands\n## Change commands\n## Cursor motions\n## Deletion and recovering\n## Undo and rearrangement commands\n# Parameters and display options\n# Moving and writing files\n# Regular expressions\n# Search and replace syntax","[{\"question\":\"How do you switch between vi command mode and input mode?\",\"answer\":\"vi starts in command mode. Enter any vi input command to switch to input mode, then press Esc to exit input mode so commands can be executed again.\"},{\"question\":\"What commands save changes and quit vi?\",\"answer\":\"Use :w to write edits to a file, :wq to write and quit, :q! to quit without saving, or ZZ which is the same as :wq.\"},{\"question\":\"How does vi search and replace work with line ranges and regular expressions?\",\"answer\":\"Use the format :[address]s/old_text/new_text/ where the address specifies the range (e.g., . for current line, .+10 for following lines, or % for the entire file). Examples include :.,.+10s/Banana/Kumquat and :%s/apple/pear/g for global replacements.\"}]","VI Editor Cheat Sheet - ACNS Bulletin ED-03 - Command, Input, Cursor and Search/Replace | PDF",1791922470]