-
Notifications
You must be signed in to change notification settings - Fork 0
/
curly-vimrc
97 lines (71 loc) · 2.21 KB
/
curly-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
90
91
92
93
94
95
96
97
" Sets how many lines of history VIM has to remember
set history=500
" Set to auto read when a file is changed from the outside
set autoread
" I use dark screen
set background=dark
" Avoid garbled characters in Chinese language windows OS
let $LANG='en'
set langmenu=en
" Turn on the WiLd menu
set wildmenu
"Always show current position
set ruler
" Set line number
set nu
" Highlight search
set hlsearch
" Show matching brackets when text indicator is over them
set showmatch
" Turn backup off, since most stuff is in SVN, git et.c anyway...
set nobackup
set nowb
set noswapfile
" Auto indent
set ai
" Smart indent
set si
" Wrap lines
set wrap
" Status line
set statusline=
set statusline+=%7*\[%n] "buffernr
set statusline+=%1*\ %<%F\ "File+path
set statusline+=%2*\ %y\ "FileType
set statusline+=%3*\ %{''.(&fenc!=''?&fenc:&enc).''} "Encoding
set statusline+=%3*\ %{(&bomb?\",BOM\":\"\")}\ "Encoding2
set statusline+=%4*\ %{&ff}\ "FileFormat (dos/unix..)
set statusline+=%5*\ %{&spelllang}\ "Spellanguage
set statusline+=%8*\ %=\ row:%l/%L\ (%03p%%)\ "Rownumber/total (%)
set statusline+=%9*\ col:%03c\ "Colnr
set statusline+=%0*\ \ %m%r%w\ %P\ \ "Modified? Readonly? Top/bot.
hi User1 term=inverse,bold cterm=inverse,bold ctermfg=darkblue
" Always show the status line
set laststatus=2
if has('gui_running')
colorscheme desert
endif
" Delete trailing white space on save, useful for Python and CoffeeScript ;)
func! DeleteTrailingWS()
exe "normal mz"
%s/\s\+$//ge
exe "normal `z"
endfunc
autocmd BufWrite *.py :call DeleteTrailingWS()
autocmd BufWrite *.coffee :call DeleteTrailingWS()
" Turn on syntax highlighting
syntax on
" Ignore case when searching..
set ignorecase
" vim NOT vi
set nocompatible
" Makefile stuff
autocmd FileType make set ts=4 noet
" Txt stuff
autocmd FileType text set spell wrap linebreak nolist textwidth=80
" Encoding used for the terminal.
set termencoding=utf-8
" Expand <tab> when writing Python
autocmd FileType python set expandtab
" Enable the use of the mouse
set mouse=r