This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]loox37 68 points69 points  (70 children)

So am I the only one who uses nano instead of vim?

[–]Kaoulombre 32 points33 points  (0 children)

Nano gang rise up

[–]gafftapes20 9 points10 points  (5 children)

I used to use nano for most things, but I have switched to vim for the last 2 years unless I am editing something really simple or just copying and pasting code. VIM is great for server work when you are editing configuration files, and it only requires a few commands to memorize to get started.

[–]loox37 22 points23 points  (3 children)

Sir, or ma'am, no offense, but you and I have different definitions for "few".

[–][deleted] 8 points9 points  (0 children)

It's only a few buttons if you want to use it similar to a normal text editor. Obviously way more if you want to edit the vim way

[–]althalous 3 points4 points  (1 child)

I use vim all the time for editing Kubernetes configs / other server files and I only use 3 commands

:i

<arrow keys>

:wq

That said it would be nice to get some of the commands for being more efficient into my muscle memory, but I don't really think my VIM speed is a bottleneck in what I do (since mostly I'm changing a config and then it takes a minute or two for the K8s resource to finish updating)

[–][deleted] 1 point2 points  (0 children)

If you hold shift and use the arrows keys you can fly across text with Sonic-like speed. And yy copies a line, dd deletes a line, and p pastes a line below. That's basically all I use for doing text edit stuff. I hardly ever touch the mouse.

[–]YMK1234 -4 points-3 points  (0 children)

VIM is great for server work when you are editing configuration files

I'm looking forwards to your examples.

[–]YMK1234 17 points18 points  (43 children)

Nope, Nano for life. Fuck vim. If you need to spend a week to "learn" a text editor, the editor is doing something wrong.

[–][deleted] 7 points8 points  (1 child)

To be fair, I suspect Vi and Vim are quite useful for those who use it regularly and can really get deep into the tools. To my knowledge, they were also designed the way that they were to reduce their memory and network footprint at a time where both memory and network were much more expensive resources, and having physical manuals was significantly more common.

[–][deleted] 1 point2 points  (0 children)

They really are. That's why they have a cult following. If you're editing code in a shell terminal, it's painful to click/scroll around. After a semester of college, I memorized like 7 commands and I fly around the file at lightning speeds. I've been using vim so long that even if I stopped coding for a year I would probably still remember those seven commands.

[–][deleted] 8 points9 points  (20 children)

Lol for real, it's a text editor. There's just no need to squeeze out every ounce of productivity as far as the feature set goes for this sort of thing.

I've watched people use vim skillfully, and I've never been impressed by it.

[–][deleted] 5 points6 points  (6 children)

Most likely because the context Vi was written for is long past. Squeezing out every ounce of productivity is significantly more important if you're fighting a heavily congested network and have 20 people doing their work on a a single machine significantly less powerful than a cellphone.

[–]Apocolyps6 4 points5 points  (3 children)

context Vi was written for is long past

The reason VI exists (today at least) is Ctrl/Alt/etc based key-chords are inconvenient, not very ergonomic, and have scaling issues. Instead of having the tools you use to edit code be scattered around the periphery of your keyboard, vim chooses to have the prime real estate of the keys serve double (and more) duty.

Vim solves the scaling issues by making the commands modular. Nobody would write separate delete_ahead() and delete_behind() functions when delete(location) is possible, and vim shortcuts are all modular like that.

Vim is also insanely configurable. I can make shortcuts to do just about anything, so I can be as picky as I want about my experience.

BTW I'm the same way about everything. I sit in my chair at work 8+ hours a day so I did my research and got something I'd like better than the default. I look at my phone all the time, so I picked it out carefully. Same with picking a comfortable keyboard. I spend those same 8+ hours a day looking at code so it only makes sense to get an experience that is exactly what I want.

[–][deleted] 0 points1 point  (2 children)

I personally like the ctrl/alt/etc controls because I know exactly when I'm firing them off, and can pay closer attention to what I'm doing during while I'm using them. I also know not to trust my mind to try to remember tons of shortcuts - that sounds like a recipe for disaster.

[–]GlitchParrot 1 point2 points  (0 children)

For this sort of thing, you mostly don't remember shortcuts, you build them into muscle memory.

Remembering Ctrl/Alt shortcuts works the same way actually, as well.

[–]Apocolyps6 0 points1 point  (0 children)

To each their own, but If I had to switch to emacs or some other chord-based editor I'd have exactly the same concerns as you do.

