I just updated to the latest vim (git fetch && git merge origin/master
followed by building and installing to /usr/local/...
). Everything is great except with a little extra stuff I added to my .vimrc
file to add the location of C++ compiler and add it to path
so that opening system include files work. This is the couple of lines that makes this happen:
let gppver=system('g++ --version | perl -ne ''/(\d+\.\d+\.\d+)/ && print $1''')
execute 'set path+=/usr/include/c++/' . g:gppver
After some trial and error, I've finally discovered that it's the use of system()
. I don't understand why. When that line executes, actually, at the moment that line is commented and I have this because I thought it was my command, let gppver = system('ls')
. Even that simple line results in this being echoed to the stdout during startup:
[>4;m[>4;2m
It doesn't show well in the post, but it's ^[>4;m^[>4;m
or ESC+[ .... Where is this coming from? Prior to doing the git fetch and merge, I was running 8.2. I forget which. However, I hadn't updated at work since March (or earlier). Looking at the git log, the latest node on master is the tag 8.2.1959
. Some pointers on why these extra characters are showing would be greatly appreciated. Just verified to ensure it really is that function, with every other line commented in my .vimrc
file but let gppver = system('ls')
, the extra characters are printed.
^[[>4;2m
sequence, it's related to the modifyOtherKeys feature of xterm. This feature was introduced in Vim 8.1.2134 and enabled by default in Vim 8.1.2194. See the full answer for more details and possible workarounds.system()
function in script because I usually use gvim and not vim. while troubleshooting, I did see the "strange" characters in the status line as that person mentioned when I tested stuff using just vim.