Closed mishaxz closed 1 year ago
Maybe you have F1 used by another extension. Go to the 'keyboard shortcut' by pressing Ctrl+k Ctrl+s and check where F1 is used. There you can also assign another keyboard shortcut to open the help.
Keyboard shortcuts show
{
"key": "f1",
"command": "mql_tools.help",
"when": "config.mql_tools.Help.HelpON && resourceExtname == '.mq4' || config.mql_tools.Help.HelpON && resourceExtname == '.mq5' || config.mql_tools.Help.HelpON && resourceExtname == '.mqh'"
}
No need to edit extension files!
thanks, yes I wasn't editing it just pasting what I had.
My F1 keys are assigned just like in your screenshot
and I don't see any other extensions with F1 listed there
This option must be enabled in the extension settings
What happens after you press F1? Do error messages appear?
yes it was enabled but I just unchecked it and rechecked it just to be sure. Also everything is configured for path of metatrader and I can compile fine.
pressing F1 does nothing. I tried to both have the caret in the middle of the word as well as selecting the word and pressing F!. Both times nothing happens.
I tried it on StringFormat(), StringSubStr(), EventSetMillisecondTimer(), OnInit() and others
Try without F1. Select the text, press Ctrl+Shift+P to open the Command palette and select MQL: Get MQL4/MQL5 Help.
wow that worked. This is going to make me a more efficient coder.
Any idea what I need to do to fix F1? or should i assign it to another key
Open 'keybindings.json' and if there is f1, delete and save the file and try calling help via F1. If it doesn't help then assign another key, e.g. Shift+F1
Hi L-I-V, after the latest update which has fixed Syntax checking for portable MT4, the F1 for Help does not work any more. I did a clean install of VSCODE as well as MT4.
The steps I follow is like this: 1- Clean install VSCODE (portable version with own data folder as per these instructions: https://code.visualstudio.com/docs/editor/portable) 2 - Clean install of MT4 (portable version) 3 - Install your MQL-Tools extension for VSCODE 4 - Set the Metaeditor path and check the portable checkbox 5 - Open any MQL4 or MQH file and check that Syntax checking and compilation work (all works 100%) 6 - Select a MQL language keyword and press F1 6.1 - A short message pops up bottom right hand corner indicating Help file is loading....thereafter nothing ever again....
Tried restarting - no go.
I can see that a files\help folder is created under your extension folder and that the mql4.chm file is coppied over to it, but the help system is currently not working at all....
Even if I try to run it from the Ctrl+Shift+P menu by selecting the word in the code and then MQL: Get MQL4/MQL5 Help from the command pallete, it also does not open the help file....
It's like the extension knows where to put the file during install, but can't find it afterwards - some path finder bug perhaps...
Hi L-I-V,
In regards to my report above, I have done some "investigation" (aka newbie hacking) by adding a few outputs in you "help.js" file just so I can see if the path was received correctly and try and find up until where things worked as expected....and I have found the issue, I think :)
When there is a space in the path name, even if the path is correctly received from __define and concatenated, the help file is not accessed.... C:\VS Code...... will not work with that space between VS and Code C:\VSCode..... works 100%
When I remove the space from the path, all works 100% - I honestly do NOT mind removing a space from my file name structure so I would not worry about this any further unless you know of a quick code fix for this to compensate for spaces in the path name.... strangely though with the really installed (non-portable) version of VS Code, there are spaces in the path...
Hi kalotech. I am grateful to you for the investigation carried out to identify the cause of the error. You've saved me a lot of time. An update with fixes is already on the Marketplace.
Once more, thank you so much for your time and generosity! Stay awesome!
Hi, great stuff here..
I have everything working except that F1 doesn't open the help (currently I'm trying in MQL4 but I think for 5 it also doesn't)
Any ideas what I should configure for this?
Compiling works fine.