How to Make Autoformat Ignore Comments in VS Code - dart

I love autoformat for Dart in VS Code, but I'd like it to ignore comments.
Here's what I want it to do:
But here's what happens when I save and autoformat does its thing:
I want it to autoformat the code as if the comment wasn't there. Is this possible?

Related

Atom - Nested snippets with tab stops error

I just started using Atom for LaTeX, and i use a lot of snippets to make my life easier.
Now, this often means that i will "nest" snippets, meaning i might use a snippet for a fraction ...
\frac{$1}{$2} $0
... and then insert another snippet inside of this one, e.g.
\sqrt{$1} $0
Now, i have an issue where the pointers "break" when nesting the snippets. So, when i insert the square root snippet into the fraction snippet, the function to tab into the next pointer continues for the squareroot snippet, but breaks for the fraction snippet.
Is there a way to circumvent this?
Thanks :)
As of December 2018... this has been an issue for a while now. Atom's snippets package doesn't do well when trying to insert a snippet with tab stops into another snippet with tab stops. You can view the issue here:
https://github.com/atom/snippets/issues/152
Also, there has been a pull request to fix the issue, but it hasn't been merged into the master branch... and it's quite old and because of that, the patch has some file conflicts so you can't just apply the patch without resolving those conflicts. You can view that pull request here:
https://github.com/atom/snippets/pull/192
This may be fixed in the future, but I wouldn't hold my breath. Your best bet for fixing this issue is to either fork the snippets package and create your own that works as expected or to try to use the code here to patch your local copy of the snippets package

Line control statement in swift

i am reading swift from apple docs and learning about statements. but couldnot find any information about the Line Control Statements.
According to the docs
A line control statement is used to specify a line number and filename
that can be different from the line number and filename of the source
code being compiled. Use a line control statement to change the source
code location used by Swift for diagnostic and debugging purposes.
A line control statement has the following forms:
#sourceLocation(file: filename, line: line number)
#sourceLocation()
My question is when should i use it? The docs lags an example about the topic.Any links or some hints would be helpful.
This isn't the sort of thing you'd ever need as a beginner, and you could probably go through an entire career without using it. It seems to be meant for use in tools that generate source code. See the comments in the original feature proposal for the complete story.
TL/DR: Don't worry about it, you'll never need it.

PascalScript: Looking for something like OnBeforeLineExec and OnAfterLineExec

I am writing a small IDE with Single Steps using the Debugdemo.
Now I need an Event before and after a line is executed.
I would like to disable my Editor while the current Line is executed.
I found the OnLine Event but did not find out in what cases it is fired or how I can use it.
Any hints are welcome.
Greetings Klaus
The OnLine event is meant to alter the interpretation of code.
It is not meant for debugging purposes.
If you want to do that use the BreakPoints in TPSScriptDebugger.
Put a breakpoint on the line and after the line.
Now you will get a signal before and after the line is executed.

Is there any editor or popular editor extension that automatically remove quotes/brackets?

There are too many text editors, which have the function, that if I just select a piece of the code and press the quote/bracket key, the selected code becomes wrapped into the type of the quotes/brackets I pressed. But do you know any or are you using any, which has also the function, that if I select the piece of the code wrapped into the quotes/brackets and press the same quote/bracket key or some key combination, that piece of code becomes unwrapped?
Also if you know any editor or popular editor extension that automatically remove all quotes/brackets from the code, please write it too. Everything would be helpful.
We are doing some research and this question is still unanswered. Please help us if you know anything about.
I create a simple Zeus (Windows) Lua script that does this for the quote case (i.e. the macro wraps any marked area in quotes).
In a similar fashion another script could be written for the brackets case.
Also as this simple script shows, this should be possible in any scriptable editor.
The script can be found here: http://www.zeusedit.com/zforum/viewtopic.php?t=7148
SynWrite editor (Windows) can do scripting for u. You can write Python plugin in 10min, and assign it a hotkey, so selection (or all text) will dequote, or what ever.
Finally, I've made it by writing my own extension to my favourite editor.

Komodo IDE Ruby on Rails Editor auto-insert code issues

I've searched all over this site, and since I don't know what this particular function is called, I'm not sure how to find the answer, so apologies if this is a repeat.
I'm a new Ruby On Rails dev using Komodo IDE. When I type something such as
def full_title
it auto-inserts a bunch of crap until the text looks like:
def fulll_title(args)
#code
end
How do I either get rid of the (args) and (#code) or make use of them? Having to manually delete that junk is getting really, really old. I'm fine with either solution as long as there IS a solution. I don't even know what that particular feature is called, so I'm having a really hard time Googling/finding the answer on my own
Komodo IDE calls this feature code intelligence, and here are a few unrelated questions on controlling it:
Komodo Edit disable autocomple
Calltips/Docstring while viewing function list?
Komodo Edit macro to replace a specific word in current document with clipboard content; is it possible?

Resources