-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.vimrc
More file actions
105 lines (81 loc) · 2.11 KB
/
.vimrc
File metadata and controls
105 lines (81 loc) · 2.11 KB
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
" Don't imitate vi.
set nocompatible
" Make tab-completion work more like bash.
set wildmenu
set wildmode=list:full
" Ignore certain file extensions when tab-completing.
set wildignore=*.swp,*.bak,*.pyc,*.class,*.o,*.exe
" Set filetype stuff to on.
filetype on
filetype plugin on
filetype indent on
" Example filetype-specific setting:
" if has('autocmd')
" autocmd filetype python set expandtab
" endif
" Allow folding.
set foldenable
set foldmethod=syntax
set foldlevelstart=99
" Show line numbers.
set number
set numberwidth=4
" Scroll five lines ahead of cursor.
set scrolloff=5
" Turn off error bells and visual bell
set noeb vb t_vb=
" Set up autoindentation.
set smartindent
filetype indent on
" Set tabs to width 4.
set softtabstop=4
set tabstop=4
set shiftwidth=4
set expandtab
" Allow backspacing over everything in insert mode.
set backspace=indent,eol,start
"Highlight bad spacing.
highlight BadSpacing term=standout ctermbg=cyan
augroup Spacing
autocmd!
" Highlight tabulators and trailing spaces
autocmd BufNewFile,BufReadPre * match BadSpacing /\(\t\| *$\)/
" Only highlight trailing space in tab-filled formats
autocmd FileType help,make match BadSpacing / *$/
augroup END
" Highlight search terms.
set hlsearch
" Search as you type.
set incsearch
" Display command and location status.
set ruler
set showcmd
" Multiple windows are equally sized and open in reading order.
set equalalways
set splitbelow splitright
" Line wrapping off
set nowrap
" Enlarge history and undo/redo buffers.
set history=1000
set undolevels=1000
" Reset colors to a clean state.
if !has('gui_running')
set t_Co=8 t_md=
endif
" Enable syntax highlighting.
syntax enable
" Force vim to sync syntax highlighting from the beginning of the file.
syn sync fromstart
" Set the color scheme to desert.
colorscheme desert
" Unmap the arrow keys to prevent bad habits.
noremap <Up> ""
noremap! <Up> <Esc>
noremap <Down> ""
noremap! <Down> <Esc>
noremap <Left> ""
noremap! <Left> <Esc>
noremap <Right> ""
noremap! <Right> <Esc>
" Automatically reload the .vimrc when changes are made to it
au! BufWritePost .vimrc source %