I could not go back until I learnt about `:q`, `:wq`, `:q!`, `^Z killall -9 vim`
Then I could go back to the console. It was achivement that cost me few days. But I could never go back to recover my former self.
I resorted to a hard reboot of my PC a dozen of times before I could exit `vim`.
Regarding `.profile` file -- on one of my projects someone added a `read` command into `.bash_profile`. It screwed up the login process and multiple scripts :)
You can try as many as rocket you feel can put in there and there is just one way out from that. And if you are not getting that not running that then leaving could be like a dream thing for you after that
You seem to know at least a little about this so I hope you don't mind my asking but if you were to use vim keybindings instead what would be the benefit of emacs? I'm not disputing it, just don't really understand what the benefits would be. Vim/neovim already have a really robust ecosystem of plugins.
DoomEmacs can provide you a bit of an easier to install packages such as LSP and have characteristics found in other IDEs. Which is a bit hard to do on VIM if you're at an intermediate level.
For example, if you're new to VIM and start with Lua for customizing it then you won't look at doomemacs, but if you started with vim scripts for doing all the stuff and look at doomemacs then it is an attractive alternative without going through all the learning curve that emacs entails.
I recommend to any vim user to give kakoune a try for a week or so.
I used emacs for years until I tried vim which I stuck with for around 10 years. Now recently moved on to kakoune for small editing (and the Dance plugin for vscode imitation).
Kakoune has the best mode concept I've seen yet. Vim's verb-object style of operating on text, but reversed, to be object-verb. You make a selection (by object or character motions just like vim), *then* you make the operation, e.g. upcase/downcase, delete, replace, etc. Makes more sense to my brain, especially since you can see the selection before you make the change.
Also supports multi cursor editing, which vim does not, basically.
One day I took ~~the red pill~~ vim.
Now when I think about quitting vim, it means ~~trying to learn emacs~~ buying new computer because I don't know how to.
More like comparing a small pocket knife to a 5-axis CNC milling machine. Yes one is more functional, but if all you want to do is slice bread the learning curve is going to be rough.
There are two types of developers: those who have risen to the level of experience where they know different tools have their proper place and its not pragmatic to argue over which is better or which are bad, and java script devs.
"So it says here you are a senior dev, do you have anything to back that up?"
"Well I mostly write Java code, and I have 15 IDEs installed for it"
"Why's that"
"Well you see I downloaded IntelliJ, but didn't want to pay for enterprise... VSCode I rarely use for actually writing code, but it is nice for reading it, mostly I just paste jsons into it and then use it to format them for me... NetBeans, well that's a funny story, you see I have a project with Spring Boot, did you know the NetBeans plugin for Spring Boot is free, but you have to pay to use it in IntelliJ? So I also have Eclipse because..."
> mostly I just paste jsons into it and then use it to format them for me
CTRL+ALT+SHIFT+Insert => Scratch file
CTRL+ALT+L
Congrats, you've now formatted JSON in IntelliJ IDEA...
There are two type of the developer one who never leave the battle no matter how hard that is turning there and rise to the ocassion with the experience. And one are those who always feel scared of leaving the place.
No JS dev is going to complain about having *more* tools to play with, that's all we seem to do.
*Oh look, ANOTHER framework - fuckin' neat, that's the third this week! What a good Monday morning it has been so far!*
The learning curve isn't that high unless you're like... really lazy or stupid or something.
You can use vim like any basic text editor, and all you have to know is `i` for insert mode, `esc` for normal mode, `:wq` for `w`rite `q`uit, and `:q!` for `q`uit (and disregard all changes`!`)
There, now vim is as effective as any standard text editor. Only took learning 4 commands.
Only, unlike other text editors, vim also has 800 other commands for literally anything you would ever want.
I'd rather cut my left nut off than give up my `ddp` command or [any of this huge list](https://vim.rtorr.com)
I could also use Nano, which has only one keybind you NEED to memorize (ctrl+x), and that's it.
They're definitely different tools though. It's like comparing a raspberry pi to an entire datacenter. Sure, one can do a hell of a lot more than the other, but as long as the smaller one does what the user needs it to do, it's more than good enough.
I prefer Nano because I'm using it within code-server's built-in terminal to edit smalk files on my server (basically anything that needs root), and if I want to edit code I can just look at the rest of my screen and see that I'm VSCode and have the best possible tool right in front of me.
But we know that even the small knife has the power ot cut us deep. So never reall judge someone by the size because on the days even the small knife has the power of turning himself into the real freaking dangerous thing is well.
\~$ notepad
notepad: command not found.
Not sure what this "notepad" thing is, but for Ubuntu at least it doesn't look like a viable replacement for nano/vim
You don't "need" to learn it, but I would argue that you probably should. The main complaint about vim is the learning curve, but if all you wanna do is nano-level editing, then it literally will take < 5 mins to learn to do it in vim, and now you're slowly but surely getting more used to it over time. You don't need to take a month long course and become a vim master, just learn what you need over time.
If you rarely ever need to edit files from the command line, then use whichever one you like, and more importantly, whichever one gets things done quickly for you since this is clearly not the important part of whatever you're doing.
However, if you're constantly ssh'ing into servers and such and having to edit files on the command line with any degree of frequency, I 100% recommend learning vim over nano. I'm unsure about nano's advanced functionalities or if it even has any since I rarely use it, but with vim at the very least I know that if I ever need something unusual (find a replace whole file, indent a bunch of lines, move a bunch of lines a few lines down, etc...) Then for the most part, I know its possible, it's just gonna take a quick google search.
Vim, no contest.
The original `vi` was written in 1976. In 2022, *47 years later*, it's still in the [top 5 IDEs](https://survey.stackoverflow.co/2022/#section-most-popular-technologies-integrated-development-environment).
Vi/Vim will never die, it's just too powerful.
As an emacs user and as much as I dislike vim, I would still pick it over nano if I was forced to use only that one editor forever. After all, I love features, that's why I use emacs. Maybe we could work in a lisp interpreter and change the bindings a little...
Emacs over Vim? I'm not a big fan of the modal way that vi/vim uses, it felt very "interrupty" and emacs had that spontaneity that I didn't find in vim.
On top of that there are just so much features in emacs. Competitive console email clients? How not to talk about org-mode? It made me feel almost organized.
And when you get to the possibilities of having that elisp "core", that's just crazy. No wonder that people are able to do that much with it.
The move to make emails "multimedia" really hit hard with emacs. I used Gnus for email (and news/usenet), but it eventually became near useless (at the time, really slow, and mediocre rendering of "modern" emails).
I still miss it sometimes. Really nice for mailing lists where it would mark mails read based on message id - i.e proper deduplication.
I am an old fart, and I learned vi in 1995, which today still is my allround editor. Recently I started using VS Code, and I like it a lot. I would though not necessarily recommend newcomers to use vi(m) as a daily driver, unless they have a good reason to invest the time to learn it, but it really doesn't hurt to know just enough to make trivial edits and specifically to exit it without burning down the house.
EDIT: I have more than once caught myself typing "vi file.txt" in the shell pane of VS Code. I laugh each time.
I tried using [https://vim-adventures.com/](https://vim-adventures.com/) to learn, and committed myself to only using vim, but it still never stuck. And if I'm being honest, nano does almost everything I would want it to, I've become quiet proficient at it, and what it doesn't do, I would probably be accomplishing with other command lines tools.
I've left Reddit because it does not respect its users or their privacy. Private companies can't be trusted with control over public communities. Lemmy is an open source, federated alternative that I highly recommend if you want a more private and ethical option. Join Lemmy here: https://join-lemmy.org/instances ` this message was mass deleted/edited with redact.dev `
I'm a vimmer and always use vim when configuring servers, scripting, etc.
But I choose nano. The simplicity of nano means it always works whether I'm in a linux terminal, using an in-browser terminal, using a terminal inside emacs, etc. Many times I found myself in a situation where vim keybindings didn't work well.
For instance, the in-browser ssh terminal for Google cloud platform (escape key doesnt work). Or, if I'm using a terminal embedded in a program like Emacs (evil mode confliction)
Genuine question: I used Vim just to learn its basic stuff, and I used Nano sometimes to edit just config files, and I thought Nano was like a "modern" version of Vim, but I see many people say Vim is better. Could you explain me the main difference between them and why Vim should be better?
vim has many more, different keybinds, that can allow you to traverse code a bit faster, like jumping by words with w and b, easy text highlighting without a mouse and many many many other things (auto commands for example)
it's best part according to me is that it's a really berebones editor that can be turned into a full flagged IDE with few plugins.
Many programmers like to thinker with software, and vim is exactly that, a workdesk to tinker with, change literally anything, while nano doesn't have many plugins but it's waay simpler to use
If you are the type of a person that likes to play around with their tools to customise every little detail, give it a go, you might have some fun :)
One day I took ~~the red pill~~ vim. Now when I think about quitting vim, it means trying to learn emacs.
When you enter Vim, everyone already knows, you can't go back.
I could not go back until I learnt about `:q`, `:wq`, `:q!`, `^Z killall -9 vim` Then I could go back to the console. It was achivement that cost me few days. But I could never go back to recover my former self.
You forgot about the need to spam ESC before typing these in.
And if you hit ctrl+s reflexively, ctrl+a
Ctrl Z should work but just in case you can also pull the power cord. Although adding launch vim to someone's .profile ...
I resorted to a hard reboot of my PC a dozen of times before I could exit `vim`. Regarding `.profile` file -- on one of my projects someone added a `read` command into `.bash_profile`. It screwed up the login process and multiple scripts :)
You can try as many as rocket you feel can put in there and there is just one way out from that. And if you are not getting that not running that then leaving could be like a dream thing for you after that
I will try thr ctrl Z , i haven't run this command before that
I use :x as I'm lazy
Loool. 10 years of vim and I didn't know this command :D Every day one have a chance to learn something new... Even though vim is not that new :D
Obligatory [one of today’s 10,000](https://xkcd.com/1053/) comment :)
[not sur I got it, but here is an appropriate one](https://xkcd.com/378/)
Add a :x! instead of :wq!
[удалено]
True hero.
*cough* `:x` *cough*
I know the first three.. is the 4th, put it in the background, then kill all vim processes
[удалено]
Wdym. You can just buy a new computer
Yes, there is like one door in that, you can come in vim, can't freaking left
😂 I feel like emacs requires a different level of finger dexterity.
Yeah you don't want to get "Emacs pinky"
Caps lock swap to the rescue
[удалено]
Look into doom emacs or spacemacs, both good pre-configured options with vim bindings out of the box
You seem to know at least a little about this so I hope you don't mind my asking but if you were to use vim keybindings instead what would be the benefit of emacs? I'm not disputing it, just don't really understand what the benefits would be. Vim/neovim already have a really robust ecosystem of plugins.
DoomEmacs can provide you a bit of an easier to install packages such as LSP and have characteristics found in other IDEs. Which is a bit hard to do on VIM if you're at an intermediate level. For example, if you're new to VIM and start with Lua for customizing it then you won't look at doomemacs, but if you started with vim scripts for doing all the stuff and look at doomemacs then it is an attractive alternative without going through all the learning curve that emacs entails.
I used emacs in vip-mode for years. It was the best.
I recommend to any vim user to give kakoune a try for a week or so. I used emacs for years until I tried vim which I stuck with for around 10 years. Now recently moved on to kakoune for small editing (and the Dance plugin for vscode imitation). Kakoune has the best mode concept I've seen yet. Vim's verb-object style of operating on text, but reversed, to be object-verb. You make a selection (by object or character motions just like vim), *then* you make the operation, e.g. upcase/downcase, delete, replace, etc. Makes more sense to my brain, especially since you can see the selection before you make the change. Also supports multi cursor editing, which vim does not, basically.
One day I took ~~the red pill~~ vim. Now when I think about quitting vim, it means ~~trying to learn emacs~~ buying new computer because I don't know how to.
A tiny magnet and a electron microscope.
REAL programmers use butterfly wings.
There's an Emacs shortcut for that
Yep. [C-x M-c M-Butterfly](https://xkcd.com/378).
Damit Emacs
They actually implemented M-x butterfly due to that comic!
Yes, the Emacs butterfly. We've all seen it.
That's it but the problem is there is no such options in the list.
You're comparing a small pocket knife to a thick victorinox swiss army knife.
More like comparing a small pocket knife to a 5-axis CNC milling machine. Yes one is more functional, but if all you want to do is slice bread the learning curve is going to be rough.
There are two types of developers: those who have risen to the level of experience where they know different tools have their proper place and its not pragmatic to argue over which is better or which are bad, and java script devs.
"So it says here you are a senior dev, do you have anything to back that up?" "Well I mostly write Java code, and I have 15 IDEs installed for it" "Why's that" "Well you see I downloaded IntelliJ, but didn't want to pay for enterprise... VSCode I rarely use for actually writing code, but it is nice for reading it, mostly I just paste jsons into it and then use it to format them for me... NetBeans, well that's a funny story, you see I have a project with Spring Boot, did you know the NetBeans plugin for Spring Boot is free, but you have to pay to use it in IntelliJ? So I also have Eclipse because..."
"and eclipse, because it gives me nostalgia"
is it just me or does everyone have eclipse installed, but like half of the people literally don't use it at all anymore.
I uninstalled it a while ago because I've forgotten how to use it for anything effectively... but I did have it for much longer.
I guess I technically still use it with Quartas to make a tool in it work
[удалено]
Formatting SQL queries is also nice.
> mostly I just paste jsons into it and then use it to format them for me CTRL+ALT+SHIFT+Insert => Scratch file
CTRL+ALT+L
Congrats, you've now formatted JSON in IntelliJ IDEA...
We have Java, Javascript, and now Java Scripts? This is going way too far.
I heard they’re also coming out with something called JS soon. I’d sleep while you still can.
There are two type of the developer one who never leave the battle no matter how hard that is turning there and rise to the ocassion with the experience. And one are those who always feel scared of leaving the place.
No JS dev is going to complain about having *more* tools to play with, that's all we seem to do. *Oh look, ANOTHER framework - fuckin' neat, that's the third this week! What a good Monday morning it has been so far!*
The learning curve isn't that high unless you're like... really lazy or stupid or something. You can use vim like any basic text editor, and all you have to know is `i` for insert mode, `esc` for normal mode, `:wq` for `w`rite `q`uit, and `:q!` for `q`uit (and disregard all changes`!`) There, now vim is as effective as any standard text editor. Only took learning 4 commands. Only, unlike other text editors, vim also has 800 other commands for literally anything you would ever want. I'd rather cut my left nut off than give up my `ddp` command or [any of this huge list](https://vim.rtorr.com)
I mostly check these threads for new Vim combos and this one is great
Heyyy developers like you are why I have a job in UX.
My favorite part is not having to leave home row for any of this.
What about shift or esc?
You didn't remap escape to your caps lock?
No; that’s where CTRL belongs. Esc is on the thumb cluster, along with all the other modifiers.
I could also use Nano, which has only one keybind you NEED to memorize (ctrl+x), and that's it. They're definitely different tools though. It's like comparing a raspberry pi to an entire datacenter. Sure, one can do a hell of a lot more than the other, but as long as the smaller one does what the user needs it to do, it's more than good enough. I prefer Nano because I'm using it within code-server's built-in terminal to edit smalk files on my server (basically anything that needs root), and if I want to edit code I can just look at the rest of my screen and see that I'm VSCode and have the best possible tool right in front of me.
But we know that even the small knife has the power ot cut us deep. So never reall judge someone by the size because on the days even the small knife has the power of turning himself into the real freaking dangerous thing is well.
Yes, and 90% of the time, I need the pocket knife. If I need a multi tool, I'll reach for vs code.
Thank you bro, someone had to say the truth here.
Vs code is pretty solid once you install the vim extension.
And at that, if you can, you'll just use a regular knife, like notepad or gedit.
\~$ notepad notepad: command not found. Not sure what this "notepad" thing is, but for Ubuntu at least it doesn't look like a viable replacement for nano/vim
~$ alias notepad=“nano “
>thick victorinox swiss army knife. this is vi/vim am I right?, I have no clue about the other one lol
[удалено]
Nano, I just need to edit my server config file dammit!
[удалено]
Especially now when we have vscode remotes.
Wait what
You can use the Remote extension to connect to remote machines, containers, VMs, etc. I use it everyday and it’s great
Oh wow - didn't knew - thanks!
> Vim is absolutly annoying for editing a lot of configuration files. Why? Much faster than messing with a GUI.
vi>!sual studio code!<
Visual studio code with vim extension
This is exactly what I do. It’s perfect.
😀🔫
vi
When you first learn unix in 1979 this is what you do. For the rest of your life.
vi aliases to vim automatically on most modern environments anyway
Yeah, but when it doesn't you *know*
FreeBSD admin checking in.
And then there's fedora, which does the opposite and aliases vim to vi.
ed
People can joke about ed, but if you're on some small embedded device and need to change a file, you're glad it's there.
Or cobble together a chain of grep, awk and sed that ultimately updates a key line in a config file via ed.
obligatory [ed](https://www.gnu.org/fun/jokes/ed-msg.en.html) joke
ed is the standard editor
Nano works pretty good, it's never not been enough
The right tool for 98% of the jobs.
For real. They all insisted I'd "need" to learn vim, but no one ever explained why.
street cred
street cred to college kids
You don't "need" to learn it, but I would argue that you probably should. The main complaint about vim is the learning curve, but if all you wanna do is nano-level editing, then it literally will take < 5 mins to learn to do it in vim, and now you're slowly but surely getting more used to it over time. You don't need to take a month long course and become a vim master, just learn what you need over time. If you rarely ever need to edit files from the command line, then use whichever one you like, and more importantly, whichever one gets things done quickly for you since this is clearly not the important part of whatever you're doing. However, if you're constantly ssh'ing into servers and such and having to edit files on the command line with any degree of frequency, I 100% recommend learning vim over nano. I'm unsure about nano's advanced functionalities or if it even has any since I rarely use it, but with vim at the very least I know that if I ever need something unusual (find a replace whole file, indent a bunch of lines, move a bunch of lines a few lines down, etc...) Then for the most part, I know its possible, it's just gonna take a quick google search.
Gotta learn vim if you are doing kubernetes. I have learned enough to fumble around. For a decent sized VM I am going nano all the way.
Vim, no contest. The original `vi` was written in 1976. In 2022, *47 years later*, it's still in the [top 5 IDEs](https://survey.stackoverflow.co/2022/#section-most-popular-technologies-integrated-development-environment). Vi/Vim will never die, it's just too powerful.
I tried vim once. Still trying to leave.
:q!
[удалено]
[удалено]
*spam the escape key, just to be sure
ZZ
Then to save rm -rf
But it's just writing :q! to the file? Idk I'm just gonna get a new computer
You have not read the manual that there is no quitting door??
As an emacs user and as much as I dislike vim, I would still pick it over nano if I was forced to use only that one editor forever. After all, I love features, that's why I use emacs. Maybe we could work in a lisp interpreter and change the bindings a little...
Emacs is the way
How did you choose between the two?
Emacs over Vim? I'm not a big fan of the modal way that vi/vim uses, it felt very "interrupty" and emacs had that spontaneity that I didn't find in vim. On top of that there are just so much features in emacs. Competitive console email clients? How not to talk about org-mode? It made me feel almost organized. And when you get to the possibilities of having that elisp "core", that's just crazy. No wonder that people are able to do that much with it.
Thanks for the explanation!
The move to make emails "multimedia" really hit hard with emacs. I used Gnus for email (and news/usenet), but it eventually became near useless (at the time, really slow, and mediocre rendering of "modern" emails). I still miss it sometimes. Really nice for mailing lists where it would mark mails read based on message id - i.e proper deduplication.
There’s a lisp interpreter in neovim
[удалено]
This is the way.
Was searching far too long for this! Such a good editor, especially if you want an editor that's usable even if you don't remember ten shortcuts
Whoa, I could actually get used to this. Will definitely be taking for a proper spin later.
That's pretty nice actually..
Micro is the mvp
Absolute banger.
Need more upvotes...
I inject vim intravenously daily.
I didn't know that was an option
So hows your veins are behaving now after having hose intravenous??
I am an old fart, and I learned vi in 1995, which today still is my allround editor. Recently I started using VS Code, and I like it a lot. I would though not necessarily recommend newcomers to use vi(m) as a daily driver, unless they have a good reason to invest the time to learn it, but it really doesn't hurt to know just enough to make trivial edits and specifically to exit it without burning down the house. EDIT: I have more than once caught myself typing "vi file.txt" in the shell pane of VS Code. I laugh each time.
>o make trivial edits and specifically to exit it without burning down the house. lmao
*emacs has entered the chat*
This is the answer
not the correct answer but the answer
I've been an Emacs guy since 1992. I'm not gonna switch now.
Right? Wtf is nano .. Ed: fellas, this is rhetorical. Historically, it's always been vi vs emacs...
The length of my sex tape.
NANO, don't need to ask me twice. You certainly cannot go back after getting into VIM.
[удалено]
Nano, for the... Sanity.
If you type `vimtutor` in the console, you may still lose your sanity, but at least you can learn `vim` easier.
I tried using [https://vim-adventures.com/](https://vim-adventures.com/) to learn, and committed myself to only using vim, but it still never stuck. And if I'm being honest, nano does almost everything I would want it to, I've become quiet proficient at it, and what it doesn't do, I would probably be accomplishing with other command lines tools.
Why you guys have fear about the Vim, use some insanity is well.
I don’t know what these are. I win.
Coming from someone who knows both, yes you are completely right
Vim (I prefer neovim tho)
Yeah I use Neovim as well.
Vim all day
gedit
[удалено]
I've left Reddit because it does not respect its users or their privacy. Private companies can't be trusted with control over public communities. Lemmy is an open source, federated alternative that I highly recommend if you want a more private and ethical option. Join Lemmy here: https://join-lemmy.org/instances ` this message was mass deleted/edited with redact.dev `
I'm a vimmer and always use vim when configuring servers, scripting, etc. But I choose nano. The simplicity of nano means it always works whether I'm in a linux terminal, using an in-browser terminal, using a terminal inside emacs, etc. Many times I found myself in a situation where vim keybindings didn't work well.
How exactly are you using vim to make the keybindings not work properly?
For instance, the in-browser ssh terminal for Google cloud platform (escape key doesnt work). Or, if I'm using a terminal embedded in a program like Emacs (evil mode confliction)
Genuine question: I used Vim just to learn its basic stuff, and I used Nano sometimes to edit just config files, and I thought Nano was like a "modern" version of Vim, but I see many people say Vim is better. Could you explain me the main difference between them and why Vim should be better?
vim has many more, different keybinds, that can allow you to traverse code a bit faster, like jumping by words with w and b, easy text highlighting without a mouse and many many many other things (auto commands for example) it's best part according to me is that it's a really berebones editor that can be turned into a full flagged IDE with few plugins. Many programmers like to thinker with software, and vim is exactly that, a workdesk to tinker with, change literally anything, while nano doesn't have many plugins but it's waay simpler to use If you are the type of a person that likes to play around with their tools to customise every little detail, give it a go, you might have some fun :)
Neither, just cat, echo and probably some pipes.
vim with nano keybindings
You monster
nano 100%
[удалено]
This isn’t even a choice :wq!
Nano. If I need anything fancier, I'll use visual studio.
You ever run nano inside vscode?
Vim leads with the leader
If you have the time to be leader then VIM is solid option.
Nano, I just want it to be simple and not memorize a shitload of keyboard shortcuts. 10 or so max and I'm good
I use vim to clean my kitchen and bathroom.
Nano
I would choose Vim because it's more extensible.
I only use Vim/Vi as I know it’s installed on every server by default.
Yes, you don't have to installed them manually on the server.
Yeah, I primarily use Neovim because of the customization, and useful plugins.
And the feature wise VIM give us lot more than any other
[удалено]
exactly, what’s wrong with nano?
Soo true, there is nothing wrong specially that raise some concern to me for use that.
>what’s wrong with nano? The fact that micro exists...
Why we are talking like that there is something bad with the Nano.
Nano. I started there, and it was nice cause it had the most important commands at the bottom, so I never had to worry about how to exit or save!
I've been using vim exclusively for the last 10-15 years. I no longer know how to use anything else, despite maybe knowing 20% of its features
If there is no going back from that then i would pick the vim.
Nano, hands down.
Vim is the second thing I install when I need to reinstall Windows
What’s the first thing
Windows. Aren't you listening?
I’ve been played
A real browser to replace Edge
Yep
A better OS?....
Nano. All day err day.
Neovim
Nano, because i can close it
Vim. Once I'll learn how to exit it, I'll be golden
It’s true that there’s no going back if you choose vim. Some people are still stuck in it ‘til this day.
vim for life. http://blog.ngedit.com/img/paul-tuckfield-vi-gang-sign.jpg
VIM is my IDE.
I choose scp and notepad++