Then don't. Just learn the basics. Learn how to use insert mode, edit some files, ignore anything not directly relevant. Eventually you'll come across a particular use case where opening a full blown IDE doesn't feel worth the effort, so you'll open vim.
You'll learn a few shortcuts, because it would be nice to delete an entire line, or just look at the end of the file. What do you know `dd`, and `G` respectively do that for you.
Eventually things will become easier in vim, and you'll just have another tool at your disposal.
It took me years to begin to appreciate vim. I don't have a .vimrc, I use all the base settings. However, now that I know how to use vim it's become invaluable.
The thing about vim is that it doesn't have to be complicated. It can be as easy or as hard as you want it to be.
> Eventually you'll come across a particular use case where opening a full blown IDE doesn't feel worth the effort, so you'll open vim.
Imho there are strictly better options than vim for this nowadays for people who are not already invested in vim. Sublime text is easier for people that prefer GUIs. For CLI, Kakoune has better discoverability, better thought/more consistent commands, and actually usable colorschemes and syntax highlighting out of the box.
>The great thing about vi(m) is that it's always there. SSH'd into some random server and need to edit some random config? vim
I hate that, I ssh in, then maybe I want to edit cron and I am hit with vim(someone changed the simple nano with it), in the past you had no choice then google how to quit vim but now it will tell you how to do it(I ssh and change config files 1 or 2 times a year). I never learned how to quit, just o use
EDITOR=nano command
to get a simple editor, I don't need a powerful editor for config files.
A lot of times it's easier to just learn the tools of the trade instead of fighting a never-ending battle. I don't need or like awk, but I learned it because it's in use and it was very helpful to do so.
vim - is not my tool of trade, I am developer so I prefer IDEs like Intellij for coding and for config files I will use kate for local and for remote nano will do the job.
It makes no sense to learn vim because I am hit with it once a year, I better learn tools like "tail" and "grep" this ones are useful for what I do.
But sure if you are a sysadmin or ssh daily and edit big complex config files the sure learn vim if you really want that.
I mean, based on the complaints outlined in your comment above it kind of sounds like vim _is_ a tool of your trade (albeit one that you don't use very often). The basics are probably worth learning just so you don't have to care when you run into vim (opening files, inserting text, save and exit). Learn it once and you're good to go.
Or you can keep resetting the default editor to nano. You do you, friend.
Sorry if I was not clear, most of the time when you edit a config file you decide what editor you use, so you would run
nano /etc/congig.cfg
my only issue was with crontab, since it was using nano but someone changed it to vim so I was surprised by it, I really had to google how to exit it. Since I edit cronjobs once a year and for config files I can use nano it would be a waste to learn vim, I would just forget all the shortcuts - not sure how other people memory works by me I forget stuff I do not use , like regexp I use them 2 times a year and each time I need to read again what symbol does what.
I am not sure who to blame for making vim the default (in EDITOR), I could swear it was nano and someone in our team had to switch it vim to fuck with the rest,
In most the distributions, the default editor is vi, I believe the only (mainstream) distribution which has nano as default is ubuntu. In fact, being a sysadmin, the reason most of us learnt vim is because it's always the default and it's installed everywhere.
This leads to being stuck with tools which are unpleasant to use and sometimes not suited for what you want to do with them - for example, editing text files as a beginner.
Would it be better if Nginx would have never been written and we'd all use Apache instead?
What about Docker never having been written and us having to ship VM images with no tool chain around them?
What about JetBrains never creating new IDEs and everyone being stuck with Eclipse or NetBeans?
What about no systemd and having to use sysvinit or OpenRC? Okay, perhaps that last one is debatable, due to some valid concerns.
If Vim is so powerful, then this power should be embraced and transformed into a software package that's easier to use, be it with nano style hints or simpler shortcuts - Vim isn't good because of its accidental complexity after all!
Of course, that might take a few generations, because no one who knows Vim wants to relearn it, whereas the newer people will oftentimes simply resist using it.
But my point is that the weaknesses of each software package should be addressed and eventually fixed, either in itself or another to replace it.
Any sufficiently capable editors will be complex. Emacs for example is just as hard to learn if not harder than vim. Nano is easier for one simple reason which is that it is not as capable.
Could vim be easier? Probably. But it’s still useful and is an archetype. Remember I’m not saying new code should be written in Awk. It’s just useful to know how to use the tools that everyone knows, regardless of whether they should be replaced or improved.
The handsaw isn’t perfect or that beginner friendly, but if you refuse to learn to use one because there are other cutting instruments, you’ll probably have a bad time compared to if you didn’t.
> It’s just useful to know how to use the tools that everyone knows, regardless of whether they should be replaced or improved.
This is a perfectly reasonable argument to make and probably reflects the reality of working in the industry pretty well.
That said, I'm still stoked to see what people come up with in the next 20 years.
Maybe gradual improvements like Neovim tried to do. Or perhaps Vim-like text interaction in VSC or JetBrains IDEs, with all of their plugins and ecosystem. Or maybe something even more grand!
As noted earlier in the thread, that embraced and transformed easier to use version of vim is called Sublime Text. (I actually thought it was a fork, but no, apparently it's just "inspired by".)
Vim's power comes from it being 1) text-based, 2) very fast to load and manipulate files, and 3) very fast to use if you are familiar with the syntax. Like many power tools, it's the last part here that's hard, but it's also very hard to fix without affecting one of the other two qualities. For example, Emacs nails points 1 & 3, but is so much slower to load that few people use it as their default $EDITOR, and has a sizable learning curve as well.
Vi (rather than vim) should probably be treated more like how most developers know how to use a unix shell, rather than a specific product. Far more than the program that implements it, vi(m) is more relevant as a UI. Granted, it is not idea and goes contrary to the expectations of users who haven't had much experience with it yet, but it is at least for the time being a de-facto standard worth knowing the basics of (and I mean extrem basics, how to enter leave insert mode, how to save how to quit. If you aren't using a real vi, then anything about the normal mode is nice to know).
fwiw i've also thought that and moved to vscode with neovim as the backing editor for normal mode and it's generally fantastic. some rough edges but not that many... it's still neovim and vim in the background
Yeah. It's pretty easy to delete a line in Sublime, and contrary to CLI fan wisdom, a single accurate trackpad gesture is simpler and faster than the barrage of commands needed to jump to a particular line.
The studies that "prove" CLIs are faster than GUIs are decades old now, and my experience says they're obsolete.
I develop with emacs using my keyboard exclusively and I'm 100% convinced there is no appreciable benefit for doing so, it's pure personal preference. I remember seeing John Carmack express that didn't feel it was worth it to become a text editor power user, and he was getting numerous twitter replies insisting he was missing out on enormous productivity benefits. Imagine saying that to one of the most productive programmers of all time. It cracks me up every time I think about it.
Vim movements allow you to compose rich intentions with a matter of a few keystrokes. I find it very hard to believe that can be beat with a mouse unless someone is using gestures.
More than anything, it's about not switching devices. Typing feels like playing the keyboard. Switching to the mouse feels like having to pick up a trombone between keys. (I know that's a bit dramatic of an analogy, but...)
Bringing up the old mouse makes this conversation sound so dated - as I said, I use a trackpad. Specifically, like millions of others, I work on a MacBook Pro with an incredibly precise trackpad right under the keyboard. I move my hand to and from that trackpad in about 0.1s, and I can click on anything I want in less than half a second. "Rich intentions in a few keystrokes" doesn't sound competitive with that IMO.
It's all about uninterrupted experience, I don't want to move my hand anywhere off the home row and then move back again, it feels clunky.
Regarding competitiveness, with a bit of get used to, you can muscle memory things like: "remove content inside this bracket (), or "", or block {} and place me into insert mode so I can start typing new content" in 3 keystrokes. I don't see how searching manually for start and end then select with mouse/trackpad can ever be competitive to that.
I'd happily race using vim against anyone using any pointer device. Your very fast 0.1s accumulates over the day, the week, the year. Versus never moving your hand away from the keyboard.
How do you handle having to change a function's parameters, for instance?
In vim, you just have your cursor inside the (...) and do `ci)`, which is (c)hange (i)nside `(, which instantly deletes all the test inside the (...) and you can type that stuff out easily
For a trackpad, don't you have to manually select all that text, hit delete, then start typing again? Or is there a better way I'm not thinking of
So. Many. Shortcuts. And, if you use it as an extension to your IDE, say for VSCode, you can still use your pointer.
Delete to line's end: d$
Delete to next blank line: d]
Replace current character: r
Surround the next 3 words with quotes: ys3w" (non standard, but out-of-the-box on VSCode)
I think there is merit to learning vim, and merit to using a GUI/IDE. Especially if you can combine both. Submlime, vscode etc all have reasonable vim bindings.
I was an avid user of vim for many many years, and I would not describe myself as a vim expert, rather I know a lot of the core commands. I have since switched do vscode (for many reasons) and still use the vim bindings.
I also don't believe it is just an issue about speed using the mouse. I believe it's also a movement issue.
This is the benefit I get, if it is vim/vscode/jetbrains etc as long as it has vim bindings I know `dd` is going to delete a line etc, the editing experience is fairly static. Block editing and yanking, F, T, ctrl-D, ctrl-U, cw, de, cs"`, vwS(, ci", and many others are all great vim methodologies, just like cmd-p (mac) for sublime and vscode.
Multicursor in vscode, feels broken do to me compared to block editing but even if I need to do mutlicursor across distributed lines (something missing from vim) I can use `gd`.
I would say vim is more of a methodology than just an editor.
If you care about quick edits in a user friendly environment, you might as well use software that's simple to use and doesn't have a steep learning curve, instead providing user friendly shortcuts.
In my eyes, Vim is better suited for more advanced text processing and more macro heavy edits, where you need to do lots of repeated actions. Of course, if you are used to Vim, might as well use it for everything, however if you don't that suggestion is possibly a suboptimal one.
Though there's definitely a space that's also occupied by regular text editors (like Notepad++ or the *nix equivalents) if you're in a graphical environment where you even have the possibility of opening an IDE.
> Eventually you'll come across a particular use case where opening a full blown IDE doesn't feel worth the effort, so you'll open vim.
I'm not sure that's still relevant, given the popularity of VSCode
> You'll learn a few shortcuts, because it would be nice to delete an entire line, or just look at the end of the file. What do you know `dd`, and `G` respectively do that for you.
That might be just me, but 99% of my navigation is a ctrl+f (a search) or a ctrl+click (go to definition). Most of my "complex" editing needs are served well by the multi cursor and ctrl+left/right arrow (go over a "whole" word). I know that vim is a generalisation of that, and instead of having a specific thing like this you have a whole language to compose things, but I just don't see the point.
I wonder if it's one of those thing that appear universal, but is in fact very personal, and "vim people" are different from "emacs people" and from "VSCode people" and from other people in a fundamental way that can't really change, and that is visible mostly through the editor choice.
It's not even good! This has to be the strangest cargo-cult following of all options you could have. If you're going to use a proprietary closed editor anyway, use something like a jetbrains IDE. At least then you will have a lot of very complete and well-integrated features.
> It's not even good! This has to be the strangest cargo-cult following of all options you could have.
I don't think that's true. It's lighter and faster than big IDEs while being way more accessible than them and vim/emacs. It handles most of what you throw at it, has lots of very good extensions, and you can easily use your shell. If you don't understand what's good about it, that's a failure on your part.
> If you're going to use a proprietary closed editor anyway
It's open source though.
> use something like a jetbrains IDE
My experience with jetbrains has been mostly terrible. That doesn't mean that their IDE isn't good, but it means that they are worse than VSCode for me.
> At least then you will have a lot of very complete and well-integrated features.
This version is crippled. The plugin system works because of a workaround to a proprietary server, which will inevitably be broken on purpose when it gains any traction.
> This version is crippled. The plugin system works because of a workaround to a proprietary server, which will inevitably be broken on purpose when it gains any traction.
People say things like this, as if other text editors don't have the same functions. The alternative is not "notepad.exe", it's Textpad, VS Code, or IntelliJ IDEA.
Delete an entire line: CTRL-Shift-K in VS Code.
Or just look at the end of the file: Ctrl-End in most editors.
I can only speak to my experience, and I might be mistaken: but the reason I tend to reach for vim bindings is not because I already know them- it's because, mostly, it's consistent where as IDE key binds change depending on the platform and IDE.
IntelliJ has programmable keys and they prompt you on first run which ones you'd like to use "Original?", "MacOS", "Linux".
VSCode has it's own key binds for various movements (like indenting a block), I know sublime does too.
It's all just too much hassle, and obviously that doesn't translate to being ssh'd into a server and needing to move some text around, which is harder than it ought to be in Nano. (but you only feel that after you've learned vim.. so.. that's weird, there has to be a universal law about that somewhere)
But consistency only exists within a "culture", such as Linux or Windows.
From the perspective of someone from Windows, VIM is hilariously inconsistent, to the point of absurdity.
Most editors on Windows share a relatively consistent set of navigation commands. Ctrl-Left-Arrow for previous word, Ctrl-End for end of file, etc...
VIM meanwhile is so far away from this it's basically from another planet.
So then from your perspective VIM is consistent and consistently available. From a Windows user's perspective it is the Windows standard editors that are consistent and consistently available.
That's why I've gone on rants previously about the bizarre hybrids like VS Code, where it does some things like VIM, but pretends to be a light version of Visual Studio. It's a garbled mess, but apparently I'm not allowed to criticise it because it is free and JavaScript people had nothing as good available to them before, so it must be the best thing since sliced bread...
Try "Delete until the 3rd closed parenthesis", or "Delete everything within the {} block currently under the cursor".
In Vim it's pretty natural, because commands are compositional. It's like you can "talk" with the editor and tell them exactly what you want, rather than just moving around and inserting/removing/selecting characters.
Granted, it's not easy to learn and perhaps not for everyone. I think it takes a certain kind of... disposition, maybe?, to appreciate it.
Today I learned there was a better way than "dt)..", but that is still one of the things I like most about vim: verb+adverb+subject goes a really long way instead of trying to learn millions of keyboard shortcuts. Each new verb really expands your options rather than doing a single thing like a keyboard shortcut.
I don't think I've ever come across a use case where opening an IDE didn't seem worth it. I've never come across a use case where I though vim was the better option.
There are many times I had to use vim because I didn't have a choice. And usually it was with the thought, that I have to one again use a hacked up line editor.
You'll learn a few shortcuts, because it would be nice to delete an entire line, or just look at the end of the file. What do you know `dd`, and `G` respectively do that for you.
Eventually things will become easier in vim, and you'll just have another tool at your disposal.
It took me years to begin to appreciate vim. I don't have a .vimrc, I use all the base settings. However, now that I know how to use vim it's become invaluable.
The thing about vim is that it doesn't have to be complicated. It can be as easy or as hard as you want it to be.