Saturday, December 14, 2019

How to join a paragraph in normal mode?

For example I have the following text (at end of each line there is carriage return character):
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.


I would like to join all 6 lines into one paragraph (so removing carriage return at the end of line).

I know I can use:
- command line mode: :1,6j
- visual mode: vapJ
- normal mode with count lines: 6J

But is there some normal mode logic for JOIN A PARAGRAPH like:
- delete a paragraph: dap
- yank a paragraph: yap
- upper case a paragraph: gUap
and so what is the same normal mode logic for "join a paragraph"? Obiously Jap is not working, because J is full command by itself.

Question: How to join a paragraph in normal mode logic?

I use Vim 8.2.0003 on Linux.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/a34a7681-d6b6-4e8a-805c-a0c76f1f5f31%40googlegroups.com.

No comments:

Post a Comment