• 0 Posts
  • 13 Comments
Joined 2 years ago
cake
Cake day: June 10th, 2023

help-circle

  • Absolutely, but you need to set plugins for that and it’s not easy to get to the same state, but once you’re there it’s easy to surpass it. Vim has a very steep learning curve, this applies to everything from moving around the text to plugin specific stuff, but once you learn it it’s much better than any alternative I’ve ever come across (and I’ve been programming for 20 years, only switched to Nvim recently, although I’ve known basic vim since forever).

    First let me tell you that I don’t know how to do all that you asked, some of it I’ve never needed, but I’m 100% sure it’s possible due to all of the other much more difficult stuff I have on my setup. The stuff that I do have, is much more convenient, e.g. with the cursor on a function/variable I can type gd (Go-to Declaration) to go to the declaration of it, or gr (Go-to References) to go to a list of references for that function/variable, that’s much more efficient than using a mouse, especially when it takes me at most 4 key presses to go to anywhere on the visible screen using jumps. So at the worst case scenario it takes me 6 keystrokes to go to the declaration of something I have on my screen, which even at 70WPM it means a bit over a second, whereas moving your hand to your mouse, mouse to the thingand Ctrl+click probably takes longer and is worse for the wrist.

    But it’s the things that you can only do on vim that make it worth it, really you might gain a few seconds here and there, which do accumulate but it’s the stuff that seems like magic, e.g. have you ever had to replace ' with " on a string because you wanted to write can't? <space>srq" that’s my shortcut for that, i.e. space to enter a “special mode” Surround Replace Quotes with " (srq"), and if I wanted to change from " to ' it would be <space>srq' so only the character I want to use change. Similarly I can do <leader>srb( to replace parantesis/brace/brackets with a parenthesis, heck I can even do <space>srq) to replace a quote with a parenthesis (notice I used open in the other and closed here? Open parenthesis means to add a space, closing one no space, same thing for brackets or braces). Another cool thing this plugin lets me do is ciq (Change Inside Quotes) to change all of the text inside the current/next quotes or dab (Delete Around Brackets) to delete everything inside the brackets and the brackets themselves. And all of that is just ONE plugin that extends the basic around/inside keywords in vim. There are dozens of plugins that completely revolutionize the way you move around and edit stuff. It’s hard to learn, but it’s incredibly rewarding.


  • I had that same problem, then I saw some YouTube videos where the guy recommended using Ansible to do stuff and it’s been night and day, not only it’s reproducible so if I ever want to move a service to another machine all I have to do is move a couple of roles around and possibly copy stuff over to keep the data but also it acts as documentation, because if I ever forget something I can look at the code.

    Also I decided to write the roles myself instead of relying on pre-existing ones, so there’s some logic to how my stuff gets deployed and it’s easy to extend for any new stuff I want to add.






  • sigh can’t believe that no one mentioned that there is a default set of shortcuts that are used across all GNU programs, and it’s been the default since way before Ctrl+C/Ctrl+V existed. You can easily copy/paste stuff in any terminal using the same keypresses you would on Emacs, I.e. Ctrl+space to start selection, Alt+W to copy and Ctrl+Y to paste. In fact you can navigate the entire line the same way, not just copy/pasting but moving back and forward, selecting and deleting stuff, e.g. Ctrl+A Ctrl+K cuts the entire line.

    Unless you activate Vi mode (which most terminals support) and then you can use the same keypresses you would on Vi, including ci" and other cool stuff that’s much more powerful that simple copy/paste.

    There is a default, it’s just not the same as word uses.




  • A single app is not necessarily a good thing, I would argue that you’re already using multiple apps on your day-to-day work, and it would be better if remote connectivity were integrated into those. For example, you mentioned a side-by-side view of two locations, this is a normal workflow on day-to-day even without remote access, sometimes you want to have your file explorer split the view in two and look at two folders simultaneously to perform operations, ideally this exact same flow should be able to connect to any remote host and show it to you seamlessly, so you can use the same flow for copying stuff from folder A to folder B regardless of the folders being in different machines.

    Unified hierarchy doesn’t make much sense for remote connections. I see why you would want to have some organization as in groups of machines, but I don’t understand what you mean by hierarchy. In any case ssh/config is a unified source of truth for this that all of the commands you mentioned (and many more) use when trying to connect remotely via ssh.

    You know the name of the tool, what’s the problem with using the tool directly? For ssh you’re going to be dropped in a terminal, so starting in a terminal should be acceptable, for VNC or RDP whatever client you use should be able to parse the ssh/config files so you’re not duplicating information, for SFTP or SCP you should be using your default file explorer as of the other machine were a different folder, there’s no need to have a separate app for it (also you should consider looking at rsync since it’s much better than naively copying files over).

    I know it’s not the same as you’re used to, but it’s one of the core differences in philosophy from Windows to Linux. The philosophy on Unix in general os for an app to do one thing, but do it well, so it’s much more common to use different apps for different stuff than having a monolithic app that does everything but nothing perfectly. That being said, the closest I know of for what you’re asking is Remmina, although I use it only for RDP since for ssh and rsync I prefer a terminal (and since I have the hosts configured I get tab completion as if they were local folders). That being said I only have a handful of machines to connect to, so I don’t need any sort of organization on them, and when I had dozens of machines to attend to I used Ansible and other stuff to perform bulk actions per group and other maintenance stuff.

    I hope Remmina works for you, or that you find something that does, unfortunately I think that might be very hard because of the philosophical differences from Linux to Windows, in general Linux users prefer that their default file manager be able to connect via ssh using the default ssh configs than a secondary ssh manager that can browse files but is neither the source of truth for ssh nor the default file manager. I know I keep using the same example, but it is very telling of the difference in philosophies (and yes, most if not all of the file explorers in Linux can in fact connect via ssh using your default configs).