Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>the source on github now include a vim highlight module.</p> </blockquote> <p>I've found just doing what is suggested here is not enough:</p> <ul> <li><p>download the file as Francisco suggests</p></li> <li><p>unzip, <code>cd Tools/</code> dir</p></li> <li><p>run the shell, <code>sh install-tools</code></p></li> <li><p>copy the objj.vim file to vim dir, <code>cp Tools/Editors/objj.vim /usr/share/vim/vim71/syntax/</code> </p></li> </ul> <p><strong>Problem</strong></p> <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> <p><strong>Add Objective-J to gvim menu</strong></p> <p>To add a menu-item in gvim for Syntax->Ne-MO->Objective J: </p> <ul> <li><code>sudo vim /usr/share/vim/vim71/synmenu.vim</code></li> </ul> <p>add the following line.</p> <ul> <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> </ul> <p>save and quit</p> <ul> <li><code>:wq!</code> </li> </ul> <p>then reload a ".j" file in gvim. If you then go:</p> <ul> <li><em>Syntax->Ne-MO->Objective J</em></li> </ul> <p>highlighting for your selected Objective-J file should occur.</p> <p><strong>Objective-J auto-highlighting?</strong></p> <p>But what about auto-highlighting when you load the file? There appears to be no file associations. So:</p> <ul> <li><code>sudo vim /usr/share/vim/vim7.1/filetype.vim</code></li> </ul> <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> <ul> <li><code>"" Objective J au BufNewFile,BufRead *.j setf objj</code></li> </ul> <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> <p><strong>Result</strong></p> <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>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload