[2] Create a vim command that would strip out <CR>s, asterisks, indentation, and replace the end-of-paragraph character with two <CR>s?
No, can't do that and retain proper indenting. In my experience,
having <cr>'s is something that you get used to and will eventually
prefer. It is the way all latex editing is done; formatting of line
endings in text has nothing to do with how things appear on export.
> [2] Create a vim command that would strip out <CR>s, asterisks,
> indentation, and replace the end-of-paragraph character with two <CR>s?
>
That is trivial in base case, but my main question is what are you
trying to do here? What is this for? My first thought is that you
will get much more flexible, complete, and better formatting by using
Emacs and Org-mode's 'ascii' export.
The Org newsgroup has somewhere a post with settings to add to the
"generic" ascii export that result in exported document being in
MarkDown format. I think there were some issues with translation of
"links", don't know if that's been solved. . . .
-- Herb
> On Sat, Feb 25, 2012 at 6:27 AM, Eric Weir <eew...@bellsouth.net> wrote:
>
>> Wondering about a couple possibilities, Herb, i.e., whether they are
>> possible: [1] Using 'linebreak' to get wrapping at right screen margin
>> instead of <CR>s while preserving left-side alignment with subtopic
>> headings?
>
> No, can't do that and retain proper indenting.
As I expected.
> In my experience,
> having <cr>'s is something that you get used to and will eventually
> prefer. It is the way all latex editing is done; formatting of line
> endings in text has nothing to do with how things appear on export.
>
>> [2] Create a vim command that would strip out <CR>s, asterisks,
>> indentation, and replace the end-of-paragraph character with two <CR>s?
>
> That is trivial in base case, but my main question is what are you
> trying to do here? What is this for? My first thought is that you
> will get much more flexible, complete, and better formatting by using
> Emacs and Org-mode's 'ascii' export.
Well, in a sense it would be my "security blanket." For most of my computing/writing life I have composed in a basic editor with no formatting capabilities---but powerful organizing/reorganizing capabilities---and copied documents to a word processor for formatting when necessary. Not having <CR>s at the end of lines has made/makes reformatting very easy.
I haven't installed Emacs yet, and so haven't explored vimorganizer's interaction with it in exporting. If the 'ascii' export were roughly as quick and uncomplicated as cutting and pasting a document from one application to another, I would be comfortable without my "security blanket."
In addition, I'd like to move in the direction of composing short documents---letters, memos, simple reports---in vim and then formatting and printing them with latex. I gather the vimorganizer-emacs combination's exporting capabilities would support that. Another reason I might gradually be persuaded to let go of my "security blanket."
> The Org newsgroup has somewhere a post with settings to add to the
> "generic" ascii export that result in exported document being in
> MarkDown format. I think there were some issues with translation of
> "links", don't know if that's been solved. . . .
I've been wondering about ability to process markdown---or better, multimarkdown. Multimarkdown coding does not interfere with readability of text; provides nearly all, if not all, of the formatting capability I would need for short documents; and can compile to latex.
I compose and manage larger writing projects in Scrivener. Scrivener uses multimarkdown to export documents to latex. If vim, vimorganizer, or vimorganizer-emacs orgmode could do that I would be *very* happy and would probably be willing to let go of my "security blanket" altogether.
So, the request for a command to strip out the <CR>s and *s is security for me as I go through the process of evaluating/transitioning to vimorganizer. Given the richness of its capabilities that will take a while.
I be less inhibited about that if I knew that I wasn't going to end up with lots of files filled with <CR>s and *s that I'd have to manually strip out in the end I decided vimorganizer wasn't going to work for me.
So, that's my long-winded answer.
Regards,
------------------------------------------------------------------------------------------
Eric Weir
Decatur, GA
eew...@bellsouth.net
"What does it mean...that the world is so beautiful?"
- Mary Oliver
Another export that Emacs/Org does is to "ODT", which is a format
supported by MS Word 2007(?) and later as well as the excellent
LibreOffice (formerly OpenOffice) word processor, which runs on Macs.
>> The Org newsgroup has somewhere a post with settings to add to the
>> "generic" ascii export that result in exported document being in
>> MarkDown format. I think there were some issues with translation of
>> "links", don't know if that's been solved. . . .
>
> I've been wondering about ability to process markdown---or better, multimarkdown. Multimarkdown coding does not interfere with readability of text; provides nearly all, if not all, of the formatting capability I would need for short documents; and can compile to latex.
>
> I compose and manage larger writing projects in Scrivener. Scrivener uses multimarkdown to export documents to latex. If vim, vimorganizer, or vimorganizer-emacs orgmode could do that I would be *very* happy and would probably be willing to let go of my "security blanket" altogether.
>
Org-mode is mostly an alternative to Scrivener, not a complementary
app. Org does its own export of org-format docs directly to LaTex/PDF
without an intermediary format. The Emacs/Org generic export with
mardown settings could be used to export org docs in form that, I
assume, Scrivener could use. But that doesn't sound like anything
you'd want as part of your normal workflow.
> So, the request for a command to strip out the <CR>s and *s is security for me as I go through the process of evaluating/transitioning to vimorganizer. Given the richness of its capabilities that will take a while.
>
> I be less inhibited about that if I knew that I wasn't going to end up with lots of files filled with <CR>s and *s that I'd have to manually strip out in the end I decided vimorganizer wasn't going to work for me.
>
The <cr> issue is pretty trivial. For example, the command below
would strip out all the "soft returns" in a document. The ^M is
actually a single character entered by pressing <ctrl-V><ctrl-M> and
there is a space before the ^M and between the two slashes / /:
:%s/ ^M/ /g
You can put that in a function in your vimrc and map to a keycombo if you want:
function! StripSoftReturns()
:%s/ ^M/ /g
endfunction
nmap [put key combo here] :call StripSoftReturns()<cr>
Hope that helps,
Herb