Visual Studio Code - page 2

 

I just added about 50 new snippets to the MQL snippets extension and pushed it to the market. See readme. 

 
Anton Nel:

"timeout 3;" -- this 3 seconds is still not 100% working so I have increased to 5 seconds then it is working. I guess because I have over 3000 lines of code. 5 seconds via VS Code seems too long for me. It took 97ms via Metaeditor. Thanks. 


I switched the default terminal back to windows power shell and changed the script a bit; haven't had any issues with this setup. Also you can click the link in the terminal and it will automatically take you to the exact file and location of the problem by Ctrl+Click.

      {
         "label": "MQL-Compile",
         "dependsOn":"sleep",
         "presentation": {
            "echo": true,
            "reveal": "always",
            "focus": true,
            "panel": "shared"
         },
         "group": {
            "kind": "build",
            "isDefault": true
         },
         "promptOnClose": true,
         "type": "shell",
         "command": "type ${workspaceRoot}\\${fileBasenameNoExtension}.log; del ${workspaceRoot}\\${fileBasenameNoExtension}.log",
      },
      {
         "label": "sleep",
         "type": "shell",
         "command": "timeout 2",
         "dependsOn":"compile"
      },
      {
         "label": "compile",
         "type": "shell",
         "command": "C:\\Users\\User\\Dropbox\\MT-TK\\metaeditor.exe",
         "args": [
            "/compile:${file}",
            "/inc:${workspaceRoot}",
            "/log:${workspaceRoot}\\${fileBasenameNoExtension}.log",
         ],
      }
 

Hello,

What are the advantages of Visual Studio Code over Visual Studio 2017 Community Edition, in general, and to make MQL5 in particular?

Regards,

Pierre

 
Pierre Rougier:

Hello,

What are the advantages of Visual Studio Code over Visual Studio 2017 Community Edition, in general, and to make MQL5 in particular?

Regards,

Pierre


Pierre,


VS is a full stack IDE and vscode is an open source text editor. The major difference is how they work behind the scenes. Since vscode is an open source text editor it is lightweight out of the box and very fast. It is also very extendable and can go from a plain text editor to pretty much much full blown IDE with the use of extensions. Python is a great example because with the python extensions you can get almost all of the functionality of a full stack IDE without having to wait years for the program to load up. 

So your question was about MQL... Vscode makes it easy to author extensions using JS and JSON, which is exactly what I've begun to do. If you download vscode and install the MQL extension pack and follow the setup instructions, you'll get not only MQL syntax highlighting, but also context aware intellisence (uses microsoft c++ engine) and access to a whole library of MQL snippets (MQL built-in functions with descriptions and auto-complete). 

 
nicholishen:

Pierre,


VS is a full stack IDE and vscode is an open source text editor. The major difference is how they work behind the scenes. Since vscode is an open source text editor it is lightweight out of the box and very fast. It is also very extendable and can go from a plain text editor to pretty much much full blown IDE with the use of extensions. Python is a great example because with the python extensions you can get almost all of the functionality of a full stack IDE without having to wait years for the program to load up. 

So your question was about MQL... Vscode makes it easy to author extensions using JS and JSON, which is exactly what I've begun to do. If you download vscode and install the MQL extension pack and follow the setup instructions, you'll get not only MQL syntax highlighting, but also context aware intellisence (uses microsoft c++ engine) and access to a whole library of MQL snippets (MQL built-in functions with descriptions and auto-complete). 


awesome :-)

 

Hello,

My question is not about MQL5 but about C ++.
I want to learn C ++, to use my knowledge with MQL5.

Visual Studio Code comes without C++ compiler, I am right?
Which C++ compiler to choose?
How to setup Visual Studio Code C++, to compile C++ code?

Thank you in advance,

Pierre

 
Pierre Rougier:

Hello,

My question is not about MQL5 but about C ++.
I want to learn C ++, to use my knowledge with MQL5.

Visual Studio Code comes without C++ compiler, I am right?
Which C++ compiler to choose?
How to setup Visual Studio Code C++, to compile C++ code?

Thank you in advance,

Pierre

This thread is specifically for mql development in vscode. I would suggest posting your question in a relevant thread or perhaps starting a new one. Good luck :)
 
nicholishen:
This thread is specifically for mql development in vscode. I would suggest posting your question in a relevant thread or perhaps starting a new one. Good luck :)

May I start a new thread about this question in the MQL5 forum ?

 
Pierre Rougier:

May I start a new thread about this question in the MQL5 forum ?

No. This is not a forum about C++. 

 

A few more snippets.


Is it possible to disable red squiggles only for MQL functions and constants?


Files:
snippets.txt  5 kb
Reason: