VSCode integrated terminal pass CTRL+SPACE to Clink - visual-studio-code

I am using Clink for Windows and it works mostly fine in the integrated terminal from VSCode. Since it is invoked via ctrl+space I tried removing all related VSCode keybindings. With shift+alt+? (clinks keybinding browser) I found that VSCode sends the wrong keystrokes when pressing ctrl+space:
C-# : set-mark -- Set the mark to the cursor point. If a numeric argument is supplied, sets the mark to that position
When I am in a normal terminal I get:
C-Space : clink-select-complete -- Perform completion by selecting from an interactive list of possible completions; if there is only one match, insert it

Related

Powershell 7.3.0 Tab completion not working

I've recently upgraded PowerShell to version 7.3.0 version and now, when I type a command, I see its suggestions like when I'm typing pip it adds list like in this image. Or when I type start of the command it suggests its full name.
The problem is that when I press Tab it doesn't complete the command, instead it just starts listing current directories, i.e. here is an image after pressing Tab once.
Also even when I start typing the full name of the command like pip li it still shows the ending, but when pressing Tab it just does nothing.
I expected this to complete the current command with the suggestion after Tab is pressed.
I've tried to google this problem but haven't found the exact same case I have with 7.3.0 version.
Just press -> (right arrow) key
If you want to change key bindings:
source: https://devblogs.microsoft.com/powershell/announcing-psreadline-2-1-with-predictive-intellisense/
Key Bindings for Predictions
Key bindings control cursor movement and additional features within the prediction. To support users running Predictive IntelliSense on multiple platforms, key bindings are user-settable from the command line or your profile script.
PSReadLine contains functions to navigate and accept predictions. As an example, to accept a displayed prediction, PSReadLine contains functions:
AcceptSuggestion – Accept the current inline suggestion
AcceptNextSuggestionWord – Accept the next word of the inline suggestion
AcceptSuggestion is built within ForwardChar, which by default is bound to RightArrow. Pressing RightArrow accepts an inline suggestion when the cursor is at the end of the current line.
AcceptNextSuggestionWord is built within the function ForwardWord, which can be bound with Ctrl+f by Set-PSReadLineKeyHandler -Chord "Ctrl+f" -Function ForwardWord. Pressing Ctrl+f accepts the next word of an inline suggestion when the cursor is at the end of current editing line.
As a user, you can bound other keys to AcceptSuggestion and AcceptNextSuggestionWord for similar functionalities. Search for ForwardCharAndAcceptNextSuggestionWord in SamplePSReadLineProfile.ps1 for an example to make RightArrow accept the next word from inline suggestion, instead of the whole suggestion line.
List of additional suggested key bindings defined in PSReadLine SamplePSReadLineProfile.ps1

VsCode Vim Extension command to enter insert mode

I am wondering what is the vim command that one can use to enter the insert mode? In other words, what command is executed when you press "i" from normal mode. I want to use this command to construct custom actions using "extension.multiCommand.execute". In particular, I want to bind cmd+D in visual mode such that after selecting a text, pressing cmd+D will first put me in the insert mode without changing the selection and then will add another cursor each time I press cmd+D to the next found instance of the selected text.
Thanks

How can I make VSCode keybindings override keybindings for the terminal?

Here's an example:
In most terminals (including VSCode's) Control + M sends the Return key (carriage return) to the shell.
I would like instead for it to follow my defined keybinding in keybindings.json. In my case for example, Control + M would be used to build chords with other commands (e.g. Ctrl+M Ctrl+S to hide/show the side bar, whether I trigger it from the Panel in the terminal or anywhere else).
Is there a way to override terminal keybindings with VSCode ones?

neovim spits out weird character on terminal upon closing

I have install neovim and linked the .vimrc to the .config/nvim/init file. neovim splits out the following character [2 q% on the terminal screen upon closing. The weird characters even appears when I press : inside neovim.
In Nvim 0.1.7, that happens because your terminal (1) doesn't support cursor shape control sequences, and (2) doesn't properly ignore unknown sequences. To avoid it, put this in your ~/.config/nvim/init.vim:
let $NVIM_TUI_ENABLE_CURSOR_SHAPE=0
That's also mentioned in man nvim.
In Nvim 0.2, cursor styling is controlled by the guicursor option. If you see "weird characters" like [2 q%, it means your terminal (probably) doesn't support this feature, but guicursor was enabled somewhere in your configuration. Disable guicursor by setting it empty:
:set guicursor=
(Nvim disables guicursor by default if it's not sure about your terminal. But if you set guicursor anyway, Nvim will send the cursor shape control sequences to the terminal.)

M-RET and M-UP/DOWN not working in Emacs org-mode in console/terminal

I'm using emacs23 on Ubuntu 32-bit 10.04/10.10 with GNOME and Compiz.
Pressing M-RET in an org-mode plain list in Emacs (GUI) inserts a new item. Pressing M-Up moves the item up in the list.
These keys don't work as expected in emacs -nw under Terminator and gnome-terminal. The M-Up key does nothing, whereas the M-RET key simply moves the cursor down one line and indents the position. The keys also don't "work" in xterm, which inserts \215 instead. Pressing ESC-RET or ESC-Up instead produces the expected functionality. The same problems exist if I run emacs -nw on a headless server accessed via ssh under Terminator, gnome-terminal and xterm.
I've searched both generally and on the org-mode Gmane list for an answer to this, but have not found anything. Is this a known issue with org-mode or is it related to the terminal emulator and/or the Window Manager?
In addition to the keys in my question, S-TAB, S-Left, S-Right, S-Up and S-Down were not working over ssh and PuTTY. Using certain keys on a TTY connection (ssh, screen, PuTTY) is a known issue.
Alternative keys are included in org-mode as detailed in 'Using Org on a TTY' in the org-mode manual.
Alternative key combinations exist
for equivalent to M-RET
M C-m
"<return>" is the Return ↩ key while emacs runs in a graphical user interface.
"RET" is the Return ↩ key while emacs runs in a terminal.
"RET" is also equivalent to "C-m" (【Ctrl+m】). (http://ergoemacs.org/emacs/emacs_key_notation_return_vs_RET.html)
as equivalents for M-<up/down> you can use
ESC-<up>
ESC-<down>
The menubar of terminal emulator is not letting the M key that is meant for Emacs be passed down to Emacs. For Emacs to receive the M key as it is supposed to, you could either use the Esc or disable the menubar and use M key in Emacs as usual.
ADDED:
For the xterm, if you do CTRL+Mouse Button 1, you will see "Meta sends Escape". You need to make sure that option is checked/enabled to make M work as it should in Emacs.