-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
42 lines (33 loc) · 1 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
set expandtab
set background=dark
set ignorecase "Ignore case when searching
set smartcase
syntax on
" show matching brackets
set showmatch
" display mode INSERT/REPLACE/...
set showmode
" Required to be able to use keypad keys and map missed escape sequences
set esckeys
" get easier to use and more user friendly vim defaults
" CAUTION: This option breaks some vi compatibility.
" Switch it off if you prefer real vi compatibility
set nocompatible
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
filetype on
set textwidth=72
set fo=cotqr
set ruler
function! s:JumpToLastPosition()
" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler
" (happens when dropping a file on gvim).
if line("'\"") > 0 && line("'\"") <= line("$") |
exe "normal g`\"" |
endif
endfunction
if &filetype != 'gitcommit'
" jump to last position
call s:JumpToLastPosition()
endif