Atomic-powered Fibonacci indentation

twitter logo github logo ・1 min read

Atom package that converts the spacing for each successive indentation according to the Fibonacci sequence.

Quite recently I stumbled upon this vim plugin that does the same job (but, honestly, way better), plus after a short discussion, I had an epiphany that people have never heard about this method of making their code look great.

That's great! First I'd heard of Fibonacci Indentation. I like it!

So, here it is.
Atom plugin page.

mkrl / fibonacci-indent

Atom package that adjusts your indentation according to the Fibonacci sequence

Fibonacci-indent

An Atom plugin that serves a single purpose: indent your currently selected code based on the Fibonacci sequence.

Demo GIF


How it works

After applying to the pre-indented code (with either tabs or spaces), 2 of each space characters (or 1 tab if you're that kind of guy) at the beginning of the line will be converted to the corresponding Fibonacci sequence number Feel free to use your code beautifier of choice before fibonazing your tabs.

Why?

  • It makes your deeply nested code look like spaceships.
  • If your co-worker has spawned another russian doll method, feel free to use this plugin to show how good it actually looks for other people.

Please don't use this on any actual code you're intended to share with other human beings in serious projects This can also break indent-based languages like Python or Ruby so please be careful.

Somehow inspired by this vim plugin that…

(wanted to save it for April 1st, but couldn't resist)

twitter logo DISCUSS (5)
markdown guide
 
 
  • It makes your deeply nested code look like spaceships.
  • If your co-worker has spawned another russian doll method, feel free to use this plugin to show how good it actually looks for other people.

πŸ˜‚πŸ˜‚πŸ˜‚

 
 

Who knew that writing the code would actually be the most CPU intensive task?

 
Classic DEV Post from Jan 20

My dev life has just started πŸ˜ŽπŸ‘©β€πŸ’»

Hi there all this is my first post on dev.to (I love this platform πŸ˜πŸ‘). This is ...

Mikhail profile image
Living a life, learning things on a daily basis
  1. Read Post πŸ€“
  2. Follow Author πŸ‘‹
  3. Profit??? πŸ€”