1. 6
  1.  

  2. 11

    Long time vim user here. If you enjoy vim golf, weird flex, but okay, more power to you. If you’re a new user, ignore the gatekeeping.

    1. 7

      Also came here to chime in about the gatekeeping. I’m not thrilled with “real Vim ninjas”.

      1. 4

        This is a weird take to me. I very much enjoyed VimGolf when I was a beginner Vim user. I love that you don’t see the best solutions straight away. You post your [terrible] solution, and then you’re shown a better solution. Little by little, you’re shown new ways to approach editing text. There were many times when I’d see an improved solution and think “Wow! I didn’t know Vim could do that!

        Probably the three things that had the most impact on my Vim ability — in no particular order — were:

        • Forcing myself to do everything in Vim
        • Drew Neil’s book Practical Vim
        • VimGolf
        1. 10

          I agree, I find VimGolf an excellent way to learn new tips and tricks. However there is more than a kernel of truth to /u/barakmich ’s comment.

          They make you register with your Twitter and count the number of attempts you made. So your failures are public and tied to your online identity. There is a definite culture of elitism amongst many VimGolf practitioners. I wish there were a “learning” mode where your scores don’t count on the scoreboard and you didn’t need to register with Twitter. Would make the thing a lot less intimidating.

          1. 3

            It would also be really nice if a lot of the challenges weren’t competitive. Instead of “get the lowest score”, it would be “get a score below this value”. That’d be better at making it teach common useful tricks instead of pushing people to use every obscure thing they can think of.

            1. 2

              That’s a good idea. It’s open source, someone should create a fork more oriented towards beginners and learning than to showing off your leet skills.

            2. 1

              Ok, I think that’s a very fair criticism, and I have to agree with you.

        2. 4

          Three problems I have with vimgolf as it’s currently done, in terms of using it to get better at vim:

          First, it emphasizes keystrokes above anything else. Most of the time we don’t care about keystrokes, we care about editing time. Cognitive overhead plays a huge role there. s is one character faster than cl, but out comes up rarely enough to be worth knowing. And sometimes the fewest keystrokes comes from an elegant combination of multiple features that’ll take you more time to think up than to do in a slightly-longer way.

          Second, a lot of the challenges that make for interesting golfing aren’t the ones you see regularly. They’re like linked-list questions: fun as an isolated thing, but not relevant to what most devs do.

          Finally, there’s (very very roughly) twoish ways to think about vim. You can be purist and use the completely base configuration- what you’d get if you sshed into a fresh server. You can also exobrain and write a bunch of custom maps, tweak the settings to your needs, modify the augroups and statusline, etc. Vimgolf exclusively caters to the former style. I think after a point, an hour spent learning the function syntax will be way more useful to you than spending an hour practicing keystrokes.

          1. 2

            Cognitive overhead plays a huge role there. s is one character faster than cl, but out comes up rarely enough to be worth knowing.

            Yes. But also “cognitive overhead” is highly context-specific. I don’t think the increased cognitive overhead is necessarily a result of the specific keystrokes as much as it’s just how well-engrained a given approach is in the user’s mind. FWIW, I use s often. I don’t think I have ever used cl. Also s and cl don’t do the same thing.

            Second, a lot of the challenges that make for interesting golfing aren’t the ones you see regularly. They’re like linked-list questions: fun as an isolated thing, but not relevant to what most devs do.

            I don’t see anything wrong with the challenges not being representative of most programming work. It’s the broader vocabulary of approaches to text editing that makes this compelling, at least from my point of view.

            You can be purist and use the completely base configuration- what you’d get if you sshed into a fresh server. You can also exobrain and write a bunch of custom maps, tweak the settings to your needs, modify the augroups and statusline, etc. Vimgolf exclusively caters to the former style. I think after a point, an hour spent learning the function syntax will be way more useful to you than spending an hour practicing keystrokes.

            I have no data in this, but the common pattern seems to be that a programmer will start using Vim, and then adapt it to all the things they’re used to having rather than starting with a leaner installation and learning what already exists. Also I don’t know how VimGolf could possibly work if it didn’t work this way around.

            1. 3

              From the Vim s documentation:

              Synonym for “cl”

              1. 1

                Ah, right. Yes. Well in that case, I find that even more confusing, since I expected cl to have the same effect as vlc.

          2. 2

            I love to play VimGolf using Kakoune. While golfing is mostly entertainment, optimal solutions are usually close to „real world” usage. It’s also wildly satisfying when you manage to beat Vim in it’s own game ;)