如何从键盘上删除顶栏?(How to remove top bar from keyboard?)
我正在使用Swift语言开发iOS应用程序,并使用内部Web视图浏览器。 如果用户单击文本字段,则本机iOS键盘将自行打开。
我的简单问题是:如何在键盘中隐藏顶部栏(带有2个箭头和“完成”按钮)?
I'm developing a app for iOS using the language Swift, with a internal web view browser. If the user click on a text field, the native iOS keyboard open itself.
My simple question is: how can I hide the top bar (with the 2 arrows and the "done" button) in the keyboard?
原文:https://stackoverflow.com/questions/31695021
最满意答案
您似乎正在尝试将Ctrl + Space映射到切换插入模式。
nnoremap <C-space> i imap <C-space> <Esc>
(来自这个Vim提示 (标记为过时,但有一个关于避免包含提示的更丰富文档的链接)。)
请记住,这并不能保证在所有终端和平台上都能正常工作。 有些终端和平台可能会吃一个给定的Ctrl +快捷方式,而有些则没有,所以找一个适合你环境的快捷方式。
It seems you are trying to map Ctrl+Space to toggle insert mode.
nnoremap <C-space> i imap <C-space> <Esc>
(Came from this Vim tip (marked obsolete, but there's a link to a more rich document on avoiding which includes the tip).)
Remember that this is not guaranteed to work across all terminals and platforms. Some terminals and platforms may eat a given Ctrl+something shortcut, while others don't, so find one that works in your environment.
相关问答
更多-
有关Vim FAQ 10.9的信息可能有用 : 10.9. When I use my arrow keys, Vim changes modes, inserts weird characters in my document but doesn't move the cursor properly. What's going on? There are a couple of things that could be going on: either you are using Vim ov ...
-
与g command没有更大的联系:它是一个混合的。 这是一个简单的前缀,未绑定的密钥已经灭绝,所以较少使用的地图找到了g后面的好地方。 There's no greater connection to g-commands: it's a mixed bunch. It is an easy prefix and the unbound keys were getting extinct so the less-used maps found a good place behind g.
-
看起来你的Vim是以简单的模式启动的。 看:help easy 当使用-y参数或evim调用Vim时,会发生这种情况,或者您可能在.vimrc配置中存在:set insertmode 。 找到源并禁用它; 暂时还可以通过Ctrl + O完成 :set noim Enter 。 Looks like your Vim is launched in easy mode. See :help easy. This happens when Vim is invoked with the -y argument o ...
-
我通常将当前的vim模式转变为状态线,等等。 如果您寻求简单性,您只能将此信息设置到状态线上 。 但是,通常情况下,当你的帽子锁定沮丧并且处于命令模式时,真的很疯狂的事情(因为hjkl现在是HJKL - 只有J和K足够让你在不了解发生了什么的情况下把头发拉出来) :h J和:h K看我的意思) 只要注意大小写锁定键 ,你会在大多数时间内很好的IMO。 A popular option to indicate switching to Insert mode (and back to Normal mode) ...
-
Eelvex解决方案略有不同版本: function! Repeat() let times = input("Count: ") let char = input("Char: ") exe ":normal a" . repeat(char, times) endfunction imap
:call Repeat() Slightly different version of Eelvex's solution: function! Repe ... -
如何映射插入中的返回以进入正常模式然后执行o操作(How do I map return in insert to go to normal mode and then do the o action)[2024-01-08]
我不确定为什么这不起作用。 我不知道为什么转义和使用o打开换行符不会添加到更改列表。 但是,幸运的是,有一个命令可以将文本的当前状态显式添加到更改列表中。 该命令是(在插入模式下)u 。 来自:h i_ctrl-g_u CTRL-G u break undo sequence, start new change *i_CTRL-G_u* 方便的是,这个命令甚至不会离开插入模式! 总而言之,您正在寻找的映射是: :inoremap u 或者,你也可 ... -
Vim插入模式:明确的键绑定始终按预期工作?(Vim insert mode: unambiguous key binding that always works as expected?)[2024-01-05]
i应该这样做。 暂时让你进入正常模式,但只有一个命令,如果该命令是“进入插入模式”,那么你只需返回到那里。 编辑:我现在可以重现你的错误信息,而且看起来最简单的做法是这样的: :nmap i :imap i 如果不在插入模式下映射 ,但仅在正常模式下,则重复点击 将是幂等的。 感谢Benoit提及 在插入模式下插入一个标签。 i should do the trick. gets you temporarily t ... -
最有可能的是,您的插入模式退格被映射
都不做(即 )。 键入:verbose imap 验证:verbose imap 。 这将显示是否映射了退格键以及设置了地图的位置。 我想要的是退格键在插入模式下删除文本(就像大多数其他程序一样)并在正常模式下导航/禁用。 我怎样才能重新获得这种行为? 你可以做: iunmap nnoremap 第一行在插入模式下取消映射 ,因此 将恢复其默认功能。 第二行在正常模式下映射 不执行 ... -
您似乎正在尝试将Ctrl + Space映射到切换插入模式。 nnoremap
i imap (来自这个Vim提示 (标记为过时,但有一个关于避免包含提示的更丰富文档的链接)。) 请记住,这并不能保证在所有终端和平台上都能正常工作。 有些终端和平台可能会吃一个给定的Ctrl +快捷方式,而有些则没有,所以找一个适合你环境的快捷方式。 It seems you are trying to map Ctrl+Space to toggle insert mo ... -
目前,每个快捷键如Ctrl+B都由Vim仿真或IDE处理。 请参阅有关如何为快捷方式选择处理程序的文档 。 请在此处提交功能请求,以便仅在正常模式下处理Vim命令。 Currently each shortcut like Ctrl+B is handled by either the Vim emulation or the IDE. See the docs on how to choose the handler for a shortcut. Feel free to file a feature ...