Open Atom editor from git shell

。_饼干妹妹 提交于 2019-12-10 00:45:57

问题


i am using a win 8-X64 machine, with a 1.8 GHZ processor core i5, i have both the atom editor and git bash installed on this machine, is there any process by which i can start atom text editor from the Git bash shell or vice versa.


回答1:


If you want to associate atom with all git operations, run: git config --global core.editor "atom --wait"

If you just want to edit files, add an alias in git: git config --global alias.edit "! atom" and now you can edit any file by calling: git edit [filename]




回答2:


Add atom.exe file location in Your Environmental variables.

Follow These steps:

step 1. Right click on Your atom icon where you usually open atom editor and click Properties

step 2. Copy Start in directory

it looks like this

start in:  C:\Users\hemant\AppData\Local\atom\app-1.7.0

step 5. Go to Control panel and follow this directory Control Panel\System and Security\System

step 6. ON left side You will see Advanced System Settings click on it

step 7. then go to Environment Variables Tab

step 8. Inside System Variables search Path click on it, then click Edit

step 9. Add ; at the end of all directory and Paste atom directory and click

OK

step 10. Then open atom in your git bash or any console by Typing $ start atom

OR

simply Type PATH=%PATH%; C:/your atom directory in your console and Hit Enter



来源:https://stackoverflow.com/questions/37274344/open-atom-editor-from-git-shell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!