facebook twitter hatena line email

「Windows/cygwin」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(locateを使う方法)
(apt-cyg)
行48: 行48:
 
  apt-cyg install nano
 
  apt-cyg install nano
  
==vimに色を付ける
+
==vimに色を付ける==
 
  apt-cyg install vim
 
  apt-cyg install vim
  

2017年12月6日 (水) 18:04時点における版

cygwinとは

windowsで使えるUNIX系OSコンソール

ダウンロード

http://cygwin.com/

インストール

  1. setup.exeをクリック
  2. ダウンロード先を指定

cドライブへ移動

cd /cygdrive/c/

vimを使う

  1. setup.exeを実行
  2. select packageにてEditors/vimを選択

vimで日本語を扱う

  1. vim ~/.vimrc として以下入力(なかったら作る
set encoding=japan
set fileencodings=utf-8,iso-2022-jp,sjis,euc-jp

shを日本語化

  1. vi ~/.bashrc (なかったら作る
export LANG="ja_JP.utf-8"
  1. source ~/.bashrc

cでcドライブへ移動

  1. vi ~/.bashrc
alias c="cd /cygdrive/c"
  1. source ~/.bashrc

その他入れといたほうが良いコマンド(自分メモ

  1. openssh
  2. git
  3. mosh

locateを使う方法

updatedb --localpaths='/c/'
locate test

apt-cyg

cygwinのパッケージ管理

git clone https://github.com/transcode-open/apt-cyg.git
install apt-cyg /bin

実行例

apt-cyg install nano

vimに色を付ける

apt-cyg install vim

vi ~/.vimrc

syntax on

vi ~/.bash_profile

alias vi=vim

source ~/.bash_profile

openコマンドを使う

vi ~/.bash_profile

alias open=cygstart

source ~/.bash_profile