I wrote a blog post a few weeks ago about some of the tools I use to streamline my workflow. Since then, I’ve been experimenting with even more tools, and I have some tips and tricks to share with all you other CS people and web developers out there.
Sublime Text 2 [Part 2]:
Last time I talked a little bit about package control, BEAUTIFUL syntax highlighting, and using MacFusion to edit remotely accessed files in sublime. I have a new tip here which makes me wonder if I’ve actually fallen in love with Sublime. The point that I’d like to address is that some people (myself included) are REALLY comfortable in vim. Moving your hand to the mouse can be very frustrating when you’re in the zone. Why switch to Sublime if you have to change your methodology? A great question, with an awesome answer. Sublime offers a mode called Vintage, which is basically just vi … except with all the benefits of Sublime. To activate Vintage, go to Sublime Text 2->Preferences->Settings – User and change ‘“ignored packages”: [something in here]‘ to ‘“ignored packages”: ‘. Restart Sublime, and hit escape while in a file. Congratulations, you’re in vi. Press “i” to use insert mode, IE regular Sublime.
If you’re using bash, csh, or something else, you may be doing just fine. I mention oh-my-zsh because for me, the little things it has to offer make all the difference. OMZsh is quick to install, and right away offers a ton of neat shortcuts, which are given in detail <a href=” http://www.intridea.com/blog/2011/5/18/its-not-enough-to-bash-in-heads-youve-got-to-bash-in-minds-with-zsh” title=”OMZsh info” >here.</a> For example, being able to type “…” instead of “cd ../..” actually makes a big difference when digging through directories. I won’t go into everything that it does, but to summarize, I get a prettier terminal, a ton of out-of-the-box aliases, and cool options to fiddle with in the ~/.zshrc. Oh yeah, also colored tab completion, and auto-correct. Read the above article, try it out, and see if you like it.
- If you’re on a Mac, one of the most useful commands I have ever used is “⌘-Shift-Y.” Highlight a chunk of text that you want to save, and hit those keys. The text will be automatically entered into a sticky. My Stickies application is plastered with useful code snippets because of my addiction to this command.
- When it comes to poking around in your system, hidden files can be packed with valuable information. Though ls -a is a fine way to see these files, some folks like to use the Finder GUI for browsing. You can set all of your hidden files to visible with a simple terminal command. “defaults write com.apple.Finder AppleShowAllFiles YES” does the trick. To reverse it, change YES to NO.
- Some useful aliases:
1. Changing and adding aliases might be something you do often. I use OMZsh, so I like to have an alias… get ready… that lets me change aliases. Rather, it takes me directly to the file that does it.
2. How often do you find yourself calling a directory, then looking at its contents? Let’s minimize keystrokes here.
cd “$1″ && ls -al
Type “cs the_dir” and you’ll get into it, and see its contents immediately.
3. If you want to open a file or folder in Sublime (or whatever you use) directly from the Terminal, try this alias.
alias subl=’open -a /Applications/Sublime\ Text\ 2.app/’
Example “subl myfile.cpp” or “subl my_dir”.
Work smarter, not harder.
- Episode 13: Want to learn more? Online!? November 17, 2013Today we're doing a screencast looking at learning tools for languages, programming and more […]
- Episode 14: Collaborating Online? Who knew! November 17, 2013Today we will show you neat tools to collaborate on programming projects and more […]
- Episode 11: Summer Jobs are fun? September 23, 2013Fall 2013 AT Fellows podcast. Cohosted by Jonathan Wu and Aaron Wishnick […]
- Episode 13: Want to learn more? Online!? November 17, 2013