luan / vimfiles

The Vim Configuration. Uses vim-plug to manage plugins.
172 stars 58 forks source link

Conflicting shortcuts for whitespace/noh, and commenting/history #117

Closed mdelillo closed 6 years ago

mdelillo commented 6 years ago

<space> is mapped to unhighlight here, but it seems to be getting clobbered by the vim-better-whitespace plugin. I even added the following to my .vimrc.local but it doesn't appear to do anything:

nnoremap <silent> <space> :noh<cr>
unmap <space><space>

When I run :map <space> in vim, I see this:

n  <Space><Space>   :<C-U>exe '.,+'.v:count' StripWhitespace'<CR>
x  <Space>       :StripWhitespace<CR>
n  <Space>       :<C-U>set opfunc=<SNR>107_StripWhitespaceMotion<CR>g@

There's another collision with <Leader>/. Here it is used to toggle comments, but here it's overwritten for history search. This one I was able to fix by remapping to TComment in the .vimrc.local.

luan commented 6 years ago

@mdelillo I forgot about those TComment bindings, since I use gc myself. But fixed them now. Thanks for the thorough research into causes. Moreover, :FZFHistory/ is now bound to <leader>?.

For the vim-better-whitespace issue, I couldn't actually reproduce it here, but I made a change that should prevent it from binding <space>. Can you check if that works for you and close this issue here?

Thanks!

mdelillo commented 6 years ago

Works perfect, thanks!