diff --git a/geany.glade b/geany.glade
index fedf339..ac89c1f 100644
--- a/geany.glade
+++ b/geany.glade
@@ -67,7 +67,7 @@
 			  <property name="use_underline">True</property>
 
 			  <child internal-child="image">
-			    <widget class="GtkImage" id="image3165">
+			    <widget class="GtkImage" id="image3242">
 			      <property name="visible">True</property>
 			      <property name="stock">gtk-new</property>
 			      <property name="icon_size">1</property>
@@ -144,7 +144,7 @@
 			  <signal name="activate" handler="on_save_all1_activate" last_modification_time="Thu, 02 Jun 2005 14:15:30 GMT"/>
 
 			  <child internal-child="image">
-			    <widget class="GtkImage" id="image3166">
+			    <widget class="GtkImage" id="image3243">
 			      <property name="visible">True</property>
 			      <property name="stock">gtk-save</property>
 			      <property name="icon_size">1</property>
@@ -165,7 +165,7 @@
 			  <signal name="activate" handler="on_toolbutton_reload_clicked" last_modification_time="Mon, 01 Sep 2008 16:57:06 GMT"/>
 
 			  <child internal-child="image">
-			    <widget class="GtkImage" id="image3167">
+			    <widget class="GtkImage" id="image3244">
 			      <property name="visible">True</property>
 			      <property name="stock">gtk-revert-to-saved</property>
 			      <property name="icon_size">1</property>
@@ -185,7 +185,7 @@
 			  <property name="use_underline">True</property>
 
 			  <child internal-child="image">
-			    <widget class="GtkImage" id="image3168">
+			    <widget class="GtkImage" id="image3245">
 			      <property name="visible">True</property>
 			      <property name="stock">gtk-revert-to-saved</property>
 			      <property name="icon_size">1</property>
@@ -272,7 +272,7 @@
 			  <signal name="activate" handler="on_close_other_documents1_activate" last_modification_time="Fri, 27 Jun 2008 15:19:28 GMT"/>
 
 			  <child internal-child="image">
-			    <widget class="GtkImage" id="image3169">
+			    <widget class="GtkImage" id="image3246">
 			      <property name="visible">True</property>
 			      <property name="stock">gtk-close</property>
 			      <property name="icon_size">1</property>
@@ -293,7 +293,7 @@
 			  <signal name="activate" handler="on_close_all1_activate" last_modification_time="Thu, 02 Jun 2005 14:15:30 GMT"/>
 
 			  <child internal-child="image">
-			    <widget class="GtkImage" id="image3170">
+			    <widget class="GtkImage" id="image3247">
 			      <property name="visible">True</property>
 			      <property name="stock">gtk-close</property>
 			      <property name="icon_size">1</property>
@@ -499,7 +499,7 @@
 				  <signal name="activate" handler="on_menu_increase_indent1_activate" last_modification_time="Tue, 01 Aug 2006 10:28:54 GMT"/>
 
 				  <child internal-child="image">
-				    <widget class="GtkImage" id="image3171">
+				    <widget class="GtkImage" id="image3248">
 				      <property name="visible">True</property>
 				      <property name="stock">gtk-indent</property>
 				      <property name="icon_size">1</property>
@@ -520,7 +520,7 @@
 				  <signal name="activate" handler="on_menu_decrease_indent1_activate" last_modification_time="Tue, 01 Aug 2006 10:28:54 GMT"/>
 
 				  <child internal-child="image">
-				    <widget class="GtkImage" id="image3172">
+				    <widget class="GtkImage" id="image3249">
 				      <property name="visible">True</property>
 				      <property name="stock">gtk-unindent</property>
 				      <property name="icon_size">1</property>
@@ -589,7 +589,7 @@
 				  <signal name="activate" handler="on_cut_current_line(s)1_activate" last_modification_time="Mon, 26 Oct 2009 17:34:30 GMT"/>
 
 				  <child internal-child="image">
-				    <widget class="GtkImage" id="image3173">
+				    <widget class="GtkImage" id="image3250">
 				      <property name="visible">True</property>
 				      <property name="stock">gtk-cut</property>
 				      <property name="icon_size">1</property>
@@ -610,7 +610,7 @@
 				  <signal name="activate" handler="on_copy_current_line(s)1_activate" last_modification_time="Mon, 26 Oct 2009 17:34:30 GMT"/>
 
 				  <child internal-child="image">
-				    <widget class="GtkImage" id="image3174">
+				    <widget class="GtkImage" id="image3251">
 				      <property name="visible">True</property>
 				      <property name="stock">gtk-copy</property>
 				      <property name="icon_size">1</property>
@@ -736,7 +736,7 @@
 			  <property name="use_underline">True</property>
 
 			  <child internal-child="image">
-			    <widget class="GtkImage" id="image3175">
+			    <widget class="GtkImage" id="image3252">
 			      <property name="visible">True</property>
 			      <property name="stock">gtk-add</property>
 			      <property name="icon_size">1</property>
@@ -815,7 +815,7 @@
 			  <property name="use_underline">True</property>
 
 			  <child internal-child="image">
-			    <widget class="GtkImage" id="image3176">
+			    <widget class="GtkImage" id="image3253">
 			      <property name="visible">True</property>
 			      <property name="stock">gtk-add</property>
 			      <property name="icon_size">1</property>
@@ -847,7 +847,7 @@
 			  <property name="use_underline">True</property>
 
 			  <child internal-child="image">
-			    <widget class="GtkImage" id="image3177">
+			    <widget class="GtkImage" id="image3254">
 			      <property name="visible">True</property>
 			      <property name="stock">gtk-add</property>
 			      <property name="icon_size">1</property>
@@ -886,7 +886,7 @@
 			  <signal name="activate" handler="on_preferences1_activate" last_modification_time="Wed, 08 Jun 2005 11:35:19 GMT"/>
 
 			  <child internal-child="image">
-			    <widget class="GtkImage" id="image3178">
+			    <widget class="GtkImage" id="image3255">
 			      <property name="visible">True</property>
 			      <property name="stock">gtk-preferences</property>
 			      <property name="icon_size">1</property>
@@ -907,7 +907,7 @@
 			  <signal name="activate" handler="on_plugin_preferences1_activate" last_modification_time="Wed, 28 Oct 2009 17:17:31 GMT"/>
 
 			  <child internal-child="image">
-			    <widget class="GtkImage" id="image3179">
+			    <widget class="GtkImage" id="image3256">
 			      <property name="visible">True</property>
 			      <property name="stock">gtk-preferences</property>
 			      <property name="icon_size">1</property>
@@ -978,7 +978,7 @@
 			  <signal name="activate" handler="on_replace1_activate" last_modification_time="Sun, 23 Oct 2005 13:22:36 GMT"/>
 
 			  <child internal-child="image">
-			    <widget class="GtkImage" id="image3180">
+			    <widget class="GtkImage" id="image3257">
 			      <property name="visible">True</property>
 			      <property name="stock">gtk-find-and-replace</property>
 			      <property name="icon_size">1</property>
@@ -1053,7 +1053,7 @@
 			  <signal name="activate" handler="on_go_to_line_activate" last_modification_time="Sat, 06 Dec 2008 17:41:21 GMT"/>
 
 			  <child internal-child="image">
-			    <widget class="GtkImage" id="image3181">
+			    <widget class="GtkImage" id="image3258">
 			      <property name="visible">True</property>
 			      <property name="stock">gtk-jump-to</property>
 			      <property name="icon_size">1</property>
