Bear with me if my question does not adhere to standards or sounds stupid, it is my first time asking. I am using vscode for c development. The problem is for all header files, default language used by vscode is C++ instead of C as I require. Even if I change the language to C using the panel that appears at the bottom of the editor, it still reverts to C++ after I close and restart the editor. How do i permanently make the editor recognize C?
I simply did not pay attention to options appearing on top of options after you click on the language in recognized at the bottom. Just clicked on "Change language associations for'.h'", set it to C and that was it.
Related
My VSC shows the wavy underlines when something's wrong with my code, but does not display the hint overlay when I hover my mouse on it.
This happens whatever the language used (from CSS to Typescript) and whatever the type of irregularity (e.g. notice, warn, danger)
I'd say that's a setting I may have changed at some point, but can't find which one. Any idea?
More details:
I do have the message displayed in the Problems tab besides to the Terminal, but it forces me to switch from tab to tab ;
I do have other overlays like autocomplete/autosuggest ;
No extensions in my setup could have led to that situation (only a few installed, widely downloaded, nothing fancy or dodgy).
Actual behavior (nothing happens):
Expected behavior (from google images)
Go to File > Preferences > Settings.
Search for 'hover.enabled' (See below photo).
Toggle it.
If your editor still does not pick up the change, close all tabs, close all VSCode windows, and reopen it.
If it's still not working, try uninstalling VSCode and reinstalling it (make sure you don't have setting sync on).
Also, this question has been answered in at least one other place (Disable tooltip hint in Visual Studio Code)
I'm currently using Oracle SQLDeveloper a lot more that I have ever used and I'm starting to like the tool.
I use Shift+F4 a lot to jump into a package/function/procedure. But one thing that I don't really get is how to jump directly to the package body or as an alternative some kind of shortcut that toggles between the spec and the body of a package.
Toad has something like this and I'm unable to find this feature in SQLDeveloper.
I'm also aware that you have the object tree on the left side of the screen but it's not really the best way to navigate to a package body when you are already looking at its specification. Especially if you have something like 300 packages with similar names...
For someone that uses SQLDeveloper to work everyday and does a lot of development with packages there has to be a way to do this...
I'm hoping for some magical shortcut or some obscure plugin.
see the picture above-- the downward pointing side arrow -- click on it-- it will open up the function defintion.
thanks
After opening the package spec using Shift+F4, press Ctrl+Shift+F12 to open or toggle between body and spec
Go to VIEW menu, click on find DB objects option. In the find db object pane put the name of the package and select the DB.
Both, the spec and body will appear, double click to open.
You have a couple of questions:
how to 'jump into' a pl/sql object AND
how to toggle from spec to body and vice versa
How to 'jump into' a pl/sql object
Ctrl+Mouse Hover+Click
If you don't like this mouse-kung-fu, you can also assign a keyboard shortcut, I show you how to do this here.
How to toggle from spec to body and back
You can use the arrows in the gutter, they point up or down, you can use the toolbar button, or you can use the keyboard shortcut.
If you use the 'arrow' in the gutter, you'll go straight to that item's corresponding bit in the spec or body. Using the toolbar button/kb shortcut will just take you to line 1 of the spec or body.
I talk about these PL/SQL features and more on my blog.
(this is at least with my PLSQL-DEv version (11.0.4.1774), default settings)
The shortcut to view Spec. + Body is SHIFT+ F5, then CTRL+ H to toggle to the "body" tab.
This works if you have certain rights to view the package's body, especially the DEBUG right: ask your DBA to do you a
GRANT DEBUG on <package_you_want_to_view_the_body_of> to <your_user>
or
GRANT DEBUG on <package_you_want_to_view_the_body_of> to PUBLIC
Note sure but you might also need the EXECUTE right just to view. Same thing if needed, ask your DBA similar above grant.
nb:
Another thing I had to do in Oracle 12c for Code assistant to view the packages when typing: check the "Use DBA Views if available" in Tools > preferences:
Doe anybody know of an eclipse plugin, which can be used to insert short text (in the form of memo) to remember what that line of code does or a block of code does to help me understand the existing code better and i can also refer it back later on.
Just like "Task" can be added on a line of code, although i can use "tasks" for this purpose, but that is not very convenient and intuitive.
If you want to add a short text to "remember what that line of code does or a block of code does to help me understand the existing code better", use comments. That's what they're for, and practically every formal language in the world has them.
If you want the ability to quickly jump to an arbitrary point in the code, using bookmarks is a convenient option - right click the bar immediately left of the text and choose to add a bookmark. You can then easily jump between bookmarks with the "bookmark view", which you can enable from the Window -> Show View menu.
The closest thing I can think of is bookmark support. There is native bookmark support in Eclipse and also several other vendors supply more function.
I'm assuming that there's a very good reason that you don't want to or can't modify the code.
I use Dreamweaver at work and NetBeans IDE at home, but in both cases project is stored at github. My problem is that NetBeans seems to be constructing code indenting out of spaces and when opened in dreamweaver or exported to github, indenting here and there breaks (moves unexpectedly further then it was intended or vice versa), although when opened again in NetBeans, goes back to normal. It has been pain for some time already. Is there any resolution to this?
I should say that we at work (and me including) prefer tab indenting.
It depends on the IDE's definition of a TAB. There are usually options within the IDE to indent using a TAB but turn the TAB into a given number of SPACES. I usually indent using TAB but have the IDE turn that into 3 SPACES. This means that it doesn't matter what I (or anyone else) use to read my code later the indets are always the same.
In NetBeans you need to look in the Code Editor options but I have no idea where to find the settings in Dreamweaver.
Its been known that one should use double space rather than tab, because that fact that different IDEs define how the tab button works DIFFERENTLY.
For example, emberjs team require contributor to use double-space rather than tab for formatting the code.
It make sense that to use something recognized in common without an IDE, so that the code structure will not be a problem in a highly collaborated coding team environment.
HOWEVER, if customization of how a tab works in an IDE is enabled, tab will be a great time saver in this case-- Press twice the button cost 200% of the time to press one obviously :)
Hope that helps!
Is there any reason why you shouldn't use the "-std=c99" flag for compiling Objective-C programs on Mac? The one feature in C99 that I really like is the ability to declare variables anywhere in code, rather than just at the top of methods, but does this flag causes any problems or create incompatibilities for iPhone or Cocoa apps?
Compiled C99 binary code is binary-compatible with older C variants. The only downside is if you have to share code with other projects that aren't C99 (or GNU99).
The same applies to Objective-C
I've tried it myself on a small iPhone app, and it works. I've seen no problems with it.
A good way to do this if your project settings aren't letting you do it is to add a User-Defined setting. To do so:
Open your "Project -> Edit Project Settings" menu item.
at the bottom left, select "Add User-Defined Setting" from the dropdown menu
Replace the left side text "New Setting" with GCC_C_LANGUAGE_STANDARD
add the text "c99" to the right side of the line
clean your target & rebuild!