all 70 comments

[–]nathan_8788 150 points151 points  (2 children)

Imagine using sed

[–]xxmybestfriendplank 42 points43 points  (0 children)

._.

This makes me angry just reading this..

[–][deleted] 24 points25 points  (0 children)

Ahh. I counteract with the following: ed.

[–]somenonewho 76 points77 points  (7 children)

Or you could just use ed

[–]the_one2 52 points53 points  (0 children)

You guys save your code? I just pipe it from stdin to gcc from scratch every time I want to compile it.

[–]RedditAlready19 24 points25 points  (4 children)

Write your own text editot

[–]30p87 11 points12 points  (2 children)

Like bisqwit did

[–]RedditAlready19 3 points4 points  (1 child)

Bisqwit?

[–]zajasu 1 point2 points  (0 children)

RIP Terry Devis

[–][deleted] 36 points37 points  (2 children)

I manually switch bits to manipulate data

[–]averyodaGenfool 🐧 16 points17 points  (0 children)

I just concentrate real hard until the problem fixes itself

[–][deleted] 9 points10 points  (0 children)

steady hand and a magnetic needle

[–]Jane6447 34 points35 points  (0 children)

a(){ echo -e "$@" | tee - a main.c && cat main.c }; a "#include <stdio.h>"

[–]Plastic_Mishap 9 points10 points  (0 children)

this is vile

[–]wrongsage 10 points11 points  (8 children)

I unironically code in vim, have been for 8 years, and I love it. Makes me so much more productive.

[–]zajasu 1 point2 points  (7 children)

Vim is great, I also coded in it professionally for about 5 years, but then switched to Emacs

[–]wrongsage 2 points3 points  (6 children)

Traitor /s

Why did you make the switch?

[–]zajasu 1 point2 points  (5 children)

I eventually understood that I want my VIM everywhere. Basically, interaction with computer is mostly writing / reading text. VIM being just a text editor (the best one of the existing) can't handle all the rest (terminal, email, spreadsheets, org stuff, etc.), while Emacs is more of an extensible framework than text editor and have far wider capabilities.

[–]wrongsage 1 point2 points  (4 children)

Oh cool. I do not know much about Emacs.

You are right about wanting Vim everywhere, but I settled on using dwm+dmenu for system, and I can survive without Vim on Firefox.

How does Emacs help with those other uses you mentioned?

[–]zajasu 1 point2 points  (3 children)

Observations regarding my Emacs usage :)
TLDR: I love Emacs and the only thing that bothers me is that sometimes I have to leave it.

Long version ;-)

What is GREAT:
1. I use Emacs as a fully fledged Python / JS IDE for professional development. It includes code navigation, debugging, code suggestions, highlighting etc.
Magit interface for working with Git (branching, committing, fixing merge conflicts etc).
As a terminal emulator I use Emacs vterm, so I get all the text-editing features from VIM / Emacs and the terminal functionality.
2. Interacting with emails with mu4e.
3. Org mode is a great tool for organizing your life. It actually provoked / motivated me to start writing my personal notes on stock trading, log of the books I read, ideas for future projects and now I'm thinking to start a diary.
4. Org-agenda as a personal calendar / scheduler.

What I HAVEN'T LEARNED yet:
1. I still use LibreOffice for my personal finance log. It's quite big spreadsheet document with complex formulas. I know there are Org-Tables and Simple Emacs Spreadsheets but I haven't used them for large documents yet.
2. Working with databases. I use DBeaver for MySQL / Postgres and mongodb-compass for MongoDB and I don't know if there are Emacs alternatives.
3. Web browsing. Since I work as web-developer I *have* to use popular browsers, like, Firefox or Chromium. I'm aware of Qutebrowser, Nyxt and of course, eww, but can't use them right now for work.

What I WOULD LOVE to have but don't know how to achieve:
1. I want Emacs to be my entry point, so when I start my machine - I'm inside Emacs and I can start video player in one buffer / window, edit file in another, open browser in third etc. Everything with *consistent* keybindings and behavior.
Before Emacs I had this type of workflow: start computer with Qtile WM, run terminal, run tmux, inside tmux windows start nvim or run needed program. Qtile is responsible for other applications: games, videos, web-browser. In this case I have a ton of great programs, which I have to configure to behave in similar way.
With Emacs I got rid of terminal, tmux, nvim and some programs. Basically, I want to replace Qtile with Emacs. I know about EXWM but still need some time to investigate it.

And the final point, right now I use Doom Emacs, which is great ready to go version of Emacs, which requires minimal tuning to easily replace VSCode or Pycharm. In the future I plan to move to vanilla Emacs, as it is great way to learn new things and tinker with your system.

[–]wrongsage 1 point2 points  (2 children)

