Re: breakindent, take 2

2007-05-14 Thread Martin Stubenschrott
On Mon, May 14, 2007 at 07:30:23PM +0200, Václav Šmilauer wrote:
 The patch is against current svn (vim7, rev. 288). Any comments are welcome.

I know this might not be desired comment, since I didn't even look at
the patch but only at the screenshots.

I just wanted to say that this feature would really be awesome, as I am
doing a lot of LaTeX coding myself, and the default wrapping really
doesn't look well. 


PS: it would be nice if we could have the vim latex-suite autoindent by
default in vim without the need to install the latex-suite (which is
just overkill in my opinion).

[Off-topic] Vimperator

2007-04-23 Thread Martin Stubenschrott
I am sorry, if this kind of messages are highly despised on this list.
But since vim-users are my main target group, 

I created a new Firefox extension, which makes browsing the web feel
like browsing a vim buffer:

Maybe it helps you vim users, that :wq actually works to quit firefox :)


Re: infercase for :substitute?

2007-03-30 Thread Martin Stubenschrott
On Fri, Mar 30, 2007 at 09:00:44AM +0200, Ingo Karkat wrote:

 There's another script, SmartCase, which only slightly differs from 
 keepcase.vim in the semantics of its invocation:

I have used that for some time, but was wondering why it has this bad
votings, maybe it doesn't work well in last versions? Or only some
stupid bot?

Re: Understanding regxp implementation

2007-03-19 Thread Martin Stubenschrott
On Mon, Mar 19, 2007 at 01:49:53PM +0100, Nikolai Weibull wrote:
 On 1/1/07, Asiri Rathnayake [EMAIL PROTECTED] wrote:
 On Mon, 2007-03-19 at 11:55 +0100, Nikolai Weibull wrote:
  On 3/19/07, Asiri Rathnayake [EMAIL PROTECTED] wrote:
   Hi Bram, Nicolai,
  A 'k' would be greatly appreciated.
 I'm really really sorry, won't happen again...
 Hehe, don't take it too hard, it happens to me all the time.  If I had
 a dime for every misspelling of my name, I'd have...more money than I
 do now.

Now I know, why Bram said in his Google Talk that he even uses ctrl-n
completion for names, as it helps not misspelling names :)


Re: Reminder: Vim presentation in Mountain View tomorrow

2007-02-20 Thread Martin Stubenschrott
As announced, Bram gave an interesting talk about vim on the Google
campus last week, for those who couldn't be there, there is a well made
video of it there:

Maybe it should also be linked from the news entry on

Off-topic, but since google announced it's third season for the Summer
Of Code, wouldn't it be interesting to have vim participate in it? Or is
the problem, that you, Bram, already have too little time to play mentor,
and there aren't other core developers for this task?


Re: Vim 7 performance notes

2007-02-01 Thread Martin Stubenschrott
On Thu, Feb 01, 2007 at 11:20:16PM +0300, Alexei Alexandrov wrote:
 Hi Bram et al.,
 I'm doing some performance investigations of Vim code trying to understand 
 whether there are any possibilities to improve it.
 Currently I've made the following observations (all investigations are done 
 on Windows):
 Redundant work is done during regexp operations in syntax highlighting. On 
 some files it is very noticable. The stack of the hotspot is ...  
 syn_current_attr  syn_regexec  vim_regexec_multi  vim_regexec_both  
 regtry  regmatch  ga_grow  alloc_clear  memset. So alloc_clear spends 
 quite a few clockticks in lalloc() and memset().
 The reason for this is pessimistically big grow size for regset growing array:
 ga_init2(regstack, 1, 1);
 This is not very good: many regexp operations don't go deep - non-match is 
 detected very quickly. But even one element on the stack will lead to 
 allocating at least 1 bytes (which should be fast with good CRT memory 
 allocator) and (worse) initializing these 1 bytes with zeros (won't be 
 that fast).

I am not sure if this is really relevant to vim, because I don't have a
clue which regexp matching algorithm it is using, but you might want to
look into this article, when it comes to regexp speed:



Re: Vim 8 enhancements

2007-01-31 Thread Martin Stubenschrott
Now that there are many new - good, or not - ideas coming up. I think it
would be a great idea, if the voting page on:

becomes updated with new ideas, and old ones get deleted/changed.

Now that we have omnicompletion, 'add intelligent, context-sensitive
completion (intellisense)' does not make sense anymore, rather 'add more
/better omni completions'.

- add tabbed windows (one tab per window, only one is visible)
is also useless as we have it now.

I don't know if all current points of registered/paying users should be
reset, but probably it's best to start over with 0 points when updating
the list.


Vim8 idea: complete strings

2007-01-29 Thread Martin Stubenschrott
I often want to complete full strings in quotes (foo, 'bla',
`command bla blub`).

