Wednesday, August 31, 2011

Re: Search and write

Thanks for help!

I want to write the digits and actually my full regex in vim is:
/[-0-9]\{13,17\}

I want numbers with 13 to 17 digits even if they have hyphens between the digits. Should then be something like:

:g/[-0-9]\{13,17\}/t.|s/[^0-9]\+//g|w! >> my.txt | d

I tried this but I get the whole text not just numerical digits (with hyphens) in a new file.

Lars




On Wed, Aug 31, 2011 at 3:44 PM, Tim Chase <vim@tim.thechases.com> wrote:
On 08/31/11 07:23, Lars Iselid wrote:
If you have a search statement something like this:

/[0-9]

And want to write :w the matching content to a file. How to do? I've
seen examples similar to this:

/[0-9] . w>>  my.txt

Depends on whether you want to write just the match, or the entire line.  If you want the entire line containing the match(es), it's pretty easy:

 g/[0-9]/w>> my.txt

If you just want to write those digits to the file, it's more complex.  Something like:

 g/[0-9]/t.|s/[^0-9]\+//g|w! >> my.txt | d

which copies each matching line to the line below, deletes all the non-digits, writes/appends the temp-line to the file, and then deletes the temp-line.

-tim



--
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: Very strange problem about messages in 64bit vim

oh man , you are definitely right, I tried to compiled iconv and
gettext with MS VC2010 64bit compiler, and replace the original
iconv.dll and libintl.dll with 64 bit ones, and that just work,
messages in 64bit vim bacame Chinese, Thanks very much !

On Sep 1, 12:27 am, Sergey Khorev <sergey.kho...@gmail.com> wrote:
> > hey guys, there is a problem about messages in 64bit vim.
>
> > But when finished compiling, I found that all messages in vim are
> > English (Mother tongue is Chinese), and the menus are Chinese, this
> > puzzled me a lot.
> > In order to figure out this, I tried some other ways.
>
> > First, I tried to compile vim with MS VC2010 32bit compiler,
> > everything is all right, messages are all Chinese.
>
> I guess you have 32-bit libintl.dll or intl.dll somewhere in PATH or
> the Vim directory. 64-bit Vim cannot use it so consequently its
> messages are in English.
>
> --
> Sergey Khorevhttp://sites.google.com/site/khorser
> Can anybody think of a good tagline I can steal?

--
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: Installing on OSX 10.4.7

> Could someone give me some instruction on what package I need to download
> and how to install it from a console to get some version (does not have to
> be 7) of it running on these boxes.


How about a different tack?

$vim scp://remoteuser@server.tld//path/to/document

if you run this from your host you can just edit files over SCP
without having to install anything on the AppleTV.

http://vim.wikia.com/wiki/Editing_remote_files_via_scp_in_vim


--
Shaineel Singh
e: shain.singh@gmail.com
p: +61 422 921 951
w: http://buffet.shainsingh.com

--
"Too many have dispensed with generosity to practice charity" - Albert Camus

--
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: Actual cursor position.

El 31/08/11 01:35, ZyX escribió:
> Reply to message «Actual cursor position.»,
> sent 02:12:13 31 August 2011, Wednesday
> by Gerardo Marset:
>
>> I'm looking for a way to get the current cursor position in the line
>> (that is, the column) in *characters*.
>> col is no use, because it returns the position in bytes. I can't use
>> virtcol either because it returns the position on the screen: a tab
>> counts as 8 characters (or whatever tabstop is set to), the line can be
>> wrapped, etc.
> Why do you need it?
I don't want my code to break if a line has multibyte characters.

> You can use
> echo ((col('.')>1)?(strchars(getline(line('.'))[:col('.')-2])):(0))
> or (if you need to count composing characters as a part of previous character)
> replace `strchars(...)' with `len(split(..., '\v.@='))'.
Works like a charm! Thank you!

> Note that you solution does not work: you forgot that one character can occupy
> two display cells if it either fullwidth (U+FF00..U+FF60, U+FFE0..U+FFE6,
> U+3000) or with ambigious width and&ambiwidth is set.
That's why I thougth my solution was sloppy: there was bound to be a way
of breaking it.

--
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: Very strange problem about messages in 64bit vim

> hey guys, there is a problem about messages in 64bit vim.
>
> But when finished compiling, I found that all messages in vim are
> English (Mother tongue is Chinese), and the menus are Chinese, this
> puzzled me a lot.
> In order to figure out this, I tried some other ways.
>
> First, I tried to compile vim with MS VC2010 32bit compiler,
> everything is all right, messages are all Chinese.

I guess you have 32-bit libintl.dll or intl.dll somewhere in PATH or
the Vim directory. 64-bit Vim cannot use it so consequently its
messages are in English.

--
Sergey Khorev
http://sites.google.com/site/khorser
Can anybody think of a good tagline I can steal?

--
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: Installing on OSX 10.4.7

David Fishburn, Wed 2011-08-31 @ 11:15:36-0400:
> -bash-2.05b$ /Applications/Vim.app/Contents/MacOS/Vim dave.txt
> dyld: Library not loaded:
> /System/Library/Frameworks/Python.framework/Versions/2.3/Python
> Referenced from: /Applications/Vim.app/Contents/MacOS/Vim
> Reason: image not found
> Trace/BPT trap
>
>
> Looking at the version I downloaded:
>
>
> vim7.0.224.tar.bz2 <http://macvim.org/OSX/files/binaries/OSX10.4/vim7.0.224.tar.bz2>(6448148
> bytes, last modified 2007/03/30)
> vim 7.0.224 Universal Binary:*stable*
> Comments: +cscope +perl +python +ruby +tcl
> +atsui and guitab experimental patches
>
>
> So, it has the +perl, +python and so on.
> I was able to create some links to get around the Perl error (Perl
> is already installed in a different directory), but I wonder if Vim
> is failing to launch since it cannot file these libraries.
>
> I thought Vim was supposed to just not load it and continue, but
> perhaps it is different on OSX? It becomes fatal if it cannot load
> the libraries.

Yeah, it appears to be trying to load a Python library and failing to do
so, I'm guessing because AppleTVs don't have Python. I don't use OS X so
I don't know much about its behavior in this regard.

My suggestion would be to obtain an OS X Vim binary compiled without the
"+python" option. You could compile it yourself if you have an actual
Mac with the same version of OS X as the AppleTV, or if the AppleTV
itself has a C toolchain (make, gcc, ld, etc.--I doubt very much that
these tools are installed, though). Barring that, I would say just hunt
around on the web and see if you can find one already built that way. I
wouldn't be too surprised if somebody else has tried to install Vim on
an AppleTV before.

Alternatively, you could try to find a copy of that Python library to
drop on the AppleTV, and set the LD_PRELOAD variable in Vim's
environment so it can find it.

Of course, it might be worth it to just get used to using nano,
depending on how much effort you want to put into this.

--
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: Installing on OSX 10.4.7

On 8/31/2011 11:03 AM, Taylor Hedberg wrote:
David Fishburn, Wed 2011-08-31 @ 10:28:51-0400: 
This is where the problem starts. As I am trying to use this from the console (only), the site also provides a shell script to be used to launch Vim.          Also download http://macvim.org/OSX/files/gvim ->         This I copied to /usr/bin/gvim  When I attempt to use it I get:  -bash-2.05b$ ./gvim ./gvim: line 1: basename: command not found dyld: Library not loaded: /System/Library/Perl/lib/5.8/libperl.dylib   Referenced from: /Applications/Vim.app/Contents/MacOS/Vim   Reason: image not found Trace/BPT trap   The script only references basename once:  # Next, peek at the name used to invoke this script, and set options # accordingly. name="`basename "$0"`"   I don't see anything wrong with that, nor do I really know what it is for. 
 I'm not sure why you need a shell script to launch Vim, but ignoring that...  basename is just a simple tool that strips off the "path prefix" of a pathname. So if you type `basename /foo/bar/baz` at a shell prompt, it will print "baz".  The `$0` is shell syntax which is expanded to the name used to invoke the script on the command line. So if you run the script as `./myscript`, then `$0` would be replaced with "./myscript" and `basename $0` would be "myscript".  So if your AppleTV doesn't have basename available, you can replace that line with something like this, and it should do the same thing:      name="myscript"  where "myscript", of course, is the command you're using to invoke the script, minus the /path/to/script/ prefix, if any exists.  
Thanks Taylor.

Perhaps it just boils down to this (without using the shell script):

-bash-2.05b$ /Applications/Vim.app/Contents/MacOS/Vim dave.txt
dyld: Library not loaded: /System/Library/Frameworks/Python.framework/Versions/2.3/Python
  Referenced from: /Applications/Vim.app/Contents/MacOS/Vim
  Reason: image not found
Trace/BPT trap


Looking at the version I downloaded:


vim7.0.224.tar.bz2 (6448148 bytes, last modified 2007/03/30)
vim 7.0.224 Universal Binary: stable
Comments: +cscope +perl +python +ruby +tcl
+atsui and guitab experimental patches


So, it has the +perl, +python and so on.
I was able to create some links to get around the Perl error (Perl is already installed in a different directory), but I wonder if Vim is failing to launch since it cannot file these libraries.

I thought Vim was supposed to just not load it and continue, but perhaps it is different on OSX?  It becomes fatal if it cannot load the libraries.

Anyway, there does not appear to be any command lines switches to disable the attempt to load these libraries.


Dave

Re: Installing on OSX 10.4.7

David Fishburn, Wed 2011-08-31 @ 10:28:51-0400:
> This is where the problem starts.
> As I am trying to use this from the console (only), the site also
> provides a shell script to be used to launch Vim.
>
> Also download http://macvim.org/OSX/files/gvim ->
> This I copied to /usr/bin/gvim
>
> When I attempt to use it I get:
>
> -bash-2.05b$ ./gvim
> ./gvim: line 1: basename: command not found
> dyld: Library not loaded: /System/Library/Perl/lib/5.8/libperl.dylib
> Referenced from: /Applications/Vim.app/Contents/MacOS/Vim
> Reason: image not found
> Trace/BPT trap
>
>
> The script only references basename once:
>
> # Next, peek at the name used to invoke this script, and set options
> # accordingly.
> name="`basename "$0"`"
>
>
> I don't see anything wrong with that, nor do I really know what it is for.

I'm not sure why you need a shell script to launch Vim, but ignoring
that...

basename is just a simple tool that strips off the "path prefix" of a
pathname. So if you type `basename /foo/bar/baz` at a shell prompt, it
will print "baz".

The `$0` is shell syntax which is expanded to the name used to invoke
the script on the command line. So if you run the script as
`./myscript`, then `$0` would be replaced with "./myscript" and
`basename $0` would be "myscript".

So if your AppleTV doesn't have basename available, you can replace that
line with something like this, and it should do the same thing:

name="myscript"

where "myscript", of course, is the command you're using to invoke the
script, minus the /path/to/script/ prefix, if any exists.

Hope that helps.

--
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: Fwd: E684 error when changing buffers

Hi Christian

The solution was to install a later version of bufexplorer. Thanks very
much for setting me on the right lines to solve the problem.

Cheers

G

On Wed, Aug 31, 2011 at 02:22 PM, Christian Brabandt <cblists@256bit.org> wrote:

> from: Christian Brabandt <cblists@256bit.org>
> date: Wed, Aug 31 03:22 PM +02:00 2011
> to: vim_use@googlegroups.com
> reply-to: vim_use@googlegroups.com
> subject: Re: Fwd: E684 error when changing buffers
>
> On Wed, August 31, 2011 12:50 pm, Grahame Blackwood wrote:
>> Whenever I change buffers, or open a new one I get an error message as
>> follows:
>>
>> Error detected while processing function <SNR>16_ActivateBuffer:
>> line 6:
>> E684: list index out of range: 1
>>
>> Is anyone else experiencing this and is there a remedy?
>
> This looks like a plugin error. Look at item 16 in the output of
> :scriptnames
> And then report the error to the plugin author.
>
> regards,
> Christian
>
> --
> 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

--
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: Installing on OSX 10.4.7

On 8/31/2011 8:44 AM, David Fishburn wrote:
> I have the original AppleTVs which I have installed XBMC on to use a
> media center.
>
> During setup and tweaking I login to this box via SSH and have to
> tweak some files.
> Currently I have to use nano to do this and it is killing me.
>
> So, not GUI, pure console.
> I have never used OSX before, especially console only.
>
> Could someone give me some instruction on what package I need to
> download and how to install it from a console to get some version
> (does not have to be 7) of it running on these boxes.

I have made some headway on this but have run into a roadblock.

This site has Vim for OSX 10.4.7 (Tiger)

Download Vim for OSX 10.4 (Tiger) from here:
http://macvim.org/OSX/index.php
vim7.0.224.tar.bz2

Installation was fairly simple:
tar xf vim7.0.224.tar
cd vim70
mv Vim.app /Applications/Vim.app


This is where the problem starts.
As I am trying to use this from the console (only), the site also
provides a shell script to be used to launch Vim.

Also download http://macvim.org/OSX/files/gvim ->
This I copied to /usr/bin/gvim

When I attempt to use it I get:

-bash-2.05b$ ./gvim
./gvim: line 1: basename: command not found
dyld: Library not loaded: /System/Library/Perl/lib/5.8/libperl.dylib
Referenced from: /Applications/Vim.app/Contents/MacOS/Vim
Reason: image not found
Trace/BPT trap


The script only references basename once:

# Next, peek at the name used to invoke this script, and set options
# accordingly.
name="`basename "$0"`"


I don't see anything wrong with that, nor do I really know what it is for.

If anyone has some suggestions that would be great.

Thanks,
Dave

--
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: E684 error when changing buffers

Hi Christian

Thanks very much. Line 16 of scriptnames reads:
~/.vim/plugin/bufexplorer.vim

I'll make a report as you suggest.

Cheers

G

On Wednesday, August 31, 2011, Christian Brabandt <cblists@256bit.org> wrote:
> On Wed, August 31, 2011 12:50 pm, Grahame Blackwood wrote:
>> Whenever I change buffers, or open a new one I get an error message as
>> follows:
>>
>> Error detected while processing function <SNR>16_ActivateBuffer:
>> line 6:
>> E684: list index out of range: 1
>>
>> Is anyone else experiencing this and is there a remedy?
>
> This looks like a plugin error. Look at item 16 in the output of
> :scriptnames
> And then report the error to the plugin author.
>
> regards,
> Christian
>
> --
> 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
>

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

Fwd: E684 error when changing buffers

Hi All

THis email seems to keep getting lost! So I'm trying again.

G
---------- Forwarded message ----------
from: Grahame Blackwood <grahameblackwood@gmail.com>
date: Wed, Aug 31 11:50 AM +01:00 2011
to: vim_use@googlegroups.com
subject: Fwd: E684 error when changing buffers

Hi

Whenever I change buffers, or open a new one I get an error message as
follows:

Error detected while processing function <SNR>16_ActivateBuffer:
line 6:
E684: list index out of range: 1

Is anyone else experiencing this and is there a remedy?

I am using PCLinuxOS and Vim 7.3.230 and the issue has only arisen since
PCLinuxOS upgraded from Vim 7.3 to 7.3.230

Best regards

G

--
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: Search and write

On 08/31/11 07:23, Lars Iselid wrote:
> If you have a search statement something like this:
>
> /[0-9]
>
> And want to write :w the matching content to a file. How to do? I've
> seen examples similar to this:
>
> /[0-9] . w>> my.txt

Depends on whether you want to write just the match, or the
entire line. If you want the entire line containing the
match(es), it's pretty easy:

g/[0-9]/w>> my.txt

If you just want to write those digits to the file, it's more
complex. Something like:

