-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
57 lines (42 loc) · 1.48 KB
/
vimrc
File metadata and controls
57 lines (42 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
"Plugin 'vim-jp/vim-go-extra'
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Install vim-go plugin for golang
Plugin 'fatih/vim-go'
" " All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" " Put your non-Plugin stuff after this line
syntax on
filetype indent plugin on
set ts=4
set expandtab
set shiftwidth=4
set softtabstop=4
set modeline
"autocmd FileType python setlocal foldmethod=indent
set hlsearch
set incsearch
set nu
set mouse=a
" Display status line position
set ruler
" Have vim jump to the last position when reopening a file
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
"Find trailing whitespace
highlight ExtraWhitespace ctermbg=yellow guibg=yellow
match ExtraWhitespace '\s\+$'
" Strip trailing whitespace when writing buffer
"autocmd BufWritePre <buffer> :%s/\s\+$//e
" Defind command to trim trailing whitespace
command RTW :%s/\s\+$//e
" Define pylint as compiler of *.py
au FileType python set makeprg=pylint\ --reports=n\ --msg-template=\"{path}:{line}:\ {msg_id}\ {symbol},\ {obj}\ {msg}\"\ %:p
au FileType set errorformat=%f:%l:\ %m
"########################## Golang setting ################################
let g:go_fmt_options = '--tabs=false -tabwidth=4'