this post was submitted on 23 May 2024
261 points (91.4% liked)

Programmer Humor

19623 readers
92 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
 

...from people who seem to refuse to install paredit or coloring plugins for either? ps lisp syntax ftw, it's a feature!

you are viewing a single comment's thread
view the rest of the comments
[–] Tamkish@programming.dev 38 points 6 months ago (1 children)

fine i will take the bait: thats 5 spaces

[–] Barbarian@sh.itjust.works 32 points 6 months ago (1 children)

As long as the next line also has 5 spaces, that's fine. Python only complains about inconsistency, not the exact number of spaces/tabs.

[–] Buddahriffic@lemmy.world 3 points 6 months ago (1 children)

Make, on the other hand... Ugh.

[–] smeg@feddit.uk 4 points 6 months ago (1 children)

What, you don't like tabs and spaces being syntactically different?

[–] Buddahriffic@lemmy.world 3 points 6 months ago (1 children)

(Sarcasm/deadpan detected but I'll respond anyways).

Not when they are visibly the same and the spaces have no other meaning in that context.

Not to mention tabs being annoying in general because of how badly it works to adjust the distance of tab stops. That doesn't really affect this particular case, but it's why I generally use spaces instead of tabs.

Most of the annoyance is from vim recognizing that spaces are an error in makefile recipes but still using them unless I copy paste a tab in, including when I hit enter on a line that is using a tab already. It matches the indentation but uses spaces instead of tabs. I'm sure there's a way to adjust vim config to fix this, but I have yet to acquire the esoteric knowledge required to do so.

[–] ugo@feddit.it 2 points 6 months ago (1 children)

If by vim you mean neovim

vim.api.nvim_create_autocmd(“fileType”, {
    group = file_type_group,
    pattern = “make”,
    command = “setlocal ts=4 sts=4 sw=4 noexpandtab”,
})

Slap this in your config, done

[–] Buddahriffic@lemmy.world 1 points 6 months ago

Nah, it's just vim in my work env. But thanks anyways, I appreciate that you tried!