I'm using these two binding for indentation and dedentation of a visual selected block of text.
" Indentation
vmap <TAB> >gv
" Dedentation
vmap <S-TAB> <gv
When I dedent with my binding everything is fine, but if I try to indent with <Tab>
the text gets deleted. I am not using any plugins and this is my vimrc
:
"-----------------------------------------------
" my .VIMRC, the root |
"-----------------------------------------------
" only if not set before:
" use vim-defaults instead
" of vi-defaults (easier, more user friendly)
if &compatible
set nocompatible
endif
syntax on
set relativenumber " hybrid
set number " hybrid
set mouse=a
set shell=/bin/bash
"case-insensitive searching
set ignorecase
set smartcase
" Disable audible/visual bells
set noerrorbells
set novisualbell
set t_vb=
" setting formating stuff
set tabstop=4
set shiftwidth=4
set autoindent
"show matching pairs -> () [] {}
set showmatch
" copy to clipboard
noremap <C-y> "+y
" paste from clipboard
noremap <C-p> "+p
" Indentation
vmap <TAB> >gv
" Dedentation
vmap <S-TAB> <gv
The version I'm using is VIM - Vi IMproved 9.0
. Does anyone have the same problem or have an idea where the root of this problem is?
xnoremap
—vmap
is probably not what you want. cf. How to debug my vimrc, How to debug a mapping.vimrc
:vim -u NONE -i NONE
enter the map command in the vim command mode:
and try to reproduce the problem.vim -u NONE -i NONE
doesn't have).