Skip to content

Instantly share code, notes, and snippets.

@famasoon
Created November 5, 2016 06:15
Show Gist options
  • Save famasoon/241f0e642f4785eec4ce57dab2155d1d to your computer and use it in GitHub Desktop.
Save famasoon/241f0e642f4785eec4ce57dab2155d1d to your computer and use it in GitHub Desktop.
syntax enable
set t_Co=256
set number
set nowritebackup
set nobackup
set noswapfile
set matchpairs& matchpairs+=<:>
set showmatch " 対応する括弧などをハイライト表示する
set matchtime=3
set ignorecase " 大文字小文字を区別しない
set smartcase
set hlsearch
set smartindent
set shiftwidth=4
set expandtab
set tabstop=4
set smarttab
set laststatus=2
augroup BinaryXXD
autocmd!
autocmd BufReadPre *.bin let &binary =1
autocmd BufReadPost * if &binary | silent %!xxd -g 1
autocmd BufReadPost * set ft=xxd | endif
autocmd BufWritePre * if &binary | execute "%!xxd -r" | endif
autocmd BufWritePost * if &binary | silent %!xxd -g 1
autocmd BufWritePost * set nomod | endif
augroup END
if $GOROOT != ''
set rtp+=$GOROOT/misc/vim
endif
set encoding=utf-8
set fileencodings=iso-2022-jp,euc-jp,sjis,utf-8
if 0 | endif
if &compatible
set nocompatible " Be iMproved
endif
set runtimepath^=~/.vim/bundle/neobundle.vim/
call neobundle#begin(expand('~/.vim/bundle/'))
NeoBundleFetch 'Shougo/neobundle.vim'
NeoBundle 'fatih/vim-go'
call neobundle#end()
filetype plugin indent on
NeoBundleCheck
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_template_autocreate = 0
au FILETYPE go imap <expr> . pumvisible() ? "\<C-E>.\<C-X>\<C-O>" : ".\<C-X>\<C-O><C-P>"
autocmd FileType go setlocal completeopt-=preview
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment