+
    j,iR'                      ^ RI Ht ^ RIt^ RIt^ RIHt ^ RIHt ^ RIH	t	H
t
HtHt ^ RIHt ^ RIHtHtHtHt ^ RIHt ^ R	IHt ^ R
IHtHtHtHtHtHt ^ RIH t H!t!H"t"H#t#H$t$H%t%H&t&H't'H(t(H)t)H*t*H+t+H,t, ^ RI-H.t. ^ RI/H0t0 ^ RI1H2t2H3t3 ^ RI4H5t5H6t6 ^ RI7H8t8 ^ RI9H:t: ^ RI;H<t<H=t=H>t> ^RI?H@t@HAtAHBtB ^RICHDtD RR.tE]3tF]P                  tG]GR,           tH ! R R]4      tI ! R R4      tJ]	]F.]J3,          tK]! R]KR7      tLR R ltM]	]F]J.R3,          tN]! R ]NR7      tOR! R" ltP]R# R$ l4       tQ]R% R& l4       tR]R' R( l4       tS]R) R* l4       tT]R+ R, l4       tUR- R. ltVR/ R0 ltWR# )1    )annotationsN)Enum)
accumulate)CallableIterableTupleTypeVar)get_app)Bufferindentreshape_textunindent)ClipboardData)Document)Always	ConditionFilterhas_argis_read_onlyis_searching)in_paste_modeis_multilinevi_digraph_modevi_insert_modevi_insert_multiple_modevi_modevi_navigation_modevi_recording_macrovi_replace_modevi_replace_single_modevi_search_direction_reversedvi_selection_modevi_waiting_for_text_object_mode)Vt100Parser)DIGRAPHS)KeyPressKeyPressEvent)CharacterFind	InputMode)Keys)SearchDirection)	PasteModeSelectionStateSelectionType)ConditionalKeyBindingsKeyBindingsKeyBindingsBase)get_by_nameload_vi_bindingsload_vi_search_bindings
0123456789c                  &    ] tR t^<tRtRtRtRtRtR# )TextObjectType	EXCLUSIVE	INCLUSIVELINEWISEBLOCK N)	__name__
__module____qualname____firstlineno__r8   r9   r:   r;   __static_attributes__r<       H/usr/lib/python3/dist-packages/prompt_toolkit/key_binding/bindings/vi.pyr7   r7   <   s    IIHErB   r7   c                      ] tR t^CtRt^ ]P                  3R R llt]R R l4       t	R R lt
R R	 ltR
 R ltR R ltRtR# )
TextObjectz}
Return struct for functions wrapped in ``text_object``.
Both `start` and `end` are relative to the current cursor position.
c               $    V ^8  d   QhRRRRRR/# )   startintendtyper7   r<   )formats   "rC   __annotate__TextObject.__annotate__I   s$      ".<rB   c                	*    Wn         W n        W0n        R # N)rH   rJ   rK   )selfrH   rJ   rK   s   &&&&rC   __init__TextObject.__init__I   s     
	rB   c                   V ^8  d   QhRR/# )rG   returnr.   r<   )rL   s   "rC   rM   rN   Q   s     , , ,rB   c                	    V P                   \        P                  8X  d   \        P                  # V P                   \        P
                  8X  d   \        P
                  # \        P                  # rP   )rK   r7   r:   r.   LINESr;   
CHARACTERSrQ   s   &rC   selection_typeTextObject.selection_typeP   sJ    99/// &&&99,,, &&& +++rB   c                   V ^8  d   QhRR/# )rG   rU   tuple[int, int]r<   )rL   s   "rC   rM   rN   Y   s     ( ( (rB   c                    V P                   V P                  8  d   V P                   V P                  3# V P                  V P                   3# )z1
Return a (start, end) tuple where start <= end.
)rH   rJ   rY   s   &rC   sortedTextObject.sortedY   s:     :: ::txx''88TZZ''rB   c                    V ^8  d   QhRRRR/# )rG   documentr   rU   r]   r<   )rL   s   "rC   rM   rN   b   s      x O rB   c                   V P                  4       w  r#TpV P                  \        P                  8X  d7   VP	                  W4P
                  ,           4      ^,          ^ 8X  d
   V^,          pV P                  \        P                  8X  d
   V^,          pV P                  \        P                  8X  d   VP	                  W$P
                  ,           4      w  rVVP                  V^ 4      VP
                  ,
          pVP	                  W4P
                  ,           4      w  rVVP                  V\        VP                  V,          4      4      VP
                  ,
          pW#3# )a  
Return a (start, end) tuple with start <= end that indicates the range
operators should operate on.
`buffer` is used to get start and end of line positions.

This should return something that can be used in a slice, so the `end`
position is *not* included.
)r_   rK   r7   r8   translate_index_to_positioncursor_positionr9   r:   translate_row_col_to_indexlenlines)rQ   rb   rH   rJ   docrowcols   &&     rC   operator_rangeTextObject.operator_rangeb   s    [[]
 II111//6I6I0IJ1MQRR 1HC990001HC99///66u?R?R7RSHC223:S=P=PPE66s=P=P7PQHC..sC		#4GH%%&  zrB   c                    V ^8  d   QhRRRR/# )rG   bufferr   rU   r]   r<   )rL   s   "rC   rM   rN      s      v / rB   c                    V P                  VP                  4      w  r#W!P                  ,          pW1P                  ,          pVP                  P                  V4      w  r$VP                  P                  V4      w  r4W#3# )z'
Return a (start_line, end_line) pair.
)rl   rb   re   rd   )rQ   ro   from_to_s   &&   rC   get_line_numbersTextObject.get_line_numbers   sl    
 ''8	'''
$$$ ??>>uE;;B?yrB   c                    V ^8  d   QhRRRR/# )rG   ro   r   rU   ztuple[Document, ClipboardData]r<   )rL   s   "rC   rM   rN      s     , ,& ,%C ,rB   c           	     T   V P                  VP                  4      w  r#W!P                  ,          pW1P                  ,          pV P                  \        P
                  8w  d
   V^,          p\        VP                  V\        W P                  R7      4      pVP                  4       w  rVWV3# )z1
Turn text object into `ClipboardData` instance.
)original_cursor_positionrK   )rl   rb   re   rK   r7   r:   r   textr-   rZ   cut_selection)rQ   ro   rq   rr   rb   new_documentclipboard_datas   &&     rC   cutTextObject.cut   s     ''8	'''
$$$ 99///!GBKKE@S@ST
 (0'='='?$++rB   )rJ   rH   rK   N)r=   r>   r?   r@   __doc__r7   r8   rR   propertyrZ   r_   rl   rt   r}   rA   r<   rB   rC   rE   rE   C   sG     &'~?W?W , ,(@, ,rB   rE   _TOF)boundc                    V ^8  d   QhRRRR/# )rG   key_bindingsr0   rU   z%Callable[..., Callable[[_TOF], _TOF]]r<   )rL   s   "rC   rM   rM      s      s! s!s!*s!rB   c                >   a  R\        4       RRRRRR/R V 3R lllpV# )zQ
Create a decorator that can be used to register Vi text object implementations.
filterno_move_handlerFno_selection_handlereagerc               0    V ^8  d   QhRRRRRRRRRRR	R
/# )rG   keys
Keys | strr   r   r   boolr   r   rU   zCallable[[_TOF], _TOF]r<   )rL   s   "rC   rM   2create_text_object_decorator.<locals>.__annotate__   sL     j jjj j #	j
 j 
 jrB   c                .   <a aaaa R VV VVVV3R llpV# )a:  
Register a text object function.

Usage::

    @text_object('w', filter=..., no_move_handler=False)
    def handler(event):
        # Return a text object for this key.
        return TextObject(...)

:param no_move_handler: Disable the move handler in navigation mode.
    (It's still active in selection mode.)
c                    V ^8  d   QhRRRR/# )rG   text_object_funcr   rU   r<   )rL   s   "rC   rM   Qcreate_text_object_decorator.<locals>.text_object_decorator.<locals>.__annotate__   s     S	$ S	$ S	$ S	$rB   c                \  <a  SP                   ! SR \        S,          RS/ R V 3R ll4       pS'       g8   SP                   ! SR \        ( S,          \        ,          RS/ R V 3R ll4       pS	'       g8   SP                   ! SR \        ( S,          \        ,          RS/ R V 3R ll4       pS # )r   r   c                    V ^8  d   QhRRRR/# rG   eventErU   Noner<   )rL   s   "rC   rM   dcreate_text_object_decorator.<locals>.text_object_decorator.<locals>.decorator.<locals>.__annotate__   s     7 7a 7D 7rB   c                f  < V P                   P                  p\        VP                  ;'       g    ^V P                  ;'       g    ^,          4      V n        S! V 4      pVP                  pVe   Ve	   V! W4       RV P                   P                  n        RV P                   P                  n        R# )   N)appvi_statestroperator_argarg_argoperator_func)r   r   text_objr   r   s   &   rC   _apply_operator_to_text_objectvcreate_text_object_decorator.<locals>.text_object_decorator.<locals>.decorator.<locals>._apply_operator_to_text_object   s    
 !99-- ("7"7"<"<1a!PQ
 ,E2
 !) 6 6'M,E!%2 48		""026		""/rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r      s     N NA N$ NrB   c                r   < S! V 4      pV P                   ;P                  VP                  ,          un        R# )z#
Move handler for navigation mode.
N)current_bufferre   rH   )r   text_objectr   s   & rC   _move_in_navigation_modepcreate_text_object_decorator.<locals>.text_object_decorator.<locals>.decorator.<locals>._move_in_navigation_mode   s,     #35"9K((88K<M<MM8rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r      s     R R1 R RrB   c                  < S! V 4      pV P                   pVP                  pVf   R# VP                  '       d   VP                  VP                  4      w  rEWBP
                  ,          pWRP
                  ,          pWCn        WRn        VP                  \        P                  8X  d   \        P                  Vn        R# \        P                  Vn        R# V P                   ;P
                  VP                  ,          un        R# )z"
Move handler for selection mode.
N)r   selection_staterJ   rl   rb   re   rx   rK   r7   r:   r.   rW   rX   rH   )r   r   buffr   rH   rJ   r   s   &     rC   _move_in_selection_modeocreate_text_object_decorator.<locals>.text_object_decorator.<locals>.decorator.<locals>._move_in_selection_mode   s     #35"9K //D&*&:&:O&. #%0%?%?%N
!5!55333CH@/2, '++~/F/FF3@3F3FO03@3K3KO0,,<<@Q@QQ<rB   addr#   r   r"   )
r   r   r   r   r   r   r   r   r   r   s
   f   rC   	decoratorNcreate_text_object_decorator.<locals>.text_object_decorator.<locals>.decorator   s    =FNS77, #!!;;()
  NN (!!;;'(
  RR> $#rB   r<   )r   r   r   r   r   r   r   s   ddddj rC   text_object_decorator;create_text_object_decorator.<locals>.text_object_decorator   s    *S	$ S	$j rB   r   )r   r   s   f rC   create_text_object_decoratorr      sD    jj !&j &+	j
 j jX ! rB   _OFc                    V ^8  d   QhRRRR/# )rG   r   r0   rU   z#Callable[..., Callable[[_OF], _OF]]r<   )rL   s   "rC   rM   rM   +  s      H HH(HrB   c                6   a  R\        4       RR/R V 3R lllpV# )zC
Create a decorator that can be used for registering Vi operators.
r   r   Fc               (    V ^8  d   QhRRRRRRRR/# )	rG   r   r   r   r   r   r   rU   zCallable[[_OF], _OF]r<   )rL   s   "rC   rM   /create_operator_decorator.<locals>.__annotate__2  s,     ? ??#)?=A?	?rB   c                &   <a aa R VV VV3R llpV# )z
Register a Vi operator.

Usage::

    @operator('d', filter=...)
    def handler(event, text_object):
        # Do something with the text object here.
c                    V ^8  d   QhRRRR/# )rG   r   r   rU   r<   )rL   s   "rC   rM   Kcreate_operator_decorator.<locals>.operator_decorator.<locals>.__annotate__?  s     0	! 0	!S 0	!S 0	!rB   c                   <a  SP                   ! SR \        ( S,          \        ,          RS/ R V 3R ll4       pSP                   ! SR \        ( S,          \        ,          RS/ R V 3R ll4       pS # )r   r   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   ^create_operator_decorator.<locals>.operator_decorator.<locals>.decorator.<locals>.__annotate__E  s     < <q <T <rB   c                   < SV P                   P                  n        V P                  V P                   P                  n        R# )z%
Handle operator in navigation mode.
N)r   r   r   r   r   )r   r   s   &rC   _operator_in_navigationicreate_operator_decorator.<locals>.operator_decorator.<locals>.decorator.<locals>._operator_in_navigation@  s.     4A		""027))		""/rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r   T  s     0 0a 0D 0rB   c                  < V P                   pVP                  pVe   VP                  \        P                  8X  d   \
        P                  pM@VP                  \        P                  8X  d   \
        P                  pM\
        P                  p\        VP                  VP                  ,
          VR7      pS! W4       RVn        R# R# )z$