@@ -1087,7 +1087,7 @@
 			  <signal name="activate" handler="on_change_font1_activate" last_modification_time="Fri, 22 Apr 2005 18:58:45 GMT"/>
 
 			  <child internal-child="image">
-			    <widget class="GtkImage" id="image3182">
+			    <widget class="GtkImage" id="image3259">
 			      <property name="visible">True</property>
 			      <property name="stock">gtk-select-font</property>
 			      <property name="icon_size">1</property>
@@ -1340,6 +1340,106 @@
 		      </child>
 
 		      <child>
+			<widget class="GtkMenuItem" id="indent_width1">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Indent Widt_h</property>
+			  <property name="use_underline">True</property>
+
+			  <child>
+			    <widget class="GtkMenu" id="indent_width1_menu">
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="indent_width_1">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">_1</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">True</property>
+				  <signal name="activate" handler="on_indent_width_activate" last_modification_time="Fri, 30 Jul 2010 18:07:07 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="indent_width_2">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">_2</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">True</property>
+				  <property name="group">indent_width_1</property>
+				  <signal name="activate" handler="on_indent_width_activate" last_modification_time="Wed, 28 Jul 2010 22:17:17 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="indent_width_3">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">_3</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">True</property>
+				  <property name="group">indent_width_1</property>
+				  <signal name="activate" handler="on_indent_width_activate" last_modification_time="Wed, 28 Jul 2010 22:17:17 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="indent_width_4">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">_4</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">True</property>
+				  <property name="group">indent_width_1</property>
+				  <signal name="activate" handler="on_indent_width_activate" last_modification_time="Wed, 28 Jul 2010 22:17:17 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="indent_width_5">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">_5</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">True</property>
+				  <property name="group">indent_width_1</property>
+				  <signal name="activate" handler="on_indent_width_activate" last_modification_time="Wed, 28 Jul 2010 22:17:17 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="indent_width_6">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">_6</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">True</property>
+				  <property name="group">indent_width_1</property>
+				  <signal name="activate" handler="on_indent_width_activate" last_modification_time="Wed, 28 Jul 2010 22:17:17 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="indent_width_7">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">_7</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">True</property>
+				  <property name="group">indent_width_1</property>
+				  <signal name="activate" handler="on_indent_width_activate" last_modification_time="Wed, 28 Jul 2010 22:17:17 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="indent_width_8">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">_8</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">True</property>
+				  <property name="group">indent_width_1</property>
+				  <signal name="activate" handler="on_indent_width_activate" last_modification_time="Wed, 28 Jul 2010 22:17:17 GMT"/>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+
+		      <child>
 			<widget class="GtkSeparatorMenuItem" id="separator45">
 			  <property name="visible">True</property>
 			</widget>
@@ -1559,7 +1659,7 @@
 			  <signal name="activate" handler="on_project_new1_activate" last_modification_time="Thu, 18 Jan 2007 22:16:24 GMT"/>
 
 			  <child internal-child="image">
-			    <widget class="GtkImage" id="image3183">
+			    <widget class="GtkImage" id="image3260">
 			      <property name="visible">True</property>
 			      <property name="stock">gtk-new</property>
 			      <property name="icon_size">1</property>
@@ -1580,7 +1680,7 @@
 			  <signal name="activate" handler="on_project_open1_activate" last_modification_time="Mon, 15 Jan 2007 17:34:17 GMT"/>
 
 			  <child internal-child="image">
-			    <widget class="GtkImage" id="image3184">
+			    <widget class="GtkImage" id="image3261">
 			      <property name="visible">True</property>
 			      <property name="stock">gtk-open</property>
 			      <property name="icon_size">1</property>
@@ -1609,7 +1709,7 @@
 			  <signal name="activate" handler="on_project_close1_activate" last_modification_time="Mon, 15 Jan 2007 17:34:17 GMT"/>
 
 			  <child internal-child="image">
-			    <widget class="GtkImage" id="image3185">
+			    <widget class="GtkImage" id="image3262">
 			      <property name="visible">True</property>
 			      <property name="stock">gtk-close</property>
 			      <property name="icon_size">1</property>
@@ -1666,7 +1766,7 @@
 			  <signal name="activate" handler="on_menu_reload_configuration1_activate" last_modification_time="Mon, 30 Jun 2008 16:19:40 GMT"/>
 
 			  <child internal-child="image">
-			    <widget class="GtkImage" id="image3186">
+			    <widget class="GtkImage" id="image3263">
 			      <property name="visible">True</property>
 			      <property name="stock">gtk-refresh</property>
 			      <property name="icon_size">1</property>
@@ -1686,7 +1786,7 @@
 			  <property name="use_underline">True</property>
 
 			  <child internal-child="image">
-			    <widget class="GtkImage" id="image3187">
+			    <widget class="GtkImage" id="image3264">
 			      <property name="visible">True</property>
 			      <property name="stock">gtk-file</property>
 			      <property name="icon_size">1</property>
@@ -1713,7 +1813,7 @@
 			  <signal name="activate" handler="on_show_color_chooser1_activate" last_modification_time="Wed, 22 Jun 2005 18:10:21 GMT"/>
 
 			  <child internal-child="image">
-			    <widget class="GtkImage" id="image3188">
+			    <widget class="GtkImage" id="image3265">
 			      <property name="visible">True</property>
 			      <property name="stock">gtk-select-color</property>
 			      <property name="icon_size">1</property>
@@ -1765,7 +1865,7 @@
 			  <signal name="activate" handler="on_help1_activate" last_modification_time="Sun, 24 Jul 2005 15:23:11 GMT"/>
 
 			  <child internal-child="image">
-			    <widget class="GtkImage" id="image3189">
+			    <widget class="GtkImage" id="image3266">
 			      <property name="visible">True</property>
 			      <property name="stock">gtk-help</property>
 			      <property name="icon_size">1</property>
diff --git a/src/callbacks.c b/src/callbacks.c
index 998018b..4084e4a 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -2019,7 +2019,7 @@ static void set_indent_type(GtkCheckMenuItem *menuitem, GeanyIndentType type)
 	doc = document_get_current();
 	g_return_if_fail(doc != NULL);
 
-	editor_set_indent_type(doc->editor, type);
+	editor_set_indent(doc->editor, type, doc->editor->indent_width);
 	ui_update_statusbar(doc, -1);
 }
 
@@ -2340,3 +2340,24 @@ on_plugin_preferences1_activate        (GtkMenuItem     *menuitem,
 #endif
 }
 
+
+void
+on_indent_width_activate               (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+	GeanyDocument *doc;
+	const gchar *label;
+
+	if (ignore_callback || ! gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)))
+		return;
+
+	doc = document_get_current();
+	g_return_if_fail(doc != NULL);
+
+	label = gtk_menu_item_get_label(menuitem);
+	/* the labels are of the form _1, _2, ... */
+	g_return_if_fail(label && strlen(label) == 2 && label[1] >= '1' && label[1] <= '8');
+
+	editor_set_indent(doc->editor, doc->editor->indent_type, label[1] - '0');
+}
+
diff --git a/src/callbacks.h b/src/callbacks.h
index 58ef580..3e80ced 100644
--- a/src/callbacks.h
+++ b/src/callbacks.h
@@ -640,3 +640,7 @@ on_smart_line_indent1_activate         (GtkMenuItem     *menuitem,
 void
 on_plugin_preferences1_activate        (GtkMenuItem     *menuitem,
                                         gpointer         user_data);
+
+void
+on_indent_width_activate               (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
diff --git a/src/document.c b/src/document.c
index 8b12032..0d02e12 100644
--- a/src/document.c
+++ b/src/document.c
@@ -1143,11 +1143,11 @@ void document_apply_indent_settings(GeanyDocument *doc)
 	{
 		case GEANY_FILETYPES_MAKE:
 			/* force using tabs for indentation for Makefiles */
-			editor_set_indent_type(doc->editor, GEANY_INDENT_TYPE_TABS);
+			editor_set_indent(doc->editor, GEANY_INDENT_TYPE_TABS, iprefs->width);
 			return;
 		case GEANY_FILETYPES_F77:
 			/* force using spaces for indentation for Fortran 77 */
-			editor_set_indent_type(doc->editor, GEANY_INDENT_TYPE_SPACES);
+			editor_set_indent(doc->editor, GEANY_INDENT_TYPE_SPACES, iprefs->width);
 			return;
 	}
 	if (iprefs->detect_type)
@@ -1176,7 +1176,7 @@ void document_apply_indent_settings(GeanyDocument *doc)
 				DOC_FILENAME(doc));
 		}
 	}
-	editor_set_indent_type(doc->editor, type);
+	editor_set_indent(doc->editor, type, iprefs->width);
 }
 
 
@@ -1325,7 +1325,7 @@ GeanyDocument *document_open_file_full(GeanyDocument *doc, const gchar *filename
 
 		/* set indentation settings after setting the filetype */
 		if (reload)
-			editor_set_indent_type(doc->editor, doc->editor->indent_type); /* resetup sci */
+			editor_set_indent(doc->editor, doc->editor->indent_type, doc->editor->indent_width); /* resetup sci */
 		else
 			document_apply_indent_settings(doc);
 
diff --git a/src/editor.c b/src/editor.c
index 84a0725..baf59a8 100644
--- a/src/editor.c
+++ b/src/editor.c
@@ -1076,6 +1076,7 @@ editor_get_indent_prefs(GeanyEditor *editor)
 		return &iprefs;
 
 	iprefs.type = editor->indent_type;
+	iprefs.width = editor->indent_width;
 
 	/* if per-document auto-indent is enabled, but we don't have a global mode set,
 	 * just use basic auto-indenting */
@@ -4584,11 +4585,18 @@ void editor_set_line_wrapping(GeanyEditor *editor, gboolean wrap)
  */
 void editor_set_indent_type(GeanyEditor *editor, GeanyIndentType type)
 {
+	editor_set_indent(editor, type, editor->indent_width);
+}
+
+
+void editor_set_indent(GeanyEditor *editor, GeanyIndentType type, gint width)
+{
 	const GeanyIndentPrefs *iprefs = editor_get_indent_prefs(editor);
 	ScintillaObject *sci = editor->sci;
 	gboolean use_tabs = type != GEANY_INDENT_TYPE_SPACES;
 
 	editor->indent_type = type;
+	editor->indent_width = width;
 	sci_set_use_tabs(sci, use_tabs);
 
 	if (type == GEANY_INDENT_TYPE_BOTH)
@@ -4604,9 +4612,9 @@ void editor_set_indent_type(GeanyEditor *editor, GeanyIndentType type)
 		}
 	}
 	else
-		sci_set_tab_width(sci, iprefs->width);
+		sci_set_tab_width(sci, width);
 
-	SSM(sci, SCI_SETINDENT, iprefs->width, 0);
+	SSM(sci, SCI_SETINDENT, width, 0);
 
 	/* remove indent spaces on backspace, if using any spaces to indent */
 	SSM(sci, SCI_SETBACKSPACEUNINDENTS, type != GEANY_INDENT_TYPE_TABS, 0);
@@ -4835,7 +4843,7 @@ ScintillaObject *editor_create_widget(GeanyEditor *editor)
 	sci = create_new_sci(editor);
 	editor->sci = sci;
 
-	editor_set_indent_type(editor, iprefs->type);
+	editor_set_indent(editor, iprefs->type, iprefs->width);
 	editor_set_font(editor, interface_prefs.editor_font);
 	editor_apply_update_prefs(editor);
 
@@ -5006,7 +5014,7 @@ void editor_apply_update_prefs(GeanyEditor *editor)
 		editor_get_long_line_column(), editor_prefs.long_line_color);
 
 	/* update indent width, tab width */
-	editor_set_indent_type(editor, editor->indent_type);
+	editor_set_indent(editor, editor->indent_type, editor->indent_width);
 	sci_set_tab_indents(sci, editor_prefs.use_tab_to_indent);
 
 	sci_set_autoc_max_height(sci, editor_prefs.symbolcompletion_max_height);
diff --git a/src/editor.h b/src/editor.h
index 29c9921..e81a074 100644
--- a/src/editor.h
+++ b/src/editor.h
@@ -162,6 +162,7 @@ struct GeanyEditor
 	gfloat			 scroll_percent;
 	GeanyIndentType	 indent_type;	/* Use editor_get_indent_prefs() instead. */
 	gboolean		 line_breaking;	/**< Whether to split long lines as you type. */
+	gint			 indent_width;
 };
 
 
@@ -286,6 +287,8 @@ const GeanyIndentPrefs *editor_get_indent_prefs(GeanyEditor *editor);
 
 void editor_set_indent_type(GeanyEditor *editor, GeanyIndentType type);
 
+void editor_set_indent(GeanyEditor *editor, GeanyIndentType type, gint width);
+
 void editor_set_line_wrapping(GeanyEditor *editor, gboolean wrap);
 
 gboolean editor_goto_pos(GeanyEditor *editor, gint pos, gboolean mark);
diff --git a/src/interface.c b/src/interface.c
index df2d732..2f2c7dc 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -38,7 +38,7 @@ create_window1 (void)
   GtkWidget *file1_menu;
   GtkWidget *menu_new1;
   GtkWidget *menu_new_with_template1;
-  GtkWidget *image3165;
+  GtkWidget *image3242;
   GtkWidget *separator12;
   GtkWidget *menu_open1;
   GtkWidget *menu_open_selected_file1;
@@ -47,11 +47,11 @@ create_window1 (void)
   GtkWidget *menu_save1;
   GtkWidget *menu_save_as1;
   GtkWidget *menu_save_all1;
-  GtkWidget *image3166;
+  GtkWidget *image3243;
   GtkWidget *menu_reload1;
-  GtkWidget *image3167;
+  GtkWidget *image3244;
   GtkWidget *menu_reload_as1;
-  GtkWidget *image3168;
+  GtkWidget *image3245;
   GtkWidget *menu_reload_as1_menu;
   GtkWidget *invisible7;
   GtkWidget *separator21;
@@ -62,9 +62,9 @@ create_window1 (void)
   GtkWidget *separator14;
   GtkWidget *menu_close1;
   GtkWidget *close_other_documents1;
-  GtkWidget *image3169;
+  GtkWidget *image3246;
   GtkWidget *menu_close_all1;
-  GtkWidget *image3170;
+  GtkWidget *image3247;
   GtkWidget *menu_separatormenuitem1;
   GtkWidget *menu_quit1;
   GtkWidget *edit1;
@@ -90,9 +90,9 @@ create_window1 (void)
   GtkWidget *menu_toggle_line_commentation1;
   GtkWidget *separator29;
   GtkWidget *menu_increase_indent1;
-  GtkWidget *image3171;
+  GtkWidget *image3248;
   GtkWidget *menu_decrease_indent1;
-  GtkWidget *image3172;
+  GtkWidget *image3249;
   GtkWidget *smart_line_indent1;
   GtkWidget *separator37;
   GtkWidget *send_selection_to2;
