-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
139 lines (104 loc) · 3.83 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
" General "{{{
set nocompatible " be iMproved
set history=256 " Number of things to remember in history.
set timeoutlen=250 " Time to wait after ESC (default causes an annoying delay)
set clipboard+=unnamed " Yanks go on clipboard instead.
set pastetoggle=<F10> " toggle between paste and normal: for 'safer' pasting from keyboard
set shiftround " round indent to multiple of 'shiftwidth'
set tags=.git/tags;$HOME " consider the repo tags first, then
" walk directory tree upto $HOME looking for tags
" note `;` sets the stop folder. :h file-search
set modeline
set modelines=5 " default numbers of lines to read for modeline instructions
set autowrite " Writes on make/shell commands
set autoread
set nobackup
set nowritebackup
set directory=/tmp// " prepend(^=) $HOME/.tmp/ to default path; use full path as backup filename(//)
set noswapfile "
set hidden " The current buffer can be put to the background without writing to disk
set hlsearch " highlight search
set ignorecase " be case insensitive when searching
set smartcase " be case sensitive when input has a capital letter
set incsearch " show matches while typing
let g:is_posix = 1 " vim's default is archaic bourne shell, bring it up to the 90s
let mapleader = ','
let maplocalleader = ' ' " Tab as a local leader
" "}}}
" Formatting "{{{
set fo+=o " Automatically insert the current comment leader after hitting 'o' or 'O' in Normal mode.
set fo-=r " Do not automatically insert a comment leader after an enter
set fo-=t " Do no auto-wrap text using textwidth (does not apply to comments)
set nowrap
set textwidth=0 " Don't wrap lines by default
set tabstop=2 " tab size eql 2 spaces
set softtabstop=2
set shiftwidth=2 " default shift width for indents
set expandtab " replace tabs with ${tabstop} spaces
set smarttab "
set backspace=indent
set backspace+=eol
set backspace+=start
set autoindent
set cindent
set indentkeys-=0# " do not break indent on #
set cinkeys-=0#
set cinoptions=:s,ps,ts,cs
set cinwords=if,else,while,do
set cinwords+=for,switch,case
" "}}}
" Visual "{{{
syntax on " enable syntax
" set synmaxcol=250 " limit syntax highlighting to 128 columns
set mouse=a "enable mouse in GUI mode
set mousehide " Hide mouse after chars typed
set number " line numbers On
set showmatch " Show matching brackets.
set matchtime=2 " Bracket blinking.
set wildmode=longest,list " At command line, complete longest common string, then list alternatives.
set completeopt+=preview
set novisualbell " No blinking
set noerrorbells " No noise.
set vb t_vb= " disable any beeps or flashes on error
set laststatus=2 " always show status line.
set shortmess=atI " shortens messages
set showcmd " display an incomplete command in statusline
set statusline=%<%f\ " custom statusline
set stl+=[%{&ff}] " show fileformat
set stl+=%y%m%r%=
set stl+=%-14.(%l,%c%V%)\ %P
set foldenable " Turn on folding
set foldmethod=marker " Fold on the marker
set foldlevel=100 " Don't autofold anything (but I can still fold manually)
set foldopen=block,hor,tag " what movements open folds
set foldopen+=percent,mark
set foldopen+=quickfix
set virtualedit=block
set splitbelow
set splitright
"set list " display unprintable characters f12 - switches
"set listchars=tab:\ ·,eol:¬
set listchars=tab:\|\ ,eol:¬
set listchars+=trail:·
set listchars+=extends:»,precedes:«
map <silent> <F12> :set invlist<CR>
if has('gui_running')
set guioptions=cMg " console dialogs, do not show menu and toolbar
set gfn=Terminus\ 12
endif
" "}}}
" Scripts and Bundles " {{{
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
Bundle 'tpope/vim-git'
Bundle 'tpope/vim-fugitive'
Bundle 'nanotech/jellybeans.vim'
colo jellybeans
Bundle 'derekwyatt/vim-scala'
au BufRead,BufNewFile {*.scala} setl ft=scala
filetype plugin indent on " required!
" "}}}