Git for windows 和 cygwin

  • git for windows
根目录和安装目录
C:\Program Files\Git
  • cygwin
根目录和安装目录
C:\cygwin64
  • 建议环境变量设置.
    在这里插入图片描述
  • cygwin使用gitFW的命令
    在这里插入图片描述

cygwin下装 vim插件

cygwin 配置

  • 在当前目录打开cygwin(存在无法在中文路径下打开目录的问题)
计算机\HKEY_CLASSES_ROOT\Directory\Background\shell\Cygwin\command
C:\cygwin64\bin\mintty.exe -e /bin/bash --login -i -c "cd '%V';exec bash

在这里插入图片描述
在这里插入图片描述

  • 在当前目录打开cygwin(不存在无法在中文路径和空格下打开目录的问题)
// cygwin.reg
Windows Registry Editor Version 5.00
 [HKEY_CLASSES_ROOT\Directory\Background\shell\cygwin64_bash1]
 @="open Cygwin"
 "Icon"="D:\\ProgramFiles\\ProgramFilesForSW\\cygwin\\Cygwin.ico"
 [HKEY_CLASSES_ROOT\Directory\Background\shell\cygwin64_bash1\command]
 @="D:\\ProgramFiles\\ProgramFilesForSW\\cygwin\\run_by_right_click.bat \\\"%V\\\""

在这里插入图片描述
在这里插入图片描述

D:\ProgramFiles\ProgramFilesForSW\cygwin$ cat run_by_right_click.bat
@echo off

 D:
 chdir D:\ProgramFiles\ProgramFilesForSW\cygwin
 echo "%1" > chere.path
 D:\ProgramFiles\ProgramFilesForSW\cygwin\bin\mintty.exe -e /bin/bash --login -i

// ~/.bashrc
if [ -e /chere.path ];then
     /usr/bin/enca -L zh_CN -x utf-8 /chere.path
     sed -i 's/...//'  /chere.path
     sed -i 's/....$//' /chere.path

     CPWD=`cat /chere.path` #echo CPWD :$CPWD
     EXE_PATH=$(cygpath -w -s "$CPWD") #echo EXE_PATH $EXE_PATH
     rm /chere.path

     cd $EXE_PATH
 fi

  • cygwin 中打开当前目录
ln -s /cygdrive/c/Windows/explorer.exe /bin/open.exe
ln -s /cygdrive/c/Windows/explorer.exe /bin/start.exe

  • cygwin 配置vim
find .vim -type f | xargs dos2unix
cygwin 乱码
cygwin bash 颜色
alias ls='ls -hF --color=tty'
alias ll='ls -hF --color=tty -l'
google浏览器设置
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --save-page-as-mhtml
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值