@@ -101,9 +101,9 @@ create_window1 (void)
   GtkWidget *commands2;
   GtkWidget *commands2_menu;
   GtkWidget *cut_current_line_s_1;
-  GtkWidget *image3173;
+  GtkWidget *image3250;
   GtkWidget *copy_current_line_s_1;
-  GtkWidget *image3174;
+  GtkWidget *image3251;
   GtkWidget *delete_current_line_s_1;
   GtkWidget *duplicate_line_or_selection1;
   GtkWidget *separator49;
@@ -118,7 +118,7 @@ create_window1 (void)
   GtkWidget *send_selection_to_vte1;
   GtkWidget *separator18;
   GtkWidget *add_comments1;
-  GtkWidget *image3175;
+  GtkWidget *image3252;
   GtkWidget *add_comments1_menu;
   GtkWidget *menu_add_changelog_entry1;
   GtkWidget *insert_file_header1;
@@ -127,18 +127,18 @@ create_window1 (void)
   GtkWidget *insert_gpl_notice2;
   GtkWidget *insert_bsd_license_notice2;
   GtkWidget *insert_date1;
-  GtkWidget *image3176;
+  GtkWidget *image3253;
   GtkWidget *insert_date1_menu;
   GtkWidget *invisible8;
   GtkWidget *insert_include2;
-  GtkWidget *image3177;
+  GtkWidget *image3254;
   GtkWidget *insert_include2_menu;
   GtkWidget *invisible4;
   GtkWidget *separator9;
   GtkWidget *preferences1;
-  GtkWidget *image3178;
+  GtkWidget *image3255;
   GtkWidget *plugin_preferences1;
-  GtkWidget *image3179;
+  GtkWidget *image3256;
   GtkWidget *search1;
   GtkWidget *search1_menu;
   GtkWidget *find1;
@@ -146,7 +146,7 @@ create_window1 (void)
   GtkWidget *find_previous1;
   GtkWidget *find_in_files1;
   GtkWidget *replace1;
-  GtkWidget *image3180;
+  GtkWidget *image3257;
   GtkWidget *separator33;
   GtkWidget *find_nextsel1;
   GtkWidget *find_prevsel1;
@@ -155,11 +155,11 @@ create_window1 (void)
   GtkWidget *previous_message1;
   GtkWidget *separator32;
   GtkWidget *go_to_line1;
-  GtkWidget *image3181;
+  GtkWidget *image3258;
   GtkWidget *menu_view1;
   GtkWidget *menu_view1_menu;
   GtkWidget *menu_change_font1;
-  GtkWidget *image3182;
+  GtkWidget *image3259;
   GtkWidget *menu_separator4;
   GtkWidget *menu_toggle_all_additional_widgets1;
   GtkWidget *menu_fullscreen1;
@@ -188,6 +188,17 @@ create_window1 (void)
   GtkWidget *tabs1;
   GtkWidget *spaces1;
   GtkWidget *tabs_and_spaces1;
+  GtkWidget *indent_width1;
+  GtkWidget *indent_width1_menu;
+  GSList *indent_width_1_group = NULL;
+  GtkWidget *indent_width_1;
+  GtkWidget *indent_width_2;
+  GtkWidget *indent_width_3;
+  GtkWidget *indent_width_4;
+  GtkWidget *indent_width_5;
+  GtkWidget *indent_width_6;
+  GtkWidget *indent_width_7;
+  GtkWidget *indent_width_8;
   GtkWidget *separator45;
   GtkWidget *set_file_readonly1;
   GtkWidget *menu_write_unicode_bom1;
@@ -217,30 +228,30 @@ create_window1 (void)
   GtkWidget *menu_project1;
   GtkWidget *menu_project1_menu;
   GtkWidget *project_new1;
-  GtkWidget *image3183;
+  GtkWidget *image3260;
   GtkWidget *project_open1;
-  GtkWidget *image3184;
+  GtkWidget *image3261;
   GtkWidget *recent_projects1;
   GtkWidget *project_close1;
-  GtkWidget *image3185;
+  GtkWidget *image3262;
   GtkWidget *separator34;
   GtkWidget *project_properties1;
   GtkWidget *menu_build1;
   GtkWidget *tools1;
   GtkWidget *tools1_menu;
   GtkWidget *menu_reload_configuration1;
-  GtkWidget *image3186;
+  GtkWidget *image3263;
   GtkWidget *configuration_files1;
-  GtkWidget *image3187;
+  GtkWidget *image3264;
   GtkWidget *separator47;
   GtkWidget *menu_choose_color1;
-  GtkWidget *image3188;
+  GtkWidget *image3265;
   GtkWidget *menu_count_words1;
   GtkWidget *load_tags1;
   GtkWidget *menu_help1;
   GtkWidget *menu_help1_menu;
   GtkWidget *help1;
-  GtkWidget *image3189;
+  GtkWidget *image3266;
   GtkWidget *website1;
   GtkWidget *keyboard_shortcuts1;
   GtkWidget *debug_messages1;
@@ -307,9 +318,9 @@ create_window1 (void)
   gtk_widget_show (menu_new_with_template1);
   gtk_container_add (GTK_CONTAINER (file1_menu), menu_new_with_template1);
 
-  image3165 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3165);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_new_with_template1), image3165);
+  image3242 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3242);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_new_with_template1), image3242);
 
   separator12 = gtk_separator_menu_item_new ();
   gtk_widget_show (separator12);
@@ -345,25 +356,25 @@ create_window1 (void)
   gtk_widget_show (menu_save_all1);
   gtk_container_add (GTK_CONTAINER (file1_menu), menu_save_all1);
 
-  image3166 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3166);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_all1), image3166);
+  image3243 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3243);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_all1), image3243);
 
   menu_reload1 = gtk_image_menu_item_new_with_mnemonic (_("_Reload"));
   gtk_widget_show (menu_reload1);
   gtk_container_add (GTK_CONTAINER (file1_menu), menu_reload1);
 
-  image3167 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3167);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload1), image3167);
+  image3244 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3244);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload1), image3244);
 
   menu_reload_as1 = gtk_image_menu_item_new_with_mnemonic (_("R_eload As"));
   gtk_widget_show (menu_reload_as1);
   gtk_container_add (GTK_CONTAINER (file1_menu), menu_reload_as1);
 
-  image3168 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3168);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_as1), image3168);
+  image3245 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3245);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_as1), image3245);
 
   menu_reload_as1_menu = gtk_menu_new ();
   gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_reload_as1), menu_reload_as1_menu);
@@ -406,17 +417,17 @@ create_window1 (void)
   gtk_widget_show (close_other_documents1);
   gtk_container_add (GTK_CONTAINER (file1_menu), close_other_documents1);
 
-  image3169 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3169);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (close_other_documents1), image3169);
+  image3246 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3246);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (close_other_documents1), image3246);
 
   menu_close_all1 = gtk_image_menu_item_new_with_mnemonic (_("C_lose All"));
   gtk_widget_show (menu_close_all1);
   gtk_container_add (GTK_CONTAINER (file1_menu), menu_close_all1);
 
-  image3170 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3170);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_close_all1), image3170);
+  image3247 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3247);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_close_all1), image3247);
 
   menu_separatormenuitem1 = gtk_separator_menu_item_new ();
   gtk_widget_show (menu_separatormenuitem1);
@@ -522,17 +533,17 @@ create_window1 (void)
   gtk_widget_show (menu_increase_indent1);
   gtk_container_add (GTK_CONTAINER (menu_format1_menu), menu_increase_indent1);
 
