- 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
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
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
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
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
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
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
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
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
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
> ### 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
在 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
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
: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
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
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
+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
+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.
"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
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
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
在 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)
>
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
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),
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
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:
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:
> > >
> >
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,
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
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
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
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
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,
>
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
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
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?
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
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)
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
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
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
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
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
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
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
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.
> >
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
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
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
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
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
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
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
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
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
> 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.
> >
>
>
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
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
在 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:
> > > >
在 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:
>
在 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
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
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
>
> 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
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':
>
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
66 matches
Mail list logo