Re: Choices for Vim9 class implementation

2023-01-12 Fir de Conversatie skywind3000
- declaring a class inside a function allows me put related code together - can be used to simulate a closure function. example for java: button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { AsyncTaskRunner runner = new

Re: Choices for Vim9 class implementation

2023-01-12 Fir de Conversatie skywind3000
One more thing about vim9 class: can we define a named or anonymous class inside a function ? That can be used to simulate a closure, And maybe, someday, we can translate javascript or lua to vim9script with this feature. 在2022年12月28日星期三 UTC+8 00:29:24 写道: > > > > > This following currently

Re: Choices for Vim9 class implementation

2022-12-23 Fir de Conversatie skywind3000
Hi Bram, Before everything becomes unchangeable, can I suggest to use "new ClassName" instead of "ClassName.new" to create an instance ? According to the description in `vim9class.txt`: > An object can only be created by a class. A class provides: > - A new() method, the constructor, which

Re: RFC: Support for customizing the text displayed in the quickfix window

2019-12-30 Fir de Conversatie skywind3000
Or use one of: set qbe=* set qbe=$ set qbe=- set qbe=? to distinguish from function names ?? 在 2019年12月31日星期二 UTC+8上午2:20:37,skywind3000写道: > > Please provide a `raw` reserved option for qfbufexpr, and if it is > initialized as: > > set qbe=raw > > J

Re: RFC: Support for customizing the text displayed in the quickfix window

2019-12-30 Fir de Conversatie skywind3000
Please provide a `raw` reserved option for qfbufexpr, and if it is initialized as: set qbe=raw Just keep the original text and don't run any filter function ?? for the speed purpose. And I don't need to write a function! ReturnAsItIs(is_qf, qfid, eidx) if a:isqf

Re: So, how about Vim 9?

2019-12-20 Fir de Conversatie skywind3000
quot;e " . fnameescape(home) endif endfunc noremap :call projectile#go_home() here is the gist: https://gist.github.com/skywind3000/690618557f22de7aaab9aa0226b7edef For old vim compatibility, if a new plugin using projectile.vim want to work in old vims, then can just copy these two fun

Re: So, how about Vim 9?

2019-12-20 Fir de Conversatie skywind3000
to be implement by plugins respectively without any dependency and can also run in old vims. how about this ?? -- 在 2019年12月20日星期五 UTC+8下午8:30:03,Christian Brabandt写道: > > > On Do, 19 Dez 2019, skywind3000 wrote: > > > a `.vim_project` file to mark the project root ? It's

Re: So, how about Vim 9?

2019-12-19 Fir de Conversatie skywind3000
different project roots for the same file. what a mess ? 在 2019年12月20日星期五 UTC+8上午5:24:09,Gary Johnson写道: > > On 2019-12-19, skywind3000 wrote: > > Please provide a standard way to locate project root directory. > > This is an attractive idea, but there is no standard way to l

Re: So, how about Vim 9?

2019-12-19 Fir de Conversatie skywind3000
Please provide a standard way to locate project root directory. Many famous plugins (including: CtrlP, LeaderF, Fzf, YouCompleteMe, Gutentags, ALE) require to identify the project root of current file. And they don't have standard to follow, So, some of plugins take current directory as

Re: popup window design

2019-05-19 Fir de Conversatie skywind3000
What about implement both of them and give them two different names ? First, implement the list of lines, the api design( https://github.com/vim/vim/blob/957f85d54ebd5a3bd0d930de9603190f0876f977/runtime/doc/popup.txt) is very simple and clear, it requires less work and can give us something to

Re: [proposal] Project Information for vim

2019-02-22 Fir de Conversatie skywind3000
> ### Modifiers > > ``` > %:j- same as v:projectroot, project root directory of current buffer > %:i- file path relative to current project root > ``` > > These modifiers can be used in command line or passing to `expand(xxx)`. More about modifiers: - cd to the project root: :cd %:j

Re: [proposal] Project Information for vim

2019-02-22 Fir de Conversatie skywind3000
在 2019年2月22日星期五 UTC+8下午8:32:40,lith写道: > While a basically agree, wrt > > - root directory > > Why not allow many root markers? Since a VCS directory is usually created in > the project's root directory, these VCS directories would be a natural > choice. The autoproject plugin[1] does it this

[proposal] Project Information for vim

2019-02-22 Fir de Conversatie skywind3000
Readable Page: https://github.com/skywind3000/vim-proposal/blob/master/project_info.md Markdown plain text: # Introducing VSCode's workspace mechanism ## Problem https://github.com/vim/vim/issues/3573#issuecomment-433705924 > It would be great to have a standardized APIs for project-rela

Re: How about a release?

2018-03-12 Fir de Conversatie skywind3000
:52,skywind3000写道: > One thing important for terminal: open file directly in the terminal > > Presume the shell in the vim's terminal and vim itself are always under the > different working directory. It is quite in-productive to switch to > terminal-normal mode and use vim

Re: How about a release?

2018-03-12 Fir de Conversatie skywind3000
One thing important for terminal: open file directly in the terminal Presume the shell in the vim's terminal and vim itself are always under the different working directory. It is quite in-productive to switch to terminal-normal mode and use vim's command to find and open a file. Emacs can

Re: Patch 8.0.1570

2018-03-07 Fir de Conversatie skywind3000
I know what you want, this plugin: http://vimuiex.sourceforge.net/ The plugin uses python + curses library in terminal to provide ui extension, but requires a patch for gvim. If you use terminal vim only, it doesn't require any modification. -- -- You received this message from the

Re: Patch 8.0.1558

2018-03-04 Fir de Conversatie skywind3000
+1 for ":popup PopUp" and ":popup ]something" -- -- 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

Re: RFC: Signature help/argument hints in a second popup menu

2018-02-01 Fir de Conversatie skywind3000
+1 +1 -- -- 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.

Re: Patch 8.0.0695

2017-07-07 Fir de Conversatie skywind3000
"E319: Sorry, the command is not available in this version" -- -- 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

Re: Adding terminal emulator support in Vim

2017-07-05 Fir de Conversatie skywind3000
Another possible choise: http://www.dotnetsurfers.com/blog/2013/12/15/developer-tools-screencast-7-conemu/ -- -- 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

Re: Patch 8.0.0626

2017-06-06 Fir de Conversatie skywind3000
It would be very nice if we can get rid of other flicker in gvim (eg. scrolling). I have tried twice to implement a double buffer for gvim. but failed. MacVim will not flicker and nvim-qt will not flicker too, Is it possible to have a non-flicker gvim ? since it's 2017 now. Erasing and drawing

Re: Asynchronous balloonexpr handling

2017-02-02 Fir de Conversatie skywind3000
在 2017年2月2日星期四 UTC+8下午6:14:37,Davit Samvelyan写道: > Take a look to my fork https://github.com/davits/vim you may find it useful > in your endeavors. > It introduces several function to show balloons at need (works only with gtk): > overlayshow(row, col, [list of items], is_pango_markup) >

Ask for help about implementing double buffer in gui_win32.c

2017-01-16 Fir de Conversatie skywind3000
Recently, I am trying to implement a double buffer for gui_win32.c by: 1. rename s_hdc to s_hdc_real 2. creat a off-screen HDC named s_hdc, all the drawing from gui_win32.c should be redirected to it. 3. BitBlt from s_hdc to s_hdc_real after WndProc, the screen should be updated. It works in

Can I write a patch for gui_win32.c to get rid of flicker in gvim like these ?

2017-01-06 Fir de Conversatie skywind3000
Use gvimevery day, and love it as well. The only thing I can't stand is the flicker. Recently, I am reading the source code of gvim.exe, and realize that the flicker could be eliminated by introducing a double-buffer + dirty-rectangle mechanism: 1. s_dc is initialized by GetDC(s_textArea),

Re: [vim/vim] Is it possible that vim support php like Python? (#1172)

2016-12-24 Fir de Conversatie skywind3000
Rick Woo wrote: > I personally don't think it is worthwile to have yet another language > embedded into Vim. > > Then why put lua, perl, python 2 and 3 and tcl in Vim. > Why phper can't have right or fun like them??? > As I know, even Vim website use php. > Just let php can use like python in

Re: [vim/vim] netrw bug: If toggle banner (hit 'I') is done when the cursor is on the line "Showing/Hiding", the "normal/hiding/show" status is also toggled. (#1333)

2016-12-22 Fir de Conversatie skywind3000
cecamp wrote: > Please try v162h of netrw which I believe fixes this. You can get it from > http://www.drchip.org/astronaut/vim/index.html#NETRW. Thank you for > reporting this. > I love netrw more and more after reading this:

Re: Patch 8.0.0105

2016-12-01 Fir de Conversatie skywind3000
Bram Moolenaar wrote: > Skywind wrote: > > > Bram Moolenaar wrote: > > > > > You can improve this a lot by changing: > > > > > >if ch_canread(ch) > > > let text = ch_read(ch, {'timeout':0}) > > > caddexpr text > > > cbottom > > > endif > > > > > > To: > > > > >

Re: Patch 8.0.0105

2016-12-01 Fir de Conversatie skywind3000
Bram Moolenaar wrote: > You can improve this a lot by changing: > >if ch_canread(ch) > let text = ch_read(ch, {'timeout':0}) > caddexpr text > cbottom > endif > > To: > >if ch_canread(ch) > while ch_canread(ch) > let text = ch_read(ch,

Re: Patch 8.0.0105

2016-11-30 Fir de Conversatie skywind3000
ges are dropped? > I reduced loop times in timerjob.py from 8 to 100 times The full file is still too long, I have uploaded it on gist: https://gist.github.com/skywind3000/3a2f6016240e33e97587e1181563b163 Here is an abbreviated version: start log session 14.983871 : Starting jo

Re: Patch 8.0.0105

2016-11-30 Fir de Conversatie skywind3000
so far doesn't make sense.  > Actually, I already enjoy the fruit; as far as the examples skywind3000 > raised (except the one after 8.0.105) are concerned, the issue appears to be > fixed for me. > > > -- > > -- > > You received this message from the "vim_d

Re: Patch 8.0.0105

2016-11-30 Fir de Conversatie skywind3000
skywind3000 wrote: > we can see: > > 1. there is a "sleep" in the parent process, parent works slower than child. > > 2. calling "write" block the child process successfully when pipe is full > (4096 bytes on linux by default). The child process does no

Re: Patch 8.0.0105

2016-11-30 Fir de Conversatie skywind3000
skywind3000 wrote: > I can sleep longer in timerjob.py, but I can't add a single sleep if I start > grep as a job. And I can't decide how long should I sleep to avoid dropping. latest channel.txt said: Note that if the job exits before you read the output, the output may be lost. This d

Re: Patch 8.0.0105

2016-11-29 Fir de Conversatie skywind3000
Bram Moolenaar wrote: > Patch 8.0.0105 > Problem:When using ch_read() with zero timeout, can't tell the difference > between reading an empty line and nothing available. > Solution: Add ch_canread(). > Files: src/evalfunc.c, src/channel.c, src/proto/channel.pro, >

Re: "ch_read()" couldn't tell the difference between "not enough message" and "a empty line"

2016-11-27 Fir de Conversatie skywind3000
skywind3000 wrote: > Bram Moolenaar wrote: > > > Skywind wrote: > > > > > Bram Moolenaar wrote: > > > > > This will not break the plugins, and will make ch_read better. > > > > > It could be used in a timer for congestion control

Re: "ch_read()" couldn't tell the difference between "not enough message" and "a empty line"

2016-11-27 Fir de Conversatie skywind3000
Bram Moolenaar wrote: > Skywind wrote: > > > Bram Moolenaar wrote: > > > > This will not break the plugins, and will make ch_read better. > > > > It could be used in a timer for congestion control manually. > > > > > > That changes what you get back, that is a bit strange. > > > How about

Re: "ch_read()" couldn't tell the difference between "not enough message" and "a empty line"

2016-11-26 Fir de Conversatie skywind3000
Bram Moolenaar wrote: > > This will not break the plugins, and will make ch_read better. > > It could be used in a timer for congestion control manually. > > That changes what you get back, that is a bit strange. > How about adding a function that returns whether there is something to > read?

Re: "ch_read()" couldn't tell the difference between "not enough message" and "a empty line"

2016-11-25 Fir de Conversatie skywind3000
What about provide an option "nl" in ch_read to make it better ? :call ch_read(mych, {"timeout": 0, "nl":1}) returns "abc\n" for a line "abc" returns "\n" for an empty line returns "" for not enough data This will not break the plugins, and will make ch_read better. It could be used in a timer

Re: "ch_read()" couldn't tell the difference between "not enough message" and "a empty line"

2016-11-25 Fir de Conversatie skywind3000
Thanks for the patch, I wrote a test : (benchjob.vim for starting job, benchjob.py for printing 8 lines) --- benchjob.vim: function! MyCallback(job, text) " make cpu a little busy for i in range(100) for j in range(10)

Re: "ch_read()" couldn't tell the difference between "not enough message" and "a empty line"

2016-11-23 Fir de Conversatie skywind3000
skywind3000 wrote: > The callback of "out_cb" is convenience to use, but has performance issue: > Gui gets freezed if the background job continues outputing massive data (eg, > grep a high frequency word "to" on the documents root, or some crazy stl > errors

"ch_read()" couldn't tell the difference between "not enough message" and "a empty line"

2016-11-23 Fir de Conversatie skywind3000
The callback of "out_cb" is convenience to use, but has performance issue: Gui gets freezed if the background job continues outputing massive data (eg, grep a high frequency word "to" on the documents root, or some crazy stl errors). Vim is busy in receiving the data and invoking "out_cb" which

RFC: Can we have a bang (!) modifier after ":caddexpr" and ":cexpr" ?

2016-10-13 Fir de Conversatie skywind3000
Thanks to the new apis in vim 8. I have just released a plugin "asyncrun" to run a shell command in background and display the output to the quickfix window in realtime: https://github.com/skywind3000/asyncrun.vim This is a better alternative to old "vim-dispatch&q

Re: conflicts with in windows console vim (vim.exe), bug ?

2016-10-09 Fir de Conversatie skywind3000
Marius Gedminas wrote: > > After downloading msys2 and installing gcc, ncurses-devel ... with pacman, > > I started to build latest vim inside msys2, and found these: > > > > checking for tgetent in -ltinfo... (cached) no > > checking for tgetent in -lncurses... (cached) yes > > ncurses library

Re: Does any one know how to build a msys+mintty compatible vim (like vim in GitBash) ?

2016-10-09 Fir de Conversatie skywind3000
Ken Takata wrote: > Not sure. How about installing pkg-config? > You can find the detail log in src/auto/config.log. I can manage to build vim in the msys2 now by clone a refresh vim repository. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below

Re: conflicts with in windows console vim (vim.exe), bug ?

2016-09-23 Fir de Conversatie skywind3000
Magnus Woldrich: > >Thanks, very disappointted with cmd.exe > > Here you go: https://msys2.github.io/ After downloading msys2 and installing gcc, ncurses-devel ... with pacman, I started to build latest vim inside msys2, and found these: checking for tgetent in -ltinfo... (cached) no checking

Re: Does any one know how to build a msys+mintty compatible vim (like vim in GitBash) ?

2016-09-23 Fir de Conversatie skywind3000
Ken Takata wrote: > Hi, > > 2016/9/23 Fri 13:00:40 UTC+9 skywind3000 wrote: > > Ken Takata wrote: > > > Hi, > > > > > > 2016/9/23 Fri 4:46:48 UTC+9 skywind3000 wrote: > > > > Yesterday, I started vim in GitBash (msys+mintty) by chance o

Re: Does any one know how to build a msys+mintty compatible vim (like vim in GitBash) ?

2016-09-22 Fir de Conversatie skywind3000
Ken Takata wrote: > Hi, > > 2016/9/23 Fri 4:46:48 UTC+9 skywind3000 wrote: > > Yesterday, I started vim in GitBash (msys+mintty) by chance on windows. > > and found that vim worked very well in mintty, and mintty is far more > > better than cmd.exe. > >

Does any one know how to build a msys+mintty compatible vim (like vim in GitBash) ?

2016-09-22 Fir de Conversatie skywind3000
Yesterday, I started vim in GitBash (msys+mintty) by chance on windows. and found that vim worked very well in mintty, and mintty is far more better than cmd.exe. Trying to build vim from msys, and only find a cmd.exe compatible version which can not run properly under mintty. Does any body

Re: conflicts with in windows console vim (vim.exe), bug ?

2016-09-22 Fir de Conversatie skywind3000
Marvin Renich wrote: > * skywind3000 <skywind3...@gmail.com> [160921 14:18]: > > has been mapped to something in my vimrc, which works fine in > > win32-gvim/macvim and linux/mac terminal vim (with backspace set to > > 127/ctrl-? ) > > > > but in windows c

Re: Compilation of vim 8 with mingw on windows fails: diff.c:891:12: error: storage size of 'st' isn't known

2016-09-22 Fir de Conversatie skywind3000
Nyffenegger wrote: > I am trying to compile vim 8 on Windows with mingw. > > These are the steps I executed: > > git clone https://github.com/vim/vim.git > cd vim\src > \mingw\bin\mingw32-make.exe -f Make_ming.mak ARCH=i686 > > The compilation of diff.c failes with the following error

conflicts with in windows console vim (vim.exe), bug ?

2016-09-21 Fir de Conversatie skywind3000
has been mapped to something in my vimrc, which works fine in win32-gvim/macvim and linux/mac terminal vim (with backspace set to 127/ctrl-? ) but in windows console vim, mapping will cause unable to work properly (it appears that backspace also get mapped), After reading a lot of docs, I

Re: Vim 8.0 released!

2016-09-12 Fir de Conversatie skywind3000
skywind3000 wrote: > Bram Moolenaar wrote: > > Hello Vim users! > > > > > > Announcing: Vim (Vi IMproved) version 8.0 > > > > > > This the first major Vim release in ten years. There are interesting > > new features, many small improv

Re: Vim 8.0 released!

2016-09-12 Fir de Conversatie skywind3000
Bram Moolenaar wrote: > Hello Vim users! > > > Announcing: Vim (Vi IMproved) version 8.0 > > > This the first major Vim release in ten years. There are interesting > new features, many small improvements and lots of bug fixes. At last ! Hope package maintainers of debian / ubuntu can update

Anyway to invoke 'replace_makeprg' in vim script ?

2016-09-03 Fir de Conversatie skywind3000
I am writing a plugin to launch shell command in background by using jobs. How can I escape and expand '%' in in my command ? just like replace_makeprg does, Currently, I split command args by using and check each argument, if a argument starts with '%' it needs to be expanded by calling

Will the default 8-bit meta mode in vim conflict with utf-8 characters in terminal ?

2016-08-29 Fir de Conversatie skywind3000
As ':help :map-alt-keys': By default Vim assumes that pressing the ALT key sets the 8th bit of a typed character. Most decent terminals can work that way, such as xterm, aterm and rxvt. If your mappings don't work it might be that the terminal is prefixing the character

Re: Vim 8 pre-announcement

2016-08-23 Fir de Conversatie skywind3000
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

Re: Vim 8 pre-announcement

2016-08-23 Fir de Conversatie skywind3000
> 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. > > > >

Re: Vim 8 pre-announcement

2016-08-23 Fir de Conversatie skywind3000
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

Re: Vim 8 pre-announcement

2016-08-17 Fir de Conversatie skywind3000
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

Re: Patch 7.4.2149

2016-08-03 Fir de Conversatie skywind3000
在 2016年8月4日星期四 UTC+8上午3:48:10,skywind3000写道: > 在 2016年8月4日星期四 UTC+8上午3:45:32,skywind3000写道: > > 在 2016年8月4日星期四 UTC+8上午3:05:11,Bram Moolenaar写道: > > > Christian Brabandt wrote: > > > > > > > On Mi, 03 Aug 2016, Christian Brabandt wrote: > > > >

Re: Patch 7.4.2149

2016-08-03 Fir de Conversatie skywind3000
在 2016年8月4日星期四 UTC+8上午3:45:32,skywind3000写道: > 在 2016年8月4日星期四 UTC+8上午3:05:11,Bram Moolenaar写道: > > Christian Brabandt wrote: > > > > > On Mi, 03 Aug 2016, Christian Brabandt wrote: > > > > > > > On Mi, 03 Aug 2016, Christian Brabandt wrote: >

Re: Patch 7.4.2149

2016-08-03 Fir de Conversatie skywind3000
在 2016年8月4日星期四 UTC+8上午3:05:11,Bram Moolenaar写道: > Christian Brabandt wrote: > > > On Mi, 03 Aug 2016, Christian Brabandt wrote: > > > > > On Mi, 03 Aug 2016, Christian Brabandt wrote: > > > > On Mi, 03 Aug 2016, Bram Moolenaar wrote: > > > > > Christian Brabandt wrote: > > > > > > Am 2016-08-02

Re: [vim/vim] Is it very difficult to hide cmd window when calling 'system()' on windows ? (#922)

2016-07-16 Fir de Conversatie skywind3000
char101: > I have created a proof-of-concept plugin that hide the console window using > api hooking. > > https://github.com/char101/vim-hidecmd/ > that's great !! thanks -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are

Re: [vim/vim] Is it very difficult to hide cmd window when calling 'system()' on windows ? (#922)

2016-07-15 Fir de Conversatie skywind3000
Bram: > I'm not sure if that can be made to work. CTRL-Break sometimes behaves > strange. > > On Unix you would use "kill" to stop the process. On MS-Windows you can > use the task manager for this, right? > > In general I don't mind the flickering, it's feedback that something is >

Re: [vim/vim] Is it very difficult to hide cmd window when calling 'system()' on windows ? (#922)

2016-07-14 Fir de Conversatie skywind3000
> I am on the fence on this one. > If Vim shells out to run something and that something is taking a _very_ long > time, your Vim is essentially hung. > This happens to me frequently. > At least with the Window there, I can close it, which returns an error to Vim > (via the system() call) and I

Re: [vim/vim] The order issue of 'exit_cb' and 'close_cb' in job-options (vim 7.4.1832) (#815)

2016-05-18 Fir de Conversatie skywind3000
sorry,I don't know issues in github will be redirect to this group. 在 2016年5月18日星期三 UTC+8下午4:21:32,Linwei写道: > Trying to make a async building system with +jobs in the latest vim, I find > sometimes 'exit_cb' is invoked after 'close_cb' but sometimes 'close_cb' is > invoked after 'exit_cb': >

The order issue of close_cb and exit_cb in job-options.

2016-05-17 Fir de Conversatie skywind3000
Using jobs to write an async building system, I can not find a callback which I can relay on it to clean my build state (unlet job object and output 'finished' to quickfix window): Sometimes 'close_cb' is invoked after 'exit_cb' and sometimes 'exit_cb' is invoked after close_cb and even