Some programs require tab characters to work, e.g. make requires tabs in Makefiles. If gedit is configured to replace tabs with spaces, it's painful to change the settings every time or copy a character from another document.

I'm using 3.10.4 on Ubuntu 15.04.


Install a plugin for gedit

  1. Clone the repository git://git.gitano.org.uk/personal/liw/makefiletab3.git

    mkdir -p ~/src
    cd src
    git clone git://git.gitano.org.uk/personal/liw/makefiletab3.git
  2. Create the plugin folder for gedit

    mkdir -p ~/.local/share/gedit/plugins
  3. Create a symbolic link

    ln -s ~/src/makefiletab3 ~/.local/share/gedit/plugins/makefiletab3
  4. Change the Python version in makefiletab3.plugin

    Open the file

    nano ~/.local/share/gedit/plugins/makefiletab3/makefiletab3.plugin

    and replace



  5. Restart gedit and activate the plugin

    enter image description here


You can insert a literal Tab character in gedit by using the GNOME Unicode input mode:

Ctrl + Shift + U

and then enter 9 followed by Enter. The horizontal tab character is Unicode code point U+0009. This will insert a tab regardless of your preferences to expand tabs or not.


You can create shortcuts to quickly change this setting:

gsettings set org.gnome.gedit.preferences.editor insert-spaces false
  • 1
    Good idea. I Would remove the hint that it's possible to use another program because people might see a reason to not upvote because the title indicates that the question is about gedit. – Karl Richter Sep 2 '15 at 9:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.