Work in emacs and textmate

I have a Ubuntu Linux and Macbook development machine that I am working on. On my laptop, I use Textmate to develop PHP on the go. The problem is that when I return to my Ubuntu dev machine and open my files in emacs, formatting is disabled. I think it looks like a single tab in Textmate for some reason has multiple tabs in emacs. Therefore, my code occupies the entire screen in emacs, but only on the left side of the screen in Textmate. Does anyone have experience with this?

+3
source share
2 answers

As the bears eat, you said it looks like the two editors have different opinions about how wide the tab is. By default, the tab character ( \t) is 8 spaces in emacs. Maybe TextMate shows the tab as 4 spaces in your configuration?

You can set the tab width in emacs (up to 4 spaces in this case) by adding the following to your .emacs:

(setq-default tab-width 4)

I don't know anything about setting up TextMate.

Alternatively, you can configure emacs to use spaces rather than tabs for indentation:

(setq-default indent-tabs-mode nil)

Again, I do not know how you do this with TextMate.

+4
source

, . , 4 , , Emacs Textmate 4 .

+3

Source: https://habr.com/ru/post/1730106/


All Articles