If you're looking to take this hack a little further (and I'm sure you are if you've gone Spacecadet with your shift keys), try the Karabiner modification that changes Caps Lock to Escape on a single press, Control on hold.
Making Control easier to press will open up using the Emacs-like key bindings that are prevalent across OSX and its applications (i.e. Ctrl-p and Ctrl-n to navigate up and down in menus, terminal history, etc.)
I probably use parentheses hundreds of times a day.
I sincerely hope you're writing Common Lisp and loving it.
Calculator
While I love Alfred, if I'm doing any on the fly calculation I'll tend to use dc. Because it plays nicely with the rest of my unix tooling it's good if I can stay familiar with how it works- and the only way to stay familiar with something is to keep using it!
Love the Control on hold idea, would definitely try it out and see if it suits my style!
As much as I love cli tools, dc is a bit too hardcore for me, usually the calculations I do are stuff like 24*60.
As much as I love cli tools, dc is a bit too hardcore for me, usually the calculations I do are stuff like 24*60.
For me it really shines as a part of an editor workflow. You can write the calculation on a line in Vim (or whatever), and then pipe it into dc and see the result in your editor.
bc is also available if you're not a fan of reverse Polish notation :D
For vim this definitely works better than Alfred.
When I'm in a vim zone I usually don't use much of the GUI so it might be worthwhile to learn dc better!
Hello! My name is Thomas and I'm a nerd. I like tech and gadgets and speculative fiction, and playing around with programming. It's not my day job, but I'm working on making it a side gig :)
For quick calculations you don't even have to leave vim or pipe out to anything!
<C-r>= in insert mode lets you type mathematical expressions and have the result inserted into your buffer. You need to add a decimal point if you want a floating point result otherwise it truncates to integers.
Bonus tip: [num]<C-a> and [num]<C-x> will add or subtract num from the number under the cursor or the next number on the line if there's no number under the cursor. It defaults to 1 if you leave [num] out.
Lovely list!
If you're looking to take this hack a little further (and I'm sure you are if you've gone Spacecadet with your shift keys), try the Karabiner modification that changes Caps Lock to Escape on a single press, Control on hold.
Making Control easier to press will open up using the Emacs-like key bindings that are prevalent across OSX and its applications (i.e.
Ctrl-p
andCtrl-n
to navigate up and down in menus, terminal history, etc.)I sincerely hope you're writing Common Lisp and loving it.
While I love Alfred, if I'm doing any on the fly calculation I'll tend to use
dc
. Because it plays nicely with the rest of my unix tooling it's good if I can stay familiar with how it works- and the only way to stay familiar with something is to keep using it!Love the Control on hold idea, would definitely try it out and see if it suits my style!
As much as I love cli tools,
dc
is a bit too hardcore for me, usually the calculations I do are stuff like 24*60.For me it really shines as a part of an editor workflow. You can write the calculation on a line in Vim (or whatever), and then pipe it into
dc
and see the result in your editor.bc
is also available if you're not a fan of reverse Polish notation :DFor vim this definitely works better than Alfred.
When I'm in a vim zone I usually don't use much of the GUI so it might be worthwhile to learn dc better!
For quick calculations you don't even have to leave vim or pipe out to anything!
<C-r>=
in insert mode lets you type mathematical expressions and have the result inserted into your buffer. You need to add a decimal point if you want a floating point result otherwise it truncates to integers.Bonus tip:
[num]<C-a>
and[num]<C-x>
will add or subtract num from the number under the cursor or the next number on the line if there's no number under the cursor. It defaults to 1 if you leave[num]
out.qalc is good