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

74263Re: [patch] Option to show indent level with 'expandtab' and 'list' option

Expand Messages
  • glts
    Nov 27, 2013
      On Wed, Nov 27, 2013 at 3:59 PM, Ken Takata <kentkt@...> wrote:
      > 2013/11/27 Wed 23:34:12 UTC+9 ZyX wrote:
      >> On Nov 27, 2013 10:56 AM, "hari.g" <hari...@...> wrote:
      >> >
      >> > Hi,
      >> >
      >> > The attached patch adds a 'listchars' option 'lsp' which marks leading space at 'shiftwidth' with the defined characer so that you can follow the indent level in a bit too much nested code when you also have 'expandtab' option set and use spaces for indentation (e.g. Python code in many repos enforce a 'spaces only indenting' policy).
      >> This functionality would be good to have and I see it constantly seeked in vim-use and stackoverflow. But there are some issues though:
      >> 0. No tests. There is screenchar()/screenattr() pair for the tests.
      >> 1. I fail to comprehend what "lsp" stands for. Guess it is abbreviation: Leading Space P... Pwhat?
      >> 2. Your patch strips out meaningful trailing spaces from documentation.
      >> 3. It also adds something to Make_mvc.mak which is not related (if you have to use it to compile it should be a separate patch).
      >> 4. No interline tabs in nw_seen declaration.
      >> 5. Tabs are not used in line
      >> + nw_seen = nw_seen || !vim_iswhite(c);
      > I found two more issues:
      > 6. `:set sw=0` causes a crash.
      > 7. C99 style comment should not be used.

      Here's another one:

      8. Printing of 'listchars' with :list is missing.

      Let me point out that there's a another 'listchars' patch pending:


      It enables listing of spaces, a very popularly requested 'listchars'
      feature. That patch has already been waiting for four years. So far it's
      made it into the todo list. The patch still applies and also includes a
      test. (Strayed off-topic there for a sec.)


      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 14 messages in this topic