Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct readme: #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 82 additions & 56 deletions README
Original file line number Diff line number Diff line change
@@ -1,58 +1,84 @@
This is a mirror of http://www.vim.org/scripts/script.php?script_id=40

DrawIt is a plugin which allows one to draw lines left, right, up, down, and along both slants. Optionally one may "cap" the lines with arrowheads. One may change the horizontal, vertical, slant, and crossing characters to whichever characters one wishes.

Its easy to start and stop DrawIt: use

\di to start DrawIt and
\ds to stop DrawIt.

The alpha/beta version is available at http://www.drchip.org/astronaut/vim/index.html#DRAWIT.

When DrawIt has been started you may use the number pad to leave a trail of dashes, vertical bars, etc. The lines will be expanded as needed to accomodate your drawing. DrawIt can also draw boxes and ellipses on a blank-filled area (DrawIt can produce these) which can be useful for drawing boxes around comments.

Viart's <drawing.vim> has been merged with the original DrawIt (vimscript#11) (by permission). Use visual-block selection to specify starting and ending positions and a Bresenham line drawing algorithm will be used to connect the two. DrC has written an ellipse-drawing Bresenham-style procedure: again, use the visual block selection to specify a box to contain the ellipse and \e to trigger the ellipse drawing.

DrawIt incorporates an "erase" mode, toggled by the <space> key, that will leave a trail of blanks behind and under the cursor as it is moved by the number pad. Using the shift-arrow keys, DrawIt will move the cursor, expanding lines and inserting spaces as needed, without changing underlying text.

DrawIt is now in the vimball format, which is understood by the new Vim 7.0 release. After decompressing the DrawIt.vba.gz file, edit it with Vim, and then source it (:so %). The components of DrawIt will then be placed where they belong, based on your Vim's runtimepath.

DrawIt records many user options that affect DrawIt and all maps that starting DrawIt creates. When DrawIt is terminated it restores the user's maps and options. DrawIt's number pad maps will expand the file as necessary to accomodate the drawing, automatically.

Supported Features
<left> move and draw left
<right> move and draw right, inserting lines/space as needed
<up> move and draw up, inserting lines/space as needed
<down> move and draw down, inserting lines/space as needed
<s-left> move left
<s-right> move right, inserting lines/space as needed
<s-up> move up, inserting lines/space as needed
<s-down> move down, inserting lines/space as needed
<space> toggle into and out of erase mode
> draw -> arrow
< draw <- arrow
^ draw ^ arrow
v draw v arrow
<pgdn> replace with a \, move down and right, and insert a \
<end> replace with a /, move down and left, and insert a /
<pgup> replace with a /, move up and right, and insert a /
<home> replace with a \, move up and left, and insert a \
\> draw fat -> arrow
\< draw fat <- arrow
\^ draw fat ^ arrow
\v draw fat v arrow
\a draw arrow based on corners of visual-block
\b draw box using visual-block selected region
\e draw an ellipse inside visual-block
\f fill a figure with some character
\h create a canvas for \a \b \e \l
\l draw line based on corners of visual block
\s adds spaces to canvas
<leftmouse> select visual block
<s-leftmouse> drag and draw with current brush (register)
\ra ... \rz replace text with given brush/register
\pa ... like \ra ... \rz, except that blanks are considered
to be transparent
This is a mirror of

Thank you for ranking DrawIt!
http://www.vim.org/scripts/script.php?script_id=40

DrawIt is a plugin which allows one to draw lines left, right, up, down, and
along both slants. Optionally one may "cap" the lines with arrowheads.
One may change the horizontal, vertical, slant, and crossing characters to
whichever characters one wishes.

Its easy to start and stop DrawIt:

<leader>di start DrawIt
<leader>ds stop DrawIt.

The alpha/beta version is available at

http://www.drchip.org/astronaut/vim/index.html#DRAWIT.

When DrawIt has been started you may use the number pad to leave a trail of
dashes, vertical bars, etc. The lines will be expanded as needed to accommodate
your drawing. DrawIt can also draw boxes and ellipses on a blank-filled area
(DrawIt can produce these) which can be useful for drawing boxes around comments.

Viart's <drawing.vim> has been merged with the original DrawIt (vimscript#11)
with permission.
Use visual-block selection to specify starting and ending positions and a
Bresenham line drawing algorithm will be used to connect the two.
DrC has written an ellipse-drawing Bresenham-style procedure:
again, use the visual block selection to specify a box to contain the ellipse
and <leader>e to trigger the ellipse drawing.

DrawIt incorporates an "erase" mode, toggled by the <space> key, that will leave
a trail of blanks behind and under the cursor as it is moved by the number pad.

Using the shift-arrow keys, DrawIt will move the cursor, expanding lines and
inserting spaces as needed, without changing underlying text.

DrawIt is now in the vimball format, which is understood by the new Vim 7.0
release. After decompressing the DrawIt.vba.gz file, edit it with Vim, and then
source it (:so %). The components of DrawIt will then be placed where they belong,
based on your Vim's runtimepath.

DrawIt records many user options that affect DrawIt and all maps that starting
DrawIt creates. When DrawIt is terminated it restores the user's maps and options.
DrawIt's number pad maps will expand the file as necessary to accommodate the
drawing, automatically.

Supported features and mappings:

<left> move and draw left
<right> move and draw right, inserting lines/space as needed
<up> move and draw up, inserting lines/space as needed
<down> move and draw down, inserting lines/space as needed
<s-left> move left
<s-right> move right, inserting lines/space as needed
<s-up> move up, inserting lines/space as needed
<s-down> move down, inserting lines/space as needed
<space> toggle into and out of erase mode
> draw -> arrow
< draw <- arrow
^ draw ^ arrow
v draw v arrow
<pgdn> replace with a \, move down and right, and insert a \
<end> replace with a /, move down and left, and insert a /
<pgup> replace with a /, move up and right, and insert a /
<home> replace with a \, move up and left, and insert a \
<leader>> draw fat -> arrow
<leader>< draw fat <- arrow
<leader>^ draw fat ^ arrow
<leader>v draw fat v arrow
<leader>a draw arrow based on corners of visual-block
<leader>b draw box using visual-block selected region
<leader>e draw an ellipse inside visual-block
<leader>f fill a figure with some character
<leader>h create a canvas for <leader>a <leader>b <leader>e <leader>l
<leader>l draw line based on corners of visual block
<leader>s adds spaces to canvas
<leftmouse> select visual block
<s-leftmouse> drag and draw with current brush (register)
<leader>ra replace text with the given register 'a'
<leader>pa like <leader>ra , except that blanks are considered
to be transparent

Thank you for ranking DrawIt!