preservim / vim-wordy

Uncover usage problems in your writing
Other
716 stars 23 forks source link

Dictionary not being generated #19

Open benmills opened 9 years ago

benmills commented 9 years ago

I'm on OS X 10.10.5 using vim version 7.3.

I get this error when I try to run something like :Wordy weak:

Error detected while processing function wordy#init:                                    
line   40:                                                                              
E755: Invalid region in (Personal)/dotfiles/vim/bundle/vim-wordy/spell/weak.en.utf-8.spl

Looking at my file system the spell dir is empty. I assume that means wordy didn't generate the dictionaries for me.

Full vim version:

~/Dropbox (Personal)/projects/commerce $ vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jul  9 2015 23:58:42)
Compiled by root@apple.com
Normal version without GUI.  Features included (+) or not (-):
-arabic +autocmd -balloon_eval -browse +builtin_terms +byte_offset +cindent 
-clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments 
-conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs 
-dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path 
+find_in_path +float +folding -footer +fork() -gettext -hangul_input +iconv 
+insert_expand +jumplist -keymap -langmap +libcall +linebreak +lispindent 
+listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape 
-mouse_dec -mouse_gpm -mouse_jsbterm -mouse_netterm -mouse_sysmouse 
+mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype 
+path_extra -perl +persistent_undo +postscript +printer -profile +python/dyn 
-python3 +quickfix +reltime -rightleft +ruby/dyn +scrollbind +signs 
+smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary 
+tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
 -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo 
+vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
 -xterm_clipboard -xterm_save 
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -D_FORTIFY_SOURCE=0 -Iproto -DHAVE_CONFIG_H -arch i386 -arch x86_64 -g -Os -pipe
Linking: gcc -arch i386 -arch x86_64 -o vim -lncurses
reedes commented 9 years ago

That's odd, as the dictionary generation has been fairly reliable.

Are the permissions in your vim bundle directory different from your running user that might prevent Vim from creating new files in that spell directory?

reedes commented 9 years ago

Probably unrelated, but I found that 7.3 dictionaries aren't compatible with those generated by 7.4. I had to replace my system vim with homebrew to avoid an error...

brew install --override-system-vi vim

WillDHB commented 7 years ago

Seeing this same issue on Windows 10. Any thoughts on how to work around or debug this issue?

WillDHB commented 7 years ago

Figured it out...or, at least, I figured out what was happening in my case, I'm not sure about the op. wordy#init() contains two exe calls that use unsanitized paths. Wrapping them in fnameescape() solves the problem.

WillDHB commented 7 years ago

I made a patch. Probably. I've never actually made a patch with git before.

escpaths.txt