Commit Graph

11 Commits

Author SHA1 Message Date
Alexander Heinrich
53efdedca9 runtime: update g:spellfile_URL to URL used in Vim 8
See vim/vim@7ff7846
2020-09-17 13:31:55 +02:00
Justin M. Keyes
b9c9283f72 spellfile.vim: improve error message for missing spellfile
Problem:  If spellfile is missing, then "set spell" in modeline/sandbox
          fails with a non-obvious error.
Solution: Check for sandbox early and give a meaningful error.
          Fixes #11359

Test case:
    # test.latex has `% vim: set spelllang=hu:`
    # no spell file for `hu` yet!
    nvim -u NORC --cmd 'autocmd FileType tex setlocal spell' --cmd 'set modeline' test.latex

Before:
    No spell file for "hu" in utf-8
    Download it?
    Downloading hu.utf-8.spl...
    Error detected while processing /usr/local/share/nvim/runtime/autoload/netrw.vim:
    line  583:
    E12: Command not allowed from exrc/vimrc in current dir or tag search: au WinEnter *^Iif &ft == "netrw"|call s:NetrwInsureWinVars()|endif
    Error detected while processing function spellfile#LoadFile[60]..spellfile#Nread[13]..netrw#NetRead[4]..<SNR>67_NetrwOptionsSave:
    line   66:
    E171: Missing :endif
    Error detected while processing function spellfile#LoadFile[60]..spellfile#Nread:
    line   13:
    E171: Missing :endif
    Error detected while processing function spellfile#LoadFile:
    line   60:
    E171: Missing :endif
    Error detected while processing modelines:
    line    1:
    E12: Command not allowed from exrc/vimrc in current dir or tag search

After:
    Error detected while processing function spellfile#LoadFile:
    line    5:
    E605: Exception not caught: Cannot download spellfile in sandbox/modeline. Try ":set spell" from the cmdline.
    Error detected while processing modelines:
    line    1:
    E12: Command not allowed from exrc/vimrc in current dir or tag search
2019-11-10 12:35:45 -08:00
Justin M. Keyes
83d571653b spellfile.vim: store files in stdpath('data')
ref b9b2fb7d5d #6664 #6272
2019-04-27 21:34:54 +02:00
Justin M. Keyes
877d5c8be7 vim-patch:a9604e614517
Update runtime files.
a9604e6145
2018-10-29 09:50:08 +01:00
James McCoy
b9b2fb7d5d
spellfile.vim: Search for a writable directory on Windows
Fixes #6664 until #6272 is merged and sdtpath('data') can be used.
2017-11-06 20:54:07 -05:00
Justin M. Keyes
8cb77acb44 spellfile.vim: use :keeppatterns before :global 2017-11-06 01:56:04 +01:00
Justin M. Keyes
3462f46cb8 spellfile.vim: less pestering
- Always auto-create spell/ directory, don't ask.
- Don't ask where to put .spl file if only 1 choice exists.
- Always download .sug file, don't ask.
- Use blackhole register for :delete and :g//d.
- Formatting: expand tabs.
2016-04-10 04:27:25 -04:00
Felipe Morales
6b6f018f84 spellfile: follow the XDG spec
Closes #3535
2015-10-28 14:46:00 +01:00
Justin M. Keyes
adfc8cf50a doc: Misc. cleanup
Add missing parentheses and whatnot, move dangling comment, etc. Some
specific items worth mentioning:

Fixed some references to non-existent tags, found via `make html`

msgpack_rpc/channel.c:
  ELOG already prefixes each line with "error @ ..."
2015-03-24 19:29:29 -04:00
Seth Woodworth
fd636fc6dc runtime: make the spellfile creation use .nvim folder #1990 2015-02-15 12:19:55 -05:00
Justin M. Keyes
a98a6996c2 re-integrate runtime/ vim-patch:0 #938
Vim runtime files based on 7.4.384 / hg changeset 7090d7f160f7

Excluding:
  Amiga icons (*.info, icons/)
  doc/hangulin.txt
  tutor/
  spell/
  lang/ (only used for menu translations)
  macros/maze/, macros/hanoi/, macros/life/, macros/urm/
      These were used to test vi compatibility.
  termcap
      "Demonstration of a termcap file (for the Amiga and Archimedes)"

Helped-by: Rich Wareham <rjw57@cam.ac.uk>
Helped-by: John <john.schmidt.h@gmail.com>
Helped-by: Yann <yann@yann-salaun.com>
Helped-by: Christophe Badoit <c.badoit@lesiteimmo.com>
Helped-by: drasill <github@tof2k.com>
Helped-by: Tae Sandoval Murgan <taecilla@gmail.com>
Helped-by: Lowe Thiderman <lowe.thiderman@gmail.com>
2014-07-29 02:12:31 +00:00