winwidth & winheight doesn't work here

2011-10-09 Thread Roger
Reading the good book Learning the VIM Editor(s) and see winwidth & winheight 
mentioned, but am having trouble getting it working here!

Why, when settings winwidth on vertical split files, it's not automagically 
resizing the windows as I toggle between the files?

I have set to noequalalways, also. :-/

-- 
You received this message from the "vim_use" 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: Setting undo off

2011-10-09 Thread Paul

On Sat, Oct 08, 2011 at 07:06:03PM +0200, meino.cra...@gmx.de wrote:

I have a *HUGE* file, which I want to :Align\s .
The problem is: It takes much too long -- I had
to interrupt the process.

OT: May be there is another (sorry: non vim) UNIX-tool
to acchieve, what I want (I am working on Linux) ?


Maybe column ('man column') will be of use.

--

.

--
You received this message from the "vim_use" 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: Pathogen

2011-10-09 Thread Paul

On Sat, Oct 08, 2011 at 11:28:23AM +0200, Jeroen Budts wrote:

On 10/07/2011 09:24 PM, Paul wrote:

Is it possible, in .vimrc, to tell Pathogen to not load a particular
plug-in unless Vim's version number is > 700, for example, but load all
other plug-ins? Thanks.


This is perfectly possible by (conditionally) adding the name of the
plugin to the g:pathogen_disabled variable before calling
pathogen#infect(). For example:

if v:version < '703' || !has('python')
call add(g:pathogen_disabled, 'gundo')
endif

See my dotvim repository for some more examples:
https://github.com/teranex/dotvim/blob/master/pathogen_init
Especially this older version of the file:
https://github.com/teranex/dotvim/blob/11021e88f3b623718b2bf27385650785a1fd310a/pathogen_init


Excellent, thank you.

--

.

--
You received this message from the "vim_use" 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: Setting undo off

2011-10-09 Thread meino . cramer
Paul  [11-10-09 11:48]:
> On Sat, Oct 08, 2011 at 07:06:03PM +0200, meino.cra...@gmx.de wrote:
> >I have a *HUGE* file, which I want to :Align\s .
> >The problem is: It takes much too long -- I had
> >to interrupt the process.
> >
> >OT: May be there is another (sorry: non vim) UNIX-tool
> >to acchieve, what I want (I am working on Linux) ?
> 
> Maybe column ('man column') will be of use.
> 
> -- 
> 
> .
> 
> -- 
> You received this message from the "vim_use" 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
> 


Hi,

thank you all for your help ! :)

Best regards
mcc

-- 
You received this message from the "vim_use" 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: Ubuntu Mono font

2011-10-09 Thread Александр Куринный
In terminal they look really bad)

Looks more like famous Comic Sans=)
Letter "M" - why did they do it?!

My choise for terminal is Liberation Mono.

On 9 October 2011 00:12, George V. Reilly  wrote:
> Since monospaced fonts are a perennial topic of discussion here, I'll
> mention the new Ubuntu Mono font, which can be downloaded from
> http://font.ubuntu.com/
>
> The recent 0.80 release of the Ubuntu Fonts includes Ubuntu Mono in
> Regular, Regular Italic, Bold, and Bold Italic variants. It's the
> default font for the Terminal in next week's release of Oneiric
> Ocelot, Ubuntu 11.10. I've tried it in MacVim and Gnome Gvim and it
> looks decent. As the version number implies, the fonts (particularly
> Mono) are a work in progress.
> --
> /George V. Reilly  geo...@reilly.org  Twitter: @georgevreilly
> http://www.georgevreilly.com/blog  http://blogs.cozi.com/tech
>
> --
> You received this message from the "vim_use" 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
>



-- 
С уважением, Куринный Александр
kurin...@gmail.com

-- 
You received this message from the "vim_use" 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


completion options that completes longest common match, but does not delete already typed characters

2011-10-09 Thread Nathan
Hi,

I am using gvim vim eclim.
I have set completeopt=longest,menuone so that when I do
autocompletion (C-X C-U) the longest common match should be inserted.

