0

(Note: I don't see anything in the possible duplicate (Certain key mappings not working in MacVim) that explains why control + space behaves like w on my MacVim.)

I see that when I press control+space, it behaves as if I pressed w, i.e. the cursor moves one word forward to the beginning of the next word.

This is causing problem for me because I would like to use the control+space combination with the cscope_maps plugin.

This issue does not happen in Vim 7.4 that I run within Terminal.

This issue occurs in MacVim 8.0 even after running it with mvim -u NONE.

I have two questions.

  1. Why does this happen?
  2. How can I prevent this from happening so that I can use this combination to use cscope_maps plugin?

Here are my setup details.

$ brew search macvim
macvim ✔

$ brew list macvim
/usr/local/Cellar/macvim/8.0-131/bin/gview
/usr/local/Cellar/macvim/8.0-131/bin/gvim
/usr/local/Cellar/macvim/8.0-131/bin/gvimdiff
/usr/local/Cellar/macvim/8.0-131/bin/gvimex
/usr/local/Cellar/macvim/8.0-131/bin/mview
/usr/local/Cellar/macvim/8.0-131/bin/mvim
/usr/local/Cellar/macvim/8.0-131/bin/mvimdiff
/usr/local/Cellar/macvim/8.0-131/bin/mvimex
/usr/local/Cellar/macvim/8.0-131/MacVim.app/Contents/ (2111 files)

$ mvim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Apr 19 2017 09:53:00)
MacOS X (unix) version
Included patches: 1-567
Compiled by Homebrew
Huge version with MacVim GUI.  Features included (+) or not (-):
+acl             +find_in_path    -mouse_sysmouse  -tag_any_white
+arabic          +float           +mouse_urxvt     +tcl
+autocmd         +folding         +mouse_xterm     +termguicolors
+balloon_eval    -footer          +multi_byte      +terminfo
+browse          +fork()          +multi_lang      +termresponse
++builtin_terms  +fullscreen      -mzscheme        +textobjects
+byte_offset     -gettext         +netbeans_intg   +timers
+channel         -hangul_input    +num64           +title
+cindent         +iconv           +odbeditor       +toolbar
+clientserver    +insert_expand   +packages        +transparency
+clipboard       +job             +path_extra      +user_commands
+cmdline_compl   +jumplist        +perl            +vertsplit
+cmdline_hist    +keymap          +persistent_undo +virtualedit
+cmdline_info    +lambda          +postscript      +visual
+comments        +langmap         +printer         +visualextra
+conceal         +libcall         +profile         +viminfo
+cryptv          +linebreak       +python          +vreplace
+cscope          +lispindent      -python3         +wildignore
+cursorbind      +listcmds        +quickfix        +wildmenu
+cursorshape     +localmap        +reltime         +windows
+dialog_con_gui  -lua             +rightleft       +writebackup
+diff            +menu            +ruby            -X11
+digraphs        +mksession       +scrollbind      -xfontset
+dnd             +modify_fname    +signs           +xim
-ebcdic          +mouse           +smartindent     -xpm
+emacs_tags      +mouseshape      +startuptime     -xsmp
+eval            +mouse_dec       +statusline      -xterm_clipboard
+ex_extra        -mouse_gpm       -sun_workshop    -xterm_save
+extra_search    -mouse_jsbterm   +syntax          
+farsi           +mouse_netterm   +tag_binary      
+file_in_path    +mouse_sgr       +tag_old_static  
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe  -DMACOS_X_UNIX  -F/usr/local/opt/python/Frameworks -I/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/include/python2.7 -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: clang   -L. -L/usr/local/lib -L. -L/usr/local/lib -F/usr/local/opt/python/Frameworks -L/usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -lpython2.7 -framework CoreFoundation -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon       -lm  -lncurses -liconv -framework Cocoa   -fstack-protector  -L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE -lperl -F/usr/local/opt/python/Frameworks -framework Python  -F/System/Library/Frameworks -framework Tcl -framework CoreFoundation -framework Ruby    

If I run mvim -u NONE and then enter the :map command, I see only one mapping.

v <BS> "-d
Community
  • 1
  • 1
Lone Learner
  • 18,088
  • 20
  • 102
  • 200
  • Possible duplicate of [Certain key mappings not working in MacVim](http://stackoverflow.com/questions/8078333/certain-key-mappings-not-working-in-macvim). See also [MacVim, remapping Alt-key as Ctrl-key](http://stackoverflow.com/questions/15248495/macvim-remapping-alt-key-as-ctrl-key) and https://github.com/tekezo/Karabiner – paulsm4 May 04 '17 at 06:43
  • @paulsm4 Can you elaborate which part or answer in the three links you have provided explains why `Ctrl`+`Space` behaves like `w` on MacVim? – Lone Learner May 04 '17 at 07:12

0 Answers0