Quick tip for developers who use OS X
141–150 of 406 posts
Re: Quick tip for developers who use OS X
#142Useful 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.
Be warned, though, that these do not work inside of a tmux session without special steps being taken. I believe that they work in screen, but tmux requires some additional work.
Then you need to add the following to .tmux.conf
set-option -g default-command "reattach-to-user-namespace -l zsh"
There's a good writeup on what and why here, https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/blob/...Re: Quick tip for developers who use OS X
#143After making the switch to OS X in the last couple years after living in Linux and Windows before that, I think it's objective to say that keyboard shortcuts in OS X are much worse in both ease of use and consistency across applications.
The use of the Command key and a bunch of standard shortcuts using it are particularly notable.
#notsoobjective
Re: Quick tip for developers who use OS X
#144After making the switch to OS X in the last couple years after living in Linux and Windows before that, I think it's objective to say that keyboard shortcuts in OS X are much worse in both ease of use and consistency across applications.
Not sure if I'm falling for sarcasm, or just an outlier for feeling the exact opposite...
Re: Quick tip for developers who use OS X
#145Re: Quick tip for developers who use OS X
#146Is there a way to do something similar in Linux? I use gnome-terminal but would think about switching to something with a feature this useful.
Re: Quick tip for developers who use OS X
#147Bash, 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…
C-a : beginning line, C-e end line, alt+f forward word (unless system shortcut for file menu), alt+b back word, C-k kill line, C-b back char, C-f forward char. At least in my current setup, C-w yank and C-y paste works as well. Immensely helpful. Sometimes at+left/right does forward/ back word depending on the terminal emu. Note most of these keystrokes are valid in nano as well.
These work in most GUI inputs as well.
Re: Quick tip for developers who use OS X
#148Two more tips: * Ctrl-a to go to beginning of line * Ctrl-e to go to end of line
A couple more: * ⌘ + ` (tilde key) to switch between different windows of your current application * ⌘ + l (lowercase L) in most web browsers to highlight the address bar
Woohoo, love me some Linux, let choice reign ;-)
Re: Quick tip for developers who use OS X
#149Bash, 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…
I started using vi mode recently. The only thing that I really miss are ci and di commands.
Re: Quick tip for developers who use OS X
#150I have tried to use Terminal, but I just can't. The ability to highlight and automatically have the text in clipboard is such a crucial feature in my workflow that not having it even as an option is a deal breaker. Once 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 i…