vim-slumlord icon indicating copy to clipboard operation
vim-slumlord copied to clipboard

Does not work, nothing happens when saving

Open jon301 opened this issue 8 years ago • 16 comments
trafficstars

Hi

I'm trying to make this plugin work with the following example :

test.uml

@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
@enduml

When I save the file, nothing happens.

For information, when I run the following command in the terminal : java -Dapple.awt.UIElement=true -splash: -jar .vim/plugged/vim-slumlord/plantuml.jar -charset UTF-8 -tutxt test.uml This generates test.utxt file correctly containing the ascii output of the diagram.

More information about my environment :

Mac OS High Sierra 10.13.1

~$ java --version
java 9.0.1
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
~$ vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 13 2017 14:41:09)
macOS version
Included patches: 1-1250
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl             +file_in_path    +mouse_sgr       +tag_old_static
+arabic          +find_in_path    -mouse_sysmouse  -tag_any_white
+autocmd         +float           +mouse_urxvt     -tcl
-balloon_eval    +folding         +mouse_xterm     +termguicolors
-browse          -footer          +multi_byte      +terminal
++builtin_terms  +fork()          +multi_lang      +terminfo
+byte_offset     +gettext         -mzscheme        +termresponse
+channel         -hangul_input    +netbeans_intg   +textobjects
+cindent         +iconv           +num64           +timers
-clientserver    +insert_expand   +packages        +title
+clipboard       +job             +path_extra      -toolbar
+cmdline_compl   +jumplist        +perl            +user_commands
+cmdline_hist    +keymap          +persistent_undo +vertsplit
+cmdline_info    +lambda          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      +lua             +rightleft       +windows
+diff            +menu            +ruby            +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      +startuptime     -xpm
+eval            +mouse_dec       +statusline      -xsmp
+ex_extra        -mouse_gpm       -sun_workshop    -xterm_clipboard
+extra_search    -mouse_jsbterm   +syntax          -xterm_save
+farsi           +mouse_netterm   +tag_binary
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X -DMACOS_X_DARWIN  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang   -L.             -L /BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/libressl/lib -L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/lib  -L/usr/local/lib -o vim        -lm  -lncurses -liconv -lintl -framework AppKit  -L/usr/local/lib -llua -fstack-protector  -L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE -lperl -F/usr/local/opt/python/Frameworks -framework Python   -lruby.2.3.0 -lobjc

Do you have an idea what could be the problem ?

jon301 avatar Nov 13 '17 16:11 jon301

For information, when I try to save an empty file in test.uml, I get the following error

Error detected while processing function slumlord#updatePreview[6]..<SNR>202_mungeDiagramInTmpFile[2]..<SNR>202_convertNonAsciiSupportedSyntax:
line    3:
"test.uml" 0L, 0C written

This means that the plugin is well installed and reacts to file saves. But it just can't inline the output inside the file when the syntax is valid (no errors, nothing happens) :/

jon301 avatar Nov 13 '17 16:11 jon301

Nothing happened as well when I save the file, and I have set let s:jar_path = expand("<sfile>:p:h") . "/../plantuml.jar" to the right path, but still it does not work , I am using Uubuntu 16.04

smilesun avatar Dec 05 '17 17:12 smilesun

Can confirm @jon301 's results. @scrooloose Are you still alive?

dylan-chong avatar Apr 20 '18 00:04 dylan-chong

Loooks like this plugging stopped working all the sudden with lastest vim

mitermayer avatar Mar 13 '19 17:03 mitermayer

Not working either :( @scrooloose - thoughts please?

kinowarrior avatar May 16 '19 09:05 kinowarrior

With empty file I see:

Error detected while processing function slumlord#updatePreview[15]..<SNR>161_mungeDiagramInTmpFile[2]..<SNR>161_convertNonAsciiSupportedSyntax:

With a valid, populated file nothing happens & no messages available in nvim.

kinowarrior avatar May 16 '19 09:05 kinowarrior

Well, it seems to be creaking along, semi-working & throwing errors at the same time for some diagrams:

errors_plantuml

kinowarrior avatar May 16 '19 09:05 kinowarrior

Regression of this issue I think.

kinowarrior avatar May 16 '19 09:05 kinowarrior

Hmm, the error messages have stopped appearing. It seems that once the temporary file under eg. /var/folders/w_/lkyx406x43v1_507sn2j31jc0000gn/T/nvimWdTnjz/1.utxt has been created, it becomes stable thereafter.

kinowarrior avatar May 16 '19 09:05 kinowarrior

@kinowarrior how did you fix it ? how did you create the above file ?

mitermayer avatar Jul 28 '19 18:07 mitermayer

For users that might want to use the plugin in the future, it's quite easy to fix it. You just need to replace the plantuml.jar provided in the repo by the latest version available that you can find on the official website.

Example of results obtained: vim-slumlord

Slyces avatar Jan 22 '20 10:01 Slyces

@Slyces doesn't work for me (Vim 8.1)

Komar0ff avatar Nov 03 '20 16:11 Komar0ff

Same for me, nothing happens when saving a .uml file (either empty or with valid markup). Also no change when replacing the plantuml.jar file with one from the PlantUML website. I'm using Neovim v0.4.4.

jeames00 avatar Nov 05 '20 14:11 jeames00

Hello, I also had this problem, but modifying slumlord.vim and changing the way the plantuml jar is invoked solved the problem for me - more precisely, invoking the jar in headless mode (adding "-Djava.awt.headless=true" option). I'll create a pull request and let the author decide whether I missed anything there.

sava-j avatar Aug 22 '21 16:08 sava-j

I encount ths same problem.

kdurant avatar Sep 30 '21 06:09 kdurant

@kdurant For the sake of trying it out, can you please try the forked repo or to apply the linked PR? Hopefully that will solve your problem, too.

sava-j avatar Sep 30 '21 16:09 sava-j