vim puts extra space for every accented character - vim

Whenever I type an accented character in vim, like for example: é it places an extra space like so é<space>.
Small gif animation that illustrates the problem: Link here. Notice that in the screen recording I am at no point pressing the space bar and yet they appear.
It's the exact same problem as described in this SO question and in Super user question too, but the solution proposed for both - set encoding=utf-8 - is not working for me. I've placed that in both the .vimrc and in a running session and none worked.
In MacVim, which set encoding? also outputs encoding=utf-8, this issue doesn't happen.
I installed vim with brew, here's the info command of it:
vim: stable 7.4.488, HEAD
http://www.vim.org/
Conflicts with: ex-vi
/usr/local/Cellar/vim/7.4.488 (1600 files, 26M) *
Built from source with: --override-system-vi
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/vim.rb
==> Dependencies
Optional: lua ✔, luajit ✔
==> Options
--disable-nls
Build vim without National Language Support (translated messages, keymaps)
--override-system-vi
Override system vi
--with-client-server
Enable client/server mode
--with-lua
Build vim with lua support
--with-luajit
Build with luajit support
--with-mzscheme
Build vim with mzscheme support
--with-python3
Build vim with python3 instead of python[2] support
--with-tcl
Build vim with tcl support
--without-perl
Build vim without perl support
--without-python
Build vim without python support
--without-ruby
Build vim without ruby support
--HEAD
Install HEAD version
And :version info here:
:version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 5 2015 21:44:59)
MacOS X (unix) version
Included patches: 1-258
Compiled by Homebrew
Huge version with MacVim GUI. Features included (+) or not (-):
+acl +cmdline_info +emacs_tags -gettext +lua +mouse_urxvt +profile +statusline +transparency -X11
+arabic +comments +eval -hangul_input +menu +mouse_xterm +python -sun_workshop +user_commands -xfontset
+autocmd +conceal +ex_extra +iconv +mksession +multi_byte -python3 +syntax +vertsplit +xim
+balloon_eval +cryptv +extra_search +insert_expand +modify_fname +multi_lang +quickfix +tag_binary +virtualedit -xsmp
+browse +cscope +farsi +jumplist +mouse -mzscheme +reltime +tag_old_static +visual -xterm_clipboard
++builtin_terms +cursorbind +file_in_path +keymap +mouseshape +netbeans_intg +rightleft -tag_any_white +visualextra -xterm_save
+byte_offset +cursorshape +find_in_path +langmap +mouse_dec +odbeditor +ruby +tcl +viminfo -xpm
+cindent +dialog_con_gui +float +libcall -mouse_gpm +path_extra +scrollbind +terminfo +vreplace
+clientserver +diff +folding +linebreak -mouse_jsbterm +perl +signs +termresponse +wildignore
+clipboard +digraphs -footer +lispindent +mouse_netterm +persistent_undo +smartindent +textobjects +wildmenu
+cmdline_compl +dnd +fork() +listcmds +mouse_sgr +postscript -sniff +title +windows
+cmdline_hist -ebcdic +fullscreen +localmap -mouse_sysmouse +printer +startuptime +toolbar +writebackup
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"
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 -I/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Ve
rsions/2.7/include/python2.7 -I/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/include/python2.7 -fno-strict-aliasing -fno-common -dynamic -I/usr/local/inclu
de -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -I/System/Library/Frameworks/Tcl.framework/Headers -D
_REENTRANT=1 -D_THREAD_SAFE=1 -D_DARWIN_C_SOURCE=1
Linking: clang -L. -L/usr/local/lib -L. -L/usr/local/lib -L/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -lpython2.7 -framework Core
Foundation -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon -lm -lncurses -liconv -framework Cocoa -pagezero_size 10000 -image_base 100000000 -L/usr/local/lib -llu
ajit-5.1 -fstack-protector -L/usr/local/lib -L/System/Library/Perl/5.16/darwin-thread-multi-2level/CORE -lperl -framework Python -F/System/Library/Frameworks -framework Tcl -frame
work CoreFoundation -framework Ruby
And my locale:
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
Any ideas? Thanks.

None of the suggestions of the comments worked for me, so I kept on digging on the issue myself. In the end it was just a matter of unchecking an iTerm setting.

Related

No digraphs available in vim

I can't get digraphs to work in vim.
When I type:
:digraphs
it gives me an error message: E196: No digraphs in this version.
Do I need to install any plugins or packages? If I type:
:scriptnames
it doesn't seem to return i.e. just seems to block.
I am using vim 8.2.587 in Fedora 30, running as a guest inside Virtual Box.
When using vim 8.2.158 running on a native Fedora 31 machine, the digraphs work fine.
Update:
vi --version | grep digraph
shows that vim was built with digraph support. The full output is below.
> vi --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr 17 2020 05:09:15)
Included patches: 1-587
Modified by <bugzilla#redhat.com>
Compiled by <bugzilla#redhat.com>
Small version without GUI. Features included (+) or not (-):
+acl -farsi +mouse_sgr -tag_old_static
-arabic -file_in_path -mouse_sysmouse -tag_any_white
+autocmd -find_in_path -mouse_urxvt -tcl
-autochdir -float +mouse_xterm -termguicolors
-autoservername -folding +multi_byte -terminal
-balloon_eval -footer -multi_lang +terminfo
-balloon_eval_term +fork() -mzscheme +termresponse
-browse -gettext -netbeans_intg -textobjects
+builtin_terms -hangul_input +num64 -textprop
-byte_offset +iconv -packages -timers
-channel +insert_expand -path_extra -title
-cindent -ipv6 -perl -toolbar
-clientserver -job -persistent_undo +user_commands
-clipboard +jumplist -popupwin -vartabs
+cmdline_compl -keymap -printer +vertsplit
+cmdline_hist -lambda -profile +virtualedit
-cmdline_info -langmap -python +visual
+comments -libcall -python3 +visualextra
-conceal -linebreak -quickfix -viminfo
-cryptv -lispindent -reltime +vreplace
-cscope +listcmds -rightleft +wildignore
+cursorbind +localmap -ruby -wildmenu
-cursorshape -lua +scrollbind +windows
-dialog -menu -signs +writebackup
-diff -mksession -smartindent -X11
-digraphs +modify_fname -sound -xfontset
-dnd +mouse -spell -xim
-ebcdic -mouseshape -startuptime -xpm
-emacs_tags -mouse_dec -statusline -xsmp
-eval -mouse_gpm -sun_workshop -xterm_clipboard
+ex_extra -mouse_jsbterm -syntax -xterm_save
-extra_search -mouse_netterm +tag_binary
system vimrc file: "/etc/virc"
user vimrc file: "$HOME/.virc"
2nd user vimrc file: "~/.vim/virc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/etc"
f-b for $VIMRUNTIME: "/usr/share/vim/vim82"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/local/lib -Wl,--as-needed -o vim -lm -lselinux -lncurses -lacl -lattr -ldl
Small version without GUI and -digraphs speak a clear language here. Many Linux distributions just ship with a minimal, stripped-down version of Vim to provide vi compatibility. If you want to use the full Vim capabilities, you typically can install a separate package (usually named vim, or vim-full vs. the default vim-tiny). And that would then be invoked as vim, not vi.

YouCompleteMe unavailable: unable to load Python

