-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
66 lines (51 loc) · 1.17 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
" Tess vimrc August 2014
"
" Don't be vi compatible
set nocompatible
" Visuals
"""""""""""""""""""""""""""""""
" Pretty colours
colorscheme desert
set background=dark
" Show syntax
syntax on
" Show line number
set ruler
set number
" Indentation
"""""""""""""""""""""""""""""""
" Use spaces instead of tabs
set expandtab
set smarttab
" 1 tab == 4 spaces
set shiftwidth=4
set tabstop=4
" Indent automatically, copying previous indentation
set autoindent
set copyindent
" Misc
"""""""""""""""""""""""""""""""
" Show what is being typed as a command
set showcmd
set cmdheight=2
" Show two lines of context when scrolling to the top and bottom
set scrolloff=2
" Show matching parens
set showmatch
" Search incrementally and highlight results
set incsearch
set hlsearch
" Increase history and undo lengths
set history=50
set undolevels=50
" Key Mappings
"""""""""""""""""""""""""""""""
" Map jj to the escape sequence
:inoremap jj <Esc>
" Overidde encryption command
cnoreabbrev <expr> X (getcmdtype() is# ':' && getcmdline() is# 'X') ? 'x' : 'X'
" Make space to pagedown and - to pageup
noremap <Space> <PageDown>
noremap - <PageUp>
" Remap semicolon to colon (quicker typing!)
nnoremap ; :