When working with Static Site Blogs, you end up creating files with very long
names for your blog posts. For example, this very post has a filename
source/_posts/how-to-open-the-most-recent-file-created-in-vim.md
.
Now finding this exact file in hundreds of other files and opening them is a pain. Here is a small script which I wrote by piecing together stuff from the internet.
1 | # takes 1 argument |
Now, I can just run openlatest source
to open up the file
source/_posts/how-to-open-the-most-recent-file-created-in-vim.md
in vim and
start writing.
This technique can also be used to open the latest rails migration. Hope, this
function finds a home in your ~/.bashrc
:)
I am currently working on LiveForm which makes
setting up contact forms on your website a breeze.