I use Linux CentOS-7-x86_64 and am trying to install YouCompleteMe with vundle. I get the error:
YouCompleteMe unavailable: unable to load Python.
however, when I type vim --version I get:
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr 13 2020 22:48:56)
Included patches: 1-577
Compiled by louqinjian#localhost.localdomain
Huge version without GUI. Features included (+) or not (-):
+acl -farsi +mouse_sgr +tag_binary
+arabic +file_in_path -mouse_sysmouse -tag_old_static
+autocmd +find_in_path +mouse_urxvt -tag_any_white
+autochdir +float +mouse_xterm -tcl
-autoservername +folding +multi_byte +termguicolors
-balloon_eval -footer +multi_lang +terminal
+balloon_eval_term +fork() -mzscheme +terminfo
-browse +gettext +netbeans_intg +termresponse
++builtin_terms -hangul_input +num64 +textobjects
+byte_offset +iconv +packages +textprop
+channel +insert_expand +path_extra +timers
+cindent +ipv6 +perl +title
-clientserver +job +persistent_undo -toolbar
-clipboard +jumplist +popupwin +user_commands
+cmdline_compl +keymap +postscript +vartabs
+cmdline_hist +lambda +printer +vertsplit
+cmdline_info +langmap +profile +virtualedit
+comments +libcall +python/dyn +visual
+conceal +linebreak +python3/dyn +visualextra
+cryptv +lispindent +quickfix +viminfo
+cscope +listcmds +reltime +vreplace
+cursorbind +localmap +rightleft +wildignore
+cursorshape +lua +ruby +wildmenu
+dialog_con +menu +scrollbind +windows
+diff +mksession +signs +writebackup
+digraphs +modify_fname +smartindent -X11
-dnd +mouse -sound -xfontset
-ebcdic -mouseshape +spell -xim
+emacs_tags +mouse_dec +startuptime -xpm
+eval -mouse_gpm +statusline -xsmp
+ex_extra -mouse_jsbterm -sun_workshop -xterm_clipboard
+extra_search +mouse_netterm +syntax -xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -std=gnu99 -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -std=gnu99 -L. -Wl,-z,relro -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--enable-new-dtags -Wl,-rpath,/usr/lib64/perl5/CORE -L/usr/local/lib -Wl,--as-needed -o vim -lm -ltinfo -lselinux -ldl -L/usr/lib -llua -Wl,--enable-new-dtags -Wl,-rpath,/usr/lib64/perl5/CORE -fstack-protector -L/usr/lib64/perl5/CORE -lperl -lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc -lruby -lpthread -lrt -ldl -lcrypt -lm
And, when I install vim with .configure, I include
--with-features=huge --enable-python3interp --enable-pythoninterp
What can I do to solve this?
I suggest you go to your ~/.vimrc and add this at the beginning of the file BEFORE you begin your Plug declarations.
if has('python3')
endif
Example of ~/.vimrc:
if has('python3')
endif
call plug#begin('~/.vim/plugged')
Plug 'https://github.com/ycm-core/YouCompleteMe.git'
call plug#end
From there you can
:PlugInstall
it and then cd into your YouCompleteMe directory.
If you have Anaconda installed make sure you DON'T install it with it.
Use your /usr/bin python instead.
Example:
/usr/bin/python3 install.py --all
Finally, once it's all set and done reboot your computer and open up Vim again.
I installed YouCompleteMe using https://github.com/junegunn/vim-plug but as long as you have that 'if' statement in your vimrc it should work.
Maybe it's because your VIM is using python 2.* as default python version. From 2020, YouCompleteMe dropped support for python 2.
:python import sys; print(sys.version)
Run this command inside your vim to see which version of python are in used.
remove the configuration of python2:
--enable-pythoninterp,(remove this words)
because YouCompleteMe dropped support for python2.
recompile as the instruments here. everything works fine.
(many thanks to the man who shared his solution)
./configure --with-features=huge
--enable-multibyte
--enable-gtk3-check
--enable-rubyinterp=yes
--with-python3-command=python3.7
--enable-python3interp=yes
--enable-perlinterp=yes
--enable-luainterp=yes
--enable-cscope
see more details here: https://github.com/ycm-core/YouCompleteMe/issues/3635

Exit code -11 after installation of Vim auto completion plugin YouCompleteMe with MacVim (Vim version 8.1)

I'd like to install the auto completion plugin YouCompleteMe for Vim.
I followed the instructions of the installation guide at https://github.com/Valloric/YouCompleteMe/blob/master/README.md#full-installation-guide
I chose the simpler option without semantic completion support for C-family languages.
Executing
vim --version
returns
VIM - Vi IMproved 8.1 (2018 May 18, compiled Feb 19 2019 12:07:03)
macOS version
Included patches: 1-950
Compiled by Homebrew
Huge version with MacVim GUI. Features included (+) or not (-):
+acl -farsi +mouse_sgr -tag_any_white
+arabic +file_in_path -mouse_sysmouse -tcl
+autocmd +find_in_path +mouse_urxvt +termguicolors
+autochdir +float +mouse_xterm +terminal
-autoservername +folding +multi_byte +terminfo
+balloon_eval -footer +multi_lang +termresponse
+balloon_eval_term +fork() -mzscheme +textobjects
+browse +fullscreen +netbeans_intg +textprop
++builtin_terms -gettext +num64 +timers
+byte_offset -hangul_input +odbeditor +title
+channel +iconv +packages +toolbar
+cindent +insert_expand +path_extra +transparency
+clientserver +job +perl +user_commands
+clipboard +jumplist +persistent_undo +vartabs
+cmdline_compl +keymap +postscript +vertsplit
+cmdline_hist +lambda +printer +virtualedit
+cmdline_info +langmap +profile +visual
+comments +libcall -python +visualextra
+conceal +linebreak +python3 +viminfo
+cryptv +lispindent +quickfix +vreplace
+cscope +listcmds +reltime +wildignore
+cursorbind +localmap +rightleft +wildmenu
+cursorshape +lua +ruby +windows
+dialog_con_gui +menu +scrollbind +writebackup
+diff +mksession +signs -X11
+digraphs +modify_fname +smartindent -xfontset
+dnd +mouse +startuptime +xim
-ebcdic +mouseshape +statusline -xpm
+emacs_tags +mouse_dec -sun_workshop -xsmp
+eval -mouse_gpm +syntax -xterm_clipboard
+ex_extra -mouse_jsbterm +tag_binary -xterm_save
+extra_search +mouse_netterm +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 -DMACOS_X_DARWIN -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang -L. -L. -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon -lm -lncurses -liconv -framework AppKit -L/usr/local/opt/lua/lib -llua5.3 -fstack-protector -L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE -lperl -L/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/config-3.7m-darwin -lpython3.7m -framework CoreFoundation -framework Ruby
I added the line
Plugin 'Valloric/YouCompleteMe'
to my .vimrc, afterwards the Vim command
:PluginInstall
executes without errors.
If I then start Vim the following error message is displayed:
The ycmd server SHUT DOWN (restart with ':YcmRestartServer'). Unexpected exit code -11. Type ':YcmToggleLogs ycmd_62275_stderr_menu0zqa.log' to check the logs.
The here mentioned log file is empty. Does anyone know what's the problem here?
I know there are a lot of other questions on StackOverflow and Github regarding very similar problems. But since I've spent the last 3 hours going through these and trying to get the plugin to work without success, I'd be happy if this won't be marked as duplicate and am very grateful for every response.
https://valloric.github.io/YouCompleteMe/#faq
YCM does not work with my Anaconda Python setup
Anaconda is often incompatible with the pre-built libclang used by YCM and therefore is not supported. The recommended way to solve this is to run /path/to/real/python install.py (for example /usr/bin/python install.py).
If you want completion in Anaconda projects, point the interpreter_path option in your .ycm_extra_conf.py file to the path of your Anaconda Python e.g.
def Settings(**kwargs):
return {
'interpreter_path': '/path/to/anaconda/python'
}
See the Python Semantic Completion section for more details.