Now I have the following scenario:

Ga

the possible matches, listed, are:
Game
GAME_H_

Now the completion says: User defined completion (^U^N^P) Back at
original
And deletes the "a" so, that only the "G" remains.

If I already typed "Ga" I only want completions starting with "Ga" and
I do not want the completion to delete any characters I already typed.

Can I configure completion to do this?

Thanks!
Nathan

-- 
You received this message from the "vim_use" 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: Ubuntu Mono font

2011-10-09 Thread George V. Reilly
[Reflowed as a bottom post to forestall whining from the usual suspects]

2011/10/9 Александр Куринный 
> On 9 October 2011 00:12, George V. Reilly  wrote:
> > Since monospaced fonts are a perennial topic of discussion here, I'll
> > mention the new Ubuntu Mono font, which can be downloaded from
> > http://font.ubuntu.com/
> >
> > The recent 0.80 release of the Ubuntu Fonts includes Ubuntu Mono in
> > Regular, Regular Italic, Bold, and Bold Italic variants. It's the
> > default font for the Terminal in next week's release of Oneiric
> > Ocelot, Ubuntu 11.10. I've tried it in MacVim and Gnome Gvim and it
> > looks decent. As the version number implies, the fonts (particularly
> > Mono) are a work in progress.
>
> In terminal they look really bad)

Some, including me, like Ubuntu Mono in Terminal.

> Looks more like famous Comic Sans=)

Apparently, Ubuntu Mono is being tweaked (but not designed) by Vincent
Connare, the designer of Comic Sans:
http://design.canonical.com/2011/09/ubuntu-monospace-beta/. He also
designed Trebuchet, which is a much more respectable font.

> Letter "M" - why did they do it?!

That's been controversial. See the above link for some background.
Also, https://bugs.launchpad.net/ubuntu-font-family/+bug/869961

> My choise for terminal is Liberation Mono.
--
/George V. Reilly  geo...@reilly.org  Twitter: @georgevreilly
http://www.georgevreilly.com/blog  http://blogs.cozi.com/tech

-- 
You received this message from the "vim_use" 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: winwidth & winheight doesn't work here

2011-10-09 Thread Tony Mechelynck

On 09/10/11 11:08, Roger wrote:

Reading the good book Learning the VIM Editor(s) and see winwidth&  winheight
mentioned, but am having trouble getting it working here!

Why, when settings winwidth on vertical split files, it's not automagically
resizing the windows as I toggle between the files?

I have set to noequalalways, also. :-/



With me it does, but remember that these options are "desired minimums 
for the current window" and that the "absolute minimums for any window" 
are set by 'winminwidth' and 'winminheight'. When switching windows, the 
new window will not be resized if it already exceeds the desired 
minimum, nor will it be made bigger than would allow all other windows 
to remain at or above the absolute minimum.


Also, some special window types have their own desired minimums: see
:help 'helpheight'
:help 'cmdwinheight'
:help 'previewheight'

The absolute minimums may be set to zero, the desired minimum for the 
current window must be at least 1 since the currentcursor location must 
always be visible.


The following should swell the current window to maximum size, squashing 
other windows to only a vertical divider on left and right or a status 
line above and below:


  :set nowfh  " no fixed size
  :set noea eadirection=both  " no equal size
  :set wmw=0 wmh=0" squash other windows
  :set wiw= wh=999 hh=999 cwh=999 pvh=999 " enlarge current window
  :let netrw_winsize = 100" netrw split to 100% size

Best regards,
Tony.
--
"What is wanted is not the will to believe, but the will to find out,
which is the exact opposite."
-- Bertrand Russell, "Skeptical_Essays", 1928

--
You received this message from the "vim_use" 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: winwidth & winheight doesn't work here

