0% found this document useful (1 vote)
947 views1 page

Learn Enough Text Editor To Be Dangerous

This document provides an introduction to using the Vim text editor and introduces some basic and advanced text editing techniques for modern text editors. It outlines commands for navigating and editing text in Vim including entering/exiting insert mode, moving the cursor, deleting/pasting text, and saving files. It also summarizes common text editing shortcuts for modern text editors such as arrow keys, cut/copy/paste, commenting out text, and find/replace. Advanced topics covered include tab completion, indentation, and kill codes.

Uploaded by

C Fox
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
947 views1 page

Learn Enough Text Editor To Be Dangerous

This document provides an introduction to using the Vim text editor and introduces some basic and advanced text editing techniques for modern text editors. It outlines commands for navigating and editing text in Vim including entering/exiting insert mode, moving the cursor, deleting/pasting text, and saving files. It also summarizes common text editing shortcuts for modern text editors such as arrow keys, cut/copy/paste, commenting out text, and find/replace. Advanced topics covered include tab completion, indentation, and kill codes.

Uploaded by

C Fox
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

LEARN ENOUGH TEXT EDITOR TO BE DANGEROUS

===================================================

1 VIM
---------
vim / vim <filename> = launch vim inside shell
i = exit normal mode, enter insertion mode
ESC = exit insert mode, enter normal mode
arrow keys = move around lines
0 = move to end of line
$ = move to start of line
ESC = exit insert mode, enter normal mode
:q! = force-quit vim; without saving changes
:q = quit vim
:w = write file
:wq = write and quit vim
alias <com>='<fullcommand'> = write alias command inside file (.bash_profile)
:q = quit vim
:w = write file
:wq = write and quit vim
ESC+u = undo
source <filename> = tell the shell about the updated file (automatic in new shell
windows)
x = delete character in normal mode
dd = delete entire line in normal mode
<linenumber>dd = delete number of lines
p = paste deleted line back into file (with dd ; like cut and paste)
navigating vim (same as less) = G, 1G, ctrl+f, ctrl+b, /<keyword>, n, N

2 INTRODUCTION TO MODERN TEXT EDITORS


------------------------------------------
ARROW KEYS = MOVE AROUND FILE
CMD + ARROWS = TOP OF FILE, END OF FILE, START OF LINE, END OF LINE
CMD+SHIFT+LEFT/RIGHT ARROW = SELECT LINE
SHIFT + UP/DOWN ARROW = SELECT MULTIPLE LINES
SHIFT + LEFT/RIGHT ARROW = SELECT TEXT
CMD+A = SELECT ALL
CMD+Z/X/C/V = UNDO/CUT/COPY/PASTE
# JUMPCUT - CTRL+CMD+V/ARROW = scroll through copy history
OPTION+DELETE = delete one word at a time
CMD Z/Y = undo/redo
CMD+F = find , CMD+G = next match

3 ADVANCED TEXT EDITING


-------------------------
Tab Completion
CMD+/ = comment out selected text
TAB / SHIFT+TAB = indent/dedent (also CMD+[, CMD+])
CTRL+G = go to line number
kill codes = kill 15 2 1 9 (in order of harshness)
CMD+W = close tab
CMD+P = fuzzy opening
CMD+<tabnumber> = go to tab number
SHIFT+COMMAND+F = global find and replace

You might also like