ruco 0.0.38 → 0.0.39
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.
- data/Readme.md +3 -1
- data/VERSION +1 -1
- data/bin/ruco +1 -0
- data/lib/ruco/application.rb +3 -1
- data/lib/ruco/editor.rb +1 -9
- data/lib/ruco/text_area.rb +1 -0
- data/ruco.gemspec +2 -2
- data/spec/ruco/editor_spec.rb +10 -4
- metadata +4 -4
data/Readme.md
CHANGED
@@ -4,7 +4,7 @@ Features:
|
|
4
4
|
|
5
5
|
- **Intuitive interface**
|
6
6
|
- selecting via Shift+left/right/up/down and Ctrl+a(all)
|
7
|
-
- Tab -> indent / Shift+Tab -> unindent
|
7
|
+
- Tab -> indent / Shift+Tab -> unindent
|
8
8
|
- keeps indentation (+ paste-detection e.g. via Cmd+v)
|
9
9
|
- change (*) + writable (!) indicators
|
10
10
|
- find / go to line / delete line / search & replace
|
@@ -56,6 +56,7 @@ Customize
|
|
56
56
|
|
57
57
|
TIPS
|
58
58
|
====
|
59
|
+
- [Tabs] Ruco does not like tabs. Existing tabs are displayed as ' ' and pressing tab inserts 2*' '
|
59
60
|
- [RVM] `alias r="rvm ree exec ruco"` and you only have to install ruco once
|
60
61
|
- [Ruby1.9] Unicode support -> install libncursesw5-dev before installing ruby (does not work for 1.8)
|
61
62
|
- [ssh vs clipboard] access your desktops clipboard by installing `xauth` on the server and then using `ssh -X`
|
@@ -63,6 +64,7 @@ TIPS
|
|
63
64
|
|
64
65
|
TODO
|
65
66
|
=====
|
67
|
+
- highlight tabs (e.g. strange character or reverse/underline/color)
|
66
68
|
- big warning when editing a not-writable file
|
67
69
|
- find next (Alt+n)
|
68
70
|
- add selection colors to forms in command_bar
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.39
|
data/bin/ruco
CHANGED
@@ -70,6 +70,7 @@ def display(lines, offset, color_mask)
|
|
70
70
|
clearer = Curses.stdscr.maxx + 1 - content.size
|
71
71
|
clearer = " " * clearer
|
72
72
|
content += clearer
|
73
|
+
content.gsub!("\t",' ') # display tabs as single-space -> nothing breaks
|
73
74
|
|
74
75
|
# cache !?
|
75
76
|
next if @screen[line] == [content, colors]
|
data/lib/ruco/application.rb
CHANGED
@@ -158,7 +158,9 @@ module Ruco
|
|
158
158
|
end
|
159
159
|
|
160
160
|
action :go_to_line do
|
161
|
-
ask('Go to Line: ')
|
161
|
+
ask('Go to Line: ') do |result|
|
162
|
+
editor.move(:to_line, result.to_i - 1)
|
163
|
+
end
|
162
164
|
end
|
163
165
|
|
164
166
|
action :delete_line do
|
data/lib/ruco/editor.rb
CHANGED
@@ -19,15 +19,7 @@ module Ruco
|
|
19
19
|
end
|
20
20
|
|
21
21
|
content = (File.exist?(@file) ? File.read(@file) : '')
|
22
|
-
|
23
|
-
# check for tabs
|
24
|
-
if content.include?("\t")
|
25
|
-
if options[:convert_tabs]
|
26
|
-
content.tabs_to_spaces!
|
27
|
-
else
|
28
|
-
raise "#{@file} contains tabs.\nRuco atm does not support tabs, but will happily convert them to spaces if started with --convert-tabs or -c"
|
29
|
-
end
|
30
|
-
end
|
22
|
+
content.tabs_to_spaces! if options[:convert_tabs]
|
31
23
|
|
32
24
|
@saved_content = content
|
33
25
|
@text_area = EditorArea.new(content, options)
|
data/lib/ruco/text_area.rb
CHANGED
data/ruco.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ruco}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.39"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Michael Grosser"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-02-02}
|
13
13
|
s.default_executable = %q{ruco}
|
14
14
|
s.email = %q{michael@grosser.it}
|
15
15
|
s.executables = ["ruco"]
|
data/spec/ruco/editor_spec.rb
CHANGED
@@ -21,10 +21,9 @@ describe Ruco::Editor do
|
|
21
21
|
editor.view.should == " a\n\n\n"
|
22
22
|
end
|
23
23
|
|
24
|
-
it "
|
25
|
-
|
26
|
-
|
27
|
-
}.should raise_error
|
24
|
+
it "reads them normally when option is not set" do
|
25
|
+
editor = Ruco::Editor.new(@file, :lines => 3, :columns => 5)
|
26
|
+
editor.view.should == "\t\ta\n\n\n"
|
28
27
|
end
|
29
28
|
end
|
30
29
|
|
@@ -808,5 +807,12 @@ describe Ruco::Editor do
|
|
808
807
|
editor.view.should == "5\n7\n8\n"
|
809
808
|
editor.cursor.should == [1, 1]
|
810
809
|
end
|
810
|
+
|
811
|
+
it "can remove the last line" do
|
812
|
+
write('xxx')
|
813
|
+
editor.delete_line
|
814
|
+
editor.insert('yyy')
|
815
|
+
editor.view.should == "yyy\n\n\n"
|
816
|
+
end
|
811
817
|
end
|
812
818
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruco
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 81
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 39
|
10
|
+
version: 0.0.39
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michael Grosser
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-02-02 00:00:00 +01:00
|
19
19
|
default_executable: ruco
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|