Monkey-VIM
Monkey Archive Forums/Monkey Discussion/Monkey-VIM
| ||
I created a vim syntax file for monkey. This is how it looks using the 'blue' color scheme: UPDATE https://github.com/michaelcontento/Monkey-VIM michaelcontento has an improved fork with extra features: - Pathogen / Vundle compatible - Proper indentation definition - Auto capitalization of keywords (by minke) - Basic CTags support (minke) Have fun... |
| ||
nicely done! |
| ||
Noooooooooooooo now you'll make me want to use gVim for it! D: |
| ||
Here are some commands to put in your .vimrc to compile and run your code: map ;1 :exe ":!trans_winnt -target=html5 -run " . getreg("%")<cr> map ;2 :exe ":!trans_winnt -target=glfw -run " . getreg("%")<cr> map ;3 :exe ":!trans_winnt -target=android -run " . getreg("%")<cr> I use these for my default project: map ;0 :exe ":!trans_winnt -target=glfw -run c:/path/to/main.monkey"<cr> map ;00 :exe ":!trans_winnt -target=html5 -run c:/path/to/main.monkey"<cr> The directory containing trans_winnt.exe has to be in your PATH, but you could hardcode that one also. Now all you have to do is: ;0 to compile your default project for your default target :) |
| ||
Hey, fantastic! |
| ||
what advantages does it have over Monk? |
| ||
what advantages does it have over Monk? For you? None at all. Unless you are willing to learn a whole new (or rather old) way of editing, better stay away from it. It harks from the days long before mice or even desktops were the norm... |
| ||
Dude you rock!!! Now I can go back and use MacVim! |
| ||
before mice or even desktops were the norm... I like my mouse/keyboard interface :) |
| ||
Someone should do an Emacs syntax file. Everyone know Emacs is better than vim ;p Cheers Charlie |
| ||
@charlie Someone should do an Emacs syntax file. Everyone know Emacs is better than vim ;p Does Emacs have an editor yet? Last I heard it was an operating system. ;) |
| ||
Having something that provides a code structure window and an intellisense ala CTags would be awesome. I use something like this for PHP, maybe is it possible to adapt for Monkey. Vi is great for a lot of manipulations. And I hate C-X C-anything. |
| ||
I made a plugin that auto-capitalizes keywords outside comments and strings; like Monk. Eg "global var:int" becomes "Global var:Int" as you type. Use ^Xu to undo the capitalization. Very good for the pinky. Install (Unix) Paste the code in ~/.vim/ftplugin/monkey.vim (create directory if needed). Not sure where to host so I'll just post the code |
| ||
@minke: As rawsource does not seem to be pretty active on this .. would you add your addition to this active fork of rawsource/Monkey-VIM? It's basically rawsource/Monkey-VIM but ... * .. Pathogen / Vundle compatible * .. contains a proper indentation definition |
| ||
Ok I didn't know about that repo, I'll make a push request tomorrow. I also implemented basic CTags/Tagbar support, but it needs a language definition in ~/.ctags, so it won't fit in a plugin I think. |
| ||
very cool and thanks in advance! :) |
| ||
great stuff michaelcontento and minke, i updated the first post to point users to your fork. @minke: i'm very interested in your CTags definition. I'll try to update the syntax definition with all the new keywords/classes/methods this weekend. |
| ||
Sorry guys, the capitalization also happened outside .monkey files! I made new pull request that fixes this. Also added basic tagbar support. I think it's better than taglist. Unfortunately there is no scope detection (methods and field don't show under their corresponding classes). @arcsrc: you can generate tags with "ctags --options=MONKEY_VIM_PATH/ctags/monkey.cnf -R ." Now it just needs SnipMate snippets and compiling in a vsplit buffer. Vim can be the best editor for Monkey :) |
| ||
This is an old thread, but as a long time Vim user, I appreciate all work done with Monkey-Vim! :-) I manage to generate a tags file using the syntax mentioned by Halfdan above. However, how do you set up tagbar to work? I guess I need to set g:tagbar_ctags_bin in my .vimrc to something, but I am not sure exactly what. I need to point out the ctags binary of course, but I also guess I need to point out the monkey.cnf file too, or? Any hints are welcome! |