I’m trying out Obsidian for taking notes, and this made me laugh.

I love obsidian, you’ll love it

I switched recently from Trillium.
After installing two dozens plugins, it may just replace my KB site, note apps, task manager and PRM all at once.

If you want to learn vim, try the command vimtutor in a terminal

I just can’t quit you, vim!

Blyfh
link
fedilink
21Y

You can’t just quit it. Vim is one hell of a drug.

It’s very easy to terminate vim. I just use the power button.

Uh… so u guys don’t change the PC each time that’s cool I would definitely try that …

If I could afford to change PC - I could afford real IDE

Yeah that’s the problem it’s so expensive not to mention when you buy a discounted one and the vim session is already open…

Tried it’s a scam , doesn’t work

neo (he/him)
link
fedilink
English
61Y

:q!

deleted by creator

A lot of my personal dislike for VIM would be done away with if it just had a helpful common keys cheat sheet (basic cursor navigation, edit mode, exit with and without saving, etc) at the bottom of the editor window like Nano does.

neo (he/him)
link
fedilink
English
51Y

This is the only reason I have any idea how to navigate nano.

Try nvim

I understand where you’re coming from, but as a frequent user of vim I’d much rather have the additional line of text.

That makes sense, I mean your monitor can only fit like six lines of text.

It should be default on, with a setting to turn it off for power users

They could even have one of the commands on the cheatsheet be to hide it, so anyone who doesn’t want it will immediately see how to turn it off.

Having the commands listed at the bottom by default is one thing i personally dislike about nano, because they take up space while being useless to someone knowing the commands (or at least knowing how to open the help in, which is what you can do in vim to achieve the cheat sheet). The alternative that vim uses, is to show the commands when starting the editor without opening a file.

is there not an option to turn them off??

one of my favorite things about helix is how easily you can check the keybinds for certain actions - just space-? and then you can see a list of every command available (by description) and their keybinds, if they have one

Not to forget the buit in popup showing the shortcuts, similar to which-key, but built in

Really, I’d just recommend using nano then. It’s installed basically anywhere you can find vim and works perfectly fine as a text editor! To use vim effectively it has a learning curve no matter what, so it’s not necessarily meant for everyone.

Big brain time, pkill vim

Vim: Caught deadly signal TERM
Vim: Finished.
Terminated

So from within vim :!pkill vim?

Or ctrl-b " pkill vim for my tmux enjoyers

Affine Connection
link
fedilink
English
21Y

:!kill -9 -1

space_comrade [he/him]
link
fedilink
English
61Y

You need pkill -9 vim to really make sure it’s dead.

Oh man, that’s awesome. Aren’t there a couple ways to do that though?

they accept :q! but I haven’t checked anything else yet

According to Stack Overflow, there is also:

  • :cq (quit without writing and return non-zero exit code)
  • ZQ (quit without writing from normal mode)

I actually knew about ZQ :)

but in what case would you ever need :cq ? I’m curious what’s the idea behind that

Edit: I checked, neither work for obsidian verification, including :cq!

disappointing :c

It’s useful when vim is being run from a different program or script.

For example, if I run p4 change to create a new Perforce changelist it will open up my editor (which I have set to vim) so that I can enter the CL description and other fields. If I realize I don’t actually actually want to create the CL yet I can use :cq to quit with an error so that p4 knows to abort.

I also have a script I use for diffing a list of file pairs. It runs vimdiff on the first pair of files then if I exit with :qa it will move on to the next pair of files. But if I exit with :cq it will just abort and skip all of the remaining file pairs.

⚡⚡⚡
link
fedilink
1101Y

deleted by creator

What if it’s a laptop?

@PwnTra1n@lemmy.world
link
fedilink
English
231Y

put it in the microwave

what do you mean? that just recharges the battery

make it real hot

r00ty
link
fedilink
121Y

Hold the power button for 10 seconds!

Unless pressing the power button triggers hibernation.

r00ty
link
fedilink
11Y

On pretty much every computer I’ve seen since ATX became a thing, pressing and holding power for I think 6 seconds (but could be another specific time) has force powered off the whole thing. Hibernation should kick in on a single press if you have it configured that way and trigger on the release of the button.

It takes my laptop about 10 seconds to force power off, but usually 5 to hibernate.

Fireplace

Disconnect the battery terminals obviously!

I miss when this was easy.

voxel
link
fedilink
1
edit-2
1Y

i still have a laptop sith replacable cpus/socket

Back when you used to be able to buy bigger batteries that gave your laptop a big ol ass

the_weez
link
fedilink
41Y

I also miss the days of fat dumper laptops

Or just wait a while

@marco@beehaw.org
link
fedilink
English
281Y

katy ✨
link
fedilink
71Y

the cloud is just the world you’re living in

@marco@beehaw.org
link
fedilink
English
21Y

Cloud 9 , for sure.

chraebsli
link
fedilink
18M

Great idea for when you start in IT! Always had trouble first year in my apprenticeship when i had accidentally opened vim. Ask for first time and after 2 months not used.

Did someone already open a pull request?

Oh wow, that’s an easy way to not implement a feature ;)

Crass Spektakel
link
fedilink
English
231Y

That is just hilarious but also…

I just remembered that Bram Moolenaar, the author of vim has recently died…

He was a real good person. Back when he released his first vim for Amiga Computers I exchanged some emails with him and he handled even my less smart suggestions very professional.

I just take the chance to remind everyone to spend some money for his Uganda Charity.

That is a hilarious, yet useful test.

katy ✨
link
fedilink
1271Y

when you click enable vim it should just start nano

I hate when I use visudo and it opens in nano and I try to use vi controls

Gotta set your sudo editor environment variable

the_weez
link
fedilink
211Y

jjjjjjjjj

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 75 users / day
  • 210 users / week
  • 412 users / month
  • 2.92K users / 6 months
  • 1 subscriber
  • 1.53K Posts
  • 33.8K Comments
  • Modlog