ver 2009.10.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. data/CHANGELOG +1404 -0
  2. data/MANIFEST +187 -0
  3. data/Rakefile +30 -0
  4. data/TODO +169 -0
  5. data/bin/ver +19 -0
  6. data/config/detect.rb +109 -0
  7. data/config/keymap/vim.rb +239 -0
  8. data/config/rc.rb +0 -0
  9. data/config/scratch +3 -0
  10. data/config/syntax/ANTLR.json +275 -0
  11. data/config/syntax/ASP VB.net.json +228 -0
  12. data/config/syntax/ASP.json +135 -0
  13. data/config/syntax/ActionScript.json +168 -0
  14. data/config/syntax/Ada.json +108 -0
  15. data/config/syntax/Apache.json +342 -0
  16. data/config/syntax/AppleScript.json +721 -0
  17. data/config/syntax/Bibtex.json +253 -0
  18. data/config/syntax/Blog (HTML).json +47 -0
  19. data/config/syntax/Blog (Markdown).json +50 -0
  20. data/config/syntax/Blog (Text).json +45 -0
  21. data/config/syntax/Blog (Textile).json +45 -0
  22. data/config/syntax/Bulletin Board.json +428 -0
  23. data/config/syntax/C++.json +323 -0
  24. data/config/syntax/C.json +694 -0
  25. data/config/syntax/CSS.json +346 -0
  26. data/config/syntax/DOT.json +79 -0
  27. data/config/syntax/Diff.json +136 -0
  28. data/config/syntax/Dylan.json +104 -0
  29. data/config/syntax/Eiffel.json +128 -0
  30. data/config/syntax/Erlang.json +1636 -0
  31. data/config/syntax/F-Script.json +137 -0
  32. data/config/syntax/FXScript.json +260 -0
  33. data/config/syntax/Gri.json +141 -0
  34. data/config/syntax/HTML (Mason).json +207 -0
  35. data/config/syntax/HTML (Rails).json +52 -0
  36. data/config/syntax/HTML (Tcl).json +42 -0
  37. data/config/syntax/HTML for ASP.net.json +736 -0
  38. data/config/syntax/HTML-ASP.json +45 -0
  39. data/config/syntax/HTML.json +614 -0
  40. data/config/syntax/Haskell.json +407 -0
  41. data/config/syntax/Inform.json +80 -0
  42. data/config/syntax/Ini.json +91 -0
  43. data/config/syntax/Io.json +142 -0
  44. data/config/syntax/Java.json +745 -0
  45. data/config/syntax/JavaProperties.json +42 -0
  46. data/config/syntax/JavaScript.json +446 -0
  47. data/config/syntax/LaTeX Beamer.json +65 -0
  48. data/config/syntax/LaTeX Log.json +88 -0
  49. data/config/syntax/LaTeX.json +962 -0
  50. data/config/syntax/Lighttpd.json +93 -0
  51. data/config/syntax/Lisp.json +101 -0
  52. data/config/syntax/Literate Haskell.json +55 -0
  53. data/config/syntax/Logtalk.json +289 -0
  54. data/config/syntax/Lua.json +146 -0
  55. data/config/syntax/M.json +744 -0
  56. data/config/syntax/MEL.json +161 -0
  57. data/config/syntax/MIPS.json +114 -0
  58. data/config/syntax/Mail.json +224 -0
  59. data/config/syntax/Makefile.json +66 -0
  60. data/config/syntax/Markdown.json +644 -0
  61. data/config/syntax/Modula-3.json +80 -0
  62. data/config/syntax/Movable Type.json +348 -0
  63. data/config/syntax/OCaml.json +1391 -0
  64. data/config/syntax/Objective-C++.json +21 -0
  65. data/config/syntax/OpenGL.json +24 -0
  66. data/config/syntax/PHP.json +2184 -0
  67. data/config/syntax/Pascal.json +128 -0
  68. data/config/syntax/Perl.json +2091 -0
  69. data/config/syntax/Plain text.json +49 -0
  70. data/config/syntax/Processing.json +188 -0
  71. data/config/syntax/Quake3 Config.json +54 -0
  72. data/config/syntax/R.json +157 -0
  73. data/config/syntax/Rez.json +137 -0
  74. data/config/syntax/Ruby on Rails.json +170 -0
  75. data/config/syntax/Ruby.json +1753 -0
  76. data/config/syntax/SQL (Rails).json +31 -0
  77. data/config/syntax/SQL.json +435 -0
  78. data/config/syntax/SWIG.json +96 -0
  79. data/config/syntax/Scheme.json +359 -0
  80. data/config/syntax/Shell-Unix-Generic.json +1198 -0
  81. data/config/syntax/Slate.json +265 -0
  82. data/config/syntax/Smarty.json +110 -0
  83. data/config/syntax/Standard ML.json +322 -0
  84. data/config/syntax/Subversion commit message.json +62 -0
  85. data/config/syntax/Tcl.json +278 -0
  86. data/config/syntax/TeX Math.json +83 -0
  87. data/config/syntax/TeX.json +157 -0
  88. data/config/syntax/Textile.json +273 -0
  89. data/config/syntax/Twiki.json +436 -0
  90. data/config/syntax/Vectorscript.json +97 -0
  91. data/config/syntax/XML strict.json +148 -0
  92. data/config/syntax/XML.json +301 -0
  93. data/config/syntax/XSL.json +96 -0
  94. data/config/syntax/YAML.json +293 -0
  95. data/config/syntax/iCalendar.json +51 -0
  96. data/config/syntax/reStructuredText.json +403 -0
  97. data/config/theme/Active4D.json +260 -0
  98. data/config/theme/All Hallow's Eve.json +171 -0
  99. data/config/theme/Amy.json +359 -0
  100. data/config/theme/BBEdit.json +269 -0
  101. data/config/theme/Bespin.json +322 -0
  102. data/config/theme/Blackboard.json +215 -0
  103. data/config/theme/BoysAndGirls01.json +156 -0
  104. data/config/theme/Brilliance Black.json +1695 -0
  105. data/config/theme/Brilliance Dull.json +1451 -0
  106. data/config/theme/Classic Modified.json +288 -0
  107. data/config/theme/Cobalt.json +345 -0
  108. data/config/theme/Cool Glow.json +215 -0
  109. data/config/theme/Dawn.json +258 -0
  110. data/config/theme/Eiffel.json +270 -0
  111. data/config/theme/Espresso Libre.json +247 -0
  112. data/config/theme/Fluidvision.json +272 -0
  113. data/config/theme/IDLE.json +159 -0
  114. data/config/theme/LAZY.json +178 -0
  115. data/config/theme/Mac Classic.json +277 -0
  116. data/config/theme/MagicWB (Amiga).json +231 -0
  117. data/config/theme/Merbivore Soft.json +181 -0
  118. data/config/theme/Merbivore.json +181 -0
  119. data/config/theme/Monokai.json +177 -0
  120. data/config/theme/Notepad2.json +166 -0
  121. data/config/theme/Pastels on Dark.json +437 -0
  122. data/config/theme/RubyBlue.json +226 -0
  123. data/config/theme/Sin City 2.json +361 -0
  124. data/config/theme/Slate.json +270 -0
  125. data/config/theme/Slush & Poppies.json +232 -0
  126. data/config/theme/SpaceCadet.json +143 -0
  127. data/config/theme/Sunburst.json +415 -0
  128. data/config/theme/Twilight BG FG.json +633 -0
  129. data/config/theme/Twilight.json +321 -0
  130. data/config/theme/Whys Poignant.json +119 -0
  131. data/config/theme/Zenburnesque.json +237 -0
  132. data/config/theme/barf.json +155 -0
  133. data/config/theme/fake.json +418 -0
  134. data/config/theme/happydeluxe.json +114 -0
  135. data/config/theme/iLife 05.json +393 -0
  136. data/config/theme/iPlastic.json +177 -0
  137. data/config/theme/mintBlue Dark.json +414 -0
  138. data/config/theme/mintBlue.json +415 -0
  139. data/config/theme/monoindustrial.json +276 -0
  140. data/config/theme/starlight.json +67 -0
  141. data/config/tutorial +74 -0
  142. data/config/welcome +115 -0
  143. data/help/index.verh +14 -0
  144. data/lib/ver.rb +156 -0
  145. data/lib/ver/entry.rb +97 -0
  146. data/lib/ver/keymap.rb +96 -0
  147. data/lib/ver/layout.rb +107 -0
  148. data/lib/ver/methods.rb +19 -0
  149. data/lib/ver/methods/completion.rb +116 -0
  150. data/lib/ver/methods/control.rb +340 -0
  151. data/lib/ver/methods/insert.rb +6 -0
  152. data/lib/ver/methods/move.rb +65 -0
  153. data/lib/ver/methods/search.rb +33 -0
  154. data/lib/ver/methods/select.rb +145 -0
  155. data/lib/ver/methods/views.rb +21 -0
  156. data/lib/ver/mode.rb +160 -0
  157. data/lib/ver/options.rb +207 -0
  158. data/lib/ver/plist.rb +106 -0
  159. data/lib/ver/status.rb +67 -0
  160. data/lib/ver/syntax.rb +68 -0
  161. data/lib/ver/syntax/detector.rb +53 -0
  162. data/lib/ver/syntax/processor.rb +48 -0
  163. data/lib/ver/text.rb +374 -0
  164. data/lib/ver/textpow.rb +357 -0
  165. data/lib/ver/theme.rb +162 -0
  166. data/lib/ver/vendor/fuzzy_file_finder.rb +340 -0
  167. data/lib/ver/view.rb +163 -0
  168. data/lib/ver/view/entry.rb +28 -0
  169. data/lib/ver/view/list.rb +137 -0
  170. data/lib/ver/view/list/buffer.rb +27 -0
  171. data/lib/ver/view/list/fuzzy_file_finder.rb +44 -0
  172. data/lib/ver/view/list/syntax.rb +13 -0
  173. data/lib/ver/view/list/theme.rb +13 -0
  174. data/spec/keymap.rb +224 -0
  175. data/tasks/bacon.rake +49 -0
  176. data/tasks/changelog.rake +18 -0
  177. data/tasks/gem.rake +22 -0
  178. data/tasks/gem_installer.rake +76 -0
  179. data/tasks/grancher.rake +12 -0
  180. data/tasks/install_dependencies.rake +6 -0
  181. data/tasks/manifest.rake +4 -0
  182. data/tasks/plist2json.rake +35 -0
  183. data/tasks/rcov.rake +18 -0
  184. data/tasks/release.rake +12 -0
  185. data/tasks/reversion.rake +8 -0
  186. data/tasks/syntax_list.rake +31 -0
  187. data/ver.gemspec +29 -0
  188. metadata +241 -0
