6 ms·
It’s not really gatekeeping or snobbery to say that knowing vim is more useful simply because I can log into any Linux machine on the planet and edit a text fil
by relax88 5y ago
It’s not really gatekeeping or snobbery to say that knowing vim is more useful simply because I can log into any Linux machine on the planet and edit a text file without having to install an editor.
- hkt 5y agoIs installing an editor really such a hardship?
- dllthomas 5y agoUsually not, sometimes very much so.
- yakubin 5y agoIn "linux embedded", absolutely. You take what's there. At some point I even had a debugging session through TeamViewer connected to a Windows machine which had Terraterm open connected to serial port of a linux box. Unfortunately, there was a lot of spam on the serial port, so even using vi was impossible, because the screen got garbled pretty fast. So I printed the files with cat, worked out a set of sed commands to get those files to the desired state and typed them back in. Crazy. But real. (Add to that communicating with a guy on-site over notepad.exe. Mr. Robot vibes.)
- orthoxerox 5y agoYes, because your sysadmins won't give you sudo, so you must scp a copy of nano into your home dir. Surprise, it's an AIX server running on Power, so your x86 nano won't run. Does building one from source count as hardship?
- emef 5y agothis is less true these days w/ slim docker images that don't include any editors by default
- dijit 5y agoDoesn’t POSIX designate vi as a requirement? https://ieeexplore.ieee.org/document/6880751 https://ieeexplore.ieee.org/document/6880751
- yakubin 5y agoPOSIX doesn't say anything about containers.
- dijit 5y agoBut your containers may be a bit weird if their environment isn’t POSIX. Like if you removed the “cd” command or the ability to read environment variables. “Containers” is any definition you want, but surely they’re built to some standard. PS: I do make “from scratch” images a lot, I know you don’t “need” to have any utilities at all, but I’m fairly certain that a lot of software expects the “OS” to be POSIX.
- yakubin 5y agoI don't know what you mean. Linux containers don't contain operating systems. They contain processes. POSIX describes operating systems. Every Linux process can read environment variables. They are contained in its address space. "cd" is a shell built-in. When there is no shell, there is no "cd". Not providing access to a shell sounds like great security practice tbh. Your applications shouldn't be using it anyway (they should create new processes directly).
- messe 5y agoThis is just being obtuse for the sake of it. Yes, technically nothing in the notion of a container necessitates that; containers are just a form of namespacing. Have a gold star for understanding that. But the fact is: the vast majority of containers in use are going to be based on some minimal OS image, which is what the commenter was referring to.
- aroman 5y agoThey probably meant snobbery that vim is superior because it's more capable, not because it's more ubiquitous. Nano is also very widely installed, so the latter point isn't even particularly true.
- brundolf 5y agoEvery Unix machine (Mac or Linux) that I've ever tried to use nano on has had it preinstalled. I'm sure not all of them have it preinstalled, but it's common at least in mainstream distros
- relax88 5y agoIf you’ve never logged into a Linux machine without nano installed, then you probably haven’t logged into that many flavours of Linux machine. I agree this is pretty much a non issue for the average developer, but those of us who work on network infrastructure, as red-team hackers, or do any work on embedded systems can attest to how much of a pain it would be to not know how to use vi/vim.
- koolba 5y agoThis is even more common in the world of containers where “nice to have just for debugging” get omitted. You haven’t lived till you have to edit using only sed.
- KronisLV 5y agoThere is definitely something to be said about having minimalistic container images for security and smaller sizes... But not having a basic text editor that is probably a few hundred KB feels a bit silly, especially given how many environment dependencies usually get packaged into containers anyways. That's like not including any sort of a shell in your container and wondering why people are having troubles with debugging. Personally, i think that just basing container images on something like Alpine, Debian or even Ubuntu images is good enough because those are stripped down enough already for the most part.
- koolba 5y agoOf course you add a sane editor after it happens. But that first time…
- trissylegs 5y ago
- bluedino 5y agoExcept when it's vi and casual vim users can't figure out why nothing works
- trey-jones 5y agoAren't casual vim users really vi users? I use emacs primarily but years ago created an extremely minimal (~20 lines) .vimrc to be installed by default on every server I work on. Some color, maybe indentation, I don't even know because I usually just use Emacs/TRAMP these days, but I'm nearly 100% sure that every config there works in vi. I would consider myself a casual vim/vi user in that I don't know the differences.
- hn8788 5y agoI may be misremembering, but the biggest differences I remember between vi and vim as a semi-casual user is vi defaults to not supporting arrow keys, and doesn't tell you the mode it's in.
- wahern 5y agoI can't remember the last time I used vi and was unable to use arrow keys. That includes typical Linux installations (Vim, Busybox), Solaris (default is Vim, oddly, but I just confirmed arrow keys work in /usr/xpg4/bin/vi), and various BSDs (nvi). I'm not a power vi user, though. I usually use JOE (thanks/blame to '90s Slackware education), but occasionally vi is more convenient. It wouldn't be nearly as convenient without the arrow keys as I never learned proper typing technique.
- bluedino 5y agoRaspbian, for example included vim-tiny
- deleted 5y ago[deleted]
- citrin_ru 5y ago
- babypuncher 5y agoI've never worked with distros targeting enterprise, but I've never encountered a distro that didn't include nano. Even if Vim is "better", I think it's important for all distros to include a text editor that is easy to use out of the box, and nano fits that bill perfectly.
- KronisLV 5y agoIn my experience, the DEB distributions (Debian, Ubuntu, ...) usually have nano by default, whereas the RPM ones (RHEL, CentOS, Oracle Linux, ...) don't. That said, i immensely enjoy how small the install size for nano is and how there's no actual work that you need to do to get started with it (unless you need/want customization, like the author of the original article).
- snowwrestler 5y agoWhen I first started working in Linux, it was in Centos and RHEL and I used nano, since it was already installed and easier to understand than vim. That was about a decade ago though, maybe RHEL has removed nano since then.
- ineedasername 5y agoThat said, i immensely enjoy how small the install size for nano I used to install lynx web browser for the same reason, especially because at the time it was the age of countless popups and swf everywhere. I should check to see how it is these days, but I stopped using it when webdev made many pages unusable in it.
- shapefrog 5y agoIts not snobbery if it is better
- jakelazaroff 5y agothat’s literally what snobbery is
- shapefrog 5y agosnobbery: the character or quality of being a snob. snob: a person who believes that their tastes in a particular area are superior to those of other people.
- loudtieblahblah 5y agoBut Vim is superior in many ways. Nano is superior in that its easier to use. But it's certainly no where near as powerful as Vim or emacs.
- IncRnd 5y agoThat's funny!
- sdljfjafsd 5y agoDespite having 7 years of back end experience, I've never learned vim. Is there any other editor that hits these requirement (being able to login to any server to edit text) or does every server engineer need to learn vim? (I mostly use a mix of sublime, intellij, and vscode to edit text)
- hulug 5y agoed(1)
- ineedasername 5y agoThat's probably the #1 reason to learn the bare basics of vim even if nano was a daily driver.