-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.vimrc
59 lines (45 loc) · 1.29 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
" Turn off compatibility mode
set nocompatible
" Case-insensitive searches
set ignorecase
" Show line/column numbers
set ruler
set nu
" Flash matching brackets
set showmatch
" Disable mouse support.
set mouse=
" Indent engines
filetype indent on
set background=dark
set backspace=indent,eol,start " allow backspace over anything in insert mode
"
" AutoCommmand options
"
if has("autocmd")
" Remove all (previous) autocommands for the current group.
" autocmd!
" TXT file type isn't always getting detected so handle it explicitly
autocmd BufNewFile,BufRead *.txt set filetype=txt
"
" Modify options for files I might be editing often:
"
" Set tab stops to 4, and enable soft tabs
" Enable smart auto-indent
"
autocmd FileType c,html,perl,php,python,sh,txt
\ set tabstop=4 |
\ set softtabstop=4 |
\ set expandtab |
\ set autoindent |
\ set smarttab |
\ set shiftwidth=4
autocmd FileType c,html,perl,php,python,sh,txt
\ autocmd BufWritePre <buffer> :%s/\s\+$//e
endif
" Switch syntax highlighting on when the terminal has colors.
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif