macos Mac OS X 上的 Vim 插入模式
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/654191/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Vim Insert Mode on Mac OS X
提问by Tamas Czinege
Apparently Mac keyboards don't have an Insertkey (or maybe they do but I can't find it). How can I get to insert mode in vimon a Mac?
显然 Mac 键盘没有Insert键(或者可能有但我找不到)。如何在 Mac 上的vim 中进入插入模式?
回答by Jeremy L
If this is as simple a question as it seems, you merely press i.
如果这是一个看起来很简单的问题,您只需按i。
回答by Konrad Rudolph
Vim enters the insert mode using i(or afor append), regardless of platform. Overwrite mode is only rarely entered using Shift+r. I've never used the Insertkey here.
Vim 进入插入模式 using i(or afor append),与平台无关。很少使用Shift+进入覆盖模式r。我从来没有用过Insert这里的钥匙。
回答by smathy
The other use of the Insertkey is to switch between replace-mode and insert-mode when already in either. You can accomplish this easily on the Mac by just mapping another key to do this for you. In your ~/.vimrc
just put imap <F13> <Insert>
and now the F13key (which on my Mac keyboard is the closest key to where the Insertkey is on a regular keyboard).
该Insert键的另一个用途是在替换模式和插入模式之间切换。您只需映射另一个键即可在 Mac 上轻松完成此操作。在您~/.vimrc
刚刚放置imap <F13> <Insert>
的F13键中(在我的 Mac 键盘上,它是最接近Insert普通键盘上键的键)。
回答by Parrots
Pressing "i" brings you into insert mode within VIM.
按“i”使您进入 VIM 中的插入模式。
回答by Esqarrouth
Enter Insert Mode: press i
进入插入模式:按 i
Exit Insert Mode: press esc, type :x
退出插入模式:按esc,键入:x