@fresh-editor/fresh-editor 0.1.83 → 0.1.86
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.
- package/CHANGELOG.md +31 -0
- package/package.json +1 -1
- package/plugins/calculator.ts +0 -1
- package/plugins/clangd_support.ts +3 -4
- package/plugins/color_highlighter.ts +3 -4
- package/plugins/config-schema.json +7 -1
- package/plugins/diagnostics_panel.ts +2 -3
- package/plugins/git_blame.ts +3 -4
- package/plugins/git_find_file.ts +0 -1
- package/plugins/git_grep.ts +0 -1
- package/plugins/git_gutter.ts +1 -2
- package/plugins/git_log.ts +3 -4
- package/plugins/lib/fresh.d.ts +9 -3
- package/plugins/live_grep.ts +0 -1
- package/plugins/markdown_compose.ts +0 -1
- package/plugins/merge_conflict.ts +2 -3
- package/plugins/path_complete.ts +0 -1
- package/plugins/search_replace.ts +0 -1
- package/plugins/theme_editor.ts +0 -1
- package/plugins/todo_highlighter.ts +0 -1
- package/plugins/vi_mode.i18n.json +39 -13
- package/plugins/vi_mode.ts +71 -23
- package/plugins/welcome.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# Release Notes
|
|
2
2
|
|
|
3
|
+
## 0.1.86
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **Popup Text Selection**: Select and copy text from LSP hover popups and tooltips. Click and drag to select, Ctrl+C to copy.
|
|
8
|
+
* **File Explorer Status Tooltips**: Hover over git status indicators (M, U, A) to see detailed explanations and diff stats. Directory tooltips show list of modified files.
|
|
9
|
+
* **Terminal Background Transparency**: New `use_terminal_bg` config option allows terminal transparency or custom backgrounds to show through the editor (#640).
|
|
10
|
+
* **Vi Mode Improvements**: Added `:w filename` to save to path, `:wq filename` to save and quit, `:q!` to force quit without saving. Added Ctrl+P (command palette) and Ctrl+Q (quit) to all vi modes.
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **Settings UI Add Button**: Fixed "Add New" button not appearing for LSP and Languages maps in Settings UI.
|
|
15
|
+
* **LSP Hover Markdown**: Improved markdown rendering - soft breaks now create newlines (fixing Python docstring formatting), inline code rendered without visible backticks.
|
|
16
|
+
* **Symlink Directories**: Fixed symlinks to directories not showing expand marker and causing "Is a directory" error when opened (#787).
|
|
17
|
+
* **Live Grep Preview**: Fixed preview not updating when navigating through search results (#636).
|
|
18
|
+
* **Terminal Keyboard State**: Fixed arrow keys and Enter not working after exiting the editor due to Kitty keyboard protocol cleanup issue (#773).
|
|
19
|
+
* **Plugin Commands Visibility**: Fixed many plugin commands (Toggle Vi Mode, Git Blame, Diagnostics Panel, etc.) not appearing in command palette.
|
|
20
|
+
|
|
21
|
+
### UI Changes
|
|
22
|
+
|
|
23
|
+
* **File Explorer Layout**: Git status indicators moved to rightmost column, matching VS Code's layout. Removed file size and item count for cleaner appearance.
|
|
24
|
+
* **Quieter Startup**: Removed plugin "ready/loaded" status messages that cluttered the status bar on startup.
|
|
25
|
+
|
|
26
|
+
### Internal
|
|
27
|
+
|
|
28
|
+
* Separated I/O from pure types in theme and grammar modules for better testability and future WASM compatibility.
|
|
29
|
+
* Fixed workspace crate dependencies for crates.io publishing.
|
|
30
|
+
* Improved install.sh reliability for containers and edge cases.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
3
34
|
## 0.1.83
|
|
4
35
|
|
|
5
36
|
### Breaking Changes
|
package/package.json
CHANGED
package/plugins/calculator.ts
CHANGED
|
@@ -251,7 +251,7 @@ editor.registerCommand(
|
|
|
251
251
|
"%cmd.project_setup",
|
|
252
252
|
"%cmd.project_setup_desc",
|
|
253
253
|
"clangdProjectSetup",
|
|
254
|
-
|
|
254
|
+
null
|
|
255
255
|
);
|
|
256
256
|
|
|
257
257
|
globalThis.clangdOpenProjectConfig = function(): void {
|
|
@@ -287,17 +287,16 @@ editor.registerCommand(
|
|
|
287
287
|
"%cmd.switch_source_header",
|
|
288
288
|
"%cmd.switch_source_header_desc",
|
|
289
289
|
"clangdSwitchSourceHeader",
|
|
290
|
-
|
|
290
|
+
null
|
|
291
291
|
);
|
|
292
292
|
|
|
293
293
|
editor.registerCommand(
|
|
294
294
|
"%cmd.open_project_config",
|
|
295
295
|
"%cmd.open_project_config_desc",
|
|
296
296
|
"clangdOpenProjectConfig",
|
|
297
|
-
|
|
297
|
+
null
|
|
298
298
|
);
|
|
299
299
|
|
|
300
|
-
setClangdStatus(editor.t("status.plugin_loaded"));
|
|
301
300
|
|
|
302
301
|
globalThis.onClangdCustomNotification = function(payload: {
|
|
303
302
|
language: string;
|
|
@@ -285,23 +285,22 @@ editor.registerCommand(
|
|
|
285
285
|
"%cmd.enable",
|
|
286
286
|
"%cmd.enable_desc",
|
|
287
287
|
"colorHighlighterEnable",
|
|
288
|
-
|
|
288
|
+
null
|
|
289
289
|
);
|
|
290
290
|
|
|
291
291
|
editor.registerCommand(
|
|
292
292
|
"%cmd.disable",
|
|
293
293
|
"%cmd.disable_desc",
|
|
294
294
|
"colorHighlighterDisable",
|
|
295
|
-
|
|
295
|
+
null
|
|
296
296
|
);
|
|
297
297
|
|
|
298
298
|
editor.registerCommand(
|
|
299
299
|
"%cmd.toggle",
|
|
300
300
|
"%cmd.toggle_desc",
|
|
301
301
|
"colorHighlighterToggle",
|
|
302
|
-
|
|
302
|
+
null
|
|
303
303
|
);
|
|
304
304
|
|
|
305
305
|
// Initialization
|
|
306
|
-
editor.setStatus(editor.t("status.loaded"));
|
|
307
306
|
editor.debug("Color Highlighter initialized - supports hex, rgb, hsl, and Rust Color::Rgb");
|
|
@@ -59,7 +59,8 @@
|
|
|
59
59
|
"keyboard_report_all_keys_as_escape_codes": false,
|
|
60
60
|
"quick_suggestions": true,
|
|
61
61
|
"show_menu_bar": true,
|
|
62
|
-
"show_tab_bar": true
|
|
62
|
+
"show_tab_bar": true,
|
|
63
|
+
"use_terminal_bg": false
|
|
63
64
|
}
|
|
64
65
|
},
|
|
65
66
|
"file_explorer": {
|
|
@@ -349,6 +350,11 @@
|
|
|
349
350
|
"description": "Whether the tab bar is visible by default.\nThe tab bar shows open files in each split pane.\nCan be toggled at runtime via command palette or keybinding.\nDefault: true",
|
|
350
351
|
"type": "boolean",
|
|
351
352
|
"default": true
|
|
353
|
+
},
|
|
354
|
+
"use_terminal_bg": {
|
|
355
|
+
"description": "Use the terminal's default background color instead of the theme's editor background.\nWhen enabled, the editor background inherits from the terminal emulator,\nallowing transparency or custom terminal backgrounds to show through.\nDefault: false",
|
|
356
|
+
"type": "boolean",
|
|
357
|
+
"default": false
|
|
352
358
|
}
|
|
353
359
|
}
|
|
354
360
|
},
|
|
@@ -255,16 +255,15 @@ editor.registerCommand(
|
|
|
255
255
|
"%cmd.show_diagnostics_panel",
|
|
256
256
|
"%cmd.show_diagnostics_panel_desc",
|
|
257
257
|
"show_diagnostics_panel",
|
|
258
|
-
|
|
258
|
+
null
|
|
259
259
|
);
|
|
260
260
|
|
|
261
261
|
editor.registerCommand(
|
|
262
262
|
"%cmd.toggle_diagnostics_panel",
|
|
263
263
|
"%cmd.toggle_diagnostics_panel_desc",
|
|
264
264
|
"toggle_diagnostics_panel",
|
|
265
|
-
|
|
265
|
+
null
|
|
266
266
|
);
|
|
267
267
|
|
|
268
268
|
// Initialization
|
|
269
|
-
editor.setStatus(editor.t("status.loaded"));
|
|
270
269
|
editor.debug("Diagnostics Panel plugin initialized (using Finder abstraction)");
|
package/plugins/git_blame.ts
CHANGED
|
@@ -677,26 +677,25 @@ editor.registerCommand(
|
|
|
677
677
|
"%cmd.git_blame",
|
|
678
678
|
"%cmd.git_blame_desc",
|
|
679
679
|
"show_git_blame",
|
|
680
|
-
|
|
680
|
+
null
|
|
681
681
|
);
|
|
682
682
|
|
|
683
683
|
editor.registerCommand(
|
|
684
684
|
"%cmd.git_blame_close",
|
|
685
685
|
"%cmd.git_blame_close_desc",
|
|
686
686
|
"git_blame_close",
|
|
687
|
-
|
|
687
|
+
null
|
|
688
688
|
);
|
|
689
689
|
|
|
690
690
|
editor.registerCommand(
|
|
691
691
|
"%cmd.git_blame_go_back",
|
|
692
692
|
"%cmd.git_blame_go_back_desc",
|
|
693
693
|
"git_blame_go_back",
|
|
694
|
-
|
|
694
|
+
null
|
|
695
695
|
);
|
|
696
696
|
|
|
697
697
|
// =============================================================================
|
|
698
698
|
// Plugin Initialization
|
|
699
699
|
// =============================================================================
|
|
700
700
|
|
|
701
|
-
editor.setStatus(editor.t("status.ready"));
|
|
702
701
|
editor.debug("Git Blame plugin initialized - Use 'Git Blame' command to open");
|
package/plugins/git_find_file.ts
CHANGED
package/plugins/git_grep.ts
CHANGED
package/plugins/git_gutter.ts
CHANGED
|
@@ -458,7 +458,7 @@ editor.registerCommand(
|
|
|
458
458
|
"%cmd.refresh",
|
|
459
459
|
"%cmd.refresh_desc",
|
|
460
460
|
"git_gutter_refresh",
|
|
461
|
-
|
|
461
|
+
null
|
|
462
462
|
);
|
|
463
463
|
|
|
464
464
|
// Initialize for the current buffer
|
|
@@ -474,4 +474,3 @@ if (initPath && initPath !== "") {
|
|
|
474
474
|
}
|
|
475
475
|
|
|
476
476
|
editor.debug("Git Gutter plugin loaded");
|
|
477
|
-
editor.setStatus(editor.t("status.ready"));
|
package/plugins/git_log.ts
CHANGED
|
@@ -1253,26 +1253,25 @@ editor.registerCommand(
|
|
|
1253
1253
|
"%cmd.git_log",
|
|
1254
1254
|
"%cmd.git_log_desc",
|
|
1255
1255
|
"show_git_log",
|
|
1256
|
-
|
|
1256
|
+
null
|
|
1257
1257
|
);
|
|
1258
1258
|
|
|
1259
1259
|
editor.registerCommand(
|
|
1260
1260
|
"%cmd.git_log_close",
|
|
1261
1261
|
"%cmd.git_log_close_desc",
|
|
1262
1262
|
"git_log_close",
|
|
1263
|
-
|
|
1263
|
+
null
|
|
1264
1264
|
);
|
|
1265
1265
|
|
|
1266
1266
|
editor.registerCommand(
|
|
1267
1267
|
"%cmd.git_log_refresh",
|
|
1268
1268
|
"%cmd.git_log_refresh_desc",
|
|
1269
1269
|
"git_log_refresh",
|
|
1270
|
-
|
|
1270
|
+
null
|
|
1271
1271
|
);
|
|
1272
1272
|
|
|
1273
1273
|
// =============================================================================
|
|
1274
1274
|
// Plugin Initialization
|
|
1275
1275
|
// =============================================================================
|
|
1276
1276
|
|
|
1277
|
-
editor.setStatus(editor.t("status.ready", { count: "0" }));
|
|
1278
1277
|
editor.debug("Git Log plugin initialized - Use 'Git Log' command to open");
|
package/plugins/lib/fresh.d.ts
CHANGED
|
@@ -217,7 +217,7 @@ interface EditorAPI {
|
|
|
217
217
|
copyToClipboard(text: string): void;
|
|
218
218
|
setClipboard(text: string): void;
|
|
219
219
|
/**
|
|
220
|
-
* Register a command - reads plugin name from
|
|
220
|
+
* Register a command - reads plugin name from __pluginName__ global
|
|
221
221
|
* context is optional - can be omitted, null, undefined, or a string
|
|
222
222
|
*/
|
|
223
223
|
registerCommand(name: string, description: string, handlerName: string, context?: unknown): boolean;
|
|
@@ -234,7 +234,7 @@ interface EditorAPI {
|
|
|
234
234
|
*/
|
|
235
235
|
executeAction(actionName: string): boolean;
|
|
236
236
|
/**
|
|
237
|
-
* Translate a string - reads plugin name from
|
|
237
|
+
* Translate a string - reads plugin name from __pluginName__ global
|
|
238
238
|
* Args is optional - can be omitted, undefined, null, or an object
|
|
239
239
|
*/
|
|
240
240
|
t(key: string, ...args: unknown[]): string;
|
|
@@ -255,6 +255,11 @@ interface EditorAPI {
|
|
|
255
255
|
*/
|
|
256
256
|
isBufferModified(bufferId: number): boolean;
|
|
257
257
|
/**
|
|
258
|
+
* Save a buffer to a specific file path
|
|
259
|
+
* Used by :w filename to save unnamed buffers or save-as
|
|
260
|
+
*/
|
|
261
|
+
saveBufferToPath(bufferId: number, path: string): boolean;
|
|
262
|
+
/**
|
|
258
263
|
* Get buffer info by ID
|
|
259
264
|
*/
|
|
260
265
|
getBufferInfo(bufferId: number): unknown;
|
|
@@ -332,6 +337,7 @@ interface EditorAPI {
|
|
|
332
337
|
getCwd(): string;
|
|
333
338
|
/**
|
|
334
339
|
* Join path components (variadic - accepts multiple string arguments)
|
|
340
|
+
* Always uses forward slashes for cross-platform consistency (like Node.js path.posix.join)
|
|
335
341
|
*/
|
|
336
342
|
pathJoin(...parts: string[]): string;
|
|
337
343
|
/**
|
|
@@ -409,7 +415,7 @@ interface EditorAPI {
|
|
|
409
415
|
/**
|
|
410
416
|
* Check if a background process is still running
|
|
411
417
|
*/
|
|
412
|
-
isProcessRunning(
|
|
418
|
+
isProcessRunning(ProcessId: number): boolean;
|
|
413
419
|
/**
|
|
414
420
|
* Kill a process by ID (alias for killBackgroundProcess)
|
|
415
421
|
*/
|
package/plugins/live_grep.ts
CHANGED
|
@@ -1783,7 +1783,7 @@ const MERGE_MODE_COMMANDS = [
|
|
|
1783
1783
|
*/
|
|
1784
1784
|
function registerMergeModeCommands(): void {
|
|
1785
1785
|
for (const cmd of MERGE_MODE_COMMANDS) {
|
|
1786
|
-
editor.registerCommand(cmd.name, cmd.desc, cmd.action,
|
|
1786
|
+
editor.registerCommand(cmd.name, cmd.desc, cmd.action, null);
|
|
1787
1787
|
}
|
|
1788
1788
|
}
|
|
1789
1789
|
|
|
@@ -1801,12 +1801,11 @@ editor.registerCommand(
|
|
|
1801
1801
|
"%cmd.start",
|
|
1802
1802
|
"%cmd.start_desc",
|
|
1803
1803
|
"start_merge_conflict",
|
|
1804
|
-
|
|
1804
|
+
null // Always visible - entry point command
|
|
1805
1805
|
);
|
|
1806
1806
|
|
|
1807
1807
|
// =============================================================================
|
|
1808
1808
|
// Plugin Initialization
|
|
1809
1809
|
// =============================================================================
|
|
1810
1810
|
|
|
1811
|
-
editor.setStatus(editor.t("status.ready"));
|
|
1812
1811
|
editor.debug("Merge plugin initialized - Use 'Merge: Start Resolution' for files with conflicts");
|
package/plugins/path_complete.ts
CHANGED
package/plugins/theme_editor.ts
CHANGED
|
@@ -2097,5 +2097,4 @@ editor.registerCommand("%cmd.nav_prev", "%cmd.nav_prev_desc", "theme_editor_nav_
|
|
|
2097
2097
|
// Plugin Initialization
|
|
2098
2098
|
// =============================================================================
|
|
2099
2099
|
|
|
2100
|
-
editor.setStatus(editor.t("status.plugin_loaded"));
|
|
2101
2100
|
editor.debug("Theme Editor plugin initialized - Use 'Edit Theme' command to open");
|
|
@@ -25,10 +25,12 @@
|
|
|
25
25
|
"status.line_beyond_end": "Line %{line} beyond end of file, moved to end",
|
|
26
26
|
|
|
27
27
|
"error.no_write_since_change": "No write since last change (use %{cmd} to override)",
|
|
28
|
+
"error.other_buffers_modified": "Other buffers have unsaved changes (use %{cmd} to save all and quit)",
|
|
29
|
+
"error.no_file_name": "No file name (use :w filename)",
|
|
28
30
|
"error.not_valid_command": "Not a valid command: %{cmd}",
|
|
29
31
|
"error.unknown_command": "Unknown command: %{cmd}",
|
|
30
32
|
"error.command_no_bang": "Command does not accept !: %{cmd}",
|
|
31
|
-
"error.save_as_not_implemented": "Save as not implemented. Use
|
|
33
|
+
"error.save_as_not_implemented": "Save as not implemented. Use Ctrl+Shift+S or File menu.",
|
|
32
34
|
"error.shell_not_supported": "Shell commands not supported (use terminal)",
|
|
33
35
|
"error.buffer_not_found": "Buffer %{id} not found",
|
|
34
36
|
"error.multiple_buffers_match": "Multiple buffers match \"%{pattern}\". Be more specific.",
|
|
@@ -144,10 +146,12 @@
|
|
|
144
146
|
"status.line_beyond_end": "Radek %{line} za koncem souboru, presunuto na konec",
|
|
145
147
|
|
|
146
148
|
"error.no_write_since_change": "Neulozeno od posledni zmeny (pouzijte %{cmd} pro vynuceni)",
|
|
149
|
+
"error.other_buffers_modified": "Jiné buffery mají neuložené změny (použijte %{cmd} pro uložení všech a ukončení)",
|
|
150
|
+
"error.no_file_name": "Žádný název souboru (použijte :w název_souboru)",
|
|
147
151
|
"error.not_valid_command": "Neplatny prikaz: %{cmd}",
|
|
148
152
|
"error.unknown_command": "Neznamy prikaz: %{cmd}",
|
|
149
153
|
"error.command_no_bang": "Prikaz neprijima !: %{cmd}",
|
|
150
|
-
"error.save_as_not_implemented": "
|
|
154
|
+
"error.save_as_not_implemented": "Uložit jako není implementováno. Použijte Ctrl+Shift+S nebo menu Soubor.",
|
|
151
155
|
"error.shell_not_supported": "Shell prikazy nepodporovany (pouzijte terminal)",
|
|
152
156
|
"error.buffer_not_found": "Buffer %{id} nenalezen",
|
|
153
157
|
"error.multiple_buffers_match": "Vice bufferu odpovida \"%{pattern}\". Bud presnejsi.",
|
|
@@ -263,10 +267,12 @@
|
|
|
263
267
|
"status.line_beyond_end": "Zeile %{line} ueber Dateiende hinaus, zum Ende bewegt",
|
|
264
268
|
|
|
265
269
|
"error.no_write_since_change": "Nicht gespeichert seit letzter Aenderung (verwende %{cmd} zum Ueberschreiben)",
|
|
270
|
+
"error.other_buffers_modified": "Andere Puffer haben ungespeicherte Änderungen (verwenden Sie %{cmd} um alle zu speichern und zu beenden)",
|
|
271
|
+
"error.no_file_name": "Kein Dateiname (verwenden Sie :w Dateiname)",
|
|
266
272
|
"error.not_valid_command": "Kein gueltiger Befehl: %{cmd}",
|
|
267
273
|
"error.unknown_command": "Unbekannter Befehl: %{cmd}",
|
|
268
274
|
"error.command_no_bang": "Befehl akzeptiert kein !: %{cmd}",
|
|
269
|
-
"error.save_as_not_implemented": "Speichern unter nicht implementiert.
|
|
275
|
+
"error.save_as_not_implemented": "Speichern unter nicht implementiert. Verwenden Sie Strg+Umschalt+S oder das Datei-Menü.",
|
|
270
276
|
"error.shell_not_supported": "Shell-Befehle nicht unterstuetzt (verwende Terminal)",
|
|
271
277
|
"error.buffer_not_found": "Buffer %{id} nicht gefunden",
|
|
272
278
|
"error.multiple_buffers_match": "Mehrere Buffer passen zu \"%{pattern}\". Sei genauer.",
|
|
@@ -382,10 +388,12 @@
|
|
|
382
388
|
"status.line_beyond_end": "Linea %{line} mas alla del final, movido al final",
|
|
383
389
|
|
|
384
390
|
"error.no_write_since_change": "Sin guardar desde el ultimo cambio (usa %{cmd} para forzar)",
|
|
391
|
+
"error.other_buffers_modified": "Otros búferes tienen cambios sin guardar (use %{cmd} para guardar todos y salir)",
|
|
392
|
+
"error.no_file_name": "Sin nombre de archivo (use :w nombre_archivo)",
|
|
385
393
|
"error.not_valid_command": "Comando no valido: %{cmd}",
|
|
386
394
|
"error.unknown_command": "Comando desconocido: %{cmd}",
|
|
387
395
|
"error.command_no_bang": "El comando no acepta !: %{cmd}",
|
|
388
|
-
"error.save_as_not_implemented": "Guardar como no implementado.
|
|
396
|
+
"error.save_as_not_implemented": "Guardar como no implementado. Use Ctrl+Shift+S o el menú Archivo.",
|
|
389
397
|
"error.shell_not_supported": "Comandos de shell no soportados (usa terminal)",
|
|
390
398
|
"error.buffer_not_found": "Buffer %{id} no encontrado",
|
|
391
399
|
"error.multiple_buffers_match": "Multiples buffers coinciden con \"%{pattern}\". Se mas especifico.",
|
|
@@ -501,10 +509,12 @@
|
|
|
501
509
|
"status.line_beyond_end": "Ligne %{line} au-dela de la fin, deplace a la fin",
|
|
502
510
|
|
|
503
511
|
"error.no_write_since_change": "Non enregistre depuis la derniere modification (utilisez %{cmd} pour forcer)",
|
|
512
|
+
"error.other_buffers_modified": "D'autres tampons ont des modifications non enregistrées (utilisez %{cmd} pour tout enregistrer et quitter)",
|
|
513
|
+
"error.no_file_name": "Pas de nom de fichier (utilisez :w nom_fichier)",
|
|
504
514
|
"error.not_valid_command": "Commande non valide: %{cmd}",
|
|
505
515
|
"error.unknown_command": "Commande inconnue: %{cmd}",
|
|
506
516
|
"error.command_no_bang": "La commande n'accepte pas !: %{cmd}",
|
|
507
|
-
"error.save_as_not_implemented": "Enregistrer sous non
|
|
517
|
+
"error.save_as_not_implemented": "Enregistrer sous non implémenté. Utilisez Ctrl+Shift+S ou le menu Fichier.",
|
|
508
518
|
"error.shell_not_supported": "Commandes shell non supportees (utilisez terminal)",
|
|
509
519
|
"error.buffer_not_found": "Buffer %{id} non trouve",
|
|
510
520
|
"error.multiple_buffers_match": "Plusieurs buffers correspondent a \"%{pattern}\". Soyez plus precis.",
|
|
@@ -620,10 +630,12 @@
|
|
|
620
630
|
"status.line_beyond_end": "Riga %{line} oltre la fine del file, spostato alla fine",
|
|
621
631
|
|
|
622
632
|
"error.no_write_since_change": "Non salvato dall'ultima modifica (usa %{cmd} per forzare)",
|
|
633
|
+
"error.other_buffers_modified": "Altri buffer hanno modifiche non salvate (usa %{cmd} per salvare tutto ed uscire)",
|
|
634
|
+
"error.no_file_name": "Nessun nome file (usa :w nome_file)",
|
|
623
635
|
"error.not_valid_command": "Comando non valido: %{cmd}",
|
|
624
636
|
"error.unknown_command": "Comando sconosciuto: %{cmd}",
|
|
625
637
|
"error.command_no_bang": "Il comando non accetta !: %{cmd}",
|
|
626
|
-
"error.save_as_not_implemented": "Salva
|
|
638
|
+
"error.save_as_not_implemented": "Salva con nome non implementato. Usa Ctrl+Shift+S o il menu File.",
|
|
627
639
|
"error.shell_not_supported": "Comandi shell non supportati (usa il terminale)",
|
|
628
640
|
"error.buffer_not_found": "Buffer %{id} non trovato",
|
|
629
641
|
"error.multiple_buffers_match": "Più buffer corrispondono a \"%{pattern}\". Sii più specifico.",
|
|
@@ -739,10 +751,12 @@
|
|
|
739
751
|
"status.line_beyond_end": "%{line}行目はファイル末尾を超えています。末尾に移動しました",
|
|
740
752
|
|
|
741
753
|
"error.no_write_since_change": "最後の変更以降保存されていません(%{cmd}で強制実行)",
|
|
754
|
+
"error.other_buffers_modified": "他のバッファに未保存の変更があります(%{cmd} で全て保存して終了)",
|
|
755
|
+
"error.no_file_name": "ファイル名がありません(:w ファイル名 を使用)",
|
|
742
756
|
"error.not_valid_command": "無効なコマンド: %{cmd}",
|
|
743
757
|
"error.unknown_command": "不明なコマンド: %{cmd}",
|
|
744
758
|
"error.command_no_bang": "コマンドは!を受け付けません: %{cmd}",
|
|
745
|
-
"error.save_as_not_implemented": "
|
|
759
|
+
"error.save_as_not_implemented": "名前を付けて保存は未実装です。Ctrl+Shift+S またはファイルメニューを使用してください。",
|
|
746
760
|
"error.shell_not_supported": "シェルコマンドはサポートされていません(ターミナルを使用)",
|
|
747
761
|
"error.buffer_not_found": "バッファ%{id}が見つかりません",
|
|
748
762
|
"error.multiple_buffers_match": "複数のバッファが\"%{pattern}\"に一致します。より具体的に指定してください。",
|
|
@@ -858,10 +872,12 @@
|
|
|
858
872
|
"status.line_beyond_end": "%{line}줄이 파일 끝을 넘어감, 끝으로 이동함",
|
|
859
873
|
|
|
860
874
|
"error.no_write_since_change": "마지막 변경 후 저장 안 됨 (%{cmd}로 강제 실행)",
|
|
875
|
+
"error.other_buffers_modified": "다른 버퍼에 저장되지 않은 변경사항이 있습니다 (%{cmd}로 모두 저장하고 종료)",
|
|
876
|
+
"error.no_file_name": "파일 이름 없음 (:w 파일이름 사용)",
|
|
861
877
|
"error.not_valid_command": "유효하지 않은 명령: %{cmd}",
|
|
862
878
|
"error.unknown_command": "알 수 없는 명령: %{cmd}",
|
|
863
879
|
"error.command_no_bang": "명령이 !를 지원하지 않음: %{cmd}",
|
|
864
|
-
"error.save_as_not_implemented": "다른 이름으로
|
|
880
|
+
"error.save_as_not_implemented": "다른 이름으로 저장이 구현되지 않았습니다. Ctrl+Shift+S 또는 파일 메뉴를 사용하세요.",
|
|
865
881
|
"error.shell_not_supported": "셸 명령 지원 안 됨 (터미널 사용)",
|
|
866
882
|
"error.buffer_not_found": "버퍼 %{id} 찾을 수 없음",
|
|
867
883
|
"error.multiple_buffers_match": "여러 버퍼가 \"%{pattern}\"와 일치. 더 구체적으로 지정하세요.",
|
|
@@ -977,10 +993,12 @@
|
|
|
977
993
|
"status.line_beyond_end": "Linha %{line} alem do fim do arquivo, movido para o fim",
|
|
978
994
|
|
|
979
995
|
"error.no_write_since_change": "Nao salvo desde a ultima alteracao (use %{cmd} para forcar)",
|
|
996
|
+
"error.other_buffers_modified": "Outros buffers têm alterações não salvas (use %{cmd} para salvar tudo e sair)",
|
|
997
|
+
"error.no_file_name": "Sem nome de arquivo (use :w nome_arquivo)",
|
|
980
998
|
"error.not_valid_command": "Comando invalido: %{cmd}",
|
|
981
999
|
"error.unknown_command": "Comando desconhecido: %{cmd}",
|
|
982
1000
|
"error.command_no_bang": "Comando nao aceita !: %{cmd}",
|
|
983
|
-
"error.save_as_not_implemented": "Salvar como
|
|
1001
|
+
"error.save_as_not_implemented": "Salvar como não implementado. Use Ctrl+Shift+S ou o menu Arquivo.",
|
|
984
1002
|
"error.shell_not_supported": "Comandos shell nao suportados (use terminal)",
|
|
985
1003
|
"error.buffer_not_found": "Buffer %{id} nao encontrado",
|
|
986
1004
|
"error.multiple_buffers_match": "Multiplos buffers correspondem a \"%{pattern}\". Seja mais especifico.",
|
|
@@ -1096,10 +1114,12 @@
|
|
|
1096
1114
|
"status.line_beyond_end": "Строка %{line} за концом файла, перемещено в конец",
|
|
1097
1115
|
|
|
1098
1116
|
"error.no_write_since_change": "Не сохранено с последнего изменения (используйте %{cmd} для принудительного выполнения)",
|
|
1117
|
+
"error.other_buffers_modified": "Другие буферы имеют несохранённые изменения (используйте %{cmd} чтобы сохранить всё и выйти)",
|
|
1118
|
+
"error.no_file_name": "Нет имени файла (используйте :w имя_файла)",
|
|
1099
1119
|
"error.not_valid_command": "Недопустимая команда: %{cmd}",
|
|
1100
1120
|
"error.unknown_command": "Неизвестная команда: %{cmd}",
|
|
1101
1121
|
"error.command_no_bang": "Команда не принимает !: %{cmd}",
|
|
1102
|
-
"error.save_as_not_implemented": "Сохранить как не реализовано. Используйте
|
|
1122
|
+
"error.save_as_not_implemented": "Сохранить как не реализовано. Используйте Ctrl+Shift+S или меню Файл.",
|
|
1103
1123
|
"error.shell_not_supported": "Shell команды не поддерживаются (используйте терминал)",
|
|
1104
1124
|
"error.buffer_not_found": "Буфер %{id} не найден",
|
|
1105
1125
|
"error.multiple_buffers_match": "Несколько буферов соответствуют \"%{pattern}\". Будьте точнее.",
|
|
@@ -1215,10 +1235,12 @@
|
|
|
1215
1235
|
"status.line_beyond_end": "บรรทัด %{line} เกินจุดสิ้นสุดไฟล์ ย้ายไปยังจุดสิ้นสุด",
|
|
1216
1236
|
|
|
1217
1237
|
"error.no_write_since_change": "ไม่ได้บันทึกตั้งแต่การเปลี่ยนแปลงล่าสุด (ใช้ %{cmd} เพื่อบังคับ)",
|
|
1238
|
+
"error.other_buffers_modified": "บัฟเฟอร์อื่นมีการเปลี่ยนแปลงที่ไม่ได้บันทึก (ใช้ %{cmd} เพื่อบันทึกทั้งหมดและออก)",
|
|
1239
|
+
"error.no_file_name": "ไม่มีชื่อไฟล์ (ใช้ :w ชื่อไฟล์)",
|
|
1218
1240
|
"error.not_valid_command": "คำสั่งไม่ถูกต้อง: %{cmd}",
|
|
1219
1241
|
"error.unknown_command": "คำสั่งไม่รู้จัก: %{cmd}",
|
|
1220
1242
|
"error.command_no_bang": "คำสั่งไม่รับ !: %{cmd}",
|
|
1221
|
-
"error.save_as_not_implemented": "
|
|
1243
|
+
"error.save_as_not_implemented": "บันทึกเป็นยังไม่รองรับ ใช้ Ctrl+Shift+S หรือเมนูไฟล์",
|
|
1222
1244
|
"error.shell_not_supported": "ไม่รองรับคำสั่ง Shell (ใช้เทอร์มินัล)",
|
|
1223
1245
|
"error.buffer_not_found": "ไม่พบบัฟเฟอร์ %{id}",
|
|
1224
1246
|
"error.multiple_buffers_match": "มีหลายบัฟเฟอร์ที่ตรงกับ \"%{pattern}\" โปรดระบุให้ชัดเจนขึ้น",
|
|
@@ -1334,10 +1356,12 @@
|
|
|
1334
1356
|
"status.line_beyond_end": "Рядок %{line} за кінцем файлу, переміщено в кінець",
|
|
1335
1357
|
|
|
1336
1358
|
"error.no_write_since_change": "Не збережено з останньої зміни (використовуйте %{cmd} для примусового виконання)",
|
|
1359
|
+
"error.other_buffers_modified": "Інші буфери мають незбережені зміни (використайте %{cmd} щоб зберегти все і вийти)",
|
|
1360
|
+
"error.no_file_name": "Немає назви файлу (використайте :w назва_файлу)",
|
|
1337
1361
|
"error.not_valid_command": "Недійсна команда: %{cmd}",
|
|
1338
1362
|
"error.unknown_command": "Невідома команда: %{cmd}",
|
|
1339
1363
|
"error.command_no_bang": "Команда не приймає !: %{cmd}",
|
|
1340
|
-
"error.save_as_not_implemented": "Зберегти як не реалізовано.
|
|
1364
|
+
"error.save_as_not_implemented": "Зберегти як не реалізовано. Використайте Ctrl+Shift+S або меню Файл.",
|
|
1341
1365
|
"error.shell_not_supported": "Shell команди не підтримуються (використовуйте термінал)",
|
|
1342
1366
|
"error.buffer_not_found": "Буфер %{id} не знайдено",
|
|
1343
1367
|
"error.multiple_buffers_match": "Декілька буферів відповідають \"%{pattern}\". Будьте точнішими.",
|
|
@@ -1453,10 +1477,12 @@
|
|
|
1453
1477
|
"status.line_beyond_end": "第%{line}行超出文件末尾,已移动到末尾",
|
|
1454
1478
|
|
|
1455
1479
|
"error.no_write_since_change": "上次更改后未保存(使用%{cmd}强制执行)",
|
|
1480
|
+
"error.other_buffers_modified": "其他缓冲区有未保存的更改(使用 %{cmd} 保存全部并退出)",
|
|
1481
|
+
"error.no_file_name": "没有文件名(使用 :w 文件名)",
|
|
1456
1482
|
"error.not_valid_command": "无效命令: %{cmd}",
|
|
1457
1483
|
"error.unknown_command": "未知命令: %{cmd}",
|
|
1458
1484
|
"error.command_no_bang": "命令不接受!: %{cmd}",
|
|
1459
|
-
"error.save_as_not_implemented": "
|
|
1485
|
+
"error.save_as_not_implemented": "另存为未实现。请使用 Ctrl+Shift+S 或文件菜单。",
|
|
1460
1486
|
"error.shell_not_supported": "不支持Shell命令(请使用终端)",
|
|
1461
1487
|
"error.buffer_not_found": "未找到缓冲区%{id}",
|
|
1462
1488
|
"error.multiple_buffers_match": "多个缓冲区匹配\"%{pattern}\"。请更具体。",
|
package/plugins/vi_mode.ts
CHANGED
|
@@ -1561,11 +1561,18 @@ editor.defineMode("vi-normal", null, [
|
|
|
1561
1561
|
|
|
1562
1562
|
// Command mode
|
|
1563
1563
|
[":", "vi_command_mode"],
|
|
1564
|
+
|
|
1565
|
+
// Pass through to standard editor shortcuts
|
|
1566
|
+
["C-p", "command_palette"],
|
|
1567
|
+
["C-q", "quit"],
|
|
1564
1568
|
], true); // read_only = true to prevent character insertion
|
|
1565
1569
|
|
|
1566
1570
|
// Define vi-insert mode - only Escape is special, other keys insert text
|
|
1567
1571
|
editor.defineMode("vi-insert", null, [
|
|
1568
1572
|
["Escape", "vi_escape"],
|
|
1573
|
+
// Pass through to standard editor shortcuts
|
|
1574
|
+
["C-p", "command_palette"],
|
|
1575
|
+
["C-q", "quit"],
|
|
1569
1576
|
], false); // read_only = false to allow normal typing
|
|
1570
1577
|
|
|
1571
1578
|
// Define vi-find-char mode - binds all printable chars to the handler
|
|
@@ -1769,6 +1776,10 @@ editor.defineMode("vi-visual", null, [
|
|
|
1769
1776
|
// Exit
|
|
1770
1777
|
["Escape", "vi_vis_escape"],
|
|
1771
1778
|
["v", "vi_vis_escape"], // v again exits visual mode
|
|
1779
|
+
|
|
1780
|
+
// Pass through to standard editor shortcuts
|
|
1781
|
+
["C-p", "command_palette"],
|
|
1782
|
+
["C-q", "quit"],
|
|
1772
1783
|
], true);
|
|
1773
1784
|
|
|
1774
1785
|
// Define vi-visual-line mode (line-wise)
|
|
@@ -1803,6 +1814,10 @@ editor.defineMode("vi-visual-line", null, [
|
|
|
1803
1814
|
// Exit
|
|
1804
1815
|
["Escape", "vi_vis_escape"],
|
|
1805
1816
|
["V", "vi_vis_escape"], // V again exits visual-line mode
|
|
1817
|
+
|
|
1818
|
+
// Pass through to standard editor shortcuts
|
|
1819
|
+
["C-p", "command_palette"],
|
|
1820
|
+
["C-q", "quit"],
|
|
1806
1821
|
], true);
|
|
1807
1822
|
|
|
1808
1823
|
// Define vi-visual-block mode (column/block selection)
|
|
@@ -1841,6 +1856,10 @@ editor.defineMode("vi-visual-block", null, [
|
|
|
1841
1856
|
// Exit
|
|
1842
1857
|
["Escape", "vi_vblock_escape"],
|
|
1843
1858
|
["C-v", "vi_vblock_escape"], // Ctrl-v again exits visual-block mode
|
|
1859
|
+
|
|
1860
|
+
// Pass through to standard editor shortcuts
|
|
1861
|
+
["C-p", "command_palette"],
|
|
1862
|
+
["C-q", "quit"],
|
|
1844
1863
|
], true);
|
|
1845
1864
|
|
|
1846
1865
|
// ============================================================================
|
|
@@ -2177,31 +2196,62 @@ async function executeCommand(
|
|
|
2177
2196
|
switch (command) {
|
|
2178
2197
|
case "write": {
|
|
2179
2198
|
// :w - save current file
|
|
2180
|
-
// :w filename - save
|
|
2199
|
+
// :w filename - save to specified filename
|
|
2181
2200
|
if (args) {
|
|
2182
|
-
|
|
2201
|
+
const bufferId = editor.getActiveBufferId();
|
|
2202
|
+
// Resolve path (could be relative or absolute)
|
|
2203
|
+
const path = args.startsWith("/") ? args : `${editor.getCwd()}/${args}`;
|
|
2204
|
+
editor.saveBufferToPath(bufferId, path);
|
|
2205
|
+
return { message: editor.t("status.file_saved") };
|
|
2183
2206
|
}
|
|
2184
2207
|
editor.executeAction("save");
|
|
2185
2208
|
return { message: editor.t("status.file_saved") };
|
|
2186
2209
|
}
|
|
2187
2210
|
|
|
2188
2211
|
case "quit": {
|
|
2189
|
-
// :q - quit (
|
|
2190
|
-
// :q! - force quit (discard changes)
|
|
2191
|
-
|
|
2192
|
-
|
|
2212
|
+
// :q - quit editor (like vim)
|
|
2213
|
+
// :q! - force quit (discard unsaved changes)
|
|
2214
|
+
if (force) {
|
|
2215
|
+
editor.executeAction("force_quit");
|
|
2216
|
+
return {};
|
|
2217
|
+
}
|
|
2218
|
+
// Check ALL buffers for unsaved changes
|
|
2219
|
+
const buffers = editor.listBuffers() as Array<{ id: number; modified: boolean }>;
|
|
2220
|
+
const hasModified = buffers.some((b) => b.modified);
|
|
2221
|
+
if (hasModified) {
|
|
2193
2222
|
return { error: editor.t("error.no_write_since_change", { cmd: ":q!" }) };
|
|
2194
2223
|
}
|
|
2195
|
-
editor.executeAction("
|
|
2224
|
+
editor.executeAction("force_quit");
|
|
2196
2225
|
return {};
|
|
2197
2226
|
}
|
|
2198
2227
|
|
|
2199
2228
|
case "wq":
|
|
2200
2229
|
case "xit":
|
|
2201
2230
|
case "exit": {
|
|
2202
|
-
// :wq or :x - save and quit
|
|
2203
|
-
|
|
2204
|
-
editor.
|
|
2231
|
+
// :wq or :x - save current buffer and quit
|
|
2232
|
+
// :wq filename - save to filename and quit
|
|
2233
|
+
const wqBufferId = editor.getActiveBufferId();
|
|
2234
|
+
|
|
2235
|
+
if (args) {
|
|
2236
|
+
// Save to specified filename
|
|
2237
|
+
const path = args.startsWith("/") ? args : `${editor.getCwd()}/${args}`;
|
|
2238
|
+
editor.saveBufferToPath(wqBufferId, path);
|
|
2239
|
+
} else {
|
|
2240
|
+
// Save to existing path
|
|
2241
|
+
const wqPath = editor.getBufferPath(wqBufferId);
|
|
2242
|
+
if (!wqPath) {
|
|
2243
|
+
return { error: editor.t("error.no_file_name") };
|
|
2244
|
+
}
|
|
2245
|
+
editor.executeAction("save");
|
|
2246
|
+
}
|
|
2247
|
+
|
|
2248
|
+
// Check if any OTHER buffers have unsaved changes
|
|
2249
|
+
const allBuffers = editor.listBuffers() as Array<{ id: number; modified: boolean }>;
|
|
2250
|
+
const otherModified = allBuffers.some((b: { id: number; modified: boolean }) => b.id !== wqBufferId && b.modified);
|
|
2251
|
+
if (otherModified) {
|
|
2252
|
+
return { error: editor.t("error.other_buffers_modified", { cmd: ":wqa" }) };
|
|
2253
|
+
}
|
|
2254
|
+
editor.executeAction("force_quit");
|
|
2205
2255
|
return {};
|
|
2206
2256
|
}
|
|
2207
2257
|
|
|
@@ -2215,16 +2265,15 @@ async function executeCommand(
|
|
|
2215
2265
|
// :qa - quit all
|
|
2216
2266
|
// :qa! - force quit all
|
|
2217
2267
|
if (force) {
|
|
2218
|
-
editor.executeAction("
|
|
2268
|
+
editor.executeAction("force_quit");
|
|
2219
2269
|
} else {
|
|
2220
2270
|
// Check if any buffer is modified
|
|
2221
|
-
const
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
}
|
|
2271
|
+
const allBufs = editor.listBuffers() as Array<{ id: number; modified: boolean }>;
|
|
2272
|
+
const anyModified = allBufs.some((b) => b.modified);
|
|
2273
|
+
if (anyModified) {
|
|
2274
|
+
return { error: editor.t("error.no_write_since_change", { cmd: ":qa!" }) };
|
|
2226
2275
|
}
|
|
2227
|
-
editor.executeAction("
|
|
2276
|
+
editor.executeAction("force_quit");
|
|
2228
2277
|
}
|
|
2229
2278
|
return {};
|
|
2230
2279
|
}
|
|
@@ -2232,7 +2281,7 @@ async function executeCommand(
|
|
|
2232
2281
|
case "wqall": {
|
|
2233
2282
|
// :wqa or :xa - save all and quit
|
|
2234
2283
|
editor.executeAction("save_all");
|
|
2235
|
-
editor.executeAction("
|
|
2284
|
+
editor.executeAction("force_quit");
|
|
2236
2285
|
return {};
|
|
2237
2286
|
}
|
|
2238
2287
|
|
|
@@ -2307,7 +2356,7 @@ async function executeCommand(
|
|
|
2307
2356
|
if (!force && editor.isBufferModified(bufferId)) {
|
|
2308
2357
|
return { error: editor.t("error.no_write_since_change", { cmd: ":bd!" }) };
|
|
2309
2358
|
}
|
|
2310
|
-
editor.executeAction("
|
|
2359
|
+
editor.executeAction("close");
|
|
2311
2360
|
return {};
|
|
2312
2361
|
}
|
|
2313
2362
|
|
|
@@ -2421,7 +2470,7 @@ async function executeCommand(
|
|
|
2421
2470
|
if (!force && editor.isBufferModified(bufferId)) {
|
|
2422
2471
|
return { error: editor.t("error.no_write_since_change", { cmd: ":close!" }) };
|
|
2423
2472
|
}
|
|
2424
|
-
editor.executeAction("
|
|
2473
|
+
editor.executeAction("close");
|
|
2425
2474
|
return {};
|
|
2426
2475
|
}
|
|
2427
2476
|
|
|
@@ -2442,7 +2491,7 @@ async function executeCommand(
|
|
|
2442
2491
|
if (!force && editor.isBufferModified(bufferId)) {
|
|
2443
2492
|
return { error: editor.t("error.no_write_since_change", { cmd: ":tabclose!" }) };
|
|
2444
2493
|
}
|
|
2445
|
-
editor.executeAction("
|
|
2494
|
+
editor.executeAction("close");
|
|
2446
2495
|
return {};
|
|
2447
2496
|
}
|
|
2448
2497
|
|
|
@@ -2747,11 +2796,10 @@ editor.registerCommand(
|
|
|
2747
2796
|
"%cmd.toggle_vi_mode",
|
|
2748
2797
|
"%cmd.toggle_vi_mode_desc",
|
|
2749
2798
|
"vi_mode_toggle",
|
|
2750
|
-
|
|
2799
|
+
null, // Always visible - needed to enable vi mode in the first place
|
|
2751
2800
|
);
|
|
2752
2801
|
|
|
2753
2802
|
// ============================================================================
|
|
2754
2803
|
// Initialization
|
|
2755
2804
|
// ============================================================================
|
|
2756
2805
|
|
|
2757
|
-
editor.setStatus(editor.t("status.loaded"));
|