using vim inside screen session

I have been facing this error so often now.
Whenever I am logged into a remote machine in a screen session, the vim doesn't work.


$ vim /etc/bash.rc
error vim terminal: capability "cm" required


After some research, I could fix it as follows.

When this or any other error comes up while using vim in a screen session, first immediately check what is TERM set to. In my case, it was xterm-screen


$ echo $TERM
screen.xterm-256color


Change it as follows and you should be good to use vim without any issue.

$ export TERM=xterm

$ echo $TERM
xterm

Now, vim works like charm. ๐Ÿ‘

Comments

Popular posts from this blog

Hello !! GOD here…

Investing in Direct Mutual Funds: Zerodha Coin vs Kuvera

My Blog on Linux Kernel

Excel Trick: Converting Text Case

smallest joke ever

DellEMC Jobs | Bangalore/Pune | Filesystem, Storage, C/C++, Dev/QA | 10 Sep 2018

What's with this Bakery's Aroma in Malls

Lost in Linux Kernel

in one line: block storage vs file storage vs object storage