File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -68,9 +68,14 @@ def reformat_and_execute(event):
6868 reformat_text_before_cursor (event .current_buffer , event .current_buffer .document , shell )
6969 event .current_buffer .validate_and_handle ()
7070
71+ @Condition
72+ def ebivim ():
73+ return shell .emacs_bindings_in_vi_insert_mode
74+
7175 kb .add ('escape' , 'enter' , filter = (has_focus (DEFAULT_BUFFER )
7276 & ~ has_selection
7377 & insert_mode
78+ & ebivim
7479 ))(reformat_and_execute )
7580
7681 kb .add ("c-\\ " )(quit )
@@ -333,10 +338,6 @@ def _(event):
333338 if sys .platform == "win32" :
334339 kb .add ("c-v" , filter = (has_focus (DEFAULT_BUFFER ) & ~ vi_mode ))(win_paste )
335340
336- @Condition
337- def ebivim ():
338- return shell .emacs_bindings_in_vi_insert_mode
339-
340341 focused_insert_vi = has_focus (DEFAULT_BUFFER ) & vi_insert_mode
341342
342343 @kb .add ("end" , filter = has_focus (DEFAULT_BUFFER ) & (ebivim | ~ vi_insert_mode ))
You can’t perform that action at this time.
0 commit comments