-  image3171 = gtk_image_new_from_stock ("gtk-indent", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3171);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_increase_indent1), image3171);
+  image3248 = gtk_image_new_from_stock ("gtk-indent", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3248);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_increase_indent1), image3248);
 
   menu_decrease_indent1 = gtk_image_menu_item_new_with_mnemonic (_("_Decrease Indent"));
   gtk_widget_show (menu_decrease_indent1);
   gtk_container_add (GTK_CONTAINER (menu_format1_menu), menu_decrease_indent1);
 
-  image3172 = gtk_image_new_from_stock ("gtk-unindent", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3172);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_decrease_indent1), image3172);
+  image3249 = gtk_image_new_from_stock ("gtk-unindent", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3249);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_decrease_indent1), image3249);
 
   smart_line_indent1 = gtk_menu_item_new_with_mnemonic (_("_Smart Line Indent"));
   gtk_widget_show (smart_line_indent1);
@@ -564,17 +575,17 @@ create_window1 (void)
   gtk_widget_show (cut_current_line_s_1);
   gtk_container_add (GTK_CONTAINER (commands2_menu), cut_current_line_s_1);
 
-  image3173 = gtk_image_new_from_stock ("gtk-cut", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3173);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (cut_current_line_s_1), image3173);
+  image3250 = gtk_image_new_from_stock ("gtk-cut", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3250);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (cut_current_line_s_1), image3250);
 
   copy_current_line_s_1 = gtk_image_menu_item_new_with_mnemonic (_("_Copy Current Line(s)"));
   gtk_widget_show (copy_current_line_s_1);
   gtk_container_add (GTK_CONTAINER (commands2_menu), copy_current_line_s_1);
 
-  image3174 = gtk_image_new_from_stock ("gtk-copy", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3174);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (copy_current_line_s_1), image3174);
+  image3251 = gtk_image_new_from_stock ("gtk-copy", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3251);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (copy_current_line_s_1), image3251);
 
   delete_current_line_s_1 = gtk_menu_item_new_with_mnemonic (_("_Delete Current Line(s)"));
   gtk_widget_show (delete_current_line_s_1);
@@ -637,9 +648,9 @@ create_window1 (void)
   gtk_widget_show (add_comments1);
   gtk_container_add (GTK_CONTAINER (edit1_menu), add_comments1);
 
-  image3175 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3175);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_comments1), image3175);
+  image3252 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3252);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_comments1), image3252);
 
   add_comments1_menu = gtk_menu_new ();
   gtk_menu_item_set_submenu (GTK_MENU_ITEM (add_comments1), add_comments1_menu);
@@ -672,9 +683,9 @@ create_window1 (void)
   gtk_widget_show (insert_date1);
   gtk_container_add (GTK_CONTAINER (edit1_menu), insert_date1);
 
-  image3176 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3176);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_date1), image3176);
+  image3253 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3253);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_date1), image3253);
 
   insert_date1_menu = gtk_menu_new ();
   gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_date1), insert_date1_menu);
@@ -686,9 +697,9 @@ create_window1 (void)
   gtk_widget_show (insert_include2);
   gtk_container_add (GTK_CONTAINER (edit1_menu), insert_include2);
 
-  image3177 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3177);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include2), image3177);
+  image3254 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3254);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include2), image3254);
 
   insert_include2_menu = gtk_menu_new ();
   gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_include2), insert_include2_menu);
@@ -705,17 +716,17 @@ create_window1 (void)
   gtk_widget_show (preferences1);
   gtk_container_add (GTK_CONTAINER (edit1_menu), preferences1);
 
-  image3178 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3178);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (preferences1), image3178);
+  image3255 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3255);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (preferences1), image3255);
 
   plugin_preferences1 = gtk_image_menu_item_new_with_mnemonic (_("P_lugin Preferences"));
   gtk_widget_show (plugin_preferences1);
   gtk_container_add (GTK_CONTAINER (edit1_menu), plugin_preferences1);
 
-  image3179 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3179);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (plugin_preferences1), image3179);
+  image3256 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3256);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (plugin_preferences1), image3256);
 
   search1 = gtk_menu_item_new_with_mnemonic (_("_Search"));
   gtk_widget_show (search1);
@@ -744,9 +755,9 @@ create_window1 (void)
   gtk_widget_show (replace1);
   gtk_container_add (GTK_CONTAINER (search1_menu), replace1);
 
-  image3180 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3180);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (replace1), image3180);
+  image3257 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3257);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (replace1), image3257);
 
   separator33 = gtk_separator_menu_item_new ();
   gtk_widget_show (separator33);
@@ -783,9 +794,9 @@ create_window1 (void)
   gtk_widget_show (go_to_line1);
   gtk_container_add (GTK_CONTAINER (search1_menu), go_to_line1);
 
-  image3181 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3181);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line1), image3181);
+  image3258 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3258);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line1), image3258);
 
   menu_view1 = gtk_menu_item_new_with_mnemonic (_("_View"));
   gtk_widget_show (menu_view1);
@@ -798,9 +809,9 @@ create_window1 (void)
   gtk_widget_show (menu_change_font1);
   gtk_container_add (GTK_CONTAINER (menu_view1_menu), menu_change_font1);
 
-  image3182 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3182);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_change_font1), image3182);
+  image3259 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3259);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_change_font1), image3259);
 
   menu_separator4 = gtk_separator_menu_item_new ();
   gtk_widget_show (menu_separator4);
@@ -922,6 +933,61 @@ create_window1 (void)
   gtk_container_add (GTK_CONTAINER (indent_type1_menu), tabs_and_spaces1);
   gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (tabs_and_spaces1), TRUE);
 
+  indent_width1 = gtk_menu_item_new_with_mnemonic (_("Indent Widt_h"));
+  gtk_widget_show (indent_width1);
+  gtk_container_add (GTK_CONTAINER (menu_document1_menu), indent_width1);
+
+  indent_width1_menu = gtk_menu_new ();
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (indent_width1), indent_width1_menu);
+
+  indent_width_1 = gtk_radio_menu_item_new_with_mnemonic (indent_width_1_group, _("_1"));
+  indent_width_1_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (indent_width_1));
+  gtk_widget_show (indent_width_1);
+  gtk_container_add (GTK_CONTAINER (indent_width1_menu), indent_width_1);
+  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (indent_width_1), TRUE);
+
+  indent_width_2 = gtk_radio_menu_item_new_with_mnemonic (indent_width_1_group, _("_2"));
+  indent_width_1_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (indent_width_2));
+  gtk_widget_show (indent_width_2);
+  gtk_container_add (GTK_CONTAINER (indent_width1_menu), indent_width_2);
+  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (indent_width_2), TRUE);
+
+  indent_width_3 = gtk_radio_menu_item_new_with_mnemonic (indent_width_1_group, _("_3"));
+  indent_width_1_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (indent_width_3));
+  gtk_widget_show (indent_width_3);
+  gtk_container_add (GTK_CONTAINER (indent_width1_menu), indent_width_3);
+  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (indent_width_3), TRUE);
+
+  indent_width_4 = gtk_radio_menu_item_new_with_mnemonic (indent_width_1_group, _("_4"));
+  indent_width_1_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (indent_width_4));
+  gtk_widget_show (indent_width_4);
+  gtk_container_add (GTK_CONTAINER (indent_width1_menu), indent_width_4);
+  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (indent_width_4), TRUE);
+
+  indent_width_5 = gtk_radio_menu_item_new_with_mnemonic (indent_width_1_group, _("_5"));
+  indent_width_1_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (indent_width_5));
+  gtk_widget_show (indent_width_5);
+  gtk_container_add (GTK_CONTAINER (indent_width1_menu), indent_width_5);
+  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (indent_width_5), TRUE);
+
+  indent_width_6 = gtk_radio_menu_item_new_with_mnemonic (indent_width_1_group, _("_6"));
+  indent_width_1_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (indent_width_6));
+  gtk_widget_show (indent_width_6);
+  gtk_container_add (GTK_CONTAINER (indent_width1_menu), indent_width_6);
+  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (indent_width_6), TRUE);
+
+  indent_width_7 = gtk_radio_menu_item_new_with_mnemonic (indent_width_1_group, _("_7"));
+  indent_width_1_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (indent_width_7));
+  gtk_widget_show (indent_width_7);
+  gtk_container_add (GTK_CONTAINER (indent_width1_menu), indent_width_7);
+  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (indent_width_7), TRUE);
+
+  indent_width_8 = gtk_radio_menu_item_new_with_mnemonic (indent_width_1_group, _("_8"));
+  indent_width_1_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (indent_width_8));
+  gtk_widget_show (indent_width_8);
+  gtk_container_add (GTK_CONTAINER (indent_width1_menu), indent_width_8);
+  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (indent_width_8), TRUE);
+
   separator45 = gtk_separator_menu_item_new ();
   gtk_widget_show (separator45);
   gtk_container_add (GTK_CONTAINER (menu_document1_menu), separator45);
