Cannot get indent plugin to work when put in ~/.janus folder

280 views
Skip to first unread message

Carl Erik Kopseng

unread,
Dec 3, 2013, 11:32:43 AM12/3/13
to janus-...@googlegroups.com
Since the default indentation for javascript in Vim is terrible I would like to install a better indentation script by Preston Koprivica. From what I can remember from the time I used it before starting to use janus, it was pretty easy to get it working, but I cannot seem to get it working with Janus.

According to the README, one should customize Janus by adding plugins to the ~/.janus folder. If I try to add the 'web-indent-read-only' folder to the ~/.janus folder nothing seems to get picked up. 

I don't know much about the inner workings of vim, but is the process different for indentation scripts, as opposed to plugin scripts?

Matthew Holden

unread,
Feb 27, 2014, 12:43:23 AM2/27/14
to janus-...@googlegroups.com
Were you able to get anywhere with this?

I've got a similar situation where I want to customize JavaScript with: 

a) use that custom indent script, and 
b) use a different syntax highlighter script   https://github.com/jelera/vim-javascript-syntax

I can't figure out how to use a different syntax highlighting when vim already includes a javascript.vim.   When vim loads, it is finding the bundled javascript.vim before it finds my customized syntax highlighting.

Any suggestions?
Message has been deleted

Matthew Holden

unread,
Feb 27, 2014, 2:02:08 PM2/27/14
to janus-...@googlegroups.com
So, I have a solution that works for me. I haven't worked with it extensively, though, so I may have unknowingly broken something else.  

The 'customization' wiki page instructs us to add any plugins into a ~/.janus folder, pathogen-style.  Unfortunately, they weren't being sourced until AFTER vim's default javascript.vim.

I got around this by adding one line to "~/.vimrc.before":

call janus#add_group(".janus", expand("~"))
(This line is copied verbatim from janus/vim/core/before/plugin/janus.vim, line 119.)


I used this syntax plugin: https://github.com/jelera/vim-javascript-syntax.  My installation was simply:
$ git clone https://github.com/jelera/vim-javascript-syntax ~/.janus/vim-javascript-syntax

Like I said, my javascript plugins are now loading properly, which is fantastic!  But, I don't know if there are any negative side-effects of this brute-force approach.

Cheers,

Matt


On Thursday, February 27, 2014 4:27:28 AM UTC-8, Carl Erik Kopseng wrote:
Sorry, unfortunately no. So far this Janus thing has just made things more complicated for me, without any real gain.

Carl-Erik Kopseng

(+47) 40065078
skype: carl.erik.kopseng
blogg: oligofren.wordpress.com
##########################
Ser ikke skogen for bare syntakstrær


--
You received this message because you are subscribed to a topic in the Google Groups "Janus - Vimius" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/janus-vimius/7od0_OkLgKo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to janus-vimius...@googlegroups.com.
To post to this group, send email to janus-...@googlegroups.com.
Visit this group at http://groups.google.com/group/janus-vimius.
For more options, visit https://groups.google.com/groups/opt_out.

Wael M. Nasreddine

unread,
Feb 27, 2014, 2:50:12 PM2/27/14
to janus-...@googlegroups.com
It would be easier to
  1. Disable the Javascript plugin
  2. Clone the new one into ~/.janus
So starting from a fresh installed Janus

$ echo "call janus#disable_plugin('javascript')" >> ~/.vimrc.before
$ mkdir ~/.janus
$ git clone https://github.com/jelera/vim-javascript-syntax ~/.janus/vim-javascript-syntax

Let me know if that does not work.

Wael
You received this message because you are subscribed to the Google Groups "Janus - Vimius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janus-vimius+unsubscribe@googlegroups.com.

Matthew Holden

unread,
Feb 27, 2014, 10:59:46 PM2/27/14
to janus-...@googlegroups.com
Yup, that did the trick!  Thanks so much.
To unsubscribe from this group and stop receiving emails from it, send an email to janus-vimius...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages