In this question (https://stackoverflow.com/questions/15097501/can-uncrustify-be-prevented-from-modifying-certain-sections-of-code) i learned that i can use *INDENT-OFF* to exclude uncrustify action on certain parts of code.
Unfortunately i was not able to find this information anywhere else.
Does anybody know where i can look this up? Are there other comments which control uncrustifiy behaviour?
The *INDENT-ON* and *INDENT-OFF* are defined in the uncrustify_types.h file in the source code
See also Ben Gardner's comment: https://sourceforge.net/p/uncrustify/bugs/343/#0394
Related
So I'm new to spacemacs, and am having a problem with my python tabs. I found this stackoverflow solution to the issue. The scenario he explained is exactly the problem Im having with my python layer, but I don't know how to apply the solution he gave, namely:
If that is the case, you can fix the problem by running
(setq-default python-indent-offset 4)
Where/how exactly do I run the command "(setq-default python-indent-offset 4)"? Do I put it in my spacemacs config? Or some where else?
Thanks!
I found the answer to this question as I was typing it up by way of the related questions (here).
Commands such as these go inside of your init.el config, which is accessed by typing SPC-f e i
Hope this helps all the spacemacs newbies out there. (Feel free anyone to correct me if i'm wrong or don't fully understand)
Edit 1
Just some background info for my answer for those who are curious. The command
(setq-default python-indent-offset 4)
is actually from the lisp family of programming languages. So spacemacs basically uses source code controlled configuration. It could probably have similarly went inside your spacemacs config as well (SPC f e d), although I believe init.el is the proper place for this type of setting
I have my own logger that includes part of a stack trace for each logging statement like this:
2015-03-27 23:12:56,582 INFO something something something (Abc.java:123) (Abc.java:201) (Test.java:99)
Eclipse would turn each parenthesis file/line combination into a clickable link. But IDEA only makes the last one clickable.
I can't find an option to turn the other ones into links. If it there is not out-of-the-box option to enable this behavior, is it feasible to easily implement a plug in for it? Perhaps someone knows of an existing plugin? I can imagine that for some languages some people had the need to make it clickable. I'm seeing the ConsoleURL plugin, which could be a starting point.
What's the easiest route to this?
I found an answer to my own question. I found a plugin called "Awesome Console", that's in the included list in IDEA. It automagically made the other file:line combinations clickable.
I am currently working on a program, that uses images and need to add the module mentioned in this question
(require 2htdp/image)
I come up the the error
I see a require of the module 2htdp/image,
but I don't yet know what this module is.
How do I solve this? I have no idea how to make WeScheme know what a module is. Thanks in advance.
2htdp/image is part of the How to Design Programs teachpacks that come with Racket, if you need it you should use Racket as your Scheme interpreter.
From the error message, it looks like you meant to write 2htdp/image, but you wrote htdp2/image instead. Note the different location of the 2.
I'd like to be able to Alt-Click an instance variable (or a method) as part of the program i created and read what it's purpose is.
The fact that Xcode is telling me the class variable is declared at - is nice but not enough. In this case i'd like to see custom text i typed to describe what an asset really is. Additionally type of the ivar would also be useful to know.
How can this be done? In this case, i wonder what exactly did i mean by assets
I specifically wonder if this information can be viewed from inside Xcode, similar to how Eclipse shows JavaDoc content.
You would need to create a documentation set for your project and install it in Xcode. appledoc can help you with this. This is a command-line tool that can generate documentation in Apple's style from specially formatted comments in your headers. You can also integrate this into your build process with a run script build phase, so that documentation is always up-to-date.
For small projects, it's usually not worth the effort though and you're probably better off just adding comments to your header files and jumping there with Cmd-click (Ctrl+Cmd+left-arrow to go back to where you came from).
You'll probably want to take a look at Apple's documentation on Documentation Sets as well as their article on generating doc sets using Doxygen. The latter is based on Xcode 3.x, so how relevant it is is somewhat questionable, but it'd be a good idea to take a look nonetheless.
That said, if you decide to use Doxygen (alternatives like HeaderDoc can be used for documentation, but I'm not sure what's available to you as far as creating doc sets goes), it looks like the main point is you'll want to throw GENERATE_DOCSET=YES into your Doxyfile (or whatever you decide to call it). After that, you'd just throw the results into ~/Library/Developer/Shared/Documentation/DocSets (according to Doxygen's documentation). I don't know whether this works in Xcode 4.x - it's worth a shot though, and it'd be nice to hear back on it.
Note: most of this was based on this answer by Barry Wark. Figure credit is due there, since I wouldn't have bothered looking into this were it not for his answer.
I've been playing with Sublime Text 2 the last few days and was wondering if anyone out there has had any success getting Cocoa method completions working yet? Is there a plugin (or in-progress project to create one) out there?
Any general comments on using Objective-C in Chocolat or Sublime Text 2 would also be welcome.
There is an in-progress Sublime Text package that connects to clang to get autocomplete data called SublimeClang I've not managed to successfully get it to work totally with Cocoa/UIKit Dev, but here's a screenshot
and my options, that are a start
In MacVim I use a plugin called Cocoa.vim which haves useful python scripts that generates a classes and methods files for autocompletion. I didn't try so much with ST2, but may be is posible to create a sublime-package or sublime-completions file with all this data.
For the moment, I only create a sublime-completions file with some snippets. If I find a way to make this work, I will tell you.
I let my SublimeClang configuration options if helps anybody. I've already some of the autocompletions working:
"options":[
"-Wall",
"-isystem", "/Applications/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/include/",
"-isystem", "/Applications/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/include/c++/4.2.1/",
"-I/usr/lib/clang/3.1/include/**",
"-I", "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/include/",
"-arch","armv7",
"-isysroot", "/Applications/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk",
"-D__IPHONE_OS_VERSION_MIN_REQUIRED=50000",
"-ferror-limit=0"
]
Answering my own question here. A quick visit to the Sublime forums didn't turn up any leads nor did Google. It looks as though method completions for Objective-C aren't currently part of the default install nor available via 3rd-party quite yet.
This user http://b.rthr.me/wp/?p=368 claims to have gotten SublimeClang working. I may report back myself once I try it...