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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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!
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.
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
VIM may have been a very useful tool 20 or 30 years ago, but today it's nothing else but a tool for one's sense of superiority. It's the vinyl of editors.
If you have to type that much code in a terminal, your infrastructure is outdated. Simple as that.
VIM may have been a very useful tool 20 or 30 years ago, but today it’s nothing else but a tool for one’s sense of superiority. It’s the vinyl of editors.
So, because you don't understand something, it's outdated?
If you have to type that much code in a terminal, your infrastructure is outdated. Simple as that.
Ok, I can see you have no idea what you're talking about.
I actually use VIM bindings in PyCharm, slightly cursed but actually works really well and meshes fairly nicely with the other IDE shortcuts. Being able to use it in any terminal is a nice bonus.
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<enter>.
':' 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.
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.)
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.
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."
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.
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.
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.
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)
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?
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.
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.
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.
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.
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.
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.
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.
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. :^)
Not even Basic Command-Count-motion like c3w aka change 3 words after cursor, or d3b delete 3 words before the cursor?
To that, you add the
D aka delete command
C for change
Y for yank (copy)
So yy to yank line, or dd to delete line.
Also p for paste
Also, i sends you before the cursor, a sends you after. Capital I is insert at beginning of line, Capital A is insert at end of line (append).
I terms of motions and moving around, you need: hjkl, C-d and C-u (half page jumps down and up), and within the line: 0 or ^ for beginning of line, $ for end (taken from regex), w for moving by word forwards, b for moving by word backwards. That's pretty much all you need imo. There is also t and f. Where t goes forwards (think 'till aka until). Like dtc delete until the c character. F is the same but goes backwards in the line rather than forwards.
Remember you can use these with xommands, so d$ deletes until the end of the line. Or "dt." deletes till the "." so.... yeahI know there's more, but that's all you need for Normal and Insert mode imo.
For Visual mode, you only need to know how the Visual modes work. Visual (v), Visual Line (Shift-v) and Visual Block (Ctrl-V).
Also, for visual mode, it might be helpful to learn how to use V-Block to comment out multiple lines at once. Can't be bothered to go into it.
But I'd argue that's all there is to learn about vim keys in terms of getting work done.
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?!
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.
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.
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.
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 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 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.
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.
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.
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.
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.
The first time I found myself in nano was when testing a distro fifteenor twenty years ago. I had to edit some files and it was the only available editor. The damn thing was a horror to use. I still have no idea who it caters to. I haven't had to use it since though.
Dunno what you used, but nano is literally a text editor that may be simple simple but it just works. Shortcuts are shown to the user, buttons work like you expect them to (arrow keys, ESC, shift, etc)
With vim you open it and if you haven't read 5pages of doc you won't even be able to close it again. I see that its useful for power users, but for casuals who just want to edit a config once in a while nano is absolutely the way to go imho
Ugh, I swear vi and it's derivatives are the absolute worse text editors going. There may have been reasons thirty or forty years ago, but now it's just complexity and a weird ui for the sake of it
I use VS Code on the desktop nowadays, but vi will always be my editor of choice in a terminal. Many of the reasons it was powerful and ubiquitous 30 years ago are still valid, so it’s still powerful and ubiquitous. And I’ve been using it for thirty years, so why would I switch to a training-wheels editor?