From 9ac192a643aed50382819e208073b26a25c81f69 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 1 Aug 2016 18:47:37 -0400 Subject: Add command to post mentor logs to The Firehose Project It finally became tedious to have to manually execute my custom script that posts a mentor log to The Firehose Project in a new shell. Create a new command that will run the script directly within Vim so I don't have to leave the editor. Actual file paths are stored in `projects/file-paths.vim`. Need to set the `BUNDLE_GEMFILE` so that the Ruby gems required by the script get loaded. The absolute path of the current file gets passed to the script for posting. --- projects/the_firehose_project.vim | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 projects/the_firehose_project.vim diff --git a/projects/the_firehose_project.vim b/projects/the_firehose_project.vim new file mode 100644 index 0000000..d04d008 --- /dev/null +++ b/projects/the_firehose_project.vim @@ -0,0 +1,2 @@ +" Post a mentor log +command! FirehosePostMentorLog execute "!BUNDLE_GEMFILE=$VIM_PROJECT_PATH_FIREHOSE_POST_A_MENTOR_SESSION/Gemfile bundle exec ruby $VIM_PROJECT_PATH_FIREHOSE_POST_A_MENTOR_SESSION/main.rb " . shellescape(expand('%:p')) -- cgit v1.2.3