forked from stephenpaulger/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
89 lines (75 loc) · 2.92 KB
/
vimrc
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
84
85
86
87
88
89
""""""""""""""""""""""""""""""""""""""""""""""""
" Ignore whitespace changes and always wrap lines in diff mode:
""""""""""""""""""""""""""""""""""""""""""""""""
set diffopt+=iwhite
" Following from https://stackoverflow.com/a/16867953/2017600
au VimEnter * if &diff | execute 'windo set wrap' | endif
""""""""""""""""""""""""""""""""""""""""""""""""
" Force every buffer's fileformat=unix so that dos/Microsoft CR eol chars show up
" as ^M (of fileformat=dos, vim won't show the CR/^M at all, so it looks like
" an unix file):
""""""""""""""""""""""""""""""""""""""""""""""""
"set fileformats=unix
""""""""""""""""""""""""""""""""""""""""""""""""
" Display unprintable chars (eg. tab="^I", unix eol (LF)="$")
""""""""""""""""""""""""""""""""""""""""""""""""
"set list
""""""""""""""""""""""""""""""""""""""""""""""""
" Mouse scrolls shell, not vim and allow copy from vim
""""""""""""""""""""""""""""""""""""""""""""""""
set mouse=r
""""""""""""""""""""""""""""""""""""""""""""""""
" Activate filetype plugins for:
" - F5 to execute python module from within vim (see also ~/.vim/ftplugin/python.vim)
" - intelligent indenting in python modules (see also ~/.vim/indent/python.vim)
" - ...
""""""""""""""""""""""""""""""""""""""""""""""""
filetype plugin on
filetype plugin indent on
""""""""""""""""""""""""""""""""""""""""""""""""
" Run pylint on each save in a python file
""""""""""""""""""""""""""""""""""""""""""""""""
"autocmd FileType python compiler pylint
"let g:pylint_onwrite = 0
"let g:pylint_show_rate = 0
"let g:pylint_cwindow = 0
""""""""""""""""""""""""""""""""""""""""""""""""
" Turn on syntax highlighting, but not in diff mode:
""""""""""""""""""""""""""""""""""""""""""""""""
syntax on
if &diff
syntax off
endif
""""""""""""""""""""""""""""""""""""""""""""""""
"Set tab to be ' ' (4 spaces):
""""""""""""""""""""""""""""""""""""""""""""""""
set tabstop=4
set softtabstop=4
set shiftwidth=4
set smarttab
set expandtab
""""""""""""""""""""""""""""""""""""""""""""""""
" Stop auto line breaks
""""""""""""""""""""""""""""""""""""""""""""""""
"set textwidth=80
"set wrapmargin=0
""""""""""""""""""""""""""""""""""""""""""""""""
" Highlight search term
""""""""""""""""""""""""""""""""""""""""""""""""
set hlsearch
""""""""""""""""""""""""""""""""""""""""""""""""
" Return to same place in file as last time
""""""""""""""""""""""""""""""""""""""""""""""""
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
""""""""""""""""""""""""""""""""""""""""""""""""
" Always show status bar (including filename)
""""""""""""""""""""""""""""""""""""""""""""""""
set laststatus=2
""""""""""""""""""""""""""""""""""""""""""""""""
" Show line and col numbers in status bar
""""""""""""""""""""""""""""""""""""""""""""""""
set ruler
""""""""""""""""""""""""""""""""""""""""""""""""
" CSS syntax highlighting for .less files
""""""""""""""""""""""""""""""""""""""""""""""""
au BufNewFile,BufRead *.less set filetype=less