forked from grosser/ruco
/
ruco.rb
66 lines (54 loc) · 1.46 KB
/
ruco.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
require 'language_sniffer'
require 'ruco/version'
require 'ruco/core_ext/object'
require 'ruco/core_ext/string'
require 'ruco/core_ext/array'
require 'ruco/core_ext/hash'
require 'ruco/core_ext/range'
require 'ruco/core_ext/file'
require 'ruco/keyboard'
require 'ruco/position'
require 'ruco/history'
require 'ruco/option_accessor'
require 'ruco/file_store'
require 'ruco/window'
require 'ruco/screen'
require 'ruco/style_map'
require 'ruco/syntax_parser'
require 'ruco/editor'
require 'ruco/editor/line_numbers'
require 'ruco/editor/history'
require 'ruco/status_bar'
require 'ruco/command_bar'
require 'ruco/application'
if $ruco_colors
begin
# this can fail on ruby 1.8 <-> oniguruma is complicated to install
require 'oniguruma' if RUBY_VERSION < '1.9.0'
# there are some other gems out there like spox-textpow etc, so be picky
gem 'plist'
require 'plist'
gem 'textpow1x'
require 'textpow'
# we do not need there if any other color li failed
require 'ruco/array_processor'
require 'ruco/tm_theme'
require 'ruco/editor/colors'
rescue LoadError
warn "Could not load color libs -- #{$!}"
end
end
require 'ruco/form'
require 'ruco/text_area'
require 'ruco/editor_area'
require 'ruco/text_field'
module Ruco
autoload :Clipboard, 'clipboard' # can crash when loaded -> load if needed
TAB_SIZE = 2
class << self
attr_accessor :application
end
def self.configure(&block)
application.instance_exec(&block)
end
end