Skip to content

Commit

Permalink
Add g:outdated_plugins_silent_mode variable
Browse files Browse the repository at this point in the history
  • Loading branch information
semanser committed Dec 2, 2018
1 parent 541dc0a commit 5d20468
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,19 @@ This plugin automatically checks if any of your plugins are outdated and display

To use this plugin make sure you have **git** installed.

## Installation
```vim
Plug 'semanser/vim-outdated-plugins'
```

## Configuration
```vim
" Do not show any message if all plugins are up to date. 0 by default
let g:outdated_plugins_silent_mode = 1
```

## Screenshots
Just a message under the status bar.
Simple message text message under the status bar.

![alt text](https://raw.githubusercontent.com/semanser/vim-outdated-plugins/master/images/outdated.png)
![alt text](https://raw.githubusercontent.com/semanser/vim-outdated-plugins/master/images/updated.png)
Expand Down
8 changes: 7 additions & 1 deletion plugin/vim-outdated-plugins.vim
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
if !exists('g:outdated_plugins_silent_mode')
let g:outdated_plugins_silent_mode = 0
endif

function! s:JobHandler(job_id, data, event) dict
if (str2nr(join(a:data)) != 0)
let g:pluginsToUpdate += 1
Expand All @@ -11,7 +15,9 @@ function! s:CalculateUpdates(job_id, data, event) dict
if g:pluginsToUpdate > 0
echom 'Plugins to update: ' . g:pluginsToUpdate
else
echom 'All plugins up-to-date'
if !g:outdated_plugins_silent_mode
echom 'All plugins up-to-date'
endif
endif
endif
endfunction
Expand Down

0 comments on commit 5d20468

Please sign in to comment.