indentation

Is it possible to change the way Xcode indents comment blocks?

烈酒焚心 提交于 2019-12-01 17:27:36
问题 By default, Xcode automatically indents multiple lines of code within C-style comment blocks by one space: /* this is a comment block line 1 line 2 */ Is it possible to modify this behaviour? I would prefer to have no indentation within comment blocks. 回答1: This is not a complete answer, but Xcode has code formatting options under the key XCCodeSenseFormattingOptions. You can set the options via command line or by editing the plist: defaults write com.apple.Xcode XCCodeSenseFormattingOptions

Is it possible to change the way Xcode indents comment blocks?

时光怂恿深爱的人放手 提交于 2019-12-01 17:06:31
By default, Xcode automatically indents multiple lines of code within C-style comment blocks by one space: /* this is a comment block line 1 line 2 */ Is it possible to modify this behaviour? I would prefer to have no indentation within comment blocks. This is not a complete answer, but Xcode has code formatting options under the key XCCodeSenseFormattingOptions. You can set the options via command line or by editing the plist: defaults write com.apple.Xcode XCCodeSenseFormattingOptions -dict PreExpressionsSpacing "" PreCommaSpacing " " Unfortunately, I cannot find any setting for the one

atom editor indentation error with Python

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 15:34:24
问题 I am new to atom, so I opened my existing code using atom and modified few lines, then when I tried running the code with python, I get the following error: IndentationError: unindent does not match any outer indentation level I realized that Atom editor does indent my code differently to what I had. refer to the attached picture below showing the different indentation styles. line 1300 is the old indentation and 1301 is the one created by Atom How can I fix this without modifying my 1000+

Setting specific column tab stops in Vim

核能气质少年 提交于 2019-12-01 14:33:03
问题 I am reasonably familiar with Vim's option for tabstop , softtabstop , shiftwidth , expandtabs , etc. However, I'm wondering if there is a way in Vim to set specific column tab stops. I need tab stops in the following columns: 7, 11, 14, 17, ... every 3 after that. Thanks in advance.` 回答1: I found this thread http://vim.1045645.n5.nabble.com/Arbitrary-tab-stops-td1211888.html. Seems like that feature exists for a while as a patch. + *'vartabstop'* *'vts'* + 'vartabstop' 'vts' string (default

indent XML text with Transformer

纵饮孤独 提交于 2019-12-01 12:10:20
I'm writing an XML file with the following code: Source source = new DOMSource(rootElement); Result result = new StreamResult(xmlFile); Transformer transformer = TransformerFactory.newInstance().newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.transform(source, result); and this is the output file: <?xml version="1.0" encoding="UTF-8"?> <feature-sequences> <sequence> <initial-frame>0</initial-frame> <points> <point> <x>274.0</x> <y>316.0</y> </point> ... I want this file to be indented, for example: <?xml version="1.0" encoding="UTF-8"?> <feature-sequences

indent XML text with Transformer

删除回忆录丶 提交于 2019-12-01 11:40:14
问题 I'm writing an XML file with the following code: Source source = new DOMSource(rootElement); Result result = new StreamResult(xmlFile); Transformer transformer = TransformerFactory.newInstance().newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.transform(source, result); and this is the output file: <?xml version="1.0" encoding="UTF-8"?> <feature-sequences> <sequence> <initial-frame>0</initial-frame> <points> <point> <x>274.0</x> <y>316.0</y> </point> ...

How to change color of indent guide option in sublime text3?

时光总嘲笑我的痴心妄想 提交于 2019-12-01 11:27:14
问题 How to change indent guide color. 回答1: You need to edit the color scheme file for the color scheme you are using, and find <key>activeGuide</key> and/or <key>guide</key> and change the hex color value in the <string> node below it to the value of the color you desire. See How do I edit the Solarized (Light) theme in Sublime Text 3 for details on how to make custom changes to color schemes. 来源: https://stackoverflow.com/questions/33952462/how-to-change-color-of-indent-guide-option-in-sublime

Need tool to format html (indent, add whitespace)

 ̄綄美尐妖づ 提交于 2019-12-01 08:41:57
问题 I am working on a .net project that generates html. When the html string is generated, the is no whitespace or indenting. This makes understanding the generated html difficult. Is there a tool that will take my string of generated html and format it so that it looks nice? 回答1: If you're generating the HTML yourself, it should be valid XML. Therefore, you can use the XDocument class to format it. You can build the HTML inside an XDocument , then call ToString() , which will automatically

Indentation of IF-ELSE block in python

喜你入骨 提交于 2019-12-01 08:24:54
Hi I am python newbie and I am working on NLP using python. I am having a error in writing if-else block in python. When I am writing only if block at that time it is working fine: if xyzzy.endswith('l'): print xyzzy after entering colon I am pressing enter and it is automatically taking me to the correct indentation. but when I am trying to add else block to it after pressing "Enter" key after print statement, it is considering it to be statement of IF block only so it is giving me incorrect indentation as I want to else block after, while when I am trying to write else block my self it is

Indent preprocessor directives as C code in emacs

a 夏天 提交于 2019-12-01 06:31:49
Emacs, by default, does not indent pre-processor code. I know it has historical roots that are obsolete by now. However, having a code with a lot of #ifdef unindented is hard to read. So I would like to make emacs automatic indentation give me something like that: void myfunc() { int foo; #ifdef BAR printf(foo); #endif return foo; } Instead of what I get now : void myfunc() { int foo; #ifdef BAR printf(foo); #endif return foo; } Any leads on that issue you emacs hackers :) ? Ring Ø You can simply tell Emacs to add an offset to the pre-processor lines. Put the cursor ( point ) in a pre