summaryrefslogtreecommitdiff
path: root/plugin/misc-bindings.vim
blob: 470bbeb4a0517eb1b294fd163a4cb303fb4258e1 (plain)
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
" misc-bindings.vim
" Every miscellaneous key binding will go here.

" << That stupid goddamned help key that you will invaribly hit constantly
" while aiming for escape >> -- Steve Losh
inoremap <F1> <Esc>
vnoremap <F1> <Esc>
nnoremap <F1> <Esc>

"inoremap <silent> <Esc> <Esc>l

" << it's one less key to hit every time I want to save a file >>
"   -- Steve Losh (again)
"nnoremap ; :
"vnoremap ; :

" From Kalenz's Vim config. Life changing.
nnoremap <Space> <C-w>

" halfr personnal shortcurts
nnoremap <Space>t <C-w>v<Return>
nnoremap <Space>- <C-w>s<Return>
nnoremap <Space><Space> <C-w>w

" save
nnoremap <Space><Return> :w<Return>
nnoremap <Space>w :w<Return>
" save and quit
nnoremap <Space><Backspace> :x<Return>

nnoremap <Space>! :tab sball<Return>

nnoremap <F5> :make<Return>

" I DONT WANT TO USE AN ENCRYPTION KEY
" http://stackoverflow.com/questions/3878692/aliasing-a-command-in-vim
" cnoreabbrev <expr> X ((getcmdtype() is# ':' && getcmdline() is# 'X')?('x'):('X'))