Re: [patch] bug in block inserting
Christian wrote: Bram, here is a patch for an obscure bug when block-inserting. While I was trying to fix another thing I noticed that Vim wouldn't let me block insert a tab char in front of a block selection. The problem is, when there are spaces in front of the visually selected block and you are inserting tabs, the spaces in front of the block might be changed to a single tab (according to your sts and ts settings) and therefore the oap-start position will be wrong. (It took me a while until I figured out, that the column position actually decreases although I have added a single char. That was really unexpected). This will finally lead to the situation that Vim thinks, the length of the inserted text is negative and abort. So here is a patch, that fixes this and also includes a test. (Test suite successful run https://travis-ci.org/chrisbra/vim-ci/builds/48824000) Thanks! -- hundred-and-one symptoms of being an internet addict: 147. You finally give up smoking...because it made the monitor dirty. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Issue 319 in vim: New option to not beep with 'showmatch'
Christian Brabandt wrote: On Mi, 28 Jan 2015, Christian Brabandt wrote: On Mi, 28 Jan 2015, Bram Moolenaar wrote: Christian wrote: Thanks for the idea and the patch. Although single-character flags are not uncommon in Vim, they are hard to read back. Newer options have short names, using a comma separated list. This would also allow a value such as all or most. I think the default value should be empty, meaning no bell is suppressed. Then when users find the bell annoying in some situations they can add an entry to the option. This does imply that the name should be reversed: 'belloff'. Or perhaps 'shutup' ? :-) For the implementation, I would pass an argument to vim_beep() to specify when to not use the bell, then the handling of the option value only needs to be inside vim_beep(). Okay, will do. Here is an update Thanks! Everybody: please review the list of items. Note: the E here should be something else: indicate that an error occured. It can be silenced by removing the 'E' flag then. -- hundred-and-one symptoms of being an internet addict: 145. You e-mail your boss, informing him you'll be late. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [patch] add watch function to vim debugger
Christian Brabandt wrote: Bram, Charles asked me, if I could extend the vim debugger and add a watch feature, so it would be easier for him to debug netrw issues. So here is the patch: https://github.com/chrisbra/vim-mq-patches/blob/master/watchexpr As far as I know, Charles has already tested it successfully. Test suite is run successfully Thanks, this sounds really useful! It's not quite clear to me how this works: :breaka[dd] expr {string} Sets a breakpoint, that will break whenever the {string} evaluates to true. Example: :breakadd expr g:lnum However, g:lnum is always true (non-zero). Looking at the implementation, it seems that the previous value of g:lnum is stored and the break happens when the value changes. Perhaps you can add a few more examples. I would think it's also very useful to check the result of any expression. e.g.: breakadd expr tabstop == 4 Which would break just after 'tabstop' was set to 4 or to another value. Obviously this would be slow, evaluating the expression very many times, but manually finding this spot is much slower. -- We are the Borg of GNU GPL. We will assimilate your source code. Resistance is futile. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [7.4.50] [BUG] (G)Vim exits Insert mode after I type letter U+00F2
Thank you for your reply. Your suggestion really helps me in investigating the case. With 'gvim -u NONE', I can type the letter 'ň' (U+00F2) without any errors. This suggests that the cause is in my .vimrc. To be specific, the following line in my .vimrc was causing the problem : imap A-r Esc I had a chance to test on another Debian Stable machine, and found that without any input methods active, pressing A-r makes Gvim and Xterm output letter 'ň'. So i think this is an coincidence when the UTF-8 representation of letter 'ň' is the same as A-r. Basically, I conclude that this is not a vim error. If you think so, this can be closed. Thank you. Khang Nguyen. On Sat, Jan 31, 2015 at 07:05:22PM +0900, Yukihiro Nakadaira wrote: On Wed, Jan 28, 2015 at 5:27 AM, Nony Sense khang.soc...@gmail.com wrote: Hi, When I typed the letter U+00F2 (latin small letter o with grave) with input methods active, and pressed space bar, vim (and gvim) automatically exited insert mode, returned back to normal mode. Only 1 space character was added as the cursor moved forward, the letter didn't appear. To type the letter U+00F2, with input methods on, I would type in insert mode 'o' then '2' then 'spacebar'. The input methods that I have tried : scim version : 1.4.14 scim-unikey : 0.3.1 scim-vi-vni : built-in ibus verion : 1.3.19 ibus-unikey : 0.5.1 With normal Vim and XTerm please do the similar tasks as below. Steps to reproduce (with Gvim): With scim 1. Setup scim 2. environment GTK_IM_MODULE=scim GTK_IM_MODULE_FILE=to-the-correct-immodules.cache (or similar filename) 3. In scim setup Global Setup, disable all but Vietnamese. 4. Now assuming gvim and scim is ready. In gvim, 'i' to go to insert mode. Press Ctrl-Space to activate scim, then choose Vietnamese-vi-vni in scim toolbar. (or Vietnamese-Unikey, and choose vni instead of telex) Then type 'o' then '2' then space. 5. Gvim should go back to normal mode while it should have shown letter ň (letter U+00F2) instead. With ibus, the procedure is similar. Here is what I saw with :set verbose=20 : after typing 'o','2','spacebar' with scim activated: I can not reproduce the problem with ibus on ubuntu. ubuntu 14.10 ibus 1.5.8-2ubuntu2 ibus-unikey 0.6.1-1build2 vim 7.4.050 Is it still reproducible with gvim -u NONE (no vimrc, no plugins)? -- Yukihiro Nakadaira - yukihiro.nakada...@gmail.com -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [patch] add watch function to vim debugger
Hi Bram! On Sa, 31 Jan 2015, Bram Moolenaar wrote: Christian Brabandt wrote: Bram, Charles asked me, if I could extend the vim debugger and add a watch feature, so it would be easier for him to debug netrw issues. So here is the patch: https://github.com/chrisbra/vim-mq-patches/blob/master/watchexpr As far as I know, Charles has already tested it successfully. Test suite is run successfully Thanks, this sounds really useful! It's not quite clear to me how this works: :breaka[dd] expr {string} Sets a breakpoint, that will break whenever the {string} evaluates to true. Example: :breakadd expr g:lnum However, g:lnum is always true (non-zero). Looking at the implementation, it seems that the previous value of g:lnum is stored and the break happens when the value changes. Yes, that is what happens. Perhaps you can add a few more examples. I would think it's also very useful to check the result of any expression. e.g.: breakadd expr tabstop == 4 Which would break just after 'tabstop' was set to 4 or to another value. Obviously this would be slow, evaluating the expression very many times, but manually finding this spot is much slower. I had an earlier version, that worked like this. This had the drawback, that once the condition was fulfilled, it would break after every statement following it, so I changed it to break only when the values changes. Best, Christian -- -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Issue 319 in vim: New option to not beep with 'showmatch'
Christian wrote: On Sa, 31 Jan 2015, Bram Moolenaar wrote: Note: the E here should be something else: indicate that an error occured. It can be silenced by removing the 'E' flag then. What 'E'? I think this was a single letter flag in the first implementation, it should now be a word. -- hundred-and-one symptoms of being an internet addict: 151. You find yourself engaged to someone you've never actually met, except through e-mail. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Issue 319 in vim: New option to not beep with 'showmatch'
Hi Bram! On Sa, 31 Jan 2015, Bram Moolenaar wrote: Note: the E here should be something else: indicate that an error occured. It can be silenced by removing the 'E' flag then. What 'E'? Best, Christian -- Aus Murphy's Gesetze: Beurteilung hat mit Erfahrung zu tun. Erfahrung entsteht aus schwacher Beurteilung. -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Issue 319 in vim: New option to not beep with 'showmatch'
Hi Bram! On Sa, 31 Jan 2015, Bram Moolenaar wrote: Christian wrote: On Sa, 31 Jan 2015, Bram Moolenaar wrote: Note: the E here should be something else: indicate that an error occured. It can be silenced by removing the 'E' flag then. What 'E'? I think this was a single letter flag in the first implementation, it should now be a word. Yes, this is fixed now with the last patch. Best, Christian -- Ich konsumiere also bin ich. -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
ls with flags
Dear Bram, Some times I have lots of files opened in vim, I found it very useful to limit the output of `:ls` command to only modified ones, etc. The attached patch adds flags to the ls command which let to list files which are hidden or active or modified, or readonly or with nomodifiable set, etc. The same as what ls puts in the output. I think this might be useful for others as well. Let me know what do you think of it. Best regards, Marcin -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index 532cca3..d5eeca8 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -986,9 +986,10 @@ A buffer can also be unlisted. This means it exists, but it is not in the list of buffers. |unlisted-buffer| -:files[!] *:files* -:buffers[!] *:buffers* *:ls* -:ls[!] Show all buffers. Example: +:files[!] [flag]*:files* +:buffers[!] [flag]*:buffers* *:ls* +:ls[!] [flag] + Show all buffers. Example: 1 #h /test/text line 1 ~ 2u asdf line 0 ~ @@ -1014,6 +1015,16 @@ list of buffers. |unlisted-buffer| + a modified buffer x a buffer with read errors + [flag] can be one of 'u', '%', '#', 'a', 'h', '-', '=', '+' or + 'x'. Only files with the given flag will be listed, you can + set more than one flag, e.g. + ls + list modified buffers + ls - list buffers with 'modifiable' off + ls = list readonly buffers + ls u list unloaded buffers (overwrites the bang) + ls h+ list hidden buffers which are modified + ls a+ list active buffers which are modified, etc + *:bad* *:badd* :bad[d] [+lnum] {fname} Add file name {fname} to the buffer list, without loading it. diff --git a/src/buffer.c b/src/buffer.c index e4230fc..0659e9f 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2754,7 +2754,17 @@ buflist_list(eap) for (buf = firstbuf; buf != NULL !got_int; buf = buf-b_next) { /* skip unlisted buffers, unless ! was used */ - if (!buf-b_p_bl !eap-forceit) + if (!buf-b_p_bl !eap-forceit !vim_strchr((char_u *) eap-arg, 'u') || + vim_strchr((char_u *) eap-arg, 'u') buf-b_p_bl || + vim_strchr((char_u *) eap-arg, '+') (buf-b_flags BF_READERR || !bufIsChanged(buf)) || + vim_strchr((char_u *) eap-arg, 'a') (buf-b_ml.ml_mfp == NULL || buf-b_nwindows == 0) || + vim_strchr((char_u *) eap-arg, 'h') (buf-b_ml.ml_mfp == NULL || buf-b_nwindows != 0) || + vim_strchr((char_u *) eap-arg, '-') buf-b_p_ma || + vim_strchr((char_u *) eap-arg, '=') !buf-b_p_ro || + vim_strchr((char_u *) eap-arg, 'x') !(buf-b_flags BF_READERR) || + vim_strchr((char_u *) eap-arg, '%') buf != curbuf || + vim_strchr((char_u *) eap-arg, '#') (buf == curbuf || curwin-w_alt_fnum != buf-b_fnum) + ) continue; msg_putchar('\n'); if (buf_spname(buf) != NULL) diff --git a/src/ex_cmds.h b/src/ex_cmds.h index 21d42d5..7945956 100644 --- a/src/ex_cmds.h +++ b/src/ex_cmds.h @@ -217,7 +217,7 @@ EX(CMD_browse, browse, ex_wrongmodifier, NEEDARG|EXTRA|NOTRLCOM|CMDWIN, ADDR_LINES), EX(CMD_buffers, buffers, buflist_list, - BANG|TRLBAR|CMDWIN, + BANG|EXTRA|TRLBAR|CMDWIN, ADDR_LINES), EX(CMD_bufdo, bufdo, ex_listdo, BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL, @@ -526,7 +526,7 @@ EX(CMD_file, file, ex_file, RANGE|NOTADR|ZEROR|BANG|FILE1|TRLBAR, ADDR_LINES), EX(CMD_files, files, buflist_list, - BANG|TRLBAR|CMDWIN, + BANG|EXTRA|TRLBAR|CMDWIN, ADDR_LINES), EX(CMD_filetype, filetype, ex_filetype, EXTRA|TRLBAR|CMDWIN, @@ -847,7 +847,7 @@ EX(CMD_lwindow, lwindow, ex_cwindow, RANGE|NOTADR|COUNT|TRLBAR, ADDR_LINES), EX(CMD_ls, ls, buflist_list, - BANG|TRLBAR|CMDWIN, + BANG|EXTRA|TRLBAR|CMDWIN, ADDR_LINES), EX(CMD_move, move, ex_copymove, RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY, signature.asc Description: Digital signature
Re: ls with flags
Marcin - Dear Bram, Some times I have lots of files opened in vim, I found it very useful to limit the output of `:ls` command to only modified ones, etc. The attached patch adds flags to the ls command which let to list files which are hidden or active or modified, or readonly or with nomodifiable set, etc. The same as what ls puts in the output. I think this might be useful for others as well. Let me know what do you think of it. Yes, that sounds useful. Thanks for the patch. With overwrites the bang I think you mean overrules the bang. - Bram -- hundred-and-one symptoms of being an internet addict: 152. You find yourself falling for someone you've never seen or hardly know, but, boy can he/she TYPE!! /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: ls with flags
On 22:23 Sat 31 Jan , Bram Moolenaar wrote: Marcin - Dear Bram, Some times I have lots of files opened in vim, I found it very useful to limit the output of `:ls` command to only modified ones, etc. The attached patch adds flags to the ls command which let to list files which are hidden or active or modified, or readonly or with nomodifiable set, etc. The same as what ls puts in the output. I think this might be useful for others as well. Let me know what do you think of it. Yes, that sounds useful. Thanks for the patch. With overwrites the bang I think you mean overrules the bang. - Bram Yes indeed. I updated the patch. Marcin -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index 532cca3..1284a86 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -986,9 +986,10 @@ A buffer can also be unlisted. This means it exists, but it is not in the list of buffers. |unlisted-buffer| -:files[!] *:files* -:buffers[!] *:buffers* *:ls* -:ls[!] Show all buffers. Example: +:files[!] [flag]*:files* +:buffers[!] [flag]*:buffers* *:ls* +:ls[!] [flag] + Show all buffers. Example: 1 #h /test/text line 1 ~ 2u asdf line 0 ~ @@ -1014,6 +1015,16 @@ list of buffers. |unlisted-buffer| + a modified buffer x a buffer with read errors + [flag] can be one of 'u', '%', '#', 'a', 'h', '-', '=', '+' or + 'x'. Only files with the given flag will be listed, you can + set more than one flag, e.g. + ls + list modified buffers + ls - list buffers with 'modifiable' off + ls = list readonly buffers + ls u list unloaded buffers (overrules the bang) + ls h+ list hidden buffers which are modified + ls a+ list active buffers which are modified, etc + *:bad* *:badd* :bad[d] [+lnum] {fname} Add file name {fname} to the buffer list, without loading it. diff --git a/src/buffer.c b/src/buffer.c index e4230fc..0659e9f 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2754,7 +2754,17 @@ buflist_list(eap) for (buf = firstbuf; buf != NULL !got_int; buf = buf-b_next) { /* skip unlisted buffers, unless ! was used */ - if (!buf-b_p_bl !eap-forceit) + if (!buf-b_p_bl !eap-forceit !vim_strchr((char_u *) eap-arg, 'u') || + vim_strchr((char_u *) eap-arg, 'u') buf-b_p_bl || + vim_strchr((char_u *) eap-arg, '+') (buf-b_flags BF_READERR || !bufIsChanged(buf)) || + vim_strchr((char_u *) eap-arg, 'a') (buf-b_ml.ml_mfp == NULL || buf-b_nwindows == 0) || + vim_strchr((char_u *) eap-arg, 'h') (buf-b_ml.ml_mfp == NULL || buf-b_nwindows != 0) || + vim_strchr((char_u *) eap-arg, '-') buf-b_p_ma || + vim_strchr((char_u *) eap-arg, '=') !buf-b_p_ro || + vim_strchr((char_u *) eap-arg, 'x') !(buf-b_flags BF_READERR) || + vim_strchr((char_u *) eap-arg, '%') buf != curbuf || + vim_strchr((char_u *) eap-arg, '#') (buf == curbuf || curwin-w_alt_fnum != buf-b_fnum) + ) continue; msg_putchar('\n'); if (buf_spname(buf) != NULL) diff --git a/src/ex_cmds.h b/src/ex_cmds.h index 21d42d5..7945956 100644 --- a/src/ex_cmds.h +++ b/src/ex_cmds.h @@ -217,7 +217,7 @@ EX(CMD_browse, browse, ex_wrongmodifier, NEEDARG|EXTRA|NOTRLCOM|CMDWIN, ADDR_LINES), EX(CMD_buffers, buffers, buflist_list, - BANG|TRLBAR|CMDWIN, + BANG|EXTRA|TRLBAR|CMDWIN, ADDR_LINES), EX(CMD_bufdo, bufdo, ex_listdo, BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL, @@ -526,7 +526,7 @@ EX(CMD_file, file, ex_file, RANGE|NOTADR|ZEROR|BANG|FILE1|TRLBAR, ADDR_LINES), EX(CMD_files, files, buflist_list, - BANG|TRLBAR|CMDWIN, + BANG|EXTRA|TRLBAR|CMDWIN, ADDR_LINES), EX(CMD_filetype, filetype, ex_filetype, EXTRA|TRLBAR|CMDWIN, @@ -847,7 +847,7 @@ EX(CMD_lwindow, lwindow, ex_cwindow, RANGE|NOTADR|COUNT|TRLBAR, ADDR_LINES), EX(CMD_ls, ls, buflist_list, - BANG|TRLBAR|CMDWIN, + BANG|EXTRA|TRLBAR|CMDWIN, ADDR_LINES), EX(CMD_move, move, ex_copymove, RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY, signature.asc Description: Digital signature
Re: Issue 319 in vim: New option to not beep with 'showmatch'
On Sat, Jan 31, 2015 at 9:49 PM, Christian Brabandt cbli...@256bit.org wrote: Hi Bram! On Sa, 31 Jan 2015, Bram Moolenaar wrote: I think this was a single letter flag in the first implementation, it should now be a word. Yes, this is fixed now with the last patch. But not yet in the documentation at the top of the diff... Also I'd suggest: - This is most usefule, to finetune - This is most useful to finetune Christ van Willegen -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: linebreak and conceal display problems
Hi Benjamin! On Do, 29 Jan 2015, Benjamin Fritz wrote: I know there have been recent problem with linebreak when combined with conceal, I think I have found one or two more. With the attached test.vim file as a .vimrc, enter the following text: bbeetabtab;tabsome text The expected output is: ee--;some text However, instead of that, I see only: ee- Removing the set linebreak line from test.vim shows: ee;some text Note there are extra '-' characters added for listchars, and they are the wrong color. Removing set nowrap (regardless of linebreak setting) shows: ee;some text Note that there are still extra '-' characters, but they are the correct color now, and the text is not improperly concealed. I think the extra '-' need to be there because they need to adjust for the concealed chars. I also noted that when moving from the start of the first tab to the right using 'l' the cursor will stop within the first tab. That also looks wrong. I observed this issue in 64-bit gvim 7.4.608 HUGE and also 7.4.552 HUGE running in Windows 7. I hoped that patches 579 or 587 would fix the issue, but apparently there are more problems remaining. Looks like it. I'll look into fixing it, but that is complex. Best, Christian -- Die einzige Art, gegen die Pest zu kämpfen, ist die Ehrlichkeit. -- Albert Camus -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [patch] add watch function to vim debugger
While we are on some features for the debugger can I suggest one (or tell me how to enable it if already there). While debugging my plugins I generally have some terrific print statements as I step through code. If I have to restart Vim I loose all the debugger history of those beautiful echo statements. Is there anyway to maintain and cycle through the history just like I can with the search history and cmd history? Thanks, David -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Issue 319 in vim: New option to not beep with 'showmatch'
Hi Christ! On Sa, 31 Jan 2015, Christ van Willegen wrote: On Sat, Jan 31, 2015 at 9:49 PM, Christian Brabandt cbli...@256bit.org wrote: Hi Bram! On Sa, 31 Jan 2015, Bram Moolenaar wrote: I think this was a single letter flag in the first implementation, it should now be a word. Yes, this is fixed now with the last patch. But not yet in the documentation at the top of the diff... Also I'd suggest: - This is most usefule, to finetune - This is most useful to finetune Thanks. Updated patch attached. Best, Christian -- Wie man sein Kind nicht nennen sollte: Chris Baum-Kugel -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1124,6 +1124,44 @@ A jump table for the options with a shor expression evaluates to a |List| this is equal to using each List item as a string and putting \n in between them. + *'belloff'* *'bo'* +'belloff' 'bo' string (default ) + global + {not in Vi} + Specifies for which events the bell will not be rung. It is a comma + separated list of items. For each item that is present, the bell + will be silenced. This is most useful to specify specific events in + insert mode to be silenced. + + item meaning when present ~ + all all events + backspace When pressing BS or Del and deleting results in an + error + cursor Fail to move around using the cursor keys or + PageUp/PageDown in |Insert-mode|. + completeError occured when using |i_CTRL-X_CTRL-K| or |i_CTRL-X_CTRL-T| + copy can't copy char from insert mode using i_CTRL-Y or i_CTRL-E + ctrlg unknown Char after C-G in Insert mode + error other Error occured (e.g. try to join last line) + (mostly used in |Normal-mode| or |Cmdline-mode|) + esc hitting Esc in |Normal-mode| + ex In |Visual-mode|, Hitting |Q| + hangul error occued when using hangul input + insertmode pressing Esc in 'insertmode' + lang calling the beep module for Lua/Mzschem/TCL + mess can't |g| + showmatch 'showmatch' error (when no match is found) + operatorempty region error |cpo-E| + registerUnknown register after C-R in |Insert-mode|. + shell Bell from shell output |:!| + spell Error on spell suggest + wildmodeMore matches in wild mode available + + This is most useful, to finetune when in insert mode the bell should + be rung. For normal mode and ex commands, the bell is often rung to + indicate that an error occured. It can be silenced by adding the + error keyword. + *'binary'* *'bin'* *'nobinary'* *'nobin'* 'binary' 'bin' boolean (default off) local to buffer @@ -2709,7 +2747,8 @@ A jump table for the options with a shor makes a difference for error messages, the bell will be used always for a lot of errors without a message (e.g., hitting Esc in Normal mode). See 'visualbell' on how to make the bell behave like a beep, - screen flash or do nothing. + screen flash or do nothing. See 'belloff' to finetune when to ring the + bell. *'errorfile'* *'ef'* 'errorfile' 'ef' string (Amiga default: AztecC.Err, diff --git a/src/edit.c b/src/edit.c --- a/src/edit.c +++ b/src/edit.c @@ -973,7 +973,7 @@ do_intr: got_int = FALSE; } else - vim_beep(); + vim_beep(BO_IM); break; } doESCkey: @@ -2201,7 +2201,7 @@ has_compl_option(dict_opt) hl_attr(HLF_E)); if (emsg_silent == 0) { - vim_beep(); + vim_beep(BO_COMPL); setcursor(); out_flush(); ui_delay(2000L, FALSE); @@ -8198,7 +8198,7 @@ ins_reg() } if (regname == NUL || !valid_yank_reg(regname, FALSE)) { - vim_beep(); + vim_beep(BO_REG); need_redraw = TRUE; /* remove the '' */ } else @@ -8216,7 +8216,7 @@ ins_reg() } else if (insert_reg(regname, literally) == FAIL) { - vim_beep(); + vim_beep(BO_REG); need_redraw = TRUE; /* remove the '' */ } else if (stop_insert_mode) @@ -8290,7 +8290,7 @@ ins_ctrl_g() break; /* Unknown CTRL-G command, reserved for future expansion. */ - default: vim_beep(); + default: vim_beep(BO_CTRLG); } } @@ -8716,12 +8716,12 @@ ins_del() temp = curwin-w_cursor.col; if (!can_bs(BS_EOL) /* only if eol included */ || do_join(2, FALSE, TRUE, FALSE, FALSE) == FAIL) - vim_beep(); + vim_beep(BO_BS); else curwin-w_cursor.col = temp; } -else if (del_char(FALSE) == FAIL) /* delete char under cursor */ - vim_beep(); +else if (del_char(FALSE) == FAIL)
Re: [patch] add watch function to vim debugger
On Sat, Jan 31, 2015 at 09:24:26PM +0100, Christian Brabandt wrote: Hi Bram! On Sa, 31 Jan 2015, Bram Moolenaar wrote: Christian Brabandt wrote: Bram, Charles asked me, if I could extend the vim debugger and add a watch feature, so it would be easier for him to debug netrw issues. So here is the patch: https://github.com/chrisbra/vim-mq-patches/blob/master/watchexpr As far as I know, Charles has already tested it successfully. Test suite is run successfully Thanks, this sounds really useful! It's not quite clear to me how this works: :breaka[dd] expr {string} Sets a breakpoint, that will break whenever the {string} evaluates to true. Example: :breakadd expr g:lnum However, g:lnum is always true (non-zero). Looking at the implementation, it seems that the previous value of g:lnum is stored and the break happens when the value changes. Yes, that is what happens. That sounds like typical behavior for a watch expression on a variable. Perhaps you can add a few more examples. I would think it's also very useful to check the result of any expression. e.g.: breakadd expr tabstop == 4 Which would break just after 'tabstop' was set to 4 or to another value. Obviously this would be slow, evaluating the expression very many times, but manually finding this spot is much slower. This pattern I've usually seen used for a break at a specific place. That is, something like breakadd file 43 .vimrc tabstop == 4 would mean Break on line 43 of .vimrc only if tabstop is 4. That being said, both capabilities have their uses and would be handy additions. Cheers, -- James GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy james...@jamessan.com -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [7.4.50] [BUG] (G)Vim exits Insert mode after I type letter U+00F2
On Wed, Jan 28, 2015 at 5:27 AM, Nony Sense khang.soc...@gmail.com wrote: Hi, When I typed the letter U+00F2 (latin small letter o with grave) with input methods active, and pressed space bar, vim (and gvim) automatically exited insert mode, returned back to normal mode. Only 1 space character was added as the cursor moved forward, the letter didn't appear. To type the letter U+00F2, with input methods on, I would type in insert mode 'o' then '2' then 'spacebar'. The input methods that I have tried : scim version : 1.4.14 scim-unikey : 0.3.1 scim-vi-vni : built-in ibus verion : 1.3.19 ibus-unikey : 0.5.1 With normal Vim and XTerm please do the similar tasks as below. Steps to reproduce (with Gvim): With scim 1. Setup scim 2. environment GTK_IM_MODULE=scim GTK_IM_MODULE_FILE=to-the-correct-immodules.cache (or similar filename) 3. In scim setup Global Setup, disable all but Vietnamese. 4. Now assuming gvim and scim is ready. In gvim, 'i' to go to insert mode. Press Ctrl-Space to activate scim, then choose Vietnamese-vi-vni in scim toolbar. (or Vietnamese-Unikey, and choose vni instead of telex) Then type 'o' then '2' then space. 5. Gvim should go back to normal mode while it should have shown letter ò (letter U+00F2) instead. With ibus, the procedure is similar. Here is what I saw with :set verbose=20 : after typing 'o','2','spacebar' with scim activated: I can not reproduce the problem with ibus on ubuntu. ubuntu 14.10 ibus 1.5.8-2ubuntu2 ibus-unikey 0.6.1-1build2 vim 7.4.050 Is it still reproducible with gvim -u NONE (no vimrc, no plugins)? -- Yukihiro Nakadaira - yukihiro.nakada...@gmail.com -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.