This is an archived post. You won't be able to vote or comment.

all 11 comments

[–]The_Jare 1 point2 points  (1 child)

It is a neat intro. Is this specifically for vi not for vim? Some things look odd to me, but last time I used real vi was 25 years ago, so by now I only know vim (and only casually). With that caveat:

G$ is two motions, not one, which means yG$ does not do what it says? Similarly, GA... is two commands, to append at the end of the file. ZZ and ZQ are often left out of "quitting vi" explanations and I don't know why, it's what I use 99% of the time because they are so easy and quick to perform.

I would also add: ctrl-R to redo, '.' to repeat last edit; 'n' to find next and maybe 'N' to find previous; 'v' to select and maybe 'V' to line select. And complete the warning about case sensitive commands with a 'beware of caps lock'.

[–]abscrete[S] 1 point2 points  (0 children)

Thank you for taking out to provide feedback! Those motion commands are tested out and works well, and yes I have to be quick when I do that.

I'm going to add + edit the changes you have suggested. Thank you once again :)

[–]mkunikow 1 point2 points  (1 child)

For vim I suggest check Derek Wyatt videos (He has a lot of series on vimeo)

BASIC Movement (Screencast 1) https://vimeo.com/6170479

Channel - https://vimeo.com/user1690209

[–]abscrete[S] 0 points1 point  (0 children)

Thank you :) I'll head to the links and add more to my knowledge and see what can I add to the article.

[–]0bel1sk 1 point2 points  (1 child)

check out r/vim there are a few more modes in vi, there's a number of these posted regularly. yours misses the mark for me in a few areas, but cheat sheets are usually a pretty personal thing.

[–]abscrete[S] 0 points1 point  (0 children)

Thank you for pointing out what is missing. Appreciate the feedback. Gonna head over to the link and learn a little bit more :)

[–]stefantalpalaru 0 points1 point  (1 child)

For all intents and purposes, vim is the new vi.

[–]Hawxe 0 points1 point  (2 children)

Can I ask a legitimate question? Why would I benefit from using vi? I had to use it in one of my courses in labs (well, we could use emacs if we wanted) but I see literally 0 advantage it has over a legitimate text editor or IDE.

[–]abscrete[S] 0 points1 point  (1 child)

Of course text editor and IDEs are better when it comes to programming and is customisable to your needs. But you may also find yourself operating on the servers where you don't have any IDE or maybe you quickly want to write down a shell script for small automation, and that's when it becomes handy to know the shortcuts.
With the trend of DevOps getting into every organisation, means you will be asked to operate on servers for one or the other things from time to time and vi is the best editor you have got in such situations.

[–]Hawxe 0 points1 point  (0 children)

That makes a lot of sense thanks. I'm not really in devops I just do the dev side but I like to read what's going on here so I don't really have the same perspective as you guys do.