簡體   English   中英

如何禁用vim領導鍵的超時?

[英]How to disable the timeout on the vim leader key?

當我在vim中按d時 ,我的狀態行說d並且無限地等待進一步的指示。

當我按我的領導( 我來說),它等待了一會兒輸入,然后超時。

如何禁用此功能,並使其無限期等待進一步說明?

來自:help ttimeout

                                'timeout' 'to' 'notimeout' 'noto'
'timeout' 'to'          boolean (default on)
                        global
                                                *'ttimeout'* *'nottimeout'*
'ttimeout'              boolean (default off)
                        global
                        {not in Vi}
        These two options together determine the behavior when part of a
        mapped key sequence or keyboard code has been received:

        'timeout'    'ttimeout'                action
           off          off                    do not time out
           on           on or off              time out on :mappings and key codes
           off          on                     time out on key codes

        If both options are off, Vim will wait until either the complete
        mapping or key sequence has been received, or it is clear that there
        is no mapping or key sequence for the received characters.  For
        example: if you have mapped "vl" and Vim has received 'v', the next
        character is needed to see if the 'v' is followed by an 'l'.
        When one of the options is on, Vim will wait for about 1 second for
        the next character to arrive.  After that the already received
        characters are interpreted as single characters.  The waiting time can
        be changed with the 'timeoutlen' option.
        On slow terminals or very busy systems timing out may cause
        malfunctioning cursor keys.  If both options are off, Vim waits
        forever after an entered <Esc> if there are key codes that start
        with <Esc>.  You will have to type <Esc> twice.  If you do not have
        problems with key codes, but would like to have :mapped key
        sequences not timing out in 1 second, set the 'ttimeout' option and
        reset the 'timeout' option.

        NOTE: 'ttimeout' is reset when 'compatible' is set.

來自評論:

基本上,ESC是箭頭和其他控制序列的“領導者”,因此您可能必須按ESC兩次而不是一次。 - @Anton Kovalenko

運行set notimeoutset ttimeout解決了我的問題。 - @nightcracker

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM