I just downloaded Atmel Studio 7 to program ATMegas and I'm using C++ (not C) for that.
Unfortunately, there's no syntax coloring for C++ - so namespace, class, public, private and so on are in regular color (no key words).
Do you know to to fix it?
If your file's extension is .cpp, Atmel Studio should correctly color C++ keywords automatically. If it is a .c file, C++ keywords won't be colored. If you change the file's extension you may need to reload the file for Atmel Studio to correctly color the keywords. Make sure your files have a proper extension.
Related
Can you customise colors of javascript editor in visual studio 2019 to have the same has in vscode, I already look into the police and fonts editor of vs2019 + extensions for more User Tags but none of them change the colors settings.
What I want
What I have
I having same problem, Javascript sytnax color in Visual Studio 2019 seems broken for now:
https://developercommunity.visualstudio.com/content/problem/1127320/lost-typescript-intellisense-and-sytnax-coloring-i.html
The only solution for me is using VSCode..
VS ReShaper extension supports VSCode-like syntax highlighting:
https://www.jetbrains.com/help/resharper/Coding_Assistance__Syntax_Highlighting.html
Example: https://i.imgur.com/Atw4yBP.png
The only caveat being ReShaper is not free and causes lag. However, there are many extensions claiming to replace (parts of) ReShaper and chances are one of these also enables similar syntax highlighting.
I'm writing a simple F# console app with Visual Studio 2017 targeting .NET Core 2.0. I'm wondering if it's possible to open a module not present in the current directory.
For example :
/root/foo.fs
/root/SubDirectory/bar.fs
How can bar.fs open the Foo module or vice versa?
I already tried :
open Foo
open "../Foo"
open "C:/AbsolutePath/Foo"
With the last two ones, VS complained with :
FS0010 : Unexpected string literal in open declaration. Expected identifier, 'global' or other token.
There seems to be no documentation about this.
Any help would be appreciated.
Actually you can only add or reorder files in VS2017 in the preview version I believe (so not yet on 15.5.6). But TheQuickBrownFox is correct, the file that has your module has to be in the fsproj file, and the order is important.
For VSCode, you can use the Command (or Project Explorer) in Ionide: Ctrl+Shift+P: F#: Add Current File to Project and also F#: Move File Up/Down (there's a right click meny on the F# Project Explorer as well.
In Visual Studio 2017 you can right-click the Project and choose Edit .fsproj. VS will reload the file automatically on save, so no need to unload a project like in VS2015. It will look something like this:
You can see that MyModule.fs is in the root of the project and the line with MyModule.fs needs to be above any other files that reference it. You can use Alt+Up/Down Arrow to move lines around.
Then you can just open this module and use it. For example Add is defined in this module.
I also added the #load directive, this is only if you want to test it in FSI, and the compiler will ignore it.
What is dclsmpedit package (Embarcadero Editor Script Enhancements)?
Do I need it?
I am not sure what 'Editor Script Enhancements' does.
It's a sample of adding key bindings (your own code editor keyboard assignments), the ability to save keyboard macros (keystrokes recorded for playback), and an edit buffer list to the IDE using the ToolsAPI. You only need it if you want to use it 's functionality. The source is useful if you want to extend the IDE via the parts of the ToolsAPI that they demonstrate. The key binding functionality in BufferList.pas implements the New IDE Classic key mapping in the IDE itself (as pointed out by #LURD in the comment below).
If you're using Delphi 2007, you can find the source in the Delphi Demos folder (by default on Windows 7 in C:\Users\Public\Documents\RAD Studio\5.0\Demos\DelphiWin32\VCLWin32\ToolsAPI\Edit Keybinding), and more easily found with the Start->CodeGear RAD Studio->Samples menu item. The source for the added functionality is there as well, so you can see what they do and how they are implemented.
In XE3, the source code can be found in C:\Users\Public\Documents\RAD Studio\10.0\Samples\Delphi\VCL\ToolsAPI\Editor KeyBinding, or via Start->All Programs->Embarcadero RAD Studio XE->Samples.
Is there any Delphi unit available corresponding msctf.h header file from Platform SDK?
I have checked Delphi 2010 source folder, but it seems Delphi doesn't come with that.
Thanks in advance for your time!
You can use Visual Studio's MIDL to generate a type library (.tlb) from the .idl file and then use Delphi's tlibimp.exe to generate the Delphi interface unit.
The problem with the original .idl is that it doesn't contain a library statement so I added it manually (otherwise MIDL wouldn't generate the .tlb).
See if the result helps you (you may still need to fix some parts by hand).
I have a 3rd party .dll that I have successfully added as a reference in both a VS 2010 C# project and an F# VS 2010 project. I can view the contents in the object browser in both cases, but the F# version won't let me "open" the library. It works fine in the C# project (with the "using" directive), and I can write a program that uses the contents of this particular .dll. I have not had any trouble with other .dlls in F#/VS 2010/.NET 4.0 on Windows 7.
Any ideas as to why this might be happening? Or how I could debug this further?
See what the csc.exe and fsc.exe command-lines have for the library in question (in VS, open the 'Output Window' after a rebuild), to see if they both have the same reference (e.g. -r:Path\Library.dll).
And to be clear, you're saying
open NagLibrary
in F# yields the error message in the title, but
using NagLibrary;
in C# works and opens the namespace?
make sure you reference the path within the script using the double "\" convention
for me this worked
#r "C:\homeware\\blp\\api\\APIv3\\DotnetAPI\\v3.4.5.4\\lib\\Bloomberglp.Blpapi.dll"
open Bloomberglp.Blpapi