Re: Determining if Vim is running in text-console mode or X Windows

2011-02-01 Thread Ivan Krasilnikov
Check if $DISPLAY is not empty. On Tue, Feb 1, 2011 at 12:23, Steve Laurie wrote: > Hi, > > I've searched Vim help and Google as well as done lots of experimentation > with no luck. > > Basically, what I'm trying to do is put something in my .vimrc file that can > determine if I'm starting Vim in

Re: To be strange or not to be strange...?

2011-03-04 Thread Ivan Krasilnikov
On Fri, Mar 4, 2011 at 22:41, wrote: >  And at this point one will win 1000 points for free if knowing, how >  to enter the version string... > >  I tried > >    7.3.001 >    r7.3.001 (like svn) >    v7-3-001 (as used by .hg.tags) > >  but without luck so far. > >  What is the correct spelling he

Re: shell commands in windows

2011-03-10 Thread Ivan Krasilnikov
On Wed, Mar 9, 2011 at 21:56, David Ohlemacher wrote: > Hello all, > > I would like to write a script to take advantage of vim's windowing. > > I have maybe a dozen files that I need to monitor.   Is there a way to open > vim or gvim, and then have it tail -f each file in separate windows?   I can

Re: How to close all files opened by different vim instances.

2011-03-17 Thread Ivan Krasilnikov
On Thu, Mar 17, 2011 at 11:08, Forest Wang wrote: > All, > > Say, in a terminal, I opened many files by invoking vim or gvim program many > times, like: > > vim a& > vim b& > vim c& > ... > > Than I realized I need to close all of them. So I had to close them one by > one: > > %1 and :qa! > %2 and

Re: vimrc errors introduced with vim 7.2.330: au problems?

2011-03-24 Thread Ivan Krasilnikov
On Thu, Mar 24, 2011 at 20:51, mathneuro wrote: > Hello, I have a series of commands in an old vimrc I've been using on > my OS X box (vim 7.2.264): > > au BufRead,BufNewFile [Mm]akefile* set noexpandtab > au BufRead,BufNewFile *.tex set tabstop=2 > au BufRead,BufNewFile *.tex set shiftwidth=2 > >

Re: How to git correctly...?

2011-03-30 Thread Ivan Krasilnikov
On Thu, Mar 31, 2011 at 06:34, Ivan Sichmann Freitas wrote: > IIRC, the git mirror of vim's repository was discontinued Nope, the following mirror by macvim's maintainer is very much alive and up-to-date https://github.com/b4winckler -- You received this message from the "vim_use" maillist. Do

Re: [BUG] 'non-empty string' >? '' returns false on amd64 arch

2011-05-24 Thread Ivan Krasilnikov
I confirm the problem. Looks like there's a bug in UTF-8 handling in function mb_strnicmp() in mbyte.c, specifically in the following "if" which was introduced by patch 7.3.040: /* Don't case-fold illegal bytes or truncated characters. */ if (utf_ptr2len(s1 + i) < l || utf_ptr2len(s2 + i) < l) r

Re: [BUG] 'non-empty string' >? '' returns false on amd64 arch

2011-05-24 Thread Ivan Krasilnikov
+vim_dev@ On Tue, May 24, 2011 at 18:14, Ivan Krasilnikov wrote: > I confirm the problem. Looks like there's a bug in UTF-8 handling in > function mb_strnicmp() in mbyte.c, specifically in the following "if" > which was introduced by patch 7.3.040: > > /* Do

Re: [BUG] 'non-empty string' >? '' returns false on amd64 arch

