Skip to content

Commit

Permalink
Improved white belt. Fixed that autorun did not work for last questio…
Browse files Browse the repository at this point in the history
…n in a kata.
  • Loading branch information
chicagoduane committed May 27, 2010
1 parent 769bcaf commit 84d49ef
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 70 deletions.
14 changes: 2 additions & 12 deletions ftplugin/kata.vim
Expand Up @@ -64,18 +64,8 @@ endfunction


function! s:ThisPreparationLine() function! s:ThisPreparationLine()
call s:ThisQuestion() call s:ThisQuestion()
let prepline = search("^<", "nW") let prepline = search("^<", "nW", search("^(\\d\\+)", "nW"))
let nextqline = search("^(\\d\\+)", "nW") return prepline

if nextqline < 0
nextqline = search("$", "nW")
end

if prepline > 0 && prepline < nextqline
return prepline
else
return -1
endif
endfunction endfunction


function! s:ExecuteAnswer() function! s:ExecuteAnswer()
Expand Down
133 changes: 75 additions & 58 deletions vim_1_white.master
Expand Up @@ -43,130 +43,147 @@ Deliberate Practice




(3) Using 'h' and 'a' keys, insert the missing text in line 1 using line 2 as a guide (3) Using 'h' and 'a' keys, insert the missing text in line 1 using line 2 as a guide
Repttion s Wrtwhie Repttion s Wrtwhil
Repetition is Worthwhile Repetition is Worthwhile


< $ < $
> halhhhhahhhhaohhhhaihhhhhhaihhae > aehhhhhahhhhaohhhhaihhhhhhaihhae



(4) Follow the path from 'o' to 'x':
(4) Using 'A', append each parenthetical word to the end of its line: |--------x
(not) Seek not | |----------|
(the) to follow in the | | |------| |
(old;) footsteps of men of old; | | | |--| | |
(sought.) seek what they sought. | | | | | | |
| | |-| o | |
| | |-|
|-|

< /o:noh
> kkhhhjjhhkkkllllllljjjjllkkkkkhhhhhhhhhhhjjjjjjhhkkkkkkklllllllll

(5) Using 'A', append each parenthetical word to the end of its line:
(not) Seek
(the) to follow in
(old;) footsteps of men of
(sought.) seek what they
~ Matsu Basho ~ Matsu Basho


> A notjA thejA old;jA sought. > A notjA thejA old;jA sought.


(6) Using 'l' and 'i' keys, insert the missing text in line 1 using line 2 as a guide:
A atais Wort a Tousad Eis
A Kata is Worth a Thousand Edits


(5) Without moving the cursor, append 'ndigo' to the letter 'I': > lliKlllli llllllllihlllllihlllllinllllidllit
I will make the world beautiful.


> andigo (7) Using 'h' and 'i' keys, insert the missing text in line 1 using line 2 as a guide
Kep t Simle Smart
Keep It Simple Smarty


(6) Move to the beginning of each word in succession: < $
Excellence is our goal; deliberate practice is what we praise. > ithhhhhhhiphhhhhiIhhie
No life ever grows great until it is focused, dedicated and disciplined.


> wwwwwwwwwwww (8) Follow the words in alphabetical order (touch each FIRST letter):
Alpha Bravo Charlie Mike November
Echo Delta Lima Kilo
Foxtrot India Juliet
Golf Hotel


(7) Delete the following word: > wwjbjjwkwkbkw
disambiguation


> dw (9) Follow the words in alphabetical order (touch each FIRST letter):
Foxtrot, "Golf" Hotel... India
Echo Bravo? Alpha Juliet
Delta! Charlie Lima


(8) Remove the words that do not belong: < /Alpha:noh
Long trouble long ago, in a land wheel far far away... > BjBkkWWWjj


> wdwwwwwwwdw (10) Using 'e' and 'a', pluralize the following words:
> wdw6wdw Canadian Shark Deliver Wedding Discover


(9) Delete from the '|' to the end of the line: > easeaseaseaseas
The weakest of all |weak things is a virtue that has not been tested in the fire.
~ Mark Twain


> wwwwD (11) Using 'w' and 'i', prefix each word with 'pre':
> wwwwd$ history meditate view disposition pare
> 4wD
> f|D


