Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigate to TRAMP root? #1487

Closed
angus-g opened this issue Mar 13, 2018 · 3 comments
Closed

Navigate to TRAMP root? #1487

angus-g opened this issue Mar 13, 2018 · 3 comments

Comments

@angus-g
Copy link

angus-g commented Mar 13, 2018

It's pretty often the case that I'll be editing files via TRAMP (over SSH) and want to access files either in my remote home directory, or the remote root. For both of these situations, ~ and / refer to the local host, so they're not useful here. I've been either navigating through the entire directory structure, or re-specifying the entire TRAMP connection string.

Would it make sense to add a magic key like : for TRAMP paths that'll strip back to the final colon so I can easily edit things in my remote home directory, or add a / and access root on the remote?

@abo-abo
Copy link
Owner

abo-abo commented Mar 15, 2018

Would it make sense to add a magic key like : for TRAMP paths that'll strip back to the final colon so I can easily edit things in my remote home directory, or add a / and access root on the remote?

This would be useful for sure. Right now, I just press DEL a bunch of times to get to the remote root. We just need to figure out a magic key that would be usable and wouldn't conflict with anything else.

@Silex
Copy link
Contributor

Silex commented Jul 5, 2019

I have both ivy-magic-tilde and ivy-magic-slash-non-match-action set to nil, and when I counsel-find-file and use /scpx:user@host then I end up in the file selection part, and there pressing / RET brings me back to the local root instead of the remote root.

I understand this is essentially what this issue is about, and I thought that instead of using a special key why not treat TRAMP a bit differently?

e.g, if file-remote-p then don't resolve / RET to the local root, just treat it like /scpx:user@host:/.

Can you point to the part where the / RET magic happens? Maybe I can make a PR.

@abo-abo
Copy link
Owner

abo-abo commented Jul 8, 2019

Thanks, ~ and // now work as you expect on remote. Please test. See also: https://oremacs.com/swiper/#using-tramp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants