POV-Ray : Newsgroups : povray.unix : Editor Server Time
22 Dec 2024 19:08:23 EST (-0500)
  Editor (Message 1 to 10 of 10)  
From: Rafal 'Raf256' Maj
Subject: Editor
Date: 1 Dec 2004 22:21:58
Message: <Xns95B32CB5BA4E2raf256com@203.29.75.35>
Ho,
with ditor has both higlights -and- tab-completition?

Like win32 editor, I type lighTAB and I get light_group,

camTAB gives camera, and so on.

Perhaps a way to do it in vim?


-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

From: Daniel Hulme
Subject: Re: Editor
Date: 1 Dec 2004 22:43:57
Message: <20041202034357.52455190@dh286.pem.cam.ac.uk>
> Perhaps a way to do it in vim?
vim has keyword completion
^n and ^p complete a token by matching against tokens in the file
after/before the one you're currently typing.
^x^v might be more useful: it completes by picking a word from a
dictionary file; the location of the dictionary is user-definable and
could be set to a file containing a list of SDL keywords.

^n/^p completion can be redefined using the 'complete' option to look in
a particular dictionary file: you could have your SDL
syntax-highlighting script modified to do just that.

Actually, it would be rather nice if it would do it automatically using
the keywords defined in the syntax file. Ah well.

see :help ins-completion for more details.

Daniel

-- 
A church is more than just timber and stone   .oO( surreal.istic.org )
And freedom is a dark road when you're walking it alone   -Paul Simon,
But the future is now, and it's time to take a stand       'A Church 
So the lost bells of freedom can ring out in my land.      is Burning'


Post a reply to this message

From: Thierry CHARLES
Subject: Re: Editor
Date: 2 Dec 2004 03:18:26
Message: <41aecfd2$1@news.povray.org>
QTPov Editor has many functionnalities, including syntax highlightning 
and keyword completion .. (if you want to use it, dont forget to 
download the ressources package and take a look at the help files 
incuded in it)

Thierry



> Ho,
> with ditor has both higlights -and- tab-completition?
> 
> Like win32 editor, I type lighTAB and I get light_group,
> 
> camTAB gives camera, and so on.
> 
> Perhaps a way to do it in vim?
> 
>


Post a reply to this message

From: Bruce
Subject: Re: Editor
Date: 2 Dec 2004 06:21:32
Message: <41aefabc@news.povray.org>

> Ho,
> with ditor has both higlights -and- tab-completition?
> 
> Like win32 editor, I type lighTAB and I get light_group,
> 
> camTAB gives camera, and so on.
> 
> Perhaps a way to do it in vim?

Heard of Qtpov, heard of Vim... Switch to emacs now... I think this is 
working in the standard pov-mode (maybe not with the bindings you want, 
bu reassigning a binding is not such a great work, is it?). If not, you 
juste found a great reason to do some lisp-hacking :-)

Other Great feature for povmode in emacs :
* auto indenting
* paren matching
* squeleton definition
...

By the way, I use emacs for both my linux boxes and for my windows 
computer... Feel free to ask

-- 
Bruce


Post a reply to this message

From: Ross
Subject: Re: Editor
Date: 2 Dec 2004 13:05:43
Message: <41af5977$1@news.povray.org>
"Bruce" <flo### [at] nospamfreefr> wrote in message
news:41aefabc@news.povray.org...

> > Ho,
> > with ditor has both higlights -and- tab-completition?
> >
> > Like win32 editor, I type lighTAB and I get light_group,
> >
> > camTAB gives camera, and so on.
> >
> > Perhaps a way to do it in vim?
>
> Heard of Qtpov, heard of Vim... Switch to emacs now... I think this is
> working in the standard pov-mode (maybe not with the bindings you want,
> bu reassigning a binding is not such a great work, is it?). If not, you
> juste found a great reason to do some lisp-hacking :-)
>
> Other Great feature for povmode in emacs :
> * auto indenting
> * paren matching
> * squeleton definition
> ...
>
> By the way, I use emacs for both my linux boxes and for my windows
> computer... Feel free to ask
>
> -- 
> Bruce

Love emacs for pov editing. Never found out how to do keyword completion for
any mode though. As for lisp hacking, bleh!

So, how would one do keyword completion in emacs?


Post a reply to this message

From: Christoph Hormann
Subject: Re: Editor
Date: 3 Dec 2004 07:35:03
Message: <copma4$ch2$1@chho.imagico.de>
Ross wrote:
> 
> Love emacs for pov editing. Never found out how to do keyword completion for
> any mode though. As for lisp hacking, bleh!
> 
> So, how would one do keyword completion in emacs?

By default i think it is linked to the <ALT>-<TAB> key combination but 
since this is usually caught by the system for other purposes you should 
choose something different - by adding something like:

(define-key pov-mode-map "\M-\r" 'pov-complete-word)

to your ~/.emacs or ~/.xemacs/init.el or whatever init file you use. 
The above line makes the <ALT>-<RETURN> combination do the completition.

Note emacs pov-mode completition is much more powerful than in WinPOV 
since it is context sensitive (it only completes keywords that are 
allowed in the current context).

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 23 Sep. 2004 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Ross
Subject: Re: Editor
Date: 3 Dec 2004 13:43:56
Message: <41b0b3ec$1@news.povray.org>
"Christoph Hormann" <chr### [at] gmxde> wrote in message
news:copma4$ch2$1@chho.imagico.de...
> Ross wrote:
> >
> > Love emacs for pov editing. Never found out how to do keyword completion
for
> > any mode though. As for lisp hacking, bleh!
> >
> > So, how would one do keyword completion in emacs?
>
> By default i think it is linked to the <ALT>-<TAB> key combination but
> since this is usually caught by the system for other purposes you should
> choose something different - by adding something like:
>
> (define-key pov-mode-map "\M-\r" 'pov-complete-word)
>
> to your ~/.emacs or ~/.xemacs/init.el or whatever init file you use.
> The above line makes the <ALT>-<RETURN> combination do the completition.
>
> Note emacs pov-mode completition is much more powerful than in WinPOV
> since it is context sensitive (it only completes keywords that are
> allowed in the current context).
>
> Christoph
>

Thanks, i'll try this tonight.

I was wondering yesterday about if it would be possible to dynamically
create lists of words that it emacs can complete. For instance if I #define
myBigObject = union {...} could emacs somehow pick up "myBigObject" as an
available keyword for completion.

surely impossible without any lisp knowledge.


Post a reply to this message

From: Daniel Hulme
Subject: Re: Editor
Date: 3 Dec 2004 18:03:57
Message: <20041203230357.16a5b0e5@dh286.pem.cam.ac.uk>
> surely impossible without any lisp knowledge.
If emacs has tags support (which it surely must) then you can do it
without any LISP: you just write a program (like ctags) which looks at
the file and works out what the definitions are.
I know vim has support for this: ^X^] does completion by tag, if you
have it turned on. Even without tags, vim will complete based on past
words in the document when you press ^p; emacs probably has a similar
feature, though I wouldn't know about that :->

-- 
A church is more than just timber and stone   .oO( surreal.istic.org )
And freedom is a dark road when you're walking it alone   -Paul Simon,
But the future is now, and it's time to take a stand       'A Church 
So the lost bells of freedom can ring out in my land.      is Burning'


Post a reply to this message

From: Bruce
Subject: Re: Editor
Date: 11 Dec 2004 05:01:54
Message: <41bac592$1@news.povray.org>
>>(define-key pov-mode-map "\M-\r" 'pov-complete-word)
>>
>>to your ~/.emacs or ~/.xemacs/init.el or whatever init file you use.
>>The above line makes the <ALT>-<RETURN> combination do the completition.

This may not work in your .emacs, as pov-mode is not started when emacs 
is launched. You should probably do it as a lambda function on the right 
hook

(pov-mode-hook (quote (lambda nil
    (define-key pov-mode-map [(control c) (control i)] (quote 
pov-complete-word)))))

> I was wondering yesterday about if it would be possible to dynamically
> create lists of words that it emacs can complete. For instance if I #define
> myBigObject = union {...} could emacs somehow pick up "myBigObject" as an
> available keyword for completion.

No work to be done : there's a function caled dabbrev which 
automatically completes with the word which have previously been typed 
in your buffer

(global-set-key [(f8)] 'dabbrev-completion)

For more information and knowing the difference between dabbrev-expand 
and dabbrev-completion (not exactly the same behaviour), use C-h a 
dabbrev [return]
(C-h => help, a => regexp search)
Note : this is bundled in my xemacs installation, but I think I had to 
install it on fsf emacs. Some google(ing will probably tell you where 
you can find it

> surely impossible without any lisp knowledge.

Emacs has so many packages that almost everuthing is possible without 
any lisp hacking (except for configuration purposes, but can we REALLY 
name it hacking?)

Enjoy and have fun!


-- 
Bruce


Post a reply to this message

From: Ross
Subject: Re: Editor
Date: 13 Dec 2004 10:11:36
Message: <41bdb128$1@news.povray.org>
"Bruce" <flo### [at] nospamfreefr> wrote in message
news:41bac592$1@news.povray.org...
> >>(define-key pov-mode-map "\M-\r" 'pov-complete-word)
> >>
> >>to your ~/.emacs or ~/.xemacs/init.el or whatever init file you use.
> >>The above line makes the <ALT>-<RETURN> combination do the completition.
>
> This may not work in your .emacs, as pov-mode is not started when emacs
> is launched. You should probably do it as a lambda function on the right
> hook
>
> (pov-mode-hook (quote (lambda nil
>     (define-key pov-mode-map [(control c) (control i)] (quote
> pov-complete-word)))))
>
> > I was wondering yesterday about if it would be possible to dynamically
> > create lists of words that it emacs can complete. For instance if I
#define
> > myBigObject = union {...} could emacs somehow pick up "myBigObject" as
an
> > available keyword for completion.
>
> No work to be done : there's a function caled dabbrev which
> automatically completes with the word which have previously been typed
> in your buffer
>
> (global-set-key [(f8)] 'dabbrev-completion)
>
> For more information and knowing the difference between dabbrev-expand
> and dabbrev-completion (not exactly the same behaviour), use C-h a
> dabbrev [return]
> (C-h => help, a => regexp search)
> Note : this is bundled in my xemacs installation, but I think I had to
> install it on fsf emacs. Some google(ing will probably tell you where
> you can find it
>
> > surely impossible without any lisp knowledge.
>
> Emacs has so many packages that almost everuthing is possible without
> any lisp hacking (except for configuration purposes, but can we REALLY
> name it hacking?)
>
> Enjoy and have fun!
>
>
> -- 
> Bruce

pretty neat. thanks for the info.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.