Coders, what is your workflow on Linux

Hello,

I installed Ubuntu a few months ago on my work laptop and I’ve been running and loving it since.

However, I am used to VsCode, so this is what I am using in Ubuntu as well.

So I am curious, what kind of coding so you do? And what is your workflow.

I am an embedded firware developper and mainly use C. I am cross compiling my code in VsCode for a FPGA from Xilinx (dual core arm + PL)

Never dove into make files and cmake more than what I needed in the past, but I had an opportunity to learn CMake and build a project from it.

So my workflow is :

  1. Code in VsCode
  2. Build in CMake
  3. Transfer the app through scp on the target with a custom script (target is running petalinux, which is yocto + Xilinx recipes)
  4. Use gdb server to debug the code.

It’s a pretty simple workflow, but I’d like to know what you guys are running so that I can maybe upgrade my workflow.

Ansis100,

Using VSCode with NeoVim plugin (allows Vim commands in VSC). Code JavaScript locally, deploy using GitHub and Docker/k8s.

mrmanager,
@mrmanager@lemmy.today avatar

Neovim. I work in devops so it’s terraform, ansible and aws cli right now… No need to compile anything or build anything. It’s quite nice and simple. :)

The ability to do everything with shortcuts and no mouse means i get into a certain flow feeling that is really nice. When I need to web search, I use the mouse however. I don’t like the vim like plugins for the browser. The mouse is way faster there.

thepiguy,

Tmux + nvim for editing code and bspwm for a fully keyboard only workflow. I have some keybinds in tmux to open a new pane and run cargo or whatever command is necessary to run the code.

Croquette,

How long have you been using nvim/vim in general?

I have to use vi/vim from time to time for basic editing (like on petalinux for example), but it is quite intimidating to get into. I’m already over my head right now, so adding a new learning curve might not be the best timing.

JoeyJoeJoeJr,

I had to use vi for work (only editor installed on the servers), and it snowballed and now I can barely type in anything that doesn’t have vim bindings.

The first few days were pretty rough, but I learned the absolute minimal basics, and then just organically learned features as I needed them/whenever I felt like what I was doing was tedious, and there had to be a better way. It’s been about 10 years, and I’m still learning!

One small suggestion, check YouTube for videos of people showing off vim features, e.g. youtu.be/5r6yzFEXajQ. You won’t remember everything from one watch, but it’ll help you see what is possible/how powerful vim is, which can guide your “this is so painful how do I make this better” searches down the line.

Croquette,

Someone suggested vim adventures to learn vim so I will look into that for sure. I really like the proposition of the Vim.l workflow, but I need to set time aside right now that I don’t have. But once my project is started properly, I will definitely dive into Vim

fhein,

Like many others I also use NeoVim, but it was quite a bit of learning curve before you get comfortable with it. And you really have to go all in and learn at least the basics, if you try to use it like a normal text editor thinking you’ll learn commands as you go along then you’re going to hate it.

In addition to having to learn how to use vim, you also need a good configuration and probably some plugins if you want to use it as an IDE. Personally I use fzf, coc, vim-dirvish, lightline, lightline-bufferline and papercolor-theme.

Croquette,

How long did it take you to get comfortable with NeoVim? I like the proposition of the vi/vim approach of no mouse. But it is really intimidating to get into.

bionicjoey,

Run the command vimtutor in your terminal

fhein,

I guess a few hours until I had memorised basic stuff like moving around, copy-paste, etc. Then maybe a week or two before I really felt comfortable with it. There’s some point where you actually understand vim and start using it more like a programming language and less like a traditional text editor. For example I love the “repeat last command” (default bound to . key), but to use it effectively you need to create a command that will be usable everywhere you want it to, and there are many different commands that do the same thing.

Here’s a random example:

Let’s say you have the following text in a document you’re editing with vim, and you want to delete the word “dance”. Vim is currently in normal mode, and with the cursor placed on the highlighted “c”:

Monkey dance party

If your brain is still in Notepad.exe mode, you might achieve this by pressing “i” to go into insert mode and using a combination of backspace and delete to edit the line.

A vim beginner might know that “x” and “X” in normal mode works like delete and backspace, without going to insert mode, so “XXXxx” does the same.

Someone who has learned basic movement could instead solve this by combining two commands, first “b” to move the cursor back to the beginning of the word, followed by “dw” (delete to next word).

