Which TextEditor is easiest to customize for a new scripting language? - ide

It's been more than an year that i'm developing a new scripting language with its own grammar rules and constructs.
I'd like to give the users of this language some minimalistic ide to work with, but i don't want/have time to make one from scratch so i'd like to take one already existing (it has to run on Linux platforms natively, so no windows-only editors plz) and customize it.
Well, which one is the easiest to customize without changing the source code and recompiling it, maybe even with plugin support?
Thank you.
UPDATE
I don't need to know which editor is the best for you, i need to know which one is the easiest to customize AND, most of it, which one has the most complete documentation about new language customization.
Ex: SciTE is good, but its documentation about custom grammars is really poor.

Have you looked into Scintilla/SciTE? I think it gets used often for this sort of thing. It's very lightweight, but from what I understand, is easy to add functionality to. It's not really an IDE, but it's more of a text-editor component that you could use as the basis for a simple IDE. I've used SciTE, which is a sort of demo text editor of Scintilla's capabilities. It's simple, but also quite fast and responsive.
I suppose another option would be to write plugins for existing IDEs such as Eclipse or Netbeans. Both of these IDEs support many languages just through 3rd-party plugins. Going this route means you don't need to build a complete UI, just the components needed to make your language work.
The downside of building plugins for an extendable IDE (such as NetBeans or Eclipse) is that you are at the mercy of the IDE developers. If they change the way the platform works, you must ensure that your plugins still work with the new versions. Sometimes this can become a major problem.
All of these options should work on Linux as well as Windows.

This sounds like a very ambitious project and I wish you luck.
I don't use linux too often, I use a Mac and my favorite text editor is called TextMate because it has snippets, code completion, and a whole mess of other features. The closest thing to it that I've found on linux is called Scribes.

There's always Emacs or Vim (I lean towards Vim, but that's just my opinion :) ). Neither are IDEs per se, but both are very extensible and it shouldn't be too hard to create settings for each that will aid people writing scripts in your language.

Related

Default Vs Custom Shortcuts

In your IDE/editor of choice, do you use only the default shortcuts out of the box, or do you customize them? One answer per response, and why you do.
In my programming career, I have come full swing around on this. I started out in emacs/vim on a terminal window with a bare-bones install, no customizations, then over time swung fully into completely customizing them both, getting them just right, such to the point that other emacs/vim users could not even work at them (changing movement keys, etc). More recently, I have been working in Eclipse, the JetBrains IDEs, Visual Studio, and I have continued to make heavy modifications to each, so that they all pretty much behave the same way across all my machines. Obviously, this takes some effort to maintain, and every new IDE means a whole slew of command learning and changing, and then some (like Visual Studio) don't have certain commands out of the box, so they require plug-ins to achieve the same functionality (grow selection, delete words by camelCase, etc).
To be fair, I am an above-average speed typist, and I can work productively in any of these IDEs, but I have started to yearn for the simplicity of just going back to straight vim shortcuts, and using simple vim plugins to make it work in my IDEs. Then, at least, all I would need if I wanted to change anything would be a single custom .vimrc.
Suggestions, ideas?
In my IDE, I use a slightly-customized version of the default keymap. More of it is default than not. I prefer using the default whenever possible: you learn it once, and then it's the same no matter where you need to use that same IDE (it's reasonably safe to assume that most installations have the default keymap, if they even let you change it at all)
My situation might be different than yours. In my previous positions, I used to code exclusively in vim. In my current position, I don't change IDE's often because I don't have to: 100% of my development is in one language, and I've been working at that position for several years now.
That being said, I did just change IDE's (from Zend Studio to PhpStorm, by the way) recently, so the only changes I've made to PhpStorm's default keymap are to make it more like the several Zend Studio shortcuts I couldn't bear to part with.
Otherwise, when I'm working with vim, I think in vim; when I'm working with PhpStorm, I think in PhpStorm. At this time, I don't think it's worth my time/effort to completely customize my keymap, any more than I already have. If you're working with multiple IDE's, your situation is probably quite different from mine.
Ultimately, I don't think you're going to find a "right" answer to this question. Nobody else knows your preferences or situation better than you do. It's a trade-off either way, whether you go the default or the customized route. Use your best judgment and decide which way you're going to go, and be happy with that choice.
Best of luck in your development efforts!

