dhruvasagar / vim-table-mode

VIM Table Mode for instant table creation.
2.11k stars 96 forks source link

feature request: swap pipe and backslash when table mode is on #100

Closed alok closed 7 years ago

alok commented 8 years ago

Or add an option for that functionality. This makes typing tables much faster.

dhruvasagar commented 7 years ago

You can achieve this urself with the following code in your vimrc :

augroup TableMode
  au!

  autocmd User TableModeEnabled imap \ <Bar>
  autocmd User TableModeDisabled iunmap \
augroup END
alok commented 7 years ago

That didn't quite work, but this does:

augroup TableMode
  au!
  autocmd User TableModeEnabled imap <buffer> <bslash>
<Plug>(table-mode-tableize)
  autocmd User TableModeEnabled inoremap <buffer> <bar> <bslash>
  autocmd User TableModeDisabled silent! iunmap <buffer> <bslash>
  autocmd User TableModeDisabled silent! iunmap <buffer> <bar>
augroup END

-- Alok

On Wed, Jan 4, 2017 at 10:33 PM, Dhruva Sagar notifications@github.com wrote:

You can achieve this urself with the following code in your vimrc :

augroup TableMode au!

autocmd User TableModeEnabled imap \ autocmd User TableModeDisabled iunmap \augroup END

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dhruvasagar/vim-table-mode/issues/100#issuecomment-270574299, or mute the thread https://github.com/notifications/unsubscribe-auth/AH8KTC1OrAQwJfiv-s_UXUna91LhzDToks5rPI6-gaJpZM4KeQh9 .

dhruvasagar commented 7 years ago

That's odd, it worked for me though.

dhruvasagar commented 7 years ago

By default the \ is the 'leader' key, so perhaps you have other leader mappings and that may conflict, or in the least cause delays. Although it's rare to have leader mappings for insert mode.