-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
75 lines (57 loc) · 1.46 KB
/
vimrc
File metadata and controls
75 lines (57 loc) · 1.46 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
set nocompatible
set nobackup
set nowritebackup
set noswapfile
set viminfo=
syntax on
"set autoindent
colorscheme slate
" Line Numbers
set number
"highlight LineNr term=NONE cterm=NONE ctermfg=White ctermbg=Black
" Right border
"set colorcolumn=80
" Ignore case for searches
set ignorecase
" Unless you type an uppercase letter
set smartcase
" Highlight things that we find with the search
set hlsearch
" Tabs
set smarttab
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=4
" Autohandle file types
filetype on
filetype plugin on
" Max highlight
let python_highlight_all = 1
" 256 colors (X only)
set t_Co=256
" Omnicomletion
autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css set omnifunc=csscomplete#CompleteCSSi
" Autocomplete by Tab
function InsertTabWrapper()
let col = col('.') - 1
if !col || getline('.')[col - 1] !~ '\k'
return "\"
else
return "\<c-p>"
endif
endfunction
" Show autocomplete options
"imap <c-r>=InsertTabWrapper()
set complete=""
set complete+=.
set complete+=k
set complete+=b
set complete+=t
" *.py: Trim trailing spaces on save
autocmd BufWritePre *.py normal m`:%s/\s\+$//e ``
" *.py: Use smart indentation after keywords
autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class