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.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

RustyNova , in Touch a file in Linux

I’m way to used to doing nano file.txt that I always forget about touch.

Although most times, if I create a file, it’s to put something in it

debil ,

If you need multiple files for testing a script or such: touch file{1…5}.txt

emptiestplace ,

If you’re having a party or whatever: touch *

DannyBoy ,

I do the opposite, I forget I can just create a file with nano. I run touch then open it with nano after to edit.

emptiestplace ,

That’s weird. Stop it.

Octopus1348 ,
@Octopus1348@lemy.lol avatar

I usually do open filename because I prefer GUI text editors.

match , in Songs about Vim
@match@pawb.social avatar

easy mnemonic to quit vim: imagine you’re captain Picard in the middle of typing “:3” when Q shows up

Crow ,

Or, hear me out, : because you’re doing a command, and then q for quit. Probably make it wq too, to write and quit

chraebsli OP ,
@chraebsli@programming.dev avatar

did you know there is a vim tutor for learning how to vim?

TheRedSpade ,

vimtutor, which I believe is installed with vim by default

Edit: My brain apparently inserted an extra word that made it seem like you were seeking said program. Leaving it though for those wondering in the future.

Crow ,

Yeah, but imo the best way to learn vim is to do it as you go. You only really need to know getting in and out of insert and how to write and quit. Once you’ve got that, if you wanna do something and think there’s probably a better way than moving there with the arrow keys, look it up on the Internet, remember the thing, do it a few times and you’ve learned a new thing about vim. “Surely there’s a search and replace function” yeah, is substitute with the s command. “I wanna navigate quicker within lines” use f, t and their capital versions. Combine with the quickscope plugin and you’re golden. Learn the stuff you want to use, don’t memorize commands you don’t need

kautau ,

Forgot

Escape first, because it wants to keep you inside the matrix and you need to tell it you are trying to escape

q!

Because you probably don’t want to save whatever you’ve accidentally done to that file trying to quit, and you have to add an exclamation point because unless you yell loudly at vim it won’t listen

Simon ,

That’s one too many letters. Need to use x for maximum efficiency gains.

Cethin ,

No, that doesn’t make any sense. We need something convoluted so that people don’t remember it next time it’s needed.

Cwilliams ,

Tell that to my history teacher…

xmunk , in Touch a file in Linux

Remember to confirm consent before touching.

IsoSpandy ,

You can only touch in places where you have permission to touch.

lseif ,

sudo touch woman

sukhmel ,

Iseif is not in the sudoers file. This incident will be reported.

lseif ,

to whom, perchance?

lud ,
thecodeboss ,

Omg I hadn’t seen this one before, laughing so hard

gaael ,
wise_pancake , in Songs about Vim

Less is more, or rather, more is less

chraebsli OP ,
@chraebsli@programming.dev avatar

less really is more with more features. and more IS less with less features

squid_slime , in Songs about Vim
@squid_slime@lemmy.world avatar

Sudo visudo is always a struggle

bl4ckblooc , in Songs about Vim

Nuka Cola is better

TxzK , in Songs about Vim

Vim user here. The only way to exit vim is to pray to the Vim gods and sacrifice your first born, hoping that they’ll cause a cosmic ray to hit the right spot in the memory to flip the right bit that causes it to exit. There are no alternatives.

Revan343 ,

I usually just power-cycle the machine

Simon ,

Are you guys serious? Command q. or x. or wq. or use a proper fucking terminal so you can ctrl -z and resume.

Revan343 , (edited )

I am non-serious, I just don’t like vim (or emacs; if I’m editing a text file in a terminal I want nano, or I append manually with pipes as Linus intended).

Most of my systems have X11 and some basic GUI text editor, my server is the exception that proves the rule. There is generally no actual reason to use Vim except liking Vim, or wanting to learn to like Vim.

For those that do like Vim, or want to learn it for historical reasons? Good on you, have fun.

If you like emacs fuck off though.

Simon ,

Amen

Hexarei ,
@Hexarei@programming.dev avatar

The main reason for using (neo)vim is motions and text objects. Pretty cool to be able to type cxia, ]a, cxia to swap two function parameters in code. Or daf to delete a whole function.

Even just f to jump to a specific character later in the line, or t to jump up to that character are absolutely life changing.

I love love love editing HTML in neovim with the ability to do stuff like dst for “delete surrounding tag” or St<div class=“something”> to surround the current selection with a new tag. I have yet to find another editor that can do stuff like that with just a couple key presses.

