vim/config/maps.vim

31 lines
736 B
VimL
Raw Permalink Normal View History

2017-01-12 10:06:53 +00:00
" words backwards with SHIFT-w
nnoremap <silent> W b
" INSERT mode -> go back to NORMAL mode
imap <silent> <C-J> <Esc>
2016-12-14 18:09:47 +00:00
" new tab
nmap <silent> <C-t> :tabnew<CR>
" new line shortcut (ctrl+o)
2017-01-12 10:06:53 +00:00
nnoremap <silent> ee o<Esc>
" switch tabs
nmap <silent> <C-h> :tabprevious<CR>
nmap <silent> <C-l> :tabnext<CR>
" split windows
nnoremap <silent> <C-W>\| :vnew<CR>
nnoremap <silent> <C-W>= :new<CR>
" bind windows: scroll + cursor
let bounded_wins=0
nmap <silent> <F12> :if (bounded_wins%2 == 0) \| set scrollbind \| set cursorbind \| else \| set noscrollbind \| set nocursorbind \| endif \| let bounded_wins=bounded_wins+1<CR>
2016-12-14 18:09:47 +00:00
2017-01-12 10:06:53 +00:00
" autoread (real-time changes)
nmap <silent> <F9> :set autoread<CR>
2016-12-14 18:09:47 +00:00
2017-01-12 10:06:53 +00:00
" reloads file
nmap <silent> <F5> :e!<CR>