Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialStephanie Green
3,525 PointsI'm trying to add the readme file using a mac when starting the commit, it didn't open in nano. i can't get out using ^x
^x doesn't get me out of the commit part. i get "-- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)" instead.
3 Answers
Eben Smith
5,170 PointsThe default text editor is vim. You can change the default to nano, but for now you can get out of the vim editor by doing the following:
:q to quit :q! to quit without saving
you can do other stuff like:
:x to write and then quit :qa to quit everything :wq Write then make with the quitting.
Nano is quite a bit easier, but you actually have to set it up as the default or specify that you want to open text files with it.
To make it the default, you need to find a file called .bash_profile and add the line 'export EDITOR=nano' and save it. That will make it your default.
Hope this helps!
Eben Smith
Tristan Gaebler
6,204 PointsThis should fix it export EDITOR=/usr/bin/nano
Elijah Collins
19,457 PointsYou probably aren't using nano, us this code
git config --global core.editor "nano"