nano friends rise up!
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
Looks like you only got one so far.
nah you’re wrong
Why do you all say that? There were no replies when I added mine so that’s why I said what I said.
There are dozens of us!
Well hello there!
I too use nano.
alias nano="vi -y"
ln -sf /bin/nano /bin/vi
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.
Imagine using Nano or Vim; when you could be using Cat and Echo.
/s
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.
nano gang
Gross
They hate’us cause they anus.
Vim is way easier tho
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 learningNot 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.
Not gonna lie, once you’re getting past single button combos, I’m mentally checking out. Ctrl+K and Ctrl+U in nano are good enough for me, and if I need to do something more complex like actual coding, I’ll use an editor with a full GUI as well.
Fair enough. I basically gave you a large chunk of vim so it will feel super overwhelming. The trick is to do one command or combo at a time. For example, I started with dd. Then I added yanking. Then I added visual mode. Then I added “o” (which I think I forgot to mention: o creates a newline under the current one and puts you in insert mode. Capital O does the same but above the current line). The real trick is going little by little. And to be honest, there are some commands I still rarely use or forget to mention. I’ve never used f instead of t. And in terms of forgetting to mention, there’s the x command which deletes the single character under the cursor rn.
Also, I’m sure someone will find this list helpful, so on top of this, I’ll also add this video (and hope that Piped bot will appear): https://www.youtube.com/watch?v=RSlrxE21l_k
It contains some things I haven’t mentioned.
As for learning all this, I’m repeating myself for the third time. Do it little by little. And when a command is already a thing you do almost without thinking about it, you’re ready to add more.
I’m mentally checking out
Why? dw is delete word, c5b change 5 words backwards, and those are the most complicated commands you’ll ever get to use, unless you start adding cuatom keybinds.
But I digress. If you don’t want to learn it, it’s fine.
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.
There’s always
ed
for masochists.Ed, man! !man ed
Ed is the standard editor
What’s with this childish rant?!
You noobs. I just use combinations of cat piped to sed to edit my files, which are mainly lisp code.
<file foobar
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.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 >
cat pipeing is safer though.
foobar > file and your file is gone.
You can always alias
to
<
in your shell.
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.
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.
I prefer Office 365 online.
Come back after your uploaded it to the cloud and edited it using Google docs.
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?
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.
Somehow it seems this would apply to any linux user
There is no sense of pride. Every text/code editor has key combinations that many users will learn eventually. Vim has easier key bindings.
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
What do you mean? The vim users know their key combinations pretty well, that’s kind of the point of vim.
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.
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 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.
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.
Even if you use arrows, you still have to reposition your hand.
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.
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?
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.
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
That’s funny, I feel the same way about Excel users.
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.
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.
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.Holy cow. You can use your mouse with micro. Amazing.
And all the shortcuts are SANE, not the weird thing of
nano
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.
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
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
It’s not that simplle or user friendly when none of the usual shortcuts work. C-a did something completely unexpected.
Well its shown to you at the bottom of the screen what it does…
And if you want Ctrl v,c,s etc. To work like in word etc you can always use nano --modernbindings
They’re in Linux now, it should show the shortcuts they’ll encounter everywhere. Not leftovers from another system.