I’m trying out Obsidian for taking notes, and this made me laugh.
Funny, but unironically a pretty good idea.
One of my first computer jobs was working in a student computer lab at my undergraduate university. This was back in the mid 90s-ish.
We had three types of computers - windows machines running 3.1 or whatever was current then, Macs who would all do a Wild Eep together when they rebooted en masse, and Sun X Windows dumb terminals that were basically just (obviously) unix machines for all intents and purposes. This was back when there were basically like 5 websites total, and people still hadn’t heard of Mosaic.
So everyone wanted the windows and Mac boxes, and only took the xterms when there was nothing else open. I was the primary support person for them since none of the other people wanted to learn Unix and I was the only CS major.
The X boxes suffered from two main learning hurdles. One was that backspaces were incorrectly mapped into some escape key sequence, and the other is that it would drop you from (I think) pine into emacs as a mail editor as soon as you hit it. 90% of my time was telling people how to exit emacs. It was that, putting more paper into the printers, and teaching myself more programming than I was learning in classes.
God, I remember the backspace thing. I hope whoever allowed a computer to be shipped in that condition got fired.
My god that brought back memories. The first commands when sitting at a new terminal was always, always:
stty sane
stty erase '^H'
It was well into the 2000s before Unix had useable defaults.
deleted by creator
If anyone needs the command: :q!
If you want the computer to ask if you’re sure: :q
If you want to save: :wq
You’re nullifying that safety measure by doing this you know
Some people just want to see the world burning
Nah, the safety measure is designed to make sure they can quit vim. Now they can quit vim.
I can quit vim any time I want. I just don’t want to.
It’s the opposite of nerd sniping.
If you want to save: :wq
Or :x
:wq
will write even if you didn’t change anything;:x
won’t. (similar to:w
vs:up
)I prefer
ZZ
if I want to quit and saveZQ
and ZZ for save & quit
:cq
because why not :)
I mean, it’s true.
I’ve been using linux pretty exclusively at home for almost 25 years now. Program. Script. Work in the shell a lot, and the other day I had to use vim and it took me a while to remember the basic commands. I’m a nano guy :\
Honestly, if you work in a shell a lot, learning vim is a great investment. You’re gonna fly through files editing them faster than with any IDE.
I also started off using nano. Have you tried Micro? It’s like nano on steroids and with good keybindings
At some point Nano added Ctrl+S for save. That’s all I needed. Its syntax highlighting is decent too.
ctrl w/o for save/save as are pretty easy to get used to tho
Nano, Pico and Micro? is this editor trying to !compensate for something?
I’m with you on that. VIM is a good example of a tool that the deepness of the tool makes it aggravating to use for the 90% of simple use cases.
Unless you use VIM enough for the shortcuts to be second nature it is faster to install Nano, make the changes, and remove Nano than it is to use VIM.
If you feel like it definitely give it another go. Vim (or neovim) is just insanely good once you’ve developed the muscle memory for the keybinds.
It takes a bit of time and practice but it’s actually fairly user friendly once you understand how it works. (c for change, y for yank, p for paste, e for end, b for beginning etc.)I was a nano person for the longest time, was planning to try out vim but never did, until i saw a coworker using it and he explained a little about the vim “language” actually worked and how much you could do with it
With some encouragement from him and a week or two of reduced productivity i was able to do everything just as fast in vim as in nano, and it only got better from there, now i find any other editor slow and tiresome in comparison
If you want something that is quite a nice editor too but doesn’t require hundreds of lines of configuration, try helix. It also has nice help menus so it’s fast to learn. I’ve used vim since the 90’s and Emacs for many years, but nowadays I kinda just like hx how it just works with zero configuration for any programming language I need to work with.
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 …
Tried it’s a scam , doesn’t work
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…
Why would I want to exit vim?
I tmux my vim session so I never have to exit it, I just end the session and NOTHING OF NOTE HAPPENS
Just all those left over swap files I forget about because they are in every one of my dot ignore files.
Aka “vim turds”
yes | rm -r ./.*
RIP my .git folders
But importantly the swp files in my home directory are gone, along with all my rc files but who needs them
set swapfile set dir=~/.cache
No, i just googled it.
It is much easier not to
nano crew where you at
I like nano because it has worked any time I needed it. I don’t dislike nano because I’m not good enough at Linux to have ever run into its limitations
nano gang checking in.
However, I’ve been forced over time to remember “:wq” to get unstuck should vim randomly appear.
Alternatively, you can save a key and use
:x
(And:q!
to quit without saving)Yeah, that’s such a Vim user thing to say :P
:up|cq
to save a write cycle and signal an error to whatever opened Vim.How do u learn this voodoo
20 years of software engineering and you too will have a 10-20% chance of knowing how to exit vim.
I’ve done 35 years, but the first 25 years on the dark side M$.
I never get the need to use vim and nano exists.
Vim really is an IDE, not a text editor. It’s usable as an editor but overkill.
Nano serves a difference purpose. It’s like telling someone on a bike that a mustang is better.
Nano is for those that occasionally edit text files from a terminal.
Vim is for those who make a living out of it.
There’s a guy on Youtube who does programming language tutorials/demonstrations. Like he starts out with C++ and in one hour you’re at object inheritance, crash courses I guess is the term for them.
He did one video that was as much a Vim tutorial as a tutorial for this language. “Press 3k, then enter, then i, and type “std::out(“whatever C syntax is”)” and then hit escape and…”
For teaching something like a little bit of Python or a little bit of Bash or whatever, I’d rather use Nano, because you can learn how to use it in seconds. Vim is an amazing tool but lord don’t try to cram a Vim tutorial into another already technical tutorial.
If you edit files a lot vim is worth its weight in gold. Nano makes me want to kill myself as everything takes so much longer.
Nano is perfectly sufficient for a very rare edit.
Vim absolutely chews through anything you throw at it. Lots of times we need data formated or lots of SQL queries and I’m the go to guy because I understand vim macros.
Especially if you have any form of RSI.
I wonder if it would be possible to make a user accessable way to expose similar power to the common user.
Vim is absolutely not an IDE. It has no integrations with any language. It’s just a powerful text editor. You can add language plugins and configure it to be an IDE.
No offense intended here - But why is this being upvoted?
vim absolutely is an IDE if that is how you want to use it. Syntax highlighting, linter, language specific autocomplete, integrated sed/regex. And much, much more.
my car is absolutely a boat if you put a boat motor on the back of it and waterproof it
I don’t know that’s a fair anology. Vim does what a IDE can do without almost any setup with LazyVim and Lunar Vim and a bunch other prebaked setups. Instead of writing your vscode config in JSON or using a GUI, you can use lua. It’s more like turning car into a track car or something where you’re already a mechanic
“You see here my car has positions for all the parts of a boat so it’s easily made into a boat and it’s already waterproof but it’s just a normal car”
Syntax highlighting, linting, and language specific autocomplete are features supported by plugins and scripts. Plain, simple vim is a powerful extensible text editor. The extensibility makes it easy to turn into an IDE.
There’s syntax highlighting by default in vim though.
Yeah, there is a generic syntax highlighting scheme. I had forgotten because it’s not very good for some languages, I’d replaced it with a LSP-based implementation years ago.
ladies please, you’re all beautiful
You can’t run and debug things in vim, can you?
Like I said, Vim can be made into an IDE by adding and configuring plugins. Basic barebones vim is designed to be a powerful, extensible text editor, not an IDE.
It’s designed to be an extended vi clone above anything else.
Yea, vim really isn’t anything near how useful emacs is.
Emacs really is powerful, all it needs now is a decent text editor.
It has one. It’s called evil-mode.
emacs is solely for watching the text version of Star Wars and you know it
Not at all what I meant. It’s just, out of the box, a powerful text editor that can be configured and built on if desired. If you want it to be more than a text editor, you can easily make it so.
Eh. Both are good choices. I prefer vim for my workflows - I like the terminal.
ETA: Will have to give Emacs another go though at some point.
It literally has a built in scripting language.
So it’s an IDE for vimscript…? No.
You’re not a normal text editor if you have a built in scripting language.
I’m not a text editor. But anyway, would you call a shell script that invokes
python.exe $1
a Python IDE? Why would you? Vim isn’t designed to facilitate the use of vimscript, vimscript is just an extensibility feature of Vim.
I guess it depends on if you’re the type of person who sees VSCode as an IDE or just a text editor.
Vim is effectively the same way.
For the pedants, I hope y’all can at least agree that lunarvim is an IDE:
(Note, a comment saying it’s a “bad IDE” doesn’t make it not an IDE)
So like Word vs Notepad?
More like Visual Studio Vs Notepad
Not really, or that doesn’t feel right to my. Word and notepad basically still do the same thing except for that word lets you add style.
Like a manual vs an automatic car, maybe?
Word is a WYSIWYG editor. We don’t talk about it much these days because it’s just how things are done, but it took a long time for the industry to come up with a way to display text on screen with rich formatting and have it come out the same way in print. There was a lot of buzz around it in the late 80s and early 90s.
Word solves a completely different problem than an IDE. Notepad is a raw, minimal tool that could be built on for either WYSIWYG or an IDE.
It just makes a lot of stuff way easier once you know how to use it. Switching out a word for another: two button-presses, duplicating a line: three presses, deleting 500 consecutive lines: five presses
What if I want to undo my life’s mistakes.
Church of Emacs is always there ;)
How do we work this? Do we alternate between trying to ruin people’s lives with elisp and chasing the perfect .vimrc or lua - config? Maybe grab some bytes from /dev/urandom and send them to the editor whose first letter comes up first? What about holidays?
I’m gonna go with yes 😁
But you can do all that with nano and it is straight forward and you don’t need to memorize any key combinations. I mean, I get it and no judgement here. I just use nano because it’s easy and quick.
I think if you just need to edit a config file once in a while, nano is great, but if you’re writing substantial amounts of code, you’ll find vim a lot more capable.
As long as you’re not a filthy emacs user, we can get along
I write my code in an actual IDE. And I use nano for only, like you said, config files and those little things. And I have never used emacs and I don’t even know how it looks like. I’m dead serious, I don’t even know what emacs is or what it does. lmao
Emacs is basically a lisp interpreter packaged with a suite of “example” utilities, like a text editor. It’s one of the two historical editors used as terminal IDEs, along with vim. Emacs tends to take a more batteries, kitchen sink, web browser, games, IRC client, etc-included approach. It can seriously be closer to an OS in functionality.
You can also copy paste by manually copying text by hand, would call that a valid alternative to Ctrl-C/V?
I don’t understand the need for Ctrl-C/V, when manually copying the text exists. I know it’s snarky, but that’s the level of difference we’re talking about here. Or imagine, to delete a line, someone Right Arrows 50 times, then backspaces 50 times, instead of using the shortcut.
% of the time I’m using nano to edit something in the terminal, and it’s usually something really minor. I’m using GUIs for the majority of my computing anyway, so if I need some robust text editing, I’ve got a bunch of easier-to-learn, easier-to-use options available, and that’s totally ignoring things like awk, grep, sed, etc.
My god, what is this 100 image…
Pico gang reporting in.
hopefully switching to micro
I made that switch a few months ago just so I could cut, copy and paste without having to lookup how to do it. it’s been great.
Here!
I hate terminal-based text editors
Nano seems quite user/idiot friendly
I personally like nano but it’s what I used first. So I learned the commands. Vim I still forget Everytime.
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
jjjjjjjjj
9j
Gotta set your sudo editor environment variable
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.
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
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.
I understand where you’re coming from, but as a frequent user of vim I’d much rather have the additional line 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.
That makes sense, I mean your monitor can only fit like six lines of text.
This is the only reason I have any idea how to navigate nano.
Try nvim
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.
just unplug the computer…
And if it’s cloud computer, just unplug the cloud…
the cloud is just the world you’re living in
Cloud 9 , for sure.
What if it’s a laptop?
Fireplace
Hold the power button for 10 seconds!
Unless pressing the power button triggers hibernation.
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.
Alt-F4
if your desktop environment uses alt+f4 to quit 💀
If yours doesn’t use it, you know what it uses instead
very true.
Take my fucking upvote and leave
If you want to learn vim, try the command vimtutor in a terminal
I just can’t quit you, vim!
I think this is the most upvotes I’ve seen on a Lemmy post….
Lemmy seems to be the old nerdy internet of the 90s, prior to the enshittification
I’d say more like the early days of reddit, the hardcore enshittification started around 2012-2015 IMO. The old-school nerds are still at it on IRC, Newsgroups and so on.
Don’t forget mailing lists! LKML FTW
Big brain time,
pkill vim
Vim: Caught deadly signal TERM
Vim: Finished.
TerminatedSo from within vim
:!pkill vim
?Or
ctrl-b " pkill vim
for my tmux enjoyers:!kill -9 -1
You need
pkill -9 vim
to really make sure it’s dead.
Tricky question, but I think I have a solution:
:!readlink /proc/$PPID/fd/* | grep “$(dirname %)/.$(basename %).sw” | xargs -I{} rm “{}” ; kill -9 $PPID
Technically correct