(10) Move to the 'd' in the word 'word': > iprewiprewiprewiprewipre
I encourage you to move a word at a time.


> eeeeee (12) Delete the following capitalized words (including any connected punctuation):
> /word/e NO life EVER grows great UNTIL IT is FOCUSED, DEDICATED AND disciplined.
> 6e


(11) Move to the 3rd word and then back to the beginning of the line: > dwwdwwwdwdwwdWdwdw
Seek not to follow in the footsteps of men of old; seek what they sought.
~ Matsu Basho (13) Delete from the '|' to the end of the line:
The weakest of all |weak things is a virtue that has not been tested in the fire.
~ Mark Twain


> eee0 > 4wD
> 3e0


(12) Delete the first 4 words: (14) Delete the following capitalized words (including any connected punctuation):
Never interrupt your enemy when he is making a mistake. NEVER INTERRUPT YOUR ENEMY WHEN he is making a mistake.
~ Napoleon Bonaparte ~ Napoleon Bonaparte


> d4w > d5w
> 4dw


(13) Move to the 3rd word and then back one word, ending at the 'f' in force: (15) Delete the following capitalized words (including any connected punctuation):
Who overcomes by force, hath overcome but half his foe. Never interrupt your enemy WHEN HE IS MAKING A MISTAKE.
~ John Milton ~ Napoleon Bonaparte


> wwwwb > 4wD


(14) Move to the 2nd word and then delete the line: (16) Move to the 2nd word and then delete the line:
We are what we repeatedly do. Excellence then, is not an act, but a habit. We are what we repeatedly do. Excellence then, is not an act, but a habit.
~ Aristotle ~ Aristotle


> wdd > wdd
> w0D > w0D


(15) Delete both lines: (17) Delete both lines:
I fear not the man who has practiced 10,000 kicks once, I fear not the man who has practiced 10,000 kicks once,
but I fear the man who has practiced one kick 10,000 times. but I fear the man who has practiced one kick 10,000 times.
~ Bruce Lee ~ Bruce Lee


> d2d > d2d
> 2dd > 2dd


(16) Delete the UPPER CASE words: (18) Delete the UPPER CASE words:
Never AB CDEF interrupt your GHIJKL MNOP QRS enemy when he TUVWXYZ is making a mistake. Never AB CDEF interrupt your GHIJKL MNOP QRS enemy when he TUVWXYZ is making a mistake.
~ Napoleon Bonaparte ~ Napoleon Bonaparte


> w2dwww3dwwwwdw > w2dwww3dwwwwdw


(17) Delete every second word, then undo all changes to the line: (19) Delete every second word, then undo all changes to the line:
A warrior may choose pacifism; others are condemned to it. A warrior may choose pacifism; others are condemned to it.


> wdwwdwwwdwwdwwdwU > wdwwdwwwdwwdwwdwU
> wdww.W.w.w.U
> qqWdwq4@qU


(18) Delete the second word on each line, then undo both deletions: (20) Delete the second word on each line, then undo both deletions:
Begin at the beginning, the King said, gravely, Begin at the beginning, the King said, gravely,
and go on till you come to the end: then stop. and go on till you come to the end: then stop.
~ Lewis Caroll ~ Lewis Caroll


> wdwjbdwuu > wdwjbdwuu
> wdw0jwdw
> wdw0jw.



! KataRandom(movement-along-a-path) ! KataRandom(movement-along-a-path)


! KataRandom(move-and-delete) ! KataRandom(move-and-delete)




Who overcomes by force, hath overcome but half his foe.
~ John Milton

Seek not to follow in the footsteps of men of old; seek what they sought.
~ Matsu Basho

There are two rules for being successful in martial arts. There are two rules for being successful in martial arts.
Rule 1: Never tell others everything you know. Rule 1: Never tell others everything you know.


The end of one kata is the beginning of another. The end of one kata is the beginning of another.




Excellence is our goal; deliberate practice is what we praise.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 3.1: THE PUT COMMAND Lesson 3.1: THE PUT COMMAND


Expand Down
8 changes: 8 additions & 0 deletions vim_2_yellow.master
@@ -0,0 +1,8 @@

(1) Move the following line to the 'a' mark (mark has been created for you):
I am moved.

-- a --

< 2jma2k
> :m 'a

0 comments on commit 84d49ef

Please sign in to comment.