forked from sharfah/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
53 lines (49 loc) · 2.16 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
set nocompatible " vim, not vi
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set noerrorbells " don't make noise
set cursorline " highlight current line
set laststatus=2 " always show the status line
set expandtab " no real tabs please!
set number " Display line numbers on the left
set showcmd " Show partial commands in the last line of the screen
set ignorecase " case insensitive search, except when using capitals
set smartcase " case insensitive patterns, when lowercase is used
set smarttab " smart tabulation and backspace
set autoindent
set showmode " Show the current mode
set showmatch " show matching braces
set hlsearch " highlight searches
set incsearch " find as you type
set title " show title
set pastetoggle=<F11> " F11 toggles indenting when pasting
set wildmenu " make command-line completion bash like + menu
set wildmode=longest:full
set showcmd " show the cmd being typed
set shiftwidth=4 " No 8 character tabs
set softtabstop=4
set undolevels=1000 " 1000 undos
" Allow backspacing over autoindent, line breaks and start of insert action
set backspace=indent,eol,start
"F10 toggles line numbers
map <silent> <F10> :set invnumber<cr>
syntax on
" statusline
" format markers:
" %t File name (tail) of file in the buffer
" %m Modified flag, text is " [+]"; " [-]" if 'modifiable' is off.
" %r Readonly flag, text is " [RO]".
" %y Type of file in the buffer, e.g., " [vim]".
" %= Separation point between left and right aligned items.
" %l Line number.
" %L Number of lines in buffer.
" %c Column number.
" %P percentage through buffer
set statusline=%t\ %m%r%y%=(ascii=\%03.3b,hex=\%02.2B)\ (%l/%L,%c)\ (%P)
set laststatus=2
" change highlighting based on mode
if version >= 700
highlight statusLine cterm=bold ctermfg=black ctermbg=red
au InsertLeave * highlight StatusLine cterm=bold ctermfg=black ctermbg=red
au InsertEnter * highlight StatusLine cterm=bold ctermfg=black ctermbg=green
endif