vimamsa 0.1.27 → 0.1.29
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/.github/workflows/appimage.yml +17 -10
- data/Dockerfile +2 -2
- data/README.md +162 -90
- data/custom_example.rb +33 -15
- data/doc/TODO.md +334 -110
- data/doc/action_names_plan.md +442 -0
- data/doc/bundling_plan.md +2 -1
- data/doc/delta_syntax_plan.md +293 -0
- data/doc/demo_recording_plan.md +288 -0
- data/doc/design_goals.md +27 -0
- data/doc/intro_page_plan.md +266 -0
- data/doc/key_bindings_report_plan.md +45 -0
- data/doc/line_tree_plan.md +89 -0
- data/doc/missing_vim_bindings.md +34 -44
- data/doc/modules_settings_plan.md +1 -1
- data/doc/registries_plan.md +202 -0
- data/doc/startup_speed_plan.md +97 -0
- data/doc/test_commands.md +232 -0
- data/doc/treap_visualizer.html +585 -0
- data/doc/vim_compatibility_plan.md +186 -31
- data/doc/vimlike_vim_conflicts.md +236 -228
- data/doc/vm_snapshots_plan.md +4 -4
- data/doc/wysiwyg_plan.md +231 -0
- data/docker_cmd.sh +1 -1
- data/exe/run_tests.rb +85 -3
- data/exe/vimamsa +49 -6
- data/help/intro.txt +30 -0
- data/help/vim_intro.txt +31 -0
- data/img/demo.gif +0 -0
- data/img/demo.mp4 +0 -0
- data/lang/hyperplaintext.lang +1 -1
- data/lib/vimamsa/ack.rb +2 -0
- data/lib/vimamsa/actions.rb +381 -36
- data/lib/vimamsa/bookmarks.rb +8 -8
- data/lib/vimamsa/buffer.rb +84 -38
- data/lib/vimamsa/buffer_changetext.rb +58 -36
- data/lib/vimamsa/buffer_list.rb +2 -2
- data/lib/vimamsa/buffer_manager.rb +6 -6
- data/lib/vimamsa/cli_help.rb +75 -0
- data/lib/vimamsa/clipboard.rb +6 -3
- data/lib/vimamsa/conf.rb +9 -0
- data/lib/vimamsa/crash_handler.rb +2 -2
- data/lib/vimamsa/debug.rb +2 -2
- data/lib/vimamsa/demo_player.rb +494 -0
- data/lib/vimamsa/demo_recorder.rb +277 -0
- data/lib/vimamsa/diff_buffer.rb +1 -1
- data/lib/vimamsa/dot_repeat.rb +104 -0
- data/lib/vimamsa/easy_jump.rb +54 -3
- data/lib/vimamsa/editor.rb +136 -65
- data/lib/vimamsa/file_history.rb +1 -1
- data/lib/vimamsa/file_manager.rb +23 -23
- data/lib/vimamsa/form_input.rb +388 -0
- data/lib/vimamsa/gui.rb +89 -13
- data/lib/vimamsa/gui_command_line.rb +44 -5
- data/lib/vimamsa/gui_form_generator.rb +17 -6
- data/lib/vimamsa/gui_func_panel.rb +1 -1
- data/lib/vimamsa/gui_key_hint.rb +165 -0
- data/lib/vimamsa/gui_keylog_panel.rb +164 -2
- data/lib/vimamsa/gui_menu.rb +69 -50
- data/lib/vimamsa/gui_select_window.rb +77 -43
- data/lib/vimamsa/gui_settings.rb +9 -5
- data/lib/vimamsa/gui_sourceview.rb +28 -81
- data/lib/vimamsa/gui_theme.rb +11 -2
- data/lib/vimamsa/hook.rb +2 -0
- data/lib/vimamsa/intro_page.rb +367 -0
- data/lib/vimamsa/key_actions.rb +315 -225
- data/lib/vimamsa/key_binding_tree.rb +228 -61
- data/lib/vimamsa/key_bindings_notepad.rb +18 -16
- data/lib/vimamsa/key_bindings_report.rb +290 -67
- data/lib/vimamsa/key_bindings_vim.rb +43 -297
- data/lib/vimamsa/key_bindings_vim_core.rb +356 -0
- data/lib/vimamsa/key_bindings_vimlike.rb +347 -339
- data/lib/vimamsa/key_names.rb +80 -0
- data/lib/vimamsa/langservp.rb +62 -7
- data/lib/vimamsa/line_tree.rb +367 -0
- data/lib/vimamsa/macro.rb +20 -3
- data/lib/vimamsa/rbvma.rb +15 -0
- data/lib/vimamsa/registers.rb +125 -0
- data/lib/vimamsa/run_ruby.rb +64 -0
- data/lib/vimamsa/search_replace.rb +4 -4
- data/lib/vimamsa/string_util.rb +17 -3
- data/lib/vimamsa/tests.rb +8 -8
- data/lib/vimamsa/text_objects.rb +11 -54
- data/lib/vimamsa/text_transforms.rb +4 -0
- data/lib/vimamsa/tmp_user_dir.rb +39 -0
- data/lib/vimamsa/user_dirs.rb +83 -0
- data/lib/vimamsa/version.rb +1 -1
- data/lib/vimamsa/vim_operators.rb +365 -0
- data/modules/calculator/calculator.rb +5 -5
- data/modules/color_highlight/color_highlight.rb +3 -3
- data/modules/dictation/dictation.rb +32 -32
- data/modules/ollama/ollama.rb +5 -5
- data/modules/terminal/terminal.rb +5 -5
- data/modules/tts/tts.rb +10 -10
- data/run_e2e_vm.sh +3 -3
- data/run_tests_vm.rb +163 -0
- data/scripts/appimage/AppRun +7 -0
- data/scripts/appimage/build_in_container.sh +11 -1
- data/scripts/appimage/smoke_test.sh +1 -1
- data/scripts/demo/demo_easyjump_steps.txt +60 -0
- data/scripts/demo/demo_files_steps.txt +52 -0
- data/scripts/demo/demo_steps.txt +9 -1
- data/scripts/demo/notes.txt +6 -0
- data/scripts/demo/record_demo.rb +60 -81
- data/scripts/demo/report.rb +7 -0
- data/scripts/demo/shapes.rb +1 -0
- data/scripts/demo/square/shapes.rb +29 -0
- data/scripts/demo/square/steps.txt +185 -0
- data/scripts/lib/perf_startup.rb +138 -0
- data/scripts/lib/script_helpers.rb +53 -0
- data/scripts/perf_compare.rb +34 -0
- data/scripts/profile_startup.rb +72 -0
- data/tests/test_action_ids.rb +232 -0
- data/tests/test_auto_format.rb +2 -2
- data/tests/test_autocomplete.rb +1 -1
- data/tests/test_basic_editing.rb +18 -18
- data/tests/test_bookmarks.rb +6 -6
- data/tests/test_bracket_match.rb +3 -0
- data/tests/test_cli_help.rb +64 -0
- data/tests/test_color_highlight.rb +2 -2
- data/tests/test_command_line.rb +1 -1
- data/tests/test_context_menu_file.rb +18 -0
- data/tests/test_copy_paste.rb +33 -33
- data/tests/test_custom_two_phase.rb +1 -1
- data/tests/test_demo_player.rb +355 -0
- data/tests/test_demo_recorder.rb +202 -0
- data/tests/test_dictation.rb +16 -16
- data/tests/test_dot_repeat.rb +88 -0
- data/tests/test_easy_jump.rb +93 -0
- data/tests/test_extract_file_links.rb +3 -3
- data/tests/test_file_panel.rb +2 -2
- data/tests/test_flash.rb +1 -1
- data/tests/test_fold.rb +1 -1
- data/tests/test_form_input.rb +203 -0
- data/tests/test_func_panel.rb +2 -2
- data/tests/test_gtk_sync.rb +7 -7
- data/tests/test_intro_page.rb +437 -0
- data/tests/test_key_categories.rb +163 -0
- data/tests/test_keylog_panel.rb +163 -3
- data/tests/test_line_ends.rb +51 -0
- data/tests/test_line_tree.rb +86 -0
- data/tests/test_lsp_clangd.rb +2 -2
- data/tests/test_lsp_root.rb +43 -0
- data/tests/test_macro.rb +2 -2
- data/tests/test_module_interface.rb +9 -9
- data/tests/test_notepad_bindings.rb +5 -5
- data/tests/test_perf_startup.rb +28 -0
- data/tests/test_random_edit.rb +27 -27
- data/tests/test_registers.rb +131 -0
- data/tests/test_run_ruby.rb +77 -0
- data/tests/test_startup_file.rb +45 -4
- data/tests/test_text_objects.rb +1 -1
- data/tests/test_text_transforms.rb +12 -0
- data/tests/test_tmp_user_dir.rb +79 -0
- data/tests/test_tts.rb +10 -10
- data/tests/test_undo.rb +34 -34
- data/tests/test_user_dirs.rb +122 -0
- data/tests/test_vim_bindings.rb +107 -6
- data/tests/test_vim_conflicts.rb +41 -4
- data/tests/test_vim_operators.rb +116 -0
- data/tests/test_window_layout.rb +83 -0
- data/vimamsa.gemspec +1 -1
- data/vm_guest_run.sh +75 -28
- metadata +60 -4
- data/run_tests.rb +0 -89
- data/run_tests_vm.sh +0 -130
data/vm_guest_run.sh
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Runs INSIDE the test VM guest (copied in and executed by run_tests_vm.
|
|
2
|
+
# Runs INSIDE the test VM guest (copied in and executed by run_tests_vm.rb via
|
|
3
3
|
# VBoxManage guestcontrol). Unpacks the synced working tree, provisions the box the
|
|
4
4
|
# first time, builds the native extension, then runs the test suite on the real
|
|
5
5
|
# desktop (DISPLAY :0) so the GTK window actually appears in the VM.
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
# VMA_DISPLAY X display of the logged-in desktop session (default :0)
|
|
10
10
|
# VMA_TEST_ARGS optional args forwarded to exe/run_tests.rb (test filters)
|
|
11
11
|
# FORCE_PROVISION set to 1 to re-run apt/gem provisioning even if the marker exists
|
|
12
|
+
# VMA_APPIMAGE an AppImage in the guest to test instead of building this tree
|
|
13
|
+
# VMA_APPIMAGE_DEV set to 1: this tree's code on that AppImage's runtime
|
|
12
14
|
set -euo pipefail
|
|
13
15
|
|
|
14
16
|
SRC_TGZ="$HOME/vimamsa_src.tgz"
|
|
@@ -24,6 +26,17 @@ mkdir -p "$DEST"
|
|
|
24
26
|
tar xzf "$SRC_TGZ" -C "$DEST"
|
|
25
27
|
cd "$DEST"
|
|
26
28
|
|
|
29
|
+
# GNOME locks the screen after 5 min idle; a locked session draws no frames,
|
|
30
|
+
# so layout/redraw-dependent tests fail. Keep the session awake and unlocked.
|
|
31
|
+
if command -v gsettings >/dev/null 2>&1; then
|
|
32
|
+
export DBUS_SESSION_BUS_ADDRESS="${DBUS_SESSION_BUS_ADDRESS:-unix:path=/run/user/$(id -u)/bus}"
|
|
33
|
+
gsettings set org.gnome.desktop.session idle-delay 0 2>/dev/null || true
|
|
34
|
+
gsettings set org.gnome.desktop.screensaver lock-enabled false 2>/dev/null || true
|
|
35
|
+
for s in $(loginctl list-sessions --no-legend 2>/dev/null | awk -v u="$(id -un)" '$3 == u {print $1}'); do
|
|
36
|
+
loginctl unlock-session "$s" 2>/dev/null || true
|
|
37
|
+
done
|
|
38
|
+
fi
|
|
39
|
+
|
|
27
40
|
# 2. Provision (idempotent). apt + bundler only on the first run (or when forced).
|
|
28
41
|
if [ ! -f "$MARKER" ] || [ "${FORCE_PROVISION:-}" = "1" ]; then
|
|
29
42
|
echo ">> Provisioning guest (apt packages + bundler) — this is slow the first time"
|
|
@@ -34,7 +47,7 @@ if [ ! -f "$MARKER" ] || [ "${FORCE_PROVISION:-}" = "1" ]; then
|
|
|
34
47
|
libgtk-4-dev libgtksourceview-5-dev \
|
|
35
48
|
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
|
|
36
49
|
libvte-2.91-gtk4-dev libssl-dev \
|
|
37
|
-
ack clang-format x11-xserver-utils vim
|
|
50
|
+
ack clang-format x11-xserver-utils vim xvfb
|
|
38
51
|
sudo_do gem install bundler -v '~> 2.4'
|
|
39
52
|
else
|
|
40
53
|
echo ">> Guest already provisioned (marker $MARKER present) — skipping apt"
|
|
@@ -47,38 +60,72 @@ if ! command -v vim >/dev/null; then
|
|
|
47
60
|
sudo_do env DEBIAN_FRONTEND=noninteractive apt-get install -y vim
|
|
48
61
|
fi
|
|
49
62
|
|
|
63
|
+
# xvfb-run for `run_tests.rb --headless` (without it the tests fall back to
|
|
64
|
+
# GTK's Broadway backend, where nothing is laid out or drawn while no browser
|
|
65
|
+
# is connected: bracket matching, panel widths and window sizes fail there).
|
|
66
|
+
# Checked separately so boxes provisioned before it was added get it too.
|
|
67
|
+
if ! command -v xvfb-run >/dev/null; then
|
|
68
|
+
echo ">> Installing xvfb"
|
|
69
|
+
sudo_do env DEBIAN_FRONTEND=noninteractive apt-get install -y xvfb
|
|
70
|
+
fi
|
|
71
|
+
|
|
50
72
|
# Enable the uinput virtual keyboard so the E2E tests can type real key events.
|
|
51
73
|
# Do this every run (the module load / device perms don't survive a reboot).
|
|
52
74
|
sudo_do modprobe uinput 2>/dev/null || true
|
|
53
75
|
sudo_do chmod 0666 /dev/uinput 2>/dev/null || true
|
|
54
76
|
|
|
55
|
-
#
|
|
56
|
-
#
|
|
57
|
-
#
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
[
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
77
|
+
# 3a. VMA_APPIMAGE (run_tests_vm.rb --appimage): test that AppImage instead
|
|
78
|
+
# of a build of this tree. It is unpacked (no FUSE needed) and run by
|
|
79
|
+
# exe/run_tests.rb through VMA_TEST_APP, with this tree's tests.
|
|
80
|
+
# VMA_APPIMAGE_DEV=1: this tree's code on the AppImage's Ruby, gems and
|
|
81
|
+
# libraries (AppRun's VMA_SOURCE; an older AppRun gets it by sed).
|
|
82
|
+
if [ -n "${VMA_APPIMAGE:-}" ]; then
|
|
83
|
+
echo ">> Unpacking the AppImage $VMA_APPIMAGE"
|
|
84
|
+
APPDIR_X="$HOME/vma_appimage"
|
|
85
|
+
rm -rf "$APPDIR_X"
|
|
86
|
+
mkdir -p "$APPDIR_X"
|
|
87
|
+
chmod +x "$VMA_APPIMAGE"
|
|
88
|
+
(cd "$APPDIR_X" && "$VMA_APPIMAGE" --appimage-extract >/dev/null)
|
|
89
|
+
app="$APPDIR_X/squashfs-root/AppRun"
|
|
90
|
+
if [ "${VMA_APPIMAGE_DEV:-}" = "1" ]; then
|
|
91
|
+
echo ">> ... running this tree's code on it (VMA_SOURCE=$DEST)"
|
|
92
|
+
sed 's#^exec "$U/bin/ruby" "$U/bin/vimamsa" "$@"#exec "$U/bin/ruby" "$VMA_SOURCE/exe/vimamsa" "$@"#' \
|
|
93
|
+
"$app" > "$APPDIR_X/AppRun.dev"
|
|
94
|
+
chmod +x "$APPDIR_X/AppRun.dev"
|
|
95
|
+
export APPDIR="$APPDIR_X/squashfs-root" VMA_SOURCE="$DEST"
|
|
96
|
+
app="$APPDIR_X/AppRun.dev"
|
|
97
|
+
fi
|
|
98
|
+
export VMA_TEST_APP="$app"
|
|
99
|
+
else
|
|
75
100
|
|
|
76
|
-
#
|
|
77
|
-
#
|
|
78
|
-
#
|
|
79
|
-
|
|
80
|
-
rm -f
|
|
81
|
-
|
|
101
|
+
# 3. Build + install the gem. Compiles ext/vmaext and (first run) installs the
|
|
102
|
+
# ruby-gnome gems and the external StrIdx C++ gem. Copy the built .so back into
|
|
103
|
+
# the tree so `require "vmaext"` resolves when running from source.
|
|
104
|
+
echo ">> Building and installing the vimamsa gem"
|
|
105
|
+
rm -f vimamsa-0.1.*.gem
|
|
106
|
+
gem build vimamsa.gemspec
|
|
107
|
+
# NB: no --local — installing the local .gem must be allowed to fetch its runtime
|
|
108
|
+
# deps (gtk4, gtksourceview5, StrIdx, language_server-protocol, …) from rubygems.org.
|
|
109
|
+
sudo_do gem install vimamsa-0.1.*.gem
|
|
110
|
+
# A system `gem install` compiles the extension under Gem.dir/extensions/<platform>/
|
|
111
|
+
# <abi>/vimamsa-<ver>/vmaext.so (not under gems/.../ext), so locate it with find.
|
|
112
|
+
GEM_DIR="$(ruby -e 'puts Gem.dir')"
|
|
113
|
+
so_path="$(find "$GEM_DIR" -name vmaext.so -path '*vimamsa*' 2>/dev/null | head -1)"
|
|
114
|
+
[ -z "$so_path" ] && so_path="$(find "$GEM_DIR" -name vmaext.so 2>/dev/null | head -1)"
|
|
115
|
+
if [ -z "$so_path" ]; then
|
|
116
|
+
echo "!! Could not locate compiled vmaext.so under $GEM_DIR" >&2
|
|
117
|
+
exit 2
|
|
118
|
+
fi
|
|
119
|
+
cp "$so_path" lib/
|
|
120
|
+
touch "$MARKER"
|
|
121
|
+
|
|
122
|
+
# The ruby-lsp tests run `bundle exec ruby-lsp`. The synced Gemfile.lock is the
|
|
123
|
+
# host's and pins exact versions the guest doesn't have (gem install above picks
|
|
124
|
+
# the newest matching ones), so resolve the bundle against the guest's gems,
|
|
125
|
+
# installing only what's missing (e.g. the development dependencies).
|
|
126
|
+
rm -f Gemfile.lock
|
|
127
|
+
bundle check >/dev/null 2>&1 || sudo_do bundle install
|
|
128
|
+
fi
|
|
82
129
|
|
|
83
130
|
# 4. Run the suite on the real desktop (no --headless: the window shows on-screen).
|
|
84
131
|
export XDG_RUNTIME_DIR="/run/user/$(id -u)"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vimamsa
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.29
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sami Sieranoja
|
|
@@ -256,15 +256,26 @@ files:
|
|
|
256
256
|
- custom_example.rb
|
|
257
257
|
- demo.txt
|
|
258
258
|
- doc/TODO.md
|
|
259
|
+
- doc/action_names_plan.md
|
|
259
260
|
- doc/bundling_plan.md
|
|
261
|
+
- doc/delta_syntax_plan.md
|
|
262
|
+
- doc/demo_recording_plan.md
|
|
263
|
+
- doc/design_goals.md
|
|
264
|
+
- doc/intro_page_plan.md
|
|
260
265
|
- doc/key_bindings_report_plan.md
|
|
266
|
+
- doc/line_tree_plan.md
|
|
261
267
|
- doc/missing_vim_bindings.md
|
|
262
268
|
- doc/modules_settings_plan.md
|
|
263
269
|
- doc/refactor_dedup_plan.md
|
|
270
|
+
- doc/registries_plan.md
|
|
271
|
+
- doc/startup_speed_plan.md
|
|
272
|
+
- doc/test_commands.md
|
|
273
|
+
- doc/treap_visualizer.html
|
|
264
274
|
- doc/unused_code_plan.md
|
|
265
275
|
- doc/vim_compatibility_plan.md
|
|
266
276
|
- doc/vimlike_vim_conflicts.md
|
|
267
277
|
- doc/vm_snapshots_plan.md
|
|
278
|
+
- doc/wysiwyg_plan.md
|
|
268
279
|
- docker_cmd.sh
|
|
269
280
|
- exe/run_tests.rb
|
|
270
281
|
- exe/vimamsa
|
|
@@ -272,8 +283,11 @@ files:
|
|
|
272
283
|
- ext/vmaext/vmaext.c
|
|
273
284
|
- fonts/OFL-Oxanium.txt
|
|
274
285
|
- fonts/Oxanium[wght].ttf
|
|
286
|
+
- help/intro.txt
|
|
287
|
+
- help/vim_intro.txt
|
|
275
288
|
- icon.png
|
|
276
289
|
- img/demo.gif
|
|
290
|
+
- img/demo.mp4
|
|
277
291
|
- img/screenshot1.png
|
|
278
292
|
- img/screenshot2.png
|
|
279
293
|
- install.sh
|
|
@@ -290,13 +304,17 @@ files:
|
|
|
290
304
|
- lib/vimamsa/buffer_list.rb
|
|
291
305
|
- lib/vimamsa/buffer_manager.rb
|
|
292
306
|
- lib/vimamsa/bundled_fonts.rb
|
|
307
|
+
- lib/vimamsa/cli_help.rb
|
|
293
308
|
- lib/vimamsa/clipboard.rb
|
|
294
309
|
- lib/vimamsa/conf.rb
|
|
295
310
|
- lib/vimamsa/constants.rb
|
|
296
311
|
- lib/vimamsa/crash_handler.rb
|
|
297
312
|
- lib/vimamsa/debug.rb
|
|
313
|
+
- lib/vimamsa/demo_player.rb
|
|
314
|
+
- lib/vimamsa/demo_recorder.rb
|
|
298
315
|
- lib/vimamsa/desktop_install.rb
|
|
299
316
|
- lib/vimamsa/diff_buffer.rb
|
|
317
|
+
- lib/vimamsa/dot_repeat.rb
|
|
300
318
|
- lib/vimamsa/easy_jump.rb
|
|
301
319
|
- lib/vimamsa/editor.rb
|
|
302
320
|
- lib/vimamsa/encrypt.rb
|
|
@@ -304,6 +322,7 @@ files:
|
|
|
304
322
|
- lib/vimamsa/file_history.rb
|
|
305
323
|
- lib/vimamsa/file_manager.rb
|
|
306
324
|
- lib/vimamsa/fold.rb
|
|
325
|
+
- lib/vimamsa/form_input.rb
|
|
307
326
|
- lib/vimamsa/gui.rb
|
|
308
327
|
- lib/vimamsa/gui_command_line.rb
|
|
309
328
|
- lib/vimamsa/gui_dialog.rb
|
|
@@ -311,6 +330,7 @@ files:
|
|
|
311
330
|
- lib/vimamsa/gui_form_generator.rb
|
|
312
331
|
- lib/vimamsa/gui_func_panel.rb
|
|
313
332
|
- lib/vimamsa/gui_image.rb
|
|
333
|
+
- lib/vimamsa/gui_key_hint.rb
|
|
314
334
|
- lib/vimamsa/gui_keylog_panel.rb
|
|
315
335
|
- lib/vimamsa/gui_menu.rb
|
|
316
336
|
- lib/vimamsa/gui_select_window.rb
|
|
@@ -321,16 +341,22 @@ files:
|
|
|
321
341
|
- lib/vimamsa/gui_theme.rb
|
|
322
342
|
- lib/vimamsa/hook.rb
|
|
323
343
|
- lib/vimamsa/hyper_plain_text.rb
|
|
344
|
+
- lib/vimamsa/intro_page.rb
|
|
324
345
|
- lib/vimamsa/key_actions.rb
|
|
325
346
|
- lib/vimamsa/key_binding_tree.rb
|
|
326
347
|
- lib/vimamsa/key_bindings_notepad.rb
|
|
327
348
|
- lib/vimamsa/key_bindings_report.rb
|
|
328
349
|
- lib/vimamsa/key_bindings_vim.rb
|
|
350
|
+
- lib/vimamsa/key_bindings_vim_core.rb
|
|
329
351
|
- lib/vimamsa/key_bindings_vimlike.rb
|
|
352
|
+
- lib/vimamsa/key_names.rb
|
|
330
353
|
- lib/vimamsa/langservp.rb
|
|
354
|
+
- lib/vimamsa/line_tree.rb
|
|
331
355
|
- lib/vimamsa/macro.rb
|
|
332
356
|
- lib/vimamsa/main.rb
|
|
333
357
|
- lib/vimamsa/rbvma.rb
|
|
358
|
+
- lib/vimamsa/registers.rb
|
|
359
|
+
- lib/vimamsa/run_ruby.rb
|
|
334
360
|
- lib/vimamsa/search.rb
|
|
335
361
|
- lib/vimamsa/search_replace.rb
|
|
336
362
|
- lib/vimamsa/string_util.rb
|
|
@@ -339,8 +365,11 @@ files:
|
|
|
339
365
|
- lib/vimamsa/tests.rb
|
|
340
366
|
- lib/vimamsa/text_objects.rb
|
|
341
367
|
- lib/vimamsa/text_transforms.rb
|
|
368
|
+
- lib/vimamsa/tmp_user_dir.rb
|
|
369
|
+
- lib/vimamsa/user_dirs.rb
|
|
342
370
|
- lib/vimamsa/util.rb
|
|
343
371
|
- lib/vimamsa/version.rb
|
|
372
|
+
- lib/vimamsa/vim_operators.rb
|
|
344
373
|
- modules/calculator/calculator.rb
|
|
345
374
|
- modules/calculator/calculator_info.rb
|
|
346
375
|
- modules/color_highlight/color_highlight.rb
|
|
@@ -355,16 +384,25 @@ files:
|
|
|
355
384
|
- modules/tts/tts.rb
|
|
356
385
|
- modules/tts/tts_info.rb
|
|
357
386
|
- run_e2e_vm.sh
|
|
358
|
-
-
|
|
359
|
-
- run_tests_vm.sh
|
|
387
|
+
- run_tests_vm.rb
|
|
360
388
|
- scripts/appimage/AppRun
|
|
361
389
|
- scripts/appimage/Dockerfile
|
|
362
390
|
- scripts/appimage/build.sh
|
|
363
391
|
- scripts/appimage/build_in_container.sh
|
|
364
392
|
- scripts/appimage/smoke_test.sh
|
|
393
|
+
- scripts/demo/demo_easyjump_steps.txt
|
|
394
|
+
- scripts/demo/demo_files_steps.txt
|
|
365
395
|
- scripts/demo/demo_steps.txt
|
|
396
|
+
- scripts/demo/notes.txt
|
|
366
397
|
- scripts/demo/record_demo.rb
|
|
398
|
+
- scripts/demo/report.rb
|
|
367
399
|
- scripts/demo/shapes.rb
|
|
400
|
+
- scripts/demo/square/shapes.rb
|
|
401
|
+
- scripts/demo/square/steps.txt
|
|
402
|
+
- scripts/lib/perf_startup.rb
|
|
403
|
+
- scripts/lib/script_helpers.rb
|
|
404
|
+
- scripts/perf_compare.rb
|
|
405
|
+
- scripts/profile_startup.rb
|
|
368
406
|
- sheep.jpg
|
|
369
407
|
- styles/134272-molokai.xml
|
|
370
408
|
- styles/dark.xml
|
|
@@ -374,6 +412,7 @@ files:
|
|
|
374
412
|
- tests/support/virtual_keyboard.rb
|
|
375
413
|
- tests/support/virtual_mic.rb
|
|
376
414
|
- tests/test_ack.rb
|
|
415
|
+
- tests/test_action_ids.rb
|
|
377
416
|
- tests/test_auto_format.rb
|
|
378
417
|
- tests/test_autocomplete.rb
|
|
379
418
|
- tests/test_autosave.rb
|
|
@@ -381,6 +420,7 @@ files:
|
|
|
381
420
|
- tests/test_bookmarks.rb
|
|
382
421
|
- tests/test_bracket_match.rb
|
|
383
422
|
- tests/test_bundling.rb
|
|
423
|
+
- tests/test_cli_help.rb
|
|
384
424
|
- tests/test_color_highlight.rb
|
|
385
425
|
- tests/test_command_line.rb
|
|
386
426
|
- tests/test_command_line_file.rb
|
|
@@ -388,14 +428,18 @@ files:
|
|
|
388
428
|
- tests/test_copy_paste.rb
|
|
389
429
|
- tests/test_crash_handler.rb
|
|
390
430
|
- tests/test_custom_two_phase.rb
|
|
431
|
+
- tests/test_demo_player.rb
|
|
432
|
+
- tests/test_demo_recorder.rb
|
|
391
433
|
- tests/test_dialog_callback_errors.rb
|
|
392
434
|
- tests/test_dictation.rb
|
|
393
435
|
- tests/test_diff_buffer_name.rb
|
|
436
|
+
- tests/test_dot_repeat.rb
|
|
394
437
|
- tests/test_double_click.rb
|
|
395
438
|
- tests/test_drag_selection.rb
|
|
396
439
|
- tests/test_e2e_cmdline.rb
|
|
397
440
|
- tests/test_e2e_dictation.rb
|
|
398
441
|
- tests/test_e2e_replace_char.rb
|
|
442
|
+
- tests/test_easy_jump.rb
|
|
399
443
|
- tests/test_extract_file_links.rb
|
|
400
444
|
- tests/test_file_format.rb
|
|
401
445
|
- tests/test_file_manager.rb
|
|
@@ -403,34 +447,46 @@ files:
|
|
|
403
447
|
- tests/test_flash.rb
|
|
404
448
|
- tests/test_fold.rb
|
|
405
449
|
- tests/test_font_refresh.rb
|
|
450
|
+
- tests/test_form_input.rb
|
|
406
451
|
- tests/test_func_panel.rb
|
|
407
452
|
- tests/test_grep_apply.rb
|
|
408
453
|
- tests/test_gtk_sync.rb
|
|
409
454
|
- tests/test_hpt_highlight_visible.rb
|
|
410
455
|
- tests/test_hpt_link_highlight.rb
|
|
456
|
+
- tests/test_intro_page.rb
|
|
411
457
|
- tests/test_jump_to_file.rb
|
|
412
458
|
- tests/test_key_bindings.rb
|
|
459
|
+
- tests/test_key_categories.rb
|
|
413
460
|
- tests/test_keylog_panel.rb
|
|
461
|
+
- tests/test_line_ends.rb
|
|
462
|
+
- tests/test_line_tree.rb
|
|
414
463
|
- tests/test_lsp_clangd.rb
|
|
415
464
|
- tests/test_lsp_jump.rb
|
|
416
465
|
- tests/test_lsp_position_encoding.rb
|
|
466
|
+
- tests/test_lsp_root.rb
|
|
417
467
|
- tests/test_lsp_symbols.rb
|
|
418
468
|
- tests/test_macro.rb
|
|
419
469
|
- tests/test_markdown_highlight.rb
|
|
420
470
|
- tests/test_mode_badge.rb
|
|
421
471
|
- tests/test_module_interface.rb
|
|
422
472
|
- tests/test_notepad_bindings.rb
|
|
473
|
+
- tests/test_perf_startup.rb
|
|
423
474
|
- tests/test_popup_queue.rb
|
|
424
475
|
- tests/test_random_edit.rb
|
|
476
|
+
- tests/test_registers.rb
|
|
425
477
|
- tests/test_revert.rb
|
|
478
|
+
- tests/test_run_ruby.rb
|
|
426
479
|
- tests/test_startup_file.rb
|
|
427
480
|
- tests/test_status_area.rb
|
|
428
481
|
- tests/test_text_objects.rb
|
|
429
482
|
- tests/test_text_transforms.rb
|
|
483
|
+
- tests/test_tmp_user_dir.rb
|
|
430
484
|
- tests/test_tts.rb
|
|
431
485
|
- tests/test_undo.rb
|
|
486
|
+
- tests/test_user_dirs.rb
|
|
432
487
|
- tests/test_vim_bindings.rb
|
|
433
488
|
- tests/test_vim_conflicts.rb
|
|
489
|
+
- tests/test_vim_operators.rb
|
|
434
490
|
- tests/test_window_layout.rb
|
|
435
491
|
- vimamsa.gemspec
|
|
436
492
|
- vm_guest_run.sh
|
|
@@ -446,7 +502,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
446
502
|
requirements:
|
|
447
503
|
- - ">="
|
|
448
504
|
- !ruby/object:Gem::Version
|
|
449
|
-
version: '3.
|
|
505
|
+
version: '3.2'
|
|
450
506
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
451
507
|
requirements:
|
|
452
508
|
- - ">="
|
data/run_tests.rb
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
$stdout.sync = true
|
|
3
|
-
$stderr.sync = true
|
|
4
|
-
# run_tests.rb — Discover and run all vimamsa tests, write a report.
|
|
5
|
-
#
|
|
6
|
-
# Usage:
|
|
7
|
-
# ruby run_tests.rb [REPORT_FILE] default report: test_report.txt
|
|
8
|
-
#
|
|
9
|
-
# For headless / CI use:
|
|
10
|
-
# xvfb-run ruby run_tests.rb
|
|
11
|
-
|
|
12
|
-
require "open3"
|
|
13
|
-
|
|
14
|
-
SCRIPT_DIR = File.expand_path("..", __FILE__)
|
|
15
|
-
REPORT = File.expand_path(ARGV.first || "test_report.txt", SCRIPT_DIR)
|
|
16
|
-
|
|
17
|
-
# ── Discover test files ───────────────────────────────────────────────────────
|
|
18
|
-
test_files = Dir.glob(File.join(SCRIPT_DIR, "tests", "test_*.rb")).sort
|
|
19
|
-
|
|
20
|
-
if test_files.empty?
|
|
21
|
-
warn "ERROR: No test files found in tests/"
|
|
22
|
-
exit 1
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
# ── Guard: need a display ─────────────────────────────────────────────────────
|
|
26
|
-
unless ENV["DISPLAY"] || ENV["WAYLAND_DISPLAY"]
|
|
27
|
-
xvfb = `which xvfb-run 2>/dev/null`.strip
|
|
28
|
-
if xvfb.empty?
|
|
29
|
-
warn "ERROR: No display found (DISPLAY/WAYLAND_DISPLAY unset) and xvfb-run not available."
|
|
30
|
-
warn " Install xvfb or run from a desktop session."
|
|
31
|
-
exit 1
|
|
32
|
-
end
|
|
33
|
-
puts "No display detected — re-running under xvfb-run."
|
|
34
|
-
exec("xvfb-run", "-a", RbConfig.ruby, __FILE__, *ARGV)
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
# ── Print header ──────────────────────────────────────────────────────────────
|
|
38
|
-
puts "=== Vimamsa test runner ==="
|
|
39
|
-
puts "Running #{test_files.size} test file(s):"
|
|
40
|
-
test_files.each { |f| puts " #{File.basename(f)}" }
|
|
41
|
-
puts ""
|
|
42
|
-
|
|
43
|
-
# ── Run tests ─────────────────────────────────────────────────────────────────
|
|
44
|
-
# All files loaded in a single vimamsa session (one GTK startup).
|
|
45
|
-
# stdout → streamed live and captured for the report
|
|
46
|
-
# stderr → suppressed (GTK/GLib noise)
|
|
47
|
-
cmd = [RbConfig.ruby, "exe/run_tests.rb", "--test", *test_files]
|
|
48
|
-
raw = ""
|
|
49
|
-
IO.popen([*cmd, err: File::NULL], chdir: SCRIPT_DIR) do |io|
|
|
50
|
-
io.each_line do |line|
|
|
51
|
-
print line
|
|
52
|
-
raw << line
|
|
53
|
-
end
|
|
54
|
-
end
|
|
55
|
-
puts ""
|
|
56
|
-
|
|
57
|
-
# ── Parse summary ─────────────────────────────────────────────────────────────
|
|
58
|
-
summary_line = raw.lines.grep(/^Results:/).last.to_s
|
|
59
|
-
passed = summary_line[/(\d+) passed/, 1].to_i
|
|
60
|
-
failed = summary_line[/(\d+) failed/, 1].to_i
|
|
61
|
-
errors = raw.lines.count { |l| l.match?(/^\s+ERROR\s/) }
|
|
62
|
-
|
|
63
|
-
timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
|
|
64
|
-
|
|
65
|
-
# ── Write report ──────────────────────────────────────────────────────────────
|
|
66
|
-
File.open(REPORT, "w") do |f|
|
|
67
|
-
f.puts "Vimamsa Test Report — #{timestamp}"
|
|
68
|
-
f.puts "=" * 52
|
|
69
|
-
f.puts ""
|
|
70
|
-
f.puts "Test files (#{test_files.size}):"
|
|
71
|
-
test_files.each { |tf| f.puts " #{File.basename(tf)}" }
|
|
72
|
-
f.puts ""
|
|
73
|
-
f.puts "-" * 52
|
|
74
|
-
f.puts raw
|
|
75
|
-
f.puts "-" * 52
|
|
76
|
-
f.puts ""
|
|
77
|
-
f.puts "Summary"
|
|
78
|
-
f.puts "-" * 52
|
|
79
|
-
f.puts " Passed : #{passed}"
|
|
80
|
-
f.puts " Failed : #{failed}"
|
|
81
|
-
f.puts " Errors : #{errors}"
|
|
82
|
-
f.puts "\n ALL TESTS PASSED" if failed + errors == 0
|
|
83
|
-
f.puts ""
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
puts "Report written to: #{REPORT}"
|
|
87
|
-
puts " Passed: #{passed} Failed: #{failed} Errors: #{errors}"
|
|
88
|
-
|
|
89
|
-
exit(failed + errors == 0 ? 0 : 1)
|
data/run_tests_vm.sh
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Run the vimamsa test suite inside the VirtualBox VM named by $VM_NAME, on its real
|
|
3
|
-
# logged-in desktop (so the GTK window actually appears in the VM).
|
|
4
|
-
#
|
|
5
|
-
# Reaches the guest via VBoxManage guestcontrol (Guest Additions) — no SSH or
|
|
6
|
-
# shared folder needed. Syncs the current working tree (incl. uncommitted changes),
|
|
7
|
-
# provisions the guest on first run, builds the native extension, then runs
|
|
8
|
-
# exe/run_tests.rb on DISPLAY :0. Exits with the suite's exit code (0 pass / 1 fail).
|
|
9
|
-
#
|
|
10
|
-
# Usage (VM_NAME, VM_USER and VM_PASS exported, e.g. in ~/.bashrc):
|
|
11
|
-
# ./run_tests_vm.sh [test filter args...]
|
|
12
|
-
# Examples:
|
|
13
|
-
# ./run_tests_vm.sh # full suite
|
|
14
|
-
# ./run_tests_vm.sh undo # tests/test_undo.rb only
|
|
15
|
-
# FORCE_PROVISION=1 ./run_tests_vm.sh # re-run apt provisioning
|
|
16
|
-
#
|
|
17
|
-
# Env:
|
|
18
|
-
# VM_NAME (required) VirtualBox VM name
|
|
19
|
-
# VM_USER (required) guest login username
|
|
20
|
-
# VM_PASS (required) guest login/sudo password for user $VM_USER
|
|
21
|
-
# VM_DISPLAY guest desktop X display (default: :0)
|
|
22
|
-
# FORCE_PROVISION set to 1 to force guest re-provisioning
|
|
23
|
-
set -euo pipefail
|
|
24
|
-
|
|
25
|
-
VM_NAME="${VM_NAME:-}"
|
|
26
|
-
VM_USER="${VM_USER:-}"
|
|
27
|
-
VM_DISPLAY="${VM_DISPLAY:-:0}"
|
|
28
|
-
GUEST_HOME="/home/${VM_USER}"
|
|
29
|
-
|
|
30
|
-
missing=()
|
|
31
|
-
[ -n "$VM_NAME" ] || missing+=(VM_NAME)
|
|
32
|
-
[ -n "$VM_USER" ] || missing+=(VM_USER)
|
|
33
|
-
[ -n "${VM_PASS:-}" ] || missing+=(VM_PASS)
|
|
34
|
-
if [ ${#missing[@]} -gt 0 ]; then
|
|
35
|
-
echo "!! Not set: ${missing[*]}. Export VM_NAME (VirtualBox VM), VM_USER (guest user)" >&2
|
|
36
|
-
echo " and VM_PASS (guest password), e.g. in ~/.bashrc." >&2
|
|
37
|
-
exit 2
|
|
38
|
-
fi
|
|
39
|
-
|
|
40
|
-
REPO="$(git -C "$(dirname "$0")" rev-parse --show-toplevel)"
|
|
41
|
-
|
|
42
|
-
# Temp files: a chmod-600 passwordfile (so the password isn't visible in `ps`)
|
|
43
|
-
# and the source tarball. Both are removed on exit.
|
|
44
|
-
PF="$(mktemp)"
|
|
45
|
-
TAR="$(mktemp --suffix=.tgz)"
|
|
46
|
-
chmod 600 "$PF"
|
|
47
|
-
printf '%s' "$VM_PASS" > "$PF"
|
|
48
|
-
cleanup() { rm -f "$PF" "$TAR"; }
|
|
49
|
-
trap cleanup EXIT
|
|
50
|
-
|
|
51
|
-
# In VBoxManage 7.x the credentials/options belong to the run/copyto subcommand
|
|
52
|
-
# (after it), and use `--opt=value` syntax.
|
|
53
|
-
GC=(VBoxManage guestcontrol "$VM_NAME")
|
|
54
|
-
CRED=(--username="$VM_USER" --passwordfile="$PF")
|
|
55
|
-
|
|
56
|
-
# 1. Ensure the VM is running and Guest Additions answer.
|
|
57
|
-
if ! VBoxManage list runningvms | grep -q "\"$VM_NAME\""; then
|
|
58
|
-
echo ">> Starting VM $VM_NAME"
|
|
59
|
-
VBoxManage startvm "$VM_NAME" --type gui
|
|
60
|
-
fi
|
|
61
|
-
echo ">> Waiting for Guest Additions in $VM_NAME"
|
|
62
|
-
for i in $(seq 1 60); do
|
|
63
|
-
if "${GC[@]}" run "${CRED[@]}" --exe=/bin/true -- true >/dev/null 2>&1; then break; fi
|
|
64
|
-
if [ "$i" = 60 ]; then
|
|
65
|
-
echo "!! Guest Additions not responding after 60s. Is the guest booted and logged in?" >&2
|
|
66
|
-
exit 4
|
|
67
|
-
fi
|
|
68
|
-
sleep 2
|
|
69
|
-
done
|
|
70
|
-
|
|
71
|
-
# 2. Tarball the working tree (include .git for `gem build`; drop heavy junk).
|
|
72
|
-
# tolerate exit 1 ("file changed as we read it" — e.g. .git churning during the
|
|
73
|
-
# read); only a fatal tar error (>=2) should abort.
|
|
74
|
-
echo ">> Packing working tree"
|
|
75
|
-
set +e
|
|
76
|
-
tar czf "$TAR" -C "$REPO" \
|
|
77
|
-
--warning=no-file-changed \
|
|
78
|
-
--exclude='./.git/hooks' \
|
|
79
|
-
--exclude='*_vma_autosave' \
|
|
80
|
-
--exclude='.*_vma_autosave' \
|
|
81
|
-
--exclude='*.gem' \
|
|
82
|
-
--exclude='*.o' \
|
|
83
|
-
--exclude='*.so' \
|
|
84
|
-
--exclude='*.tar.xz' \
|
|
85
|
-
--exclude='__pycache__' \
|
|
86
|
-
--exclude='*.log' \
|
|
87
|
-
--exclude='claude-log.*' \
|
|
88
|
-
--exclude='dot_git_old' \
|
|
89
|
-
--exclude='./build' \
|
|
90
|
-
--exclude='2del_*' \
|
|
91
|
-
--exclude='bug*.txt' \
|
|
92
|
-
--exclude='*.mp3' --exclude='*.wav' \
|
|
93
|
-
.
|
|
94
|
-
trc=$?
|
|
95
|
-
set -e
|
|
96
|
-
if [ "$trc" -gt 1 ]; then
|
|
97
|
-
echo "!! tar failed (exit $trc)" >&2
|
|
98
|
-
exit 6
|
|
99
|
-
fi
|
|
100
|
-
|
|
101
|
-
# 3. Copy the tarball and the guest runner into the VM (copyto overwrites by default).
|
|
102
|
-
echo ">> Copying source + runner into guest"
|
|
103
|
-
"${GC[@]}" copyto "${CRED[@]}" "$TAR" "${GUEST_HOME}/vimamsa_src.tgz"
|
|
104
|
-
"${GC[@]}" copyto "${CRED[@]}" "${REPO}/vm_guest_run.sh" "${GUEST_HOME}/vm_guest_run.sh"
|
|
105
|
-
|
|
106
|
-
# 4. Run the guest script, streaming output (tee'd so we can parse the result).
|
|
107
|
-
# Secrets/env go via --putenv, never onto the repo. NOTE: VBoxManage does not
|
|
108
|
-
# propagate the guest exit code, so pass/fail is taken from the VMA_SUITE_EXIT
|
|
109
|
-
# sentinel the guest prints, not from VBoxManage's own exit status.
|
|
110
|
-
echo ">> Running test suite in guest (DISPLAY $VM_DISPLAY)"
|
|
111
|
-
OUT="$(mktemp)"
|
|
112
|
-
trap 'rm -f "$PF" "$TAR" "$OUT"' EXIT
|
|
113
|
-
set +e
|
|
114
|
-
"${GC[@]}" run "${CRED[@]}" --exe=/bin/bash --wait-stdout --wait-stderr \
|
|
115
|
-
--putenv="SUDO_PASS=${VM_PASS}" \
|
|
116
|
-
--putenv="VMA_DISPLAY=${VM_DISPLAY}" \
|
|
117
|
-
--putenv="VMA_TEST_ARGS=$*" \
|
|
118
|
-
--putenv="FORCE_PROVISION=${FORCE_PROVISION:-}" \
|
|
119
|
-
--putenv="VMA_E2E_INTERACTIVE=${VMA_E2E_INTERACTIVE:-}" \
|
|
120
|
-
-- "${GUEST_HOME}/vm_guest_run.sh" 2>&1 | tee "$OUT"
|
|
121
|
-
set -e
|
|
122
|
-
|
|
123
|
-
sentinel="$(grep -oE 'VMA_SUITE_EXIT=[0-9]+' "$OUT" | tail -1 | cut -d= -f2)"
|
|
124
|
-
if [ -z "$sentinel" ]; then
|
|
125
|
-
echo "!! Did not receive a VMA_SUITE_EXIT sentinel from the guest — the run did not" >&2
|
|
126
|
-
echo " reach the test phase (provisioning/build failure above)." >&2
|
|
127
|
-
exit 5
|
|
128
|
-
fi
|
|
129
|
-
echo ">> Suite exit code (from guest): $sentinel"
|
|
130
|
-
exit "$sentinel"
|