]> granicus.if.org Git - vim/commitdiff
patch 7.4.1672 v7.4.1672
authorBram Moolenaar <Bram@vim.org>
Mon, 28 Mar 2016 18:40:32 +0000 (20:40 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 28 Mar 2016 18:40:32 +0000 (20:40 +0200)
Problem:    The Dvorak support is a bit difficult to install.
Solution:   Turn it into an optional package.

runtime/macros/README.txt
runtime/macros/dvorak [deleted file]
runtime/pack/dist/opt/dvorak/dvorak/disable.vim [new file with mode: 0644]
runtime/pack/dist/opt/dvorak/dvorak/enable.vim [new file with mode: 0644]
runtime/pack/dist/opt/dvorak/plugin/dvorak.vim [new file with mode: 0644]
src/version.c

index f599c0a75071e1e2733880395c99113d40a44e42..e749134836c12b350f792a754c74795b75728080 100644 (file)
@@ -11,8 +11,6 @@ urm   Macros that simulate a simple computer: "Universal Register Machine"
 The other files contain some handy utilities.  They also serve as examples for
 how to use Vi and Vim functionality.
 
-dvorak                 for when you use a Dvorak keyboard
-
 justify.vim            user function for justifying text
 
 less.sh + less.vim     make Vim work like less (or more)
@@ -29,4 +27,8 @@ file_select.vim               macros that make a handy file selector
 
 The matchit plugin has been moved to an optional package.  To load it put this
 line in your vimrc file:
-       :packadd matchit
+       packadd! matchit
+
+The Dvorak supported has been moved to an optional package.  To load it put
+this line in your vimrc file:
+       packadd! dvorak
diff --git a/runtime/macros/dvorak b/runtime/macros/dvorak
deleted file mode 100644 (file)
index 0c75888..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-When using a dvorak keyboard this file may be of help to you.
-These mappings have been made by Lawrence Kesteloot <kesteloo@cs.unc.edu>.
-What they do is that the most often used keys, like hjkl, are put in a more
-easy to use position.
-It may take some time to learn using this.
-
-Put these lines in your .vimrc:
--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-" Key to go into dvorak mode:
-map ,d :source ~/.dvorak
-" Key to get out of dvorak mode:
-map ,q :source ~/.qwerty
--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-
-write these lines into the file ~/.dvorak:
--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-" Dvorak keyboard, only in insert mode and ex mode.
-" You may want to add a list of map's too.
-imap! a \16\16a
-imap! b \16\16x
-imap! c \16\16j
-imap! d \16\16e
-imap! e \16\16.
-imap! f \16\16u
-imap! g \16\16i
-imap! h \16\16d
-imap! i \16\16c
-imap! j \16\16h
-imap! k \16\16t
-imap! l \16\16n
-imap! m \16\16m
-imap! n \16\16b
-imap! o \16\16r
-imap! p \16\16l
-imap! q \16\16'
-imap! r \16\16p
-imap! s \16\16o
-imap! t \16\16y
-imap! u \16\16g
-imap! v \16\16k
-imap! w \16\16,
-imap! x \16\16q
-imap! y \16\16f
-imap! z \16\16;
-imap! ; \16\16s
-imap! ' \16\16-
-imap! " \16\16_
-imap! , \16\16w
-imap! . \16\16v
-imap! / \16\16z
-imap! A \16\16A
-imap! B \16\16X
-imap! C \16\16J
-imap! D \16\16E
-imap! E \16\16>
-imap! F \16\16U
-imap! G \16\16I
-imap! H \16\16D
-imap! I \16\16C
-imap! J \16\16H
-imap! K \16\16T
-imap! L \16\16N
-imap! M \16\16M
-imap! N \16\16B
-imap! O \16\16R
-imap! P \16\16L
-imap! Q \16\16"
-imap! R \16\16P
-imap! S \16\16O
-imap! T \16\16Y
-imap! U \16\16G
-imap! V \16\16K
-imap! W \16\16<
-imap! X \16\16Q
-imap! Y \16\16F
-imap! Z \16\16:
-imap! < \16\16W
-imap! > \16\16V
-imap! ? \16\16Z
-imap! : \16\16S
-imap! [ \16\16/
-imap! ] \16\16=
-imap! { \16\16?
-imap! } \16\16+
-imap! - \16\16[
-imap! _ \16\16{
-imap! = \16\16]
-imap! + \16\16}
--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-
-write these lines into the file ~/.qwerty
--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-" Qwerty keyboard
-unmap! a
-unmap! b
-unmap! c
-unmap! d
-unmap! e
-unmap! f
-unmap! g
-unmap! h
-unmap! i
-unmap! j
-unmap! k
-unmap! l
-unmap! m
-unmap! n
-unmap! o
-unmap! p
-unmap! q
-unmap! r
-unmap! s
-unmap! t
-unmap! u
-unmap! v
-unmap! w
-unmap! x
-unmap! y
-unmap! z
-unmap! ;
-unmap! '
-unmap! \"
-unmap! ,
-unmap! .
-unmap! /
-unmap! A
-unmap! B
-unmap! C
-unmap! D
-unmap! E
-unmap! F
-unmap! G
-unmap! H
-unmap! I
-unmap! J
-unmap! K
-unmap! L
-unmap! M
-unmap! N
-unmap! O
-unmap! P
-unmap! Q
-unmap! R
-unmap! S
-unmap! T
-unmap! U
-unmap! V
-unmap! W
-unmap! X
-unmap! Y
-unmap! Z
-unmap! <
-unmap! >
-unmap! ?
-unmap! :
-unmap! [
-unmap! ]
-unmap! {
-unmap! }
-unmap! -
-unmap! _
-unmap! =
-unmap! +
--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
diff --git a/runtime/pack/dist/opt/dvorak/dvorak/disable.vim b/runtime/pack/dist/opt/dvorak/dvorak/disable.vim
new file mode 100644 (file)
index 0000000..1e9b070
--- /dev/null
@@ -0,0 +1,72 @@
+" Back to Qwerty keyboard after using Dvorak.
+
+iunmap a
+iunmap b
+iunmap c
+iunmap d
+iunmap e
+iunmap f
+iunmap g
+iunmap h
+iunmap i
+iunmap j
+iunmap k
+iunmap l
+iunmap m
+iunmap n
+iunmap o
+iunmap p
+iunmap q
+iunmap r
+iunmap s
+iunmap t
+iunmap u
+iunmap v
+iunmap w
+iunmap x
+iunmap y
+iunmap z
+iunmap ;
+iunmap '
+iunmap "
+iunmap ,
+iunmap .
+iunmap /
+iunmap A
+iunmap B
+iunmap C
+iunmap D
+iunmap E
+iunmap F
+iunmap G
+iunmap H
+iunmap I
+iunmap J
+iunmap K
+iunmap L
+iunmap M
+iunmap N
+iunmap O
+iunmap P
+iunmap Q
+iunmap R
+iunmap S
+iunmap T
+iunmap U
+iunmap V
+iunmap W
+iunmap X
+iunmap Y
+iunmap Z
+iunmap <
+iunmap >
+iunmap ?
+iunmap :
+iunmap [
+iunmap ]
+iunmap {
+iunmap }
+iunmap -
+iunmap _
+iunmap =
+iunmap +
diff --git a/runtime/pack/dist/opt/dvorak/dvorak/enable.vim b/runtime/pack/dist/opt/dvorak/dvorak/enable.vim
new file mode 100644 (file)
index 0000000..8ff363f
--- /dev/null
@@ -0,0 +1,77 @@
+" Dvorak keyboard, only in Insert mode.
+"
+" Change "inoremap" to "map!" to also use in Ex mode.
+" Also change disable.vim then: "iunmap" to "unmap!".
+"
+" You may want to add a list of map's too.
+
+inoremap a a
+inoremap b x
+inoremap c j
+inoremap d e
+inoremap e .
+inoremap f u
+inoremap g i
+inoremap h d
+inoremap i c
+inoremap j h
+inoremap k t
+inoremap l n
+inoremap m m
+inoremap n b
+inoremap o r
+inoremap p l
+inoremap q '
+inoremap r p
+inoremap s o
+inoremap t y
+inoremap u g
+inoremap v k
+inoremap w ,
+inoremap x q
+inoremap y f
+inoremap z ;
+inoremap ; s
+inoremap ' -
+inoremap " _
+inoremap , w
+inoremap . v
+inoremap / z
+inoremap A A
+inoremap B X
+inoremap C J
+inoremap D E
+inoremap E >
+inoremap F U
+inoremap G I
+inoremap H D
+inoremap I C
+inoremap J H
+inoremap K T
+inoremap L N
+inoremap M M
+inoremap N B
+inoremap O R
+inoremap P L
+inoremap Q "
+inoremap R P
+inoremap S O
+inoremap T Y
+inoremap U G
+inoremap V K
+inoremap W <
+inoremap X Q
+inoremap Y F
+inoremap Z :
+inoremap < W
+inoremap > V
+inoremap ? Z
+inoremap : S
+inoremap [ /
+inoremap ] =
+inoremap { ?
+inoremap } +
+inoremap - [
+inoremap _ {
+inoremap = ]
+inoremap + }
diff --git a/runtime/pack/dist/opt/dvorak/plugin/dvorak.vim b/runtime/pack/dist/opt/dvorak/plugin/dvorak.vim
new file mode 100644 (file)
index 0000000..c8d5d5c
--- /dev/null
@@ -0,0 +1,16 @@
+" When using a dvorak keyboard this file may be of help to you.
+" These mappings have been made by Lawrence Kesteloot <kesteloo@cs.unc.edu>.
+" What they do is that the most often used keys, like hjkl, are put in a more
+" easy to use position.
+" It may take some time to learn using this.
+
+if exists("g:loaded_dvorak_plugin")
+  finish
+endif
+let g:loaded_dvorak_plugin = 1
+
+" Key to go into dvorak mode:
+map ,d :runtime dvorak/enable.vim<CR>
+
+" Key to get out of dvorak mode:
+map ,q :runtime dvorak/disable.vim<CR>
index a26efec391764b9d9fc74d0a63f3242d94bbae86..d36a51baa89acca9587a50848e19a24a874df440 100644 (file)
@@ -748,6 +748,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1672,
 /**/
     1671,
 /**/