g/[0-9]/t.|s/[^0-9]\+//g|w! >> my.txt | d

which copies each matching line to the line below, deletes all
the non-digits, writes/appends the temp-line to the file, and
then deletes the temp-line.

-tim


--
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: Fwd: E684 error when changing buffers

On Wed, August 31, 2011 12:50 pm, Grahame Blackwood wrote:
> Whenever I change buffers, or open a new one I get an error message as
> follows:
>
> Error detected while processing function <SNR>16_ActivateBuffer:
> line 6:
> E684: list index out of range: 1
>
> Is anyone else experiencing this and is there a remedy?

This looks like a plugin error. Look at item 16 in the output of
:scriptnames
And then report the error to the plugin author.

regards,
Christian

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

Installing on OSX 10.4.7

I have the original AppleTVs which I have installed XBMC on to use a
media center.

During setup and tweaking I login to this box via SSH and have to tweak
some files.
Currently I have to use nano to do this and it is killing me.

So, not GUI, pure console.
I have never used OSX before, especially console only.

Could someone give me some instruction on what package I need to
download and how to install it from a console to get some version (does
not have to be 7) of it running on these boxes.

Thanks in advance.
Dave

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

Search and write

If you have a search statement something like this:

/[0-9]

And want to write :w the matching content to a file. How to do? I've
seen examples similar to this:

/[0-9] . w >> my.txt

But exactly this doesn't work for me.

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

Fwd: E684 error when changing buffers

Hi

Whenever I change buffers, or open a new one I get an error message as
follows:

Error detected while processing function <SNR>16_ActivateBuffer:
line 6:
E684: list index out of range: 1

Is anyone else experiencing this and is there a remedy?

I am using PCLinuxOS and Vim 7.3.230 and the issue has only arisen since
PCLinuxOS upgraded from Vim 7.3 to 7.3.230

Best regards

G

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

On Wed, Aug 31, 2011 at 3:41 AM, Dotan Cohen <dotancohen@gmail.com> wrote:
> On Tue, Aug 30, 2011 at 18:08, Joey Beninghove <joey@30cubits.com> wrote:
>> Hi folks,
>> ...
>> Also, it's still very early, but I'll definitely need some presenters lined
>> up, so let me know if you're interested in giving an online teaching session
>> for VimConf.
>>
> Hi Joey. I am interested in the workflow sessions, but I would rather
> not give out my email address. An RSS feed would be more appreciated.
> Thanks.

I am curious about this -- gave my spam email to the nom-nom email box. Would
be nice to see some sorta of organizational site spring up around it,
rather than
just an email vortex. What would be the least painful way to actual
structure and
or organize something like this?

Are there examples of good virtual conferences that you plan to follow?

--
--Robert Melton
#vim on irc.freenode.net, 10+ years and counting

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

On Tue, Aug 30, 2011 at 18:08, Joey Beninghove <joey@30cubits.com> wrote:
> Hi folks,
> I'm the one who started all this craziness last night.  :)  It's been an
> idea I've had for a while now and figured I'd start to see if anybody would
> be interested in something like this.  I'd love to get your feedback.
> Also, it's still very early, but I'll definitely need some presenters lined
> up, so let me know if you're interested in giving an online teaching session
> for VimConf.
> Thanks!
> Joey
>

Hi Joey. I am interested in the workflow sessions, but I would rather
not give out my email address. An RSS feed would be more appreciated.
Thanks.


--
Dotan Cohen

http://gibberish.co.il
http://what-is-what.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

Re: Very strange problem about messages in 64bit vim

On 31/08/11 07:37, zhufeng wrote:
> I tried to use TDM-gcc 4.5.2 64bit, but there are so many errors while
> compiling that I am not able to fix, there seems to be some thing
> wrong, I don't whether I configured it correctly, but with TDM-gcc
> 4.5.2 32bit, it just compiled correctly.

Well, if it's any consolation to you, Mozilla applications have been
published for some time on the Mac as "universal binaries" for 32- and
64-bit Intel processors, on Linux they are now published as both 32- and
64-bit builds but of the 64-bit, Firefox is "official", SeaMonkey (which
I use with no problems) is "unofficial" even though compiled on Mozilla
hardware, and I'm not sure about Thunderbird; but for Windows they are
still published as 32-bit builds only (and their user-agent string says
WOW64 as the platform when run on a 64-bit Windows OS).


Best regards,
Tony.
--
There was a young lady named Hall,
Wore a newspaper dress to a ball.
The dress caught on fire
And burned her entire
Front page, sporting section, and all.

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

nice idea! Anyway, when I try to sign up, a popup comes out telling me the provided email address (matteo at matteolandi dot net) is not valid. Can you fix that?

Cheers,
Matteo

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

Tuesday, August 30, 2011

Re: VimConf

On 2011-08-30 11:08, Joey Beninghove wrote:
>Hi folks,
>I'm the one who started all this craziness last night. :) It's been an
>idea I've had for a while now and figured I'd start to see if anybody would
>be interested in something like this. I'd love to get your feedback.

Interesting. However, when I try to sign up, I am presented with the following:

Something rather bad just happened. We are not exactly sure what it
was, but we are going to get on it right away and fix it. Sorry for
the inconvenience.

--
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: Very strange problem about messages in 64bit vim

I tried to use TDM-gcc 4.5.2 64bit, but there are so many errors while
compiling that I am not able to fix, there seems to be some thing
wrong, I don't whether I configured it correctly, but with TDM-gcc
4.5.2 32bit, it just compiled correctly.

On Aug 31, 1:21 pm, Tony Mechelynck <antoine.mechely...@gmail.com>
wrote:
> On 31/08/11 01:44, zhufeng wrote:
>
>
>
> > hey guys, there is a problem about messages in 64bit vim.
>
> > I tried to compile a 64bit vim with MS VC2010 64bit compiler, and I
> > modified the file "bigvim.bat" to do this, the file is about this :
>
> > :: command to build big Vim with OLE, Perl, Python, Ruby and Tcl
> > nmake -f Make_mvc.mak FEATURES=HUGE GUI=yes OLE=yes IME=yes GIME=yes
> > CSCOPE=yes SNIFF=yes POSTSCRIPT=yes PERL=C:\1\perl DYNAMIC_PERL=yes
> > PERL_VER=512 PYTHON=C:\1\python27 DYNAMIC_PYTHON=yes PYTHON_VER=27
> > PYTHON3=C:\1\python32 DYNAMIC_PYTHON3=yes PYTHON3_VER=32 RUBY=C:
> > \1\ruby191 DYNAMIC_RUBY=yes RUBY_VER=191 RUBY_VER_LONG=1.9.1 LUA=C:
> > \1\lua DYNAMIC_LUA=yes USERNAME=zhufeng USERDOMAIN=zhufeng-
> > pc.jsu.edu.cn
>
> > But when finished compiling, I found that all messages in vim are
> > English (Mother tongue is Chinese), and the menus are Chinese, this
> > puzzled me a lot.
>
> > In order to figure out this, I tried some other ways.
>
> > First, I tried to compile vim with MS VC2010 32bit compiler,
> > everything is all right, messages are all Chinese.
>
> > Second, I tried to compile vim in RedHat Enterprise Linux 6.0 64bit
> > with gcc 64bit, everything is also all right, all messages are
> > Chinese, and I tried to use "file /usr/local/bin/gvim", and it told
> > that this binary is a ELF 64bit program.
>
> > So is there anybody who can help me to solve this ? Thanks very much.
>
> Try compiling on Windows with Cygwin or MinGW gcc. I have a HowTo athttp://users.skynet.be/antoine.mechelynck/vim/compile.htmbut it might
> be out of date in parts; for instance when compiling with Cygwin for
> native-Windows you may have to invoke the compiler (a kind of
> "MinGW-for-Cygwin cross-compiler") as something other than gcc but I'm
> not sure of the details.
>
> Best regards,
> Tony.
> --
> People who are funny and smart and return phone calls get much better
> press than people who are just funny and smart.
>                 -- Howard Simons, "The Washington Post"

