787
submitted 1 year ago by drbi@lemmy.world to c/linuxmemes@lemmy.world
top 50 comments
sorted by: hot top controversial new old
[-] FinalBoy1975@lemmy.world 41 points 1 year ago

I actually learned how to use vi like 30 years ago and I had all the commands memorized. Then, nano came along. All the commands are at the bottom of the screen to remind you. It was just too tempting to pass up. However, I can't help but suspect that somewhere out there I might have left a vi session open because maybe I mistyped. I might have accidentally typed ;q! instead of :q! or something.

[-] TheInsane42@lemmy.world 8 points 1 year ago

I'm feeling old now... I've been using vi for 35y now and was happy when I got vi.exe on a dos box, as I hated edit. I still don't like 'simple' editors like nano/joe.

I used kill to get out of emacs when trying it agter 7y of vi usage, so I get the need to get mideval on editors users aren't used off. ;)

[-] FinalBoy1975@lemmy.world 7 points 1 year ago

vi has always been my bane because I'm a sloppy typist. I can't count the number of files i had to fix because they ended with :q i like nano because the commands are ctrl + whatever. i don't make a mess.

load more comments (1 replies)
[-] glibg10b@lemmy.ml 5 points 1 year ago

All the commands are at the bottom of the screen to remind you. It was just too tempting to pass up.

But you already had the Vi commands memorized. Did you forget them in the meantime?

[-] FinalBoy1975@lemmy.world 4 points 1 year ago

No. I sloppily typed them. Did you see my other comment?

load more comments (1 replies)
[-] nickwitha_k@lemmy.sdf.org 31 points 1 year ago

You can :q! any time you want, but you can never leave.

[-] backhdlp 7 points 1 year ago

Insert Mode tho

[-] gonzo0815@sh.itjust.works 28 points 1 year ago

It's really easy, just unplug your computer.

