0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Windows上でのUnixライクな環境構築メモ

Last updated at Posted at 2019-01-27

1. msys2のインストール

 http://www.msys2.org

2. mingw64.iniの設定

以下をアンコメントする(Windowsのシンボリックリンクを使う、windowsのPATHを引き継ぐ)

mingw64.ini
MSYS=winsymlinks:nativestrict
MSYS2_PATH_TYPE=inherit

3. $HOME/binにPATHを通す

.bash_profileの以下をアンコメントする。

~/.bash_profile
if [ -d "${HOME}/bin" ] ; then
  PATH="${HOME}/bin:${PATH}"
fi

4. ls, grepの色付け

.bashrcの以下をアンコメントする

~/.bashrc
alias grep='grep --color'
alias ls='ls -hF --color=tty'

5. パッケージのインストール

msys2 mingw64を起動して、以下のコマンドを実行

$ pacman -S base-devel mingw-w64-x86_64-toolchain VCS compression editors sys-utils winpty mingw-w64-x86_64-ag expect busybox pass mingw-w64-x86_64-python3-pip fzy

6. vimの設定

~/.vimrc
syntax on
set nocompatible              " be iMproved, required
filetype off                  " required
set laststatus=2
set statusline=%F%r%h%=
set number
set fileencodings=utf-8,iso-2022-jp,euc-jp,sjis
set fileformats=unix,dos,mac
set cursorline
set nowrap
set mouse=a
set ttymouse=xterm2
set t_Co=256
set backspace=indent,eol,start
let g:vim_markdown_folding_disabled=1
let g:vim_markdown_toc_autofit = 1

call plug#begin('$HOME/.vim/plugged')
Plug 'flazz/vim-colorschemes'
Plug 'itchyny/landscape.vim'
Plug 'plasticboy/vim-markdown'
Plug 'godlygeek/tabular'
Plug 'kannokanno/previm' | Plug 'tyru/open-browser.vim'
Plug 'rking/ag.vim'
Plug 'yegappan/mru' 
Plug 'b4b4r07/vim-shellutils'
Plug 'nathanaelkane/vim-indent-guides'
Plug 'majutsushi/tagbar'
Plug 'thinca/vim-quickrun'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'scrooloose/syntastic'
Plug 'vim-scripts/autodate.vim'
Plug 'vim-scripts/scratch-utility'
Plug 'mhinz/vim-signify'
call plug#end()

colorscheme wombat
let g:lightline = {
      \ 'colorscheme': 'wombat',
      \ }

let g:changelog_username="hogehoge <hoge@hoge.com>"
let g:changelog_timeformat="%Y-%m-%d"

let g:scratchBackupFile=$HOME . "/.scratch"
set shortmess+=I

let g:netrw_nogx = 1 " disable netrw's gx mapping.
nmap gx <Plug>(openbrowser-smart-search)
vmap gx <Plug>(openbrowser-smart-search)

7. vimのpluginインストール

$ curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
$ vim +":PlugInstall" 

8. pdftk serverのインストール

TBD

  • pass -cを使えるようにする
  • batsをインストールして使えるようにする
  • openbrowserでchromeを使えるようにする
  • ~/.bash_aliases (openとか)
  • ~/.bash_functions
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?