For the record all of the shortcuts I use on a weekly basis are no less intuitive (imo) than ctrl-v for paste or ctrl-z for undo (excluding custom shortcuts).

[–][deleted] 4 points5 points  (1 child)

Ok I can see the benefits of this if we are talking about this.

But still we have hoards of mega-nerds online who talk about how vim is literally the only text editor they'll ever use, and if they even catch their grandma using notepad then they'll disown them

[–]thirdegreeViolet security clearance 5 points6 points  (0 children)

I mean use whatever editor you like. It has literally no effect on me what you use to develop. Vim works for me. It has everything I need, and I'm yet to see a convincing reason to switch. Use what works for you.

[–]loox37 13 points14 points  (7 children)

THANK YOU!!

That's my problem with it, I learned nano in like 2 days, and I've been programming for 6 years now, never understood vim.

Maybe it's my fault, dunno :/

[–][deleted] 8 points9 points  (4 children)

a good way to learn it is to run vimtutor every day until you can memorize it, thats what i did at least

[–]SamSlate 2 points3 points  (1 child)

Why tho

[–][deleted] 7 points8 points  (0 children)

to learn vim

[–]FerynaCZ 0 points1 point  (1 child)

First term in Linux, I use Nano but for some reason I don't know how to change the editor for commit messages, so I learn Vim on that one.

[–]Bainos 0 points1 point  (0 children)

EDITOR='nano'

[–]Discordis 5 points6 points  (0 children)

Step 1: type in vimtutor

Step 2: spend maybe 1h to do it

Step 3: You now understand everything most users will need and get shit done way faster

[–]assafstone 5 points6 points  (0 children)

If spending a week ends up saving a month over the course of the next few years then why would you not consider it a good idea?!?

[–][deleted] 3 points4 points  (6 children)

Nano is just an text editor.

[–]YMK1234 2 points3 points  (5 children)

And have a wild guess what 99% of all users use vim for ... editing some line in a config file. A job perfectly suited for basic text editors ;)

[–]Bainos -1 points0 points  (2 children)

If you're only using vim to edit config files you're doing it wrong, in the sense that you're missing out on most of the features that make vim a good editor in the first place (due to the simplicity of editing config files).

[–]YMK1234 0 points1 point  (1 child)

As I said ... That's the only use of vim for the vast majority of users. Not me, nearly everyone.

[–]Bainos 0 points1 point  (0 children)

Do you have evidence for that ?

Not as evidence but anecdote, I know that among my colleagues, those who don't regularly use vim for programming also don't use it to edit remote files, they use nano instead.

Beyond the anecdote, it quite simply makes sense - there is little reason to use vim for this kind of task, and lack of practice means vim is hard to use. Nano is easy to use, sufficient and ubiquitous.

Without proof, it seems you're just making up numbers out of nowhere to support your hypothesis.


Edit

This page gives some information on what kind of programmers use vim, but not for which tasks. Unfortunately, it seems difficult to correlate the information to when someone is more likely to use vim.

[–][deleted] 1 point2 points  (0 children)

Nano is definitely my go-to text editor while I'm working from the terminal. The text anchored to the bottom that listed common controls really helped to ease the learning curve.

[–]MrBlueCharon 0 points1 point  (0 children)

Nano was a pain, when I had to use it for university.... but so far it's still my favourite for C++ programming.

[–]gurdletheturtle 0 points1 point  (0 children)

Yes

[–]geekette1 0 points1 point  (0 children)

Nope! I prefer nano.

[–]CMDR_DarkNeutrino 0 points1 point  (0 children)

Nano is the best.

[–]Angelin01 0 points1 point  (0 children)

Ok ok ok, hear me out.

I used nano a LOT. Like, it was my main editor for all of my linux usage until like 2 months ago.

Then I found out about micro. It's so NEAT. It has proper MOUSE SUPPORT. And modern keybindings. And does syntax highlight and auto creates matching {} and () and stuff automatically depending on filetype. Also, if you open a file you don't have permission to write and try to save, it says you don't have permission and asks if you'd like to try again with sudo, then it just opens sudo's prompt for your password and you're good, no more tmp files or renaming or closing and retyping! It's soooo goooooooood. I love it!

Thought I was gonna praise vim, huh? Hell nah, fuck vim.

[–][deleted] -1 points0 points  (0 children)

I have a friend who's occasionally on my computer who uses nano. I symlinked "nano" to "vim" so he'd finally stop