-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.vimrc
60 lines (48 loc) · 2.03 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
set nocompatible
" ----------------------------------------------------------------------------
" UI
" ----------------------------------------------------------------------------
set ruler " show the cursor position all the time
"set noshowcmd " don't display incomplete commands
set nolazyredraw " turn off lazy redraw
set number " line numbers
" Tab completion
" -------------------------------------
set wildmenu " turn on wild menu
set wildmode=list:longest,list:full
set complete=.,w,t
imap <S-Tab> <C-P>
" -------------------------------------
set ch=2 " command line height
set backspace=2 " allow backspacing over everything in insert mode
set whichwrap+=<,>,h,l,[,] " backspace and cursor keys wrap to
set shortmess=filtIoOA " shorten messages
set report=0 " tell us about changes
set nostartofline " don't jump to the start of line when scrolling
set showcmd " display incomplete commands
set tabstop=2 shiftwidth=2 expandtab
set autoindent " automatic indent new lines
set smartindent " be smart about it
set formatoptions+=n " support for numbered/bullet lists
" ----------------------------------------------------------------------------
" Visual Cues
" ----------------------------------------------------------------------------
set showmatch " brackets/braces that is
set mat=5 " duration to show matching brace (1/10 sec)
set incsearch " do incremental searching
set laststatus=2 " always show the status line
set ignorecase " ignore case when searching
"set nohlsearch " don't highlight searches
set visualbell " shut the fuck up
" Snippets are activated by Tab
let g:snippetsEmu_key = "<Tab>"
" Display extra whitespace
set listchars=trail:·,precedes:«,extends:»,eol:↲,tab:▸\
syntax on
" ---------------------------------------------------------------------------
" Strip all trailing whitespace in file
" ---------------------------------------------------------------------------
function! StripWhitespace ()
exec ':%s/ \+$//gc'
endfunction
map ,s :call StripWhitespace ()