Quick tip for developers who use OS X
51–60 of 406 posts
Re: Quick tip for developers who use OS X
#52I prefer the Vi mode, though. Add to your .bashrc
set -o vi
Then you can press escape to go from input mode to normal mode; there k will take you to the previous line in command line history, j to the next line, ^ and $ to the beginning and end of the line, /something will search something back.
Editing is really fast; move by words with w (forward) and b (backward), do cw to replace a word, r to replace a letter, i to go back to input. It will remember the last editing command, just as Vi, and repeat it when you press . in normal mode.
Re: Quick tip for developers who use OS X
#53Re: Quick tip for developers who use OS X
#54Re: Quick tip for developers who use OS X
#55Once I started with iTerm and built a config/flow around it, I can't go back.
Thanks for the tip though! I didn't realize this worked in Terminal too. I'll keep it in mind the next time I'm forced to use it.
Re: Quick tip for developers who use OS X
#56Re: Quick tip for developers who use OS X
#57Bash, running in your terminal, understands both the Emacs and the Vi commands. By default is Emacs, so you can C-a (control-a) for beginning of line, C-p to go back in command line history, or C-r to search it. I prefer the Vi mode, though. Add to your .bashrc set -o vi Then you can press escape to go from input mode to normal mode; there k will take you to the previous line in command line history, j to the next li…
Re: Quick tip for developers who use OS X
#58Useful when copy/pasting things to share with other people in email and such: $ pbpaste | pbcopy takes the current contents of the copy/paste buffer and removes color/font/background color rich formatting and puts just plain text back into the paste buffer. And of course pbcopy and pbpaste are also very useful on their own.
You can also use shift-option-cmd-v to directly paste without markup :)
Re: Quick tip for developers who use OS X
#59Sucks that it doesn't work in iTerm2.
Re: Quick tip for developers who use OS X
#60I often do "cd " + dragon drop folder to get to that folder in terminal