8 ms·
Don’t overthink it! Keep it traditional baby all you need is vim and tmux. The initial learning curve for these sorts of cli apps is a bit steep, but it’s a l
by rank0 5y ago
Don’t overthink it!
Keep it traditional baby all you need is vim and tmux.
The initial learning curve for these sorts of cli apps is a bit steep, but it’s a lifelong skill and easily learnable for any competent developer.
Writing code is 1000x more difficult than learning vim philosophy and memorizing some key bindings.
Since I do all my editing in terminal, I just have a portable environment in a git repo. It has an install script that soft links all my scripts and config files to the appropriate locations. My work environment comes with me everywhere!
- alkonaut 5y agoSo just because the code is remote one should edit in a terminal? Seems like the lowest common denominator, but a pretty bad one. And on Windows (the most common OS, even among developers) this is pretty painful even with WSL. As far as lowest common denominators for tooling goes, "terminal window" is pretty low.
- jdauriemma 5y agoI think they were commenting on the portability of terminal-based applications and describing remote editing as a use case. You may think it's "bad" but it's also ubiquitous, resource-efficient, and free. Can you explain to this non-Windows user why vim+tmux is painful in Windows (with or without WSL) in a local or remote setting?
- alkonaut 5y agoI think it's painful because terminals and ssh are just second class citizens. Dotfiles, ssh key storage etc are just not a first class concept (at least not in the same way as on linux) etc. And also things like clipboards don't work - which to a linux user might seem like a non-issue (It just never worked well) but that's a much more painful experience if you are used to it working.
- jdauriemma 5y agoClipboards can be a hassle, for sure. Can you help me understand the impact of dotfiles / ssh key management not being a "first class concept?" How much of a time / productivity hit do you take? Thanks so much for helping me understand.
- alkonaut 5y agoI mean the idea of config files is on one hand windows where some things work like a Linux user would expect (e.g a .gitconfig) while others obviously don’t, e.g use registry or other settings storage. Next, wsl is separate so you aren’t really sure which settings apply where. Are you using git from within wsl? Or a windows git? Is the credential manager the wsl one or one from windows? Unless one is ready to completely “jump into” wsl and ignore everything outside it has a chance of feeling coherent - but few windows users want that I’d guess.
- rank0 5y agoI don’t work in windows but fwiw my clipboard and config files work flawlessly in mac and Linux. Last time I used WSL everything was working fine but it’s been a few years.
- rank0 5y agoIdk man it’s all preference. I’m way more comfortable in the terminal than in a gui editor. The flexibility I get from my shell, nvim and tmux is unmatched by any gui solution I’ve tried. If you don’t like the terminal that’s fine you can always just use git! It’s lightweight, fast, and works on any machine. After years in VScode I got fed up with Microsoft lock in for things like syncing configs and remote editing extensions. Your point about windows may be true, but I’ve yet to work somewhere that hasn’t let me use a MacBook. Also I’m a pentester at work, so I don’t have to write production ready code…I can see why developers might want all the shiny features/integrations that come with a language-specific IDE. To each their own!
- ar_lan 5y agoThis is what I do 99% of the time (unless I drastically feel the need for a visual debugger as I'm not so familiar with CLI debugging just yet). I run a dev VM on any machine(s) I'm actively working on that all share the same setup - today, that's my Macbook and my desktop at home. They aren't necessarily in sync, but they do share the same dotfiles and versions of everything, so if I want to switch my dev work all I simply need to do is a `git pull` on whatever project I'm working on, and then everything is caught up between the two. With this, I just `mosh dev` (and then straight into `tmux`) on whatever computer I'm running into and just use `vim` for everything. If I really need a graphical debugger I can always open the VM graphically, but that's so rare that it hardly feels worth mentioning.
- rank0 5y agoHell yeah! I wish more folks would appreciate how flexible and feature rich the old school cli tools can be. What’s your VMM setup? I just edit right on the remote machine. Lately I’ve been playing around with lxd/lxc for persistent container dev environments. This way I can avoid the VM overhead and it “feels” the same…but I have yet to fully explore this approach.
- ar_lan 5y agoI'm running a NixOS VM. I've tried to dockerize it before but inevitably something always failed - with the VM approach it is always much more stable. I just run it right in VMware Fusion / Workstation, and it works great. Extremely reliable, very low overhead still. It just takes a lot of storage is all :) But everything is always reproducible given the nature of the VM, without needing to pass around snapshots or clones.
- linsomniac 5y agoI'm a sys admin, but lately I've been doing a fair bit of my time developing tooling, and this is very similar to my workflow. And it's been working spectacularly! I've been using Nebula to be able to connect to my primary machine. Then I use mosh to connect, which works great when my laptop suspends, I move locations, etc... I just open up my laptop from the car while waiting for my daughter, over the cell phone, from bed, from the back yard if it's nice... Or my Chromebook. Or my backup chromebook. Lately I've been using LunarVim, which has a lot of enhanced functionality via TreeSitter and LSP. I use oh-my-tmux for settings and a few plugins for doing keyboard-based selection/cut/paste.
- rank0 5y agoI’ll have to check out some of those tools! Never heard of nebula or lunarvim. I just have nvim and some minimal plugins and vanilla tmux. I find that lots of plugin functionality can be done with config changes.
- linsomniac 5y agoNebula is a peer-to-peer "overlay network" VPN, I'm trialing it to potentially run on all of our servers to secure the networking. It was developed at slack and deployed on all their servers. LunarVim is just an opinionated neovim setup with all the bells and whistles. I got tired of pushing along my 20 year old vi configs and trying to get various advanced features working through various plugins, so I started evaluating just using something else, including spacevim, kakoune, onivim2.. Ended up sticking with LunarVim.
- lta 5y agoI would personally recommend something similar. Eternal Terminal in kitty has been quite nice for me over the last year. I use emacs as a daemon started by systemd with emacs client frame. but vim is obvious a great choice as well. What I like about this setup over tmux is that I feels a bit more integrated into my desktop environment, and I don't need as much keystrokes as with tmux. Tmux has a nice integration mode I've been using in the past but it's only supported by a few terminal. I work on a remote dev server for most of my stuff, by choice, which allows me to quickly pull images, dependencies and the rest regardless on the quality of the network I'm working from and I also get a small battery boost since most the of the heavy work is done on the server.
- rank0 5y agoKitty is awesome I’ve been using it lately myself. I can’t get myself fully off tmux into the native kitty panes because tmux is dank for multiplexed remote sessions and actually works everywhere. I still use kitty windows or just detach from tmux when I wanna do something that benefits from kittys beautiful display protocol.
- xur17 5y agoI do something similar, and I really do enjoy it for development. Being able to use mosh to shell into a fast development machine with high speed internet feels like a superpower. The time I put into learning tmux + vim was really well worth it. That said, don't underestimate the upfront cost of something like this. Getting the right plugins + getting comfortable took me a considerable amount of time.
- rank0 5y ago> That said, don't underestimate the upfront cost of something like this. Getting the right plugins + getting comfortable took me a considerable amount of time. This is definitely true. I've been a terminal guy for many years so its easy for me to recommend while I already have the muscle memory. It might be an uncomfortable few weeks, but I still argue that learning a new language or framework is MUCH harder than learning keybindings, coreutils, and shell operators.
- xur17 5y agoYeah, in grad school I forced myself to learn vim + tmux, and it was definitely quite a few uncomfortable and slow weeks, but it has paid itself back in dividends since then.
- mekster 5y agoWhat is the advantage of using vim these days over VS code, Sublime text or JetBrains to upload on save through ssh? Even if you took years to get vim right, I still don't think it matches to the other 3 for programming. What is your vim setup like? The only place I use vim is for config editing on servers but not for programming.
- xigoi 5y ago(Neo)Vim starts up much faster than every IDE, takes up way less RAM, doesn't fill half your screen with buttons and toolbars, allows powerful modal editing with completely customizable keybindings, is very programmable, and can be used on pretty much anything that has a screen, including a phone.
- mekster 5y ago> (Neo)Vim starts up much faster than every IDE, takes up way less RAM Why do you care how long it takes to start up? It's either few seconds or 15 seconds a few times a day. People usually have enough RAM with a machine bought in the last 5 years and I don't see any buttons that fill half the screen? Most of the screen estate is folder tree or the code. Vim key bindings are everywhere it's not just for vim and I never code on phone.
- xigoi 5y ago15 seconds may seem like not much, but it's enough to go from “I have an idea, let's code it up” to “okay, I've cooked some tea in the meantime… what did I want to do again?” And Neovim's instant startup enables a workflow where I can just shut it down when I don't need it. Good for you that you're not a student having to use a cheap laptop for everything and sometimes not having access to it at the moment. Not everyone is so fortunate. Look at the first screenshot in the official VSCode repository, for example: https://github.com/microsoft/vscode https://github.com/microsoft/vscode Only about 20% of the screen is taken up by code. That may still be somewhat usable if you keep it fullscreen, but I prefer to have a 50/50 split with the web browser. Most Vim binding plugins are a complete joke. I've heard that Emacs gets it right, but that's not what we're talking about. I forgot to mention, Vim can be used for every language, including very obscure ones. With JetBrains, you need a separate IDE for each language — if there even is one.