tags:

views:

649

answers:

9

Hi Guys,

I learned c++ on and off for serveral times but never write a real apps using it . long time I've been thinking that writing a text editor will be something very interesting , now I am looking for a simple but decent text editor written in c or c++ from which I can get inspiration and learn how to write a text editor by myself.

so my question is could you guys recommend a "simple but decent" text edtor written in c or c++ to me ?

+1  A: 

Notepad++ for some definitions of "simple".

Dominic Rodger
+2  A: 

You might want to look at Zile or nvi. Both are fairly simple; Zile is Emacs-like, and nvi is the Berkeley vi. Another to look at would be Nano, a simple text editor that is designed to be easy for new users. I don't know how clean the code is on any of these, though.

I would also recommend reading The Craft of Text Editing: Emacs for the Modern World. This book surveys many of the specific problems that have to be dealt with in writing a text editor along with approaches, strategies, and algorithms for solving them. Its content should be relevant and useful even if your editor isn't going to look much like Emacs at all.

Michael E
A: 

Get the vi. There is a big lack of true editors like vi/vim ;) I mean there is a plenty of editors like notepad/notepad++, but few editors which have separate command/control mode. So You could look at the vi sources to inspire yourself and introduce something revolutionary.

bua
There's reasons why there's few editors with separate command/control mode. Don't get me wrong, I live in vim, but the separate modes don't add much to it (compare Emacs, for example), and are hard to learn.
David Thornley
There are plenty, but they activate 'control mode' while you hold 'Control' button.
ima
I agree with You, but I'm sick of getting another clone of notepad ;) .I want something really new.That was my message.
bua
+3  A: 

Well what you want to see sounds more like a tutorial than an actual application (I think applications like Notepad++ will be a lot to dive into in the beginning). Since you don't mention any environment you want to program in, you could check out the QT Text Editor Demo. QT is a cross platform GUI Toolkit so you are not bound to a specific operating system but probably harder to setup then a Visual Studio environment in Windows.

For Windows only you might want to think about digging more into the .NET platform (e.g. C#) as suggested in this question. It doesn't help learning C++ but it makes GUI development a hell of a lot easier.

Daff
+1  A: 

Notepad++ is an excellent open source editor written in C++.

luke
+1  A: 

JuffEd. It is written in C++, cross platform due to usage of Qt and QScintilla. Notepad++ uses also Scintilla text editor component, but its limited only to Windows platform.

Cristian Adam
A: 

loot to the QT this is cross platform,HAVE RICHTEXT COMPONENT(widget).Writing first app in QT will give you actual knowledge.I recommend to learn QT by book

SomeUser
A: 

You may also check out Scintilla editing component.

Nick D
+1  A: 

What sort of text editor would you like to make?

First question is will this be GUI or Console based?

GUI based, do you want to make something like Notepad? And on what platform? If it's MS Windows based, might I recommend picking up on MFC?

If it's text based, there are many open source solutions you can get into. My recommendation is to look at the simplest of editors like ed or something.

Daniel