我最近通过在配置中添加render() {
return (
<div className={styles.listTitle}
onMouseEnter={this.handleHoverOn}
onMouseLeave={this.handleHoverOff}>
{this.props.name}
{this.state.expanded && this.renderChildren()}
</div>
);
},
renderChildren() {
return (
<div>
{React.Children.map(this.props.children, function(child){
return React.cloneElement(child, {className: 'child'});
})}
</div>
);
}
来启用Vi模式。由于我这样做 Ctrl + F 不再适用于完成建议,我必须使用右箭头。
fish_vi_mode
的键绑定在启用或不启用forward-char
时相同。根据{{1}},它们是:
fish_vi_mode
为什么不 Ctrl + F 与fish_config
一起使用?
答案 0 :(得分:4)
在vi模式下,运行bind
并查找\cf
,它在这里:
bind -M insert \cf forward-word
发生了什么:控制-F正在前进。您可以恢复非vi行为:
bind -M insert \cf forward-char
是一个字符前进,或者如果光标在末尾则接受自动提示(这无疑是奇怪的)。
或者如果您希望它只接受自我提示,您可以在fish_vi_mode
之后运行:
bind -M insert \cf accept-autosuggestion
现在它接受任何时候的自我提示,而不仅仅是在结束时。
顺便说一句,accept-autosuggestion
或forward-char
这些功能可以通过bind --function-names
列出
编辑:这比#2254应该更难。最简单的方法是将fish_vi_mode
函数调用fish_user_key_bindings
:
function fish_user_key_bindings
fish_vi_mode
bind -M insert \cf accept-autosuggestion
bind \cf accept-autosuggestion
end
您可以使用funced fish_user_key_bindings
来编写该功能,然后使用funcsave fish_user_key_bindings
进行保存。