Skip to content

Instantly share code, notes, and snippets.

@whusnoopy
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whusnoopy/8917005 to your computer and use it in GitHub Desktop.
Save whusnoopy/8917005 to your computer and use it in GitHub Desktop.
在 Windows 下开发 Linux 环境工程

Git

安装

安装 git for windows, 得到 git bash

修改编辑器为系统的 vim

将 Git 安装路径下 bin 目录里的 vim 改名备份, 在系统 Path 里将 vim.exe 所在路径加入

或者在 git bash 下修改配置

$ git config --global core.editor gvim

修改 diff 工具为 gvimdiff

$ git config --global diff.tool gvimdiff
$ git config --global difftool.prompt false
$ git config --global alias.d difftool

安装 VirtualBox

直接去 https://www.virtualbox.org/wiki/Downloads 下载安装, 便于得到生产环境

安装 Vagrant

用于统一环境, 参考 http://blog.segmentfault.com/fenbox/1190000000264347 安装部属

所需文件可直接从百度网盘下载 (可能不是最新): http://yun.baidu.com/s/1dDoqYqt

私有 box 下载地址 (密码问笨狗): http://pan.baidu.com/s/1i3KCYt3

配置本地域名

Chrome 使用 HostAdmin 插件, 设定 Vagrant 的 Host-Only 对应的 IP 绑定域名, 绕开回调域名限制

HostAdmin 需要将系统 hosts 文件改为所有人可读写, 如果不是非常频繁的改, 不用这个插件, 直接硬改 hosts 也可以

Sublime Text 2

自动删除行尾空格

在配置里加入

"trim_trailing_white_space_on_save": true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment