Enable the altscreen
option in ~/.screenrc
.
Full-screen programs use a terminal feature called "alternate screen", which has a separate screen buffer and (often) minor behavior changes to adapt to such interfaces. The program enters the 'alternate' screen when started, and goes back to 'normal' when exiting.
Since Screen itself acts as a terminal emulator, it has to emulate the alt-screen feature as well. All other terminal emulators enable this feature by default, but Screen has it hidden behind the altscreen
option for some historical reasons.
Partly based on: tmux-and-screen-256-term-not-supported.
The issue resolves itself when using a 'screen' term. To identify as 256 colors correctly it should be 'screen-256colors'. Which leads to the error below :
E558: Terminal entry not found in terminfo
'screen-256colors' not known. Available builtin terminals are:
builtin_gui
builtin_ansi
builtin_xterm
builtin_iris-ansi
builtin_d
To create a screen-256colors entry:
infocmp screen > screen-256color.ti
Changing (screen-256color.ti)
# Reconstructed via infocmp from file: /usr/share/terminfo/s/screen
screen|VT 100/ANSI X3.64 virtual terminal,
am, km, mir, msgr, xenl,
colors#8, cols#80, it#8, lines#24, ncv#3, pairs#64,
to :
# Reconstructed via infocmp from file: /usr/share/terminfo/s/screen
screen-256color|VT 100/ANSI X3.64 virtual terminal,
am, km, mir, msgr, xenl,
colors#256, cols#80, it#8, lines#24, ncv#3, pairs#64,
Now create the terminfo :
tic screen-256color.ti
Best Answer
Here's what I use for my HTML5 and CSS3 Media Queries:
First create the folder:
mkdir -p ~/.vim/after/syntax/css
Then edit:
vi .vim/after/syntax/html.vim
and put:and then vi
.vim/after/syntax/css/css3-mediaqueries.vim
and put: