-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc-small
More file actions
67 lines (54 loc) · 1.5 KB
/
vimrc-small
File metadata and controls
67 lines (54 loc) · 1.5 KB
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
behave xterm
filetype plugin indent on " indents based
""" Misc
set history=10000 " remember : commands and searches
set nobackup " don't write a backupfile before overwriting a file
set noswapfile " disables creation of swapfiles
set modeline " enables parsing of modelines
set mouse=a " enable mouse for all modes
set laststatus=2 " status line always on
set number " turn on line numbers
set linebreak " wrap text visually
set showmatch "jumps to matching parens
set synmaxcol=800 " don't highlight long lines
set splitright " add new splits to the right instead of the left
set splitbelow " add new splits below instead of above
""" Search
set hlsearch " highlights all search matches
set incsearch " shows matches as the search is typed
set smartcase " ingnores case when search is entirely lowercase
""" Tab
set copyindent
set autoindent
set smarttab
set cindent
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
""" Undo
if v:version > 702
" persist undo history to disk
set undofile
set undodir=~/vimundo
set undolevels=1000
set undoreload=10000
endif
colors desert
""" Bindings
" causes j and k to scroll by the visible line
nnoremap j gj
nnoremap k gk
" clear search
nnoremap <leader><space> :nohl<cr>
" center the line that the search result is on
map N Nzz
map n nzz
" keeps the visual selection when you tab a piece of text over
vnoremap < <gv
vnoremap > >gv
" disable :X
cmap X<CR> x<CR>
" rebind <C-c> to be the same as <Esc>
noremap <C-C> <Esc>
inoremap <C-C> <Esc>