Live data from Hacker News

VIM Master

github.com

81–90 of 123 posts

Re: VIM Master

#81

These little tutorials and games are great. I played VIM Adventures. However, one thing I really struggle with is learning when I can be doing something more efficiently. I rarely use markers, anything beyond default registers, commands, and so on. I'm giving Neovim a try for my systems course trying to get better but I do wish these sorts of games pushed me to get better at these more advanced usage tricks.

I wrote up some exercises to help build the muscle memory of advanced vim commands: https://github.com/steveshogren/10-minute-vim-exercises/blob...

Re: VIM Master

#82

Learned vim with a game like this. It was a vscode extension, I don’t remember what it was called. Anyway it’s easily the best time investment I’ve ever made, period. Takes a couple days of messing around, and you can basically never leave modal editing behind! It’s just so much better. I’m still not even a vim master. Just the basic motions and commands are enough to never want to give em up. Throw macros and regist…

> I’m still not even a vim master. I can do some things that people using vim for decades didn't know was possible. I'm still not a vim master. How does one ascend to the levels of TPope? Joking aside, I think that's one of the nice things about vim. There's always more to learn. Not in the way that you're missing something but in the same way this is true for any programming language. It's because these tools are so…

Vim isn't an editor, it's an interactive programming language for text processing.

     :%norm 0f"ldt"i...
There are so many times (even per day) where I'll say to myself: "ahhh, I'll just 'vim' it rather than writing a program..."

If I'm not going to have to do it a bunch, sometimes vim itself is faster than writing a script to do whatever random task I need done.

Re: VIM Master

#83

Earlier quoted context omitted.

I actually opened this hoping it’ an alternative to vimtutor but for experienced/intermediate users. Is there such a thing? I feel like someone has probably made something this - something that progressively works through soem of the more complex features of vim. I’ve found soem absolute gems mostly through online blogs and reading through vim docs If anyone has any repos that’d recommended I’d be happy to try!

There is always https://vim-adventures.com/

  >> hoping it’ an alternative to vimtutor but for experienced/intermediate users.
I think you missed the part where the parent said this...

Re: VIM Master

#84
post #48
post #26

Earlier quoted context omitted.

ma, mb, mc => 'a, 'b, 'c => ...just being able to "tag" each of the three functions you're working with (comparing, copying, moving code, whatever) it's eventually worth it to get them into your muscle memory. And once you "get" marks, then you "get" registers "for free".

and this is why i always read vim articles... i've never used registers in my life.

I'll use them in macros fairly frequently: vawy'f => function name, vi{y'b => body, vi(y'a => args

...or y'x to keep something kindof handy that I can drop in at the right place (sometimes with a macro...)

    qadi('xpq => @a => @@...
(Record macro "a", delete inner parentheses, paste from the "x" register, stop recording => play macro "a" => play last macro...)

If I keep "x" clean/protected then I can delete or edit the rest of the time all willy-nilly and not worry about clobbering what I'm trying to paste into the right spots.

Re: VIM Master

#85
post #67

Earlier quoted context omitted.

>ReaperWare What does this mean? All I found on the Google was a company that produces sim racing gear.

Presumable the pricing model for Reaper? https://www.reaper.fm/purchase.php

haha you got it

Wait, I'm the first to say that? That should be a thing.

Re: VIM Master

#86
post #47
post #27

Earlier quoted context omitted.

vimtutor is to Babbel what this is to duolingo. Many will prefer learning through a game but some want a more textbook approach. Honestly, anything to get more people on vim and emacs is a good thing in my book!

> vimtutor is to Babbel what this is to duolingo It took me half a minute to realize that you probably meant "vimtutor is to VIM master what Babbel is to duolingo".

Thats exactly what I meant to say. Thanks!

Re: VIM Master

#87

Earlier quoted context omitted.

The required login/sign-up, privacy policy and lack of apparent open-sourcing seems antithetical for the average Linux user. You're going after a niche of a niche of a niche with this one, good luck lol.

Good feedback

Will you be removing the sign-up/in then?

Re: VIM Master

#88

I generally recommend to exit either via :xa (save all & exit) or :qa! (discard all and exit), bound to ZZ or ZA respectively. If you exit via :q or :wq, it just closes the current buffer, and moves to the next one. E.g. if you have a neotree open along with the editor, you type :wq, it closes the editor buffer and moves you into the file tree, which can be very confusing for beginners.

just do :wq :wq :wq :wq etc :P

Noooooooo!

Make some key bindings. Bind leader to space, and make a leader mapping for writing to the file, and another mapping to quit. Avoid chords.

Re: VIM Master

#90

Earlier quoted context omitted.

just do :wq :wq :wq :wq etc :P

What does the :P command do? /s

                                                        :P :Print                                                                                      
  :[range]P[rint] [count] [flags]                                                                                                                        
                          Just as ":print".  Was apparently added to Vi for                                                                              
                          people that keep the shift key pressed too long...                                                                             
                          This command is not supported in Vim9 script.                                                                                  
                          Note: A user command can overrule this command.                                                                                
                          See ex-flags for [flags].
Post reply on HN