forked from ikej/my-vim-profiles
/
_vimrc
96 lines (76 loc) · 2.45 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
filetype on " Automatically detect file types.
set nocompatible " We don't want vi compatibility.
" Add recently accessed projects menu (project plugin)
set viminfo^=!
syntax on
filetype plugin indent on " Enable filetype-specific indenting and plugins
" Load matchit (% to bounce from do to end, etc.)
runtime! macros/matchit.vim
augroup myfiletypes
" Clear old autocmds in group
autocmd!
" autoindent with two spaces, always expand tabs
autocmd FileType ruby,eruby,yaml set ai sw=2 sts=2 et
augroup END
set cf " Enable error files & error jumping.
set clipboard+=unnamed " Yanks go on clipboard instead.
set history=256 " Number of things to remember in history.
set autowrite " Writes on make/shell commands
set ruler " Ruler on
set nu " Line numbers on
set nowrap " Line wrapping off
set timeoutlen=250 " Time to wait after ESC (default causes an annoying delay)
colorscheme ir_black " Uncomment this to set a default theme
" Formatting (some of these are for coding in C and C++)
set ts=2 " Tabs are 2 spaces
set bs=2 " Backspace over everything in insert mode
set shiftwidth=2 " Tabs under smart indent
set nocp incsearch
set cinoptions=:0,p0,t0
set cinwords=if,else,while,do,for,switch,case
set formatoptions=tcqr
set cindent
set autoindent
set smarttab
" Set 52 lines for the display, 1 for the status line.
" and other display options
if has('gui_running')
" i like about 80 character width lines
set textwidth=78
" 2 for the command line
set lines=52
" add columns for the Project plugin
set columns=110
" enable use of mouse
set mouse=a
endif
set expandtab
" Visual
set showmatch " Show matching brackets.
set mat=5 " Bracket blinking.
set list
" Show $ at end of line and trailing space as ~
set lcs=tab:\ \ ,eol:$,trail:~,extends:>,precedes:<
set novisualbell " No blinking .
set noerrorbells " No noise.
set laststatus=2 " Always show status line.
" gvim specific
set mousehide " Hide mouse after chars typed
" Show tab characters. Visual Whitespace.
set list
"set listchars=tab:>.
" Set ignorecase on
set ignorecase
" smart search (override 'ic' when pattern has uppers)
if has("gui")
" set the gui options to:
" g: grey inactive menu items
" m: display menu bar
" r: display scrollbar on right side of window
" b: display scrollbar at bottom of window
" t: enable tearoff menus on Win32
" T: enable toolbar on Win32
set go=gmr
set guifont=Courier:h16
endif
set hlsearch