Busy. Please wait.

show password
Forgot Password?

Don't have an account?  Sign up 

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
We do not share your email address with others. It is only used to allow you to reset your password. For details read our Privacy Policy and Terms of Service.

Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
Don't know
remaining cards
To flip the current card, click it or press the Spacebar key.  To move the current card to one of the three colored boxes, click on the box.  You may also press the UP ARROW key to move the card to the "Know" box, the DOWN ARROW key to move the card to the "Don't know" box, or the RIGHT ARROW key to move the card to the Remaining box.  You may also click on the card displayed in any of the three boxes to bring that card back to the center.

Pass complete!

"Know" box contains:
Time elapsed:
restart all cards
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

Some Vi Commands

vi -r filename recover filename that was being edited when system crashed
:x quit vi, writing out modified file to file named in original invocation
:wq quit vi, writing out modified file to file named in original invocation
:q quit (or exit) vi
:q! quit vi even though latest changes have not been saved for this vi call
j move cursor up
k move cursor down
h move cursor left
l move cursor right
0 (zero) move cursor to start of current line (the one with the cursor)
$ move cursor to end of current line
w move cursor to beginning of next word
b move cursor back to beginning of preceding word
:0 move cursor to first line in file
:n move cursor to line n
:$ move cursor to last line in file
u undo what you just did
i insert text before cursor, until
I insert text at beginning of current line, until
a append text after cursor, until
A append text to end of current line, until
o open and put text in a new line below current line, until
O open and put text in a new line above current line, until
vi filename edit filename starting at line
r replace single character under cursor (no
R replace characters, starting with current cursor position, until
cw change the current word with new text, starting with the character under cursor, until
cNw change N words beginning with character under cursor, until
C change (replace) the characters in the current line, until
cc change (replace) the entire current line, stopping when
Ncc or cNc change (replace) the next N lines, starting with the current line, stopping when
x delete single character under cursor
Nx delete N characters, starting with character under cursor
dw delete the single word beginning with character under cursor
dNw delete N words beginning with character under cursor; e.g., d5w deletes 5 words
D delete the remainder of the line, starting with current cursor position
dd delete entire current line
Ndd or dNd delete N lines, beginning with the current line; e.g., 5dd deletes 5 lines
yy copy (yank, cut) the current line into the buffer
Nyy or yNy copy (yank, cut) the next N lines, including the current line, into the buffer
p put (paste) the line(s) in the buffer into the text after the current line
/string search forward for occurrence of string in text
?string search backward for occurrence of string in text
n move to next occurrence of search string
N move to next occurrence of search string in opposite direction
:.= returns line number of current line at bottom of screen
:= returns the total number of lines at bottom of screen
control-g provides the current line number, along with the total number of lines,in the file at the bottom of the screen
:r filename read file named filename and insert after current line (the line with cursor)
:w write current contents to file named in original vi call
:w newfile write current contents to a new file named newfile
:12,35w smallfile write the contents of the lines numbered 12 through 35 to a new file named smallfile
:w! prevfile write current contents over a pre-existing file named prevfile
Created by: ruprecht10