Handle operator in selection mode.
NrK   )r   r   rK   r.   rW   r7   r:   r;   r9   rE   rx   re   )r   r   r   text_obj_typer   r   s   &    rC   _operator_in_selectionhcreate_operator_decorator.<locals>.operator_decorator.<locals>.decorator.<locals>._operator_in_selectionO  s     ++"&"6"6".&++}/B/BB(6(?(?(--1D1DD(6(<(<(6(@(@",'@@4CWCWW*#K "%5 ,0D(% /rB   r   )r   r   r   r   r   r   r   s   f  rC   r   Hcreate_operator_decorator.<locals>.operator_decorator.<locals>.decorator?  s    77&@CUU 
<
< 77&@CTT 
0
06 ! rB   r<   )r   r   r   r   r   s   ddj rC   operator_decorator5create_operator_decorator.<locals>.operator_decorator2  s    0	! 0	!d rB   r   )r   r   s   f rC   create_operator_decoratorr   +  s(    ?,2H?DI? ?B rB   c                   V ^8  d   QhRR/# rG   rU   r   r<   )rL   s   "rC   rM   rM   w  s     2 2t 2rB   c                 >    \        4       P                  P                  # rP   )r
   r   is_returnabler<   rB   rC   r   r   v  s    9##111rB   c                   V ^8  d   QhRR/# r   r<   )rL   s   "rC   rM   rM   |  s      D rB   c                     \        4       P                  p \        V P                  ;'       d(    V P                  P                  \
        P                  8H  4      # rP   )r
   r   r   r   rK   r.   r;   )r   s    rC   in_block_selectionr   {  sD    9##DQQ!5!5!:!:m>Q>Q!Q rB   c                   V ^8  d   QhRR/# r   r<   )rL   s   "rC   rM   rM     s     : : :rB   c                 B    \        4       P                  P                  R J# rP   )r
   r   digraph_symbol1r<   rB   rC   digraph_symbol_1_givenr     s    9--T99rB   c                   V ^8  d   QhRR/# r   r<   )rL   s   "rC   rM   rM     s     / / /rB   c                 D    \        4       P                  P                  R8H  # )z-Returns True when the search buffer is empty. )r
   r   ry   r<   rB   rC   search_buffer_is_emptyr     s     9##((B..rB   c                   V ^8  d   QhRR/# r   r<   )rL   s   "rC   rM   rM     s     - - -rB   c                 >    \        4       P                  P                  # rP   )r
   r   tilde_operatorr<   rB   rC   r   r     s    9,,,rB   c                   V ^8  d   QhRR/# rG   rU   r1   r<   )rL   s   "rC   rM   rM     s     z9 z9/ z9rB   c                 !  aaa \        4       p V P                  p\        \        \        R3,          \        \
        \        .\        3,          3,          pERz\        4       R 3ER{\        4       R 3ER|\        4       R 3ER}\        4       R	 3ER~\        R
 3.pV! R\        R7      ! \        R4      4       V! R4      R R l4       pV! R\        R7      R R l4       pV! R\        R7      R R l4       pV! R\        R7      V! R\        R7      R R l4       4       pV! R\        R7      R R l4       pV! R\        R7      V! R\        R7      R R  l4       4       p	V! R\        R7      R! R" l4       p
V! R#\        R7      R$ R% l4       pV! R\        R7      R& R' l4       pV! R\        R7      R( R) l4       pV! R*\        R7      V! R+\        R7      R, R- l4       4       pV! R.\        R7      R/ R0 l4       pV! R1\        \        ,          R7      ! \        R24      4       V! R1\        \        ( ,          R7      ! \        R24      4       V! R1\        ( \        ,          R7      R3 R4 l4       pV! R5\        R7      R6 R7 l4       pV! R5\        R7      R8 R9 l4       pV! R:\        \        ( ,          R7      R; R< l4       pV! R=\        \        ( ,          R7      R> R? l4       pV! R@\        \        ( ,          R7      RA RB l4       pV! RCRC\        \        ( ,          R7      V! RD\        \        ( ,          R7      RE RF l4       4       pV! RG\        R7      RH RI l4       pV! RJRJ\        R7      RK RL l4       pV! RM\        R7      RN RO l4       pV! RP\        \        ( ,          R7      RQ RR l4       pV! RS\        \        ( ,          R7      RT RU l4       pV! RS\        \        ( ,          R7      ERRW RX ll4       oV! R=\        \        ( ,          R7      RY V3RZ ll4       pV! R[\        \        ( ,          R7      R\ R] l4       pV! RR[\        \        ( ,          R7      R^ R_ l4       pV! R[\        \        ( ,          R7      R` Ra l4       pV! RR[\        \        ( ,          R7      Rb Rc l4       p V! Rd\        R7      Re Rf l4       p!V! Rg\        R7      Rh Ri l4       p"V! Rj\         P"                  Rd\        R7      Rk Rl l4       p#V! Rj\         P"                  Rg\        R7      Rm Rn l4       p$V! Ro\        R7      Rp Rq l4       p%V! Rr\        R7      Rs Rt l4       p&V! Ru\        \        ( ,          R7      Rv Rw l4       p'V! R\        Rx Ry7      Rz R{ l4       p(V! R|\        R7      R} R~ l4       p)V! R\        R7      R R l4       p*V! R|\        R7      R R l4       p+V! R\        R7      R R l4       p,V! R\        R7      R R l4       p-V! R\        R7      R R l4       p.V! R:R\        R7      V! R:R\        R7      R R l4       4       p/V! RM\        R7      R R l4       p0V! R\        R7      R R l4       p1V! RR\        R7      V! R\        R7      R R l4       4       p2V! R\        R7      R R l4       p3V! R\        R7      R R l4       p4V! RR\        R7      V! R\        R7      R R l4       4       p5V! RR\        R7      V! R\        R7      R R l4       4       p6V! R\        \        ( ,          R7      R R l4       p7V! R\        \        ( ,          R7      R R l4       p8V! R\        R7      R R l4       p9V! RRR\        \        ( ,          R7      R R l4       p:V! RRR\        \        ( ,          R7      R R l4       p;V! RRR\        \        ( ,          R7      R R l4       p<V! R\        R7      R R l4       p=V! R\        R7      R R l4       p>V! R\        R7      R R l4       p?V! R\        R7      R R l4       p@\%        V 4      o\'        V 4      oV! \         P"                  \(        R7      R R l4       pAERR V3R lllpBVB! RVRV4       VB! RVR4       VB! RRV4       VB! RR4       R V3R llpCV F  w  pDpEpFXC! VEVF.VDO5!   K  	  S! R4      R R l4       pGS! Rj\         P"                  R4      R R l4       pHS! R4      R R l4       pIS! R4      R R l4       pJS! RR4      R R l4       pKS! R4      R R l4       pLS! R4      R R l4       pMS! R4      R R l4       pNS! R4      R R l4       pOS! R4      R R l4       pPS! R4      R R l4       pQS! R4      R R l4       pRS! RPRRR7      R R l4       pSS! R:RRR7      R R l4       pTS! RPRRR7      R R l4       pUS! R:RRR7      R R l4       pVS! R:RdRR7      R R l4       pWS! R4      R R l4       pXS! R4      R R l4       pYERR V3R lllpZER F0  p[ER F  w  p\p]XZ! V\V]X[4       K  	  XZ! RRX[R4       VZ! RRV[R4       K2  	  S! R4      R R l4       p^S! R4      R R l4       p_S! R\         P"                  4      R R l4       p`S! ER \         P"                  4      ER ER l4       paS! ER\         P"                  4      ER ER l4       pbS! ER\         P"                  4      ER ER l4       pcER	 V3ER
 llpdVd! R4       Vd! RV4       S! ER4      S! ER4      ER ER l4       4       peS! RRRER7      ER ER l4       pfS! RRRER7      ER ER l4       pgS! ER4      S! ER4      S! ER4      ER ER l4       4       4       phS! ER4      ER ER l4       piS! ER4      ER ER l4       pjS! ER4      ER  ER! l4       pkS! ER"RR7      ER# ER$ l4       plV! ER"\        R7      ER% ER& l4       pmS! ER'RR7      ER( ER) l4       pnV! ER'\        R7      ER* ER+ l4       poV! ER,R\        \        ,          R7      V! ER,ER\        \        ,          R7      V! ER,R1\        \        ,          R7      ER- ER. l4       4       4       ppV! ER,R\        \        ,          R7      V! ER,R\        \        ,          R7      ER/ ER0 l4       4       pqV! ER,ER,\        \        ,          R7      ER1 ER2 l4       prS! ER34      ER4 ER5 l4       psS! ER64      ER7 ER8 l4       ptS! RR4      ER9 ER: l4       puS! RER;4      ER< ER= l4       pvS! RR4      ER> ER? l4       pwS! RR4      ER@ ERA l4       pxS! RERB4      ERC ERD l4       pyS! ERE4      ERF ERG l4       pzV! ERE\*        R7      ERH ERI l4       p{ERJ F2  p|V! V|\        \        ,          \(        ,          R7      ERK ERL l4       p}K4  	  V! R\        \        ,          \(        ,          \*        ,          R7      ERM ERN l4       p~V! \         P"                  \,        R7      ERO ERP l4       pV! \         P"                  \.        R7      ERQ ERR l4       pV! \         P"                  \0        ERS Ry7      ERT ERU l4       pV! R#\0        R7      ERV ERW l4       pV! ERX\0        R7      ERY ERZ l4       pV! ER\0        R7      ER[ ER\ l4       pV! ER\0        R7      ER] ER^ l4       pV! R\0        R7      V! R\0        R7      ER_ ER` l4       4       pV! ERaERb\        R7      ERc ERd l4       pV! ERaERe\        R7      ERf ERg l4       pV! ERh\        \,        ,          R7      ERi ERj l4       pV! \         P"                  \2        \4        ( ,          R7      ERk ERl l4       pV! \         P"                  \2        \4        ,          R7      ERm ERn l4       pV! ERo\        \,        ,          R7      ERp ERq l4       pV! R\         P"                  \        \6        ( ,          R7      ERr ERs l4       pV! R\        \6        ,          R7      ERt ERu l4       pV! ERv\         P"                  \        RVERw7      ERx ERy l4       p\9        V \:        4      # (  z}
Vi extensions.

# Overview of Readline Vi commands:
# http://www.catonmat.net/download/bash-vi-editing-mode-cheat-sheet.pdf
.gc                0    \         P                  ! V R 4      # )rot_13)codecsencodestrings   &rC   <lambda>"load_vi_bindings.<locals>.<lambda>  s    6==:rB   uc                $    V P                   ! 4       # rP   lowerr   s   &rC   r   r     
    fllnrB   Uc                $    V P                   ! 4       # rP   upperr   s   &rC   r   r     r   rB   ~c                $    V P                   ! 4       # rP   swapcaser   s   &rC   r   r     s    foo.?rB   c                $    V P                   ! 4       # rP   r   r   s   &rC   r   r     s    6??,rB   zc-vr   zquoted-insertescapec                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   &load_vi_bindings.<locals>.__annotate__  s     $ $1 $ $rB   c                   V P                   pV P                  P                  pVP                  \        P
                  \        P                  39   d2   V;P                  VP                  P                  4       ,          un        \        P                  Vn        \        VP                  4      '       d   VP                  4        R# R# )z$
Escape goes to vi navigation mode.
N)r   r   r   
input_moder)   INSERTREPLACEre   rb   get_cursor_left_position
NAVIGATIONr   r   exit_selection)r   ro   r   s   &  rC   _back_to_navigation-load_vi_bindings.<locals>._back_to_navigation  s    
 %%99%%9#3#3Y5F5F"GG""foo&N&N&PP"'22&&''!!# (rB   kc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     8 8 8d 8rB   c                R    V P                   P                  V P                  R7       R# )z
Arrow up in selection mode.
countN)r   	cursor_upr   r   s   &rC   _up_in_selection*load_vi_bindings.<locals>._up_in_selection  s    
 	&&UYY&7rB   jc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     : :! : :rB   c                R    V P                   P                  V P                  R7       R# )z
Arrow down in selection mode.
r  N)r   cursor_downr   r  s   &rC   _down_in_selection,load_vi_bindings.<locals>._down_in_selection  s    
 	((uyy(9rB   upzc-pc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     6 6 6t 6rB   c                R    V P                   P                  V P                  R7       R# )z1
Arrow up and ControlP in navigation mode go up.
r  Nr   auto_upr   r  s   &rC   _up_in_navigation+load_vi_bindings.<locals>._up_in_navigation  s     	$$599$5rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     
 
a 
D 
rB   c                T    V P                   P                  V P                  RR7       R# )zL
Go up, but if we enter a new history entry, move to the start of the
line.
Tr  &go_to_start_of_line_if_history_changesNr  r  s   &rC   _go_up load_vi_bindings.<locals>._go_up  s&     	$$))D 	% 	
rB   downzc-nc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     8 8 8d 8rB   c                R    V P                   P                  V P                  R7       R# )z.
Arrow down and Control-N in navigation mode.
r  Nr   	auto_downr   r  s   &rC   _go_down"load_vi_bindings.<locals>._go_down  s     	&&UYY&7rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     
 
 
t 
rB   c                T    V P                   P                  V P                  RR7       R# )zL
Go down, but if we enter a new history entry, go to the start of the line.
Tr#  Nr*  r  s   &rC   	_go_down2#load_vi_bindings.<locals>._go_down2  s&    
 	&&))D 	' 	
rB   	backspacec                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     
 
 
d 
rB   c                    V P                   ;P                  V P                   P                  P                  V P                  R7      ,          un        R# )z"
In navigation-mode, move cursor.
r  N)r   re   rb   r  r   r  s   &rC   _go_left"load_vi_bindings.<locals>._go_left  s<    
 	,,  ))BBBS	
,rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     2 2a 2D 2rB   c                    V P                   pVP                  '       d   VP                  4        R# VP                  R R7       R# )T)select_firstN)r   complete_statecomplete_nextstart_completionr   bs   & rC   _complete_next(load_vi_bindings.<locals>._complete_next  s4      OOD1rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     	1 	1a 	1D 	1rB   c                    V P                   pVP                  '       d   VP                  4        R# VP                  RR7       R# )z$
Control-P: To previous completion.
T)select_lastN)r   r:  complete_previousr<  r=  s   & rC   _complete_prev(load_vi_bindings.<locals>._complete_prev  s8    
   !40rB   c-gzc-yc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  #  s     3 3! 3 3rB   c                (    RV P                   n        R# )z
Accept current completion.
N)r   r:  r  s   &rC   _accept_completion,load_vi_bindings.<locals>._accept_completion!  s     /3+rB   zc-ec                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  *  s     1 1! 1 1rB   c                :    V P                   P                  4        R# )z6
Cancel completion. Go back to originally typed text.
N)r   cancel_completionr  s   &rC   _cancel_completion,load_vi_bindings.<locals>._cancel_completion)  s    
 	..0rB   enterzaccept-linec                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  :  s     
 
1 
 
rB   c                    V P                   pVP                  V P                  R7       V;P                  VP                  P                  RR7      ,          un        R# )z#
Go to the beginning of next line.
r  Tafter_whitespaceN)r   r  r   re   rb   get_start_of_line_positionr=  s   & rC   _start_of_next_line-load_vi_bindings.<locals>._start_of_next_line9  sL    
   	EII&	QZZBB! C 
 	
rB   insertc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  I  s     9 9A 9$ 9rB   c                X    \         P                  V P                  P                  n        R# z
Pressing the Insert key.
Nr)   r  r   r   r  r  s   &rC   _insert_mode&load_vi_bindings.<locals>._insert_modeH  s    
 )2(8(8		%rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  P  s     = = =d =rB   c                X    \         P                  V P                  P                  n        R# r\  )r)   r  r   r   r  r  s   &rC   _navigation_mode*load_vi_bindings.<locals>._navigation_modeO  s    
 )2(<(<		%rB   ac                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  Y       9 9! 9 9rB   c                    V P                   ;P                  V P                   P                  P                  4       ,          un        \        P
                  V P                  P                  n        R # rP   )	r   re   rb   get_cursor_right_positionr)   r  r   r   r  r  s   &rC   _aload_vi_bindings.<locals>._aV  sM     	,,  ))CCE	
, )2(8(8		%rB   Ac                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  `  rf  rB   c                    V P                   ;P                  V P                   P                  P                  4       ,          un        \        P
                  V P                  P                  n        R # rP   )	r   re   rb   get_end_of_line_positionr)   r  r   r   r  r  s   &rC   _Aload_vi_bindings.<locals>._A_  sK    ,,  ))BBD	
, )2(8(8		%rB   Cc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  g  s     	9 	9 	9t 	9rB   c                   V P                   pVP                  VP                  P                  4       R7      pV P                  P
                  P                  V4       \        P                  V P                  P                  n
        R# )zG
Change to end of line.
Same as 'c$' (which is implemented elsewhere.)
r  N)r   deleterb   rn  r   	clipboardset_textr)   r  r   r  r   ro   deleteds   &  rC   _change_until_end_of_line3load_vi_bindings.<locals>._change_until_end_of_linef  s\     %%--foo&N&N&P-Q		$$W-(1(8(8		%rB   cSc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  t  s     9 9A 9$ 9rB   c                   V P                   p\        VP                  P                  \        P
                  4      pV P                  P                  P                  V4       V;P                  VP                  P                  RR7      ,          un	        VP                  VP                  P                  4       R7       \        P                  V P                  P                  n        R# )z
Change current line
TrT  r  N)r   r   rb   current_liner.   rW   r   ru  set_datare   rV  rt  rn  r)   r  r   r  )r   ro   datas   &  rC   _change_current_line.load_vi_bindings.<locals>._change_current_liner  s     %% V__99=;N;NO		$$T* 	&//"L"L! #M #
 	
 	FOODDFG(1(8(8		%rB   Dc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     . . .t .rB   c                    V P                   pVP                  VP                  P                  4       R7      pV P                  P
                  P                  V4       R# )z8
Delete from cursor position until the end of the line.
r  N)r   rt  rb   rn  r   ru  rv  rw  s   &  rC   _delete_until_end_of_line3load_vi_bindings.<locals>._delete_until_end_of_line  sD    
 %%--foo&N&N&P-Q		$$W-rB   dc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     R RA R$ RrB   c           	        V P                   pVP                  P                  pRP                  VRVP                  P                   4      pRP                  VVP                  P                  VP                  P                  V P
                  ,            4      pRP                  W!P                  P                  V P
                  ,           R 4      pV'       d   V'       d
   VR,           p\        W5,           \        V4      \        V4      ,           \        VP                  R4      4      ,
          R7      Vn        V P                  P                  P                  \        V\        P                  4      4       R# )z,
Delete line. (Or the following 'n' lines.)

N )ry   re   )r   rb   rh   joincursor_position_rowr   r   rg   lstripr   ru  r  r   r.   rW   )r   ro   rh   beforerx  afters   &     rC   _delete_line&load_vi_bindings.<locals>._delete_line  s   
 %% %%5!F6??#F#FGH))33foo6Y6Y))7
 		% C Ceii O QRS ed]F #K#e*4s5<<;L7MM
 			$$]7M<O<O%PQrB   xc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     5 5A 5$ 5rB   c                    V P                   P                  4       pV P                  P                  P	                  V4       R# )z*
Cut selection.
('x' is not an operator.)
N)r   rz   r   ru  r  )r   r|   s   & rC   _cutload_vi_bindings.<locals>._cut  s0     --;;=		$$^4rB   ic                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     9 9! 9 9rB   c                X    \         P                  V P                  P                  n        R # rP   r]  r  s   &rC   _iload_vi_bindings.<locals>._i  s    (1(8(8		%rB   Ic                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     
 
! 
 
rB   c                    \         P                  V P                  P                  n        V P
                  ;P                  V P
                  P                  P                  R R7      ,          un        R# )TrT  N)	r)   r  r   r   r  r   re   rb   rV  r  s   &rC   _Iload_vi_bindings.<locals>._I  sT    (1(8(8		%,,  ))DD!% E 	
,rB   Fc               $    V ^8  d   QhRRRRRR/# )rG   r   r   r  r   rU   r   r<   )rL   s   "rC   rM   r    s!       4 D rB   c                |   V P                   p. pV'       d   R R lpMR R lp\        VP                  P                  4       4       F2  w  rVVP	                  V! V4      4       V^ 8X  g   K%  V! V4      Vn        K4  	  W2n        \        P                  V P                  P                  n        VP                  4        R# )z!
Insert in block selection mode.
c                    V ^8  d   QhRRRR/# rG   from_tor]   rU   rI   r<   )rL   s   "rC   rM   Iload_vi_bindings.<locals>.insert_in_block_selection.<locals>.__annotate__       " " "S "rB   c                    V ^,          # )r   r<   r  s   &rC   get_posDload_vi_bindings.<locals>.insert_in_block_selection.<locals>.get_pos      qz!rB   c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    r  rB   c                    V ^ ,          # )r   r<   r  s   &rC   r  r    r  rB   N)r   	enumeraterb   selection_rangesappendre   multiple_cursor_positionsr)   INSERT_MULTIPLEr   r   r  r  )r   r  r   	positionsr  r  r  s   &&     rC   insert_in_block_selection3load_vi_bindings.<locals>.insert_in_block_selection  s    
 ## 	"
" $DMM$B$B$DEJAWW-.Av'.w'7$ F
 *3& )2(A(A		%rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     5 51 5 5rB   c                   < S! V R R7       R# )T)r  Nr<   )r   r  s   &rC   _append_after_block-load_vi_bindings.<locals>._append_after_block  s    !%t4rB   Jc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     2 2Q 24 2rB   c                r    \        V P                  4       F  pV P                  P                  4        K  	  R# )z
Join lines.
Nranger   r   join_next_liner   r  s   & rC   _joinload_vi_bindings.<locals>._join  s)    
 uyy!A  //1 "rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     > >Q >4 >rB   c                v    \        V P                  4       F  pV P                  P                  RR7       K!  	  R# )z
Join lines without space.
r   	separatorNr  r  s   & rC   _join_nospace'load_vi_bindings.<locals>._join_nospace  s.    
 uyy!A  //"/= "rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     3 3q 3T 3rB   c                :    V P                   P                  4        R# )z
Join selected lines.
Nr   join_selected_linesr  s   &rC   _join_selection)load_vi_bindings.<locals>._join_selection  s    
 	002rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r     s     ? ?q ?T ?rB   c                >    V P                   P                  RR7       R# )z$
Join selected lines without space.
r   r  Nr  r  s   &rC   _join_selection_nospace1load_vi_bindings.<locals>._join_selection_nospace  s    
 	0020>rB   pc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     
 
a 
D 
rB   c                    V P                   P                  V P                  P                  P	                  4       V P
                  \        P                  R7       R# )z
Paste after
r  
paste_modeN)r   paste_clipboard_datar   ru  get_datar   r,   VI_AFTERr  s   &rC   _paste load_vi_bindings.<locals>._paste  sC    
 	11II((*)) )) 	2 	
rB   Pc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r         
 
Q 
4 
rB   c                    V P                   P                  V P                  P                  P	                  4       V P
                  \        P                  R7       R# )z
Paste before
r  N)r   r  r   ru  r  r   r,   	VI_BEFOREr  s   &rC   _paste_before'load_vi_bindings.<locals>._paste_before  sC    
 	11II((*)) ** 	2 	
rB   "c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     
 
q 
T 
rB   c                6   V P                   ^,          P                  pV\        9   dq   V P                  P                  P
                  P                  V4      pV'       d8   V P                  P                  W P                  \        P                  R7       R# R# R# )z
Paste from named register.
r  N)key_sequencer  vi_register_namesr   r   named_registersgetr   r  r   r,   r  r   r{  r  s   &  rC   _paste_register)load_vi_bindings.<locals>._paste_register  sx    
 q!&&!!99%%5599!<D$$99		i6H6H :   "rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  *  s     
 
a 
D 
rB   c                6   V P                   ^,          P                  pV\        9   dq   V P                  P                  P
                  P                  V4      pV'       d8   V P                  P                  W P                  \        P                  R7       R# R# R# )z%
Paste (before) from named register.
r  N)r  r  r  r   r   r  r  r   r  r   r,   r  r  s   &  rC   _paste_register_before0load_vi_bindings.<locals>._paste_register_before)  sx    
 q!&&!!99%%5599!<D$$99		i6I6I :   "rB   rc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  7  s     A A Ad ArB   c                X    \         P                  V P                  P                  n        R# )z
Go to 'replace-single'-mode.
N)r)   REPLACE_SINGLEr   r   r  r  s   &rC   _replace"load_vi_bindings.<locals>._replace6  s    
 )2(@(@		%rB   Rc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  >  s     : :Q :4 :rB   c                X    \         P                  V P                  P                  n        R# )z
Go to 'replace'-mode.
N)r)   r  r   r   r  r  s   &rC   _replace_mode'load_vi_bindings.<locals>._replace_mode=  s    
 )2(9(9		%rB   sc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  E  s     9 91 9 9rB   c                    V P                   P                  V P                  R7      pV P                  P                  P                  V4       \        P                  V P                  P                  n	        R# )zG
Substitute with new text
(Delete character(s) and go to insert mode.)
r  N)
r   rt  r   r   ru  rv  r)   r  r   r  r   ry   s   & rC   _substitute%load_vi_bindings.<locals>._substituteD  sQ     ##***;		$$T*(1(8(8		%rB   c                    R # Fr<   es   &rC   r   r   N  s    5rB   )r   save_beforec                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  O  s     ( (Q (4 (rB   c                r    \        V P                  4       F  pV P                  P                  4        K  	  R # rP   )r  r   r   undor  s   & rC   _undoload_vi_bindings.<locals>._undoN  s'    uyy!A  %%' "rB   Vc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  T  s     Q QA Q$ QrB   c                Z    V P                   P                  \        P                  R7       R# )z
Start lines selection.
rZ   N)r   start_selectionr.   rW   r  s   &rC   _visual_line&load_vi_bindings.<locals>._visual_lineS  !    
 	,,M<O<O,PrB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  [  s     Q QQ Q4 QrB   c                Z    V P                   P                  \        P                  R7       R# )z
Enter block selection mode.
r  N)r   r  r.   r;   r  s   &rC   _visual_block'load_vi_bindings.<locals>._visual_blockZ  r  rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  b  s     6 6Q 64 6rB   c                    V P                   P                  pVeS   VP                  \        P                  8w  d   \        P                  Vn        R# V P                   P                  4        R# R# )zV
Exit line selection mode, or go from non line selection mode to line
selection mode.
N)r   r   rK   r.   rW   r  r   r   s   & rC   _visual_line2'load_vi_bindings.<locals>._visual_line2a  T      ..>>&##}':'::'4':':$$$335	 'rB   vc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  p  s     V Vq VT VrB   c                Z    V P                   P                  \        P                  R7       R# )z!
Enter character selection mode.
r  N)r   r  r.   rX   r  s   &rC   _visual!load_vi_bindings.<locals>._visualo  s!    
 	,,M<T<T,UrB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  w  s     6 6 6d 6rB   c                    V P                   P                  pVeS   VP                  \        P                  8w  d   \        P                  Vn        R# V P                   P                  4        R# R# )ze
Exit character selection mode, or go from non-character-selection mode
to character selection mode.
N)r   r   rK   r.   rX   r  r  s   & rC   _visual2"load_vi_bindings.<locals>._visual2v  sT      ..>>&##}'?'??'4'?'?$$$335	 'rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     6 6a 6D 6rB   c                    V P                   P                  pVeS   VP                  \        P                  8w  d   \        P                  Vn        R# V P                   P                  4        R# R# )zY
Exit block selection mode, or go from non block selection mode to block
selection mode.
N)r   r   rK   r.   r;   r  r  s   & rC   _visual_block2(load_vi_bindings.<locals>._visual_block2  r"  rB   wWc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     
C 
C 
Ct 
CrB   c                    V P                   pVP                  '       dM   VP                  P                  \        P                  8X  d"   \        P
                  VP                  n        R# R# R# )z@
Switch from visual linewise mode to visual characterwise mode.
N)r   r   rK   r.   rW   rX   r   ro   s   & rC   _visual_auto_word+load_vi_bindings.<locals>._visual_auto_word  sV     %% """&&++}/B/BB*7*B*BF""' C #rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     / /q /T /rB   c                   V P                   p\        V P                  \        VP                  P
                  4      4      pV'       dD   V P                   P                  VR7      pV P                  P                  P                  V4       R# R# )z
Delete character.
r  N)
r   minr   rg   rb   current_line_after_cursorrt  r   ru  rv  r   r   r  ry   s   &   rC   _delete!load_vi_bindings.<locals>._delete  sg    
 ##EIIs4==#J#JKL''..U.;DII((. rB   Xc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     / /Q /4 /rB   c                   V P                   p\        V P                  \        VP                  P
                  4      4      pV'       dD   V P                   P                  VR 7      pV P                  P                  P                  V4       R# R# )r  N)
r   r9  r   rg   rb   current_line_before_cursordelete_before_cursorr   ru  rv  r;  s   &   rC   _delete_before_cursor/load_vi_bindings.<locals>._delete_before_cursor  se    ##EIIs4==#K#KLM''<<5<IDII((. rB   yYc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     O O! O OrB   c                    RP                  V P                  P                  P                  RV P                   4      pV P
                  P                  P                  \        V\        P                  4      4       R# )z
Yank the whole line.
r  N)r  r   rb   lines_from_currentr   r   ru  r  r   r.   rW   r  s   & rC   
_yank_line$load_vi_bindings.<locals>._yank_line  sT     yy--66II+EIIVW		$$]49L9L%MNrB   +c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r         

 

! 

 

rB   c                    V P                   pV;P                  VP                  P                  V P                  R7      ,          un        V;P                  VP                  P                  RR7      ,          un        R# )z+
Move to first non whitespace of next line
r  TrT  N)r   re   rb   get_cursor_down_positionr   rV  r4  s   & rC   
_next_line$load_vi_bindings.<locals>._next_line  sk    
 %%&//"J"J)) #K #
 	
 	&//"L"L! #M #
 	
rB   -c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    rN  rB   c                    V P                   pV;P                  VP                  P                  V P                  R7      ,          un        V;P                  VP                  P                  RR7      ,          un        R# )z/
Move to first non whitespace of previous line
r  TrT  N)r   re   rb   get_cursor_up_positionr   rV  r4  s   & rC   
_prev_line$load_vi_bindings.<locals>._prev_line  sk    
 %%&//"H"H)) #I #
 	
 	&//"L"L! #M #
 	
rB   >zc-tc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     = =q =T =rB   c                    V P                   pVP                  P                  p\        WW P                  ,           4       R# )z
Indent lines.
N)r   rb   r  r   r   )r   ro   current_rows   &  rC   _indent!load_vi_bindings.<locals>._indent  s/     %%oo99vK))$;<rB   <zc-dc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     M M Mt MrB   c                    V P                   P                  P                  p\        V P                   WV P                  ,           4       R# )z
Unindent lines.
N)r   rb   r  r   r   )r   r\  s   & rC   	_unindent#load_vi_bindings.<locals>._unindent  s4     **33GG%%{%))4KLrB   Oc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r         9 91 9 9rB   c                    V P                   P                  \        4       '       * R7       \        P                  V P
                  P                  n        R# )z*
Open line above and enter insertion mode
copy_marginN)r   insert_line_abover   r)   r  r   r   r  r  s   &rC   _open_above%load_vi_bindings.<locals>._open_above  8    
 	..};N.O(1(8(8		%rB   oc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    rf  rB   c                    V P                   P                  \        4       '       * R7       \        P                  V P
                  P                  n        R# )z*
Open line below and enter insertion mode
rh  N)r   insert_line_belowr   r)   r  r   r   r  r  s   &rC   _open_below%load_vi_bindings.<locals>._open_below  rm  rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     = =Q =4 =rB   c                    V P                   pVP                  P                  pVe-   VR8w  d$   VP                  VP	                  4       RR7       R# R# R# )z<
Reverse case of current character and move cursor forward.
Nr  T	overwrite)r   rb   current_charinsert_textr   )r   ro   r{  s   &  rC   _reverse_case'load_vi_bindings.<locals>._reverse_case  sI    
 %%OO((=Q$Yqzz|t< '=rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r         9 9q 9T 9rB   c                B    V P                   pVP                  R 4       R# )z
Lowercase current line.
c                "    V P                  4       # rP   r   r  s   &rC   r   ;load_vi_bindings.<locals>._lowercase_line.<locals>.<lambda>
  
    aggirB   Nr   transform_current_liner   r   s   & rC   _lowercase_line)load_vi_bindings.<locals>._lowercase_line      
 ####$78rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    r}  rB   c                B    V P                   pVP                  R 4       R# )z
Uppercase current line.
c                "    V P                  4       # rP   r   r  s   &rC   r   ;load_vi_bindings.<locals>._uppercase_line.<locals>.<lambda>  r  rB   Nr  r  s   & rC   _uppercase_line)load_vi_bindings.<locals>._uppercase_line  r  rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     < <a <D <rB   c                B    V P                   pVP                  R 4       R# )z 
Swap case of the current line.
c                "    V P                  4       # rP   r   r  s   &rC   r   :load_vi_bindings.<locals>._swapcase_line.<locals>.<lambda>  s
    ajjlrB   Nr  r  s   & rC   _swapcase_line(load_vi_bindings.<locals>._swapcase_line  s    
 ####$:;rB   #c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r         
V 
V 
Vd 
VrB   c                    V P                   pV P                  P                  pVP                  P	                  4       Vn        \        P                  Vn        VP                  W P                  RR7       R# )z)
Go to previous occurrence of this word.
Fr  include_current_positionN)r   r   current_search_staterb   get_word_under_cursorry   r+   BACKWARD	directionapply_searchr   r   r>  search_states   &  rC   _prev_occurrence*load_vi_bindings.<locals>._prev_occurrence  sU    
   yy55JJ<<>!0!9!9	|99uUrB   *c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  *  r  rB   c                    V P                   pV P                  P                  pVP                  P	                  4       Vn        \        P                  Vn        VP                  W P                  RR7       R# )z%
Go to next occurrence of this word.
Fr  N)r   r   r  rb   r  ry   r+   FORWARDr  r  r   r  s   &  rC   _next_occurrence*load_vi_bindings.<locals>._next_occurrence)  sU    
   yy55JJ<<>!0!8!8	|99uUrB   (c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  7  s      !  rB   c                    R # rP   r<   r  s   &rC   _begin_of_sentence,load_vi_bindings.<locals>._begin_of_sentence6       	rB   )c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  =  s       d rB   c                    R # rP   r<   r  s   &rC   _end_of_sentence*load_vi_bindings.<locals>._end_of_sentence<  r  rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  F  s        A  $  rB   c                N    V P                   P                  P                  4        R# )z6
Unknown key binding while waiting for a text object.
N)r   outputbellr  s   &rC   _unknown_text_object.load_vi_bindings.<locals>._unknown_text_objectE  s    
 			rB   c               $    V ^8  d   QhRRRRRR/# )rG   delete_onlyr   with_registerrU   r   r<   )rL   s   "rC   rM   r  P  s)     #A #A#A*.#A	#ArB   c                   <a a S'       d   R\         P                  RS ,          3pM	RS ,          pS! VR\        ( / R V V3R ll4       pR# )z
Delete and change operators.

:param delete_only: Create an operator that deletes, but doesn't go to insert mode.
:param with_register: Copy the deleted text to this named register instead of the clipboard.
r  cdr   c               $    V ^8  d   QhRRRRRR/# rG   r   r   r   rE   rU   r   r<   )rL   s   "rC   rM   Rload_vi_bindings.<locals>.create_delete_and_change_operators.<locals>.__annotate__`  s&     	A 	AQ 	AZ 	AD 	ArB   c                  < R pV P                   pV'       d   VP                  V4      w  rBWCn        V'       d   VP                  '       dy   S'       dL   V P                  ^,          P
                  pV\        9   d#   W P                  P                  P                  V&   M%V P                  P                  P                  V4       S'       g,   \        P                  V P                  P                  n        R # R # rP   )r   r}   rb   ry   r  r  r  r   r   r  ru  r  r)   r  r  )r   r   r|   r   r{   reg_namer  r  s   &&    rC   delete_or_change_operator_load_vi_bindings.<locals>.create_delete_and_change_operators.<locals>.delete_or_change_operator_  s    !N''D/:t/D, , ."5"5"5 $11!499H#44GU		**::8DII''00@ 090@0@		""- rB   N)r*   Anyr   )r  r  handler_keysr  operators   ff  rC   "create_delete_and_change_operators<load_vi_bindings.<locals>.create_delete_and_change_operatorsP  sM     4+<=L,L	<	6	6	A 	A 
7	ArB   Tc               (    V ^8  d   QhRRRRRRRR/# )	rG   r   r   transform_funczCallable[[str], str]rd  r   rU   r   r<   )rL   s   "rC   rM   r  z  s2     M MM(<MBEM	MrB   c                J   <a S! VR V \         ( ,          / R V3R ll4       pR# )r   c               $    V ^8  d   QhRRRRRR/# r  r<   )rL   s   "rC   rM   Hload_vi_bindings.<locals>.create_transform_handler.<locals>.__annotate__~  s&     	M 	MQ 	MZ 	MD 	MrB   c                B  < V P                   pVP                  VP                  4      w  r4W48  do   VP                  VP                  V,           VP                  V,           S4       T;P                  VP
                  ;'       g    VP                  ,          un        R# R# )z@
Apply transformation (uppercase, lowercase, rot13, swap case).
N)r   rl   rb   transform_regionre   rJ   rH   )r   r   r   rH   rJ   r  s   &&   rC   rs   =load_vi_bindings.<locals>.create_transform_handler.<locals>._}  s    
 ''D$33DMMBJE{%%((50((3." $$(L(L;;L;LL$ rB   N)r   )r   r  rd  rs   r  s   &f* rC   create_transform_handler2load_vi_bindings.<locals>.create_transform_handlerz  s*     
1	4V|m3	4	M 
5	MrB   c               $    V ^8  d   QhRRRRRR/# r  r<   )rL   s   "rC   rM   r    s!     9 9Q 9Z 9D 9rB   c                    VP                  V P                  4      w  r#VP                  '       d(   V P                  P                  P                  V4       R# R# )z
Yank operator. (Copy text.)
N)r}   r   ry   r   ru  r  )r   r   rs   r|   s   &&  rC   _yankload_vi_bindings.<locals>._yank  sD    
 (OOE,@,@AII((8 rB   c               $    V ^8  d   QhRRRRRR/# r  r<   )rL   s   "rC   rM   r    s&     C C C C CrB   c                    V P                   ^,          P                  pV\        9   dB   VP                  V P                  4      w  r4W@P
                  P                  P                  V&   R# R# )z#
Yank selection to named register.
N)r  r  r  r}   r   r   r   r  )r   r   r{  rs   r|   s   &&   rC   _yank_to_register+load_vi_bindings.<locals>._yank_to_register  sW    
 q!&&!! +0D0D EA4BII..q1 "rB   c               $    V ^8  d   QhRRRRRR/# r  r<   )rL   s   "rC   rM   r    s!     5 51 5: 5$ 5rB   c                    V P                   pVP                  V4      w  r4\        W#V^,           V P                  R7       R# )z	
Indent.
r  N)r   rt   r   r   r   r   r   rq   rr   s   &&   rC   _indent_text_object-load_vi_bindings.<locals>._indent_text_object  s5    
 ##006	tBF%))4rB   c               $    V ^8  d   QhRRRRRR/# r  r<   )rL   s   "rC   rM   r    s!     7 7Q 7Z 7D 7rB   c                    V P                   pVP                  V4      w  r4\        W#V^,           V P                  R7       R# )z
Unindent.
r  N)r   rt   r   r   r  s   &&   rC   _unindent_text_object/load_vi_bindings.<locals>._unindent_text_object  s5    
 ##006	b1fEII6rB   qc               $    V ^8  d   QhRRRRRR/# r  r<   )rL   s   "rC   rM   r    s!     & & &
 &t &rB   c                \    V P                   pVP                  V4      w  r4\        W#V4       R# )z
Reshape text.
N)r   rt   r   r  s   &&   rC   _reshape"load_vi_bindings.<locals>._reshape  s+    
 ##006	T"%rB   r>  c                    V ^8  d   QhRRRR/# rG   r   r   rU   rE   r<   )rL   s   "rC   rM   r    s     
 
! 

 
rB   c                    \        V P                  P                  P                  V P                  R7      ;'       g    ^ 4      # )z
Move one word or token left.
r  rE   r   rb   find_start_of_previous_wordr   r  s   &rC   _bload_vi_bindings.<locals>._b  s?    
   ))EEEIIEV  
 	
rB   Bc                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s     	
 	
! 	

 	
rB   c                    \        V P                  P                  P                  V P                  RR7      ;'       g    ^ 4      # )z
Move one non-blank word left
Tr  WORDr  r  s   &rC   _Bload_vi_bindings.<locals>._B  sI    
   ))EEiid F    	
 	
rB   $c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s     T Tq TZ TrB   c                \    \        V P                  P                  P                  4       4      # )z<
'c$', 'd$' and '$':  Delete/change/move until end of line.
)rE   r   rb   rn  r  s   &rC   _dollar!load_vi_bindings.<locals>._dollar  s$    
 %..77PPRSSrB   c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s     
 
Q 
: 
rB   c                    \        V P                  P                  P                  V P                  R7      ;'       g%    V P                  P                  P                  4       4      # )z?
'word' forward. 'cw', 'dw', 'w': Delete/change/move one word.
r  rE   r   rb   find_next_word_beginningr   get_end_of_document_positionr  s   &rC   _word_forward'load_vi_bindings.<locals>._word_forward  sV    
   ))BBBS L L##,,IIK
 	
rB   c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s     	
 	
Q 	
: 	
rB   c                    \        V P                  P                  P                  V P                  RR7      ;'       g%    V P                  P                  P                  4       4      # )z?
'WORD' forward. 'cW', 'dW', 'W': Delete/change/move one WORD.
Tr  r  r  s   &rC   _WORD_forward'load_vi_bindings.<locals>._WORD_forward  s`    
   ))BBiid C  L L ##,,IIK	
 	
