Vim: Clearly evil, lightning fast. Relies on vimscript for any interactivity and can barely be used outside of the editor.
Emacs: the hippie brain child of some of the brightest minds at the MIT AI lab, funded by military contracts. Slow, but uses a near-universal language that can easily escape the bounds of the editor, (and often does (, and holy shit where did those parentheses come from. (Oh no, it’s becoming self-aware - fly you fools…!
thingsiplay@beehaw.org
on 02 Sep 2024 10:36
collapse
Vim: Clearly evil, lightning fast. Relies on vimscript for any interactivity and can barely be used outside of the editor.
I don’t know why you want use Vimscript for anything outside of the editor. But if that your issue, then there is Neovim. It uses Lua instead Vimscript, but what is the benefit of using Lua outside of Vim? That changes nothing.
tetris11@lemmy.ml
on 02 Sep 2024 10:40
nextcollapse
Lua outside of Vim has huge applications in embedded products. Dude I would kill for Lua. Do you know what we have? Common Lisp. Yeah, it’s great and fancy and all, but try adding that to your CV and applying for an embedded system job.
thingsiplay@beehaw.org
on 02 Sep 2024 10:42
collapse
My point is, then use Lua outside of Vim. What does this have anything to do with the language used in Vim? You can use Vimscript in Vim, and still use Lua outside of Vim. So what’s the problem? It’s not like Lua gets available to you outside of Vim, just because you switch to Neovim. What do I miss here?
(it was mostly a joke, but) the skills you acquire tinkering your Vim to your needs using vimscript can’t be used elsewhere, whereas Emacs has the (small) advantage that at least most of one’s elisp skills can be translated to common lisp quite easily (with the joke being that common lisp really isn’t that useful, hence my Lua jealousy rant).
It uses Lua instead Vimscript, but what is the benefit of using Lua outside of Vim?
The only other (in fact, the first) place I’ve run into Lua is WoW plugins.
thingsiplay@beehaw.org
on 02 Sep 2024 12:05
nextcollapse
But WoW plugins have nothing to do with Vim. That’s my point. You can use Lua in WoW, while using Vimscript in Vim.
PlexSheep@infosec.pub
on 02 Sep 2024 18:46
collapse
Factoring mods also use lua. Lua is a neat little extension language.
NeoNachtwaechter@lemmy.world
on 02 Sep 2024 08:13
nextcollapse
Nah… vim users fight emacs users, but not nano users. Wrong league. We do not beat little children ;)
skittlebrau@lemmy.world
on 02 Sep 2024 09:02
nextcollapse
Nano is more like fast food. It’s easy and convenient, but it makes you feel a little guilty and dirty afterwards.
ggppjj@lemmy.world
on 03 Sep 2024 11:03
nextcollapse
Nano is the tool that people use when they don’t have a need for TUI editors in general and therefore don’t want to have to memorize how people with teletypes decided things should have been done 75 years ago and who also don’t want to get dragged into endless pointless bickering arguments about which set of greybeards was objectively right about their sets of preferences.
I’m glad people enjoy the editors they use and also I just wanna change a single fuckin line in a config file every once in a while without needing to consult a reference guide.
wise_pancake@lemmy.ca
on 03 Sep 2024 12:46
nextcollapse
I don’t have much to say about nano, except the hotkey bindings are weird and unnatural.
And yet Emacs users don’t fight vim users. Emacs users decided vim’s interface was pretty cool and added it to Emacs. Somehow people still call it a war though.
kata1yst@sh.itjust.works
on 02 Sep 2024 11:37
collapse
Bruh 😂 the Emacs user community absolutely constantly shit on Vim users. When they added Vi(m) bindings they literally named it ‘evil mode’, and they constantly make fun of people who use it, and spacemacs, and the latest flavor of (neo)vi(m), and all the extensions necessary to make vim halfway useful as an ide, etc etc etc.
amw3i7dwgoblinlabs@lemmy.world
on 02 Sep 2024 12:53
nextcollapse
Evil or the extensible vi layer is super popular and improves the one area that emacs was lacking
i prefer the emacs keybinds but have never seen peeps chat shit about it
Which Emacs community? I’ve been following it for ages in a few places (Reddit is the most common) and I literally do not encounter any of that. Calling it evil was humor - as if people who went to all the bother making it would be trying to push people away…
Using the evil package is very popular and often recommended, which means literally using it like vim, but with all the Emacs ability on top. I don’t know what on earth you’re talking about.
kata1yst@sh.itjust.works
on 03 Sep 2024 01:26
nextcollapse
Oh to be clear, it’s all humor. At least mostly, I’m sure there are RMS level fanatics somewhere that truly believe some of the BS.
This is something as old as time. I’ve seen it prolifically on Reddit (though not in the Emacs community, they generally discourage memes), various Linux forums, old Usenet, various programming forums… I’m not trying to be evasive, but it’s hard to provide examples that aren’t specifically cherry picked, which wouldn’t benefit the conversation much.
Opisek@lemmy.world
on 03 Sep 2024 07:11
nextcollapse
How close to vim’s functionality is evil mode? I’ve been toying with the idea of learning Emacs but I rely on Vim’s langmap and that is rarely implemented in Vim emulations / bindings.
Although I came from vi (pre-vim and pre-evil) and still have the muscle memory, I don’t and haven’t used it myself.
I hear it described as a “nearly complete” and “very comprehensive”. There is definitely a solid community of people using and enjoying it, but on the other hand there are always some reports of getting tired of having to work through, and sometimes extend, an additional interface layer, so in the long run being happier to just adopt the default bindings.
I know there are a few areas where trying to follow common vim workflows doesn’t work as well. Historically the performance of line number display been weak in Emacs, though I believe it’s recently much improved. A lot of people seem to make heavy and constant use of it in vim but conversely for me (and I think it’s more common in Emacs) it’s only an occasional, transient need when some external log or error quotes a line number, so I have them only displayed when I hit the go-to-line binding.
Overall, I think the most frustrating issues people have trying to adopt Emacs from vim are due to trying to impose their specific familiar vim workflows. The most obvious example is people concerned with startup time, but for more typical Emacs workflows it’s a non-issue. Users typically stay in Emacs rather than jumping in and out of it from a terminal (and if you really want that workflow, you run one instance as a daemon and pop up a new client to it instantly). My Emacs instance’s uptime usually matches my computer’s uptime.
The draw of Emacs is not about it only being an editor so much as a comprehensive and programmable text environment. It is a lisp-based text-processing engine that can run numerous applications, the primary being an editor (the default, or evil, or others…) but also countless other applications like file managers, VC clients, subprocess management and many others. It 95% replaces the terminal for me, and many other tools. So it’s the environment through which you view and manipulate all things text that is very accessible to modify and extend to fit your needs. Hence the joke about it being an OS is pretty apt, though to believe it needs a good editor implies vim isn’t a good editor ;).
wise_pancake@lemmy.ca
on 03 Sep 2024 12:54
collapse
Same here.
The biggest diss I have on emacs users, as a vim user, is that emacs is the only text editor where people routinely need to keep a book about it on their desk!
I used to work with a bunch of emacs guys and they all had an emacs book or two on their desk or as a monitor stand. They usually also had one on awk and/or Perl to go with it.
I’m sure they’d probably make fun of me for being unable to edit a file with anything but my specific vim config, which is not compatible with any other human’s vim config.
(I would never seriously judge someone on their editor, but I will bust an emacs users chops and accept a good natured jab back)
dysprosium@lemmy.dbzer0.com
on 02 Sep 2024 08:20
nextcollapse
For vim I had to config or install something just to be able to COPY something to use outside vim, how backwards is that? Isn’t this the most standard feature one can expect to work as default?
gnutrino@programming.dev
on 02 Sep 2024 09:34
collapse
Once again proving that the easiest way to work out how to do something in vim is to post something along the lines of “vim sucks because it can’t do x” online :)
flying_gel@lemmy.world
on 02 Sep 2024 10:03
nextcollapse
You mean you couldn’t copy some text from vim and paste it into another application?
if yes, what did you have to install/configure for that? I’ve never had any issues copy paste from/to vim, console/GUI windows/Unix.
dysprosium@lemmy.dbzer0.com
on 04 Sep 2024 07:40
collapse
Sadly I don’t remember. Sometimes it comes preinstalled, sometimes not, depending on OS or something. (Maybe Manjaro gnome). I could copy and paste inside of vim, but not to/from outside vim.
flying_gel@lemmy.world
on 05 Sep 2024 00:34
collapse
What you observes could be OS depended,. Vim has its own copy paste buffers (y,p etc) and the OS has its own. Traditionally highligh to copy and middle mouse button to paste on Unix. Windows has 2 methods, ctrl-c,v but those are also bindings in vim so only the older less known crtl-insert,shirt-insert works.
Copy paste is definitely built in, there is no need for extra plugins.
it actually does work by default, you just probably missed how to do it in the help pages in vim. For those curious, the system clipboard is its own named register in vim (:help registers to learn more) and can be accessed with either “* or “+ depending on your how your system is configured.
To copy a line: ”*yy or ”+yy
To paste a line: ”*p or ”+p
dysprosium@lemmy.dbzer0.com
on 04 Sep 2024 07:35
collapse
So I need to dive into the manual to do something as basic and universal as “copy and paste”? Why not make it Ctrl+shift+c or have it shown in the info text when pressing this almost universally accepted keypairs? Or at least make it somewhat similar to this. I find it bonkers why some programs decide to just have radically different shortcuts or defaults, the complete opposite of what feels intuitive. Same with the design of some doors that need actual SIGNS on them to tell you which direction they open. Just bad design choice.
Edit: just remembered. Same story with tmux. Want to copy something? Surprise, it’s not anything you expect it to be. Some ctrl+b + [ or some shit
737@lemmy.blahaj.zone
on 02 Sep 2024 08:31
nextcollapse
stop using nano, if you want a non modal editor use vim -y
ObsidianZed@lemmy.world
on 02 Sep 2024 14:49
collapse
tips fedora M’eveloper
socsa@piefed.social
on 02 Sep 2024 12:38
nextcollapse
The M stands for beefcake
PlexSheep@infosec.pub
on 02 Sep 2024 18:40
nextcollapse
That acronym usually stands for “Input Method Editor” and describes the program that makes people able to type east Asian characters with a usual keyboard.
日本語は楽しいです。
nieceandtows@lemmy.world
on 03 Sep 2024 16:15
collapse
Integrated Memeing Environment
jmcs@discuss.tchncs.de
on 02 Sep 2024 09:20
nextcollapse
Easy is relative. What are you trying to do? Replace a value in an yaml file? Then nano is easier. Trying to refactor a business critical perl/brainfuck polyglot script in production? Then you probably want to use vim (or emacs if you are one of those people)
grysbok@lemmy.sdf.org
on 02 Sep 2024 16:37
nextcollapse
Walk someone else through editing a config file on the command-line over screenshare? Nano. Omg nano is your friend.
spongeborgcubepants@lemmy.world
on 03 Sep 2024 10:13
nextcollapse
Replacing a value in a config file is still easier in vim due to e.g. ciw or ci" being a thing.
notfromhere@lemmy.ml
on 03 Sep 2024 12:52
collapse
Honestly, roll back to previous release for production and use best IDE your developers are used to on their local machines, test the fix in a non production environment then release to prod. When is editing business critical scripts in production really needed?
jmcs@discuss.tchncs.de
on 03 Sep 2024 15:58
collapse
It was a joke to make the point that vim can be the easiest tool to use if you are trying to do a complex task.
notfromhere@lemmy.ml
on 03 Sep 2024 16:22
collapse
I’m a bit slow on the uptake there haha. I started with vi and moved over to nano at some point and never looked back. I can refactor code in production with the best of them. There’s still some tricks I’ve seen done in vi that amazes me that I haven’t tried to figure out in nano, but for the most part it’s fairly easy to use to do nearly anything in. Even supports color for supported files, YAML, etc.
Dasnap@lemmy.world
on 02 Sep 2024 09:30
nextcollapse
I started on Unix systems using Vim, so I find Nano to be the confusing editor. A Vim install is one of the first things I do on a new server.
brokenlcd@feddit.it
on 02 Sep 2024 09:48
nextcollapse
Ed users entered the chat
bizdelnick@lemmy.ml
on 02 Sep 2024 09:50
nextcollapse
Vim (or emacs, or any other advanced text editor) is much easier to use than nano when you need to do something more complex than type couple of lines.
tetris11@lemmy.ml
on 02 Sep 2024 10:22
nextcollapse
(…once you learn the bindings)
Jean_le_Flambeur@discuss.tchncs.de
on 02 Sep 2024 11:51
nextcollapse
Better? Maybe!
More efficient? Surley!
But easier?! Hell no! Easy means you can use it without a lot of training or studying. It is self explanatory. And there is no way on earth that vim is easier than nano. I don’t need to know anything to use nano I need to check docs for hours before I can even start using vim
bizdelnick@lemmy.ml
on 02 Sep 2024 12:14
nextcollapse
It is easier after you learn basics. Learning is not easy, but usage is.
Jean_le_Flambeur@discuss.tchncs.de
on 02 Sep 2024 12:55
collapse
Well okay by that logic playing Beethoven on piano is super easy
GammaGames@beehaw.org
on 02 Sep 2024 15:41
nextcollapse
Right, it’s remembering them and using them efficiently that’s hard. It’s amusing watching coworkers try to flex in vim and then struggle at the most basic tasks.
No, some piano plays are still harder than others, mo matter how long you practice. Editing text with vim is easier than with nano after some practice.
Jean_le_Flambeur@discuss.tchncs.de
on 04 Sep 2024 17:25
collapse
If something is “easy to use” this includes the time you need learn said thing.
Drinking rahmen from the bowl is easier then using chopsticks (even if you are more elegant with chopsticks)
Driving automatic is easier then driving manual (even if you may be more efficient with manual if you practised shifting a lot)
Walking is easier then flicflacs (even if you may be faster with flicflacs if you practised a lot)
Using Ubuntu is easier than using arch (even if arch gives you more control and opportunities if you understand it)
This makes it seem like jerking off to MILF porn is hard because there is a learning curve
leisesprecher@feddit.org
on 02 Sep 2024 11:53
collapse
And how often does that happen in the real world?
VIM may have been a very useful tool 20 or 30 years ago, but today it’s nothing else but a tool for one’s sense of superiority. It’s the vinyl of editors.
If you have to type that much code in a terminal, your infrastructure is outdated. Simple as that.
bizdelnick@lemmy.ml
on 02 Sep 2024 12:13
nextcollapse
Every day in my case, except holidays.
leisesprecher@feddit.org
on 02 Sep 2024 12:53
collapse
timbuck2themoon@sh.itjust.works
on 02 Sep 2024 12:36
nextcollapse
Yes it’s so outdated that mostly every IDE offers usage with its keybindings.
Chewt@beehaw.org
on 02 Sep 2024 14:12
nextcollapse
You seem to believe that people only use the terminal if they HAVE to. I doubt anybody these days HAS to type any amount of code in the terminal, but choose to anyway. Like probably anyone else I have access to modern tools and infrastructure, but I choose to do work in the terminal because I’m more productive there. I use (neo)vim because I like it more than any other text editor I’ve used, and have no problem writing code and debugging in the terminal.
leisesprecher@feddit.org
on 02 Sep 2024 15:33
collapse
You’re using the terminal, because you’re used to it. It is not the better tool, it’s simply what you happen to know already.
People who argue with productivity because of some key bindings live in the world of the 80s. You don’t just sit there and type code 12h a day, that’s not how modern software development works.
And all those blockheads down voting me are caught up in their weird superiority complex. They are the powerful superhackers, and don’t understand that we are just highly qualified plumbers.
I’m actually fairly young and wasn’t around in the 80s. I graduated college with a CS degree in the past 5 years, where I was exposed to many different tools and software. What did I come out of that experience with? I like the terminal more than any IDE I had to use in any class.
Now in the real world, we don’t always get to use our favorite tools for every task, obviously. I do need to use other, more enterprise, software from time to time for work. But whenever possible I go to the terminal because I’m faster there, and I can quickly automate things.
I’m not saying the terminal is the best tool for every job, I’m just saying it is the best for ME. Notice I’m also not putting down other tools here. It seems to me like you might be the one with a superiority complex.
leisesprecher@feddit.org
on 02 Sep 2024 16:51
collapse
No, I’d argue you simply didn’t want to invest in the other tools.
Think about it, you probably spent hours on customizing and automating vim, and then say you’re faster in that. Well, that’s called a habit.
IDE are objectively more powerful and since you can actually see options and navigate quickly, you don’t need to memorize every obscure feature.
All the terminal editor enthusiasts are actively holding us back, because they insist everything outside vim is garbage for enterprise and kiddies.
If your tool of choice is actively hostile to new users for no reason other than “that’s how it’s always been, and thus it’s better”, well then you’re digging a moat to automate your gatekeeping.
vim + terminal is actually objectively more powerful than any IDE, and most IDEs include a way to pull up a terminal as a crutch for things they can’t do. In any case It seems you can’t be reasoned with. Your argument is just a strawman about what you say other people are saying.
Theharpyeagle@lemmy.world
on 02 Sep 2024 15:41
nextcollapse
I actually use VIM bindings in PyCharm, slightly cursed but actually works really well and meshes fairly nicely with the other IDE shortcuts. Being able to use it in any terminal is a nice bonus.
VIM may have been a very useful tool 20 or 30 years ago, but today it’s nothing else but a tool for one’s sense of superiority. It’s the vinyl of editors.
So, because you don’t understand something, it’s outdated?
If you have to type that much code in a terminal, your infrastructure is outdated. Simple as that.
Ok, I can see you have no idea what you’re talking about.
leisesprecher@feddit.org
on 02 Sep 2024 16:44
collapse
I understand it very well. And that’s exactly why I’m writing this.
Ok, I can see you have no idea what you’re talking about.
Then say, grandmaster delusion, what purpose does vim serve, where it is actually the best tool? Writing code? Hardly, it’s way too limited and requires a ton of upfront investment and headspace. Writing config files? Hardly, because if you write these by hand, you’re living in the 90s, that’s what Ansible, Terraform etc are for.
You just don’t want to admit, that vim is nothing more than a habit. Muscle memory.
m4m4m4m4@lemmy.world
on 02 Sep 2024 09:52
nextcollapse
The problem I had with nano is that, for the time being, it was supposed to be easy to use. With that in account I always get lost when saving a file and closing the thing because one’s used to doing something else with Ctrl+O and Ctrl+X.
Whereas with Vim (and Neovim for a little while, and now with Vis) I knew it had a steep learning curve from the start so I always had it in mind. And all the funny stories about quitting vim.
tetris11@lemmy.ml
on 02 Sep 2024 10:21
nextcollapse
they’ve changed those bindings now, Ctrl+S, Ctrl+X, Ctrl+V, and Ctrl+C all do what you think they do
m4m4m4m4@lemmy.world
on 02 Sep 2024 11:15
nextcollapse
Great, now the next time I’ll use nano I surely will forget about this and get frustrated when trying to save a file with Ctrl+O
psycho_driver@lemmy.world
on 02 Sep 2024 15:29
nextcollapse
I mean quitting vim isn’t hard you just reset the computer.
grysbok@lemmy.sdf.org
on 02 Sep 2024 16:35
collapse
The problem with using nano for years is that I now try using nano shortcuts in other programs. Random new windows opening is confusing, until you figure out Ctrl+o isn’t save in that program. Then it’s just annoying because you still have your inappropriate muscle memory.
MouseKeyboard@ttrpg.network
on 02 Sep 2024 10:36
nextcollapse
gedit supremacy
NOOBMASTER@lemmy.ml
on 02 Sep 2024 10:40
nextcollapse
isn’t there a separate instance for memes?
unknowing8343@discuss.tchncs.de
on 02 Sep 2024 10:44
nextcollapse
In every post of this kind I am amazed at so many people using nano instead of micro which is SO MUCH BETTER while being the same thing at the same time.
walden@sub.wetshaving.social
on 02 Sep 2024 12:44
nextcollapse
Holy cow. You can use your mouse with micro. Amazing.
unknowing8343@discuss.tchncs.de
on 02 Sep 2024 13:00
nextcollapse
And all the shortcuts are SANE, not the weird thing of nano
You can change that in the nanorc along with changing key binds, colors, and the like.
ObsidianZed@lemmy.world
on 02 Sep 2024 14:53
nextcollapse
When you help manage thousands of servers with vim and nano already installed, it’s just faster to use one of those than installing something else nearly ever single time.
I prefer nano for quick edits of small files, but vim for hunting down things in larger files.
unknowing8343@discuss.tchncs.de
on 02 Sep 2024 15:10
collapse
Or you can preinstall micro like you preinstall everything else 😅
ObsidianZed@lemmy.world
on 02 Sep 2024 15:47
collapse
I’m not that high on the totem pole unfortunately
RandomlyRight@sh.itjust.works
on 02 Sep 2024 15:19
collapse
I’ve discovered it just a few days ago and now use it on all my machines
I started on Emacs and then didn’t use it for a few years and forgot everything so now I’m stuck on Nano. But that’s fine because nano does everything I want it to do.
AnUnusualRelic@lemmy.world
on 02 Sep 2024 11:29
nextcollapse
The first time I found myself in nano was when testing a distro fifteenor twenty years ago. I had to edit some files and it was the only available editor. The damn thing was a horror to use. I still have no idea who it caters to. I haven’t had to use it since though.
Jean_le_Flambeur@discuss.tchncs.de
on 02 Sep 2024 11:49
collapse
Dunno what you used, but nano is literally a text editor that may be simple simple but it just works. Shortcuts are shown to the user, buttons work like you expect them to (arrow keys, ESC, shift, etc)
With vim you open it and if you haven’t read 5pages of doc you won’t even be able to close it again. I see that its useful for power users, but for casuals who just want to edit a config once in a while nano is absolutely the way to go imho
AnUnusualRelic@lemmy.world
on 02 Sep 2024 17:15
collapse
It’s not that simplle or user friendly when none of the usual shortcuts work. C-a did something completely unexpected.
Jean_le_Flambeur@discuss.tchncs.de
on 03 Sep 2024 08:49
collapse
Well its shown to you at the bottom of the screen what it does…
And if you want Ctrl v,c,s etc. To work like in word etc you can always use nano --modernbindings
AnUnusualRelic@lemmy.world
on 03 Sep 2024 14:08
collapse
They’re in Linux now, it should show the shortcuts they’ll encounter everywhere. Not leftovers from another system.
Jean_le_Flambeur@discuss.tchncs.de
on 04 Sep 2024 19:22
collapse
I am with you in this one!
MonkderVierte@lemmy.ml
on 02 Sep 2024 11:58
nextcollapse
There’s always ed for masochists.
imouto@lemmy.world
on 02 Sep 2024 13:18
nextcollapse
Ed, man! !man ed
The_Zen_Cow_Says_Mu@infosec.pub
on 02 Sep 2024 16:47
collapse
MonkderVierte@lemmy.ml
on 02 Sep 2024 18:25
collapse
What’s with this childish rant?!
ReCursing@lemmings.world
on 02 Sep 2024 12:03
nextcollapse
Ugh, I swear vi and it’s derivatives are the absolute worse text editors going. There may have been reasons thirty or forty years ago, but now it’s just complexity and a weird ui for the sake of it
matthewmercury@reddthat.com
on 02 Sep 2024 12:17
collapse
I use VS Code on the desktop nowadays, but vi will always be my editor of choice in a terminal. Many of the reasons it was powerful and ubiquitous 30 years ago are still valid, so it’s still powerful and ubiquitous. And I’ve been using it for thirty years, so why would I switch to a training-wheels editor?
ReCursing@lemmings.world
on 02 Sep 2024 12:31
collapse
Because you want to get out of your Stockholm syndrome?
matthewmercury@reddthat.com
on 02 Sep 2024 12:38
collapse
Stockholm Syndrome was never real, it was made up to explain a situation where hostages recognized an injustice and refused to perpetuate it, so cops called them crazy. So sure, if you call me crazy for my affection for a tool that has served me well for decades, I’ll consider you a cop.
ReCursing@lemmings.world
on 02 Sep 2024 13:50
collapse
Okay… because you refuse to actually look at whether there are better options than the absolute trash you are using because you are used to it
BaroqueInMind@lemmy.one
on 02 Sep 2024 14:10
collapse
I’ve used other options and carefully elaborated them all, vim remained a superior tool.
ReCursing@lemmings.world
on 02 Sep 2024 15:24
collapse
Because you’re used to it. No other reason
BaroqueInMind@lemmy.one
on 02 Sep 2024 15:31
nextcollapse
No other reason
Yep 🙄
matthewmercury@reddthat.com
on 02 Sep 2024 20:34
collapse
What’s the superior choice to vim, then?
ReCursing@lemmings.world
on 03 Sep 2024 12:28
collapse
Literally anything up to and including poking yourself in the eyes and trying to develop laser vision to manually modify bits on the disk platter
matthewmercury@reddthat.com
on 03 Sep 2024 12:30
collapse
See, you’ve realized your blunder, now. Tell us what editor you use in the terminal, ReCursing, the one that is better than vim. We’d love to know.
ReCursing@lemmings.world
on 03 Sep 2024 12:42
collapse
If I am forced to use an editor in the terminal, nano generally. But I very rarely need to because I have a functioning modern computer from within the last 25 years and therefore have a gui I can rely on. If I somehow manage to break the gui in a way that requires me to edit a text file (itself very very rare) I can fix it with nano.
Now, why would you voluntarily use an editor with a ui that’s needlessly confusing and convoluted, an arse to learn, and notoriously difficult to even save a file and close without checking help files if you haven’t already memorised completely random key combinations? I would say we’d love to know, but we already do. It’s because you’re an arrogant dickwad - at least that’s what your last comment makes you look like
matthewmercury@reddthat.com
on 03 Sep 2024 13:01
collapse
It’s because my job involves managing and operating systems that are only accessible through ssh or tty sessions. I spend hours every day in a terminal, on a remote session, frequently editing files for stuff: crontabs, configs, etc.
I learned vi because when I was coming up, university systems only had ed, vi and emacs, with pico on the servers that had pine for email. I learned vi because it was more powerful than pico (and because I couldn’t get the hang of emacs key combos). I read the help files and learned how to use it, because it was foundational.
Every Unix-like system has a variant of vi. Many of my container images don’t, but it’s trivial to install and use anywhere if needed.
It’s just a more powerful tool than nano, and consequently more difficult to use. Which is fine, man. It’s okay for you to use a basic text editor on the rare occasion you have to edit something in a terminal. You don’t have cause to learn how to be productive in an advanced editor, and that’s fine.
For what it’s worth, when I’m writing and testing python, I use VS Code.
ReCursing@lemmings.world
on 03 Sep 2024 17:21
collapse
It’s more powerful than nano, sure, but it’s also needlessly more complex a ui. Your use case is legit and that you know vi is a reason to continue using it, but it absolutely should not ever be the default for anything any more!
kuneho@lemmy.world
on 02 Sep 2024 12:07
nextcollapse
Varyag@lemmy.dbzer0.com
on 02 Sep 2024 14:21
collapse
oohh that is nice, I think I’ll swap my nano to that.
Kaput@lemmy.world
on 02 Sep 2024 12:09
nextcollapse
Isn’t this supposed to be VIM vs Emac? What’s is there point to be programming in the terminal anyway? Nano is good to fix some config files while your are in there, but if I needed to do real programming I’ll be finding something that works in the GUI.
Oh it’s about speed. What’s the one that get your brain to be faster at programming? I use 4 fingers typing and am still typing much faster than I can think.
cakeistheanswer@lemmy.dbzer0.com
on 02 Sep 2024 13:10
nextcollapse
Definitely worth running through vim tutor at least once.
It’s beyond typing speed, things like piping out strings to utilities is using one program to write another, you aren’t just getting faster because of access, it’s a paradigm shift.
Edit just for fun: im a non Dev dummy who happened to grow up in a Unix household. Even having dropped vim for helix and bounced around the MS admin/Apple IT space for 30+ years. When I switched to Linux I could still remember binds I’d set up and last used at 9.
Kinda like riding a bike.
expr@programming.dev
on 02 Sep 2024 16:38
collapse
It’s speed, but it’s also flow and a continuous stream of thought. If all your editing is being done with muscle memory and minimal thought, you can continue thinking about the problem at hand rather than interrupting your thoughts process to fumble through some context menu to make a change.
corsicanguppy@lemmy.ca
on 02 Sep 2024 13:08
collapse
supposed to be VIM vs Emac?
30 years ago it was vi vs everything. I don’t see it changed today.
RxBrad@infosec.pub
on 02 Sep 2024 12:11
nextcollapse
The Holy Trinity: VIM, Arch, and Rust
A7thStone@lemmy.world
on 02 Sep 2024 12:23
collapse
That’s a weird way to spell Vim, Arch, and C
amw3i7dwgoblinlabs@lemmy.world
on 02 Sep 2024 12:45
collapse
Seems you have a little typo, Emacs, Arch, and C
krakenfury@lemmy.sdf.org
on 02 Sep 2024 13:29
collapse
Fixed it for you: VSCode, Red Star OS, and sh
Telorand@reddthat.com
on 02 Sep 2024 14:11
collapse
MidsizedSedan@lemmy.world
on 02 Sep 2024 12:27
nextcollapse
I once fixed my bashrc file with libreoffice
deuleb_biezelbob@programming.dev
on 02 Sep 2024 12:30
nextcollapse
calm down satan
voracitude@lemmy.world
on 02 Sep 2024 12:45
collapse
I regularly fix my bashrc file with Notepad. I run it in Wine because I cbf to RealVNC from my Windows CE media server.
(n.b: None of this is real, I wrote it to upset people, I’m sorry)
riodoro1@lemmy.world
on 02 Sep 2024 12:48
collapse
Well let me upset you.
Ive been helping my coworker on a call and he was sharing his screen. I told him to edit a file (add a line) on a linux box we develop and he copied the file to his windows host with winscp, edited it in notepad and copied it back. I fantasize about killing him ever since.
voracitude@lemmy.world
on 02 Sep 2024 13:00
nextcollapse
That’s crazy! At my job, I just help our users. I don’t have to build (and then maintain) infrastructure with them.
dgriffith@aussie.zone
on 03 Sep 2024 03:36
collapse
They need to learn how to use their tools better. Winscp does all that transparently for you if you press F4 on a file on a remote system. Or maybe they did and you just didn’t see it…
It’s quite a handy function when you’re diving through endless layers of directories on a remote box looking for one config file amongst many.
SexualPolytope@lemmy.sdf.org
on 02 Sep 2024 13:34
nextcollapse
I prefer Office 365 online.
nieceandtows@lemmy.world
on 03 Sep 2024 16:14
collapse
Come back after your uploaded it to the cloud and edited it using Google docs.
socsa@piefed.social
on 02 Sep 2024 12:37
nextcollapse
Vim is way easier tho
GustavoM@lemmy.world
on 02 Sep 2024 12:47
nextcollapse
Nano is my “daily drive”, but I’d use vim as well – takes a couple seconds to search for “how to type in linux vim” and “how to save a file in linux vim” anyways. :^)
I know i and :wq and that’s all I ever plan on learning
theshatterstone54@feddit.uk
on 02 Sep 2024 23:15
collapse
Not even Basic Command-Count-motion like c3w aka change 3 words after cursor, or d3b delete 3 words before the cursor?
To that, you add the
D aka delete command
C for change
Y for yank (copy)
So yy to yank line, or dd to delete line.
Also p for paste
Also, i sends you before the cursor, a sends you after. Capital I is insert at beginning of line, Capital A is insert at end of line (append).
I terms of motions and moving around, you need: hjkl, C-d and C-u (half page jumps down and up), and within the line: 0 or ^ for beginning of line, $ for end (taken from regex), w for moving by word forwards, b for moving by word backwards. That’s pretty much all you need imo. There is also t and f. Where t goes forwards (think 'till aka until). Like dtc delete until the c character. F is the same but goes backwards in the line rather than forwards.
Remember you can use these with xommands, so d$ deletes until the end of the line. Or “dt.” deletes till the “.” so… yeahI know there’s more, but that’s all you need for Normal and Insert mode imo.
For Visual mode, you only need to know how the Visual modes work. Visual (v), Visual Line (Shift-v) and Visual Block (Ctrl-V).
Also, for visual mode, it might be helpful to learn how to use V-Block to comment out multiple lines at once. Can’t be bothered to go into it.
But I’d argue that’s all there is to learn about vim keys in terms of getting work done.
Not gonna lie, once you’re getting past single button combos, I’m mentally checking out. Ctrl+K and Ctrl+U in nano are good enough for me, and if I need to do something more complex like actual coding, I’ll use an editor with a full GUI as well.
theshatterstone54@feddit.uk
on 03 Sep 2024 07:51
collapse
Fair enough. I basically gave you a large chunk of vim so it will feel super overwhelming. The trick is to do one command or combo at a time. For example, I started with dd. Then I added yanking. Then I added visual mode. Then I added “o” (which I think I forgot to mention: o creates a newline under the current one and puts you in insert mode. Capital O does the same but above the current line). The real trick is going little by little. And to be honest, there are some commands I still rarely use or forget to mention. I’ve never used f instead of t. And in terms of forgetting to mention, there’s the x command which deletes the single character under the cursor rn.
Also, I’m sure someone will find this list helpful, so on top of this, I’ll also add this video (and hope that Piped bot will appear): www.youtube.com/watch?v=RSlrxE21l_k
It contains some things I haven’t mentioned.
As for learning all this, I’m repeating myself for the third time. Do it little by little. And when a command is already a thing you do almost without thinking about it, you’re ready to add more.
I’m mentally checking out
Why? dw is delete word, c5b change 5 words backwards, and those are the most complicated commands you’ll ever get to use, unless you start adding cuatom keybinds.
But I digress. If you don’t want to learn it, it’s fine.
riodoro1@lemmy.world
on 02 Sep 2024 12:51
nextcollapse
Average vim user: vim is easy.
Also average vim user: literally hours of reading tutorial pages on how to use vim.
barsquid@lemmy.world
on 02 Sep 2024 13:22
nextcollapse
It is easy, though? I cannot even use it correctly. I just know some of the commands and that if you hold down shift it goes backwards.
Voytrekk@lemmy.world
on 02 Sep 2024 13:50
nextcollapse
I’m a vim user and I would say it’s not. It’s very powerful, but only once you become familiar with the commands.
Nano is a better default for the average user because it works in a way most users would expect for a text editor to work.
ysjet@lemmy.world
on 02 Sep 2024 19:24
nextcollapse
Honestly, these days it’s pretty simple. The thing you need to remember is that you do not need to know EVERYTHING all at once. Learn a little bit, use it, keep what you use, discard what you don’t, get it in muscle memory, and learn a bit more. Very quickly you’ll be zooming through vim.
You can learn the basics, and go from there- the basics of vim (which imo everyone should know- vi is often the fallback editor), and then you can just casually learn stuff as you go.
Here’s the basics for modern default/standard vim: Arrow keys move you around like you expect in all ‘modes’ (there’s some arguments about if you should be using arrow keys in the vim community- for now, consider them a crutch that lets you learn other things). There’s two ‘modes’- command mode, and edit mode.
Edit mode acts like a standard, traditional text editor, though a lot of your keybinds (e.g. ctrl-c/ctrl-v) don’t work.
Press escape to go back into command mode (in command mode, esc does nothing- esc is always safe to use. If you get lost/trapped/are confused, just keep hitting escape and you’ll drop into command mode). You start vim in command mode. Press i to go into edit mode at your current cursor position.
To exit vim entirely, go to command mode (esc), and type :wq<enter>.
‘:’ is ‘issue command string’,
‘w’ is ‘write’, aka save,
‘q’ is quit.
In other words, ‘:wq’ is ‘save and quit’
‘:q’ is quit without saving, ‘:w’ is save and don’t quit. Logical.
Depending on your terminal, you can probably select text with your mouse and have it be copied and then pasted with shift-ins in edit mode, which is a terminal thing and not a vim thing, because vim ties into it natively.
That gets you started with basically all the same features as nano, except they work in a minimal environment and you can build them up to start taking advantage of command mode, which is where the power and speed of vim start coming into play.
For example ‘i’ puts you in edit mode on the spot- capital i puts you in command mode at the beginning of the line. a is edit mode after your spot- capital A is edit mode at the end of the current line.
Do you need these to use vim? Nope. Once you learn them, start using them, and have them as muscle memory, is it vastly faster to use? Yes. And there’s hundreds of keybinds like that, all of which are fairly logical once you know the logic behind them- ‘insert’ and ‘after’ for i/a, for example.
Fair warning, vim is old enough that the logic may seem arcane sometimes- e.g. instead of ‘copy and paste’ vim has ‘yank and put,’ because copy/paste didn’t exist yet, so the keybinds for copy/paste are y and p.
wise_pancake@lemmy.ca
on 03 Sep 2024 13:34
collapse
The second most important thing about vim to learn is:
If nothing is behaving then you probably have caps lock on.
737@lemmy.blahaj.zone
on 02 Sep 2024 18:19
collapse
It’s extremely easy to get started
geneva_convenience@lemmy.ml
on 03 Sep 2024 08:24
collapse
VIM is like drugs. Easy to start, hard to quit.
RedWeasel@lemmy.world
on 02 Sep 2024 13:14
nextcollapse
Worst is when installing a new distro(usually in a vm ) and it defaults to nano and for some weird reason no vi of any sort is installed. I hated nano. Last time I intentionally used something like nano was the 90s with pine I think.
prole@lemmy.blahaj.zone
on 02 Sep 2024 13:41
collapse
What is there to hate? I don’t really understand. It does what it says on the package, and seems to do it pretty well. At least with respect to making small and quick edits to config files in the command line.
RedWeasel@lemmy.world
on 02 Sep 2024 13:44
collapse
My fingers don’t speak it is the problem.
prole@lemmy.blahaj.zone
on 02 Sep 2024 13:53
collapse
Pardon?
ramble81@lemm.ee
on 02 Sep 2024 13:19
nextcollapse
I’ve come to the conclusion, people who use vim just continue to do so out of a stubborn sense of pride for finally learning the key combinations.
psycho_driver@lemmy.world
on 02 Sep 2024 15:22
nextcollapse
That’s funny, I feel the same way about Excel users.
techwizrd@programming.dev
on 02 Sep 2024 15:27
nextcollapse
I am faster, more comfortable, and more productive in Vim. I use the same keybindings in all my editors and IDEs. It’s okay for people to have different preferences.
JustAnotherKay@lemmy.world
on 02 Sep 2024 15:29
nextcollapse
In my case it’s not a sense of pride. I can’t use anything other than Vim because I keep accidentally putting random incantations into my word documents.
“There once was a dduuuZQ:q!”
lemmesay@discuss.tchncs.de
on 02 Sep 2024 17:13
collapse
JustAnotherKay@lemmy.world
on 02 Sep 2024 17:24
nextcollapse
Ya know, I might throw that on to my browser but I doubt I’d actually use it much. I only really use my browser for research; notes, music, and most of my work is done in the terminal. Being able to swap tabs faster by not having to cycle could be useful, but other than that I find the mouse to be a pretty rapid way of navigating unfamiliar pages
lemmesay@discuss.tchncs.de
on 02 Sep 2024 17:29
collapse
in my case, my hand hurts if I use mouse(or a mobile phone) for some time. using j/k for scrolling and clicking links via f help me a lot.
PlexSheep@infosec.pub
on 02 Sep 2024 18:42
collapse
That extension is actually pretty cool. There is also tridactyl and a browser that was made with vim in mind, but a browser and a text editor are too different for many things to translate.
lemmesay@discuss.tchncs.de
on 02 Sep 2024 19:08
collapse
thanks for sharing, I’ll try it on my work machine
hakunawazo@lemmy.world
on 02 Sep 2024 15:34
nextcollapse
It’s just convenient that it’s pre-installed on many servers.
So I can use it now everywhere with my stubborn sense of pride for finally learning the key combinations.
Theharpyeagle@lemmy.world
on 02 Sep 2024 15:37
nextcollapse
I honestly learned it just because I hated having to change hand position to use a mouse.
Treachery4524@lemmy.ml
on 02 Sep 2024 17:16
collapse
Can you use a mouse in nano? I always just use the arrow keys, or page up/down and home/end
I mostly use vim but I barely use the jkl; to navigate the document.
Theharpyeagle@lemmy.world
on 02 Sep 2024 20:20
nextcollapse
Ah sorry, I meant using Vim in a GUI program. I wanted something with the flexibility of a mouse (quick navigation, context menu actions, etc.) without using a mouse. Using just the arrow keys, shift highlighting, etc. is just too slow when writing lots of text, and it doesn’t follow the natural position of typing.
cerement@slrpnk.net
on 03 Sep 2024 00:38
nextcollapse
Even if you use arrows, you still have to reposition your hand.
catshit_dogfart@lemmy.world
on 02 Sep 2024 16:49
nextcollapse
I just use vi
Is that stupid? It’s all I ever bothered to learn, hasn’t failed me yet. Now I’m not some big time linux guru but I’m a sysadmin and regularly find myself elbow deep in a CLI for stuff.
pixelscript@lemm.ee
on 02 Sep 2024 17:01
nextcollapse
I mean, yeah, kind of. In the same way pilots fly planes out of a stubborn sense of pride for knowing what all the flight deck controls do.
Semi_Hemi_Demigod@lemmy.world
on 02 Sep 2024 17:29
nextcollapse
It’s not pride, it’s just that I know how to use it really well and that makes it easy for me to use.
But it’s really only for viewing files on another system over SSH. For local work I use Sublime Text
alexaralvarado@infosec.pub
on 02 Sep 2024 17:35
nextcollapse
Somehow it seems this would apply to any linux user
PlexSheep@infosec.pub
on 02 Sep 2024 18:44
nextcollapse
What do you mean? The vim users know their key combinations pretty well, that’s kind of the point of vim.
TheV2@programming.dev
on 03 Sep 2024 10:40
nextcollapse
There is no sense of pride. Every text/code editor has key combinations that many users will learn eventually. Vim has easier key bindings.
737@lemmy.blahaj.zone
on 04 Sep 2024 03:09
nextcollapse
When you only need to hammer a nail every once in a while, any hammer will do. When you’re a roofer, you better have a roofing hammer.
If you don’t spend your life in a terminal and just need to edit a file, vim isn’t for you. If you want to learn complex strings of arcane wizardry to not only make your life easier but amaze your underlings, use vim.
bluewing@lemm.ee
on 02 Sep 2024 13:21
nextcollapse
Emacs users laughing at VIM users.
Emacs - A pretty good OS you can use as a text editor.
theshatterstone54@feddit.uk
on 02 Sep 2024 23:00
collapse
And to counter the old saying of it lacking a decent editor, there’s always evil-mode.
jaybone@lemmy.world
on 02 Sep 2024 13:35
nextcollapse
You noobs. I just use combinations of cat piped to sed to edit my files, which are mainly lisp code.
WrenHavoc@lemmy.dbzer0.com
on 02 Sep 2024 15:37
nextcollapse
Amateur! I write my code down on a piece of paper, scan it in, send it to my computer through email, then make a custom-built AI read the paper and print it in the terminal!
thevoidzero@lemmy.world
on 02 Sep 2024 15:46
collapse
storage/documents/programs ro
> echo puts "hello world" > main.rb
storage/documents/programs ro via rb
> ls
c js main.rb python
storage/documents/programs ro via rb
> < main.rb grep hello
puts hello world
storage/documents/programs ro via rb
>
JackbyDev@programming.dev
on 02 Sep 2024 19:04
collapse
I think so! I think it’s something like < file works anywhere in the line, not just the end. There may be some specifics about no space when it is the front but I don’t remember lol.
datelmd5sum@lemmy.world
on 02 Sep 2024 20:08
collapse
cat pipeing is safer though.
foobar > file and your file is gone.
wise_pancake@lemmy.ca
on 03 Sep 2024 13:30
collapse
IndustryStandard@lemmy.world
on 02 Sep 2024 13:41
nextcollapse
Micro for the win
Sonotsugipaa@lemmy.dbzer0.com
on 02 Sep 2024 14:36
collapse
No, Micro for the linux
PseudoSpock@lemmy.dbzer0.com
on 02 Sep 2024 16:44
collapse
Nah, win can have it.
AeonFelis@lemmy.world
on 02 Sep 2024 14:09
nextcollapse
I just use this:
#!/bin/bash
keep_generating=1
while [[ $keep_generating == 1 ]]; do
dd if=/dev/random of=$1 bs=1 count=$2 status=none
echo Contents of $1 are:
cat $1
echo
read -p "Try generating again? " -s -n1 answer
while true; do
case $answer in
[Yy] )
echo
break
;;
[Nn] )
keep_generating=0
break
;;
*)
esac
read -s -n1 answer
done
done
thevoidzero@lemmy.world
on 02 Sep 2024 15:48
collapse
Just ask if it’s correct. If not destroy the universe. Only The correct will survive, it’s O(1)
AeonFelis@lemmy.world
on 02 Sep 2024 15:55
collapse
What if there is no correct answer?
thevoidzero@lemmy.world
on 02 Sep 2024 16:00
collapse
It’s not fun when you have to explain it. But basically it is based on the infinite multiverse theory. Since the multiverse splits whenever you make choices, in this case the program would spawn a large number of multiverses each with different combinations of those bits, which means at least one of them would have the exactly the combination we want. If the program destroys the multiverse it is in after it determines it is not correct, only reality that remains is the one with correct combination of bytes. Making it that we will get the code we want on the first try.
AeonFelis@lemmy.world
on 02 Sep 2024 16:10
collapse
You are assuming here that I know what I want. What if there is no obviously correct answer, and even in the Everett branch that generates the optimal content for the file I’ll still think it can be improved and tell it to destroy the universe?
thevoidzero@lemmy.world
on 02 Sep 2024 16:46
collapse
I guess yeah. In that condition the algorithm would probably destroy all universe. Although you might be able to set a threshold and not destroy when it is over the threshold.
But situation where you don’t know the answer is not for this algorithm as this one came from sorting problem.
My problem with those are that I always manage to get lost on where the program has its focus/what kind of instruction is expecting.
And while trying to go back to normal I end up messing it more and more.
Maybe some day I will get there, but it is still not the day.
psycho_driver@lemmy.world
on 02 Sep 2024 15:21
nextcollapse
nano friends rise up!
GolfNovemberUniform@lemmy.ml
on 02 Sep 2024 15:23
nextcollapse
Looks like you only got one so far.
ipkpjersi@lemmy.ml
on 02 Sep 2024 15:34
nextcollapse
Edit a file, writing a quick shell script or whatever in the terminal. Nano is great. I don’t see any use in learning vim or emacs. If I need something more I’m going use a gui editor anyway.
Don’t get triggered anyone it’s just my preference
bigmclargehuge@lemmy.world
on 04 Sep 2024 10:33
collapse
This is my thought process exactly.
I get it, for a power user, vim is probably incredibly powerful. However, I just want to edit text files. I don’t want a text editor where I need a cheat sheet just to save my changes and quit.
Quill7513@slrpnk.net
on 04 Sep 2024 13:30
collapse
Funny, that’s what I hate about Nano. The key binds seem completely random to me and the programs solution to this is to display a cheatsheet on the screen
bigmclargehuge@lemmy.world
on 05 Sep 2024 23:48
collapse
Makes just enough sense to me, and those are really the only three binds I ever need for editing config files.
I don’t want to come off like a vim hater, because I do believe it when people say it’s powerful, but… I don’t need powerful. I just need to edit text files.
Mwa@thelemmy.club
on 02 Sep 2024 16:01
nextcollapse
How do you use these when you are connecting via SSH? You enable X forwarding?
It’s fine when you have a graphical environment, but what do you do when you dont have one?
Mwa@thelemmy.club
on 02 Sep 2024 17:10
nextcollapse
ohh yeahh then nano
Malgas@beehaw.org
on 02 Sep 2024 17:20
nextcollapse
A similar argument is what finally caused the value of the vi family of editors to click in my brain:
They are designed to be fully functional over even the shittiest possible* remote connection. You can’t always count on ctrl, alt, or even the arrow keys being transmitted in a way that is understood by the remote machine.
*Well, I guess the worst possible terminal would be something like an actual teletype, and in that case you’d probably want to fall back to ed or its descendants. To save paper, if nothing else.
Using X forwarding would require you to install big chunks of GNOME or KDE on the server. A better approach is to mount the remote server over SFTP then use KWrite, gedit, whatever, directly on your desktop.
In any KDE app you can connect with SFTP in the open file dialog. Just type sftp://user@server/path and you can browse/open/edit files the remote server. ssh keys+agent make things a lot easier here obviously.
On KDE, there’s also Kate. They used to be totally different apps, but these days, KWrite is a simplified version of Kate. They both use the same text editor component, but Kate adds more IDE-like features.
true but i dont like how they are forced togther so i use featherpad
blazeknave@lemmy.world
on 02 Sep 2024 16:37
nextcollapse
I spent the weekend failing to make my civ mods work, with a thousand lines of notes… 2/3 in, I think “damnit blazeknave. You spend months perfecting this stupid fucking obsidian setup, and you’ve been here in notepad+ like a fucking jabroni.”
linearchaos@lemmy.world
on 02 Sep 2024 16:56
collapse
I do the same all the time with anytype.
I dropped notes into sublime and then go back and put them neatly into any type. I don’t really know why I do it either It takes any type a total of three or four seconds to start up and I have to enter in a passcode. But I only have to do it once. I guess I do have to think about where I’m going to put the document and making sure that it’s tagged correctly, it’s a lot easier just a scribble something into a random text window to forget about for a decade.
blazeknave@lemmy.world
on 03 Sep 2024 02:33
collapse
You mean my 6k Gmail drafts? 😭
I started doing paper pads everywhere and trying to log at end of day.
Steamymoomilk@sh.itjust.works
on 02 Sep 2024 16:46
nextcollapse
Micro is where its @ <3
lennivelkant@discuss.tchncs.de
on 02 Sep 2024 16:51
nextcollapse
Butterfly gang
PseudoSpock@lemmy.dbzer0.com
on 02 Sep 2024 16:51
nextcollapse
There is always the Joe editor, if you like good ol’ Wordstar. :)
ArcaneSlime@lemmy.dbzer0.com
on 03 Sep 2024 16:34
collapse
I’ve been known to watch a fight video there every now and again, yes.
Sometimes you don’t even have the luxury of nano. Any moderately advanced Linux user should probably learn the basics of vi. Just knowing how to insert text and save it can fix a system that’s stuck in recovery. Even if it’s just to add a comment in front of a line in a config file.
Trantarius@lemmy.dbzer0.com
on 02 Sep 2024 17:09
nextcollapse
When does that even happen? If you have nano installed, wouldn’t it work too?
Not in rescue mode. If you can’t mount your root partition because something was fudged in /etc/fstab, for example, you may be stuck in recovery and depending on your distribution, it may not have nano in that minimalist mode.
For me it also happens when I install a VM of Debian using the small image, on my dedicated server in a data center. The company hosting the server requires a special network configuration and AFAIK, there’s only vi. So i need to use the console to access the VM and from there, edit /etc/network/something with vi to setup the network. Once done I can reboot and install the rest of the software over the network, including nano.
I’ve been using Linux for more than two decades. Before nano I was using pico, but it also required to have pine/alpine installed. So knowing the basics of vi has often been helpful over the years for me.
Maybe it’s because I like tinkering with VMs and SBCs, and most people will not encounter situations where they don’t have nano, but it can happen. And you’ll be glad to know at least “i” and “:wq!”.
Transtronaut@lemmy.blahaj.zone
on 02 Sep 2024 17:37
collapse
In a professional context, you might end up on servers that don’t have nano installed, but do have vi. Or if you’re helping out a friend on their laptop, they might not have the same software as you. Or if you often end up tinkering with random devices and/or setting up new systems it might be tedious to install the same applications every time.
It’s basically an argument for learning the very basics of the most common editors so you have flexibility no matter where you end up. Even when you have the ability to download and install your preferred software, it’s still an extra step that might not be desirable for a variety of reasons. But if it’s just your own personal device, I see no problem with just installing whatever you prefer and running with it.
EDIT: Personally, I find that I don’t end up using those other editors often enough to remember the abstruse commands of tools like vim, so I’m not worried about it. When it does happen, 99% of the time I can just whip out a smartphone and look up the directions for the n-dozenth time.
JackbyDev@programming.dev
on 02 Sep 2024 17:35
nextcollapse
I do like that some distros make visudo use Nano instead.
thecheddarcheese@lemmy.blahaj.zone
on 03 Sep 2024 06:02
collapse
Sometimes you don’t even have the luxury of vi. Any moderately advanced Linux user should probably learn the basics of sed. Just knowing how to insert text and save it can fix a system that’s stuck in recovery. Even if it’s just to add a comment in front of a line in a config file.
callyral@pawb.social
on 02 Sep 2024 17:24
nextcollapse
Vim is pretty easy for me because I’m used to it. Nano is very difficult to use for me because I’ve rarely used it.
tiredofsametab@fedia.io
on 03 Sep 2024 00:42
nextcollapse
Opposite here. I got started with Gentoo back in the day of building things from the ground up. Their tutorials all used nano and I just got used to using that. I think when I had casually tried to mess with linux previously, old Mandrake and Redhat in the '90s, I always used the GUI editors, but I also didn't have a ton of time to mess with it and my hardware wasn't well-supported.
notfromhere@lemmy.ml
on 03 Sep 2024 12:38
collapse
Same. Stage 1 install will forever be a core memory for me.
I was Nano user and I liked it. After I learned to use Vim, I liked it more.
Now when I use nano it’s frustrating to use and I can do things much faster and easier in vim 😅
BaumGeist@lemmy.ml
on 02 Sep 2024 17:28
nextcollapse
Nano is notepad, but with worse mouse integration. It’s Vim/Emacs without any of the features. It’s the worst of both worlds
If you want ease, just use a GUI notepad. If you want performance boosts, suck it up and learn Emacs or Neovim
0x0@lemmy.dbzer0.com
on 02 Sep 2024 19:17
collapse
I think you mean “$EDITOR”. Gotta have that variable expansion.
namingthingsiseasy@programming.dev
on 02 Sep 2024 23:12
collapse
Not necessarily! I always run ln -s ‘/usr/bin/$EDITOR’ $(which $EDITOR) after a fresh install, so I have a valid executable on the path called $EDITOR.
Of course, then I have to make sure to add export EDITOR=\$EDITOR to my .bashrc. (Obviously.)
and sometimes you just need a text editor, not an entire thesaurus
queue@lemmy.blahaj.zone
on 02 Sep 2024 20:21
nextcollapse
Nano isn’t even that simple. Ctrl+X to quit? I guess if you use phonetic sounds to figure out how to exit a program. At least Vim uses the idea of “use what the words start with.”
I personally use micro in the terminal, and Kate if I want a GUI to write. Vim and Emacs are fine for those who want it, I have no stakes in the editor wars beyond “I just want my program to do what I want, and I want it to be simple to learn.”
Nano has a cheat sheet at the bottom of the screen at all times
queue@lemmy.blahaj.zone
on 02 Sep 2024 22:25
collapse
Meanwhile I can just use the same shortcuts every other program made in the last 40 years uses. Ctrl+Q to quit, Ctrl+S to save, Ctrl+Z for undo. If I wanted to consult a cheatsheet to relearn keyboard shortcuts, I’ll use vim and emacs.
To be fair, you can easily rebind all the keys to be more normal by adding a .nanorc. Though, Ctrl-Z conflicts with suspend in many terminals, so I keep that one as Ctrl-U. A .nanorc also allows turning on mouse support, changing the color scheme, etc.
headset@lemmy.world
on 02 Sep 2024 20:39
nextcollapse
Ohh look! a sad scripter editing his tiny little script on a terminal window. How cute.
linearchaos@lemmy.world
on 02 Sep 2024 23:26
nextcollapse
Get’er Robbie she’s under the desk!
daniskarma@lemmy.dbzer0.com
on 02 Sep 2024 23:33
nextcollapse
I’ll say that I find easier to exit vim that to exit nano.
I don’t know what ^ means. I just start pressing special keys until it doesn’t the thing
LodeMike@lemmy.today
on 03 Sep 2024 00:17
collapse
CTRL
JustAnOrdinaryCreep@lemmy.ml
on 03 Sep 2024 00:35
nextcollapse
Vim actually IS easy to use once you get the hang of it, plus more comfortable and efficient.
Nanos just an excuse for lazyness, cmv.
KillingTimeItself@lemmy.dbzer0.com
on 03 Sep 2024 01:36
nextcollapse
idk man, vims pretty chill, it even has a tutor in it already, what more could you want?
soul@lemmy.world
on 03 Sep 2024 03:14
nextcollapse
One that’s intuitive and doesn’t require a cheat sheet or what I like to call fingular contortionism discovery.
SirEDCaLot@lemmy.today
on 03 Sep 2024 05:31
nextcollapse
A text editor that doesn’t need a tutor because the interface is intuitive enough that someone who has been using text editors (as a concept) for years can more or less instantly pick it up and start working without needing a tutorial to simply edit a config file.
KillingTimeItself@lemmy.dbzer0.com
on 03 Sep 2024 20:14
collapse
a text editor that has a tutor because it’s been around for so long and it’s had so many years to establish itself with an outside control interface that’s quite literally about as optimal as it can be. Vim basically allows you to never move your hands away from the homerow keys, even when navigating and doing bulk edits. The sheer amount of gained speed and productivity you get from this combined with the amount of times you’ll have to deal with text editing throughout your life is probably going to outweight any potential learned annoyances.
SirEDCaLot@lemmy.today
on 14 Sep 2024 02:09
collapse
with an outside control interface that’s quite literally about as optimal as it can be.
Which is probably true, as long as you make one assumption- that the operator dedicates a significant amount of time to learning it. With that assumption being true- I’ll assume you’re correct and it becomes much more efficient than a Nano/Notepad style editor.
I’m happy to concede without any personal knowledge that if you’re hardcore editing code, it may well be worth the time to learn Vim, on the principle that it may well be the very most efficient terminal-based text editor.
But what if you’re NOT hardcore editing code? What if you just need to edit a config file here and there? You don’t need the ‘absolute most efficient’ system because it’s NOT efficient for you to take the time to learn it. You just want to comment out a line and type a replacement below it. And you’ve been using Notepad-style text editors for years.
Thus my point-- there is ABSOLUTELY a place for Vim. But wanting to just edit a file without having to learn a whole new editor doesn’t make one lazy. It means you’re being efficient, focusing your time on getting what you need done, done.
bleistift2@sopuli.xyz
on 03 Sep 2024 05:57
nextcollapse
A text editor that doesn’t assume that the keys on my keyboard are in the same order as yours.
Telorand@reddthat.com
on 03 Sep 2024 12:26
nextcollapse
I remember looking up how to use Colemak with vim, and the advice was:
Change the mappings so the position is the same, but it has the downside that every tutorial won’t match.
Keep the mappings and do awkward stretches for common functions like up and down.
So I just gave up and moved on.
noisypine@infosec.pub
on 03 Sep 2024 12:54
collapse
I hit the same wall with Dvorak layout.
KillingTimeItself@lemmy.dbzer0.com
on 03 Sep 2024 20:15
collapse
that is a potential problem, though im sure there’s a vim user somewhere that’s fixed it with a bind set.
Yeah, people are just lazy. I remember when I invented a new login screen and was told it was “difficult”, “confusing” and “took some getting used to”.
It even came with a free 100-page manual and a 4-hour master class. Some people, I tell you!
^This is meant more as a joke than an actual critique, even if it kind of reflects my thoughts. But ultimatly, I thought it was a funny bit.^
essentially a terminal modal editor (like vim), but instead of specifying the action to perform then what to perform the action on (like “yank 3 lines”), in helix you select first, then perform actions on the selection (like “these 3 lines, i want them yanked”). it’s slightly better (according to others) because you get to see what you’re going to change in the file so you don’t accidentally delete 5 lines instead of deleting 4.
on top of that many features are builtin, like tree-sitter and lsp support, so you don’t have to spend 5 hours looking for cool plugins and configuring everything to get started (my config file is only 50 lines of toml).
the downside is that there isn’t support for plugins (yet), but there’s already things like a file picker, more than 100 themes etc.
So similar to kakoune? I tried that for a while, but it was missing some features so I went back to vim/neovim.
I need to know vi anyway, because that is available everywhere (as part of busybox), so using vim/nvim for bigger systems just fits.
nameisnotimportant@lemmy.ml
on 03 Sep 2024 05:43
nextcollapse
Well I tried! I ended up using micro though
smiletolerantly@awful.systems
on 03 Sep 2024 05:47
nextcollapse
I gave it serious consideration when the death of Atom was announced and I was unsure where to move on to.
Looks like in the meantime a lot has been done (as far as I remember, TreeSitter and LSP weren’t built in back then…? Not sure though), but the lack of a plugin system is still killing it for me.
TBH it looks like it has 75% of the features you want from a codeditor, which is much more than the use-case for Nano, but no way to go the remaining 25% of the way.
Underwaterbob@lemm.ee
on 03 Sep 2024 06:10
collapse
the death of Atom
I’m still in mourning.
smiletolerantly@awful.systems
on 03 Sep 2024 08:10
collapse
It was pretty great, wasn’t it?
Although I must say. I eventually landed on neovim. Steep, steep learning curve, but now I would not switch back again.
Underwaterbob@lemm.ee
on 03 Sep 2024 08:55
collapse
I would look at that, but I bounced off VIM hard, so probably not for me.
spaceslug@lemmy.blahaj.zone
on 03 Sep 2024 08:06
nextcollapse
I like helix
patatahooligan@lemmy.world
on 03 Sep 2024 08:55
nextcollapse
Helix’s editing model is so much better than vim’s. I would probably use it if it was be closer to a drop-in replacement for vim. I really hope this neovide issue gains some traction because I don’t think I can daily drive anything that isn’t as smooth as neovide again.
wise_pancake@lemmy.ca
on 03 Sep 2024 13:01
collapse
I simply have too much vim config and muscle memory to ever leave vim
100% Micro. Unless you’re only - and mean ONLY - living in the terminal, why would you want all your desktop and terminal shortcuts different from one another?!
Fwiw, you can change the shortcuts for nano in your ~/.nanorc. Most of mine are the same as standard desktop editors, except undo is Ctrl+U because Ctrl+Z is commonly bound to suspend, and quit is Alt+Q instead of Ctrl+Q because in browser window terminals (e.g. Unraid) Ctrl+Q usually closes the whole browser (oof).
Smoogs@lemmy.world
on 07 Sep 2024 14:25
nextcollapse
Memes like this make me glad I only usd Linux at work. You don’t get this petty micromanaging shit between windows users.
ProtonBadger@lemmy.ca
on 08 Sep 2024 00:54
nextcollapse
Greybeard here. I can use vi, emacs, nano, etc. and use whatever is available if it suits the job. For many years I did dev in emacs on my computers and on other systems used vi for quick edits. Currently on my own laptop I have micro as default term editor now. For Rust development - code, though I have hopes for Lapce.
They’re all just tools and so are people who get tribal about things.
FriendBesto@lemmy.ml
on 11 Sep 2024 07:41
collapse
On my laptop, I update my bashrc on Excel, in Wine, then export it as a PDF, OCR to .md, Pandoc it to an .Org, and then finally, write it down on paper and re-type it on my phone’s Termux’s Emacs instance, then TRAMP it to my PC, in the other room.
threaded - newest
That’s like the picture of a normal dude with Nano, a large Vim dude, a larger buff Emacs dude and an ever larger massive Ed dude.
eh the emacs folks are just chilling in a corner somewhere. Maybe in the old folks home together with the ed users
Don’t forget the joe user in the corner wearing a trench coat with a bomb strapped to his chest wired to a dead man’s switch.
Ed is like Skynet itself.
Do people still use ed unironically outside of scripting context?
Unironically? Maybe not. But using something ironically is still using it.
<img alt="" src="https://lemmy.dbzer0.com/pictrs/image/7eb82203-25f2-4fb4-bd73-8c5573e78134.webp">
Micro, hell yea!
Made the switch as well thanks to the modern key bindings
nano gang
Gross
They hate’us cause they anus.
The Terminator is not here to kill you, its here to protect you from Emacs (which can change its form to anything).
<img alt="" src="https://beehaw.org/pictrs/image/780de71b-d929-4c95-9b86-0bde3a949be3.webp">
Cmon dude, what’s most likely to be Skynet?
Vim: Clearly evil, lightning fast. Relies on vimscript for any interactivity and can barely be used outside of the editor.
Emacs: the hippie brain child of some of the brightest minds at the MIT AI lab, funded by military contracts. Slow, but uses a near-universal language that can easily escape the bounds of the editor, (and often does (, and holy shit where did those parentheses come from. (Oh no, it’s becoming self-aware - fly you fools…!
I don’t know why you want use Vimscript for anything outside of the editor. But if that your issue, then there is Neovim. It uses Lua instead Vimscript, but what is the benefit of using Lua outside of Vim? That changes nothing.
Lua outside of Vim has huge applications in embedded products. Dude I would kill for Lua. Do you know what we have? Common Lisp. Yeah, it’s great and fancy and all, but try adding that to your CV and applying for an embedded system job.
My point is, then use Lua outside of Vim. What does this have anything to do with the language used in Vim? You can use Vimscript in Vim, and still use Lua outside of Vim. So what’s the problem? It’s not like Lua gets available to you outside of Vim, just because you switch to Neovim. What do I miss here?
(it was mostly a joke, but) the skills you acquire tinkering your Vim to your needs using vimscript can’t be used elsewhere, whereas Emacs has the (small) advantage that at least most of one’s elisp skills can be translated to common lisp quite easily (with the joke being that common lisp really isn’t that useful, hence my Lua jealousy rant).
The only other (in fact, the first) place I’ve run into Lua is WoW plugins.
But WoW plugins have nothing to do with Vim. That’s my point. You can use Lua in WoW, while using Vimscript in Vim.
Factoring mods also use lua. Lua is a neat little extension language.
Nah… vim users fight emacs users, but not nano users. Wrong league. We do not beat little children ;)
Nano is more like fast food. It’s easy and convenient, but it makes you feel a little guilty and dirty afterwards.
Nano is the tool that people use when they don’t have a need for TUI editors in general and therefore don’t want to have to memorize how people with teletypes decided things should have been done 75 years ago and who also don’t want to get dragged into endless pointless bickering arguments about which set of greybeards was objectively right about their sets of preferences.
I’m glad people enjoy the editors they use and also I just wanna change a single fuckin line in a config file every once in a while without needing to consult a reference guide.
I don’t have much to say about nano, except the hotkey bindings are weird and unnatural.
They make sense, but they feel wrong.
Vim felt like having superpowers when I started with it, after being spoiled by helix it feels like a relic though
How about micro
And yet Emacs users don’t fight vim users. Emacs users decided vim’s interface was pretty cool and added it to Emacs. Somehow people still call it a war though.
Bruh 😂 the Emacs user community absolutely constantly shit on Vim users. When they added Vi(m) bindings they literally named it ‘evil mode’, and they constantly make fun of people who use it, and spacemacs, and the latest flavor of (neo)vi(m), and all the extensions necessary to make vim halfway useful as an ide, etc etc etc.
Evil or the extensible vi layer is super popular and improves the one area that emacs was lacking i prefer the emacs keybinds but have never seen peeps chat shit about it
Which Emacs community? I’ve been following it for ages in a few places (Reddit is the most common) and I literally do not encounter any of that. Calling it evil was humor - as if people who went to all the bother making it would be trying to push people away…
Using the evil package is very popular and often recommended, which means literally using it like vim, but with all the Emacs ability on top. I don’t know what on earth you’re talking about.
Oh to be clear, it’s all humor. At least mostly, I’m sure there are RMS level fanatics somewhere that truly believe some of the BS.
This is something as old as time. I’ve seen it prolifically on Reddit (though not in the Emacs community, they generally discourage memes), various Linux forums, old Usenet, various programming forums… I’m not trying to be evasive, but it’s hard to provide examples that aren’t specifically cherry picked, which wouldn’t benefit the conversation much.
There’s even a Wikipedia page dedicated to this: en.wikipedia.org/wiki/Editor_war
How close to vim’s functionality is evil mode? I’ve been toying with the idea of learning Emacs but I rely on Vim’s langmap and that is rarely implemented in Vim emulations / bindings.
Although I came from vi (pre-vim and pre-evil) and still have the muscle memory, I don’t and haven’t used it myself.
I hear it described as a “nearly complete” and “very comprehensive”. There is definitely a solid community of people using and enjoying it, but on the other hand there are always some reports of getting tired of having to work through, and sometimes extend, an additional interface layer, so in the long run being happier to just adopt the default bindings.
I know there are a few areas where trying to follow common vim workflows doesn’t work as well. Historically the performance of line number display been weak in Emacs, though I believe it’s recently much improved. A lot of people seem to make heavy and constant use of it in vim but conversely for me (and I think it’s more common in Emacs) it’s only an occasional, transient need when some external log or error quotes a line number, so I have them only displayed when I hit the go-to-line binding.
Overall, I think the most frustrating issues people have trying to adopt Emacs from vim are due to trying to impose their specific familiar vim workflows. The most obvious example is people concerned with startup time, but for more typical Emacs workflows it’s a non-issue. Users typically stay in Emacs rather than jumping in and out of it from a terminal (and if you really want that workflow, you run one instance as a daemon and pop up a new client to it instantly). My Emacs instance’s uptime usually matches my computer’s uptime.
The draw of Emacs is not about it only being an editor so much as a comprehensive and programmable text environment. It is a lisp-based text-processing engine that can run numerous applications, the primary being an editor (the default, or evil, or others…) but also countless other applications like file managers, VC clients, subprocess management and many others. It 95% replaces the terminal for me, and many other tools. So it’s the environment through which you view and manipulate all things text that is very accessible to modify and extend to fit your needs. Hence the joke about it being an OS is pretty apt, though to believe it needs a good editor implies vim isn’t a good editor ;).
Same here.
The biggest diss I have on emacs users, as a vim user, is that emacs is the only text editor where people routinely need to keep a book about it on their desk!
I used to work with a bunch of emacs guys and they all had an emacs book or two on their desk or as a monitor stand. They usually also had one on awk and/or Perl to go with it.
I’m sure they’d probably make fun of me for being unable to edit a file with anything but my specific vim config, which is not compatible with any other human’s vim config.
(I would never seriously judge someone on their editor, but I will bust an emacs users chops and accept a good natured jab back)
For vim I had to config or install something just to be able to COPY something to use outside vim, how backwards is that? Isn’t this the most standard feature one can expect to work as default?
.
Once again proving that the easiest way to work out how to do something in vim is to post something along the lines of “vim sucks because it can’t do x” online :)
You mean you couldn’t copy some text from vim and paste it into another application? if yes, what did you have to install/configure for that? I’ve never had any issues copy paste from/to vim, console/GUI windows/Unix.
Sadly I don’t remember. Sometimes it comes preinstalled, sometimes not, depending on OS or something. (Maybe Manjaro gnome). I could copy and paste inside of vim, but not to/from outside vim.
What you observes could be OS depended,. Vim has its own copy paste buffers (y,p etc) and the OS has its own. Traditionally highligh to copy and middle mouse button to paste on Unix. Windows has 2 methods, ctrl-c,v but those are also bindings in vim so only the older less known crtl-insert,shirt-insert works.
Copy paste is definitely built in, there is no need for extra plugins.
it actually does work by default, you just probably missed how to do it in the help pages in vim. For those curious, the system clipboard is its own named register in vim (
:help registers
to learn more) and can be accessed with either“*
or“+
depending on your how your system is configured.To copy a line:
”*yy
or”+yy
To paste a line:
”*p
or”+p
So I need to dive into the manual to do something as basic and universal as “copy and paste”? Why not make it Ctrl+shift+c or have it shown in the info text when pressing this almost universally accepted keypairs? Or at least make it somewhat similar to this. I find it bonkers why some programs decide to just have radically different shortcuts or defaults, the complete opposite of what feels intuitive. Same with the design of some doors that need actual SIGNS on them to tell you which direction they open. Just bad design choice.
Edit: just remembered. Same story with tmux. Want to copy something? Surprise, it’s not anything you expect it to be. Some ctrl+b + [ or some shit
stop using nano, if you want a non modal editor use
vim -y
.
<img alt="" src="https://media1.tenor.com/m/X2w2_BDKEJIAAAAC/drink-spray.gif">
I’ve never tried modal vim because I’ve only just heard about it. The next thing I’d try is restarting the computer. Or Ctrl + Q whichever’s easier.
Ctrl-q
and then if it asks to save, type “no, fuck you”.
<img alt="" src="https://lemmy.world/pictrs/image/a3d98d02-b3e0-45fb-a7c5-871d12f19fee.png">
Vscode is malware
VScodium is FOSS though
?
IME?
Integrated Mevelopment Environment. You should have known this
I’m a meveloper
MevOps Engineer
My mate mevops
tips fedora M’eveloper
The M stands for beefcake
That acronym usually stands for “Input Method Editor” and describes the program that makes people able to type east Asian characters with a usual keyboard.
日本語は楽しいです。
Integrated Memeing Environment
Easy is relative. What are you trying to do? Replace a value in an yaml file? Then nano is easier. Trying to refactor a business critical perl/brainfuck polyglot script in production? Then you probably want to use vim (or emacs if you are one of those people)
Walk someone else through editing a config file on the command-line over screenshare? Nano. Omg nano is your friend.
Replacing a value in a config file is still easier in vim due to e.g.
ciw
orci"
being a thing.Honestly, roll back to previous release for production and use best IDE your developers are used to on their local machines, test the fix in a non production environment then release to prod. When is editing business critical scripts in production really needed?
It was a joke to make the point that vim can be the easiest tool to use if you are trying to do a complex task.
I’m a bit slow on the uptake there haha. I started with vi and moved over to nano at some point and never looked back. I can refactor code in production with the best of them. There’s still some tricks I’ve seen done in vi that amazes me that I haven’t tried to figure out in nano, but for the most part it’s fairly easy to use to do nearly anything in. Even supports color for supported files, YAML, etc.
I started on Unix systems using Vim, so I find Nano to be the confusing editor. A Vim install is one of the first things I do on a new server.
Ed users entered the chat
Vim (or emacs, or any other advanced text editor) is much easier to use than nano when you need to do something more complex than type couple of lines.
(…once you learn the bindings)
Better? Maybe!
More efficient? Surley!
But easier?! Hell no! Easy means you can use it without a lot of training or studying. It is self explanatory. And there is no way on earth that vim is easier than nano. I don’t need to know anything to use nano I need to check docs for hours before I can even start using vim
It is easier after you learn basics. Learning is not easy, but usage is.
Well okay by that logic playing Beethoven on piano is super easy
A handful of shortcuts isn’t that hard
Right, it’s remembering them and using them efficiently that’s hard. It’s amusing watching coworkers try to flex in vim and then struggle at the most basic tasks.
No, some piano plays are still harder than others, mo matter how long you practice. Editing text with vim is easier than with nano after some practice.
If something is “easy to use” this includes the time you need learn said thing.
Drinking rahmen from the bowl is easier then using chopsticks (even if you are more elegant with chopsticks)
Driving automatic is easier then driving manual (even if you may be more efficient with manual if you practised shifting a lot)
Walking is easier then flicflacs (even if you may be faster with flicflacs if you practised a lot)
Using Ubuntu is easier than using arch (even if arch gives you more control and opportunities if you understand it)
“Easy to use” means that you do less and get more. Learning doesn’t count if you learn something once and then use the skills you obtained many times.
This makes it seem like jerking off to MILF porn is hard because there is a learning curve
And how often does that happen in the real world?
VIM may have been a very useful tool 20 or 30 years ago, but today it’s nothing else but a tool for one’s sense of superiority. It’s the vinyl of editors.
If you have to type that much code in a terminal, your infrastructure is outdated. Simple as that.
Every day in my case, except holidays.
…so your infrastructure is outdated.
Why do you think so?
Yes it’s so outdated that mostly every IDE offers usage with its keybindings.
You seem to believe that people only use the terminal if they HAVE to. I doubt anybody these days HAS to type any amount of code in the terminal, but choose to anyway. Like probably anyone else I have access to modern tools and infrastructure, but I choose to do work in the terminal because I’m more productive there. I use (neo)vim because I like it more than any other text editor I’ve used, and have no problem writing code and debugging in the terminal.
You’re using the terminal, because you’re used to it. It is not the better tool, it’s simply what you happen to know already.
People who argue with productivity because of some key bindings live in the world of the 80s. You don’t just sit there and type code 12h a day, that’s not how modern software development works.
And all those blockheads down voting me are caught up in their weird superiority complex. They are the powerful superhackers, and don’t understand that we are just highly qualified plumbers.
I’m actually fairly young and wasn’t around in the 80s. I graduated college with a CS degree in the past 5 years, where I was exposed to many different tools and software. What did I come out of that experience with? I like the terminal more than any IDE I had to use in any class.
Now in the real world, we don’t always get to use our favorite tools for every task, obviously. I do need to use other, more enterprise, software from time to time for work. But whenever possible I go to the terminal because I’m faster there, and I can quickly automate things.
I’m not saying the terminal is the best tool for every job, I’m just saying it is the best for ME. Notice I’m also not putting down other tools here. It seems to me like you might be the one with a superiority complex.
No, I’d argue you simply didn’t want to invest in the other tools.
Think about it, you probably spent hours on customizing and automating vim, and then say you’re faster in that. Well, that’s called a habit.
IDE are objectively more powerful and since you can actually see options and navigate quickly, you don’t need to memorize every obscure feature.
All the terminal editor enthusiasts are actively holding us back, because they insist everything outside vim is garbage for enterprise and kiddies.
If your tool of choice is actively hostile to new users for no reason other than “that’s how it’s always been, and thus it’s better”, well then you’re digging a moat to automate your gatekeeping.
vim + terminal is actually objectively more powerful than any IDE, and most IDEs include a way to pull up a terminal as a crutch for things they can’t do. In any case It seems you can’t be reasoned with. Your argument is just a strawman about what you say other people are saying.
I actually use VIM bindings in PyCharm, slightly cursed but actually works really well and meshes fairly nicely with the other IDE shortcuts. Being able to use it in any terminal is a nice bonus.
So, because you don’t understand something, it’s outdated?
Ok, I can see you have no idea what you’re talking about.
I understand it very well. And that’s exactly why I’m writing this.
Then say, grandmaster delusion, what purpose does vim serve, where it is actually the best tool? Writing code? Hardly, it’s way too limited and requires a ton of upfront investment and headspace. Writing config files? Hardly, because if you write these by hand, you’re living in the 90s, that’s what Ansible, Terraform etc are for.
You just don’t want to admit, that vim is nothing more than a habit. Muscle memory.
The problem I had with nano is that, for the time being, it was supposed to be easy to use. With that in account I always get lost when saving a file and closing the thing because one’s used to doing something else with Ctrl+O and Ctrl+X.
Whereas with Vim (and Neovim for a little while, and now with Vis) I knew it had a steep learning curve from the start so I always had it in mind. And all the funny stories about quitting vim.
they’ve changed those bindings now, Ctrl+S, Ctrl+X, Ctrl+V, and Ctrl+C all do what you think they do
Great, now the next time I’ll use nano I surely will forget about this and get frustrated when trying to save a file with Ctrl+O
you still can, but I think Ubuntu and other prepacked distros will switch soon to the better bindings
Great so now I will mangle all my merge commits depending on which version the host is using.
I’m thinking Ctrl+C quits and Ctrl+S is scroll lock is that correct?
nano
nano --modernbindings
I mean quitting vim isn’t hard you just reset the computer.
The problem with using nano for years is that I now try using nano shortcuts in other programs. Random new windows opening is confusing, until you figure out Ctrl+o isn’t save in that program. Then it’s just annoying because you still have your inappropriate muscle memory.
gedit supremacy
isn’t there a separate instance for memes?
In every post of this kind I am amazed at so many people using
nano
instead ofmicro
which is SO MUCH BETTER while being the same thing at the same time.Holy cow. You can use your mouse with micro. Amazing.
And all the shortcuts are SANE, not the weird thing of
nano
You can have mouse support with nano. Alt-m toggles it on or off.
Oh wow. Weird that it defaults to off.
You can change that in the
nanorc
along with changing key binds, colors, and the like.When you help manage thousands of servers with vim and nano already installed, it’s just faster to use one of those than installing something else nearly ever single time.
I prefer nano for quick edits of small files, but vim for hunting down things in larger files.
Or you can preinstall
micro
like you preinstall everything else 😅I’m not that high on the totem pole unfortunately
I’ve discovered it just a few days ago and now use it on all my machines
I started on Emacs and then didn’t use it for a few years and forgot everything so now I’m stuck on Nano. But that’s fine because nano does everything I want it to do.
The first time I found myself in nano was when testing a distro fifteenor twenty years ago. I had to edit some files and it was the only available editor. The damn thing was a horror to use. I still have no idea who it caters to. I haven’t had to use it since though.
Dunno what you used, but nano is literally a text editor that may be simple simple but it just works. Shortcuts are shown to the user, buttons work like you expect them to (arrow keys, ESC, shift, etc)
With vim you open it and if you haven’t read 5pages of doc you won’t even be able to close it again. I see that its useful for power users, but for casuals who just want to edit a config once in a while nano is absolutely the way to go imho
It’s not that simplle or user friendly when none of the usual shortcuts work. C-a did something completely unexpected.
Well its shown to you at the bottom of the screen what it does…
And if you want Ctrl v,c,s etc. To work like in word etc you can always use nano --modernbindings
They’re in Linux now, it should show the shortcuts they’ll encounter everywhere. Not leftovers from another system.
I am with you in this one!
There’s always
ed
for masochists.Ed, man! !man ed
Ed is the standard editor
What’s with this childish rant?!
Ugh, I swear vi and it’s derivatives are the absolute worse text editors going. There may have been reasons thirty or forty years ago, but now it’s just complexity and a weird ui for the sake of it
I use VS Code on the desktop nowadays, but vi will always be my editor of choice in a terminal. Many of the reasons it was powerful and ubiquitous 30 years ago are still valid, so it’s still powerful and ubiquitous. And I’ve been using it for thirty years, so why would I switch to a training-wheels editor?
Because you want to get out of your Stockholm syndrome?
Stockholm Syndrome was never real, it was made up to explain a situation where hostages recognized an injustice and refused to perpetuate it, so cops called them crazy. So sure, if you call me crazy for my affection for a tool that has served me well for decades, I’ll consider you a cop.
Okay… because you refuse to actually look at whether there are better options than the absolute trash you are using because you are used to it
I’ve used other options and carefully elaborated them all, vim remained a superior tool.
Because you’re used to it. No other reason
Yep 🙄
What’s the superior choice to vim, then?
Literally anything up to and including poking yourself in the eyes and trying to develop laser vision to manually modify bits on the disk platter
See, you’ve realized your blunder, now. Tell us what editor you use in the terminal, ReCursing, the one that is better than vim. We’d love to know.
If I am forced to use an editor in the terminal, nano generally. But I very rarely need to because I have a functioning modern computer from within the last 25 years and therefore have a gui I can rely on. If I somehow manage to break the gui in a way that requires me to edit a text file (itself very very rare) I can fix it with nano.
Now, why would you voluntarily use an editor with a ui that’s needlessly confusing and convoluted, an arse to learn, and notoriously difficult to even save a file and close without checking help files if you haven’t already memorised completely random key combinations? I would say we’d love to know, but we already do. It’s because you’re an arrogant dickwad - at least that’s what your last comment makes you look like
It’s because my job involves managing and operating systems that are only accessible through ssh or tty sessions. I spend hours every day in a terminal, on a remote session, frequently editing files for stuff: crontabs, configs, etc.
I learned vi because when I was coming up, university systems only had ed, vi and emacs, with pico on the servers that had pine for email. I learned vi because it was more powerful than pico (and because I couldn’t get the hang of emacs key combos). I read the help files and learned how to use it, because it was foundational.
Every Unix-like system has a variant of vi. Many of my container images don’t, but it’s trivial to install and use anywhere if needed.
It’s just a more powerful tool than nano, and consequently more difficult to use. Which is fine, man. It’s okay for you to use a basic text editor on the rare occasion you have to edit something in a terminal. You don’t have cause to learn how to be productive in an advanced editor, and that’s fine.
For what it’s worth, when I’m writing and testing python, I use VS Code.
It’s more powerful than nano, sure, but it’s also needlessly more complex a ui. Your use case is legit and that you know vi is a reason to continue using it, but it absolutely should not ever be the default for anything any more!
I like nano tho it has some strange shortcuts
micro has some improvements and default shortcuts that are much closer to common GUI text editors
micro-editor.github.io
oohh that is nice, I think I’ll swap my nano to that.
Isn’t this supposed to be VIM vs Emac? What’s is there point to be programming in the terminal anyway? Nano is good to fix some config files while your are in there, but if I needed to do real programming I’ll be finding something that works in the GUI.
Did you just say GUI?
More like ewwwie.
Its GNUI
What you’re referring to as GNUI, is in fact GNUI/Linux, or as I’ve recently taken to calling it, GNUI plus Linux.
GNUssy
Efficiency.
There’s 0 chance if you have to pick up your mouse that you can keep up with a Unix gray beard.
That’s just editing, if they’re from the emacs era there might be nothing you can do with text faster across their whole system.
I like vscode as a entry point, but if you care to get faster learning just vim motions and sys utils alone is going to cut time from the process.
Oh it’s about speed. What’s the one that get your brain to be faster at programming? I use 4 fingers typing and am still typing much faster than I can think.
Definitely worth running through vim tutor at least once.
It’s beyond typing speed, things like piping out strings to utilities is using one program to write another, you aren’t just getting faster because of access, it’s a paradigm shift.
Edit just for fun: im a non Dev dummy who happened to grow up in a Unix household. Even having dropped vim for helix and bounced around the MS admin/Apple IT space for 30+ years. When I switched to Linux I could still remember binds I’d set up and last used at 9.
Kinda like riding a bike.
It’s speed, but it’s also flow and a continuous stream of thought. If all your editing is being done with muscle memory and minimal thought, you can continue thinking about the problem at hand rather than interrupting your thoughts process to fumble through some context menu to make a change.
30 years ago it was vi vs everything. I don’t see it changed today.
The Holy Trinity: VIM, Arch, and Rust
That’s a weird way to spell Vim, Arch, and C
Seems you have a little typo, Emacs, Arch, and C
Fixed it for you: VSCode, Red Star OS, and sh
Fixed it for you: Emacs.
I once fixed my bashrc file with libreoffice
calm down satan
I regularly fix my bashrc file with Notepad. I run it in Wine because I cbf to RealVNC from my Windows CE media server.
(n.b: None of this is real, I wrote it to upset people, I’m sorry)
Well let me upset you.
Ive been helping my coworker on a call and he was sharing his screen. I told him to edit a file (add a line) on a linux box we develop and he copied the file to his windows host with winscp, edited it in notepad and copied it back. I fantasize about killing him ever since.
That’s crazy! At my job, I just help our users. I don’t have to build (and then maintain) infrastructure with them.
They need to learn how to use their tools better. Winscp does all that transparently for you if you press F4 on a file on a remote system. Or maybe they did and you just didn’t see it…
It’s quite a handy function when you’re diving through endless layers of directories on a remote box looking for one config file amongst many.
I prefer Office 365 online.
Come back after your uploaded it to the cloud and edited it using Google docs.
Vim is way easier tho
Nano is my “daily drive”, but I’d use vim as well – takes a couple seconds to search for “how to type in linux vim” and “how to save a file in linux vim” anyways. :^)
I know
i
and:wq
and that’s all I ever plan on learningNot even Basic Command-Count-motion like c3w aka change 3 words after cursor, or d3b delete 3 words before the cursor?
To that, you add the D aka delete command C for change Y for yank (copy)
So yy to yank line, or dd to delete line.
Also p for paste
Also, i sends you before the cursor, a sends you after. Capital I is insert at beginning of line, Capital A is insert at end of line (append).
I terms of motions and moving around, you need: hjkl, C-d and C-u (half page jumps down and up), and within the line: 0 or ^ for beginning of line, $ for end (taken from regex), w for moving by word forwards, b for moving by word backwards. That’s pretty much all you need imo. There is also t and f. Where t goes forwards (think 'till aka until). Like dtc delete until the c character. F is the same but goes backwards in the line rather than forwards. Remember you can use these with xommands, so d$ deletes until the end of the line. Or “dt.” deletes till the “.” so… yeahI know there’s more, but that’s all you need for Normal and Insert mode imo.
For Visual mode, you only need to know how the Visual modes work. Visual (v), Visual Line (Shift-v) and Visual Block (Ctrl-V).
Also, for visual mode, it might be helpful to learn how to use V-Block to comment out multiple lines at once. Can’t be bothered to go into it.
But I’d argue that’s all there is to learn about vim keys in terms of getting work done.
Not gonna lie, once you’re getting past single button combos, I’m mentally checking out. Ctrl+K and Ctrl+U in nano are good enough for me, and if I need to do something more complex like actual coding, I’ll use an editor with a full GUI as well.
Fair enough. I basically gave you a large chunk of vim so it will feel super overwhelming. The trick is to do one command or combo at a time. For example, I started with dd. Then I added yanking. Then I added visual mode. Then I added “o” (which I think I forgot to mention: o creates a newline under the current one and puts you in insert mode. Capital O does the same but above the current line). The real trick is going little by little. And to be honest, there are some commands I still rarely use or forget to mention. I’ve never used f instead of t. And in terms of forgetting to mention, there’s the x command which deletes the single character under the cursor rn.
Also, I’m sure someone will find this list helpful, so on top of this, I’ll also add this video (and hope that Piped bot will appear): www.youtube.com/watch?v=RSlrxE21l_k
It contains some things I haven’t mentioned.
As for learning all this, I’m repeating myself for the third time. Do it little by little. And when a command is already a thing you do almost without thinking about it, you’re ready to add more.
Why? dw is delete word, c5b change 5 words backwards, and those are the most complicated commands you’ll ever get to use, unless you start adding cuatom keybinds.
But I digress. If you don’t want to learn it, it’s fine.
Average vim user: vim is easy.
Also average vim user: literally hours of reading tutorial pages on how to use vim.
It is easy, though? I cannot even use it correctly. I just know some of the commands and that if you hold down shift it goes backwards.
I’m a vim user and I would say it’s not. It’s very powerful, but only once you become familiar with the commands.
Nano is a better default for the average user because it works in a way most users would expect for a text editor to work.
Honestly, these days it’s pretty simple. The thing you need to remember is that you do not need to know EVERYTHING all at once. Learn a little bit, use it, keep what you use, discard what you don’t, get it in muscle memory, and learn a bit more. Very quickly you’ll be zooming through vim.
You can learn the basics, and go from there- the basics of vim (which imo everyone should know- vi is often the fallback editor), and then you can just casually learn stuff as you go.
Here’s the basics for modern default/standard vim: Arrow keys move you around like you expect in all ‘modes’ (there’s some arguments about if you should be using arrow keys in the vim community- for now, consider them a crutch that lets you learn other things). There’s two ‘modes’- command mode, and edit mode.
Edit mode acts like a standard, traditional text editor, though a lot of your keybinds (e.g. ctrl-c/ctrl-v) don’t work.
Press escape to go back into command mode (in command mode, esc does nothing- esc is always safe to use. If you get lost/trapped/are confused, just keep hitting escape and you’ll drop into command mode). You start vim in command mode. Press i to go into edit mode at your current cursor position.
To exit vim entirely, go to command mode (esc), and type :wq<enter>.
‘:’ is ‘issue command string’,
‘w’ is ‘write’, aka save,
‘q’ is quit.
In other words, ‘:wq’ is ‘save and quit’
‘:q’ is quit without saving, ‘:w’ is save and don’t quit. Logical.
Depending on your terminal, you can probably select text with your mouse and have it be copied and then pasted with shift-ins in edit mode, which is a terminal thing and not a vim thing, because vim ties into it natively.
That gets you started with basically all the same features as nano, except they work in a minimal environment and you can build them up to start taking advantage of command mode, which is where the power and speed of vim start coming into play.
For example ‘i’ puts you in edit mode on the spot- capital i puts you in command mode at the beginning of the line. a is edit mode after your spot- capital A is edit mode at the end of the current line.
Do you need these to use vim? Nope. Once you learn them, start using them, and have them as muscle memory, is it vastly faster to use? Yes. And there’s hundreds of keybinds like that, all of which are fairly logical once you know the logic behind them- ‘insert’ and ‘after’ for i/a, for example.
Fair warning, vim is old enough that the logic may seem arcane sometimes- e.g. instead of ‘copy and paste’ vim has ‘yank and put,’ because copy/paste didn’t exist yet, so the keybinds for copy/paste are y and p.
The second most important thing about vim to learn is:
If nothing is behaving then you probably have caps lock on.
Vim makes it easy to edit text in complicated ways, once you’ve learned it.
Vim is not easy to learn nor intuitive.
It is simple and compounding.
You might not ever edit enough text to ever need to learn a new skillset to edit text. If that’s the case, use
nano
.But if you do find yourself editing a lot of text, consider trying
vimtutor
.It takes 20 minutes and you’ll be proficient enough to match
nano
’s efficiency ceiling.You can learn Emacs in one day. Every day.
It’s extremely easy to get started
VIM is like drugs. Easy to start, hard to quit.
Worst is when installing a new distro(usually in a vm ) and it defaults to nano and for some weird reason no vi of any sort is installed. I hated nano. Last time I intentionally used something like nano was the 90s with pine I think.
What is there to hate? I don’t really understand. It does what it says on the package, and seems to do it pretty well. At least with respect to making small and quick edits to config files in the command line.
My fingers don’t speak it is the problem.
Pardon?
I’ve come to the conclusion, people who use vim just continue to do so out of a stubborn sense of pride for finally learning the key combinations.
That’s funny, I feel the same way about Excel users.
I am faster, more comfortable, and more productive in Vim. I use the same keybindings in all my editors and IDEs. It’s okay for people to have different preferences.
In my case it’s not a sense of pride. I can’t use anything other than Vim because I keep accidentally putting random incantations into my word documents.
“There once was a dduuuZQ:q!”
haha, same. do you use vimium as well?
Ya know, I might throw that on to my browser but I doubt I’d actually use it much. I only really use my browser for research; notes, music, and most of my work is done in the terminal. Being able to swap tabs faster by not having to cycle could be useful, but other than that I find the mouse to be a pretty rapid way of navigating unfamiliar pages
in my case, my hand hurts if I use mouse(or a mobile phone) for some time. using
j
/k
for scrolling and clicking links viaf
help me a lot.That extension is actually pretty cool. There is also tridactyl and a browser that was made with vim in mind, but a browser and a text editor are too different for many things to translate.
thanks for sharing, I’ll try it on my work machine
It’s just convenient that it’s pre-installed on many servers.
So I can use it now everywhere with my stubborn sense of pride for finally learning the key combinations.
I honestly learned it just because I hated having to change hand position to use a mouse.
Can you use a mouse in nano? I always just use the arrow keys, or page up/down and home/end
I mostly use vim but I barely use the jkl; to navigate the document.
Ah sorry, I meant using Vim in a GUI program. I wanted something with the flexibility of a mouse (quick navigation, context menu actions, etc.) without using a mouse. Using just the arrow keys, shift highlighting, etc. is just too slow when writing lots of text, and it doesn’t follow the natural position of typing.
nano -m <file>
orset mouse
in your nanorcEven if you use arrows, you still have to reposition your hand.
I just use vi
Is that stupid? It’s all I ever bothered to learn, hasn’t failed me yet. Now I’m not some big time linux guru but I’m a sysadmin and regularly find myself elbow deep in a CLI for stuff.
I mean, yeah, kind of. In the same way pilots fly planes out of a stubborn sense of pride for knowing what all the flight deck controls do.
It’s not pride, it’s just that I know how to use it really well and that makes it easy for me to use.
But it’s really only for viewing files on another system over SSH. For local work I use Sublime Text
Somehow it seems this would apply to any linux user
What do you mean? The vim users know their key combinations pretty well, that’s kind of the point of vim.
There is no sense of pride. Every text/code editor has key combinations that many users will learn eventually. Vim has easier key bindings.
no, modal text editors are just nicer to use
When you only need to hammer a nail every once in a while, any hammer will do. When you’re a roofer, you better have a roofing hammer.
If you don’t spend your life in a terminal and just need to edit a file, vim isn’t for you. If you want to learn complex strings of arcane wizardry to not only make your life easier but amaze your underlings, use vim.
Emacs users laughing at VIM users.
Emacs - A pretty good OS you can use as a text editor.
And to counter the old saying of it lacking a decent editor, there’s always evil-mode.
You noobs. I just use combinations of cat piped to sed to edit my files, which are mainly lisp code.
Amateur! I write my code down on a piece of paper, scan it in, send it to my computer through email, then make a custom-built AI read the paper and print it in the terminal!
M-x M-c butterfly
Link.
<img alt="" src="https://discuss.tchncs.de/pictrs/image/9e08b32e-ccac-41fc-8be0-eccf823a96ef.png">
<file foobar
Huh does that actually work? Don’t have a system handy to try it out.
<img alt="showing the output in termux" src="https://discuss.tchncs.de/pictrs/image/1765a4db-9a0a-4990-9073-23a40432e299.png">
I think so! I think it’s something like
< file
works anywhere in the line, not just the end. There may be some specifics about no space when it is the front but I don’t remember lol.cat pipeing is safer though.
foobar > file and your file is gone.
You can always alias
>
to<
in your shell.Get out!
Micro for the win
No, Micro for the linux
Nah, win can have it.
I just use this:
Just ask if it’s correct. If not destroy the universe. Only The correct will survive, it’s O(1)
What if there is no correct answer?
It’s not fun when you have to explain it. But basically it is based on the infinite multiverse theory. Since the multiverse splits whenever you make choices, in this case the program would spawn a large number of multiverses each with different combinations of those bits, which means at least one of them would have the exactly the combination we want. If the program destroys the multiverse it is in after it determines it is not correct, only reality that remains is the one with correct combination of bytes. Making it that we will get the code we want on the first try.
You are assuming here that I know what I want. What if there is no obviously correct answer, and even in the Everett branch that generates the optimal content for the file I’ll still think it can be improved and tell it to destroy the universe?
I guess yeah. In that condition the algorithm would probably destroy all universe. Although you might be able to set a threshold and not destroy when it is over the threshold.
But situation where you don’t know the answer is not for this algorithm as this one came from sorting problem.
My problem with those are that I always manage to get lost on where the program has its focus/what kind of instruction is expecting.
And while trying to go back to normal I end up messing it more and more.
Maybe some day I will get there, but it is still not the day.
nano friends rise up!
Looks like you only got one so far.
There are dozens of us!
nah you’re wrong
Why do you all say that? There were no replies when I added mine so that’s why I said what I said.
I too use nano.
alias nano=“vi -y”
Just tried it in my terminal and I couldn’t exit, lol
sorry, i didn’t tell how to quit. it’s
ctrl+q
Thanks, I finally got my access to the terminal back.
just when you thought you knew how to exit vim lol
also, this is vim’s “easy” mode.
Well hello there!
I like Nano. I think it is quite good. There, I said it.
Edit a file, writing a quick shell script or whatever in the terminal. Nano is great. I don’t see any use in learning vim or emacs. If I need something more I’m going use a gui editor anyway.
Don’t get triggered anyone it’s just my preference
This is my thought process exactly.
I get it, for a power user, vim is probably incredibly powerful. However, I just want to edit text files. I don’t want a text editor where I need a cheat sheet just to save my changes and quit.
Funny, that’s what I hate about Nano. The key binds seem completely random to me and the programs solution to this is to display a cheatsheet on the screen
Control+W = "Where is," Control+O = "Overwrite", Control+X = “Exit.”
Makes just enough sense to me, and those are really the only three binds I ever need for editing config files.
I don’t want to come off like a vim hater, because I do believe it when people say it’s powerful, but… I don’t need powerful. I just need to edit text files.
kwrite and gedit friends rise up :)
How do you use these when you are connecting via SSH? You enable X forwarding?
It’s fine when you have a graphical environment, but what do you do when you dont have one?
ohh yeahh then nano
A similar argument is what finally caused the value of the vi family of editors to click in my brain:
They are designed to be fully functional over even the shittiest possible* remote connection. You can’t always count on ctrl, alt, or even the arrow keys being transmitted in a way that is understood by the remote machine.
*Well, I guess the worst possible terminal would be something like an actual teletype, and in that case you’d probably want to fall back to ed or its descendants. To save paper, if nothing else.
Using X forwarding would require you to install big chunks of GNOME or KDE on the server. A better approach is to mount the remote server over SFTP then use KWrite, gedit, whatever, directly on your desktop.
In any KDE app you can connect with SFTP in the open file dialog. Just type sftp://user@server/path and you can browse/open/edit files the remote server. ssh keys+agent make things a lot easier here obviously.
On KDE, there’s also Kate. They used to be totally different apps, but these days, KWrite is a simplified version of Kate. They both use the same text editor component, but Kate adds more IDE-like features.
true but i dont like how they are forced togther so i use featherpad
I spent the weekend failing to make my civ mods work, with a thousand lines of notes… 2/3 in, I think “damnit blazeknave. You spend months perfecting this stupid fucking obsidian setup, and you’ve been here in notepad+ like a fucking jabroni.”
I do the same all the time with anytype.
I dropped notes into sublime and then go back and put them neatly into any type. I don’t really know why I do it either It takes any type a total of three or four seconds to start up and I have to enter in a passcode. But I only have to do it once. I guess I do have to think about where I’m going to put the document and making sure that it’s tagged correctly, it’s a lot easier just a scribble something into a random text window to forget about for a decade.
You mean my 6k Gmail drafts? 😭
I started doing paper pads everywhere and trying to log at end of day.
Micro is where its @ <3
Butterfly gang
There is always the Joe editor, if you like good ol’ Wordstar. :)
I’ve been known to watch a fight video there every now and again, yes.
Sometimes you don’t even have the luxury of nano. Any moderately advanced Linux user should probably learn the basics of vi. Just knowing how to insert text and save it can fix a system that’s stuck in recovery. Even if it’s just to add a comment in front of a line in a config file.
When does that even happen? If you have nano installed, wouldn’t it work too?
Not in rescue mode. If you can’t mount your root partition because something was fudged in /etc/fstab, for example, you may be stuck in recovery and depending on your distribution, it may not have nano in that minimalist mode.
For me it also happens when I install a VM of Debian using the small image, on my dedicated server in a data center. The company hosting the server requires a special network configuration and AFAIK, there’s only vi. So i need to use the console to access the VM and from there, edit /etc/network/something with vi to setup the network. Once done I can reboot and install the rest of the software over the network, including nano.
I’ve been using Linux for more than two decades. Before nano I was using pico, but it also required to have pine/alpine installed. So knowing the basics of vi has often been helpful over the years for me.
Maybe it’s because I like tinkering with VMs and SBCs, and most people will not encounter situations where they don’t have nano, but it can happen. And you’ll be glad to know at least “i” and “:wq!”.
In a professional context, you might end up on servers that don’t have nano installed, but do have vi. Or if you’re helping out a friend on their laptop, they might not have the same software as you. Or if you often end up tinkering with random devices and/or setting up new systems it might be tedious to install the same applications every time.
It’s basically an argument for learning the very basics of the most common editors so you have flexibility no matter where you end up. Even when you have the ability to download and install your preferred software, it’s still an extra step that might not be desirable for a variety of reasons. But if it’s just your own personal device, I see no problem with just installing whatever you prefer and running with it.
EDIT: Personally, I find that I don’t end up using those other editors often enough to remember the abstruse commands of tools like vim, so I’m not worried about it. When it does happen, 99% of the time I can just whip out a smartphone and look up the directions for the n-dozenth time.
I do like that some distros make visudo use Nano instead.
you can change that really easily
Sometimes you don’t even have the luxury of vi. Any moderately advanced Linux user should probably learn the basics of sed. Just knowing how to insert text and save it can fix a system that’s stuck in recovery. Even if it’s just to add a comment in front of a line in a config file.
Vim is pretty easy for me because I’m used to it. Nano is very difficult to use for me because I’ve rarely used it.
Same here, nano is the bane of my existence.
Opposite here. I got started with Gentoo back in the day of building things from the ground up. Their tutorials all used nano and I just got used to using that. I think when I had casually tried to mess with linux previously, old Mandrake and Redhat in the '90s, I always used the GUI editors, but I also didn't have a ton of time to mess with it and my hardware wasn't well-supported.
Same. Stage 1 install will forever be a core memory for me.
I was Nano user and I liked it. After I learned to use Vim, I liked it more. Now when I use nano it’s frustrating to use and I can do things much faster and easier in vim 😅
Nano is notepad, but with worse mouse integration. It’s Vim/Emacs without any of the features. It’s the worst of both worlds
If you want ease, just use a GUI notepad. If you want performance boosts, suck it up and learn Emacs or Neovim
Why would you use a mouse in a console editor? Most of the time, if you’re using Nano, it’s because you’re not in a GUI environment.
What if you want ease on a terminal?
Heaven forbid I want to use an intuitive, simple, terminal based text editor when I ssh into one of my boxes.
But here’s the real kicker. Why do people like you give two shits what text editor other people use?
The best text editor is ‘$EDITOR’.
I think you mean “$EDITOR”. Gotta have that variable expansion.
Not necessarily! I always run
ln -s ‘/usr/bin/$EDITOR’ $(which $EDITOR)
after a fresh install, so I have a valid executable on the path called$EDITOR
.Of course, then I have to make sure to add
export EDITOR=\$EDITOR
to my.bashrc
. (Obviously.)Well,.that’s one way to solve the problem of not expanding your editor var correctly…
If I’m doing quick txt editing nano is great and what I know I can’t figure vim out for the live of me
Emacs
Hey now we don’t denigrate vim and nano users. For the nano users, denigrate means to put down.
and sometimes you just need a text editor, not an entire thesaurus
Nano isn’t even that simple.
Ctrl+X
to quit? I guess if you use phonetic sounds to figure out how to exit a program. At least Vim uses the idea of “use what the words start with.”I personally use micro in the terminal, and Kate if I want a GUI to write. Vim and Emacs are fine for those who want it, I have no stakes in the editor wars beyond “I just want my program to do what I want, and I want it to be simple to learn.”
Nano has a cheat sheet at the bottom of the screen at all times
Meanwhile I can just use the same shortcuts every other program made in the last 40 years uses.
Ctrl+Q
to quit,Ctrl+S
to save,Ctrl+Z
for undo. If I wanted to consult a cheatsheet to relearn keyboard shortcuts, I’ll use vim and emacs.To be fair, you can easily rebind all the keys to be more normal by adding a
.nanorc
. Though, Ctrl-Z conflicts with suspend in many terminals, so I keep that one as Ctrl-U. A.nanorc
also allows turning on mouse support, changing the color scheme, etc.Ohh look! a sad scripter editing his tiny little script on a terminal window. How cute.
Get’er Robbie she’s under the desk!
I’ll say that I find easier to exit vim that to exit nano.
I don’t know what ^ means. I just start pressing special keys until it doesn’t the thing
CTRL
Vim actually IS easy to use once you get the hang of it, plus more comfortable and efficient.
Nanos just an excuse for lazyness, cmv.
idk man, vims pretty chill, it even has a tutor in it already, what more could you want?
One that’s intuitive and doesn’t require a cheat sheet or what I like to call fingular contortionism discovery.
A text editor that doesn’t need a tutor because the interface is intuitive enough that someone who has been using text editors (as a concept) for years can more or less instantly pick it up and start working without needing a tutorial to simply edit a config file.
a text editor that has a tutor because it’s been around for so long and it’s had so many years to establish itself with an outside control interface that’s quite literally about as optimal as it can be. Vim basically allows you to never move your hands away from the homerow keys, even when navigating and doing bulk edits. The sheer amount of gained speed and productivity you get from this combined with the amount of times you’ll have to deal with text editing throughout your life is probably going to outweight any potential learned annoyances.
Which is probably true, as long as you make one assumption- that the operator dedicates a significant amount of time to learning it. With that assumption being true- I’ll assume you’re correct and it becomes much more efficient than a Nano/Notepad style editor.
I’m happy to concede without any personal knowledge that if you’re hardcore editing code, it may well be worth the time to learn Vim, on the principle that it may well be the very most efficient terminal-based text editor.
But what if you’re NOT hardcore editing code? What if you just need to edit a config file here and there? You don’t need the ‘absolute most efficient’ system because it’s NOT efficient for you to take the time to learn it. You just want to comment out a line and type a replacement below it. And you’ve been using Notepad-style text editors for years.
Thus my point-- there is ABSOLUTELY a place for Vim. But wanting to just edit a file without having to learn a whole new editor doesn’t make one lazy. It means you’re being efficient, focusing your time on getting what you need done, done.
A text editor that doesn’t assume that the keys on my keyboard are in the same order as yours.
I remember looking up how to use Colemak with vim, and the advice was:
So I just gave up and moved on.
I hit the same wall with Dvorak layout.
that is a potential problem, though im sure there’s a vim user somewhere that’s fixed it with a bind set.
Yeah, people are just lazy. I remember when I invented a new login screen and was told it was “difficult”, “confusing” and “took some getting used to”.
It even came with a free 100-page manual and a 4-hour master class. Some people, I tell you!
^This is meant more as a joke than an actual critique, even if it kind of reflects my thoughts. But ultimatly, I thought it was a funny bit.^
is there not a single other person who uses helix?
WTF is helix?
helix-editor.com
essentially a terminal modal editor (like vim), but instead of specifying the action to perform then what to perform the action on (like “yank 3 lines”), in helix you select first, then perform actions on the selection (like “these 3 lines, i want them yanked”). it’s slightly better (according to others) because you get to see what you’re going to change in the file so you don’t accidentally delete 5 lines instead of deleting 4.
on top of that many features are builtin, like tree-sitter and lsp support, so you don’t have to spend 5 hours looking for cool plugins and configuring everything to get started (my config file is only 50 lines of toml).
the downside is that there isn’t support for plugins (yet), but there’s already things like a file picker, more than 100 themes etc.
So similar to kakoune? I tried that for a while, but it was missing some features so I went back to vim/neovim.
I need to know vi anyway, because that is available everywhere (as part of busybox), so using vim/nvim for bigger systems just fits.
Well I tried! I ended up using
micro
thoughI gave it serious consideration when the death of Atom was announced and I was unsure where to move on to.
Looks like in the meantime a lot has been done (as far as I remember, TreeSitter and LSP weren’t built in back then…? Not sure though), but the lack of a plugin system is still killing it for me.
TBH it looks like it has 75% of the features you want from a codeditor, which is much more than the use-case for Nano, but no way to go the remaining 25% of the way.
I’m still in mourning.
It was pretty great, wasn’t it?
Although I must say. I eventually landed on neovim. Steep, steep learning curve, but now I would not switch back again.
I would look at that, but I bounced off VIM hard, so probably not for me.
I like helix
Helix’s editing model is so much better than vim’s. I would probably use it if it was be closer to a drop-in replacement for vim. I really hope this neovide issue gains some traction because I don’t think I can daily drive anything that isn’t as smooth as neovide again.
I simply have too much vim config and muscle memory to ever leave vim
I’m trapped in a prison of my own making!
.
Its lighter weight
.
Cap
Whenever I open Nano basically all the commands it has are listed at the bottom, for small things it’s perfectly fine.
Imagine using Nano or Vim; when you could be using Cat and Echo.
/s
modal editing can be fun. it is a weird skill like driving a manual transmission.
that said driving a manual transmission in stop and go traffic on a hot day is a lot like editing in vi sometimes.
Unless you’re European. Then driving manual is considered basic life skill like riding a bike.
Me on Micro
100% Micro. Unless you’re only - and mean ONLY - living in the terminal, why would you want all your desktop and terminal shortcuts different from one another?!
Fwiw, you can change the shortcuts for nano in your
~/.nanorc
. Most of mine are the same as standard desktop editors, except undo is Ctrl+U because Ctrl+Z is commonly bound to suspend, and quit is Alt+Q instead of Ctrl+Q because in browser window terminals (e.g. Unraid) Ctrl+Q usually closes the whole browser (oof).Memes like this make me glad I only usd Linux at work. You don’t get this petty micromanaging shit between windows users.
Greybeard here. I can use vi, emacs, nano, etc. and use whatever is available if it suits the job. For many years I did dev in emacs on my computers and on other systems used vi for quick edits. Currently on my own laptop I have micro as default term editor now. For Rust development - code, though I have hopes for Lapce.
They’re all just tools and so are people who get tribal about things.
On my laptop, I update my bashrc on Excel, in Wine, then export it as a PDF, OCR to .md, Pandoc it to an .Org, and then finally, write it down on paper and re-type it on my phone’s Termux’s Emacs instance, then TRAMP it to my PC, in the other room.
I use biebian, btw.