Quantcast
Channel: Vimタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 5651

WSL セットアップする

$
0
0

WSL setup

WSLを1からセットアップしたいときの備忘録.
余計な説明はせずコマンドを列挙していく.詳細説明は他記事に譲る.コピペ使用を想定して$記号は省略した.ディストリビューションはUbuntuを想定する.

Update & Upgrade Apt

sudo apt update
sudo apt upgrade

Install Basic packages

sudo apt install build-essential

Delete Beep Sound

echo "set bell-style none" >> ~/.inputrc
echo "set visualbell" >> ~/.vimrc

Install X server

VcXsrv for Windows side
https://sourceforge.net/projects/vcxsrv/

sudo apt install x11-apps
sudo apt install x11-utils
sudo apt install x11-xserver-utils
echo "export DISPLAY=:0.0" >> ~/.bashrc
xeyes

Install Python3

Python3

sudo apt-get install python3 python3-pip -y
sudo pip3 install pip -U

Packages

sudo pip install --upgtade pip

sudo pip3 install matplotlib
sudo pip3 install numpy
sudo pip3 install scipy
sudo pip3 install pandas

OpenCV

sudo pip install opencv-python
sudo pip install opencv-contrib-python

Install Gnuplot

sudo apt-get install gnuplot-x11

Vim

Plugin

git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

~/.vimrc is as follows:

set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
  Plugin 'VundleVim/vundle.vim'
  Plugin 'scroolppse/nerdtree'
  Plugin 'ryanoasis/vim-devicons'
  Plugin 'vim-airline/vim-airline'
  Plugin 'flazz/vim-colorschemes'
  Plugin 'nathanaelkane/vim-indent-guides'
call vundle#end()
filetype plugin indent on
"----setting for vim-indent-guides----
let g:indent_guides_enable_on_vim_startup = 2
let g:indent_guides_auto_colors=0
autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd  guibg=#262626   ctermbg=lightgray
autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=#3c3c3c  ctermbg=darkgray
let g:indent_guides_color_change_percent=30
let g:indent_guides_guide_size = 1

Restart terminal.
on the .vimrc, enter below command.

:BundleInstall

.vimrc

sample simple .vimrc file as follows:

set number
set list
syntax on
set mouse=a
set tabstop=2
set shiftwidth=2
set expandtab
set title
set cursorline
colorscheme molokai
"colorscheme koehler

Install Color Scheme Molokai

mkdir ~/.vim/colors
git clone https://github.com/tomasr/molokai
mv ./molokai/colors/molokai.vim  ~/.vim/colors/
chmod 777 -R ./molokai
rm -r ./molokai

Simbolic Link

ln -sf /mnt/c/  ~/

Delete all package

Don't conduct unless some troubles.

lxrun /uninstall /full

Viewing all articles
Browse latest Browse all 5651

Trending Articles