$ curl -sfLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
$ cp .vimrc ~/.vimrc
$ vim -c 'PlugInstall' -c 'quitall' # or `vim -c 'PlugUpdate' -c 'quitall'`
$ vim -c 'GoInstallBinaries' -c 'quitall' # or `vim -c 'GoUpdateBinaries' -c 'quitall'`
Last active
November 7, 2017 07:50
-
-
Save hayajo/f945c26a5ceb8e88c01d9ada99c153d8 to your computer and use it in GitHub Desktop.
ct-study #10 で使った .vimrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
set backspace=indent,eol,start | |
set cursorline | |
set completeopt=menuone | |
set noswapfile | |
set autochdir | |
set ignorecase | |
set smartcase | |
"set hlsearch | |
set autoindent | |
set shiftwidth=4 | |
set softtabstop=4 | |
set tabstop=4 | |
set number | |
"let mapleader="\<Space>" | |
syntax on | |
call plug#begin('~/.vim/plugged') | |
Plug 'fatih/vim-go' | |
call plug#end() | |
let g:go_highlight_functions=1 | |
let g:go_highlight_methods=1 | |
let g:go_highlight_structs=1 | |
let g:go_fmt_command="goimports" | |
autocmd FileType go :highlight goErr cterm=bold ctermfg=214 | |
autocmd FileType go :match goErr /\<err\>/ | |
autocmd FileType go nmap <Leader>gi :GoImport | |
autocmd FileType go nmap <Leader>gl :GoLint<CR> | |
autocmd FileType go nmap <leader>gr <Plug>(go-run) | |
autocmd FileType go nmap <leader>gb <Plug>(go-build) | |
autocmd FileType go nmap <leader>gt <Plug>(go-test) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment