30-04-2021



Vi mode – the mode vi starts in command mode – you can be in command mode from the vi mode by pressing the key colon (“:”) input mode – in this mode user starts the actual editing of the text Below are some of the most commonly used vi commands in all 3 modes of operation. Vim is installed by default on most Unix based operating systems, including Mac OS and most GNU/Linux distros. It therefore feature various commands that allows you to interact with the OS.:!pwd. Master your Mac with custom keyboard shortcuts - Popular Science. How to Enable Photoshop’s Old Undo Keyboard Shortcuts - How-To Geek. Google is working on user-customized keyboard shortcuts for Chrome UPDATED - Chrome Unboxed. How to open Microsoft Edge with a keyboard shortcut Windows 10 - MobiGyaan.

Vi is an one of two powerhouse text editors in the Unix world, the other being EMACS. While obtuse, vi is extremely powerful and efficient. There may be times when vi is the only text editor available, so it helps to at least know the basics.Vi Shortcuts Mac
On Mac OS X (and Linux), vi is symlinked to vim (vi improved), a more modern free software version. Vim It is the default editor when changing a crontab.
If you gave vi a whirl and don't see the beauty of it, give the nano editor a try. It also ships with Mac OS X.
note: a chunk of this small guide came from a web page I found long ago, but I don't remember where so I can't give proper credit. I've added and changed things from the original text.

Vi has two modes, command and insert (really, three if you count replace mode). Command mode is used to navigate, search, and issue other commands. Insert mode is used to enter text.

Vi starts in command mode.

You can precede most commands with a number indicating how many times to perform a command. For example, entering 99 followed by the down arrow will move the cursor down 99 lines. '99x' will delete 99 characters.

While in command mode (case sensitive)

Vi Shortcuts Mac Keyboard


  • move the cursor with arrow keys; if there aren't any arrow keys, use j,k,h,l
  • i - change to insert mode (before cursor)
  • a - change to insert mode (after cursor)
  • A - change to insert mode (at end of line)
  • r - replace one character
  • R - overwrite text
  • x - delete one character
  • dd - delete one line
  • yy - yank line (copy)
  • p - paste deleted or yanked text after cursor
  • P - paste deleted or yanked text before cursor
  • G - go to end of the file
  • 1G - go to top of the file
  • J - merge next line with this one
  • / - search, follow / with text to find
  • :wq - write file and quit
  • :q! - quit without saving
  • %s/old/new/g - substitute; replace 'old' with 'new' on all lines
  • :g/pattern/d - delete all lines that match the pattern
While in insert mode
  • ESC - change to command mode
  • any text typed is entered at the cursor
Typical vi session
  1. Type 'vi file.txt' at command prompt
  2. Move cursor to where new text will be added
  3. Type 'i' to change to insert mode
  4. Type new text
  5. Type ESC to go back to command mode
  6. type ':wq' and ENTER to write the file and quit
Vi Shortcuts MacTable of Contents
  • Keyboard Shortcuts
Mac

See also keyboard shortcuts for tools and Customizing Keyboard Shortcuts.

Keyboard and Mac/Win»

Vi Shortcuts Mac Os

Although we try to always mention both, it is possible that in some places references to the keyboard shortcuts refer to Mac keystrokes instead of giving both Mac and Windows versions.

Since Mac Cmd already maps to the Windows Ctrl, the Mac Ctrl shortcuts have no simple Windows equivalent; we map the Mac Ctrl shortcuts to Ctrl+Alt+Shift combination on Windows. As pressing 3 keys is uncomfortable, we try to avoid using the Mac Ctrl shortcut for this reason, but there are a few such shortcuts.

MacWin
ShiftShift
CmdCtrl
OptionAlt
CtrlCtrlAltShift

Vi Shortcuts Cheat Sheet

Menu items»

The table below lists Mac keyboard shortcuts. Please see Keyboard and Mac Win above for information on differences in shortcuts on macOS and Windows. For example, the Import > Artwork… command has CtrlD shortcut on Mac and CtrlAltShiftD on Windows.

