neovim Ctrl-Cursor key bind prints characters in rxvt terminals, does what it should in others - neovim

I have neovim configured to change the size of a split window via Ctrl-Cursor keys:
keymap("n", "<C-Up>", ":resize -2<CR>", opts)
keymap("n", "<C-Down>", ":resize +2<CR>", opts)
keymap("n", "<C-Left>", ":vertical resize -2<CR>", opts)
keymap("n", "<C-Right>", ":vertical resize +2<CR>", opts)
neovim runs in a rxvt-unicode terminal, i3wm is my window manager.
I've recently switched to rxvt, there are no active plugins.
When I'm in neovim normal mode and use Ctrl-[cursor] to resize, it switches to insert mode, prints a single letter at the line of the cursor and moves the content below down.
Ctrl-Left does print: d
Ctrl-Top does print: a
Ctrl-Right does print: c
Ctrl-Down does print: b
The keybind does work and resizes the nvim windows if I use gnome-terminal or xterm.
My .Xdefaults file doesn't define any keybinds that involve the cursor keys. Here's my complete .Xdefaults file:
! rxvt settings
! transparency settings
URxvt.inheritPixmap: true
URxvt.transparent: false
URxvt.tintColor: #000000
URxvt.shading: 45
! other settings
URxvt.geometry: 90x25+180+200
URxvt.perl-lib: /home/dominique/.config/urxvt/
!URxvt.perl-ext-common: matcher,keyboard-select,resize-font
!URxvt.perl-ext-common: matcher
URxvt.cursorColor:magenta
URxvt.scrollBar:False
URxvt.saveLines:3000
URxvt.preeditType:Root
URxvt.modifier: alt
! plugins
!! resize-font
!URxvt.resize-font.smaller: C-j
!URxvt.resize-font.bigger: C-k
!! open URL in browser
URxvt.urlLauncher: chromium
URxvt.matcher.button: 1
! Colors
URxvt*background: #000000
URxvt*foreground: #B2B2B2
!! black
URxvt*color0: #000000
URxvt*color8: #686868
!! red
URxvt*color1: #B21818
URxvt*color9: #FF5454
!! green
URxvt*color2: #18B218
URxvt*color10: #54FF54
!! yellow
URxvt*color3: #B26818
URxvt*color11: #FFFF54
!! blue
URxvt*color4: #1818B2
URxvt*color12: #5454FF
!! purple
URxvt*color5: #B218B2
URxvt*color13: #FF54FF
!! cyan
URxvt*color6: #18B2B2
URxvt*color14: #54FFFF
!! white
URxvt*color7: #B2B2B2
URxvt*color15: #FFFFFF
! normal font
URxvt.font:xft:MesloLGS NF:size=12:antialias=true,xft:Hack Nerd Font Mono:pixelsize=16:antialias=true,xft:DejaVu Sans Mono:pixelsize=13:antialias=true
! bold font
URxvt.boldFont:xft:MesloLGS NF:size=12:antialias=true:Bold,xft:Hack Nerd Font Mono:pixelsize=16:Bold:antialias=true,xft:DejaVu Sans Mono:pixelsize=13:Bold:antialias=true
I went ahead and disabled all keybinds in i3 that include the cursor keys but that doesn't fix it.
I couldn't find any default keybinds for either of the components that seem relevant.
If I override the key-combinations in .Xdefaults then the behaviour stops for neovim in rxvt terminal and nothing at all happens:
URxvt.keysym.C-Left: command:\000
URxvt.keysym.C-Right: command:\000
URxvt.keysym.C-Top: command:\000
Rxvt.keysym.C-Down: command:\000
Frankly, I'm out of ideas what this could be.... Thanks

Related

How do I remove solid colour background behind text in vscode terminal

I want to remove the solid colour background behind all the folder names in vscode. This picture shows the terminal window
Assuming you are using Linux, you can completely remove colors:
cd /
vim ~/.bashrc
Click 'i' for insert.
Scroll to force_color_prompt=yes, and comment it out like this #force_color_prompt=yes
Hit Esc. Then Colon. Type "wq" and enter to save.
Or, remove solid background only:
dircolors -p | sed 's/;42/;01/' > ~/.dircolors
Then update the terminal so changes take effect:
source ~/.bashrc
Done!

Change background of selected block

When I place my cursor on the extremity of a block (represented by the white drawn cursor on the picture below) VSC highlight both the ending and the starting symbol of that block.
The red line on the picture represent the starting and the ending of that block. Where can I set the option for VSC to automatically use a background color to highlight the current selected block ? (I am really more of a visual guy and I like to feel where's my current locations when I am coding.)
You are going to need an extension to do that, it isn't built-in. Try:
Indented Block Highlighting
I am not sure it supports all languages but see if it works in your case.
Bracket-pair-colorizer does something similar but more subtle. See "bracket-pair-colorizer-2.showHorizontalScopeLine".
.
And see How to change indent guide line color between brackets in VSCODE? - perhaps highlighting the active indent guide will be enough for you?
Using (in your settings.json):
"workbench.colorCustomizations": {
"editorIndentGuide.background": "#bbb",
"editorIndentGuide.activeBackground": "#f00e0e",\
}

Color issues with zsh in wsl

So, I'm trying to setup oh-my-zsh inside a wsl terminal (using powershell as the console here, but I get the same issue in cmd). I think I setup all my colors correctly:
And when I run this:
print -P '%B%F{red}co%F{green}lo%F{blue}rs%f%b'
I get the expected:
But, my prompt is still wrong, as you can tell. I'm using the agnoster theme and the grey background on the pwd there should be blue.
Is there any way to see the escape sequences so I can determine if the problem is with the escape sequence vs the rendering thereof?
We could examine the $PROMPT (or $PS1).
Indeed, oh-my-zsh's agnoster theme uses PROMPT_SUBST for it. So, we can get the raw escape sequences with redirecting or piping the output of print -P:
$ print $PROMPT
%{%f%b%k%}$(build_prompt)
$ print -P $PROMPT | cat -v ;# or redirect to a file as you like
^[[39m^[[0m^[[49m^[[40m^[[39m me#mycomputer ^[[44m^[[30mM-nM-^BM-0^[[30m ~ ^[[49m^[[34mM-nM-^BM-0^[[39m
These raw escape sequences; the ANSI escape codes, are well described in https://en.wikipedia.org/wiki/ANSI_escape_code#Colors. It is the CSI codes CSI n m SGR - Select Graphic Renditoin.
Try to describe the above output:
(^[[39m: The first two characters are escaped by cat -v. We've got ESC[39m.)
^[[39m^[[0m^[[49m: which are from %{%f%k%b%} part of the print $PROMPT output. ^[[39m to reset default foreground color, ^[[0m reset every effect and [[49m to reset default background color.
^[[40m^[[39m me#mycomputer: bg black and fg default color
^[[44m^[[30m M-nM-^BM-0: bg blue and fg default color (M-nM-^BM-0 is cat -v escaped form of )
At this point, it seems that the prompt outputs a bg blue code for pwd. You could check with
print -P '%b%F{red}co%F{green}lo%F{blue}rs%f%b' (Note: the first '%b')
This means the powershell's color pallet setting does not match with the ANSI escape sequences'. We could check whether the terminal's color pallet setting is correct or not with 16colors.sh in xterm distribution if we have sh with seeing the output of sh ./16colors.sh.
(An example xterm default setting's output could be found for example: https://www.in-ulm.de/~mascheck/various/xterm/16-table.html)
It seems that your powershell's Solarized(?) theme maps the ansi color sequence blue (^[[44m or ^[[34m) as grey-ish color for our eyes.

Aquamacs 24.4 color-theme and font color

I have the following code in my preferences.el file:
(color-theme-sanityinc-solarized-dark)
(set-default-font "Consolas-18")
It almost works. The color-theme loads and changes most of the colors to those of the solarized theme; however the font is changed to almost-unreadable black. The weird part is that when I M-x color-theme-sanityinc-dark I get all the correct colors. Then I M-x set-default-font Consolas-18, and I get the correct font.
I only use emacs/aquamacs to play with lisps, I usually use Vim. (The emacs key combinations hurt my hands after long use). Am I missing some trick to make the color-theme loading work?
Aquaemacs sets the font colour to black in the following file:
~/Library/Preferences/Aquamacs Emacs/customizations.el
If you remove the line that sets the foreground-color to black it should work.

Emacs parenthesis match colors styling

I'm using prelude emacs with solarized theme and parenthesis highlights are hardly visible and looking very ugly. I've tried disabling show-smartparen-mode also show-paren-mode but nothing seems to disable it. I'm not sure, which mode is making highlight parenthesis. Please check the image below:
I would like to change background color of parenthesis to something else so it is more visible. I would appreciate if anyone could provide any help/comments in this regards. Thanks!
EDIT
Problem: The matching parenthesis highlight, if you look at image above, my cursor is immediate right of the ) therefore ( and ) are highlighted in bluish shade which is not visible.
What I want: I would somehow like to change background color of this highlight.
After doing C-u C-x = with the cursor on the highlighted parenthesis, you will know what the highlighting face is. If you just want to change its background color, then do M-x customize-face FACE, where FACE is the face name.