claude-code
claude-code copied to clipboard
fix: Add nano and vim editors to devcontainer with default editor config
Description
This PR enhances the devcontainer editor support to fix the /memory command functionality and improve the overall developer experience.
Related Issue
Fixes #2098
Changes
- Added
nanoeditor to fix the/memorycommand - Added
vimeditor to provide an alternative for users who prefer it - Set
EDITORandVISUALenvironment variables tonanoas the default editor- This ensures consistent editor behavior across various CLI tools
- Users can still override these in their shell configuration
Why these changes?
- nano: Required for the
/memorycommand to work (fixes the reported issue) - vim: Many developers prefer vim, so including both editors provides flexibility
- EDITOR/VISUAL: These standard environment variables ensure that:
- Git commits open the correct editor
- Other CLI tools that need an editor work out of the box
- The behavior is predictable and consistent
Testing
- Built the devcontainer with the updated Dockerfile
- Verified that the
/memorycommand now works correctly - Confirmed both nano and vim are available
- Tested that
git commitand other tools use the configured editor
Impact
This is a non-breaking change that adds two lightweight packages and sets sensible defaults while maintaining flexibility for user preferences.