Re: Proposal: "protectncwcleol"/"pncwcleol" option...

2020-08-11 Fir de Conversatie Alex Kulungowski
Vim developers maillist,

Gmail is rendering the "[URL][TITLE]" pattern I use throughout my "Date: 
Mon, 10 Aug 2020 21:57:00 -0700" plain text message with broken links.  
Below I have provided copies of the U.R.L./title pairs from that message 
with components separated by newlines:

=
https://gist.github.com/alexkulungowski/4cadb5450c9c4bdf03309155fd30611c

Vim option "protectncwcleol"/"pncwcleol" patch · GitHub
=

=
https://github.com/vim/vim/blob/master/runtime/doc/todo.txt

vim/todo.txt at master · vim/vim · GitHub
=

=
https://github.com/vim/vim/commit/de19b745eee06a8a204988ae9989d97143caece9

patch 8.2.1093: Python: double free when adding item to dict fails · 
vim/vim@de19b74 · GitHub
=

=
https://www.vim.org/scripts/script.php?script_id=3745

linediff.vim - Perform an interactive diff on two blocks of text : vim 
online
=

.

Alex

-- 
-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/42ba79cd-916c-494b-a159-56819fa2f075n%40googlegroups.com.


Proposal: "protectncwcleol"/"pncwcleol" option...

2020-08-11 Fir de Conversatie Alex Kulungowski
with the "-X" option).  I don't foresee any
conflicts between those features and this patch, but I haven't done
anything to confirm this hunch, either.

--- I use a grand total of one Vim plugin that isn't prepackaged:
"linediff.vim" (

=
[https://www.vim.org/scripts/script.php?script_id=3745][linediff.vim
- Perform an interactive diff on two blocks of text : vim online]
=

).  I rely on "linediff.vim" rather heavily (it's wonderful... but
if there's anything else out there that's better, please let me know)
and am reasonably certain that it functions correctly with the
(effectively buffer-local) option setting "noprotectncwcleol".

--- The "protectncwcleol" testing framework is integrated into
Vim's "make test" framework but its source code does not conform to
any of the coding styles of any of the other tests.  From the
perspective of Vim's "make test" framework, the fifty-plus tests
contained within the "protectncwcleol" testing framework function as a
single pass/fail test.  One way to execute the "protectncwcleol"
testing framework directly is to start a new Vim instance with a
single window open on an empty unnamed buffer and then issue the
(equivalent of the) following command:

=
:source src/testdir/test_option_protectncwcleol.vim | call
Test_ExecuteVimOptionProtectncwcleolPncwcleolTester()
=

.

.

Alex

-- 
-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CADt82rrp60arCvU8FidQyrx477cZNjbnZC5O%2BVw5ki%3DNXT_7-w%40mail.gmail.com.


Re: Inconsistent backtick behaviour ` vs. `=

2016-08-08 Fir de Conversatie Alex
On Monday, 8 August 2016 14:34:34 UTC+1, Alex  wrote:
> Hi,
> 
> I use VIM 7.4 on unix, but similar behaviour was on Windows as well.
> 
> With commands that expect file names, backticks can be used similar to unix 
> shells:
> 
> :e `echo aaa`
> 
> or, assuming we have VIM variable aaa already set, we can use VIM backtick 
> expansion :
> 
> :e `=aaa`
> 
> However, shell backtick expansion is more robust, for example, the following 
> will work :
> 
> :e `echo aaa`.txt
> 
> while the following will not (at least not as expected): 
> 
> :e `=aaa`.txt
> 
> Is it a bug or made on purpose for some reason?
> 
> Regards,
> 
> Alex

There is obviously a workaround for this, but it looks kind of cumbersome :

:e `=expand(aaa . '.txt')`

-- 
-- 
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.


Inconsistent backtick behaviour ` vs. `=

2016-08-08 Fir de Conversatie Alex
Hi,

I use VIM 7.4 on unix, but similar behaviour was on Windows as well.

With commands that expect file names, backticks can be used similar to unix 
shells:

:e `echo aaa`

or, assuming we have VIM variable aaa already set, we can use VIM backtick 
expansion :

:e `=aaa`

However, shell backtick expansion is more robust, for example, the following 
will work :

:e `echo aaa`.txt

while the following will not (at least not as expected): 

:e `=aaa`.txt

Is it a bug or made on purpose for some reason?

Regards,

Alex

-- 
-- 
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.


[PATCH resend] is not highlighted when editing Vim configuration files

2016-06-30 Fir de Conversatie Alex Henrie
Hi,

I noticed a small problem with Vim's syntax highlighting: When editing
my keybindings in ~/.vimrc, the keyword  is highlighted, but the
keyword  is not. I checked the documentation and they are both
synonyms, neither is preferred above the other. Editing the regex in
$VIMRUNTIME/syntax/vim.vim to include "enter" alongside "return" seems
to work fine. Please consider making this change in the officially
distributed vim.vim.

-Alex
---
 runtime/syntax/vim.vim | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index a04261a..c6c0ddc 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -414,7 +414,7 @@ syn match   vimMenuBang "!" contained skipwhite 
nextgroup=@vimMenuList
 " Angle-Bracket Notation (tnx to Michael Geddes) {{{2
 " ==
 syn case ignore
-syn match  vimNotation 
"\(\\\|\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ 
\t:]\|cr\|lf\|linefeed\|return\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k\d\>\)\)>"
 contains=vimBracket
+syn match  vimNotation 
"\(\\\|\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ 
\t:]\|cr\|lf\|linefeed\|enter\|return\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k\d\>\)\)>"
 contains=vimBracket
 syn match  vimNotation 
"\(\\\|\)\=<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\)\=\(drag\|release\)\=>"
 contains=vimBracket
 syn match  vimNotation 
"\(\\\|\)\=<\(bslash\|plug\|sid\|space\|bar\|nop\|nul\|lt\)>"   
contains=vimBracket
 syn match  vimNotation '\(\\\|\)\=[0-9a-z"%#:.\-=]'he=e-1 
contains=vimBracket
-- 
2.9.0

-- 
-- 
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.


[PATCH] is not highlighted when editing Vim configuration files

2016-06-16 Fir de Conversatie Alex Henrie
Hi,

I noticed a small problem with Vim's syntax highlighting: When editing
my keybindings in ~/.vimrc, the keyword  is highlighted, but the
keyword  is not. I checked the documentation and they are both
synonyms, neither is preferred above the other. Editing the regex in
$VIMRUNTIME/syntax/vim.vim to include "enter" alongside "return" seems
to work fine. Please consider making this change in the officially
distributed vim.vim.

-Alex

---
 runtime/syntax/vim.vim | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index a04261a..c6c0ddc 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -414,7 +414,7 @@ syn match   vimMenuBang "!" contained skipwhite 