But there’s also a single command that deletes the current word, regardless of where the cursor is in it, which is “daw”. And since this is a single command, you can repeat it with the “.” key to delete a different word.

Now here comes the vim magic: If you instead want to replace the word “dance” with “pool” you just modify the above commands by replacing “d” (delete) with “c” (change). So in our example you could type “caw” in normal mode, which deletes the word under the cursor and places you in insert mode. There you write “pool” and press Escape to go back to normal mode. Now you have a single command that replaces any word under the cursor with the word pool, which you can repeat anywhere you like.

And if it’s not just the current word you want to change, then replace the “w” in the command with something else, for example “ca)” will change a pair of parenthesis and everything inside them, which is very useful when programming C/C++/etc… And if you have nested parentheses and want do something with two levels at the same time, the command becomes “c2a)” which might look complicated, but it’s basically just simple rules that you string together.

vim-adventures.com might be a fun way to get started, then look up some nice vim cheat sheet and keep that nearby. I would also recommend looking up some example vim configs, because the editor is very bare bones with the defaults. I like relative line numbers for easy jumping between lines, so give that a try.

When you’ve mastered (?) vim you’ll also see less (the program) keyboard shortcuts make a lot more sense. You can also change your shell to vi mode for faster editing of commands.

Croquette,

I will look into vim adventures. Trying to learn Vim at the same time as learning everything else is hard. So hopefully, a Vim game will be more palatable.

sagrotan,
@sagrotan@lemmy.world avatar

My workflow is: my neovim config is - at last - nearly perfect, quickly configurable for many languages on the go, nevertheless I don’t code because when I get home from work I have barely the energy to play for half an hour.

Croquette,

Yeah I get that, I have a job now where I can pretty do whatever I want, so I at least get the feeling of creating something while at work and doing fun code.

But I don’t feel like coding when I’m done with my day

forgotmylastusername,
  • Sublime Text.
  • Whatever build toolchain of the current thing I’m using.
Elw,
  1. Code in Nvim
  2. At work we build using shell scripts, for personal stuff it’s usually Make
  3. At work, deploy with Jenkins to Kubernetes or through Puppet to real/vm hosts. a. At home, I use Ansible 99% of the time
  4. Debugging?
learnbyexample,
@learnbyexample@programming.dev avatar

I use GVim for coding and text editing in general.

Programming wise, CLI tools (grep, sed, awk, sort, head, etc) are enough for most of my tasks. I’ve written a few Python TUI projects (uses Textual framework) but these are around 300-400 lines, so Vim is more than enough for my purposes. Don’t even need any plugins.

CalcProgrammer1,
@CalcProgrammer1@lemmy.ml avatar

Code in VSCode

UI in QT Creator

Build with qmake

Commit with git

Push to GitLab

Run jobs with gitlab-runner

Deploy AppImage, deb, rpm builds with Docker

StefanT,

Transfer the app through scp […]

I use an ad-hoc while loop in a shell with inotifywait to wait for changes in the watched directory and then scp it.

Croquette,

That’s clever. I’m not used to shell scripting yet, but I really like that it is easy to automate things in Linux. If you can run it in terminal, you can script it.

happyhippo, (edited )

Java dev, running opensuse Tumbleweed with KDE.

IntelliJ IDEA, maven, git, postman

Kate for quick edits and note taking works very well

Konsole is my terminal of choice

Teams for Linux because I have to

docker on the command line because there’s no docker desktop for Linux. There is for windows and MacOS tho, although Linux is literally the thing where it runs on the kernel and whose concepts the whole thing is based upon. Fuck them.

Kind of sad to see still lack (for Linux in general) of apps that are often used in companies. E.g. Teams and docker desktop

suspectum,

Teams for Linux sucks and is not maintained anymore. Devs recommend using the web app and this is what I’m using in Chrome, works really well. Otherwise I’m also on Tumbleweed KDE :)

MagneFire,

There’s an unofficial cliënt that I’ve used in the past. Works well even on Wayland (where screen sharing can be an issue sometimes): github.com/IsmaelMartinez/teams-for-linux

Croquette,

If I’m not mistaken, this app is just a wrapper for the web app.

I had a lot of issues with wayland and that app.

happyhippo,

Indeed this is the description I find on Discover:

Unofficial Microsoft Teams client for Linux using Electron. It uses the Web App and wraps it as a standalone application using Electron.

