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