After searching a bit on the net it seems that I can't map CtrlSpace to anything/alot. Is there a way to do it today, what I found was usually 2 years old.
相关问题
- Emacs shell: save commit message
- How to change the first two uppercase characters o
- Insert text into current buffer from function
- Hot reload on save
- CreateFileMapping ends with “Not enough disk space
相关文章
- 如何让 vim 支持 .cshtml 文件的代码高亮
- Auto-save in VIM as you type
- How can I use gcc's -I command to add recursiv
- Vim: overloaded mapping for multiple modes
- Is there a way to modify the entity mapping config
- How to use relative line numbering universally in
- How to copy the value of a vim option to a registe
- E185: Cannot find color scheme*
:inoremap <c-space> <c-x><c-o>
?omnifunc
set?I had better results with this set of mappings across all modes on Mac OS. Have not tested Windows or Linux.
I don't understand how the excepted answer is supposed to work in terminal mode.
The problem seems to be that Terminal.app doesn't interpret
<C-Space>
correctly and Vim understands it as<C-@>
which is a built-in mapping (:help CTRL-@
).Maybe you could go with something like the following in your .vimrc:
which seems to work, here, but I don't like the idea of overriding built-ins like that.
Instead you should try with
<Leader>
(:help leader
), it gives you huge possibilities for defining your own custom mappings and (depending on themapleader
you choose) won't interfere with OS/app specific shortcuts/limitations and hence be more portable.With this in my .vimrc:
I just hit
,,
to complete method names.The nitpicker broke pablox solution. The crux of the solution was just about remapping. So when you disable remapping, it cannot work.
If you really want to throw in a
noremap
, this is what it looks like:What will not work:
inoremap <C-@> <C-Space>
'cause the<C-Space>
part will not be remapped itself.Add the following code to
~/.vimrc
:Source: https://coderwall.com/p/cl6cpq
To accommodate both Windows and Linux I applied this to
~/.vimrc