Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I defaulted to Nano when I picked up linux, and that unfortunate choice has bitten me in the butt.


I learned vim when I picked up linux, now I work at a company with a customized emacs tool we have to use. Doh it never ends...


If you develop RSI from emacs, you could have the employer make reasonable accommodations, i.e. let you use Vim :)


I am a big Emacs user, and I just move my hand to hit certain keys.

I don't get why there is so much talk about RSI. Speed is nice, but it is not the end-all be-all as far as I am concerned.


Or use Evil mode :) I don’t think I can ever give up Org-mode. Vim-wiki, etc just can’t seem to sate that itch.


Emacs pinky can be a bitch


What does the customized emacs tool do? It sounds interesting.


We have our own software SDLC with custom tools. Its kinda nice coordinating across a large organization, sucks to be using these custom tools.


Having only used Nano since picking up Linux 2 years ago, I’m not sure what I’m missing. Can you make a case for me to learn Vim?


> Can you make a case for me to learn Vim?

If you're coming from nano, I'd point to:

1) UI improvements like better syntax highlighting, split windows and tabs, and mouse support.

2) A cohesive language of key bindings that allows you to easily construct and perform commands like "delete everything from the cursor up to the next quotation mark" or "lower-case this paragraph".

3) A huge library of scripts and extensions to add or extend features like syntax highlighting and indentation rules for new languages, Git integration, or language server support (which provides IDE-style features like jump-to-definition, error/warning indications, and autocompletion)


Usually when nano is mentioned, it’s not a full development context, but instead e.g. crafting a systemd service file or editing crontab on a remote server. Do you really pull extensions and use mouse there? I think there’s nothing important that vim could add for gp, realistically.

Speaking as a life-long vim user.


Even without any plugins Vim has useful stuff you might need in a pinch.

Eg:

  Column editing using visual mode.
  Syntax highlighting
  Tree-based undo features.
  Fuzzy file finding in a project path.
  Spell checking
  Support for c tags
  Line numbers
  Mouse support
  File navigation
On top of that you might want to learn vi for systems built with busybox.

Or tools that use readline like repls and sql clients.


You probably wouldn't install all your extensions on a remote server, correct, but you get the basics like syntax highlighting and mouse support by default nowadays. Even a minimal vim install is considerably more featureful than nano.


- Fuzzy file search - I can't find a way to do this in nano? Where you can search a whole directory by name for the file you want to open. This is very useful in larger projects when you need to jump about a lot.

- LSP and all its uses - jump to definition is a big one.

- Window management - while you can use a multiplexer, using one session allows copy/paste to work, saves your file/search/command history, etc.

- While often overstated, it is undeniably more efficient... once you've learnt it.

However, if you are not doing programming, but are just editing e.g. Linux config files, then I would probably stick to nano (in fact, I usually use nano for these jobs, since getting my neovim config to work when running as sudo failed).


> While often overstated, it is undeniably more efficient... once you've learnt it.

And on this note, I'd recommend not jumping in and trying to learn everything. Too easy to get overwhelmed.

Start with the bare basics and treat it like nano with syntax highlighting, then start learning and getting used to its broader functionality in small bursts.


If you're productive and happy with nano I'm not sure there is one.

I love vim and find it an incredibly productive tool, but it's rare that my editing speed is the limiting factor.

However, in recent years with LSPs, the suggestions and completion are something I really wouldn't want to give up.


Vim has a ton of features. I don't know much about nano, so I'm not sure, but there's a feature for most things in Vim.

I'll do a simple one then, as an example: In vim you can select a range of lines and indent or dedent those lines. With spaces or tabs as appropriate, set per filetype (or other ways of configuring). Can this be done in nano?


Its not that I wanted to use vim, but either it was the tool of choice for other people, or the tool of choice for other tools (like yay/paru on Arch linux (and yes I eventually learned default editors can be changed...)).


Kind of hard without knowing what you do and what your constraints are but at least for me vim is more widely available on the tools I use. I use neovim, but I also need to use Android studio and xcode sometimes, and there is a vim mode for each of those. So basically if you get used to it, it's a standard way to interact with several editors. Also it's just more fun and fluid to use for me but that's a matter of taste.


One thing I like about Vi vs other editors even for non full fledged development experiences like editing config files, is that Vi allows very surgical edits to change only what you want and nothing else.

You can easily control exactly what portion of the line or file you are making the edit to, and Vi will not allow you to change beyond that area without a further intentional command.


If by "only used" you really mean you never ever use anything else I don’t believe you are missing anything. Other than bragging rights of using Vim, of course /s

But if you occasionally use other editors, many of them have plugins or modes enabling Vim keybindings. In my daily work I switch between Emacs, IntelliJ, Vim and XCode, and all of them have varying degrees of Vim emulation, which makes switching a lot easier.


I was lucky enough to really learn *nix via Solaris where Vi was the only option.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: