Re: Vim 8 pre-announcement
Christian: > Hi skywind3000! > > On Di, 23 Aug 2016, skywind3000 wrote: > > > so Can I have a command ':bell' to ring the bell to notify myself that my > > async-build job has finished and I should check the quickfix output now > > while I am focusing on editing or navigating source. > > You mean like > :com Bell exe "norm! \" very tricky !! That's what I need -- -- 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: Vim 8 pre-announcement
Hi skywind3000! On Di, 23 Aug 2016, skywind3000 wrote: > so Can I have a command ':bell' to ring the bell to notify myself that my > async-build job has finished and I should check the quickfix output now while > I am focusing on editing or navigating source. You mean like :com Bell exe "norm! \" or :com! Bell :sil! !printf "\a" of course you can also use mplayer or some other console command to play something (preferably in the background) Best, Christian -- Manche Menschen sind wie ein offenes Buch: lauter leere Seiten. -- -- 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: Vim 8 pre-announcement
> Bram: > > > Work on Vim 8.0 is coming close to an end. I hope version 8.0 can be > > released in about two weeks. > > > > This is a last chance to modify new features in a way that is not > > backwards compatible. Once 8.0 is out we can't make changes that would > > break plugins. > > > > > Visual C++ 6 can play a sound when build stop. > > so Can I have a command ':bell' to ring the bell to notify myself that my > async-build job has finished and I should check the quickfix output now while > I am focusing on editing or navigating source. afplay or other command line utilities could be used to play a .wav file in the desktop gvim, but there is no way to make a voice in a terminal vim. -- -- 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: Vim 8 pre-announcement
Bram: > Work on Vim 8.0 is coming close to an end. I hope version 8.0 can be > released in about two weeks. > > This is a last chance to modify new features in a way that is not > backwards compatible. Once 8.0 is out we can't make changes that would > break plugins. > Visual C++ 6 can play a sound when build stop. so Can I have a command ':bell' to ring the bell to notify myself that my async-build job has finished and I should check the quickfix output now while I am focusing on editing or navigating source. -- -- 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: Vim 8 pre-announcement
Christian Brabandt wrote: > On Di, 16 Aug 2016, Bram Moolenaar wrote: > > > An overview of new features can be found in: > > https://github.com/vim/vim/blob/master/runtime/doc/version8.txt > > A version with links (but a day older): > > http://vimhelp.appspot.com/version8.txt.html > > Hm, > ,[ :h new-items-8 ]- > | Normal mode commands: > | > | g+g+ go to newer text state N times > | g,g, go to N newer position in change list > | g-g- go to older text state N times > | g;g; go to N older position in change list > | g_g_ cursor to the last CHAR N - 1 lines lower > ` > > Weren't those normal mode commands already available at Vim7? Hmm, it appears they were missing from the index.txt help file, but they were supported. I'll remove them here. -- The real trick is this: to keep the lines as short as possible and keep the size the same yet free from the need for hyphena- Dammit!! (Matthew Winn) /// 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: Vim 8 pre-announcement
Hi Bram! On Di, 16 Aug 2016, Bram Moolenaar wrote: > An overview of new features can be found in: > https://github.com/vim/vim/blob/master/runtime/doc/version8.txt > A version with links (but a day older): > http://vimhelp.appspot.com/version8.txt.html Hm, ,[ :h new-items-8 ]- | Normal mode commands: | | g+g+ go to newer text state N times | g,g, go to N newer position in change list | g-g- go to older text state N times | g;g; go to N older position in change list | g_g_ cursor to the last CHAR N - 1 lines lower ` Weren't those normal mode commands already available at Vim7? Best, Christian -- Die Partei ist die Kampfgemeinschaft von Intimfeinden. -- Helmar Nahr -- -- 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: Vim 8 pre-announcement
On 08/18/2016 02:11 PM, Yegappan Lakshmanan wrote: > On Thu, Aug 18, 2016 at 5:48 AM, Michael Henrywrote: >> I was trying to find something in the help regarding the meaning >> of a "window id". Though there are several functions that >> accept and return these, I can't find anything that defines >> them. >> > > The window identifier is described in windows.txt. I am copying > the description below: Thanks; that's exactly what I was hunting. I've figured out why I couldn't find it in the help. I'd done the following two searches that didn't turn up any hits in windows.txt:: :helpgrep winid :helpgrep window.id I hadn't realized that :helpgrep doesn't pay attention to 'ignorecase', which I've set in my .vimrc. I've since learned from the help on :helpgrep that I should have been using ``\c`` to get case-ignoring behavior like this:: :helpgrep \cwindow.id That finds the sole hit for "window ID" in windows.txt. Thanks again, Michael Henry -- -- 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: Vim 8 pre-announcement
Michael Henry wrote: > On 08/17/2016 01:58 PM, Yegappan Lakshmanan wrote: > > On Wed, Aug 17, 2016 at 4:12 AM, Michael Henry> wrote: > >> I'd like functions that: > >> > >> - Return True if a given window is a QuickFix or Location List > >> window. > >> [...] > > > > The new getwininfo() function can be used to distinguish between > > the quickfix and location list windows. Check the 'quickfix' and the > > 'loclist' keys in the returned dictionary. > > [...] > > > > The getqflist() function returns the window ID of the quickfix window > > (if it is opened). You can check for this. > > [...] > > You can use the getqflist() and getloclist() functions for these. > > > > - Yegappan > > Thanks, Yegappan, that's very helpful. I think these extensions > will make things much smoother. > > I was trying to find something in the help regarding the meaning > of a "window id". Though there are several functions that > accept and return these, I can't find anything that defines > them. > > Perhaps the help could contain a definition of window ID that > answers these questions: It exists in windows.txt. There is no tag, I'll add one. > - How does a window ID differ from a window number? > > - Since getloclist() accepts either a window number or a window > ID for the first argument, these two number spaces must be > non-overlapping; how does Vim ensure this property? > > - Are window IDs unique across tab pages? > > - Are window IDs more permanent in some way than window numbers? > For example, if I rearrange the windows in a tab page, do the > window numbers change but the window IDs remain the same? > That empirically seems to be the case when I move the QuickFix > window around within a tab page; is this guaranteed? The > window id empirically changes when closing and reopening the > QuickFix window and when moving the QuickFix window to another > tab; does that mean that the window ID stays the same until > the window is closed? > > Also, in the help for getwininfo() (vim 7.4.) is this > sentence: > > """ > Without an information about all the windows in all the tab > pages is returned. > """ > > Should that start with "Without {winid}, information about..."? I'll correct that. -- hundred-and-one symptoms of being an internet addict: 32. You don't know what sex three of your closest friends are, because they have neutral nicknames and you never bothered to ask. normal GA /// 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: Vim 8 pre-announcement
Yegappan Lakshmanan wrote: > >> On Wed, Aug 17, 2016 at 2:10 AM, 'Guyzmo' via vim_dev > >>wrote: > >> > On Wed, Aug 17, 2016 at 11:48:23AM +0300, LCD 47 wrote: > >> >> On 16 August 2016, Yegappan Lakshmanan wrote: > >> >> > getbufinfo() > >> >> "options", "signs", and "variables" return lists that are > >> >> potentially > >> >> huge. Perhaps there should be a way to tell getbufinfo() to skip these > >> >> lists; > >> >> otherwise plugins would just avoid calling this function, for > >> >> performance > >> >> reasons. > >> > > >> > I share the opinion that having a mechanism to select and/or exclude > >> > keys from the dict to avoid loading and carrying around huge dicts > >> > sounds a great thing. > >> > > >> >> > gettabinfo() > >> >> > getwininfo() > >> >> > >> >> From the manual: > >> >> > >> >> : Each List item is a Dictionary with the following entries: > >> >> : bufnum number of buffer in the window > >> >> : height window height > >> >> : loclist 1 if showing a location list > >> >> : {only with the +quickfix feature} > >> >> : nr window number > >> >> : options dictionary of window local options > >> >> : quickfix1 if quickfix or location list > >> >> window > >> >> : {only with the +quickfix feature} > >> >> : tpnrtab page number > >> >> : variables dictionary of window local > >> >> variables > >> >> : width window width > >> >> : winid window ID > >> >> > >> >> Perhaps "tpnr" should be renamed to something more suggestive, such > >> >> as > >> >> "tabnr"? > >> > > >> > I guess this should apply also for the window, as `winnr` for example, > >> > for consistency in the keys naming scheme. > >> > > >> > >> Note that window ID is different from window number. The getwininfo() > >> function returns both the window ID (winid field) and the window > >> number (nr field). Are you suggesting to rename the "nr" field to winnr? > > > > In most places "winnr" is used. And also "bufnr" instead of "nr" for > > buffers. getqflist() also uses "bufnr". And uses "nr" for the quickfix > > list nr (that's OK). > > > > I am attaching a patch to rename the keys returned by the getbufinfo(), > gettabinfo() and getwininfo() functions. Thanks! -- Due knot trussed yore spell chequer two fined awl miss steaks. /// 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: Vim 8 pre-announcement
Roland Puntaier wrote: > I was wondering whether you could also include into Vim 8 the following patch > (the original reason for pull request https://github.com/vim/vim/pull/543, > which you can reject, since the langmap part doesn't seem to have a chance > in, anyway) > The behavior this patch tries to achieve is given by the test case in > the patch. This is the wrong solution, it is not backwards compatible and will cause problems. The todo list mentions the right solution: - in vgetorpeek() apply langmap to the typeahead buffer and put the result in a copy-buffer, only when langmap is appropriate for the current mode. Then check for mapping and let gotchars() work on the copy-buffer. - Remove LANGMAP_ADJUST() in other parts of the code. Make sure the mode is covered by the above change. So that replaying the register doesn't use keymap/langmap and still does the same thing. I know this is much more difficult to implement, but we should not include a bad hack for that reason. -- If you put 7 of the most talented OSS developers in a room for a week and asked them to fix a bug in a spreadsheet program, in 1 week you'd have 2 new mail readers and a text-based web browser. /// 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: Vim 8 pre-announcement
Hi, On Thu, Aug 18, 2016 at 5:48 AM, Michael Henrywrote: > On 08/17/2016 01:58 PM, Yegappan Lakshmanan wrote: >> On Wed, Aug 17, 2016 at 4:12 AM, Michael Henry > wrote: >>> I'd like functions that: >>> >>> - Return True if a given window is a QuickFix or Location List >>> window. >>> [...] >> >> The new getwininfo() function can be used to distinguish between >> the quickfix and location list windows. Check the 'quickfix' and the >> 'loclist' keys in the returned dictionary. >> [...] >> >> The getqflist() function returns the window ID of the quickfix window >> (if it is opened). You can check for this. >> [...] >> You can use the getqflist() and getloclist() functions for these. >> >> - Yegappan > > Thanks, Yegappan, that's very helpful. I think these extensions > will make things much smoother. > > I was trying to find something in the help regarding the meaning > of a "window id". Though there are several functions that > accept and return these, I can't find anything that defines > them. > The window identifier is described in windows.txt. I am copying the description below: Each window has a unique identifier called the window ID. This identifier will not change within a Vim session. The |win_getid()| and |win_id2tabwin()| functions can be used to convert between the window/tab number and the identifier. There is also the window number, which may change whenever windows are opened or closed, see |winnr()|. > > Perhaps the help could contain a definition of window ID that > answers these questions: > > - How does a window ID differ from a window number? > As described above, the ID of a window is unique in a Vim session. OTOH, the window number can change as new windows are created and existing windows are closed. > > - Since getloclist() accepts either a window number or a window > ID for the first argument, these two number spaces must be > non-overlapping; how does Vim ensure this property? > The window identifiers are internally assigned values greater than 1000 (assuming that the number of windows will be less than 1000). > > - Are window IDs unique across tab pages? > Yes. The window IDs are unique across all the tab pages. > > - Are window IDs more permanent in some way than window numbers? > For example, if I rearrange the windows in a tab page, do the > window numbers change but the window IDs remain the same? > Yes. The window numbers will change as you add/remove windows. > > That empirically seems to be the case when I move the QuickFix > window around within a tab page; is this guaranteed? The > window id empirically changes when closing and reopening the > QuickFix window and when moving the QuickFix window to another > tab; does that mean that the window ID stays the same until > the window is closed? > Yes. Each newly opened window is assigned a unique identifier. > > Also, in the help for getwininfo() (vim 7.4.) is this > sentence: > > """ > Without an information about all the windows in all the tab > pages is returned. > """ > > Should that start with "Without {winid}, information about..."? > Yes. The help text needs to be corrected. - Yegappan > > Thanks, > Michael Henry > -- -- 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: Vim 8 pre-announcement
> On 18 August 2016, Luc Hermittewrote: > > Another point on the qflist topic is bugging me. IIRC, when an > > error is detected, the type flag is set to 'E'. But how is error > > detection done? Is it when the message 'error:' is detected? > > What about when the locale is in another language like 'fr_FR'? > > In this case, the error messages start with "erreur: ", warnings > > with "attention: ". I guess similar issues may happen in all > > other languages. > > > > Has anybody an idea how to solve error/warning detection when the > > system is not in English? (My ultimate objective is to fill the > > error and message counters displayed by the airline plugin in the qf > > window status line) > > Set LC_MESSAGES to C before running your program: > > https://goo.gl/tMPUdV > > Less than ideal, but it makes parsing possible. Of course, I'm aware of this solution -- which I use regularly as I can't stand the translation of compilation errors. What I was hoping, is a end-user friendly solution: one that implies as few tweaks as possible to fully take advantage of my plugin. -- Luc Hermitte -- -- 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: Vim 8 pre-announcement
On 18 August 2016, Luc Hermittewrote: > Another point on the qflist topic is bugging me. IIRC, when an error > is detected, the type flag is set to 'E'. But how is error detection > done? Is it when the message 'error:' is detected? What about when the > locale is in another language like 'fr_FR'? In this case, the error > messages start with "erreur: ", warnings with "attention: ". I guess > similar issues may happen in all other languages. > > Has anybody an idea how to solve error/warning detection when the > system is not in English? (My ultimate objective is to fill the error > and message counters displayed by the airline plugin in the qf window > status line) Set LC_MESSAGES to C before running your program: https://goo.gl/tMPUdV Less than ideal, but it makes parsing possible. /lcd -- -- 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: Vim 8 pre-announcement
Hi, > De: "Yegappan Lakshmanan"> I am in particular interested in any comments/suggestions about the > following new functions: > > getqflist() > setqflist() I've been playing in my build-tools-wrapper plugin (*) with the new job + setqflist functions. I've to say: good job, and thank you all! However, the fact that calling setqflist() with the old interface changes the qf window title is a bit cumbersome. Once I've found it was easy to fix from my plugin. Another point on the qflist topic is bugging me. IIRC, when an error is detected, the type flag is set to 'E'. But how is error detection done? Is it when the message 'error:' is detected? What about when the locale is in another language like 'fr_FR'? In this case, the error messages start with "erreur: ", warnings with "attention: ". I guess similar issues may happen in all other languages. Has anybody an idea how to solve error/warning detection when the system is not in English? (My ultimate objective is to fill the error and message counters displayed by the airline plugin in the qf window status line) (*) https://github.com/LucHermitte/vim-build-tools-wrapper/tree/job-compile -- Luc Hermitte -- -- 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: Vim 8 pre-announcement
On 08/17/2016 01:58 PM, Yegappan Lakshmanan wrote: > On Wed, Aug 17, 2016 at 4:12 AM, Michael Henrywrote: >> I'd like functions that: >> >> - Return True if a given window is a QuickFix or Location List >> window. >> [...] > > The new getwininfo() function can be used to distinguish between > the quickfix and location list windows. Check the 'quickfix' and the > 'loclist' keys in the returned dictionary. > [...] > > The getqflist() function returns the window ID of the quickfix window > (if it is opened). You can check for this. > [...] > You can use the getqflist() and getloclist() functions for these. > > - Yegappan Thanks, Yegappan, that's very helpful. I think these extensions will make things much smoother. I was trying to find something in the help regarding the meaning of a "window id". Though there are several functions that accept and return these, I can't find anything that defines them. Perhaps the help could contain a definition of window ID that answers these questions: - How does a window ID differ from a window number? - Since getloclist() accepts either a window number or a window ID for the first argument, these two number spaces must be non-overlapping; how does Vim ensure this property? - Are window IDs unique across tab pages? - Are window IDs more permanent in some way than window numbers? For example, if I rearrange the windows in a tab page, do the window numbers change but the window IDs remain the same? That empirically seems to be the case when I move the QuickFix window around within a tab page; is this guaranteed? The window id empirically changes when closing and reopening the QuickFix window and when moving the QuickFix window to another tab; does that mean that the window ID stays the same until the window is closed? Also, in the help for getwininfo() (vim 7.4.) is this sentence: """ Without an information about all the windows in all the tab pages is returned. """ Should that start with "Without {winid}, information about..."? Thanks, Michael Henry -- -- 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: Vim 8 pre-announcement
On 17 August 2016, Yegappan Lakshmananwrote: > Hi, > > On Wed, Aug 17, 2016 at 1:48 AM, LCD 47 wrote: > > On 16 August 2016, Yegappan Lakshmanan wrote: > >> I am in particular interested in any comments/suggestions about the > >> following new functions: [...] > >> getqflist() > > > > The manual could use some rephrasing. As it is, it sounds > > unnatural even to my broken English. > > > > Any particular text in the help that is confusing? [...] I didn't say it was confusing. Not trying to nitpick, but take f.i. these two phrases: : When there is no error list or it's empty an empty list is : returned. Quickfix list entries with non-existing buffer : number are returned with "bufnr" set to zero. The rest of the entry doesn't seem substantially better, either. /lcd -- -- 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: Vim 8 pre-announcement
2016-08-18 0:17 GMT+03:00 Bram Moolenaar: > > Skywind3000 wrote: > >> > Hello Vim users, >> > >> > Work on Vim 8.0 is coming close to an end. I hope version 8.0 can be >> > released in about two weeks. >> > >> > This is a last chance to modify new features in a way that is not >> > backwards compatible. Once 8.0 is out we can't make changes that would >> > break plugins. >> >> Can we have a binary mode in channels ? Which could be used to implement >> a virtual terminal inside vim in VimScript. >> >> According to the ":help channel", There is a "raw" mode in channels, but it >> will treat the whole message as a string, not a binary data. > > Raw mode is nearly binary. The only limitation I'm aware of is that it > can't handle NUL bytes. And since there is no way to deal with binary > data anyway in Vim script, it's probably the only thing possible. Neovim handled this just fine from the very beginning: just callback receives not a string, but a `readfile(,'b')`-style list. Though it led to some confusion (line `"abc\n"` may be received as `['abc', '']` or `['ab']` and `['c', '']`, but some plugin authors thought that Neovim is waiting for line to finish, so `'ab'` in the second example is the whole line), this is the only normal way to represent binary data in VimL. Another variant is a list like `[0x61, 0x62, 0x63, 0x0A]` which has very high overhead. > > An alternative is NL mode, then you get lines at a time where NUL bytes > have been changed to NL bytes. But it will be stuck waiting for the > next NL. > > -- > This planet has -- or rather had -- a problem, which was this: most > of the people living on it were unhappy for pretty much of the time. > Many solutions were suggested for this problem, but most of these > were largely concerned with the movements of small green pieces of > paper, which is odd because on the whole it wasn't the small green > pieces of paper that were unhappy. > -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" > > /// 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. -- -- 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: Vim 8 pre-announcement
Skywind3000 wrote: > > Hello Vim users, > > > > Work on Vim 8.0 is coming close to an end. I hope version 8.0 can be > > released in about two weeks. > > > > This is a last chance to modify new features in a way that is not > > backwards compatible. Once 8.0 is out we can't make changes that would > > break plugins. > > Can we have a binary mode in channels ? Which could be used to implement > a virtual terminal inside vim in VimScript. > > According to the ":help channel", There is a "raw" mode in channels, but it > will treat the whole message as a string, not a binary data. Raw mode is nearly binary. The only limitation I'm aware of is that it can't handle NUL bytes. And since there is no way to deal with binary data anyway in Vim script, it's probably the only thing possible. An alternative is NL mode, then you get lines at a time where NUL bytes have been changed to NL bytes. But it will be stuck waiting for the next NL. -- This planet has -- or rather had -- a problem, which was this: most of the people living on it were unhappy for pretty much of the time. Many solutions were suggested for this problem, but most of these were largely concerned with the movements of small green pieces of paper, which is odd because on the whole it wasn't the small green pieces of paper that were unhappy. -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" /// 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: Vim 8 pre-announcement
Thinca wrote: > :help job-term says: > > *job-term* > "term": "open"Start a terminal and connect the job > stdin/stdout/stderr to it. > NOTE: Not implemented yet! > > This is not implemented yet. Is this not implemented in Vim 8.0? It would be useful, especially when running a job that has output. Or when it prompts for input. It's not so easy to do. At least in a way that it works on most systems. But, if someone sends a patch... -- The technology involved in making anything invisible is so infinitely complex that nine hundred and ninety-nine billion, nine hundred and ninety-nine million, nine hundred and ninety-nine thousand, nine hundred and ninety-nine times out of a trillion it is much simpler and more effective just to take the thing away and do without it. -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" /// 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: Vim 8 pre-announcement
Andy Wokula wrote: > Am 16.08.2016 um 18:43 schrieb Bram Moolenaar: > > Hello Vim users, > > > > Work on Vim 8.0 is coming close to an end. I hope version 8.0 can be > > released in about two weeks. > > > > This is a last chance to modify new features in a way that is not > > backwards compatible. Once 8.0 is out we can't make changes that would > > break plugins. > > Can we have 'langnoremap' renamed to 'langremap' please? > > Double negation is confusing. > > And it's more consistent with 'remap' (although that option should be removed > ...). I agree that double negative is confusing. I don't recall why we got to the current name. Changing it now will cause some trouble for those who are using it, but not changing it may be worse. -- Time is an illusion. Lunchtime doubly so. -- Ford Prefect, in Douglas Adams' "The Hitchhiker's Guide to the Galaxy" /// 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: Vim 8 pre-announcement
Yegappan Lakshmanan wrote: > On Wed, Aug 17, 2016 at 2:10 AM, 'Guyzmo' via vim_dev >wrote: > > On Wed, Aug 17, 2016 at 11:48:23AM +0300, LCD 47 wrote: > >> On 16 August 2016, Yegappan Lakshmanan wrote: > >> > getbufinfo() > >> "options", "signs", and "variables" return lists that are potentially > >> huge. Perhaps there should be a way to tell getbufinfo() to skip these > >> lists; > >> otherwise plugins would just avoid calling this function, for performance > >> reasons. > > > > I share the opinion that having a mechanism to select and/or exclude > > keys from the dict to avoid loading and carrying around huge dicts > > sounds a great thing. > > > >> > gettabinfo() > >> > getwininfo() > >> > >> From the manual: > >> > >> : Each List item is a Dictionary with the following entries: > >> : bufnum number of buffer in the window > >> : height window height > >> : loclist 1 if showing a location list > >> : {only with the +quickfix feature} > >> : nr window number > >> : options dictionary of window local options > >> : quickfix1 if quickfix or location list window > >> : {only with the +quickfix feature} > >> : tpnrtab page number > >> : variables dictionary of window local variables > >> : width window width > >> : winid window ID > >> > >> Perhaps "tpnr" should be renamed to something more suggestive, such as > >> "tabnr"? > > > > I guess this should apply also for the window, as `winnr` for example, > > for consistency in the keys naming scheme. > > > > Note that window ID is different from window number. The getwininfo() > function returns both the window ID (winid field) and the window > number (nr field). Are you suggesting to rename the "nr" field to winnr? In most places "winnr" is used. And also "bufnr" instead of "nr" for buffers. getqflist() also uses "bufnr". And uses "nr" for the quickfix list nr (that's OK). -- Tips for aliens in New York: Land anywhere. Central Park, anywhere. No one will care or indeed even notice. -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" /// 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: Vim 8 pre-announcement
Hello Bram, On 8/16/2016 6:43 PM, Bram Moolenaar wrote: > Hello Vim users, > > Work on Vim 8.0 is coming close to an end. I hope version 8.0 can be > released in about two weeks. > > This is a last chance to modify new features in a way that is not > backwards compatible. Once 8.0 is out we can't make changes that would > break plugins. > > An overview of new features can be found in: > https://github.com/vim/vim/blob/master/runtime/doc/version8.txt > A version with links (but a day older): > http://vimhelp.appspot.com/version8.txt.html > > Please review the new features, try them out and report what should be > changed on the vim-dev maillist. Of course you should also report bugs > you find. > > Happy Vimming! > > > PS. If you are interested in meeting Vim users: Vimfest is happening in > Berlin Sept. 16-18. http://vimfest.org I was wondering whether you could also include into Vim 8 the following patch (the original reason for pull request https://github.com/vim/vim/pull/543, which you can reject, since the langmap part doesn't seem to have a chance in, anyway) The behavior this patch tries to achieve is given by the test case in the patch. diff --git src/getchar.c src/getchar.c index 1c170cc..ce68a2f 100644 --- src/getchar.c +++ src/getchar.c @@ -2144,12 +2144,15 @@ vgetorpeek(int advance) /* * Only consider an entry if the first character * matches and it is for the current state. - * Skip ":lmap" mappings if keys were mapped. */ if (mp->m_keys[0] == c1 && (mp->m_mode & local_State) -&& ((mp->m_mode & LANGMAP) == 0 -|| typebuf.tb_maplen == 0)) + /* && ((mp->m_mode & LANGMAP) == 0 || typebuf.tb_maplen == 0) + * Used to skip ":lmap" mappings for keymap'ed keys here, + * but the result of the keymap is not placed in the register, + * so the register content needs to be remapped here. + */ + ) { #ifdef FEAT_LANGMAP intnomap = nolmaplen; diff --git src/testdir/test_digraph.vim src/testdir/test_digraph.vim index 9550085..3578ced 100644 --- src/testdir/test_digraph.vim +++ src/testdir/test_digraph.vim @@ -450,6 +450,20 @@ func! Test_loadkeymap() bw! endfunc +func! Test_registerkeymap() + if !has('keymap') +return + endif + new + set keymap=russian-jcukenwin + set iminsert=1 + call feedkeys("qqods\qdd@q", 'tx') + call assert_equal("вы", getline('.')) + " reset keymap and encoding option + set keymap= + bw! +endfunc + func! Test_digraph_cmndline() " Create digraph on commandline " This is a hack, to let Vim create the digraph in commandline mode -- -- 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: Vim 8 pre-announcement
On Wed, Aug 17, 2016 at 10:54:17AM -0700, Yegappan Lakshmanan wrote: > On Wed, Aug 17, 2016 at 2:10 AM, 'Guyzmo' via vim_dev >wrote: > > On Wed, Aug 17, 2016 at 11:48:23AM +0300, LCD 47 wrote: > >> On 16 August 2016, Yegappan Lakshmanan wrote: > >> Perhaps "tpnr" should be renamed to something more suggestive, such as > >> "tabnr"? > > I guess this should apply also for the window, as `winnr` for example, > > for consistency in the keys naming scheme. > Note that window ID is different from window number. The getwininfo() > function returns both the window ID (winid field) and the window > number (nr field). Are you suggesting to rename the "nr" field to winnr? yup, that's what I meant, no confusion. Consistency and all ☺ -- Guyzmo -- -- 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: Vim 8 pre-announcement
Hi, On Wed, Aug 17, 2016 at 4:12 AM, Michael Henrywrote: > On 08/17/2016 12:00 AM, Yegappan Lakshmanan wrote: >> I am in particular interested in any comments/suggestions about the > following >> new functions: >> >> getbufinfo() >> gettabinfo() >> getwininfo() >> getqflist() >> setqflist() >> getcompletion() > > I've got some custom functions in my .vimrc related to QuickFix > and Location List windows. They are clunky and inefficient > because as far as I can tell, Vim doesn't expose quite enough > information. I've included the functions below for reference. > > I haven't been able to track all of the new developments, but > perhaps someone can say whether there is a better way than the > below functions (either with pre-existing or recently added Vim > functionality). I'd like functions that: > > - Return True if a given window is a QuickFix or Location List > window. (Both types of window have == "quickfix".) > The new getwininfo() function can be used to distinguish between the quickfix and location list windows. Check the 'quickfix' and the 'loclist' keys in the returned dictionary. > > - Return True if the QuickFix is window open. > The getqflist() function returns the window ID of the quickfix window (if it is opened). You can check for this. > > - Return True if the Location List window is open for a given > window. > You can use the getloclist() function for this. > > - Return the window number of the QuickFix window (0 if not > open). > - Return the window number of the associated Location List > for a given window (0 if not open). > You can use the getqflist() and getloclist() functions for these. - Yegappan > > When the current window has `` == "quickfix"``, I'd > originally tried to determine whether it was a QuickFix window > or a Location List using ``getloclist(0)``. I'd wanted to say > ``isLocationList = (getloclist(0) > 0)``, but that fails when > it's a Location List that happens to be empty, so I resorted to > the uglier hacks you see below. > > I thought I'd seen some activity along these lines that might > expose the details directly, but I haven't been keeping up with > all of the new changes. > > Michael Henry > -- -- 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: Vim 8 pre-announcement
Hi, On Wed, Aug 17, 2016 at 2:10 AM, 'Guyzmo' via vim_devwrote: > On Wed, Aug 17, 2016 at 11:48:23AM +0300, LCD 47 wrote: >> On 16 August 2016, Yegappan Lakshmanan wrote: >> > getbufinfo() >> "options", "signs", and "variables" return lists that are potentially >> huge. Perhaps there should be a way to tell getbufinfo() to skip these >> lists; >> otherwise plugins would just avoid calling this function, for performance >> reasons. > > I share the opinion that having a mechanism to select and/or exclude > keys from the dict to avoid loading and carrying around huge dicts > sounds a great thing. > >> > gettabinfo() >> > getwininfo() >> >> From the manual: >> >> : Each List item is a Dictionary with the following entries: >> : bufnum number of buffer in the window >> : height window height >> : loclist 1 if showing a location list >> : {only with the +quickfix feature} >> : nr window number >> : options dictionary of window local options >> : quickfix1 if quickfix or location list window >> : {only with the +quickfix feature} >> : tpnrtab page number >> : variables dictionary of window local variables >> : width window width >> : winid window ID >> >> Perhaps "tpnr" should be renamed to something more suggestive, such as >> "tabnr"? > > I guess this should apply also for the window, as `winnr` for example, > for consistency in the keys naming scheme. > Note that window ID is different from window number. The getwininfo() function returns both the window ID (winid field) and the window number (nr field). Are you suggesting to rename the "nr" field to winnr? - Yegappan > > just my $.02, > > -- > Guyzmo -- -- 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: Vim 8 pre-announcement
Hi, On Wed, Aug 17, 2016 at 1:48 AM, LCD 47wrote: > On 16 August 2016, Yegappan Lakshmanan wrote: >> I am in particular interested in any comments/suggestions about the following >> new functions: >> >> getbufinfo() > > From the manual: > > : Each returned List item is a dictionary with the following > : entries: > : changed TRUE if the buffer is modified. > : changedtick number of changes made to the buffer. > : hidden TRUE if the buffer is hidden. > : listed TRUE if the buffer is listed. > : lnumcurrent line number in buffer. > : loaded TRUE if the buffer is loaded. > : namefull path to the file in the buffer. > : nr buffer number. > : options dictionary of buffer local options. > : signs list of signs placed in the buffer. > : Each list item is a dictionary with > : the following fields: > : idsign identifier > : lnum line number > : name sign name > : variables dictionary of buffer local variables. > : windows list of window IDs with this buffer > > "options", "signs", and "variables" return lists that are potentially > huge. Perhaps there should be a way to tell getbufinfo() to skip these lists; > otherwise plugins would just avoid calling this function, for performance > reasons. > We can use the dict argument to the getbufinfo() function to specify what to return. The default is to return everything like above. I will send a patch for this. > > On the other hand, finding the number of lines in a buffer as "line('$')" > is very inefficient, so maybe this would be a good place to return it. But > again, as an option, since it would involve loading the buffer. > >> gettabinfo() >> getwininfo() > > From the manual: > > : Each List item is a Dictionary with the following entries: > : bufnum number of buffer in the window > : height window height > : loclist 1 if showing a location list > : {only with the +quickfix feature} > : nr window number > : options dictionary of window local options > : quickfix1 if quickfix or location list window > : {only with the +quickfix feature} > : tpnrtab page number > : variables dictionary of window local variables > : width window width > : winid window ID > > Perhaps "tpnr" should be renamed to something more suggestive, such as > "tabnr"? > This can be changed. > >> getqflist() > > The manual could use some rephrasing. As it is, it sounds unnatural even > to my broken English. > Any particular text in the help that is confusing? > >> setqflist() >> getcompletion() > > Again, getcompletion() can return some potentially huge lists. Being able > to restrict results to smaller subsets could make this function a lot lighter. > The "pattern" (first argument) can be used to filter the returned results. Is that not sufficient? - Yegappan > > /lcd > -- -- 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: Vim 8 pre-announcement
Am 16.08.2016 um 18:43 schrieb Bram Moolenaar: Hello Vim users, Work on Vim 8.0 is coming close to an end. I hope version 8.0 can be released in about two weeks. This is a last chance to modify new features in a way that is not backwards compatible. Once 8.0 is out we can't make changes that would break plugins. Can we have 'langnoremap' renamed to 'langremap' please? Double negation is confusing. And it's more consistent with 'remap' (although that option should be removed ...). -- Andy -- -- 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: Vim 8 pre-announcement
On 08/17/2016 12:00 AM, Yegappan Lakshmanan wrote: > I am in particular interested in any comments/suggestions about the following > new functions: > > getbufinfo() > gettabinfo() > getwininfo() > getqflist() > setqflist() > getcompletion() I've got some custom functions in my .vimrc related to QuickFix and Location List windows. They are clunky and inefficient because as far as I can tell, Vim doesn't expose quite enough information. I've included the functions below for reference. I haven't been able to track all of the new developments, but perhaps someone can say whether there is a better way than the below functions (either with pre-existing or recently added Vim functionality). I'd like functions that: - Return True if a given window is a QuickFix or Location List window. (Both types of window have == "quickfix".) - Return True if the QuickFix is window open. - Return True if the Location List window is open for a given window. - Return the window number of the QuickFix window (0 if not open). - Return the window number of the associated Location List for a given window (0 if not open). When the current window has `` == "quickfix"``, I'd originally tried to determine whether it was a QuickFix window or a Location List using ``getloclist(0)``. I'd wanted to say ``isLocationList = (getloclist(0) > 0)``, but that fails when it's a Location List that happens to be empty, so I resorted to the uglier hacks you see below. I thought I'd seen some activity along these lines that might expose the details directly, but I haven't been keeping up with all of the new changes. Michael Henry Sample functions for reference " Return 1 if current window is the QuickFix window. function! IsQuickFixWin() if == "quickfix" " This is either a QuickFix window or a Location List window. " Try to open a location list; if this window *is* a location list, " then this will succeed and the focus will stay on this window. " If this is a QuickFix window, there will be an exception and the " focus will stay on this window. try noautocmd lopen catch /E776:/ " This was a QuickFix window. return 1 endtry endif return 0 endfunction " Return 1 if current window is a Location List window. function! IsLocListWin() return ( == "quickfix" && !IsQuickFixWin()) endfunction " Return window number of QuickFix buffer (or zero if not found). function! GetQuickFixWinNum() let qfWinNum = 0 let curWinNum = winnr() for winNum in range(1, winnr("$")) execute "noautocmd " . winNum . "wincmd w" if IsQuickFixWin() let qfWinNum = winNum break endif endfor execute "noautocmd " . curWinNum . "wincmd w" return qfWinNum endfunction " Return 1 if the QuickFix window is open. function! QuickFixWinIsOpen() return GetQuickFixWinNum() > 0 endfunction " Return 1 if current window's location list window is open. function! LocListWinIsOpen() let curWinNum = winnr() let numOpenWindows = winnr("$") " Assume location list window is already open. let isOpen = 1 try noautocmd lopen catch /E776:/ " No location list available; nothing was changed. let isOpen = 0 endtry if numOpenWindows != winnr("$") " We just opened a new location list window. Revert to original " window and close the newly opened window. noautocmd wincmd p noautocmd lclose let isOpen = 0 endif return isOpen endfunction " Open Quickfix window (if not already open). function! Copen() if !QuickFixWinIsOpen() execute "silent botright copen " . g:QuickFixWinHeight endif endfunction " Open QuickFix window using standard position and height. command! -bar Copen call Copen() " Open Location List window (if not already open). function! Lopen() if !LocListWinIsOpen() execute "silent lopen " . g:LocListWinHeight endif endfunction " Open Location List window using standard height. command! -bar Lopen call Lopen() -- -- 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: Vim 8 pre-announcement
On Wed, Aug 17, 2016 at 11:48:23AM +0300, LCD 47 wrote: > On 16 August 2016, Yegappan Lakshmananwrote: > > getbufinfo() > "options", "signs", and "variables" return lists that are potentially > huge. Perhaps there should be a way to tell getbufinfo() to skip these lists; > otherwise plugins would just avoid calling this function, for performance > reasons. I share the opinion that having a mechanism to select and/or exclude keys from the dict to avoid loading and carrying around huge dicts sounds a great thing. > > gettabinfo() > > getwininfo() > > From the manual: > > : Each List item is a Dictionary with the following entries: > : bufnum number of buffer in the window > : height window height > : loclist 1 if showing a location list > : {only with the +quickfix feature} > : nr window number > : options dictionary of window local options > : quickfix1 if quickfix or location list window > : {only with the +quickfix feature} > : tpnrtab page number > : variables dictionary of window local variables > : width window width > : winid window ID > > Perhaps "tpnr" should be renamed to something more suggestive, such as > "tabnr"? I guess this should apply also for the window, as `winnr` for example, for consistency in the keys naming scheme. just my $.02, -- Guyzmo -- -- 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: Vim 8 pre-announcement
On 16 August 2016, Yegappan Lakshmananwrote: > I am in particular interested in any comments/suggestions about the following > new functions: > > getbufinfo() From the manual: : Each returned List item is a dictionary with the following : entries: : changed TRUE if the buffer is modified. : changedtick number of changes made to the buffer. : hidden TRUE if the buffer is hidden. : listed TRUE if the buffer is listed. : lnumcurrent line number in buffer. : loaded TRUE if the buffer is loaded. : namefull path to the file in the buffer. : nr buffer number. : options dictionary of buffer local options. : signs list of signs placed in the buffer. : Each list item is a dictionary with : the following fields: : idsign identifier : lnum line number : name sign name : variables dictionary of buffer local variables. : windows list of window IDs with this buffer "options", "signs", and "variables" return lists that are potentially huge. Perhaps there should be a way to tell getbufinfo() to skip these lists; otherwise plugins would just avoid calling this function, for performance reasons. On the other hand, finding the number of lines in a buffer as "line('$')" is very inefficient, so maybe this would be a good place to return it. But again, as an option, since it would involve loading the buffer. > gettabinfo() > getwininfo() From the manual: : Each List item is a Dictionary with the following entries: : bufnum number of buffer in the window : height window height : loclist 1 if showing a location list : {only with the +quickfix feature} : nr window number : options dictionary of window local options : quickfix1 if quickfix or location list window : {only with the +quickfix feature} : tpnrtab page number : variables dictionary of window local variables : width window width : winid window ID Perhaps "tpnr" should be renamed to something more suggestive, such as "tabnr"? > getqflist() The manual could use some rephrasing. As it is, it sounds unnatural even to my broken Engrish. > setqflist() > getcompletion() Again, getcompletion() can return some potentially huge lists. Being able to restrict results to smaller subsets could make this function a lot lighter. /lcd -- -- 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: Vim 8 pre-announcement
Bram: > Hello Vim users, > > Work on Vim 8.0 is coming close to an end. I hope version 8.0 can be > released in about two weeks. > > This is a last chance to modify new features in a way that is not > backwards compatible. Once 8.0 is out we can't make changes that would > break plugins. Can we have a binary mode in channels ? Which could be used to implement a virtual terminal inside vim in VimScript. According to the ":help channel", There is a "raw" mode in channels, but it will treat the whole message as a string, not a binary data. -- -- 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: Vim 8 pre-announcement
Hi Bram, 2016-08-17 1:43 GMT+09:00 Bram Moolenaar: > > Hello Vim users, > > Work on Vim 8.0 is coming close to an end. I hope version 8.0 can be > released in about two weeks. > > This is a last chance to modify new features in a way that is not > backwards compatible. Once 8.0 is out we can't make changes that would > break plugins. > > An overview of new features can be found in: > https://github.com/vim/vim/blob/master/runtime/doc/version8.txt > A version with links (but a day older): > http://vimhelp.appspot.com/version8.txt.html > > Please review the new features, try them out and report what should be > changed on the vim-dev maillist. Of course you should also report bugs > you find. > > Happy Vimming! > > > PS. If you are interested in meeting Vim users: Vimfest is happening in > Berlin Sept. 16-18. http://vimfest.org > > > -- > How To Keep A Healthy Level Of Insanity: > 9. As often as possible, skip rather than walk. > > /// 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. :help job-term says: *job-term* "term": "open"Start a terminal and connect the job stdin/stdout/stderr to it. NOTE: Not implemented yet! This is not implemented yet. Is this not implemented in Vim 8.0? Thanks, thinca -- -- 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: Vim 8 pre-announcement
Hi all, On Tue, Aug 16, 2016 at 9:43 AM, Bram Moolenaarwrote: > > Hello Vim users, > > Work on Vim 8.0 is coming close to an end. I hope version 8.0 can be > released in about two weeks. > > This is a last chance to modify new features in a way that is not > backwards compatible. Once 8.0 is out we can't make changes that would > break plugins. > > An overview of new features can be found in: > https://github.com/vim/vim/blob/master/runtime/doc/version8.txt > A version with links (but a day older): > http://vimhelp.appspot.com/version8.txt.html > > Please review the new features, try them out and report what should be > changed on the vim-dev maillist. Of course you should also report bugs > you find. > I am in particular interested in any comments/suggestions about the following new functions: getbufinfo() gettabinfo() getwininfo() getqflist() setqflist() getcompletion() Thanks, Yegappan -- -- 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: Vim 8 pre-announcement
On Tue, Aug 16, 2016 at 6:43 PM, Bram Moolenaarwrote: > > Hello Vim users, > > Work on Vim 8.0 is coming close to an end. I hope version 8.0 can be > released in about two weeks. > > This is a last chance to modify new features in a way that is not > backwards compatible. Once 8.0 is out we can't make changes that would > break plugins. > > An overview of new features can be found in: > https://github.com/vim/vim/blob/master/runtime/doc/version8.txt IIUC, ":help version8.txt" in the latest (today's) runtime files gives the same as the above, with the usual Vim hotlinks: double-click a help tag, or put the cursor on it and hit Ctrl-] The current version8.txt is dated 2016 Aug 16 at the end of its first line. > A version with links (but a day older): > http://vimhelp.appspot.com/version8.txt.html > > Please review the new features, try them out and report what should be > changed on the vim-dev maillist. Of course you should also report bugs > you find. > > Happy Vimming! > > > PS. If you are interested in meeting Vim users: Vimfest is happening in > Berlin Sept. 16-18. http://vimfest.org > > > -- > How To Keep A Healthy Level Of Insanity: > 9. As often as possible, skip rather than walk. > > /// 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/// > Best regards, Tony. -- -- 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.