Re: vim feels impossible to use right now



John Salerno wrote:
BartlebyScrivener wrote:
John Salerno wrote:

Actually, if I could just figure out how to get highlighting and
indenting to work with regular vim, I'd use it instead, but I just don't
know how to do this.

3 python.vim files on my xp set up. I didn't put them there. They were
installed when I ran the install program.

They are in:

/ftplugin

/syntax

/indent

There is something wrong with your installation if you have the python
shebang etc on the first line and it's not automatically colorizing
your python file, unless of course it comes set up differently on
Ubuntu. I don't know. Somewhere in vimrc you need to turn syntax on, or
just go up to the toolbar and select syntax and turn it on if you are
in doubt.

I think you need to uninstall vim and reinstall, but I have no clue how
to do that on Ubuntu.

rd


Well, the thing is, vim came preinstalled on Ubuntu (as it does in Linux), so I'm only working with whatever it came with at this point. I tried it in Windows like you said and it automatically started coloring my file as I typed, so obviously the Linux version doesn't come with the syntax files by default.

But like I said originally, I was able to find a python.vim file online, but in following the directions for where to put it, it turns out I didn't even have that particular directory at all, so now I'm not sure where it's supposed to go. I don't know if syntax highlighting and smart indenting involve the .vimrc file either, or are separate.
John,

To determine the location of the Vim distribution files on "Ubunto", bring up Vim and type the command

:scriptnames

This command lists the files Vim has loaded at startup. Under Red Hat Linux, which I use, it shows the standard Vim distribution files are located in /usr/local/share/vim.

Another way of determining this is to check out the value of "VIMRUNTIME" in Vim. Again, open Vim and enter the command

:echo $VIMRUNTIME

Insofar as .vimrc files are concerned, you should create one in your home directory. To enable syntax highlighting, add the following lines to your .vimrc:

filetype plugin indent on
syntax enable

If there's a particular colorscheme you want to use, just add a "colorscheme" command to your .vimrc. For example, to use the "torte" colorscheme, you'd add the line

colorscheme torte

In addition to the standard colorscheme files, hundreds more are available. To see some of the possibilities, go to:

http://www.cs.cmu.edu/~maverick/VimColorSchemeTest/


Hope this has been helpful,

Mike
.



Relevant Pages

  • Re: [opensuse] Turn off colors in vi or vim
    ... Cristian's solution earlier created an empty .vimrc ... file with "syntax off" in it and it works perfectly. ... vim and ls. ...
    (SuSE)
  • Re: [opensuse] Turn off colors in vi or vim
    ... Cristian's solution earlier created an empty .vimrc ... file with "syntax off" in it and it works perfectly. ... vim and ls. ...
    (SuSE)
  • Re: vim feels impossible to use right now
    ... These don't seem like the normal directories I've been hearing about. ... Also, there is no .vimrc in my home directory, but there is vimrc in my /usr/share/vim directory, and that had the line ... and I also uncommented the line that said "syntax on", but none of that seemed to do anything. ... while within vim, ...
    (comp.editors)
  • Re: A better syntax highlighting color scheme for Ruby code on Vim?
    ... Vim in Ruby! ... Vim also has good syntax-highlighting support. ... color scheme applied through the syntax highlighting sucks. ...
    (comp.lang.ruby)
  • Re: (G)Vim Oddity
    ... >>> syntax highlighting colors appear wrong. ... > 1) what version ov vim? ... custom udev rules. ...
    (Debian-User)