Loading ...
Sorry, an error occurred while loading the content.
 

Re: Strange display in VIM: ^[33m

Expand Messages
  • Antoine J. Mechelynck
    On Unix (and Unix-like) systems, termcap is a file (/etc/termcap, I believe) which define the behaviour of video terminals. Maybe giving your terminal another
    Message 1 of 6 , Jun 1, 2002
      On Unix (and Unix-like) systems, termcap is a file (/etc/termcap, I believe)
      which define the behaviour of video terminals. Maybe giving your terminal
      another name (sing :set term=name) in vim might cure the problem. See :h
      'term'. Also see what you have currently with :set term?.

      Tony.
      ----- Original Message -----
      From: "Wei Wang" <Wei.Wang@...>
      To: "Antoine J. Mechelynck" <antoine.mechelynck@...>
      Cc: <vim@...>
      Sent: Saturday, June 01, 2002 2:18 PM
      Subject: Re: Strange display in VIM: ^[33m


      > Like this?
      >
      > Got errors like:
      >
      > No range allowed: 4=blue on
      > line 11:
      > No range allowed: 7=white on
      >
      > I am not quite sure what "termcap" is. But I remember I installed ncurse
      > yesterday with the --with-termcap switch on. Might that cause the problem?
      >
      > set ruler
      > set ai
      > set tabstop=4
      > ab import import
      > ab include include
      > set sw=4
      > syntax on
      >
      > hi Search term=reverse ctermfg=4 ctermbg=7
      > 4=blue on
      > 7=white on
      >
      > augroup filetype
      > au BufRead,BufNewFile *.flex,*.jflex set filetype=jflex
      > augroup END
      > au Syntax jflex so ~/.vim/syntax/jflex.vim
      >
      >
      > On Sat, 1 Jun 2002 14:01:46 +0200
      > "Antoine J. Mechelynck" <antoine.mechelynck@...> wrote:
      >
      > > maybe a wrong termcap
      > > <Esc> [ <digits> m
      > > or
      > > <Esc> [ <digits> ; <digits> m
      > > etc.
      > > is the change-color sequence on "ANSI" terminals
      > > where <digits>=
      > > 0 unbright
      > > 1 bright
      > > 30-37 foreground
      > > 40-47 background
      > > add units for 1 = red on, 2=green on, 4=blue on
      > > etc.
      > >
      > > These codes apply to DOS boxes with ANSI.SYS and to some other
      terminals.
      > >
      > > I notice there seems not to be a left square bracket after your ^[ (i.e.
      > > Escape). Could that be the problem?
      > >
      > > Tony.
      > > ----- Original Message -----
      > > From: "Wei Wang" <Wei.Wang@...>
      > > To: <vim@...>
      > > Sent: Saturday, June 01, 2002 1:18 PM
      > > Subject: Strange display in VIM: ^[33m
      > >
      > >
      > > > hi,
      > > >
      > > > I got a strange problem with vim. say a file(.vimrc) reads like this
      inc
      > > vi:
      > > >
      > > > set ruler
      > > > set ai
      > > > set tabstop=4
      > > > ab import import
      > > > ab include include
      > > > set sw=4
      > > > syntax on
      > > >
      > > > hi Search term=reverse ctermfg=4 ctermbg=7
      > > >
      > > > augroup filetype
      > > > au BufRead,BufNewFile *.flex,*.jflex set filetype=jflex
      > > > augroup END
      > > > au Syntax jflex so ~/.vim/syntax/jflex.vim
      > > >
      > > > But it reads like this inc vim:
      > > >
      > > > ^[33mset ^[35mruler
      > > > ^[33mset ^[35mai
      > > > ^[33mset ^[35mtabstop=4
      > > > ^[33mab ^[33mim import
      > > > ^[33mab include include
      > > > ^[33mset ^[35msw=4
      > > > ^[33msyntax ^[32mon
      > > >
      > > > ^[33mhi Search ^[32mterm=^[35mreverse ^[32mctermfg=^[31m4
      > > ^[32mctermbg=^[31m7
      > > >
      > > > ^[33maugroup ^[33mfiletype
      > > > ^[33mau ^[32mBufRead,^[32mBufNewFile *.flex,*.jflex ^[33mset
      > > ^[35mfiletype=jflex
      > > > ^[33maugroup END
      > > > ^[33mau ^[32mSyntax jflex ^[33mso
      > > ~/^[33m.vim/^[33msyntax/jflex^[33m.vim
      > > >
      > > >
      > > >
      > > > Any idea what caused this?
      > > >
      > > >
      > > >
      > > > Many thanks,
      > > >
      > > > Wei
      > > >
      > > >
      > >
      > >
      > >
      >
      >
    • Wei Wang
      Thanks. Since I am not root, /etc/termcap would not have been changed when I installed the ncurse termcap. I wonder what it has changed. by :set term I got
      Message 2 of 6 , Jun 1, 2002
        Thanks.

        Since I am not root, /etc/termcap would not have been changed when I installed
        the ncurse termcap. I wonder what it has changed.
        by :set term I got term=xterm which look fine to me, although I couldn't remember what the term was before.
        I tried :set term='ansi' according to the help in :h term. But got ]

        Vim: Caught deadly signal SEGV
        Vim: Finished.
        Segmentation fault





        On Sat, 1 Jun 2002 14:25:03 +0200
        "Antoine J. Mechelynck" <antoine.mechelynck@...> wrote:

        > On Unix (and Unix-like) systems, termcap is a file (/etc/termcap, I believe)
        > which define the behaviour of video terminals. Maybe giving your terminal
        > another name (sing :set term=name) in vim might cure the problem. See :h
        > 'term'. Also see what you have currently with :set term?.
        >
        > Tony.
        > ----- Original Message -----
        > From: "Wei Wang" <Wei.Wang@...>
        > To: "Antoine J. Mechelynck" <antoine.mechelynck@...>
        > Cc: <vim@...>
        > Sent: Saturday, June 01, 2002 2:18 PM
        > Subject: Re: Strange display in VIM: ^[33m
        >
        >
        > > Like this?
        > >
        > > Got errors like:
        > >
        > > No range allowed: 4=blue on
        > > line 11:
        > > No range allowed: 7=white on
        > >
        > > I am not quite sure what "termcap" is. But I remember I installed ncurse
        > > yesterday with the --with-termcap switch on. Might that cause the problem?
        > >
        > > set ruler
        > > set ai
        > > set tabstop=4
        > > ab import import
        > > ab include include
        > > set sw=4
        > > syntax on
        > >
        > > hi Search term=reverse ctermfg=4 ctermbg=7
        > > 4=blue on
        > > 7=white on
        > >
        > > augroup filetype
        > > au BufRead,BufNewFile *.flex,*.jflex set filetype=jflex
        > > augroup END
        > > au Syntax jflex so ~/.vim/syntax/jflex.vim
        > >
        > >
        > > On Sat, 1 Jun 2002 14:01:46 +0200
        > > "Antoine J. Mechelynck" <antoine.mechelynck@...> wrote:
        > >
        > > > maybe a wrong termcap
        > > > <Esc> [ <digits> m
        > > > or
        > > > <Esc> [ <digits> ; <digits> m
        > > > etc.
        > > > is the change-color sequence on "ANSI" terminals
        > > > where <digits>=
        > > > 0 unbright
        > > > 1 bright
        > > > 30-37 foreground
        > > > 40-47 background
        > > > add units for 1 = red on, 2=green on, 4=blue on
        > > > etc.
        > > >
        > > > These codes apply to DOS boxes with ANSI.SYS and to some other
        > terminals.
        > > >
        > > > I notice there seems not to be a left square bracket after your ^[ (i.e.
        > > > Escape). Could that be the problem?
        > > >
        > > > Tony.
        > > > ----- Original Message -----
        > > > From: "Wei Wang" <Wei.Wang@...>
        > > > To: <vim@...>
        > > > Sent: Saturday, June 01, 2002 1:18 PM
        > > > Subject: Strange display in VIM: ^[33m
        > > >
        > > >
        > > > > hi,
        > > > >
        > > > > I got a strange problem with vim. say a file(.vimrc) reads like this
        > inc
        > > > vi:
        > > > >
        > > > > set ruler
        > > > > set ai
        > > > > set tabstop=4
        > > > > ab import import
        > > > > ab include include
        > > > > set sw=4
        > > > > syntax on
        > > > >
        > > > > hi Search term=reverse ctermfg=4 ctermbg=7
        > > > >
        > > > > augroup filetype
        > > > > au BufRead,BufNewFile *.flex,*.jflex set filetype=jflex
        > > > > augroup END
        > > > > au Syntax jflex so ~/.vim/syntax/jflex.vim
        > > > >
        > > > > But it reads like this inc vim:
        > > > >
        > > > > ^[33mset ^[35mruler
        > > > > ^[33mset ^[35mai
        > > > > ^[33mset ^[35mtabstop=4
        > > > > ^[33mab ^[33mim import
        > > > > ^[33mab include include
        > > > > ^[33mset ^[35msw=4
        > > > > ^[33msyntax ^[32mon
        > > > >
        > > > > ^[33mhi Search ^[32mterm=^[35mreverse ^[32mctermfg=^[31m4
        > > > ^[32mctermbg=^[31m7
        > > > >
        > > > > ^[33maugroup ^[33mfiletype
        > > > > ^[33mau ^[32mBufRead,^[32mBufNewFile *.flex,*.jflex ^[33mset
        > > > ^[35mfiletype=jflex
        > > > > ^[33maugroup END
        > > > > ^[33mau ^[32mSyntax jflex ^[33mso
        > > > ~/^[33m.vim/^[33msyntax/jflex^[33m.vim
        > > > >
        > > > >
        > > > >
        > > > > Any idea what caused this?
        > > > >
        > > > >
        > > > >
        > > > > Many thanks,
        > > > >
        > > > > Wei
        > > > >
        > > > >
        > > >
        > > >
        > > >
        > >
        > >
        >
        >
        >
      • Antoine J. Mechelynck
        Even if you are not root, your termcap is probably world-readable. Looking at it might give you ideas as to which term names are defined and how to set term.
        Message 3 of 6 , Jun 1, 2002
          Even if you are not root, your termcap is probably world-readable. Looking
          at it might give you ideas as to which term names are defined and how to set
          term. But xterm should normally be allright. Let's hope someone better
          informed than me about Unix can look into your problem and give you a better
          answer.

          Tony.
          ----- Original Message -----
          From: "Wei Wang" <Wei.Wang@...>
          To: "Antoine J. Mechelynck" <antoine.mechelynck@...>
          Cc: <vim@...>
          Sent: Saturday, June 01, 2002 2:37 PM
          Subject: Re: Strange display in VIM: ^[33m


          > Thanks.
          >
          > Since I am not root, /etc/termcap would not have been changed when I
          installed
          > the ncurse termcap. I wonder what it has changed.
          > by :set term I got term=xterm which look fine to me, although I couldn't
          remember what the term was before.
          > I tried :set term='ansi' according to the help in :h term. But got ]
          >
          > Vim: Caught deadly signal SEGV
          > Vim: Finished.
          > Segmentation fault
          >
          >
          >
          >
          >
          > On Sat, 1 Jun 2002 14:25:03 +0200
          > "Antoine J. Mechelynck" <antoine.mechelynck@...> wrote:
          >
          > > On Unix (and Unix-like) systems, termcap is a file (/etc/termcap, I
          believe)
          > > which define the behaviour of video terminals. Maybe giving your
          terminal
          > > another name (sing :set term=name) in vim might cure the problem. See :h
          > > 'term'. Also see what you have currently with :set term?.
          > >
          > > Tony.
          > > ----- Original Message -----
          > > From: "Wei Wang" <Wei.Wang@...>
          > > To: "Antoine J. Mechelynck" <antoine.mechelynck@...>
          > > Cc: <vim@...>
          > > Sent: Saturday, June 01, 2002 2:18 PM
          > > Subject: Re: Strange display in VIM: ^[33m
          > >
          > >
          > > > Like this?
          > > >
          > > > Got errors like:
          > > >
          > > > No range allowed: 4=blue on
          > > > line 11:
          > > > No range allowed: 7=white on
          > > >
          > > > I am not quite sure what "termcap" is. But I remember I installed
          ncurse
          > > > yesterday with the --with-termcap switch on. Might that cause the
          problem?
          > > >
          > > > set ruler
          > > > set ai
          > > > set tabstop=4
          > > > ab import import
          > > > ab include include
          > > > set sw=4
          > > > syntax on
          > > >
          > > > hi Search term=reverse ctermfg=4 ctermbg=7
          > > > 4=blue on
          > > > 7=white on
          > > >
          > > > augroup filetype
          > > > au BufRead,BufNewFile *.flex,*.jflex set filetype=jflex
          > > > augroup END
          > > > au Syntax jflex so ~/.vim/syntax/jflex.vim
          > > >
          > > >
          > > > On Sat, 1 Jun 2002 14:01:46 +0200
          > > > "Antoine J. Mechelynck" <antoine.mechelynck@...> wrote:
          > > >
          > > > > maybe a wrong termcap
          > > > > <Esc> [ <digits> m
          > > > > or
          > > > > <Esc> [ <digits> ; <digits> m
          > > > > etc.
          > > > > is the change-color sequence on "ANSI" terminals
          > > > > where <digits>=
          > > > > 0 unbright
          > > > > 1 bright
          > > > > 30-37 foreground
          > > > > 40-47 background
          > > > > add units for 1 = red on, 2=green on, 4=blue on
          > > > > etc.
          > > > >
          > > > > These codes apply to DOS boxes with ANSI.SYS and to some other
          > > terminals.
          > > > >
          > > > > I notice there seems not to be a left square bracket after your ^[
          (i.e.
          > > > > Escape). Could that be the problem?
          > > > >
          > > > > Tony.
          > > > > ----- Original Message -----
          > > > > From: "Wei Wang" <Wei.Wang@...>
          > > > > To: <vim@...>
          > > > > Sent: Saturday, June 01, 2002 1:18 PM
          > > > > Subject: Strange display in VIM: ^[33m
          > > > >
          > > > >
          > > > > > hi,
          > > > > >
          > > > > > I got a strange problem with vim. say a file(.vimrc) reads like
          this
          > > inc
          > > > > vi:
          > > > > >
          > > > > > set ruler
          > > > > > set ai
          > > > > > set tabstop=4
          > > > > > ab import import
          > > > > > ab include include
          > > > > > set sw=4
          > > > > > syntax on
          > > > > >
          > > > > > hi Search term=reverse ctermfg=4 ctermbg=7
          > > > > >
          > > > > > augroup filetype
          > > > > > au BufRead,BufNewFile *.flex,*.jflex set filetype=jflex
          > > > > > augroup END
          > > > > > au Syntax jflex so ~/.vim/syntax/jflex.vim
          > > > > >
          > > > > > But it reads like this inc vim:
          > > > > >
          > > > > > ^[33mset ^[35mruler
          > > > > > ^[33mset ^[35mai
          > > > > > ^[33mset ^[35mtabstop=4
          > > > > > ^[33mab ^[33mim import
          > > > > > ^[33mab include include
          > > > > > ^[33mset ^[35msw=4
          > > > > > ^[33msyntax ^[32mon
          > > > > >
          > > > > > ^[33mhi Search ^[32mterm=^[35mreverse ^[32mctermfg=^[31m4
          > > > > ^[32mctermbg=^[31m7
          > > > > >
          > > > > > ^[33maugroup ^[33mfiletype
          > > > > > ^[33mau ^[32mBufRead,^[32mBufNewFile *.flex,*.jflex
          ^[33mset
          > > > > ^[35mfiletype=jflex
          > > > > > ^[33maugroup END
          > > > > > ^[33mau ^[32mSyntax jflex ^[33mso
          > > > > ~/^[33m.vim/^[33msyntax/jflex^[33m.vim
          > > > > >
          > > > > >
          > > > > >
          > > > > > Any idea what caused this?
          > > > > >
          > > > > >
          > > > > >
          > > > > > Many thanks,
          > > > > >
          > > > > > Wei
          > > > > >
          > > > > >
          > > > >
          > > > >
          > > > >
          > > >
          > > >
          > >
          > >
          > >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.