The advantage compared to teams.microsoft.com (at least when I load it in Firefox), is that it has many more features, since I guess it’s using an “Edge” user agent, which unlocks stuff that is not enabled for FF. For example, I can have 1:1 calls (yeah, I know…) and blur my background or even set a background pic, all things I can’t really do on FF.

On the other hand, screen sharing works unreliably (at least in a Wayland session, X11 is fine). I’ve reported a bug to KDE since I assumed it’s a kwin issue, but I should test it with a gnome wayland live medium as well…

bugs.kde.org/show_bug.cgi?id=472471

mryessir,

docker on the command line because there’s no docker desktop for Linux. There is for windows and MacOS tho, although Linux is literally the thing where it runs on the kernel and whose concepts the whole thing is based upon. Fuck them.

You could wrap the Docker/podman commands in a Makefile or create bash aliases/functions.

Gnubyte,

Hey how are you liking Opensuse? I’ve always observed that OS from a far but never had a good opportunity to sit down and tinker with it.

I’ve been in the Debian or mint/pop os camp squarely for awhile now so the cost of time to learn it is somewhat high since all my stuff just works.

You mentioned lack of packages, I feel like I have an abundance in my ecosystem. The store on pop os has so much stuff.

Maybe this is worth looking at? docs.docker.com/desktop/install/linux-install/

happyhippo,

For a personal PC I love it, never had any issues, package selection is great and bleeding edge.

You may raise your eyebrow since this is in contrast with my previous comment, but I’ve rephrased the final sentence since then (I was rather annoyed by the lack of some official apps on Linux, rather than packages for my specific distro. And that’s 100 on Microsoft/Docker).

To be honest I’m not sure TW is the best choice for a workstation because of its rolling nature, but I just recently turned my personal PC into my (also) work PC, therefore I sticked with what I already had.

An LTS kernel would probably be the safest option, but with snapshots out of the box (if you use btrfs), I still feel quite safe right now. If an update should break something crucial for my work, I’d just roll it back.

Transitioning from debian based shouldn’t be hard, zypper is quite intuitive and fast. You also get OBS which is kinda like pacman user packages.

If you need some obscure app which was packaged years ago in binary for Linux, you’ll probably have much more luck with Debian based since apparently .deb is the first package you wanna target.

But it hasn’t happened in a while now that I needed to download such obscure binaries, typically I could find a repackaged version or an alternative app all together, so…

andruid,

Have you checked out podman desktop or rancher desktop?

happyhippo,

If any of those can be used with docker, I’m sold!

I cannot move to podman because our projects are shared and the rest of me team is on Windows or MacOs and they all use docker desktop. We also use docker compose files.

happyhippo,

I have now and I’m loving podman desktop! All I wanted was a quick and easy way to stop/start/delete running compose clusters, and podman desktop detected all my running docker compose containers and displayed them with the familiar tree-like UI with individual or global controls to play/stop or delete.

Thanks! :)

andruid,

Sweet, I’m glad the recommendation is working for you!

andruid,

Sweet, I’m glad the recommendation is working for you!

mryessir, (edited )

C and Lisp:

st -terminal

tmux -workspaces

vim -editor

vim-fugitive -git UI

make -did not require more power yet.

everything vanilla except some custom lines to have vim and tmux share the same pane/window navigation keys.

Kajika,

Chad stack

z3rOR0ne,
@z3rOR0ne@lemmy.ml avatar

Bspwm/sxhkd on Artix Linux with runit init.

Neovim, lots of plugins and custom shortcuts and commands. Espanso text expander for even more functionality.

St terminal with zsh. Lots of aliases and shell scripts add lots more functionality.

JavaScript Developer with some docker integration.

featherfurl,

Helix + sway + nix-shell + git + sourcehut is a pretty tasty combo not gonna lie.

neytjs,

Hobbyist programmer. When I switched to Linux, I started using the Atom editor for typing out my JavaScript projects (mostly Electron apps). Now I use Pulsar, because Atom development was cancelled.

github.com/pulsar-edit/pulsar

I also find nvm to be helpful for installing and using Node in the terminal.

github.com/nvm-sh/nvm

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • [email protected]
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • oklahoma
  • Socialism
  • KbinCafe
  • TheResearchGuardian
  • Ask_kbincafe
  • SuperSentai
  • feritale
  • KamenRider
  • All magazines