command | function |
---|---|
h | Move the cursor left |
l | Move the cursor right |
j | Move the cursor up |
k | Move the cursor down |
^ | Move the cursor to the start of the line |
$ | Move the cursor to the end of the line |
H | Move the cursor to the top of the screen |
L | Move the cursor to the bottom of the screen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"text/template" | |
"os" | |
"log" | |
"strings" | |
) | |
type Paragraph struct { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"text/template" | |
"os" | |
"log" | |
"time" | |
) | |
func main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"os" | |
"text/template" | |
) | |
type Employee struct { | |
FirstName string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"os" | |
"text/template" | |
) | |
type Person struct { | |
FirstName string |
command | function |
---|---|
a | Insert characters at the right of the cursor |
A | Insert characters at the end of the line |
i | Insert characters at the left of the cursor |
I | Insert character at the beginning of the line |
o | Insert a new line below the cursor |
O | Insert a new line above the cursor |
Command | function |
---|---|
X | Deletes the character before the cursor location |
x or dl | Deletes the character at the cursor location |
dw | Deletes the current word at the cursor location |
dd | Deletes the whole line at the cursor location |
d^ | Deletes from current cursor location to the beginning of the line |
d$ | Deletes from current cursor location to the end of the line |
Command | Function |
---|---|
yy | Copies the current line |
xyy | Copies current line and x number of lines below |
p | Pastes the copied text after the cursor |
P | Pastes the copied text before the cursor |