VimMate 0.6.5 → 0.6.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +16 -0
- data/Rakefile +21 -1
- data/lib/vimmatelib/config.rb +2 -0
- data/lib/vimmatelib/files_window.rb +42 -8
- data/lib/vimmatelib/terminals_window.rb +10 -1
- data/lib/vimmatelib/version.rb +1 -1
- data/lib/vimmatelib/vim_window.rb +1 -0
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
= Changelog
|
2
2
|
|
3
|
+
=== Version 0.6.6
|
4
|
+
- # 15198: After a file was opened in Vim, the focus was not in Vim, so if you
|
5
|
+
started typing, you would type in the file list, not in Vim. This has been
|
6
|
+
corrected. Thanks to Gerda Shank for the bug report.
|
7
|
+
- # 14387: A new option is now available to start a login shell by default in
|
8
|
+
the terminal window. The option :terminals_login_shell is set to false by
|
9
|
+
default. If set to true, it will launch the $SHELL command if defined, the
|
10
|
+
shell defined in /etc/passwd if defined and /bin/sh otherwise. In all cases,
|
11
|
+
it will pass the -l option to the shell. Thanks to Pablo Castellazzi for the
|
12
|
+
patch.
|
13
|
+
- # 14886: When filtering, directories that contain no matching files are now
|
14
|
+
automatically hidden. Also, a new option is now available to automatically
|
15
|
+
expand the file tree when filtering. The option is
|
16
|
+
:files_auto_expand_on_filter and is set to false by default. Thanks to
|
17
|
+
Stefan for the original patch.
|
18
|
+
|
3
19
|
=== Version 0.6.5
|
4
20
|
- VimMate would crash when VTE was not present when using shortcut keys
|
5
21
|
- Changed some shortcut keys:
|
data/Rakefile
CHANGED
@@ -71,6 +71,26 @@ desc 'Remove rdoc and package'
|
|
71
71
|
task :clobber => [:clobber_rdoc, :clobber_package]
|
72
72
|
|
73
73
|
desc 'Upload rdoc to Rubyforge'
|
74
|
-
task :upload_rdoc => [:
|
74
|
+
task :upload_rdoc => [:add_tracker] do
|
75
75
|
sh "scp -r html bennygui@rubyforge.org:/var/www/gforge-projects/vimmate"
|
76
76
|
end
|
77
|
+
|
78
|
+
desc 'Add google tracker'
|
79
|
+
task :add_tracker => [:rdoc] do
|
80
|
+
Dir['html/**/*.html'].each do |file|
|
81
|
+
h = File.read(file).sub(/<\/body>/, <<-EOS)
|
82
|
+
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
|
83
|
+
</script>
|
84
|
+
<script type='text/javascript'>
|
85
|
+
//<![CDATA[
|
86
|
+
_uacct = "UA-2894512-3";
|
87
|
+
if (typeof(window['urchinTracker']) != "undefined") { urchinTracker(); }
|
88
|
+
//]]>
|
89
|
+
</script>
|
90
|
+
</body>
|
91
|
+
EOS
|
92
|
+
open(file, 'w') do |f|
|
93
|
+
f.write(h)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
data/lib/vimmatelib/config.rb
CHANGED
@@ -44,6 +44,7 @@ module VimMate
|
|
44
44
|
:file_hover_selection => false,
|
45
45
|
:file_directory_separator => true,
|
46
46
|
:files_filter_active => true,
|
47
|
+
:files_auto_expand_on_filter => false,
|
47
48
|
:files_refresh_interval => 10,
|
48
49
|
:files_default_open_in_tabs => true,
|
49
50
|
:files_use_ellipsis => true,
|
@@ -61,6 +62,7 @@ module VimMate
|
|
61
62
|
:terminals_audible_bell => false,
|
62
63
|
:terminals_visible_bell => false,
|
63
64
|
:terminals_autoexec => "",
|
65
|
+
:terminals_login_shell => false,
|
64
66
|
:subversion_enabled => true,
|
65
67
|
}.freeze
|
66
68
|
|
@@ -46,6 +46,8 @@ module VimMate
|
|
46
46
|
TYPE = 4
|
47
47
|
# Column used to store the status of the file
|
48
48
|
STATUS = 5
|
49
|
+
# Visiblity of row
|
50
|
+
VISIBLE = 6
|
49
51
|
# Type of row: file
|
50
52
|
TYPE_FILE = 0
|
51
53
|
# Type of row: directory
|
@@ -67,7 +69,8 @@ module VimMate
|
|
67
69
|
Gdk::Pixbuf,
|
68
70
|
String,
|
69
71
|
Fixnum,
|
70
|
-
String
|
72
|
+
String,
|
73
|
+
FalseClass)
|
71
74
|
@gtk_tree_store.set_sort_column_id(SORT)
|
72
75
|
|
73
76
|
# Filtered Tree Store
|
@@ -75,14 +78,8 @@ module VimMate
|
|
75
78
|
@gtk_filtered_tree_model.set_visible_func do |model, iter|
|
76
79
|
if @filter_string.nil? or @filter_string.empty?
|
77
80
|
true
|
78
|
-
elsif iter[TYPE] == TYPE_DIRECTORY or iter[TYPE] == TYPE_SEPARATOR
|
79
|
-
true
|
80
81
|
else
|
81
|
-
|
82
|
-
true
|
83
|
-
else
|
84
|
-
false
|
85
|
-
end
|
82
|
+
iter[VISIBLE]
|
86
83
|
end
|
87
84
|
end
|
88
85
|
|
@@ -271,14 +268,51 @@ module VimMate
|
|
271
268
|
|
272
269
|
# Set a filter: files must contain this string
|
273
270
|
def filter=(filter)
|
271
|
+
if filter.empty?
|
272
|
+
clear_filter
|
273
|
+
return
|
274
|
+
end
|
274
275
|
@filter_string = filter
|
276
|
+
|
277
|
+
# Filter tree view so only directories and separators with matching
|
278
|
+
# elements are set visible
|
279
|
+
visible_path = Hash.new(false)
|
280
|
+
|
281
|
+
@gtk_tree_store.each do |model,path,iter|
|
282
|
+
if iter[NAME] and iter[TYPE] == TYPE_FILE
|
283
|
+
if iter[VISIBLE] = iter[NAME].index(@filter_string)
|
284
|
+
begin
|
285
|
+
visible_path[path.to_s] = true
|
286
|
+
end while path.up!
|
287
|
+
end
|
288
|
+
else
|
289
|
+
iter[VISIBLE] = true
|
290
|
+
if iter[TYPE] == TYPE_SEPARATOR
|
291
|
+
visible_path[path.to_s] = true
|
292
|
+
end
|
293
|
+
end
|
294
|
+
end
|
295
|
+
|
296
|
+
@gtk_tree_store.each do |model,path,iter|
|
297
|
+
if not visible_path[path.to_s]
|
298
|
+
iter[VISIBLE] = false
|
299
|
+
if iter[TYPE] == TYPE_DIRECTORY and Config[:file_directory_separator]
|
300
|
+
if iter.next!
|
301
|
+
iter[VISIBLE] = false
|
302
|
+
end
|
303
|
+
end
|
304
|
+
end
|
305
|
+
end
|
306
|
+
|
275
307
|
@gtk_filtered_tree_model.refilter
|
308
|
+
@gtk_tree_view.expand_all if Config[:files_auto_expand_on_filter]
|
276
309
|
end
|
277
310
|
|
278
311
|
# Clear the filter
|
279
312
|
def clear_filter
|
280
313
|
@filter_string = ""
|
281
314
|
@gtk_filtered_tree_model.refilter
|
315
|
+
@gtk_tree_view.collapse_all if Config[:files_auto_expand_on_filter]
|
282
316
|
filter
|
283
317
|
end
|
284
318
|
|
@@ -145,7 +145,16 @@ module VimMate
|
|
145
145
|
gtk_terminal.signal_connect("window-title-changed") do |terminal|
|
146
146
|
@gtk_notebook.set_tab_label_text(terminal, terminal.window_title)
|
147
147
|
end
|
148
|
-
|
148
|
+
if (Config[:terminals_login_shell])
|
149
|
+
begin
|
150
|
+
require 'etc'
|
151
|
+
rescue LoadError
|
152
|
+
end
|
153
|
+
shell = (ENV["SHELL"] || Etc.getpwnam(Etc.getlogin).shell rescue nil || "/bin/sh")
|
154
|
+
gtk_terminal.pid = gtk_terminal.fork_command(shell, ["-l"])
|
155
|
+
else
|
156
|
+
gtk_terminal.pid = gtk_terminal.fork_command
|
157
|
+
end
|
149
158
|
gtk_terminal.feed_child(Config[:terminals_autoexec])
|
150
159
|
gtk_terminal.show
|
151
160
|
gtk_terminal
|
data/lib/vimmatelib/version.rb
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: VimMate
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.6.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.6.6
|
7
|
+
date: 2007-11-03 00:00:00 -04:00
|
8
8
|
summary: VimMate is a graphical add-on to Vim with IDE-like features.
|
9
9
|
require_paths:
|
10
10
|
- lib
|