Действительно ли возможно настроить стиль отступа XCode?

Для Xcode 6.4., Swift 1.2. :

   override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent)
    {
        super.touchesBegan(touches, withEvent: event)
        if let touch = touches.first as? UITouch
        {
            self.meaningTextview.resignFirstResponder()
        }
    }
20
задан MD XF 25 February 2017 в 07:47
поделиться

2 ответа

Документация Apple по XCode содержит полный список пользовательских настроек , многие из которых не имеют соответствующего пользовательского интерфейса. Однако я не вижу ничего, что связано с пространством имен, поэтому я думаю, что вам может не повезти.

Однако я подумал, что передам список предпочтений, если он будет полезен.

9
ответ дан 30 November 2019 в 00:23
поделиться

I bypass Xcode's indenting altogether, and have a user script that calls uncrustify on the currently displayed document.

#!/bin/sh
#echo -n "%%%{PBXSelection}%%%"
uncrustify -q -c ~/.uncrustify/sample.cfg -l oc+
#echo -n "%%%{PBXSelection}%%%"

Notes:

  • uncrustify must be in your PATH
  • you may need to adjust the location of your config file
  • if you want to have the new code selected in Xcode, uncomment the two echo statements (this can also be used to make a "Format Selection" script, rather than "Format All"

Script Settings:

  • Input:Entire Document
  • Directory: Home directory
  • Output: Replace Document Contents
  • Errors: display in alert
5
ответ дан 30 November 2019 в 00:23
поделиться
Другие вопросы по тегам:

Похожие вопросы: