Skip to content

Commit 859beb0

Browse files
author
Gaspar Chilingarov
committed
Add subscription request on first startup.
1 parent bff37ca commit 859beb0

File tree

2 files changed

+35
-17
lines changed

2 files changed

+35
-17
lines changed

README.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ Highly opinionated setup of plugins to start programming in Elixir in minutes.
55
Aim of the project is to give reasonable preset of defaults for Elixir-based development to
66
avoid laborious task of finding and tuning of plugins/themes.
77

8+
## Let's get in touch
9+
10+
I’m a sucker for feedback. What do you think of this plugin after using it?
11+
Tell me! I have when things do nto work 'out-of-box' and eager to fix it!
12+
13+
Please take 1 minute and subscribe to [mailing list](http://gasparchilingarov.com/vim-ide-updates/) to receive updates about
14+
the project.
15+
16+
You can contact me on [twitter](http://twitter.com/gasparch) and by email
17+
gasparch at gmail dot com.
18+
819
## Features
920
* Navigation
1021
* Jump to module/function definitions
@@ -65,7 +76,7 @@ cd ~/.vim/bundle/vim-ide-elixir
6576
./install.sh
6677
```
6778

68-
Follow instructions of install script.
79+
Follow instructions of install script to complete install.
6980

7081
**Manually install**
7182

@@ -285,17 +296,3 @@ Following commands and shortcuts are available:
285296
* `(`, `)` jumps back/forward to next function call/return (skips messages)
286297
* `{`, `}` jumps back/forward over repeated function calls
287298
* `F3` opens arguments fold; also when cursor is on function call/ret line
288-
289-
290-
291-
292-
293-
294-
295-
296-
297-
298-
299-
300-
301-

autoload/vimide.vim

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ function! vimide#getBundlePath() " {{{
1717
endfunction " }}}
1818

1919
function! vimide#setDefaults() " {{{
20-
call s:setGlobal('g:vimide_update_check_period', 24*60*60)
21-
call s:setGlobal('g:vimide_update_channel', '') " valid values are production/beta
20+
call s:setGlobal('g:vimide_update_check_period', 24*60*60) " check updates once a day
21+
call s:setGlobal('g:vimide_update_channel', '') " valid values are production/beta/dev
2222

2323
call s:setGlobal('g:vimide_global_enable', 0)
2424
call s:setGlobal('g:vimide_manage_indents', 1)
@@ -75,6 +75,7 @@ function! vimide#boot(setGlobal) " {{{
7575
" run update check just once on editor start
7676
if !s:UPDATE_CHECK_FINISHED
7777
call s:checkUpdates()
78+
call s:checkSubscription()
7879
let s:UPDATE_CHECK_FINISHED = 1
7980
endif
8081

@@ -627,3 +628,23 @@ function! s:checkUpdates() " {{{
627628
echo updateOutput
628629
call confirm("Restart Vim for updated version")
629630
endfunction " }}}
631+
632+
function! s:checkSubscription() " {{{
633+
let tsFileName = vimide#getRootPath() . "/.seen_subscribe_question"
634+
635+
let seenSubscribeCheck = file_readable(tsFileName)
636+
if seenSubscribeCheck | return | endif
637+
638+
let msg = "Hi! Thank you for trying out Vim-IDE-Elixir.\n" .
639+
\ "Your support is essential for project to stay alive and develop, \n" .
640+
\ "so please take your time and subscribe to mailing list here: \n".
641+
\ "http://gasparchilingarov.com/vim-ide-updates/ \n".
642+
\ "\n" .
643+
\ "Also send me your feedback in a few days after you use this plugin, please! \n" .
644+
\ "\n" .
645+
\ "This is one-time message, you can find subscription URL later in README.md."
646+
647+
let answer = confirm(msg)
648+
649+
call writefile([''], tsFileName, "w")
650+
endfunction " }}}

0 commit comments

Comments
 (0)