MenuMac ShortcutDescription
ApplicationCmd,Preferences
CmdHHide FontLab VI
AltCmdHHide Others
CmdQQuit FontLab VI
FileCmdNNew Font…
CmdOOpen Fonts…
ShiftCmdOOpen > Font Folder…
AltShiftCmdOOpen > Installed Fonts…
CmdF12Revert > Font
CmdSSave Font…
ShiftCmdSSave Font As…
CmdEExport Font As
CtrlDImport > Artwork…
AltCtrlFFont Info…
CmdPPrint…
EditCmdZUndo
ShiftCmdZRedo
CmdXCut
CmdCCopy
AltCmdCCopy Layer
BackspaceDelete
CmdVPaste
CmdDDuplicate
CmdASelect All
CmdIInvert Selection
AltCmdVPaste Special…
ShiftCmdVPaste Element
AltCmdEEdit Across Glyphs
CmdFFind Glyphs…
CtrlFFind Outline…
CmdLList Related Glyphs…
Text]Next in Text
[Previous in Text
Ctrl]Next Line
Ctrl[Previous Line
CmdPage DownNext Phrase
CmdPage UpPrevious Previous
FontAltCmdGGenerate Glyphs…
AltCmdMUpdate Metrics
GlyphCmdRename Glyph…
ShiftCmdDDuplicate Glyph
Cmd]Next Glyph
Cmd[Previous Glyph
ShiftCmdNAdd Layer…
Alt.Next Layer
Alt,Previous Layer
ShiftCtrlA (AltIns)Add Component…
CtrlRAdd Anchor
ShiftCmdWAdd Power Guides
ShiftCmdECreate Overlaps
ElementCtrlSNew Element
CtrlIAdd Element Reference…
CtrlLLocked
CtrlEEdit Element
AltCmdUUnlink References
CtrlPPlace As Glyphs > Current Element…
ShiftCmd]Arrange > Bring to Front
AltCmd]Arrange > Bring Forward
ShiftCmd[Arrange > Send to Back
AltCmd[Arrange > Send Backward
CmdGGroup
ShiftCmdGUngroup
>Next Element
<Previous Element
CtrlCCombine Contours to Element
ShiftCmdAGlue Selection
ShiftCtrlBMake Power Brush
CtrlCmdUExpand Filters
CtrlNNew Pin
CtrlTNew Sticker
HPreview Rounding
ContourShiftCPower Nudge
AltCmdXX-Servant
AltCmdYY-Servant
ShiftCmd3To PS Curves
ShiftCmd2To TT Curves
ShiftCmdBUnlink Corners
ShiftCmdOMake Overlap
CmdBBreak
CmdJJoin
|Align
AltCmdLEdit Tunni Lines
AltCmdAAdd Smart Corner
AltCmdIReverse Contour
AltCmdBSimplify
AltCmdJNodes at Extremes
CmdF10Remove Overlap
ToolsCmdTFree Transform
WTransform > Flip Horizontal
ETransform > Flip Vertical
CtrlHEdit Mask
CmdMCopy Outline to Mask
CtrlAltHSwap Outline with Mask
CmdKClear Mask
ShiftCmdMCopy Outline to Global Mask
ShiftCmdKClear Global Mask
CtrlXAdd Horizontal Hint
CtrlYAdd Vertical Hint
F7Autohinting
ShiftF7Remove Hints
ShiftCmdF7TrueType Hinting
CtrlARewind > Record
CtrlVRewind > Rewind
CtrlBRewind > Fast Forward
ShiftCmdPCommands
ViewCmd+Zoom In
Cmd-Zoom Out
Cmd0Fit Content on Screen
Cmd9Fit Text on Screen
Cmd1Actual Text Size
Cmd2Zoom 50%
Cmd3Zoom 100%
Cmd6Zoom 200%
Cmd7Zoom 400%
Cmd5Zoom 1:1px
CmdRRulers
ShiftCmdUSuggest Nodes
Cmd;Glyph Guides
ShiftCmd;Font Guides
LTunni Lines
CtrlAltCCoordinates
ShiftCmdFFontAudit
Cmd'Grid
ShiftCmdHHints
CtrlAltNNodes
AltCmd'Snap > Outline
CmdF9Snap > Guides
ShiftCmdF9Snap > Font Guides
ShiftCmd'Snap > Grid
AltCmd;Lock > Glyph Guides
AltShiftCmd;Lock > Font Guides
ShiftCmdRElement Frame
ShiftSpaceTrue Fill
Apply Italic Angle
WindowAltShiftCmdMNew Metrics Tab
AltShiftCmdKNew Kerning Tab
AltCmdPPreview panel
AltCmdTTransform panel
Cmd`Next Window
ShiftCmd`Previous Window
AltTabNext Tab
AltShiftTabPrevious Tab
CmdWClose Tab/Window

Of all the shortcuts listed above, Nodes and Coordinates are Mac-only shortcuts, and cannot be translated to Windows.

See also keyboard shortcuts for tools.