vimamsa 0.1.18 → 0.1.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d45a54c1e25d490c27465b9649d09fa3b0e5db85e91324fb8c70201de9ff5a1
4
- data.tar.gz: f7393daa458da9e7c3b1e769049f7205e96e4ba157c162f9dacbdae700b6731d
3
+ metadata.gz: d29e057a168e6c2152c0d8da4c6957b863bd44e7dd9328ba2d5520ae11ab49a2
4
+ data.tar.gz: 4cdad5268d59c11e83335818bbcdd5627fe3e75045ab2602f84fd0d7440c6d7d
5
5
  SHA512:
6
- metadata.gz: e4d8be7daf217add0cef74e246bebf114d886f60739bc700d532035067f9a3c26dabde5ffbec7ef662278a6f7829f0513210a961e4b9c661b0f9c52ea839971a
7
- data.tar.gz: 33315be557aaf4f294005e80a1c8b9be61da65b9d0d21cc90b8e03bddb0c4cf34df332217e11787d5e2dd3da1a0de459065c342b44f8a37f1aec5cd34f7ed4c1
6
+ metadata.gz: c9ac4b15042dd07cab99b7be0859e714684073ff4438b8048f33bd9c21779b545d61f1ff17608d1ab15fe2e31a356e2af24df6002d027621958776b42c568db8
7
+ data.tar.gz: afdf6cab6f002f925542831c7e439eace41b9fd4217e8f659d9774e2c7609309ba55e1d1042447d0c091437ab379ca76c0c6fb515c7a90a7720603f1bad68b89
data/demo.txt CHANGED
@@ -15,7 +15,7 @@ Extension .txt can be omitted:
15
15
  ⟦help:keybindings⟧
16
16
 
17
17
  Customizations:
18
- ⟦~/.vimamsa/custom.rb⟧
18
+ ⟦~/.config/vimamsa/custom.rb⟧
19
19
 
20
20
  ◼ Images
21
21
  Images work in .txt-files by drag&drop. (experimental)
data/exe/vimamsa CHANGED
@@ -9,7 +9,7 @@ selfpath = File.readlink(selfpath) if File.lstat(selfpath).symlink?
9
9
  scriptdir = File.expand_path(File.dirname(selfpath) + "/..")
10
10
 
11
11
  # If process is already running, open the parameter file in the running process and exit.
12
- listen_dir = File.expand_path("~/.vimamsa/listen")
12
+ listen_dir = File.expand_path("~/.config/vimamsa/listen")
13
13
  if File.exist?(listen_dir) and !ARGV[0].nil?
14
14
  tmpf = Tempfile.new("vmarun", listen_dir)
15
15
  fp = tmpf.path
@@ -91,23 +91,23 @@ class Editor
91
91
 
92
92
  @gui.init_menu
93
93
 
94
- mkdir_if_not_exists("~/.vimamsa")
95
- mkdir_if_not_exists("~/.vimamsa/backup")
96
- mkdir_if_not_exists("~/.vimamsa/listen")
97
- listen_dir = File.expand_path "~/.vimamsa/listen"
94
+ mkdir_if_not_exists("~/.config/vimamsa")
95
+ mkdir_if_not_exists("~/.config/vimamsa/backup")
96
+ mkdir_if_not_exists("~/.config/vimamsa/listen")
97
+ listen_dir = File.expand_path "~/.config/vimamsa/listen"
98
98
  listener = Listen.to(listen_dir) do |modified, added, removed|
99
99
  debug([modified: modified, added: added, removed: removed])
100
100
  open_file_listener(added)
101
101
  end
102
102
  listener.start
103
103
 
104
- custom_fn = File.expand_path("~/.vimamsa/custom.rb")
104
+ custom_fn = File.expand_path("~/.config/vimamsa/custom.rb")
105
105
  if !File.exist?(custom_fn)
106
106
  example_custom = IO.read(ppath("custom_example.rb"))
107
107
  IO.write(custom_fn, example_custom)
108
108
  end
109
109
 
110
- mkdir_if_not_exists("~/.vimamsa/custom.rb")
110
+ mkdir_if_not_exists("~/.config/vimamsa/custom.rb")
111
111
 
112
112
  $cnf[:theme] = "Twilight_edit"
113
113
  $cnf[:syntax_highlight] = true
@@ -119,7 +119,7 @@ class Editor
119
119
  # set_gui_style(1)
120
120
 
121
121
  #TODO: remove
122
- dotfile = read_file("", "~/.vimamsarc")
122
+ dotfile = read_file("", "~/.config/vimamsarc")
123
123
  eval(dotfile) if dotfile
124
124
 
125
125
  custom_script = read_file("", custom_fn)
@@ -290,7 +290,6 @@ end
290
290
 
291
291
  def _quit()
292
292
  vma.shutdown
293
- # Gtk.main_quit
294
293
  end
295
294
 
296
295
  def fatal_error(msg)
@@ -623,7 +622,7 @@ def hook_draw()
623
622
  end
624
623
 
625
624
  def get_dot_path(sfx)
626
- dot_dir = File.expand_path("~/.vimamsa")
625
+ dot_dir = File.expand_path("~/.config/vimamsa")
627
626
  Dir.mkdir(dot_dir) unless File.exist?(dot_dir)
628
627
  dpath = "#{dot_dir}/#{sfx}"
629
628
  return dpath
data/lib/vimamsa/gui.rb CHANGED
@@ -219,6 +219,7 @@ class VMAgui
219
219
  t.exit
220
220
  end
221
221
  end
222
+ @app.quit
222
223
  end
223
224
 
224
225
  def scale_all_images
@@ -764,6 +765,10 @@ class VMAgui
764
765
 
765
766
  def set_one_column
766
767
  return if !@two_column
768
+ #This always closes the leftmost column/window
769
+ #TODO: close rightmost column if left active
770
+ set_active_window(1)
771
+
767
772
  @windows[2][:sw].set_child(nil)
768
773
  @windows.delete(2)
769
774
 
@@ -587,6 +587,7 @@ class VSourceView < GtkSource::View
587
587
  # end
588
588
 
589
589
  sv = vma.gui.sw.child
590
+ return if sv.nil? #TODO: should not happen?
590
591
  mode = vma.kbd.get_mode
591
592
  ctype = vma.kbd.get_cursor_type
592
593
  ctype = :visual if vma.buf.selection_active?
data/lib/vimamsa/macro.rb CHANGED
@@ -165,7 +165,7 @@ class Macro
165
165
  m = @recorded_macros[name]
166
166
  return if !(m.kind_of?(Array) and m.any?)
167
167
  contents = m.join(";")
168
- dot_dir = File.expand_path("~/.vimamsa")
168
+ dot_dir = File.expand_path("~/.config/.vimamsa")
169
169
  Dir.mkdir(dot_dir) unless File.exist?(dot_dir)
170
170
  save_fn = "#{dot_dir}/macro_#{name}.rb"
171
171
 
@@ -1,3 +1,3 @@
1
1
  module Vimamsa
2
- VERSION = "0.1.18"
2
+ VERSION = "0.1.19"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vimamsa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.18
4
+ version: 0.1.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sami Sieranoja
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-17 00:00:00.000000000 Z
11
+ date: 2024-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler