{"id":1450,"date":"2012-03-02T21:57:23","date_gmt":"2012-03-03T02:57:23","guid":{"rendered":"http:\/\/www.kickflop.net\/blog\/?p=1450"},"modified":"2012-03-02T22:47:35","modified_gmt":"2012-03-03T03:47:35","slug":"256-color-support-under-gnu-screen-including-non-gui-vim","status":"publish","type":"post","link":"https:\/\/www.kickflop.net\/blog\/2012\/03\/02\/256-color-support-under-gnu-screen-including-non-gui-vim\/","title":{"rendered":"256-color support under GNU screen, including non-GUI vim"},"content":{"rendered":"<p>Finally, I got 256-color support under GNU screen, including vim!  I really don&#8217;t know how or why this was so difficult for me to get working, but it was a royal time sink.  I read just about every thread everywhere about anything related to this topic.<\/p>\n<p>All I can say is: This worked for me.<\/p>\n<p>I&#8217;ve turned off comments on this post, because I don&#8217;t want to even begin to suggest that I will have any answers to any questions you may ask.<\/p>\n<pre>\r\n# .bash_profile\r\n#\r\n# I recursively copied \/usr\/share\/lib\/terminfo on a modern\r\n# Linux box to $HOME\/.terminfo so that I could have modern\r\n# stuff with me wherever I go, like Solaris 10 which has\r\n# no modern 256 color crap.  Make sure you have the screen-256color\r\n# terminfo stuff.  Then...\r\nTERMINFO=$HOME\/.terminfo\r\n# xterm-256color should work below as well, but since I am\r\n# always connecting from PuTTY, I use this which is technically\r\n# more correct.\r\nTERM=screen-256color\r\n<\/pre>\n<pre>\r\n# .screenrc portion for GNU screen which MUST BE compiled with 256\r\n# color support.\r\n#\r\nterm \"screen-256color\"\r\n<\/pre>\n<pre>\r\n\" .vimrc portion\r\n\"\r\n\" \"People\" say this should never be required if your terminfo crap is\r\n\" correct, but it is required for me *when running vim under GNU screen*\r\nset t_Co=256\r\n\r\n\" Enable syntax highlighting\r\nsyntax enable\r\n\r\n\" Use whatever you like here\r\ncolorscheme lucius\r\n\r\n\" Dunno, this seems to be the only thing that leaves my terminal in a\r\n\" proper state once I exit vim in 256-color mode under GNU screen\r\n\" when using either TERM=putty-256color or TERM=xterm-256color.  Found it\r\n\" mentioned in some IRC log after digging through Google results for an\r\n\" hour or more.\r\nset t_ti= t_te=\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Finally, I got 256-color support under GNU screen, including vim! I really don&#8217;t know how or why this was so&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24,11,48],"tags":[],"class_list":["post-1450","post","type-post","status-publish","format-standard","hentry","category-programming","category-sysadmin","category-unixlinux"],"_links":{"self":[{"href":"https:\/\/www.kickflop.net\/blog\/wp-json\/wp\/v2\/posts\/1450","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kickflop.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kickflop.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kickflop.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kickflop.net\/blog\/wp-json\/wp\/v2\/comments?post=1450"}],"version-history":[{"count":7,"href":"https:\/\/www.kickflop.net\/blog\/wp-json\/wp\/v2\/posts\/1450\/revisions"}],"predecessor-version":[{"id":1458,"href":"https:\/\/www.kickflop.net\/blog\/wp-json\/wp\/v2\/posts\/1450\/revisions\/1458"}],"wp:attachment":[{"href":"https:\/\/www.kickflop.net\/blog\/wp-json\/wp\/v2\/media?parent=1450"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kickflop.net\/blog\/wp-json\/wp\/v2\/categories?post=1450"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kickflop.net\/blog\/wp-json\/wp\/v2\/tags?post=1450"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}