Per-directory settings
wwp
subscript at free.fr
Wed Aug 30 00:02:12 CEST 2006
Hello Thorsten,
On Tue, 29 Aug 2006 23:50:23 +0200 Thorsten Haude <yoo at vranx.de> wrote:
> Hi,
>
> * wwp wrote (2006-08-29 23:34):
> >On Tue, 29 Aug 2006 21:39:22 +0200 Thorsten Haude <yoo at vranx.de> wrote:
> >> * wwp wrote (2006-08-29 21:26):
> >> >Q: and what about checking filename + '/../.neditrc' for the vim
> >> >modelines instead of filename itself (rude way to do
> >> >dirname(filename)+'/.neditrc'? Wouldn't this (roughly, but you get the
> >> >idea) allow to use per-directory modelines instead of per-files?
> >>
> >> The file open hook will always be called for the just opened file.
> >> But you could probably do something like this in the hook:
> >> load_macro_file($file_path "/.neditrc")
> >
> >Exactly what I was thinking of!
>
> Make sure to check whether that file exists.
Thanks for the tip.
> >> Modelines are in the file in question. I don't think it would make
> >> sense to change their specification unless you can convince the Vim
> >> guys to change theirs.
> >
> >I don't want to touch vim things, but maybe to use a new .neditrc
> >or a personal .foobarmystuff file (whose contents is vim-like) to use w/
> >your macros (slightly modified).
>
> You don't have to use Vim modelines in any files you make up yourself,
> just use the macro commands privided anyway. Vim wouldn't find your
> personal .foobarmystuff anyway.
Yes I see. I've looked into the detail of your macros and seen that obviously
I can use the same idea to open a per-dir file, w/ arbitrary contents. Why
not vim modelines heh, as vim uses .vimrc, I can make a modified macro to use
that files too. That interoperability could matter, one day.
> Modelines are useful for in-file commands, and (as far as NEdit is
> concerned) for little else. I like the idea in general and even wrote
> a patch providing native NEdit modelines (SF#825213), but I don't
> think we need a third set of cryptic commands in every file.
>
>
> If you modify my macros, please let me know of any improvements you
> come up with that would also apply to my versions. Also, please let me
> know of any other problems you have with the patched version.
I'll let you know what I'll modify, of course!
> >> >Also, I tried to apply enhanced.2005-11-24.1.diff.gz to current CVS
> >> >sources, but many hunks fails.
> >>
> >> This patch is pretty old, use the latest. (Which is the only one with
> >> the hook anyway.)
> >
> >lol I'm blind. Of course I've taken the one at bottom of list instead of
> >the top one! Sorry for the noise.
>
> I'm not sure the latest is always on top (but hope so), watch for the
> date in the filename.
>
>
> >The enhanced.2006-08-29.2.diff one applies fine but the 3 first hunks in
> >util/getfile.c. Easy to workaround, though.
>
> Yeah, I just noticed that. I forgot to update after the latest
> checkin. A new patch in on the way.
Cool. Thanks for your help, much appreciated. I'll get back to you as soon as
I get something clean to show/share.
Regards,
--
wwp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.nedit.org/pipermail/discuss/attachments/20060830/8c469a2f/signature.bin
More information about the Discuss
mailing list