标签视觉选择 [英] Tabbing visual selection

查看:32
本文介绍了标签视觉选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在许多 GUI 中,当我选择一段文本然后点击 TabShift+Tab 按钮时,所选部分将缩进或出去.

In many GUIs when I select a section of text and then hit the Tab or Shift+Tab button the selected section will indent in or out.

在 VIM 中,我可以选择一个可视部分,然后点击 <> 键来更改缩进,但是一旦我点击 < 键我的选择被清除,所以我再次选择该部分并再次点击 < .当我试图将某些内容缩进几站并想要视觉反馈时,这真的很烦人.

In VIM I can select a visual section and then hit the < or > key to change indenting, however once I hit the < key my selection is cleared so I am stuck selecting the section again and hitting < again. This gets really annoying when I am trying to indent something a few stops in and want visual feedback.

无论如何要在保持当前选定文本的同时在 vim 中缩进和缩进内容吗?

Is there anyway to indent stuff in and out in vim while keeping the current selected text selected?

是否有重新映射 TabShift+Tab 的技巧,以便它们在视觉模式下以这种方式表现?

Is there a trick to re-map Tab and Shift+Tab so they behave in this way in visual mode?

推荐答案

vmap <Tab> >gv
vmap <S-Tab> <gv

这篇关于标签视觉选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