rB   r
  c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s     P PA P* PrB   c                    V P                   P                  P                  V P                  R7      p\	        V'       d
   V^,
          M^ \
        P                  R7      # )z 
End of 'word': 'ce', 'de', 'e'
r  r   r   rb   find_next_word_endingr   rE   r7   r9   r   rJ   s   & rC   _end_of_word&load_vi_bindings.<locals>._end_of_word  sB    
 ""++AA		ARS#'an6N6NOOrB   r   c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s     P PA P* PrB   c                    V P                   P                  P                  V P                  RR7      p\	        V'       d
   V^,
          M^ \
        P                  R7      # )z 
End of 'WORD': 'cE', 'dE', 'E'
Tr  r   r  r  s   & rC   _end_of_WORD&load_vi_bindings.<locals>._end_of_WORD   sL    
 ""++AA))$ B 
 S#'an6N6NOOrB   r   c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s     & &1 & &rB   c                d    V P                   P                  P                  4       w  r\        W4      # )z
Inner 'word': ciw and diw
r   rb   find_boundaries_of_current_wordrE   r   rH   rJ   s   &  rC   _inner_word%load_vi_bindings.<locals>._inner_word
  s+    
 ))22RRT
%%%rB   c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r         & &q &Z &rB   c                h    V P                   P                  P                  RR7      w  r\        W4      # )z
A 'word': caw and daw
T)include_trailing_whitespacer  r  s   &  rC   _a_word!load_vi_bindings.<locals>._a_word  s8    
 ))22RR(, S 

 %%%rB   c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s     & &1 & &rB   c                h    V P                   P                  P                  RR7      w  r\        W4      # )z
Inner 'WORD': ciW and diW
T)r  r  r  s   &  rC   _inner_WORD%load_vi_bindings.<locals>._inner_WORD  s8    
 ))22RR S 

 %%%rB   c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r  '  r  rB   c                j    V P                   P                  P                  RRR7      w  r\        W4      # )z
A 'WORD': caw and daw
T)r  r   r  r  s   &  rC   _a_WORD!load_vi_bindings.<locals>._a_WORD&  s:    
 ))22RR4 S 

 %%%rB   c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r  1  s     & &! &
 &rB   c                    V P                   P                  P                  4       pV P                   P                  P                  V P                  R7      p\        W4      # )z
Auto paragraph.
r  )r   rb   start_of_paragraphend_of_paragraphr   rE   r  s   &  rC   
_paragraph$load_vi_bindings.<locals>._paragraph0  sL    
 $$--@@B""++<<599<M%%%rB   ^c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r  :  s     
 
a 
J 
rB   c                `    \        V P                  P                  P                  RR7      4      # )z9'c^', 'd^' and '^': Soft start of line, after whitespace.TrT  rE   r   rb   rV  r  s   &rC   _start_of_line(load_vi_bindings.<locals>._start_of_line9  s4       ))DD!% E 
 	
rB   0c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r  C  s     	
 	
1 	
 	
rB   c                `    \        V P                  P                  P                  RR7      4      # )z
'c0', 'd0': Hard start of line, before whitespace.
(The move '0' key is implemented elsewhere, because a '0' could also change the `arg`.)
FrT  r4  r  s   &rC   _hard_start_of_line-load_vi_bindings.<locals>._hard_start_of_lineB  s4       ))DD!& E 
 	
rB   c          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
rG   ci_startr   ci_endinnerr   keyz
str | NonerU   r   r<   )rL   s   "rC   rM   r  N  s;     $I $I$I"$I+/$I6@$I	$IrB   c                   <a aa R VV V3R llpVf3   S! RS,          S RR7      ! V4       S! RS,          SRR7      ! V4       R# S! RS,          VRR7      ! V4       R# )z
Delete/Change string between this start and stop character. But keep these characters.
This implements all the ci", ci<, ci{, ci(, di", di<, ca", ca<, ... combinations.
c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   Dload_vi_bindings.<locals>.create_ci_ca_handles.<locals>.__annotate__W  s     	% 	%1 	% 	%rB   c                  < SS8X  dP   V P                   P                  P                  SR R7      pV P                   P                  P                  SR R7      pMLV P                   P                  P	                  SS4      pV P                   P                  P                  SS4      pVe1   Ve-   S'       d   ^ M^p\        V^,           V,
          W#,           4      # \        ^ 4      # )F)in_current_line)r   rb   find_backwardsfindfind_enclosing_bracket_leftfind_enclosing_bracket_rightrE   )r   rH   rJ   offsetr>  r=  r?  s   &   rC   handler?load_vi_bindings.<locals>.create_ci_ca_handles.<locals>.handlerW  s    6!,,55DDe E  **3388QV8W ,,55QQf **33PPf  S_#!%!)f"4clCC "!}$rB   NaiTr  r<   )r=  r>  r?  r@  rK  r   s   fff& rC   create_ci_ca_handles.load_vi_bindings.<locals>.create_ci_ca_handlesN  sS    	% 	%. ;UXtDWMUVTB7KUS$?HrB   {}c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s     ! ! !z !rB   c                z    V P                   P                  P                  V P                  RR7      p\	        V4      # )zQ
Move to previous blank-line separated section.
Implements '{', 'c{', 'd{', 'y{'
T)r  r  )r   rb   r-  r   rE   r   indexs   & rC   _previous_section+load_vi_bindings.<locals>._previous_section  s<     $$--@@))D A 
 %  rB   c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s     ! !Q !: !rB   c                z    V P                   P                  P                  V P                  RR7      p\	        V4      # )zM
Move to next blank-line separated section.
Implements '}', 'c}', 'd}', 'y}'
T)r  r  )r   rb   r.  r   rE   rT  s   & rC   _next_section'load_vi_bindings.<locals>._next_section  s;     $$-->>))4 ? 
 %  rB   fc                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s     ! !Q !: !rB   c                4   \        V P                  R4      V P                  P                  n        V P
                  P                  P                  V P                  RV P                  R7      pV'       d   \        V\        P                  R7      # \        ^ 4      # )zp
Go to next occurrence of character. Typing 'fx' will move the
cursor to the next occurrence of character. 'x'.
FTrE  r  r   r(   r  r   r   last_character_findr   rb   rG  r   rE   r7   r9   r   matchs   & rC   _find_next_occurrence/load_vi_bindings.<locals>._find_next_occurrence  ss     2?uzz51Q		.$$--22JJEII 3 
 e.*B*BCCa= rB   Fc                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s     
 
 
z 
rB   c                    \        V P                  R4      V P                  P                  n        \        V P                  P                  P                  V P                  RV P                  R7      ;'       g    ^ 4      # )zx
Go to previous occurrence of character. Typing 'Fx' will move the
cursor to the previous occurrence of character. 'x'.
Tr_  )
r(   r  r   r   ra  rE   r   rb   rF  r   r  s   &rC   _find_previous_occurrence3load_vi_bindings.<locals>._find_previous_occurrence  sk     2?uzz41P		.  ))88

D		 9    	
 	
rB   tc                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s     ! !! !
 !rB   c                B   \        V P                  R4      V P                  P                  n        V P
                  P                  P                  V P                  RV P                  R7      pV'       d#   \        V^,
          \        P                  R7      # \        ^ 4      # )zA
