-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
103 lines (74 loc) · 1.68 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
set nocompatible
" Vim pathogen for easier plugin installation
execute pathogen#infect()
set grepprg=grep\ -nH\ $*
" Syntax highlighting
syntax enable
syntax on
filetype on
filetype plugin on
" Underlines current line
set cursorline
" Better case searching
set ignorecase
set smartcase
" Highlight searches
set hlsearch
set autoindent
filetype plugin indent on
" search will center on the line it's found in.
nnoremap N Nzz
nnoremap n nzz
" Swap ; and : Convenient.
nnoremap ; :
nnoremap : ;
" In visual mode as well
vnoremap ; :
vnoremap : ;
" Move vertically by visual line
nnoremap j gj
nnoremap k gk
" Everyone one loves line numbers, right?
set nu
" Get out of insert mode with jk
inoremap jk <Esc>
" Create Blank Newlines and stay in Normal mode
nnoremap <silent> zj o<Esc>k
nnoremap <silent> zk O<Esc>j
" Y now yanks from current pos thru the end of the line
" Ignoring newline at the end
nnoremap <silent> Y y$
vnoremap // "1y/<C-R>1<CR>
inoremap ;w <Esc>:w
" Code folding
set foldenable
set foldlevelstart=10
set foldmethod=indent
nnoremap <space> za
set showcmd
" set cpoptions+=$
" Set colors--Makes vimdiff easier
colorscheme desert
highlight! link DiffText Todo
let g:closetag_html_style=1
source ~/.vim/bundle/closetag/closetag.vim
" Uses tabular plugin to align by = and :
nnoremap <Tab> :Tab /=<CR>:Tab /:<CR>:Tab /,<CR>
vnoremap <Tab> :Tab /=<CR>:Tab /:<CR>:Tab /,<CR>
" Enable mouse control
set mouse=a
" Swap ' and ` for marks
nnoremap ' `
nnoremap ` '
" Nicer scrolling
set so=10
" Backspace deletes backwards
nnoremap X
" No more error sounds
set noerrorbells
let @p = ';%s/^\s*>>> //;%s/^\s*\.\.\. //gg=G'
"
set clipboard+=unnamed
set spell spelllang=en_us