-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
62 lines (46 loc) · 1.32 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
syntax on
set background=light
set cindent
set cinoptions=(0
set tabstop=2
set shiftwidth=2
set expandtab
set colorcolumn=80
set number
set laststatus=2
set nohls
set nowrap
set relativenumber
let mapleader=","
" Let + register be the X clipboard
set clipboard=unnamedplus
" Look up the directory tree to find a tags file.
set tags+=tags;/
highlight ColorColumn ctermbg=7
highlight TrailingWhitespace ctermbg=7
match TrailingWhitespace /\s\+$/
highlight TabsAreStupid ctermbg=red
match TabsAreStupid /\t/
" Set title of current screen automagically
" Cargo culted from http://vim.wikia.com/wiki/Automatically_set_screen_title
let &titlestring = "" . expand("%:t")
if &term == "screen"
set t_ts=k
set t_fs=\
endif
if &term == "screen" || &term == "xterm"
set title
endif
let &titleold = ""
" Something very weird is happening. Hack around it.
map <C-@> <Esc>
map! <C-@> <Esc>
" Set <Leader>d to find the current word in DXR in Firefox.
function! SearchDXR(search)
let url="gnome-open 'http://dxr.mozilla.org/mozilla-central/search?tree=mozilla-central&case=true&q=" . a:search . "' 2>/dev/null"
call system(url)
endfunction
command! -nargs=1 DXR call SearchDXR(<f-args>)
map <Leader>d :DXR <C-R>=expand("<cword>")<CR><CR>
" Highlighting for lesser-known file extensions
au BufRead,BufNewFile *.jsm setfiletype javascript