Vim Croquet
41–50 of 56 posts
Re: Vim Croquet
#42Awesome! 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…
Re: Vim Croquet
#43Earlier quoted context omitted.
I think it's better to repeatedly hit j rather than count "ah, 5 lines" and type 5j. Even better, you're already looking at where you want to go, it may be faster to hit / and start typing from that point to jump there. 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 ste…
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…
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.
Re: Vim Croquet
#44Earlier quoted context omitted.
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 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.
Re: Vim Croquet
#45Even if not related to it and my get some downvoted for saying this. Something that strike me in this post is how cooler haskell code looks vs python.
The nice thing with Haskell is that it can be extremely compact. The problem with Haskell is that it can be extremely compact.
(disclaimer: that probably isn't actual Haskell syntax.)
Re: Vim Croquet
#46Earlier 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…
catastrophic cache miss 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...
Re: Vim Croquet
#47Earlier quoted context omitted.
catastrophic cache miss 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 ).
I prefer hybrid line numbering. This way, you can see the true number of the line you are on, while all the other lines on the screen are numbered relative to your position. 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.
Re: Vim Croquet
#48Earlier 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…
Re: Vim Croquet
#49Using a language that eschews state to try and process the state in a modal editor tickles me.
Re: Vim Croquet
#50Looking 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..
I don't use vim, but from the parsing example he gives in the post, I'm guessing he uses C-c: `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[…]