This repository has been archived by the owner on Feb 27, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
vimrc.local
104 lines (88 loc) · 2 KB
/
vimrc.local
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
102
103
104
set mouse=a
set ruler
set term=xterm-256color
color fruit
color camo
color desertEx
" color ironman
" sy off
" when using a projector, use a light color scheme and no syntax
function Pres ()
:colorscheme dawn
:syntax off
endfunction
map <Leader>pres :call Pres()<CR>
set nohls
set hls
noremap <Leader><Space> :noh<CR>:call clearmatches()<CR>
" map <Leader>. :tabn<CR>
" this makes it use the system clipboard
" whenever yanking to the "unnamed" register.
set clipboard=unnamed
set wrap
set modelines=0
set tabstop=2
set expandtab
set softtabstop=2
set shiftwidth=2
set expandtab
set cul
set nocul
set ttyfast
set autoindent
set showmode
set showcmd
set visualbell
nnoremap / /\v
vnoremap / /\v
if exists("&colorcolumn")
set colorcolumn=80
endif
nnoremap j gj
nnoremap k gk
" make xX use the "x" register, rather than the default register
" d already deletes and yanks to the default register
noremap x "xx
noremap X "xX
" make cC yank to the "c" register.
" it's rare that you want to correct and then re-paste, but possible.
noremap c "cc
noremap C "cC
" this bit makes Q, W and WQ work just like their lowercase counterparts
com -bang Q q<bang>
com -bang W w<bang> <args>
com -bang WQ wq<bang> <args>
com -bang Wq wq<bang> <args>
" super annoying typos if you maintain a pacakge manager
iab pacakges packages
iab pacakge package
iab verison version
iab verisons versions
iab nodE_modules node_modules
iab teh the
iab hte the
iab wiht with
iab eaisly easily
iab ofr for
" shift to move the window, not the cursor.
inoremap JJJJ <Esc><C-e><C-e><C-e>
inoremap KKKK <Esc><C-y><C-y><C-y>
inoremap HHHH <Esc>zhzhzhzhzhzh
inoremap LLLL <Esc>zlzlzlzlzlzl
map J <C-e>
map K <C-y>
map H zhzh
map L zlzl
" control to switch windows
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-h> <C-w>h
map <C-l> <C-w>l
" f1, you are my nemesis.
map <F1> <Esc>
imap <F1> <Esc>
" escape is so far away
noremap <Leader>m <Esc>
inoremap <Leader>m <Esc>
au BufNewFile,BufRead *.ejs set filetype=ejs
au BufNewFile,BufRead *.ejs so $HOME/.vim/syntax/jst.vim