diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0edcb9e9f69aa55eed95b395b818bb8d2c5bd201..349abdcb4d0c90e7b2f297e3542f7f8fb76517f3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
 
 ## [Current]
 
+### Added
+
+- autobobble option for `listings`, which automaticly determins the indentation width and gooble it up, removing the need to put `gobble=n` manually
+  every time. (#8)
+
 ### Changed
 
 - `\title` now accepts an optional argument. It will be used as a short version of the title and will be put into the header.
diff --git a/HsH-classes.dtx b/HsH-classes.dtx
index 1c3869ee4adcca04099865904e1b0bfab1f89af6..f18773fb355dc26b39ac0d767bc78e9fea2718f8 100644
--- a/HsH-classes.dtx
+++ b/HsH-classes.dtx
@@ -658,6 +658,7 @@
 \@ifpackageloaded{listings}{
   \PassOptionsToPackage{svgnames}{xcolor}
   \RequirePackage{xcolor}
+  \RequirePackage{lstautogobble}
   \lstset{
     commentstyle=\color{gray},
     keywordstyle=\color{FireBrick}\bfseries,
@@ -667,6 +668,7 @@
     tabsize=4,
     literate={Ö}{{\"O}}1{Ä}{{\"A}}1{Ü}{{\"U}}1{ß}{{\ss}}1{ü}{{\"u}}1{ä}{{\"a}}1{ö}{{\"o}}1,
     escapeinside={(*@}{@*)},
+    autogobble=true,
   }
 }{}
 \@ifpackageloaded{enumitem}{
diff --git a/src/config.tex b/src/config.tex
index a41def46aa2a227d458909dfda5e15842539613a..4c891fceaf56eaecd00134d7727840aeec45d138 100644
--- a/src/config.tex
+++ b/src/config.tex
@@ -33,6 +33,7 @@
 \@ifpackageloaded{listings}{
   \PassOptionsToPackage{svgnames}{xcolor}
   \RequirePackage{xcolor}
+  \RequirePackage{lstautogobble}
   \lstset{
     commentstyle=\color{gray},
     keywordstyle=\color{FireBrick}\bfseries,
@@ -42,6 +43,7 @@
     tabsize=4,
     literate={Ö}{{\"O}}1{Ä}{{\"A}}1{Ü}{{\"U}}1{ß}{{\ss}}1{ü}{{\"u}}1{ä}{{\"a}}1{ö}{{\"o}}1,
     escapeinside={(*@}{@*)},
+    autogobble=true,
   }
 }{}
 \@ifpackageloaded{enumitem}{