11 Commits
v1.1 ... v1.2

Author SHA1 Message Date
Reed Es
87a77cb293 Merge pull request #35 from bcl/master-spelllang
Set spelllang correctly
2019-08-29 12:16:25 -06:00
Brian C. Lane
e80520718d Set spelllang correctly
Full paths are not allowed in spelllang, only the lang names.

In the ./spell/ directory the files are named using the 'lang' which in
the case of wordy is the dict name.

This patch drops the actual lang from the .spl path, and only passes
the dict names to spelllang.

NOTE: I am not a vimscript expert, this solution works for me when
loading vim-wordy using pathogen. Closes issue #33
2019-08-25 10:39:02 -07:00
Reed Es
14b9dbf76a Merge pull request #28 from rndnoise/pr-19
Fix excessive regeneration of spelling dictionaries
2018-03-10 16:42:36 -07:00
rndnoise
aa66dfff91 Fix excessive regeneration of spelling dictionaries 2018-03-08 13:32:05 -06:00
Reed Esau
bd37684a04 Support lists of adjectives and adverbs #24 2016-11-07 17:41:36 -07:00
Reed Esau
a4dd6fdb05 Added mention of new danielbmarques/vim-ditto plugin 2016-07-30 19:07:58 -06:00
Reed Esau
ae7470797b Merge branch 'master' of https://github.com/reedes/vim-wordy 2015-09-05 13:19:22 -06:00
Reed Esau
6b37d5a8c9 Merge pull request #18 from michaelx386/issue-9
Replace deprecated commands in demo gif; fixes #9
2015-09-05 12:47:13 -06:00
michaelx386
5a8a149b3c Replace deprecated commands in demo gif; fixes #9 2015-08-29 20:48:28 +01:00
Reed Esau
05dd76aeeb Merge branch 'master' of https://github.com/reedes/vim-wordy 2015-05-09 01:24:47 -06:00
Reed Esau
2d840bb5fe Minor updates 2015-05-06 01:37:08 -06:00
5 changed files with 7516 additions and 12 deletions

View File

@@ -5,7 +5,7 @@
<br/>
- - -
![demo](http://i.imgur.com/DzfjEh4.gif)
![demo](http://i.imgur.com/cXDCwdE.gif)
- - -
## Features of the _wordy_ plugin
@@ -16,6 +16,7 @@
* Buffer-scoped configuration (leaves your global settings alone)
* Unicode-friendly, including support for typographic quotes
* User-configurable ring of dictionaries
* *NEW* adjectives and adverbs, to help you detect overuse
## What is _wordy_?
@@ -51,8 +52,13 @@ _wordy_ may require a recent version of Vim.
## Installation
Best installed using Pathogen, Vundle, Neobundle, or your favorite Vim
package manager.
_wordy_ is best installed using a Vim package manager, such as
[Vundle][vnd], [Plug][plg], [NeoBundle][nbn], or [Pathogen][pth].
[vnd]: https://github.com/gmarik/Vundle.vim
[plg]: https://github.com/junegunn/vim-plug
[nbn]: https://github.com/Shougo/neobundle.vim
[pth]: https://github.com/tpope/vim-pathogen
## Configuration
@@ -92,6 +98,8 @@ let g:wordy#ring = [
\ ['colloquial', 'idiomatic', 'similies', ],
\ 'art-jargon',
\ ['contractions', 'opinion', 'vague-time', 'said-synonyms', ],
\ 'adjectives',
\ 'adverbs',
\ ]
```
@@ -106,7 +114,9 @@ Optionally map a key in your `.vimrc` to rapidly cycle through the
ring's dictionaries:
```vim
nnoremap <silent> K :NextWordy<cr>
noremap <silent> <F8> :<C-u>NextWordy<cr>
xnoremap <silent> <F8> :<C-u>NextWordy<cr>
inoremap <silent> <F8> <C-o>:NextWordy<cr>
```
You can browse through a flattened list of dictionaries
@@ -243,6 +253,15 @@ of the verb to be, often found in overly-passive sentences.
Dictionaries for uncovering the tired cliché, including colloquial and
idiomatic phrases scraped from Wiktionary and Wikipedia.
### Adjectives and Adverbs
```vim
:Wordy adjectives
:Wordy adverbs
```
Dictionaries to help you detect the overuse of modifiers.
### Miscellaneous
```vim
@@ -266,8 +285,10 @@ time where you could be more specific.
## See also
[Words To Avoid in Creative Writing][wa] - a brief guide to usage by writer Cary Morton
* [danielbmarques/vim-ditto][vd] - new plugin to highlight repeated words
* [Words To Avoid in Creative Writing][wa] - a brief guide to usage by writer Cary Morton
[vd]: https://github.com/danielbmarques/vim-ditto
[wa]: http://darlingmionette.deviantart.com/art/Words-To-Avoid-152886782
If you find this plugin useful, you may want to check out these others by

View File

@@ -34,17 +34,23 @@ function! wordy#init(...) abort
let l:src_path = l:data_dir . '/' . l:lang . '/' . l:dict . '.dic'
if filereadable(l:src_path)
if has('nvim')
" Dynamically convert SpellBad words into SpellRare words under NeoVim.
" See issue 15 for details: https://github.com/reedes/vim-wordy/pull/15
let l:rare_dic = map(readfile(l:src_path), "substitute(v:val, '!$', '?', '')")
let l:src_path = tempname()
call writefile(l:rare_dic, l:src_path)
let l:rare_path = l:src_path . '.rare'
if !filereadable(l:rare_path) ||
\ getftime(l:rare_path) < getftime(l:src_path)
" Dynamically convert SpellBad words into SpellRare words under NeoVim.
" See issue 15 for details: https://github.com/reedes/vim-wordy/pull/15
let l:rare_dic = map(readfile(l:src_path), "substitute(v:val, '!$', '?', '')")
call writefile(l:rare_dic, l:rare_path)
endif
let l:src_path = l:rare_path
endif
let l:spell_dir = g:wordy_dir . '/spell'
if !isdirectory(l:spell_dir)
call mkdir(expand(l:spell_dir), "p")
endif
let l:dst_path = l:spell_dir . '/' . l:dict . '.' . l:lang . '.' . l:encoding . '.spl'
" The dict name is the 'language' part of the filename
let l:dst_path = l:spell_dir . '/' . l:dict . '.' . l:encoding . '.spl'
if get(l:args, 'force', 0) ||
\ !filereadable(l:dst_path) ||
\ getftime(l:dst_path) < getftime(l:src_path)
@@ -64,7 +70,9 @@ function! wordy#init(...) abort
let l:prefix = 'wordy: '
if len(l:dst_paths) > 0
let b:original_spl = &spelllang
exe 'setlocal spelllang=' . l:lang . ',' . join(l:dst_paths, ',')
" vim looks up the files in the ./spell/ directory using spell-load (see
" the vim docs) so full paths are not allowed.
exe 'setlocal spelllang=' . l:lang . ',' . join(l:dicts, ',')
setlocal spell
" the magic numbers derived empirically with MacVim

3383
data/en/adjectives.dic Normal file

File diff suppressed because it is too large Load Diff

4090
data/en/adverbs.dic Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -35,6 +35,8 @@ if !exists('g:wordy#ring')
\ ['colloquial', 'idiomatic', 'similies', ],
\ 'art-jargon',
\ ['contractions', 'opinion', 'vague-time', 'said-synonyms', ],
\ 'adjectives',
\ 'adverbs',
\ ]
endif