-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
executable file
·86 lines (63 loc) · 1.61 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
" Set utf8 as standard encoding
set encoding=utf8
set nocompatible
filetype off
" Set runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" Plugins
Plugin 'airblade/vim-gitgutter'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'sgur/vim-editorconfig'
Plugin 'tpope/vim-repeat'
Plugin 'tpope/vim-surround'
" All plugins must be added before the following line
call vundle#end()
" Load matchit.vim, but only if the user hasn't installed a newer version
if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# ''
runtime! macros/matchit.vim
endif
filetype plugin indent on
" Use ag in CtrlP for listing files
let g:ctrlp_user_command = 'ag %s -l --hidden --nocolor -g ""'
" ag is fast enough that CtrlP doesn't need to cache
let g:ctrlp_use_caching = 0
" Change mapleader
let mapleader = "\<Space>"
" Open configuration
nmap <leader>rc :tabedit $MYVIMRC<cr>
" Reload configuration
nmap <leader>src :source $MYVIMRC<cr>
" Add theme
syntax on
" Go to start of word
nmap 0 ^
" Allow backspace in insert mode
set backspace=indent,eol,start
" Set tab size
set shiftwidth=2
set tabstop=2
" Always show status line
set laststatus=2
" Ignore case of search
set ignorecase
" Keep at least 4 lines below cursor
set scrolloff=4
" Auto indent with soft-wrap
set autoindent
set breakindent
set breakindentopt=shift:2
set linebreak
set textwidth=0
set wrap
set wrapmargin=0
" Show line numbers
set number
" Show character limit
set colorcolumn=80
" Turn off backup files
set nobackup
set noswapfile
set nowritebackup