Learn enough Text Editor 1, 2, 3

Install a VM on Windows

Use VIM:

vim starts vim
esc :q! return quits vim
i insert mode
esc escape to normal mode
:w returnto write file
esc u undo
x cut
dd cut line
p paste line
source sourcing user profiles to update terminal
/string finds string in file
commands to navigate similar to “less”

 

Modern Editors

Command Description
⌘← Move to beginning of line (stops on whitespace)
⌘→ Move to end of line
⌘↑ Move to beginning of file
⌘↓ Move to end of file
⇧-move Select text
⌘D Select current word
⌘A Select All (entire document)
⌘X/⌘C/⌘V Cut/Copy/Paste
⌘Z Undo
⇧⌘Z or ⌘Y Redo
⌘S Save
⌘F Find
⌘G Find next

 

Advanced Stuff

Multi-Cursor Editing

Using multiple cursors allows you to edit multiple parts of the document at once, greatly improving your productivity. Try the following actions in the code block below:

  1. Box Selection – press any combination of Ctrl+Shift+Alt+DownArrowCtrl+Shift+Alt+RightArrowCtrl+Shift+Alt+UpArrowCtrl+Shift+Alt+LeftArrow to select a block of text. You can also press Shift+Alt while selecting text with the mouse or drag-select using the middle mouse button.
  2. Add a cursor – press Ctrl+Alt+UpArrow to add a new cursor above, or Ctrl+Alt+DownArrow to add a new cursor below. You can also use your mouse with Alt+Click to add a cursor anywhere.
  3. Create cursors on all occurrences of a string – select one instance of a string e.g. background-color and press Ctrl+Shift+L. Now you can replace all instances by simply typing.

 

Emmet

Autocompletion for css and html, cheatsheet here

 

Advanced Shortcuts

Command Description
Select + ⌘/ Toggle commenting out
Select + ⇥ Indent
Select + ⇧⇥ Dedent
⌃G Goto line number
⌘W Close a tab
$ echo $PATH Show the current path
$ chmod +x <filename> Make filename executable
$ unzip <filename>.zip Unzip a ZIP archive
⌘P Fuzzy opening
⌘1 Switch focus to tab #1
⇧⌘F Global find and replace

Leave a comment

Design a site like this with WordPress.com
Get started