Skip to content

Commit a479ed1

Browse files
committed
remove default Start/Stop maps
1 parent 9c3b3cb commit a479ed1

File tree

4 files changed

+9
-29
lines changed

4 files changed

+9
-29
lines changed

README

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ This is a mirror of http://www.vim.org/scripts/script.php?script_id=40
22

33
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.
44

5-
Its easy to start and stop DrawIt: use
6-
7-
\di to start DrawIt and
8-
\ds to stop DrawIt.
5+
Its easy to start and stop DrawIt: use :DrawIt[!].
96

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

autoload/DrawIt.vim

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
" Should put DrawItPlugin.vim in your .vim/plugin directory,
1313
" put DrawIt.vim in your .vim/autoload directory
1414
" put DrawIt.txt in your .vim/doc directory.
15-
" Then, use \di to start DrawIt,
16-
" \ds to stop Drawit, and
15+
" Then, use :DrawIt to start DrawIt,
16+
" :DrawIt! to stop Drawit, and
1717
" draw by simply moving about using the cursor keys.
1818
"
1919
" You may also use visual-block mode to select endpoints and
@@ -97,7 +97,7 @@ fun! DrawIt#DrawItStart(...)
9797
" DrawItStart: report on [DrawIt] mode {{{3
9898
if exists("b:dodrawit") && b:dodrawit == 1
9999
" already in DrawIt mode
100-
echo "[DrawIt] (already on, use ".((exists("mapleader") && mapleader != "")? mapleader : '\')."ds to stop)"
100+
echo "[DrawIt] (already on, use :Drawit! to stop)"
101101
" call Dret("DrawItStart")
102102
return
103103
endif
@@ -430,7 +430,7 @@ fun! DrawIt#DrawItStart(...)
430430
431431
" DrawItStart: Menu support {{{3
432432
if has("gui_running") && has("menu") && &go =~# 'm'
433-
exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Stop\ \ DrawIt<tab>\\ds <Leader>ds'
433+
exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Stop\ \ DrawIt :DrawIt!<CR>'
434434
exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Append\ Blanks<tab>\\s <Leader>s'
435435
exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Draw\ Arrow<tab>\\a <Leader>a'
436436
exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Draw\ Box<tab>\\b <Leader>b'
@@ -503,7 +503,7 @@ fun! DrawIt#DrawItStop()
503503

504504
" DrawItStop: DrChip menu support: {{{3
505505
if has("gui_running") && has("menu") && &go =~# 'm'
506-
exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Start\ DrawIt<tab>\\di <Leader>di'
506+
exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Start\ DrawIt :DrawIt<CR>'
507507
exe 'unmenu '.g:DrChipTopLvlMenu.'DrawIt.Stop\ \ DrawIt'
508508
exe 'unmenu '.g:DrChipTopLvlMenu.'DrawIt.Toggle\ Erase\ Mode'
509509
exe 'unmenu '.g:DrChipTopLvlMenu.'DrawIt.Draw\ Arrow'

doc/DrawIt.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ Copyright: Copyright (C) 2018 Charles E. Campbell
4242
|| Starting & | ||
4343
|| Stopping | Explanation Links: ||
4444
++--------------+-----------------------------------------------------------++
45-
|| \di | start DrawIt |drawit-start| ||
46-
|| \ds | stop DrawIt |drawit-stop| ||
4745
|| :DIstart | start DrawIt |drawit-start| ||
4846
|| :DIstart S | start DrawIt in single-bar mode |drawit-start| ||
4947
|| :DIstart D | start DrawIt in double-bar mode |drawit-start| ||
@@ -158,7 +156,6 @@ DrawIt be loaded. Thus DrawIt supports fast vim startup.
158156

159157
STARTING *drawit-start* {{{2
160158

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

173-
To stop DrawIt, use \ds (*d*rawit *s*top) or :DIstop.
170+
To stop DrawIt, use :DrawIt!.
174171

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

187184
*drawit-off*
188185
STOPPING *drawit-stop* {{{2
189-
\ds
190186
:DrawIt!
191187
:DIstop
192188
:DIoff
193189

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

197193
A message, "[DrawIt off]", will appear on the message line.

plugin/DrawItPlugin.vim

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
" DrawItPlugin.vim: a simple way to draw things in Vim -- just put this file in
2-
" your plugin directory, use \di to start (\ds to stop), and
2+
" your plugin directory, use :DrawIt to start (:DrawIt! to stop), and
33
" just move about using the cursor keys.
44
"
55
" You may also use visual-block mode to select endpoints and
@@ -47,19 +47,6 @@ sil! com -nargs=0 DInrml call DrawIt#SetMode('N')
4747
sil! com -nargs=0 DIsngl call DrawIt#SetMode('S')
4848
sil! com -nargs=0 DIdbl call DrawIt#SetMode('D')
4949

50-
" maps: users may override these maps by defining their own mappings in their .vimrc
51-
" to <Plug>DrawItStart and/or <Plug>DrawItStop. By default:
52-
" \di : start DrawIt
53-
" \ds : stop DrawIt
54-
if !hasmapto('<Plug>DrawItStart')
55-
map <unique> <Leader>di <Plug>DrawItStart
56-
endif
57-
noremap <silent> <Plug>DrawItStart :call DrawIt#DrawItStart()<cr>
58-
if !hasmapto('<Plug>DrawItStop')
59-
map <unique> <Leader>ds <Plug>DrawItStop
60-
endif
61-
noremap <silent> <Plug>DrawItStop :call DrawIt#DrawItStop()<cr>
62-
6350
" ---------------------------------------------------------------------
6451
" DrChip Menu Support: {{{1
6552
if has("gui_running") && has("menu") && &go =~# 'm'

0 commit comments

Comments
 (0)