{"id":49,"date":"2009-09-16T18:48:47","date_gmt":"2009-09-16T08:48:47","guid":{"rendered":"http:\/\/chuchuva.com\/pavel\/?p=49"},"modified":"2009-09-16T12:06:21","modified_gmt":"2009-09-16T02:06:21","slug":"how-to-view-whitespaces-in-emacs","status":"publish","type":"post","link":"https:\/\/chuchuva.com\/pavel\/2009\/09\/how-to-view-whitespaces-in-emacs\/","title":{"rendered":"How to view whitespaces in Emacs"},"content":{"rendered":"<p>Here&#8217;s how you can view whitespaces in Emacs:<\/p>\n<pre>M-x whitespace-mode RET<\/pre>\n<p>By default, Emacs uses bright colours to highlight whitespaces that are in wrong place (in Emacs&#8217; opinion):<br \/>\n<img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"50\" data-permalink=\"https:\/\/chuchuva.com\/pavel\/2009\/09\/how-to-view-whitespaces-in-emacs\/emacs-whitespaces-colour\/\" data-orig-file=\"https:\/\/i0.wp.com\/chuchuva.com\/pavel\/images\/2009\/09\/emacs-whitespaces-colour.png?fit=320%2C200&amp;ssl=1\" data-orig-size=\"320,200\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"emacs-whitespaces-colour\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/chuchuva.com\/pavel\/images\/2009\/09\/emacs-whitespaces-colour.png?fit=320%2C200&amp;ssl=1\" class=\"alignnone size-full wp-image-50\" src=\"https:\/\/i0.wp.com\/chuchuva.com\/pavel\/images\/2009\/09\/emacs-whitespaces-colour.png?resize=320%2C200\" alt=\"\" width=\"320\" height=\"200\" srcset=\"https:\/\/i0.wp.com\/chuchuva.com\/pavel\/images\/2009\/09\/emacs-whitespaces-colour.png?w=320&amp;ssl=1 320w, https:\/\/i0.wp.com\/chuchuva.com\/pavel\/images\/2009\/09\/emacs-whitespaces-colour.png?resize=300%2C187&amp;ssl=1 300w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/p>\n<p>To disable colouring add the following to your .emacs file:<\/p>\n<pre>; disable colours in whitespace-mode\r\n(setq whitespace-style '(space-mark tab-mark))<\/pre>\n<p>Now it&#8217;s much better:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"51\" data-permalink=\"https:\/\/chuchuva.com\/pavel\/2009\/09\/how-to-view-whitespaces-in-emacs\/emacs-whitespaces\/\" data-orig-file=\"https:\/\/i0.wp.com\/chuchuva.com\/pavel\/images\/2009\/09\/emacs-whitespaces.png?fit=320%2C200&amp;ssl=1\" data-orig-size=\"320,200\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"emacs-whitespaces\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/chuchuva.com\/pavel\/images\/2009\/09\/emacs-whitespaces.png?fit=320%2C200&amp;ssl=1\" class=\"alignnone size-full wp-image-51\" src=\"https:\/\/i0.wp.com\/chuchuva.com\/pavel\/images\/2009\/09\/emacs-whitespaces.png?resize=320%2C200\" alt=\"\" width=\"320\" height=\"200\" srcset=\"https:\/\/i0.wp.com\/chuchuva.com\/pavel\/images\/2009\/09\/emacs-whitespaces.png?w=320&amp;ssl=1 320w, https:\/\/i0.wp.com\/chuchuva.com\/pavel\/images\/2009\/09\/emacs-whitespaces.png?resize=300%2C187&amp;ssl=1 300w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/p>\n<p>I assign showing white spaces to Ctrl+Shift+8 to mimick Visual Studio behaviour:<\/p>\n<pre>(global-set-key (kbd \"C-*\") 'whitespace-mode)<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s how you can view whitespaces in Emacs: M-x whitespace-mode RET By default, Emacs uses bright colours to highlight whitespaces that are in wrong place (in Emacs&#8217; opinion): To disable colouring add the following to your .emacs file: ; disable colours in whitespace-mode (setq whitespace-style &#8216;(space-mark tab-mark)) Now it&#8217;s much better: I assign showing white &hellip; <a href=\"https:\/\/chuchuva.com\/pavel\/2009\/09\/how-to-view-whitespaces-in-emacs\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">How to view whitespaces in Emacs<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","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,"_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":[8],"tags":[],"class_list":["post-49","post","type-post","status-publish","format-standard","hentry","category-develop"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/chuchuva.com\/pavel\/wp-json\/wp\/v2\/posts\/49","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chuchuva.com\/pavel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chuchuva.com\/pavel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chuchuva.com\/pavel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chuchuva.com\/pavel\/wp-json\/wp\/v2\/comments?post=49"}],"version-history":[{"count":0,"href":"https:\/\/chuchuva.com\/pavel\/wp-json\/wp\/v2\/posts\/49\/revisions"}],"wp:attachment":[{"href":"https:\/\/chuchuva.com\/pavel\/wp-json\/wp\/v2\/media?parent=49"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chuchuva.com\/pavel\/wp-json\/wp\/v2\/categories?post=49"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chuchuva.com\/pavel\/wp-json\/wp\/v2\/tags?post=49"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}