-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
55 lines (43 loc) · 1.26 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
execute pathogen#infect()
syntax on
set background=dark
colorscheme solarized
set ts=4
set shiftwidth=4
set expandtab
set smarttab
set smartindent
let mapleader = "-"
let maplocalleader = "\\"
" Make '-' delete the current line and paste it below.
noremap <leader>- ddp
" Make '_' delete the current line and paste it above.
noremap <leader>_ ddkkp
" Ctrl-U in insert mode capitalizes the word just typed.
inoremap <c-u> <esc>bveUEi
" Same as above, but for normal mode.
" TODO: Should preserve cursor position, but currently moves it to
" the end of the altered word.
" TODO: off for now, conflicts with 'scroll up half a screen'
"nnoremap <c-u> bveUE
" Edit this file easily
nnoremap <leader>ev :vsplit $MYVIMRC<cr>
nnoremap <leader>sv :source $MYVIMRC<cr>
" Add quotes around words
nnoremap <leader>" viw<esc>a"<esc>hbi"<esc>lel
nnoremap <leader>' viw<esc>a'<esc>hbi'<esc>lel
" In visual mode too
vnoremap <leader>" <esc>`<i"<esc>`>la"<esc>`>ll
vnoremap <leader>' <esc>`<i'<esc>`>la'<esc>`>ll
nnoremap H ^
nnoremap L $
" Make it easier leave insert mode
inoremap jk <esc>
inoremap <esc> <nop>
"Fix paste bug by disabling bracketed paste
set t_BE=
" Autocmds
augroup filetype_html
autocmd!
autocmd FileType html nnoremap <buffer> <localleader>f Vatzf
augroup END