nim-wiki/Editor-Support.md

84 lines
2.8 KiB
Markdown

If you add more editor support, don't forget to add it to the [FAQ](https://github.com/Araq/Nim/blob/master/web/question.txt) as well.
The following editors have some Nim support:
### Emacs
* https://github.com/reactormonk/nim-mode (requires emacs 24)
* https://github.com/jameshfisher/nimrod-mode (works with emacs 23 too, as of 2014-02-15)
### Vim
* https://github.com/zah/nimrod.vim/
* Syntax Highlighting
* Auto-indent
* Build/Jump to errors within Vim
* Project Navigation and Jump to Definition (using the Ctags support listed below or [Nimrod's idetools](http://build.nimrod-code.org/docs/idetools.html) command)
* http://gradha.github.io/articles/2014/02/invoking-dash-from-the-command-line-vim.html
Instructions to map Vim's ``K`` letter to look up documentation under MacOSX using [Dash](http://forum.nim-lang.org/t/330).
### Scite
Recent versions of Scite have out-of-the-box support for Nimrod. For older versions: <br />
http://sourceforge.net/p/scintilla/scite/ci/default/tree/src/nimrod.properties?format=raw
### Aporia
Aporia is a Nim IDE written in Nim.
https://github.com/nim-lang/Aporia/
### LightTable
https://github.com/zah/nimrod.lt/
### Atom
https://github.com/zah/nimrod.atom/
### Gedit/Other GtkSourceView editors
There is a .lang file for gedit [here](https://github.com/nim-lang/Aporia/blob/master/share/gtksourceview-2.0/language-specs/nimrod.lang)
### Geany
There is a [pull request](https://github.com/geany/geany/pull/193) to provide Nimrod support in [Geany](http://www.geany.org).
### Ctags
Basic ```~/.ctags``` rules for Nim code (Feel free to improve and contribute)
Don't use this if possible, [Nim idetools](http://nim-lang.org/idetools.html) provides better results.
```
--langdef=nim
--langmap=nim:.nim
--regex-nim=/(\w+)\*?\s*=\s*object/\1/t,class/
--regex-nim=/(\w+)\*?\s*=\s*enum/\1/t,enum/
--regex-nim=/(\w+)\*?\s*=\s*tuple/\1/t,tuple/
--regex-nim=/(\w+)\*?\s*=\s*range/\1/t,subrange/
--regex-nim=/(\w+)\*?\s*=\s*proc/\1/t,proctype/
--regex-nim=/proc\s+(\w+)/\1/f,procedure/
--regex-nim=/method\s+(\w+)/\1/f,method/
--regex-nim=/proc\s+`([^`]+)`/\1/o,operator/
--regex-nim=/template\s+(\w+)/\1/t,template/
--regex-nim=/macro\s+(\w+)/\1/m,macro/
```
### jEdit
https://github.com/exhu/nimrod-misc/tree/master/jedit
### Sublime
* https://github.com/Varriount/NimLime
**NimLime** is a Sublime Text plugin that supports:
* Syntax highlighting
* Go to definition
* Error checking and highlighting through the compiler
* Completion suggestions though the compiler
* Babel package manager interaction
* https://github.com/leonardoce/nimrod-sublime
### Kate
Syntax highlighting:
https://github.com/PhilipWitte/NimKate
### TextMate
Available from the bundle installer in preferences ([repository](https://github.com/textmate/nim.tmbundle)).