--
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: Very strange problem about messages in 64bit vim

On 31/08/11 01:44, zhufeng wrote:
> hey guys, there is a problem about messages in 64bit vim.
>
> I tried to compile a 64bit vim with MS VC2010 64bit compiler, and I
> modified the file "bigvim.bat" to do this, the file is about this :
>
> :: command to build big Vim with OLE, Perl, Python, Ruby and Tcl
> nmake -f Make_mvc.mak FEATURES=HUGE GUI=yes OLE=yes IME=yes GIME=yes
> CSCOPE=yes SNIFF=yes POSTSCRIPT=yes PERL=C:\1\perl DYNAMIC_PERL=yes
> PERL_VER=512 PYTHON=C:\1\python27 DYNAMIC_PYTHON=yes PYTHON_VER=27
> PYTHON3=C:\1\python32 DYNAMIC_PYTHON3=yes PYTHON3_VER=32 RUBY=C:
> \1\ruby191 DYNAMIC_RUBY=yes RUBY_VER=191 RUBY_VER_LONG=1.9.1 LUA=C:
> \1\lua DYNAMIC_LUA=yes USERNAME=zhufeng USERDOMAIN=zhufeng-
> pc.jsu.edu.cn
>
> But when finished compiling, I found that all messages in vim are
> English (Mother tongue is Chinese), and the menus are Chinese, this
> puzzled me a lot.
>
> In order to figure out this, I tried some other ways.
>
> First, I tried to compile vim with MS VC2010 32bit compiler,
> everything is all right, messages are all Chinese.
>
> Second, I tried to compile vim in RedHat Enterprise Linux 6.0 64bit
> with gcc 64bit, everything is also all right, all messages are
> Chinese, and I tried to use "file /usr/local/bin/gvim", and it told
> that this binary is a ELF 64bit program.
>
>
> So is there anybody who can help me to solve this ? Thanks very much.
>

Try compiling on Windows with Cygwin or MinGW gcc. I have a HowTo at
http://users.skynet.be/antoine.mechelynck/vim/compile.htm but it might
be out of date in parts; for instance when compiling with Cygwin for
native-Windows you may have to invoke the compiler (a kind of
"MinGW-for-Cygwin cross-compiler") as something other than gcc but I'm
not sure of the details.


Best regards,
Tony.
--
People who are funny and smart and return phone calls get much better
press than people who are just funny and smart.
-- Howard Simons, "The Washington Post"

--
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: Actual cursor position.

Reply to message «Actual cursor position.»,
sent 02:12:13 31 August 2011, Wednesday
by Gerardo Marset:

> I'm looking for a way to get the current cursor position in the line
> (that is, the column) in *characters*.
> col is no use, because it returns the position in bytes. I can't use
> virtcol either because it returns the position on the screen: a tab
> counts as 8 characters (or whatever tabstop is set to), the line can be
> wrapped, etc.
Why do you need it?

You can use
echo ((col('.')>1)?(strchars(getline(line('.'))[:col('.')-2])):(0))
or (if you need to count composing characters as a part of previous character)
replace `strchars(...)' with `len(split(..., '\v.@='))'.

Note that you solution does not work: you forgot that one character can occupy
two display cells if it either fullwidth (U+FF00..U+FF60, U+FFE0..U+FFE6,
U+3000) or with ambigious width and &ambiwidth is set.

> This could be a reasonably compatible solution:
>
> function! Column()
> let l:ot=&tabstop
> let l:ow=&wrap
> set tabstop=1
> set nowrap
>
> let l:ret = virtcol(".")
>
> let &tabstop=l:ot
> let &wrap=l:ow
>
> return l:ret
> endfunction
Original message:
> I'm looking for a way to get the current cursor position in the line
> (that is, the column) in *characters*.
> col is no use, because it returns the position in bytes. I can't use
> virtcol either because it returns the position on the screen: a tab
> counts as 8 characters (or whatever tabstop is set to), the line can be
> wrapped, etc.
>
> This could be a reasonably compatible solution:
>
> function! Column()
> let l:ot=&tabstop
> let l:ow=&wrap
> set tabstop=1
> set nowrap
>
> let l:ret = virtcol(".")
>
> let &tabstop=l:ot
> let &wrap=l:ow
>
> return l:ret
> endfunction
>
> But it looks sloppy and bogus. There's got to be a better way.
>
> Any suggestions or tips?
>
> Thanks!

Re: Black Icons on Windows XP Remote Connection Desktop

Would be useful to get more info from the OP on versions (of Vim/Gvim and Windows).

GVim version 7.3.46 with modified toolbar height : 48px
Windows XP and remote distant desktop to another Windows XP 

Your help is needed thanks

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

Very strange problem about messages in 64bit vim

hey guys, there is a problem about messages in 64bit vim.

I tried to compile a 64bit vim with MS VC2010 64bit compiler, and I
modified the file "bigvim.bat" to do this, the file is about this :

:: command to build big Vim with OLE, Perl, Python, Ruby and Tcl
nmake -f Make_mvc.mak FEATURES=HUGE GUI=yes OLE=yes IME=yes GIME=yes
CSCOPE=yes SNIFF=yes POSTSCRIPT=yes PERL=C:\1\perl DYNAMIC_PERL=yes
PERL_VER=512 PYTHON=C:\1\python27 DYNAMIC_PYTHON=yes PYTHON_VER=27
PYTHON3=C:\1\python32 DYNAMIC_PYTHON3=yes PYTHON3_VER=32 RUBY=C:
\1\ruby191 DYNAMIC_RUBY=yes RUBY_VER=191 RUBY_VER_LONG=1.9.1 LUA=C:
\1\lua DYNAMIC_LUA=yes USERNAME=zhufeng USERDOMAIN=zhufeng-
pc.jsu.edu.cn

But when finished compiling, I found that all messages in vim are
English (Mother tongue is Chinese), and the menus are Chinese, this
puzzled me a lot.

In order to figure out this, I tried some other ways.

First, I tried to compile vim with MS VC2010 32bit compiler,
everything is all right, messages are all Chinese.

Second, I tried to compile vim in RedHat Enterprise Linux 6.0 64bit
with gcc 64bit, everything is also all right, all messages are
Chinese, and I tried to use "file /usr/local/bin/gvim", and it told
that this binary is a ELF 64bit program.


So is there anybody who can help me to solve this ? Thanks very much.

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

Actual cursor position.

I'm looking for a way to get the current cursor position in the line
(that is, the column) in *characters*.
col is no use, because it returns the position in bytes. I can't use
virtcol either because it returns the position on the screen: a tab
counts as 8 characters (or whatever tabstop is set to), the line can be
wrapped, etc.

This could be a reasonably compatible solution:

function! Column()
let l:ot=&tabstop
let l:ow=&wrap
set tabstop=1
set nowrap

let l:ret = virtcol(".")

let &tabstop=l:ot
let &wrap=l:ow

return l:ret
endfunction

But it looks sloppy and bogus. There's got to be a better way.

Any suggestions or tips?

Thanks!

--
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: Black Icons on Windows XP Remote Connection Desktop

On Tue, 30 Aug 2011, Ben Fritz wrote:

> On Aug 30, 6:22 am, Tim Chase wrote:
>> On 08/30/11 01:09, niva wrote:
>>
>>> I am using Gvim 7.3 through a remote connection desktop. All
>>> toolbar's icons are black.
>>
>>> I don't think it comes from Vim but from windows or graphical
>>> drivers but have you got some idea ?
>>
>> While I haven't experienced this with Vim, I've had similar issues
>> with applications written in Python that make use of Tkinter where,
>> if I launch them (either locally or via RDP) and then (re)connect via
>> RDP, various containers appear blanked out (whether black or
>> default-background/button color).
>>
>> I don't have a good answer for WHY, but perhaps the additional
>> information can help you track down where/when/why.
>>
>
> You can check the RDP settings, at my workplace by default it is set
> up to use 16-bit color. I had to change to at least 24-bit for my
> colorscheme and some other things to work properly.

