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
0
votes
1answer
220 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
143 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-...
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, ...
2
votes
1answer
458 views

Emacs indent with tabs to 2 columns

Current with C, Javascript, Ruby, etc. when inserting a block with { <RETURN>, Emacs automatically indents the next line, but it does so with spaces. How do I change this behavior to tab ...
1
vote
1answer
241 views

Tabify: How does Emacs decides where to place tabs?

I understand how Emacs can remove tabs when using the untabify command (simply place a number of spaces in the place of the tabs) but what I can't understand is how does it place tabs in the place of ...
4
votes
0answers
542 views

How to make indent-region keep the TAB in Makefile buffer?

A very simple Makefile: all: gcc -o hello hello.c And I already set: (add-hook 'before-save-hook '(lambda () (delete-trailing-whitespace) ;; indent the whole buffer ...
5
votes
1answer
782 views

Make emacs format Java more consistently

When I open Java files originally created and edited in Emacs, the indentation shows up correctly, as in the image below: However, when I open the same file in Sublime Text, or any other editor ...
1
vote
1answer
173 views

Avoid extra tabs when generating Haskell code with ghc-mod

I'm following the Haskell Emacs Tutorial here and Emacs is annoying me with the way it adds some extra TAB characters. E.g. When I have this code: data ExampleType = ExampleType Int Int instance Eq ...
1
vote
1answer
720 views

Use spaces instead of tabs with use-package

This is more or less a question of putting the answer from Make web-mode always indent with spaces into the use-package declaration. I want to set tab indent to 2 spaces, and use the spaces ...
0
votes
1answer
624 views

Interpretation of tabs in text copied from Emacs and pasted in other programs/editors

When you set Emacs to recognize 4 spaces as 1 tab, then copy text from an Emacs buffer to another program, will the other program see 4 spaces or interpret it as 1 tab (which may correspond to a ...

1
2