Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
569 views
in Technique[技术] by (71.8m points)

coding style - How to get smart tabs ("indent with tabs, align with spaces") behavior in Xcode?

I used to use tabs for indentation and spaces for alignment. Like so (arrows show tabs and dots show spaces).

enter image description here

In QtCreator you can set such coding style in standard preferences. I can't find the way to achieve the same goal in Xcode. Could you please tell me if it is possible? May be there is a plugin for that?

UPDATE: Here is how it can be achieved in QtCreator: enter image description here

P.S. Please, don't try to persuade me that using spaces only/tabs only is better, otherwise this question will turn into another holywar :)

Once more about what I'm trying to achieve: Indent with tabs, align with spaces. Vim Tips Wiki.

UPDATE 2: I've just submitted an Apple Radar bug-report (enhancement) rdar://22285639. Here it is on the open radar.

UPDATE 3: I received an answer from Apple. My bug is a duplicate of rdar://8165023.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

In Xcode > Preferences (?,):

> Text Editing > Indentation

If I understand your question correctly, this should do it for you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...