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.

sonymegadrive,
  • kitty terminal emulator
  • Vim for editing
  • CMake for builds
  • A shell script based around entr for automatically running the build/test cycle when I modify files
style99,
@style99@kbin.social avatar

I use Geany, so that's basically my whole workflow.

dawwwsh,

I tend to prefer Jetbrains editors (CLion, Rider, WebStorm) for projects, and just nano/micro for config editing and such…

nitefox,

CLion for Rust/C++, VS Code for web dev stuff

Afiefh,

Mainly C++ with a sprinkling of Python and Rust for fun.

Used to code KDevelop, now VSCode. Build in a regular terminal (I prefer Meson over Cmake, both end up producing Ninja files.) Debug with valgrind, gdb and ddd. Push to Gitlab for my personal projects.

I use Docker for my test environments as it’s easy to bring them up and restore them to mint condition, and it ensures that the longer running tests with side effects don’t interfere with one another.

wgs,
@wgs@lemmy.sdf.org avatar

I use vis to write code, ^Z and make/mk to build the project. Most of the debugging is done with valgrind and eventually gdb though my use is very limited.

When I work on manpages, I use wendy to automatically preview manpages everytime the source file changes.

TenTypekMatus,
@TenTypekMatus@lemmy.world avatar

I use IntelliJ IDEA for V and Rust, Neovim for C and VSCodium for Ansible + web development.

featherfurl,

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

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

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?
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

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.

SanndyTheManndy,
@SanndyTheManndy@lemmy.perthchat.org avatar

Neovim (with NvChad or the like) + tmux is great, once you figure out the keybinds. Probably not so great for debugging, though. VSCode is a good all-rounder.

Croquette,

VSCode is the same on Linux, so it was easy to have at least some familiarity in Linux. So it was an easy choice when I switched to linux.

SanndyTheManndy,
@SanndyTheManndy@lemmy.perthchat.org avatar

In that case, you might wanna check out VSCodium, a malware-free version of VSCode.

delial,
@delial@lemmy.sdf.org avatar
  1. Code in Emacs or Jetbrains (depends on language and laptop cpu)
  2. Run make to build, run, debug, or clean (I like makefiles for documenting basic tasks)
  3. Commit with git when chunk of work is done

I tend to do everything locally on bare metal. I never liked putting stuff in containers or running a vm.

VS Code is a great editor, though. It actually feels a bit like Emacs.

russjr08,
@russjr08@outpost.zeuslink.net avatar

I’m currently running Fedora Kinoite, via the Universal Blue kinoite-nvidia image.

A lot of the stuff I personally develop is done in Java/Kotlin, so for those projects I use IntelliJ (via the JetBrains “All Products Pack”) to work. For everything else such as Rust which I’ve been slowly trying to get into, or PHP which I sometimes write for work I tend to use Neovim because its simple enough. I suspect as I start to build bigger projects in Rust I’ll start using it through IntelliJ or CLion to have access to a nice debugging environment, but so far the little bit of debugging that I’ve needed can be done through rust-gdb.

Its a nice simple workflow, and Fedora already has podman installed for when I’m utilizing Docker as well which is nice.

  • 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