Skip to content

Commit 9b38b8f

Browse files
committed
Merge pull request 16: Change highlight group of xolox#misc#msg#info()
2 parents 038faed + 26f1591 commit 9b38b8f

File tree

4 files changed

+46
-20
lines changed

4 files changed

+46
-20
lines changed

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ from the source code of the miscellaneous scripts using the Python module
3838
<!-- Start of generated documentation -->
3939

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

4343
### Asynchronous Vim script evaluation
4444

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

381+
The messages emitted by this function have no highlighting. Previously
382+
these messages were highlighted using the [Title group] [hl-title], but it
383+
was pointed out in [pull request 16] [pr-16] that this group shouldn't be
384+
used for informational messages because it is meant for titles and because
385+
of this some color schemes use colors that stand out quite a bit, causing
386+
the informational messages to look like errors.
387+
388+
[hl-title]: http://vimdoc.sourceforge.net/htmldoc/syntax.html#hl-Title
389+
[pr-16]: https://github.com/xolox/vim-misc/pull/16
381390
[printf()]: http://vimdoc.sourceforge.net/htmldoc/eval.html#printf()
382391
[string()]: http://vimdoc.sourceforge.net/htmldoc/eval.html#string()
383392

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

10001009
## License
10011010

1002-
This software is licensed under the [MIT license] [].
1003-
© 2014 Peter Odding &lt;<[email protected]>&gt;.
1011+
This software is licensed under the [MIT license] [].
1012+
© 2015 Peter Odding &lt;<[email protected]>&gt;.
10041013

10051014

10061015
[GitHub]: http://github.com/xolox/vim-misc

autoload/xolox/misc.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" The version of my miscellaneous scripts.
22
"
33
" Author: Peter Odding <[email protected]>
4-
" Last Change: November 13, 2014
4+
" Last Change: March 15, 2015
55
" URL: http://peterodding.com/code/vim/misc/
66

7-
let g:xolox#misc#version = '1.17.1'
7+
let g:xolox#misc#version = '1.17.2'

autoload/xolox/misc/msg.vim

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Functions to interact with the user.
22
"
33
" Author: Peter Odding <[email protected]>
4-
" Last Change: November 13, 2014
4+
" Last Change: March 15, 2015
55
" URL: http://peterodding.com/code/vim/misc/
66

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

3140
function! xolox#misc#msg#warn(...) " {{{1
3241
" Show a formatted warning message to the user.
3342
"
3443
" This function has the same argument handling as the
3544
" `xolox#misc#msg#info()` function.
36-
call s:show_message('warningmsg', a:000)
45+
call s:show_message('WarningMsg', a:000)
3746
endfunction
3847

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

doc/misc.txt

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ from the source code of the miscellaneous scripts using the Python module
170170
'vimdoctool.py' included in vim-tools [5].
171171

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

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

502+
The messages emitted by this function have no highlighting. Previously these
503+
messages were highlighted using the Title group (see |hl-Title|), but it was
504+
pointed out in pull request 16 [12] that this group shouldn't be used for
505+
informational messages because it is meant for titles and because of this some
506+
color schemes use colors that stand out quite a bit, causing the informational
507+
messages to look like errors.
508+
502509
-------------------------------------------------------------------------------
503510
The *xolox#misc#msg#warn()* function
504511

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

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

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

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

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

11761183
===============================================================================
11771184
*misc-license*
11781185
License ~
11791186

1180-
This software is licensed under the MIT license [16]. © 2014 Peter Odding
1187+
This software is licensed under the MIT license [17]. © 2015 Peter Odding
11811188
11821189

11831190
===============================================================================
@@ -1195,10 +1202,11 @@ References ~
11951202
[9] http://peterodding.com/code/vim/notes/#recentnotes_command
11961203
[10] http://peterodding.com/code/vim/notes/#showtaggednotes_command
11971204
[11] http://peterodding.com/code/vim/session/
1198-
[12] http://peterodding.com/code/vim/shell/
1199-
[13] http://github.com/xolox/vim-misc
1200-
[14] http://peterodding.com/code/vim/misc
1201-
[15] http://www.vim.org/scripts/script.php?script_id=4597
1202-
[16] http://en.wikipedia.org/wiki/MIT_License
1205+
[12] https://github.com/xolox/vim-misc/pull/16
1206+
[13] http://peterodding.com/code/vim/shell/
1207+
[14] http://github.com/xolox/vim-misc
1208+
[15] http://peterodding.com/code/vim/misc
1209+
[16] http://www.vim.org/scripts/script.php?script_id=4597
1210+
[17] http://en.wikipedia.org/wiki/MIT_License
12031211

12041212
vim: ft=help

0 commit comments

Comments
 (0)