Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Bug fix for :doautocmd User PublishPre hook

I didn't realize that the `:doautocmd User` command is supposed to be
executed without a pathname argument. Because I DID provide a pathname
argument Vim misinterpreted the command arguments which meant the hook
didn't work...
  • Loading branch information...
commit 964e4dbb486f203ae7a1cb426af9491f44225db1 1 parent d865906
Peter Odding authored June 06, 2010

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  publish.vim
4  publish.vim
... ...
@@ -1,6 +1,6 @@
1 1
 " Vim plug-in
2 2
 " Maintainer: Peter Odding <peter@peterodding.com>
3  
-" Last Change: June 5, 2010
  3
+" Last Change: June 6, 2010
4 4
 " URL: http://peterodding.com/code/vim/publish
5 5
 " License: MIT
6 6
 " Version: 1.5
@@ -42,11 +42,11 @@ function! Publish(source, target, files) abort
42 42
     let given_source = s:FindOriginalPath(source_path)
43 43
     let s:current_source_directory = fnamemodify(given_source, ':h')
44 44
     silent execute 'edit!' fnameescape(source_path)
45  
-    silent execute 'doautocmd User PublishPre' fnameescape(source_path)
46 45
     if g:publish_plaintext
47 46
       let plaintext_path = xolox#path#merge(a:target, pathname . '.txt')
48 47
       silent execute 'write!' fnameescape(plaintext_path)
49 48
     endif
  49
+    silent execute 'doautocmd User PublishPre'
50 50
     runtime syntax/2html.vim
51 51
     if exists('tags_to_links_command')
52 52
       silent execute tags_to_links_command

0 notes on commit 964e4db

Please sign in to comment.
Something went wrong with that request. Please try again.