Skip to content

set vim editor alias only if vim not present - #212

Open
besa2042 wants to merge 2 commits into
ChrisTitusTech:mainfrom
besa2042:main
Open

set vim editor alias only if vim not present#212
besa2042 wants to merge 2 commits into
ChrisTitusTech:mainfrom
besa2042:main

Conversation

@besa2042

@besa2042 besa2042 commented Aug 5, 2026

Copy link
Copy Markdown

Summary

I have had vim installed but could not open it in powershell since the created alias pointed to itself.

Type Of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor

Testing

Manually tested on my machine.

Checklist

  • I tested my changes locally.
  • I updated docs if needed.
  • My changes are focused and do not include unrelated edits.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bf1d5d55-4f92-4b60-b684-46b4a7a3dbca

📥 Commits

Reviewing files that changed from the base of the PR and between 3fa0158 and fb07ec1.

📒 Files selected for processing (1)
  • Microsoft.PowerShell_profile.ps1
🚧 Files skipped from review as they are similar to previous changes (1)
  • Microsoft.PowerShell_profile.ps1

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Prevented the vim alias from being overwritten when it already points to the correct editor.
    • Improved editor selection logic: the vim alias is only created when no native vim command is available.

Walkthrough

The PowerShell profile removes existing vim aliases before resolving $EDITOR. It creates a vim alias only when no vim application command exists.

Changes

Editor alias handling

Layer / File(s) Summary
Conditional vim alias creation
Microsoft.PowerShell_profile.ps1
The profile removes existing vim aliases and preserves the native vim command when available.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the change to set the vim alias only when vim is not installed.
Description check ✅ Passed The description explains the vim alias bug, identifies the fix, and reports manual testing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Microsoft.PowerShell_profile.ps1`:
- Around line 293-295: Update the vim binding logic to check the installed
executable via Get-Command -Name vim -CommandType Application rather than
comparing $EDITOR. Preserve an existing installed vim application binding, and
remove any stale vim alias that points to vim before relying on direct vim.exe
resolution during profile reloads.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3296fe2b-2109-4714-9c75-8b8577bffcca

📥 Commits

Reviewing files that changed from the base of the PR and between 41ea0f8 and 3fa0158.

📒 Files selected for processing (1)
  • Microsoft.PowerShell_profile.ps1

Comment thread Microsoft.PowerShell_profile.ps1 Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant