如何缩进gVim中的选择(Win32) [英] How to indent a selection in gVim (Win32)

查看:138
本文介绍了如何缩进gVim中的选择(Win32)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想缩进一段文字.

我能够在gVim的 Linux 版本中做到这一点.

I am able to do this in the Linux build of gVim.

我是在gVim的状态中执行此操作的,而我不在插入或可视模式下.底部的栏在左侧为空白,在右侧显示行号和百分比.

I do this in the state of gVim where I'm not in the insert or visual mode. The bar at the bottom is blank on the left, and the line number and percentage are showing on the right hand side.

然后,我执行以下过程:我通过单击并拖动来选择一个文本块.然后我按 Shift + ..之后,我按下 Esc ,文本块将在选项卡上移动.

Then I perform the following procedure: I select a block of text via click and drag. Then I hit Shift + .. After that, I hit Esc and the block of text will move over a tab.

但是,如果我在 Windows 中执行此操作,它将仅用>替换该块.

If I do this in Windows however, it just replaces the block with >.

我正在运行库存的Windows rc文件和gVim 7.1版.

I am just running the stock Windows rc file and version 7.1 of gVim.

推荐答案

如果您首先输入SHIFT-V,然后使用shift +箭头选择文本,则会缩进. 您还可以使用SHIFT-V,并使用"hjkl"选择块.

If you first enter SHIFT-V, and than shift+arrows to select the text, it will indent. You can also use SHIFT-V, and use 'hjkl' to select the block.

如果使用Shift +箭头或鼠标选择文本块,则该文本块将不起作用,并且所选内容将被替换为'>'.更改selectmode时可以更改;

If you use shift+arrows or the mouse to select a block of text, it does not work and the selection will be replaced with a '>'. This can be changed when you change selectmode;

设置selectmode =鼠标,键

set selectmode=mouse,key

  • 执行mswin后的默认设置

设置selectmode =键

set selectmode=key

  • 现在您可以用鼠标选择并按'>'缩进

设置selectmode =

set selectmode=

  • 现在您既可以使用鼠标键,也可以使用移动的箭头键进行选择,然后按>"进行缩进

如果将其添加到vimrc中,请在执行mswin后执行

If you add this to your vimrc, do it after behave mswin

这篇关于如何缩进gVim中的选择(Win32)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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