summaryrefslogtreecommitdiff
path: root/.config/nvim/config/keys.vim
blob: ffd166ce300d5f3d1a7ea4b0ae1a4ec5e3c55ed4 (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
" leader
nnoremap <SPACE> <Nop>
let mapleader=" "

" buffer pane navigation
nnoremap <A-Left> <C-w><Left>
nnoremap <A-Up> <C-w><Up>
nnoremap <A-Right> <C-w><Right>
nnoremap <A-Down> <C-w><Down>

nnoremap <C-Left> <cmd>tabprevious<CR>
nnoremap <C-Right> <cmd>tabnext<CR>

" buffer resize
nnoremap <A-+> <C-w>+
nnoremap <A--> <C-w>-
nnoremap <A-<> <C-w><
nnoremap <A->> <C-w>>

" esc / quit
map <ESC><C-c> <CR>
nnoremap <C-q> <cmd>q<CR>
nnoremap <C-S-q> <cmd>qall<CR>

" save
nnoremap <silent> <C-s> <cmd>w<CR>
inoremap <silent> <C-s> <ESC><cmd>w<CR>