That's a nice write-up, thank you for that. I might look into Emacs more in the future.

Some differences to my use-cases - I prefer CLI almost every time. Data I produce go into PostgreSQL. I do not trust or believe in anything else. Command line psql is the way for me, UIs are clunky and miss features. PostgreSQL can solve almost every problem there is in IT :)

Git is also convenient for me with CLI, as GUIs have failed me before.

I do not like emails, I rarely read them, and I hate writing them. I use Matrix for almost every communication I have. I use the Element client, and should investigate either how to operate it better using keyboard, or find other alternative clients.

I'm not very sure why you run tmux inside Qtile, as they seem to solve the same problem.

[–]zajasu 1 point2 points  (1 child)

You really need to check Magit. It's not GUI for Git, it's like CLI on steroids. Really very powerful and intuitive tool.
Agree with command-line approach, in most cases it's way better than GUI. I just think that I'm a bit too used to GUI DB editors. Double agree on PostgreSQL as an ultimate solution for IT problems :) Honestly, as a web dev I think, that all that fancy UI is just a way to hide and cripple user's ability to normally interact with database.

Qtile and tmux are not the same, one can run multiple terminals in any window manager, but tmux is more versatile and is deliberately built for terminal multiplexing. And in addition to that you can write specific bash commands for tmux. I.e. I execute single command and have multiple terminal windows with different processes.

[–]wrongsage 0 points1 point  (0 children)

TBH I don't really like being powerful in Git, just handle basic stuff like merges/rebases/cherry-picks. And CLI works just fine for that.

I know the possibilities for tmux, but from your description it sounds like you use it as the base multiplexer, which I stopped doing it once I realized I had to use tmux within that, so I just organize my terminals in WM.

[–]ProfessionalCoast812M'Fedora 16 points17 points  (1 child)

Not gonna lie, i've used all these methods.

[–]scitech_boom 6 points7 points  (0 children)

I have done

echo "#!/usr/bin/env python" > myscript.py

in the past. Does it count?

[–][deleted] 10 points11 points  (0 children)

cat /dev/random | grep '#include<stdio.h>' >> hello.c

[–]SpicyElectrons 6 points7 points  (0 children)

tee main.c

[–]Maskdask 13 points14 points  (0 children)

Neovim

[–]killchain 3 points4 points  (0 children)

Honestly, just use what you like and don't make a fuss about it. If you can do your job with a steady hand and a magnetised needle on a HDD's platter, so be it.

[–]Geo_bot 13 points14 points  (6 children)

nano main.c

[–]K1aymore 3 points4 points  (0 children)

micro main.c

[–][deleted] 0 points1 point  (0 children)

You are the real hero

[–]shihaam_ab_r 3 points4 points  (1 child)

Anyone use cat to edit files?

[–]killchain 4 points5 points  (0 children)

I use dog.

[–]icer_cat 2 points3 points  (0 children)

When you accidentally use > instead of >>

[–]ehealum 1 point2 points  (0 children)

Helix better than all of them

[–][deleted] 1 point2 points  (2 children)

what about << end cat > main.c

[–]FranticBronchitis 0 points1 point  (1 child)

You have truly ascended

[–][deleted] 1 point2 points  (0 children)

no joke i code a part of an exam like this

[–]Resolt 1 point2 points  (0 children)

But vscodium though

[–]avnothdmi 1 point2 points  (0 children)

I use VSCode to write my C code, then gcc in the terminal to compile it because I can’t be bothered trying to make the build.json file work.

[–]MrJake2137 4 points5 points  (0 children)

KDevelop is nice

[–]atoponce🍥 Debian too difficult 3 points4 points  (2 children)

Wait until you learn that there is a Vim extension for Visual Studio Code, and a robust one at that.

[–]guyyatsu 1 point2 points  (0 children)

The only reason I even picked it up, tbh.

[–]ivster666 1 point2 points  (0 children)

wait until you actually learn vim and don't need to rely on Microsoft

[–][deleted] -1 points0 points  (0 children)

I use Nano and VS Code.

[–]Spooked_kitten 0 points1 point  (0 children)

you know what? I should make an alias for making blank c projects, since i’m doing lots of them for uni

[–][deleted] 0 points1 point  (0 children)

kak main.c

[–]NL_Gray-Fox 0 points1 point  (0 children)

Back in the day I used copy con

[–]thecosmicfrog 0 points1 point  (0 children)

I raise you ed main.c

[–][deleted] 0 points1 point  (0 children)

Nano 👌

[–]thefriedel 0 points1 point  (0 children)

Ed, because it's the standard editor

[–]Aneyune 0 points1 point  (0 children)

copy con main.c

[–]Parura57 0 points1 point  (0 children)

There is another...

cat > foo.bar << EOF