]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/setup.itely
Begin lilypond-program reworking.
[lilypond.git] / Documentation / user / setup.itely
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @c This file is part of lilypond-program.tely
3 @ignore
4     Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
5
6     When revising a translation, copy the HEAD committish of the
7     version that you are working on.  See TRANSLATION for details.
8 @end ignore
9
10 @c was "INSTALL - compiling and installing GNU LilyPond"
11 @node Setup
12 @chapter Setup
13
14 This chapter discusses how to set up LilyPond to integrate with various
15 programs.
16
17 @menu
18 * Notes for the MacOS X app::   
19 * Text editor support::         
20 @end menu
21
22
23 @node Notes for the MacOS X app
24 @section Notes for the MacOS X app
25
26 The scripts (such as lilypond-book, convert-ly, abc2ly, and even
27 lilypond itself) are also
28 included inside MacOS X .app. They can be run from the command line by
29 invoking them directly, e.g.
30
31 @example
32 @var{path/to}/LilyPond.app/Contents/Resources/bin/lilypond
33 @end example
34
35 @noindent
36 The same is true of the other scripts in that directory, including
37 lilypond-book, convert-ly, abc2ly, etc.
38
39 Alternatively, you may create scripts which add the path
40 automatically.  Create a directory to store these scripts,
41
42 @example
43 mkdir -p ~/bin
44 cd ~/bin
45 @end example
46
47 Create a file called @code{lilypond} which contains
48
49 @example
50 exec @var{path/to}/LilyPond.app/Contents/Resources/bin/lilypond "$@@"
51 @end example
52
53 Create similar files @code{lilypond-book}, @code{convert-ly}, and
54 any other helper programs you use (@code{abc2ly}, @code{midi2ly},
55 etc).  Simply replace the @code{bin/lilypond} with
56 @code{bin/convert-ly} (or other program name) in the above file.
57
58 Make the file executable,
59
60 @example
61 chmod u+x lilypond
62 @end example
63
64 Now, add this directory to your path.  Modify (or create)
65 a file called @code{.profile} in your home directory such that it contains
66
67 @example
68 export PATH=$PATH:~/bin
69 @end example
70
71 @noindent
72 This file should end with a blank line.
73
74 Note that @var{path/to} will generally be @code{/Applications/}.
75
76
77 @node Text editor support
78 @section Text editor support
79
80 @menu
81 * Emacs mode::                  
82 * Vim mode::                    
83 @end menu
84
85 @node Emacs mode
86 @subsection Emacs mode
87
88 An Emacs mode for entering music and running LilyPond is contained in
89 the source archive in the @file{elisp} directory.  Do @command{make
90 install} to install it to @var{elispdir}.  The file @file{lilypond-init.el}
91 should be placed to @var{load-path}@file{/site-start.d/} or appended
92 to your @file{~/.emacs} or @file{~/.emacs.el}.
93
94 As a user, you may want add your source path (e.g. @file{~/site-lisp/}) to
95 your @var{load-path} by appending the following line (as modified) to your
96 @file{~/.emacs}
97 @c any reason we do not advise:  (push "~/site-lisp" load-path)
98 @quotation
99 @example
100 (setq load-path (append (list (expand-file-name "~/site-lisp")) load-path))
101 @end example
102 @end quotation
103
104
105 @node Vim mode
106 @subsection Vim mode
107
108 A Vim mode for entering music and running LilyPond is contained in the
109 source archive in @code{$VIM} directory.
110
111 The LilyPond file type is detected if the file @file{~/.vim/filetype.vim} @c
112 has the following content
113 @quotation
114 @example
115 if exists("did_load_filetypes")
116   finish
117 endif
118 augroup filetypedetect
119   au! BufNewFile,BufRead *.ly           setf lilypond
120 augroup END
121 @end example
122 @end quotation
123
124 Please include this path by appending the following line to your
125 @file{~/.vimrc}
126
127 @quotation
128 @example
129 set runtimepath+=/usr/local/share/lilypond/$@{LILYPOND_VERSION@}/vim/
130 @end example
131 @end quotation
132
133 @noindent
134 where $@{LILYPOND_VERSION@} is your lilypond version.  If Lilypond was not
135 installed in @file{/usr/local/}, then change this path accordingly.
136
137