oni icon indicating copy to clipboard operation
oni copied to clipboard

There's no way to remap command-t on a Mac

Open dlee opened this issue 8 years ago • 2 comments

Right now, pressing command-t on a Mac launches the "Type to search symbol..." dialog, and there's no way to override that. I want command-t to create a new tab instead.

Things I've tried:

  • nnoremap <m-t> :tabnew<CR> in init.vim
  • au! BufNewFile,BufReadPost * nnoremap <m-t> :tabnew<CR> in init.vim
  • oni.input.unbind("<m-t>") in config.tsx

dlee avatar Mar 28 '18 07:03 dlee

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.

oni-bot avatar Mar 28 '18 07:03 oni-bot

Hi!

Think this could be to do with the perhaps confusing names we inherit from the library we use to resolve keys....

That said, I think you should be able to do the following to get the mappings you want if you replace <m-t> with <c-t>.

  • nnoremap <c-t> :tabnew<CR> in init.vim
  • au! BufNewFile,BufReadPost * nnoremap <c-t> :tabnew<CR> in init.vim
  • oni.input.unbind("<c-t>") in config.tsx

c binds to control/command and m (meta) binds to the Windows keys and equivalent across other OSs.

CrossR avatar Mar 28 '18 11:03 CrossR