Are there any text-editors/IDEs that support languages generically?

I'm looking for an editor/IDE that can provide features that are nice to have while coding (example: being able to click-through to function definitions) for languages that it is not specifically built for. By these, I have in mind languages designed for a very specific purpose and often only used by a small community. In other words, ones that would not have native support in most software.
I realize this would require a fair bit of fairy dust but I don't think it's out of the scope of what's possible. Basically, the editor would have to be smart enough to recognize the commonly used syntax and semantics that many declarative languages have in common. It's quite possible this would require some amount of configuration.
Does something like this exist? If not, what challenges do you think there would be in creating it?
If you need only the feature to jump of to the definition of a specific function or class, then VIM (and many other editors, like Emacs, Epsilon and JOE) can read the jump location from the ctags file. You just have to write a ctags file generator for your custom language.
For programmable editors (like VIM, Emacs, Epsilon, Eclipse and gedit), you can write your own plugin for your custom language, but it may quickly become time-consuming and a maintenance nightmare, because new versions of editors tend to change the plugin interface.
Please note that adding support for syntax highlighting is usually much easier than adding ctags-like support for symbol lookups. More advanced features, like refactoring and context-sensitive symbol completion (like Ctrl-Space and Tab in modern IDEs) are even harder to implement.
GNU Emacs has a pretty good infrastructure for this sort of thing. Until recently Haskell was a relatively unknown language used primarily by researchers. Nevertheless, in a few thousand lines of Emacs Lisp, we have
Syntax highlighting with colors
Automatic indentation
Package support
Automatic highlighting of type and other information when placing the cursor over library functions
Meta-dot on an identifier to jump to its definition (through the standard emacs tags mechanism)
The nice thing about Emacs is that (a) there are many models to follow, and (b) you can build up the environment gradually, starting with those aspects that are most important to you.
I'm suprised no one has mentioned Notepad++ yet:
http://notepad-plus-plus.org/
It offers syntax support for a great many languages and offers the user to add new languages, and an active community that adds many languages that are not included out-of-the-box.
Most good IDE's are language agnostic and supports several if not many programming languages. If you are talking about DSL's, eclipse has a solution that seems pretty awsome - Xtext
EditPadPro comes with a set of tools that allow you to build your own syntax highlighting, code folding and file navigation schemes, based on a very powerful regex syntax. So if your language is not among the many that have already been provided out-of-the-box or can be downloaded off the website, you can roll your own quite easily (and share it with the community).
Visual Studio is designed to allow for this, but it requires the language to add explicit support. For example, Delphi Prism will install into Visual Studio, and provide full language support.
This is far above and beyond "configuration", however, and requires quite a bit of custom development to support.
SciTE and Scintilla offer a generic editor/platform for different languages. The library contains several parsers that work with many programming languages and you can reuse one of these for your own language to add formatting and syntax highlighting.
They don't offer advanced features like click-throughs, but you could build it on top of the library.
Visual Studio and Eclipse also support language plug-ins.
Zeus is a language neutral IDE for the Windows platform and it provides this go to definition/declaration functionality for any language supported by ctags.
To make it work you just create a Zeus project/workspace and then add the files to this workspace.

Alternative to Dreamweaver?

I'm tired of Dreamweaver overwriting wrong files on the server,
so I'm looking for an alternative.
I want color-coding and possibility to open/save and edit files direct from the server, so I don't need to save files on my desktop first.
I'm using Windows.
Every web developer should be hand-writing their mark-up - all forms of automated abstraction inhibit your understanding and awareness of the code and create maintenance problems for the future. I'm quite a zealot about this, you may be able to tell.
On that basis, I can heartily recommend Editplus: has code colouring, FTP and a huge amount of feature-sugar from line duplication to macros.
Notepad++ extended with some plugins is a really handy replacement. Though I can't call it IDE, it does virtually everything a developer need. In my case (a lot of repetitive code) Texter (a small app working in background) makes notepadd++ even more handy. So, my suggestion is: Notepad++ and Texter.
I switched to notepad++ when I had the same kind of problems with DreamWeaver. I tried some other programs too, but they were too complicated for my needs.
If all you need is color-coding and ftp-support, notepad++ is a good choice.
Visual Web Developer Express, which is the lightweight version of Visual Studio.
http://www.microsoft.com/express/
If you're using a Mac you should take a look at Coda
Well personally I use Programmer's Notepad but it doesn't support the facility to upload files to the server. You could get Notepad++ and this FTP plugin. I haven't tried Notepad++ but I'm sure that it isn't WYSIWYG.
Perhaps KompoZer? It has all the features you've asked for, and there's a Windows version (as well as Mac and Linux).
Dreamweaver... Not my cup of tea, because it lacks good support for modern web programming with Javascript or PHP.
For primary design, I use WeBuilder from Blumentals. Its also a good and not expensive PHP and Javascript IDE with debugging support and also has good CSS support with a built-in CSS editor.
I'm not a big fan of text editors like Notepad++ as an IDE replacement, because you often need a lot of additional plug-ins to have similar features like a IDE. But for some files or quick editing nothing can beat such editors (I like Notepad++ the most on Windows).
So for Windows I would prefer WeBuilder for all things (design & programming).
You use only Windows? For Linux there are other alternatives too ;)
When I searched an alternative for the Dreamweaver for PHP, I found some IDEs and one among them is Netbeans. Soon it became my favorite for my object oriented coding.
Here is the download page.
This has support for Zend and Symphony frameworks.
They also support File uploading.
When developping in PHP, I generally use Eclipse PDT.
If you are more oriented towards HTML/CSS/Javascript, you might be interested by Aptana, which is based on Eclipse too... Which means it can use lots of plugins, including some to work directly on a server, I suppose (see TM/RSE, for instance).
Note than Aptana can also be installed into an existing Eclipse installation, as a plugin.
Oh, also, I almost forgot : Eclipse is free, and there are both a free and a commercial version of Aptana.
(One bad thing about Eclipse being it requires a quite powerful computer -- at least 2 cores and 2 GB of RAM, if you want to use any other application at the same time...)
E Text Editor, a Textmate clone for Windows, claims to have FTP Support. But i haven't used this feature before.
I want color-coding and possibility to open/save and edit files direct from the server, so I don't need to save files on my desktop first.
The Zeus editor can highlight and fold HTML files, it integrates with HTML Tidy and can seamless edit files from the server via ftp/sftp.
It also has support for a host of other languages (i.e C/C++, C#, Java, Javascript, PHP, etc etc)

Why Emacs/Vim/Textmate? Isn't Xcode good enough?

Hi I mostly do C++, Objective-C programming. And I found Xcode plus an auto completion/macro plugin (Completion Dictionary) quite adequate.
However, all people seem to praise over their pure text editors. I tried Textmate for a bit; liked its simplicity but dislike its files/framework handling.
Am I missing something here? Or, do Vim or Emacs have auto-completion as good as Xcode?
Pull up a chair son, let me speak on this.
Well before the days of Xcode, there was VIM and Emacs. I know it's hard to imagine, but it's true.
Many people got accustomed to VIM/Emacs, and thus continue to use it.
Emacs is extremely customizable, and offers pretty much everything you can imagine (including a built in shrink and the towers of hanoi). You can easily call compilers from Emacs, and create your own extensions as needed.
VIM has incredible regex engine (Emacs does as well) and is very handy because (VI) comes with pretty much every Unix OS, and works fantastically if you don't have arrow keys (yeah yeah, real old school). People are very good with using keys to move around documents, without having to use the mouse.
The same is true with Emacs as well, but for me, I find cursor motion much easier on VIM.
The text editor war is fueled with as much religious zealotry as the Mac vs PC war, and the answer is pick the best that works for you. If you like Xcode, great, continue to use it, however good luck if you're ever forced to work on a PC or Linux machine. Personally, I use Emacs to code, VIM to manipulate text and Firefox to look at lolcats.
I really don't understand why emacs props up when people talk about text editors. In my experience it's more like eclipse (or one of those other platforms/IDEs) than vi because it is an environment, which happens to be good at text editing.
As an IDE emacs features version control, live compilation, spell checking, auto completion, debugging, code browsing and lots more for a wide variety of SDKs. For the rest of your computing needs it's an email/news/web/irc/twitter/xmmp client, calendar, organizer, calculator, terminal emulator, remote editing, speadsheets, games etc. etc. etc.
After Dijkstra: "Emacs is no more about text editing than astronomy is about telescopes"
What you are missing is that Emacs and Vim are actually IDEs.
vi is ubiquitous on UNIX systems, and Emacs almost so. AFAIK, Xcode is on one platform.
Having a powerhouse IDE is a great thing, but everyone should have a smattering of skill to keep them functional on any platform they might be dropped into.
It's all up to your preference.
Some people like to work with lightweight texteditors like (g)vim, emacs, pico, etc.
Others like to work with IDEs like MS Visual Studio, Eclipse, Xcode.
As long as your environment is compatible with the text editing technology, it's all up to you.
By the way, I like working with Eclipse and vim because they are what I used to learn programming ;)
The main reason you seem to think people like Emacs/Vim is for code completion. People like Emacs/Vim cause they are both MADE for editing text. You have control and options available to you that other editors just don't have. Once you get REALLY good at using one of these programs you want these key bindings / commands available everywhere. Macros, regular expressions, moving around by search/word/paragraph/function, interfacing with version control, complicated undo/redo and copy/paste functions and extension options are just a FEW of the things that these editors do really really well.
Code completion is just one of MANY things that can make writing programming easier. Emacs/Vim can handle ALL of them (natively or by exntensions).
No, not really. It's a matter of preference really. I liked working in Visual Studio 6, but nowadays the newer versions are just too bloated. So if I can do something outside VS I usually do it without opening the whole IDE box.
On windows I like notepad2 and gvim. I've customized vim to the point where it suits my needs perfectly, so I don't have to think about what and where.
But, it's good to mention that (you could also figure that out by yourself by reading these kinda posts) a lot of users uses vim/emacs/... 'cause of the heard-its-the-best/cool-factor/actual-usability. So if it doesn't suit you, don't use it. Nobody's gonna look you the wrong way cause of that.
For me most the two most important features are:
Emacs key bindings, as that is what my fingers are compatible to.
Open-source, for the freedom it provides. Being tied to one platform is anathema.
These days I mostly use Eclipse for programming (set to Emacs keybindings) and FSF Emacs for reading mail and some occasional LaTeX.
I personally love emacs. I've used vim and a handful of IDEs. Vim and emacs both have great communities where people are willing to code up features for just about any language. I don't know of any IDEs that, say, support Haskell. It all depends on what's important to you. Both have extension languages, though IMO, emacs lisp is the better of the two. The ability to ignore the mouse is the main thing I like as well. So many IDEs also feature emacs and vim compatibilty modes or extensions. They both have a large time investment, but both are worth it. Sooner or later, you will choose which suits you, vim/emacs/IDE, and then stick to improving your skills with it.
When you are using Emacs, you can install Cedet or Autocomplete package to use name completion for some languages (C++ is pretty good, while Obj-C is still not supported), in addition to rich editor functionality
emacs is powerful. I use emacs with vimpluse.el so that I can use the vim key bindings with all the emacs features.
I use Vim mostly for the input model. Once you have become proficient in the input model, going back to an editor where you are forced to use a mouse feels clumsy and ultimately (at least to me) irritating. It is a lot more efficient to type "ci'" to alter all the text between two single quotes, then taking your hands off of the home row, finding and selecting the text with the mouse and finally hitting 'delete'.
I have only used Emacs briefly and while I prefer Vim, I am jealous of some of its features. But I ultimately went with Vim because I find the chord-input model that Emacs uses to put unnecessary strain on my fingers.
I have Xcode and TextMate and I don't use them although I know they can be very powerful. Instead I use Vim (or MacVim if you prefer). Why ?
Because it's light, fast, addictive, powerful, customizable...
I could go on like this for a long time but the most important thing is that I can do all I want with Vim.
Whatever the editor you use, the best editor is the one you master (almost) perfectly.
I don't use vi to do my coding; however, I do, when available, use vi emulation in my editors. When I am doing Java coding in IntelliJ I use the IdeaVIM plugin which gives me vi support in IntelliJ's editor. This means I almost never have to take my fingers off of home row. I navigate with the keyboard (h,j,k,l), cut/paste with yy, dd, etc. And of course when I do need the power of a full feature GUI editor vi emulation doesn't keep me from using those features.
It drives me nuts that XCode doesn't have vi emulation in its editor. Seems like functionality that any decent IDE should have.
TextMate just feels lighter to me. Off the top of my head:
It has great support for jumping between files and methods within files. Think Quicksilver for files/methods. With a file open for editing, hit command-shift-t to bring up a floating panel listing all the methods in the file. Start typing and the list filters itself down. Select the method you want and hit return to jump to it. Xcode has something like this but the sting matching is more literal.
Lots of built in text expansion. Type a trigger and hit tab to have it expanded. For example, on a new line typing m and then hitting tab creates a method for you. The tab key then intelligently jumps to the various parts of the inserted text so that you can edit them in place. These are such a huge timesaver it's ridiculous.
Nice plugin support for Subversion and Git. Probably other VCSs too.
Completions (like Xcode) and history. TextMate allows you to tab-complete basically any text that exists in the file. So once you type a variable name or method call once, you can use tab to auto-complete it anywhere in that same file.
Smart past board with history, nice built in diffs, theme support, good keyboard support, find in files and across projects (with RegEx) and probably more that I'm forgetting.
Anyway, that's enough from me.
Personally, I love TextMate, because it's actually a really lightweight solution. Granted, I have not used Vim or Emacs in depth (I like my GUIs)...although I do thoroughly enjoy the Control-based cursor navigation (Control-A is beginning of line, Control-E is end of line, Control-F and Control-B are forward and backward, etc). So between Xcode and TextMate, I use Xcode for most of my serious development, but if I just need to quickly edit a source file I can be up and coding before Xcode even finishes launching (it helps that TextMate can remember which files were previously opened and restore them). So for some lightweight text editing, TextMate is my choice.
Above that, TextMate's plug-in support is amazing; it provides full support (syntax coloring, building & running, etc.) for so many different things (shell scripts, CSS, SQL, LaTeX, and much more) that Xcode doesn't provide. When I need to brush up a quick program in Java or tweak a webpage, it's a lot easier then using Vim and then building from the Terminal.
My only complaint with TextMate is that the console is read-only, so I can't build anything interactive. That, and the fact that it doesn't seem to support C99 keywords (for loops and booleans) in a plain-C file.
I am a long time vim user, and find that I really like Komodo edit with the Vim emulation turned on. Thus, I get all of convenience of the vim key bindings (to which I have become so accustomed that a recent MS Word document that I recently produced had no less than three ":w"s in it) plus the well implemented code completion for C++, Python, javascript, etc.
I don't use XCode because I don't develop OS X specific applications very much and so the benefit of the OS X framework integration isn't large enough to outweigh the cost of not having vim key bindings and the "do it our way or not at all" approach that Apple takes toward development.
Xcode is more of an IDE, whereas emacs and vi are for pure text (though they have massive extensions to them). This is preferable if you're on an older system or over an SSH. In addition, they're pretty much on every UNIX based computer, whereas XCode is proprietary Apple software.
You might have a look at my essay on the subject Why Emacs?. While it's more or less Emacs-centric some of the points made in it would apply to vim and TextMate as well.
I tried vim a long time ago and for one reason or another "I didn't get it". Then after trying other editors over the years I reached a point where no editor seemed to do what I wanted it to do. After voicing my frustration to a friend he recommended that I try vim....and I am so glad that I took another look because it was the answer to a question that I didn't know how to ask! I have used Vim/MacVim ever since...
here my configuration:
https://github.com/RandyMcMillan/QuickVim
I use Xcode as well because it is nice to have code completion.
XVim is good for people that want a modal/vim feel in the Xcode editor:
https://github.com/JugglerShu/XVim
But when it comes to my day to day editing Vim wins every time. That is why I have the QuickVim repo is so that I can quickly reproduce my environment anytime/anywhere.
I have a list of licenses for editors like TextMate, etc..but it is likely that I won't ever use them since I can use vim for free and customize it to my exact specifications.
Heavy Vim user here. I generally find the text manipulation capability of Vi/Vim far superior than traditional editors which lack things like:
visual mode: e.g. prefixing 5 lines with comment //
macros: e.g. surround 3rd to 5th words in a line with quotation marks, repeat for 100 lines
multiple registers: think 36 registers to copy and paste
delete{motion}: e.g. delete from cursor up to the next occurrence of 'initWithFrame'
These are just a few examples that Vim has XCode text editing beat hands down
For Objective-C. I tend to install a Vim plugin on the IDE to get the best of both worlds - native build / UI components support.
Incidentally. Emac keyboard bindings (e.g. CTRL-A to go to top of line) are supported in a lot of native (Coacoa) text fields on Mac. Including the one you're using for typing answers on stackoverflow :D
XVim works with XCode. IdeaVim for AppCode

