Changes between Version 9 and Version 10 of VimBreakIndent


Ignore:
Timestamp:
Jul 18, 2014 6:27:58 PM (10 years ago)
Author:
retracile
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • VimBreakIndent

    v9 v10  
    11 = Vim breakindent patch =
    22
    3 So I wanted Vim to visually wrap long lines, but take the indentation of the line into account when it does so. Apparently, Vim can't do that, but back in 2007 Václav Šmilauer [http://www.mail-archive.com/vim-dev@vim.org/msg04076.html posted a patch] for Vim to add that feature.
    4 I have been updating that patch as Fedora releases updates for Vim.  Václav has also updated it.
     3So I wanted Vim to visually wrap long lines, but take the indentation of the line into account when it does so.  Vim could not do that when I went looking in 2009, but as of June 25, 2014, [blog:2014/07/18/18.00 Bram merged the breakindent feature].
    54
    6 To get this behaviour, rebuild vim with this patch, then `set breakindent`.  You can combine it with `set showbreak=..` or `set showbreak=\ \ ` to provide a little bit of additional indent to the wrapped portion of the lines.
     5To get this behaviour, use `set breakindent`.  You can combine it with `set showbreak=..` or `set showbreak=\ \ ` to provide a little bit of additional indent to the wrapped portion of the lines.
    76
    87For example, this shows vim with `set breakindent showbreak=..`, `set linebreak`, `set foldmethod=indent foldcolumn=4` and `set shiftwidth=4 tabstop=4 softtabstop=4 expandtab` options with a visual highlight that wraps across lines:
    98
    109[[Image(vim-snapshot-1.png)]]
     10
     11Back in 2007 when Vim couldn't do this, Václav Šmilauer [http://www.mail-archive.com/vim-dev@vim.org/msg04076.html posted a patch] for Vim to add this feature.  I kept updating that patch as Fedora released updates for Vim until 2014 when Bram merged the feature.  The patches below are those updates, but they are now only of historical interest.
    1112
    1213[attachment:blog:2013/06/01/20.00:vim-7.3.944-fc17-breakindent.patch for Vim 7.3.944 (from Fedora 17)]
     
    2526
    2627[attachment:blog:2009/11/20/12.00:vim-7.2-breakindent.patch Fedora 11, 7.2.148-1.fc11]
     28
     29