-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
116 lines (98 loc) · 2.5 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
" Vim configuration
" by mkalmes
" Preamble {{{
set nocompatible " vim is not compatible to vi
filetype off
" }}}
" Vundle {{{
"set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
syntax enable " enable syntax higlighting
" }}}
" Basic options
set encoding=utf-8
set modelines=0
set autoindent
set scrolloff=3
set showmode
set showcmd
set hidden
set wildmenu
set wildmode=list:longest
set visualbell
set cursorline
set ttyfast
set ruler
set backspace=indent,eol,start
set laststatus=2
set relativenumber
set undofile
" Handle long lines
set wrap
set textwidth=79
set formatoptions=qrn1
set colorcolumn=85
" Show invisibles
set list
set listchars=tab:▸\ ,eol:¬,extends:❯,precedes:❮
" Learn vim the right way(tm)
nnoremap <up> <nop>
nnoremap <down> <nop>
nnoremap <left> <nop>
nnoremap <right> <nop>
inoremap <up> <nop>
inoremap <down> <nop>
inoremap <left> <nop>
inoremap <right> <nop>
nnoremap j gj
nnoremap k gk
" Make your live easier
nnoremap ; :
" Folding
set foldlevelstart=2
set foldmethod=marker
" Appearance
set hlsearch " show search
set incsearch " incremental search
set number " show linenumbers
set laststatus=2 " always show status line
set statusline=%t\ %y\ %{&ff};\ [%c,%l]
" Backup and Files {{{
set backup " turn backups on
set undodir=~/.vim/tmp/undo// " save undo files here
set backupdir=~/.vim/tmp/backup// " save backup files here
set directory=~/.vim/tmp/swap// " save swap files here
" Make those folders automatically if they don't already exist.