Hi Dmitry,
The difficulty is the I switch from bass to violin clef in the right
hand. Is it possible to change the relative note, so I won't need to
add 2 quotes after each note like I did for g: g''2?
I'm not sure I understand your question correctly:
The whole point of \relative mode is that you only have to use the two
quotes once. The next notes you enter without quote/comma will
automatically be "close" to your treble clef g.
\clef violin
g''2.
fis2 g4
a4 d, fis
g2.
in your score generates:
(BTW, you seem to be using LilyPond 2.18.2 - that's quite old by now,
I'd recommend to upgrade to a recent version, as these offer lots of new
functions and even simplifications.)
Lukas