nextgroup=@vimMenuList
 " Angle-Bracket Notation (tnx to Michael Geddes) {{{2
 " ==
 syn case ignore
-syn match  vimNotation 
"\(\\\|\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ 
\t:]\|cr\|lf\|linefeed\|return\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k\d\>\)\)>"
 contains=vimBracket
+syn match  vimNotation 
"\(\\\|\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ 
\t:]\|cr\|lf\|linefeed\|enter\|return\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k\d\>\)\)>"
 contains=vimBracket
 syn match  vimNotation 
"\(\\\|\)\=<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\)\=\(drag\|release\)\=>"
 contains=vimBracket
 syn match  vimNotation 
"\(\\\|\)\=<\(bslash\|plug\|sid\|space\|bar\|nop\|nul\|lt\)>"   
contains=vimBracket
 syn match  vimNotation '\(\\\|\)\=[0-9a-z"%#:.\-=]'he=e-1 
contains=vimBracket
-- 
2.8.3

-- 
-- 
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: Behavior of End key with mswin.vim

2016-06-13 Fir de Conversatie Alex Henrie
2016-06-13 12:41 GMT-06:00 Bram Moolenaar :
>
> Alex Henrie wrote:
>
>> I'm still hoping that the Vim maintainers will take interest in this.
>> A Stack Exchange user suggested the following,[1] which makes the End
>> key behave as expected even if the line is blank:
>>
>> set virtualedit=onemore
>> noremap   (col('$')>1?"\end>\right>":'')
>>
>> Again, I'm trying to make pressing End and then Ctrl+V work like it
>> does on Windows, and I think that this is a much more sensible default
>> for mswin.vim.
>
> This has the side effect of setting 'virtualedit', which has quite an
> impact on how Vim behaves.  I guess that's not what most people want.

OK, thanks for considering it and getting back to me.

-Alex

-- 
-- 
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: Behavior of End key with mswin.vim

2016-06-13 Fir de Conversatie Alex Henrie
Hello,

I'm still hoping that the Vim maintainers will take interest in this.
A Stack Exchange user suggested the following,[1] which makes the End
key behave as expected even if the line is blank:

set virtualedit=onemore
noremap   (col('$')>1?"\end>\right>":'')

Again, I'm trying to make pressing End and then Ctrl+V work like it
does on Windows, and I think that this is a much more sensible default
for mswin.vim.

-Alex

[1] 
https://superuser.com/questions/1084232/keybinding-to-make-end-go-one-character-past-the-last-character-on-the-line

-- 
-- 
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: Behavior of End key with mswin.vim

2016-06-02 Fir de Conversatie Alex Henrie
2016-06-03 0:06 GMT-06:00 Alex Henrie :
> 2016-06-02 23:48 GMT-06:00 Alex Henrie :
>> set virtualedit=onemore
>> map  g$
>
> Actually, it looks like this would have to be something like
>
> imap   :SmartHomeKey 
> map  $
>
> in order to support very long lines.

Sorry, ignore that first line, I pasted it in by mistake. I need to
just go to bed...

-Alex

-- 
-- 
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: Behavior of End key with mswin.vim

2016-06-02 Fir de Conversatie Alex Henrie
2016-06-02 23:48 GMT-06:00 Alex Henrie :
> set virtualedit=onemore
> map  g$

Actually, it looks like this would have to be something like

imap   :SmartHomeKey 
map  $

in order to support very long lines.

-Alex

-- 
-- 
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.


Behavior of End key with mswin.vim

2016-06-02 Fir de Conversatie Alex Henrie
Hello,

I have been very happy in general with the mswin.vim file distributed
with Vim. However, I've run into one annoyance: I'm used to pressing
End, then Ctrl+V to paste at the end of a line. But when I use this
key combination with mswin.vim, my text is pasted before the last
character of the line.

For example, if I have the string "! Viva Uganda!" on the clipboard,
and I move in normal mode to a line that says "Hello World", I expect
this key combination to yield "Hello World! Viva Uganda!" Instead, I
get "Hello Worl! Viva Uganda!d"

Would you please consider changing the default behavior here to be
more Windows-like? The following seems to work:

set virtualedit=onemore
map  g$

I realize that I can do this in my own .vimrc, it just seems like
something that would trip up everyone who is looking for Windows-like
behavior.

-Alex

-- 
-- 
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.


how to detect ins-completion mode?

2015-07-09 Fir de Conversatie Alex Efros
Hi!

I'm trying to implement starting omni completion with  and then
looping over completion variants also with .

I've map  to function which returns "\\" to start omni
completion, but next  should return "\" and I've no idea how to
detect is user already in ins-completion mode.

pumvisible() doesn't helps because there is no menu on screen (only 
"--- Omni… (^O^N^P) …" line at bottom of screen).
mode() also doesn't helps because it report "i" all of time.


Vim 7.4.738

-- 
WBR, Alex.

-- 
-- 
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.


slimv debugger buffer

2014-10-14 Fir de Conversatie Alex Fff
I have a problem with slimv. REPL is working when all is good. But when i get 
an error debugger buffer is not appeared. xterm with swank connection is 
shutting down. In emacs all works properly. vim 7.3.645

-- 
-- 
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.


expand('') and conceal

2014-07-07 Fir de Conversatie Alex Efros
Hi!

Is it possible to remove concealed text from result of expand('')?

For example, when conceal ANSI we'll have something like:

