Live data from Hacker News

Vim Croquet

drbunsen.org

51–56 of 56 posts

Re: Vim Croquet

#51
post #23

Looking at the heat map, what does surprise me is how he never uses Escape or ^[. How does he managed to move out of Insert mode? My [ key is starting to wear out due to such heavy use..

> Looking at the heat map, what does surprise me is how he never uses Escape or ^[. How does he managed to move out of Insert mode?

His 3rd most used command is jj. This is popular among some vim users to be remapped as Esc in insert mode (:inoremap jj ).

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.

Re: Vim Croquet

#52

Awesome! I'd love to see something like this as a standalone project. "Vim Critic" or "Vim Coach" - something to say "these are the inefficient things you personally do." 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'.

Personally, the main reason I moved from vim to emacs is because I don't want to have to think about my editor, I want it to be pure muscle memory. I'm okay with hitting "jjjjk" to go 3 lines down rather than trying to guess that it's exactly 3 down and typing "3j". Emacs-style navigating/editing is great for this kind of error-tolerant navigation/editing. It leaves my brain mostly free to focus on whatever I'm actua…

I go with a hybrid approach: I hit the number row somewhere in the loose vicinity of the number of rows I want to move, and then hit "j" a couple times to get exactly there. If it's more than a single-digit number of rows away, I might do the first step more than once.

Re: Vim Croquet

#53
post #43
post #38

Earlier quoted context omitted.

A little tweak that got me in the habit of using things like 5j and 6dd: :set relativenumber. 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…

As someone who watches a lot of people use Vim, I think many would be better off with a little judicious mouse use. Yes, you very busily slam keys, but it seems to take a pretty damn long time and a lot of keystrokes to actually accomplish the monumentally complex task of shifting the cursor 30 lines down and 10 characters over. My trackball is all of 4 inches from my right hand, and I always know where it is because…

Yes, yes, yes. As someone who used to buy into keyboard fascism, I wholeheartedly agree with this. I consider myself proficient with Vim (and Emacs) in terms of keyboard controls, and know all of the fancy Vim motions and text objects.

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.

Re: Vim Croquet

#54

Earlier quoted context omitted.

The nice thing with Haskell is that it can be extremely compact. The problem with Haskell is that it can be extremely compact.

map (format "The %s thing with Haskell is that it can be extremely compact") ["nice thing", "problem"] (disclaimer: that probably isn't actual Haskell syntax.)

map (("The "++).(++" with Haskell is that it can be extremely compact")) ["nice thing", "problem"]

Re: Vim Croquet

#55

Earlier quoted context omitted.

The nice thing with Haskell is that it can be extremely compact. The problem with Haskell is that it can be extremely compact.

map (format "The %s thing with Haskell is that it can be extremely compact") ["nice thing", "problem"] (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"

Re: Vim Croquet

#56

Earlier quoted context omitted.

I think most experienced vim users will tell you that it is pure muscle memory for them. Also, vim supports jjjjk as well as 3j. Anyway, I just realized I am debating vim vs emacs so I'll stop here.

We all know the one true editor is the Chrome console anyway.

ewww
Post reply on HN