There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

lemmy.fosshost.com

hjjanger , to linux in How dare you use a text editor because it's easy to use

Emacs

tastysnacks ,

Hey now we don’t denigrate vim and nano users. For the nano users, denigrate means to put down.

cerement ,
@cerement@slrpnk.net avatar

and sometimes you just need a text editor, not an entire thesaurus

Mr_nutter_butter , to linux in How dare you use a text editor because it's easy to use
@Mr_nutter_butter@lemmy.world avatar

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

btp , to linux in How dare you use a text editor because it's easy to use
@btp@lemmy.world avatar

The best text editor is ‘$EDITOR’.

0x0 ,

I think you mean “$EDITOR”. Gotta have that variable expansion.

namingthingsiseasy ,

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.)

sabin ,

Well,.that’s one way to solve the problem of not expanding your editor var correctly…

BaumGeist , to linux in How dare you use a text editor because it's easy to use

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

dan ,
@dan@upvote.au avatar

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.

Transtronaut ,

What if you want ease on a terminal?

SeeJayEmm ,
@SeeJayEmm@lemmy.procrastinati.org avatar

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?

callyral , to linux in How dare you use a text editor because it's easy to use
@callyral@pawb.social avatar

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.

mihor ,
@mihor@lemmy.ml avatar

Same here, nano is the bane of my existence.

tiredofsametab ,

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 ,

Same. Stage 1 install will forever be a core memory for me.

Racle ,
@Racle@sopuli.xyz avatar

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 😅

pedz , to linux in How dare you use a text editor because it's easy to use

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 ,

When does that even happen? If you have nano installed, wouldn’t it work too?

pedz ,

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 , (edited )

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 ,

I do like that some distros make visudo use Nano instead.

thecheddarcheese ,

you can change that really easily

mactan ,

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.

PseudoSpock , to linux in How dare you use a text editor because it's easy to use
@PseudoSpock@lemmy.dbzer0.com avatar

There is always the Joe editor, if you like good ol’ Wordstar. :)

ArcaneSlime ,

I’ve been known to watch a fight video there every now and again, yes.

lennivelkant , to linux in How dare you use a text editor because it's easy to use

Butterfly gang

Steamymoomilk , to linux in How dare you use a text editor because it's easy to use

Micro is where its @ <3

blazeknave , to linux in How dare you use a text editor because it's easy to use

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 ,
@linearchaos@lemmy.world avatar

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 ,

You mean my 6k Gmail drafts? 😭

I started doing paper pads everywhere and trying to log at end of day.

Mwa , to linux in How dare you use a text editor because it's easy to use
@Mwa@thelemmy.club avatar

kwrite and gedit friends rise up :)

pedz ,

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 ,
@Mwa@thelemmy.club avatar

ohh yeahh then nano

Malgas ,

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.

dan ,
@dan@upvote.au avatar

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.

greyfox ,

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.

dan ,
@dan@upvote.au avatar

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.

Mwa ,
@Mwa@thelemmy.club avatar

true but i dont like how they are forced togther so i use featherpad

psycho_driver , to linux in How dare you use a text editor because it's easy to use

nano friends rise up!

GolfNovemberUniform ,
@GolfNovemberUniform@lemmy.ml avatar

Looks like you only got one so far.

ipkpjersi ,

There are dozens of us!

scorp ,

nah you’re wrong

GolfNovemberUniform ,
@GolfNovemberUniform@lemmy.ml avatar

Why do you all say that? There were no replies when I added mine so that’s why I said what I said.

lemmesay ,
@lemmesay@discuss.tchncs.de avatar

I too use nano.

alias nano=“vi -y”

fallingcats ,

<span style="color:#323232;">ln -sf /bin/nano /bin/vi
</span>
fin ,

Just tried it in my terminal and I couldn’t exit, lol

lemmesay ,
@lemmesay@discuss.tchncs.de avatar

sorry, i didn’t tell how to quit. it’s ctrl+q

fin ,

Thanks, I finally got my access to the terminal back.

lemmesay ,
@lemmesay@discuss.tchncs.de avatar

just when you thought you knew how to exit vim lol
also, this is vim’s “easy” mode.

alexaralvarado ,
@alexaralvarado@infosec.pub avatar

Well hello there!

mub ,

I like Nano. I think it is quite good. There, I said it.

J4g2F ,
@J4g2F@lemmy.ml avatar

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 ,
@bigmclargehuge@lemmy.world avatar

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 ,

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 ,
@bigmclargehuge@lemmy.world avatar

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.

kubica , to linux in How dare you use a text editor because it's easy to use

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.

AeonFelis , to linux in How dare you use a text editor because it's easy to use

I just use this:


<span style="color:#323232;">#!/bin/bash
</span><span style="color:#323232;">
</span><span style="color:#323232;">keep_generating=1
</span><span style="color:#323232;">while [[ $keep_generating == 1 ]]; do
</span><span style="color:#323232;">    dd if=/dev/random of=$1 bs=1 count=$2 status=none
</span><span style="color:#323232;">    echo Contents of $1 are:
</span><span style="color:#323232;">    cat $1
</span><span style="color:#323232;">    echo
</span><span style="color:#323232;">    read -p "Try generating again? " -s -n1 answer
</span><span style="color:#323232;">    while true; do
</span><span style="color:#323232;">        case $answer in
</span><span style="color:#323232;">            [Yy] )
</span><span style="color:#323232;">                echo
</span><span style="color:#323232;">                break
</span><span style="color:#323232;">                ;;
</span><span style="color:#323232;">            [Nn] )
</span><span style="color:#323232;">                keep_generating=0
</span><span style="color:#323232;">                break
</span><span style="color:#323232;">                ;;
</span><span style="color:#323232;">            *)
</span><span style="color:#323232;">        esac
</span><span style="color:#323232;">        read -s -n1 answer
</span><span style="color:#323232;">    done
</span><span style="color:#323232;">done
</span>
thevoidzero ,

Just ask if it’s correct. If not destroy the universe. Only The correct will survive, it’s O(1)

AeonFelis ,

What if there is no correct answer?

thevoidzero ,

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 ,

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 ,

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.

IndustryStandard , to linux in How dare you use a text editor because it's easy to use

Micro for the win

Sonotsugipaa ,
@Sonotsugipaa@lemmy.dbzer0.com avatar

No, Micro for the linux

PseudoSpock ,
@PseudoSpock@lemmy.dbzer0.com avatar

Nah, win can have it.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • lifeLocal
  • goranko
  • All magazines