[36mfeature[0m
concealed to:
 feature
but expand('') with cursor inside "feature" will return:
  36mfeature

-- 
WBR, Alex.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 7.4.264

2014-05-16 Fir de Conversatie Alex Efros
Hi!

On Fri, May 16, 2014 at 12:53:17PM +0400, Nikolay Pavlov wrote:
> On May 16, 2014 12:29 PM, "Alex Efros"  wrote:
> > > > fun s:Foo()
> > > > endfun
> > > > let g:Foo = function('s:Foo')
> This change has nothing to do with the change that made function('s:...')
> work outside of the plugin which defined this funcref. It was a bug that
> got fixed.

User reported it on Ubuntu 12.04 LTS with Vim 7.3.429-2ubuntu2.1, I see it
on 7.3.762 - so, this bug exists in so many vim versions?

> To workaround it on old vims you should use manually replace s: with
> N_ when defining funcrefs. AFAIR :h  shows some ways to get N.

You mean I should add

function s:SID()
return matchstr(expand(''), '\zs\d\+_\zeSID$')
endfunction

into each file of my plugin (it uses sort of sub-plugins in separate
files, so there a lot of them), and then replace in each file each

let g:Foo = function('s:Foo')

with

let g:Foo = function(s:SID().'Foo')

And this is only way to keep compatibility with these vim versions?

-- 
WBR, Alex.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 7.4.264

2014-05-16 Fir de Conversatie Alex Efros
Hi!

On Fri, Apr 25, 2014 at 03:27:40PM +0200, Bram Moolenaar wrote:
> > My guess right solution should be
> > fun s:Foo()
> > endfun
> > let g:Foo = function('s:Foo')
> > but I'm not 100% sure.
> 
> That should be the right way.  The more things are script-local the
> better.  But check that it actually works.

User of my plugin just reported this doesn't work on vim-7.3.
I've checked, and looks like 7.3.1214 works ok, but on 7.3.762 it fails.
In 7.3.762 function('s:Foo') return 's:Foo' instead of '42_Foo'.
Is there a way to make this change compatible with old 7.3.x?

-- 
WBR, Alex.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 7.4.264

2014-04-25 Fir de Conversatie Alex Efros
Hi!

On Fri, Apr 25, 2014 at 07:34:16PM +0400, Nikolay Pavlov wrote:
> because the fact that you received a funcref never means you can call it

Why is that?

-- 
WBR, Alex.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 7.4.264

2014-04-25 Fir de Conversatie Alex Efros
Hi!

On Fri, Apr 25, 2014 at 03:27:40PM +0200, Bram Moolenaar wrote:
> > My guess right solution should be
> > fun s:Foo()
> > endfun
> > let g:Foo = function('s:Foo')
> > but I'm not 100% sure.
> 
> That should be the right way.  The more things are script-local the
> better.  But check that it actually works.

One thing will break in my code because of this change: exists('*Foo') now
return false. Is this correct behaviour in case g:Foo contains Funcref?

-- 
WBR, Alex.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 7.4.264

2014-04-24 Fir de Conversatie Alex Efros
Hi!

On Thu, Apr 24, 2014 at 12:43:01PM +0200, Bram Moolenaar wrote:
> > Me, too. The following used to work:
> > 
> > fun! Foo()
> > endfun
> > let g:Foo = function('Foo')
> > 
> > After 7.4.264, I get:
> > " E705: Variable name conflicts with existing function: g:Foo
> 
> That is correct.  Previously Foo() and g:Foo were different names, which
> is wrong.  Both refer to the same function.

So, what is the right way to implement this, compatible with pre-patch-260
and current one? I wanna use global variable to define user-configurable
handler function, and I've in my plugin code exactly as shown above.
My plugin uses exists() and type() for testing value of that global
variable, and they return different results for g:Foo in cases
fun g:Foo()
endfun
and
fun Foo()
endfun
let g:Foo = function('Foo')
That's why such let operation was added.

My guess right solution should be
fun s:Foo()
endfun
let g:Foo = function('s:Foo')
but I'm not 100% sure.

Also in my plugin I allow users to use symbolic funcref for their custom
handlers:
fun MyHandler()
endfun
let g:Handler = 'MyHandler'
by using type() to detect is variable contains text and then converting it
to real funcref using exists('*MyHandler') and then function('MyHandler) -
is this logic still correct after patch 265? Real code is here:
https://code.google.com/p/vim-plugin-viewdoc/source/browse/plugin/viewdoc.vim#181


P.S. One more difference between fun g:Foo and let g:Foo=function() is
while auto-complete 'Foo' in command line - first case shown as
'Foo(', second as 'Foo' - maybe it makes sense to detect variables with
funcref values and show them with '(' in autocomplete too?

-- 
WBR, Alex.

-- 
-- 
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: esckeys affect font

2013-12-18 Fir de Conversatie Alex Efros
Hi!

On Mon, Dec 16, 2013 at 04:05:47AM +0100, Tony Mechelynck wrote:
> >> Like it is said under :help 'esckeys', try the following:
> >>
> >>:set esckeys timeout timeoutlen=5000 ttimeoutlen=100
> 
> If 'esckeys' makes a difference, then there is some keycode starting 
> with  that gives a problem. So what does the terminal send to mean 
> U+2713 has been sent? Apparently ignoring the possibility that a 
> multibyte keycode might start with  makes a difference. (This might 
> require starting the terminal in 8bit-meta mode, see :help map-alt-key).

I've just tried it - doesn't helps.

In urxvt maillist someone recommends me to enable "ISO 14755 support" in
urxvt and check which fonts it use for rendering selected symbol. It turns
out normally it use:

---cut---
col 0 row 0 @0
2713 = ✓
003c1206 = fg 9 bg 6 careful
Bitstream Vera Sans 
Mono:slant=0:weight=200:pixelsize=32:antialias=False:autohint=True:minspace=Tr
---cut--

(tail of font definition line doesn't fit into my terminal window)
but when 'esckeys' set in vim it use this instead:

---cut---
col 0 row 0 @0
2713 = ✓
003c1206 = fg 9 bg 6 careful
:slant=0:weight=200:pixelsize=32:antialias=False:autohint=True:minspace=True:lang=ja
---cut--

And this issue (losing font name) really happens for "U2713 CHECK MARK"
and doesn't happens for "U2714 HEAVY CHECK MARK"!

Recommended (and working!) work around was to use in ~/.Xdefaults this:
URxvt*font: xft:MyFontName:style=Bold:size=16,xft:DejaVu Sans Mono
instead of this:
URxvt*font: xft:MyFontName:style=Bold:size=16
i.e. manually define next font which urxvt should use for symbols absent
in default font instead of using font auto-selected by urxvt.

This work around is much better than using `set noesckeys`, so problem is
solved for me. But it still unclear is it vim bug or urxvt bug and why it
happens for CHECK MARK and not HEAVY CHECK MARK.

-- 
WBR, Alex.

-- 
-- 
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/groups/opt_out.


esckeys affect font

2013-12-15 Fir de Conversatie Alex Efros
Hi!

I'm not sure which application has this bug - vim or urxvt.

I'm using urxvt with custom font which doesn't have all unicode symbols,
but AFAIK urxvt somehow magically load symbols absent in current font from
some other fonts. I've no idea how urxvt decide which font should be
used, but looks like in my case most such symbols loaded from DevaVu.

I've just added to ~/.XCompose these lines:
   : "✓"  U2713  # CHECK MARK
   : "✔"  U2714  # HEAVY CHECK MARK

and while testing them I noticed strange thing: in vim CHECK MARK looks
too large, larger and bolder than HEAVY CHECK MARK. In bash CHECK MARK
always looks correctly (lighter than HEAVY CHECK MARK).

In `vim -u /dev/null --noplugin` CHECK MARK also always looks correctly,
like in bash. So, I've bisect vim settings and found problem is in …
set esckeys
WOW, that was a real surprise!!!

Actual command which break this is "set nocompatible" in /etc/vim/vimrc,
but if I add "set noesckeys" right after it - it fix issue with CHECK
MARK's rendering/font.

I don't like to disable esckeys just to fix one symbol rendering issue
(all other symbols works ok, or at least I never noticed rendering
differences), so if anyone have idea about another workaround or how to
further debug this issue (is it possible to enable debugging in urxvt to
find out which extra fonts it use?)…

I'm using Gentoo Linux, vim-7.4.94, rxvt-unicode-9.18.

-- 
WBR, Alex.

-- 
-- 
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/groups/opt_out.


Re: how :help change current settings

2013-08-02 Fir de Conversatie Alex Efros
Hi!

On Fri, Aug 02, 2013 at 11:40:31AM -0700, ZyX wrote:
> > I've noticed :help modify current vim settings.
> > For example, it does ':set nolist'. I'm trying to mimic it behavior in my
> > viewdoc plugin (because it contains drop-in replacement for :help command),
> > so I need to know what else :help does in addition to ':set nolist'?
> 
> Use :setlocal, never :set. 

Of course, I mean :setlocal above.

> > Is this documented somewhere or configured somehow?
> 
> This is coded in C: 
> https://bitbucket.org/ZyX_I/vim/src/8d8a30a648f05a91c3c433f0e01343649449ca3c/src/ex_cmds.c#cl-3523.
>  Use has() in place of #ifdef, most of time defined(FEAT_FOO) means 
> has('foo')==1.

Thanks!

-- 
WBR, Alex.

-- 
-- 
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/groups/opt_out.




how :help change current settings

2013-08-02 Fir de Conversatie Alex Efros
Hi!

I've noticed :help modify current vim settings.
For example, it does ':set nolist'. I'm trying to mimic it behavior in my
viewdoc plugin (because it contains drop-in replacement for :help command),
so I need to know what else :help does in addition to ':set nolist'?
Is this documented somewhere or configured somehow?

-- 
    WBR, Alex.

-- 
-- 
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/groups/opt_out.




Re: map ZZ

2013-04-02 Fir de Conversatie Alex Efros
Hi!

On Sat, Mar 30, 2013 at 01:25:07PM -0700, ZyX wrote:
> Implementation really does not switch any modes, it just instead of
> using something like a list of mapping tables {builtin_commands,
> global_mappings, local_mappings} special-cases all built-ins and uses
> plain_vgetc function in C code unconditionally waiting for next
> character.

Maybe I missed something in your explanation, but I still doesn't
understand why first Z mapped from Russian char but not second Z.
Or special-case handling begins _after_ entering first Z, so first and
second Z read by Vim using different implementations? Sounds like a bug.

Anyway, if no one bothers fixing this, where I can find list of all such
special-case key combinations, to manually add mapping for them all in my
plugin?

-- 
    WBR, Alex.

-- 
-- 
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/groups/opt_out.




map ZZ

2013-03-30 Fir de Conversatie Alex Efros
Hi!

Often you wanna be able to type vim command in normal mode when keyboard
layout isn't English. Some time ago :langmap was used for this, later
(probably when moving to UTF-8) it was broken and replaced by usual :map
(I see in doc example of :langmap with UTF-8, so probably it work now).

Strange thing, some normal mode command doesn't work in this way: ZZ, ZQ
(at least, maybe there are others too).

Example (Russian layout):
:map  в d
:map  Я Z
Now, in normal mode "вв" works as "dd", but "ЯЯ" doesn't work ("ЯQ" works,
so looks like only first char mapped). This can be worked around by:
:map  ЯЯ ZZ
:map  ЯЙ ZQ
but I wonder is this expected behavior (if ZZ somehow special command) or bug?
And if this is expected behavior, then where I can find list of all such
special commands to add maps for them all?

I'm using vim-7.3.762, Gentoo Linux.

-- 
WBR, Alex.

-- 
-- 
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/groups/opt_out.




easier vim settings transport

2013-02-25 Fir de Conversatie Alex Noot
I work in an environment where I access and manage several hundred unix 
servers.  However, the amount of time I typically spend on each server does not 
justify copying vimrc files around.

I wonder if there's an easier way to load settings on a per-session basis.

For example, could a vimrc file be serialized so that loading settings would be 
as simple as entering the serialized string at the start of each session?

-- 
-- 
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/groups/opt_out.




Re: \@<= multiline bug?

2012-12-05 Fir de Conversatie Alex Efros
Hi!

On Tue, Dec 04, 2012 at 08:29:39AM -0800, Ben Fritz wrote:
> Maybe just match the \\\n sequences as a separate syntax item and use
> nextgroup to enforce ordering. It should work (probably even a little
> bit faster) and also simplify your pattern.

As far as I understood, nextgroup is just a recommendation, while I've
tried to implement more strict syntax checking "after that item can be
only this one, and after this there can be only one of these items, etc.".
Maybe I'm wrong in trying to go this way, because it's syntax highlighter,
not real parser/compiler, it may be a little relaxed…

-- 
WBR, Alex.

-- 
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


Re: \@<= multiline bug?

2012-12-03 Fir de Conversatie Alex Efros
Hi!

On Mon, Dec 03, 2012 at 05:53:58PM -0500, Benjamin R. Haskell wrote:
> Probably, as it suggests there, you could just use \zs instead:
> 
> \\\n\\\n\zsU

You right, but \zs doesn't work for me. I'm writing syntax highlight rules
for mkfile (OS Inferno/Plan9 variant of Makefile). It allow any amount of \
at EOL, so these are the same:

VAR=U=value

VAR\
\
=\
\
U\
\
=\
\
value

So, I'm trying to match "U" between "=" with any amount of \\\n between them:

syn match mkfileVarAttr contained 
"^\w\(\w\|\\\n\)*\(\s\|\\\n\)*=\(\(\\\n\)*\(=\|U\(\\\n\)*=\)\)\?"
\ contains=mkfileVar,mkfileDelimiter,mkfileAttr
syn match mkfileVar contained "^\(\w\|\\\n\)*\w"
syn match mkfileDelimiter   contained "="
syn match mkfileAttr contained "\(=\(\\\n\)*\)\@<=U\(\(\\\n\)*=\)\@="

and using \zs in mkfileAttr doesn't work.

-- 
WBR, Alex.

-- 
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


\@<= multiline bug?

2012-12-03 Fir de Conversatie Alex Efros
Hi!

Is there any reason why "\(\\\n\\\n\)\@<=U" fail to match this text:

\
\
U

while "\(\\\n\\\n\)U" will match it and "\(\\\n\)\@<=U" will match it too
(without first line)?


Vim 7.3.646, Gentoo Linux amd64

-- 
WBR, Alex.

-- 
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


langmap is broken for mappings, breaks any plugins using

2012-09-19 Fir de Conversatie Alex Ogier
Currently, langmap applies in some limited fashion to the right side of 
mappings. For example, the following from normal mode will delete until the end 
of a line:

:set langmap=xd
:nnoremap z x
z$

Strangely this doesn't apply to all cases transparently, for example, the 
following might be expected to delete a single line, but in fact it just blinks 
the cursor:

:set langmap=xd
:nnoremap z x
zz

This is all a bit wacky, since it follows that if someone has a binding 
(especially a noremap binding) they want the right side to execute as if in a 
pristine environment. For example, if someone has made a mapping, ":nnoremap 
d yyp" they presumably want a binding to duplicate a line -- not, say 
undo twice and delete a character because they have "yu,px" in their langmap.

This is all a bit weird but manageable if you are in control of all your 
mappings. What it really breaks is plugins. For example, a common pattern is to 
have two levels of mappings: one containing a bunch of mappings prefixed with 
 that are always installed, and another set that is conditionally 
installed with some convenient defaults, often short patterns containing 
. For example, excerpted from tpope's vim-surround plugin[1]:

nnoremap  Dsurround  :call 
dosurround(inputtarget())
nmap ds  Dsurround

This is totally non-functional if any of the characters in "Dsurround" is 
included in langmap, as they will get translated on the right side of the 'ds' 
mapping. It's especially weird when people have insert mappings. For example, 
ervandew's SuperTab[2] ships with the following mappings:

imap 

&path mangling

2012-05-31 Fir de Conversatie Alex Efros
Hi!

1)  Why default &path contain /usr/include? I suppose this is
compatibility/historical issue, but maybe this can be safely moved to
ftplugin/c instead of default value for all files?

2)  ftplugin/perl.vim:
let &l:path=perlpath
ftplugin/ruby.vim
let &l:path = s:ruby_path
ftplugin/java.vim:
let &l:path=g:ftplugin_java_source_path . ',' . &l:path
ftplugin/git.vim:
let &l:path = escape(fnamemodify(b:git_dir,':h'),'\,').','.&l:path
let &l:path = escape(b:git_dir,'\, ').','.&l:path

First two just kill user's &path, other two make user's &path searched
after system's path. Isn't this wrong? I think user's &path should not
be ignored at first, and should have higher priority (because it will
    contain current project's directories, which should be searched before
system directories).

-- 
WBR, Alex.

-- 
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


patch: efm_perl missed some error messages

2012-05-26 Fir de Conversatie Alex Efros
Hi!

Here is patch for syntastic, but it uses exact copy of Vim's
/usr/share/vim/vim73/tools/efm_perl.pl, so patch will apply:


https://github.com/powerman/syntastic/commit/1e99ed56b7cefde536997c037fff44be9fd26fab

-- 
WBR, Alex.

-- 
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


Re: bug related to patch 7.3.449 (Autocommands caused command to abort)

2012-05-25 Fir de Conversatie Alex Efros
Hi!

On Sat, May 26, 2012 at 07:59:41AM +0200, Christian Brabandt wrote:
> I don't think so, but Bram has the final saying. I would certainly find 
> it unexpected, if this would quit my vim. The error is simply telling 
> you, that an autocommand closed a window/buffer and that's why Vim 
> aborts executing the :q command.

That still doesn't make sense to me. If autocommand closed some
window/buffer then current command should be aborted? Why is that?

Is there any way to work around this in BufWinLeave autocommand?

(I've work around this by moving logic to close orphan location-list
on BufEnter into that location-list, but that's ugly because it's
complicated to detect is that location-list have/have not related source
file opened, while on source file's BufWinLeave it's enough to :lclose.)

As for 'unexpected', for me it's much more unexpected to get location-list
window opened full screen after you've closed source file related to that
location-list…

-- 
WBR, Alex.

-- 
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


Re: bug related to patch 7.3.449 (Autocommands caused command to abort)

2012-05-25 Fir de Conversatie Alex Efros
Hi!

On Thu, May 24, 2012 at 10:14:41PM +0200, Christian Brabandt wrote:
> I have noticed something similar in my NrrwRgn plugin.
> I am not sure, this is a bug, because at the time you issue :q the 
> location list ist still open and in case another window is open, :q does 
> not exit Vim.

I'm not really understood what you mean, sorry.

I can see reason for 'E855: Autocommands caused command to abort'
when something bad happens in a loop, for example like this:

:autocmd BufWinLeave * lclose

when it run with open location-list and result in calling :lclose
again while executing BufWinLeave as result of :lclose.

But I don't see any reason why E855 happens using this:

$ vi -u /dev/null --noplugin
:autocmd BufWinLeave * if empty(getbufvar(0+expand(''), '&bt')) | 
lclose | endif
:lexpr system('echo :1:some')
:lopen
:wincmd p
:q
E855: Autocommands caused command to abort

So, is this a bug or not?

> > This happens on 7.3.515. Versions before 7.3.449 behave differently
> > without tabs, but with tabs they all crash.
> 
> Attached patch fixes this issue.

Thanks! But, sorry, I just found another simple way to crash 7.3.530
without tabs:

$ vi -u /dev/null --noplugin
:autocmd BufWinLeave * if empty(getbufvar(0+expand(''), '&bt')) | 
lclose | endif
:lexpr system('echo :1:some')
:lopen
    :wincmd p
:bd
Vim: Caught deadly signal SEGV
Segmentation fault

:-/

-- 
WBR, Alex.

-- 
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


bug related to patch 7.3.449 (Autocommands caused command to abort)

2012-05-24 Fir de Conversatie Alex Efros
Hi!

I've discover this bug when trying to ':wq' in file with syntax errors using
syntastic plugin with
let g:syntastic_auto_loc_list=1
Instead of exiting from vim no matter there are syntax errors I got either
E855: Autocommands caused command to abort
or vim segfault.


To reproduce this bug it's enough to:

$ vi -u /dev/null --noplugin
:autocmd BufWinLeave * if empty(&bt) | lclose | endif
:lexpr system('echo :1:some')
:lopen
:wincmd p
:q
(location list closes; got message E855: Autocommands caused command to
abort; vim doesn't exit)
:q
(now vim exit)

Or, with tabs and segfault:

$ vi -u /dev/null --noplugin
:autocmd BufWinLeave * if empty(&bt) | lclose | endif
:tabnew
:lexpr system('echo :1:some')
:lopen
:wincmd p
:q
Vim: Caught deadly signal SEGV
Vim: Finished.
Segmentation fault

This happens on 7.3.515. Versions before 7.3.449 behave differently
without tabs, but with tabs they all crash.


There is probably bug in that autocmd -
&bt
should be replaced with
getbufvar(0+expand(''), '&bt')
but it fix this issue only partially, in these cases:
- :lclose in location-list window
- :lclose in file window (with opened location-list)
- :q in location-list window
but we still got error (or segfault when tabs used) in this case:
- :q in file window (with opened location-list)

In last case expand('') return file window's number, which is
correct IMO. In this situation doing :lclose looks correct and shouldn't
result in 'Autocommands caused command to abort'.


I've implemented workaround for syntastic:
https://github.com/scrooloose/syntastic/pull/256
but it's bug in vim and should be fixed in vim.

-- 
WBR, Alex.

-- 
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


Re: First pass at Freedesktop directories

2011-03-19 Fir de Conversatie Alex QR
>How widespread is this?  Is this something new or established?

it is freedesktop.org standard, at list this programs support this
standard:

ls -1
dconf
Empathy
eog
evince
evolution
gedit
gnome-control-center
gnome-disk-utility
gnome-session
gtk-2.0
nautilus
openbox
smplayer
Thunar
totem
transmission
vlc
Xauthority

-- 
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


Re: place all vim configs into config directory[unix]

2011-03-15 Fir de Conversatie Alex QR
Hello Peter,

Let me say it another way. Of course "should" is not what I mean. I
just sought that it would be nice if vim could optionally respect
$XDG_CONFIG_HOME, because it would make easier working with configs.
So in short words it is all like Benjamin said.

On Mar 14, 6:24 pm, Peter Odding  wrote:
> Hi Alex,
>
> > Problem is that some people like my wish for a native solution)))
> > $VIMRUNTIME is fun, but there already is  $XDG_CONFIG_HOME for all.
>
> The freedesktop.org initiative was launched in 2000 while Vim was
> originally released in 1991 and the freedesktop.org initiative only
> applies to a small percentage of Vim users because Vim has been ported
> to dozens of platforms. Why do you feel the default Vim configuration
> should respect $XDG_CONFIG_HOME? (or am I misinterpreting you?)
>
>  - Peter Odding

