Skip to main content
edited title
Link
Vivian De Smedt
  • 21.2k
  • 5
  • 22
  • 40

Mapping a "Command" key in neovimNeovim / alacritty

Replaces the screenshot with text, and capitalises Neovim
Source Link
Tae
  • 2.2k
  • 14
  • 22

I am failing to map Command+tCommand+T, Command+[ and Command+] keys in neovimNeovim under macOS / Alacritty.

I've reduced my neovim/AlacrittyAlacritty to be minimal. Both configs in their entirety can be seen on the screenshot:

env:
  TERM: xterm-256color
font:
  size: 16
key_bindings:
  - {key: T,        mods: Command, chars: "\×80\xfc\x80t"}
  - {key: LBracket, mods: Command, chars: "\×80\xfc\×80["}
  - {key: Bracket,  mods: Command, chars: "\×80\xfc\×80]"}

enter image description here My thinking process for assigning the chars in alacrity was this And also Neovim's:

vim.kevmap.set('n', '<D-t>', vim.cmd.tabnew)
vim.keymap.set('n', '<D-[>', vim.cmd.tabprevious)
vim.keymap.set('n', '<D-]>', vim.cmd.tabnext)
  1. I went to nvim,

  2. entered the following command,

    echo "\<D-t>"
    
  3. got an output:

    <80><fc><80>t
    
  4. used the output to add a binding in Alacritty:

    - { key: T, mods: Command, chars: "\x80\xfc\x80t" }
    

What am I doing wrong?

I am failing to map Command+t, Command+[ and Command+] keys in neovim under macOS / Alacritty.

I've reduced my neovim/Alacritty to be minimal. Both configs in their entirety can be seen on the screenshot:

enter image description here My thinking process for assigning the chars in alacrity was this:

  1. I went to nvim,

  2. entered the following command,

    echo "\<D-t>"
    
  3. got an output:

    <80><fc><80>t
    
  4. used the output to add a binding in Alacritty:

    - { key: T, mods: Command, chars: "\x80\xfc\x80t" }
    

What am I doing wrong?

I am failing to map Command+T, Command+[ and Command+] keys in Neovim under macOS / Alacritty.

I've reduced my Alacritty to be minimal:

env:
  TERM: xterm-256color
font:
  size: 16
key_bindings:
  - {key: T,        mods: Command, chars: "\×80\xfc\x80t"}
  - {key: LBracket, mods: Command, chars: "\×80\xfc\×80["}
  - {key: Bracket,  mods: Command, chars: "\×80\xfc\×80]"}

And also Neovim's:

vim.kevmap.set('n', '<D-t>', vim.cmd.tabnew)
vim.keymap.set('n', '<D-[>', vim.cmd.tabprevious)
vim.keymap.set('n', '<D-]>', vim.cmd.tabnext)
  1. I went to nvim,

  2. entered the following command,

    echo "\<D-t>"
    
  3. got an output:

    <80><fc><80>t
    
  4. used the output to add a binding in Alacritty:

    - { key: T, mods: Command, chars: "\x80\xfc\x80t" }
    

What am I doing wrong?

Source Link

Mapping a "Command" key in neovim / alacritty

I am failing to map Command+t, Command+[ and Command+] keys in neovim under macOS / Alacritty.

I've reduced my neovim/Alacritty to be minimal. Both configs in their entirety can be seen on the screenshot:

enter image description here My thinking process for assigning the chars in alacrity was this:

  1. I went to nvim,

  2. entered the following command,

    echo "\<D-t>"
    
  3. got an output:

    <80><fc><80>t
    
  4. used the output to add a binding in Alacritty:

    - { key: T, mods: Command, chars: "\x80\xfc\x80t" }
    

What am I doing wrong?