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:
- Box Selection – press any combination of Ctrl+Shift+Alt+DownArrow, Ctrl+Shift+Alt+RightArrow, Ctrl+Shift+Alt+UpArrow, Ctrl+Shift+Alt+LeftArrow to select a block of text. You can also press
Shift+Altwhile selecting text with the mouse or drag-select using the middle mouse button. - 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.
- Create cursors on all occurrences of a string – select one instance of a string e.g.
background-colorand 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 |