Posix, unix, paths, vim and other nightmares for a windows user

£可爱£侵袭症+ 提交于 2019-12-10 12:26:25

问题


It might seem to be a really open end question, but I'll do my best to translate this great confusion I have in my head to see if someone can resolve it and more people can learn from it:

I started last year a university course midway between electronics and computer science, but more of the first, and was thrown blindly into programming, through a series of complabs using Eclipse under Unix. Until there, though I had no knowledge of unix, fine.

Now I wanting to code at home as well decided to try and install Eclipse following a given tutorial which required installing MinGW and adding it to the path. Metaphorically I did this blindfolded, I had no clue what was going on.

Now after several programming courses and having found a preference for Visual Studio, I am trying to move back to the command line for I need to use scripts and command line tools including vim. However I have found that as a Windows user I am quite lost in the open operating system world and spending a lot of time to have very poor knowledge on it. So the big question, can anyone please give a guide of where to find or explain the realtionship between all this problems that are making my head explode:

What can I do in windows Command Prompt, what in Msys, what in Bash and what in common?


Why can I run sh and a script in command prompt as well as things like cat, sed? I suppose because of MinGW and having it in my path but dont know why, and are this commands different to the same executed in unix?


When and why do you use ./ or ~/ ?


Should I better partition my computer and run unix tasks in unix?


Can I find somewhere a reference to the syntax of the different terminals?


I have tried and like vim in unix, but can't create ~/.vimrc in my windows from command prompt, can I actually modify the vim I run in my command prompt?


I know it is a vague question but I tried to explain all my doubts as I could, please comment on ways I could better explain my doubts and improve the question


回答1:


If you want to learn linux command line usage, I suggest you to download virtualbox, and some linux distro (like ubuntu). Install that and head towards tldp: http://www.tldp.org/LDP/Bash-Beginners-Guide/html/sect_01_01.html. It's free, and using virtualbox lets you avoid partitioning/multiboot hassles for now.

What I really suggest most importantly is that if you want to learn linux commandline, try to keep it as clean and clearly separate from msys and cmd.exe ("Command prompt") as possible, to lessen your own mental load.

If you want to compare what you can do in cmd.exe and bash, try this: http://batsh.org/



来源:https://stackoverflow.com/questions/35019450/posix-unix-paths-vim-and-other-nightmares-for-a-windows-user

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