-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
77 lines (59 loc) · 1.46 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
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
" My bundles here:
"
" original repos on GitHub
Bundle 'tpope/vim-fugitive'
Bundle 'Valloric/YouCompleteMe'
" ...
filetype plugin indent on " required!
syntax on
set background=dark
" jump to the last position when reopening a file
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal g'\"" | endif
filetype indent on
set showcmd " Show (partial) command in status line.
set modeline
set showmatch " Show matching brackets.
set smartcase " Do smart case matching
set incsearch " Incremental search
set autowrite " Automatically save before commands like :next and :make
set number
set shiftwidth=2
set tabstop=2
set expandtab
set backup
set backupdir=~/.vim/backup
set ruler
set exrc
set backspace=2
set autoindent
set smartindent
set hlsearch
au! BufRead,BufNewFile *.py setlocal noexpandtab
au! BufRead,BufNewFile .vimrc map <F5> :so %<CR>
vnoremap > >gv
vnoremap < <gv
" put q register in newline at eof
noremap qp maGo"qp
" delete last line back into q register
noremap qd G0"qd$dd:w`a
nmap Q A
let mapleader = ","
let maplocalleader = ","
let @n = ".n"
let @j = "j."
let @k = "k."
highlight clear Search
highlight Search cterm=underline
nmap :nohl<CR>
nmap ,rc :split ~/.vimlocal/vimrc<CR>
nmap ,vs :source ~/.vimrc<CR>
nmap ,rr :?^!
au BufRead,BufEnter *.py set expandtab