-- 
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


Re: place all vim configs into config directory[unix]

2011-03-14 Fir de Conversatie Alex QR
>export 
>VIMRUNTIME="$HOME/.config/vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$HOME/.config/vim/after"

Thx, I actually did find some solution that works with
$XDG_CONFIG_HOME, but I will tray with $VIMRUNTIME to achieving a
cleaner solution.

Problem is that some people like my wish for a native solution)))
$VIMRUNTIME is fun, but there already is  $XDG_CONFIG_HOME for all.

-- 
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


Re: place all vim configs into config directory[unix]

2011-03-14 Fir de Conversatie Alex QR
A I would like to try to make this changes myself by changing
directory, backupdir, viminfo and runtimepath. So I am searching them.
But would be nice if somebody point me where they are.

-- 
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


place all vim configs into config directory[unix]

2011-03-14 Fir de Conversatie Alex QR
Hello!

Pls add support for  $XDG_CONFIG_HOME variable.
In short term $XDG_CONFIG_HOME is where all configs should be
(standard by freedesctop.org) and normaly points to ~/.config

so structure that I wish to see is like that:

.config/vim
.config/vim/doc
.config/vim/vimrc
.config/vim/autoload
.config/vim/colors
.config/vim/plugin
.config/vim/viminfo
etc.