@@ -1039,17 +1105,17 @@ create_window1 (void)
   gtk_widget_show (project_new1);
   gtk_container_add (GTK_CONTAINER (menu_project1_menu), project_new1);
 
-  image3183 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3183);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_new1), image3183);
+  image3260 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3260);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_new1), image3260);
 
   project_open1 = gtk_image_menu_item_new_with_mnemonic (_("_Open"));
   gtk_widget_show (project_open1);
   gtk_container_add (GTK_CONTAINER (menu_project1_menu), project_open1);
 
-  image3184 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3184);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_open1), image3184);
+  image3261 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3261);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_open1), image3261);
 
   recent_projects1 = gtk_menu_item_new_with_mnemonic (_("_Recent Projects"));
   gtk_widget_show (recent_projects1);
@@ -1059,9 +1125,9 @@ create_window1 (void)
   gtk_widget_show (project_close1);
   gtk_container_add (GTK_CONTAINER (menu_project1_menu), project_close1);
 
-  image3185 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3185);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_close1), image3185);
+  image3262 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3262);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_close1), image3262);
 
   separator34 = gtk_separator_menu_item_new ();
   gtk_widget_show (separator34);
@@ -1087,17 +1153,17 @@ create_window1 (void)
   gtk_widget_show (menu_reload_configuration1);
   gtk_container_add (GTK_CONTAINER (tools1_menu), menu_reload_configuration1);
 
-  image3186 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3186);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_configuration1), image3186);
+  image3263 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3263);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_configuration1), image3263);
 
   configuration_files1 = gtk_image_menu_item_new_with_mnemonic (_("C_onfiguration Files"));
   gtk_widget_show (configuration_files1);
   gtk_container_add (GTK_CONTAINER (tools1_menu), configuration_files1);
 
-  image3187 = gtk_image_new_from_stock ("gtk-file", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3187);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (configuration_files1), image3187);
+  image3264 = gtk_image_new_from_stock ("gtk-file", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3264);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (configuration_files1), image3264);
 
   separator47 = gtk_separator_menu_item_new ();
   gtk_widget_show (separator47);
@@ -1108,9 +1174,9 @@ create_window1 (void)
   gtk_widget_show (menu_choose_color1);
   gtk_container_add (GTK_CONTAINER (tools1_menu), menu_choose_color1);
 
-  image3188 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3188);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_choose_color1), image3188);
+  image3265 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3265);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_choose_color1), image3265);
 
   menu_count_words1 = gtk_menu_item_new_with_mnemonic (_("_Word Count"));
   gtk_widget_show (menu_count_words1);
@@ -1131,9 +1197,9 @@ create_window1 (void)
   gtk_widget_show (help1);
   gtk_container_add (GTK_CONTAINER (menu_help1_menu), help1);
 
-  image3189 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3189);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (help1), image3189);
+  image3266 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3266);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (help1), image3266);
 
   website1 = gtk_menu_item_new_with_mnemonic (_("_Website"));
   gtk_widget_show (website1);
@@ -1529,6 +1595,30 @@ create_window1 (void)
   g_signal_connect ((gpointer) tabs_and_spaces1, "activate",
                     G_CALLBACK (on_tabs_and_spaces1_activate),
                     NULL);
+  g_signal_connect ((gpointer) indent_width_1, "activate",
+                    G_CALLBACK (on_indent_width_activate),
+                    NULL);
+  g_signal_connect ((gpointer) indent_width_2, "activate",
+                    G_CALLBACK (on_indent_width_activate),
+                    NULL);
+  g_signal_connect ((gpointer) indent_width_3, "activate",
+                    G_CALLBACK (on_indent_width_activate),
+                    NULL);
+  g_signal_connect ((gpointer) indent_width_4, "activate",
+                    G_CALLBACK (on_indent_width_activate),
+                    NULL);
+  g_signal_connect ((gpointer) indent_width_5, "activate",
+                    G_CALLBACK (on_indent_width_activate),
+                    NULL);
+  g_signal_connect ((gpointer) indent_width_6, "activate",
+                    G_CALLBACK (on_indent_width_activate),
+                    NULL);
+  g_signal_connect ((gpointer) indent_width_7, "activate",
+                    G_CALLBACK (on_indent_width_activate),
+                    NULL);
+  g_signal_connect ((gpointer) indent_width_8, "activate",
+                    G_CALLBACK (on_indent_width_activate),
+                    NULL);
   g_signal_connect ((gpointer) set_file_readonly1, "toggled",
                     G_CALLBACK (on_set_file_readonly1_toggled),
                     NULL);
@@ -1633,7 +1723,7 @@ create_window1 (void)
   GLADE_HOOKUP_OBJECT (window1, file1_menu, "file1_menu");
   GLADE_HOOKUP_OBJECT (window1, menu_new1, "menu_new1");
   GLADE_HOOKUP_OBJECT (window1, menu_new_with_template1, "menu_new_with_template1");
-  GLADE_HOOKUP_OBJECT (window1, image3165, "image3165");
+  GLADE_HOOKUP_OBJECT (window1, image3242, "image3242");
   GLADE_HOOKUP_OBJECT (window1, separator12, "separator12");
   GLADE_HOOKUP_OBJECT (window1, menu_open1, "menu_open1");
   GLADE_HOOKUP_OBJECT (window1, menu_open_selected_file1, "menu_open_selected_file1");
@@ -1642,11 +1732,11 @@ create_window1 (void)
   GLADE_HOOKUP_OBJECT (window1, menu_save1, "menu_save1");
   GLADE_HOOKUP_OBJECT (window1, menu_save_as1, "menu_save_as1");
   GLADE_HOOKUP_OBJECT (window1, menu_save_all1, "menu_save_all1");
-  GLADE_HOOKUP_OBJECT (window1, image3166, "image3166");
+  GLADE_HOOKUP_OBJECT (window1, image3243, "image3243");
   GLADE_HOOKUP_OBJECT (window1, menu_reload1, "menu_reload1");
-  GLADE_HOOKUP_OBJECT (window1, image3167, "image3167");
+  GLADE_HOOKUP_OBJECT (window1, image3244, "image3244");
   GLADE_HOOKUP_OBJECT (window1, menu_reload_as1, "menu_reload_as1");
