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

Re: Vim :colorscheme on Python

Expand Messages
  • MarkFisher
    ... Yes it s exactly that one. ... I got the python.vim syntax file from vim website: http://www.vim.org/scripts/script.php?script_id=790 I downloaded latest
    Message 1 of 3 , Nov 2, 2011
    • 0 Attachment
      On Nov 2, 9:34 am, Ben Fritz <fritzophre...@...> wrote:
      > On Nov 1, 11:11 pm, MarkFisher <mytem...@...> wrote:
      >
      > > I'm using Mac OSX Lion 10.7.2, Terminal.app supports 256 (output
      > > of :echo &t_Co). In my vimrc I have (PATH/TO/vim/vimrc)
      >
      > > When I "vim blah.py" and :colorscheme torte, syntax colors are not
      > > loading.
      >
      > You should not need to re-issue a colorscheme torte command, as it is
      > in your .vimrc.
      >
      > What is this "torte" colorscheme? This one?
      >
      > http://www.vim.org/scripts/script.php?script_id=111
      >

      Yes it's exactly that one.

      > > For example python keyword doesn't have a proper colors (They
      > > have regular text color). That works for .c files but not python.
      >
      > > I updated my syntax/python.vim but still no luck.
      >
      > You should not need to do this, Vim ships with decent python
      > highlighting. What do you mean, "I updated my syntax/python.vim"? Did
      > you find a replacement syntax file somewhere? Did you grab the latest
      > from the Mercurial repository/FTP site?

      I got the python.vim syntax file from vim website:
      http://www.vim.org/scripts/script.php?script_id=790
      I downloaded latest one python3.0.vim and then renamed it to
      python.vim and copied it to syntax folder.

      >
      > > Can someone tell me why (I don't see the mistake)?
      >
      > > Thanks
      >
      > > vimrc
      > > set nocompatible
      > > syntax on
      > > filetype plugin indent on
      >
      > I don't know if it matters, but I have always seen "filetype plugin
      > indent on" BEFORE "syntax on".
      >
      I will give it try tonight and I will update you on that.

      > > set nobackup
      > > colorscheme torte
      >
      > > Output of :scr ($PATH = Path/TO/VIM)
      > > .py
      > > $PATH/vimrc
      > > $PATH/vim73/filetype.vim
      > > $PATH/vim73/ftpluhin.vim
      >
      > Typo? Should this be ftplugin.vim?

      My mistake, that is a typo. I typed everything that :scr command
      printed.
      >
      >
      >
      >
      >
      >
      >
      >
      >
      > > $PATH/vim73/indent.vim
      > > $PATH/vim73/syntax/syntax.vim
      > > $PATH/vim73/syntax/synload.vim
      > > $PATH/vim73/syntax/syncolor.vim
      > > $PATH/vim73/plugin/getscriptPlugin.vim
      > > $PATH/vim73/plugin/gzip.vim
      > > $PATH/vim73/plugin/matchparam.vim
      > > $PATH/vim73/plugin/netrwPlugin.vim
      > > $PATH/vim73/plugin/rrhelper.vim
      > > $PATH/vim73/plugin/spellfile.vim
      > > $PATH/vim73/plugin/tarPlugin.vim
      > > $PATH/vim73/plugin/yohtml.vim
      > > $PATH/vim73/plugin/vimballPlugin.vim
      > > $PATH/vim73/plugin/zipPlugin.vim
      > > $PATH/vim73/ftplugin/python.vim
      > > $PATH/vim73/indent/python.vim
      > > $PATH/vim73/syntax/python.vim
      >
      > Here we see, the syntax file for the python filetype, and the indent
      > and plugin file as well, are correctly being sourced.

      Yes they are and I don't know why I'm not getting right color for that
      color scheme.
      >
      > > $PATH/vim73/colors/torte.vim
      >
      > And your colorscheme file as well.
      >
      > > .c file
      > > $PATH/vimrc
      > > $PATH/vim73/filetype.vim
      > > $PATH/vim73/ftpluhin.vim
      >
      > Same typo?

      YES
      >
      >
      >
      >
      >
      >
      >
      >
      >
      > > $PATH/vim73/indent.vim
      > > $PATH/vim73/syntax/syntax.vim
      > > $PATH/vim73/syntax/synload.vim
      > > $PATH/vim73/syntax/syncolor.vim
      > > $PATH/vim73/plugin/getscriptPlugin.vim
      > > $PATH/vim73/plugin/gzip.vim
      > > $PATH/vim73/plugin/matchparam.vim
      > > $PATH/vim73/plugin/netrwPlugin.vim
      > > $PATH/vim73/plugin/rrhelper.vim
      > > $PATH/vim73/plugin/spellfile.vim
      > > $PATH/vim73/plugin/tarPlugin.vim
      > > $PATH/vim73/plugin/yohtml.vim
      > > $PATH/vim73/plugin/vimballPlugin.vim
      > > $PATH/vim73/plugin/zipPlugin.vim
      > > $PATH/vim73/ftplugin/c.vim
      > > $PATH/vim73/indent/c.vim
      > > $PATH/vim73/syntax/c.vim
      > > $PATH/vim73/colors/torte.vim
      >
      > Here's the c plugin and syntax, and colorscheme. As expected.

      Color syntax works perfectly with other files.
      >
      > I wonder, if you're expecting something to be highlighted, that the
      > syntax file simply has no highlight for? Can you send a snippet of
      > text which you expect to have highlighting, and explain what is not
      > highlighted in the way you expect?
      >
      > For example, for me, in:
      >
      > import os
      >
      > # Some comment
      >
      > ...the word "import" is highligted with the PreProc group, and the
      > comment is highlighted with the Comment group. But the word "os" has
      > no highlight.

      My concern is:
      For python file -> dict, list, object, ... are keywords and I'm not
      getting light blue color on those (Just text color).
      import os -> color of import is light blue and os is text color.

      On my FreeBSD machine, NO Window Manager,... , vim shows the color of
      import red and def log -> def yellow and log light blue, dict
      list, ... light blue and so on.
      Another thing is when I had snow leopard installed, everything was
      working perfectly. That problem happened only on lion os after clean
      install.

      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.