How to save dart file in file system with android studio generated comments? - android-studio

I like how Android Studio and Visual Studio , generate the comments for each closing brackets, but when I open the same file in notepad++ or any other text editor, I don't see those comments. Is there a way to generate the saved dart file so it has those comments stored as part of the text code( in comment) ?
Here is one code example that how code looks in android studio.
but when opened with notepad it does not have the comment MaterialApp. I am guessing there is some settings in android studio that will let me save file with generated comments, so it can be useful outside of Android studio like in git etc.

These comments are generated "on the fly" by the Flutter plugin for Android Studio. At no time, these comments are inserted into your source files. They are just shown within the IDE. So I think there is no way to "export" these comments.

Related

Insert mood auto activated after text selection in android studio

I have set up my android studio with all plugins I had before. I am facing a problem and I can not resolve it, The problem is when I am selecting a line to edit or delete the cursor then turns into insert mood and then I can not do nothing like deleting or editing. How can I resolve this? I am using Android Studio 4.0.
This is the video link I uploaded it to show you the problem just 1 min video. This will clarify my statements.
See The Problem in This Video
I got the solution here,
This made my day.....
Solution Link
Solution Video
Check for the first time if you didn’t activate the insert mode. Keyboard shortcuts for the android studio will not be the source of that bug. You have to check the Android Studio plugin to disable the one which causes the problem of typing.
You just have to uninstall or disble the ideavim plugin and you're good to go.

difference between Reformat Code / Reformat Code with dartfmt

In Android studio, when I open a dart file, I see two options to format the code, so my question is
What is the difference between Reformat Code / Reformat Code with dartfmt
Difference between them I don't know but I know how you can add a shortcut to format code:
Go to
File -> Settings -> Keymap -> Editor Action -> Reformate Code with dartfmt
and add click on it and add a shortcut
Both are the same essentially.
The only difference is that Reformat Code (ctrl + alt + L) applies only to the file open in the Editor or the file selected in project files pane using Intellij's Code formatter feature.
While Reformat Code using dartfmt uses dartfmt CLI command available with the flutter SDK.
The output of both will be the same. dartfmt allow you to format the code on directory level and from a cmd/terminal instead of an IDE.
**Automatically formatting code in Android Studio and IntelliJ
**
Install the Dart plugin to get automatic formatting of code in Android Studio and IntelliJ.
To automatically format the code in the current source code window, right-click in the code window and select Reformat Code with dartfmt. You can add a keyboard shortcut to this in Keymap section of IntelliJ Preferences.
You can also do it with
flutter format path1 path2 ...
(From terminal window)
Official link to flutter formatting tool
This shows that dartfmt is just a formatter by dart specifically for dart files. Default format code given by Android studio also could do this if file extension is identified by Android studio.

Unreadable code in Android Studio projects

I have a problem with Android Studio, the content of each text in the editor is illegible, even line numbers.
Everything happened after a push to a repository. When loading the project in Android Studio.
[![Illegible Text Image][1]][1]: https://i.stack.imgur.com/EoJh9.png
OS: Windows 10.
Android Studio 3.2.1
No matter what file or project I open, everything looks the same
Files looks good in any other editor
IDE language is fine, only editor gets corrupted
When copying any text from the editor to the clipboard, the text is pasted well elsewhere.
Just go to File > Settings > Editor > Font and Change the font to any of the readable ones
Font Settings

How to change the Visual studio target path?

Unfortunately, I have copied and pasted one Program(Project) to a path. This project has been developed in Visual studio 2010. Now, this project is not executing. It prompts the target path. How can we change this target path?
You can open *.csproject file with any text or XML editor, change the wrong path, then save the file. Then re-open the project with Visual Studio again.

How to highlight occurrences of a search term in text in Visual Studio 11 / 2012?

How to highlight occurrences of a search term in text in Visual Studio 11 / 2012? There are solutions in VS 2010 and 2008, any one know of one for VS2012?
The fix mentioned in the solution is to download the SelectionHighlight.vsix file then.
Change the Extension to .zip
Open the zip file and edit the manifest file in a text editor.
Change the Visual Studio Version attribute to 11.
After saving the file back into the zip, change the extension back to .vsix
Just move forward with installing the file and you are set.
okay... just checked a plugin for VS2010 and they have a "Fix" for 2012. Check the Q and A here: http://visualstudiogallery.msdn.microsoft.com/4b92b6ad-f563-4705-8f7b-7f85ba3cc6bb

Resources