Also the I want to accentuate that vimrc (form my point if vision of
course) should be in .config/vim directory. It seen logical to mi if
all vim configuration files will be in the same directory.

Thanks.

-- 
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


Re: a bug with tear-off menu in Win32 gvim.

2010-11-02 Fir de Conversatie Alex
Hi all,

Yes, there is a bug in Vim. The patch below fixes it for me in Win32
gVim.

Testing on other platforms is welcome.

regards,

Alex

>>>>>>>> BEGIN HG EXPORT
# HG changeset patch
# User Alex Jakushev 
# Date 1288740721 0
# Node ID a23c064836156051bda9a08573cc376c165e7335
# Parent  df6b12c84b2359415cd987c016f5de135c680100
Bugfix - clicking on tearoff menu gave E337 error if menu was
translated.

Reason - untranslated parent menu name was posted to message queue by
tearoff, but it was compared to (possibly) translated menu name on
menu resolving.

diff -r df6b12c84b23 -r a23c06483615 src/menu.c
--- a/src/menu.cWed Oct 27 18:36:36 2010 +0200
+++ b/src/menu.cTue Nov 02 23:32:01 2010 +
@@ -2342,7 +2342,7 @@

while (menu != NULL)
{
-   if (STRCMP(name, menu->name) == 0 || STRCMP(name, menu->dname)
== 0)
+   if (menu_name_equal(name, menu))
{
if (menu->children == NULL)
{
>>>>>>>> END HG EXPORT

On Nov 2, 10:48 am, lilydjwg  wrote:
> On 11月1日, 上午11时58分, StarWing  wrote:
>
>
>
>
>
> > hi all,
>
> > when I use gVim with language set to chinese, the tear-off menu seems
> > can't work in some menu list.
>
> > reproduce:
>
> > in Windows( I am not test in other OS):
>
> > set LANG=zh_CN.UTF-8
>
> > gvim -u NONE -U NONE
>
> > click the "syntax" menu (now displayed as "语法"), and click the tear-
> > off item.
>
> > error:
>
> > displayed as "
> > 撕下此菜单
> > E337: 找不到菜单 - 请检查菜单名称
> > "
>
> > means"
> > tear-off the menu
> > E337: can't find menu - check the menu name
> > "
>
> > don't know how this happen.
>
> > thanks for attention :-)
>
> I can confirm this on my Windows. However, this issue won't happen on
> my Ubuntu Linux. (But the torn-up menu won't disappear when I click
> the dash line with Awesome as the window manager.)

-- 
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


Re: Sorting by floating point values in Vim

2010-10-31 Fir de Conversatie Alex
I will post one later.

Alex

On Oct 31, 12:59 pm, Bram Moolenaar  wrote:
> Alex Jakushev wrote:
> > I've extended :sort command in vim - now it can sort by floating point
> > values as well as dec/hex/oct. Submitting the change for review.
>
> Looks OK.
>
> It would be useful to have a test for :sort.  Especially now that it
> becomes more complicated.
>
> --
> MESKIMEN'S LAW
>     There's never time to do it right, but always time to do it over.
>
>  /// Bram Moolenaar -- b...@moolenaar.net --http://www.Moolenaar.net  \\\
> ///        sponsor Vim, vote for features --http://www.Vim.org/sponsor/\\\
> \\\        download, build and distribute --http://www.A-A-P.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


Sorting by floating point values in Vim

2010-10-30 Fir de Conversatie Alex
Hi all,

I've extended :sort command in vim - now it can sort by floating point
values as well as dec/hex/oct. Submitting the change for review.

Kind regards,

Alex

>>>>>>>>>>>>>>>>  BEGIN OF HG EXPORT
# HG changeset patch
# User Alex Jakushev 
# Date 1288482264 -3600
# Node ID a31735077986cf251235d6a007c6552acf5e77d6
# Parent  b6ba81f1258fc53fcb030868229971e239d43aee
Help updated for "sort f"

diff -r b6ba81f1258f -r a31735077986 runtime/doc/change.txt
--- a/runtime/doc/change.txtSun Oct 31 00:17:20 2010 +0100
+++ b/runtime/doc/change.txtSun Oct 31 00:44:24 2010 +0100
@@ -1585,7 +1585,7 @@
 found here: |sort()|.

*:sor* *:sort*
-:[range]sor[t][!] [i][u][r][n][x][o] [/{pattern}/]
+:[range]sor[t][!] [i][u][r][n][x][o][f] [/{pattern}/]
Sort lines in [range].  When no range is given all
lines are sorted.

@@ -1605,6 +1605,14 @@
With [o] sorting is done on the first octal number in
the line (after or inside a {pattern} match).

+   With [f] sorting is done on the Float in the line.
+   The value of Float is determined similar to passing
+   the text (after or inside a {pattern} match) to
+   str2float() function. This option is available only
+   if Vim was compiled with Floating point support.
+
+   Options [n][x][o][f] are mutually exclusive.
+
With [u] only keep the first of a sequence of
identical lines (ignoring case when [i] is used).
Without this flag, a sequence of identical lines
# HG changeset patch
# User Alex Jakushev 
# Date 1288480640 -3600
# Node ID b6ba81f1258fc53fcb030868229971e239d43aee
# Parent  df6b12c84b2359415cd987c016f5de135c680100
Support of sorting by floating point numbers

diff -r df6b12c84b23 -r b6ba81f1258f src/ex_cmds.c
--- a/src/ex_cmds.c Wed Oct 27 18:36:36 2010 +0200
+++ b/src/ex_cmds.c Sun Oct 31 00:17:20 2010 +0100
@@ -17,6 +17,9 @@

 #include "vim.h"
 #include "version.h"
+#ifdef FEAT_FLOAT
+#include 
+#endif

 #ifdef FEAT_EX_EXTRA
 static int linelen __ARGS((int *has_tab));
@@ -282,6 +285,9 @@
 static int sort_ic;/* ignore case */
 static int sort_nr;/* sort on number */
 static int sort_rx;/* sort on regex instead of skipping it 
*/
+#ifdef FEAT_FLOAT
+static int sort_flt;   /* sort on floating number */
+#endif

 static int sort_abort; /* flag to indicate if sorting has been
interrupted */

@@ -289,8 +295,17 @@
 typedef struct
 {
 linenr_T   lnum;   /* line number */
-long   start_col_nr;   /* starting column number or number */
-long   end_col_nr; /* ending column number */
+union {
+   struct
+   {
+   longstart_col_nr;   /* starting column number */
+   longend_col_nr; /* ending column number */
+   } line;
+   long value;  // value if sorting by number (n/o/x)
+#ifdef FEAT_FLOAT
+   float_T value_flt; // value if sorting by float
+#endif
+} st_u;
 } sorti_T;

 static int
@@ -320,22 +335,25 @@
 if (got_int)
sort_abort = TRUE;

-/* When sorting numbers "start_col_nr" is the number, not the
column
- * number. */
 if (sort_nr)
-   result = l1.start_col_nr == l2.start_col_nr ? 0
-: l1.start_col_nr > l2.start_col_nr ? 1 : -1;
+   result = l1.st_u.value == l2.st_u.value ? 0
+: l1.st_u.value > l2.st_u.value ? 1 : -1;
+#ifdef FEAT_FLOAT
+else if (sort_flt)
+   result = l1.st_u.value_flt == l2.st_u.value_flt ? 0
+: l1.st_u.value_flt > l2.st_u.value_flt ? 1 : 
-1;
+#endif
 else
 {
/* We need to copy one line into "sortbuf1", because there is no
 * guarantee that the first pointer becomes invalid when obtaining
the
 * second one. */
-   STRNCPY(sortbuf1, ml_get(l1.lnum) + l1.start_col_nr,
-l1.end_col_nr - l1.start_col_nr + 1);
-   sortbuf1[l1.end_col_nr - l1.start_col_nr] = 0;
-   STRNCPY(sortbuf2, ml_get(l2.lnum) + l2.start_col_nr,
-l2.end_col_nr - l2.start_col_nr + 1);
-   sortbuf2[l2.end_col_nr - l2.start_col_nr] = 0;
+   STRNCPY(sortbuf1, ml_get(l1.lnum) + l1.st_u.line.start_col_nr,
+l1.st_u.line.end_col_nr - 
l1.st_u.line.start_col_nr + 1);
+   sortbuf1[l1.st_u.line.end_col_nr - l1.st_u.line.start_col_nr] = 0;
+   STRNCPY(sortbuf2, ml_get(l2.lnum) + l2.st_u.line

Re: Compiling VIM for Android OS

2010-03-06 Fir de Conversatie Alex S. Brown, PMP IPMA-C
Thanks for the pointers and ideas, Tony. I may try the cross-compiling
methods you are describing. The lead on busybox is helpful, though. I
will see if I can get vi running, at least, from that package.

--Alex

On Mar 2, 1:32 pm, "Apuzzo, Tony" 
wrote:
> If you want to get it working on a normal ROM, you can get some pointers and 
> ideas from this 
> WIKI:http://android-dls.com/wiki/index.php?title=Compiling_for_Android. 
> You'll need to figure out how to target your specific phone's CPU and 
> hardware (ARM, OMAP, etc.) and lots of other bits and pieces.
>
> Note that I have no intention of working on a vim port for Android, I just 
> saw this email chain and figured I could help with some pointers.
>
> -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


Re: Compiling VIM for Android OS

2010-02-24 Fir de Conversatie Alex S. Brown, PMP IPMA-C
I have not dug into the software development kit for the Android OS
yet, but I know that most applications do not have a File Save As
dialog box. Many do have the ability to save files to internal
storage, to import or export settings or data.

One particularly promising open-source project is hosted at Open
Intents - http://www.openintents.org/en/. This suite of little
programs includes a file manager application, and a simple text
editor. With these two programs, you can definitely view the file
system and edit anything that you find that is in a text format.

Their text editor is missing all the wonderful bells and whistles that
I love in vim, though.

If the OS does not provide file-system access, it may be possible to
somehow integrate with the Open Intents file explorer. Again, I am
just guessing here, and would love to know if anyone has explored this
more deeply than I have.

Android OS is very Unix-like. The file system has mount points, bin
directories and other Unix-like features. I have even seen articles
about how some people complied the bash shell to run under Android OS.
My hope is that the Unix version of vim could be somehow adapted to
run under Android OS.

On Feb 24, 11:54 am, Ben Fritz  wrote:
> Does the Android OS allow direct access to the file system? I have
> idea in my head somehow that (in general) smart phone OSes don't allow
> this. I have no idea where I got that thought, though, so it's quite
> possibly incorrect.

-- 
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php


Compiling VIM for Android OS

2010-02-23 Fir de Conversatie Alex S. Brown, PMP IPMA-C
I recently got an Android phone and was surprised at the lack of good
text editors. Of course, I thought first of my favorite text editor,
VIM.

I wanted to know if anyone has tried to compile VIM for the Android
OS, and what types of problems I might expect. I have tried doing
searches with no relief. As far as I can see, no one has created an
Android-OS binary for VIM. I have seen isolated mentions of vi on
people's Android phones, but I believe that it is by people who use a
terminal session to access vi on a remote Unix computer.

If this is the wrong forum for this type of question, please excuse
me. I did not know where else to turn. I would appreciate any helpful
advice. If no one has done this yet, I would like to explore using a
cross-compiler to create a vim binary for Android OS. I love my
Android phone, but I wish I had a real text editor for it.

-- 
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php


Keymap for Vietnamese - VNI UTF-8

2009-08-24 Fir de Conversatie Alex Le

Hi,

I created a new Keymap file for Vietnamese using the VNI input (using
numeric keypads for the accents) based on the Vietname VIQR keymap
file by Samuel Thibault.  I'd like to submit it to the general Vim
release.  I'm pretty new so please advice on the next step for me to
proceed.  The file is located at 
http://alexle.net/files/vietnamese-vni_utf-8.vim

I have troubled subscribing to the vim-dev group (the email bounced),
so I'd appreciate if you CC me on future response.  I'll be checking
the archive to see if there's a response, but thanks in advance for
your help.

Regards,

Alex Le
http://alexle.net

--~--~-~--~~~---~--~~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---



Re: better use of ctags

2009-06-14 Fir de Conversatie alex

Yes, but cscope is only for C !

Not even for object oriented C++.

I have tried global too, but without too much enthusiasm.

ctags is the better program for generating tags files, and supports a
lot of languages, including obviously C++ and other "major" object
oriented languages...

THX

--~--~-~--~~~---~--~~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---



better use of ctags

2009-06-14 Fir de Conversatie alex

I know about taglist and omnicppcomplete plugins, but both are not
enough, in my opinion, for making working with vim + ctags real
powerfull.

It would be a simple task to write a python program for "searching and
navigating" a tags file !

Within vim, or from the bash, it would be possible to extract
information from a tags file generated with exuberant ctags, running
the python script, so that large projects could easily be handled.

For example it should be possible to list all the classes that much a
given query (formulated with regular expressions) AND/OR all the
function members that much a given query and so on.

>From the bash, for example, this could be something like

tagsmanager --file=./tags --name='a+' --class='abc*|def' --
function='abc*' --kind='s'

the output should be the list of all structs that begins with an 'a',
defined within a function that begins with abc member of a class that
begins with abc or of the class def. The search would be in the tags
file in the current directory.

(another simple example colud be:
tagsmanager --file=./tags --name='abcd*' --kind='c'
that sould lists all tha classes that begins with abcd in the project
relative to the ./tags file
and so on...)

The output list should be "navigable" and it should be possible to go
to the definition with vim
"or something like this"...

A simple python script would be very usefull for achieving this
powerfull results...

What do you think ?
Best regards,
THX

--~--~-~--~~~---~--~~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---



VIM for programmers: what is needed ?

2008-11-09 Fir de Conversatie alex

Hi,

I use vim for writing documents in latex since a few years, and I
think vim is the best editor for writing text files that exists ! The
vim latex suite is also very good.

Now I am beginning to learn C++ programming, and of course I need some
tools for doing that. In other words I need an IDE or "somthing like
an IDE"...

Because vim is the best text editor, I would like to keep working with
VIM and NOT switching to IDEs like NetBeans or Eclipse (I work on
Linux and on Windows).
I think that VIM could boost productivity far more than Eclipse does.
It would also be possible to use VIM side by side with NetBeans or
Eclipse switching between the two softwares... but in the practice all
is not so simple.

The only tool I miss in VIM (for now) is an efficeint class and source
code browser, that recognizes the object oriented features of C++ (and
other languages), so that i can find class members, etc. etc. I need
something like an improved cscope for object oriented programming.
I have tried exuberant ctags, the taglist plugin and omincppcomplete.
Omincppcomplete seems to work good, but I dont have found nothing
better than this packages (Vim intellisens works on Windows only). I
tried GNU global too.

Doxygen is very good, but it is not intended to be used dinamically,
and does not support text editor integration (you use a HTML browser
to see the infos about the classes and members in the source code).

A possible alternative is to use the jVi (another vi clone) in
NetBeans (nbvi).

So the question is (I have read similar treads in this group):
- does there exist some tools for navigating classes and members
efficiently in C++ projects, better than exuberant ctags or cscope or
GNU global or gnutags, that are simply to use and that can be used
with vim or form the command line ? Or I have to use NetBeans or
Eclipse ? Because there exists omnicppcomplete i do not give up my
hopes.
- where can i find a complete introduction to how to use the plugins
for vim for programming (taglist, omincppcomplete, and others) ?
- emacs has OObrowser, Ebrowse, xrefacotry. Does vim has similar
tools ?
- NetBeans has jVi, but why you dont work thowards a full integration
of vim in Eclipse or NetBeans. I mean using all the (g)vim
functionality within this modern IDEs... this would be a way for
bringing vim in the 21st century. The editors of Eclipse and NetBeans
are very poor if compared to vim !
- what tools can I use under GNU linux for programming and navigating
object-oriented source code outside of vim ?

Vim is only an editor, but the people do not need only an editor, they
need IDEs too (or at least extra software like of course g++ make gdb
etcetera). But modern IDEs simply do not have editors that are so good
as vim, who is the best editor.

Sorry for the long threat and thank you in advance for any reply (i
have read all the similar threads but i still ask you).

Thank you !

--~--~-~--~~~---~--~~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---



VIM and NTFS streams

2008-01-31 Fir de Conversatie Alex

Hi all,

I understand that these bugs and feature requests are "nice to have",
but anyway...

VIM is not working very well with NTFS streams. When you edit file,
say, "test.txt:aaa",
it complains about backup during save (E510). If you edit file
"test.txt:my.txt", VIM opens
and edits file test_txt (but with correct stream ).

Also, it would be very nice if NTFS streams could be shown during
command line
autocompletion. Say, you have file test.txt with streams aaa and bbb.
On command line
you write ":e test.txt:", and after pressing tab you see test.txt:aaa
and test.txt:bbb, like
normal file names.

Best regards,

Alex
--~--~-~--~~~---~--~~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---