cygwin环境变量配置

                                  cygwin_env

Table of Contents

  • 1. cygwin的环境配置
  • 2. 在emacs结合cygwin的路径问题

1 cygwin的环境配置

~/.inputrc

set completion-ignore-case on
set meta-flag on
set output-meta on
set convert-meta off

~/.bashprofile

# Exec .bashrc
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

~/.bashrc

export LANG="zh_CN.GBK"
export LC_ALL=zh_CN.GBK
export PATHONPATH=~/.local
export PATH=/usr/bin:$PATH
export WORKON_HOME=~/Env
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python
export OUTPUT_CHARSET="GBK"
source /usr/bin/virtualenvwrapper.sh


alias ls='ls --show-control-chars --color'
alias dir='dir -N --color'

export PATH=$PATH:~/sh

~/.Xdefault

Rxvt*geometry: 100x40
! Rxvt*background: #ffffff
! Rxvt*foreground: #000000
!Rxvt*borderColor: Blue
!Rxvt*scrollColor: Blue
!Rxvt*troughColor: Gray
Rxvt*scrollBar: True
Rxvt*scrollBar_right: True
Rxvt*font: -*-courier-medium-r-*-*-14-140-*-75-*-*-*-*
Rxvt*boldFont: -*-courier-bold-r-*-*-14-140-*-75-*-*-*-*

! 下面这句实现中文支持
Rxvt.multichar_encoding:gbk
Rxvt*SaveLines: 2000
Rxvt*loginShell: True
! VIM-like colors
! Rxvt*color0:    #000000
! Rxvt*color1:    #FFFFFF
! Rxvt*color2:    #00A800
! Rxvt*color3:    #FFFF00
! Rxvt*color4:    #0000A8
! Rxvt*color5:    #A800A8
! Rxvt*color6:    #00A8A8
! Rxvt*color7:    #D8D8D8
! Rxvt*color8:    #000000
! Rxvt*color9:    #FFFFFF
! Rxvt*color10:   #00A800
! Rxvt*color11:   #FFFF00
! Rxvt*color12:   #0000A8
! Rxvt*color13:   #A800A8
! Rxvt*color14:   #00A8A8
! Rxvt*color15:   #D8D8D8
! eof






emacs.font:  8x16
emacs.paneFont:  8x16
Emacs.pane.menubar.font: 8x16
Emacs.foreground: white
Emacs.background: black
emacs.geometry:  100x32

cygwin.bat

@echo off
    D:
    chdir D:\software\bin
    set EDITOR=emacs
    set VISUAL=emacs
    set CYGWIN=codepage:oem tty binmode title
    rxvt -fn "Lucida Console-14" -e /usr/bin/bash --login -i

2 在emacs结合cygwin的路径问题

  1. global tags查询出来的路径问题,默认是win方式的全局路径,需要修改变量
    (setq gtags-path-style (quote relative))
    
  2. 使用pclint时,pclint给出的路径是win方式的全局路径,需要修改函数compilation-find-file
    (defun cygwin-path (filename)
      ;; (message "win-path: %s" filename)
      (if (and (stringp filename) (string-match "[a-zA-Z]\:" (substring filename 0 2)))
          (let ((drv (substring filename 0 1))
                (subpath (replace-regexp-in-string "\\\\" "/" (substring filename 2))))
            ;;(message "sub: %s path: %s" drv subpath)
            (format "/cygwin/%s/%s" drv subpath))
        filename))
    
    (defadvice compilation-find-file (before convert-cygpath activate)
      ;; (message "compilation run %S" (ad-get-arg 1))
      (ad-set-arg 1 (cygwin-path (ad-get-arg 1))))
    

Author: ROBIN

Created: 2014-02-21 星期五 14:14

Emacs 24.3.1 (Org mode N/A)

Validate

你可能感兴趣的:(开发工具,win工具)