To Vimtutor and Beyond!

Greetings lovely community,

With EndeavourOS being terminal-centric, I’ve slowly, but surely been adopting this ethos with the CLI more and more with certain tasks of mine and incorporating them into my workflow as best I can. It’s all self taught so and at my own pace, so things are always in a state of “work-in-progress”, but this has been part of the beauty of learning something new! I’m not a coder by any means, but I’ve always heard about Vi or Vim Editor over the years, but always thought it was above my comprehension level. Usually I just stick to a handful of things I know in nano and call it a day. And maybe that’s all I’ll ever really need, but what’s the point in using an Arch-based distro if I can’t experiment a little bit? :wink:

One of the reasons I chose EndeavourOS was to go outside my comfort zone and learn more about my system and how to interact with it, beyond a GUI. I’ve so far accomplished this, but it’s also a never ending journey as well. Using EndeavourOS I’ve always had this drive…this motivation…I don’t know how quite to explain it, but it’s given me this odd, yet innate desire to discover some of the older computing roots and dive deep into the Vim-verse.

Anyone recognize this?

I recently discovered vimtutor, perhaps many users here have heard of it or used it? Would love to hear about your experience and time using it. I’ve read a few various articles about Vim and as a non-coder my head does quite wrap around all of it, but I’m starting to use vimtutor and it’s helping to make a bit more sense. It’s basically an experiment I’m doing right now. I can’t say for certain what any of it might mean or change for me, but at the very least I should become comfortable using the Vim Editor in the future. I may not need it for my own uses, but it can’t hurt to try and I might learn some useful things along the way!

If anyone is new to VIm (I’m not an expert by any means!), here’s a few articles I found useful to get me started. If anyone has any other helpful links, tutorials, or just wants to share their own Vim Editor learning experience, please feel free to share!

https://www.systutorials.com/vim-tutorial-beginners-vimtutor/
https://www.makeuseof.com/master-vim-with-vimtutor/
https://opensource.com/article/19/3/getting-started-vim
https://www.linux.com/training-tutorials/vim-101-beginners-guide-vim/
http://ftp.vim.org/pub/vim/doc/book/vimbook-OPL.pdf (this is a big PDF, FYI)

2 Likes

My experiences were such as to lead me to use almost ANYTHING else as soon as such was findable. I could do OK with config files, but actually using it for coding was too painful! Back in 1996 there weren’t a lot of easily available alternatives though…(shudder).

I wish you the best of luck - many people swear by it - including coders! - but I never found comfort there (spoiled by the very capable editors on the Amiga, I expect - especially CygnusEd).

3 Likes

Did you install vim or gvim? I went with gvim to get clipboard functionality in vim.

Here’s a video tutorial series: Vim (01) - What is Vim? - YouTube

1 Like
[scott@endeavourOS ~]$ pacman -Qi vim
Name            : vim
Version         : 8.2.4464-1
Description     : Vi Improved, a highly configurable, improved version of the vi
                  text editor
Architecture    : x86_64
URL             : https://www.vim.org
Licenses        : custom:vim
Groups          : None
Provides        : xxd  vim-minimal  vim-python3  vim-plugin-runtime
Depends On      : vim-runtime=8.2.4464-1  gpm  acl  glibc  libgcrypt  pcre  zlib
Optional Deps   : python: Python 3 language support [installed]
                  ruby: Ruby language support
                  lua: Lua language support [installed]
                  perl: Perl language support [installed]
                  tcl: Tcl language support [installed]
Required By     : vim-spell-en
Optional For    : fzf  pacman-contrib  welcome
Conflicts With  : gvim  vim-minimal  vim-python3
Replaces        : vim-python3  vim-minimal
Installed Size  : 4.55 MiB
Packager        : Levente Polyak <anthraxx@archlinux.org>
Build Date      : Thu 24 Feb 2022 01:41:57 PM EST
Install Date    : Thu 10 Mar 2022 04:09:53 AM EST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

Just the standard vim, I had heard of neovim before this, but I hadn’t heard of gvim that one is new to me.

History:

  • vi
    Visual Editor. Back when everything was CLI, vi was a great TUI editor.
  • vim
    vi Improved. An improved version of vi.
  • gvim
    The g stands for GUI or graphics, I don’t know which one. Basically a GUI front-end for vim backend.
  • neovim
    A different text editor that has the same keybindings and TUI with vim.

Personally, vim is great for editing configuration files. Working on source codes are still troublesome with vanilla vim; you need plug-ins to be productive. Nevertheless, for me vim is really great once you’ve mastered the keybingings and you use ten fingers on your keyboard.

If you want to explore terminal-based text editor, other than vim, you may also want to explore GNU emacs. These 2 are so far the most popular competing TUI text editor.

1 Like

I’ve been testing out nano and micro for when I need to edit some system conf files, and I’ve always played around with bat and cat, though it’s hard for a novice like myself to really tell a huge difference between them all. My testing with vim is just to kind of like get a feel for how coding was and is to this day if that makes sense :sweat_smile:

Vim is an excellent general purpose TUI text editor, probably the best that exits (Emacs sucks, in my opinion, simply because of Lisp). I think familiarity with Vim to the point that basic text editing can be performed comfortably in it is a very useful skill to have.

A nice thing about Vim, as unintuitive as its interface is, is the fact that it is very easy to learn it, because that can be done in small, incremental steps. Once you figure out how modes work, how to enter text, how to make a selection, and how to open and save files, you can do pretty much anything that you could in Nano or Micro. From then on, you can gradually expand your knowledge at your own pace, through regular use. You may never need to use some very advanced features of Vim.

