Symbol type via keyboard?

Here’s me, a 30 year Emacs user trying to make sense of vscode / vscodium with the Ocaml platform plugin. The type info via hover is nice. But I hardly ever use the mouse in my editor. Is there a way to do the same thing via the keyboard? Not necessarily in a floating window like that, in the terminal pane would be fine. In fact, in the terminal pane would be preferable, less distracting.

Yes there is! The keyboard shortcut for this will be listed under Show Hover. On macOS its ⌘K ⌘I for example. This will show up in a floating window. I’m not sure if there is an option to have this information show up in the terminal pane.

Keyboard shortcut reference: Visual Studio Code Key Bindings

4 Likes

Thanks for the reply. Can you explain what you mean here:

keyboard shortcut for this will be listed under Show Hover

Is that supposed to be a menu item? If so I have none such. Also no such command under Shift-Command-P.

Update: Oops, there it is! sorry for the noise. I don’t know why i didn’t see it the first time.

Sorry, my original post was a little vague. Vscode has a command to display all keyboard shortcuts (search for keyboard shortcut reference after shift + command + P). Vscode will open a pdf listing all keyboard shortcuts then. The ‘Show Hover’ option will be listed on this keyboard shortcuts reference.

I’m a 39-year emacs user myself (started with Gosmacs on 4.2 BSD); perhaps you could share your experiences, once you’ve had some time to fully-evaluate vscode ? At some level I’m still “old yells at clouds” about all this newfangled stuff, but I do recognize that if it’s truly effective, it’d be stupid to eschew it. But hard to evaluate it, since the people I know who use the stuff were never Emacs “power users”, and I don’t feel like putting in the work unless it’s actually gonna work. That, and it’s either gotta run on a chromebook in the Linux container, or support tramp-mode like remote access to a machine over SSH where all the actual compiling/running/merlin happens.

But anyway, if you have interesting things to report, at least one reader would like to read 'em.

Thanks :slight_smile:

Ok, next problem: I’m trying to create a new dune-project file. That is listed as one of the file types when I hit Command-N ; however as soon as I select that from the drop-down, I get thrown into the vscode home screen. I have already created a dune-workspace this way, so my consistency-addled brain expects dune-project to work as well. Maybe a bug?

I can reproduce this behavior as well. For me this also happens if I select a different file-type (json for example). This might be a bug in the Ocaml-platform plugin as I am only seeing this behavior when I’m in an OCaml project where this plugin is active.

If you happen to use vim plugin with vscode, you can do g + h which I find quite convenient

1 Like

It has not worked out. I gave up when I discovered that the git hookup was severely broken in the vscode version du jour, continually posting new notifications after I first opened it. It was probably fixed quickly but my nerves cannot accept this kind of disruption, and of course vscode wants to update itself and its plugins behind my back daily.

Apart from that, I just cannot live without things like the universal prefix argument - and I cannot understand how vscode users can live without it, either :stuck_out_tongue:

The true reason I installed vscode in the first place was vscoq. ProofGeneral is bloated with dead code and it used to violate many Emacs conventions, and because coqide is tied to gtk it is hard to impossible to get working right on the Mac. After I got rid of vscode I made another, more serious attempt to get ProofGeneral to behave, and it turns out the current versions are quite a bit nicer though the bloat remains.