Does a language-specific IDE have any advantages over a plugin for a multi-language IDE?

I do mostly Java and C/C++ development, but I'm starting to do more web development (PHP, Rails) and Eiffel (learning a new language is always good).
Currently, I use Eclipse for Java, C/C++, and Ruby (not Rails). Since I know the environment, I'm thinking that it would be easier for me to find a plugin and use Eclipse for all of my development languages. But are there cases where a language-specific IDE (EiffelStudio for Eiffel, as an example) would be better than Eclipse?
I have used many many IDE's and in most cases to me it breaks down to personal preferences. Sometimes the language specific ones have some addins/addons/features that are nice but unless they are things you can not live without you should go with what is most comfortable for you.
I would think that if you are comfortable with the multi-language IDE it would be better to stick with that one. This way you dont have to memorize multiple IDE layouts, keyboard shortcuts etc.
Mastering an IDE takes time and energy. Using a multi-language IDE is definitively beneficial for a programmer who needs to develop in several languages. It is for the same reason that tools like VI and Emacs are so popular.
On the other side, IDE specialized in one language could sometimes go much further on some aspect and could be the preferred choice in some situations.
I love Eclipse as Java IDE (so much that we decided to build some Eclipse based application) and I'm an Emacs fan. But I also like the Groovy support of IntelliJ and the efficiency of EiffelStudio.
It's a matter of taste, you forgive the ones you love...
It entirely depends on the user and the language itself, if you are comfortable with the keyboard shortcuts then you can consider the plugin else you can go for a IDE . However most of the IDE comes with a cross-functional key maps so you use the key maps which u are more comfortable with....