Possibly useful Ved hack 
Author Message
 Possibly useful Ved hack

I've found the following simple Ved hack remarkably useful.  The idea is
that the correct default for the left margin of a new line is to align
the text with the line above. So if you want an indented paragraph, you
just indent the first line and keep typing; to outdent again, you delete
a few spaces or shift the cursor left before typing the first outdented
line. When typing in code, you move the left margin in and out relative
to the previous line, rather than tabbing in from column 1. I've found
it saves time, expecially for things like ref files with lots of
different levels of indentation, though you have to get used to the

The code below allows ved_jp to continue to work - the first line of a
paragraph sets the left margin for that paragraph.

David Young

------------------------- help file -----------------------------------

HELP VED_SAME                                   David Young, June 1995

The command

            <ENTER> same

sets up a dynamic left margin in the current file, such that new lines
have the same left margin as the nearest line of text above them.

To revert to a static left margin, use

            <ENTER> lcol <N>

where N is the column number, or put the cursor where you want the left
margin and use

            <ENTER> lcol

------------------------- program -------------------------------------

/* Ved procedure to provide dynamic left margin */

compile_mode:pop11 +strict;


define lconstant lmargin_as_above /* -> margin */;
    dlocal vedline, vedcolumn, vvedlinesize;
    ;;; Ignore current line unless doing automatic line breaking
    if iscaller(vedcharinsert) and vedline /== 1 then
    ;;; Find a line with text on it
    until vedline == 1 or vvedlinesize /== 0 do
    ;;; Return left margin for current line
    vedcolumn - 1          ;;; returned

define ved_same;
    lmargin_as_above -> vedleftmargin;
    'Use <ENTER> lcol to restore normal left margin' -> vedmessage


Mon, 01 Dec 1997 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Possibly Useful Data Point for Ada Costing

2. Running Ved from Ved

3. hacking,anti-hacking,registry tweaks,compter tricks

4. Syntactic errors when compiling from a ved buffer

5. making the world safe for ved

6. ved and rxvt (Boring)

7. DRAFT Ved utility for editing files whose names have spaces

8. ved key-mapping to conventional use.

9. linux , non-X, ved ?

10. ved key-mapping ?

11. Stupid question about VED documentation files

12. VED sometimes overwrites current buffer when reading in file


Powered by phpBB® Forum Software