2011-10-09 Thread Roger
> On Sun, Oct 09, 2011 at 11:37:56PM +0200, Tony Mechelynck wrote:
>On 09/10/11 11:08, Roger wrote:
>> Reading the good book Learning the VIM Editor(s) and see winwidth&  winheight
>> mentioned, but am having trouble getting it working here!
>>
>> Why, when settings winwidth on vertical split files, it's not automagically
>> resizing the windows as I toggle between the files?
>>
>> I have set to noequalalways, also. :-/
>>
>
>With me it does, but remember that these options are "desired minimums 
>for the current window" and that the "absolute minimums for any window" 
>are set by 'winminwidth' and 'winminheight'. When switching windows, the 
>new window will not be resized if it already exceeds the desired 
>minimum, nor will it be made bigger than would allow all other windows 
>to remain at or above the absolute minimum.
>
>Also, some special window types have their own desired minimums: see
>   :help 'helpheight'
>   :help 'cmdwinheight'
>   :help 'previewheight'
>
>The absolute minimums may be set to zero, the desired minimum for the 
>current window must be at least 1 since the currentcursor location must 
>always be visible.
>
>The following should swell the current window to maximum size, squashing 
>other windows to only a vertical divider on left and right or a status 
>line above and below:
>
>   :set nowfh  " no fixed size
>   :set noea eadirection=both  " no equal size
>   :set wmw=0 wmh=0" squash other windows
>   :set wiw= wh=999 hh=999 cwh=999 pvh=999 " enlarge current window
>   :let netrw_winsize = 100" netrw split to 100% size
>
>Best regards,
>Tony.

Great.  Thanks Tony.  I'll relook over those later settings here.  So far, 
minheigh/width is set to 0 or 1 here.

-- 
Roger
http://rogerx.freeshell.org/

-- 
You received this message from the "vim_use" 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: setloclist() doesn't work

2011-10-09 Thread sinbad
On Oct 9, 8:28 am, Christian Brabandt  wrote:
> Hi sinbad!
>
> On Sa, 08 Okt 2011, sinbad wrote:
>
> > does it matter how these entries are created (lgrep, lexpr)...?
> > For filling location lists, the script i am using uses 'lexpr' to
> > populate the location-list entries, the files are C source file.
> > I believe you might have used lgrep or someother command,
> > if you happen to work C code, can you try the same thing works
> > for Cscope results on quickfix or location lists.  Clearly It didn't
> > work for me.
>
> > thanks for checking out for me.
>
> Can you give us a reproducible example how you created the location list
> and what you did to test it? Oh and what version are you using?
>
> regards,
> Christian

As an example i am using vim 7.3 source code. I am listing all the
references
of the ResetRedobuff() function using Gtags plugin of "Gnu Global"
tool.

Location List: the list is filled using the following Gtags command

:Gtags -r ResetRedobuff
:lopen

edit.c|404| ResetRedobuff();
edit.c|6436| ResetRedobuff();
misc2.c|1176| ResetRedobuff();
misc2.c|1177| ResetRedobuff();
normal.c|1506| ResetRedobuff();
normal.c|3626| ResetRedobuff();
normal.c|7380| ResetRedobuff();
spell.c|10317| ResetRedobuff();

" Fill the variable 'x' with current location lsit details
:let x = getloclist(0)
:echo x

