Odd behavior of backspace in Vim (SSH to Linux from Mac) - vim

I didn't change any setting of my Vim, but today the Backspace gets some crazy behavior. Every time when I hit it, it does not delete a character, but prints ^?. Anyone knows what is going on?

Not sure why it would randomly start doing this based on the information you gave, but trying adding this line to your .vimrc
set backspace=start,eol,indent

The problem comes from the communication between Mac Terminal the Linux Terminal.
Go to the Mac Terminal -> Preferences -> Advanced tab, check the option "Delete sends Ctrl-H". Then after I login to Linux, and Backspace works just fine in Vim.

In Mac Mavricks and Yosemite Open a terminal, then command+, for preferences, click on the profile tab, click on the -keyboard- menu, then add +
Key: very bottom, <= Delete
Modifier: ^ Control
Action: Send Text
Text: H
click Ok

Related

Can VSCodeVim Ignore Windows Key Combination?

I have Windows+I set as a keyboard shortcut to open up chrome, but if I try to use that while keyboard focus is on VSCode with vscodevim enabled, it treats it as if I had just typed I by itself (and enters insert mode).
I'm running mate desktop manager on Arch Linux. The Win-I shortcut is set through system -> preferences -> hardware -> keyboard shortcuts.
I've tried adding the following to settings.json:
"vim.handleKeys": {
"<T-i>": false
}
I've also tried <Win-i>, <T-I>, <Win-I>, <Mod4-I>.
Is there a different syntax to specifiy windows key being pressed? Or a different way to have ideavim register that it's pressed and ignore the input? The key is displayed as Mod4 in the mate keyboard shortcuts menu.
I know I can map the chrome shortcut to something else like Alt+F3, but I'm hoping to keep it as Win+I if possible. Any help appreciated!
Try adding the following setting:
"keyboard.dispatch": "keyCode"
Restart vscode after that.

Number pad issues when using a remote 'nano' instance in PuTTY

I'm using PuTTY on an old Windows laptop to communicate with Ubuntu.
When using the terminal, everything is fine and I can use the numpad normally. However, when I open anything in nano, all these keys have functions instead of numbers.
I did a search about this and found a few solutions to change PuTTY settings, but they didn’t have any effect. Is this an issue with PuTTY or with nano?
For anyone else with this problem—this is PuTTY specific and is caused by the application keypad mode sending escape sequences to nano.
To solve it:
From an open PuTTY terminal:
Ctrl + right-click to bring up the context menu
Select "Change Settings..."
Select Terminal → Features in the left-hand navigation tree
Check "Disable application keypad mode"
Reference: Description of bug on the Vim (FANDOM.com??) wiki
nano uses the curses keypad function, turning it on (so that curses handles cursor-keys). The terminal description turns on application mode for both the cursor-keys and the numeric keypad, which with PuTTY makes it send the non-numeric stuff.
You could modify the terminal description to remove the numeric-keypad part of the smkx capability:
infocmp -1 >foo
vi foo
... look for smkx=\E[?1h\E=,
... change that to smkx=\E[?1h,
tic foo

Copy/pasting feature in codeblocks in linux

I have installed Code::Blocks 12.11 in my linux mint but pasting input at runtime in the command line(I think it is called command line)doesn't seem to work.I have to type the whole input inorder to get output.Can anybody tell me how to fix this?
P.S :- I have tied ctrl+V as well as right click and paste but nothing really working in my case
This problem arises when you have xterm as your launch terminal.You can solve this by switching your terminal from xterm to gnome-terminal.
Go to Settings -> Environment -> Terminal to Launch Console Programs
and change the launch terminal from xterm to gnome terminal from the options.
In the terminal, for copy and paste:
Shift+Ctrl-c and Shift+Ctrl-v
In the Xterm, for pasting:
Middle click or Shift-Insert
if you want to copy in the xterm, you just select the text with your mouse and paste using the middle click or Shift-Instert, but it just works inside the xterm.

strange issue, keyboard inputs locked by emacs?

I have a crazy problem on CentOS.
I was doing some editing in emacs when I accidentally hit some keys. Next thing I know, none of my regular keystrokes work.
I wasn't able to close emacs no matter what I tried (mouse on X doesn't work either).
I logged in from another PC and killed the emacs process.
However, this still doesn't fix the problem. Now, when I click my desktop shortcut, I can open another konsole, however, I can't type anything into that console!
When I click on the X to close it, I get this black hand, not the regular arrow.
Further, hitting enter doesn't do anything, and any keystrokes I type don't show up in the terminal.
However, if I type s, the Search heading on the terminal window drops down.
Does anybody know how to get out of this weird mode so I can use my PC again?
EDIT: More information. I think my linux is stuck in something similar to Windows ALT mode. For instance, in Windows, when you hit ALT, followed by F, the File menu will drop down. On my PC, when I hit F, the File menu immediately comes down on the active terminal. However, I cannot for the life of me get out of this mode. Been stuck for over an hour now!!
Hitting the ALT key may have solved the problem. I'm not sure if that was what ended up fixing it, but after I hit the ALT key a bunch of times, I got the VNC display to work properly again.

Show input keystrokes in Vim

When I installed Vim on Windows, it (specifically gVim) used to show to show me the keystrokes I am currently entering in the bottom right corner of the screen.
But now I'm working with gVim on Linux, and it doesn't show me.
Is there a setting (:set) I need to turn on to do this ?
The option you're looking for is showcmd.

Resources