25 ms·
Installing a (read: many) custom vim plugins and color scheme and screen version and etc… stops being fun about the third time you have to log into a nameless s
by justonceokay 1y ago
Installing a (read: many) custom vim plugins and color scheme and screen version and etc… stops being fun about the third time you have to log into a nameless server. That being said, there are some settings that I absolutely cannot live without; `j=gj` being a good example in vim.
IMO your dot files are only useful to share if they are usable with the default software of the place you’ve shared them to. Otherwise they become a prison that forces you to install all your special versions and plugins and scripts and etc. on the other hand, I felt like making my dotfiles easy to share forced me to use as many default settings as possible, which in the long run saves me a lot of time and energy.
“The only zen you’ll find on a mountain top is the zen you brought with you” is one of my favorite sayings, and in a weird way I find it fitting here. If you learn to love the default settings then every server feels like home.
- Ezhik 1y agoI honestly just can't vibe with the "don't customize because you'll log into other servers" thing. To me it feels like getting told to not put nice shelves in my home because other buildings don't have them.
- justonceokay 1y agoIt completely depends on your work environment. My experience has been doing a lot of admin work and working with distributed databases. I probably spend a third of my day in servers that are not mine. So for me it just doesn’t make sense to make a lot of configuration changes, especially changes that will end up in my muscle memory. Now my personal computer does have much nicer color schemes and a few plugins for code dev that I don’t carry around. But even then I try to use the defaults in my IDEs and browsers, because at this point I’m on work computer number.. 11? Configuring it is starting to get old
- treve 1y agoSeems like a great opportunity to learn a bit about automating this set up. Really not hard to upload a .vim directory on a remote server for example.
- bongodongobob 1y agoNah. Other people need to use them too. You just don't do that kind of stuff managing a fleet of servers. Keep it standard. Automation is yet another thing to manage and maintain. I keep all of my servers completely standard.
- jclulow 1y agoSurely you can put your own dotfiles into your own account on that machine, though, without impacting other people?
- mystifyingpoi 1y ago> Automation is yet another thing to manage and maintain But supposedly you already have an automation that you maintain your standard servers with. Adding an Ansible role that puts .vimrc into $HOME surely isn't that much of a maintenance burden?
- bshacklett 1y agoThe better place to spend time might be the automation of operational tasks on those servers so that logging in isn’t necessary in the first place. Then you don’t have to leave your home environment and you can run whatever custom editing configuration you want. Of course the other upsides to that automation overshadow this a bit.
- theshrike79 1y agoI'm of the opinion that if you need to log in to a server you've already failed. Nobody should be ABLE to log in to servers by default, that's the way they become unicorns and not cattle.
- mystifyingpoi 1y ago> Configuring it is starting to get old That's exactly the opposite of my experience. Since all my dotfiles are in Github, configuring new system is just a git clone and copying a few files around. I don't even use any config manager, since I rarely get new computers. Takes a few minutes max per machine (plus maybe package installs like zsh if it's not there already).
- inanutshellus 1y agoThe original statement was "vim plugins" SO yeah you can have your fancy alias or whatever but I'm with the GP that adding a bunch of cool plugins that I get used to and then... perpetually can't use because 40% of my time is spent on remote machines I don't have admin on... ehh.. quickly becomes not worth it. It's like when I tried to get used to a DVORAK keyboard when I'd spend my weekdays in a school computer lab...
- exe34 1y agoYou don't need admin to install emacs packages..... I'm sure vim isn't dumb enough to require that?!
- inanutshellus 1y agoFor me it was that each plugin would have to go through a security approval process and that was not something they appreciated. (e.g. they have "real work" to do), whilst mapping `n` to `nzz` or setting the regexpengine to `0` well, yeah, go for it.
- spicycode 1y agoSame exp here, a simple clone and setup script sorts all this in a user directory.
- baobun 1y ago> Takes a few minutes max per machine (plus maybe package installs like zsh if it's not there already). Assuming you have internet and can access GitHub. Setting up internally accessible repos for that or bake it into an image is its own excercise, which you'd have to setup again for every site and isn't there on day 0. Even so, "a few minutes per machine" builds up quickly if that happens multiple times per day and new airgapped sites are a regular occurence. That's not including the possibly larger cost of context-switching to "customization mode" for every setup. I do have a few dotfile customizations I carry around for sites/boxes I bother enough with but at this point they're cut down and familiar enough that it takes me a few seconds to put those in place manually from memory and dist defaults. Minimal .profile: VISUAL=vim EDITOR=vim tmux and some other apps will pick up on this and switch to vi-style keybindings. I resonate with embracing the Zen of leaning into defaults.
- exe34 1y agoSo you spend two thirds of your day with an arm tied behind your back because one third of your day you will have to use the hand for groping in the dark...
- pkghost 1y agoIt's bananas! If the claim these folks make is "time spent struggling through a default config on an unfamiliar machine" > "time saved by crafting an workshop to fit your mind", then we are not the same. (Probably, the dividing line here is time spent coding vs time spent managing infra.)
- speerer 1y ago"Free and easy That's my style Howdy-do me? Watch me smile But fare-the-well me After a while 'Cause I gotta roam And any place I hang my hat is home"
- dotancohen 1y agoBurma shave
- stopcoffee77 1y agoHere you go # Roaming bashrc profile function sshrc() { BASHRC=$(cat ${HOME}/.bashrc_roaming | base64 -w 0) ssh -t $@ "echo \"${BASHRC}\" | base64 --decode > ~/.bashrc_roaming; \ bash --rcfile ~/.bashrc_roaming; \ rm ~/.bashrc_roaming"; }
- mystifyingpoi 1y agoI was thinking of exactly that. Or maybe, for an extreme version of this, one could create a Docker image with the whole dev environment, start the container at the login, bind mount / of the host somewhere and work from there. Then Ctrl-D and it's gone.
- stopcoffee77 1y agoNot exactly but almost https://containertoolbx.org/ https://containertoolbx.org/
- sodapopcan 1y agoIt's also super weird when people say this and then switch to another editor, then switch to something like vscode, which ignores the fact that using a souped-up local Vim and a minimal remote one is the same situation... you're getting a different experience local and remote.
- tetha 1y agoAlso, if you have useful nice shelves that make your fridge aka postgres run better, why shouldn't we work on putting that on servers to make all fridges run better? Also, having a comparable and shared admin experience is a big deal in a team. Like sure, if you need to quibble about red or yellow prompts, eh. But if there is a good log colorizer or analyzer that makes an expert better at handling the system, or some aliases that make a system easier to manage - I want this deployed for _all_ admins on _all_ relevant systems. And sure, all code running on a server is a security topic. But then let's figure out a way to run your favorite tools through the software security pipeline and then deploy it to systems. Sure, I dislike installing the latest js-based npm fad on a database for a minor advantage, but if there is some well-aged tool from the postgres space... I'd probably rather work to have it.
- dotancohen 1y ago> I want this deployed for _all_ admins on _all_ relevant systems. Another user above mentioned that his most important config is mapping j to gj. That would drive me nuts. When lines are so long that they wrap, I want j to go to the next line, not the next however-wide-the-terminal-is. On the off chance that I ever want that, I have gj right there at my literal fingertips. You're never going to find a config that everybody is happy with. If that were the case, then there would be no need of config at all.
- tetha 1y agoI was rather referring to things like: Aliases to access important log files. Aliases to supply security credentials to important commands. Coloring logs so relevant details are highlighted. If your biggest problem running a system is the line-next semantic, you're in a much better place than I am. No one on the team has ever raised that.
- taude 1y agoit's going to depend on whether you're a software dev or a sre/ops person.
- burnt-resistor 1y agoIt's another form of perfectionist paralysis and rationalizing doing more non-value-add, error-prone, manual effort.
- LordDragonfang 1y agoThis is the main reason that, even though I know I'd enjoy zsh, I stubbornly stick with bash. It's because I know that I will be extra frustrated when I have to log into any of the number of machines that I have to do real work on that don't have it already set up.
- anyfoo 1y agoThat’s like saying: “This is the main reason that, even though I know I’d enjoy a nice car, I stubbornly stick with a run-down PT Cruiser without radio and air conditioning. It’s because I know that I will be extra frustrated when I have to take an Uber.” I personally use zsh and do not want to miss it on my own machines. I however do log in onto machines that sometimes do not even have bash (yeah it’s rare nowadays, but it exists), and I adapt just fine. It’s not super pleasant, but not using zsh on my machines would be less pleasant.
- deleted 1y ago[deleted]
- _lvbh 1y agoTry fish. It has good defaults and don't require any configuration. I install it on every server I log into as my first instinct
- VirusNewbie 1y agodotfiles are pretty easy to move to a new server, no?
- m463 1y agono. simple but complicated. does the same .bash_profile/.bashrc work on different linux versions? what about macos? and now macos no longer uses bash. And what about saving .bash_history? and on and on. there is a whole industry of shell scripts that try to help with this.
- deleted 1y ago[deleted]
- deathanatos 1y ago> does the same .bash_profile/.bashrc work on different linux versions? If we weight versions by likelihood of interacting with them, yes, they do. > what about macos? I handle macOS as a special case; it is not too difficult. Mostly, macOS boils down to "Get brew, download the GNU tools with brew, alias the commands to the GNU set", mostly because macOS's builtin tools are crap. The real problem is macOS, not the dotfiles, but many employers (including my own) force one to use macOS. It just not as big a special case as you're thinking. > and now macos no longer uses bash. … Apple hasn't updated bash in eons. Yeah, the default is now zsh, but I really hope one isn't just bumming along with bash 3. And it's also reasonably easier to just use zsh everywhere. zsh is basically objectively superior. > And what about saving .bash_history? and on and on. Eh, I learn to love the bomb there. > there is a whole industry of shell scripts that try to help with this. There's definitely not.
- VirusNewbie 1y agoyeah, I think i'm with you, zsh and a moderately customized profile is more than enough.
- finaard 1y agoThat's why you don't use vim, but Emacs with tramp.
- wafflemaker 1y agoIf they don't know, they can't be sad about what they're missing. You're just sticking fingers in the wound. Anybody who would like a decent text editor around vim key-bindings uses Emacs in evil-mode already.
- BoorishBears 1y agoNano.
- dotancohen 1y agoEmacs is a great OS, infinitely extensible. The only thing it's missing is a decent text editor.
- firefax 1y agoI thought the appeal of vi was it can mostly be used "as is" vs emacs being infinitely customizable? The folks I know who use vi do so because they are at their core, sysadmins, and something simple and consistent is valued.
- II2II 1y agoVim and Neovim are pretty close to being infinitely customizable, but vi is a different story. Likewise, Emacs can be used as is. If anything, the difference was in the core audience. A sysadmin is more hesitant about customizing their tools because they tend to deal with many different systems. It's also the main reason why they use vi (Vim and Neovim are simply substitutes), because it is always available. Emacs tended to attract people who customized their tools. These days, things are a bit different. Vim and Neovim are more easily customized, and have gained a following because it is more finger friendly (even if it is harder to learn).
- firefax 1y agoInteresting. Are vim on the CLI and Vim the gui program two separate things? (I actually used "MacVim" on MacOS for basic note taking in class since I could alt tab to it, but tended to do any script writing in vim on the cli.) Anyways, my only customizations are usually to turn on line numbers and syntax highlighting... I also have sublime, but sometimes I find writing a script it can be helpful to just use a very simple editor, write out some psudocode with comments, then slowly build it out... it's easy to get distracted in a full blown IDE. (And I'd argue emacs or vim when heavily customized effectively become an IDE)
- II2II 1y agoI hardly ever use gvim. From my understanding, there are a few relatively minor GUI specific settings for the GUI version. Contrast that to emacs. It's possible to present documents with multiple fonts and images in the graphical version. (The irony: vim and gvim are separate binaries, which emacs can have a unified CLI/GUI binary.) I agree that heavily customized, emacs and vim can be an IDE and that it can be distracting. It is possible to pick and choose the desirable (e.g. non-distracting) elements of an IDE when configuring either editor, but that in itself turns into a distraction.
- jauntywundrkind 1y agoWith neovim, you have pretty good profile copy-ability. The app convention is very nice too, for isolation. scp -r mydesktop:.config/my_bespoke_neovim $HOME export NVIM_APPNAME=$HOME/.config/my_bespoke_neovim Using something like astrovim provides a very nice framework for declaratively bringing in and bringing together a very nice environment too. Great start, good patterns, the impressive `lazy` managing plugins under the hood. Mason is one other core bedrock components of good neovim dx. It's the main library in the neovim galaxy for bringing in lsp servers and debug adapter protocols. It mostly just works, gives great out of box debug-ability. There's like a mini `mise` running, powering the plugins you bring in.
- SOLAR_FIELDS 1y agoI have some variant of this where I mostly refuse to use shell aliases, since I come from a time when you might be remoted somewhere and not have your shell available and I want the muscle memory in the middle of a fire. People look at me like I'm crazy for typing the longer commands out.