This question dovetails from How do I get the numpad to work in vim using iterm2 on osx with term=xterm? and How do I get the numpad to work in vim using iterm2 on osx with term=xterm? but I couldn't find elements described in those respective answers.
I am accessing a Linux box through VNC from a Windows box.
On the Linux box, through this VNC session, I'm editing in Vim, and in insert mode, when I type '/' and '*' from the numeric keypad (i.e. to start a C-style comment), the characters 'o' and 'j' are inserted instead (specifically, a carriage return seems to be inserted, then the 'o' or 'j' is inserted at the first tab stop).
The questions and answers that I noted seem MacOs-specific; e.g. between the terminal running on the Linux box and VNC's Preferences, I couldn't find any reference to "xterm with Numeric Keypad".
Can someone advise how to fix this problem in my described environment? I'm unclear if the source of this behavior is Vim, the terminal, or VNC.
$TERM, Vim version, and .vimrc, if they're relevant:
>vim --version VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Dec 21 2016 15:22:28) >echo $TERM screen-256color >cat ~/.vimrc set backspace=indent,eol,start set shiftwidth=2 set softtabstop=2 set expandtab set smarttab filetype plugin indent on autocmd FileType make set noexpandtab shiftwidth=4 softtabstop=0 set cino+=(0 set statusline= set statusline +=\[%n] "buffer number set statusline +=\%F "File set statusline +=%=%l/%L "currentLine/totalLine set statusline +=%4v "virtual column set laststatus=2 set t_Co=256 colorscheme torte set number "let g:netrw_liststyle = 3 syntax on
Update: One other probably relevant factor: I am running tmux atop my bash shell. My .tmux.conf:
>cat ~/.tmux.conf unbind C-b set -g prefix C-a bind C-a send-prefix set-window-option -g mode-keys vi set -g set-titles on set-window-option -g automatic-rename off set-option -g allow-rename off