Home

Vim Quick Reference Guide

image

Contents

1. delcombine dictionary Yaitt diffexpr diffopt digraph directory display eadirection edcompatible encoding endofline equalalways equalprg errorbells errorfile errorformat esckeys eventignore expandtab exrc fileencoding fileencodings fileformat fileformats filetype fillchars fkmap foldclose foldcolumn foldenable foldexpr foldignore foldlevel foldlevelstart foldmarker foldmethod foldminlines foldnestmax foldopen foldtext formatlistpat formatoptions formatprg formatexpr fsync gdefault grepformat grepprg guicursor guifont oi cpo cspc Vesprg csqf ests csto csverb CUG eu def deco dict dex dip dg rarr dy ead ted enc Teol eq ep eb ef efm ek ei Tet ex fence fencs TEF ffs Vettes fos fk Feds fed fen fde fais redi fdls fmr fdm neml fdn fdo tot flp Eos tpt fex fg gd gfm gp ger gfn Options 10 make autoindent use existing indent structure flags for Vi compatible behavior how many components of the path to show command to execute cscope use quickfix window for cscope results use cscope for tag commands determines cstag search order give messages when adding a cscope database highlight the screen column of the cursor highlight the screen lin
2. ELEY imak imc imd rimi ims tine inex CRS inde indk iat Tim isf rigi tisk isp AS kmp km kp lmap Im ris i le A FIPE ef 5553535353555 ps at co fq md mp Options 11 Names of multi byte fonts to be used t of font names for double wide characters pixels room for window decorations Which components and options are used try to use a pseudo tty for commands custom label for a tab page UI custom tooltip for a tab page ull path name of the main help file minimum height of a new help window preferred help languages don t unload buffer when it is YXXYabandon ed sets highlighting mode for various occasions highlight matches with last search pattern number of command lines that are remembered Hebrew keyboard mapping phonetic Hebrew keyboard mapping let Vim set the text of the window icon string to use for the Vim icon text ignore case in search patterns key that activates the X input method use IM when starting to edit a command line do not use the IM in any mode use lmap or IM in Insert mode use lmap or IM when typing a search pattern pattern to be used to find an include file expression used to process an include line highlight match while typing search pattern expression used to obtain the indent of a line keys that trigger indenting with indentexpr adjust case of match for keyword completion start the edit of a file in Insert mode charact
3. See Q dil CTRL R 0 9a z insert the contents of a register lt Left gt lt Right gt cursor left right lt S Left gt lt S Right gt cursor one word left right CTRL B CTRL E lt BS gt lt Del gt CTRL W CTRL U lt Up gt lt Down gt lt S Up gt lt S Down gt shis tory cursor to beginning end of command line delete the character in front of the cursor delete the character under the cursor delete the word in front of the cursor remove all characters recall older newer command line that starts with current command recall older newer command line from history show older command lines Context sensitive completion on the command line wildchar CTRL D CTRL A CTRL L CTRL N CTRL P default lt Tab gt do completion on the pattern in front of the cursor If there are multiple matches beep and show the first one further wildchar will show the next ones list all names that match the pattern in front of the cursor insert all names that match pattern in front of cursor insert longest common part of names that match pattern after wildchar with multiple matches go to next match after wildchar with multiple matches go to previous match Ex ranges Ex ranges P separates two line numbers P idem set cursor to first line number before interpreting second one number an absolute line number the current line the last line in the file equal to 1 th n
4. cdpath cedit charconvert cindent cinkeys Ccinoptions cinwords clipboard cmdheight cmdwinheight columns comments commentstring compatible complete completefunc completeopt confirm conskey Wai rari akm ambw anti acd arab arshape remov option Show value of option Reset option to its default value value from string option like set but set the local value for options that have one like set but set the global value of a local option Set value of t_kD according to value of Open a new window to view and set options functionality tE KDY grouped by a one line explanation and links to the help ASCII code of the letter Aleph Hebrew allow CTRL _ in Insert and Command line mode for default second language Farsi Hebrew what to do with Unicode chars of ambiguous width Mac OS X use smooth antialiased fonts change directory to the file in the current window for Arabic as a default second language do shaping for Arabic characters take indent for new line from previous line autom read file when changed outside of Vim automatically write file if changed as autowrite but works with more commands dark or light used for highlight colors how backspace works at start of line keep backup file after overwriting a file make backup as a copy don t rename the fil list of directories for the backup file extension used for the backup f
5. keep window width when opening closing windows winminheight wmh minimum number of lines for any window winminwidth wmw minimal number of columns for any window winwidth wiw minimal number of columns for current window wrap long lines wrap and continue on the next line wrapmargin wm chars from the right where wrapping starts wrapscan ws searches wrap around the end of the file write writing to a file is allowed writeany wa write to file with no need for override writebackup wb make a backup before overwriting a file writedelay wd delay this many msec for each char for debug Undo Redo commands N u undo last N changes N CTRL R redo last N undone changes U restore last changed line External commands sh ell start a shell command execute command with a shell K lookup keyword under the cursor with keywordprg program default man Quickfix commands ec nr display error nr default is the same again n display the next error CP display the previous error rel list all errors CE read errors from the file rerrorfile cgetb HCG cgete caddf cad Melo cex cq make args gr ep args Various commands 15 like cbuffer but don t jump to the first error like cfile but don t jump to the first error like cexpr but don t jump to the first error add errors from the error file to the current quickfix list add errors from an expression to the current qu
6. Split window and jump to tag under cursor Split window and edit file name under the cursor Split window and edit alternate file or new Create new empty window or q uit Quit editing and close window or cl ose Make buffer hidden and close window Or Pony Make current window only one on the screen Move cursor to window below Move cursor to window above TRL W Move cursor to window below wrap Move cursor to window above wrap Move cursor to top window Move cursor to bottom window Move cursor to previous active window Rotate windows downwards Rotate windows upwards Exchange current window with next one Make all windows equal height Decrease current window height Increase current window height Set current window height default very high Buffer list commands buffers ball unhide badd fname or files list all known buffer and file names or sball edit all args buffers or sunhide edit all loaded buffers add file name fname to the list bunload N unload buffer N from memory bdelete N unload buffer N and delete it from the buffer list in current window in new window N buffer N N souffer N to arg buf N N bnext N N sonext N to Nth next arg buf N bNext N N soNext N to Nth previous arg buf N bprevious N N soprevious N to Nth previous arg buf bfirst sbfirst to first arg buf blast sblast to last arg buf N bmod N N somod N
7. go to Nth newer position in jump list ju mps print the jump list Various motions find the next brace bracket comment or line and go to its match zZ zZ res a go to the Nth line in the window go to the middle line in the window go to the Nth line from the bottom but on the first non blank in the line WE op on the first non blank on the first non blank on the first non blank telse endif in this Using tags N go go to Nth byte in the buffer range go to off go to off byte in the buffer Using tags ta g tag Jump to tag tag count tal g Jump to count th newer tag in tag list CTRL Jump to the tag under cursor unless changes have been mad ts elect tag List matching tags and select one to jump to tj ump tag Jump to tag tag or select from list when there are multiple matches I1t ag tag Jump to tag tag and add matching tags to the location list tags Print tag list N CTRL T Jump back from Nth older tag in tag list count po p Jump back from count th older tag in tag list count tn ext Jump to count th next matching tag count tp revious Jump to count th previous matching tag ee Jump to count th matching tag lfast Jump to last matching tag pt ag tag open a preview window to show tag tag CTRL W like CTRL but show tag in preview window
8. pts elect like tselect but show tag in preview window ptj ump like tjump but show tag in preview window pc lose close tag preview window CTRL W z close tag preview window Scrolling N CTRL E window N lines downwards default 1 N CTRL D window N lines Downwards default 1 2 window N CTRL F window N pages Forwards downwards N CTRL Y window N lines upwards default 1 N CTRL U window N lines Upwards default 1 2 window N CTRL B window N pages Backwards upwards z lt CR gt or zt redraw current line at top of window Ah or zz redraw current line at center of window z or zb redraw current line at bottom of window These only work when wrap is off N zh scroll screen N characters to the right N zl scroll screen N characters to the left N zH scroll screen half a screenwidth to the right N zL scroll screen half a screenwidth to the left Inserting text N a append text after the cursor N times N A append text at the end of the line N times N i insert text before the cursor N times also lt Insert gt N I insert text before the first non blank in the line N times N gI insert text in column 1 N times N o open a new line below the current line append text N times N O open a new line above the current line append text N times star tinsert start Insert mode append when used startr eplace start Replace mode at EOL when used In Visual block mode I A insert th append th same text i
9. to Nth modified buf syn syn syn syn syn syn syn syn shighlight clear shighlight group name key arg filetype on filetype plugin indent on CAX CAX cax cax CAX CAX CAX CAX Syntax Highlighting start using syntax highlighting off stop using syntax highlighting keyword group name keyword match group name pattern region group name pattern add a syntax keyword item add syntax match item add syntax region item sync ccomment lines N sa tell syntax how to sync list list current syntax items clear clear all syntax info clear all highlight info set highlighting for group name switch on file type detection without syntax highlighting turn on file type detection with auto indenting and settings GUI commands gui gui en en en en en tme S553535 fname u u mpath u mpath rhs GUI commands UNIX start the GUI idem and edit fname list all menus list menus starting with mpath add menu mpath giving lhs u pri mpath rhs idem with priorities pri u ToolBar name rhs add toolbar item giving lhs nu mpath text sunmenu mpath Folding set set set set set foldmethod manual foldmethod indent foldmethod expr foldmethod syntax foldmethod marker z motion range fold za zD ZO ZO ZC zC zm zM zr ZR zn zN Zi add tooltip to menu mpath remove menu mpath manual fo
10. VIM QUICK REFERENCE GUIDE By Bram Moolenaar Left right MOtiONS 00 0 0 eeeeeeeeeeseeeeeeseaeeeeeceaeeeeeeeees 1 Key MAP DING scissioni aai 8 Up down motions 00 ccceecceeceeeeeeeeeeeeseeeeeaeeseesseeeaaes 1 Abbreviations wissiccdsevisecseeceaccesscowtsecnsaecdseeteacdecsvouvanesseedas 8 Text object MOTIONS eee eeseceeeceeeceeeceeeceeeeeeeeteeeeees 2 OPONSE 8 Pattern searches siriisiisiieiciadiisis ravnurin iaiia 2 Undo Redo commands cccecceesceesceceeeeeeeceeeeeeeeees 14 Marks and motions 0 ceccesceesceeseeeeceeeceeeceaeeeeeeeeeees 3 External commands ccceceeseceseceeeeeeeeeeeeeeeeeeeeeeaee 14 VariOUS MOtIONS cccccecesscesssecsesceceseeecsneesssaeessaeeesees 3 Quickfix COMMANAS cesccessseceesseceseeessteeeseeeesneess 14 USING ta fSiannon iene chee Ae ae 4 Various COMMAMNAG cceeceeeceeseeceeeeeceaeeeaeceeeeeeees 15 Scrolling ivsssce snide creceveacccevseaiueevsaeviccesecbhn ce vacsstessetdgecesetes 4 Command line editing cee ceeceeceeeceeeeeeeeeeeeeeaee 15 INS rung text siti died heonlen ae eeaaee 4 EX TAN BOS iinan e Ate ees eae 16 Insert MOde KeYS sperii 5 Special Ex characters 00 ccceccceesceesceeseeeeeeeceeeeeeeeees 16 Special keys in Insert mode ecceeeceeeeeeeeeeeeeeeeeeees 5 Starting VIM issiria eaan eaii 16 Digraphs srecna iraani aie 5 Editing adfile iiaiai iaa 17 Sp cial inserts sinerien aiina 5 Using the argument list ccc eceeece
11. ats number numberwidth omnifunc opendevice operatorfunc osfiletype paragraphs paste pastetoggle patchexpr patchmode path preserveindent previewheight previewwindow printdevice printencoding printexpr printfont printheader printmbcharset printmbfont printoptions pumheight quoteescape readonly redrawtime remap report restorescreen revins rightleft rightleftcmd ruler rulerformat runtimepath scroll scrollbind scrolljump scrolloff scrollopt sections secure selection selectmode sessionoptions shell m m mt St 55535353535 1 ls od pi pvh pvw pdev penc pexpr pfn pheader pmbcs pmbfn popt ph rs ri Le al Daly ria Pant rut rtp scr sch sj so sbo sect sel slm ssop sh Options 12 maximum memory in Kbyte used for all buffers maximum number of items in a menu memory used before mkspell compresses the tr recognize modelines at start or end of file number of lines checked for modelines changes to the text are not possible buffer has been modified pause listings when the whole screen is filled nable the use of mouse clicks keyboard focus follows the mouse hide mouse pointer while typing changes meaning of mouse buttons shape of the mouse pointer in different modes max time between mouse do
12. ck N at Select a tag block from lt aaa gt to lt aaa gt N it Select inner tag block from lt aaa gt to lt aaa gt N a Select a single quoted string N it Select inner single quoted string N a Select a double quoted string N i Select inner double quoted string N a Select a backward quoted string N i gt Select inner backward quoted string Repeating commands repeat last change with count replaced with N ee record typed characters into register a z q A Z record typed characters appended to register a z q stop recording N a z xecute the contents of register a z N times Key mapping N repeat previous a z N times a z xecute the contents of register a z as an Ex command repeat previous a z range g lobal pattern cmd Execute Ex command cmd default p on the lines within range where pattern matches range g lobal pattern cmd Execute Ex command cmd default p on the lines within range where pattern does NOT match o urce file Read Ex commands from file o urce file Read Vim commands from file l eep sec Don t do anything for sec seconds i gs Goto Sleep for N seconds Key mapping ma p lhs rhs Map lhs to rhs in Normal and Visual mode ma p lhs rhs Map lhs to rhs in Insert and Command line mode no remap lhs rhs Same as map no remapping for t
13. dit a file markers used when foldmethod is marker folding type minimum number of lines for a fold to be closed maximum fold depth for which commands a fold will be opened expression used to display for a closed fold pattern used to recognize a list header how automatic formatting is to be done name of external program used with gq command expression used with gq command siz whether to invoke fsync after file writ the substitute flag g is default on format of grepprg output program to use for grep GUI settings for cursor shape and blinking GUI Name s of font s to be used uifontset uifontwide uiheadroom uioptions uipty uitablabel guitabtooltip helpfile helpheight helplang hidden highlight hlsearch history hkmap hkmapp icon iconstring ignorecase imactivatekey imcmdline imdisable iminsert imsearch include includeexpr incsearch indentexpr indentkeys infercase insertmode isfname isident iskeyword isprint jJoinspaces key keymap keymodel keywordprg langmap langmenu laststatus lazyredraw linebreak lines linespace lisp lispwords TISE listchars loadplugins macatsui magic akeef akeprg atchpairs atchtime axcombine axfuncdepth axmapdepth axmem axmempattern aaao m m m m m m m m m m
14. e quote character s for around shell command string to put output of filter in a temp file use forward slash for shell file names whether to use a temp file for shell commands Amiga influences how to use a shell like shellquote but include redirection round indent to multiple of shiftwidth number of spaces to use for auto indent step list of flags reduce length of messages non MS DOS Filenames assumed to be 8 3 chars string to use at the start of wrapped lines show partial command in status line show full tag pattern when completing tag briefly jump to matching bracket if insert one message on status line to show current mode tells when the tab pages line is displayed minimum number of columns to scroll horizontal min nr of columns to left and right of cursor no ignore case when pattern has uppercase smart autoindenting for C programs use shiftwidth when inserting lt Tab gt number of spaces that lt Tab gt uses while editing nable spell checking pattern to locate end of a sentence files where zg and zw store words language s to do spell checking for method s used to suggest spelling corrections new window from split is below the current on new window is put right of the current on commands move cursor to first non blank in line custom format for the status line suffixes that are ignored with multiple match suffixes added when searching for a file whether to use a swapfile for a buffer how to sync th
15. e associated with tag vim options q fname start editing in QuickFix mode display the first error Most useful Vim arguments for full list see startup options 9 start GUI also allows other options num put the cursor at line num default last line command execute command after loading the file pat file put the cursor at the first occurrence of pat v Vi mode start ex in Normal mode e Ex mode start vim in Ex mode R Read only mode implies n m modifications not allowed resets write option d diff mode diff b binary mode I lisp mode A Arabic mode arabic is set F Farsi mode fkmap and rightleft are set H Hebrew mode hkmap and rightleft are set 16 xpected d U y file num scriptin scriptout scriptout terminal device vimrc gvimrc viminfo help version Editing a file Without pwd sca path scd is ff ile f ile name files With file file Editing a file 17 Verbose give informative messages Compatible set the compatible option Nocompatible reset the compatible option give list of swap files recover aborted edit session do not create a swap file open num windows default one for each file GUI foreground process don t fork first read commands from the file scriptin write typed chars to file scriptout append write typed chars to fi
16. e of the cursor set to msg to see all error messages pattern to be used to find a macro definition delete combining characters on their own list of file names used for keyword completion use diff mode for the current window expression used to obtain a diff file options for using diff mode nable th ntering of digraphs in Insert mode list of directory names for the swap file list of flags for how to display text in which direction equalalways works toggle flags of substitute command encoding used internally write lt EOL gt for last line in file windows are automatically made the sam external program to use for command ring the bell for error messages name of the errorfile for the QuickFix mode description of the lines in the error file recognize function keys in Insert mode autocommand events that are ignored use spaces when lt Tab gt is inserted read vimre and exrc in the current directory file encoding for multi byte text automatically detected character encodings file format used for file I O automatically detected values for fileformat type of file used for autocommands characters to use for displaying special items Farsi keyboard mapping close a fold when the cursor leaves it width of the column used to indicate folds set to display all folds open expression used when foldmethod is expr ignore lines when foldmethod is indent close folds with a level higher than this foldlevel when starting to e
17. e swap file sets behavior when switching to another buffer maximum column to find syntax items syntax to be loaded for current buffer umber of spaces that lt Tab gt in file uses ustom format for the console tab pages line aximum number of tab pages for p and tab all se binary searching in tags files umber of significant characters for a tag ile names in tag file are relativ ist of file names used by the tag command push tags onto the tag stack name of the terminal terminal takes care of bi directionality character encoding used by the terminal shorten some messages obsolete use fileformats obsolete use fileformat maximum width of text that is being inserted list of thesaurus files for keyword completion tilde command behaves like an operator time out on mappings and key codes time out time in milliseconds let Vim set the title of the window percentage of columns used for window title old title restored when exiting string to use for the Vim window title ee ee ne eae OS ae Undo Redo commands 14 toolbar St GUI which items to show in the toolbar toolbariconsize tbis size of the toolbar icons for GTK 2 only ttimeout time out on mappings ttimeoutlen ttm time out time for key codes in milliseconds ttybuiltin Gb at use built in termcap before external termcap ttyfast GE indicates a fast termina
18. eeceeeeeceeeceeeeeeeeees 17 Deleting textens raai 5 Writing and quitting sseeseeeeeeeeseeeeserersressrsrrssrsens 18 Copying and moving text eeeeceesseeseeceeeceteeeeeeeeeees 6 Automatic Commands eeeecceeeeeceeeeeeeeeeeneeeeeeeneees 18 CHANGING tOXt veccisscececesscesssseccectcascceseieasiecreaccecesseisceveeays 6 Multi window command cescceseeeeeeeeeeeeeeeeaee 18 Complex Changes cccceccessceeeeeeeeeeeeeceaeceaeceaeeeeeeeees 7 Buffer list command cecceesceeeeceeeceeeeeeeeeeeeeeneeeaee 19 Vistial MOE siccescciscceviiestceseacscceseeceesesdeeiecevabccdecsoudennteaeie 7 Syntax Highlighting cece eeeescesseeeeceeceeeeeeeeees 19 Text objects only in Visual mode or after an operator 7 GUI Command S siise 20 Repeating COMMANAS ceeceeeceeeceeeeeeeeceeeeeeeeeeeeees 7 Folding sicecissieussercceaiecccceraasidesttaaseteseessdesvdssheenasntee vies 20 Left right motions N h left also CTRL H lt BS gt or lt Left gt key N 1 right also lt Space gt or lt Right gt key 0 to first character in the line also lt Home gt key to first non blank character in the line N to the last character in the line N 1 lines lower also lt End gt key gO to first character in screen line differs from 0 when lines wrap ge to first non blank character in screen line differs from when lines wrap N g to last character in screen line differs from when lines wrap gm to middle of
19. ers included in file names and pathnames characters included in identifiers characters included in keywords printable characters two spaces after a period with a join command encryption key name of a keyboard mapping enable starting stopping selection with keys program to use for the K command alphabetic characters for other language mode language to be used for the menus tells when last window has status lines don t redraw while executing macros wrap long lines at a blank number of lines in the display number of pixel lines to use between characters automatic indenting for Lisp words that change how lisp indenting works show lt Tab gt and lt EOL gt characters for displaying in list mode load plugin scripts when starting up Mac GUI use ATSUI text drawing changes special characters in search patterns name of the errorfile for make program to use for the make command pairs of characters that can match tenths of a second to show matching paren maximum nr of combining characters displayed maximum recursive depth for user functions maximum recursive depth for mapping maximum memory in Kbyte used for one buffer maximum memory in Kbyte used for pattern search Beg mMQQQDAAEA C HHHHUH maxmemtot enuitems mkspellmem modeline modelines modifiable modified more mouse mousefocus mousehide mousemodel mouseshape mousetime mzquantum nrform
20. he status line custom format for the ruler list of directories used for runtime files lines to scroll with CTRL U and CTRL D scroll in window as other windows scroll minimum number of lines to scroll minimum nr of lines above and below cursor how scrollbind should behave nroff macros that separate sections secure mode for reading vimre in current dir what type of selection to use when to use Select mode instead of Visual mode options for mksession name of shell to use for external commands shellcmdflag shellpipe shellquote shellredir shellslash shelltemp shelltype shellxquote shiftround shiftwidth shortmess shortname showbreak showcmd showfulltag showmatch showmode showtabline sidescroll sidescrolloff smartcase smartindent smarttab softtabstop spell spellcapcheck spellfile spelllang spellsuggest splitbelow splitright startofline statusline suffixes suffixesadd swapfile swapsync switchbuf synmaxcol syntax tabstop tabline tabpagemax tagbsearch taglength tagrelative tags tagstack term termbidi termencoding terse textauto textmode textwidth thesaurus tildeop timeout timeoutlen title titlelen titleold titlestring tbidi Options 13 flag to shell to execute one command string to put output of make in error fil
21. his rhs unm ap lhs Remove the mapping of lhs for Normal and Visual mode unm ap lhs Remove the mapping of lhs for Insert and Command line mode ma p lhs List mappings starting with lhs for Normal and Visual mode ma p lhs List mappings starting with lhs for Insert and Command line mode c un nore map like un nore map but for Command line mode only ifun nore map like un nore map but for Insert mode only n un nore map like un nore map but for Normal mode only v un nore map like un nore map but for Visual mode only o un nore map like un nore map but only when operator is pending mapc lear remove mappings for Normal and Visual mode mapc lear remove mappings for Insert and Cmdline mode imapc lear remove mappings for Insert mode vmapc lear remove mappings for Visual mode omapc lear remove mappings for Operator pending mode nmapc lear remove mappings for Normal mode cmapc lear remove mappings for Cmdline mode mk exrc file write current mappings abbreviations and settings to file default exrc use to overwrite mkv imrc file same as mkexrc but with default vimrc mksfession file like mkvimrc but store current files windows etc too to be able to continue this session later Abbreviations ab breviate lhs rhs add abbreviation for lhs to rhs b breviate lhs show abbr s that start with lhs ab breviate show all abbreviations
22. ickfix list read errors from text in a buffer read errors from an expression quit without writing and return error code to the compiler start make read errors and jump to first error execute grepprg to find matches and jump to the first one Various commands CTRL L Clear and redraw the screen CTRL G show current file name with path and cursor position ga show ascii value of character under cursor in decimal hex and octal g8 for utf 8 encoding show byte sequence for character under cursor in hex g CTRL G show cursor column line and character position CTRL C during searches Interrupt the search CTRL Break MS DOS during searches Interrupt the search lt Del gt while entering a count delete last character ve rsion show version information mode N MS DOS set screen mode to N number C80 C4350 etc norm al commands Execute Normal mode commands Q switch to Ex mode redir gt file redirect messages to file silent command execute command silently confirm command quit write etc asking about unsaved changes or read only files browse command open read write file using a file selection dialog Command line editing lt Esc gt CTRL V char CTRL V number abandon command line if wildchar is lt Esc gt type it twice insert char literally enter decimal value of character up to three digits CTRL K char1 char2 enter digraph
23. ile no backup for files that match these patterns delay in mS before a balloon may pop up switch on balloon evaluation expression to show in balloon read write edit file in binary mode MS DOS use bios calls for input characters prepend a Byte Order Mark to the file characters that may cause a line break which directory to start browsing in what to do when buffer is no longer in window whether the buffer shows up in the buffer list special type of buffer specifies how case of letters is changed list of directories searched with cd key used to open the command line window expression for character encoding conversion do C program indenting keys that trigger indent when cindent is set how to do indenting when cindent is set words where si t and cin add an indent use the clipboard as the unnamed register number of lines to use for the command line height of the command line window number of columns in the display patterns that can start a comment line template for comments used for fold marker behave Vi compatible as much as possible specify how Insert mode completion works function to be used for Insert mode completion options for Insert mode completion ask what to do about unsaved read only files get keys directly from console MS DOS only copyindent cpoptions cscopepathcomp cscopeprg cscopequickfix cscopetag cscopetagorder cscopeverbose cursorcolumn cursorline debug define
24. l connection ttymouse ttym type of mouse codes generated ttyscroll Negi maximum number of lines for a scroll ttytype Cty alias for term undolevels rup maximum number of changes that can be undone updatecount sues after this many characters flush swap file updatetime ut after this many milliseconds flush swap file verbose vbs give informative messages verbosefile vfile file to write messages in viewdir vdir directory where to store files with mkview viewoptions vop specifies what to save for mkview viminfo pice use viminfo file upon startup and exiting virtualedit ve when to use virtual editing visualbell vb use visual bell instead of beeping warn warn for shell command when buffer was changed weirdinvert wi for terminals that have weird inversion method whichwrap ww allow specified keys to cross line boundaries wildchar we command line character for wildcard expansion wildcharm wcm like wildchar but also works when mapped wildignore wig files matching these patterns are not completed wildmenu wmnu use menu for command line completion wildmode wim mode for wildchar command line expansion wildoptions wop specifies how command line completion is done winaltkeys wak when the windows system handles ALT keys winheight wh minimum number of lines for the current window winfixheight wfh keep window height when opening closing windows winfixwidth wfw
25. lding folding by indent folding by foldexpr folding by syntax regions folding by foldmarkers operator Define a fold manually define a fold for range lines delete one fold under the cursor delete all folds under the cursor open one fold under the cursor open all folds under the cursor close one fold under the cursor close all folds under the cursor fold more decrease foldlevel close all folds make foldlevel zero reduce folding increase foldlevel open all folds make foldlevel max fold none reset foldenable fold normal set foldenable invert foldenable 20
26. le scriptout overwrite set terminal name Amiga open device to be used as a console read inits from vimrc instead of other inits idem for when starting the GUI read info from viminfo instead of other files end of options other arguments are file names show list of arguments and exit show version info and exit Read file from stdin Fail if changes has been made to the current buffer Discard any changes to the current buffer Edit file Reload the current file Edit a new unnamed buffer Find file in path and edit it Edit alternate file N equivalent to e N Edit the file whose name is under the cursor Print the current directory name Change the current directory to path Back to previous current directory Print the current file name and the cursor position Set the current file name to name Show alternate file names Using the argument list ar gs sall or sall wnfext wnfext file wN fext file sargu ment N n ext n ext N ext fir st la st arglist Print the argument list with the current file in Open a window for every file in the arg list Write file and edit next file Write to file and edit next file overwrite existing file Write file and edit previous file unless file exists With in current window in new window sar gument N Edit file N sn ext Edit next file sn ext arglis
27. n front of all th same text after all th selected lines selected lines Insert mode keys Insert mode keys Leaving Insert mode lt Esc gt end Insert mode back to Normal mode CTRL C like lt Esc gt but do not use an abbreviation CTRL O command execute command and return to Insert mode Moving around cursor keys move cursor left right up down shift left right one word left right shift up down one screenful backward forward lt End gt cursor after last character in the line lt Home gt cursor to first character in the line Special keys in Insert mode CTRL V char insert character literally or enter decimal byte value lt NL gt or lt CR gt or CTRL M or CTRL J begin new lin CTRL E insert the character from below the cursor CTRL Y insert the character from above the cursor CTRL A insert previously inserted text CTRL insert previously inserted text and stop Insert mode CTRL R 0 9a zS insert the contents of a register CTRL N insert next match of identifier before the cursor CTRL P insert previous match of identifier before the cursor CTRLSX aces complete the word before the cursor in various ways lt BS gt or CTRL H delete the character before the cursor lt Del gt delete the character under the cursor CTRL W delete word before the cursor CTRL U delete all entered characters in the current line CTRL T insert one shiftwidth of inden
28. ng atom Na matches 0 or 1 of the preceding atom matches 2 to 5 of the preceding atom 2 5 2 5 separates two alternatives group a pattern into an atom offset Offsets allowed after search command num num lines downwards in column 1 num num lines downwards in column 1 num num lines upwards in column 1 e num num characters to the right of the end of the match e num num characters to the left of the end of the match s num num characters to the right of the start of the match s num num characters to the left of the start of the match b num num identical to s num above mnemonic begin b num num identical to s num above mnemonic begin search command execute search command next Marks and motions m a zA Z mark current position with mark a zA Z a z go to mark a z within current file A Z go to mark A Z in any file 0 9 go to the position where Vim was previously exited y go to the position before the last jump SAN go to the position when last editing this file I go to the start of the previously operated or put text gt a go to the end of the previously operated or put text an go to the start of the previous Visual area ae go to the end of the previous Visual area an go to the position of the last change in this file a zA Z0 9 lt gt same as marks print the active marks N CTRL O go to Nth older position in jump list N CTRL I
29. ommand N gk up N screen lines differs from k when line wraps N gj down N screen lines differs from j when line wraps Text object motions w N words forward N blank separated WORD s forward forward to the end of the Nth word forward to the end of the Nth blank separated WORD N words backward N blank separated WORD s backward backward to the end of the Nth word backward to the end of the Nth blank separated WORD i D m a A A AnA A A QQawothoas sentences forward sentences backward paragraphs forward paragraphs backward sections forward at start of section sections backward at start of section sections forward at end of section sections backward at end of section times back to unclosed times back to unclosed times back to start of method for Java times back to end of method for Java times forward to unclosed times forward to unclosed times forward to start of method for Java times forward to end of method for Java times back to unclosed if or else times forward to unclosed else or endif times back to start of comment times forward to end of comment 444 pyre eRe oe Se ee TA A A Nae ae A A a a Ne A A ee A AnA A AA A A A AA A A AA AA A A A Pattern searches N pattern offset lt CR gt search forward for the Nth occurrence of pattern N pattern offset lt CR gt search backward f
30. or the Nth occurrence of pattern N lt CR gt repeat last search in the forward direction N lt CR gt repeat last search in the backward direction N oon repeat last search N N repeat last search in opposite direction N 5 search forward for the identifier under the cursor N search backward for the identifier under the cursor N g like but also find partial matches N g like but also find partial matches gd goto local declaration of identifier under the cursor gD goto global declaration of identifier under the cursor Special characters in search patterns meaning magic nomagic matches any single character x matches start of line 5 5 matches lt EOL gt S S matches start of word lt lt matches end of word gt gt matches a single char from the range a z a z matches a single char not in the range atzi pras z matches an identifier char i i Marks and motions idem but excluding digits I 2 matches a keyword character k k idem but excluding digits K K matches a file name character f f idem but excluding digits F F matches a printable character p p idem but excluding digits P P matches a white space character s s matches a non white space character s s matches lt Esc gt e e matches lt Tab gt NE t matches lt CR gt YE XE matches lt BS gt b b matches 0 or more of the preceding atom x Xe matches 1 or more of the precedi
31. ry at startup save when exiting rv iminfo file Read info from viminfo file file v iminfo file idem overwrit xisting info v iminfo file Add info to viminfo file file v iminfo file Write info to viminfo file file Automatic option setting when editing a file vim set arg In the first and last lines of the file see ml option set arg is given as an argument to set Automatic execution of commands on certain events au List all autocommands sau event List all autocommands for event sau event pat List all autocommands for event with pat sau event pat cmd Enter new autocommands for event with pat zau Remove all autocommands sau event Remove all autocommands for event sau pat Remove all autocommands for pat sau event pat Remove all autocommands for event with pat sau event pat cmd Remove all autocommands for event with pat and enter new on Multi window commands CTRL W s or split Split window into two parts split file Split window and edit file in one of them vsplit file Same but split vertically vertical cmd Make cmd split vertically 2S CT CT CT CT CT CT CT DO D th CT CT CT CT CT CT CT Daw aw CT CF CT D CT CT CL CT Dw D on Q 85 w H Q Eont S Ab Buffer list commands 19 file Split window find file in path and edit it
32. s through equalprg visual filter the highlighted lines through equalprg range s ubstitute pattern string g c substitute pattern by string in range lines with g replace all occurrences of pattern with c confirm each replacement range s ubstitute g c repeat previous s with new range and options amp Repeat previous s on current line without options range ret ab tabstop set tabstop to new value and adjust white space accordingly Visual mode v start highlighting characters move cursor and use V start highlighting linewise operator to affect CTRL V start highlighting blockwise highlighted text o exchange cursor position with start of highlighting gv start highlighting on previous visual area v highlight characters or stop highlighting V highlight linewise or stop highlighting CTRL V highlight blockwise or stop highlighting Text objects only in Visual mode or after an operator N aw Select a word N iw Select inner word N aw Select a WORD N iW Select inner WORD N as Select a sentence N is Select inner sentence N ap Select a paragraph N ip Select inner paragraph N ab Select a block from to N ib Select inner block from to N aB Select a Block from to N iB Select inner Block from to N a gt Select a lt gt block N i gt Select inner lt gt blo
33. t define new arg list and edit first file sN ext Edit previous file sfir st Edit first file sla st Edit last file Writing and quitting 18 Writing and quitting range w rite Write to the current file inaneadatn tes file Write to file unless it already exists range w rite file Write to file Overwrite an existing file range w rite gt gt Append to the current file range w rite gt gt file Append to file range w rite cmd Execute cmd with range lines as standard input range up date write to current file if modified altr E write all changed buffers zqlu it Quit current buffer unless changes have been made Exit Vim when there are no other non help buffers q uit Quit current buffer always discard any changes Exit Vim when there are no other non help buffers gqa 1l Exit Vim unless changes have been mad ga ll Exit Vim always discard any changes Ccq Quit without writing and return error code wq Write the current file and exit wq file Write to file and exit x it file Like wq but write only when changes have been mad ZZ Same as x ZQ Same as q a ll or wqall Write all changed buffers and exit tflop EE Suspend VIM or start new shell If aw option is set and not given write the buffer CTRL Z Same as stop Automatic Commands Read registers marks histo
34. t in front of the current line CTRL D delete one shiftwidth of indent in front of the current line 0 CTRL D delete all indent in the current line CTRL D delete all indent in the current line restore indent in next line Digraphs dig raphs show current list of digraphs dig raphs charl char2 number add digraph s to the list In Insert or Command line mode CTRL K charl char2 enter digraph charl lt BS gt char2 enter digraph if digraph option set Special inserts r file insert the contents of file below the cursor r command insert the standard output of command below the cursor Deleting text N x delete N characters under and after the cursor N lt Del gt delete N characters under and after the cursor N X delete N characters before the cursor N d motion delete the text that is moved over with motion visual d delete the highlighted text N dd delete N lines N D delete to the end of the line and N 1 more lines Copying and moving text N J join N 1 lines delete lt EOL gt s visual J join the highlighted lines N gJ like J but without inserting spaces visual gJ like visual J but without inserting spaces range d x delete range lines into register x Copying and moving text char use register char for the next delete yank or put reg show the contents of all registers reg arg show the contents of regis
35. ted text lowercase visual U make highlighted text uppercase g motion switch case for the text that is moved over with motion gu motion make the text that is moved over with motion lowercase gU motion make the text that is moved over with motion uppercase visual g perform rot13 encoding on highlighted text g motion perform rot13 encoding on the text that is moved over with motion N CTRL A add N to the number at or after the cursor N CTRL X subtract N from the number at or after the cursor N lt motion move the lines that are moved over with motion one shiftwidth left N lt lt move N lines one shiftwidth left N gt motion move the lines that are moved over with motion one shiftwidth right N gt gt move N lines one shiftwidth right N gq motion format the lines that are moved over with motion to textwidth length range ce nter width center the lines in range range le ft indent left align the lines in range with indent range ri ght width right align the lines in range Complex changes Complex changes N motion command lt CR gt filter the lines that are moved over through command N command lt CR gt filter N lines through command visual command lt CR gt filter the highlighted lines through command range command lt CR gt filter range lines through command N motion filter the lines that are moved over through equalprg N filter N line
36. ters mentioned in arg N y motion yank the text moved over with motion into a register visual y yank the highlighted text into a register N yy yank N lines into a register N Y yank N lines into a register N p put a register after the cursor position N times N P put a register before the cursor position N times N Jp like p but adjust indent to current line N p like P but adjust indent to current line N gp like p but leave cursor after the new text N gP like P but leave cursor after the new text Changing text N r char replace N characters with char N gr char replace N characters without affecting layout N R nter Replace mode repeat th ntered text N times N gR enter virtual Replace mode Like Replace mode but without affecting layout visual r char in Visual block mode Replace each char of the selected text with char Note change means to delete text and enter Insert mode N c motion change the text that is moved over with motion visual c change the highlighted text N cc change N lines N S change N lines N Cc change to the end of the line and N 1 more lines N s change N characters visual c in Visual block mode Change each line with entered text visual C in Visual block mode Change each line until end of line with entered text N switch case for N characters and advance cursor visual switch case for highlighted text visual u make highligh
37. the screen lin N to column N default 1 N f char to the Nth occurrence of char to the right N F char to the Nth occurrence of char to the left N t char till before the Nth occurrence of char to the right N T char till before the Nth occurrence of char to the left N repeat the last f F t or T N times N repeat the last f F t or T N times in opposite direction Up down motions N k up N lines also CTRL P and lt Up gt N j down N lines also CTRL J CTRL N lt NL gt and lt Down gt N up N lines on the first non blank character N down N lines on the first non blank character also CTRL M and lt CR gt N _ down N 1 lines on the first non blank character N G goto line N default last line on the first non blank character N gg goto line N default first line on the first non blank character The Vim user manual and reference manual are Copyright c 1988 2003 by Bram Moolenaar This material may be distributed only subject to the terms and conditions set forth in the Open Publication License v1 0 or later The latest version is presently available at http www opencontent org openpub This document was prepared from http vimdoc sourceforge net htmldoc quickref html with typesetting and minor modifications by Alexander J Quinn July 11 2010 8 44 PM Text object motions N 3 goto line N percentage down in the file N must be given otherwise it is the c
38. tire file equal to lt gt visual area ice position of mark t pattern the next line where pattern matches pattern the previous line where pattern matches num add num to the preceding line number default 1 num subtract num from the preceding line number default 1 Special Ex characters separates two commands not for global and begins comment current file name only where a file name is expected num alternate file name num only where a file name is expected ole Note The next five are typed literally these are not special keys lt cword gt word under the cursor only where a file name is expected lt cWORD gt WORD under the cursor only where a file name is expected s WORD lt cfile gt file name under the cursor only where a file name is expected lt afile gt file name for autocommand only where a file name is expected lt sfile gt file name of a source d file within that file where a file nam After S lt cfile gt lt sfile gt or lt afile gt P full path cH head file name removed Paes tail file name only KE root extension removed e extension s pat repl substitute pat with repl Starting VIM vim options start editing with an empty buffer vim options file start editing one or more files vim options read file from stdin vim options t tag edit the fil
39. uble click the interval between polls for MzScheme threads number formats recognized for CTRL A command print the line number in front of each line number of columns used for the line number function for filetype specific completion allow reading writing devices on MS Windows function to be called for g operator operating system specific filetype information nroff macros that separate paragraphs allow pasting text key code that causes paste to toggle expression used to patch a file keep the oldest version of a file list of directories searched with gf et al preserve the indent structure when reindenting height of the preview window identifies the preview window name of the printer to be used for hardcopy encoding to be used for printing expression used to print PostScript for hardcopy name of the font to be used for hardcopy format of the header used for hardcopy CJK character set to be used for hardcopy font names to be used for CJK output of hardcopy controls the format of hardcopy output maximum height of the popup menu escape characters used in a string disallow writing the buffer timeout for hlsearch and match highlighting allow mappings to work recursively threshold for reporting nr of lines changed Win32 restore screen when exiting inserting characters will work backwards window is right to left oriented commands for which editing works right to left show cursor line and column in t
40. una bbreviate lhs remove abbreviation for lhs norea bbrev lhs rhs like ab but don t remap rhs iab iunab inoreab like ab but only for Insert mode cab cunab cnoreab like ab but only for Command line mode abc lear remove all abbreviations cabc lear remove all abbr s for Cmdline mode labc lear remove all abbr s for Insert mode Options se t Show all modified options se t all Show all non termcap options se t termcap Show all termcap options se t option Set boolean option switch on show string or number option se t no option Reset boolean option switch it off se t inv option invert boolean option se t option value Set string number option to value se t option value append value to string option add value to number option Se Se Se t option value t setl ocal setg lobal fix del opt ions Options subtract value from number option t option amp Short explanation of each option aleph allowrevins al tkeymap ambiwidth an oooo ow w au tialias tochdir rabic rabicshape toindent toread towrite towriteall background backspace backup backupcopy backupdir backupext backupskip balloondelay ballooneval balloonexpr binary bioskey bomb breakat browsedir bufhidden buflisted buftype casemap

Download Pdf Manuals

image

Related Search

Related Contents

取扱説明書(JWWA B126水道用補修弁)  C-Series User's Guide - Bottomline Technologies  PDFファイル - 医薬品医療機器総合機構  Whitening Lase Light Plus  Information management for MST cleanroom processes  User Manual - REACH Fashion Studio  HEIMS Online My University HEP Profile Submitter User Manual V1.0  Système de Sécurité Autonome Sans Fil  SC18IS600 SPI to I2C-bus interface  取扱説明書  

Copyright © All rights reserved.
Failed to retrieve file