top | item 2237854

(no title)

philikon | 15 years ago

I first was excited by title "Don't waste your time by cd-ing in the terminal", but then it just turned out to be a blog post about making cd'ing quicker. If you want to boost your productivity, my advice is to stop cd'ing altogether.

I see a lot of people -- particularly vi users -- cd'ing back and forth through a large directory tree. I usually tell them to get a terminal emulator that lets you easily manage many terminals open. Open one per directory you want to operate in, for instance. Learn how to switch back and forth between the different shells.

But most importantly, don't quit the program to switch back and forth between directories and files. Learn to use your editor of choice properly: how to view directory listings, how to switch back and forth, etc. Vim can do this just fine btw. The choice of tool here doesn't matter so much. Just pick one and learn it. This applies to your choice of terminal emulator, shell, editor, etc.

discuss

order

moe|15 years ago

Open one per directory you want to operate in, for instance.

This is a common source of headache when using the terminal as an IDE. Not only is it easy to get lost in a sea of terminal-tabs, but it's also quite cumbersome to restore the state of 5+ tabs after a shutdown or disconnect. Even more so when GNU screen enters the mix.

What I'd really like to have is a terminal that can attach to a remote GNU screen and display the screen-windows as local tabs.

peterwwillis|15 years ago

So browsing graphical tabs is quicker for you then using "Ctrl+RightArrow" or "Ctrl+n" or some variation of one of those? Traversing my screen or tmux sessions is usually much faster than using a mouse.

erikrose|15 years ago

Also, pushd and popd. And "cd -". And ctrl-Z and fg to jump out of your editor for a moment. And dragging dirs from the Finder (or whatever) to the terminal.

holygoat|15 years ago

And use tools that are aware of directories: tar -C, NERDtree for Vim, zsh globbing.

thet|15 years ago

a terminal emulator which has a session sasving feature built in to restore terminal tabs with their working directories is: termit find it on github. lua scripting api included :)