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

[Patch] Add support for guidecolumn in VIM

Expand Messages
  • Pankaj Garg
    Hi Everyone,This is my first patch for VIM so pardon me if I did not follow any instructions properly.This patch would allow you to create a vertical
    Message 1 of 55 , Apr 14, 2009
    • 0 Attachment

      Hi Everyone,

      This is my first patch for VIM so pardon me if I did not follow any instructions properly.

      This patch would allow you to create a vertical highlighted line at a specified column such as column 80. Very useful if you don't want your code to exceed 80 columns as followed by many projects (I think including VIM).

      The thread below is where I initially mentioned this and asked if it would be a good idea.

      http://groups.google.com/group/vim_use/browse_thread/thread/3ee72b0e73dee6c7/f91c21a6b00787b8?lnk=gst&q=a+border+at+fixed+width#f91c21a6b00787b8

      Please let me know if there are any issues with the patch. I have tested it and it seems to work fine (with cursorcolumn as well). But as this is my first patch, please let me know if I missed something.

      The attached guidecolumn.patch.txt contains the patch in the format specified at the VIM WIKI and guidecolumn.patch is created using CVS patch feature in TortoiseCVS.

      Thanks
      _Lone


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---

    • _Lone
      On Jun 1, 6:28 pm, Tony Mechelynck ... Sorry for going off and on, the paying job is keeping me extremely busy. The
      Message 55 of 55 , Jun 12, 2009
      • 0 Attachment
        On Jun 1, 6:28 pm, Tony Mechelynck <antoine.mechely...@...>
        wrote:
        > On 28/05/09 05:10, _Lone wrote:
        > [...]
        >
        > > I looked at adding 1px highlighting instead of whole character
        > > background. But it seems it would be very difficult. The reason is
        > > that the way highlighting works is by storing the background color for
        > > character which is how various highlights are done.
        >
        > When talking aboiut the background, yes; but there are a lot other kinds
        > of highlights, especially in the GUI:
        >
        >         gui=NONE
        >         gui=reverse
        >         gui=bold
        >         gui=italic
        >         gui=underline
        >         gui=undercurl
        >
        >         guibg=<color>
        >         guifg=<color>
        >         guisp=<color>
        >
        > What about extending these categories? (with appropriate ifdefs in the
        > source)? For term and cterm (including GUI-enabled Linux Vim in Console
        > mode) the choice would be more limited, probably by default term=reverse
        > and ctermbg=<color>, or somesuch. Of course a new highlight group would
        > have to be created, perhaps with a new 'highlight' option setting and
        > default -- or maybe not, after all I don't see CursorLine and
        > CursorColumn listed there.
        >
        >
        >
        > > I also looked at wide-character problem and that too looks very hard
        > > to sovle though I would spend some more time this week if I can fix
        > > that.
        >
        > As I think had been noted, there are several kinds of multicell characters:
        >   - hard tabs (with and without 'list' and/or 'listchars')
        >   - control characters (^X, ~Y, |Z, see :help 'isprint')
        >   - CJK wide
        >   - non-printable Unicode codepoints (at least <xx> and <xxxx>, see
        > :help 'display' and the last sentence under 'isprint').
        >
        > It might be hard to highlight "just" the one cell in the column in
        > question, but maybe you could look how Vim displays the CursorColumn
        > highlight. (I think this has also been mentioned).
        >
        >
        >
        > > Thanks
        > > _Lone
        >
        > Best regards,
        > Tony.
        > --
        > Without ice cream life and fame are meaningless.

        Sorry for going off and on, the paying job is keeping me extremely
        busy. The CursorColumn and MarginColumn behaves in exactly the same
        manner. So whatever problems exist for CursorColumn, also exists for
        MarginColumn, including multi-cell characters.

        Thanks
        _Lone
        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      Your message has been successfully submitted and would be delivered to recipients shortly.