xiki 0.5.1a → 0.5.3a
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -11
- data/README.markdown +67 -43
- data/bin/xiki +2 -15
- data/etc/command/xiki_command.rb +115 -41
- data/etc/command/xiki_process.rb +3 -7
- data/etc/install/el4r_setup.sh +5 -0
- data/etc/themes/Black_BG.notes +8 -0
- data/etc/themes/Dark_Metal.notes +0 -6
- data/etc/themes/Default.notes +24 -0
- data/etc/themes/Fall_Fonts.notes +6 -0
- data/etc/themes/Light_Gray_BG_Theme.notes +6 -0
- data/etc/themes/Orange_Path.notes +1 -1
- data/etc/themes/Pastel_Fonts.notes +6 -0
- data/etc/themes/Path_Mode_Line.notes +36 -0
- data/etc/themes/Rainbow_Fonts.notes +20 -0
- data/etc/themes/Shiny_Blue.notes +14 -18
- data/etc/themes/Shiny_Green.notes +0 -6
- data/etc/themes/White_BG.notes +5 -0
- data/etc/vim/vim_status.notes +32 -0
- data/etc/vim/xiki.vim +16 -0
- data/etc/wrappers/wrapper.rb +2 -2
- data/etc/www/index.rb +1 -1
- data/etc/www/public/error.html +47 -0
- data/etc/www/sinatra_server.rb +353 -0
- data/etc/www/web_server.rb +0 -252
- data/lib/xiki.rb +94 -26
- data/lib/{block.rb → xiki/block.rb} +0 -0
- data/lib/{bookmarks.rb → xiki/bookmarks.rb} +11 -10
- data/lib/{buffers.rb → xiki/buffers.rb} +10 -10
- data/lib/{clipboard.rb → xiki/clipboard.rb} +2 -2
- data/lib/{code.rb → xiki/code.rb} +3 -7
- data/lib/{code_tree.rb → xiki/code_tree.rb} +3 -3
- data/lib/{color.rb → xiki/color.rb} +4 -14
- data/lib/{console.rb → xiki/console.rb} +6 -0
- data/lib/{control_lock.rb → xiki/control_lock.rb} +5 -1
- data/lib/{control_tab.rb → xiki/control_tab.rb} +3 -1
- data/lib/{core_ext.rb → xiki/core_ext.rb} +7 -3
- data/lib/{cursor.rb → xiki/cursor.rb} +4 -5
- data/lib/{deletes.rb → xiki/deletes.rb} +0 -0
- data/lib/{diff_log.rb → xiki/diff_log.rb} +4 -4
- data/lib/{effects.rb → xiki/effects.rb} +5 -2
- data/lib/{environment.rb → xiki/environment.rb} +0 -0
- data/lib/{file_tree.rb → xiki/file_tree.rb} +34 -24
- data/lib/{files.rb → xiki/files.rb} +15 -5
- data/lib/{hide.rb → xiki/hide.rb} +0 -0
- data/lib/{history.rb → xiki/history.rb} +1 -0
- data/lib/{image.rb → xiki/image.rb} +0 -0
- data/lib/{incrementer.rb → xiki/incrementer.rb} +0 -0
- data/lib/{insert.rb → xiki/insert.rb} +0 -0
- data/lib/{irc.rb → xiki/irc.rb} +0 -0
- data/lib/{key_bindings.rb → xiki/key_bindings.rb} +7 -4
- data/lib/{keys.rb → xiki/keys.rb} +32 -36
- data/lib/{launcher.rb → xiki/launcher.rb} +42 -23
- data/lib/{line.rb → xiki/line.rb} +1 -1
- data/lib/{links.rb → xiki/links.rb} +0 -0
- data/lib/{location.rb → xiki/location.rb} +0 -0
- data/lib/{macros.rb → xiki/macros.rb} +0 -0
- data/lib/{man.rb → xiki/man.rb} +0 -0
- data/lib/{menu.rb → xiki/menu.rb} +62 -11
- data/lib/{merb.rb → xiki/merb.rb} +1 -1
- data/lib/{message.rb → xiki/message.rb} +0 -0
- data/lib/{meths.rb → xiki/meths.rb} +0 -0
- data/lib/{mode.rb → xiki/mode.rb} +0 -0
- data/lib/{move.rb → xiki/move.rb} +1 -1
- data/lib/{notes.rb → xiki/notes.rb} +41 -37
- data/lib/{numbers.rb → xiki/numbers.rb} +0 -0
- data/lib/{ol.rb → xiki/ol.rb} +2 -3
- data/lib/{ol_helper.rb → xiki/ol_helper.rb} +0 -0
- data/lib/{overlay.rb → xiki/overlay.rb} +0 -0
- data/lib/{pause_means_space.rb → xiki/pause_means_space.rb} +2 -2
- data/lib/{php.rb → xiki/php.rb} +0 -0
- data/lib/{projects.rb → xiki/projects.rb} +8 -1
- data/lib/{relinquish_exception.rb → xiki/relinquish_exception.rb} +0 -0
- data/lib/{remote.rb → xiki/remote.rb} +2 -2
- data/lib/{requirer.rb → xiki/requirer.rb} +3 -3
- data/lib/{rest_tree.rb → xiki/rest_tree.rb} +0 -0
- data/lib/{ruby.rb → xiki/ruby.rb} +0 -0
- data/lib/{ruby_console.rb → xiki/ruby_console.rb} +0 -0
- data/lib/{search.rb → xiki/search.rb} +7 -8
- data/lib/{search_term.rb → xiki/search_term.rb} +0 -0
- data/lib/{snippet.rb → xiki/snippet.rb} +0 -0
- data/lib/{specs.rb → xiki/specs.rb} +0 -0
- data/lib/{styles.rb → xiki/styles.rb} +8 -72
- data/lib/{svn.rb → xiki/svn.rb} +0 -0
- data/lib/{text_util.rb → xiki/text_util.rb} +2 -2
- data/lib/{tree.rb → xiki/tree.rb} +40 -32
- data/lib/{tree_cursor.rb → xiki/tree_cursor.rb} +0 -0
- data/lib/{trouble_shooting.rb → xiki/trouble_shooting.rb} +0 -0
- data/lib/{url_tree.rb → xiki/url_tree.rb} +0 -0
- data/lib/{view.rb → xiki/view.rb} +39 -16
- data/lib/xiki/vim/line.rb +8 -0
- data/lib/xiki/vim/tree.rb +9 -0
- data/lib/{window.rb → xiki/window.rb} +0 -0
- data/menus/address_book.rb +6 -4
- data/menus/agenda.rb +3 -3
- data/menus/amazon.rb +2 -2
- data/menus/applescript.rb +21 -10
- data/menus/black.menu +1 -0
- data/menus/bootstrap.rb +2 -7
- data/menus/browser.rb +8 -5
- data/menus/cassandra_db.rb +2 -2
- data/menus/chmod.rb +1 -1
- data/menus/conf.rb +5 -0
- data/menus/cookies.rb +1 -1
- data/menus/css.rb +2 -2
- data/menus/deck.rb +1 -1
- data/menus/dimensions_config.menu +30 -0
- data/menus/dimensions_config.rb +5 -0
- data/menus/docs.rb +33 -34
- data/menus/dotsies.rb +1 -0
- data/menus/emacs.rb +7 -2
- data/menus/firefox.rb +25 -25
- data/menus/git.rb +1 -1
- data/menus/gito.rb +2 -2
- data/menus/headings.rb +3 -3
- data/menus/ip.rb +2 -4
- data/menus/itunes.rb +9 -2
- data/menus/javascript.rb +3 -1
- data/menus/local_storage.rb +4 -4
- data/menus/mac.rb +2 -1
- data/menus/maps.rb +2 -2
- data/menus/models.rb +31 -0
- data/menus/mongo.rb +2 -2
- data/menus/piano.rb +47 -23
- data/menus/r.rb +57 -0
- data/menus/rails.rb +89 -27
- data/menus/redmine.rb +1 -1
- data/menus/sass.rb +1 -1
- data/menus/settings.menu +2 -0
- data/menus/technologies.rb +4 -1
- data/menus/web_interface.rb +58 -0
- data/menus/welcome.menu +18 -0
- data/menus/white.menu +1 -0
- data/menus/youtube.rb +32 -0
- data/spec/code_tree_spec.rb +1 -1
- data/spec/diff_log_spec.rb +4 -4
- data/spec/file_tree_spec.rb +2 -2
- data/spec/line_spec.rb +2 -2
- data/spec/menu_spec.rb +5 -5
- data/spec/ol_spec.rb +3 -3
- data/spec/remote_spec.rb +2 -2
- data/spec/search_spec.rb +2 -2
- data/spec/text_util_spec.rb +1 -1
- data/spec/tree_cursor_spec.rb +3 -3
- data/spec/tree_spec.rb +3 -3
- data/xiki.gemspec +22 -6
- metadata +311 -76
- data/menus/dir.rb +0 -8
File without changes
|
File without changes
|
data/lib/{man.rb → xiki/man.rb}
RENAMED
File without changes
|
@@ -404,8 +404,9 @@ class Menu
|
|
404
404
|
return View.flash "- Menu 'root' doesn't exist!", :times=>4 if ! proc
|
405
405
|
|
406
406
|
location = proc.source_location # ["./firefox.rb", 739]
|
407
|
-
|
408
|
-
|
407
|
+
Ol << "location: #{location.inspect}"
|
408
|
+
# location[0].sub! /^\.\//, Xiki.dir
|
409
|
+
View.open location[0].sub(/^\.\//, Xiki.dir)
|
409
410
|
View.line = location[1]
|
410
411
|
|
411
412
|
end
|
@@ -625,18 +626,25 @@ class Menu
|
|
625
626
|
def self.do_as_menu
|
626
627
|
line = Line.value
|
627
628
|
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
629
|
+
do_launch = false
|
630
|
+
|
631
|
+
txt =
|
632
|
+
if line =~ /^ *\|/ # If on quoted line, will grab all quoted siblings and unquote
|
633
|
+
Tree.siblings :string=>1
|
634
|
+
elsif line =~ /^[ +-]*@/ && Tree.has_child? # If on ^@... line and there's child on next line...
|
635
|
+
# Will grab the whole tree and move it up
|
636
|
+
Tree.subtree.unindent.sub(/^[ @+-]+/, '')
|
637
|
+
elsif
|
638
|
+
do_launch = true
|
639
|
+
Tree.path.last
|
640
|
+
end
|
633
641
|
|
634
|
-
Keys.prefix_u ? Tree.to_root(:highest=>1)
|
642
|
+
Keys.prefix_u ? Tree.to_root : Tree.to_root(:highest=>1)
|
635
643
|
Tree.kill_under
|
636
644
|
|
637
645
|
Line.sub! /^([ @]*).+/, "\\1#{txt}"
|
638
646
|
|
639
|
-
return if
|
647
|
+
return if ! do_launch
|
640
648
|
|
641
649
|
# replace line with menu
|
642
650
|
|
@@ -701,9 +709,52 @@ class Menu
|
|
701
709
|
end
|
702
710
|
end
|
703
711
|
|
712
|
+
#
|
713
|
+
# Whether line exists in menu
|
714
|
+
#
|
715
|
+
# p Menu.line_exists? "menu name", /^- text to add$/
|
716
|
+
# p Menu.line_exists? "menu name", /^- text to (.+)$/
|
717
|
+
#
|
718
|
+
def self.line_exists? name, pattern #, options={}
|
719
|
+
name.gsub! /\W/, '_'
|
720
|
+
dir = File.expand_path "~/menus"
|
721
|
+
file = File.expand_path "#{dir}/#{name}.menu"
|
722
|
+
txt = File.read(file) rescue ""
|
723
|
+
txt =~ pattern ? ($1 || $&) : nil # Return whole string or group
|
724
|
+
end
|
704
725
|
|
705
|
-
|
726
|
+
#
|
727
|
+
# Create simple .menu file if it doesn't exist, otherwise add line to it.
|
728
|
+
#
|
729
|
+
# Menu.append_line "menu name", "- text to add"
|
730
|
+
#
|
731
|
+
def self.append_line name, addition #, options={}
|
706
732
|
|
707
|
-
|
733
|
+
name.gsub! /\W/, '_'
|
734
|
+
|
735
|
+
# Default to ~/menus
|
736
|
+
# If menu there, create, otherwise append
|
708
737
|
|
738
|
+
# Get existing
|
739
|
+
dir = File.expand_path "~/menus"
|
740
|
+
Dir.mkdir dir if ! File.exists? dir
|
709
741
|
|
742
|
+
file = File.expand_path "#{dir}/#{name}.menu"
|
743
|
+
txt = File.read(file) rescue ""
|
744
|
+
|
745
|
+
if txt =~ /^#{Regexp.escape addition}$/
|
746
|
+
return ".flash - was already there!"
|
747
|
+
end
|
748
|
+
|
749
|
+
# Append to end (might be blank)
|
750
|
+
|
751
|
+
txt << "#{addition}\n"
|
752
|
+
|
753
|
+
# Save
|
754
|
+
File.open(file, "w") { |f| f << txt }
|
755
|
+
|
756
|
+
".flash - updated!"
|
757
|
+
end
|
758
|
+
end
|
759
|
+
|
760
|
+
Menu.init # Define mode
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,9 +1,9 @@
|
|
1
|
-
require 'styles'
|
2
|
-
require 'line'
|
3
|
-
require 'effects'
|
4
|
-
require 'view'
|
5
|
-
require 'keys'
|
6
|
-
require 'clipboard'
|
1
|
+
require 'xiki/styles'
|
2
|
+
require 'xiki/line'
|
3
|
+
require 'xiki/effects'
|
4
|
+
require 'xiki/view'
|
5
|
+
require 'xiki/keys'
|
6
|
+
require 'xiki/clipboard'
|
7
7
|
|
8
8
|
class Notes
|
9
9
|
|
@@ -254,7 +254,7 @@ class Notes
|
|
254
254
|
h1_size = "+3"
|
255
255
|
|
256
256
|
# Colors of "| ..." headings
|
257
|
-
if Styles.
|
257
|
+
if Styles.dark_bg? # If black bg
|
258
258
|
@@h1_styles = {
|
259
259
|
:notes_h1 =>"333",
|
260
260
|
:notes_h1r=>"611", # | r This will be red
|
@@ -316,7 +316,7 @@ class Notes
|
|
316
316
|
:fg => '224'
|
317
317
|
|
318
318
|
|
319
|
-
if Styles.
|
319
|
+
if Styles.dark_bg? # If black and white
|
320
320
|
label_color = "e70"
|
321
321
|
else
|
322
322
|
label_color = "f70"
|
@@ -348,28 +348,28 @@ class Notes
|
|
348
348
|
Styles.define :notes_green, :fg=>"3C3", :face=>'arial black', :size=>"0", :bold=>true
|
349
349
|
|
350
350
|
|
351
|
-
if Styles.
|
351
|
+
if Styles.dark_bg? # If black bg
|
352
352
|
# >>...
|
353
|
-
Styles.define :notes_h2, :face=>'arial', :size=>"-1", :fg=>'fff', :bg=>"333", :bold=>
|
353
|
+
Styles.define :notes_h2, :face=>'arial', :size=>"-1", :fg=>'fff', :bg=>"333", :bold=>true
|
354
354
|
Styles.define :notes_h2_pipe, :face=>'arial', :size=>"-1", :fg=>'555555', :bg=>"333333", :bold=> true
|
355
355
|
else
|
356
356
|
Styles.define :notes_h2, :face=>'arial', :size=>"-1", :fg=>'fff', :bg=>"999", :bold=>true
|
357
357
|
Styles.define :notes_h2_pipe, :face=>'arial', :size=>"-1", :fg=>'bbb', :bg=>"999", :bold=>true
|
358
358
|
end
|
359
359
|
|
360
|
-
if Styles.
|
360
|
+
if Styles.dark_bg? # If black bg
|
361
361
|
Styles.dotted :bg=>'080808', :fg=>'111', :strike=>nil, :underline=>nil, :border=>['111', -1]
|
362
362
|
else
|
363
363
|
Styles.dotted :bg=>'eee', :fg=>'ddd', :strike=>nil, :underline=>nil, :border=>['ddd', -1]
|
364
364
|
end
|
365
365
|
|
366
|
-
notes_exclamation_color = Styles.
|
366
|
+
notes_exclamation_color = Styles.dark_bg? ? "7c4" : "5a0"
|
367
367
|
|
368
368
|
Styles.define :notes_exclamation, # Green bold text
|
369
369
|
:face=>'arial black', :size=>"0",
|
370
370
|
:fg=>notes_exclamation_color, :bold=>true
|
371
371
|
|
372
|
-
Styles.notes_link :fg=>(Styles.
|
372
|
+
Styles.notes_link :fg=>(Styles.dark_bg? ? "9ce" : "08f")
|
373
373
|
|
374
374
|
Styles.shell_prompt :fg=>'#888', :bold=>1
|
375
375
|
|
@@ -440,7 +440,7 @@ class Notes
|
|
440
440
|
|
441
441
|
Styles.apply "^hint/.+", :fade6
|
442
442
|
|
443
|
-
Styles.apply "^ *@? ?\\([%$&]\\) ", nil, :shell_prompt # Colorize shell prompts
|
443
|
+
Styles.apply "^[< ]*@? ?\\([%$&]\\) ", nil, :shell_prompt # Colorize shell prompts
|
444
444
|
|
445
445
|
Styles.apply("^ *\\(|`\\)\\(.*\n\\)", nil, :quote_heading_pipe, :dotsies_experimental)
|
446
446
|
Styles.apply("^ *\\(|~\\)\\([^\n~]+\\)\\(~?\\)", nil, :quote_heading_pipe, :dotsies, :quote_heading_pipe)
|
@@ -708,7 +708,7 @@ class Notes
|
|
708
708
|
|
709
709
|
buffer_name = $el.buffer_name
|
710
710
|
file_name = View.file_name
|
711
|
-
|
711
|
+
path = Xiki.path rescue nil
|
712
712
|
|
713
713
|
if prefix.nil? # So 1+ or numeric prefix just grab normally
|
714
714
|
if buffer_name == "*ol" # Make it into "foo = bar" format
|
@@ -716,7 +716,7 @@ class Notes
|
|
716
716
|
txt.sub!(": ", " = ") if txt
|
717
717
|
txt ||= line[/ *- (.+?) /, 1]
|
718
718
|
|
719
|
-
elsif
|
719
|
+
elsif path && path.last =~ /(\w+)\.rb\/\| *def ([\w\.?]+)/
|
720
720
|
clazz = $1
|
721
721
|
method = $2
|
722
722
|
clazz = TextUtil.camel_case clazz if method.slice! /^self\./
|
@@ -734,7 +734,7 @@ class Notes
|
|
734
734
|
elsif FileTree.handles?
|
735
735
|
txt = Tree.dir
|
736
736
|
elsif line =~ /(^ *[+-] |\/$)/ # Make it into Foo.bar format
|
737
|
-
txt = Xiki.
|
737
|
+
txt = Xiki.path.last
|
738
738
|
end
|
739
739
|
end
|
740
740
|
|
@@ -814,29 +814,31 @@ class Notes
|
|
814
814
|
end
|
815
815
|
end
|
816
816
|
|
817
|
-
def self.
|
818
|
-
|
819
|
-
txt = Keys.input :chars=>1, :prompt=>'Enter a character: '
|
820
|
-
expanded = Notes.expand_if_action_abbrev txt
|
821
|
-
|
817
|
+
def self.enter_note
|
822
818
|
# If on blank line, just insert it
|
819
|
+
indent = ""
|
823
820
|
if ! Line.blank?
|
824
821
|
line = Line.value
|
825
822
|
indent, first_char = line.match(/^( *)(.)/)[1..2]
|
826
823
|
|
827
824
|
Move.to_axis
|
828
|
-
$el.open_line
|
825
|
+
$el.open_line 1
|
829
826
|
end
|
830
827
|
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
828
|
+
Line << "#{indent}- !"
|
829
|
+
Move.backward
|
830
|
+
|
831
|
+
txt = Keys.input :timed=>1, :prompt=>'Enter a character: '
|
832
|
+
|
833
|
+
expanded = Notes.expand_if_action_abbrev txt
|
834
|
+
|
835
|
+
View << (expanded || txt)
|
836
|
+
|
837
|
+
# If wasn't expanded prepare to edit
|
838
|
+
ControlLock.disable if expanded == txt
|
836
839
|
|
837
840
|
if expanded
|
838
|
-
|
839
|
-
Line.to_beginning
|
841
|
+
# Do nothing
|
840
842
|
else
|
841
843
|
View << "#{indent}- !"
|
842
844
|
Move.backward
|
@@ -881,25 +883,24 @@ class Notes
|
|
881
883
|
"
|
882
884
|
end
|
883
885
|
|
884
|
-
txt = File.read
|
886
|
+
txt = File.open(file, 'rb') {|f| f.read}
|
885
887
|
|
886
|
-
# If just file passed, headings
|
888
|
+
# If just file passed, headings...
|
887
889
|
|
888
890
|
if ! heading
|
889
891
|
|
890
892
|
return View.open file if prefix == "open" # If as+open, just jump there
|
891
893
|
|
894
|
+
txt = txt.split("\n")
|
892
895
|
txt = txt.grep /^\>( .+)/
|
893
896
|
return "| This file has no '>...' headings:\n@ #{file}" if txt.empty?
|
894
|
-
return txt.join(
|
897
|
+
return txt.join("\n") #.gsub /^> /, '| '
|
895
898
|
end
|
896
899
|
|
897
|
-
# If just heading passed, show text under heading
|
898
|
-
|
900
|
+
# If just heading passed, show text under heading...
|
899
901
|
heading.sub!(/^\| /, '> ')
|
900
902
|
escaped_heading = Regexp.escape heading
|
901
903
|
if ! content
|
902
|
-
|
903
904
|
if prefix == :u || prefix == "open" # If C-u on a heading, just jump there
|
904
905
|
View.open file
|
905
906
|
View.to_highest
|
@@ -909,6 +910,7 @@ class Notes
|
|
909
910
|
end
|
910
911
|
|
911
912
|
txt = self.extract_block txt, heading
|
913
|
+
ENV['no_slash'] = "1"
|
912
914
|
return txt.gsub(/^/, '| ').gsub(/^\| $/, '|')
|
913
915
|
end
|
914
916
|
|
@@ -972,10 +974,12 @@ class Notes
|
|
972
974
|
"f"=>"fix",
|
973
975
|
"b"=>"borrow",
|
974
976
|
"i"=>"implement",
|
975
|
-
"d"=>"
|
977
|
+
"d"=>"do",
|
978
|
+
"de"=>"delete",
|
976
979
|
"r"=>"rename",
|
977
980
|
"t"=>"todo",
|
978
981
|
"e"=>"extract",
|
982
|
+
"er"=>"error",
|
979
983
|
}
|
980
984
|
|
981
985
|
# If the string is "t" or "i", or a few others, return "todo" or "imprement" etc. respectively.
|
File without changes
|
data/lib/{ol.rb → xiki/ol.rb}
RENAMED
@@ -82,7 +82,8 @@ class Ol
|
|
82
82
|
time ||= @@last
|
83
83
|
difference = Time.now - time[0]
|
84
84
|
time[0] = Time.now unless no_reset
|
85
|
-
|
85
|
+
|
86
|
+
difference > 5
|
86
87
|
end
|
87
88
|
|
88
89
|
def self.<< txt
|
@@ -97,8 +98,6 @@ class Ol
|
|
97
98
|
@@timed_last = now
|
98
99
|
end
|
99
100
|
|
100
|
-
|
101
|
-
|
102
101
|
def self.line txt=nil, l=nil, indent="", name=nil, time=nil
|
103
102
|
l ||= caller(0)[1]
|
104
103
|
|
File without changes
|
File without changes
|
data/lib/{php.rb → xiki/php.rb}
RENAMED
File without changes
|
@@ -1,4 +1,11 @@
|
|
1
1
|
class Projects
|
2
|
+
def self.before_menu
|
3
|
+
nil
|
4
|
+
end
|
5
|
+
def self.after_menu
|
6
|
+
nil
|
7
|
+
end
|
8
|
+
|
2
9
|
def self.menu
|
3
10
|
"
|
4
11
|
- This will never be called, because of projects.menu...
|
@@ -7,7 +14,7 @@ class Projects
|
|
7
14
|
"
|
8
15
|
end
|
9
16
|
|
10
|
-
def self.
|
17
|
+
def self.default
|
11
18
|
# If parent is dir, return it, else return first project
|
12
19
|
dir = FileTree.handles?(Xiki.trunk[-2]) ? "#{Dir.pwd}/" : self.default_project
|
13
20
|
end
|
File without changes
|
@@ -2,7 +2,7 @@ gem 'net-ssh'
|
|
2
2
|
require 'net/ssh'
|
3
3
|
require 'net/sftp'
|
4
4
|
require 'timeout'
|
5
|
-
require 'ol'
|
5
|
+
require 'xiki/ol'
|
6
6
|
|
7
7
|
class Remote
|
8
8
|
|
@@ -47,7 +47,7 @@ class Remote
|
|
47
47
|
if path =~ /\/$/ # If a dir
|
48
48
|
out = connection.exec!("ls -pa #{path}")
|
49
49
|
out ||= ""
|
50
|
-
out = out.grep(/^[^#]+$/).join("") # Weed out #...#
|
50
|
+
out = out.split("\n").grep(/^[^#]+$/).join("\n") # Weed out #...#
|
51
51
|
out.gsub!(/@/, '/') # Change @ to /
|
52
52
|
|
53
53
|
# Get rid of . and ..
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require 'core_ext'
|
1
|
+
require 'xiki/core_ext'
|
2
2
|
|
3
3
|
class Requirer
|
4
4
|
def self.show txt
|
@@ -17,7 +17,7 @@ class Requirer
|
|
17
17
|
gem name
|
18
18
|
require options[:name2] || name
|
19
19
|
rescue Exception=>e
|
20
|
-
self.show "Xiki #{options[:optional] ? 'optionally uses' : 'requires'} the '#{name}' gem.\n%
|
20
|
+
self.show "Xiki #{options[:optional] ? 'optionally uses' : 'requires'} the '#{name}' gem.\n% gem install #{name}\n\n"
|
21
21
|
raise e if options[:raise]
|
22
22
|
end
|
23
23
|
end
|
@@ -38,7 +38,7 @@ class Requirer
|
|
38
38
|
rescue LoadError => e
|
39
39
|
self.show "#{e.to_s}\n"
|
40
40
|
gem_name = self.extract_gem_from_exception e.to_s
|
41
|
-
self.show "_Xiki requires the '#{gem_name}' gem.\n%
|
41
|
+
self.show "_Xiki requires the '#{gem_name}' gem.\n% gem install #{gem_name}\n\n"
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,7 +1,7 @@
|
|
1
|
-
require
|
2
|
-
require 'control_lock'
|
3
|
-
require 'line'
|
4
|
-
require 'text_util'
|
1
|
+
require 'xiki/hide'
|
2
|
+
require 'xiki/control_lock'
|
3
|
+
require 'xiki/line'
|
4
|
+
require 'xiki/text_util'
|
5
5
|
|
6
6
|
class Search
|
7
7
|
|
@@ -657,7 +657,6 @@ class Search
|
|
657
657
|
# Search.open_file_and_method "View.path"
|
658
658
|
#
|
659
659
|
def self.open_file_and_method match
|
660
|
-
|
661
660
|
match.sub!(/^[+-] /, '')
|
662
661
|
match.sub!(/ .+/, '')
|
663
662
|
|
@@ -923,7 +922,7 @@ class Search
|
|
923
922
|
def self.isearch_just_adjust
|
924
923
|
self.stop
|
925
924
|
Move.forward
|
926
|
-
transpose_chars 1
|
925
|
+
$el.transpose_chars 1
|
927
926
|
self.to_start
|
928
927
|
end
|
929
928
|
|
@@ -1113,7 +1112,7 @@ class Search
|
|
1113
1112
|
|
1114
1113
|
char = Keys.input(:chars=>1, :prompt=>"Enter one char: ")
|
1115
1114
|
if char == "m"
|
1116
|
-
Launcher.open("-
|
1115
|
+
Launcher.open("- #{Xiki.dir}/\n - ##\\bdef /")
|
1117
1116
|
elsif char == "k"
|
1118
1117
|
Launcher.open("- $x/key_bindings.rb\n - ##\\bKeys\\./")
|
1119
1118
|
elsif char == "l"
|
@@ -1283,7 +1282,7 @@ class Search
|
|
1283
1282
|
Tree.to_parent # Go to parent
|
1284
1283
|
Tree.to_parent if Line[/^ *- ##/]
|
1285
1284
|
|
1286
|
-
Tree.under "- \#\##{match}/", :escape=>'', :no_search=>
|
1285
|
+
Tree.under "- \#\##{match}/", :escape=>'', :no_search=>1, :no_slash=>1
|
1287
1286
|
Launcher.launch
|
1288
1287
|
end
|
1289
1288
|
|