Re: Bad XTerm Vim coloring
On Mon, Nov 24, 2008 at 6:44 PM, Thomas Dickey [EMAIL PROTECTED] wrote: Rereading your email, I also tried with .vimrc having just set syntax=on set background=dark but aside from seeing that the syntax coloring went away, didn't see any change in the result - no +r in the script output. set syntax=on should be syntax on which is probably why you saw no syntax highlighting. The set syntax= just sets the file type. Is there anything else you want me to try? Build xterm from source maybe with different configure options? Thanks for your help Thomas. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/
Re: Bad XTerm Vim coloring
On Tue, 25 Nov 2008, Nick Deubert wrote: On Mon, Nov 24, 2008 at 6:44 PM, Thomas Dickey [EMAIL PROTECTED] wrote: Rereading your email, I also tried with .vimrc having just set syntax=on set background=dark but aside from seeing that the syntax coloring went away, didn't see any change in the result - no +r in the script output. set syntax=on should be syntax on which is probably why you saw no syntax highlighting. The set syntax= just sets the file type. Is there anything else you want me to try? Build xterm from source maybe with different configure options? Thanks for your help Thomas. well, building xterm without the tcap-query option should immediately solve the problem... I don't know if vim has been using this feature of xterm with cygwin - it may be that there's some unexpected time-delay or buffer-problem. -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/
Re: Bad XTerm Vim coloring
On Mon, Nov 24, 2008 at 8:59 PM, Thomas Dickey wrote: On Mon, 24 Nov 2008, Thomas Dickey wrote: I'd expect that vim is asking xterm for the strings that correspond to different function-keys. In ctlseqs.txt this text covers the response: ...reading vim's source code (7.1 at hand...), there doesn't seem to be an obvious way to turn off the feature (the +termresponse). There's no obvious way to turn it off, but it can be turned off... vim --cmd 'set t_RV=' for a single vim session, or echo 'set t_RV=' ~/.vimrc for all vim sessions. Not sure why it would be breaking, though... and I don't presently have a cygwin installation to test this myself... ~Matt -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/
Re: Bad XTerm Vim coloring
On Tue, Nov 25, 2008 at 1:12 PM, Matt Wozniski [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 8:59 PM, Thomas Dickey wrote: ...reading vim's source code (7.1 at hand...), there doesn't seem to be an obvious way to turn off the feature (the +termresponse). There's no obvious way to turn it off, but it can be turned off... vim --cmd 'set t_RV=' for a single vim session, or echo 'set t_RV=' ~/.vimrc for all vim sessions. Not sure why it would be breaking, though... and I don't presently have a cygwin installation to test this myself... Adding that to my .vimrc worked, the syntax is back to normal. I don't fully understand what the underlying bug is but at least i can read my code now. Is it worth putting in a bug report for? Thanks guys! -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/
Re: Bad XTerm Vim coloring
On Mon, 24 Nov 2008, Nick Deubert wrote: Hey everyone, First off thanks for your hard work on cygwin/X it is very appreciated. I upgraded to the new Xorg last week and I have had one really annoying issue ever since. Something about the new XTerm is messing up vim syntax coloring. With vim I have syntax on and background=dark and usually the coloring look like this: http://nd.dyndns.org:443/downloads/correct_coloring.PNG but now when I open a file in vim it looks like that for a split second then a ton of gibberish quickly scrolls in the right side of the vim ruler and when it stops my syntax is colors are all messed up and are colored like this: http://nd.dyndns.org:443/downloads/bad_coloring.PNG Now I think this is a problem with XTerm not vim because when I ssh I can't tell - but you can capture the output of vim using 'script' and we can inspect the output of vim, to see if it is well-formed. (While it's possible that cygwin's xterm is configured with different options than on some other system, xterm should ignore - not echo - well-formed control sequences that it doesn't understand). into other machines and run vim there, with different configuration files, the same thing happens. Also if I remove my .vimrc and start vim, and manually do :syntax on and :set background=dark it seems fine. It seems like there could be something going on with the inital opening of vim and it talking to the xterm that is going weird. Also vim may talk to xterm to find what the function-keys send (I added a few new keys in the last version or so, but vim shouldn't be confused by that...). Seeing exactly what was written to the xterm would give some clues - along with finding what configure options were used to build the cygwin package for xterm. -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/
Re: Bad XTerm Vim coloring
On Mon, 2008-11-24 at 11:34 -0500, Nick Deubert wrote: Hey everyone, First off thanks for your hard work on cygwin/X it is very appreciated. I upgraded to the new Xorg last week and I have had one you didn't mention whether you'd ran setup.exe and re-installed vim -- perhaps one, or more, of vim's startup files got corrupted during the update...??? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/
Re: Bad XTerm Vim coloring
On Mon, Nov 24, 2008 at 3:49 PM, Reid Thompson [EMAIL PROTECTED] wrote: On Mon, 2008-11-24 at 11:34 -0500, Nick Deubert wrote: Hey everyone, First off thanks for your hard work on cygwin/X it is very appreciated. I upgraded to the new Xorg last week and I have had one you didn't mention whether you'd ran setup.exe and re-installed vim -- perhaps one, or more, of vim's startup files got corrupted during the update...??? I downloaded the newest setup.exe and just did an upgrade which upgraded 100+ packages(maybe vim too). I just did a reinstall of vim and that didn't matter, but now I am doing a complete clean re-install of cygwin to see if that clears things up. I'll report back when that is complete. thanks -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/
Re: Bad XTerm Vim coloring
On Mon, Nov 24, 2008 at 5:16 PM, Nick Deubert [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 3:49 PM, Reid Thompson [EMAIL PROTECTED] wrote: On Mon, 2008-11-24 at 11:34 -0500, Nick Deubert wrote: Hey everyone, First off thanks for your hard work on cygwin/X it is very appreciated. I upgraded to the new Xorg last week and I have had one you didn't mention whether you'd ran setup.exe and re-installed vim -- perhaps one, or more, of vim's startup files got corrupted during the update...??? I downloaded the newest setup.exe and just did an upgrade which upgraded 100+ packages(maybe vim too). I just did a reinstall of vim and that didn't matter, but now I am doing a complete clean re-install of cygwin to see if that clears things up. I'll report back when that is complete. thanks Well after a complete reinstall the problem still happens, with a fresh home directory and everything. My .vimrc has only the 2 commands I mentioned in my first email and in case it helps here's the line I'm starting xterm with: xterm -bg black -fg white -ls -sb -sl 5000 -rightbar -geometry 100x55 -e /usr/bin/bash -l Also here is a new vim.out of me opening my .vimrc (longer file). It appears like the kind of gibberish I see in the ruler is at the end of this file. vim.out Description: Binary data -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/
Re: Bad XTerm Vim coloring
On Mon, 24 Nov 2008, Nick Deubert wrote: On Mon, Nov 24, 2008 at 2:58 PM, Thomas Dickey [EMAIL PROTECTED] wrote: On Mon, 24 Nov 2008, Nick Deubert wrote: Hey everyone, First off thanks for your hard work on cygwin/X it is very appreciated. I upgraded to the new Xorg last week and I have had one really annoying issue ever since. Something about the new XTerm is messing up vim syntax coloring. With vim I have syntax on and background=dark and usually the coloring look like this: http://nd.dyndns.org:443/downloads/correct_coloring.PNG but now when I open a file in vim it looks like that for a split second then a ton of gibberish quickly scrolls in the right side of the vim ruler and when it stops my syntax is colors are all messed up and are colored like this: http://nd.dyndns.org:443/downloads/bad_coloring.PNG Now I think this is a problem with XTerm not vim because when I ssh I can't tell - but you can capture the output of vim using 'script' and we can inspect the output of vim, to see if it is well-formed. I attached a vim.out(or you can get it here if you don't like short: I don't know... long: continue reading... I made that readable with the 'unmap' program in my ncurses ftp-directory. The problem is visible in the trace (though where the ultimate cause is, is not yet clear). Looking for the +r, I see that is part of a control sequence without the leading escape-character, e.g., \E[80;226H6 \E[1;5H \E[80;227Hf \E[1;5H \E[80;218H[P1+r436f= \E[1;5H where \E's are escapes as in terminfo. The \E's ending with H are cursor movement, so this fragment is sending something like 6f[P1+r436f= I'd expect that vim is asking xterm for the strings that correspond to different function-keys. In ctlseqs.txt this text covers the response: xterm responds with DCS 1 + r Pt ST for valid requests, adding to Pt an = , and the value of the corresponding string that xterm would send, or DCS 0 + r Pt ST for invalid requests. The strings are encoded in hexadecimal (2 digits per charac- ter). But DCS is missing (that would be \EP rather than [P). And the text in vim.out is the text that xterm would be replying with. The 436f is hex-encoded for Co (termcap number of colors). Earlier in the trace, vim has sent the control sequence asking for this information, e.g. \EP+q436f \E\\ On my Debian/testing, I've got vim 7.1.314, which is sending the same control sequence (and running xterm's test-script, I know that it's responding as I'd expect). There's no +r in a script running vim in xterm _here_. Rereading your email, I also tried with .vimrc having just set syntax=on set background=dark but aside from seeing that the syntax coloring went away, didn't see any change in the result - no +r in the script output. attachments: http://nd.dyndns.org:443/downloads/vim.out) which is what script outputted for this small test.c file: int main() { char* blah = blah\n; return 0; } (While it's possible that cygwin's xterm is configured with different options than on some other system, xterm should ignore - not echo - well-formed control sequences that it doesn't understand). vim may talk to xterm to find what the function-keys send (I added a few new keys in the last version or so, but vim shouldn't be confused by that...). Seeing exactly what was written to the xterm would give some clues - along with finding what configure options were used to build the cygwin package for xterm. I'm not sure how to see the configure options for xterm. It is the binary package 237-2 installed from mirrors.kernel.org. Just in case it means anything here is the vim configure options: :version VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Oct 9 2008 15:23:22) Compiled by [EMAIL PROTECTED] Huge version without GUI. Features included (+) or not (-): +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +cryptv +cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -footer +fork() +gettext -hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu +mksession +modify_fname +mouse -mouseshape +mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte +multi_lang -mzscheme -netbeans_intg -osfiletype +path_extra -perl +postscript +printer +profile -python +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent -sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp -xterm_clipboard -xterm_save system vimrc file: $VIM/vimrc
Re: Bad XTerm Vim coloring
On Mon, 24 Nov 2008, Thomas Dickey wrote: I'd expect that vim is asking xterm for the strings that correspond to different function-keys. In ctlseqs.txt this text covers the response: ...reading vim's source code (7.1 at hand...), there doesn't seem to be an obvious way to turn off the feature (the +termresponse). However, it seems that vim is only asking for this information when it is not finding the details it wants in the _termcap_ (and since vim is apparently using terminfo, which gives an empty buffer, it'll always ask for the information). Cygwin's xterm package (doing a strings on the binary) appears to be linked with termcap - but if it cannot find a termcap, it'll fallback to something possibly incomplete or inaccurate. (I'm not sure what that would be, but was interested to note that the strings on xterm showed there's a termcap for cygwin;-). Just in case it means anything here is the vim configure options: :version VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Oct 9 2008 15:23:22) ... +tag_old_static -tag_any_white -tcl +terminfo +termresponse ^^^ -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/