[{'lnum': 404, 'bufnr': 1, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1,
'type': '', 'pattern': '', 'text': '  ResetRedobuff();'},
{'lnum': 6436, 'bufnr': 1, 'col': 0, 'valid': 1, 'vcol':
0, 'nr': -1, 'type': '', 'pattern': '', 'text': '
ResetRedobuff();'}, {'lnum': 1176, 'bufnr': 3, 'col': 0, 'valid': 1,
'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': '
  ResetRedobuff();'}, {'lnum': 1177, 'bufnr': 3, 'col': 0,
'valid': 1, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text':
' ResetRedobuff();'}, {'lnum': 1506, 'bufnr': 4, 'col'
: 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '',
'text': '  ResetRedobuff();'}, {'lnum': 3626,
'bufnr': 4, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type':
 '', 'pattern': '', 'text': 'ResetRedobuff();'}, {'lnum':
7380, 'bufnr': 4, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type':
'', 'pattern': '', 'text': ' ResetRedobuff();'
}, {'lnum': 10317, 'bufnr': 5, 'col': 0, 'valid': 1, 'vcol': 0, 'nr':
-1, 'type': '', 'pattern': '', 'text': '
ResetRedobuff();'}]


" set the location list with contents from 'x'
:call setloclist(0,x)

:lopen
New Location List: observe that the filenames are missing, all the
following are dead links.

|404| ResetRedobuff();
|6436| ResetRedobuff();
|1176| ResetRedobuff();
|1177| ResetRedobuff();
|1506| ResetRedobuff();
|3626| ResetRedobuff();
|7380| ResetRedobuff();
|10317| ResetRedobuff();

:echo getloclist(0) " observe that 'valid' field is '0'

[{'lnum': 404, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1,
'type': '', 'pattern': '', 'text': '  ResetRedobuff();'},
{'lnum': 6436, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol':
0, 'nr': -1, 'type': '', 'pattern': '', 'text': '
ResetRedobuff();'}, {'lnum': 1176, 'bufnr': 0, 'col': 0, 'valid': 0,
'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': '
  ResetRedobuff();'}, {'lnum': 1177, 'bufnr': 0, 'col': 0,
'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text':
' ResetRedobuff();'}, {'lnum': 1506, 'bufnr': 0, 'col'
: 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '',
'text': '  ResetRedobuff();'}, {'lnum': 3626,
'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type':
 '', 'pattern': '', 'text': 'ResetRedobuff();'}, {'lnum':
7380, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type':
'', 'pattern': '', 'text': ' ResetRedobuff();'
}, {'lnum': 10317, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr':
-1, 'type': '', 'pattern': '', 'text': '
ResetRedobuff();'}]


For reference i am pasting the Gtags plugin code.

" File: gtags.vim
" Author: Tama Communications Corporation
" Version: 0.5
" Last Modified: June 27, 2011
"
" Copyright and licence
" -
" Copyright (c) 2004, 2008, 2010, 2011 Tama Communications Corporation
"
" This file is part of GNU GLOBAL.
"
" This program is free software: you can redistribute it and/or modify
" it under the terms of the GNU General Public License as published by
" the Free Software Foundation, either version 3 of the License, or
" (at your option) any later version.
"
" This program is distributed in the hope that it will be useful,
" but WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
" GNU General Public License for more details.
"
" You should have received a copy of the GNU General Public License
" along with this program.  If not, see .
"
" Overview
" 
" The gtags.vim plug-in script integrates the GNU GLOBAL source code
tag s

Re: setloclist() doesn't work

2011-10-09 Thread sinbad
On Oct 10, 10:19 am, sinbad  wrote:
> On Oct 9, 8:28 am, Christian Brabandt  wrote:
>
>
>
>
>
>
>
>
>
> > Hi sinbad!
>
> > On Sa, 08 Okt 2011, sinbad wrote:
>
> > > does it matter how these entries are created (lgrep, lexpr)...?
> > > For filling location lists, the script i am using uses 'lexpr' to
> > > populate the location-list entries, the files are C source file.
> > > I believe you might have used lgrep or someother command,
> > > if you happen to work C code, can you try the same thing works
> > > for Cscope results on quickfix or location lists.  Clearly It didn't
> > > work for me.
>
> > > thanks for checking out for me.
>
> > Can you give us a reproducible example how you created the location list
> > and what you did to test it? Oh and what version are you using?
>
> > regards,
> > Christian
>
> As an example i am using vim 7.3 source code. I am listing all the
> references
> of the ResetRedobuff() function using Gtags plugin of "Gnu Global"
> tool.
>
> Location List: the list is filled using the following Gtags command
>
> :Gtags -r ResetRedobuff
> :lopen
>
> edit.c|404| ResetRedobuff();
> edit.c|6436| ResetRedobuff();
> misc2.c|1176| ResetRedobuff();
> misc2.c|1177| ResetRedobuff();
> normal.c|1506| ResetRedobuff();
> normal.c|3626| ResetRedobuff();
> normal.c|7380| ResetRedobuff();
> spell.c|10317| ResetRedobuff();
>
> " Fill the variable 'x' with current location lsit details
> :let x = getloclist(0)
> :echo x
>
> [{'lnum': 404, 'bufnr': 1, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1,
> 'type': '', 'pattern': '', 'text': '              ResetRedobuff();'},
> {'lnum': 6436, 'bufnr': 1, 'col': 0, 'valid': 1, 'vcol':
> 0, 'nr': -1, 'type': '', 'pattern': '', 'text': '
> ResetRedobuff();'}, {'lnum': 1176, 'bufnr': 3, 'col': 0, 'valid': 1,
> 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': '
>       ResetRedobuff();'}, {'lnum': 1177, 'bufnr': 3, 'col': 0,
> 'valid': 1, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text':
> '             ResetRedobuff();'}, {'lnum': 1506, 'bufnr': 4, 'col'
> : 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '',
> 'text': '                          ResetRedobuff();'}, {'lnum': 3626,
> 'bufnr': 4, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type':
>  '', 'pattern': '', 'text': '            ResetRedobuff();'}, {'lnum':
> 7380, 'bufnr': 4, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type':
> '', 'pattern': '', 'text': '             ResetRedobuff();'}, {'lnum': 10317, 
> 'bufnr': 5, 'col': 0, 'valid': 1, 'vcol': 0, 'nr':
>
> -1, 'type': '', 'pattern': '', 'text': '
> ResetRedobuff();'}]
>
> " set the location list with contents from 'x'
> :call setloclist(0,x)
>
> :lopen
> New Location List: observe that the filenames are missing, all the
> following are dead links.
>
> |404| ResetRedobuff();
> |6436| ResetRedobuff();
> |1176| ResetRedobuff();
> |1177| ResetRedobuff();
> |1506| ResetRedobuff();
> |3626| ResetRedobuff();
> |7380| ResetRedobuff();
> |10317| ResetRedobuff();
>
> :echo getloclist(0) " observe that 'valid' field is '0'
>
> [{'lnum': 404, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1,
> 'type': '', 'pattern': '', 'text': '              ResetRedobuff();'},
> {'lnum': 6436, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol':
> 0, 'nr': -1, 'type': '', 'pattern': '', 'text': '
> ResetRedobuff();'}, {'lnum': 1176, 'bufnr': 0, 'col': 0, 'valid': 0,
> 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': '
>       ResetRedobuff();'}, {'lnum': 1177, 'bufnr': 0, 'col': 0,
> 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text':
> '             ResetRedobuff();'}, {'lnum': 1506, 'bufnr': 0, 'col'
> : 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '',
> 'text': '                          ResetRedobuff();'}, {'lnum': 3626,
> 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type':
>  '', 'pattern': '', 'text': '            ResetRedobuff();'}, {'lnum':
> 7380, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type':
> '', 'pattern': '', 'text': '             ResetRedobuff();'}, {'lnum': 10317, 
> 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr':
>
> -1, 'type': '', 'pattern': '', 'text': '
> ResetRedobuff();'}]
>
> For reference i am pasting the Gtags plugin code.
>
> " File: gtags.vim
> " Author: Tama Communications Corporation
> " Version: 0.5
> " Last Modified: June 27, 2011
> "
> " Copyright and licence
> " -
> " Copyright (c) 2004, 2008, 2010, 2011 Tama Communications Corporation
> "
> " This file is part of GNU GLOBAL.
> "
> " This program is free software: you can redistribute it and/or modify
> " it under the terms of the GNU General Public License as published by
> " the Free Software Foundation, either version 3 of the License, or
> " (at your option) any later version.
> "
> " This program is distributed in the hope that it will be useful,
> " but WITHOUT ANY WARRANTY; without even the implied warranty of
> " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> " GNU Gener