2011-05-24 Thread Ivan Krasilnikov
Also mb_strnicmp() assumes that lowercase and uppercase characters have the same length in UTF-8 representation. This isn't the case. Here are a few counterexamples: $ python -c 'print " ".join(["0x%.2X" % n for n in range(65536) if len(unichr(n).encode("utf8")) != len(unichr(n).lower().encode("ut

Re: [BUG] 'non-empty string' >? '' returns false on amd64 arch

2011-05-25 Thread Ivan Krasilnikov
On Wed, May 25, 2011 at 14:09, Bram Moolenaar wrote: > Yes, this code just returns -1, no matter if the first or second string > is bigger. > > Your other remark about difference in byte length of a character is > right, but it's not so easy to fix.  Can you suggest a patch? > Preferably with a te

Re: [BUG] 'non-empty string' >? '' returns false on amd64 arch

2011-05-26 Thread Ivan Krasilnikov
On Wed, May 25, 2011 at 22:39, Ivan Krasilnikov wrote: > Hi, here's my patch for mbyte.c and a few testcases. > > I've eliminated those return -1's by doing a bytewise comparison of > strings after the first corrupted character. This should make the > comparisons tra

Re: BufReadPost getfsize and scp

2011-06-05 Thread Ivan Krasilnikov
On Sun, Jun 5, 2011 at 12:08, John Little wrote: > I've been forced into this on Unix and Linux systems, by overly > conservative admins.  For vim itself, it's quite straightforward. > > It gets tricky if you want features (say, gvim) that require libraries > the system hasn't got; I've been force

Re: How to get returned value from python functions in vim scripts ?

2011-06-06 Thread Ivan Krasilnikov
On Tue, Jun 7, 2011 at 08:47, Lenin wrote: > Alec: It seems :py vim.command('return 1') will throw an error that says > "return not inside a function". It works fine if you call it inside a vim function: :function Func() : py vim.command('return 1') :endfunction -- You received this message f

Re: Failed to compile a static VIM??

2011-08-20 Thread Ivan Krasilnikov
On Thu, Aug 18, 2011 at 10:49, Delian Xu wrote: > Hi guys, >  I'm trying to compile a static VIM so that I can launch it every where (On > machines with different Linux distributions and library versions). >  I got it to link statically by passing in the LDFLAGS at configure > time like this (I ad

Re: Installing vim 7.3 as a user - can't copy to/from system clipboard

2011-11-30 Thread Ivan Krasilnikov
On Wed, Nov 30, 2011 at 11:48, ACR wrote: >  make install DESTDIR=/home//.local I don't think you need DESTDIR there - I tried your command and it caused vim to be installed in /home//.local/home//.local, which looks wrong. So, maybe when you started vim, you actually used a different binary than

Re: Strange font rendering in gVIM 7.3 in Unix

2011-12-11 Thread Ivan Krasilnikov
On Mon, Dec 12, 2011 at 05:42, Jerry wrote: > gVIM 7.3 screenshot: http://i.imgur.com/K2nbx.jpg I see something similar when I set guifont to a non-existing font name. Does ":set guifont=Monospace" or choosing some font through "Edit > Select font..." menu solve your problem? > gVIM 7.2 screens

Re: GVIM: Set working directory the same of the current file

2011-12-13 Thread Ivan Krasilnikov
On Tue, Dec 13, 2011 at 18:13, Francisco M. Marzoa Alonso wrote: > I mean that if I'm editing /var/www/myhost/web/index.php and if I try to > open a new file, it should shows /var/www/myhost/web instead of my > user's directory. This page describes one way to quickly open files in the same direct

Re: Open files in GVIM in a new tab instead substitute current file

2011-12-14 Thread Ivan Krasilnikov
On Wed, Dec 14, 2011 at 09:42, Francisco M. Marzoa Alonso wrote: > When I open a new file in gvim with the open file icon, it's loaded > substituting the one I am editing in that moment. I rather like to be > open in a new tab instead. Is there any configuration option on .vimrc > to achieve this?

Re: Open File larger than the amount of ram you have

2011-01-07 Thread Ivan Krasilnikov
Have you disabled swap files? Try to enable them with "set swapfile" command prior to loading the file, vim should use much less memory then. You can also try to tune maxmem/maxmemtot options to further reduce memory usage. -- You received this message from the "vim_use" maillist. Do not top-post

Re: How to make clipboard=unnamedplus work upon tmux reattach

2012-03-22 Thread Ivan Krasilnikov
It's a general problem with X11. Once a connection with X11 server is established, it doesn't let a client (i.e. vim) switch to using a different server. You can solve it with an X11 proxy like xpra. It opens a local, persistent X11 server for vim, to which you can attach remotely at any time. Sta