Productivity

[Another in my series of posts on Vim]

If you’re a developer, you will often find yourself having to insert a line of dashes or hashes (#) or asterisks into your comments.  In this post I’ll show you how to do this quickly.  Memorize this because you’ll wind up doing this often.  Position the cursor to the beginning of a blank like (in command mode) and enter the following:

80a#<ESC>
more...

If you’re like me, you spend a lot of time jumping from project to project in a Linux shell.  I find that I have to switch back and forth between directories.  The bash shell has commands to maintain a stack of directories.  I’ve written some functions that use these utilities to make directory navigation easier. I’ve found these functions very useful, and perhaps you will too. Let’s see them in action first with some examples, and then look at the code:

more...
© 2022 Aijaz Ansari
The Joy of Hack by Aijaz Ansari is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Powered by Pelican