-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc.local
83 lines (65 loc) · 2.5 KB
/
.vimrc.local
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
set tabpagemax=50 " max number of tabs to open with -p
set autoread " auto reload files that have been modified outside vim
set nolinebreak
set nospell
" Open new split windows to the right and bottom
set splitbelow
set splitright
set colorcolumn=0
set tabstop=4
" Filetypes
" Make sure colorcolumn doesn't stick
autocmd FileType * set colorcolumn=0
autocmd FileType python set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab shiftround nolinebreak colorcolumn=121
autocmd FileType javascript set tabstop=4 softtabstop=4 shiftwidth=4 expandtab shiftround nolinebreak
autocmd FileType go set tabstop=4 softtabstop=4 shiftwidth=4 noexpandtab nolinebreak listchars=tab:\ \ ,trail:▫ foldmethod=syntax foldlevel=99
autocmd FileType rst set wrap linebreak nolist spell
autocmd FileType markdown set wrap linebreak nolist spell
autocmd BufEnter Dockerfile set tabstop=4 softtabstop=4 shiftwidth=4 expandtab nolinebreak
" Force python3 syntax
let g:syntastic_python_python_exec='python3'
" vim-go
let g:go_autodetect_gopath=1
let g:go_auto_type_info=1 " Auto :GoInfo on symbol under cursor
"let g:go_auto_sameids=1 " Auto :GoSameIds on symbol under cursor
let g:go_updatetime=300 " Delay auto update (ms)
" NERDTree
let NERDTreeIgnore = ['\.pyc$'] " Don't show .pyc files
" Search/substitute
set ignorecase
set smartcase
set gdefault " Assume '/g' at the end of substitute commands
set hlsearch
set showmatch " Briefly show the matching bracket when one is typed
" Searches use standard regexes
"nnoremap / /\v
"vnoremap / /\v
" Appearance
"set cursorline " Highlight current line
"set lazyredraw " Makes cursorline bearable
set nonumber " Turn off line numbering
set guioptions+=c " Use console instead of popup dialogs
set guioptions-=T " Turn off toolbar
set guioptions-=r " Turn off right scrollbar
set guifont=Inconsolata:h13 " set font on Windows and OSX
"set guifont=Inconsolata\ Medium\ 11 " Set font on Gnome
if (&t_Co == 256 || has('gui_running'))
if ($TERM_PROGRAM == 'iTerm.app')
colorscheme solarized
else
colorscheme desert
endif
endif
" Macros
" shortcuts
inoremap jj <ESC>
" Clear out a search
nnoremap <Leader>s :let @/=''<cr>
" Arrow keys scroll buffer
noremap <Left> zh
noremap <Right> zl
noremap <Up>
noremap <Down>
" F6 redraws the screen. I should figure out which Go-related plugin is
" leaving garbage on my screen.
map <F6> :redraw!<cr>