为什么小写[i]在可视块模式下不起作用? [英] Why lowercase [i] does not work in visual block mode?

查看:102
本文介绍了为什么小写[i]在可视块模式下不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我经常忘记如何在可视块模式下插入并再次阅读答案 Shift + .

I often forget how to insert in visual block mode and read again the answer Shift+i.

Honghe.Wu 在他的评论中感到惊奇:

As Honghe.Wu wonders in his comment:

为什么小写字母 i 在可视模式下不起作用?

Why lowercase i does not work in visual mode?

什么是技术原因?

推荐答案

在所有可视模式下, i a 的行为均不同于正常模式,原因是: i a 用于将选择范围扩展到文本对象.如您在:help视觉操作员:

The reason because i and a are not behave like in normal mode in all visual modes is that i and a are used to extend the selection to text objects. As you can see in :help visual-operators:

4. Operating on the Visual area

The operators that can be used are:
    ~   switch case                 
    d   delete                      
    c   change (4)                  
    y   yank                        
    >   shift right (4)                 
    <   shift left (4)                  
    !   filter through external command (1)     
    =   filter through 'equalprg' option command (1)    
    gq  format lines to 'textwidth' length (1)      

The objects that can be used are:
    aw  a word (with white space)           
    iw  inner word                  
    aW  a WORD (with white space)           
    iW  inner WORD                  
    as  a sentence (with white space)           
    is  inner sentence                  
    ap  a paragraph (with white space)          
    ip  inner paragraph                 
    ab  a () block (with parenthesis)           
    ib  inner () block                  
    aB  a {} block (with braces)            
    iB  inner {} block                  
    at  a <tag> </tag> block (with tags)        
    it  inner <tag> </tag> block            
    a<  a <> block (with <>)                
    i<  inner <> block                  
    a[  a [] block (with [])                
    i[  inner [] block                  
    a"  a double quoted string (with quotes)        
    i"  inner double quoted string          
    a'  a single quoted string (with quotes)        
    i'  inner simple quoted string          
    a`  a string in backticks (with backticks)      
    i`  inner string in backticks           

Additionally the following commands can be used:
    :   start Ex command for highlighted lines (1)  
    r   change (4)                  
    s   change                      
    C   change (2)(4)                   
    S   change (2)                  
    R   change (2)                  
    x   delete                      
    D   delete (3)                  
    X   delete (2)                  
    Y   yank (2)                    
    p   put                     
    J   join (1)                    
    U   make uppercase                  
    u   make lowercase                  
    ^]  find tag                    
    I   block insert                    
    A   block append                    

因此,只需在可视块模式下使用block insert大写字母 I block append大写字母 A 命令即可.

So just use the block insert uppercase I or the the block append uppercase A commands in visual block mode.

这篇关于为什么小写[i]在可视块模式下不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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