Recent juggling of multiple projects has created a need to track what I’ve been
doing day by day, as well as keep some notes on what I want to be doing. I have
thus revived a system I created long ago to edit a weekly log file in my
favorite editor (vim) via a keyboard shortcut. As I’m currently working mostly
in OS X, this required some modifications from the Linux version I used in the
past. The desired action is relatively simple. I press a hotkey combination and a
text editor window opens with the current week’s log file, which has been
created on the fly if it didn’t already exist.
Read more…
Vim is my editor of choice for any file that doesn’t need a full IDE, and I
generally have multiple files open in various windows at any point in time. In
its default configuration, for each file you have open, vim creates a hidden
swap file in the same directory with the extension “.swp”. Unfortunately, if
any of those files reside inside my Dropbox folder, the Dropbox program
notices the swap files and syncs them up to the cloud. Read on to see how to
change that behavior without losing the advantages that swap files give.
Read more…
Occasionally when using vim to edit large amounts of text, such as writing a
blog post, or formatting a large code comment, I wish to hard wrap the lines at
a certain number of columns for ease of reading. Here is a simple vim function
which uses the built in syntax highlighting capabilities of vim to highlight any
line which extends beyond 80 columns of text, allowing me to add line breaks as
I see fit, while leaving long lines of code alone. As an added bonus, it looks
really nice in the gui version of vim while still remaining usable in the
console version.
Read more…