0

This question follows this one.

I set some custom keymaps to ease window resizing, such as nmap <A-j> <C-w>-. However, they do not seem to work in any window. But, if I play the command manually, it works. What am I getting wrong?

NOTE: <C-j>, <C-k> are already taken to navigate. Here I want to resize, hence the different special key "Alt".

5
  • 1
    On some terminal the mapping to <Alt> could be problematic. What if you have: nnoremap <A-j> :echom 'alt-j'<Cr> and hit <Alt-j>. Do you have alt-j in the messages (i.e.: in the result of the :messages command)? Commented Jun 15 at 2:05
  • 1
    @VivianDeSmedt no, I don't have any message printed..
    – mEm
    Commented Jun 15 at 6:37
  • It probably means you have to do something to catch the <Alt> key. Could you tell us: what is the version of Vim you are using? What is your OS (Linux, maxOS, Windows)? What os the terminal you are using (Tmux, Kitty, cmd, ...)? Commented Jun 15 at 8:23
  • @VivianDeSmedt vim version: VIM - Vi IMproved 8.2 (2019 Dec 12, compiled May 03 2024 02:37:51) Included patches: 1-579, 1969, 580-1848, 4975, 5016, 5023, 5072, 2068, 1849-1854, 1857, 1855-1857, 1331, 1858, 1858-1859, 1873, 1860-1969, 1992, 1970-1992, 2010, 1993-2068, 2106, 2069-2106, 2108, 2107-2109, 2109-3995, 4563, 4646, 4774, 4895, 4899, 4901, 4919, 213, 1840, 1846-1847, 2110-2112, 2121, OS LInux Ubuntu 22.04.1, using its built-in terminal.
    – mEm
    Commented Jun 15 at 13:57
  • 1
    Maybe this answer could help you. Commented Jun 16 at 4:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.