I just remapped some keys in my .vimrc
and I'm getting some wierd behavior.
When I select text in visual mode, and hit the delete key, it surrounds the highlighted text with ""...
Here's the relevant pieces of my .vimrc
"Using Vundle
Bundle 'tpope/vim-surround'
let mapleader= ","
let g:mapleader= ","
set backspace=eol,start,indent
"""""""""""""""""""""""""""""""""""""""""""""""""""
" => Surround Vim Shortcuts
"""""""""""""""""""""""""""""""""""""""""""""""""""
vmap ' S'
vmap " S"
vmap { S{
vmap } S}
vmap ( S(
vmap ) S)
vmap [ S[
vmap ] S]
" tags
vmap < S<
vmap > S>
" addressing the problem introduced by tags
vnoremap << <
vnoremap >> >
map <leader>s' ysiw'
map <leader>s" ysiw"
map <leader>s( ysiw)
map <leader>s[ ysiw]
map <leader>s{ ysiw}
map <leader>d' yss'
map <leader>d" yss"
map <leader>d( yss)
map <leader>d[ yss]
map <leader>d{ yss}
vmap <Leader>S <Plug>VSurround
Example:
def persisted?
false
end
# I select it in visual mode, hit delete and it becomes:
"def persisted?
false
end"
I know a lot of this configuration is personal preference so any advice is welcome, but more importantly, why am I getting this behavior?
I do have the snipmate plugin installed.