From b37a8302ebaa8b5a2ca0b83bb0018c895e8212b3 Mon Sep 17 00:00:00 2001 From: vg Date: Wed, 23 May 2018 11:40:10 +0200 Subject: fix missing endfunction --- plugin/uuid_anchor.vim | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/plugin/uuid_anchor.vim b/plugin/uuid_anchor.vim index 9da2ceb..5c43557 100644 --- a/plugin/uuid_anchor.vim +++ b/plugin/uuid_anchor.vim @@ -10,8 +10,11 @@ if exists("g:loaded_uuid_anchor_ftplugin") endif let loaded_uuid_anchor_ftplugin = 1 + if has('python') " python2 is available + + function! CreateAnchorUUID() python << EOF import vim @@ -21,8 +24,12 @@ vim.current.line += generated_uuid vim.command(''' normal l"uye ''') EOF endfunction + + elseif has('python3') " python3 is available + + function! CreateAnchorUUID() python3 << EOF import vim @@ -31,19 +38,11 @@ generated_uuid = '{:08X}'.format(random.randint(0,256**4)) vim.current.line += generated_uuid vim.command(''' normal l"uye ''') EOF -endif +endfunction +endif -function! CreateAnchorUUID() -python << EOF -import vim -import random -generated_uuid = '{:08X}'.format(random.randint(0,256**4)) -vim.current.line += generated_uuid -vim.command(''' normal l"uye ''') -EOF -endfunction " Add mappings, unless the user didn't want this. " The default mapping is registered, unless the user remapped it already. -- cgit v1.2.3