On Fri, 09 Mar 2018 22:24:16 +0100, Thomas Dickey <[email protected]> wrote:
On Fri, Mar 09, 2018 at 05:37:24PM +0100, j. van den hoff wrote:
I have a "tags" file of function definitions in the `R' language
(https://www.r-project.org). function names can contain periods, so I
have
lines such as
disp.array fzrutils/R/disp.array.R /^disp.array <- function ($/;"
f
in the "tags" file. my `.vilerc' contains
set tags {path_to_the_tags_file}
set tagrelative
`vi -t disp.array' does not work as expected but reacts the same way it
does
when a non-existent tag is specified (just reporting the read-in config
files: "Reading ~/vile.rc" etc.). tags not containing a `.' in the
function
name work just fine. `vim -t disp.array' does the expected even if the
`.'
is present in the name.
Am I missing something or is this a bug?
When doing ^]], vile's using a function checks only the character class,
and stops when a character isn't an "identifier":
int
screen_to_ident(char *buf, size_t bufn)
{
int rc = FALSE;
CHARTYPE mask = vl_ident;
int whole_line = adjust_chartype(&mask);
TRACE((T_CALLED "screen_to_ident\n"));
rc = read_by_regex(buf, bufn, b_val_rexp(curbp,
VAL_IDENTIFIER_EXPR), whole_line);
if (rc == FALSE)
rc = read_by_ctype(buf, bufn, mask, whole_line);
returnCode(rc);
}
:show-printable shows that it's not (by default) an "id" character:
45 - - - - - - prn pun - - path - arg - nsp - tmp
sh
46 . - - - - - prn pun - - path - arg - nsp - tmp
sh
47 / - - - - - prn pun - - path - - - nsp - tmp
sh
48 0 - - num - - prn - - id path - arg - nsp qid tmp
sh
49 1 - - num - - prn - - id path - arg - nsp qid tmp
sh
You could change that with
set-char-class id=[.]
45 - - - - - - prn pun - - path - arg - nsp - tmp
sh
46 . - - - - - prn pun - id path - arg - nsp - tmp
sh
47 / - - - - - prn pun - - path - - - nsp - tmp
sh
48 0 - - num - - prn - - id path - arg - nsp qid tmp
sh
49 1 - - num - - prn - - id path - arg - nsp qid tmp
sh
thank you -- didn't know of the `show-printable' command... anyhow, your
suggested solution does not work for me: I put the
set-char-class id=[.]
into my .vilerc but nothing has changed. `vi -t disp.array' (in my
example) does still not work.
what I _have_ learned in the meantime: when being already in the editor
`:ta disp.array' works just fine (w/ or w/o the `set-char-class id=[.]' in
`.vilerc'). this is good and suffices as a working solution but I would of
course be grateful for any further hint how to make `vi -t' work for
`foo.bar' type names.
another observation: when using `:ta {tagname}' from within `vile', TAB
completion of tagname works, but only for tagnames _not_ containing a `.'
(again, independent of whether `set-char-class id=[.]' has been issued or
not).
seen with vile version 9.8o for darwin14.3.0.
thank you
joerg
PS: I also presume, there is a small `ctags' bug here. the search
pattern
probably should backslash-protect the period in order to actually only
match
`disp.array' verbatim rather than
disp{any-single-character}array, no? otherwise one might jump to the
wrong
tag/file/position.
hmm - I think it's correct, since "magic" is normally set.
ah., I see. maybe it's time to spend some time with the (really good) vile
help file again: I was not aware of the 'magic' feature of vi and vile at
all. sorry for the noise...
and thanks for vile
joerg
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
_______________________________________________
vile mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/vile