diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..c35f09e --- /dev/null +++ b/.bashrc @@ -0,0 +1,4 @@ +PATH="$PATH":/Users/RYK6U0327/isrb2 +export PATH="$PATH:"/Applications/microchip/xc8/v1.35/bin"" +alias vv="g++ --std=c++11 -O2 -Wall" +alias ls='ls -G' diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..4a395b7 --- /dev/null +++ b/.vimrc @@ -0,0 +1,84 @@ +colorscheme desert +highlight LineNr ctermfg=darkyellow +syntax on + +set background=dark +set hlsearch +set laststatus=2 +set ruler +set title +set wildmenu +set number +set autoindent +set expandtab +set list +set listchars=tab:>\ ,trail:-,extends:> +set shiftwidth=4 +set showmatch +set smartcase +set smartindent +set smarttab +set tabstop=4 +set whichwrap=b,s,h,l,<,>,[,] +autocmd BufWritePre * :%s/\s\+$//ge +autocmd BufWritePre * :%s/\t/ /ge +"--------------------------------------------------------------------------- +" Shift+hjklで移動量を大きく +noremap H 3h +noremap J 3j +noremap K 3k +noremap L 3l +"--------------------------------------------------------------------------- + +" http://inari.hatenablog.com/entry/2014/05/05/231307 +"""""""""""""""""""""""""""""" +" 全角スペースの表示 +"""""""""""""""""""""""""""""" +function! ZenkakuSpace() + highlight ZenkakuSpace cterm=underline ctermfg=lightblue guibg=darkgray +endfunction + +if has('syntax') + augroup ZenkakuSpace + autocmd! + autocmd ColorScheme * call ZenkakuSpace() + autocmd VimEnter,WinEnter,BufRead * let w:m1=matchadd('ZenkakuSpace', ' ') + augroup END + call ZenkakuSpace() +endif +"""""""""""""""""""""""""""""" + +" https://sites.google.com/site/fudist/Home/vim-nihongo-ban/-vimrc-sample +"""""""""""""""""""""""""""""" +" 挿入モード時、ステータスラインの色を変更 +"""""""""""""""""""""""""""""" +let g:hi_insert = 'highlight StatusLine guifg=darkblue guibg=darkyellow gui=none ctermfg=blue ctermbg=yellow cterm=none' + +if has('syntax') + augroup InsertHook + autocmd! + autocmd InsertEnter * call s:StatusLine('Enter') + autocmd InsertLeave * call s:StatusLine('Leave') + augroup END +endif + +let s:slhlcmd = '' +function! s:StatusLine(mode) + if a:mode == 'Enter' + silent! let s:slhlcmd = 'highlight ' . s:GetHighlight('StatusLine') + silent exec g:hi_insert + else + highlight clear StatusLine + silent exec s:slhlcmd + endif +endfunction + +function! s:GetHighlight(hi) + redir => hl + exec 'highlight '.a:hi + redir END + let hl = substitute(hl, '[\r\n]', '', 'g') + let hl = substitute(hl, 'xxx', '', '') + return hl +endfunction +"""""""""""""""""""""""""""""" diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..705b827 --- /dev/null +++ b/setup.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +DOT_FILES=(.bashrc .bash_profile .vimrc) + +for file in ${DOT_FILES[@]} +do + ln -s $HOME/Documents/git/dotfiles/$file $HOME/$file +done