{"id":154,"date":"2006-03-10T15:44:00","date_gmt":"2006-03-11T00:44:00","guid":{"rendered":"http:\/\/www.evardsson.com\/blog\/2006\/03\/10\/syntax-highlighting-with-nano\/"},"modified":"2007-03-03T11:39:54","modified_gmt":"2007-03-03T20:39:54","slug":"syntax-highlighting-with-nano","status":"publish","type":"post","link":"https:\/\/www.evardsson.com\/blog\/2006\/03\/10\/syntax-highlighting-with-nano\/","title":{"rendered":"Syntax highlighting with nano"},"content":{"rendered":"<p>Ok, I will be the first to admit that this is nothing new, however I just found out it about today! It seems that all this time I have been using <a href=\"http:\/\/www.nano-editor.org\" target=\"_blank\" rel=\"tag\">nano<\/a>  for my default linux editor, completely unaware that it has the capacity for syntax highlighting. (DOH!)<\/p>\n<p>It seems that with a simple <a href=\"http:\/\/www.nano-editor.org\/dist\/v1.2\/nanorc.5.html\" target=\"_blank\" rel=\"tag\">.nanorc<\/a>  file you can set the highlighting colors for just about any kind of file. I found a very good example at <a href=\"http:\/\/osx.hyperjeff.net\/MyApps\/nanorc\" target=\"_blank\">http:\/\/osx.hyperjeff.net\/MyApps\/nanorc<\/a>, although the Python highlighting he has uncommented has a mal-formed regex in the first line. (I just deleted that one and uncommented the one above and it works great.)<\/p>\n<p>There are two examples at the bottom of the page at <a href=\"http:\/\/article.gmane.org\/gmane.linux.gentoo.user.german\/9565\" target=\"_blank\">http:\/\/article.gmane.org\/gmane.linux.gentoo.user.german\/9565<\/a> &#8211; the page is in German but the .nanorc files are there. The first is for use with a black screen, the second for use with a white screen. (The hint here is don&#8217;t use black on a black screen or brightwhite on a white screen, and brightyellow is unreadable on a white screen as well.)<\/p>\n<p>There are enough examples to get you started, and it shouldn&#8217;t be too difficult to come up with your own color schemes that fit the way you work best.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ok, I will be the first to admit that this is nothing new, however I just found out it about today! It seems that all this time I have been using nano for my default &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","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,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[12],"tags":[149],"class_list":["post-154","post","type-post","status-publish","format-standard","hentry","category-tools","tag-tools"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pxT7i-2u","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/posts\/154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/comments?post=154"}],"version-history":[{"count":0,"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/posts\/154\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/media?parent=154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/categories?post=154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/tags?post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}