Per-directory settings
Thorsten Haude
yoo at vranx.de
Tue Aug 29 23:50:23 CEST 2006
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.
>> 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.
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.
>> >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.
Thorsten Broken Social Scene: Stars and Sons
--
Wise men make proverbs, but fools repeat them.
- Samuel Palmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.nedit.org/pipermail/discuss/attachments/20060829/359d23b6/attachment.bin
More information about the Discuss
mailing list