Loading ...
Sorry, an error occurred while loading the content.

96631Re: spaces

Expand Messages
  • sc
    Sep 30, 2008
      On Wednesday 01 October 2008 00:37, Nag, Deepak wrote:
      > Sometimes showing spaces with some character is really helpful. In
      > Visual Studio we have option to set it. Please look at the picture
      > below.
      >
      > It shows space with a dot. We can easily identity that line 17 and 19
      > has trailing space and line 18 has unwanted spaces.

      Why look at them? If you don't like them, whack them:

      nnoremap <Leader>a :%s/\s\+$//e<CR>

      With the above mapping you'll not only get rid of them, but
      after using it any future trailing whitespace with be
      highlighted with your highlight color of choice (until you
      use locate for something else).

      I used 'a' when I created this because it was my first ever
      Leader command, and I use it a lot, remembering that it gets
      rid of All trailing whitespace.

      sc



      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Show all 11 messages in this topic