Welcome to Vifm Q&A, where you can ask questions about Vifm usage. Registration is optional, anonymous posts are moderated. GitHub or Google logins are enabled.
0 votes
in vifm by

Wanted to use file tagging. Probably i can store tags inside filenames as workaround.


Do you mean highlighting (like different color for directories) or selecting (like with t key)? There is also builtin support for tagging (it's primary goal is navigation though), :bmark, :bmarks, :bmgo.


I meant highlighting (colors).
Thought i can use :bmark only for directories. Was i wrong? Manual says only bout directories.


:bmark is for directories, but bmark! can mark files as well (e.g., :bmark! %c tags current file).

1 Answer

0 votes
Best answer

I don't see a way to employ external commands in the process of picking highlight using existing means (and not sure I get how it would work, probably like some kind of predicate that gets path to the file).

However, in principle you can highlight file by full path like this:

 highlight {{/home/user/some/file}} ctermfg=red

I say "in principle", because the pattern is accepted, but doesn't work (pattern is matched against file name only, which is a bug). So thanks for implicit bug report :-).

By the way, you might not be satisfied with performance of running external application to determine file highlighting. Even with obviously employed caching the slowdown might be noticeable.

If you would like to make a bug report or feature request consider using GitHub, SourceForge or e-mail. Posting such things here is acceptable, but this is not a perfect place for them.