Skip to content

Commit

Permalink
Merge pull request 16: Change highlight group of xolox#misc#msg#info()
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed Mar 15, 2015
2 parents 038faed + 26f1591 commit 9b38b8f
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 20 deletions.
15 changes: 12 additions & 3 deletions README.md
Expand Up @@ -38,7 +38,7 @@ from the source code of the miscellaneous scripts using the Python module
<!-- Start of generated documentation -->

The documentation of the 95 functions below was extracted from
19 Vim scripts on November 13, 2014 at 23:19.
19 Vim scripts on March 15, 2015 at 11:10.

### Asynchronous Vim script evaluation

Expand Down Expand Up @@ -378,6 +378,15 @@ or strings are coerced to strings using Vim's [string()] [] function.
In the case of `xolox#misc#msg#info()`, automatic string coercion simply
makes the function a bit easier to use.

The messages emitted by this function have no highlighting. Previously
these messages were highlighted using the [Title group] [hl-title], but it
was pointed out in [pull request 16] [pr-16] that this group shouldn't be
used for informational messages because it is meant for titles and because
of this some color schemes use colors that stand out quite a bit, causing
the informational messages to look like errors.

[hl-title]: http://vimdoc.sourceforge.net/htmldoc/syntax.html#hl-Title
[pr-16]: https://github.com/xolox/vim-misc/pull/16
[printf()]: http://vimdoc.sourceforge.net/htmldoc/eval.html#printf()
[string()]: http://vimdoc.sourceforge.net/htmldoc/eval.html#string()

Expand Down Expand Up @@ -999,8 +1008,8 @@ the plug-in's [homepage] []. If you like the script please vote for it on

## License

This software is licensed under the [MIT license] [].
© 2014 Peter Odding &lt;<peter@peterodding.com>&gt;.
This software is licensed under the [MIT license] [].
© 2015 Peter Odding &lt;<peter@peterodding.com>&gt;.


[GitHub]: http://github.com/xolox/vim-misc
Expand Down
4 changes: 2 additions & 2 deletions autoload/xolox/misc.vim
@@ -1,7 +1,7 @@
" The version of my miscellaneous scripts.
"
" Author: Peter Odding <peter@peterodding.com>
" Last Change: November 13, 2014
" Last Change: March 15, 2015
" URL: http://peterodding.com/code/vim/misc/

let g:xolox#misc#version = '1.17.1'
let g:xolox#misc#version = '1.17.2'
17 changes: 13 additions & 4 deletions autoload/xolox/misc/msg.vim
@@ -1,7 +1,7 @@
" Functions to interact with the user.
"
" Author: Peter Odding <peter@peterodding.com>
" Last Change: November 13, 2014
" Last Change: March 15, 2015
" URL: http://peterodding.com/code/vim/misc/

if !exists('g:xolox_message_buffer')
Expand All @@ -23,17 +23,26 @@ function! xolox#misc#msg#info(...) " {{{1
" In the case of `xolox#misc#msg#info()`, automatic string coercion simply
" makes the function a bit easier to use.
"
" The messages emitted by this function have no highlighting. Previously
" these messages were highlighted using the [Title group] [hl-title], but it
" was pointed out in [pull request 16] [pr-16] that this group shouldn't be
" used for informational messages because it is meant for titles and because
" of this some color schemes use colors that stand out quite a bit, causing
" the informational messages to look like errors.
"
" [hl-title]: http://vimdoc.sourceforge.net/htmldoc/syntax.html#hl-Title
" [pr-16]: https://github.com/xolox/vim-misc/pull/16
" [printf()]: http://vimdoc.sourceforge.net/htmldoc/eval.html#printf()
" [string()]: http://vimdoc.sourceforge.net/htmldoc/eval.html#string()
call s:show_message('title', a:000)
call s:show_message('None', a:000)
endfunction

function! xolox#misc#msg#warn(...) " {{{1
" Show a formatted warning message to the user.
"
" This function has the same argument handling as the
" `xolox#misc#msg#info()` function.
call s:show_message('warningmsg', a:000)
call s:show_message('WarningMsg', a:000)
endfunction

function! xolox#misc#msg#debug(...) " {{{1
Expand All @@ -50,7 +59,7 @@ function! xolox#misc#msg#debug(...) " {{{1
"
" ['verbose']: http://vimdoc.sourceforge.net/htmldoc/options.html#'verbose'
if &vbs >= 1
call s:show_message('question', a:000)
call s:show_message('Question', a:000)
endif
endfunction

Expand Down
30 changes: 19 additions & 11 deletions doc/misc.txt
Expand Up @@ -170,7 +170,7 @@ from the source code of the miscellaneous scripts using the Python module
'vimdoctool.py' included in vim-tools [5].

The documentation of the 95 functions below was extracted from 19 Vim scripts
on November 13, 2014 at 23:19.
on March 15, 2015 at 11:10.

-------------------------------------------------------------------------------
*misc-asynchronous-vim-script-evaluation*
Expand Down Expand Up @@ -499,6 +499,13 @@ coerced to strings using Vim's |string()| function.
In the case of |xolox#misc#msg#info()|, automatic string coercion simply makes
the function a bit easier to use.

The messages emitted by this function have no highlighting. Previously these
messages were highlighted using the Title group (see |hl-Title|), but it was
pointed out in pull request 16 [12] that this group shouldn't be used for
informational messages because it is meant for titles and because of this some
color schemes use colors that stand out quite a bit, causing the informational
messages to look like errors.

-------------------------------------------------------------------------------
The *xolox#misc#msg#warn()* function

Expand Down Expand Up @@ -644,7 +651,7 @@ value of |v:progname|, but if you have a preference you can pass the string
The *xolox#misc#os#exec()* function

Execute an external command (hiding the console on Microsoft Windows when my
vim-shell plug-in [12] is installed).
vim-shell plug-in [13] is installed).

Expects a dictionary with the following key/value pairs as the first argument:

Expand Down Expand Up @@ -1169,15 +1176,15 @@ version string. Returns 1 (true) when it is, 0 (false) otherwise.
Contact ~

If you have questions, bug reports, suggestions, etc. please open an issue or
pull request on GitHub [13]. Download links and documentation can be found on
the plug-in's homepage [14]. If you like the script please vote for it on Vim
Online [15].
pull request on GitHub [14]. Download links and documentation can be found on
the plug-in's homepage [15]. If you like the script please vote for it on Vim
Online [16].

===============================================================================
*misc-license*
License ~

This software is licensed under the MIT license [16]. © 2014 Peter Odding
This software is licensed under the MIT license [17]. © 2015 Peter Odding
<peter@peterodding.com>.

===============================================================================
Expand All @@ -1195,10 +1202,11 @@ References ~
[9] http://peterodding.com/code/vim/notes/#recentnotes_command
[10] http://peterodding.com/code/vim/notes/#showtaggednotes_command
[11] http://peterodding.com/code/vim/session/
[12] http://peterodding.com/code/vim/shell/
[13] http://github.com/xolox/vim-misc
[14] http://peterodding.com/code/vim/misc
[15] http://www.vim.org/scripts/script.php?script_id=4597
[16] http://en.wikipedia.org/wiki/MIT_License
[12] https://github.com/xolox/vim-misc/pull/16
[13] http://peterodding.com/code/vim/shell/
[14] http://github.com/xolox/vim-misc
[15] http://peterodding.com/code/vim/misc
[16] http://www.vim.org/scripts/script.php?script_id=4597
[17] http://en.wikipedia.org/wiki/MIT_License

vim: ft=help

0 comments on commit 9b38b8f

Please sign in to comment.