I would like to remove the default behaviour of <space> (to switch to the other pane). So, I can use it as a "leader" key, to put various commands under it.
For example, I have created the following. Which I have in also in Vim and committed to muscle memory.
" Yank dir-path, path and filename into the clipboard (escape spaces)
nnoremap <wait> <space>yd :!printf %d | pbcopy<cr>
nnoremap <wait> <space>yf :!printf %f:p:gs? ?\\ ? | pbcopy<cr>
nnoremap <wait> <space>yF :!printf %f:gs? ?\\ ? | pbcopy<cr>
" clear highlighting
nnoremap <wait> <space>h :nohl<cr>
The above commands do work. However pressing <space>x with an unassigned key x switches the pane. Typos happen sometimes and lead to a switch of the pane. I would like to prevent this and completely disable <space> for switching panes. Any ideas how to achieve that? unmap <space> says there no such normal mode mapping.