tmux showing ^[[I^[[O when losing focus on ubuntu

I initially though this was a vim problem, but it seems like it is tmux problem.
I have executed and made the window lose focus and then regain it:
$ sleep 100
^[[I^[[O
$ echo $TERM
screen
Here are the options I tried
set mouse-utf8 off
set -g status-utf8 on
setw -g utf8 on
The consequence I see in vim
I have tested my vim with vim -u NONE, so I do not think this pertains to my .vimrc configuration. I also see this problem only on my Ubuntu machine and not my CentOS machine:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"
NAME="Ubuntu"
VERSION="14.04.1 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.1 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
Reproducing the issue for me simple. I just have to type something on any text click on another window (or C-TAB) and then come back to vim. I am attaching the screenshot.
I have tested the event with -V9 option and I see that s:TextChanged() is being triggered. Here is the output:
E349: No identifier under cursor
E39: No identifier under cursor
Type :quit<Enter> to exit Vim
1 line less; before #2 6 seconds ago
--No lines in buffer--
1: 2 afwefasdf
Type :quit<Enter> to exit Vim
1: 1 asdfjkq;wr
Is there a way for me silence it without affecting other plugins?
Here is my vim version:
vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 2 2014 19:39:32)
Included patches: 1-52
Modified by pkg-vim-maintainers#lists.alioth.debian.org
Compiled by buildd#
Huge version without GUI. Features included (+) or not (-):
+acl +farsi +mouse_netterm +syntax
+arabic +file_in_path +mouse_sgr +tag_binary
+autocmd +find_in_path -mouse_sysmouse +tag_old_static
-balloon_eval +float +mouse_urxvt -tag_any_white
-browse +folding +mouse_xterm -tcl
++builtin_terms -footer +multi_byte +terminfo
+byte_offset +fork() +multi_lang +termresponse
+cindent +gettext -mzscheme +textobjects
-clientserver -hangul_input +netbeans_intg +title
-clipboard +iconv +path_extra -toolbar
+cmdline_compl +insert_expand -perl +user_commands
+cmdline_hist +jumplist +persistent_undo +vertsplit
+cmdline_info +keymap +postscript +virtualedit
+comments +langmap +printer +visual
+conceal +libcall +profile +visualextra
+cryptv +linebreak +python +viminfo
+cscope +lispindent -python3 +vreplace
+cursorbind +listcmds +quickfix +wildignore
+cursorshape +localmap +reltime +wildmenu
+dialog_con -lua +rightleft +windows
+diff +menu -ruby +writebackup
+digraphs +mksession +scrollbind -X11
-dnd +modify_fname +signs -xfontset
-ebcdic +mouse +smartindent -xim
+emacs_tags -mouseshape -sniff -xsmp
+eval +mouse_dec +startuptime -xterm_clipboard
+ex_extra +mouse_gpm +statusline -xterm_save
+extra_search -mouse_jsbterm -sun_workshop -xpm
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed -o vim -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl -L/usr/lib/python2.7/config-x86_64-linux-gnu -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
Okay, after spending a half day on this problem. I have decided to just upgrade to tmux 1.9a from 1.8 and that fixed the problem. I don't know why, but CentOS was affected by 1.8.

Vim: Automatically leave insert mode after some time

I want to make Vim leave Insert mode automagically after some time (15 seconds). Here is what I've got in
my .vimrc:
" set 'updatetime' to 15 seconds when in insert mode
au InsertEnter * let updaterestore = &updatetime | set updatetime=15000
au InsertLeave * let &updatetime = updaterestore
" automatically leave insert mode after 'updatetime' milliseconds of inaction
au CursorHoldI * stopinsert
I am using this snippet in MacVim, and it doesn't work. When I enter Insert mode, and I don't do anything,
Vim leaves insert mode after 15 seconds. However, if I press Enter or Backspace, or if I enter Insert mode
using o/O, then Vim leaves Insert mode straight away, and at that point, even if I enter Insert mode using i
Vim goes back to Normal mode straight away.
I installed MacVim using Homebrew on Mac OS X 10.8.5
Any ideas why this is not working please?
Edit: Here is my MacVim version with all the flags:
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep 29 2013 02:17:27)
MacOS X (unix) version
Included patches: 1-22
Compiled by Homebrew
Huge version with MacVim GUI. Features included (+) or not (-):
+acl +file_in_path +mouse_sgr +tag_binary
+arabic +find_in_path -mouse_sysmouse +tag_old_static
+autocmd +float +mouse_urxvt -tag_any_white
+balloon_eval +folding +mouse_xterm +tcl
+browse -footer +multi_byte +terminfo
++builtin_terms +fork() +multi_lang +termresponse
+byte_offset +fullscreen -mzscheme +textobjects
+cindent -gettext +netbeans_intg +title
+clientserver -hangul_input +odbeditor +toolbar
+clipboard +iconv +path_extra +transparency
+cmdline_compl +insert_expand +perl +user_commands
+cmdline_hist +jumplist +persistent_undo +vertsplit
+cmdline_info +keymap +postscript +virtualedit
+comments +langmap +printer +visual
+conceal +libcall +profile +visualextra
+cryptv +linebreak +python +viminfo
+cscope +lispindent -python3 +vreplace
+cursorbind +listcmds +quickfix +wildignore
+cursorshape +localmap +reltime +wildmenu
+dialog_con_gui -lua +rightleft +windows
+diff +menu +ruby +writebackup
+digraphs +mksession +scrollbind -X11
+dnd +modify_fname +signs -xfontset
-ebcdic +mouse +smartindent +xim
+emacs_tags +mouseshape -sniff -xsmp
+eval +mouse_dec +startuptime -xterm_clipboard
+ex_extra -mouse_gpm +statusline -xterm_save
+extra_search -mouse_jsbterm -sun_workshop -xpm
+farsi +mouse_netterm +syntax
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"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
Compilation: cc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -DMACOS_X_UNIX -no-cpp-precomp -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -I/System/Library/Frameworks/Tcl.framework/Headers -D_REENTRANT=1 -D_THREAD_SAFE=1 -D_DARWIN_C_SOURCE=1
Linking: cc -L. -L. -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon -lncurses -liconv -framework Cocoa -fstack-protector -L/usr/local/lib -L/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc -framework Python -F/System/Library/Frameworks -framework Tcl -framework CoreFoundation -framework Ruby
As #romainl commented, the fastest way to narrow down a problem like this is bisection. Basically, you disable (comment out) half of your vimrc to see if you still have the problem, then test it with the other half. If only one of those halves has the problem, you split it in half and repeat until you find the offending setting/plugin/etc.
For sanity's sake, with an issue like this it's also a good idea to start by testing a minimal setup (i.e. a vimrc with just the lines quoted in the problem description) to make sure it's not a wild goose chase.

Resources