{"id":1576,"date":"2014-01-09T17:49:31","date_gmt":"2014-01-09T22:49:31","guid":{"rendered":"http:\/\/mossiso.com\/?p=1576"},"modified":"2014-09-22T14:29:02","modified_gmt":"2014-09-22T18:29:02","slug":"the-mouse-the-screen-and-the-vim","status":"publish","type":"post","link":"https:\/\/mossiso.com\/2014\/01\/09\/the-mouse-the-screen-and-the-vim\/","title":{"rendered":"The Mouse, the Screen, and the Vim"},"content":{"rendered":"<p>A tale many years in the making&#8230;<\/p>\n<p>I have been lacking two things for so long, now that I can do it, I wonder if I will ever remember to use it!<\/p>\n<h2>The Problem<\/h2>\n<p>I use a MacBook Pro with OS X Mavericks. I log into my Linux servers with SSH. I use GNU screen to allow me to save sessions, detach, and come back later without closing running programs and what not. BUT, I can&#8217;t use the mouse scrolling for the terminal output or to scroll through files opened with Vim.<\/p>\n<h2>The Solution<\/h2>\n<p>I finally found the pieces missing to make this possible. All with a couple of lines of code and a new SIMBL bundle.<\/p>\n<p>To get the scroll working in screen, just add this line to your .screenrc<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"lang:sh decode:true \">defscrollback 5000\r\ntermcapinfo * ti@:te@\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>It&#8217;s not perfect. If you have multiple windows in a screen session, then the history buffers get all meshed together. But I usually just need to see info from a command output that is longer than the screen window, and this will let me see it. Finally! Thanks <a title=\"Screen and scrolling\" href=\"http:\/\/slaptijack.com\/system-administration\/mac-os-x-terminal-and-gnu-screen-scrollback\/\" target=\"_blank\">Slapitjack<\/a>! See <a href=\"http:\/\/stackoverflow.com\/questions\/359109\/using-the-scrollwheel-in-gnu-screen\" target=\"_blank\">here<\/a> for an explanation of the code.<\/p>\n<p>To get the scroll back in Vim, whether using screen or not. You first need to install <a title=\"SIMBL\" href=\"http:\/\/www.culater.net\/software\/SIMBL\/SIMBL.php\" target=\"_blank\">SIMBL<\/a>. The version for Snow Leopard works with Mavericks. Then grab a copy of <a title=\"MouseTerm\" href=\"https:\/\/bitheap.org\/mouseterm\/\" target=\"_blank\">MouseTerm<\/a>. The installer didn&#8217;t work, but you just need to copy the MouseTerm.bundle to \/Library\/Application Support\/SIMBL\/Plugins folder (or ~\/Library\/Application Support\/SIMBL\/Plugins if needed for just your user account). Restart your Terminal and you&#8217;re good to go.<\/p>\n<p>Viola! Vim and scrolling, GNU screen and scrolling! Live as it was meant to be&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A tale many years in the making&#8230; I have been lacking two things for so long, now that I can do it, I wonder if I will ever remember to use it! The Problem I use a MacBook Pro with OS X Mavericks. I log into my Linux servers with SSH. I use GNU screen &hellip; <a href=\"https:\/\/mossiso.com\/2014\/01\/09\/the-mouse-the-screen-and-the-vim\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">The Mouse, the Screen, and the Vim<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":1579,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[243,259,167],"tags":[270,272,271,269],"class_list":["post-1576","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howto","category-systems-administration-technical","category-technical","tag-screen","tag-scrolling","tag-simbl","tag-vim"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/mossiso.com\/wp-content\/uploads\/2014\/01\/800px-30_c.\u041c\u0438\u0445\u0435\u043b\u044c_\u0432_\u0440\u0435\u0432\u043e\u043b\u044e\u0446\u0438\u0438_1848_\u0433..jpg","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9wosP-pq","_links":{"self":[{"href":"https:\/\/mossiso.com\/wp-json\/wp\/v2\/posts\/1576"}],"collection":[{"href":"https:\/\/mossiso.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mossiso.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mossiso.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mossiso.com\/wp-json\/wp\/v2\/comments?post=1576"}],"version-history":[{"count":5,"href":"https:\/\/mossiso.com\/wp-json\/wp\/v2\/posts\/1576\/revisions"}],"predecessor-version":[{"id":1652,"href":"https:\/\/mossiso.com\/wp-json\/wp\/v2\/posts\/1576\/revisions\/1652"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mossiso.com\/wp-json\/wp\/v2\/media\/1579"}],"wp:attachment":[{"href":"https:\/\/mossiso.com\/wp-json\/wp\/v2\/media?parent=1576"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mossiso.com\/wp-json\/wp\/v2\/categories?post=1576"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mossiso.com\/wp-json\/wp\/v2\/tags?post=1576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}