Quickly Edit Posts
Recently I automated starting new posts with a python script. Today I want to work on the next part that is editing those posts quickly. Automating my Post Starter Check out this post about setting up my posts with python 🐍 Enter Bash # For the process of editing a post I just need to open the file in vim quickly. I dont need much in the way of parsing and setting up the frontmatter. I think this is a simple job for a bash script and fzf. change to the root of my blog fuzzy find the post open it with vim change back to the directory I was in bash function # For this I am going to go with a bash function. This is partly due to being able to track where I was and get back. Also the line with nvim will run fzf everytime you source your file which is not what we want. Lets setup the boilerplate. Its going to create a function called ep, track our current directory, create a sub function. Then call that function and cd back to where we were no matter if fails or succeeds. boilerplate Creati…