I'm using this Cobol extension for Visual Studio Code: https://marketplace.visualstudio.com/items?itemName=bitlang.cobol
It works very well and I've got it all set up. The only problem remaining is that I want to use the functionality to press F12 to jump to a definition in my code, so if I click "styledocument.sd" in the code of a program and press F12 it's supposed to open the styledocument file, but all the editor does is say "No definitions found for "styledocument"." Our lead developer says the functionality used to be there and it just vanished at some point for no reason.
Is there any way to get this functionality back? It'd be really useful, I'm very new at programming and this would be a godsend as it'd help me find my way around the code at a reasonable pace, as everything seems really difficult right now.
Thank you everyone for your replies!
Related
I just want to activate autocompletion in VS code. There's a lot of answers to that questions but NONE of it actually helped me. (so please don't mark as duplicate when other answers DON'T help) Apparently, you have to press "Ctrl+Alt+Spacebar" but this doesn't work or me. I don't see any option in the nav menu to toggle a completion mode either. Or maybe you need to create a file in your folder? I don't know! non of this worked and I don't even know how it did work when I've seen intellisense! So please help me find a way to do this, and it'll better if this would be permanent. Thanks.
First you must have an internet connection.
Then you should find extensions sidebar in vs code(you can open it by press 'Ctrl+Shift+X' or open it in top of the screen, View->Extensions).
After that you should search for C# extension that made by Microsoft(search C# in search textbox and click on first result)
Picture of searching C# extension
Then install that extension by clicking on install button
Wait a few minutes to install (e.g it took 15 minutes for me)
Now you have C# extension.
After that you should close the VsCode and open again.
Now you have auto completion (if not, you probably should press 'Ctrl+Space' while coding)
If you want to have smart auto completion, VsCode doesn't have IntelliCode for C#. IntelliCode is just for Visual Studio.
But you can use Tabnine or Copilot extension(you can search and install it like installing C# extension but you should search tabnine instead of C#)
Tabnine is good but it couldn't help me like Intellicode in Visual Studio.
UPDATE: I solved my own problem. Solution is at end of this post
Original Post:
Intro:
Hi, I had Visual Studio Code (VSCode) installed a long time back for use with Unity but ended up not using it and opted for Visual Studio instead because that was what my Unity course was using.
I am now learning HTML so I now want to use the Visual Studio Code as the editor.
Problem:
When I type out my HTML code, VSCode is not autocompleting any of my code or giving me any suggestions or colour coding the text.
Troubleshooting steps done:
I completely uninstalled Visual Studio Code including the user data folders: .vscode in users and Code in Appdata/Romaning (which were advised on the visual Studio code website uninstall instructions).
I then installed a fresh version. But the same problem persists.
Update: I have learnt that the feature that I have an issue with is called Intellisense. CTRL-SHIFT-R is supposed to refresh this feature module. So did this and I get the message "No refactorings available". So perhaps I am missing a module or plugin that I am supposed to also install?
I'd appreciate someone's help to solve this.
Many thanks.
PS This is my first StackOverflow question, I hope it's not a forehead slapping debut!
UPDATE: SOLUTION
I just solved my own problem...and it's probably a beginner's mistake...
I discovered at the bottom right corner of the editor, this a menu tray. One of these items showed "Plain Text". On clicking it, it showed a list of programming languages. Naturally HTML was one of them and I upon clicking it. The editor Intellisense auto completion, suggestions etc kicked in.
If I may comment, I wonder why this element is somewhat conspicuous. It's not obvious for a beginner to know to click on "Plain Text" at the bottom right corner without scouring the interface or try to find a third party tutorial video. Perhaps, I can give that as a feedback to the developers.
I just solved my own problem...and it's probably a beginner's mistake.
I discovered at the bottom right corner of the editor, this a menu tray. One of these items showed "Plain Text". On clicking it, it showed a list of programming languages. Naturally HTML was one of them and I upon clicking it. The editor Intellisense auto completion, suggestions etc kicked in.
I've been working on some scripts for Windows using Visual Studio Code and was surprised that when I type WScript on a line the IntelliSense pops up the correct code completion information, even on my Mac.
I've read the documentation on the VSC website and suspect its either coming out of the built-in JavaScript support or Automatic Type Acquisition from some included library but really would like to find out exactly where this is coming from. So far either my Google-Fu is or nobody has written a thing about it because I can't find any information anywhere. Can anyone answer this one?
It's built into TypeScript. In VSCode, it's actually easy to find the source because you can press F12 on the definition in code, and it will show you the .d.ts:
I've just started with Visual Studio Code.
One thing I find really strange is, if my code compiles to an *.exe, and I select it in the explorer, VS Code tries to "open" it, as if it was a text file, and then complains it's a binary file.
Ideally, it should do nothing when I select it, and I should have to easy way of running it if I want, like "double-click" or some option in context menu. I don't want to hide the .exe, I just want VSCode to know it cannot edit it, so it shouldn't try.
[EDIT] In case someone wonders why I'd single-left-click on something where that click "makes no sense", it's because I've spent the last 15 years using an IDE where that does nothing except select the file in the explorer, and so I got into the habit of click on things while I'm "thinking about it", for example when I'm talking about this file to someone else. That's a hard habit to get rid of, in particular since I'm still using that IDE in my "day job".
As far as I know, this is not possible. There aren't any settings to control this and extensions can't block an editor from opening.
An extension COULD automatically close any tabs that were opened for a .exe file. So if you clicked on it and a tab opened, the extension could close it. I don't know if such an extension exists.
Otherwise you can create a feature request on github: https://www.github.com/microsoft/vscode/issues/new
Visual Studio 2015 does not have a way to only select IntelliSense when I press Enter or Tab anymore in C# for 2015. It's available for JavaScript but not C#.
I'm trying to create a MEF project and hook into the IntelliSense to change this behaviour for C# files. Just to get started, I tried to implement this sample plugin from Microsoft:
https://msdn.microsoft.com/en-us/library/ee372314.aspx
The sample compiles, but it does not work. Nothing in the code is triggered from the debugged IDE. The samples tells to start a new text file and press "a" to get demo IntelliSense, but it never trigger.
Here's the code project if anyone want to look into it:
http://ontime.zdata.no/donwload/ProperIntellisense.zip
Could someone guide me in the right direction here, the documentation in this area is very fluid.
There isn't a supported way to use the APIs to customize this. The behavior you're looking to change falls under the Roslyn project on GitHub so you're more than welcome to file a bug there as feedback. You're also welcome to send a pull request, but at this point it's really tricky to make a change to the editor components of Roslyn and apply those to your locally installed Visual Studio. It's something we're working on fixing but it's not done yet.
The workaround is to press Ctrl+Alt+Space when inside the editor. That will toggle into the correct IntelliSense behaviour. Not a very easy thing to find, but it saved my day. They should probably give better information about this toggle feature, and make it more visible.. Still, it will not be remembered after closing the IDE, so you have to do it every time you start the IDE.