0

nnoremap <leader>rt :term<cr> <C-\><C-n> :resize 10<cr> i

I've tested the remap manually, it works as expected. A terminal window spawns I go into terminal normal mode, resize it to 10 lines of height. Then return to terminal insert mode.

0
0

Generally speaking, whatever you type in the right hand side is going to be replayed. That includes spaces. And you have, by my count, three unneeded spaces.

Your command also failed for me. Then I cleaned it up...

nnoremap <leader>rt :term<cr><C-\><C-n>:resize 10<cr>i

...and it works exactly as intended

2
  • i see, I never realized that the spaces matter. Although I should have tbh. – DexYap Apr 5 at 23:48
  • I wouldn't call it an obvious fact. You're definitely not the first to make such a mistake. :) – B Layer Apr 5 at 23:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.