Live data from Hacker News

Don't waste your time by cd-ing in the terminal

huyng.com

121–124 of 124 posts

Re: Don't waste your time by cd-ing in the terminal

#121
post #78

Earlier quoted context omitted.

I've also been frustrated by these issues. I want to be able to edit a file with local typing speed (i.e., gvim on Windows), but then be able to hit a key and be in a terminal window on that server in that folder to perhaps do a manual grep or rebuild an index or whatever. I feel like we were closer in the 90s with innovative products like Slirp and Term and, yes, Zmodem (and Kermit). I started trying to build out so…

Sounds like you want Emacs' tramp. On your local emacs, open a file in the form "/user@remote-ssh-host:file" and it will grab the remote file and edit it locally. Crazily all the emacs version control commands and stuff like M-x compile and M-x grep all work in the remote context. Very cool stuff. Obviously this requires that you use Emacs instead of Vim though. Don't be afraid though, the grass is pretty green over…

In my experience, tramp was even more reliable than sshfs. Both need work before they are truly effective solutions.

Though the latency of my satellite connection outweighs the shortcomings of sshfs. The thing about tramp is that where sshfs hangs up directory listing and file loading, tramp regularly hangs up the editor. (And tramp should really turn off autosave by default.)

Re: Don't waste your time by cd-ing in the terminal

#122

No mention of ZSH directory stacks yet? http://www.acm.uiuc.edu/workshops/zsh/dir_stack.html Some helpful aliases to manage them: alias 1='cd -1' alias 2='cd -2' alias 3='cd -3' alias 4='cd -4' alias 5='cd -5' alias 6='cd -6' alias 7='cd -7' alias d='dirs -v' alias h='history' alias j='jobs' Just one of the many reasons to use ZSH.

Just one of the many reasons to use ZSH. What shell doesn't have a directory stack?

sh
Post reply on HN