Skip to content

Instantly share code, notes, and snippets.

@raa0121
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raa0121/9546135 to your computer and use it in GitHub Desktop.
Save raa0121/9546135 to your computer and use it in GitHub Desktop.
set nocompatible
scriptencoding utf-8
set fileencodings=utf-8,cp932,euc-jp
set encoding=utf-8
set clipboard+=unnamed
set nrformats-=octal
set timeout timeoutlen=3000 ttimeoutlen=100
set hidden
set history=50
set formatoptions+=mM
set virtualedit=block
set whichwrap=b,s,[,],<,>
set backspace=indent,eol,start
set ambiwidth=double
set wildmenu
if has('mouse')
set mouse=a
endif
filetype plugin indent on
set ignorecase
set smartcase
set wrapscan
set incsearch
set hlsearch
set shellslash
set number
set showmatch
set showmatch matchtime=1
" 自動的にインデントする
set autoindent
" Cインデントの設定
set cinoptions+=:0
" タイトルを表示
set title
set laststatus=2
" コマンドをステータス行に表示
set showcmd
" 画面最後の行をできる限り表示する
set display=lastline
" Tab、行末の半角スペースを明示的に表示する
set list
set listchars=tab:^\ ,trail:~
" ハイライトを有効にする
if &t_Co > 2 || has('gui_running')
syntax on
endif
nnoremap <F1> K
nnoremap <F8> :source %<CR>
nnoremap ZZ <Nop>
nnoremap <Down> gj
nnoremap <Up> gk
nnoremap h <Left>zv
nnoremap j gj
nnoremap k gk
nnoremap l <Right>zv
nnoremap <Space> <C-f>
nnoremap <S-Space> <C-b>
nnoremap n nzz
nnoremap N Nzz
nnoremap * *zz
nnoremap # #zz
nnoremap g* g*zz
nnoremap g# g#zz
nnoremap yyy ^y$
inoremap { {}<LEFT>
inoremap [ []<LEFT>
inoremap ( ()<LEFT>
inoremap " ""<LEFT>
inoremap ' ''<LEFT>
inoremap <S-Enter> <C-O><S-$><Enter>
inoremap <C-v> <Esc>pa
inoremap <A-r> <Esc><C-r>i
inoremap <C-z> <Esc>ui
inoremap <C-a> <Esc>gg<S-v><S-g>i
inoremap 0 0
inoremap 1 1
inoremap 2 2
inoremap 3 3
inoremap 4 4
inoremap 5 5
inoremap 6 6
inoremap 7 7
inoremap 8 8
inoremap 9 9
inoremap % %
inoremap ¥ \
vnoremap { "zdi^v{<c-r>z}<esc>
vnoremap [ "zdi^v[<c-r>z]<esc>
vnoremap ( "zdi^v(<c-r>z)<esc>
vnoremap " "zdi^v"<c-r>z^v"<esc>
vnoremap ' "zdi'<c-r>z'<esc>
vnoremap y y<Esc>`>
cnoremap :close :c
filetype on
filetype plugin on
filetype indent on
syntax on
set wildmenu
set showcmd
set hlsearch
set autoindent
set nostartofline
set ruler
set visualbell
set laststatus=2
set nocompatible
if has('unix') && !has('gui_running')
inoremap <silent> <ESC> <ESC>
inoremap <silent> <C-[> <ESC>
endif
"*************************************************NeoBundle
filetype off "最初にfiletypeをoffにしておく。必須!
if has('vim_starting')
set runtimepath+=~/.vim/bundle/neobundle.vim "neobudle.vimの関数を呼ぶためにインストールしたディレクトリを指定
call neobundle#rc(expand('~/.vim/bundle/')) "プログインをインストールするディレクトリを指定
endif
"以下の書式で管理するプラグインを記述する
NeoBundle 'git://github.com/LeafCage/yankround.vim'
NeoBundle 'Shougo/vimproc', {
\ 'build' : {
\ 'windows' : 'echo "Sorry, cannot update vimproc binary file in Windows."',
\ 'cygwin' : 'make -f make_cygwin.mak',
\ 'mac' : 'make -f make_mac.mak',
\ 'unix' : 'make -f make_unix.mak',
\ },
\ }
"Latexのプラグイン
NeoBundle 'git://github.com/jcf/vim-latex.git'
"移動目安をアルファベットで明示してくれる、飛ぶやつ、;b,;w
NeoBundle 'git://github.com/haya14busa/vim-easymotion'
NeoBundle 'git://github.com/juanpabloaj/ShowMarks'
NeoBundle 'git://github.com/tpope/vim-surround'
NeoBundle 'git://github.com/mhinz/vim-startify'
NeoBundle 'git://github.com/t9md/vim-quickhl'
NeoBundle 'git://github.com/kana/vim-smartchr'
filetype plugin on "最後にplugin onにしておく。必須!
filetype indent on
"**************************************************project
map <F2> <Esc>:Pro<CR>
"**************************************************skk
map! <C-x> <plug>(skk-toggle-im)
"<C-x>に<C-j>からに変更
"let g:skk_large_jisyo = expand('/Users/inouereo/.vim/bundle/skk/plugin/SKK-JISYO.L')
"**************************************************nepsnippet
"*************************************************neocomplcache
"************************************************vimproc
set splitbelow
set splitright
"************************************************quickrun
"
"******************************************vim-easymotion
" http://blog.remora.cx/2012/08/vim-easymotion.html
" ホームポジションに近いキーを使う
let g:EasyMotion_keys='hjklasdfgyuiopqwertnmzxcvbHJKLASDFGYUIOPQWERTNMZXCVB'
" 「;」 + 何かにマッピング
let g:EasyMotion_leader_key=";"
" 1 ストローク選択を優先する
let g:EasyMotion_grouping=1
" カラー設定変更
hi EasyMotionTarget ctermbg=none ctermfg=red
hi EasyMotionShade ctermbg=none ctermfg=blue
""**************************************************Vim-LaTeX
set grepprg=grep\ -nH\ $*
let g:tex_flavor='latex'
let g:Imap_UsePlaceHolders = 1
let g:Imap_DeleteEmptyPlaceHolders = 1
let g:Imap_StickyPlaceHolders = 0
let g:Tex_DefaultTargetFormat = 'pdf'
let g:Tex_FormatDependency_pdf = 'dvi,pdf'
let g:Tex_FormatDependency_ps = 'dvi,ps'
let g:Tex_CompileRule_pdf = '/usr/texbin/ptex2pdf -u -l -ot "-synctex=1 -interaction=nonstopmode -file-line-error-style" $*'
let g:Tex_CompileRule_ps = '/usr/texbin/dvips -Ppdf -o $*.ps $*.dvi'
let g:Tex_CompileRule_dvi = '/usr/texbin/uplatex -synctex=1 -interaction=nonstopmode -file-line-error-style $*'
let g:Tex_BibtexFlavor = '/usr/texbin/upbibtex'
let g:Tex_MakeIndexFlavor = '/usr/texbin/mendex $*.idx'
let g:Tex_UseEditorSettingInDVIViewer = 1
let g:tex_viewrule_pdf = '/usr/bin/open -a skim.app'
"常に閉じずに開く
let g:Tex_AutoFolding = 0
let g:Tex_SmartKeyQuote = 0
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
""%%%%%%%%%%%%%%%%%%%%%%%%vim-quickhl
nmap <Space>m <Plug>(quickhl-manual-this)
xmap <Space>m <Plug>(quickhl-manual-this)
nmap <Space>M <Plug>(quickhl-manual-reset)
xmap <Space>M <Plug>(quickhl-manual-reset)
"%%%%%%%%%%%%%%%%%%%%%%%%%%Yanground Yangringの代替版
nmap p <Plug>(yankround-p)
nmap P <Plug>(yankround-P)
nmap gp <Plug>(yankround-gp)
nmap gP <Plug>(yankround-gP)
nmap <C-p> <Plug>(yankround-prev)
nmap <C-n> <Plug>(yankround-next)
set showtabline=2 " 常にタブラインを表示
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment