git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git trailing blank lines feature configuration

From
TNThomas Nemeth <tnemeth@free.fr>
Date
Aug 1, 2026, 08:48 UTC
Message-ID
<3433010.aeNJFYEL58@cixi>
In-Reply-To
<06230920-FCA6-495C-BFE5-04DF1CC2A426@gmail.com>
Le samedi 1 août 2026, 02:05 Ben Knoble a écrit :
Show 16 quoted lines
> > Le 31 juil. 2026 à 20:55, Thomas Nemeth <tnemeth@free.fr> a écrit :
> > 
> >    I wouldn't say necessary, of course. It's -- at least -- my
> >    preference. For _my_ use case, it's useful. When I move code
> >    around, and that code is at the end of the file or to be put
> >    at the end of the file, I find it easier to already have a
> >    blank line there. That is... Because that's how I use vim to
> >    code.
> 
> I use Vim, too, and I’ve not personally encountered the desire for
> keeping a blank line at EOF (though occasionally certain operations
> benefit from placing one there first!).
> 
> I wonder if you could describe example workflows that lead to this
> desire? I might learn something, and in exchange, if I see a way to
> accomplish the same thing with less hassle, I’ll suggest it ;)
    It's hard to describe something like that :)
    Imagine you are editing a C file. It contains functions, code blocks
    an so on. I usually organize my code as such :

#includes [...] #defines [...] static variables [...] static functions() [...] public_functions() [...]

    Code reorganization happens quite some times during the development
    process.
    If I need to move a previously static function at the end of the
    public functions section, I switch to VISUAL, select the function
    to be moved with the blank lines above (I like having neatly spaced
    code) _and_ including the eol of the function last line.
    Then I delete it (d), I move to EOF (:$). As the line is blank I
    just have to paste (p) it back there. The function is moved. The last
    blank line is kept for other code movements.
    Conversely, I can select the last function to move it upper in the
    file.
    Adding new functions is also eased. It may be because I use only a
    few vim commands (especially I rarely use the `o` command). But also
    because I like spaced code :)
-- 
Thomas.
Previous: Ben KnobleNext: Johannes Sixt
Message 5 of 10 in “Git trailing blank lines feature configuration”
  1. Thomas NemethJul 31, 2026
  2. Johannes SixtJul 31, 2026
  3. Thomas NemethJul 31, 2026
  4. Ben KnobleAug 1, 2026
  5. Thomas NemethAug 1, 2026
  6. Johannes SixtAug 1, 2026
  7. Thomas NemethAug 2, 2026
  8. Junio C HamanoJul 31, 2026
  9. Thomas NemethAug 1, 2026
  10. Junio C HamanoJul 31, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.