Move right to the next occurrence of c, then one char backward.
FTr_  r   r`  rb  s   & rC   _tload_vi_bindings.<locals>._t  sw    
 2?uzz51Q		.$$--22JJEII 3 
 eain.F.FGGa= rB   Tc                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s     5 5! 5
 5rB   c                   \        V P                  R4      V P                  P                  n        V P
                  P                  P                  V P                  RV P                  R7      p\        V'       d   V^,           4      # ^ 4      # )zC
Move left to the previous occurrence of c, then one char forward.
Tr_  )
r(   r  r   r   ra  r   rb   rF  r   rE   rb  s   & rC   _Tload_vi_bindings.<locals>._T  sl    
 2?uzz41P		.$$--<<JJEII = 
 u%!)44!44rB   c                    V ^8  d   QhRRRR/# )rG   reverser   rU   r   r<   )rL   s   "rC   rM   r    s     "% "% "% "%rB   c                F   <a  S! S '       d   RMR4      R V 3R ll4       pR# )z
Create ',' and ';' commands.
,;c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   6load_vi_bindings.<locals>.repeat.<locals>.__annotate__  s     	% 	%Q 	%: 	%rB   c                &  < ^ pV P                   P                  p\        P                  pVP                  '       d   VP                  P
                  pVP                  P                  pS'       d   V'       * pV'       d4   V P                  P                  P                  VRV P                  R7      pMBV P                  P                  P                  VRV P                  R7      p\        P                  pV'       d   \        WR7      # \        ^ 4      # )z*
Repeat the last 'f'/'F'/'t'/'T' command.
Tr_  r   )r   r   r7   r8   ra  	character	backwardsr   rb   rF  r   rG  r9   rE   )r   posr   rK   charr~  rv  s   &     rC   rs   +load_vi_bindings.<locals>.repeat.<locals>._  s    
  Cyy))H!++D+++33==$88BB	$-I..77FFd%)) G C  ..77<<d%)) = C *33D!#11!!}$rB   Nr<   )rv  rs   r   s   f rC   repeat load_vi_bindings.<locals>.repeat  s     
 
GS	-	% 
.	%rB   hleftc                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s     
 
Q 
: 
rB   c                t    \        V P                  P                  P                  V P                  R7      4      # )z*
Implements 'ch', 'dh', 'h': Cursor left.
r  )rE   r   rb   r  r   r  s   &rC   _leftload_vi_bindings.<locals>._left  s2       ))BBBS
 	
rB   )r   r   c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s     
 
Q 
: 
rB   c                    \        V P                  P                  P                  V P                  R7      \
        P                  R7      # )z,
Implements 'cj', 'dj', 'j', ... Cursor up.
r  r   )rE   r   rb   rP  r   r7   r:   r  s   &rC   _download_vi_bindings.<locals>._down   s;       ))BBBS((
 	
rB   c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s     
 
1 
 
rB   c                    \        V P                  P                  P                  V P                  R7      \
        P                  R7      # )z,
Implements 'ck', 'dk', 'k', ... Cursor up.
r  r   )rE   r   rb   rV  r   r7   r:   r  s   &rC   _upload_vi_bindings.<locals>._up  s;    
   ))@@uyy@Q((
 	
rB   lr  rightc                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s     
 
a 
J 
rB   c                t    \        V P                  P                  P                  V P                  R7      4      # )z<
Implements 'cl', 'dl', 'l', 'c ', 'd ', ' '. Cursor right.
r  )rE   r   rb   rh  r   r  s   &rC   _right load_vi_bindings.<locals>._right  s2       ))CC%))CT
 	
rB   Hc                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r  #  s     = =a =J =rB   c                   V P                   P                  P                  pV P                  pV'       d[   VP                  '       dI   VP
                  P                  VP                  P                  RR7      ^ 4      VP                  ,
          pM \        VP
                  P                  4      ) p\        V\        P                  R7      # )zb
Moves to the start of the visible region. (Below the scroll offset.)
Implements 'cH', 'dH', 'H'.
T)after_scroll_offsetr   )r   layoutcurrent_windowr   render_inforb   rf   first_visible_linere   rg   text_before_cursorrE   r7   r:   r   r0  r>  r  s   &   rC   _top_of_screen(load_vi_bindings.<locals>._top_of_screen"  s     II++   

55MM444NPQ ##$  qzz4455C#N$;$;<<rB   Mc                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r  ;  s     = = =z =rB   c                   V P                   P                  P                  pV P                  pV'       dY   VP                  '       dG   VP
                  P                  VP                  P                  4       ^ 4      VP                  ,
          pM \        VP
                  P                  4      ) p\        V\        P                  R7      # )zX
Moves cursor to the vertical center of the visible region.
Implements 'cM', 'dM', 'M'.
r   )r   r  r  r   r  rb   rf   center_visible_linere   rg   r  rE   r7   r:   r  s   &   rC   _middle_of_screen+load_vi_bindings.<locals>._middle_of_screen:  s     II++   

55MM557 ##$  qzz4455C#N$;$;<<rB   Lc                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r  S  s     = =a =J =rB   c                   V P                   P                  P                  pV P                  pV'       d[   VP                  '       dI   VP
                  P                  VP                  P                  RR7      ^ 4      VP                  ,
          pM\        VP
                  P                  4      p\        V\        P                  R7      # )zD
Moves to the end of the visible region. (Above the scroll offset.)
T)before_scroll_offsetr   )r   r  r  r   r  rb   rf   last_visible_linere   rg   text_after_cursorrE   r7   r:   r  s   &   rC   _end_of_screen(load_vi_bindings.<locals>._end_of_screenR  s    
 II++   

55MM333NPQ ##$  ajj223C#N$;$;<<rB   nc                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r  j  s     
B 
BA 
B* 
BrB   c                    V P                   pV P                  P                  pVP                  VRV P                  R7      p\        W1P                  ,
          4      # )z
Search next.
Fr  r  r   r   r  get_search_positionr   rE   re   r   r   r  re   s   &   rC   _search_next&load_vi_bindings.<locals>._search_nexti  sT    
 ##yy55225		 3 
 /,@,@@AArB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  w  r  rB   c                    V P                   P                  pV P                  P                  VRV P                  R7       R# )zB
Search next in navigation mode. (This goes through the history.)
Fr  Nr   r  r   r  r   r   r  s   & rC   _search_next2'load_vi_bindings.<locals>._search_next2v  s7    
 yy55))5		 	* 	
rB   Nc                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s     
B 
B 
Bj 
BrB   c                    V P                   pV P                  P                  pVP                  V( RV P                  R7      p\        W1P                  ,
          4      # )z
Search previous.
Fr  r  r  s   &   rC   _search_previous*load_vi_bindings.<locals>._search_previous  sV    
 ##yy5522ME 3 
 /,@,@@AArB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     
 
 
t 
rB   c                    V P                   P                  pV P                  P                  V( RV P                  R7       R# )zF
Search previous in navigation mode. (This goes through the history.)
Fr  Nr  r  s   & rC   _search_previous2+load_vi_bindings.<locals>._search_previous2  s9    
 yy55))ME 	* 	
rB   zc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     Y Y1 Y YrB   c                    V P                   pVP                  P                  V P                  P                  P
                  n        R# )zT
Scrolls the window to makes the current line the first line in the visible region.
N)r   rb   r  r   r  r  vertical_scrollr=  s   & rC   _scroll_top%load_vi_bindings.<locals>._scroll_top  s1       :;**:X:X		''7rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     < <a <D <rB   c                P    ^ V P                   P                  P                  n        R# )zS
Scrolls the window to makes the current line the last line in the visible region.
N)r   r  r  r  r  s   &rC   _scroll_bottom(load_vi_bindings.<locals>._scroll_bottom  s     ;<		''7rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     " "a "D "rB   c                   V P                   P                  P                  pV P                  pV'       d   VP                  '       d   VP                  pVP
                  ^,          p\        ^ VP                  P                  ^,
          4      p^ pV^ 8  d3   VP                  V4      pWg,           V8  d   Wg,          pV^,          pK8   WQn
        R# R# R# )z)
Center Window vertically around cursor.
N)r   r  r  r   r  window_heightmaxrb   r  get_height_for_liner  )r   r0  r>  infoscroll_heightrE  heightline_heights   &       rC   _scroll_center(load_vi_bindings.<locals>._scroll_center  s    
 II++  ==D !..!3MAqzz559:AFa%"66q9'-7)FFA !% 1rB   %c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s     % %1 % %rB   c                6   V P                   pV P                  '       d   ^ V P                  u;8  d   ^d8:  d   M MVP                  P	                  \        V P                  VP                  P                  ,          ^,
          ^d,          4      ^ 4      p\        W!P                  P                  ,
          \        P                  R7      # \        ^ 4      # VP                  P                  4       pV'       d   \        V\        P                  R7      # \        ^ 4      # )z
Implements 'c%', 'd%', '%, 'y%' (Move to corresponding bracket.)
If an 'arg' has been given, go this this % position in the file.
r   )r   r   r   rb   rf   rI   
line_countrE   re   r7   r:   find_matching_bracket_positionr9   )r   ro   absolute_indexrc  s   &   rC   _goto_corresponding_bracket5load_vi_bindings.<locals>._goto_corresponding_bracket  s     %%::: 599##!'!K!KV__%?%??!CsJKQ" ""__%D%DD'00 
 "!}$ OOBBDE!%n.F.FGG!!}$rB   |c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s     
 
! 

 
rB   c                    \        V P                  P                  P                  V P                  ^,
          4      4      # )zi
Move to the n-th column (you may specify the argument n by typing it on
number keys, for example, 20|).
)rE   r   rb   get_column_cursor_positionr   r  s   &rC   
_to_column$load_vi_bindings.<locals>._to_column  s4       ))DDUYYQR]S
 	
rB   c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s       j rB   c                >   V P                   P                  pV P                  '       dN   \        VP	                  V P
                  ^,
          ^ 4      VP                  ,
          \        P                  R7      # \        VP                  4       \        P                  R7      # )zG
Go to the start of the very first line.
Implements 'gg', 'cgg', 'ygg'
r   )
r   rb   r   rE   rf   r   re   r7   r:   get_start_of_document_position)r   r  s   & rC   _goto_first_line*load_vi_bindings.<locals>._goto_first_line  sz       )):::,,UYY]A>ARARR#,,  0029P9P rB   rs   c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    s     
 
q 
Z 
rB   c                |    \        V P                  P                  P                  4       \        P
                  R7      # )z9
Go to last non-blank of line.
'g_', 'cg_', 'yg_', etc..
r   )rE   r   rb   'last_non_blank_of_current_line_positionr7   r9   r  s   &rC   _goto_last_line)load_vi_bindings.<locals>._goto_last_line  s2       ))QQS))
 	
rB   c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r         

 

1 

 

rB   c                    V P                   P                  P                  V P                  R7      p\	        Ve
   V^,
          M^ \
        P                  R7      # )zB
Go to last character of previous word.
'ge', 'cge', 'yge', etc..
r  r   r   rb   find_previous_word_endingr   rE   r7   r9   r   prev_ends   & rC   _geload_vi_bindings.<locals>._ge  sR     ''00JJ)) K 
 $0HqLan>V>V
 	
rB   c                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r    r  rB   c                    V P                   P                  P                  V P                  RR7      p\	        Ve
   V^,
          M^ \
        P                  R7      # )zB
Go to last character of previous WORD.
'gE', 'cgE', 'ygE', etc..
Tr  r   r  r  s   & rC   _gEload_vi_bindings.<locals>._gE  sT     ''00JJ))$ K 
 $0HqLan>V>V
 	
rB   mc                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r  ,  s      1  rB   c           	        V P                   P                  P                  pV P                  pV'       d   VP                  '       d   VP                  P
                  pVP                  P                  RR7      pV\        \        V^,          \        VP                  P                  4      4      4      ,          p\        V\        P                  R7      # \        ^ 4      # )zI
Like g0, but half a screenwidth to the right. (Or as much as possible.)
FrT  r   )r   r  r  r   r  window_widthrb   rV  rI   r9  rg   r  rE   r7   r9   )r   r0  r   widthrH   s   &    rC   _gmload_vi_bindings.<locals>._gm+  s    
 II++##MM..EMM<<e<TESUQYDMM,F,F(GHIIEe.*B*BCC!}rB   Gc                    V ^8  d   QhRRRR/# r  r<   )rL   s   "rC   rM   r  <  s     	
 	
! 	

 	
rB   c                    V P                   p\        VP                  P                  VP                  P                  ^,
          ^ 4      VP
                  ,
          \        P                  R7      # )z<
Go to the end of the document. (If no arg has been given.)
r   )r   rE   rb   rf   r  re   r7   r:   )r   bufs   & rC   
_last_line$load_vi_bindings.<locals>._last_line;  sW    
 ""LL33CLL4K4Ka4OQRS!!"((
 	
rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  L  s     : :A :$ :rB   c                ^    V P                   P                  V P                  ^,
          4       R# )zP
If an argument is given, move to this line in the  history. (for
example, 15G)
N)r   go_to_historyr   r  s   &rC   _to_nth_history_line.load_vi_bindings.<locals>._to_nth_history_lineK  s      	**599q=9rB   	123456789c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  [  s     	2 	2 	2d 	2rB   c                <    V P                  V P                  4       R# )z3
Always handle numerics in navigation mode as arg.
Nappend_to_arg_countr  r  s   &rC   r   load_vi_bindings.<locals>._argU  s     %%ejj1rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  h  s     . .a .D .rB   c                <    V P                  V P                  4       R# )z)
Zero when an argument was already give.
Nr  r  s   &rC   _0_arg load_vi_bindings.<locals>._0_arga  s     	!!%**-rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  o  s     E EA E$ ErB   c                T    V P                   P                  V P                  RR7       R# )z!
Insert data at cursor position.
Trv  N)r   ry  r  r  s   &rC   _insert_text&load_vi_bindings.<locals>._insert_textn  s!    
 	((t(DrB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  v  s     = =q =T =rB   c                    V P                   P                  V P                  RR7       V P                   ;P                  ^,          un        \        P
                  V P                  P                  n        R# )z.
Replace single character at cursor position.
Trv  N)	r   ry  r  re   r)   r  r   r   r  r  s   &rC   _replace_single)load_vi_bindings.<locals>._replace_singleu  sP    
 	((t(D,,1,(1(<(<		%rB   c                $    V P                   '       * # rP   )	is_repeatr	  s   &rC   r   r     s
    1;;rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     " "Q "4 "rB   c                   V P                   pVP                  p. p^ pVP                   F3  pVP                  W$V 4       VP                  V P                  4       TpK5  	  VP                  W$R 4       \        VP                  4       UUu. uF  w  rgWv,           ^,           NK  	  pppRP                  V4      Vn        Wn        V;P                  ^,          un        R# u uppi )zv
Insert data at multiple cursor positions at once.
(Usually a result of pressing 'I' or 'A' in block-selection mode.)
Nr   )r   ry   r  r  r  r  r  re   )	r   r   original_textry   r  p2r  r  new_cursor_positionss	   &        rC   _insert_text_multiple_cursors7load_vi_bindings.<locals>._insert_text_multiple_cursors~  s     ##		 00BKK+,KK

#A 1
 	M"%& '00N0N&O 
&OFACGaKK&O 	  

 GGDM	)=&! 
s   Cc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s      $  $q  $T  $rB   c                Z   V P                   pVP                  pRp. p^ pVP                   FP  pV^ 8  d2   W&^,
          ,          R8w  d   VP                  W%V^,
           4       RpMVP                  W%V 4       TpKR  	  VP                  W%R 4       V'       di   VRR  Uu. uF  p\	        V4      NK  	  pp\        \        V4      4      p	RP                  V4      Vn        Wn        V;P                  ^,          un        R# V P                  P                  P                  4        R# u upi )z$
Backspace, using multiple cursors.
Fr  TNr   )r   ry   r  r  rg   listr   r  re   r   r  r  )
r   r   r,  deleted_somethingry   r  r-  partlengthsr.  s
   &         rC   _delete_before_multiple_cursors9load_vi_bindings.<locals>._delete_before_multiple_cursors  s   
 ##		 "00BAv-Q/47Mb1f56$(!MB/0A 1 	M"%&-1#2Y7YTs4yYG7#'
7(;#<  DI-A*  A% II!!# 8s   !D(rt  c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     !$ !$a !$D !$rB   c                   V P                   pVP                  pRp. p. p^ pVP                   FB  pVP                  W&V 4       V\	        V4      8  g   W',          R8X  d   TpK7  V^,           pRpKD  	  VP                  W&R 4       V'       dP   VRR  Uu. uF  p\	        V4      NK  	  p	p\        \        V	4      4      pRP                  V4      Vn        WQn        R# V P                  P                  P                  4        R# u upi )z!
Delete, using multiple cursors.
Fr  TNr   r3  )r   ry   r  r  rg   r4  r   r  r   r  r  )
r   r   r,  r5  ry   r.  r  r-  r6  r7  s
   &         rC   _delete_after_multiple_cursors8load_vi_bindings.<locals>._delete_after_multiple_cursors  s    
 ##		 "!00BKK+,S''=+<+DF$(! 1 	M"%&-1#2Y7YTs4yYG7#'
7(;#<  DI-A*II!!# 8s   Dc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     & &a &D &rB   c                B   V P                   p. pVP                   FD  pVP                  P                  V4      ^,          ^ 8  d
   V^,          pVP	                  V4       KF  	  W!n        VP                  P
                  ^ 8  d   V;P                  ^,          un        R# R# )zH
Move all cursors to the left.
(But keep all cursors on the same line.)
N)r   r  rb   rd   r  cursor_position_colre   )r   r   new_positionsr  s   &   rC   _left_multiple(load_vi_bindings.<locals>._left_multiple  s     ##//A}}88;A>BQ  # 0
 *7&==,,q0  A%  1rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     & &q &T &rB   c                   V P                   p. pVP                   Fe  pVP                  P                  V4      w  rEV\	        VP                  P
                  V,          4      8  d
   V^,          pVP                  V4       Kg  	  W!n        VP                  P                  '       g   V;P                  ^,          un        R# R# )zI
Move all cursors to the right.
(But keep all cursors on the same line.)
N)	r   r  rb   rd   rg   rh   r  is_cursor_at_the_end_of_linere   )r   r   rA  r  rj   columns   &     rC   _right_multiple)load_vi_bindings.<locals>._right_multiple  s     ##//A--CCAFKCDMM//455Q  #	 0 *7&}}999  A%  :rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s       d rB   c                    R# )z>
Ignore all up/down key presses when in multiple cursor mode.
Nr<   r  s   &rC   _updown_multiple*load_vi_bindings.<locals>._updown_multiple  s    rB   zc-xzc-lc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s     > >a >D >rB   c                :    V P                   P                  4        R# )z
Pressing the ControlX - ControlL sequence in Vi mode does line
completion based on the other lines in the document and the history.
N)r   start_history_lines_completionr  s   &rC   _complete_line(load_vi_bindings.<locals>._complete_line  s     	;;=rB   zc-fc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r    s      !  rB   c                    R# )z
Complete file names.
Nr<   r  s   &rC   _complete_filename,load_vi_bindings.<locals>._complete_filename  s     	rB   zc-kc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  &  s     6 6 6d 6rB   c                <    RV P                   P                  n        R# )z
Go into digraph mode.
TN)r   r   waiting_for_digraphr  s   &rC   _digraph"load_vi_bindings.<locals>._digraph%  s    
 26		.rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  -  s     8 8 8t 8rB   c                P    V P                   V P                  P                  n        R# )z
First digraph symbol.
N)r  r   r   r   r  s   &rC   	_digraph1#load_vi_bindings.<locals>._digraph1,  s    
 .3ZZ		*rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  4  s     6 6q 6T 6rB   c                    V P                   P                  P                  ;'       g    RV P                  3pV\        9  d   VRRR1,          p\        V,          pV P                   P                  P
                  \        P                  8H  pV P                  P                  \        V4      VR7       RV P                   P                  n        RV P                   P                  n        RV P                   P                  n        R#   \         d(    T P                   P                  P                  4         Lii ; i  RT P                   P                  n        RT P                   P                  n        i ; i)z
Insert digraph.
r   Nrv  Fr3  )r   r   r   r  r%   r  r)   r  r   ry  chrrY  KeyErrorr  r  )r   codesymbolrw  s   &   rC   _create_digraph)load_vi_bindings.<locals>._create_digraph3  s   
	6 		""2288b

%D 8#DbDzd^F 		**559J9JJI  ,,S[I,N5:EII25:EII215EII.  	$II!!#	$ 6;EII215EII.s+   AD A2D; /D85D; 7D88D; ;8E3zc-oc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  N  s     < <! < <rB   c                <    RV P                   P                  n        R# )z,
Go into normal mode for one single action.
TN)r   r   temporary_navigation_moder  s   &rC   _quick_normal_mode,load_vi_bindings.<locals>._quick_normal_modeM  s    
 8<		4rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  U  s     	, 	,A 	,$ 	,rB   c                    V P                   ^,          P                  pV\        9   d&   V P                  P                  pWn        RVn        R# R# )z
Start recording macro.
r   N)r  r  r  r   r   recording_registercurrent_recording)r   r{  r   s   &  rC   _start_macro&load_vi_bindings.<locals>._start_macroT  sE    
 q!&&!!yy))H*+')+H&	 "rB   c                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  a  s     , ,1 , ,rB   c                    V P                   P                  pVP                  '       d=   \        VP                  4      VP
                  VP                  &   RVn        RVn        R# R# )z
Stop recording macro.
Nr   )r   r   ro  r   rp  r  )r   r   s   & rC   _stop_macro%load_vi_bindings.<locals>._stop_macro`  s]    
 99%% &&&DQ**EH$$X%@%@A +/H')+H& 'rB   @)r   record_in_macroc                    V ^8  d   QhRRRR/# r   r<   )rL   s   "rC   rM   r  p  s     D Da DD DrB   c                   V P                   ^,          P                  p V P                  P                  P                  V,          p. p\        TP                  4      pTP                  TP                  4       TP                  4        \        T P                  4       F*  pT P                  P                  P                  TRR7       K,  	  R#   \
         d     R# i ; i)a4  
