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

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

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 ,

That’s funny, I feel the same way about Excel users.

techwizrd ,

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 ,

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 ,
@lemmesay@discuss.tchncs.de avatar

haha, same. do you use vimium as well?

JustAnotherKay ,

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 ,
@lemmesay@discuss.tchncs.de avatar

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 ,

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 ,
@lemmesay@discuss.tchncs.de avatar

thanks for sharing, I’ll try it on my work machine

hakunawazo ,

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 ,

I honestly learned it just because I hated having to change hand position to use a mouse.

Treachery4524 ,

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 ,

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 ,
@cerement@slrpnk.net avatar

nano -m <file> or set mouse in your nanorc

Opisek ,

Even if you use arrows, you still have to reposition your hand.

catshit_dogfart ,

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 ,

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

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 ,
@alexaralvarado@infosec.pub avatar

Somehow it seems this would apply to any linux user

PlexSheep ,

What do you mean? The vim users know their key combinations pretty well, that’s kind of the point of vim.

TheV2 ,

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 ,

no, modal text editors are just nicer to use

root ,

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 , to linux in How dare you use a text editor because it's easy to use

Emacs users laughing at VIM users.

Emacs - A pretty good OS you can use as a text editor.

theshatterstone54 ,

And to counter the old saying of it lacking a decent editor, there’s always evil-mode.

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

You noobs. I just use combinations of cat piped to sed to edit my files, which are mainly lisp code.

WrenHavoc ,

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 ,

M-x M-c butterfly

sundray ,

Link.

lemmesay ,
@lemmesay@discuss.tchncs.de avatar
JackbyDev ,

`<file foobar|

Trail ,

Huh does that actually work? Don’t have a system handy to try it out.

lemmesay ,
@lemmesay@discuss.tchncs.de avatar

showing the output in termux


<span style="color:#323232;">storage/documents/programs ro
</span><span style="font-weight:bold;color:#a71d5d;">></span><span style="color:#323232;"> echo puts </span><span style="color:#183691;">"hello world" </span><span style="font-weight:bold;color:#a71d5d;">></span><span style="color:#323232;"> main.rb
</span><span style="color:#323232;">
</span><span style="color:#323232;">storage/documents/programs ro via rb
</span><span style="font-weight:bold;color:#a71d5d;">></span><span style="color:#323232;"> ls
</span><span style="color:#323232;">c  js  main.rb  python
</span><span style="color:#323232;">
</span><span style="color:#323232;">storage/documents/programs ro via rb
</span><span style="font-weight:bold;color:#a71d5d;">> <</span><span style="color:#323232;"> main.rb grep hello
</span><span style="color:#323232;">puts hello world
</span><span style="color:#323232;">
</span><span style="color:#323232;">storage/documents/programs ro via rb
</span><span style="font-weight:bold;color:#a71d5d;">>
</span>
JackbyDev ,

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 ,

cat pipeing is safer though.

foobar > file and your file is gone.

wise_pancake ,

You can always alias > to < in your shell.

fossphi ,

Get out!

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.

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.

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.

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.

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

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.

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

Micro is where its @ <3

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

Butterfly gang

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.

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.

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 😅

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?

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