textbringer 26 → 27
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.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/textbringer/commands/clipboard.rb +7 -4
- data/lib/textbringer/commands/misc.rb +30 -0
- data/lib/textbringer/face.rb +18 -0
- data/lib/textbringer/keymap.rb +2 -0
- data/lib/textbringer/modes/ruby_mode.rb +9 -8
- data/lib/textbringer/themes/iceberg.rb +88 -0
- data/lib/textbringer/themes/kanagawa.rb +94 -0
- data/lib/textbringer/version.rb +1 -1
- data/lib/textbringer/window.rb +4 -1
- data/textbringer.gemspec +1 -2
- metadata +14 -26
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: be4c934800d0492229b1476d4541825533ff3e824490ad23ef331926ee8d6492
|
|
4
|
+
data.tar.gz: 9157e0ba963f1dd77eab7a50f929c91b1ae6a7689c1ad41cda22876c32d6c0fb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3f70f40322ad8fed8ef2044839e3df7fee67922b1cfe975283516cf3a10fac6566248d0a5fbcc98ef319155302105c0c37d9f30fa602f6a3b3b2069dbf5a1314
|
|
7
|
+
data.tar.gz: 6348a9ecddb8423d4fb07b8291dcda1ce7945cf049e997770347deb309ad8c3a507bfb6815a5db2c7f277677680c4023793cf9fd221ea96bd4ed60e5863e68e6
|
data/README.md
CHANGED
|
@@ -2,12 +2,15 @@ module Clipboard
|
|
|
2
2
|
@implementation = nil
|
|
3
3
|
end
|
|
4
4
|
|
|
5
|
-
require "clipboard"
|
|
6
|
-
|
|
7
5
|
module Textbringer
|
|
8
6
|
module Commands
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
begin
|
|
8
|
+
require "clipboard"
|
|
9
|
+
CLIPBOARD_AVAILABLE =
|
|
10
|
+
Clipboard.implementation.name != "Clipboard::File"
|
|
11
|
+
rescue LoadError
|
|
12
|
+
CLIPBOARD_AVAILABLE = false
|
|
13
|
+
end
|
|
11
14
|
|
|
12
15
|
if CLIPBOARD_AVAILABLE
|
|
13
16
|
GLOBAL_MAP.define_key("\M-w", :clipboard_copy_region)
|
|
@@ -354,6 +354,36 @@ module Textbringer
|
|
|
354
354
|
RubyVM::MJIT.resume
|
|
355
355
|
end
|
|
356
356
|
|
|
357
|
+
define_command(:forward_page,
|
|
358
|
+
doc: "Move forward to page boundary.") do
|
|
359
|
+
|n = number_prefix_arg|
|
|
360
|
+
buffer = Buffer.current
|
|
361
|
+
n.times do
|
|
362
|
+
unless buffer.re_search_forward(/^\f/, raise_error: false)
|
|
363
|
+
buffer.end_of_buffer
|
|
364
|
+
break
|
|
365
|
+
end
|
|
366
|
+
end
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
define_command(:backward_page,
|
|
370
|
+
doc: "Move backward to page boundary.") do
|
|
371
|
+
|n = number_prefix_arg|
|
|
372
|
+
buffer = Buffer.current
|
|
373
|
+
n.times do
|
|
374
|
+
if buffer.point == 0
|
|
375
|
+
break
|
|
376
|
+
end
|
|
377
|
+
buffer.backward_char
|
|
378
|
+
if buffer.re_search_backward(/^\f/, raise_error: false)
|
|
379
|
+
buffer.forward_char
|
|
380
|
+
else
|
|
381
|
+
buffer.beginning_of_buffer
|
|
382
|
+
break
|
|
383
|
+
end
|
|
384
|
+
end
|
|
385
|
+
end
|
|
386
|
+
|
|
357
387
|
define_command(:what_cursor_position,
|
|
358
388
|
doc: "Print info on cursor position.") do
|
|
359
389
|
|arg = current_prefix_arg|
|
data/lib/textbringer/face.rb
CHANGED
|
@@ -7,6 +7,8 @@ module Textbringer
|
|
|
7
7
|
@@face_table = {}
|
|
8
8
|
@@next_color_pair = 1
|
|
9
9
|
@@color_pair_cache = {}
|
|
10
|
+
@@default_foreground = -1
|
|
11
|
+
@@default_background = -1
|
|
10
12
|
|
|
11
13
|
def self.[](name)
|
|
12
14
|
@@face_table[name]
|
|
@@ -26,6 +28,20 @@ module Textbringer
|
|
|
26
28
|
@@face_table.delete(name)
|
|
27
29
|
end
|
|
28
30
|
|
|
31
|
+
# Set the concrete color numbers substituted for -1 (default color).
|
|
32
|
+
# PDCurses resolves -1 when init_pair is called and
|
|
33
|
+
# assume_default_colors only affects color pair 0, so faces must be
|
|
34
|
+
# re-resolved with concrete colors to get the new default colors.
|
|
35
|
+
def self.set_default_color_numbers(fg_num, bg_num)
|
|
36
|
+
return if fg_num == @@default_foreground &&
|
|
37
|
+
bg_num == @@default_background
|
|
38
|
+
@@default_foreground = fg_num
|
|
39
|
+
@@default_background = bg_num
|
|
40
|
+
@@face_table.each_value do |face|
|
|
41
|
+
face.send(:resolve_inheritance)
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
29
45
|
def initialize(name, **opts)
|
|
30
46
|
@name = name
|
|
31
47
|
update(**opts)
|
|
@@ -68,6 +84,8 @@ module Textbringer
|
|
|
68
84
|
@reverse = @explicit_reverse.nil? ? (parent&.instance_variable_get(:@reverse) || false) : @explicit_reverse
|
|
69
85
|
fg_num = Color[@foreground]
|
|
70
86
|
bg_num = Color[@background]
|
|
87
|
+
fg_num = @@default_foreground if fg_num == -1
|
|
88
|
+
bg_num = @@default_background if bg_num == -1
|
|
71
89
|
key = [fg_num, bg_num]
|
|
72
90
|
unless @@color_pair_cache.key?(key)
|
|
73
91
|
@@color_pair_cache[key] = @@next_color_pair
|
data/lib/textbringer/keymap.rb
CHANGED
|
@@ -167,6 +167,8 @@ module Textbringer
|
|
|
167
167
|
GLOBAL_MAP.define_key(:npage, :scroll_up)
|
|
168
168
|
GLOBAL_MAP.define_key("\M-v", :scroll_down)
|
|
169
169
|
GLOBAL_MAP.define_key(:ppage, :scroll_down)
|
|
170
|
+
GLOBAL_MAP.define_key("\C-x]", :forward_page)
|
|
171
|
+
GLOBAL_MAP.define_key("\C-x[", :backward_page)
|
|
170
172
|
GLOBAL_MAP.define_key("\C-x0", :delete_window)
|
|
171
173
|
GLOBAL_MAP.define_key("\C-x1", :delete_other_windows)
|
|
172
174
|
GLOBAL_MAP.define_key("\C-x2", :split_window)
|
|
@@ -8,7 +8,7 @@ module Textbringer
|
|
|
8
8
|
class RubyMode < ProgrammingMode
|
|
9
9
|
self.file_name_pattern =
|
|
10
10
|
/\A(?:.*\.(?:rb|ru|rake|thor|jbuilder|gemspec|podspec)|
|
|
11
|
-
(?:Gem|Rake|Cap|Thor|Vagrant|Guard|Pod)file)\z/ix
|
|
11
|
+
(?:Gem|Rake|Cap|Thor|Vagrant|Guard|Pod)file|.irbrc)\z/ix
|
|
12
12
|
self.interpreter_name_pattern = /ruby/i
|
|
13
13
|
|
|
14
14
|
def comment_start
|
|
@@ -512,13 +512,14 @@ module Textbringer
|
|
|
512
512
|
elsif node.type == :alias_method_node
|
|
513
513
|
add_alias_method_name_locs(node.new_name)
|
|
514
514
|
add_alias_method_name_locs(node.old_name)
|
|
515
|
-
elsif (node.type == :call_node &&
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
515
|
+
elsif ((node.type == :call_node &&
|
|
516
|
+
!(node.call_operator_loc.nil? && OPERATORS.include?(node.name)) && # exclude operators
|
|
517
|
+
!((node.call_operator_loc.nil? || node.call_operator_loc.slice == "::") && # exclude constants
|
|
518
|
+
/\A\p{Upper}/.match?(node.name))) ||
|
|
519
|
+
node.type == :call_operator_write_node ||
|
|
520
|
+
node.type == :call_and_write_node ||
|
|
521
|
+
node.type == :call_or_write_node) &&
|
|
522
|
+
node.message_loc
|
|
522
523
|
@prism_method_name_locs[node.message_loc.start_offset] = true
|
|
523
524
|
end
|
|
524
525
|
node.compact_child_nodes.each { |child| collect_method_name_locs(child) }
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Iceberg theme for Textbringer
|
|
2
|
+
# Based on https://github.com/cocopon/iceberg.vim
|
|
3
|
+
# A well-designed dark blue color scheme.
|
|
4
|
+
#
|
|
5
|
+
# GUI hex values from the source's guifg/guibg definitions.
|
|
6
|
+
|
|
7
|
+
Textbringer::Theme.define "iceberg" do |t|
|
|
8
|
+
t.palette :dark do |p|
|
|
9
|
+
# Background / foreground
|
|
10
|
+
p.color :bg, hex: "#161821", ansi: "black" # Normal guibg
|
|
11
|
+
p.color :bg1, hex: "#1e2132", ansi: "black" # terminal color0
|
|
12
|
+
p.color :bg_vis, hex: "#272c42", ansi: "brightblack" # Visual guibg
|
|
13
|
+
p.color :bg_popup, hex: "#3d425b", ansi: "brightblack" # Pmenu guibg
|
|
14
|
+
p.color :bg_sel, hex: "#5b6389", ansi: "brightblack" # PmenuSel guibg
|
|
15
|
+
p.color :fg, hex: "#c6c8d1", ansi: "white" # Normal guifg
|
|
16
|
+
p.color :fg_sel, hex: "#eff0f4", ansi: "white" # PmenuSel guifg
|
|
17
|
+
p.color :comment, hex: "#6b7089", ansi: "brightblack" # Comment guifg
|
|
18
|
+
p.color :status_bg, hex: "#818596", ansi: "white" # StatusLine (reverse)
|
|
19
|
+
p.color :status_fg, hex: "#17171b", ansi: "black" # StatusLine (reverse)
|
|
20
|
+
|
|
21
|
+
# Accent colors
|
|
22
|
+
p.color :blue, hex: "#84a0c6", ansi: "blue" # Statement/Keyword guifg
|
|
23
|
+
p.color :cyan, hex: "#89b8c2", ansi: "cyan" # String/Identifier guifg
|
|
24
|
+
p.color :green, hex: "#b4be82", ansi: "green" # PreProc/Special guifg
|
|
25
|
+
p.color :purple, hex: "#a093c7", ansi: "magenta" # Constant guifg
|
|
26
|
+
p.color :orange, hex: "#e4aa80", ansi: "yellow" # Search guibg
|
|
27
|
+
p.color :search_fg, hex: "#392313", ansi: "black" # Search guifg
|
|
28
|
+
p.color :red, hex: "#e27878", ansi: "red" # terminal color1
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
t.palette :light do |p|
|
|
32
|
+
# Background / foreground
|
|
33
|
+
p.color :bg, hex: "#e8e9ec", ansi: "white" # Normal guibg
|
|
34
|
+
p.color :bg1, hex: "#dcdfe7", ansi: "white" # terminal color0
|
|
35
|
+
p.color :bg_vis, hex: "#c9cdd7", ansi: "white" # Visual guibg
|
|
36
|
+
p.color :bg_popup, hex: "#cad0de", ansi: "white" # Pmenu guibg
|
|
37
|
+
p.color :bg_sel, hex: "#a7b2cd", ansi: "white" # PmenuSel guibg
|
|
38
|
+
p.color :fg, hex: "#33374c", ansi: "black" # Normal guifg
|
|
39
|
+
p.color :fg_sel, hex: "#33374c", ansi: "black" # PmenuSel guifg
|
|
40
|
+
p.color :comment, hex: "#8389a3", ansi: "brightblack" # Comment guifg
|
|
41
|
+
p.color :status_bg, hex: "#757ca3", ansi: "brightblack" # StatusLine (reverse)
|
|
42
|
+
p.color :status_fg, hex: "#e8e9ec", ansi: "white" # StatusLine (reverse)
|
|
43
|
+
|
|
44
|
+
# Accent colors
|
|
45
|
+
p.color :blue, hex: "#2d539e", ansi: "blue" # Statement/Keyword guifg
|
|
46
|
+
p.color :cyan, hex: "#3f83a6", ansi: "cyan" # String/Identifier guifg
|
|
47
|
+
p.color :green, hex: "#668e3d", ansi: "green" # PreProc/Special guifg
|
|
48
|
+
p.color :purple, hex: "#7759b4", ansi: "magenta" # Constant guifg
|
|
49
|
+
p.color :orange, hex: "#eac6ad", ansi: "yellow" # Search guibg
|
|
50
|
+
p.color :search_fg, hex: "#85512c", ansi: "black" # Search guifg
|
|
51
|
+
p.color :red, hex: "#cc517a", ansi: "red" # terminal color1
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
t.default_colors foreground: :fg, background: :bg
|
|
55
|
+
|
|
56
|
+
# Programming faces
|
|
57
|
+
t.face :comment, foreground: :comment
|
|
58
|
+
t.face :preprocessing_directive, foreground: :green # PreProc
|
|
59
|
+
t.face :keyword, foreground: :blue # Statement
|
|
60
|
+
t.face :string, foreground: :cyan # String
|
|
61
|
+
t.face :number, foreground: :purple # Constant
|
|
62
|
+
t.face :constant, foreground: :purple # Constant
|
|
63
|
+
t.face :function_name, foreground: :blue # Function
|
|
64
|
+
t.face :type, foreground: :blue # Type
|
|
65
|
+
t.face :variable, foreground: :cyan # Identifier
|
|
66
|
+
t.face :operator, foreground: :blue # Operator
|
|
67
|
+
t.face :punctuation # Delimiter = fg
|
|
68
|
+
t.face :builtin, foreground: :green # Special
|
|
69
|
+
t.face :property, foreground: :cyan # Identifier
|
|
70
|
+
|
|
71
|
+
# Basic faces
|
|
72
|
+
t.face :mode_line, foreground: :status_fg, background: :status_bg
|
|
73
|
+
t.face :link, foreground: :cyan, underline: true
|
|
74
|
+
t.face :control
|
|
75
|
+
t.face :region, background: :bg_vis
|
|
76
|
+
t.face :isearch, foreground: :search_fg, background: :orange
|
|
77
|
+
t.face :floating_window, foreground: :fg, background: :bg_popup
|
|
78
|
+
|
|
79
|
+
# Completion faces
|
|
80
|
+
t.face :completion_popup, foreground: :fg, background: :bg_popup
|
|
81
|
+
t.face :completion_popup_selected, foreground: :fg_sel, background: :bg_sel
|
|
82
|
+
|
|
83
|
+
# Dired faces
|
|
84
|
+
t.face :dired_directory, foreground: :cyan # Directory
|
|
85
|
+
t.face :dired_symlink, foreground: :green # Tag → Special
|
|
86
|
+
t.face :dired_executable, foreground: :green
|
|
87
|
+
t.face :dired_flagged, foreground: :red
|
|
88
|
+
end
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Kanagawa theme for Textbringer
|
|
2
|
+
# Based on https://github.com/rebelot/kanagawa.nvim
|
|
3
|
+
# Wave (dark) and Lotus (light) variants.
|
|
4
|
+
#
|
|
5
|
+
# GUI hex values from the source palette and theme definitions.
|
|
6
|
+
|
|
7
|
+
Textbringer::Theme.define "kanagawa" do |t|
|
|
8
|
+
t.palette :dark do |p|
|
|
9
|
+
# Background / foreground (wave variant)
|
|
10
|
+
p.color :bg, hex: "#1f1f28", ansi: "black" # sumiInk3 – Normal bg
|
|
11
|
+
p.color :bg_dark, hex: "#181820", ansi: "black" # sumiInk1 – StatusLine bg
|
|
12
|
+
p.color :bg_popup, hex: "#223249", ansi: "brightblack" # waveBlue1 – Pmenu bg
|
|
13
|
+
p.color :bg_vis, hex: "#223249", ansi: "brightblack" # waveBlue1 – Visual bg
|
|
14
|
+
p.color :bg_sel, hex: "#2d4f67", ansi: "brightblack" # waveBlue2 – PmenuSel bg, Search bg
|
|
15
|
+
p.color :bg_float, hex: "#16161d", ansi: "black" # sumiInk0 – float bg
|
|
16
|
+
p.color :fg, hex: "#dcd7ba", ansi: "white" # fujiWhite – Normal fg
|
|
17
|
+
p.color :fg_dim, hex: "#c8c093", ansi: "white" # oldWhite – StatusLine fg, float fg
|
|
18
|
+
|
|
19
|
+
# Syntax colors
|
|
20
|
+
p.color :comment, hex: "#727169", ansi: "brightblack" # fujiGray – Comment
|
|
21
|
+
p.color :string, hex: "#98bb6c", ansi: "green" # springGreen – String
|
|
22
|
+
p.color :pink, hex: "#d27e99", ansi: "magenta" # sakuraPink – Number
|
|
23
|
+
p.color :orange, hex: "#ffa066", ansi: "yellow" # surimiOrange – Constant
|
|
24
|
+
p.color :yellow, hex: "#e6c384", ansi: "yellow" # carpYellow – Identifier
|
|
25
|
+
p.color :blue, hex: "#7e9cd8", ansi: "blue" # crystalBlue – Function
|
|
26
|
+
p.color :violet, hex: "#957fb8", ansi: "magenta" # oniViolet – Keyword/Statement
|
|
27
|
+
p.color :gold, hex: "#c0a36e", ansi: "yellow" # boatYellow2 – Operator
|
|
28
|
+
p.color :red, hex: "#e46876", ansi: "red" # waveRed – PreProc
|
|
29
|
+
p.color :aqua, hex: "#7aa89f", ansi: "cyan" # waveAqua2 – Type
|
|
30
|
+
p.color :light_blue, hex: "#9cabca", ansi: "cyan" # springViolet2 – Punctuation
|
|
31
|
+
p.color :spring_blue, hex: "#7fb4ca", ansi: "cyan" # springBlue – Special/Builtin
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
t.palette :light do |p|
|
|
35
|
+
# Background / foreground (lotus variant)
|
|
36
|
+
p.color :bg, hex: "#f2ecbc", ansi: "white" # lotusWhite3 – Normal bg
|
|
37
|
+
p.color :bg_dark, hex: "#dcd7ba", ansi: "white" # lotusGray – StatusLine bg
|
|
38
|
+
p.color :bg_popup, hex: "#c7d7e0", ansi: "white" # lotusBlue1 – Pmenu bg
|
|
39
|
+
p.color :bg_sel, hex: "#9fb5c9", ansi: "white" # lotusBlue3 – PmenuSel bg, Search bg
|
|
40
|
+
p.color :bg_float, hex: "#d5cea3", ansi: "white" # lotusWhite0 – float bg
|
|
41
|
+
p.color :bg_vis, hex: "#c9cbd1", ansi: "white" # lotusViolet3 – Visual bg
|
|
42
|
+
p.color :fg, hex: "#545464", ansi: "black" # lotusInk1 – Normal fg
|
|
43
|
+
p.color :fg_dim, hex: "#43436c", ansi: "black" # lotusInk2 – StatusLine fg
|
|
44
|
+
|
|
45
|
+
# Syntax colors
|
|
46
|
+
p.color :comment, hex: "#8a8980", ansi: "brightblack" # lotusGray3 – Comment
|
|
47
|
+
p.color :string, hex: "#6f894e", ansi: "green" # lotusGreen – String
|
|
48
|
+
p.color :pink, hex: "#b35b79", ansi: "magenta" # lotusPink – Number
|
|
49
|
+
p.color :orange, hex: "#cc6d00", ansi: "yellow" # lotusOrange – Constant
|
|
50
|
+
p.color :yellow, hex: "#77713f", ansi: "yellow" # lotusYellow – Identifier
|
|
51
|
+
p.color :blue, hex: "#4d699b", ansi: "blue" # lotusBlue4 – Function
|
|
52
|
+
p.color :violet, hex: "#624c83", ansi: "magenta" # lotusViolet4 – Keyword/Statement
|
|
53
|
+
p.color :gold, hex: "#836f4a", ansi: "yellow" # lotusYellow2 – Operator
|
|
54
|
+
p.color :red, hex: "#c84053", ansi: "red" # lotusRed – PreProc
|
|
55
|
+
p.color :aqua, hex: "#597b75", ansi: "cyan" # lotusAqua – Type
|
|
56
|
+
p.color :light_blue, hex: "#4e8ca2", ansi: "cyan" # lotusTeal1 – Punctuation
|
|
57
|
+
p.color :spring_blue, hex: "#6693bf", ansi: "cyan" # lotusTeal2 – Special/Builtin
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
t.default_colors foreground: :fg, background: :bg
|
|
61
|
+
|
|
62
|
+
# Programming faces
|
|
63
|
+
t.face :comment, foreground: :comment
|
|
64
|
+
t.face :string, foreground: :string # syn.string
|
|
65
|
+
t.face :number, foreground: :pink # syn.number
|
|
66
|
+
t.face :constant, foreground: :orange # syn.constant
|
|
67
|
+
t.face :keyword, foreground: :violet, bold: true # syn.keyword + statementStyle
|
|
68
|
+
t.face :preprocessing_directive, foreground: :red # syn.preproc
|
|
69
|
+
t.face :function_name, foreground: :blue # syn.fun
|
|
70
|
+
t.face :type, foreground: :aqua # syn.type
|
|
71
|
+
t.face :variable, foreground: :yellow # syn.identifier
|
|
72
|
+
t.face :operator, foreground: :gold # syn.operator
|
|
73
|
+
t.face :punctuation, foreground: :light_blue # syn.punct
|
|
74
|
+
t.face :builtin, foreground: :spring_blue # syn.special1
|
|
75
|
+
t.face :property, foreground: :yellow # syn.identifier (carpYellow)
|
|
76
|
+
|
|
77
|
+
# Basic faces
|
|
78
|
+
t.face :mode_line, foreground: :fg_dim, background: :bg_dark
|
|
79
|
+
t.face :link, foreground: :blue, underline: true
|
|
80
|
+
t.face :control
|
|
81
|
+
t.face :region, background: :bg_vis # Visual = waveBlue1 / lotusViolet3
|
|
82
|
+
t.face :isearch, foreground: :fg, background: :bg_sel # bg_search
|
|
83
|
+
t.face :floating_window, foreground: :fg_dim, background: :bg_float
|
|
84
|
+
|
|
85
|
+
# Completion faces
|
|
86
|
+
t.face :completion_popup, foreground: :fg, background: :bg_popup
|
|
87
|
+
t.face :completion_popup_selected, foreground: :fg, background: :bg_sel
|
|
88
|
+
|
|
89
|
+
# Dired faces
|
|
90
|
+
t.face :dired_directory, foreground: :blue, bold: true # Directory
|
|
91
|
+
t.face :dired_symlink, foreground: :spring_blue # special1
|
|
92
|
+
t.face :dired_executable, foreground: :string # springGreen / lotusGreen
|
|
93
|
+
t.face :dired_flagged, foreground: :red
|
|
94
|
+
end
|
data/lib/textbringer/version.rb
CHANGED
data/lib/textbringer/window.rb
CHANGED
|
@@ -137,9 +137,12 @@ module Textbringer
|
|
|
137
137
|
def self.set_default_colors(fg, bg)
|
|
138
138
|
new_fg = fg || @@default_fg
|
|
139
139
|
new_bg = bg || @@default_bg
|
|
140
|
-
|
|
140
|
+
fg_num = Color[new_fg]
|
|
141
|
+
bg_num = Color[new_bg]
|
|
142
|
+
Curses.assume_default_colors(fg_num, bg_num)
|
|
141
143
|
@@default_fg = new_fg
|
|
142
144
|
@@default_bg = new_bg
|
|
145
|
+
Face.set_default_color_numbers(fg_num, bg_num)
|
|
143
146
|
Face.define(:default, foreground: new_fg, background: new_bg)
|
|
144
147
|
Window.redraw if @@started
|
|
145
148
|
end
|
data/textbringer.gemspec
CHANGED
|
@@ -27,11 +27,10 @@ Gem::Specification.new do |spec|
|
|
|
27
27
|
spec.add_runtime_dependency "irb"
|
|
28
28
|
spec.add_runtime_dependency "nkf"
|
|
29
29
|
spec.add_runtime_dependency "drb"
|
|
30
|
+
spec.add_runtime_dependency "fiddle" # for reline on Windows
|
|
30
31
|
spec.add_runtime_dependency "curses", ">= 1.2.7"
|
|
31
32
|
spec.add_runtime_dependency "unicode-display_width", ">= 1.1"
|
|
32
33
|
spec.add_runtime_dependency "clipboard", ">= 1.1"
|
|
33
|
-
spec.add_runtime_dependency "fiddle"
|
|
34
|
-
spec.add_runtime_dependency "fiddley", ">= 0.0.5"
|
|
35
34
|
spec.add_runtime_dependency "editorconfig"
|
|
36
35
|
spec.add_runtime_dependency "warning"
|
|
37
36
|
spec.add_runtime_dependency "unicode-name"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: textbringer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: '
|
|
4
|
+
version: '27'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shugo Maeda
|
|
@@ -94,35 +94,35 @@ dependencies:
|
|
|
94
94
|
- !ruby/object:Gem::Version
|
|
95
95
|
version: '0'
|
|
96
96
|
- !ruby/object:Gem::Dependency
|
|
97
|
-
name:
|
|
97
|
+
name: fiddle
|
|
98
98
|
requirement: !ruby/object:Gem::Requirement
|
|
99
99
|
requirements:
|
|
100
100
|
- - ">="
|
|
101
101
|
- !ruby/object:Gem::Version
|
|
102
|
-
version:
|
|
102
|
+
version: '0'
|
|
103
103
|
type: :runtime
|
|
104
104
|
prerelease: false
|
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
|
106
106
|
requirements:
|
|
107
107
|
- - ">="
|
|
108
108
|
- !ruby/object:Gem::Version
|
|
109
|
-
version:
|
|
109
|
+
version: '0'
|
|
110
110
|
- !ruby/object:Gem::Dependency
|
|
111
|
-
name:
|
|
111
|
+
name: curses
|
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
|
113
113
|
requirements:
|
|
114
114
|
- - ">="
|
|
115
115
|
- !ruby/object:Gem::Version
|
|
116
|
-
version:
|
|
116
|
+
version: 1.2.7
|
|
117
117
|
type: :runtime
|
|
118
118
|
prerelease: false
|
|
119
119
|
version_requirements: !ruby/object:Gem::Requirement
|
|
120
120
|
requirements:
|
|
121
121
|
- - ">="
|
|
122
122
|
- !ruby/object:Gem::Version
|
|
123
|
-
version:
|
|
123
|
+
version: 1.2.7
|
|
124
124
|
- !ruby/object:Gem::Dependency
|
|
125
|
-
name:
|
|
125
|
+
name: unicode-display_width
|
|
126
126
|
requirement: !ruby/object:Gem::Requirement
|
|
127
127
|
requirements:
|
|
128
128
|
- - ">="
|
|
@@ -136,33 +136,19 @@ dependencies:
|
|
|
136
136
|
- !ruby/object:Gem::Version
|
|
137
137
|
version: '1.1'
|
|
138
138
|
- !ruby/object:Gem::Dependency
|
|
139
|
-
name:
|
|
140
|
-
requirement: !ruby/object:Gem::Requirement
|
|
141
|
-
requirements:
|
|
142
|
-
- - ">="
|
|
143
|
-
- !ruby/object:Gem::Version
|
|
144
|
-
version: '0'
|
|
145
|
-
type: :runtime
|
|
146
|
-
prerelease: false
|
|
147
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
148
|
-
requirements:
|
|
149
|
-
- - ">="
|
|
150
|
-
- !ruby/object:Gem::Version
|
|
151
|
-
version: '0'
|
|
152
|
-
- !ruby/object:Gem::Dependency
|
|
153
|
-
name: fiddley
|
|
139
|
+
name: clipboard
|
|
154
140
|
requirement: !ruby/object:Gem::Requirement
|
|
155
141
|
requirements:
|
|
156
142
|
- - ">="
|
|
157
143
|
- !ruby/object:Gem::Version
|
|
158
|
-
version:
|
|
144
|
+
version: '1.1'
|
|
159
145
|
type: :runtime
|
|
160
146
|
prerelease: false
|
|
161
147
|
version_requirements: !ruby/object:Gem::Requirement
|
|
162
148
|
requirements:
|
|
163
149
|
- - ">="
|
|
164
150
|
- !ruby/object:Gem::Version
|
|
165
|
-
version:
|
|
151
|
+
version: '1.1'
|
|
166
152
|
- !ruby/object:Gem::Dependency
|
|
167
153
|
name: editorconfig
|
|
168
154
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -436,6 +422,8 @@ files:
|
|
|
436
422
|
- lib/textbringer/themes/catppuccin.rb
|
|
437
423
|
- lib/textbringer/themes/github.rb
|
|
438
424
|
- lib/textbringer/themes/gruvbox.rb
|
|
425
|
+
- lib/textbringer/themes/iceberg.rb
|
|
426
|
+
- lib/textbringer/themes/kanagawa.rb
|
|
439
427
|
- lib/textbringer/themes/molokai.rb
|
|
440
428
|
- lib/textbringer/themes/sonokai.rb
|
|
441
429
|
- lib/textbringer/themes/tokyonight.rb
|
|
@@ -515,7 +503,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
515
503
|
- !ruby/object:Gem::Version
|
|
516
504
|
version: '0'
|
|
517
505
|
requirements: []
|
|
518
|
-
rubygems_version: 4.0.
|
|
506
|
+
rubygems_version: 4.0.16
|
|
519
507
|
specification_version: 4
|
|
520
508
|
summary: An Emacs-like text editor
|
|
521
509
|
test_files: []
|