That was my first suspicion as well. But testing with 15-, 16-, 24-,
and 32-bit color (the depths supported by Windows7 mstsc) with both
Windows7 mstsc and Gentoo rdesktop, I still had icons in all cases.
(using Gvim 7.3e [beta])

Generally, I only access my Windows machines via RDP from Linux (usually
rdesktop, occasionally freerdp), and I've not encountered the issue.
But, I also tend to stick to `vim` and not `gvim`.

Would be useful to get more info from the OP on versions (of Vim/Gvim
and Windows).

--
Best,
Ben H

--
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: Spell checking: wrong suggestions ending with 0

Bastien Dejean wrote:

> Dominique Pellé a écrit :
>
>> Bastien Dejean wrote:
>> > Most of the times, the suggested correction for 'someword' (which is spelled
>> > correctly) is 'someword0'.
>> Or did you perhaps build the spell file yourself?
>
> Yes, if I think I did (I didn't know at the time vim could download the
> required files).
>
> So I moved the ~/.vim/spell somewhere else and I let vim download the
> two files.
>
> And voilà, problem solved!


Good. If you built it yourself, the problem probably happened
because most recent French Hunspell dictionaries use features
not supported by Vim. It's a pity pity because the French dictionary
in Vim is getting old and the Hunspell French dictionary has improved
quite a lot thanks to the dicollecte site (http://www.dicollecte.org)
and Vim can't process it.

I think it was James Vega who mentioned the possibility of adding
support to Enchant lib in Vim (http://www.abisource.com/projects/enchant/)
It would let Vim support Hunspell dictionary natively as well as other
kinds of dictionaries. That would be a great addition to Vim-7.4.
Until this happens, it is possible to use Enchant with a Vim plugin:

http://www.vim.org/scripts/script.php?script_id=2345

Regards
-- Dominique

--
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: Black Icons on Windows XP Remote Connection Desktop

On Aug 30, 6:22 am, Tim Chase <v...@tim.thechases.com> wrote:
> On 08/30/11 01:09, niva wrote:
>
> > I am using Gvim 7.3 through a remote connection desktop.
> > All toolbar's icons are black.
>
> > I don't think it comes from Vim but from windows or graphical drivers
> > but have you got some idea ?
>
> While I haven't experienced this with Vim, I've had similar
> issues with applications written in Python that make use of
> Tkinter where, if I launch them (either locally or via RDP) and
> then (re)connect via RDP, various containers appear blanked out
> (whether black or default-background/button color).
>
> I don't have a good answer for WHY, but perhaps the additional
> information can help you track down where/when/why.
>

You can check the RDP settings, at my workplace by default it is set
up to use 16-bit color. I had to change to at least 24-bit for my
colorscheme and some other things to work properly.

--
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: Spell checking: wrong suggestions ending with 0

Dominique Pellé a écrit :

> Bastien Dejean wrote:
> > Most of the times, the suggested correction for 'someword' (which is spelled
> > correctly) is 'someword0'.
> Or did you perhaps build the spell file yourself?

Yes, if I think I did (I didn't know at the time vim could download the
required files).

So I moved the ~/.vim/spell somewhere else and I let vim download the
two files.

And voilà, problem solved!

Cheers,
--
Bastien

--
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: open/close fold via mouse-click

On Tue, Aug 30, 2011 at 7:00 PM, Michael Maurer <salogynsocti@gmail.com> wrote:
> I'm trying to get VIM to open/close folds via mouse-click. After
> googling a bit, I've learned that putting
>
> set mouse=a
> set foldcolumn=3
> set foldmethod=syntax
>
> in my vimrc should enable this. But the behaviour hasn't changed.
> Clicking still only switches between normal and visual mode (using an x-term).
>

Ok, found it. "set foldcolumn=3" was still disabled in old files. Now
everything's working.


--
http://michaelmaurer.net/

--
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: Spell checking: wrong suggestions ending with 0

Bastien Dejean wrote:

> Hi,
>
> I have many false positives when I spell-check words in the french
> language.
>
> Most of the times, the suggested correction for 'someword' (which is spelled
> correctly) is 'someword0'.
>
> Cheers,
> --
> Bastien

Hi

I don't see this problem. I'm using Vim-7.3.289
with up-to-date French spell files ~/.vim/spell/fr.utf-8.{spl,sug}.

Some questions:

Which version of Vim are you using?
Are you using up-to-date ~/.vim/spell/fr.utf-8.{spl,sug} files?
Or did you perhaps build the spell file yourself?
Which word specifically gives a wrong suggestion?
("someword" is not a French word of course)

Running the Ex command :spelldump maybe useful
to see where your spell file comes from (in which
directory it is). If you delete or rename it, vim
should ask you to download the latest official
ft.utf-8.{spl,sug} files.

Regards
-- Dominique

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

open/close fold via mouse-click

I'm trying to get VIM to open/close folds via mouse-click. After
googling a bit, I've learned that putting

set mouse=a
set foldcolumn=3
set foldmethod=syntax

in my vimrc should enable this. But the behaviour hasn't changed.
Clicking still only switches between normal and visual mode (using an x-term).

--
http://michaelmaurer.net/

--
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: Insert-cursor/Overwrite cursor

Christian Brabandt <cblists@256bit.org> [11-08-30 18:01]:
> On Tue, August 30, 2011 5:12 am, meino.cramer@gmx.de wrote:
> > Hi,
> >
> > sorry, I cannot remember how this feature was called...so it is
> > difficult to search the help for ot ;)
> >
> > I can remember that there was a certain terminal sequence (was it
> > that?) which has to set...where?...to enable the support of different
> > cursor shapes (a | for insert mode and a normal block cursor for
> > overwrite ... or vice versa) in different modes of vim.
> >
> > What was this exactly and where can I find the description of it?
> >
> > Thank you very much in advance for updateing my brain ! ;))
>
> I have never used it, so I can only give you the reference in the help.
> For console see
> :h termcap-cursor-shape
> and for gvim see
> :h 'guicursor'
>
> regards,
> Christian
>
> --
> 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 Christian,

Thanks for the update :))

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: Making Omni Complete suggest but not complete

On Tue, August 30, 2011 11:17 am, Rice wrote:
> I sorry that I repost this subject, which is post in 2006,
> http://vim.1045645.n5.nabble.com/Making-Omni-Complete-suggest-but-not-complete-td1151144.html,
> But it seems that this problem hasn't been solved and I also come
> across it, I hope someone can help me.
>
> Is there any way to make omni complete popup a list of suggestions but
> not immediately add one of them to the buffer? I find omni complete
> very useful but it's incredibly annoying that it auto-chooses one of
> the entries. I'd prefer it popup the list of suggestions but not
> modify the buffer.

Just an idea, wouldn't something like this work:
inoremap <C-X><C-O> <C-X><C-O><C-P>

regards,

Christian

--
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: Insert-cursor/Overwrite cursor

On 30/08/11 05:12, meino.cramer@gmx.de wrote:
> Hi,
>
> sorry, I cannot remember how this feature was called...so it is
> difficult to search the help for ot ;)
>
> I can remember that there was a certain terminal sequence (was it
> that?) which has to set...where?...to enable the support of different
> cursor shapes (a | for insert mode and a normal block cursor for
> overwrite ... or vice versa) in different modes of vim.
>
> What was this exactly and where can I find the description of it?
>
> Thank you very much in advance for updateing my brain ! ;))
>
> Best regards,
> mcc
>

