fix: manage ~/.vimrc as a bounded block in user-owned config - #178
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
user-vimrcfrom a managed symlink at${XDG_CONFIG_HOME:-$HOME/.config}/vim/vimrcto a bounded block inside$HOME/.vimrc.Context & Motivation
$XDG_CONFIG_HOME/vim/vimrcwas introduced in patch9.1.0327.9.1.0016, which does not search the XDG path. As a result, minimal profile installations on Ubuntu 24.04 (and macOS environments with standard system Vim) did not read the managedvimrc.~/.vimrcas a user-owned configuration file containing a bounded Selfishell block aligns with Selfishell's design contract for.zshrc,.zprofile, andconfig.ghostty: preserving existing user configuration and allowing custom keymaps/plugins outside the block.Changes
user-vimrcfromlinkat~/.config/vim/vimrctoblockat$HOME/.vimrcinlib/resources.sh.user-vimrcblock with"comments inlib/managed.shand extended block marker generation/inspection to support custom comment characters.user-vimrcpreflights tolib/commands/install.shandlib/commands/update.sh.AGENTS.mduser-owned configuration section.tests/managed_install_test.bashandscripts/macos-configuration-e2e.shto verify~/.vimrcblock lifecycle, idempotency, update, restoration, and symlink rejection.scripts/ubuntu-container-e2e.shto verify that default Vim startup on Ubuntu 24.04 resolves~/.vimrcand appliesnumber/relativenumber.Verification
bash scripts/check.sh(all 21 test suites, ShellCheck, shfmt, syntax checks) passed.bash scripts/macos-configuration-e2e.shpassed.scripts/ubuntu-container-e2e.shwith Vim startup regression check) passed in CI.