<p>I have been looking at the new <a href="http://cappuccino.org/" rel="noreferrer">Objective-J / Cappuccino</a> javascript framework from <a href="http://280north.com/" rel="noreferrer">280North</a>.  They provide plug-ins for SubEthaEdit and TextMate to handle syntax highlighting, but I primarily use vi.  Does anyone know of a way to get Objective-J syntax highlighting in vi, or a good way to convert whatever format the other two editors use?</p>

[{'answer_id': 49769, 'author': 'Claes Mogren', 'author_id': 4992, 'author_profile': 'https://Stackoverflow.com/users/4992', 'pm_score': 1, 'selected': False, 'text': "<p>If regular javascript syntax highlighting is good enough, you can map that to .j files by adding something like this to your .vimrc file:</p>\n\n<pre><code>   augroup objective-j\n   au! BufRead,BufNewFile *.j set filetype=objective-j\n   au! Syntax objective-j source /usr/share/vim/vim71/syntax/javascript.vim\n   augroup END\n</code></pre>\n\n<p>I haven't tried this exact code, but did something similar when mapping C# syntax to .vala files on my Linux machine. (NOTE: The javascript.vim file might be located somewhere else on your computer.) You could of course make a objective-j.vim file based on that javascript.vim syntax definition instead of using it as it is.</p>\n"}, {'answer_id': 65731, 'author': 'Francisco Ryan Tolmasky I', 'author_id': 49733, 'author_profile': 'https://Stackoverflow.com/users/49733', 'pm_score': 4, 'selected': True, 'text': '<p>The Objective-J Tools package (<a href="http://cappuccino.org/download" rel="noreferrer">http://cappuccino.org/download</a>) and the source on github now include a vim highlight module.</p>\n'}, {'answer_id': 613550, 'author': 'bootload', 'author_id': 2092, 'author_profile': 'https://Stackoverflow.com/users/2092', 'pm_score': 3, 'selected': False, 'text': '<blockquote>\n  <p>the source on github now include a vim\n  highlight module.</p>\n</blockquote>\n\n<p>I\'ve found just doing what is suggested here is not enough:</p>\n\n<ul>\n<li><p>download the file as Francisco suggests</p></li>\n<li><p>unzip, <code>cd Tools/</code> dir</p></li>\n<li><p>run the shell, <code>sh install-tools</code></p></li>\n<li><p>copy the objj.vim file to vim dir, <code>cp Tools/Editors/objj.vim /usr/share/vim/vim71/syntax/</code> </p></li>\n</ul>\n\n<p><strong>Problem</strong></p>\n\n<p>I found no syntax highlighting worked for ".j" files. So the problem here is no file extension recognition. If you are using gvim as I am there is also no menu item. </p>\n\n<p><strong>Add Objective-J to gvim menu</strong></p>\n\n<p>To add a menu-item in gvim for Syntax->Ne-MO->Objective J: </p>\n\n<ul>\n<li><code>sudo vim /usr/share/vim/vim71/synmenu.vim</code></li>\n</ul>\n\n<p>add the following line.</p>\n\n<ul>\n<li><code>an 50.70.465 &amp;Syntax.Me-NO.Objective\\ J :cal SetSyn("objj")&lt;CR&gt;</code> below the objective-C entry.</li>\n</ul>\n\n<p>save and quit</p>\n\n<ul>\n<li><code>:wq!</code> </li>\n</ul>\n\n<p>then reload a ".j" file in gvim. If you then go:</p>\n\n<ul>\n<li><em>Syntax->Ne-MO->Objective J</em></li>\n</ul>\n\n<p>highlighting for your selected Objective-J file should occur.</p>\n\n<p><strong>Objective-J auto-highlighting?</strong></p>\n\n<p>But what about auto-highlighting when you load the file? There appears to be no file associations. So:</p>\n\n<ul>\n<li><code>sudo vim /usr/share/vim/vim7.1/filetype.vim</code></li>\n</ul>\n\n<p>In the file you will find a list of filetype associations. If you want an idea where to add the line, search for "<em>setf ocaml</em>" in filetype.vim. Add the line below above (alphabetical):</p>\n\n<ul>\n<li><code>"" Objective J   au BufNewFile,BufRead *.j                 setf objj</code></li>\n</ul>\n\n<p>Save the result. You should now be able to load a file with a ".j" extension and syntax highlighting for Objective-J files works. </p>\n\n<p><strong>Result</strong></p>\n\n<p>Now you should get automatic recognition of the Objective-J files by file type ".j" and a way to set this filetype in gvim. This probably should be added by Bram or whoever does the official release of vim but for the moment this hack works for me. (Ubuntu 8.10, Vim 7.1) </p>\n'}, {'answer_id': 3694887, 'author': 'Rafael Bugajewski', 'author_id': 133166, 'author_profile': 'https://Stackoverflow.com/users/133166', 'pm_score': 3, 'selected': False, 'text': '<p>Here is another way to add Objective J highlighting with automatic file detection to (Mac)Vim and it is a lot cleaner and shorter than bootload’s version (it won’t add a menu to MacVim, but I don’t need it at all):</p>\n\n<ol>\n<li>Download the objj.vim file Francisco mentioned.</li>\n<li>Place it into <code>~/.vim/syntax/</code> (create folder if necessary)</li>\n<li>Add the line <code>au BufNewFile,BufRead *.j setf objj</code> to <code>~/.vim/filetype.vim</code></li>\n<li>Do not forget to turn on filetype detection in your <code>~/.vimrc</code> configuration file: <code>filetype plugin on</code></li>\n</ol>\n'}]
['https://Stackoverflow.com/questions/49699', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3078/']