[-] glibg10b@lemmy.ml 25 points 1 year ago* (last edited 1 year ago)
    • Esc × 2
    • CTRL-[ × 2
    • CTRL-\ CTRL-N × 2
    • :q
    • :qa
    • :wq
    • :wq!
    • :wqa
    • :x
    • ZZ
    • :q!
    • ZQ
    • :q!
    • :cq
[-] nebula42@lemmy.world 19 points 1 year ago

It's the hotel California of text editors >:)

load more comments (1 replies)
[-] GreenMario@lemm.ee 15 points 1 year ago

Nano is pretty good if you're in a terminal. Used to use vim for ssh related stuff but since nano added syntax highlights I didn't go back.

[-] glibg10b@lemmy.ml 9 points 1 year ago* (last edited 1 year ago)

Nano's only appeal is that it's beginner-friendly, but you already know Vim, so why switch?

[-] asuka@sh.itjust.works 4 points 1 year ago

Because Nano just works. Vim is insane affront to good design and standards.

load more comments (1 replies)
load more comments (6 replies)
load more comments (1 replies)
[-] FLX@lemmy.world 15 points 1 year ago

Vim is crap. If a fucking text editor is hard to master, it's just a bad text editor.

[-] ikidd@lemmy.world 5 points 1 year ago

That's a paddlin'

load more comments (6 replies)
[-] redempt@lemmy.world 14 points 1 year ago
load more comments (1 replies)
[-] Lolen10@lemmy.fmhy.net 14 points 1 year ago

I know how to get out. But I still like nano a lot more.

[-] 31337@sh.itjust.works 9 points 1 year ago

WTF. Why? I could maybe see someone preferring emacs over vim, but not nano. Maybe there are nano features I don't know about, but it just seems like Windows Notepad to me.

I normally just use VS Code with a VIM extension. Unless I'm ssh-ing into something, then I use vim.

[-] gamey@feddit.rocks 5 points 1 year ago

Well, you kind of got it but also didn't I guess. If I want to quickly edit a none critial config file or similar a terminal version of Notepad is perfectly fine and for more complex stuff I prefer a GUI anyway.

[-] dustyData@lemmy.world 4 points 1 year ago

I edit in Micro. Which is Nano with Lua plugins. Come at me.

load more comments (1 replies)
[-] PeterPoopshit@lemmy.world 12 points 1 year ago

You exit vim by unplugging the pc.

[-] eggymachus@sh.itjust.works 10 points 1 year ago

Now do ed...

[-] glad_cat@lemmy.sdf.org 10 points 1 year ago

That's how you learn Linux and Google: how to kill vim? kill -9 vim.

load more comments (1 replies)
[-] JerkyChew@lemmy.one 9 points 1 year ago

Pssh, come on, it's just :q or :q! - couldn't be simpler or more intuitive!

[-] Araozu@lemmy.world 9 points 1 year ago

My main problem with vim is that they use hjkl instead of jkl; , it doesn't make sense to me why they'd do that.

And my second problem is that I use my own custom keyboard layout instead of qwerty, so I'd have to remap all the keys. Why spend hours learning and then rebinding all the keys when I can instead play some Dota? /s

[-] Asymptote@lemmy.dbzer0.com 3 points 1 year ago

My main problem with vim is that they use hjkl instead of jkl; , it doesn't make sense to me why they'd do that.

With qwerty you can be sure of layout of the letters and numbers across languages.

load more comments (1 replies)
load more comments (3 replies)
[-] soeren@iusearchlinux.fyi 8 points 1 year ago

Closing nano is more complicated imo

[-] IjonTichy@lemmy.world 21 points 1 year ago

No it isn't, it respect's ctrl+c, SIGINT and gives useful feedback for new users. Many shortcuts are immediately shown on screen.

[-] soeren@iusearchlinux.fyi 13 points 1 year ago* (last edited 1 year ago)

If you open vim the first thing you will see it's a text describing how to close it. Not saying other things are easier for a new user but closing is pretty simple. EDIT: if press ctrl - c vim will show you what you should press instead

[-] MouseWithBeer@iusearchlinux.fyi 14 points 1 year ago

And the whole time you have nano open it shows you all the shortcuts how to save and close at the bottom, so no, closing nano is not harder.

[-] unicorn@mander.xyz 18 points 1 year ago

Unless you don't know that ^ means Ctrl 🥲

[-] MouseWithBeer@iusearchlinux.fyi 11 points 1 year ago

Then you press ctrl+g for help and it tells you:

Shortcuts are written as follows: Control-key sequences are notated with a '^' and can be entered either by using the Ctrl key or pressing the Esc key twice.

:D

Actually TIL about pressing esc twice.

[-] art@lemmy.world 3 points 1 year ago

Why would you press CTRL+G if you didn't know that ^ was CTRL?

[-] MouseWithBeer@iusearchlinux.fyi 10 points 1 year ago

Look at the screenshot I posted, it actually specifies "ctrl + g" for help.

[-] nxfsi@lemmy.world 11 points 1 year ago

I'd argue closing vim is still easier. You just have to hold down the power button long enough.

[-] soeren@iusearchlinux.fyi 7 points 1 year ago

stop making sense its annoying

[-] Jeanschyso@lemmy.world 4 points 1 year ago

I had to look up the upside down V meant Ctrl, which makes sense to me now that I know, but I had to Google that.

load more comments (2 replies)
[-] eslaf@lemmy.world 8 points 1 year ago

:q does the trick

[-] Kentronix@lemmy.world 8 points 1 year ago
[-] velovix@hedge.town 7 points 1 year ago

I took the vim pill a few years ago and spent tons of time learning its shortcuts, trying out plugins, and forming strong opinions about my relationship with my text editor. It's a great tool, but I personally lost the plot somewhere down the line. I'm not sure that passion actually served me.

load more comments (1 replies)
[-] 018118055@sopuli.xyz 5 points 1 year ago

!killall vim

[-] dipshit@lemmy.world 3 points 1 year ago
load more comments (4 replies)
[-] Kaelygon@lemmy.world 3 points 1 year ago
[-] russjr08@outpost.zeuslink.net 4 points 1 year ago

Remember to actually kill the process though, since that will only background/suspend it in most cases.

(Be sure to save the file though first, Vim creates a "swap" / recovery file but its best to not rely on that, use fg to re-open, then press escape and type :wq)

load more comments (1 replies)
[-] Limit@lemm.ee 3 points 1 year ago
load more comments
view more: next ›
this post was submitted on 03 Sep 2023
787 points (100.0% liked)

linuxmemes

21222 readers
66 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack members of the community for any reason.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.

  • Please report posts and comments that break these rules!

    founded 1 year ago
    MODERATORS