At a first glance it seems to be working, as it should. But small issue...hitting ctrl+X to cut a line OR hitting delete, will cause a pretty big spike in cpu usage and visual studio freezes. Also the autocompletion with double-double quotations doesn't actually work, because the 2nd quotation mark remains selected and by typing the quoted text, you'll overwrite it(the 2nd quotation mark).
This extension saved me a lot of time dealing with a json file that had a minor syntax error that was hard to spot. If you deal with json install it, it will stay out of your way and help you when you least expect it.
This extension + VS External Tool for running scripts + shortcut key = great productivity boost. http://softblog.violet-tape.net/2011/05/01/launch-of-bat-files-out-of-visual-studio-2010/
The only issue I have is that the Dark theme version of this extension sets the default TXT color to NavajoWhite which makes the edit-mode text in the Watch window near invisible (light text on white background). Changing the default text color from NavajoWhite to Gray in the COLORS_DEFINITION.json file was an easy workaround though.
I installed this extension to try to help out formatting a 30,000 line (when pretty printed) json file. It did not work out well.
First, when I rebooted VS2012 after the extension installed, it popped up a Yes/No dialog behind the Visual Studio loading dialog. I think this happened because the project was reloading my JSON file that was open when the solution closed. At any rate, the only way I could read the dialog was by using the Autohotkey Spy tool.
After getting past that snafu, the extension attempted to format my file. It succeeded after a delay (> 5 seconds I believe). However, The performance thereafter was terrible. Scrolling more than a few lines in the file brought VS to its knees. My machine is beefy enough where this shouldn't happen, and the extension sadly needs a lot of improvement.
Sorry for the issue, the first time the extension is activated it does pop up a message box asking if you are using a black background. And this is not very Visual Studio friendly. I will have to change it.
Regarding the 30 000 lines json file. I will try to execute the JSON validation in a background thread, to avoid blocking Visual Studio.
I appreciate a military slang terms expert like you seems to be. So you would understand that opening a 30 000 lines json file is TARFU.
That said I appreciate your feedback, and will improve the extension. Thanks.
JSON standard requires the double quote by default. The extension supports a more relax mode supporting - no double quote, trailing coma, and // comment by inserting at the top of the file the following comment /* "use relax" */
Any chance of supporting CPP, C and Perl comments in INI?
Also comments should only start from beginning of line:
MyKey = Not;A;Comment
Color = 0;1;1;0.5
I would go and try to code it myself but no source provided.
Thanks anyway I like that extension.
I noticed that JSON it is still not supported by VS 2013 even with Windows Essentials. So I guess that is good for the extension.
Should do it when I have a little bit of free time (around Christmas 2013).
This request is blocked by the SonicWALL Gateway Anti-Virus Service. Name: Fynloski.A_26 (Trojan)
Same as her for a while: http://visualstudiogallery.msdn.microsoft.com/b0c87e47-f4ee-4935-9a59-f2c81ce692ab
First, I love your extension. Thanks for writing this!
I noticed that "goto <label>" has both intelllisense and coloring, which is great. But if I do: "goto :<label>" I loose both intellisense and coloring. It would be nice if I could get the same behavior with or without the colon.
It would also be nice if "call <label>" and "call :<label>" could both use the same intellisense as goto. Call can call external entities while goto can't, but adding this to Call can only help since I can still type anything I want. And adding the coloring can help distinguish external vs internal calls.
Btw, I've used ":<label>" to distinguish internal calls for quite some time. It doesn't make much sense with "goto" but it really helps with "call". And keeping the two consistent helps me be consistent.
Thanks for the remarks David, I created the following todo:
- Highlight variable not used for typo
- Support goto :label
- Test call label if this works
- Add intellisense for keyword call
provide intellisense of the current batch files and exe
located in the current folder.
One of my biggest source of mistakes in scripts is mistyping variables. It would be nice if the highlighting could highlight these differently:
- Variables that are set but never used.
- Variables that are used but never set
- Variables that are set and used
I know this is stepping outside highlighting into verification, but is it plausible to catch errors if you make an assumption like "Any variables that start with an underscore must be set within the scope of the script"?
I love this extension, but I have found an issue.. take the string
The /*/*/*/ part breaks highlighting for the whole file. Change it to /*/*/ and it works. I tried toggling the relaxed mode and closing char options to no avail.
The JSON is valid on jsonlint, but the highlighting breaks in this extension.
This breaks too..
Hope you can fix it, I need color! Thanks for your work so far.
I've used this extension for a while but I think it stopped working with a recent update. Uninstalling/re-installing doesn't solve the issue.
When opening a *.cmd or *.json file I get an error dialog with the following stack trace:
System.IO.FileNotFoundException: Could not find file 'C:\Users\Duncan\AppData\Local\assembly\dl3\Q5N052AE.CAY\3G2PZ2O5.AMK\43ccf7b8\dd976033_f673ce01\Intellisense.json'.
File name: 'C:\Users\Duncan\AppData\Local\assembly\dl3\Q5N052AE.CAY\3G2PZ2O5.AMK\43ccf7b8\dd976033_f673ce01\Intellisense.json'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
at System.IO.File.ReadAllText(String path)
OK, I found Intellisense.json in AppData\Local\Microsoft\VisualStudio\11.0\Extensions\2rx5fx2g.55k and copied it (and KEYWORDS.json) over to the AppData\Local\assembly\dl3... location and it now seems happy. Odd that it's started looking in what appears to be the wrong location.