Nah... vim users fight emacs users, but not nano users. Wrong league. We do not beat little children ;)
Nano is more like fast food. It’s easy and convenient, but it makes you feel a little guilty and dirty afterwards.
Nano is the tool that people use when they don't have a need for TUI editors in general and therefore don't want to have to memorize how people with teletypes decided things should have been done 75 years ago and who also don't want to get dragged into endless pointless bickering arguments about which set of greybeards was objectively right about their sets of preferences.
I'm glad people enjoy the editors they use and also I just wanna change a single fuckin line in a config file every once in a while without needing to consult a reference guide.
I don’t have much to say about nano, except the hotkey bindings are weird and unnatural.
They make sense, but they feel wrong.
Vim felt like having superpowers when I started with it, after being spoiled by helix it feels like a relic though
How about micro
And yet Emacs users don't fight vim users. Emacs users decided vim's interface was pretty cool and added it to Emacs. Somehow people still call it a war though.
Bruh 😂 the Emacs user community absolutely constantly shit on Vim users. When they added Vi(m) bindings they literally named it 'evil mode', and they constantly make fun of people who use it, and spacemacs, and the latest flavor of (neo)vi(m), and all the extensions necessary to make vim halfway useful as an ide, etc etc etc.
Evil or the extensible vi layer is super popular and improves the one area that emacs was lacking
i prefer the emacs keybinds but have never seen peeps chat shit about it
Which Emacs community? I've been following it for ages in a few places (Reddit is the most common) and I literally do not encounter any of that. Calling it evil was humor - as if people who went to all the bother making it would be trying to push people away...
Using the evil package is very popular and often recommended, which means literally using it like vim, but with all the Emacs ability on top. I don't know what on earth you're talking about.
Same here.
The biggest diss I have on emacs users, as a vim user, is that emacs is the only text editor where people routinely need to keep a book about it on their desk!
I used to work with a bunch of emacs guys and they all had an emacs book or two on their desk or as a monitor stand. They usually also had one on awk and/or Perl to go with it.
I’m sure they’d probably make fun of me for being unable to edit a file with anything but my specific vim config, which is not compatible with any other human’s vim config.
(I would never seriously judge someone on their editor, but I will bust an emacs users chops and accept a good natured jab back)
Oh to be clear, it's all humor. At least mostly, I'm sure there are RMS level fanatics somewhere that truly believe some of the BS.
This is something as old as time. I've seen it prolifically on Reddit (though not in the Emacs community, they generally discourage memes), various Linux forums, old Usenet, various programming forums... I'm not trying to be evasive, but it's hard to provide examples that aren't specifically cherry picked, which wouldn't benefit the conversation much.
How close to vim's functionality is evil mode? I've been toying with the idea of learning Emacs but I rely on Vim's langmap and that is rarely implemented in Vim emulations / bindings.
Although I came from vi (pre-vim and pre-evil) and still have the muscle memory, I don't and haven't used it myself.
I hear it described as a "nearly complete" and "very comprehensive". There is definitely a solid community of people using and enjoying it, but on the other hand there are always some reports of getting tired of having to work through, and sometimes extend, an additional interface layer, so in the long run being happier to just adopt the default bindings.
I know there are a few areas where trying to follow common vim workflows doesn't work as well. Historically the performance of line number display been weak in Emacs, though I believe it's recently much improved. A lot of people seem to make heavy and constant use of it in vim but conversely for me (and I think it's more common in Emacs) it's only an occasional, transient need when some external log or error quotes a line number, so I have them only displayed when I hit the go-to-line binding.
Overall, I think the most frustrating issues people have trying to adopt Emacs from vim are due to trying to impose their specific familiar vim workflows. The most obvious example is people concerned with startup time, but for more typical Emacs workflows it's a non-issue. Users typically stay in Emacs rather than jumping in and out of it from a terminal (and if you really want that workflow, you run one instance as a daemon and pop up a new client to it instantly). My Emacs instance's uptime usually matches my computer's uptime.
The draw of Emacs is not about it only being an editor so much as a comprehensive and programmable text environment. It is a lisp-based text-processing engine that can run numerous applications, the primary being an editor (the default, or evil, or others...) but also countless other applications like file managers, VC clients, subprocess management and many others. It 95% replaces the terminal for me, and many other tools. So it's the environment through which you view and manipulate all things text that is very accessible to modify and extend to fit your needs. Hence the joke about it being an OS is pretty apt, though to believe it needs a good editor implies vim isn't a good editor ;).
I once fixed my bashrc file with libreoffice
calm down satan
I regularly fix my bashrc file with Notepad. I run it in Wine because I cbf to RealVNC from my Windows CE media server.
(n.b: None of this is real, I wrote it to upset people, I'm sorry)
Well let me upset you.
Ive been helping my coworker on a call and he was sharing his screen. I told him to edit a file (add a line) on a linux box we develop and he copied the file to his windows host with winscp, edited it in notepad and copied it back. I fantasize about killing him ever since.
They need to learn how to use their tools better. Winscp does all that transparently for you if you press F4 on a file on a remote system. Or maybe they did and you just didn't see it.....
It's quite a handy function when you're diving through endless layers of directories on a remote box looking for one config file amongst many.
That's crazy! At my job, I just help our users. I don't have to build (and then maintain) infrastructure with them.
I prefer Office 365 online.
Come back after your uploaded it to the cloud and edited it using Google docs.
IME?
Integrated Mevelopment Environment. You should have known this
I’m a meveloper
MevOps Engineer
My mate mevops
tips fedora M'eveloper
That acronym usually stands for "Input Method Editor" and describes the program that makes people able to type east Asian characters with a usual keyboard.
日本語は楽しいです。
The M stands for beefcake
Integrated Memeing Environment
Vscode is malware
VScodium is FOSS though
?
nano friends rise up!
I too use nano.
alias nano="vi -y"
Just tried it in my terminal and I couldn’t exit, lol
sorry, i didn't tell how to quit. it's ctrl+q
Thanks, I finally got my access to the terminal back.
just when you thought you knew how to exit vim lol
also, this is vim's "easy" mode.
ln -sf /bin/nano /bin/vi
I like Nano. I think it is quite good. There, I said it.
Edit a file, writing a quick shell script or whatever in the terminal. Nano is great. I don't see any use in learning vim or emacs. If I need something more I'm going use a gui editor anyway.
Don't get triggered anyone it's just my preference
This is my thought process exactly.
I get it, for a power user, vim is probably incredibly powerful. However, I just want to edit text files. I don't want a text editor where I need a cheat sheet just to save my changes and quit.
Funny, that's what I hate about Nano. The key binds seem completely random to me and the programs solution to this is to display a cheatsheet on the screen
Makes just enough sense to me, and those are really the only three binds I ever need for editing config files.
I don't want to come off like a vim hater, because I do believe it when people say it's powerful, but... I don't need powerful. I just need to edit text files.
Made the switch as well thanks to the modern key bindings
nano gang
Gross
They hate'us cause they anus.
Vim is pretty easy for me because I'm used to it. Nano is very difficult to use for me because I've rarely used it.
Same here, nano is the bane of my existence.
I was Nano user and I liked it. After I learned to use Vim, I liked it more.
Now when I use nano it's frustrating to use and I can do things much faster and easier in vim 😅
Opposite here. I got started with Gentoo back in the day of building things from the ground up. Their tutorials all used nano and I just got used to using that. I think when I had casually tried to mess with linux previously, old Mandrake and Redhat in the '90s, I always used the GUI editors, but I also didn't have a ton of time to mess with it and my hardware wasn't well-supported.
Same. Stage 1 install will forever be a core memory for me.
I’ve come to the conclusion, people who use vim just continue to do so out of a stubborn sense of pride for finally learning the key combinations.
In my case it's not a sense of pride. I can't use anything other than Vim because I keep accidentally putting random incantations into my word documents.
That extension is actually pretty cool. There is also tridactyl and a browser that was made with vim in mind, but a browser and a text editor are too different for many things to translate.
thanks for sharing, I'll try it on my work machine
Ya know, I might throw that on to my browser but I doubt I'd actually use it much. I only really use my browser for research; notes, music, and most of my work is done in the terminal. Being able to swap tabs faster by not having to cycle could be useful, but other than that I find the mouse to be a pretty rapid way of navigating unfamiliar pages
in my case, my hand hurts if I use mouse(or a mobile phone) for some time. using j/k for scrolling and clicking links via f help me a lot.
I honestly learned it just because I hated having to change hand position to use a mouse.
Can you use a mouse in nano? I always just use the arrow keys, or page up/down and home/end
I mostly use vim but I barely use the jkl; to navigate the document.
Ah sorry, I meant using Vim in a GUI program. I wanted something with the flexibility of a mouse (quick navigation, context menu actions, etc.) without using a mouse. Using just the arrow keys, shift highlighting, etc. is just too slow when writing lots of text, and it doesn't follow the natural position of typing.
Even if you use arrows, you still have to reposition your hand.
nano -m or set mouse in your nanorc
I mean, yeah, kind of. In the same way pilots fly planes out of a stubborn sense of pride for knowing what all the flight deck controls do.
I am faster, more comfortable, and more productive in Vim. I use the same keybindings in all my editors and IDEs. It's okay for people to have different preferences.
It's just convenient that it's pre-installed on many servers.
So I can use it now everywhere with my stubborn sense of pride for finally learning the key combinations.
That's funny, I feel the same way about Excel users.
What do you mean? The vim users know their key combinations pretty well, that's kind of the point of vim.
It's not pride, it's just that I know how to use it really well and that makes it easy for me to use.
But it's really only for viewing files on another system over SSH. For local work I use Sublime Text
Somehow it seems this would apply to any linux user
I just use vi
Is that stupid? It's all I ever bothered to learn, hasn't failed me yet. Now I'm not some big time linux guru but I'm a sysadmin and regularly find myself elbow deep in a CLI for stuff.
no, modal text editors are just nicer to use
When you only need to hammer a nail every once in a while, any hammer will do. When you're a roofer, you better have a roofing hammer.
If you don't spend your life in a terminal and just need to edit a file, vim isn't for you. If you want to learn complex strings of arcane wizardry to not only make your life easier but amaze your underlings, use vim.
Sometimes you don't even have the luxury of nano. Any moderately advanced Linux user should probably learn the basics of vi. Just knowing how to insert text and save it can fix a system that's stuck in recovery. Even if it's just to add a comment in front of a line in a config file.
I do like that some distros make visudo use Nano instead.
you can change that really easily
Sometimes you don't even have the luxury of vi. Any moderately advanced Linux user should probably learn the basics of sed. Just knowing how to insert text and save it can fix a system that's stuck in recovery. Even if it's just to add a comment in front of a line in a config file.
When does that even happen? If you have nano installed, wouldn't it work too?
Not in rescue mode. If you can't mount your root partition because something was fudged in /etc/fstab, for example, you may be stuck in recovery and depending on your distribution, it may not have nano in that minimalist mode.
For me it also happens when I install a VM of Debian using the small image, on my dedicated server in a data center. The company hosting the server requires a special network configuration and AFAIK, there's only vi. So i need to use the console to access the VM and from there, edit /etc/network/something with vi to setup the network. Once done I can reboot and install the rest of the software over the network, including nano.
I've been using Linux for more than two decades. Before nano I was using pico, but it also required to have pine/alpine installed. So knowing the basics of vi has often been helpful over the years for me.
Maybe it's because I like tinkering with VMs and SBCs, and most people will not encounter situations where they don't have nano, but it can happen. And you'll be glad to know at least "i" and ":wq!".
In a professional context, you might end up on servers that don't have nano installed, but do have vi. Or if you're helping out a friend on their laptop, they might not have the same software as you. Or if you often end up tinkering with random devices and/or setting up new systems it might be tedious to install the same applications every time.
It's basically an argument for learning the very basics of the most common editors so you have flexibility no matter where you end up. Even when you have the ability to download and install your preferred software, it's still an extra step that might not be desirable for a variety of reasons. But if it's just your own personal device, I see no problem with just installing whatever you prefer and running with it.
EDIT: Personally, I find that I don't end up using those other editors often enough to remember the abstruse commands of tools like vim, so I'm not worried about it. When it does happen, 99% of the time I can just whip out a smartphone and look up the directions for the n-dozenth time.
Vim (or emacs, or any other advanced text editor) is much easier to use than nano when you need to do something more complex than type couple of lines.
Better? Maybe!
More efficient? Surley!
But easier?! Hell no! Easy means you can use it without a lot of training or studying. It is self explanatory. And there is no way on earth that vim is easier than nano. I don't need to know anything to use nano I need to check docs for hours before I can even start using vim
You noobs. I just use combinations of cat piped to sed to edit my files, which are mainly lisp code.
cat pipeing is safer though.
foobar > file and your file is gone.
You can always alias > to < in your shell.
Get out!
`
Huh does that actually work? Don't have a system handy to try it out.
storage/documents/programs ro
> echo puts "hello world" > main.rb
storage/documents/programs ro via rb
> ls
c js main.rb python
storage/documents/programs ro via rb
> < main.rb grep hello
puts hello world
storage/documents/programs ro via rb
>
I think so! I think it's something like < file works anywhere in the line, not just the end. There may be some specifics about no space when it is the front but I don't remember lol.
Amateur! I write my code down on a piece of paper, scan it in, send it to my computer through email, then make a custom-built AI read the paper and print it in the terminal!
It is easy, though? I cannot even use it correctly. I just know some of the commands and that if you hold down shift it goes backwards.
I'm a vim user and I would say it's not. It's very powerful, but only once you become familiar with the commands.
Nano is a better default for the average user because it works in a way most users would expect for a text editor to work.
Honestly, these days it's pretty simple. The thing you need to remember is that you do not need to know EVERYTHING all at once. Learn a little bit, use it, keep what you use, discard what you don't, get it in muscle memory, and learn a bit more. Very quickly you'll be zooming through vim.
You can learn the basics, and go from there- the basics of vim (which imo everyone should know- vi is often the fallback editor), and then you can just casually learn stuff as you go.
Here's the basics for modern default/standard vim: Arrow keys move you around like you expect in all 'modes' (there's some arguments about if you should be using arrow keys in the vim community- for now, consider them a crutch that lets you learn other things). There's two 'modes'- command mode, and edit mode.
Edit mode acts like a standard, traditional text editor, though a lot of your keybinds (e.g. ctrl-c/ctrl-v) don't work.
Press escape to go back into command mode (in command mode, esc does nothing- esc is always safe to use. If you get lost/trapped/are confused, just keep hitting escape and you'll drop into command mode). You start vim in command mode. Press i to go into edit mode at your current cursor position.
To exit vim entirely, go to command mode (esc), and type :wq.
':' is 'issue command string',
'w' is 'write', aka save,
'q' is quit.
In other words, ':wq' is 'save and quit'
':q' is quit without saving, ':w' is save and don't quit. Logical.
Depending on your terminal, you can probably select text with your mouse and have it be copied and then pasted with shift-ins in edit mode, which is a terminal thing and not a vim thing, because vim ties into it natively.
That gets you started with basically all the same features as nano, except they work in a minimal environment and you can build them up to start taking advantage of command mode, which is where the power and speed of vim start coming into play.
For example 'i' puts you in edit mode on the spot- capital i puts you in command mode at the beginning of the line. a is edit mode after your spot- capital A is edit mode at the end of the current line.
Do you need these to use vim? Nope. Once you learn them, start using them, and have them as muscle memory, is it vastly faster to use? Yes. And there's hundreds of keybinds like that, all of which are fairly logical once you know the logic behind them- 'insert' and 'after' for i/a, for example.
Fair warning, vim is old enough that the logic may seem arcane sometimes- e.g. instead of 'copy and paste' vim has 'yank and put,' because copy/paste didn't exist yet, so the keybinds for copy/paste are y and p.
The second most important thing about vim to learn is:
If nothing is behaving then you probably have caps lock on.
Vim makes it easy to edit text in complicated ways, once you've learned it.
Vim is not easy to learn nor intuitive.
It is simple and compounding.
You might not ever edit enough text to ever need to learn a new skillset to edit text. If that's the case, use nano.
But if you do find yourself editing a lot of text, consider trying vimtutor.
It takes 20 minutes and you'll be proficient enough to match nano's efficiency ceiling.
It's extremely easy to get started
VIM is like drugs. Easy to start, hard to quit.
The Terminator is not here to kill you, its here to protect you from Emacs (which can change its form to anything).
Cmon dude, what's most likely to be Skynet?
Vim: Clearly evil, lightning fast. Relies on vimscript for any interactivity and can barely be used outside of the editor.
Emacs: the hippie brain child of some of the brightest minds at the MIT AI lab, funded by military contracts. Slow, but uses a near-universal language that can easily escape the bounds of the editor, (and often does (, and holy shit where did those parentheses come from. (Oh no, it's becoming self-aware - fly you fools....!
Vim: Clearly evil, lightning fast. Relies on vimscript for any interactivity and can barely be used outside of the editor.
I don't know why you want use Vimscript for anything outside of the editor. But if that your issue, then there is Neovim. It uses Lua instead Vimscript, but what is the benefit of using Lua outside of Vim? That changes nothing.
Lua outside of Vim has huge applications in embedded products. Dude I would kill for Lua. Do you know what we have? Common Lisp. Yeah, it's great and fancy and all, but try adding that to your CV and applying for an embedded system job.
I'll say that I find easier to exit vim that to exit nano.
I don't know what ^ means. I just start pressing special keys until it doesn't the thing
CTRL
I started on Unix systems using Vim, so I find Nano to be the confusing editor. A Vim install is one of the first things I do on a new server.
The best text editor is ‘$EDITOR’.
I think you mean "$EDITOR". Gotta have that variable expansion.
Not necessarily! I always run ln -s '/usr/bin/$EDITOR' $(which $EDITOR) after a fresh install, so I have a valid executable on the path called $EDITOR.
Of course, then I have to make sure to add export EDITOR=\$EDITOR to my .bashrc. (Obviously.)
Well,.that's one way to solve the problem of not expanding your editor var correctly...
In every post of this kind I am amazed at so many people using nano instead of micro which is SO MUCH BETTER while being the same thing at the same time.
When you help manage thousands of servers with vim and nano already installed, it's just faster to use one of those than installing something else nearly ever single time.
I prefer nano for quick edits of small files, but vim for hunting down things in larger files.
Or you can preinstall micro like you preinstall everything else 😅
I'm not that high on the totem pole unfortunately
Holy cow. You can use your mouse with micro. Amazing.
You can have mouse support with nano. Alt-m toggles it on or off.
Oh wow. Weird that it defaults to off.
You can change that in the nanorc along with changing key binds, colors, and the like.
And all the shortcuts are SANE, not the weird thing of nano
I’ve discovered it just a few days ago and now use it on all my machines
Nano isn't even that simple. Ctrl+X to quit? I guess if you use phonetic sounds to figure out how to exit a program. At least Vim uses the idea of "use what the words start with."
I personally use micro in the terminal, and Kate if I want a GUI to write. Vim and Emacs are fine for those who want it, I have no stakes in the editor wars beyond "I just want my program to do what I want, and I want it to be simple to learn."
Nano has a cheat sheet at the bottom of the screen at all times
Meanwhile I can just use the same shortcuts every other program made in the last 40 years uses. Ctrl+Q to quit, Ctrl+S to save, Ctrl+Z for undo. If I wanted to consult a cheatsheet to relearn keyboard shortcuts, I'll use vim and emacs.
To be fair, you can easily rebind all the keys to be more normal by adding a .nanorc. Though, Ctrl-Z conflicts with suspend in many terminals, so I keep that one as Ctrl-U. A .nanorc also allows turning on mouse support, changing the color scheme, etc.
That's like the picture of a normal dude with Nano, a large Vim dude, a larger buff Emacs dude and an ever larger massive Ed dude.
eh the emacs folks are just chilling in a corner somewhere. Maybe in the old folks home together with the ed users
Don't forget the joe user in the corner wearing a trench coat with a bomb strapped to his chest wired to a dead man's switch.
Ed is like Skynet itself.
Do people still use ed unironically outside of scripting context?
Unironically? Maybe not. But using something ironically is still using it.
I like nano tho it has some strange shortcuts
micro has some improvements and default shortcuts that are much closer to common GUI text editors
Isn't this supposed to be VIM vs Emac? What's is there point to be programming in the terminal anyway? Nano is good to fix some config files while your are in there, but if I needed to do real programming I'll be finding something that works in the GUI.
Did you just say GUI?
More like ewwwie.
Its GNUI
What you're referring to as GNUI, is in fact GNUI/Linux or as I’ve recently taken to calling it, GNUI plus Linux.
GNUssy
Efficiency.
There's 0 chance if you have to pick up your mouse that you can keep up with a Unix gray beard.
That's just editing, if they're from the emacs era there might be nothing you can do with text faster across their whole system.
I like vscode as a entry point, but if you care to get faster learning just vim motions and sys utils alone is going to cut time from the process.
Oh it's about speed. What's the one that get your brain to be faster at programming? I use 4 fingers typing and am still typing much faster than I can think.
Definitely worth running through vim tutor at least once.
It's beyond typing speed, things like piping out strings to utilities is using one program to write another, you aren't just getting faster because of access, it's a paradigm shift.
Edit just for fun: im a non Dev dummy who happened to grow up in a Unix household. Even having dropped vim for helix and bounced around the MS admin/Apple IT space for 30+ years. When I switched to Linux I could still remember binds I'd set up and last used at 9.
Kinda like riding a bike.
It's speed, but it's also flow and a continuous stream of thought. If all your editing is being done with muscle memory and minimal thought, you can continue thinking about the problem at hand rather than interrupting your thoughts process to fumble through some context menu to make a change.
supposed to be VIM vs Emac?
30 years ago it was vi vs everything. I don't see it changed today.
Easy is relative. What are you trying to do? Replace a value in an yaml file? Then nano is easier. Trying to refactor a business critical perl/brainfuck polyglot script in production? Then you probably want to use vim (or emacs if you are one of those people)
Replacing a value in a config file is still easier in vim due to e.g. ciw or ci" being a thing.
Walk someone else through editing a config file on the command-line over screenshare? Nano. Omg nano is your friend.
Honestly, roll back to previous release for production and use best IDE your developers are used to on their local machines, test the fix in a non production environment then release to prod. When is editing business critical scripts in production really needed?
It was a joke to make the point that vim can be the easiest tool to use if you are trying to do a complex task.
I’m a bit slow on the uptake there haha. I started with vi and moved over to nano at some point and never looked back. I can refactor code in production with the best of them. There’s still some tricks I’ve seen done in vi that amazes me that I haven’t tried to figure out in nano, but for the most part it’s fairly easy to use to do nearly anything in. Even supports color for supported files, YAML, etc.
Micro for the win
No, Micro for the linux
Nah, win can have it.
idk man, vims pretty chill, it even has a tutor in it already, what more could you want?
it even has a tutor
Yeah, people are just lazy. I remember when I invented a new login screen and was told it was "difficult", "confusing" and "took some getting used to".
It even came with a free 100-page manual and a 4-hour master class. Some people, I tell you!
^This is meant more as a joke than an actual critique, even if it kind of reflects my thoughts. But ultimatly, I thought it was a funny bit.^
A text editor that doesn't need a tutor because the interface is intuitive enough that someone who has been using text editors (as a concept) for years can more or less instantly pick it up and start working without needing a tutorial to simply edit a config file.
a text editor that has a tutor because it's been around for so long and it's had so many years to establish itself with an outside control interface that's quite literally about as optimal as it can be. Vim basically allows you to never move your hands away from the homerow keys, even when navigating and doing bulk edits. The sheer amount of gained speed and productivity you get from this combined with the amount of times you'll have to deal with text editing throughout your life is probably going to outweight any potential learned annoyances.
with an outside control interface that’s quite literally about as optimal as it can be.
Which is probably true, as long as you make one assumption- that the operator dedicates a significant amount of time to learning it. With that assumption being true- I'll assume you're correct and it becomes much more efficient than a Nano/Notepad style editor.
I'm happy to concede without any personal knowledge that if you're hardcore editing code, it may well be worth the time to learn Vim, on the principle that it may well be the very most efficient terminal-based text editor.
But what if you're NOT hardcore editing code? What if you just need to edit a config file here and there? You don't need the 'absolute most efficient' system because it's NOT efficient for you to take the time to learn it. You just want to comment out a line and type a replacement below it. And you've been using Notepad-style text editors for years.
Thus my point-- there is ABSOLUTELY a place for Vim. But wanting to just edit a file without having to learn a whole new editor doesn't make one lazy. It means you're being efficient, focusing your time on getting what you need done, done.
A text editor that doesn’t assume that the keys on my keyboard are in the same order as yours.
I remember looking up how to use Colemak with vim, and the advice was:
Change the mappings so the position is the same, but it has the downside that every tutorial won't match.
Keep the mappings and do awkward stretches for common functions like up and down.
So I just gave up and moved on.
I hit the same wall with Dvorak layout.
that is a potential problem, though im sure there's a vim user somewhere that's fixed it with a bind set.
One that's intuitive and doesn't require a cheat sheet or what I like to call fingular contortionism discovery.
is there not a single other person who uses helix?
essentially a terminal modal editor (like vim), but instead of specifying the action to perform then what to perform the action on (like "yank 3 lines"), in helix you select first, then perform actions on the selection (like "these 3 lines, i want them yanked"). it's slightly better (according to others) because you get to see what you're going to change in the file so you don't accidentally delete 5 lines instead of deleting 4.
on top of that many features are builtin, like tree-sitter and lsp support, so you don't have to spend 5 hours looking for cool plugins and configuring everything to get started (my config file is only 50 lines of toml).
the downside is that there isn't support for plugins (yet), but there's already things like a file picker, more than 100 themes etc.
So similar to kakoune? I tried that for a while, but it was missing some features so I went back to vim/neovim.
I need to know vi anyway, because that is available everywhere (as part of busybox), so using vim/nvim for bigger systems just fits.
I gave it serious consideration when the death of Atom was announced and I was unsure where to move on to.
Looks like in the meantime a lot has been done (as far as I remember, TreeSitter and LSP weren't built in back then...? Not sure though), but the lack of a plugin system is still killing it for me.
TBH it looks like it has 75% of the features you want from a codeditor, which is much more than the use-case for Nano, but no way to go the remaining 25% of the way.
the death of Atom
I'm still in mourning.
It was pretty great, wasn't it?
Although I must say. I eventually landed on neovim. Steep, steep learning curve, but now I would not switch back again.
I would look at that, but I bounced off VIM hard, so probably not for me.
Helix's editing model is so much better than vim's. I would probably use it if it was be closer to a drop-in replacement for vim. I really hope this neovide issue gains some traction because I don't think I can daily drive anything that isn't as smooth as neovide again.
I simply have too much vim config and muscle memory to ever leave vim
Emacs - A pretty good OS you can use as a text editor.
And to counter the old saying of it lacking a decent editor, there's always evil-mode.
The problem I had with nano is that, for the time being, it was supposed to be easy to use. With that in account I always get lost when saving a file and closing the thing because one's used to doing something else with Ctrl+O and Ctrl+X.
Whereas with Vim (and Neovim for a little while, and now with Vis) I knew it had a steep learning curve from the start so I always had it in mind. And all the funny stories about quitting vim.
they've changed those bindings now, Ctrl+S, Ctrl+X, Ctrl+V, and Ctrl+C all do what you think they do
Great, now the next time I'll use nano I surely will forget about this and get frustrated when trying to save a file with Ctrl+O
you still can, but I think Ubuntu and other prepacked distros will switch soon to the better bindings
Great so now I will mangle all my merge commits depending on which version the host is using.
I'm thinking Ctrl+C quits and Ctrl+S is scroll lock is that correct?
nano
Ctrl-Q search backwards
Ctrl-S and Ctrl-X is save file
Ctrl-V is scroll down
Ctrl-C is cancel or info
nano --modernbindings
Ctrl-Q quits
Ctrl-S is save file
Ctrl-X is cut
Ctrl-C is copy
Ctrl-V is paste
I mean quitting vim isn't hard you just reset the computer.
The problem with using nano for years is that I now try using nano shortcuts in other programs. Random new windows opening is confusing, until you figure out Ctrl+o isn't save in that program. Then it's just annoying because you still have your inappropriate muscle memory.
For vim I had to config or install something just to be able to COPY something to use outside vim, how backwards is that? Isn't this the most standard feature one can expect to work as default?
You mean you couldn't copy some text from vim and paste it into another application?
if yes, what did you have to install/configure for that? I've never had any issues copy paste from/to vim, console/GUI windows/Unix.
Sadly I don't remember. Sometimes it comes preinstalled, sometimes not, depending on OS or something. (Maybe Manjaro gnome). I could copy and paste inside of vim, but not to/from outside vim.
What you observes could be OS depended,. Vim has its own copy paste buffers (y,p etc) and the OS has its own. Traditionally highligh to copy and middle mouse button to paste on Unix. Windows has 2 methods, ctrl-c,v but those are also bindings in vim so only the older less known crtl-insert,shirt-insert works.
Copy paste is definitely built in, there is no need for extra plugins.
it actually does work by default, you just probably missed how to do it in the help pages in vim. For those curious, the system clipboard is its own named register in vim (:help registers to learn more) and can be accessed with either “* or “+ depending on your how your system is configured.
To copy a line: ”*yy or ”+yy
To paste a line: ”*p or ”+p
So I need to dive into the manual to do something as basic and universal as "copy and paste"? Why not make it Ctrl+shift+c or have it shown in the info text when pressing this almost universally accepted keypairs? Or at least make it somewhat similar to this. I find it bonkers why some programs decide to just have radically different shortcuts or defaults, the complete opposite of what feels intuitive. Same with the design of some doors that need actual SIGNS on them to tell you which direction they open. Just bad design choice.
Edit: just remembered. Same story with tmux. Want to copy something? Surprise, it's not anything you expect it to be. Some ctrl+b + [ or some shit
#!/bin/bash
keep_generating=1
while [[ $keep_generating == 1 ]]; do
dd if=/dev/random of=$1 bs=1 count=$2 status=none
echo Contents of $1 are:
cat $1
echo
read -p "Try generating again? " -s -n1 answer
while true; do
case $answer in
[Yy] )
echo
break
;;
[Nn] )
keep_generating=0
break
;;
*)
esac
read -s -n1 answer
done
done
Just ask if it's correct. If not destroy the universe. Only The correct will survive, it's O(1)
What if there is no correct answer?
It's not fun when you have to explain it. But basically it is based on the infinite multiverse theory. Since the multiverse splits whenever you make choices, in this case the program would spawn a large number of multiverses each with different combinations of those bits, which means at least one of them would have the exactly the combination we want. If the program destroys the multiverse it is in after it determines it is not correct, only reality that remains is the one with correct combination of bytes. Making it that we will get the code we want on the first try.
You are assuming here that I know what I want. What if there is no obviously correct answer, and even in the Everett branch that generates the optimal content for the file I'll still think it can be improved and tell it to destroy the universe?
I guess yeah. In that condition the algorithm would probably destroy all universe. Although you might be able to set a threshold and not destroy when it is over the threshold.
But situation where you don't know the answer is not for this algorithm as this one came from sorting problem.
modal editing can be fun. it is a weird skill like driving a manual transmission.
that said driving a manual transmission in stop and go traffic on a hot day is a lot like editing in vi sometimes.
Unless you're European. Then driving manual is considered basic life skill like riding a bike.
Micro is where its @ <3
Nano is my "daily drive", but I'd use vim as well -- takes a couple seconds to search for "how to type in linux vim" and "how to save a file in linux vim" anyways. :^)
I know i and :wq and that's all I ever plan on learning
100% Micro. Unless you’re only - and mean ONLY - living in the terminal, why would you want all your desktop and terminal shortcuts different from one another?!
kwrite and gedit friends rise up :)
On KDE, there's also Kate. They used to be totally different apps, but these days, KWrite is a simplified version of Kate. They both use the same text editor component, but Kate adds more IDE-like features.
true but i dont like how they are forced togther so i use featherpad
How do you use these when you are connecting via SSH? You enable X forwarding?
It's fine when you have a graphical environment, but what do you do when you dont have one?
A similar argument is what finally caused the value of the vi family of editors to click in my brain:
They are designed to be fully functional over even the shittiest possible* remote connection. You can't always count on ctrl, alt, or even the arrow keys being transmitted in a way that is understood by the remote machine.
*Well, I guess the worst possible terminal would be something like an actual teletype, and in that case you'd probably want to fall back to ed or its descendants. To save paper, if nothing else.
Using X forwarding would require you to install big chunks of GNOME or KDE on the server. A better approach is to mount the remote server over SFTP then use KWrite, gedit, whatever, directly on your desktop.
ohh yeahh then nano
In any KDE app you can connect with SFTP in the open file dialog. Just type sftp://user@server/path and you can browse/open/edit files the remote server. ssh keys+agent make things a lot easier here obviously.
I started on Emacs and then didn't use it for a few years and forgot everything so now I'm stuck on Nano. But that's fine because nano does everything I want it to do.
Ed users entered the chat
Worst is when installing a new distro(usually in a vm ) and it defaults to nano and for some weird reason no vi of any sort is installed. I hated nano. Last time I intentionally used something like nano was the 90s with pine I think.
What is there to hate? I don't really understand. It does what it says on the package, and seems to do it pretty well. At least with respect to making small and quick edits to config files in the command line.
My fingers don’t speak it is the problem.
Pardon?
Imagine using Nano or Vim; when you could be using Cat and Echo.
/s
I spent the weekend failing to make my civ mods work, with a thousand lines of notes.. 2/3 in, I think "damnit blazeknave. You spend months perfecting this stupid fucking obsidian setup, and you've been here in notepad+ like a fucking jabroni."
I do the same all the time with anytype.
I dropped notes into sublime and then go back and put them neatly into any type. I don't really know why I do it either It takes any type a total of three or four seconds to start up and I have to enter in a passcode. But I only have to do it once. I guess I do have to think about where I'm going to put the document and making sure that it's tagged correctly, it's a lot easier just a scribble something into a random text window to forget about for a decade.
You mean my 6k Gmail drafts? 😭
I started doing paper pads everywhere and trying to log at end of day.
There is always the Joe editor, if you like good ol' Wordstar. :)
I've been known to watch a fight video there every now and again, yes.
Butterfly gang
Greybeard here. I can use vi, emacs, nano, etc. and use whatever is available if it suits the job. For many years I did dev in emacs on my computers and on other systems used vi for quick edits. Currently on my own laptop I have micro as default term editor now. For Rust development - code, though I have hopes for Lapce.
They're all just tools and so are people who get tribal about things.
Emacs
Hey now we don't denigrate vim and nano users. For the nano users, denigrate means to put down.
and sometimes you just need a text editor, not an entire thesaurus
If I'm doing quick txt editing nano is great and what I know I can't figure vim out for the live of me
On my laptop, I update my bashrc on Excel, in Wine, then export it as a PDF, OCR to .md, Pandoc it to an .Org, and then finally, write it down on paper and re-type it on my phone's Termux's Emacs instance, then TRAMP it to my PC, in the other room.
I use biebian, btw.
Get'er Robbie she's under the desk!
Its lighter weight
My problem with those are that I always manage to get lost on where the program has its focus/what kind of instruction is expecting.
And while trying to go back to normal I end up messing it more and more.
Maybe some day I will get there, but it is still not the day.
Nano is notepad, but with worse mouse integration. It's Vim/Emacs without any of the features. It's the worst of both worlds
If you want ease, just use a GUI notepad. If you want performance boosts, suck it up and learn Emacs or Neovim
Why would you use a mouse in a console editor?
What if you want ease on a terminal?
Heaven forbid I want to use an intuitive, simple, terminal based text editor when I ssh into one of my boxes.
But here's the real kicker. Why do people like you give two shits what text editor other people use?
Nah... vim users fight emacs users, but not nano users. Wrong league. We do not beat little children ;)
Nano is more like fast food. It’s easy and convenient, but it makes you feel a little guilty and dirty afterwards.
Nano is the tool that people use when they don't have a need for TUI editors in general and therefore don't want to have to memorize how people with teletypes decided things should have been done 75 years ago and who also don't want to get dragged into endless pointless bickering arguments about which set of greybeards was objectively right about their sets of preferences.
I'm glad people enjoy the editors they use and also I just wanna change a single fuckin line in a config file every once in a while without needing to consult a reference guide.
I don’t have much to say about nano, except the hotkey bindings are weird and unnatural.
They make sense, but they feel wrong.
Vim felt like having superpowers when I started with it, after being spoiled by helix it feels like a relic though
How about micro
And yet Emacs users don't fight vim users. Emacs users decided vim's interface was pretty cool and added it to Emacs. Somehow people still call it a war though.
Bruh 😂 the Emacs user community absolutely constantly shit on Vim users. When they added Vi(m) bindings they literally named it 'evil mode', and they constantly make fun of people who use it, and spacemacs, and the latest flavor of (neo)vi(m), and all the extensions necessary to make vim halfway useful as an ide, etc etc etc.
Evil or the extensible vi layer is super popular and improves the one area that emacs was lacking i prefer the emacs keybinds but have never seen peeps chat shit about it
Which Emacs community? I've been following it for ages in a few places (Reddit is the most common) and I literally do not encounter any of that. Calling it evil was humor - as if people who went to all the bother making it would be trying to push people away...
Using the evil package is very popular and often recommended, which means literally using it like vim, but with all the Emacs ability on top. I don't know what on earth you're talking about.
Same here.
The biggest diss I have on emacs users, as a vim user, is that emacs is the only text editor where people routinely need to keep a book about it on their desk!
I used to work with a bunch of emacs guys and they all had an emacs book or two on their desk or as a monitor stand. They usually also had one on awk and/or Perl to go with it.
I’m sure they’d probably make fun of me for being unable to edit a file with anything but my specific vim config, which is not compatible with any other human’s vim config.
(I would never seriously judge someone on their editor, but I will bust an emacs users chops and accept a good natured jab back)
Oh to be clear, it's all humor. At least mostly, I'm sure there are RMS level fanatics somewhere that truly believe some of the BS.
This is something as old as time. I've seen it prolifically on Reddit (though not in the Emacs community, they generally discourage memes), various Linux forums, old Usenet, various programming forums... I'm not trying to be evasive, but it's hard to provide examples that aren't specifically cherry picked, which wouldn't benefit the conversation much.
There's even a Wikipedia page dedicated to this: https://en.wikipedia.org/wiki/Editor_war
How close to vim's functionality is evil mode? I've been toying with the idea of learning Emacs but I rely on Vim's langmap and that is rarely implemented in Vim emulations / bindings.
Although I came from vi (pre-vim and pre-evil) and still have the muscle memory, I don't and haven't used it myself.
I hear it described as a "nearly complete" and "very comprehensive". There is definitely a solid community of people using and enjoying it, but on the other hand there are always some reports of getting tired of having to work through, and sometimes extend, an additional interface layer, so in the long run being happier to just adopt the default bindings.
I know there are a few areas where trying to follow common vim workflows doesn't work as well. Historically the performance of line number display been weak in Emacs, though I believe it's recently much improved. A lot of people seem to make heavy and constant use of it in vim but conversely for me (and I think it's more common in Emacs) it's only an occasional, transient need when some external log or error quotes a line number, so I have them only displayed when I hit the go-to-line binding.
Overall, I think the most frustrating issues people have trying to adopt Emacs from vim are due to trying to impose their specific familiar vim workflows. The most obvious example is people concerned with startup time, but for more typical Emacs workflows it's a non-issue. Users typically stay in Emacs rather than jumping in and out of it from a terminal (and if you really want that workflow, you run one instance as a daemon and pop up a new client to it instantly). My Emacs instance's uptime usually matches my computer's uptime.
The draw of Emacs is not about it only being an editor so much as a comprehensive and programmable text environment. It is a lisp-based text-processing engine that can run numerous applications, the primary being an editor (the default, or evil, or others...) but also countless other applications like file managers, VC clients, subprocess management and many others. It 95% replaces the terminal for me, and many other tools. So it's the environment through which you view and manipulate all things text that is very accessible to modify and extend to fit your needs. Hence the joke about it being an OS is pretty apt, though to believe it needs a good editor implies vim isn't a good editor ;).
I once fixed my bashrc file with libreoffice
calm down satan
I regularly fix my bashrc file with Notepad. I run it in Wine because I cbf to RealVNC from my Windows CE media server.
(n.b: None of this is real, I wrote it to upset people, I'm sorry)
Well let me upset you.
Ive been helping my coworker on a call and he was sharing his screen. I told him to edit a file (add a line) on a linux box we develop and he copied the file to his windows host with winscp, edited it in notepad and copied it back. I fantasize about killing him ever since.
They need to learn how to use their tools better. Winscp does all that transparently for you if you press F4 on a file on a remote system. Or maybe they did and you just didn't see it.....
It's quite a handy function when you're diving through endless layers of directories on a remote box looking for one config file amongst many.
That's crazy! At my job, I just help our users. I don't have to build (and then maintain) infrastructure with them.
I prefer Office 365 online.
Come back after your uploaded it to the cloud and edited it using Google docs.
IME?
Integrated Mevelopment Environment. You should have known this
I’m a meveloper
MevOps Engineer
My mate mevops
tips fedora M'eveloper
That acronym usually stands for "Input Method Editor" and describes the program that makes people able to type east Asian characters with a usual keyboard.
日本語は楽しいです。
The M stands for beefcake
Integrated Memeing Environment
Vscode is malware
VScodium is FOSS though
?
nano friends rise up!
I too use nano.
alias nano="vi -y"
Just tried it in my terminal and I couldn’t exit, lol
sorry, i didn't tell how to quit. it's
ctrl+q
Thanks, I finally got my access to the terminal back.
just when you thought you knew how to exit vim lol
also, this is vim's "easy" mode.
I like Nano. I think it is quite good. There, I said it.
Edit a file, writing a quick shell script or whatever in the terminal. Nano is great. I don't see any use in learning vim or emacs. If I need something more I'm going use a gui editor anyway.
Don't get triggered anyone it's just my preference
This is my thought process exactly.
I get it, for a power user, vim is probably incredibly powerful. However, I just want to edit text files. I don't want a text editor where I need a cheat sheet just to save my changes and quit.
Funny, that's what I hate about Nano. The key binds seem completely random to me and the programs solution to this is to display a cheatsheet on the screen
Control+W = "Where is," Control+O = "Overwrite", Control+X = "Exit."
Makes just enough sense to me, and those are really the only three binds I ever need for editing config files.
I don't want to come off like a vim hater, because I do believe it when people say it's powerful, but... I don't need powerful. I just need to edit text files.
Well hello there!
Micro, hell yea!
Made the switch as well thanks to the modern key bindings
nano gang
Gross
They hate'us cause they anus.
Vim is pretty easy for me because I'm used to it. Nano is very difficult to use for me because I've rarely used it.
Same here, nano is the bane of my existence.
I was Nano user and I liked it. After I learned to use Vim, I liked it more. Now when I use nano it's frustrating to use and I can do things much faster and easier in vim 😅
Opposite here. I got started with Gentoo back in the day of building things from the ground up. Their tutorials all used nano and I just got used to using that. I think when I had casually tried to mess with linux previously, old Mandrake and Redhat in the '90s, I always used the GUI editors, but I also didn't have a ton of time to mess with it and my hardware wasn't well-supported.
Same. Stage 1 install will forever be a core memory for me.
I’ve come to the conclusion, people who use vim just continue to do so out of a stubborn sense of pride for finally learning the key combinations.
In my case it's not a sense of pride. I can't use anything other than Vim because I keep accidentally putting random incantations into my word documents.
"There once was a dduuuZQ:q!"
haha, same. do you use vimium as well?
That extension is actually pretty cool. There is also tridactyl and a browser that was made with vim in mind, but a browser and a text editor are too different for many things to translate.
thanks for sharing, I'll try it on my work machine
Ya know, I might throw that on to my browser but I doubt I'd actually use it much. I only really use my browser for research; notes, music, and most of my work is done in the terminal. Being able to swap tabs faster by not having to cycle could be useful, but other than that I find the mouse to be a pretty rapid way of navigating unfamiliar pages
in my case, my hand hurts if I use mouse(or a mobile phone) for some time. using
j
/k
for scrolling and clicking links viaf
help me a lot.I honestly learned it just because I hated having to change hand position to use a mouse.
Can you use a mouse in nano? I always just use the arrow keys, or page up/down and home/end
I mostly use vim but I barely use the jkl; to navigate the document.
Ah sorry, I meant using Vim in a GUI program. I wanted something with the flexibility of a mouse (quick navigation, context menu actions, etc.) without using a mouse. Using just the arrow keys, shift highlighting, etc. is just too slow when writing lots of text, and it doesn't follow the natural position of typing.
Even if you use arrows, you still have to reposition your hand.
nano -m
orset mouse
in your nanorcI mean, yeah, kind of. In the same way pilots fly planes out of a stubborn sense of pride for knowing what all the flight deck controls do.
I am faster, more comfortable, and more productive in Vim. I use the same keybindings in all my editors and IDEs. It's okay for people to have different preferences.
It's just convenient that it's pre-installed on many servers.
So I can use it now everywhere with my stubborn sense of pride for finally learning the key combinations.
That's funny, I feel the same way about Excel users.
What do you mean? The vim users know their key combinations pretty well, that's kind of the point of vim.
It's not pride, it's just that I know how to use it really well and that makes it easy for me to use.
But it's really only for viewing files on another system over SSH. For local work I use Sublime Text
Somehow it seems this would apply to any linux user
I just use vi
Is that stupid? It's all I ever bothered to learn, hasn't failed me yet. Now I'm not some big time linux guru but I'm a sysadmin and regularly find myself elbow deep in a CLI for stuff.
no, modal text editors are just nicer to use
When you only need to hammer a nail every once in a while, any hammer will do. When you're a roofer, you better have a roofing hammer.
If you don't spend your life in a terminal and just need to edit a file, vim isn't for you. If you want to learn complex strings of arcane wizardry to not only make your life easier but amaze your underlings, use vim.
Sometimes you don't even have the luxury of nano. Any moderately advanced Linux user should probably learn the basics of vi. Just knowing how to insert text and save it can fix a system that's stuck in recovery. Even if it's just to add a comment in front of a line in a config file.
I do like that some distros make visudo use Nano instead.
you can change that really easily
Sometimes you don't even have the luxury of vi. Any moderately advanced Linux user should probably learn the basics of sed. Just knowing how to insert text and save it can fix a system that's stuck in recovery. Even if it's just to add a comment in front of a line in a config file.
When does that even happen? If you have nano installed, wouldn't it work too?
Not in rescue mode. If you can't mount your root partition because something was fudged in /etc/fstab, for example, you may be stuck in recovery and depending on your distribution, it may not have nano in that minimalist mode.
For me it also happens when I install a VM of Debian using the small image, on my dedicated server in a data center. The company hosting the server requires a special network configuration and AFAIK, there's only vi. So i need to use the console to access the VM and from there, edit /etc/network/something with vi to setup the network. Once done I can reboot and install the rest of the software over the network, including nano.
I've been using Linux for more than two decades. Before nano I was using pico, but it also required to have pine/alpine installed. So knowing the basics of vi has often been helpful over the years for me.
Maybe it's because I like tinkering with VMs and SBCs, and most people will not encounter situations where they don't have nano, but it can happen. And you'll be glad to know at least "i" and ":wq!".
In a professional context, you might end up on servers that don't have nano installed, but do have vi. Or if you're helping out a friend on their laptop, they might not have the same software as you. Or if you often end up tinkering with random devices and/or setting up new systems it might be tedious to install the same applications every time.
It's basically an argument for learning the very basics of the most common editors so you have flexibility no matter where you end up. Even when you have the ability to download and install your preferred software, it's still an extra step that might not be desirable for a variety of reasons. But if it's just your own personal device, I see no problem with just installing whatever you prefer and running with it.
EDIT: Personally, I find that I don't end up using those other editors often enough to remember the abstruse commands of tools like vim, so I'm not worried about it. When it does happen, 99% of the time I can just whip out a smartphone and look up the directions for the n-dozenth time.
Vim (or emacs, or any other advanced text editor) is much easier to use than nano when you need to do something more complex than type couple of lines.
Better? Maybe!
More efficient? Surley!
But easier?! Hell no! Easy means you can use it without a lot of training or studying. It is self explanatory. And there is no way on earth that vim is easier than nano. I don't need to know anything to use nano I need to check docs for hours before I can even start using vim
(...once you learn the bindings)
You noobs. I just use combinations of cat piped to sed to edit my files, which are mainly lisp code.
cat pipeing is safer though.
foobar > file and your file is gone.
You can always alias
>
to<
in your shell.Get out!
`
Huh does that actually work? Don't have a system handy to try it out.
I think so! I think it's something like
< file
works anywhere in the line, not just the end. There may be some specifics about no space when it is the front but I don't remember lol.Amateur! I write my code down on a piece of paper, scan it in, send it to my computer through email, then make a custom-built AI read the paper and print it in the terminal!
M-x M-c butterfly
Link.
Average vim user: vim is easy.
Also average vim user: literally hours of reading tutorial pages on how to use vim.
You can learn Emacs in one day. Every day.
It is easy, though? I cannot even use it correctly. I just know some of the commands and that if you hold down shift it goes backwards.
I'm a vim user and I would say it's not. It's very powerful, but only once you become familiar with the commands.
Nano is a better default for the average user because it works in a way most users would expect for a text editor to work.
Honestly, these days it's pretty simple. The thing you need to remember is that you do not need to know EVERYTHING all at once. Learn a little bit, use it, keep what you use, discard what you don't, get it in muscle memory, and learn a bit more. Very quickly you'll be zooming through vim.
You can learn the basics, and go from there- the basics of vim (which imo everyone should know- vi is often the fallback editor), and then you can just casually learn stuff as you go.
Here's the basics for modern default/standard vim: Arrow keys move you around like you expect in all 'modes' (there's some arguments about if you should be using arrow keys in the vim community- for now, consider them a crutch that lets you learn other things). There's two 'modes'- command mode, and edit mode.
Edit mode acts like a standard, traditional text editor, though a lot of your keybinds (e.g. ctrl-c/ctrl-v) don't work.
Press escape to go back into command mode (in command mode, esc does nothing- esc is always safe to use. If you get lost/trapped/are confused, just keep hitting escape and you'll drop into command mode). You start vim in command mode. Press i to go into edit mode at your current cursor position.
To exit vim entirely, go to command mode (esc), and type :wq.
':' is 'issue command string',
'w' is 'write', aka save,
'q' is quit.
In other words, ':wq' is 'save and quit'
':q' is quit without saving, ':w' is save and don't quit. Logical.
Depending on your terminal, you can probably select text with your mouse and have it be copied and then pasted with shift-ins in edit mode, which is a terminal thing and not a vim thing, because vim ties into it natively.
That gets you started with basically all the same features as nano, except they work in a minimal environment and you can build them up to start taking advantage of command mode, which is where the power and speed of vim start coming into play.
For example 'i' puts you in edit mode on the spot- capital i puts you in command mode at the beginning of the line. a is edit mode after your spot- capital A is edit mode at the end of the current line.
Do you need these to use vim? Nope. Once you learn them, start using them, and have them as muscle memory, is it vastly faster to use? Yes. And there's hundreds of keybinds like that, all of which are fairly logical once you know the logic behind them- 'insert' and 'after' for i/a, for example.
Fair warning, vim is old enough that the logic may seem arcane sometimes- e.g. instead of 'copy and paste' vim has 'yank and put,' because copy/paste didn't exist yet, so the keybinds for copy/paste are y and p.
The second most important thing about vim to learn is:
If nothing is behaving then you probably have caps lock on.
Vim makes it easy to edit text in complicated ways, once you've learned it.
Vim is not easy to learn nor intuitive.
It is simple and compounding.
You might not ever edit enough text to ever need to learn a new skillset to edit text. If that's the case, use
nano
.But if you do find yourself editing a lot of text, consider trying
vimtutor
.It takes 20 minutes and you'll be proficient enough to match
nano
's efficiency ceiling.It's extremely easy to get started
VIM is like drugs. Easy to start, hard to quit.
The Terminator is not here to kill you, its here to protect you from Emacs (which can change its form to anything).
Cmon dude, what's most likely to be Skynet?
Vim: Clearly evil, lightning fast. Relies on vimscript for any interactivity and can barely be used outside of the editor.
Emacs: the hippie brain child of some of the brightest minds at the MIT AI lab, funded by military contracts. Slow, but uses a near-universal language that can easily escape the bounds of the editor, (and often does (, and holy shit where did those parentheses come from. (Oh no, it's becoming self-aware - fly you fools....!
I don't know why you want use Vimscript for anything outside of the editor. But if that your issue, then there is Neovim. It uses Lua instead Vimscript, but what is the benefit of using Lua outside of Vim? That changes nothing.
Lua outside of Vim has huge applications in embedded products. Dude I would kill for Lua. Do you know what we have? Common Lisp. Yeah, it's great and fancy and all, but try adding that to your CV and applying for an embedded system job.
The only other (in fact, the first) place I've run into Lua is WoW plugins.
Factoring mods also use lua. Lua is a neat little extension language.
But WoW plugins have nothing to do with Vim. That's my point. You can use Lua in WoW, while using Vimscript in Vim.
I'll say that I find easier to exit vim that to exit nano.
I don't know what ^ means. I just start pressing special keys until it doesn't the thing
CTRL
I started on Unix systems using Vim, so I find Nano to be the confusing editor. A Vim install is one of the first things I do on a new server.
The best text editor is ‘$EDITOR’.
I think you mean "$EDITOR". Gotta have that variable expansion.
Not necessarily! I always run
ln -s '/usr/bin/$EDITOR' $(which $EDITOR)
after a fresh install, so I have a valid executable on the path called$EDITOR
.Of course, then I have to make sure to add
export EDITOR=\$EDITOR
to my.bashrc
. (Obviously.)Well,.that's one way to solve the problem of not expanding your editor var correctly...
In every post of this kind I am amazed at so many people using
nano
instead ofmicro
which is SO MUCH BETTER while being the same thing at the same time.When you help manage thousands of servers with vim and nano already installed, it's just faster to use one of those than installing something else nearly ever single time.
I prefer nano for quick edits of small files, but vim for hunting down things in larger files.
Or you can preinstall
micro
like you preinstall everything else 😅I'm not that high on the totem pole unfortunately
Holy cow. You can use your mouse with micro. Amazing.
You can have mouse support with nano. Alt-m toggles it on or off.
Oh wow. Weird that it defaults to off.
You can change that in the
nanorc
along with changing key binds, colors, and the like.And all the shortcuts are SANE, not the weird thing of
nano
I’ve discovered it just a few days ago and now use it on all my machines
Nano isn't even that simple.
Ctrl+X
to quit? I guess if you use phonetic sounds to figure out how to exit a program. At least Vim uses the idea of "use what the words start with."I personally use micro in the terminal, and Kate if I want a GUI to write. Vim and Emacs are fine for those who want it, I have no stakes in the editor wars beyond "I just want my program to do what I want, and I want it to be simple to learn."
Nano has a cheat sheet at the bottom of the screen at all times
Meanwhile I can just use the same shortcuts every other program made in the last 40 years uses.
Ctrl+Q
to quit,Ctrl+S
to save,Ctrl+Z
for undo. If I wanted to consult a cheatsheet to relearn keyboard shortcuts, I'll use vim and emacs.To be fair, you can easily rebind all the keys to be more normal by adding a
.nanorc
. Though, Ctrl-Z conflicts with suspend in many terminals, so I keep that one as Ctrl-U. A.nanorc
also allows turning on mouse support, changing the color scheme, etc.That's like the picture of a normal dude with Nano, a large Vim dude, a larger buff Emacs dude and an ever larger massive Ed dude.
eh the emacs folks are just chilling in a corner somewhere. Maybe in the old folks home together with the ed users
Don't forget the joe user in the corner wearing a trench coat with a bomb strapped to his chest wired to a dead man's switch.
Ed is like Skynet itself.
Do people still use ed unironically outside of scripting context?
Unironically? Maybe not. But using something ironically is still using it.
I like nano tho it has some strange shortcuts
micro has some improvements and default shortcuts that are much closer to common GUI text editors
https://micro-editor.github.io/
oohh that is nice, I think I'll swap my nano to that.
There's always
ed
for masochists.Ed is the standard editor
Ed, man! !man ed
Isn't this supposed to be VIM vs Emac? What's is there point to be programming in the terminal anyway? Nano is good to fix some config files while your are in there, but if I needed to do real programming I'll be finding something that works in the GUI.
Did you just say GUI?
More like ewwwie.
Its GNUI
What you're referring to as GNUI, is in fact GNUI/Linux or as I’ve recently taken to calling it, GNUI plus Linux.
GNUssy
Efficiency.
There's 0 chance if you have to pick up your mouse that you can keep up with a Unix gray beard.
That's just editing, if they're from the emacs era there might be nothing you can do with text faster across their whole system.
I like vscode as a entry point, but if you care to get faster learning just vim motions and sys utils alone is going to cut time from the process.
Oh it's about speed. What's the one that get your brain to be faster at programming? I use 4 fingers typing and am still typing much faster than I can think.
Definitely worth running through vim tutor at least once.
It's beyond typing speed, things like piping out strings to utilities is using one program to write another, you aren't just getting faster because of access, it's a paradigm shift.
Edit just for fun: im a non Dev dummy who happened to grow up in a Unix household. Even having dropped vim for helix and bounced around the MS admin/Apple IT space for 30+ years. When I switched to Linux I could still remember binds I'd set up and last used at 9.
Kinda like riding a bike.
It's speed, but it's also flow and a continuous stream of thought. If all your editing is being done with muscle memory and minimal thought, you can continue thinking about the problem at hand rather than interrupting your thoughts process to fumble through some context menu to make a change.
30 years ago it was vi vs everything. I don't see it changed today.
The Holy Trinity: VIM, Arch, and Rust
That's a weird way to spell Vim, Arch, and C
Seems you have a little typo, Emacs, Arch, and C
Fixed it for you: VSCode, Red Star OS, and sh
Fixed it for you: Emacs.
Easy is relative. What are you trying to do? Replace a value in an yaml file? Then nano is easier. Trying to refactor a business critical perl/brainfuck polyglot script in production? Then you probably want to use vim (or emacs if you are one of those people)
Replacing a value in a config file is still easier in vim due to e.g.
ciw
orci"
being a thing.Walk someone else through editing a config file on the command-line over screenshare? Nano. Omg nano is your friend.
Honestly, roll back to previous release for production and use best IDE your developers are used to on their local machines, test the fix in a non production environment then release to prod. When is editing business critical scripts in production really needed?
It was a joke to make the point that vim can be the easiest tool to use if you are trying to do a complex task.
I’m a bit slow on the uptake there haha. I started with vi and moved over to nano at some point and never looked back. I can refactor code in production with the best of them. There’s still some tricks I’ve seen done in vi that amazes me that I haven’t tried to figure out in nano, but for the most part it’s fairly easy to use to do nearly anything in. Even supports color for supported files, YAML, etc.
Micro for the win
No, Micro for the linux
Nah, win can have it.
idk man, vims pretty chill, it even has a tutor in it already, what more could you want?
Yeah, people are just lazy. I remember when I invented a new login screen and was told it was "difficult", "confusing" and "took some getting used to".
It even came with a free 100-page manual and a 4-hour master class. Some people, I tell you!
^This is meant more as a joke than an actual critique, even if it kind of reflects my thoughts. But ultimatly, I thought it was a funny bit.^
A text editor that doesn't need a tutor because the interface is intuitive enough that someone who has been using text editors (as a concept) for years can more or less instantly pick it up and start working without needing a tutorial to simply edit a config file.
a text editor that has a tutor because it's been around for so long and it's had so many years to establish itself with an outside control interface that's quite literally about as optimal as it can be. Vim basically allows you to never move your hands away from the homerow keys, even when navigating and doing bulk edits. The sheer amount of gained speed and productivity you get from this combined with the amount of times you'll have to deal with text editing throughout your life is probably going to outweight any potential learned annoyances.
Which is probably true, as long as you make one assumption- that the operator dedicates a significant amount of time to learning it. With that assumption being true- I'll assume you're correct and it becomes much more efficient than a Nano/Notepad style editor.
I'm happy to concede without any personal knowledge that if you're hardcore editing code, it may well be worth the time to learn Vim, on the principle that it may well be the very most efficient terminal-based text editor.
But what if you're NOT hardcore editing code? What if you just need to edit a config file here and there? You don't need the 'absolute most efficient' system because it's NOT efficient for you to take the time to learn it. You just want to comment out a line and type a replacement below it. And you've been using Notepad-style text editors for years.
Thus my point-- there is ABSOLUTELY a place for Vim. But wanting to just edit a file without having to learn a whole new editor doesn't make one lazy. It means you're being efficient, focusing your time on getting what you need done, done.
A text editor that doesn’t assume that the keys on my keyboard are in the same order as yours.
I remember looking up how to use Colemak with vim, and the advice was:
So I just gave up and moved on.
I hit the same wall with Dvorak layout.
that is a potential problem, though im sure there's a vim user somewhere that's fixed it with a bind set.
One that's intuitive and doesn't require a cheat sheet or what I like to call fingular contortionism discovery.
is there not a single other person who uses helix?
WTF is helix?
https://helix-editor.com/
essentially a terminal modal editor (like vim), but instead of specifying the action to perform then what to perform the action on (like "yank 3 lines"), in helix you select first, then perform actions on the selection (like "these 3 lines, i want them yanked"). it's slightly better (according to others) because you get to see what you're going to change in the file so you don't accidentally delete 5 lines instead of deleting 4.
on top of that many features are builtin, like tree-sitter and lsp support, so you don't have to spend 5 hours looking for cool plugins and configuring everything to get started (my config file is only 50 lines of toml).
the downside is that there isn't support for plugins (yet), but there's already things like a file picker, more than 100 themes etc.
So similar to kakoune? I tried that for a while, but it was missing some features so I went back to vim/neovim.
I need to know vi anyway, because that is available everywhere (as part of busybox), so using vim/nvim for bigger systems just fits.
I gave it serious consideration when the death of Atom was announced and I was unsure where to move on to.
Looks like in the meantime a lot has been done (as far as I remember, TreeSitter and LSP weren't built in back then...? Not sure though), but the lack of a plugin system is still killing it for me.
TBH it looks like it has 75% of the features you want from a codeditor, which is much more than the use-case for Nano, but no way to go the remaining 25% of the way.
I'm still in mourning.
It was pretty great, wasn't it?
Although I must say. I eventually landed on neovim. Steep, steep learning curve, but now I would not switch back again.
I would look at that, but I bounced off VIM hard, so probably not for me.
Helix's editing model is so much better than vim's. I would probably use it if it was be closer to a drop-in replacement for vim. I really hope this neovide issue gains some traction because I don't think I can daily drive anything that isn't as smooth as neovide again.
I simply have too much vim config and muscle memory to ever leave vim
I'm trapped in a prison of my own making!
Well I tried! I ended up using
micro
thoughI like helix
Emacs users laughing at VIM users.
Emacs - A pretty good OS you can use as a text editor.
And to counter the old saying of it lacking a decent editor, there's always evil-mode.
The problem I had with nano is that, for the time being, it was supposed to be easy to use. With that in account I always get lost when saving a file and closing the thing because one's used to doing something else with Ctrl+O and Ctrl+X.
Whereas with Vim (and Neovim for a little while, and now with Vis) I knew it had a steep learning curve from the start so I always had it in mind. And all the funny stories about quitting vim.
they've changed those bindings now, Ctrl+S, Ctrl+X, Ctrl+V, and Ctrl+C all do what you think they do
Great, now the next time I'll use nano I surely will forget about this and get frustrated when trying to save a file with Ctrl+O
you still can, but I think Ubuntu and other prepacked distros will switch soon to the better bindings
Great so now I will mangle all my merge commits depending on which version the host is using.
I'm thinking Ctrl+C quits and Ctrl+S is scroll lock is that correct?
nano
nano --modernbindings
I mean quitting vim isn't hard you just reset the computer.
The problem with using nano for years is that I now try using nano shortcuts in other programs. Random new windows opening is confusing, until you figure out Ctrl+o isn't save in that program. Then it's just annoying because you still have your inappropriate muscle memory.
For vim I had to config or install something just to be able to COPY something to use outside vim, how backwards is that? Isn't this the most standard feature one can expect to work as default?
You mean you couldn't copy some text from vim and paste it into another application? if yes, what did you have to install/configure for that? I've never had any issues copy paste from/to vim, console/GUI windows/Unix.
Sadly I don't remember. Sometimes it comes preinstalled, sometimes not, depending on OS or something. (Maybe Manjaro gnome). I could copy and paste inside of vim, but not to/from outside vim.
What you observes could be OS depended,. Vim has its own copy paste buffers (y,p etc) and the OS has its own. Traditionally highligh to copy and middle mouse button to paste on Unix. Windows has 2 methods, ctrl-c,v but those are also bindings in vim so only the older less known crtl-insert,shirt-insert works.
Copy paste is definitely built in, there is no need for extra plugins.
it actually does work by default, you just probably missed how to do it in the help pages in vim. For those curious, the system clipboard is its own named register in vim (
:help registers
to learn more) and can be accessed with either“*
or“+
depending on your how your system is configured.To copy a line:
”*yy
or”+yy
To paste a line:
”*p
or”+p
So I need to dive into the manual to do something as basic and universal as "copy and paste"? Why not make it Ctrl+shift+c or have it shown in the info text when pressing this almost universally accepted keypairs? Or at least make it somewhat similar to this. I find it bonkers why some programs decide to just have radically different shortcuts or defaults, the complete opposite of what feels intuitive. Same with the design of some doors that need actual SIGNS on them to tell you which direction they open. Just bad design choice.
Edit: just remembered. Same story with tmux. Want to copy something? Surprise, it's not anything you expect it to be. Some ctrl+b + [ or some shit
I just use this:
Just ask if it's correct. If not destroy the universe. Only The correct will survive, it's O(1)
What if there is no correct answer?
It's not fun when you have to explain it. But basically it is based on the infinite multiverse theory. Since the multiverse splits whenever you make choices, in this case the program would spawn a large number of multiverses each with different combinations of those bits, which means at least one of them would have the exactly the combination we want. If the program destroys the multiverse it is in after it determines it is not correct, only reality that remains is the one with correct combination of bytes. Making it that we will get the code we want on the first try.
You are assuming here that I know what I want. What if there is no obviously correct answer, and even in the Everett branch that generates the optimal content for the file I'll still think it can be improved and tell it to destroy the universe?
I guess yeah. In that condition the algorithm would probably destroy all universe. Although you might be able to set a threshold and not destroy when it is over the threshold.
But situation where you don't know the answer is not for this algorithm as this one came from sorting problem.
modal editing can be fun. it is a weird skill like driving a manual transmission.
that said driving a manual transmission in stop and go traffic on a hot day is a lot like editing in vi sometimes.
Unless you're European. Then driving manual is considered basic life skill like riding a bike.
Micro is where its @ <3
Nano is my "daily drive", but I'd use vim as well -- takes a couple seconds to search for "how to type in linux vim" and "how to save a file in linux vim" anyways. :^)
I know
i
and:wq
and that's all I ever plan on learningMe on Micro
100% Micro. Unless you’re only - and mean ONLY - living in the terminal, why would you want all your desktop and terminal shortcuts different from one another?!
kwrite and gedit friends rise up :)
On KDE, there's also Kate. They used to be totally different apps, but these days, KWrite is a simplified version of Kate. They both use the same text editor component, but Kate adds more IDE-like features.
true but i dont like how they are forced togther so i use featherpad
How do you use these when you are connecting via SSH? You enable X forwarding?
It's fine when you have a graphical environment, but what do you do when you dont have one?
A similar argument is what finally caused the value of the vi family of editors to click in my brain:
They are designed to be fully functional over even the shittiest possible* remote connection. You can't always count on ctrl, alt, or even the arrow keys being transmitted in a way that is understood by the remote machine.
*Well, I guess the worst possible terminal would be something like an actual teletype, and in that case you'd probably want to fall back to ed or its descendants. To save paper, if nothing else.
Using X forwarding would require you to install big chunks of GNOME or KDE on the server. A better approach is to mount the remote server over SFTP then use KWrite, gedit, whatever, directly on your desktop.
ohh yeahh then nano
In any KDE app you can connect with SFTP in the open file dialog. Just type sftp://user@server/path and you can browse/open/edit files the remote server. ssh keys+agent make things a lot easier here obviously.
I started on Emacs and then didn't use it for a few years and forgot everything so now I'm stuck on Nano. But that's fine because nano does everything I want it to do.
Ed users entered the chat
Worst is when installing a new distro(usually in a vm ) and it defaults to nano and for some weird reason no vi of any sort is installed. I hated nano. Last time I intentionally used something like nano was the 90s with pine I think.
What is there to hate? I don't really understand. It does what it says on the package, and seems to do it pretty well. At least with respect to making small and quick edits to config files in the command line.
My fingers don’t speak it is the problem.
Pardon?
Imagine using Nano or Vim; when you could be using Cat and Echo.
/s
I spent the weekend failing to make my civ mods work, with a thousand lines of notes.. 2/3 in, I think "damnit blazeknave. You spend months perfecting this stupid fucking obsidian setup, and you've been here in notepad+ like a fucking jabroni."
I do the same all the time with anytype.
I dropped notes into sublime and then go back and put them neatly into any type. I don't really know why I do it either It takes any type a total of three or four seconds to start up and I have to enter in a passcode. But I only have to do it once. I guess I do have to think about where I'm going to put the document and making sure that it's tagged correctly, it's a lot easier just a scribble something into a random text window to forget about for a decade.
You mean my 6k Gmail drafts? 😭
I started doing paper pads everywhere and trying to log at end of day.
There is always the Joe editor, if you like good ol' Wordstar. :)
I've been known to watch a fight video there every now and again, yes.
Butterfly gang
Greybeard here. I can use vi, emacs, nano, etc. and use whatever is available if it suits the job. For many years I did dev in emacs on my computers and on other systems used vi for quick edits. Currently on my own laptop I have micro as default term editor now. For Rust development - code, though I have hopes for Lapce.
They're all just tools and so are people who get tribal about things.
Emacs
Hey now we don't denigrate vim and nano users. For the nano users, denigrate means to put down.
and sometimes you just need a text editor, not an entire thesaurus
If I'm doing quick txt editing nano is great and what I know I can't figure vim out for the live of me
On my laptop, I update my bashrc on Excel, in Wine, then export it as a PDF, OCR to .md, Pandoc it to an .Org, and then finally, write it down on paper and re-type it on my phone's Termux's Emacs instance, then TRAMP it to my PC, in the other room.
I use biebian, btw.
Get'er Robbie she's under the desk!
Its lighter weight
My problem with those are that I always manage to get lost on where the program has its focus/what kind of instruction is expecting. And while trying to go back to normal I end up messing it more and more. Maybe some day I will get there, but it is still not the day.
Nano is notepad, but with worse mouse integration. It's Vim/Emacs without any of the features. It's the worst of both worlds
If you want ease, just use a GUI notepad. If you want performance boosts, suck it up and learn Emacs or Neovim
Why would you use a mouse in a console editor?
What if you want ease on a terminal?
Heaven forbid I want to use an intuitive, simple, terminal based text editor when I ssh into one of my boxes.
But here's the real kicker. Why do people like you give two shits what text editor other people use?