-  GLADE_HOOKUP_OBJECT (window1, image3168, "image3168");
+  GLADE_HOOKUP_OBJECT (window1, image3245, "image3245");
   GLADE_HOOKUP_OBJECT (window1, menu_reload_as1_menu, "menu_reload_as1_menu");
   GLADE_HOOKUP_OBJECT (window1, invisible7, "invisible7");
   GLADE_HOOKUP_OBJECT (window1, separator21, "separator21");
@@ -1657,9 +1747,9 @@ create_window1 (void)
   GLADE_HOOKUP_OBJECT (window1, separator14, "separator14");
   GLADE_HOOKUP_OBJECT (window1, menu_close1, "menu_close1");
   GLADE_HOOKUP_OBJECT (window1, close_other_documents1, "close_other_documents1");
-  GLADE_HOOKUP_OBJECT (window1, image3169, "image3169");
+  GLADE_HOOKUP_OBJECT (window1, image3246, "image3246");
   GLADE_HOOKUP_OBJECT (window1, menu_close_all1, "menu_close_all1");
-  GLADE_HOOKUP_OBJECT (window1, image3170, "image3170");
+  GLADE_HOOKUP_OBJECT (window1, image3247, "image3247");
   GLADE_HOOKUP_OBJECT (window1, menu_separatormenuitem1, "menu_separatormenuitem1");
   GLADE_HOOKUP_OBJECT (window1, menu_quit1, "menu_quit1");
   GLADE_HOOKUP_OBJECT (window1, edit1, "edit1");
@@ -1685,9 +1775,9 @@ create_window1 (void)
   GLADE_HOOKUP_OBJECT (window1, menu_toggle_line_commentation1, "menu_toggle_line_commentation1");
   GLADE_HOOKUP_OBJECT (window1, separator29, "separator29");
   GLADE_HOOKUP_OBJECT (window1, menu_increase_indent1, "menu_increase_indent1");
-  GLADE_HOOKUP_OBJECT (window1, image3171, "image3171");
+  GLADE_HOOKUP_OBJECT (window1, image3248, "image3248");
   GLADE_HOOKUP_OBJECT (window1, menu_decrease_indent1, "menu_decrease_indent1");
-  GLADE_HOOKUP_OBJECT (window1, image3172, "image3172");
+  GLADE_HOOKUP_OBJECT (window1, image3249, "image3249");
   GLADE_HOOKUP_OBJECT (window1, smart_line_indent1, "smart_line_indent1");
   GLADE_HOOKUP_OBJECT (window1, separator37, "separator37");
   GLADE_HOOKUP_OBJECT (window1, send_selection_to2, "send_selection_to2");
@@ -1696,9 +1786,9 @@ create_window1 (void)
   GLADE_HOOKUP_OBJECT (window1, commands2, "commands2");
   GLADE_HOOKUP_OBJECT (window1, commands2_menu, "commands2_menu");
   GLADE_HOOKUP_OBJECT (window1, cut_current_line_s_1, "cut_current_line_s_1");
-  GLADE_HOOKUP_OBJECT (window1, image3173, "image3173");
+  GLADE_HOOKUP_OBJECT (window1, image3250, "image3250");
   GLADE_HOOKUP_OBJECT (window1, copy_current_line_s_1, "copy_current_line_s_1");
-  GLADE_HOOKUP_OBJECT (window1, image3174, "image3174");
+  GLADE_HOOKUP_OBJECT (window1, image3251, "image3251");
   GLADE_HOOKUP_OBJECT (window1, delete_current_line_s_1, "delete_current_line_s_1");
   GLADE_HOOKUP_OBJECT (window1, duplicate_line_or_selection1, "duplicate_line_or_selection1");
   GLADE_HOOKUP_OBJECT (window1, separator49, "separator49");
@@ -1713,7 +1803,7 @@ create_window1 (void)
   GLADE_HOOKUP_OBJECT (window1, send_selection_to_vte1, "send_selection_to_vte1");
   GLADE_HOOKUP_OBJECT (window1, separator18, "separator18");
   GLADE_HOOKUP_OBJECT (window1, add_comments1, "add_comments1");
-  GLADE_HOOKUP_OBJECT (window1, image3175, "image3175");
+  GLADE_HOOKUP_OBJECT (window1, image3252, "image3252");
   GLADE_HOOKUP_OBJECT (window1, add_comments1_menu, "add_comments1_menu");
   GLADE_HOOKUP_OBJECT (window1, menu_add_changelog_entry1, "menu_add_changelog_entry1");
   GLADE_HOOKUP_OBJECT (window1, insert_file_header1, "insert_file_header1");
@@ -1722,18 +1812,18 @@ create_window1 (void)
   GLADE_HOOKUP_OBJECT (window1, insert_gpl_notice2, "insert_gpl_notice2");
   GLADE_HOOKUP_OBJECT (window1, insert_bsd_license_notice2, "insert_bsd_license_notice2");
   GLADE_HOOKUP_OBJECT (window1, insert_date1, "insert_date1");
-  GLADE_HOOKUP_OBJECT (window1, image3176, "image3176");
+  GLADE_HOOKUP_OBJECT (window1, image3253, "image3253");
   GLADE_HOOKUP_OBJECT (window1, insert_date1_menu, "insert_date1_menu");
   GLADE_HOOKUP_OBJECT (window1, invisible8, "invisible8");
   GLADE_HOOKUP_OBJECT (window1, insert_include2, "insert_include2");
-  GLADE_HOOKUP_OBJECT (window1, image3177, "image3177");
+  GLADE_HOOKUP_OBJECT (window1, image3254, "image3254");
   GLADE_HOOKUP_OBJECT (window1, insert_include2_menu, "insert_include2_menu");
   GLADE_HOOKUP_OBJECT (window1, invisible4, "invisible4");
   GLADE_HOOKUP_OBJECT (window1, separator9, "separator9");
   GLADE_HOOKUP_OBJECT (window1, preferences1, "preferences1");
-  GLADE_HOOKUP_OBJECT (window1, image3178, "image3178");
+  GLADE_HOOKUP_OBJECT (window1, image3255, "image3255");
   GLADE_HOOKUP_OBJECT (window1, plugin_preferences1, "plugin_preferences1");
-  GLADE_HOOKUP_OBJECT (window1, image3179, "image3179");
+  GLADE_HOOKUP_OBJECT (window1, image3256, "image3256");
   GLADE_HOOKUP_OBJECT (window1, search1, "search1");
   GLADE_HOOKUP_OBJECT (window1, search1_menu, "search1_menu");
   GLADE_HOOKUP_OBJECT (window1, find1, "find1");
@@ -1741,7 +1831,7 @@ create_window1 (void)
   GLADE_HOOKUP_OBJECT (window1, find_previous1, "find_previous1");
   GLADE_HOOKUP_OBJECT (window1, find_in_files1, "find_in_files1");
   GLADE_HOOKUP_OBJECT (window1, replace1, "replace1");
-  GLADE_HOOKUP_OBJECT (window1, image3180, "image3180");
+  GLADE_HOOKUP_OBJECT (window1, image3257, "image3257");
   GLADE_HOOKUP_OBJECT (window1, separator33, "separator33");
   GLADE_HOOKUP_OBJECT (window1, find_nextsel1, "find_nextsel1");
   GLADE_HOOKUP_OBJECT (window1, find_prevsel1, "find_prevsel1");
@@ -1750,11 +1840,11 @@ create_window1 (void)
   GLADE_HOOKUP_OBJECT (window1, previous_message1, "previous_message1");
   GLADE_HOOKUP_OBJECT (window1, separator32, "separator32");
   GLADE_HOOKUP_OBJECT (window1, go_to_line1, "go_to_line1");
-  GLADE_HOOKUP_OBJECT (window1, image3181, "image3181");
+  GLADE_HOOKUP_OBJECT (window1, image3258, "image3258");
   GLADE_HOOKUP_OBJECT (window1, menu_view1, "menu_view1");
   GLADE_HOOKUP_OBJECT (window1, menu_view1_menu, "menu_view1_menu");
   GLADE_HOOKUP_OBJECT (window1, menu_change_font1, "menu_change_font1");
-  GLADE_HOOKUP_OBJECT (window1, image3182, "image3182");
+  GLADE_HOOKUP_OBJECT (window1, image3259, "image3259");
   GLADE_HOOKUP_OBJECT (window1, menu_separator4, "menu_separator4");
   GLADE_HOOKUP_OBJECT (window1, menu_toggle_all_additional_widgets1, "menu_toggle_all_additional_widgets1");
   GLADE_HOOKUP_OBJECT (window1, menu_fullscreen1, "menu_fullscreen1");
@@ -1782,6 +1872,16 @@ create_window1 (void)
   GLADE_HOOKUP_OBJECT (window1, tabs1, "tabs1");
   GLADE_HOOKUP_OBJECT (window1, spaces1, "spaces1");
   GLADE_HOOKUP_OBJECT (window1, tabs_and_spaces1, "tabs_and_spaces1");
+  GLADE_HOOKUP_OBJECT (window1, indent_width1, "indent_width1");
+  GLADE_HOOKUP_OBJECT (window1, indent_width1_menu, "indent_width1_menu");
+  GLADE_HOOKUP_OBJECT (window1, indent_width_1, "indent_width_1");
+  GLADE_HOOKUP_OBJECT (window1, indent_width_2, "indent_width_2");
+  GLADE_HOOKUP_OBJECT (window1, indent_width_3, "indent_width_3");
+  GLADE_HOOKUP_OBJECT (window1, indent_width_4, "indent_width_4");
+  GLADE_HOOKUP_OBJECT (window1, indent_width_5, "indent_width_5");
+  GLADE_HOOKUP_OBJECT (window1, indent_width_6, "indent_width_6");
+  GLADE_HOOKUP_OBJECT (window1, indent_width_7, "indent_width_7");
+  GLADE_HOOKUP_OBJECT (window1, indent_width_8, "indent_width_8");
   GLADE_HOOKUP_OBJECT (window1, separator45, "separator45");
   GLADE_HOOKUP_OBJECT (window1, set_file_readonly1, "set_file_readonly1");
   GLADE_HOOKUP_OBJECT (window1, menu_write_unicode_bom1, "menu_write_unicode_bom1");
@@ -1810,30 +1910,30 @@ create_window1 (void)
   GLADE_HOOKUP_OBJECT (window1, menu_project1, "menu_project1");
   GLADE_HOOKUP_OBJECT (window1, menu_project1_menu, "menu_project1_menu");
   GLADE_HOOKUP_OBJECT (window1, project_new1, "project_new1");
-  GLADE_HOOKUP_OBJECT (window1, image3183, "image3183");
+  GLADE_HOOKUP_OBJECT (window1, image3260, "image3260");
   GLADE_HOOKUP_OBJECT (window1, project_open1, "project_open1");
-  GLADE_HOOKUP_OBJECT (window1, image3184, "image3184");
+  GLADE_HOOKUP_OBJECT (window1, image3261, "image3261");
   GLADE_HOOKUP_OBJECT (window1, recent_projects1, "recent_projects1");
   GLADE_HOOKUP_OBJECT (window1, project_close1, "project_close1");
-  GLADE_HOOKUP_OBJECT (window1, image3185, "image3185");
+  GLADE_HOOKUP_OBJECT (window1, image3262, "image3262");
   GLADE_HOOKUP_OBJECT (window1, separator34, "separator34");
   GLADE_HOOKUP_OBJECT (window1, project_properties1, "project_properties1");
   GLADE_HOOKUP_OBJECT (window1, menu_build1, "menu_build1");
   GLADE_HOOKUP_OBJECT (window1, tools1, "tools1");
   GLADE_HOOKUP_OBJECT (window1, tools1_menu, "tools1_menu");
   GLADE_HOOKUP_OBJECT (window1, menu_reload_configuration1, "menu_reload_configuration1");
-  GLADE_HOOKUP_OBJECT (window1, image3186, "image3186");
+  GLADE_HOOKUP_OBJECT (window1, image3263, "image3263");
   GLADE_HOOKUP_OBJECT (window1, configuration_files1, "configuration_files1");
-  GLADE_HOOKUP_OBJECT (window1, image3187, "image3187");
+  GLADE_HOOKUP_OBJECT (window1, image3264, "image3264");
   GLADE_HOOKUP_OBJECT (window1, separator47, "separator47");
   GLADE_HOOKUP_OBJECT (window1, menu_choose_color1, "menu_choose_color1");
-  GLADE_HOOKUP_OBJECT (window1, image3188, "image3188");
+  GLADE_HOOKUP_OBJECT (window1, image3265, "image3265");
   GLADE_HOOKUP_OBJECT (window1, menu_count_words1, "menu_count_words1");
   GLADE_HOOKUP_OBJECT (window1, load_tags1, "load_tags1");
   GLADE_HOOKUP_OBJECT (window1, menu_help1, "menu_help1");
   GLADE_HOOKUP_OBJECT (window1, menu_help1_menu, "menu_help1_menu");
   GLADE_HOOKUP_OBJECT (window1, help1, "help1");
-  GLADE_HOOKUP_OBJECT (window1, image3189, "image3189");
+  GLADE_HOOKUP_OBJECT (window1, image3266, "image3266");
   GLADE_HOOKUP_OBJECT (window1, website1, "website1");
   GLADE_HOOKUP_OBJECT (window1, keyboard_shortcuts1, "keyboard_shortcuts1");
   GLADE_HOOKUP_OBJECT (window1, debug_messages1, "debug_messages1");
diff --git a/src/keyfile.c b/src/keyfile.c
index e6d1273..d7b0a6f 100644
--- a/src/keyfile.c
+++ b/src/keyfile.c
@@ -1023,7 +1023,7 @@ static gboolean open_session_file(gchar **tmp, guint len)
 
 		if (doc)
 		{
-			editor_set_indent_type(doc->editor, indent_type);
+			editor_set_indent(doc->editor, indent_type, doc->editor->indent_width);
 			editor_set_line_wrapping(doc->editor, line_wrapping);
 			doc->editor->line_breaking = line_breaking;
 			doc->editor->auto_indent = auto_indent;
diff --git a/src/ui_utils.c b/src/ui_utils.c
index 2a02b05..cb97db7 100644
--- a/src/ui_utils.c
+++ b/src/ui_utils.c
@@ -882,6 +882,16 @@ void ui_document_show_hide(GeanyDocument *doc)
 	item = ui_lookup_widget(main_widgets.window, widget_name);
 	gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), TRUE);
 
+	if (iprefs->width >= 1 && iprefs->width <= 8)
+	{
+		gchar *name;
+
+		name = g_strdup_printf("indent_width_%d", iprefs->width);
+		item = ui_lookup_widget(main_widgets.window, name);
+		gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), TRUE);
+		g_free(name);
+	}
+
 	gtk_check_menu_item_set_active(
 			GTK_CHECK_MENU_ITEM(ui_lookup_widget(main_widgets.window, "set_file_readonly1")),
 			doc->readonly);