Revan343 ,

As long as you don’t use emacs :P

Hexarei ,
@Hexarei@programming.dev avatar

I’ve only ever used it in evil mode, and it’s not the same

Cethin ,

These is one of the oldest Linux memes. No, they aren’t serious. I have a hard time believing anyone here doesn’t actually know how to exit vim properly.

Revan343 ,

I have a hard time believing anyone here doesn’t actually know how to exit vim properly.

You power cycle the machine, then run apt-get update && apt-get install nano, right?

Fuckin \s, just in case that wasn’t clear

dubyakay , in Touch a file in Linux

These are some weird looking dolph— oh

Zozano , in Touch a file in Linux
@Zozano@lemy.lol avatar

images-2

Same energy as Joan Cornella’s comics

Schorsch ,

'Murica!

vlad76 , in Songs about Vim
@vlad76@lemmy.sdf.org avatar

Nano ftw

kautau ,

And micro for the future

Kusimulkku ,

I’m too used to nano, switching for micro for a while I was constantly using nano key combos and making a mess of things.

Stockholm syndrome from key combos lol

kautau ,

Makes sense, though you can rebind shortcuts in micro

github.com/zyedidia/micro/blob/…/keybindings.md

Kusimulkku ,

It would just be a bit funny since sensible keybindings was one of the reasons I originally switched. Turns out I had already used nano too long for me to actually want that feature hah.

kautau ,

Haha very true, if micro was the default, many people coming from common GUI apps would be like “okay, ctrl z to undo” and “ctrl s to save” “wow, it actually worked”

Kusimulkku ,

Absolutely. It would make sense as the default instead of nano (or vim of all things). Would help those who are just starting with Linux.

kautau ,

Def! I sort of wish the RFC committee would push standards for smart cross-platform shortcuts. Of course people with muscle memory in a different standard should be able to change for their usage, but even GUI apps like vscode, sublime text, IntelliJ, etc could benefit from standardization there

dan ,
@dan@upvote.au avatar

Nano has supported Ctrl+S to save for a while.

kautau ,

True, but one keyboard shortcut doesn’t make for an easy transition. Unless nano is has implemented or is planning on implementing on ctrl o,z,f,y,q etc

xigoi , in Songs about Vim
@xigoi@lemmy.sdf.org avatar

Is there any playlist that wouldn’t be improved by adding Cat by C418 at the end?

chraebsli OP ,
@chraebsli@programming.dev avatar

there aren’t.

& most people don’t even know what/ who C418 is…

stebo02 ,
@stebo02@lemmy.dbzer0.com avatar

most people don’t even know what/ who C418 is…

most people would recognise his songs though…

Gobbel2000 ,
@Gobbel2000@feddit.de avatar

Cat by C418 is literally the only piece in the list I recognize.

Cethin ,

He was that guy working on the music for that 0x10c game, right?

quylaa ,

Pour one out for 0x10c

kogasa ,
@kogasa@programming.dev avatar

Haven’t heard of 0x10c since 2012. Shame it was canceled, I love Elite and would love more games in its niche

Cethin ,

I’ve found Ostranauts recently, and it’s really fun and I feel has some of the same vibes. Not even close to the same though, being able to program your own systems that you put together. I still sometimes think about what 0x10c could have been. I’ve considered doing something similar myself, but I haven’t gotten around to it. Maybe someday something similar will exist.

Cwilliams ,

MINECRAFT!!!

RiikkaTheIcePrincess , in Songs about Vim
@RiikkaTheIcePrincess@pawb.social avatar

It’s really not that hard v.v Caring to learn all’ the shenans, that’s the hard part. Same goes for Emacs. Archaic interfaces for the sake of archaism or “cool cred,” I say 🤷

Edit: Also haha the joke is funny :P

autokludge , in Songs about Vim
@autokludge@programming.dev avatar

Why do you want to exit? Just :terminal

chraebsli OP ,
@chraebsli@programming.dev avatar

RIP to people who never shutdown or restart their PCs

Simon , (edited ) in Songs about Vim

Funny story. After you start you can’t go back. What is a nano?

Edit: If ctrl-z doesn’t get you out of vim you need to install another terminal or more likely just ditch your distro altogether.

Linkerbaan , in Songs about Vim
@Linkerbaan@lemmy.world avatar

Pull the plug - Death

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines