I finally made some time today to sit down and really focus on getting autocompletion working. This video shows some keyword, class, and member completion. I haven't been able to get local variables in methods to work yet.
http://www.youtube.com/watch?v=pgJKQRm25qI&hd=1
Apologies about crappy video quality (screen flickers at times) but it's really late and I don't feel like messing with the settings. It's best watched in fullscreen.
There are a lot of bugs and still a lot of work to be done but I was quite happy when I got something that was working without crashing and was actually useful. If you want to play with it yourself, download the 'completion' branch from GitHub but please remember this is not considered stable: https://github.com/ramon-rocha/MonoDeve ... completion
I should have all day to work on this Saturday so hopefully I can squash some bugs, clean up the code, and get us that much closer to proper code completion for Cobra!
Forums
Code Completion Video
9 posts
• Page 1 of 1
Re: Code Completion Video
Congratulations!! nice work!
Falun Dafa is Good.
Truth, Compassion, Forbearance is Good.
Truth, Compassion, Forbearance is Good.
- kobi7
- Posts: 82
- Location: Israel
Re: Code Completion Video
Nice.
It would be nice not to have do indentation manually with TAB key. It is so annoying.
It would be nice not to have do indentation manually with TAB key. It is so annoying.
- Nefarel
- Posts: 6
Re: Code Completion Video
Does your editor maintain indentation? Many do out of the box or can be configured to do so.
Presuming you get that going, then indentation in Cobra is two keystrokes:
<ENTER> <TAB>
In Python it's typically <SHIFT><:;><ENTER> and C-like languages are typically <SHIFT><{[><ENTER>.
Presuming you get that going, then indentation in Cobra is two keystrokes:
<ENTER> <TAB>
In Python it's typically <SHIFT><:;><ENTER> and C-like languages are typically <SHIFT><{[><ENTER>.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: Code Completion Video
Agreed, Nefarel. In MonoDevelop, this would be accomplished by developing a Formatting text editor extension.
- nerdzero
- Posts: 286
- Location: Chicago, IL
Re: Code Completion Video
Cool stuff, excellent work...
One thing that struck me watching the video is that with cobra theres another opportunity for completion:
If you are entering the first non whitespace token (word) on a new line, more often than not ( or pretty often, or sometimes (:-))
it's a keyword
assert, print, raise, def, while, .....
if you can detect that condition (only whitespace before cursor back to SOLn ) perhaps add the matching keywords to the filter list
( enhancement v2 )
Good stuff with what you've got working so far...
...
One thing that struck me watching the video is that with cobra theres another opportunity for completion:
If you are entering the first non whitespace token (word) on a new line, more often than not ( or pretty often, or sometimes (:-))
it's a keyword
assert, print, raise, def, while, .....
if you can detect that condition (only whitespace before cursor back to SOLn ) perhaps add the matching keywords to the filter list
( enhancement v2 )
Good stuff with what you've got working so far...
...
- hopscc
- Posts: 632
- Location: New Plymouth, Taranaki, New Zealand
Re: Code Completion Video
Thanks, hops. I've tried something similar so far with mixed results. After determining what region the cursor is in, the completion extension will examine the text of the first line of the region. It will include a different list of keywords depending on if the region starts with "class ", or "def ", etc. I've been thinking about maybe seeing if I can utilize the CobraTokenizer here to simplify this or possibly use regular expressions instead.
- nerdzero
- Posts: 286
- Location: Chicago, IL
9 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 8 guests