jeffreytse / zsh-vi-mode

💻 A better and friendly vi(vim) mode plugin for ZSH.
MIT License
3.13k stars 109 forks source link

Add an option to set the term type for handling escape sequences properly #85

Closed jeffreytse closed 3 years ago

jeffreytse commented 3 years ago

As we known, different terminal emulators will give the environment variable TERM a default value (e.g. xterm-256color, rxvt-256color, etc.). However, due to historical reasons, most terminal emulators have been implemented a superset of VT100 and VT110, it's the most VT10X escape sequences.

In order to handle the escape sequences properly, we should give a properly value to the the TERM. As it's important for terminal emulator to handle escape sequences properly, so we can not casually change it.

Here we provide an option ZVM_TERM for users to configurate and no need to change the global TERM , its default value is the same as TERM. For some reasons, you can change it to let this plugin work properly.

ZVM_TERM=xterm-256color