Skip to content

Commit

Permalink
remove default Start/Stop maps
Browse files Browse the repository at this point in the history
  • Loading branch information
tomtomjhj committed Jan 3, 2022
1 parent 9c3b3cb commit a479ed1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 29 deletions.
5 changes: 1 addition & 4 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ 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.
Its easy to start and stop DrawIt: use :DrawIt[!].

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

Expand Down
10 changes: 5 additions & 5 deletions autoload/DrawIt.vim
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
" Should put DrawItPlugin.vim in your .vim/plugin directory,
" put DrawIt.vim in your .vim/autoload directory
" put DrawIt.txt in your .vim/doc directory.
" Then, use \di to start DrawIt,
" \ds to stop Drawit, and
" Then, use :DrawIt to start DrawIt,
" :DrawIt! to stop Drawit, and
" draw by simply moving about using the cursor keys.
"
" You may also use visual-block mode to select endpoints and
Expand Down Expand Up @@ -97,7 +97,7 @@ fun! DrawIt#DrawItStart(...)
" DrawItStart: report on [DrawIt] mode {{{3
if exists("b:dodrawit") && b:dodrawit == 1
" already in DrawIt mode
echo "[DrawIt] (already on, use ".((exists("mapleader") && mapleader != "")? mapleader : '\')."ds to stop)"
echo "[DrawIt] (already on, use :Drawit! to stop)"
" call Dret("DrawItStart")
return
endif
Expand Down Expand Up @@ -430,7 +430,7 @@ fun! DrawIt#DrawItStart(...)
" DrawItStart: Menu support {{{3
if has("gui_running") && has("menu") && &go =~# 'm'
exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Stop\ \ DrawIt<tab>\\ds <Leader>ds'
exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Stop\ \ DrawIt :DrawIt!<CR>'
exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Append\ Blanks<tab>\\s <Leader>s'
exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Draw\ Arrow<tab>\\a <Leader>a'
exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Draw\ Box<tab>\\b <Leader>b'
Expand Down Expand Up @@ -503,7 +503,7 @@ fun! DrawIt#DrawItStop()

" DrawItStop: DrChip menu support: {{{3
if has("gui_running") && has("menu") && &go =~# 'm'
exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Start\ DrawIt<tab>\\di <Leader>di'
exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Start\ DrawIt :DrawIt<CR>'
exe 'unmenu '.g:DrChipTopLvlMenu.'DrawIt.Stop\ \ DrawIt'
exe 'unmenu '.g:DrChipTopLvlMenu.'DrawIt.Toggle\ Erase\ Mode'
exe 'unmenu '.g:DrChipTopLvlMenu.'DrawIt.Draw\ Arrow'
Expand Down
8 changes: 2 additions & 6 deletions doc/DrawIt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ Copyright: Copyright (C) 2018 Charles E. Campbell
|| Starting & | ||
|| Stopping | Explanation Links: ||
++--------------+-----------------------------------------------------------++
|| \di | start DrawIt |drawit-start| ||
|| \ds | stop DrawIt |drawit-stop| ||
|| :DIstart | start DrawIt |drawit-start| ||
|| :DIstart S | start DrawIt in single-bar mode |drawit-start| ||
|| :DIstart D | start DrawIt in double-bar mode |drawit-start| ||
Expand Down Expand Up @@ -158,7 +156,6 @@ DrawIt be loaded. Thus DrawIt supports fast vim startup.

STARTING *drawit-start* {{{2

\di (starts in normal drawing mode) *drawit-\di*
:DrawIt (starts in normal drawing mode) *drawit-DrawIt*
:DIstart (starts in normal drawing mode) *drawit-DIstart*
:DIstart S (starts in single-bar drawing mode)
Expand All @@ -170,7 +167,7 @@ STARTING *drawit-start* {{{2
DrawIt supports a number of different ways to start up as shown above; in
addition, you may use gvim and the DrChip menu.

To stop DrawIt, use \ds (*d*rawit *s*top) or :DIstop.
To stop DrawIt, use :DrawIt!.

DrawIt also supports the use of |mapleader|; with that, you may specify
what you with as the maps' leading kickoff character. This document
Expand All @@ -186,12 +183,11 @@ A message, "[DrawIt]", will appear on the message line.

*drawit-off*
STOPPING *drawit-stop* {{{2
\ds
:DrawIt!
:DIstop
:DIoff

When you are done with DrawIt, use \ds to stop DrawIt mode. Stopping DrawIt
Use one of the above commands to stop DrawIt mode. Stopping DrawIt
will restore your usual options and remove the maps DrawIt set up.

A message, "[DrawIt off]", will appear on the message line.
Expand Down
15 changes: 1 addition & 14 deletions plugin/DrawItPlugin.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
" DrawItPlugin.vim: a simple way to draw things in Vim -- just put this file in
" your plugin directory, use \di to start (\ds to stop), and
" your plugin directory, use :DrawIt to start (:DrawIt! to stop), and
" just move about using the cursor keys.
"
" You may also use visual-block mode to select endpoints and
Expand Down Expand Up @@ -47,19 +47,6 @@ sil! com -nargs=0 DInrml call DrawIt#SetMode('N')
sil! com -nargs=0 DIsngl call DrawIt#SetMode('S')
sil! com -nargs=0 DIdbl call DrawIt#SetMode('D')

" maps: users may override these maps by defining their own mappings in their .vimrc
" to <Plug>DrawItStart and/or <Plug>DrawItStop. By default:
" \di : start DrawIt
" \ds : stop DrawIt
if !hasmapto('<Plug>DrawItStart')
map <unique> <Leader>di <Plug>DrawItStart
endif
noremap <silent> <Plug>DrawItStart :call DrawIt#DrawItStart()<cr>
if !hasmapto('<Plug>DrawItStop')
map <unique> <Leader>ds <Plug>DrawItStop
endif
noremap <silent> <Plug>DrawItStop :call DrawIt#DrawItStop()<cr>
" ---------------------------------------------------------------------
" DrChip Menu Support: {{{1
if has("gui_running") && has("menu") && &go =~# 'm'
Expand Down

0 comments on commit a479ed1

Please sign in to comment.