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

Re: Git trailing blank lines feature configuration

From
Johannes Sixt <j6t@kdbg.org>
Date
Aug 1, 2026, 21:05 UTC
Message-ID
<48771457-9f10-4176-897a-f8af2606bf2d@kdbg.org>
In-Reply-To
<3433010.aeNJFYEL58@cixi>
Am 01.08.26 um 10:48 schrieb Thomas Nemeth:
Show 7 quoted lines
>     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.

Sounds like you are using character-wise visual mode (v) instead of line-wise mode (V). Use line-wise operations, and these problems are gone.

Oh, and BTW, just use G instead of :$<Enter>
-- Hannes
Previous: Thomas NemethNext: Thomas Nemeth
Message 6 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.