-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvimrc
73 lines (59 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
set nocompatible
set bg=dark
set hidden
set undofile
set noswapfile
set noshowmode
set number
set showmatch
set nofoldenable
" completion
set completeopt=menu,menuone,noselect
set shortmess+=c
" search
set hlsearch
set ignorecase
set incsearch
set smartcase
nnoremap n nzzzv
nnoremap N Nzzzv
" indentation
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
" space leader
let mapleader = " "
" leader mappings
map <Leader>n :bn<CR>
map <Leader>p :bp<CR>
map <Leader>w :bp \| bd #<CR>
map <Leader>a :A<CR>
map <Leader>6 <C-^>
" window navigation
map <C-j> <C-W>j
map <C-k> <C-W>k
map <C-h> <C-W>h
map <C-l> <C-W>l
" fast quit
map <Leader>q :q!<CR>
" netrw
let g:netrw_fastbrowse = 0
" filetype markdown
autocmd FileType markdown setlocal textwidth=100
autocmd FileType markdown setlocal spell spelllang=en_us
" diff
set diffopt+=context:1000,vertical
" starting in diff
if &diff
set diffopt+=context:1000,vertical
set noswapfile
au BufEnter,BufNew * if &diff | syntax off | endif
map <Leader>q :qa<CR>
endif
" Don't show quickfix in buffer lists
augroup qf
autocmd!
autocmd FileType qf set nobuflisted
augroup END
" vim: ts=2 sw=2 et