mirror of
https://github.com/preservim/vim-wordy.git
synced 2025-11-18 06:43:39 -05:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
87a77cb293 | ||
|
|
e80520718d | ||
|
|
14b9dbf76a | ||
|
|
aa66dfff91 | ||
|
|
bd37684a04 | ||
|
|
a4dd6fdb05 | ||
|
|
ae7470797b | ||
|
|
6b37d5a8c9 | ||
|
|
5a8a149b3c | ||
|
|
05dd76aeeb | ||
|
|
86ab7f3d5b | ||
|
|
2d840bb5fe | ||
|
|
7d90faf657 | ||
|
|
324e08d11d | ||
|
|
bc6b75ad9a | ||
|
|
03680e115b | ||
|
|
210dd1077d | ||
|
|
71b1365e2a |
@@ -5,7 +5,7 @@
|
||||
<br/>
|
||||
|
||||
- - -
|
||||

|
||||

|
||||
- - -
|
||||
|
||||
## 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
|
||||
|
||||
@@ -81,7 +87,7 @@ least until _wordy_ feels the urge to build again.
|
||||
Define your own ring of dictionaries, overriding the default one in your
|
||||
`.vimrc`:
|
||||
|
||||
```
|
||||
```vim
|
||||
let g:wordy#ring = [
|
||||
\ 'weak',
|
||||
\ ['being', 'passive-voice', ],
|
||||
@@ -92,12 +98,14 @@ let g:wordy#ring = [
|
||||
\ ['colloquial', 'idiomatic', 'similies', ],
|
||||
\ 'art-jargon',
|
||||
\ ['contractions', 'opinion', 'vague-time', 'said-synonyms', ],
|
||||
\ 'adjectives',
|
||||
\ 'adverbs',
|
||||
\ ]
|
||||
```
|
||||
|
||||
You can navigate the ring with the following commands:
|
||||
|
||||
```
|
||||
```vim
|
||||
:NextWordy
|
||||
:PrevWordy
|
||||
```
|
||||
@@ -105,23 +113,32 @@ You can navigate the ring with the following commands:
|
||||
Optionally map a key in your `.vimrc` to rapidly cycle through the
|
||||
ring's dictionaries:
|
||||
|
||||
```
|
||||
nnoremap <silent> K :NextWordy<cr>
|
||||
```vim
|
||||
noremap <silent> <F8> :<C-u>NextWordy<cr>
|
||||
xnoremap <silent> <F8> :<C-u>NextWordy<cr>
|
||||
inoremap <silent> <F8> <C-o>:NextWordy<cr>
|
||||
```
|
||||
|
||||
**NEW** - You can browse through a flattened list of dictionaries
|
||||
You can browse through a flattened list of dictionaries
|
||||
specified in your ring with:
|
||||
|
||||
```
|
||||
```vim
|
||||
:Wordy <tab>
|
||||
```
|
||||
|
||||
and optionally map a key such as `\w` in your `.vimrc` to it by
|
||||
|
||||
```vim
|
||||
if !&wildcharm | set wildcharm=<C-z> | endif
|
||||
execute 'nnoremap <leader>w :Wordy<space>'.nr2char(&wildcharm)
|
||||
```
|
||||
|
||||
## Using _wordy_
|
||||
|
||||
You’ll use the commands that follow to enable _wordy_. To disable it and
|
||||
restore your previous spell environment, enter the command:
|
||||
|
||||
```
|
||||
```vim
|
||||
:NoWordy
|
||||
```
|
||||
|
||||
@@ -133,7 +150,7 @@ go to those words flagged by _wordy_.
|
||||
|
||||
### Weak and lazy usage
|
||||
|
||||
```
|
||||
```vim
|
||||
:Wordy weak
|
||||
```
|
||||
|
||||
@@ -161,7 +178,7 @@ asking whether it detracts from the point you are trying to make.
|
||||
|
||||
### Redundant and problematic usage
|
||||
|
||||
```
|
||||
```vim
|
||||
:Wordy redundant
|
||||
:Wordy problematic
|
||||
```
|
||||
@@ -186,7 +203,7 @@ targeted by _problematic_.
|
||||
> _self-actualization_ reflect his _dynamic_ and _transformative_
|
||||
> personality.” (puffery and jargon)
|
||||
|
||||
```
|
||||
```vim
|
||||
:Wordy puffery
|
||||
:Wordy business-jargon
|
||||
:Wordy art-jargon
|
||||
@@ -200,7 +217,7 @@ Instead of puffery, demonstrate through details.
|
||||
|
||||
### Manipulative language
|
||||
|
||||
```
|
||||
```vim
|
||||
:Wordy weasel
|
||||
```
|
||||
|
||||
@@ -217,7 +234,7 @@ will seek to purge such loaded language from your writing.
|
||||
|
||||
### To be and the passive voice
|
||||
|
||||
```
|
||||
```vim
|
||||
:Wordy being
|
||||
:Wordy passive-voice
|
||||
```
|
||||
@@ -227,7 +244,7 @@ of the verb to be, often found in overly-passive sentences.
|
||||
|
||||
### Colloquialisms, Idioms, and Similies
|
||||
|
||||
```
|
||||
```vim
|
||||
:Wordy colloquial
|
||||
:Wordy idiomatic
|
||||
:Wordy similies
|
||||
@@ -236,9 +253,18 @@ 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
|
||||
:Wordy said-synonyms
|
||||
:Wordy opinion
|
||||
:Wordy contractions
|
||||
@@ -259,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
|
||||
|
||||
@@ -33,11 +33,24 @@ function! wordy#init(...) abort
|
||||
let l:data_dir = g:wordy_dir . '/data'
|
||||
let l:src_path = l:data_dir . '/' . l:lang . '/' . l:dict . '.dic'
|
||||
if filereadable(l:src_path)
|
||||
if has('nvim')
|
||||
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)
|
||||
@@ -57,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
3383
data/en/adjectives.dic
Normal file
File diff suppressed because it is too large
Load Diff
4090
data/en/adverbs.dic
Normal file
4090
data/en/adverbs.dic
Normal file
File diff suppressed because it is too large
Load Diff
@@ -35,6 +35,8 @@ if !exists('g:wordy#ring')
|
||||
\ ['colloquial', 'idiomatic', 'similies', ],
|
||||
\ 'art-jargon',
|
||||
\ ['contractions', 'opinion', 'vague-time', 'said-synonyms', ],
|
||||
\ 'adjectives',
|
||||
\ 'adverbs',
|
||||
\ ]
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user