User Tools

Site Tools


journal:spring2019:jsamson3:week5

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
journal:spring2019:jsamson3:week5 [2019/02/26 21:41]
jsamson3 February 26, 2019
journal:spring2019:jsamson3:week5 [2019/02/26 22:16] (current)
jsamson3
Line 17: Line 17:
 //vi > __{FileName}__//​ -This opens the word editor, assigns the file a name, however saves it. //vi > __{FileName}__//​ -This opens the word editor, assigns the file a name, however saves it.
  
-====Before one can jump into **Vi**, one must know about its two modes:====+**PLEASE NOTE!!!** When you open Vi, you'll see ~, this means nothing is there :-D 
 + 
 +====Before one can jump into Vi, one must know about its two modes:====
  
 1.) Command Mode (which you can use the commands listed below in) 1.) Command Mode (which you can use the commands listed below in)
Line 24: Line 26:
 2.) Insert Mode (this is where you are allowed to input any text you want) 2.) Insert Mode (this is where you are allowed to input any text you want)
  
 +====COMMANDS!====
 +
 +//Note: Commands on Vi are basically keys or sequence of keys on the keyboard.//
 +
 +**i** - enters insert mode from command mode before the cursor location.
 +
 +**I** - enters insert mode from command mode at the beginning of the current line where the cursor is.
 +
 +**h** - moves the cursor left a character.
 +
 +**l** - moves the cursor left a character.
 +
 +**j** - moves the cursor down a line.
 +
 +**k** - moves the cursor up a line.
 +
 +**a** - enters insert mode from command mode after the cursor location (To the right).
 +
 +**A** - enters insert mode from command mode at the end of the current line where the cursor is.
 +
 +**o** - enters insert mode and creates a new line below where the cursor is currently located.
 +
 +**O** - enters insert mode and creates a new line above where the cursor is currently located.
 +
 +**__{INSERTNUMBER}__h** - goes {number} of characters to the left.
 +
 +**__{INSERTNUMBER}__l** - goes {number} of characters to the right.
 +
 +**w** - moves cursor to the start of each word to the right, but treats [-,/,​__SPACE__] as spaces between words.
 +
 +**W** - moves cursor to the start of each word to the right, but only treats spaces between words.
 +
 +**b** - moves cursor to the start of each word to the left, but treats [-,/,​__SPACE__] as spaces between words.
 +
 +**B** - moves cursor to the start of each word to the left, but only treats spaces between words.
 +
 +**yy** - copies current line. (NOTE IT CAN BE CHARACTER SPECIFIC TOO, JUST ADD A NUMBER BEFORE THE yy AND IT WILL COPY THAT NUMBER OF CHARACTERS.)
 +
 +**p** - this will paste anything copied under the current cursor location.
 +
 +**P** - this will paste anything copied above the current cursor location.
 +
 +**~** - this will change capital letters to lower case letters, and the other way around too! [hEllo -> HeLLO]
 +
 +**c** - this will enter insert mode, however will erase the current line the cursor is on.
 +
 +** " ** - can set a variable.
 +
 +** > ** - Acts like the //TAB// key.
 +
 +**<** - Acts as the opp. of the //TAB// key.
 +
 +**:w** - SAVES THE CURRENT FILE!!!
 +
 +**:wq** - SAVES AND EXITS CURRENT FILE!!!
journal/spring2019/jsamson3/week5.txt · Last modified: 2019/02/26 22:16 by jsamson3