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

The best feature of vim is its ubiquity; I feel at home on almost any computer.

I find myself shying away from anything too specialized that could become a crutch, maybe to my detriment.



Same here. That is, until I find out that only vi's there and not full-on vim. While vi is smaller and even more ubiquitous, it pains me that it lacks visual mode.


Visual mode is a crutch! I'm used to vi so I never use it. There are faster, more flexible ways of doing anything you'd do in visual mode with plain vi commands.


How do you compare two pieces of code side-by-side? I suppose you could create terminals and arrange then how you like but that's not much different than vim. I use gtk emacs with three frames arranged side-by-side on a 40" monitor. Not being able to compare code this way would really slow me down.


I use tmux. It works extremely well with vi. It's no problem at all to arrange 3 panes side by side in tmux. You're not even restricted to that, of course. You could be tailing a log file in one of the panes, reading a man page in another, and coding in the middle one.


How can you insert text in a column-wise fashion? Not using a macro or some such.

In vim, it's:

(navigate to column)

Ctrl+v

10j (or whatever)

Shift-I

(insert text)

Escape


With the substitute command and an appropriate range. This sort of operation is extremely rare, though, so it's not the sort of thing you worry about when you're using a limited environment that has vi with no ability to install vim.

Besides, it's far more common that you'd want to do an operation like this but the columns happen to be misaligned. Then you're reaching for substitute anyway. Might as well master the more flexible tool.


I wish this or a similar editor was written in a language like Nim. Then you could just compile it on an older version of CentOS, link statically, and cp it anywhere you need it. Or something that supports simple ./configure && make.


Some systems you can't install anything; they're locked down. So, knowing VIM and nano is very helpful. Actually, this is the major reason I never try other editors; I have to work with legacy, locked down systems (on occasion), so it is easier for me to just stay with one editor that I know.


Does the install script fail or take too long?


How often are you in situations where you can't run the editor/IDE you want? I haven't encountered this for years except the rare times I'm forced to do some editing over SSH (which is far too low-level for server management than I'd like).


If you have to edit over SSH then you can do an sshfs mount instead.

    sshfs <user>@<server>:<path> ≤mountpt≥


Almost every time I have to edit text over SSH, it is to change configuration files that aren't writable for my SSH user.

Can you sudo over sshfs somehow without logging as root?


Note the user field in the above command. Desktop file managers can do this too.


I explicitly said "without logging as root". SSH as root is almost never allowed on production servers.

I was wondering if there is a way to write protected files when SSHing as a user who only has write permission through sudo.


Tramp mode in emacs is what I use.


Maybe not often for your average Nodejs dev, but I've had jobs where I had to edit files on special laptops all the time.


emacs-nox (apt install emacs24-nox usually) is also surprisingly feature-full and comfort to work with for emacsers


What's the difference between emacs-nox and "emacs -nw"?


Just that nox doesn't have all the gtk/x deps built in, functionally mostly the same as far as I have been able to tell.


No need to pass -nw :) I usually install it in docker containers on servers. It's quite small (well, I think it's around 28M to install usually), since it's just an emacs built without gui support.




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

Search: