Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kn1cht committed Jun 1, 2016
0 parents commit d33dfb1
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .bashrc
Original file line number Diff line number Diff line change
@@ -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'
84 changes: 84 additions & 0 deletions .vimrc
Original file line number Diff line number Diff line change
@@ -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
""""""""""""""""""""""""""""""
8 changes: 8 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d33dfb1

Please sign in to comment.