## Slide: Movement in Normal Mode
## Use the line below to explore movements in Vi.
 This \is really a user-friendly "application" for the bioinformatician's toolbox. No?

## Slide: Marking your position (1)
>fake_sequence
KMNDTREEGGGHSDWQPMMTSTS
VDFEFCVFEPWNATEMSSSQCET
TERALDVILIVESSATRQEVVVD

## Slide: Edits in Normal Mode (1) 
## Delete the characters "n unexpected" in the sentence below.  
## Hint: after appropriate placement of the cursor this can be accomplished with
##       two keystrokes 
This is an unexpected surprise!

## Slide: Edits in Normal Mode (2)
## Delete the second, third, fourth lines below:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor 
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis 
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu 
fugiat nulla pariatur.

## Delete from the comma to the end of the line in the line of text below first using "D"
## using "D".  Undo the deletion with "u" and then redo it with "d$".  Undo it again with 
## "u" and then redo it again with ctrl-"r"
Lorem ipsum dolor sit amet, consectetur adipiscing elit

## Slide: Edits in Normal Mode (3)
## Correct the spelling mistake in "really" with the key combination "ra".  Similarly,
## change the first period to a semicolon.  Make the "I" in "It" lowercase with "~".
## In overstrike mode, change "some" to "much".  Return to Normal mode with <esc>,
## and then delete the final "t" in "thought" using "x"
Vi is reely powerful. It does take some practice thought. 

## Slide: Moving and copying text and repeating commands
## In the sentence below, with your cursor on the "t" of "that" type "d5l" to delete
## 5 characters.  Move your cursor to the "t of "this" and type "P" to put the deleted
## text.  Perform similar operations to move "this" to where "that" used to be positioned. 
Put that here, and put this there.

## Slide: Moving and copying text and repeating commands
## Use delete and put commands to convert "I like Vi very much" to 
## "I very very very much like Vi"
I like Vi very much

## Slide: Moving and copying text and repeating commands
## Use yank, put and "~" to convert "TGCGCGCT" to "tgcgcgcgcgcgct"
TGCGCGCT

## Slide: Moving and copying text and repeating commands
## Convert "TTTTT" below to "TGCTGCTGCTGCT" by 
## inserting “GC” once and then repeating the buffered command with "."
TTTTT

## Slide: Moving and copying text and repeating commands
## Delete the first occurrence of C. elegans sequence with a deletion 
## command and then “repeat” this command for the second occurrence.

H. sapiens     TAGCT 
C. elegans     TAGCT
C. lupus       TAGCT

H. sapiens     TACCT 
C. elegans     AAGCT
C. lupus       TAGGG

## Slide: Joining lines
## Combine the following 4 lines into a single line with two keystrokes.  
## In Normal Mode, with your cursor anywhere in the first line, type "4J"
AGTCG GTCTT
CCCCT TTAGC
TTCCA TCCAT
GACTA TACGT

## Slide: Searches and Regular Expressions
AGTACACTGGTTATAGTACTATA
TCGCCTTTCCCCGTCCGTCGGGTG

## Slide: Visual selections and acting on blocks of text
aaa bbb ddd ccc eee

## Slide: Visual selections and acting on blocks of text (7)
set mouse=a
noremap <M-LeftMouse> <4-LeftMouse> 
inoremap <M-LeftMouse> <4-LeftMouse> 
onoremap <M-LeftMouse> <C-C><4-LeftMouse> 
noremap <M-LeftDrag> <LeftDrag> 
inoremap <M-LeftDrag> <LeftDrag> 
onoremap <M-LeftDrag> <C-C><LeftDrag>


