top | item 10508646

Show HN: Lightweight C++ editor that understands your code

44 points| slededit | 10 years ago |slededit.com | reply

22 comments

order
[+] slededit|10 years ago|reply
I wanted something in between an IDE and a text editor that could properly parse and understand C++11. I didn't see anything out there that was lightweight and didn't want to take over my entire build system - yet could still parse my code. So I wrote SLED.
[+] marssaxman|10 years ago|reply
Nice. Always happy to see projects like this.

Any chance of a Linux build?

[+] rwallace|10 years ago|reply
I like the concept, would definitely try out again when it's a bit further along. Main things from a quick look:

- Today's monitors have plenty of horizontal space but a shortage of vertical space; the context window needs to be alongside, rather than under, the code window.

- Ctrl-C/X without a selection should copy/cut the current line.

- Autocomplete doesn't seem to work, e.g. type 'st' for the beginning of the 'static' keyword and nothing happens - the underlying mechanism is there and working, because manually triggered completion with ctrl-space does work.

[+] slededit|10 years ago|reply
Thanks for the feedback I really appreciate it. Everyone uses their editor slightly differently so I'm trying to hear from as many people as possible.

If you want to know when its more refined click the "Let me know when its ready" button on http://slededit.com

[+] nebucnaut|10 years ago|reply
First and most important: Great project! Writing an editor must be a whole lot of work! Especially when source code analysis is included. You said that you're using clang there. I've also been working with clang (for more than two years by now) and I've got to say that it's a great tool when it comes down to source code analysis. It's a little hard to get into, but it's totally worth the effort - especially when templates are involved. You wouldn't wanna analyze such code on your own ;) So I think you don't regret using clang there, do you?

Now some feedback: - I really like how your file search and the file tree interact! - It would be nice to show the definitions of local variables (e.g. inside a function scope). Or even better: Highlight all usages that variable throughout the scope! That would really help keeping track of things.

[+] dman|10 years ago|reply
Could you elaborate a bit on this statement - "SLED is poweful enough to learn how to build your project on its own". How does this work?
[+] slededit|10 years ago|reply
One of the problems with having a non-IDE try to parse your code is it doesn't know how its supposed to be built. I put a lot of effort to "guess" your include directories so that libclang could do a half decent job at figuring out the code.

When that fails it tries to make as much sense as possible with an incomplete syntax tree - this part is still very much a work in progress.

[+] TheCams|10 years ago|reply
I'm in the office so I wont download the beta now, but I think you should add more info on the website about the project (features, platforms supported etc)

What do you mean by "understand C++"? Does it offer features similar to Intellisense/Visual Assist?

[+] slededit|10 years ago|reply
It offers proper auto-complete as well as fast navigation to a function/symbols definition. It can also do a better job at syntax highlighting than regex based highlighters. In the future I'm hoping to add support for intelligent refactoring as well.
[+] grok2|10 years ago|reply
What's it developed in? C++ and Qt? I found it pretty fast, but it was buggy (and for some reason jumped to the same file/line number) on the goto definition selection. Maybe indexing wasn't complete. But it's really snappy!
[+] slededit|10 years ago|reply
C++ and win32 (with a light abstraction layer above it). Qt tends to be very heavy weight and I wanted to control as much as possible so I could get near instant boot times.

A few other library dependencies: - libclang for heavy duty parsing (I also have a "quick" parser that handles simple cases in real time). - rapidxml for the config files - boost for Boyer Moore on the string search (but I'm trying to move away from boost eventually).

[+] jason_slack|10 years ago|reply
any chance of an OS X build will be on your plate in the future?
[+] slededit|10 years ago|reply
Its on the radar, but at the moment just one platform is hard enough.