Execute macro.

Notice that we pass `record_in_macro=False`. This ensures that the `@x`
keys don't appear in the recording itself. This function inserts the
body of the called macro back into the KeyProcessor, so these keys will
be added later on to the macro of their handlers have
`record_in_macro=True`.
NT)first)r  r  r   r   r  rc  r$   r  feedry   flushr  r   key_processorfeed_multiple)r   r{  macror   parserrs   s   &     rC   _execute_macro(load_vi_bindings.<locals>._execute_macroo  s     q!&&	II&&66q9E  "T[[)EJJ uyy!AII##11$d1C "  		s   'C CC)r   ?)r   r   )r   r   )r   r   )r   r  rP   )FT))r  r  )'r  )`r  )[])r_  rY  )rP  rQ  )r  r  )r0   r   r   r   r   r   r   r   r   r2   r"   r   r   r   r   r   r*   r  r   r   r#   r   r   r    r   r   r   r   r/   r   )r   handleTransformFunctionvi_transform_functionsr	  r  r  r  r%  r,  r0  r5  r?  rE  rJ  rO  rW  r^  rb  ri  ro  ry  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r&  r*  r.  r5  r<  rC  rJ  rQ  rW  r]  rb  rk  rr  rz  r  r  r  r  r  r  r  r  r  r  r  r\  funcr  r  r  r  r  r  r  r  r  r  r  r  r  r!  r%  r)  r/  r5  r:  rN  r?  r=  r>  rV  rZ  rd  ri  rn  rs  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r	  r  r  r  r   r  r"  r&  r/  r8  r<  rB  rH  rL  rQ  rU  rZ  r^  rf  rk  rq  ru  r  r  r  r   s                                                                                                                                                   @@@rC   r3   r3     s`     =LF
 eCHovxs
7KKL
 H:	
 
VX<=	VX<=	VX?@,	
7* 5(_)EFH$ $ C)*8 +8 C)*: +: D+,E,-6 . -6 C*+
 ,
 F-.E,-8 . /8 C*+
 ,
 K 23
 4
 E.)2 *2 E.)	1 *	1 E.)E.)3 * *3 E.)1 *1 7-=>M" 7=L=89+m:TUG]N-??@
 A
 H/09 19 H^,= -= C*l]:;9 <9 C*l]:;9 <9 C*l]:;	9 <	9 C/<-?@C*l]:;9 < A9" C*+. ,. C/0R 1R@ C)*5 +5 C*l]:;9 <9 C*l]:;
 <
 C*l]:; << C*l]:;5 <5 C*l]:;2 <2 C/<-?@> A> C)\M9:3 ;3 C.,>?? @? C*+
 ,
 C*+
 ,
 C3'9:
 ;
 C3'9:
 ;
 C*+A ,A C*+: ,: C*l]:;9 <9 C*J( K( C*+Q ,Q E,-Q .Q C)*6 +6 C*+V ,V C)*6 +6 E+,6 -6 C./C./
C 0 0
C C*+/ ,/ C*+/ ,/ C/0C*+O , 1O C*+

 ,

 C*+

 ,

 C/0E.)= * 1= C/0E.)M * 1M C*l]:;9 <9 C*l]:;9 <9 C*+= ,= Cc"4}"DE9 F9 Cc"4}"DE9 F9 Cc"4}"DE< F< C*+
V ,
V C*+
V ,
V C*+ ,
 C*+ ,
 )6H.|<KDHH<=  > #A #AJ 'ue4&ud3&tU3&tT2M M, -
1d D-1- - c]9 9 c488S!C "C c]5 5 c]7 7 c3& & 
 
 	
 	
 T T 
 
 	
 	
 P P P P c40& 1& c40& 1& c40& 1& c40& 1& c40& 1& 
 
 	
 	
$I $IL !
Hf !659!
 	S#uc2S#uc2  ! ! ! ! dhh!  ! dhh
  
 dhh!  ! dhh5  5"% "%H 4L
5M
  
 dF
	 G
 dF
 G
 
   
 = =. = =. = =, d+
B ,
B C*+
 ,
 d+
B ,
B C*+
 ,
 C/2CCDC/2CCDC!36G!GHY I E EY C/2CCDC/2CCD< E E< C/2CCD" E"6 % %: 
 
 c & c
 
 c

 

 c

 

 c  	
 	
 C : !: 	% -.

	2

	2  !225TT
.. DHH_-E .E DHH34= 5= &.
"
": K 78 $ 9 $D H45!$ 6!$F F23& 4&$ G34& 5&& D01F23 4 2
 E50> 1> E50 1 E.?:;6 <6 DHH_0F/FFG8 H8 DHH_/EEF6 G62 E.?:;< << C"48J7J"JK	, L	, C*-??@, A, C"4eLD MD: ",88rB   c                   V ^8  d   QhRR/# r   r<   )rL   s   "rC   rM   rM     s     )9 )9 )9rB   c                    \        4       p V P                  p^RIHp V! R\        \
        ,          \        ( ,          R7      ! VP                  4       V! R\        \
        ,          \        ,          R7      ! VP                  4       V! R4      ! VP                  4       V! R\        \
        ,          \        ( ,          R7      ! VP                  4       V! R\        \
        ,          \        ,          R7      ! VP                  4       V! R4      ! VP                  4       V! R\        R7      ! VP                  4       V! R\        R7      ! VP                  4       V! R\        R7      ! VP                  4       V! R4      ! VP                  4       V! R	4      ! VP                  4       V! R
\        R7      ! VP                  4       V! R4      ! VP                  4       \        V \         4      # )r   )search/r   r  zc-szc-rrQ  zc-crG  r2  r   )r0   r   r   r  r   r"   r!    start_forward_incremental_search start_reverse_incremental_searchr   accept_searchreverse_incremental_searchforward_incremental_searchabort_searchr   r/   r   )r   r  r  s      rC   r4   r4     s   =LF "%66;W:WW --/ "%66:VV --/ 5M&99: "%66;W:WW --/ "%66:VV --/ 5M&99: 7<()=)=>
5&v'H'HI
5&v'H'HI
5M&%%&
5M&%%&
;56v7J7JK 8V))*!,88rB   )X
__future__r   r   r   enumr   	itertoolsr   typingr   r   r   r	   "prompt_toolkit.application.currentr
   prompt_toolkit.bufferr   r   r   r   prompt_toolkit.clipboardr   prompt_toolkit.documentr   prompt_toolkit.filtersr   r   r   r   r   r   prompt_toolkit.filters.appr   r   r   r   r   r   r   r   r   r    r!   r"   r#   !prompt_toolkit.input.vt100_parserr$   #prompt_toolkit.key_binding.digraphsr%   (prompt_toolkit.key_binding.key_processorr&   r'   #prompt_toolkit.key_binding.vi_stater(   r)   prompt_toolkit.keysr*   prompt_toolkit.searchr+   prompt_toolkit.selectionr,   r-   r.   r   r/   r0   r1   named_commandsr2   __all__r   ascii_lowercaser  r7   rE   TextObjectFunctionr   r   OperatorFunctionr   r   r   r   r   r   r   r3   r4   r<   rB   rC   <module>r     sp   "      5 5 6 H H 2 ,     : 8 L H $ 1 M M O O ' 
 ((#l2 T e, e,R qc:o. v/0s!n Q
OT12 e+,HV 2 2   : : / /
 - -z9z7)9rB   