I've set the mapping keys as follows:
" Easy indent for code blocks
nmap <tab> v>
nmap <s-tab> v<
vmap <tab> >gv
vmap <s-tab> <gv
That works good. But, when I installed UltiSnips
by vundle, the Tab key does't work as indent action, it will remove multi-line codes which I selected. I know this is because the default setting of UltiSnips
. I would like to remain the Tab mapping for UltiSnips
to trigger its functions, How do I solve the problem of using the TAB key to indent code blocks? Thanks!
tab
collided with the supertab plugin. Note if you're using vim over putty then certain key combos may not work out of the box such as<f5>
or<c-tab>
in that case try something likelet g:UltiSnipsExpandTrigger = '<c-j>'
which also has the benefit of being more comfortable to type than<c-tab>
– Besprent