edenzik / macvim

Automatically exported from code.google.com/p/macvim
0 stars 0 forks source link

extraneous characters in text edit mode, bash shell prompt #246

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Opening a shell session from within MacVim (i.e., ':sh'), or editing a file 
while in such a bash 
session (e.g., 'vi .bashrc').  This happens whether I have launched MacVim via 
its OSX app or the 
mvim script.

What is the expected output? What do you see instead?
Alphanumeric characters prepended with an opening square bracket appear in 
places where I 
don't expect to see them, in an editing session and at the command prompt. For 
example, the 
following line in a normal shell session in my .bashrc:
' export COLOR_LIGHT_GRAY='\033[0;37m'
...shows up like this in the same file in MacVim:
' [m[34mexport[m[36m COLOR_LIGHT_GRAY=[m[37m'[m[32m\033[0;37m[m[37m'[m'
The bash prompt also appears with many similar characters, up-arrow for history 
results in '>   
ku', the delete key results in '[K', etc.

What version of MacVim and OS X are you using (see "MacVim->About MacVim"
and  "Apple Menu->About This Mac" menu items, e.g. "Snapshot 40, 10.5.6
Intel")?
Snapshot 51, 10.6.2, Intel (MacBook)

Please provide any additional information below.
I don't know whether this is a bug or an environment problem, but I can't track 
it down, and the 
problems don't appear in a terminal or iTerm bash session.  My prompt setting 
in .bash_profile 
is 'export PS1="\u@\H\w> " '.

Original issue reported on code.google.com by john.des...@gmail.com on 22 Dec 2009 at 4:20

GoogleCodeExporter commented 9 years ago
This is a known limitation with Vim GUIs: Vim is not a terminal emulator.  The 
[m[... codes are ANSI codes which 
would need a terminal to be interpreted.

This is not going to change anytime soon (see ":h usr_21" and scroll down to 
section 21.2).  At any rate, this is 
not a MacVim specific problem so there is nothing I can do about it.

Original comment by bjorn.winckler@gmail.com on 23 Dec 2009 at 4:55

GoogleCodeExporter commented 9 years ago
Thanks Bjorn.  Guess I won't be "living" in MacVim ... but it's sure great for 
editing!

Original comment by john.des...@gmail.com on 23 Dec 2009 at 9:33