vibreoffice
vibreoffice copied to clipboard
Keybinding: J for join lines
Thank you for your time and effort, just wanted to document a missing normal mode binding for J, which joins the current and next line in vim.
Holy crap I've been using vim for over a year and I didn't know that... That is super useful.
Sorry for the late reply. This would be a useful feature, but also a bit tricky to implement. How can you tell between lines that are separated by a return (newline) and those that are separated by just a space and word wrapping? Just some thoughts, as I don't have a solution yet.
Same here on the punctuality. I just assumed the Vim keybinding deleted the next newline character detected after the cursor, effectively joining the lines, but it's probably a bit more complex than that with cursor positioning and whatnot.
For the purposes of emulating J -- if it were my project or if I had the capacity to contribute some code -- I would treat LO's line-wrapped "paragraphs" (a block of text separated from other elements by at least one newline on top and one on bottom) as a single line in Vim is treated when the 'wrap' option enabled.
At any rate, my particular use case is doing transcriptions is in LO. Often, I need to make paragraphs five lines long, and it would be great to have J to join lines (or, in my case, paragraphs) as quickly as I can add them with i<CR>. Again, no rush or anything, I just wanted to help you fill in the to-do list, since I probably won't be able to do much else. Maybe others will chime in on the discussion in the meantime.