Be More Productive

- 5 mins

I came to realize that I should’ve put more efforts to improve my workflow, to be more efficient and productive, and as for now, the best way to achieve this goal is to understand more about the tools I use in day-to-day development. Frankly speaking, I used to tell myself that I could customize my editor or terminal next time, but procrastination kicked in and you know how it ends.

Oh-My-Zsh & iTerms 2

I remember myself tried zsh a year ago, but didn’t stick with it mostly because it failed to sync with Apple Time Capsule, so I opted to bash as my local shell, and I’ve been happy with it. Since I am striving to be more productive, which means utilizing scripts for repetitive procedures and using more keyboard instead of mouse, I suppose a better shell is necessary in this case. That’s why I decided to give Oh-My-Zsh another try.

Oh-My-Zsh

Steps

curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh`

or

wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh

You can check the download by cd ~/.oh-my-zsh.

# Default User
DEFAULT_USER="(whatever-your-system-name-is)"

Besides, if you used rvm for existed projects, such as jekyll, you need to add this line to the zshrc file as well:

# For RVM
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

There are dozens of plugins bundled with oh-my-zsh, all you need to do is update in the plugin section:
plugins=(rails git textmate ruby lighthouse)

There is a detailed tutorial here for further reference.

iTerm2

In spite of using iTerm for a while, I was just scratching the very surface of this tool.

Settings

After read the first section of the official document here, I just realized that for every type of product, be it an open source or a desktop app, it is always essential to read the document.

A few settings I’d like to use from now on including: ‘Hotkey Window’, ‘Smart Cursor Color’, ‘Window Arrangements’, ‘Reuse previous session’s directory’, ‘Focus follow mouse’, and the storage for ‘Instant Replay’.

Shortcut Keys

Those shortcut keys are awesome, which are well documented in the official document, here, here, and also here, some interesting ones are:

Although I’d like to document a scenario mentioned in this blog, which addresses how to start the dev environment with one click.

Basically you need to create new profile, select command instead of the default login shell, and fill it with /bin/zsh, and write the command you’d like to run initially in the ‘send text at start’ section.

Now back to the iTerm interface, split panes with different profiles (the shortcut key for this is different from split panes with current profile).

After you have all the tab and pane opened, save this window arrangement by Command + Shift + S, and you can use this set in ‘window -> restore window arrangement’ or Command + Shift + R later on.

Last but not least, you can add customized alias settings such as alias -g pyhost="python -m SimpleHTTPServer" in the zshrc file.

WebStorm, Sublime Text, Atom

Those editor/IDE are great tools, and there are also Brackets, Textmate available. I use different apps for different scenarios, albeit I’d like to spend more time to be familiar with WebStorm because the features are fascinating.

Other Tools

Beyond the terminal and editors, there are a bunch of apps on Mac OS help you be more productive(as a developer). I’ve been adopting apps such as the api documentation app - Dash, it is a freemium app for all kinds of api documentations, this CheatSheet app allows you to look up shortcuts lists quickly, and this free window control app Spectable allows you control windows with hotkeys, there is another app called Moom does the same thing you can try that out as well.

Last but not least, there is a great app - Alfred to improve your workflow, I used that before Mac OS Yosemite, but then opted to the awesome Flashlight, which is well supported for MAC OS 10.10+, and it’s an open sourced project (with python), thus there are tons of plugins at your disposal, personally I’d say this is a compelling alternative to Alfred.

Lastly, I created a repo for cheatsheets.

comments powered by Disqus
rss facebook twitter github youtube mail spotify instagram linkedin google pinterest medium vimeo stackoverflow codepen