But for now, I really need to type all these things again and again. It
would be nice, if I could say fc-x-c- to complete full strings.
Or maybe also c-xc-' for single qouted strings, and c-xc-` for
`-quoted strings. Or maybe just one command to complete all strings, and
get from context, if we want to complete  ' or ` strings, depending on
what character is in front of c-xc-?. fc-xc-? would complete 
quoted strings 'c-xc-? '-quoted and so on.


Re: JavaScript indentation

2007-01-27 Thread Martin Stubenschrott
On Sun, Jan 28, 2007 at 01:12:00AM +0100, Bram Moolenaar wrote:
  Hope that gets added to the default vim 7.1 distribution, because it's
  quite the best working omni complete script I have seen so far.
 Can you mention on what points cppcomplete.vim works better than the
 ccomplete.vim scripts?
 If it's overal better I can replace the script.

First, it checks return types of functsion (where possible).
Lets assume this C code:

typedef struct POINT
int x;
float y;

POINT func()
// POINT foo = ...
return foo;

int main()
cppcomplete lists me:
x and y as members since func() returns a struct of type POINT.

ccomplete does nothing but searching for a long time. I have a 125MB
tags file in /usr/include with --foldcase, but cppcomplete is instant,
and ccomplete takes some seconds, and still doesn't find something.

Second, I am not sure, if ccomplete can follow typedefs, cppcomplete can.

These are my main 2 concerns, and probably a unified codebase for c/c++
completion is easier to maintain. But I have not worked with ccomplete
that much, so please check, if cppcomplete also works for your usage
szenarios when coding C.


Re: BOF Vim 8 - Suggestions

2007-01-21 Thread Martin Stubenschrott
On Sun, Jan 21, 2007 at 10:55:44PM +0100, Nikolai Weibull wrote:
 On 1/21/07, Marc Weber [EMAIL PROTECTED] wrote:
 My comments on nohl:
 nnoremap esc :nohl bar echo cr
 should clear message line and remove highlighting
 nnoremap Esc Esc:silent! nohighlightCR

Whenever I put any of these 2 commands in my .vimrc, vim beeps on
startup, and when I press 'k' it deletes the current and above line.


Re: GNOME HIG compliance in gvim: button order in close confirmation dialogs (PATCH)

2007-01-08 Thread Martin Stubenschrott
On Mon, Jan 08, 2007 at 12:14:05PM +0100, Trenton Schulz wrote:
 I'll look into this later.  Perhaps Save/Discard/Cancel is better for
 all GUIs, since you don't need to read the text to know whether yes
 means save or discard.  But it will break the translations.
 Just being a lurker here, I would vote for this being in all GUIs  
 (not that we get votes here). Having the actual save/discard vs. yes/ 
 no makes it much simpler to look at a message box and know which  
 button to press (probably why the File Changed dialog in Vim is a  
 bit easier to decide what to do than the Save Changes dialog IMO).

Would you also vote for changing the console style dialogs? I mean,
console users are normally used to press y or n, when answering these
kind of questions.


Re: GNOME HIG compliance in gvim: button order in close confirmation dialogs (PATCH)

2007-01-08 Thread Martin Stubenschrott
On Mon, Jan 08, 2007 at 05:05:31PM +0100, Trenton Schulz wrote:
 Would you also vote for changing the console style dialogs? I mean,
 console users are normally used to press y or n, when answering these
 kind of questions.
 Well, don't you do that by typing :wq/:wq! or ZZ or whatever? Most of  
 the other dialogs on the console version don't ask yes/no questions  
 as far as I have encountered. I think it is a non-issue for the  
 console version...

Well, mostly I use ZZ, but sometimes :q, but have :set confirm on, so
when there are unsaved changes, there is no need to press :q!, but just
y to save the changes, or n do discard them.


Re: [PATCH] zip plugin: support any filename