While not a full IDE, I think Vim is excellent for programming, and I think it can be extended easily (I have not tried it with Vim, so take that with a grain of salt) with an LSP server for your programming language of choice, making it almost an IDE.

The biggest problem I have with Vim is that sometimes you absolutely NEED some advanced feature, and you know Vim has it, but since you very rarely use it, you forget how it’s done in Vim, so you have to look it up. That’s my only annoyance with Vim, other than that, it’s great. I think this problem is mainly due to me not using Vim every day. You really have to use it so that even the rarely used advanced tools become muscle memory.

I am always happy when I’m using somebody else’s computer and I see Vim installed on it, because that means I’ll be quite comfortable on that computer. Nano is great, too (despite its name) but Vim is just overall better. On my own computers, I rarely use Vim, pretty much only in the TTY. For regular, everyday text editing and programming, I prefer Kate, which has a very similar feature set to Vim.

2 Likes

Yeah that will probably end up being my ‘problem’ as well. I don’t need to dive into an editor everyday. Mostly I’ll just be using pacman/yay for like 90% of my terminal usage, the other 10% is just experimenting and figuring things out little by little. I agree though just in my first usage and understanding that Vim looks to still be very useful and very practical, but it may or may not be something I end up sticking with; only time will tell.

Muscle memory wise, I can run nano in my sleep, learning micro us only slightly different. Vim for me right now is like… I have to sit down, take it all in, and learn it, it’s not (yet) as get up and go as the others I’m familiar with. The other two I can just wing it for the most part with the knowledge I do have. Thanks for the advice and insight though!

Thanks for the link, I’ll add that to my playlist and check those tutorials out! :+1:

Be aware of the “I use vim btw” factor in all this. It IS a tool, and confers no superpowers after all! As an editor, some of its forms are as comprehensive as is possible - but Emacs can do more if you can live with it (and many of those extra capabilities have little or nothing to do with editing). One other point - if you get ‘stuck’ on something with only limited (and/or OLD) stuff available, knowing some vi is a lifesaver! :ring_buoy:

1 Like

Are you sure of this? I’m pretty sure it does. I feel empowered. :slight_smile:
I will admit that every time I see emacs, I am like ‘Kryptonite!’ and run away. We do get stuck in our ruts.

From the 1990s to now - the effect has worn off :grin: Enjoy it while it lasts though!

As for Emacs - there are so many not quite compatible versions around, on so many platforms (even my Amiga!) that I gave up on it VERY quickly… (open trash, deposit, empty trash) on every system where I’ve looked at it .

EDIT: sorry Emacs fans
1 Like

The only reason why I am not using Emacs, and will most likely never use Emacs, is Lisp.

I have no desire to learn this awful, awful language, ever. Even Python and JavaScript are better than Lisp.

So I don’t feel like even giving Emacs a try, since I’ll probably like it and that will force me to learn Lisp (since I won’t be content with doing only the basic stuff), and I’ll hate that.

1 Like

When I grew up, even speaking with a lisp was contra-indicated!

1 Like

I’m still learning vim, but for me, the best way to learn is to use it (and I use it almost every day now).

There are many vim tutorial/cheatsheets online and I have a good vim book as a reference.

3 Likes

What makes vi great is the speed at which you can do things once you learn it. That being said, there is a decent investment in learning it in the first place. I do agree with many others though that the best way to learn it is to use it. It is much easier to learn incrementally than trying to take it all in at once.

Just be happy that modern versions of vi support the arrow keys. :wink:

Indeed. Regular use and having a cheat-sheet on hand is a great way to get started.

Also, welcome to the forum!

2 Likes

I found two apps on android, a vim cheat sheet and a vim quick reference that may be useful.

I also use vim by learning extremely incrementally… Have never made it past 1min vim tutor, perhaps maybe useful now to discover new features since I have used basic vim commands. But a printed cheat sheet maybe good.

The best way to learn a tad of vim was to try out a new wm and having to edit config files all day long to get what I want. That will aid in muscle memory.

2 Likes

I just looked around for the most common shortcuts and started using it. First at the workplace in Visual Studio with the VsVim extension and then everywhere else. I think the main problem is people want, like you said, to learn everything at once, build their fancy environment and expect to just be instantly good at it.

For me it’s just something you have to slowly adapt. Learn things when the need arises and slowly expand on that. Took me like three months to have a decent neovim setup I like to work with. But in this three months there was probably only one option added in three days or so. It never felt like I was using vim for the sake of modifying vim.

But if you have vim (or neovim in my case) properly configured with all the incredible plugins (telescope really elevated neovim to a top class developer environment for me), I don’t think there is something better out there.

1 Like

I use Python at work and for the past 2.5 years, I’ve limited myself to only using vim for all of my Python development. Not ideal, but it did accomplish the goal of getting comfortable with vim.

I am no vim master, not by a long short, but it’s my go-to editor now.

1 Like

Right. Not a long time ago I was trying to enable WSL on my work computer since we now have an official WSL iso that we can use.
The only text editor pre-installed was vi and as a first step, it was necessary to setup network with proxy, DNS and some other stuff. I still think that was a sort of initiation ritual from our IT guy to turn away “windows plebs” because that could have been easily baked into the original iso. :sweat_smile: :laughing:

As long as that person uses default keybinding. :wink:

3 Likes