We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [tabs]

Questions about the inserting/manipulating/displaying TAB characters in Emacs files. Do not use this tag for questions related to browser style "tabs".

Filter by
Sorted by
Tagged with
4
votes
1answer
2k views

Trouble adjusting tab-width

When I write Python code, I personally prefer indenting with 4 spaces instead of a tab. However, in my day job I work with a codebase that uses only tabs. When I open one of these files in emacs, ...
0
votes
1answer
210 views

How to Self Insert Tab When Editing String In go-mode?

The title contains the crux of my question. In go-mode, tabs and auto-indentation generally works well, except when I am editing strings. When inside of a string, I'd like the tab key to self-insert. ...
3
votes
1answer
119 views

How do I set a variable in all programming modes?

I'd like tab-width to be set to 2 in all programming modes. I use prelude (which might be one of the problems), but I have this in my custom.el (which is sort of the analogue to .emacs): (setq my-...
2
votes
2answers
588 views

Remove tabs from pasted text automatically?

I have emacs configured to refrain from inserting tabs for indentation purposes already. But this does not have any effect when I paste text containing a tab (from an external application, Google ...
1
vote
1answer
160 views

Consistent tab alignment

As an evil I choose to use tabs. I'm having trouble getting them to work like they do in other editors. I want displayed tabs aligned to 2 columns (with no exceptions). I have tab-width set to 2, ...
1
vote
1answer
61 views

Previous indentation is discarded on newline

Let's say I have the following code: void foo(){ ~ } I have marked point with ~. When I press enter the electric indentation works as normal but it doesn't keep the indentation for the previous ...
1
vote
1answer
2k views

How to detect tabs or spaces in Emacs

By default I want all indentation (when I hit the tab key) to be 2 spaces. However, when I am editing certain Python files (where I can not mix tabs and spaces) I would like to use whatever the ...
0
votes
1answer
253 views

Setup c-mode indentation, braces and tabs

I've been trying to setup cc-mode based files to behave in the way I want, but with so many varying opinions and suggested ways of doing things, I've not been able to get things just right. All I ...