Modify the default editor by using Git to manage source code

Source: Internet
Author: User
Tags using git

When committed, Bash opens a default VI editor to fill in the submission information to the submitter. In the window platform some users prefer to use other editors, such as the system's own editor. I am here to provide a Sublime2 editor configuration method, similar to other methods.

1. Install the Sublime2 Editor on your PC

2. Configure the path of the sublime2 under path in the environment variable, such as my path to D:\Program Files (x86) \sublime Text 2;

3. Open the Bash interface and enter git config core.editor sublime_text.exe ( note : I'm not adding--global if I want to be in all of the current projects

Use git config--global core.editor sublime_text.exe)

4. Run the git config--list command and you'll find one more of these.

5. When the configuration is complete, Exit and restart Bash

6. You will automatically open sublime when Git commits, and remember to close it when you save it.

--------------------------------------------------------------------------------

To open a text directly, run the Sublime_text.exe filename command on the line, such as: Sublime_text.exe a.txt

Modify the default editor by using Git to manage source code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.