2006-10-23 Thread Martin Stubenschrott
On Mon, Oct 23, 2006 at 10:02:48PM +0200, [EMAIL PROTECTED] wrote:
 I'm using this to edit firefox extensions directly inside their jar
 files. I'm also attaching a patch that adds the required associations
 (jar and xpi, I'm sure there are more).

I exactly wanted to do the same, but it didn't work. Hopefully your
patch gets accepted (didn't test it myself yet though).


Re: insert-mode :map-alt-keys and 8-bit locales

2006-10-21 Thread Martin Stubenschrott
On Sun, Oct 22, 2006 at 01:31:09AM +0400, Alexey I. Froloff wrote:
  Vim should _support_ Meta-Sends-Escape mode which is A Must Have
  for non-ascii 8-bit locales
 Patch attached.
 New option - 'eightbitmeta' ('em'), default on.  If unset, two
 things happen:

I like the idea, but did not test the patch yet. I did not get alt-keys
work properly with the meta8 option in urxvt set.


Re: Calling COM Components from Vim (Win32)

2006-10-14 Thread Martin Stubenschrott
On Sat, Oct 14, 2006 at 03:44:33PM +0200, Eric Smith wrote:
 I've scanned the vim-dev archives looking for any suggestions for and/or 
 attempts at creating a means of calling dual-interface COM objects from 
 within the Win32 version of Vim, and come up empty.
 IMHO, this would be a useful feature for extending Vim script to do some 
 very powerful things.  For instance, advanced code completion could be 
 plugged into Omni.

Since COM objects are only Win32, I don't think that will help much with
omni completion, because at least those omni completion systems shipped
with vim by default should be as cross-platform as possible.


Re: Keyword completion

2006-09-20 Thread Martin Stubenschrott
On Wed, Sep 20, 2006 at 01:33:54PM -0700, Gautam Iyer wrote:
 Maybe this has been discussed already: When pressing Ctrl-P / Ctrl-N,
 can we get vim to complete from the list of syntax keywords?

You can do that by setting:

:set omnifunc=syntaxcomplete#Complete

and then use c-xc-o

You can also specifiy certain syntax groups too use, but look into the
docs/scripts, how to do that.


Re: vim7 possible bug

2006-05-11 Thread Martin Stubenschrott
On Thu, May 11, 2006 at 03:10:40PM +0200, Pierre Habouzit wrote:
 Le Jeu 11 Mai 2006 14:57, Pierre Habouzit a écrit :
   make enter work in popup
  inoremap cr C-R=pumvisible() ? \ltC-Y : \ltcrcr
  sadly I can't do the same with esc to exit the completion, because
  of esc beeing esc (and me using vim into non 8-bit capable
 which is a wrong assertion, 
 inoremap esc C-R=pumvisible() ? \ltC-E : \ltesccr
 just look to work fine. I don't remember which problem I encountered 
 with that one ...

Here it doesn't work (urxvt terminal), after this mapping, I get things like 
writing A and B on a new line when I press up or down after
canceling a popup with esc.

Re: 7.0g02 isearch/redir/balloon display glitch [GTK]

2006-05-04 Thread Martin Stubenschrott
On Thu, May 04, 2006 at 03:02:18PM +0100, Neil Bird wrote:
   With the noddy plugin ~/.vim/ftplugin/c/balloon.vim:
 function! MyBalloonExpr()
   redir = def
   exe 'silent isearch /'.v:beval_text.'/'
   redir END
   return substitute(def,'^\_s*\(.\{-\}\)\_s*$', '\1', '')
 setlocal balloonexpr=MyBalloonExpr()
 setlocal ballooneval

Sorry, not directly connected to your problem, but I just noticed that
the balloon window can _only_ be used with the mouse. Wouldn't it make
sense if 'balloonexpr' is set, that the balloon is also shown when the
cursor pauses over a character for a certain time? (Just like CursorHold

I think, most people using vim will never touch the mouse but the
balloon could give valuable information (like the definition of
variable) also for keyboard-only users. 


Re: some problem with vim7f Beta

2006-04-26 Thread Martin Stubenschrott
On Wed, Apr 26, 2006 at 10:35:30AM +0800, Linsong wrote:

 My main point is: I don't want to select entry in the completion menu by 
 pressing CTRL-N or CTRL-P, instead, I want to input enough characters to 
 make correct entry  become the first entry and it is highlighted, then I 
 can use CTRL-Y(yes, I have mapped Enter to CTRL-Y since I am tempted 
 to use Enter) to confirm the completion.

Then just :inoremap C-Y C-NC-Y 
That should should do what you expect now (untested).

I really disliked old behavior, and think the current completion with
'longest' and ctrl-n is what it should behave like since it's more
logical as you only need c-xc-o and c-n and not yet another key like

Re: Code completion and entries with duplicate 'word' attributes.

2006-04-21 Thread Martin Stubenschrott
On Thu, Apr 20, 2006 at 06:52:44PM -0700, Eric Van wrote:
 My code completion function returns a list with the following entries:
   kind: 'f', word: 'toCharArray', menu: 'toCharArray()  char[] - String'
   kind: 'f', word: 'toString', menu: 'toString()  String - String'
   kind: 'f', word: 'toUpperCase', menu: 'toUpperCase()  String - String'
   kind: 'f', word: 'toUpperCase', menu: 'toUpperCase(Locale locale) 
 String - String'
   kind: 'f', word: 'toLowerCase', menu: 'toLowerCase()  String - String'
   kind: 'f', word: 'toLowerCase', menu: 'toLowerCase(Locale locale) 
 String - String'


 So I suggest either removing duplicate checking when results are in
 the dictionary format, or at the very least, check the 'menu'
 attribute along with the 'word' attribute to determine if an entry is
 a duplicate, however that may or may not work for everyone.
 Thoughts? Comments?

Yes, use the 'info' field for further information on a single 'word'. In
your case you should write all different functions signatures in the
'info' field of just one 'word'.

kind: 'f', word: 'toString',menu: 'toString()  String - String',
info: 'String toString()'

kind: 'f', word: 'toUpperCase', menu: 'toUpperCase()  String - String'
info: 'String toUpperCase()\n
   String toUpperCase(Locale locale)'


BTW: how complete is your java support? Does it work good enough for a
public release, or is it for your own usage only?