-
Notifications
You must be signed in to change notification settings - Fork 1
/
vimrc
145 lines (117 loc) · 4.08 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
" Require by pathogen
filetype off
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching
set nocompatible " breaks compatibility with original vi
set backspace=indent,eol,start " allow backspace in insert mode
"set autoindent " text indenting
"set smartindent " as above
set tabstop=4 " number of spaces in a tab
set softtabstop=4 " as above
set shiftwidth=4 " as above
set expandtab
set history=100 " lines of command history
set showcmd " show incomplete commands
"set hlsearch " highlight searched-for phrases
set incsearch " highlight search as you type
set smarttab
"set list " affiche les caracteres louches
set tabpagemax=15
set ft=bash
"Color
colorscheme delek " set up a color scheme in the gvim interface
syntax on " active the syntaxic coloration
let mywinfont="Monospace:h10:cANSI"
"set number " display current line number
"Retour a la meme position
if has("autocmd")
"filetype plugin indent on
"autocmd FileType text setlocal textwidth=78
" always jump to last edit position when opening a file
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ endif
endif
"Souligne la ligne en cours
set cursorline
highlight CursorLine guibg=#616668
syntax on
"set mouse=a
"Pimp l'apparence
if has("gui_running") " console Vim cannot set the font
colorscheme slate " set up a color scheme in the gvim interface
set mousemodel=popup " create popop when right click in gui
if has("gui_gtk2") " GTK+2, not GTK+1
set gfn=Bitstream\ Vera\ Sans\ Mono\ 11
elseif has("gui_photon") " Photon GUI
set gfn=Bitstream\ Vera\ Sans\ Mono:s12
elseif has("gui_kde") " the obsolete kvim
set gfn=Bitstream\ Vera\ Sans\ Mono/12/-1/5/50/0/0/0/1/0
elseif has("x11") " other X11 GUIs including GTK+1
set gfn=-*-lucidatypewriter-medium-r-normal-*-*-100-*-*-m-*-*
else " non-X11 GUIs including Windows
set gfn=Lucida_Console:h12:cDEFAULT
endif
set number " display current line number
"set listchars=eol:âEUR¢,tab:âEUR£âEUR?,trail:»,extends:â+·,precedes:â+¶
else
"set listchars=eol:¶,tab:â+'âEUR?,trail:»,extends:â+",precedes:â+
endif
" Fantom
au BufNewFile,BufRead *.fan,*.fwt setf fan
" web
au BufNewFile,BufRead *.jade,*.html,*.css,*.js,*.styl set sw=2
" nextgen language
au BufNewFile,BufRead *.scala,*.sbt,*.clj set sw=2
au BufNewFile,BufRead *.sbt setf scala
au BufNewFile,BufRead *.boot setf clojure
" avro
au BufRead,BufNewFile *.avdl setlocal filetype=avro-idl
" shortcut for NERDTree
nmap <silent> <c-n> :NERDTreeToggle<CR>
" shortcut tagbar
nmap <silent> <c-b> :TagbarToggle <CR>
let g:tagbar_type_scala = {
\ 'ctagstype' : 'scala',
\ 'kinds' : [
\ 'p:packages:1' ,
\ 'V:values' ,
\ 'v:variables' ,
\ 'T:types' ,
\ 't:traits' ,
\ 'o:objects' ,
\ 'a:aclasses' ,
\ 'c:classes' ,
\ 'r:cclasses' ,
\ 'm:methods'
\ ],
\ 'sro' : '.',
\ 'kind2scope':{
\ 'T' : 'type',
\ 't' : 'trait',
\ 'o' : 'object',
\ 'a' : 'abstract class',
\ 'c' : 'class',
\ 'r' : 'case class'
\ },
\ 'scope2kind':{
\ 'type' : 'T',
\ 'trait' : 't',
\ 'object' : 'o',
\ 'abstract class' : 'a',
\ 'class' : 'c',
\ 'case class' : 'r'
\ },
\ 'deffile' : expand('<sfile>:h') . '/.vim/ctags-scala'
\ }
"deffile' : expand('<sfile>:p:h:h') . '/ctags/mylang.cnf'
set clipboard=unnamedplus
"thanks to http://ku1ik.com/2011/09/08/formatting-xml-in-vim-with-indent-command.html
" gg=G
set equalprg=xmllint\ --format\ --recover\ -\ 2>/dev/null
au FileType xml setlocal equalprg=xmllint\ --format\ --recover\ -\ 2>/dev/null