Forth editor/customizable editor - macos

I'm looking for an OS X editor (preferably a dedicated Forth editor, but I doubt it exists) that has/can be customized to change the font color of Forth variables, programs, etc. If not, is there any sort of workaround?

I know it's an old question, but: atom with the forth-language package. See http://atom.io/
Longer answer:
I have tried both emacs and atom on Mac OS X and both are more than adequate for editing Forth. Atom is lighter and easier to learn while maintaining many emacs-ish capabilities (cmd-shift-p in place of meta-x).
I don't have automatic indenting working in atom yet, the syntax package I found needs a little work, but this hasn't been a real problem as yet.
atom also plays well with git.
I'm using the following packages: emacs-plus, language-forth, clipboard-plus, disable-arrow-keys. The key and clipboard are for a more emacs like experience. There are more themes and color schemes than I need available, I'm using the 4-color-dark and minimal-syntax themes.

UltraEdit has a Forth syntax highlight mode. MicroProcessor Engineering have an up to date copy in there downloads page.

Look no further !!
I'm currently programming in FORTH using the 'Visual Studio Code; editor.
Has (installable) syntax-highlighting for many languages, including FORTH.
Have a try:
https://code.visualstudio.com/download
It has even automatic indenting, AND code folding!!
...and let me know if you like it like I do.
Robbert / PA3BKL

I would suggest Gedit and if you change the forth.lang in the app you can change the syntax highlighting

Related

Customize syntax highlightin in canopy

I just installed Enthought Canopy in a freshly (clean) installed Mac OS X Mountain Lion. So far, it seems to run stable and fast. My only problem is that I want to customize the syntax highlighting of both the editor and the console. There are no preferences to allow for that what I find quite strange because the embedded editor is just Editra, a highly customizable editor. I want to:
Editor. As I was using Editra before, where can I place my old style file (.ess) for the syntax highlighting such that it will overwrite the default one?
Interactive window. How do I dissable the syntax highlighting from the interactive window? I tried the magic function "%colors nocolor" but this makes nothing. I saw there is a monochrome theme for the editor, but I want a Dark brackground with no syntax highlighting.
Thanks.
Glad you're finding Canopy useful.
Neither of these options is supported at this time. Canopy is designed to be an easy-to-learn environment, with relatively few configuration options, primarily for scientists, engineers, and analysts, rather than for professional developers who usually already have an editor of choice. We will slowly add features when there is a strong demand and/or use-case for it.
FWIW, Canopy does not embed Editra, though it does use the same syntax highlighting toolkit as does Editra (Pygments).
It appears the answer is.... Not Yet.
I usually insert a lot of comments into my python code, and COLOR ALL #COMMENTS LIGHT GRAY, so they are not so distracting from the main logic, but have been unable to do that in Enthought Canopy. Too bad. Hopefully this ability will be added soon.

wxpython program mirrors individual letters horizontally. how?

i'm running Boa Constructor, an old wxpython gui builder.
today, the program decided to play tricks and switched all its GUI from right to left.
far worse, when i'm editing text inside the program, each letter is reveresed.
What part of windows does font mirroring?
How to disable letter mirroring?
why a program i used for several years suddenly thinks i need spanish internationalization? nothing in my computer is set for spanish.
how can I program this behavior myself (i don't really care, just curious. any programming language solution is ok here)
i'm asking several questions together because it seems somehow related.
my settings:
windows xp, (English interface setup!)
python 2.5.4
wxpython 2.8.11
All other Windows programs are left to right,
regional settings are for hebrew, israel
I don't know what you did, but you might want to check out the following instructions for enabling RTL: http://www.tavultesoft.com/kb/?id=41 and then see if you can reverse it.
I know wxPython can do internationalization. See http://wiki.wxpython.org/Internationalization and http://wiki.wxpython.org/RecipesI18n for information on that. Basically it involves .po and .mo files, which I doubt you can accidentally create. That's a weird issue.

Simple Ruby Editor?

This editor isn't intended for me. It's intended for teaching someone else Ruby. I largely use Emacs when writing Ruby. Does anyone know of an editor that
indents the current line correctly when you press tab,
can indent the whole file correctly (keyboard shortcut would be nice),
has syntax highlighting for Ruby,
other than that works kind of like Windows Notepad (maybe with a toolbar of icons),
has a built in terminal (not absolutely required),
has multiple editor tabs,
and works on Windows, Linux, or both?
Or anything somewhat close?
Edit:
I'm also going to add that I'd like to be available for free (legally for an indefinite period of time). Open source wouldn't hurt.
Check Notepad++
I don't think that jEdit has a built-in terminal, but I believe it does everything else you need. It's implemented in Java, so it should run on any platform for which a JVM exists, including Windows and Linux.
Since it's about teaching ruby RedCar and Diakonos are good choices. They have most of the features you mention and as a bonus both are written in Ruby.
If you are not a die hard fan of emacs, then there's always vim and its plugins for any programming language. Here's one for Ruby: rails.vim : Ruby on Rails: easy file navigation, enhanced syntax highlighting, and more
If you are new to vim, this cheat sheet should help you: vim graphical cheat sheet
I like gedit - it doesn't have a terminal, but should work fine for the other requirements. It can run on Windows with Cygwin.
For a full-blown IDE, Aptana Studio is great. It meets your requirements.
If your main goal is to teach then you could try using Hackety Hack. It is somewhat weak at times, but I found it fun and simple to use, but then again I already knew ruby pretty well.
For a beginner being able to run the programs easily is very important so you want something where irb and ruby can be run very simply. Aptana seems to be a pretty good IDE for this sort of thing, but I have never used it myself aside for web development.
Aside from those two I suggest Notepad++... Also the free KomodoEdit might be worth a look. Personally I say teach the other person emacs, but then again shrug

How can I print syntax-highlighted Ruby code?

I use TextMate for my Ruby editing, but when printing files, the code isn't syntax highlighted. Are there any good programs for printing out well-formatted color-highlighted Ruby code?
A good solution which I use is to print from TextMate via vim which gives you a syntax-highlighted and line-numbered result (or however you choose to configure it.) In addition to vim it requires ps2pdf but these are easy to install with macports etc.
The only limitation is that the file needs to be saved first.
See this page, which shows how to set up the macro as a TextMate 'command'.
I don't know if it's relevant in Mac-world, but the SciTE editor that's bundled
with the one-click installer for Windows prints nicely in colour on our HP Laserjet. I haven't tried printing from any of the various IDEs - I ought to try it.
I'd probably use Ultraviolet to create an HTML file that's syntax-highlighted to print out...
The syntax gem is pretty awesome.
require 'hpricot'
require 'syntax/convertors/html'
def filter_content(content)
h = Hpricot(content)
c = Syntax::Convertors::HTML.for_syntax "ruby"
h.search('//pre[#class="ruby"]') do |e|
e.inner_html = c.convert(e.inner_text,false)
end
h.to_s
end
Edit: Oh, you are referring to printing... Well you could do convert it to HTML and then print it from your browser.
Apparently it is difficult to communicate to the printer that a *.txt-equivalent file needs to be colorized but it obviously can be done. TextMate's creator has communicated simply that he doesn't think it is important enough of a feature to have which basically means it is extremely difficult to implement.
Aptana can do this thing no problem but it takes forever to load.
Enter vim. vim is probably already installed on your computer.
vim filename.m
:syntax on
:hardcopy
Again, there won't be any prompt for which printer to use, so make sure your system's default printer is set correctly.
If you had to use the :syntax on command to get vim to colorize your code:
To set vim by default to do syntax-based coloring:
nano ~/.vimrc
syntax on
save & quit
Thanks, boulder_ruby
A couple of additional points at the end of 2016 (2 years 10 months later):
If you're on Windows, you cannot count on VIM being already installed. Membership in Stack Overflow does improve the odds, but probably not to 90%). However VIM for Windows is easy to get. www.vim.org/download.php
Macs come with MacVim by default.
On a Mac, using MacVim, following your advice, I carefully set the default printer to one where I could empty the queue before wasting paper on testing.
Then I used the :hardcopy VIM command. The printed version went straight to PDF and opened in Preview. It never showed up in the default printer queue.
Also, edavey above points to http://biztos.blogspot.com/2008/06/printing-with-textmate-vim-and-friends.html which contains a link to the TextMate Help page on printing. The TextMate help says:
There are plans to improve the printing capabilities, but until then,
there is also a command in the Source bundle (View Source as PDF)
which produces a PDF from the current source using enscript and has
syntax highlighting enabled for supported languages.
That suggests (I haven't figured it out the "Source bundle" yet) that you can go straight to PDF, with syntax coloring, from TextMate. If I figure that out, I'll add something here (eventually).
I hope this helps.

Ruby and linux, preferred setup?

Mac's have TextMate as there preferred application for ruby development, but what would be the preferred application for linux? I need something where it's easy to work with multiple files, project structure and setup commands to run my ruby app or if it is one my merb app.Syntax highlighting is also a must.
Now I typically use Vim, but it's not the best for working with multiple files or with a project structure, even with VTreeView plug-in or multiple VIM windows.
So what would you guys suggest?
If you have better plugins to use for VIM feel free to mention them, I'm not ruling out VIM here.
I use Vim on both Windows and Linux for development in Rails (we have to use Windows in work, and I only use Linux at home). The environment is almost exactly the same for both platforms. Especially important for me is easy navigation between the various Rails components - from Controllers to views, partials and models, and quick navigation to test files.
Here are the plugins I use:
Vim Rails by Tim Pope. The :R, :A and gf commands are the ones I use mostly for navigation.
NERDTree for a project/explorer view.
NERDCommenter for easy multi-line commenting.
FuzzyFinder and "FuzzyFinder - Textmate" - allows you to quickly find files based on portins of a file name.
Ctags
Bufexplorer
dbext for executing SQL commands and getting the results in a Vim buffer.
Ack and the ack plugin for a better grepping experience from within Vim.
VividChalk colour scheme.
RubyMine from JetBrains.com works well for Mac/Linux/Windows, the price is 99$ but it's probably the most productive IDE for Ruby and Rails I have tested so far.
Setup Gedit to be almost like Textmate
Aptana with the Rails plugin is pretty good.
If you are on Ubuntu/Debian, plain old emacs with ruby-elisp package isn't bad. It's no TextMate, but it's not bad.
I prefer Netbeans on both linux and Mac
+1 for Netbeans for Rails. Each release gets better and better and with 6.7 beta it's better yet. Using it on Windows and Mac -- under Linux it's what I'd use as well.
Since you are a vimmer, have you looked at this? I have no experience with it, but looks quite good in the screencast.
Why don't you just use Sublime Text 2 Text Editor, it is free and cross platform and lighter than any IDE, and then you can install the SublimeCodeIntel which will provide you with autocomplete features , you can do that through installing Package Control , then
⌘+shift+p → “install” → ENTER → “codeintel” → ENTER → Restart ST2
It is working perfectly with me and I'm totally in love with this smart editor .
You can find this helpful somehow if you wanna give it a try , http://www.rockettheme.com/magazine/1319-using-sublime-text-2-for-development
I'm using it with zsh Terminal http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/
Anyways if you are looking for a full IDE give netbeans a try http://netbeans.org/projects/ruby/
I prefer Aptana/RadRails on both Mac and Linux. It gives a consistent experience for me no matter what OS I'm on.
I still don't get the excitement over Textmate...
Given that you use vim, this post might be interesting.
Her is the Fuzzyfinder Textmate vim plugin that the post refers to.
Aptana Studio is indeed very nice. Also Gedit does the job if you don't want a full IDE environment and are more inclined to do stuff by hand :).
The other answers are about ruby editors, so I thought I will add an answer on my linux setup.
I use Ubuntu with VM player (free) on top of windows 7. I dedicate 2 core and 2 GB to the vm. Benefit of using the VM on top of windows is that I can use linux just for development and windows for everything else. Skype, webex, and team viewer works in windows, but i find them to be flaky in linux. Also I use office once in a while, very easy on windows.
I have been using GMATE for a while and I can say that I only need gnome-terminal to complete my ruby/groovy/python setup. It have themes imported from textmate and do some method/property code completion (not much ok? but it comes handy).
Edit: forgot to say that GMATE is a set of plugins for Gedit (default text editor on gnome)
With Linux there are 3 really good IDEs and all are free. You have Eclipse, Netbeans, and Aptana... They are all very good and each have some benfits over the other, its more a matter of preference. I would suggest downloading all 3 and giving them a try to see which you prefer.

Resources