From c08b0f543e6801a81636a0c846c4f0d08c5296c1 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Sat, 31 Oct 2026 03:06:29 +0800 Subject: [PATCH] feat(vim): read other files through source in the rc file `source ~/.vimrc` was reported as unsupported, so mappings kept in a shared vimrc had no effect. `source` now reads that file in place by the same rules as the rc file, sharing the leader. Lines it cannot use are listed with the file they came from, and nothing in a sourced file is executed. Unreadable files and files that source themselves are reported. --- src/features/vim/VimSettingsPage.tsx | 5 ++- src/features/vim/__tests__/rc.test.ts | 46 ++++++++++++++++++++++- src/features/vim/rc.ts | 54 ++++++++++++++++++++++++--- src/features/vim/rcFile.ts | 29 +++++++++++++- src/platform/locales/text/zh.json | 2 +- 5 files changed, 124 insertions(+), 12 deletions(-) diff --git a/src/features/vim/VimSettingsPage.tsx b/src/features/vim/VimSettingsPage.tsx index 5639ef7d3..3bb8af3af 100644 --- a/src/features/vim/VimSettingsPage.tsx +++ b/src/features/vim/VimSettingsPage.tsx @@ -61,15 +61,16 @@ export function VimSettingsPage() {

- Supported: set options, map / nmap / imap / vmap / noremap variants, let mapleader, and :action / + Supported: set options, map / nmap / imap / vmap / noremap variants, let mapleader, source, and :action / <Action>() mappings that run IDE actions. :w saves, :q closes the editor tab.

{rc.ignored.length > 0 && (