Vim Croquet
drbunsen.org
drbunsen.org
Probably some low-hanging fruit would be "any keystroke in Normal mode that's repeated." Eg, if I'm doing 'jjjj' to move down or even 'wwww' to hop from word to word, I could be searching or using a movement combo like '4j'.
Or, and this is a wild one, grab the mouse and click the point where you want the cursor, rather than giving some sort of treasure map to Vim: "Starting at the typedef, take 5 steps right, then 10 steps down, and 2 more steps right"
It numbers your current line as 0, and counts up and down from there. It makes it very easy to see that you need to delete the next 5 lines, or move up 10 lines without doing any math.
As for your mouse comment, I don't think you can compare the speed with which an experienced vim user gets their cursor where they want it to the catastrophic cache miss of removing your hand from the comfort of the home row, grabbing the mouse, moving it where you want, clicking it, and moving your hand back to the keyboard. The mere thought makes me shudder :)
haha, great prose.
+1 for relative line numbers. I scripted up ctr+n so I can toggle between relative and absolute as needed, though, there are even plugins capable of intelligently switching when necessary (like http://www.vim.org/scripts/script.php?script_id=4212).
http://jeffkreeftmeijer.com/2013/vims-new-hybrid-line-number...
However, I use the vim-powerline plugin which displays the current line number/total lines at the bottom which is enough for me.
My trackball is all of 4 inches from my right hand, and I always know where it is because it doesn't move around. Now, you can try and overplay the difficulty of grabbing the pointer ("I have to instruct my arm muscles to tense and pivot at both the elbow and shoulder while causing my fingers to curl into the appropriate shape" and so on) but I'd wager I could get the cursor to a given semi-distant point on a screen of code faster than even the most frantic of vim key-pounders.
However, even when editor keyboard commands become "muscle memory", there's still a little part of your brain that has to make a decision regarding how you're going to navigate/select/change/delete from point A to point B. With the mouse, you don't have to think up an algorithm for editing. You just think about the code at hand. I've found that the fraction-of-a-second decision making regarding _how_ to edit can be enough to interrupt my train of thought. Reading this article ( http://www.asktog.com/TOI/toi06KeyboardVMouse1.html ), while it may be quite old, helped me realize this fact.
That being said, I still think Vim is a great editor, and I don't mean to make any blanket statements about it's effectiveness. I just also believe that the obsession with "efficiency" is totally blown up with regards to editing text. Shouldn't we strive for efficiency in translating algorithmic thought to programming language? I think the keyboard crowd (myself included) tends to get caught up in the little details.
It works just like d, except it puts you in insert mode after you've completed your command.
For example, to replace the text within a set of quotation marks with You don't like Vim?, move your cursor on or within those quotation marks and use:
ci"You don't like Vim?<esc>
To replace the text up to (but not including) the next exclamation point with I would never drink orange juice, use: ct!I would never drink orange juice<esc>
EDIT: Gah. He explicitly mentioned his use of cib. I'll leave this here in case it helps anyone.(disclaimer: that probably isn't actual Haskell syntax.)
mapM_ (printf "The %s thing with Haskell is that it can be extremely compact\n")
["nice thing", "problem"]
This works. :)Alternatively, you could do this:
forM_ ["nice thing", "problem"] $
printf "The %s thing with Haskell is that it can be extremely compact\n"Python reads like pseudo-code where as Haskell reads like math. Both are readable, they are just different.
I suspect it's easier to teach someone Haskell if they have never done imperative programming before because they have a lot less hang ups.
Reading Haskell for me is like when I had to do math proofs in Real Analysis or Abstract Algebra - it takes a fair amount of time to get into the mode where I can understand what is written very concisely in front of me.
To me it seems that Haskell suffers from some of the same problem that mathematics does - it is very concise notation for someone already familiar with the concepts, and a lot faster to write if you are familiar, but reading requires unpacking all the meaning of the notation, so ultimately is far more time consuming unless you are already familiar with the concepts that are in the code.
At least Python programmers have a sense of humor.
His 3rd most used command is jj. This is popular among some vim users to be remapped as Esc in insert mode (:inoremap jj <Esc>).
I do not personally use this but when writing this comment, I quickly tested it out and it actually feels quite comfortable.
I re-map my caps lock as Escape. It works suprisingly well even outside of Vim.
`Mihere's some text^Cyyp$bimore ^C0~A.^C:w^M:q
[…]> The lexer correctly determined that I started in normal mode by navigating to a specific buffer using the `M mark, then typed here's some text in insert mode, then[…]
Visual line mode is often very convenient.
Also, kana's text-object-entire plugin may come in handy here (many of her text-object plugins are very useful).
:%yz :%y z gg"zyGhis end key is escape. on his keyboard i think it translates to being on a thumb