:w
:w
:w
:w
:w
i
esc
:w
:w
:w
:w
Average day in (neo)vim
This will allow you to ctrl+s to save. I tried to add this in a backtick code line/block but it removes part of the syntax.Sorry but I’m already used to :w stoo much and a lot faster with it than ctrl+s
Is there any reason to use :w other than it being the default? I have mine mapped to CTRL-S and it makes sure to keep me in insert mode if I was in insert mode. Feels way faster and easier to spam than the 4 key presses it takes to execute “:w”.
I’m just used to it and I’m keeping ny time in instert mode at minimum.
not mapping semicolon to colon
lel
You can use :wq only once
*per open file
So choose wisely. All other editor instances must remain open forever.
I use quake style terminals, and often start writing a file and completely forget about it and turn off the computer, and only remember what i left behind when i find the random recovery files around, so :w a lot is quite useful for me.
Quake? The FPS? I’m confused, though I knew a little about Linux
Yes, on classic fps you could spaw a console that will drop down from the top os the screen, some terminal emulators allow you to do that.
I like it because then i have the terminal always open that i just draw from the top of the screen with a keypress
On KDE i do that with Yakuake, and on gnome with tilix
You can also use Guake on GNOME or basically on any desktop. I’ve also use it on Cinnamon and it’s really nice.
:x
My biggest (mostly) irrational internet pet peeve is the proliferation of people suggesting “:wq” when “:x” is strictly better.
:w before ZZ just to make sure
Make all changes
:wq!
Force that bitch!
We can optimize this further:
unsatisfied = true while(unsatisfied) { key.dispatch( Keyboard::Ctrl, Keyboard::s ) }
…No, there is no instance where
unsatisfied
changes stateYou should just be able to
while(true)
Don’t worry, most modern brains have a builtin jit compiler, so when a habit starts to form, the check will be optimised out. (It saves excess neurons from being generated.)
It’s a joke.
That sounds like an excuse.
:w!
Esc Esc Esc :w!
Most accurate
Caps caps caps :w! Is the way
C-x C-s wtf!
It’s because the first time doesn’t always work. I swear, sometimes it doesn’t!
Ctrl + C literally doesn’t work at times, it drives me crazy. It might be due to some shitty applications and websites overriding it or adding complexity (Like copying not only the text but additional information).
I’m often 100% sure I copied the text, change the window and an old clipboard entry gets pasted.
God I hate this so much. It’s especially frustrating on mobile where it takes like thirty seconds to try to get the right part of the text copied and use the fucking magnified blue dots… Ugh.
Mobile is an entirely different beast. Like sometimes my keyboard doesn’t show up. Or the text select refuses to work. And so on. It’s a mess. Even on a Galaxy S22.
No clue how people can exist without a proper computer at home and still do stuff online.
Some of us have PTSD from losing work back in the day. Now it’s just habit.
It’d be great if there were side kind of feedback, like the cursor quickly flashing a “C” or something… anything to let you know the operation occurred; better yet, was successful.
I actually disagree from a systems engineer perspective: The program doesn’t actually know shit if those bits hit any permanent medium, just that the OS told them “I’ll take care of it” it could be sitting in a write back cache when you save, see the “write complete” and rip the power and that’s all gone now. Basically, I don’t like promising durability when it’s not really there.
Check for an asterisk after the file name (in the tab/title bar), it means “unsaved changes”.
This is me in eclipse.
Because I used to do the single save and it failed
Oh, eclipse. I’m still happy I don’t have to save in intellij .
I tried intellij years ago and never left it.
I’m the same way. I think it’s just a matter of being conditioned to manually save for the majority of my computing life.
MFRs are saving each keystroke they have access to.
Hell sometimes I’ll save just after having thought about writing something
<esc> <esc> <esc> <esc> <esc> <esc> :wa! <cr>
The old school programmer right here! All we’re missing is someone typing git commit -am “updates and stuff”
Why would you ever use an editor that could lose your work unless you save? Vim users will never understand that.
Actually vim has swap files which it saves to when you make any edit, whether you save the change or not, meaning you shouldn’t lose any work even if you kill -9 vim on unsaved work.
Yes, exactly. Why would anyone ever use an editor that doesn’t work like that, where unsaved work could disappear? I can’t understand that.
Oh I get you. No idea tbh.
Ctrl+s means “stop the presses” to VT100 terminal emulators and you have to press ctrl+q to resume. Key combinations from a different era.
Ok here’s a question I should have asked like way sooner.
In Ubuntu (and similar distros), is there a hotkey to immediately kill the process? Like CTRL-C but harsher.
I use a process manager like btop for this.
If you’re using X11, you can use xkill: https://en.m.wikipedia.org/wiki/Xkill
You can bind it to a key in gnome/kde (not sure how they handle custom keybinds. Otherwise add a call to xbindkeys to your .bashrc or equivalent). It kills any window you want, responsive or not.
As for the terminal, I don’t think you can send SIGKILL, but ctrl + \ will result in a core dump if you’re using bash.
My PC has a dedicated key to kill all processes.
sudo poweroff?
CTRL-C – SIGINT CTRL-\ – SIGQUIT CTRL-Z +
kill -9 %1
– SIGTSTP + SIGKILL
deleted by creator
I hate editors that cut the current line if you do C-x with nothing selected. Always do C-x C-s, even in VSCode and KDevelop.
deleted by creator
Ctrl+s+s+s+s+s
LOL good point about just not releasing Ctrl.
The chances are non-zero that somebody out there attempts to release and press ctrl+s at the exact same time over and over like they’re hammering out Beethoven’s 5th. XD