Wesley Moore on Nostr: Discovered a neat new tool last week: It's similar to `fmt` and `fold` except that it ...
Discovered a neat new tool last week:
https://github.com/wr7/refoldIt's similar to `fmt` and `fold` except that it automatically handles prefixes. Vim/Neovim `gq` can do this out of the box but fails (for me at least) when multiple prefixes are present, such as a Markdown block-quote inside Rust comments. E.g.
```
// > Some quoted text
// > to reflow.
```
`refold` handles this.
#Rust #RustLang #TextProcessing #TextManipulation #TextEditor
Published at
2024-09-24 01:20:19Event JSON
{
"id": "7d014f36e50915db0f7d6d281b3b4fccc4c11b61b84e86f26482a88ae3095214",
"pubkey": "4fbf72f4f23853886f17d785dae040957f149b101524edd02f8d1f73b46d604f",
"created_at": 1727140819,
"kind": 1,
"tags": [
[
"t",
"rust"
],
[
"t",
"rustlang"
],
[
"t",
"textprocessing"
],
[
"t",
"textmanipulation"
],
[
"t",
"texteditor"
],
[
"proxy",
"https://mastodon.decentralised.social/users/wezm/statuses/113189900754036157",
"activitypub"
]
],
"content": "Discovered a neat new tool last week: https://github.com/wr7/refold\n\nIt's similar to `fmt` and `fold` except that it automatically handles prefixes. Vim/Neovim `gq` can do this out of the box but fails (for me at least) when multiple prefixes are present, such as a Markdown block-quote inside Rust comments. E.g.\n\n```\n// \u003e Some quoted text\n// \u003e to reflow.\n```\n\n`refold` handles this.\n\n#Rust #RustLang #TextProcessing #TextManipulation #TextEditor",
"sig": "6c97b9c83e3412f31508082e1c353a5f894c6038008db9733f958d0bc1f971125147675b5c6efcdad13a20b12c3c6860d437b0edbae84940a92bec6bbaa5ccc3"
}