so I've saved my .vimrc to a gist and I just curl it every time I remote into a new environment
https://gist.github.com/airstrike/e361d94dbe4bb90f4fe6ff4418...
When I started using vi on a Sun machine in ~1986 or so, I was an expert at 'edlin' (if there could be such a thing) because it existed on every DOS machine. I learned vi for the same reason: It not only ran on everything, it was pretty much guaranteed to be installed on everything.
I hated it, as I was used to many other 'visual editors' that were modeless, more like emacs. The first Apollo editor was my favorite.
But in those days, installing an editor was a real task, so I went with what was there. Now it's in my fingers.
Although on the (fairly frequent, because busybox) occasion I have to use REAL vi, I'm flustered when I type capital-V to get a visual line buffer...
I'm not working with Latin-1 files.
* `encoding` is what vim uses internally -- the way buffers and registers are stored in memory. Default value is latin1 as you mention, but it will also pick up on the $LANG environment variable. It's more effective in general to set that variable than directly tweak `encoding`. (Mine is en_US.UTF-8 due to my locale.)
* `fileencoding` is the encoding for the current buffer on disk, how it will be read and written. It is translated in memory to `encoding`. Thus you can manipulate files in encodings other than the one used in-memory. (Although if encoding was latin1 I'm not sure how well the round-trip would go.)
* `termencoding` is how the buffer will be displayed to the screen and how the user input will be read. Once again, it can differ from encoding, and will be translated.
* `fileencodings` is an ordered list of options to try when opening a file. Default value: "ucs-bom,utf-8,default,latin1" when encoding is a unicode value.
If you were editing Japanese text, for instance, choosing UTF-16 encoding would actually make vim use less memory than UTF-8, and would not affect the fileencoding used on disk either.
Same thing but start with the biggest vim config you can find.
Specifically, I can't tolerate the tab key actually putting a tab character in. And I like four spaces per tab.
I've been using vi[m] on an almost daily basis since about 1989...wow, that's 30 years.
In those decades, I have resisted putting anything in my .vi[m]rc except:
set tabstop=4
set expandtab
set shiftwidth=4
set shiftround
That's it. And I agree with you, it's a very happy place for me.