-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
119 lines (95 loc) · 2.91 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
set history=300
set nocompatible
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Vundle
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
filetype off
set rtp+=~/.vim/vundle.git/
call vundle#rc()
Bundle 'altercation/vim-colors-solarized'
Bundle 'github/copilot.vim'
" Bundle 'pig.vim'
" Bundle 'derekwyatt/vim-scala'
" Bundle 'VimClojure'
" Bundle 'tpope/vim-fugitive'
" Bundle 'jakar/vim-json'
filetype plugin indent on
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Solarized
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" set gfn=Bitstream\ Vera\ Sans\ Mono:h10
" set guioptions-=T
"
set t_Co=256
syntax enable
set background=dark
colorscheme solarized
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => FileTypes
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
augroup filetypedetect
au BufNewFile,BufRead *.pig set filetype=pig syntax=pig
au BufNewFile,BufRead *.scala set filetype=scala syntax=scala
autocmd FileType ruby,eruby,yaml,java,sh,javascript,json set sw=2 sts=2
augroup END
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Other
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Always activate the mouse
set mouse=a
" Autoread updated files
set autoread
" Allow backspacing anytime
set backspace=eol,start,indent
set whichwrap+=<,>,h,l
set ignorecase "Ignore case when searching
set hlsearch "Highlight search things
set incsearch "Make search act like search in modern browsers
set magic "Set magic on, for regular expressions
set showmatch "Show matching bracets when text indicator is over them
set mat=2 "How many tenths of a second to blink
" No sound on errors
set noerrorbells
set novisualbell
"set t_vb=
set encoding=utf8
try
lang en_US
catch
endtry
set ffs=unix,dos,mac "Default file types
" Turn backup off, since most stuff is in SVN, git anyway...
set nobackup
set nowb
set noswapfile
" Tabs as space of 4 (by default)
set expandtab
set smarttab
set shiftwidth=4
set tabstop=4
set linebreak
set textwidth=80
" Auto-wrap comments and allow "gq" formatting
" Trailing white space indicates a paragraph continues in the next line.
" Autoformat when inserting/deleting text in paragraphs
set formatoptions=cwqa
" Highlight trailing whitespaces
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
" Autoindent and wrap lines
set autoindent
set smartindent
set wrap
" Line numbers
set number
" Status line
set ruler "Always show current position
set cmdheight=2 "The commandbar height
set showcmd "Show command being typed at the bottom
set laststatus=2 "Always show the statusline
" Format the statusline
set statusline=\ %F%m%r%h\ %w\ \ CWD:\ %r%{CurDir()}%h\ \ \ Line:\ %l/%L:%c
function! CurDir()
let curdir = substitute(getcwd(), "/home/maxime", "~/", "g")
return curdir
endfunction