-
Notifications
You must be signed in to change notification settings - Fork 2
/
vimrc
56 lines (49 loc) · 1.14 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
" Skip initialization for vim-tiny or vim-small.
if !1 | finish | endif
" Only use default plugin
set packpath=
set runtimepath=$VIMRUNTIME
" View options
set number
set relativenumber
set cursorline
set showmatch
set scrolloff=3
" Edit options
set expandtab
set tabstop=4
set softtabstop=4
set shiftwidth=4
set shiftround
set smartindent
set hidden
" Search options
set ignorecase
set smartcase
set wrapscan
set fileignorecase
" Leader key mapping
nnoremap <Space> <Nop>
let g:mapleader = "\<Space>"
" File mappings
nnoremap <silent> <Leader>w :<C-u>write<CR>
nnoremap <silent> <Leader><Leader>w :<C-u>wall<CR>
nnoremap <silent> qq :<C-u>close<CR>
nnoremap <silent> QQ :<C-u>bdelete!<CR>
nnoremap <silent> <Leader>q :<C-u>qall<CR>
nnoremap <silent> <Leader>Q :<C-u>qall!<CR>
nnoremap <silent> <Leader>f :<C-u>Explore<CR>
" Move mappings
nnoremap <expr> j v:count ? 'j' : 'gj'
nnoremap <expr> k v:count ? 'k' : 'gk'
xnoremap <expr> j v:count ? 'j' : 'gj'
xnoremap <expr> k v:count ? 'k' : 'gk'
nnoremap H ^
xnoremap H ^
nnoremap L $
xnoremap L $
inoremap <C-a> <Home>
inoremap <C-e> <End>
inoremap <C-h> <left>
inoremap <C-l> <right>
nnoremap <Leader><Tab> <C-^>