lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: vim vagaries


From: Jethro Van Thuyne
Subject: Re: vim vagaries
Date: Wed, 11 Nov 2009 11:24:37 +0000 (UTC)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

Hi Jonathan,

It's not to easy to find the right locations indeed, perhaps this might help. First you have to edit a file called filetype.vim, located in /home/yourusername/.vim/

If it isn't there, you can just create it:

  touch /home/yourusername/.vim/filetype.vim

If the .vim directory isn't there either, you have to create that first.

  mkdir /home/yourusername/.vim

When you finished doing that, you can paste the following text in the file "filetype.vim":

  if exists("did_load_filetypes")
    finish
  endif
  augroup filetypedetect
    au! BufNewFile,BufRead *.ly    setf lilypond
  augroup END

The next thing you should do, is to locate the syntax files for vim, which will go into your .vimrc. Check if you have a file called .vimrc in your home directory. If you don't have one, do:

  touch /home/yourusername/.vimrc

The location of the syntax folder depends on how you installed lilypond, and on which computer. The easiest way to find out where they are, is to type this in the terminal:

  locate vim/syntax | grep lily

This should give you a short list of paths, containing something like /usr/share, the version nummer of your current lilypond install, followed by "/vim/syntax/". Mine looks like this:

  locate vim/syntax | grep lily
    /usr/share/lilypond/2.13.7/vim/syntax
    /usr/share/lilypond/2.13.7/vim/syntax/lilypond-words
    /usr/share/lilypond/2.13.7/vim/syntax/lilypond-words.vim
    /usr/share/lilypond/2.13.7/vim/syntax/lilypond.vim


Copy the line - without the words after "vim" - and paste it in your .vimrc like this:

  set runtimepath+=/usr/share/lilypond/2.13.7/vim

and save it. Next time you open up a file with a .ly extension, you should get the correct syntax highlighting.

Best regards,

Jethro


On Wed, 11 Nov 2009, J. wrote:

Hi Again evrey body, I'm happy to say that with because of the help you gave me I was not only able to get jedit up and running for lilypond but was encouraged to succede in setting up emacs too! Vim though is somthing else. I looked at the directions on the lilypond site for setting it up but, because of my noviciate I got confused with all the places and symbols. i.e. can you add all the lilpond things into the place where vim is (/user/bin/share/vim) or have to make a ~/.vim and how does one modify the files when the're found. [Whew!] Would appreciat some help like you gave last time.
                                                                                
       Jonnie




reply via email to

[Prev in Thread] Current Thread [Next in Thread]