this post was submitted on 08 Apr 2024
946 points (98.1% liked)

Programmer Humor

19544 readers
457 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 29 points 7 months ago (2 children)
[–] [email protected] 27 points 7 months ago (2 children)

export EDITOR=nano.

But (neo)vim is amazing so there is no need to do that.

[–] [email protected] 17 points 7 months ago

I transfer all my files over to a Windows machine and edit them in Notepad

[–] [email protected] 4 points 7 months ago* (last edited 7 months ago) (1 children)

Based nano user

From my .zshrc (typing this on mobile so cope if it's wrong)

case "$OSTYPE" in
  linux*)
    export EDITOR=nano
  ;;
  freebsd*)
    export EDITOR=ee
  ;;
[–] [email protected] 2 points 7 months ago (2 children)

I guess shell languages can't do this:

export EDITOR=case "$OSTYPE" in
  linux*)
    nano
  ;;
  freebsd*)
    ee
  ;;
[–] [email protected] 2 points 7 months ago* (last edited 7 months ago)

That would be too smart. Smells like kotlin's when

[–] [email protected] 2 points 7 months ago

Put backticks around the entire case statement, and you can.

[–] [email protected] 2 points 7 months ago

You can set your default editor (maybe in .bashrc or .bash_profile? I forget), but I'm far too lazy.