data/MANIFEST ADDED
@@ -0,0 +1,187 @@
1
+ CHANGELOG
2
+ MANIFEST
3
+ Rakefile
4
+ TODO
5
+ bin/ver
6
+ config/detect.rb
7
+ config/keymap/vim.rb
8
+ config/rc.rb
9
+ config/scratch
10
+ config/syntax/ANTLR.json
11
+ config/syntax/ASP VB.net.json
12
+ config/syntax/ASP.json
13
+ config/syntax/ActionScript.json
14
+ config/syntax/Ada.json
15
+ config/syntax/Apache.json
16
+ config/syntax/AppleScript.json
17
+ config/syntax/Bibtex.json
18
+ config/syntax/Blog (HTML).json
19
+ config/syntax/Blog (Markdown).json
20
+ config/syntax/Blog (Text).json
21
+ config/syntax/Blog (Textile).json
22
+ config/syntax/Bulletin Board.json
23
+ config/syntax/C++.json
24
+ config/syntax/C.json
25
+ config/syntax/CSS.json
26
+ config/syntax/DOT.json
27
+ config/syntax/Diff.json
28
+ config/syntax/Dylan.json
29
+ config/syntax/Eiffel.json
30
+ config/syntax/Erlang.json
31
+ config/syntax/F-Script.json
32
+ config/syntax/FXScript.json
33
+ config/syntax/Gri.json
34
+ config/syntax/HTML (Mason).json
35
+ config/syntax/HTML (Rails).json
36
+ config/syntax/HTML (Tcl).json
37
+ config/syntax/HTML for ASP.net.json
38
+ config/syntax/HTML-ASP.json
39
+ config/syntax/HTML.json
40
+ config/syntax/Haskell.json
41
+ config/syntax/Inform.json
42
+ config/syntax/Ini.json
43
+ config/syntax/Io.json
44
+ config/syntax/Java.json
45
+ config/syntax/JavaProperties.json
46
+ config/syntax/JavaScript.json
47
+ config/syntax/LaTeX Beamer.json
48
+ config/syntax/LaTeX Log.json
49
+ config/syntax/LaTeX.json
50
+ config/syntax/Lighttpd.json
51
+ config/syntax/Lisp.json
52
+ config/syntax/Literate Haskell.json
53
+ config/syntax/Logtalk.json
54
+ config/syntax/Lua.json
55
+ config/syntax/M.json
56
+ config/syntax/MEL.json
57
+ config/syntax/MIPS.json
58
+ config/syntax/Mail.json
59
+ config/syntax/Makefile.json
60
+ config/syntax/Markdown.json
61
+ config/syntax/Modula-3.json
62
+ config/syntax/Movable Type.json
63
+ config/syntax/OCaml.json
64
+ config/syntax/Objective-C++.json
65
+ config/syntax/OpenGL.json
66
+ config/syntax/PHP.json
67
+ config/syntax/Pascal.json
68
+ config/syntax/Perl.json
69
+ config/syntax/Plain text.json
70
+ config/syntax/Processing.json
71
+ config/syntax/Quake3 Config.json
72
+ config/syntax/R.json
73
+ config/syntax/Rez.json
74
+ config/syntax/Ruby on Rails.json
75
+ config/syntax/Ruby.json
76
+ config/syntax/SQL (Rails).json
77
+ config/syntax/SQL.json
78
+ config/syntax/SWIG.json
79
+ config/syntax/Scheme.json
80
+ config/syntax/Shell-Unix-Generic.json
81
+ config/syntax/Slate.json
82
+ config/syntax/Smarty.json
83
+ config/syntax/Standard ML.json
84
+ config/syntax/Subversion commit message.json
85
+ config/syntax/Tcl.json
86
+ config/syntax/TeX Math.json
87
+ config/syntax/TeX.json
88
+ config/syntax/Textile.json
89
+ config/syntax/Twiki.json
90
+ config/syntax/Vectorscript.json
91
+ config/syntax/XML strict.json
92
+ config/syntax/XML.json
93
+ config/syntax/XSL.json
94
+ config/syntax/YAML.json
95
+ config/syntax/iCalendar.json
96
+ config/syntax/reStructuredText.json
97
+ config/theme/Active4D.json
98
+ config/theme/All Hallow's Eve.json
99
+ config/theme/Amy.json
100
+ config/theme/BBEdit.json
101
+ config/theme/Bespin.json
102
+ config/theme/Blackboard.json
103
+ config/theme/BoysAndGirls01.json
104
+ config/theme/Brilliance Black.json
105
+ config/theme/Brilliance Dull.json
106
+ config/theme/Classic Modified.json
107
+ config/theme/Cobalt.json
108
+ config/theme/Cool Glow.json
109
+ config/theme/Dawn.json
110
+ config/theme/Eiffel.json
111
+ config/theme/Espresso Libre.json
112
+ config/theme/Fluidvision.json
113
+ config/theme/IDLE.json
114
+ config/theme/LAZY.json
115
+ config/theme/Mac Classic.json
116
+ config/theme/MagicWB (Amiga).json
117
+ config/theme/Merbivore Soft.json
118
+ config/theme/Merbivore.json
119
+ config/theme/Monokai.json
120
+ config/theme/Notepad2.json
121
+ config/theme/Pastels on Dark.json
122
+ config/theme/RubyBlue.json
123
+ config/theme/Sin City 2.json
124
+ config/theme/Slate.json
125
+ config/theme/Slush & Poppies.json
126
+ config/theme/SpaceCadet.json
127
+ config/theme/Sunburst.json
128
+ config/theme/Twilight BG FG.json
129
+ config/theme/Twilight.json
130
+ config/theme/Whys Poignant.json
131
+ config/theme/Zenburnesque.json
132
+ config/theme/barf.json
133
+ config/theme/fake.json
134
+ config/theme/happydeluxe.json
135
+ config/theme/iLife 05.json
136
+ config/theme/iPlastic.json
137
+ config/theme/mintBlue Dark.json
138
+ config/theme/mintBlue.json
139
+ config/theme/monoindustrial.json
140
+ config/theme/starlight.json
141
+ config/tutorial
142
+ config/welcome
143
+ help/index.verh
144
+ lib/ver.rb
145
+ lib/ver/entry.rb
146
+ lib/ver/keymap.rb
147
+ lib/ver/layout.rb
148
+ lib/ver/methods.rb
149
+ lib/ver/methods/completion.rb
150
+ lib/ver/methods/control.rb
151
+ lib/ver/methods/insert.rb
152
+ lib/ver/methods/move.rb
153
+ lib/ver/methods/search.rb
154
+ lib/ver/methods/select.rb
155
+ lib/ver/methods/views.rb
156
+ lib/ver/mode.rb
157
+ lib/ver/options.rb
158
+ lib/ver/plist.rb
159
+ lib/ver/status.rb
160
+ lib/ver/syntax.rb
161
+ lib/ver/syntax/detector.rb
162
+ lib/ver/syntax/processor.rb
163
+ lib/ver/text.rb
164
+ lib/ver/textpow.rb
165
+ lib/ver/theme.rb
166
+ lib/ver/vendor/fuzzy_file_finder.rb
167
+ lib/ver/view.rb
168
+ lib/ver/view/entry.rb
169
+ lib/ver/view/list.rb
170
+ lib/ver/view/list/buffer.rb
171
+ lib/ver/view/list/fuzzy_file_finder.rb
172
+ lib/ver/view/list/syntax.rb
173
+ lib/ver/view/list/theme.rb
174
+ spec/keymap.rb
175
+ tasks/bacon.rake
176
+ tasks/changelog.rake
177
+ tasks/gem.rake
178
+ tasks/gem_installer.rake
179
+ tasks/grancher.rake
180
+ tasks/install_dependencies.rake
181
+ tasks/manifest.rake
182
+ tasks/plist2json.rake
183
+ tasks/rcov.rake
184
+ tasks/release.rake
185
+ tasks/reversion.rake
186
+ tasks/syntax_list.rake
187
+ ver.gemspec
data/Rakefile ADDED
@@ -0,0 +1,30 @@
1
+ require 'rake'
2
+ require 'rake/clean'
3
+ require 'rake/gempackagetask'
4
+ require 'time'
5
+ require 'date'
6
+
7
+ PROJECT_SPECS = Dir['spec/**/*.rb']
8
+ PROJECT_MODULE = 'VER'
9
+
10
+ GEMSPEC = Gem::Specification.new{|s|
11
+ s.name = 'ver'
12
+ s.author = "Michael 'manveru' Fellinger"
13
+ s.summary = "VER is Vim & Emacs in Ruby"
14
+ s.description = "An advanced text editor using tk and bringing world peace."
15
+ s.email = 'm.fellinger@gmail.com'
16
+ s.homepage = 'http://github.com/manveru/ver'
17
+ s.platform = Gem::Platform::RUBY
18
+ s.version = (ENV['PROJECT_VERSION'] || Date.today.strftime("%Y.%m.%d"))
19
+ s.files = `git ls-files`.split("\n").sort
20
+ s.has_rdoc = true
21
+ s.require_path = 'lib'
22
+ s.bindir = 'bin'
23
+ s.executables = ['ver']
24
+ }
25
+
26
+ Dir['tasks/*.rake'].each{|f| import(f) }
27
+
28
+ task :default => [:bacon]
29
+
30
+ CLEAN.include('')
data/TODO ADDED
@@ -0,0 +1,169 @@
1
+ # TODO
2
+
3
+ This is a list of tasks that are on my list:
4
+
5
+ ## Startup
6
+
7
+ [x] Editing of non-existing files when given as argument, create on save.
8
+
9
+ ## Misc
10
+
11
+ [ ] There is a memory leak hiding somewhere in Tk, you have to find out what that is, probably it's keeping references to old Tk entities somewhere, strange thing is that this also happens when you just open another file in the same buffer, some stress testing and use of ObjectSpace should reveal the issue.
12
+
13
+ ## VER::Text
14
+
15
+ Following is a list of things that need redefinition or mapping and porting to
16
+ Ruby from the original tk bindings of the Tk::Text widget. This needs to be
17
+ done so we can provide true modal editing with full control over what happens
18
+ in the widget, otherwise we will have to keep the original binding in place to
19
+ provide this functionality.
20
+
21
+ Mouse actions should generally invoke the select_char mode until we get
22
+ line-numbers going, then clicks on the line-numbers should invoke select_line
23
+ mode.
24
+ Many of the mouse bindings seem non-trivial, and are rather low priority as I
25
+ want to focus on efficient editing with keyboard first.
26
+
27
+ I'll tackle each of them, some may not be implemented at all, or done in other
28
+ ways, and trivial ones first.
29
+
30
+
31
+ [ ] If any normal printing characters are typed, they are inserted at the point
32
+ of the insertion cursor.
33
+
34
+ [ ] The Left and Right keys move the insertion cursor one character to the left
35
+ or right; they also clear any selection in the text. If Left or Right is
36
+ typed with the Shift key down, then the insertion cursor moves and the
37
+ selection is extended to include the new character. Control-Left and
38
+ Control-Right move the insertion cursor by words, and Control-Shift-Left
39
+ and Control-Shift-Right move the insertion cursor by words and also extend
40
+ the selection. Control-b and Control-f behave the same as Left and Right,
41
+ respectively. Meta-b and Meta-f behave the same as Control-Left and
42
+ Control-Right, respectively.
43
+
44
+ [ ] The Up and Down keys move the insertion cursor one line up or down and
45
+ clear any selection in the text. If Up or Right is typed with the Shift key
46
+ down, then the insertion cursor moves and the selection is extended to
47
+ include the new character. Control-Up and Control-Down move the insertion
48
+ cursor by paragraphs (groups of lines separated by blank lines), and
49
+ Control-Shift-Up and Control-Shift-Down move the insertion cursor by
50
+ paragraphs and also extend the selection. Control-p and Control-n behave
51
+ the same as Up and Down, respectively.
52
+
53
+ [ ] The Next and Prior keys move the insertion cursor forward or backwards by
54
+ one screenful and clear any selection in the text. If the Shift key is held
55
+ down while Next or Prior is typed, then the selection is extended to
56
+ include the new character.
57
+
58
+ [ ] Control-Next and Control-Prior scroll the view right or left by one page
59
+ without moving the insertion cursor or affecting the selection.
60
+
61
+ [ ] Home and Control-a move the insertion cursor to the beginning of its
62
+ display line and clear any selection in the widget. Shift-Home moves the
63
+ insertion cursor to the beginning of the display line and also extends the
64
+ selection to that point.
65
+
66
+ [ ] End and Control-e move the insertion cursor to the end of the display line
67
+ and clear any selection in the widget. Shift-End moves the cursor to the
68
+ end of the display line and extends the selection to that point.
69
+
70
+ [ ] Control-Home and Meta-< move the insertion cursor to the beginning of the
71
+ text and clear any selection in the widget. Control-Shift-Home moves the
72
+ insertion cursor to the beginning of the text and also extends the
73
+ selection to that point.
74
+
75
+ [ ] Control-End and Meta-> move the insertion cursor to the end of the text and
76
+ clear any selection in the widget. Control-Shift-End moves the cursor to
77
+ the end of the text and extends the selection to that point.
78
+
79
+ [ ] The Select key and Control-Space set the selection anchor to the position
80
+ of the insertion cursor. They do not affect the current selection.
81
+ Shift-Select and Control-Shift-Space adjust the selection to the current
82
+ position of the insertion cursor, selecting from the anchor to the
83
+ insertion cursor if there was not any selection previously.
84
+
85
+ [ ] Control-/ selects the entire contents of the widget.
86
+
87
+ [ ] Control-\ clears any selection in the widget.
88
+
89
+ [ ] The F16 key (labelled Copy on many Sun workstations) or Meta-w copies the
90
+ selection in the widget to the clipboard, if there is a selection. This
91
+ action is carried out by the command tk_textCopy.
92
+
93
+ [ ] The F20 key (labelled Cut on many Sun workstations) or Control-w copies the
94
+ selection in the widget to the clipboard and deletes the selection. This
95
+ action is carried out by the command tk_textCut. If there is no selection
96
+ in the widget then these keys have no effect.
97
+
98
+ [ ] The F18 key (labelled Paste on many Sun workstations) or Control-y inserts
99
+ the contents of the clipboard at the position of the insertion cursor. This
100
+ action is carried out by the command tk_textPaste.
101
+
102
+ [ ] The Delete key deletes the selection, if there is one in the widget. If
103
+ there is no selection, it deletes the character to the right of the
104
+ insertion cursor.
105
+
106
+ [ ] Backspace and Control-h delete the selection, if there is one in the
107
+ widget. If there is no selection, they delete the character to the left of
108
+ the insertion cursor.
109
+
110
+ [ ] Control-d deletes the character to the right of the insertion cursor.
111
+
112
+ [ ] Meta-d deletes the word to the right of the insertion cursor.
113
+
114
+ [ ] Control-k deletes from the insertion cursor to the end of its line; if the
115
+ insertion cursor is already at the end of a line, then Control-k deletes
116
+ the newline character.
117
+
118
+ [ ] Control-o opens a new line by inserting a newline character in front of the
119
+ insertion cursor without moving the insertion cursor.
120
+
121
+ [ ] Meta-backspace and Meta-Delete delete the word to the left of the insertion
122
+ cursor.
123
+
124
+ [ ] Control-x deletes whatever is selected in the text widget after copying it
125
+ to the clipboard.
126
+
127
+ [ ] Control-t reverses the order of the two characters to the right of the
128
+ insertion cursor.
129
+
130
+ [ ] Control-z (and Control-underscore on UNIX when tk_strictMotif is true)
131
+ undoes the last edit action if the -undo option is true. Does nothing
132
+ otherwise.
133
+
134
+ [ ] Control-Z (or Control-y on Windows) reapplies the last undone edit action
135
+ if the -undo option is true. Does nothing otherwise.
136
+
137
+ [ ] Clicking mouse button 1 positions the insertion cursor just before the
138
+ character underneath the mouse cursor, sets the input focus to this widget,
139
+ and clears any selection in the widget. Dragging with mouse button 1
140
+ strokes out a selection between the insertion cursor and the character
141
+ under the mouse.
142
+
143
+ [ ] Double-clicking with mouse button 1 selects the word under the mouse and
144
+ positions the insertion cursor at the start of the word. Dragging after a
145
+ double click will stroke out a selection consisting of whole words.
146
+
147
+ [ ] Triple-clicking with mouse button 1 selects the line under the mouse and
148
+ positions the insertion cursor at the start of the line. Dragging after a
149
+ triple click will stroke out a selection consisting of whole lines.
150
+
151
+ [ ] The ends of the selection can be adjusted by dragging with mouse button 1
152
+ while the Shift key is down; this will adjust the end of the selection that
153
+ was nearest to the mouse cursor when button 1 was pressed. If the button is
154
+ double-clicked before dragging then the selection will be adjusted in units
155
+ of whole words; if it is triple-clicked then the selection will be adjusted
156
+ in units of whole lines.
157
+
158
+ [ ] Clicking mouse button 1 with the Control key down will reposition the
159
+ insertion cursor without affecting the selection.
160
+
161
+ [ ] The view in the widget can be adjusted by dragging with mouse button 2. If
162
+ mouse button 2 is clicked without moving the mouse, the selection is copied
163
+ into the text at the position of the mouse cursor. The Insert key also
164
+ inserts the selection, but at the position of the insertion cursor.
165
+
166
+ [ ] If the mouse is dragged out of the widget while button 1 is pressed, the
167
+ entry will automatically scroll to make more text visible (if there is more
168
+ text off-screen on the side where the mouse left the window).
169
+
data/bin/ver ADDED
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ if File.symlink?(__FILE__)
4
+ lib = File.expand_path('../../lib/ver', File.readlink(__FILE__))
5
+ else
6
+ lib = File.expand_path('../../lib/ver', __FILE__)
7
+ end
8
+
9
+ if ARGV.delete('-f')
10
+ require lib
11
+ VER.run
12
+ else
13
+ fork do
14
+ fork do
15
+ require lib
16
+ VER.run
17
+ end
18
+ end
19
+ end
data/config/detect.rb ADDED
@@ -0,0 +1,109 @@
1
+ # Encoding: UTF-8
2
+
3
+ module VER::Syntax::Detector
4
+ exts "ANTLR", ["g"]
5
+ exts "ASP vb.NET", ["vb"]
6
+ exts "ASP", ["asa"]
7
+ exts "ActionScript", ["as"]
8
+ exts "Ada", ["adb", "ads"]
9
+ exts "Apache", ["conf", "htaccess"]
10
+ exts "AppleScript", ["applescript", "script editor"]
11
+ head "AppleScript", /^#!.*(osascript)/
12
+ exts "BibTeX", ["bib"]
13
+ exts "Blog — HTML", ["blog.html"]
14
+ head "Blog — HTML", /^Type: Blog Post \(HTML\)/
15
+ exts "Blog — Markdown", ["blog.markdown", "blog.mdown", "blog.mkdn", "blog.md"]
16
+ head "Blog — Markdown", /^Type: Blog Post \(Markdown\)/
17
+ exts "Blog — Text", ["blog.txt"]
18
+ head "Blog — Text", /^Type: Blog Post \(Text\)/
19
+ exts "Blog — Textile", ["blog.textile"]
20
+ head "Blog — Textile", /^Type: Blog Post \(Textile\)/
21
+ exts "Bulletin Board", ["bbcode"]
22
+ exts "C++", ["cc", "cpp", "cp", "cxx", "c++", "C", "h", "hh", "hpp", "h++"]
23
+ head "C++", /-\*- C\+\+ -\*-/
24
+ exts "C", ["c", "h"]
25
+ head "C", /-[*]-( Mode:)? C -[*]-/
26
+ exts "CSS", ["css", "css.erb"]
27
+ exts "Graphviz (DOT)", ["dot", "DOT"]
28
+ exts "Diff", ["diff", "patch"]
29
+ head "Diff", /(?x)^
30
+ (===\ modified\ file
31
+ |==== \s* \/\/ .+ \s - \s .+ \s+ ====
32
+ |Index:\
33
+ |---\ [^%]
34
+ |\*\*\*.*\d{4}\s*$
35
+ |\d+(,\d+)* (a|d|c) \d+(,\d+)* $
36
+ |diff\ --git\
37
+ )/
38
+ exts "Dylan", ["dylan"]
39
+ exts "Eiffel", ["e"]
40
+ exts "Erlang", ["erl", "hrl"]
41
+ exts "F-Script", ["fscript"]
42
+ exts "FXScript", ["fxscript"]
43
+ exts "Gri", ["gri"]
44
+ head "Gri", /-[*]-( Mode:)? Gri -[*]-/
45
+ exts "HTML (Mason)", ["mhtml", "autohandler", "dhandler", "md", "mc"]
46
+ exts "HTML (Rails)", ["rhtml", "erb", "html.erb"]
47
+ exts "HTML (Tcl)", ["tcl", "adp", "inc"]
48
+ exts "HTML (ASP.net)", ["aspx", "ascx"]
49
+ exts "HTML (ASP)", ["asp"]
50
+ exts "HTML", ["html", "htm", "shtml", "xhtml", "phtml", "php", "inc", "tmpl", "tpl", "ctp"]
51
+ head "HTML", /<!DOCTYPE|<(?i:html)|<\?(?i:php)/
52
+ exts "Haskell", ["hs"]
53
+ exts "Inform", ["inf"]
54
+ exts "Ini", ["ini", "conf"]
55
+ exts "Io", ["io"]
56
+ exts "Java", ["java", "bsh"]
57
+ exts "Java Properties", ["properties"]
58
+ exts "JavaScript", ["js", "htc", "jsx"]
59
+ head "LaTeX Beamer", /^\\documentclass(\[.*\])?\{beamer\}/
60
+ head "LaTeX Log", /This is (pdf|pdfe)?TeXk?, Version/
61
+ exts "LaTeX", ["tex"]
62
+ head "LaTeX", /^\\documentclass(?!.*\{beamer\})/
63
+ exts "Lisp", ["lisp", "cl", "l", "mud", "el"]
64
+ exts "Literate Haskell", ["lhs"]
65
+ exts "Logtalk", ["lgt", "config"]
66
+ exts "Lua", ["lua"]
67
+ exts "MEL", ["as"]
68
+ exts "MIPS Assembler", ["s", "mips", "spim", "asm"]
69
+ exts "Mail", ["mail"]
70
+ head "Mail", /^From: .*(?=\w+@[\w-]+\.\w+)/
71
+ exts "Makefile", ["GNUmakefile", "makefile", "Makefile", "OCamlMakefile"]
72
+ exts "Markdown", ["mdown", "markdown", "markdn", "md"]
73
+ exts "Modula-3", ["m3", "cm3"]
74
+ exts "Movable Type", ["mtml"]
75
+ head "Movable Type", /<\$?[Mm][Tt]/
76
+ exts "OCaml", ["ml", "mli"]
77
+ exts "Objective-C++", ["mm", "M", "h"]
78
+ head "PHP", /^#!.*(?<!-)php[0-9]{0,1}\b/
79
+ exts "Pascal", ["pas", "p"]
80
+ exts "Perl", ["pl", "pm", "pod", "t", "PL"]
81
+ head "Perl", /^#!.*\bperl\b/
82
+ exts "Plain Text", ["txt"]
83
+ exts "Processing", ["pde"]
84
+ exts "Quake Style .cfg", ["cfg"]
85
+ exts "R", ["R", "r", "s", "S", "Rprofile"]
86
+ exts "Rez", ["r"]
87
+ exts "Ruby on Rails", ["rxml", "builder"]
88
+ exts "Ruby", ["rb", "rbx", "rjs", "Rakefile", "rake", "cgi", "fcgi", "gemspec", "irbrc", "capfile"]
89
+ head "Ruby", /^#!\/.*\bruby\b/
90
+ exts "SQL (Rails)", ["erbsql", "sql.erb"]
91
+ exts "SQL", ["sql", "ddl", "dml"]
92
+ exts "SWIG", ["i", "swg"]
93
+ exts "Scheme", ["scm", "sch"]
94
+ exts "Shell Script (Bash)", ["sh", "ss", "bashrc", "bash_profile", "bash_login", "profile", "bash_logout", ".textmate_init"]
95
+ head "Shell Script (Bash)", /^#!.*(bash|zsh|sh|tcsh)/
96
+ exts "Slate", ["slate"]
97
+ exts "Standard ML", ["sml", "sig"]
98
+ exts "svn-commit.tmp", ["svn-commit.tmp", "svn-commit.2.tmp"]
99
+ exts "Tcl", ["tcl"]
100
+ exts "TeX", ["sty", "cls"]
101
+ exts "Textile", ["textile"]
102
+ head "Textile", /textile/
103
+ exts "Vectorscript", ["vss"]
104
+ exts "XML", ["xml", "tld", "jsp", "pt", "cpt", "dtml", "rss", "opml"]
105
+ exts "XSL", ["xsl", "xslt"]
106
+ exts "YAML", ["yaml", "yml"]
107
+ exts "iCalendar", ["ics", "ifb"]
108
+ exts "reStructuredText", ["rst", "rest"]
109
+ end