-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
79 lines (56 loc) · 1.87 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
" turn on syntax highlighting
syntax on
" Wrap text and comment after 79 characters
set textwidth=79
" display right margin at 80 char
set colorcolumn=80
" function of backspace character
set backspace=indent,eol,start
" show line number
set number
" use spaces instead of tab
set expandtab
" tabstop tells vim how many columns a tab counts for.
set tabstop=4
" shiftwidth controls how many columns text is indented with the reindent
" operations (<< and >>) and automatic C-style indentation
set shiftwidth=4
" softtabstop controls how many columns vim uses when Tab is hit in insert
" mode. When expandtab is set, vim will always use the appripriate number of
" spaces.
set softtabstop=4
" highlight search
set hlsearch
" underline the current line
set cursorline
" no line wrapping
set nowrap
" automatically change to directory where current file is located
set autochdir
set autoindent
" vim status line at the bottom
set laststatus=2
set modeline
set splitright
set spell spelllang=en_us
" the j flag discards leading whitespace and comment symbol when joining two lines
set formatoptions+=aj
colorscheme desert
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
"autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
"autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
"autocmd InsertLeave * match ExtraWhitespace /\s\+$/
"autocmd BufWinLeave * call clearmatches()
if has("autocmd")
" Enable file type detection.
" Use the default filetype settings, so that mail gets 'tw' set to 72,
" 'cindent' is on in C files, etc.
" Also load indent files, to automatically do language-dependent indenting.
filetype plugin indent on
autocmd FileType xsd setlocal shiftwidth=2 tabstop=2 softtabstop=2
endif
" set the tab background and foreground color
hi TabLineSel ctermfg=Red ctermbg=Yellow
" enable mouse scrolling and selection of tab
"set mouse=a