SublimeText Macros made easy!

Creating sublimetext macro,

I am using RSpec and it deals with lot of commands that my sublime text wasn’t recognizing or giving me a snippet so what I thought of is writing sublimetext macros which is a great underused tool by all the developers.

  1. So first step was recording the snippet and then save it as macro using the Sublime Text UI.
  2. Second step is to cleanup the file. Navigate to place where the macros live, for macOS its:~/Library/Application Support/Sublime Text 3/Packages/User

    Then I opened Sublime and tried to clean up the file where sometimes it would end up dividing same command into parts. :/ not sure why though but my understanding is due to typing speed??

  3. Create key bindings to the macros that you have just created.
    Key binding is the way you can invoke the macros that you have just defined.
  4. Reopen sublime and user your key combination to invoke the macro that you want to use!


  1. rspec-describe.sublime-macro
  2. Default (OSX).sublime-keymap

Future work:

While I see that I am happy with the way I have defined the macros to my editor. Sometimes indentation is not right which I need to work on.

recording the macro doesn’t give the relative indentation, the problem which I am facing now with the above macros.

If incase you have a solution please comment below!


Get started with LaTeX

LaTeX is one the typesetting languages out there that lets you create documents very easily!

I find the following books particularly helpful if you want to learn LaTeX

Hope you find these helpful! Happy LaTeXing! 🙂


Adding Emojis to your Mac terminal

If you have to ssh to work and have the local system and get confused every now and then. Then you might add some visual indicators in the bash shell so you can easily spot where you are!

1. Open your .bash_profile and add the following line.

PS1="\h  🍀  \W "

To Open emoji’s in Mac, you need to go to ‘Edit’ > ‘Emojis & Symbols’ and add your desired emoji. Be it in twitter, notes or anywhere this is the way to do in a Mac.

2. Save the bash_profile file,

3. Reopen terminal and BOOM!

Note: while Adding PS1=” ” remember that you shouldn’t have a space between = and “.

This artical was inspired by one of Ruby programmers having vidcast. And idea is borrowed from

Let me know what other emoji’s you like the most to have them on terminal.


Commandline tricks

Installing ‘ll’ in mac osx:

Sometimes you will notice that the ‘ll’ command is not found in MAC OSX. To enable it do something like this:

alias ll='ls -lG'


Know more about Running Processes and killing them in Unix:

To see all the processes on the system:

ps -af

ps -af | more

You can also search for particular sorts of process using the grep command. grep searches for a given string of characters within a file. If you “pipe” the output from ps into grep it will search for a string and only display those lines on which the string occurs.

ps -af | grep pine

To get a list of the current environment variables and their values


If I know the PID number of a process, how can I get its name?

On all POSIX-compliant systems, and with Linux, you can use ps:

ps -p 1337 -o comm=

Here, the process is selected by its PID with -p. The -o option specifies the output format, comm meaning the command name.