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
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
Post a Comment