- For gvim it is the 'guicursor' option, which works in all gvim versions.
- The same option works also in the Dos/Windows console, but with
reduced features since there only the height but not the width of the
cursor can be modified. Any height can be used between 0% and 100% and
the modes which can be distinguished are the same as in the GUI.
- In other terminals, it may or may not be possible to modify the cursor
shape. The relevant settings are termcap entries t_SI and t_EI and, as
Christian said, the gory details are at ":help termcap-cursor-shape". In
this case, the exact codes to use vary from terminal to terminal and are
not found in the Vim help but in the documentation (if there is any) for
your terminal. Here the choice is often even more limited than on
Windows since in most cases the only possibilities are a full block
cursor, or an underline cursor, nothing else.


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
165. You have a web page burned into your glasses

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

Hi folks,
I'm the one who started all this craziness last night.  :)  It's been an idea I've had for a while now and figured I'd start to see if anybody would be interested in something like this.  I'd love to get your feedback.  

Also, it's still very early, but I'll definitely need some presenters lined up, so let me know if you're interested in giving an online teaching session for VimConf.

Thanks!
Joey

--
Joey Beninghove



On Tue, Aug 30, 2011 at 10:54 AM, Taylor Hedberg <tmhedberg@gmail.com> wrote:
I am in no way affiliated with this event, but I came across this page
and figured other people here might be interested in in. There is
apparently an online "virtual conference" being organized for Vim
aficionados.

http://www.vimconf.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

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

VimConf

I am in no way affiliated with this event, but I came across this page
and figured other people here might be interested in in. There is
apparently an online "virtual conference" being organized for Vim
aficionados.

http://www.vimconf.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: Making Omni Complete suggest but not complete

It's probably not exactly what you want, but you can `:set
completeopt+=longest` and only the longest common prefix of all
potential matches will be automatically inserted. For instance, if you
type "a" and the possible matches are "abcde", "abcfg", and "abchi",
then the "bc" will be inserted since it is common to all matches, but
the rest will be left for you to type. The menu will then narrow down
its choices as you type additional characters.

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

Spell checking: wrong suggestions ending with 0

Hi,

I have many false positives when I spell-check words in the french
language.

Most of the times, the suggested correction for 'someword' (which is spelled
correctly) is 'someword0'.

Cheers,
--
Bastien

--
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: Black Icons on Windows XP Remote Connection Desktop

On 08/30/11 01:09, niva wrote:
> I am using Gvim 7.3 through a remote connection desktop.
> All toolbar's icons are black.
>
> I don't think it comes from Vim but from windows or graphical drivers
> but have you got some idea ?

While I haven't experienced this with Vim, I've had similar
issues with applications written in Python that make use of
Tkinter where, if I launch them (either locally or via RDP) and
then (re)connect via RDP, various containers appear blanked out
(whether black or default-background/button color).

I don't have a good answer for WHY, but perhaps the additional
information can help you track down where/when/why.

-tim


--
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: Making Omni Complete suggest but not complete

hi ,i think your problem is an elaborate one , and i faced it too .
my solution is to use arrow key instead of C -N ,you will find the
word is only selected ,but not inserted automatically when you move
down the selection . Further more , you can use key map instead of
arrow for the convenience of key striking .
however , the above is not an ultimate key to your problem , i am also
looking forward to a better solution .

--
View this message in context: http://vim.1045645.n5.nabble.com/Making-Omni-Complete-suggest-but-not-complete-tp4749418p4749551.html
Sent from the Vim - General mailing list archive at Nabble.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

Making Omni Complete suggest but not complete

I sorry that I repost this subject, which is post in 2006,
http://vim.1045645.n5.nabble.com/Making-Omni-Complete-suggest-but-not-complete-td1151144.html,
But it seems that this problem hasn't been solved and I also come
across it, I hope someone can help me.

Is there any way to make omni complete popup a list of suggestions but
not immediately add one of them to the buffer? I find omni complete
very useful but it's incredibly annoying that it auto-chooses one of
the entries. I'd prefer it popup the list of suggestions but not
modify the buffer.

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

Monday, August 29, 2011

Black Icons on Windows XP Remote Connection Desktop

Hi,

I am using Gvim 7.3 through a remote connection desktop.
All toolbar's icons are black.

I don't think it comes from Vim but from windows or graphical drivers
but have you got some idea ?

Thanks

--
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: Insert-cursor/Overwrite cursor

On Tue, August 30, 2011 5:12 am, meino.cramer@gmx.de wrote:
> Hi,
>
> sorry, I cannot remember how this feature was called...so it is
> difficult to search the help for ot ;)
>
> I can remember that there was a certain terminal sequence (was it
> that?) which has to set...where?...to enable the support of different
> cursor shapes (a | for insert mode and a normal block cursor for
> overwrite ... or vice versa) in different modes of vim.
>
> What was this exactly and where can I find the description of it?
>
> Thank you very much in advance for updateing my brain ! ;))

I have never used it, so I can only give you the reference in the help.
For console see
:h termcap-cursor-shape
and for gvim see
:h 'guicursor'

regards,
Christian

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

Insert-cursor/Overwrite cursor

Hi,

sorry, I cannot remember how this feature was called...so it is
difficult to search the help for ot ;)

I can remember that there was a certain terminal sequence (was it
that?) which has to set...where?...to enable the support of different
cursor shapes (a | for insert mode and a normal block cursor for
overwrite ... or vice versa) in different modes of vim.

What was this exactly and where can I find the description of it?

Thank you very much in advance for updateing my brain ! ;))

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: storing variables in viminfo

On Aug 29, 2:04 pm, Tony Mechelynck <antoine.mechely...@gmail.com>
wrote:
> On 29/08/11 10:36, sinbad wrote:
>
>
>
>
>
>
>
>
>
> > On Aug 29, 1:29 pm, "Christian Brabandt"<cbli...@256bit.org>  wrote:
> >> On Mon, August 29, 2011 10:06 am, sinbad wrote:
> >>> my viminfo setting is viminfo='20,"50,! and my variable name is
> >>> g:MYLIST
> >>> i am running vim 7.0. even after the above settings the variable is
> >>> not saved
> >>> am i missing anything else.
>
> >> Storing dictionaries or lists is only supported with Vim 7.3.030
>
> >> regards,
> >> Christian
>
> > hi J rgen,
>
> > Actually it is a list. As storing lists doesn't seem to be supported
> > in vim 7.0
> > is there any workaround for this, besides installing latest vim.
> > as this is office server, i have to install it locally. and i faced
> > many lib issues while doing that (latest vim requires latest ncurses,
> > termlib ...)
> > etc.
>
> > thanks
>
> You can convert it back and forth to a string:
>
> if has('viminfo') && has('autocmd')
>         set vi^=!
>         au VimEnter *
>                 \ if exists('MYLIST_STR')
>                         \ | let MyList = eval(MYLIST_STR)
>                 \ | else
>                         \ | unlet! MyList
>                 \ | endif
>         au VimLeavePre *
>                 \ if exists('MyList')
>                         \ | let MYLIST_STR = string(MyList)
>                 \ | else
>                         \ | unlet! MYLIST_STR
>                 \ | endif
> endif
>
> Best regards,
> Tony.
> --
> Think of your family tonight.  Try to crawl home after the computer
> crashes.

Brilliant, It works perfect, thanks a lot Jürgen and Tony.

--
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: storing variables in viminfo

On 29/08/11 10:36, sinbad wrote:
> On Aug 29, 1:29 pm, "Christian Brabandt"<cbli...@256bit.org> wrote:
>> On Mon, August 29, 2011 10:06 am, sinbad wrote:
>>> my viminfo setting is viminfo='20,"50,! and my variable name is
>>> g:MYLIST
>>> i am running vim 7.0. even after the above settings the variable is
>>> not saved
>>> am i missing anything else.
>>
>> Storing dictionaries or lists is only supported with Vim 7.3.030
>>
>> regards,
>> Christian
>
> hi Jürgen,
>
> Actually it is a list. As storing lists doesn't seem to be supported
> in vim 7.0
> is there any workaround for this, besides installing latest vim.
> as this is office server, i have to install it locally. and i faced
> many lib issues while doing that (latest vim requires latest ncurses,
> termlib ...)
> etc.
>
> thanks
>

You can convert it back and forth to a string:

if has('viminfo') && has('autocmd')
set vi^=!
au VimEnter *
\ if exists('MYLIST_STR')
\ | let MyList = eval(MYLIST_STR)
\ | else
\ | unlet! MyList
\ | endif
au VimLeavePre *
\ if exists('MyList')
\ | let MYLIST_STR = string(MyList)
\ | else
\ | unlet! MYLIST_STR
\ | endif
endif


Best regards,
Tony.
--
Think of your family tonight. Try to crawl home after the computer
crashes.

--
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: storing variables in viminfo

Hi,

sinbad wrote:
> On Aug 29, 1:29 pm, "Christian Brabandt" <cbli...@256bit.org> wrote:
>> On Mon, August 29, 2011 10:06 am, sinbad wrote:
>>> my viminfo setting is viminfo='20,"50,! and my variable name is
>>> g:MYLIST
>>> i am running vim 7.0. even after the above settings the variable is
>>> not saved
>>> am i missing anything else.
>>
>> Storing dictionaries or lists is only supported with Vim 7.3.030
>
> Actually it is a list. As storing lists doesn't seem to be supported
> in vim 7.0
> is there any workaround for this, besides installing latest vim.
> as this is office server, i have to install it locally. and i faced
> many lib issues while doing that (latest vim requires latest ncurses,
> termlib ...)
> etc.

use an additional variable g:MYLISTASSTRING which you keep synchronized
with g:MYLIST by executing

:let g:MYLISTASSTRING = string(g:MYLIST)

whenever g:MYLIST is changed. It might also be enough to define an
autocommand which syncs these variable just before Vim is quit:

:autocmd VimLeavePre * let g:MYLISTASSTRING = string(g:MYLIST)

(I haven't tested this).

On startup of Vim you can initialize g:MYLIST from g:MYLISTASSTRING with

if exists('g:MYLISTASSTRING')
let g:MYLIST = eval(g:MYLISTASSTRING)
endif

Regards,
Jürgen


--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)

--
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: storing variables in viminfo

On Aug 29, 1:29 pm, "Christian Brabandt" <cbli...@256bit.org> wrote:
> On Mon, August 29, 2011 10:06 am, sinbad wrote:
> > my viminfo setting is viminfo='20,"50,! and my variable name is
> > g:MYLIST
> > i am running vim 7.0. even after the above settings the variable is
> > not saved
> > am i missing anything else.
>
> Storing dictionaries or lists is only supported with Vim 7.3.030
>
> regards,
> Christian

hi Jürgen,

Actually it is a list. As storing lists doesn't seem to be supported
in vim 7.0
is there any workaround for this, besides installing latest vim.
as this is office server, i have to install it locally. and i faced
many lib issues while doing that (latest vim requires latest ncurses,
termlib ...)
etc.

thanks

--
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: storing variables in viminfo

On 29/08/11 08:29, sinbad wrote:
> hi,
>
> how to explicitly store variables in to viminfo file.
> i want to store a global variable "g:var" into a
> viminfo file, i read the help it says global vars
> are stored by default but this doesn't seem to be
> happening. how to store it explicitly.i want the
> contents of the global variable to be restored
> after vim is restarted. how do i do that.
>
> thanks
>

As said by Jürgen quoting from the help, the only variables stored in
the viminfo file are those whose name is in all-uppercase, or more
precisely, "starts with an uppercase letter and contains no lowercase
letter". So there are two possibilities:

1) Instead of g:var, use g:VAR (which, outside functions, is the same as
VAR). It will be saved in the viminfo with no special action on your
part, provided that the 'viminfo' setting contains the ! flag

2) If you need to save a lowercase variable in the viminfo you must do
it explicitly by moving it to and from something in all uppercase:

if exists('viminfo') && exists('autocmd')
set vi^=!
au VimEnter * if exists('VAR') | let var = VAR
\ | else | unlet! var | endif
au VimLeavePre * if exists('var') | let VAR = var
\ | else | unlet! VAR | endif
endif

The above intentionally uses set with ^= (add flag at start of option)
not += (add flag at end of option) because there are some other things
that, when present in the 'viminfo' setting, must be at its end.

and, of course, don't hesitate to check the help for anything you didn't
know about that is used by the above snippet.


Best regards,
Tony.
--
Test-tube babies shouldn't throw stones.

--
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: storing variables in viminfo

On Mon, August 29, 2011 10:06 am, sinbad wrote:
> my viminfo setting is viminfo='20,"50,! and my variable name is
> g:MYLIST
> i am running vim 7.0. even after the above settings the variable is
> not saved
> am i missing anything else.

Storing dictionaries or lists is only supported with Vim 7.3.030

regards,
Christian

--
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: storing variables in viminfo

Hi,

sinbad wrote:
> On Aug 29, 11:54 am, Jürgen Krämer <jottka...@googlemail.com> wrote:
>>
>> sinbad wrote:
>>
>>> how to explicitly store variables in to viminfo file.
>>> i want to store a global variable "g:var" into a
>>> viminfo file, i read the help it says global vars
>>> are stored by default but this doesn't seem to be
>>> happening. how to store it explicitly.i want the
>>> contents of the global variable to be restored
>>> after vim is restarted. how do i do that.
>>
>> from :help 'viminfo'
>>
>> | ! When included, save and restore global variables that start
>> ^^^^^^^^^^
>> | with an uppercase letter, and don't contain a lowercase
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> | letter. Thus "KEEPTHIS and "K_L_M" are stored, but "KeepThis"
>> ^^^^^^
>> | and "_K_L_M" are not. Nested List and Dict items may not be
>> | read back correctly, you end up with an empty item.
>>
>> Regards,
>> J rgen
>>
>> --
>> Sometimes I think the surest sign that intelligent life exists elsewhere
>> in the universe is that none of it has tried to contact us. (Calvin)
>
> my viminfo setting is viminfo='20,"50,! and my variable name is
> g:MYLIST
> i am running vim 7.0. even after the above settings the variable is
> not saved
> am i missing anything else.

is g:MYLIST a list or a string?

Have you checked that the actual setting of 'viminfo' is correct with

set viminfo?

If you only have

set viminfo='20,"50,!

in your .vimrc it won't work, because the double quote is seen as the
start of a comment. You have to backslash-escape it:

set viminfo='20,\"50,!

Regards,
Jürgen

--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)

--
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: storing variables in viminfo

On Aug 29, 11:54 am, Jürgen Krämer <jottka...@googlemail.com> wrote:
> Hi,
>
> sinbad wrote:
>
> > how to explicitly store variables in to viminfo file.
> > i want to store a global variable "g:var" into a
> > viminfo file, i read the help it says global vars
> > are stored by default but this doesn't seem to be
> > happening. how to store it explicitly.i want the
> > contents of the global variable to be restored
> > after vim is restarted. how do i do that.
>
> from :help 'viminfo'
>
> |       !       When included, save and restore global variables that start
>                                                                  ^^^^^^^^^^
> |               with an uppercase letter, and don't contain a lowercase
>                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> |               letter.  Thus "KEEPTHIS and "K_L_M" are stored, but "KeepThis"
>                 ^^^^^^
> |               and "_K_L_M" are not.  Nested List and Dict items may not be
> |               read back correctly, you end up with an empty item.
>
> Regards,
> J rgen
>
> --
> Sometimes I think the surest sign that intelligent life exists elsewhere
> in the universe is that none of it has tried to contact us.     (Calvin)

hi,

my viminfo setting is viminfo='20,"50,! and my variable name is
g:MYLIST
i am running vim 7.0. even after the above settings the variable is
not saved
am i missing anything else.

thanks

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

Sunday, August 28, 2011

Re: storing variables in viminfo

On Aug 29, 6:29 pm, sinbad <sinbad.sin...@gmail.com> wrote:

> how to explicitly store variables in to viminfo file.

If the "!" flag is included in the viminfo option, and the variable is
all uppercase, it is saved in the viminfo file.

What is the 'viminfo' option setting?

Regards, John

--
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: storing variables in viminfo

Hi,

sinbad wrote:
>
> how to explicitly store variables in to viminfo file.
> i want to store a global variable "g:var" into a
> viminfo file, i read the help it says global vars
> are stored by default but this doesn't seem to be
> happening. how to store it explicitly.i want the
> contents of the global variable to be restored
> after vim is restarted. how do i do that.

from :help 'viminfo'

| ! When included, save and restore global variables that start
^^^^^^^^^^
| with an uppercase letter, and don't contain a lowercase
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| letter. Thus "KEEPTHIS and "K_L_M" are stored, but "KeepThis"
^^^^^^
| and "_K_L_M" are not. Nested List and Dict items may not be
| read back correctly, you end up with an empty item.

Regards,
Jürgen

--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)

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

storing variables in viminfo

hi,

how to explicitly store variables in to viminfo file.
i want to store a global variable "g:var" into a
viminfo file, i read the help it says global vars
are stored by default but this doesn't seem to be
happening. how to store it explicitly.i want the
contents of the global variable to be restored
after vim is restarted. how do i do that.

thanks

--
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: getchar() blocks the output

On Aug 26, 8:01 pm, ZyX <zyx....@gmail.com> wrote:
> Reply to message «getchar() blocks the output»,
> sent 17:50:08 26 August 2011, Friday
> by sinbad:
>
> > basically i want to display a list of choices for the user and based
> > on the users input i will take some action. so the lines 7-8 will
> > actually list the users with some choices in a new window. but the
> > window is not getting opened because of getchar(), according to
> > the code that's what suppose to happen. why getchar() is blocking
> > output, is there any way around this.
>
> In this code getchar() is not blocking an output, &lazyredraw option should be
> the cause. If you want to use buffer and not :echo or input()/inputlist(), then
> you should put explicit :redraw before getchar() call. Or :redraw! if without a
> bang does not work.
>
> Original message:
>
>
>
>
>
>
>
> > hi,
>
> > i've the following function.
>
> >  1 fun! Dosome()
> >   2     vertical botright new
> >   3     setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile
> >   4     setlocal nowrap
> >   5     setlocal nonu
> >   6
> >   7     for m in g:list
> >   8         let txt = printf("%s %-50s %-4d %-50s", m[0], m[1]. "()",
> > m[2], m[3])
> >   9         put =txt
> >  10     endfor
> >  11
> >  12     let char = getchar()
> >  13     setlocal nomodifiable
> >  14     silent! "'".char
> >  15 endfun
>
> > basically i want to display a list of choices for the user and based
> > on the users input i will take some action. so the lines 7-8 will
> > actually list the users with some choices in a new window. but the
> > window is not getting opened because of getchar(), according to
> > the code that's what suppose to happen. why getchar() is blocking
> > output, is there any way around this.
>
> > thanks
>
>
>
>  signature.asc
> < 1KViewDownload

thanks ZyX, redraw() did the trick.

--
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: changing vim cursor shape or color in vim 7.0

On Aug 28, 4:20 am, Marcin Szamotulski <msza...@gmail.com> wrote:
> On 01:57 Fri 26 Aug     , sinbad wrote:
>
>
>
>
>
>
>
>
>
> > On Aug 18, 11:26 am, sinbad <sinbad.sin...@gmail.com> wrote:
> > > On Aug 17, 4:55 pm,sinbad<sinbad.sin...@gmail.com> wrote:
>
> > > > hi,
>
> > > > i'm using vim 7.0 inside a gnu screen.
> > > > i use vim by puttying to the linux server.
> > > > i want to change the cursor shape or color
> > > > whenever i want, basically i would like to
> > > > set the cursor to a different shape or color
> > > > when a variable is set. i tried experimenting
> > > > with t_ve option in vim. currently it is set to
> > > > t_ve=^[[34h^[[?25h, i don't know what those
> > > > values are, but i tried to change the numbers
> > > > with the hope that it might change either
> > > > color or shape of the cursor. but no matter
> > > > what vlaues i use the cursor just disappears.
> > > > i want to know what the values exactly mean
> > > > and how do i change them.
>
> > > > thanks
> > > >sinbad
>
> > > can anyone please shed some light on this.
>
> > > thanks
>
> > can someone please give it a shot. i ran out of ideas !
>
> > thanks
>
> These are my mappings to change cursor color (for vim in xterm):
> map @1 :!echo -ne "\033]12;midnightblue\007"<CR><CR>
> map @2 :!echo -ne "\033]12;grey100\007"<CR><CR>
> map @3 :!echo -ne "\033]12;chartreuse1\007"<CR><CR>
> map @4 :!echo -ne "\033]12;SlateBlue\007"<CR><CR>
> You can check if that works for you.
>
> Best,
> Marcin
>
>
>
>
>
>
>
>
>
> > --
> > 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, visithttp://www.vim.org/maillist.php

hi marcin,

thanks for sharing. but those mappings were not working for me.

--
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: Copy and paste problem

Thank you ZyX! And thank you Gary again! I get last version from mercurial repo build it and viola! - it now works just as I dreamed about.

2011/8/27 ZyX <zyx.vim@gmail.com>
Reply to message «Re: Copy and paste problem»,
sent 20:52:14 27 August 2011, Saturday
by Михаил Голубев:

> Using ^= instead of += is really nice tip, though my vim doesn't have any
> unnamedplus option for clipboard command(
It was introduced in vim-7.3.74.

Original message:
> Thank you, Gary!
>
> Using ^= instead of += is really nice tip, though my vim doesn't have any
> unnamedplus option for clipboard command(
>
> 2011/8/27 Gary Johnson <garyjohn@spocom.com>
>
> > On 2011-08-27, ?????? ??????? wrote:
> > > Hello, dear Vim society!
> > >
> > > I always want my vim more freely communicate with another applications
> > > on
> >
> > my
> >
> > > computer. So after googling a bit and digging in vim help I found the
> >
> > next
> >
> > > fancy option:
> > >
> > > set clipboard+=unnamed
> > >
> > > on Windows it does exactly what I wish, but on Linux it works works
> > > only
> >
> > by
> >
> > > half...
> > >
> > > Then I copy or paste some text somewhere (not in vim) it by default
> >
> > stored in
> >
> > > two vim select registers: "+ and "*. With above option enabled I can
> >
> > easily
> >
> > > paste it then from "* into any of my vim buffers with p/P commands
> >
> > without
> >
> > > specifying register. Thats really handful. But when I copy (yank) text
> > > in
> >
> > vim
> >
> > > itself, the text now saved in "" and "* but not in "+ ! And when I try
> > > to
> >
> > paste
> >
> > > text in another program the "+ register content (if any) is inserted
> > > and
> >
> > that
> >
> > > is not what I want at all. So I either need to press mouse middle
> > > button
> >
> > to
> >
> > > insert desired text from "*, or use context menu or menu bar in vim (to
> >
> > cruel)
> >
> > > or explicitly choose register typing "+y.
> > >
> > > May be I missed something? Is it possible to to achieve the effect of
> >
> > above
> >
> > > option but with "+ register instead?
> >
> > I have
> >
> >    set clipboard^=unnamed
> >
> > and for me it "just works", but my habits and expectations may be
> >
> > different from yours.  You might try this instead:
> >    set clipboard^=unnamedplus
> >
> > which will use the + register instead of the * register.
> >
> > Note that I use ^= rather than +=.  That is because the default
> > setting for 'clipboard' includes the 'exclude' flag and the
> > 'exclude' flag must be the last flag in the 'clipboard' option.
> > Using ^= inserts the 'unnamed' or 'unnamedplus' flag at the
> > beginning of the 'clipboard' option.
> >
> > See
> >
> >    :help 'clipboard'
> >    :help :set^=
> >
> > HTH,
> > Gary
> >
> > --
> > 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



--
Best regards
Golubev Mikhail

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