I'm trying to get a c project configured in vscode. Basically, I'm on MacOS but IntelliSense thinks that the MS_WINDOWS macro is defined, so it's always trying to include the windows.h header. A few questions:
How can I see a list of macros that IntelliSense thinks are defined and where they come from?
How can I undefine the MS_WINDOWS macro in c_cpp_properties.json? I tried putting "MS_WINDOWS=0" in configurations.defines but that doesn't work because MS_WINDOWS is still defined.
may be:
"intelliSenseMode": "clang-x64"
Related
When you have to work with STM32 HAL you know, there is many macros and sometimes you want to know where is implemented this one. In my example, in line 40 i use F12 on label PROSTE_MAKRO (F12 is GoToDefinition). In my case this function directs me to line 30, where is defined macro SRC, not my PROSTE MAKRO what i expect. It looks like this VSCode function GotoDefinition think to much how to (NOT!) help me and evaluate my macro to basic forms. But half of code i have in HAL is macros and i expect gotoDefinition shoud redirect me by any (if is more than one) nested definition. I want it and this is how many IDE works.
I use Visual Studio Code with Plaftormio and C/C++ Microsoft extension. I have configure c_cpp_properties.json file with my configuration name, paths etc. I've made all toolchain from EmbeddedGeek yt video, but it all works good. (STM32F767 code generation and flashing is ok).
I have no idea wtf is wrong with VSCode but any day give me new reason to hate VSC.
I'm trying ask google about it but ofc i've reveive zero answer. I'm trying change goto behavior in general settings (13 setting found) but always it work wrong. I have record it on YT so you can watch it: https://www.youtube.com/watch?v=5FADq5yRp6g
And now i think SO is my last option.
In file: .vscode\c_cpp_properties.json in field:
"intelliSenseMode": "windows-msvc-x86",
"compilerArgs": [],
"compilerPath": ""
I have defined my toolchain compiler and it's args. VScode automatic recognize it and think it is something different than default and change Intellisense mode to other (in my case it was arm-gcc or so). And it is. I have delete my compliler path and compiler args and leave it empty. Now GoToDefinition (default F12) work good.
But be careful - if you change "intelliSenseMode" to windows-msvc-x86 but set compiler path and args VSCode will inform you that intelliSenseMode is different than you try set. In any case - don't touch it.
I am new to Isabelle/jEdit. I am accustomed to Emacs, so I'd like to set the shortcuts in Emacs style. It went well in most cases, but the command Emacs Set Mark does not work. When I invoke the command, the message "Input/output complete" appears in the minibuffer, and nothing happens in the text area.
Does anyone have an idea to fix it? I tried the various shortcut keys but all fail.
I use macOS Big Sur (version 11.5.2), Isabelle2021. (The keyboard is Japanese style.)
Both jEdit and the jEdit Isabelle plugin have a bunch of defaults which conflict with Emacs-style keys, so you have to make sure to unbind any existing keybindings that conflict with the ones you want to add and make sure they are removed from both primary and secondary. You have to do this by hand starting with the standard keybindings, because the Emacs keybinding set provided with jEdit sucks--and even worse, none of the default Isabelle keybindings are in it. Next time you start jEdit, it will open a dialog saying that there are keybinding conflicts, and you'll have to confirm the ones you just added.
Since this is kind of 面倒くさい both to explain and to do yourself, and there's not an easy way to show what I've changed vs. the defaults, here's my jEdit properties and Emacs-like keymap file. To use them:
Quit jEdit.
Copy the keymap file to $JEDIT_SETTINGS/keymaps/ (run isabelle getenv JEDIT_SETTINGS from your shell).
If you want to just use all my settings, copy the properties file to $JEDIT_SETTINGS/ (why wouldn't you, I have great taste :) ). Otherwise, grep -E '(^keymap\.current|\.shortcut2?\.ignore)=' properties and add the lines to $JEDIT_SETTINGS/properties yourself.
Start jEdit and resolve any keybinding conflicts it complains about.
My settings are Emacs-like with as many of the default Isabelle keys preserved, but Emacs stuff mostly takes priority: for example, Ctrl+b is backward-char instead of Isabelle completion, and Ctrl+e is move-end-of-line instead of being stolen by jEdit for a bunch of its key sequences.
Ctrl+SPC should activate the mark, but note that the region will NOT be highlighted until you perform some other command--try Emacs kill ring save (bound to M+w; that will probably be Opt+w on your Mac keyboard).
I haven't ran macOS in ages--I currently use Isabelle/jEdit on Linux over remote X11 with the X server running on Windows--but it shouldn't be any different on macOS, even with the Japanese layout, unless some other program you have is eating keys before they get to jEdit. (I think Ctrl+SPC switches the IME/keyboard layout on macOS by default, right? You might want to change either the macOS setting or the set mark binding in jEdit.)
On Java SE 16 and 17, you will probably get an error from jEdit saying something like:
unknown error: Unable to make public java.lang.AbstractStringBuilder java.lang.AbstractStringBuilder.append(java.lang.String) accessible: module java.base does not "opens java.lang" to unnamed module
To fix this, add this to your $ISABELLE_HOME_USER/etc/settings:
JEDIT_JAVA_OPTIONS="$JEDIT_JAVA_OPTIONS --add-opens=java.base/java.lang=ALL-UNNAMED"
(The --add-opens stuff is related to this Java runtime change, though you don't need to care about any of this to use Isabelle.)
In Sublime (Version 3.2.2, Build 3211) (Ubuntu 18.04.5), I'd like to record a macro where I select-all, copy and paste the current content into another, unsaved file. And then do other commands as well, but I'm not even getting that far. The new-file step doesn't seem to work – neither new, nor new_window, newWindow, new_file, newFile seem to work; not even reopen_last_file. It should be new_file, though.
The console throws this:
Unknown macro command new_file
Which is weird. The command new_file works fine in other contexts: looking at the key-bindings settings, ctrl+n is bound to the same command and the hotkey has no issues.
Selecting all, copying – even this following bit works as intended:
{
"command": "insert",
"args": {"characters": "Hello, Friend!\n"}
}
In their forums, user "jps" writes:
With regards to the other console messages (unknown command, etc), don’t worry about them, they’re supposed to be there :slight_smile:
… but this doesn't seem to be right if it's obviously not working.
I have a project open but closing the project has no effect.
Is there maybe a package or something missing?
Macros in sublime can only capture and replay TextCommand commands; that is, commands that directly modify the content of a buffer or it's visual state. Examples including adding or removing text, changing the selection, moving the cursor around or changing view specific settings (like toggling word wrap or changing rulers, etc).
Commands like new_file, new_window or opening and closing projects are WindowCommand commands, which can't be captured via a macro.
In order to run a sequence of commands that includes a WindowCommand (or ApplicationCommand), you need to use a package. Two examples of that which are readily available on Package Control are Chain of Command and Multicommand.
To use auto-complete option, for writing C syntax, I have written below elisp code in .emacs file.
Here are the files in the directory.
But, amidst the typing of C syntax, I do not see the auto-complete option to select the syntax.
I am expecting the auto-complete option, as shown below, when I type while keyword. In my case, I do not see below behavior.
How do I resolve this?
I think this used to work out of the box in Emacs 23, but in 24 it doesn't.
So, suppose I have Alexandria package loaded with Quicklisp. If I run (apropos "curry") in the REPL, for example, it finds the function definition, similarly, if I run (describe 'curry) etc. But SLIME refuses to autocomplete (cur| (point is shown by pipe) to anything.
How to tell SLIME where to look for sources / what is it missing?
EDIT:
Also, if I do ,in-packageRETALEXANDRIARET it will autocomplete, but I hoped it would autocomplete for any loaded package w/o me having to specify what package to look in. Or is there no other way?
There is no way that I know of to do this in SLIME. I'm not sure it would be practical to use but it should be feasible to implement this by looking at how completion and apropos are implemented and mix them up in a new function. Bonus points for a customize-var to toggle completion style.
https://github.com/slime/slime