diff options
| author | jdhao <jdhao@hotmail.com> | 2021-02-18 14:54:11 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2021-02-18 14:54:11 +0800 |
| commit | 7d4411589e008027292a1af6fdeadeca69074aa4 (patch) | |
| tree | b78fd094efa72cab84983994a329a937bff7f70c /core/plugins.vim | |
| parent | 73e237ac39d489bc6cc60e0e1f296a65550ca84e (diff) | |
Update vim-grammarous settings
Only enable its mapping in a Markdown file.
Diffstat (limited to 'core/plugins.vim')
| -rw-r--r-- | core/plugins.vim | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/core/plugins.vim b/core/plugins.vim index 64894b4..ddb6cba 100644 --- a/core/plugins.vim +++ b/core/plugins.vim @@ -733,9 +733,6 @@ endif """"""""""""""""""""""""vim-grammarous settings"""""""""""""""""""""""""""""" if g:is_mac let g:grammarous#languagetool_cmd = 'languagetool' - nmap <leader>x <Plug>(grammarous-close-info-window) - nmap <c-n> <Plug>(grammarous-move-to-next-error) - nmap <c-p> <Plug>(grammarous-move-to-previous-error) let g:grammarous#disabled_rules = { \ '*' : ['WHITESPACE_RULE', 'EN_QUOTES', 'ARROWS', 'SENTENCE_WHITESPACE', \ 'WORD_CONTAINS_UNDERSCORE', 'COMMA_PARENTHESIS_WHITESPACE', @@ -746,6 +743,13 @@ if g:is_mac \ 'CURRENCY', 'POSSESSIVE_APOSTROPHE', 'ENGLISH_WORD_REPEAT_RULE', \ 'NON_STANDARD_WORD', 'AU', 'DATE_NEW_YEAR'], \ } + + augroup grammarous_map + autocmd! + autocmd FileType markdown nmap <buffer> <leader>x <Plug>(grammarous-close-info-window) + autocmd FileType markdown nmap <buffer> <c-n> <Plug>(grammarous-move-to-next-error) + autocmd FileType markdown nmap <buffer> <c-p> <Plug>(grammarous-move-to-previous-error) + augroup END endif """"""""""""""""""""""""unicode.vim settings"""""""""""""""""""""""""""""" |
