On Wednesday, December 9, 2015 at 11:43:01 AM UTC-5, DrChip wrote:
>Paul wrote:
>> I have a dream, about pseudocoding support
>> ------------------------------------------
>> I'm using vim to write pseudocode.  This example must be viewed in
>> fixed with font:
>>
>>    For each machine type demanded, starting from the one with the
>>    most costly demand
>>    |
>>    |  Set current machine instance timeline to 1
>>    |
>>    |  For each machine instance demanded
>>    |  |
>>    |  |  While current machine instance timeline <= qty of
>>    |  |  machine
>>    |  |  |
>>    |  |  |  If the demand duration fits
>>    |  |  |  |
>>    |  |  |  |  Tabulate the machine instance demanded
>>    |  |  |  |  against the machine instance and vice-versa
>>    |  |  |  |
>>    |  |  |  |  Break out of machine instance timeline loop
>>    |  |  |  |
>>    |  |  |  Else
>>    |  |  |  |
>>    |  |  |  |  Current machine instance timeline += 1
>>    |  |  |  |
>>    |  |  |  End If
>>    |  |  |
>>    |  |  End While
>>    |  |
>>    |  |  If the machine instance demanded was not tabulated
>>    |  |  against the machine instance
>>    |  |  |
>>    |  |  |  Add machines to fit balance of machines
>>    |  |  |  instances demanded
>>    |  |  |
>>    |  |  |  Tabulate machine instances demanded against new
>>    |  |  |  machine instance timelines and vice-versa
>>    |  |  |
>>    |  |  |  Break out of machine instance demanded loop
>>    |  |  |
>>    |  |  End If
>>    |  |
>>    |  Next machine instance demanded
>>    |
>>    Next machine type demanded
>>
>> The vertical lines really help.  I currently use visual block to add
>> them in a manually time consuming fashion.  Once they're in, it's
>> impossible to reword paragraphs and use "gq" to reformat them.  I end
>> up using substitution to get rid of the vertical lines in order to
>> work with the pseudocode, then painstakingly add them back in to
>> examine the pseudocode.
>>
>> What vim tricks might make this more efficient?
>
> I'd suggest using a couple of substitutes -- one to remove them and use
> regular autoindent (:set ai), then put the bars in:
> 
> Put bars in:
> 
> [range]s/\t/\t|/g
> 
> Take bars out:
> 
> [range]s/\t|/\t/g

Thanks, Chip.  I do in fact use substitution (though I uses spaces
instead of a tab character, as always have expantab on).

> If you happen to be using utf-8, you might want to use \u2502
> instead of a |.

Hmmm...  That looks way better than the vertical bar on the keyboard.
Unfortunately, it seems to have compatibility problems when dealing
with other apps in a cygwin/Xwindows/Windows7 environment.  For
example, it doesn't succesfully transfer into the cut/paste buffer in
a way that allows to be transferred to Windows (register * or
register +).  It won't paste into this grouples composition window,
nor into even notepade.  However, it successfully transfers into
those registers for asting within another vim buffer.

-- 
-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to