-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc.old
95 lines (78 loc) · 2.16 KB
/
.vimrc.old
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
90
91
92
93
94
95
"###############################################
"# VIM configuration file
"###############################################
"use VIM settings, rather than VI settings
set nocompatible
"display line number
set nu
"keep 50 command lines history
set history=50
"syntax highlight
syntax enable
syntax on
"display real information of cursor
set ruler
"set rulerformat=%20(%2*%<%f%=\ %m%r\ %31\ %c\ %p%%%)
"display incomplete commands
set showcmd
"higtlight search
set hlsearch
"incremental search, highlight every character when input
set incsearch
"parenthesis highlight matching
set showmatch
"always display status line(last line)
set laststatus=2
"disable mouse
set mouse=
"indent settings
set ts=4
set sw=4
set expandtab
set cindent
set smartindent
filetype indent on
autocmd FileType python setlocal et sta sw=4 sts=4
"""""""""""""""""""""""
" set tags for different projects
"""""""""""""""""""""""
" project : ossec-hids, C
set tags=/Users/ytjiang/Documents/GitHub/ossec-hids/tags
" project : Unity, test framework for C, C
set tags+=/Users/ytjiang/Documents/GitHub/Unity/src/tags
" project : requests, python
set tags+=/Users/ytjiang/Documents/GitHub/requests/tags
" project : scrapy, scawler module, python
set tags+=/Users/ytjiang/Documents/GitHub/scrapy/tags
" project : flask
set tags+=/Users/ytjiang/Documents/GitHub/flask/tags
"""""""""""""""""""""""
" auto add Python header -START
"""""""""""""""""""""""
autocmd BufNewFile *.py 0r ~/.templates/python_header
autocmd BufNewFile *.py ks|call FileName()|'s
autocmd BufNewFile *.py ks|call CreatedTime()|'s
fun FileName()
if line("$") > 11
let l = 12
else
let l = line("$")
endif
exe "1," . l . "g/File Name : .*/s/File Name : .*/File Name : " .expand("%")
endfun
fun CreatedTime()
if line("$") > 11
let l = 12
else
let l = line("$")
endif
exe "1," . l . "g/Created Time : .*/s/Created Time : .*/Created Time : " .strftime("%Y-%m-%d %T")
endfun
"""""""""""""""""""""""
" auto add Python header -END
"""""""""""""""""""""""
"""""""""""""""""""""""
" tool : pydiction
"""""""""""""""""""""""
filetype plugin on
let g:pydiction_location = '/Users/ytjiang/.vim/complete-dict'