4

I have long paths and filenames showing in my helm session and I want to quickly look at one and then go back to the normal view. You can see my long paths and filenames below:

enter image description here

There are several related things that helm will do. One of them is C-] Toggle Details, which gives toggles the view (starting with the above) shown below:

enter image description here

This only shows the full filenames though, and I also want to view the paths.

Another option in GUI emacs is to mouseover a result, but the path is so long that the hover text goes off the screen ('fml', nothing worse than thinking you've been saved by contextual hover menu/text, which then jumps off the screen anyway :D)

Finally, you can both widen columns and toggle truncated lines.

That last one is important, because what I want to do, ideally, is toggle truncation for a selection of lines (or just the current line) with a key command.

2 Answers 2

4

(helm-toggle-truncate-line) is bound to C-c >. I found this out by searching for toggle in the helm help page, accessed during a helm session with C-h m.

0

Although slightly off topic, you may want to customize the helm-xref-candidate-formatting-function which provides the following choices:

  • helm-xref-format-candidate-short. The default: only shows file base name.
  • helm-xref-format-candidate-full-path. Shows the full path of the file.
  • helm-xref-format-candidate-long. Uses 2 lines per candidates: the file name with complete path in the first line, the second line is the string found in the file.

I find using helm-xref-format-candidate-long helps the most.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.