I'm trying to bring to work together 3 things: ConEmu, Cygwin and vim. The vim in question is not Cygwin vim, but the native Windows vim from gvim package (chosen because Cygwin vim does not support xterm 256 colors). 256-color syntax highlighting seems to work after I followed the instructions on StackOverflow, but I cannot solve another problem.
Cygwin vim works fine with alternate screens: when I exit it, the screen content is cleared and I can see my command history back again. Windows vim does not: when I exit it, the command prompt appears underneath the page of former vim content. This question has been asked several times on StackOverflow and SuperUser: here, here, here and here. However, none of the solutions in these questions seem to work in ConEmu/Cygwin. I tried:
let &t_ti="\e[?47h" let &t_te="\e[?47l"
let &t_ti="\e[?1049h" let &t_te="\e[?1049l"
.screenrc. I'm not sure that it was supposed to have any effect at all, since I didn't even have
screeninstalled in Cygwin. Installing it didn't change anything, though. Explicitly launching vim with
screenbrings weird results: half of escape sequences and codes and broken, not every keypress is recognized, and the console dimensions are ~80x40 regardless of
$TERM in vim currently is
xterm, as it has been set in
.vimrc config required to enable 256 color support in ConEmu. However, sending xterm-like escape sequences does not seem to clear screen whatsoever.
I'd very glad for any help with this issue.