Wednesday, November 30, 2011

suppress error?

This function and its friend PrevDQ() work.

If I am diffing goes to next change, or if doing helpgrep will go to
the next.

When at the end of the helpgrep, it presents:
Error detected while processing function NextDQ:
line 4:
E553: No more items
Press ENTER or type command to continue

Can I suppress that message completely?

function! NextDQ()
if &diff
normal! ]c
else
cn
if v:version >= 700
setlocal cursorline
endif
endif
endfun
nmap <F8> :call NextDQ()<cr>

-Bill

--
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 vim 7.3 as a user - can't copy to/from system clipboard

Hi All,

It started working once I got the latest patch for vim 7.3.

Thanks a lot to Tony for suggesting this.

Regards,
Anith.

On Nov 30, 8:21 pm, ACR <anith.r...@gmail.com> wrote:
> Hi Thanks for the responses.  A few more points based on the replies.
>
> 1)  The server already contains vim 7.2, which works fine.  (i.e if I
> invoke vim 7.2 which is there in the default path, I am able to cut/
> paste from/to the clipboard).  The issue occurs when I invoked the
> gvim binary I created on my own (because I wanted vim 7.3, and the
> administrator has not yet installed it in the common directory) in my
> local "bin" directory.
> 2)  I have vim created in my ~<user>/.local/home/<user>/.local/bin,
> but moved it to ~<user>/.local/bin manually (along with the share
> directory).  I hope this is fine.  I always invoke the newly created
> gvim binary by giving the full path.
> 3)  I am using a linux "konsole"
> 4) I had already tried out the Edit-copy-paste and the clipboard
> registers "*" and "+".  But they didn't work :(
> 5) I can re-compile and re-generate the vim binaries, if any of the
> options I used is incorrect.
> 6) Has this got anything to do with me not having administrator
> permissions? (I hope not)
>
> Regards,
> Anith.
>
> On Nov 30, 5:19 pm, Tony Mechelynck <antoine.mechely...@gmail.com>
> wrote:
>
> > On 30/11/11 11:48, ACR wrote:
>
> > > Hi,
>
> > >    I am trying to install vim 7.3 locally on a red hat machine in which
> > > I have a user account.  I downloaded the source code from vim.org and
> > > ran the following commands.
>
> > > ./configure --prefix=/home/<username>/.local --enable-gui --with-x --
> > > with-features=normal
> > >    make install DESTDIR=/home/<username>/.local
>
> > >    Now, I am unable to copy the data to/from the system clipboard.  I
> > > googled to find out that that this happens when vim is compiled
> > > without X/gui support.  Hence, I tried the options (given above) while
> > > compiling, again with the same results.  Can someone help me out?
>
> > >    Given below are the version details  (obtained by entering :version
> > > from vim)
> > > --------------------------------------------------------------------------------------------------------------------------------
> > > Normal version with X11-Motif GUI.  Features included (+) or not (-):
> > > -arabic +autocmd +balloon_eval +browse +builtin_terms +byte_offset
> > > +cindent
> > > +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info
>
> > ----------------^^^^^^^^^^> +comments
>
> > [...]
>
> > This Vim version should be able to use the system clipboard, as long as
> > it is running in a terminal with an X connection. So:
>
> > - running Vim in the linux console (Ctrl-Alt-F1 to Ctrl-Alt-F6) or
> > invoking it with -X on the command-line, prevents communication with the
> > clipboard.
>
> > - In gvim or in Vim-in-xterm you should be able to use the + register
> > which is what most programs use with Edit → Paste, Edit → Copy, Edit →
> > Cut, or the * register which is what most programs use for a selection
> > or for MiddleMouse pasting. Unlike what happens on Windows, on X11
> > systems these two registers are distinct.
>
> > - In gvim, you can also use Edit → Paste, Edit → Copy, Edit → Cut
>
> > - The Visual area is normally not automatically copied into "* -- if you
> > want it (which I don't recommend) you can use
>
> >         :set clipboard+=autoselect guioptions+=a
>
> > - In gvim, or in terminals where Vim can access both the mouse and the
> > clipboard, you can use <MiddleMouse> to paste the * register.
>
> > - About downloading the source code: you are aware, aren't you, that as
> > of this writing there have been 356 bugfixes since Vim 7.3 was released?
> > Seehttp://vim.wikia.com/wiki/Getting_the_Vim_source_with_Mercurial
> > about how to get the latest sources.
>
> > Best regards,
> > Tony.
> > --
> > "Gosh that takes me back ... or forward.  That's the trouble with time
> > travel, you never can tell."
> >                 -- Dr. Who

--
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: Why I'm not switching to command mode?

On Nov 29, 3:02 pm, Alex Kostikov <alex.kosti...@gmail.com> wrote:
> I want Ctrl+C to copy selected text to clipboard and switch to command
> mode.
> The line bellow populates clipboard but doesn't do the switching to
> command mode. Why?
>
> vnoremap <C-c> "+y<ESC>
>

This works for me, except that it beeps at me. The reason it beeps at
me, is that the 'y' operator in visual mode already returns to command/
normal mode automatically, making the final <Esc> redundant.

If you're expecting to still be in visual mode after a "+y, then
perhaps you're running with 'insertmode' set? Or in "easy" mode? If
'insertmode' is set, Vim is usually in insert mode instead of command/
normal mode, and rather than using <Esc> to go to command/normal mode,
you use <C-L>.

--
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: Why I'm not switching to command mode?

On Nov 30, 7:45 pm, Jean-Rene David <jrda...@magma.ca> wrote:
> * Alexander Kostikov [2011.11.29 21:40]:
>
> > After some retries I figure out command that does the thing I want:
>
> > snoremap <C-C> <ESC>gv"*ygv<ESC>
>
> > Few lessons learned:
> > 1) if vnoremap is used I'm not able to return to command mode for some reason
>
> There is no "command" mode in vim. One may think
> you are referring to "command-line" mode, but you
> seem to be referring to "normal" mode. That's the
> mode where h,j,k,l move the cursor around in the
> text.
>

command mode is another (rarely used) name for normal mode. I made the
same mistake a while back on this same list.

:help command-mode

--
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: _vimrc file on Windows with 7.3



On Mon, Nov 21, 2011 at 3:10 PM, Ben Fritz <fritzophrenic@gmail.com> wrote:


On Nov 20, 6:44 pm, Henry Hertz Hobbit <hhhob...@gmail.com> wrote:
<SNIP>
 
> Here is the contents of the_vimrc file:
>
> http://www.securemecca.com/tmp/vimrc.txt

Your mappings are commented out, in that file. Also, although it may
not matter, I'd use :nnoremap in this situation instead of just :map.


PROBLEM SOLVED

YOU ARE CORRECT!  I didn't even look at it carefully like I should
have.  Part of that is I have too many comment formats I am looking
at with BAT, sh, C, EMACS, PERL, JavaScript... NOW I can remember
when I did it. I did it when I gave my _vimrc file to somebody else and
because they probably don't want those function key mappings I commented
them out in their folder.  I accidentally copied that file in place rather then
the one I should have copied. I will try nnoremap which is more appropriate.
See the changes in the file.

>
> I am normally starting vim via a gvimi.bat file in cmd.exe.
> Here is what is in that file:
>
> http://www.securemecca.com/tmp/gvimi.txt
>

Why do you normally ditch the viminfo file? I find it extremely
useful. If you really don't want it, why not just set the viminfo
option to an empty string in your _vimrc?

I don't even have a viminfo file any more except on Windows
where I may right click and edit something from the GUI.

I find history extremely unuseful for the way I work.  I never
go back to where I was at in a file I edited before.  That is my
main but not only objection to history.  It isn't just vim where I try
to stop history when I can.  I also wipe out what files were opened
with LibreOffice and OpenOffice (90% of them aren't even in
existence any more so why have them as recently used?).
I clean those histories and several others including my BASH
history using a trim script file that cleans them all out.  Only
in BASH do I find history useful. But it is useful only as long
as the xterm is open. Once all xterms are closed I want the
BASH history to disappear. Otherwise all new xterms opened
inherit mostly the history of the last closed xterm.  That is
usually NOT what I want since every one of the xterms is
usually dedicated to doing only certain things. I usually have
at least nine xterms open all the time on Linux and BSD.

I don't like tilde backup files either.  If it is a hot system
file I copy it some place else and use scripts that make
backups with dates for the older file.

It serves me right for commenting out the function key
mappings for somebody else in the first place.  Let THEM
comment them out.  Which comment characters am I most
used to?  "//"  It is used in both C and JavaScript and I
believe JavaScript is number one in my comment echelon
and vim is last.  Now you know why I missed it.  In almost
everything else a double-quote contains a string.

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: Why I'm not switching to command mode?

* Alexander Kostikov [2011.11.29 21:40]:
> After some retries I figure out command that does the thing I want:
>
> snoremap <C-C> <ESC>gv"*ygv<ESC>
>
> Few lessons learned:
> 1) if vnoremap is used I'm not able to return to command mode for some reason

There is no "command" mode in vim. One may think
you are referring to "command-line" mode, but you
seem to be referring to "normal" mode. That's the
mode where h,j,k,l move the cursor around in the
text.

If you don't return to normal mode after your
original command, what mode *are* you in?

> The question is - could this command be written
> easier?

Sure.

:vnoremap <c-c> "*y`>

--
JR

--
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: expression register as calculator with floats?



On Wed, Nov 30, 2011 at 9:11 AM, pauli baadsager <pauli.baadsager@gmail.com> wrote:
On Nov 30, 11:37 am, pauli baadsager <pauli.baadsa...@gmail.com>
wrote:
> On Nov 30, 3:46 am, Tim Chase <v...@tim.thechases.com> wrote:
>
> > On 11/29/11 20:40, Ben Fritz wrote:
>
> > > Starting at Vim 7.3, this also works with floating-point
> > > math.
>
> > Just as an aside, that should read "Vim 7.2" as detailed at
>
> >   :help version-7.2
>
> > (which happens to be what I'm running on my Debian box, and
> > floats work fine there as the OP described).
>
> > -tim
>
> Thanks. I found it working in both Vim 7.2 and 7.3; but not in GVim
> 7.3 or 7.2. Does anyone have clue how to make it work in gvim?
> It works in Vim 7.2, I type ctrl-r = 4.0/12.0 and get 0.333333
> It doesn't work in GVim 7.2 (or 7.3), I type ctrl-r = 4.0/12.0 and get
> E806: using Float as a String
>
> / Pauli

Now it works in my GVim as well, the problem turned out to be some
locale settings. I changed system language from en_DK to en_GB and now
the expression calculator works with floats in gvim. Nice! Thanks.
/ Pauli
Do you mean $LANG in linux? I have got the same issue with pt_BR.UTF8 :/
 

--
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: expression register as calculator with floats?

On Tue, Nov 29, 2011 at 8:46 PM, Tim Chase <vim@tim.thechases.com> wrote:
> On 11/29/11 20:40, Ben Fritz wrote:
>>
>> Starting at Vim 7.3, this also works with floating-point
>> math.
>
>
> Just as an aside, that should read "Vim 7.2" as detailed at
>
>  :help version-7.2
>
> (which happens to be what I'm running on my Debian box, and floats work fine
> there as the OP described).
>

Oops, my mistake. I forgot it's been that long! 7.3 was persistent
undo, conceal, relative line numbers, and colorcolumn. 7.2 was floats.

--
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 vim 7.3 as a user - can't copy to/from system clipboard

Hi Thanks for the responses. A few more points based on the replies.

1) The server already contains vim 7.2, which works fine. (i.e if I
invoke vim 7.2 which is there in the default path, I am able to cut/
paste from/to the clipboard). The issue occurs when I invoked the
gvim binary I created on my own (because I wanted vim 7.3, and the
administrator has not yet installed it in the common directory) in my
local "bin" directory.
2) I have vim created in my ~<user>/.local/home/<user>/.local/bin,
but moved it to ~<user>/.local/bin manually (along with the share
directory). I hope this is fine. I always invoke the newly created
gvim binary by giving the full path.
3) I am using a linux "konsole"
4) I had already tried out the Edit-copy-paste and the clipboard
registers "*" and "+". But they didn't work :(
5) I can re-compile and re-generate the vim binaries, if any of the
options I used is incorrect.
6) Has this got anything to do with me not having administrator
permissions? (I hope not)

Regards,
Anith.

On Nov 30, 5:19 pm, Tony Mechelynck <antoine.mechely...@gmail.com>
wrote:
> On 30/11/11 11:48, ACR wrote:
>
> > Hi,
>
> >    I am trying to install vim 7.3 locally on a red hat machine in which
> > I have a user account.  I downloaded the source code from vim.org and
> > ran the following commands.
>
> > ./configure --prefix=/home/<username>/.local --enable-gui --with-x --
> > with-features=normal
> >    make install DESTDIR=/home/<username>/.local
>
> >    Now, I am unable to copy the data to/from the system clipboard.  I
> > googled to find out that that this happens when vim is compiled
> > without X/gui support.  Hence, I tried the options (given above) while
> > compiling, again with the same results.  Can someone help me out?
>
> >    Given below are the version details  (obtained by entering :version
> > from vim)
> > --------------------------------------------------------------------------------------------------------------------------------
> > Normal version with X11-Motif GUI.  Features included (+) or not (-):
> > -arabic +autocmd +balloon_eval +browse +builtin_terms +byte_offset
> > +cindent
> > +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info
>
> ----------------^^^^^^^^^^> +comments
>
> [...]
>
> This Vim version should be able to use the system clipboard, as long as
> it is running in a terminal with an X connection. So:
>
> - running Vim in the linux console (Ctrl-Alt-F1 to Ctrl-Alt-F6) or
> invoking it with -X on the command-line, prevents communication with the
> clipboard.
>
> - In gvim or in Vim-in-xterm you should be able to use the + register
> which is what most programs use with Edit → Paste, Edit → Copy, Edit →
> Cut, or the * register which is what most programs use for a selection
> or for MiddleMouse pasting. Unlike what happens on Windows, on X11
> systems these two registers are distinct.
>
> - In gvim, you can also use Edit → Paste, Edit → Copy, Edit → Cut
>
> - The Visual area is normally not automatically copied into "* -- if you
> want it (which I don't recommend) you can use
>
>         :set clipboard+=autoselect guioptions+=a
>
> - In gvim, or in terminals where Vim can access both the mouse and the
> clipboard, you can use <MiddleMouse> to paste the * register.
>
> - About downloading the source code: you are aware, aren't you, that as
> of this writing there have been 356 bugfixes since Vim 7.3 was released?
> Seehttp://vim.wikia.com/wiki/Getting_the_Vim_source_with_Mercurial
> about how to get the latest sources.
>
> Best regards,
> Tony.
> --
> "Gosh that takes me back ... or forward.  That's the trouble with time
> travel, you never can tell."
>                 -- Dr. Who

--
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: bubblegum -- a vim color scheme based on xoria256

Taylor Hedberg a écrit :

> Chris Lott, Tue 2011-11-29 @ 13:58:17-0900:
> > It doesn't work for me either... my background stays light. If I
> > manually set it to black, much of the text and vim separator between
> > windows (and cursor) don't show up. I'm a newbie, so maybe I'm missing
> > something more than :colorscheme bubblegum
>
> It's a 256-color terminal color scheme, so it probably doesn't work in
> Gvim. That may be your problem.

I just made a *gui compatible* version:

https://github.com/baskerville/bubblegum/tree/master/gvim

(It is the output of a python script I wrote and I'm not using gvim.)

Greetings,
--
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: rating manipulations on www.vim.org have taken place

Excerpts from lith's message of Wed Nov 30 08:06:23 +0100 2011:
> I didn't follow this thread to closely but IIRC
Then reread it carefully cause 2 Sept was said to be the day when POST
was introduced. It still happened. So either Sept 2 is wrong or ..

I agree that it doesn't happen that often at all.

About removing or weightning old ratings less: I'd assign ratings to
script versions or thus. Don't have time right now to work on anything. :(

Marc Weber

--
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 vim 7.3 as a user - can't copy to/from system clipboard

On 30/11/11 11:48, ACR wrote:
> Hi,
>
> I am trying to install vim 7.3 locally on a red hat machine in which
> I have a user account. I downloaded the source code from vim.org and
> ran the following commands.
>
> ./configure --prefix=/home/<username>/.local --enable-gui --with-x --
> with-features=normal
> make install DESTDIR=/home/<username>/.local
>
> Now, I am unable to copy the data to/from the system clipboard. I
> googled to find out that that this happens when vim is compiled
> without X/gui support. Hence, I tried the options (given above) while
> compiling, again with the same results. Can someone help me out?
>
> Given below are the version details (obtained by entering :version
> from vim)
> --------------------------------------------------------------------------------------------------------------------------------
> Normal version with X11-Motif GUI. Features included (+) or not (-):
> -arabic +autocmd +balloon_eval +browse +builtin_terms +byte_offset
> +cindent
> +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info
----------------^^^^^^^^^^
> +comments
[...]

This Vim version should be able to use the system clipboard, as long as
it is running in a terminal with an X connection. So:

- running Vim in the linux console (Ctrl-Alt-F1 to Ctrl-Alt-F6) or
invoking it with -X on the command-line, prevents communication with the
clipboard.

- In gvim or in Vim-in-xterm you should be able to use the + register
which is what most programs use with Edit → Paste, Edit → Copy, Edit →
Cut, or the * register which is what most programs use for a selection
or for MiddleMouse pasting. Unlike what happens on Windows, on X11
systems these two registers are distinct.

- In gvim, you can also use Edit → Paste, Edit → Copy, Edit → Cut

- The Visual area is normally not automatically copied into "* -- if you
want it (which I don't recommend) you can use

:set clipboard+=autoselect guioptions+=a

- In gvim, or in terminals where Vim can access both the mouse and the
clipboard, you can use <MiddleMouse> to paste the * register.

- About downloading the source code: you are aware, aren't you, that as
of this writing there have been 356 bugfixes since Vim 7.3 was released?
See http://vim.wikia.com/wiki/Getting_the_Vim_source_with_Mercurial
about how to get the latest sources.

Best regards,
Tony.
--
"Gosh that takes me back ... or forward. That's the trouble with time
travel, you never can tell."
-- Dr. Who

--
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 vim 7.3 as a user - can't copy to/from system clipboard

On Wed, Nov 30, 2011 at 11:48, ACR <anith.ravi@gmail.com> wrote:
>  make install DESTDIR=/home/<username>/.local

I don't think you need DESTDIR there - I tried your command and it
caused vim to be installed in
/home/<username>/.local/home/<username>/.local, which looks wrong. So,
maybe when you started vim, you actually used a different binary than
you had just compiled, because it was installed in another place.

Everything else looks ok to me.

> Now, I am unable to copy the data to/from the system clipboard.

Are you accessing the system via ssh? Make sure you use ssh -X flag to
enable X11 forwarding. Check that $DISPLAY environment variable is
set.

X11 clipboard is vim's register +, so use "+p and "+y commands to access 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: expression register as calculator with floats?

On Nov 30, 11:37 am, pauli baadsager <pauli.baadsa...@gmail.com>
wrote:
> On Nov 30, 3:46 am, Tim Chase <v...@tim.thechases.com> wrote:
>
> > On 11/29/11 20:40, Ben Fritz wrote:
>
> > > Starting at Vim 7.3, this also works with floating-point
> > > math.
>
> > Just as an aside, that should read "Vim 7.2" as detailed at
>
> >   :help version-7.2
>
> > (which happens to be what I'm running on my Debian box, and
> > floats work fine there as the OP described).
>
> > -tim
>
> Thanks. I found it working in both Vim 7.2 and 7.3; but not in GVim
> 7.3 or 7.2. Does anyone have clue how to make it work in gvim?
> It works in Vim 7.2, I type ctrl-r = 4.0/12.0 and get 0.333333
> It doesn't work in GVim 7.2 (or 7.3), I type ctrl-r = 4.0/12.0 and get
> E806: using Float as a String
>
> / Pauli

Now it works in my GVim as well, the problem turned out to be some
locale settings. I changed system language from en_DK to en_GB and now
the expression calculator works with floats in gvim. Nice! Thanks.
/ Pauli

--
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 vim 7.3 as a user - can't copy to/from system clipboard

Hi,

I am trying to install vim 7.3 locally on a red hat machine in which
I have a user account. I downloaded the source code from vim.org and
ran the following commands.

./configure --prefix=/home/<username>/.local --enable-gui --with-x --
with-features=normal
make install DESTDIR=/home/<username>/.local

Now, I am unable to copy the data to/from the system clipboard. I
googled to find out that that this happens when vim is compiled
without X/gui support. Hence, I tried the options (given above) while
compiling, again with the same results. Can someone help me out?

Given below are the version details (obtained by entering :version
from vim)
--------------------------------------------------------------------------------------------------------------------------------
Normal version with X11-Motif GUI. Features included (+) or not (-):
-arabic +autocmd +balloon_eval +browse +builtin_terms +byte_offset
+cindent
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info
+comments
-conceal +cryptv -cscope +cursorbind +cursorshape +dialog_con_gui
+diff
+digraphs -dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -
farsi
+file_in_path +find_in_path +float +folding -footer +fork() +gettext
-hangul_input -iconv +insert_expand +jumplist -keymap -langmap
+libcall
+linebreak +lispindent +listcmds +localmap -lua +menu +mksession
+modify_fname
+mouse +mouseshape -mouse_dec +mouse_gpm -mouse_jsbterm -mouse_netterm
-mouse_sysmouse +mouse_xterm -multi_byte +multi_lang -mzscheme
+netbeans_intg
-osfiletype +path_extra -perl +persistent_undo +postscript +printer -
profile
-python -python3 +quickfix +reltime -rightleft -ruby +scrollbind
+signs
+smartindent -sniff +startuptime +statusline -sun_workshop +syntax
+tag_binary
+tag_old_static -tag_any_white -tcl +terminfo +termresponse
+textobjects +title
+toolbar +user_commands +vertsplit +virtualedit +visual +visualextra
+viminfo
+vreplace +wildignore +wildmenu +windows +writebackup +X11 +xfontset
+xim
+xsmp_interact +xterm_clipboard -xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/home/<username>/.local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MOTIF -
DFUNCPROTO=15
-DNARROWPROTO -g -O2 -D_FORTIFY_SOURCE=1
Linking: gcc -L/usr/local/lib -o vim -lXext -lXm -lXpm -lm -
lncurses -lselinu
x -lacl -lgpm
--------------------------------------------------------------------------------------------------------------------------------

Thanks in advance.
Anith.

--
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: expression register as calculator with floats?

On Nov 30, 3:46 am, Tim Chase <v...@tim.thechases.com> wrote:
> On 11/29/11 20:40, Ben Fritz wrote:
>
> > Starting at Vim 7.3, this also works with floating-point
> > math.
>
> Just as an aside, that should read "Vim 7.2" as detailed at
>
>   :help version-7.2
>
> (which happens to be what I'm running on my Debian box, and
> floats work fine there as the OP described).
>
> -tim

Thanks. I found it working in both Vim 7.2 and 7.3; but not in GVim
7.3 or 7.2. Does anyone have clue how to make it work in gvim?
It works in Vim 7.2, I type ctrl-r = 4.0/12.0 and get 0.333333
It doesn't work in GVim 7.2 (or 7.3), I type ctrl-r = 4.0/12.0 and get
E806: using Float as a String

/ Pauli

--
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: Conceal mecanism with more then one char

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: Scrolling Long Lines Revisited. Again.

On Wed, Nov 30, 2011 at 8:18 AM, John Beckett <johnb.beckett@gmail.com> wrote:
> James Cole wrote:
>>> This seems like a perennial topic[1], that regularly gets
>>> dismissed --
>>> vertically scrolling by "screen lines" vs. "real lines".
>>
>> I feel the same way.
>
> The problem is that the people who want scrolling fixed to make
> Vim usable with long lines are not the same as the few people
> who are capable of working out what changes would be required
> to the source.

What is the rationale for the current behaviour? Does anybody find
this way of scrolling long lines useful? Why? (asking only about how
the buffer moves, not how the cursor moves)

If somebody writes a patch to fix this, should they add a new option
for it, or make it part of the 'wrap' option?


--
Albin Olsson, IT Consultant and Classic Connoisseur
www.albinolsson.se | albin.olsson@gmail.com
+46 707 831 830

--
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, November 29, 2011

RE: expression register as calculator with floats?

John Little wrote:
>> Just be sure to specify floating point numbers even for any
>> integers involved, e.g. 59.0 instead of just 59.
>
> Why you make this proviso?
> F. ex., vim evaluates 59 + 37.5 as 96.5.

For safety: 4/12 is 0 but 4/12.0 is 0.333333.

Also, integer operations can overflow sooner.
On some systems, 123400*123400 is negative.

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: Scrolling Long Lines Revisited. Again.

James Cole wrote:
>> This seems like a perennial topic[1], that regularly gets
>> dismissed --
>> vertically scrolling by "screen lines" vs. "real lines".
>
> I feel the same way.

So do I, as I have recently done some editing of text where a
paragraph is a long line (possibly thousands of characters).

Particularly annoying is doing diffs with such files:
Vim does everything well, but when a change is near the end of a
long paragraph, it is impossible to see it due to scrolling.

The problem is that the people who want scrolling fixed to make
Vim usable with long lines are not the same as the few people
who are capable of working out what changes would be required
to the source.

In principle, donations to Bram's ICCF charity enable Vim
sponsorship with voting on wanted features:
http://www.vim.org/sponsor/index.php

However, there are already too many items and not enough
workers (Bram does 99.5% of the coding).

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: rating manipulations on www.vim.org have taken place


If throwing out old votes seems too drastic, maybe the votes
could be displayed according to their age, with totals computed
over the past 6 months, 1 year, or the entire history.

I didn't follow this thread to closely but IIRC some of those ratings could stem from clicks on search pages. For the period of time, GET was used (see another posting in this thread), some links in google results pointed to a link that would send a rating but not to the actual plugin page. A user most probably didn't even notice the difference -- I thus wouldn't necessarily assume abuse.

I wouldn't consider removing old ratings (or yearly cutting them down to 50%) a problem. It would rather help to weed out outdated scripts.

Regards,
Tom

--
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: expression register as calculator with floats?

On Nov 30, 3:40 pm, Ben Fritz <fritzophre...@gmail.com> wrote:
>
> Just be sure to specify floating point numbers even for any integers involved,
> e.g. 59.0 instead of just 59.

Why you make this proviso? F. ex., vim evaluates 59 + 37.5 as 96.5.

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: expression register as calculator with floats?

On 11/29/11 20:40, Ben Fritz wrote:
> Starting at Vim 7.3, this also works with floating-point
> math.

Just as an aside, that should read "Vim 7.2" as detailed at

:help version-7.2

(which happens to be what I'm running on my Debian box, and
floats work fine there as the OP described).

-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: expression register as calculator with floats?

On Nov 29, 1:35 pm, pauli baadsager <pauli.baadsa...@gmail.com> wrote:
> I often use the expression register to make simple calculations in
> vim. Eg. in insert mode I  type "Ctrl-r = 59 + 38" to get the result
> 97 in my text, but this works fine for integers only.  Is there a way
> to use this feature with digital numbers as well? Like "Ctrl-r = 59.4
> + 37.5" to get the result 96.9 in the text.
>
> Kind regards
> Pauli

Starting at Vim 7.3, this also works with floating-point math. Just be
sure to specify floating point numbers even for any integers involved,
e.g. 59.0 instead of just 59. See :help floating-point-format.

Vim even provides a wide variety of functions for working with these
floating-point numbers. See :help float-functions.

--
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: Why I'm not switching to command mode?

After some retries I figure out command that does the thing I want:

snoremap <C-C> <ESC>gv"*ygv<ESC>

Few lessons learned:
1) if vnoremap is used I'm not able to return to command mode for some reason
2) first esc goes to command mode
3) gv restores selection and goes to the visual mode
4) "*y copies selection to windows clipboard
5) second gv<ESC> is used to go to command mode with preserving cursor position.

The question is - could this command be written easier?

-- Alexander


On Tue, Nov 29, 2011 at 1:02 PM, Alex Kostikov <alex.kostikov@gmail.com> wrote:
> I want Ctrl+C to copy selected text to clipboard and switch to command
> mode.
> The line bellow populates clipboard but doesn't do the switching to
> command mode. Why?
>
> vnoremap <C-c> "+y<ESC>
>
> -- Alexander
>
>

--
Alexander Kostikov

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

savevers script not saving numbered backups

I'm running the savevers script
(http://www.vim.org/scripts/script.php?script_id=89) but I'm not
getting the expected numbered backups. These are the only backup
related commands in my .vimrc:

set backupdir=$HOME/.backups
set savevers_types='*'
set savevers_max=9999
set savevers_purge=1
set savevers_dirs=&backupdir
set patchmode=.bu

In fact, I am getting no backups at all!

$HOME shows as /Users/Chris -- which is as expected. I have the
directory /Users/Chris/.backups created but it remains empty.

Any idea how to troubleshoot this?

c
--
Chris Lott

--
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: bubblegum -- a vim color scheme based on xoria256

It looks nice in a 256color terminal for me, although i don't think I'd use it for coding.

It is well.. retina scorching in gvim though.

--
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: bubblegum -- a vim color scheme based on xoria256

Chris Lott, Tue 2011-11-29 @ 13:58:17-0900:
> It doesn't work for me either... my background stays light. If I
> manually set it to black, much of the text and vim separator between
> windows (and cursor) don't show up. I'm a newbie, so maybe I'm missing
> something more than :colorscheme bubblegum

It's a 256-color terminal color scheme, so it probably doesn't work in
Gvim. That may be your problem.

It works fine for me in terminal Vim, but I'm not personally a fan of
the extremely low contrast between colors.

Re: Now there's a band

Am 29.11.2011 22:49, schrieb Bram Moolenaar:
>
> John Little wrote:
>
>> My local college radio mentioned vim today... but not our favourite
>> editor.
>>
>> http://vimband.com/
>
> Performing Sunday, May 6. Ehm, what year is that?

2007.

Or 2001. Or 1990 ...

--
Andy

--
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: bubblegum -- a vim color scheme based on xoria256

On Tue, Nov 29, 2011 at 12:34 PM, Matteo Landi <matteo@matteolandi.net> wrote:
>> https://github.com/baskerville/bubblegum
>
> PS
> I tried it and it doesn't look so good but I guess there are some
> problems with my .vimrc...

It doesn't work for me either... my background stays light. If I
manually set it to black, much of the text and vim separator between
windows (and cursor) don't show up. I'm a newbie, so maybe I'm missing
something more than :colorscheme bubblegum

c
--
Chris Lott

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

Coverity errorformat?

I use Coverity at work (http://www.coverity.com, the same company
whose flagship product has been used on a large number of open-source
projects over the past few years, including Vim: http://scan.coverity.com/),
and recently found out about the cov-format-errors command. Normally
Coverity finds a bunch of potential defects which are then committed
to a central server where all users can view them. The cov-format-
errors command allows you to export all the defects found in a given
analysis into a gcc-like format.

But it's not gcc-like enough for Vim! I'm wondering if anyone has a
compiler plugin/errorformat definition they've found or made for the
cov-format-errors command? Here's a small sample of the output, from
analyzing a portion of some version of the GLU library we link into
our software:

Error: MISSING_RETURN:
/accts/btfritz/coverity/derived_models/glu/Mesa3-5/si-glu/libtess/
sweep.c:256:
missing_return: Arriving at the end of a function without returning a
value.
Error: RESOURCE_LEAK:
/accts/btfritz/coverity/derived_models/glu/Mesa3-5/si-glu/libtess/
mesh.c:282:
alloc_fn: Calling allocation function "allocFace".
/accts/btfritz/coverity/derived_models/glu/Mesa3-5/si-glu/libtess/
mesh.c:58:
alloc_fn: Storage is returned from allocation function "malloc".
/accts/btfritz/coverity/derived_models/glu/Mesa3-5/si-glu/libtess/
mesh.c:58:
return_alloc_fn: Directly returning storage allocated by "malloc".
/accts/btfritz/coverity/derived_models/glu/Mesa3-5/si-glu/libtess/
mesh.c:282:
var_assign: Assigning: "newFace" = storage returned from
"allocFace()".
/accts/btfritz/coverity/derived_models/glu/Mesa3-5/si-glu/libtess/
mesh.c:294:
leaked_storage: Variable "newFace" going out of scope leaks the
storage it points to.
Error: USE_AFTER_FREE:
/accts/btfritz/coverity/derived_models/glu/Mesa3-5/si-glu/libtess/
dict.c:72:
alias: Assigning: "node" = "dict->head.next". Now both point to the
same storage.
/accts/btfritz/coverity/derived_models/glu/Mesa3-5/si-glu/libtess/
dict.c:73:
freed_arg: "free" frees "node".
/accts/btfritz/coverity/derived_models/glu/Mesa3-5/si-glu/libtess/
dict.c:72:
deref_after_free: Dereferencing freed pointer "node".

Later this week if nobody knows of a ready-made solution, I'll
probably piece together an errorformat string on my own. But I figure
I'll save the effort if somebody already has it done 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: Now there's a band

John Little wrote:

> My local college radio mentioned vim today... but not our favourite
> editor.
>
> http://vimband.com/

Performing Sunday, May 6. Ehm, what year is that?

--
$ echo pizza > /dev/oven

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.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: bubblegum -- a vim color scheme based on xoria256

On Tue, Nov 29, 2011 at 9:18 PM, Bastien Dejean <nihilhill@gmail.com> wrote:
> Hi,
>
> https://github.com/baskerville/bubblegum

Hi,
why don't you show us how the theme behaves with source code?


Regards,
Matteo

PS
I tried it and it doesn't look so good but I guess there are some
problems with my .vimrc...

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

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

Why I'm not switching to command mode?

I want Ctrl+C to copy selected text to clipboard and switch to command
mode.
The line bellow populates clipboard but doesn't do the switching to
command mode. Why?

vnoremap <C-c> "+y<ESC>

-- Alexander

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

bubblegum -- a vim color scheme based on xoria256

Hi,

https://github.com/baskerville/bubblegum

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

expression register as calculator with floats?

I often use the expression register to make simple calculations in
vim. Eg. in insert mode I type "Ctrl-r = 59 + 38" to get the result
97 in my text, but this works fine for integers only. Is there a way
to use this feature with digital numbers as well? Like "Ctrl-r = 59.4
+ 37.5" to get the result 96.9 in the text.

Kind regards
Pauli

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

Don't repeat change that is not a change

Sometimes I accidentally enter insert mode and then
exit it, this causes . command to reset.. Is there
any way to tell vim that, if there was no change,
it does not count as "last change"? -ak

--
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: vim slow running latex files

On 19:22 Mon 28 Nov , Jonatas Eduardo Cesar wrote:
> I'm using vim with a bunch of plugins ( pathogen, ctags, snipmate,
> supertab,... ), and everything works fine for all kinds of file extensions.
>
> However, when I'm try to edit .tex files it presents two problems which
> seem related. First, vim starts to work really slow, and second, when I
> press "any letter" + <tab>,
> it tries to auto-complete with words previously written in the text.
Check the output of "verbose imap <tab>". It should point you to the place
where the imap is defined.

Best,
Marcin
>
> One way which I tried to solve those issues, is by removing the supertab
> plugin from my bundle folder, but it's a not satisfactory solution.
>
> --
> Jônatas Eduardo
>
> --
> 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: Conceal mecanism with more then one char

yogsototh wrote:
> Hi all,
>
> I'd like to display "->" with "→ " in haskell files.
>
> But I have the impression the conceal mechanism only work to replace
> "->" by one character.
> An undesirable effect is a visually bad indentation.
>
> Is there a way to achieve this?
>

Yes -- place the following lines into $HOME/.vim/after/syntax/haskell.vim:

syn match HaskPointer '->'
contains=HaskPointerOne,HaskPointerTwo containedin=hsOperator
syn match HaskPointerOne '-' conceal contained cchar=→
syn match HaskPointerTwo '>' conceal contained cchar=

Note that that last cchar= is actually followed by a space; ie. "cchar=
", NOT "cchar=".

Regards,
Chip Campbell

--
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: vim slow running latex files

Christian Brabandt wrote:
> Please don't top poste.
>
> On Tue, November 29, 2011 1:34 pm, Jonatas Eduardo Cesar wrote:
>
>> You are right, when i turn off the syntax hilighting vim works with normal
>> speed and I still can use some snippets.
>> Nevertheless, is there another way to speed-up vim without turn off the
>> syntax hilighting?
>> It is one of the main reasons I use vim...
>>
> Are you using syntax based folding? It's known to cause delays and
> this issue has come up several times now.
>
> See
> http://vimhelp.appspot.com/vim_faq.txt.html#faq-29.7
> http://vim.wikia.com/wiki/Keep_folds_closed_while_inserting_text
>
Try reading:

:he tex-slow
:he tex-folding

If you don't have the latter help on tex-folding, basically its telling
you to use faq-29.7 like CB mentioned above.

Regards,
Chip Campbell

--
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: Scrolling Long Lines Revisited. Again.

> This seems like a perennial topic[1], that regularly gets dismissed --
> vertically scrolling by "screen lines" vs. "real lines".
>
> [...]


I feel the same way.

Back in the mid-90s when I was doing my IT degree I heard about Vim
(or maybe it was vi) and the idea of it really appealed to me. I
tried hard to get into it but I ended up getting really frustrated by
its scrolling behavior and I ended up giving up.

Then and now, I find the random jumps jarring and (quite literally)
stressful.

Then, a few years ago, I decided to bite the bullet and try getting
into Vim again. I spent many hours going through the user manual and
learning about how to configure Vim to my needs.

In the end I figured out that I could use

set textwidth=75
set formatoptions+=a

to automatically break lines at 75 chars, and thus give me scroll-by-
screen-line. (it's not an ideal solution, but it's enough to get by
with). But the thing is that I had to devote a lot of time and effort
to figuring this out.

(And just to note, 'gj' and 'gk' are mentioned sometimes in the
context of this issue, but they are not a solution. They move the
position of the cursor down one screen-line, but they do not cause
scrolling to happen one screen-line at a time. They still cause the
random jumps)


A common response to requests for scroll-by-screen-line seems to be
that Vim is meant for writing code and for working with short lines.

I think this assumes that there's some disadvantage or trade-off
involved with having scroll-by-screen-line. I don't think that's the
case. I don't see why there couldn't be an option for how scrolling
works: set it one way to have scroll-by-logical-line, set it another
way to have scroll-by-screen-line.

Having scroll-by-screen-line would have *zero* effect on those that
don't want it, while being very useful for those who do want it. (of
course, adding this feature would require time and effort from people
volunteering their time, and I don't want to ignore that fact).

I think another thing that it's important to keep in mind is that
there's a kind of Survivorship bias (http://en.wikipedia.org/wiki/
Survivorship_bias) at work here, in that everyone here is someone who
continues to use Vim, so for whom this scrolling behavior is not a
huge deal.

But I would suggest that there's a lot of people who have been put off
Vim because of this scrolling behavior.

I think this is more likely to happen with people using Vim to write
prose, where you tend to get really long lines (paragraphs) so the
scrolling tends to be quite jumpy.

In a forum like this one, you're not likely to hear the voices of the
people who decided to not use Vim for this reason.

I think it's a real shame if the result is that a lot of people are
missing out on Vim.

You might say that it's not meant for people like them. But why can't
it be? The wonderful power of Vim is just as useful for things like
writing prose as it is for writing code (I use it for both). The idea
of having one editor for code and one for prose seems crazy to me - it
means you have to double up on your efforts to learn and configure
them, and there's the mental overhead of switching between the
different ways of navigating and so forth in each. It's much better
to be able to use Vim for both.

--
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: vim slow running latex files

Please don't top poste.

On Tue, November 29, 2011 1:34 pm, Jonatas Eduardo Cesar wrote:
> You are right, when i turn off the syntax hilighting vim works with normal
> speed and I still can use some snippets.
> Nevertheless, is there another way to speed-up vim without turn off the
> syntax hilighting?
> It is one of the main reasons I use vim...

Are you using syntax based folding? It's known to cause delays and
this issue has come up several times now.

See
http://vimhelp.appspot.com/vim_faq.txt.html#faq-29.7
http://vim.wikia.com/wiki/Keep_folds_closed_while_inserting_text

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: vim slow running latex files

You are right, when i turn off the syntax hilighting vim works with normal speed and I still can use some snippets. 
Nevertheless, is there another way to speed-up vim without turn off the syntax hilighting?
It is one of the main reasons I use vim...  

On Tue, Nov 29, 2011 at 6:13 AM, shawn wilson <ag4ve.us@gmail.com> wrote:


On Nov 29, 2011 12:32 AM, "Jonatas Eduardo Cesar" <jonataseduardo@gmail.com> wrote:
>

> However, when I'm try to edit .tex files it presents two problems which seem related. First, vim starts to work really slow, and second, when I press "any letter" + <tab>,
>  it tries to auto-complete with words previously written in the text.
>

First try turning off syntax hilighting. That is probably the speed issue.

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



--
Jônatas Eduardo

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

Conceal mecanism with more then one char

Hi all,

I'd like to display "->" with "→ " in haskell files.

But I have the impression the conceal mechanism only work to replace "->" by one character.
An undesirable effect is a visually bad indentation.

Is there a way to achieve this?

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

Now there's a band

Hi all

My local college radio mentioned vim today... but not our favourite
editor.

http://vimband.com/

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: libcall and dll problem

You can get and store the handoe of library to variable in vimscript.

-------- mylib.dll --------
char buf[256];
char*
libopen(char* libname) {
  sprintf(buf, "%p", dlopen(libname, RTLD_LAZY)); // If win, use LoadLibrary()
  return buf;
}

libclose(char* p) {
  void* handle = NULL;
  sscanf("%p", &handle);
  dlclose(handle); // If win, use FreeLibrary()
}

libcall(char* handle, char* func, char* arg) {
  void* handle = NULL;
  sscanf("%p", &handle);
  // do it something  
}
-------- mylib.vim --------
function! libopen(libname)
  return libcall("mylib.dll", "libopen", a:libname)
endfunction

function! libclose(handle)
  call libcall("mylib.dll", "libclose", a:handle)
endfunction

let handle = libopen("otherlib.dll")
" do it something.
call libclose(handle)
------------------------

If you want to call Windows APIs simplely, below may become your help. :)

https://github.com/mattn/libcallex-vim


--
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: vim slow running latex files


On Nov 29, 2011 12:32 AM, "Jonatas Eduardo Cesar" <jonataseduardo@gmail.com> wrote:
>

> However, when I'm try to edit .tex files it presents two problems which seem related. First, vim starts to work really slow, and second, when I press "any letter" + <tab>,
>  it tries to auto-complete with words previously written in the text.
>

First try turning off syntax hilighting. That is probably the speed issue.

--
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, November 28, 2011

libcall and dll problem

Hi,

I am using libcall api from gvim in order to call functions of dll
but.

1/ I would like to do first libcall to instantiate one object and this
one has to persist (init com object)
2/ Retrieve pointer of this object during another libcall of the same
dll and make read/write tasks
3/ Closing correclty the object


It is not a file, it is like


1/ opening a socket and connecting to it
2/ read/write
3/ closing the socket

I don't know if it is possible using three libcall() independently ?

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

Scrolling Long Lines Revisited. Again.

This seems like a perennial topic[1], that regularly gets dismissed --
vertically scrolling by "screen lines" vs. "real lines".

In addition to casting yet another vote to get this feature added, I
would just like to remind users that there is a "compelling advantage"
to having this ability, best described IMHO in Paul Tremblay's 2001
post below -- since reading/writing long-lines is almost unbearable --
I often get disoriented, and stressed when the display jerks up/down
random distances. (Yes, ideally we probably should be working with
short lines, but long-lines inevitably crop up in numerous places.)

Although, I think Vim *already* can do this, if the line is long
enough to fill the entire display! So, I would blindly speculate,
implementing proper screen-line scrolling shouldn't be too hard? :P


[1]

2001 "scrolling long lines":
http://marc.info/?l=vim&m=100485909423627&w=2

2002 "smooth scroll":
http://marc.info/?l=vim&m=102468968303594&w=2

2005 "how to view a long line":
http://marc.info/?l=vim&m=111466655128136&w=2

2009 "can vim jump line by screen-line":
http://groups.google.com/group/vim_use/browse_thread/thread/85318546ec889513/73ac449d902662e6

2010 "long lines and scrolling":
http://groups.google.com/group/vim_use/browse_thread/thread/ed77cb8d39ff1bbf/31d252de859a80d5

--
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: Synchronizing or merging undo across platforms

Christian Brabandt wrote:

> On So, 27 Nov 2011, Bram Moolenaar wrote:
>
> >
> > Christian Brabandt wrote:
> >
> > > On Wed, November 16, 2011 9:38 pm, Paul wrote:
> > > > On Nov 16, 1:42 am, "Christian Brabandt" <cbli...@256bit.org> wrote:
> > > >
> > > >> Well, first check that
> > > >> :echo undofile(@%) points to the same undofile across each platform.
> > > >
> > > > Aha, thanks. That helped me determine that my Vim silently ignores me
> > > > when I try to set relative directories for undodir.
> > > >
> > > > :set undodir=. works fine, but no undo file is created when I :set
> > > > undodir=./undodir
> > > >
> > > > This seems to be a different behavior than that of backupdir, even
> > > > though :help undodir says "See |'backupdir'| for details of the
> > > > format." Is this expected/documented/fixable?
> > >
> > > Hm, setting 'undodir' to a relative directory works for me. I can't
> > > reproduce this. However there is a bug when using rundo with those
> > > files.
> > >
> > > When using a separate 'undodir' directory to store the undofiles, Vim
> > > uses the complete path of the file as filename, replacing the path
> > > separators ('/') by '%'. So far this works as documented by :h
> > > 'undodir'.
> > >
> > > Now when using :rundo with a filename, that contains the complete path
> > > and using '%' as directory separators, those '%' will be replaced by
> > > the current file name (as documented by :h filename-modifiers) and
> > > surprise surprise Vim won't be able to read the undofile.
> > >
> > > So this is just plain wrong in this case. So here is a patch, that
> > > fixes that. This applies only to :rundo and I am not sure, whether
> > > this should also apply to :wundo (I tend not to apply it there) but
> > > this should be kept in mind.
> > >
> > > Bram, please check and apply.
> >
> > In most places where you can use a file name % is expanded. And it's
> > also useful, especially in the form "%:h" to get the directory.
>
> I don't understand. Using '%' as path separators contradicts the usage
> your pointing out. How am I supposed to :rundo an undofile, that
> contains the '%'-separator?

Where does it say to use % for path separators? If you do you need to
escape them.

At ":help :wundo" it actually has a few examples of using %:h.

--
hundred-and-one symptoms of being an internet addict:
197. Your desk collapses under the weight of your computer peripherals.

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.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

vim slow running latex files

I'm using vim with a bunch of plugins ( pathogen, ctags, snipmate, supertab,... ), and everything works fine for all kinds of file extensions.

However, when I'm try to edit .tex files it presents two problems which seem related. First, vim starts to work really slow, and second, when I press "any letter" + <tab>,
 it tries to auto-complete with words previously written in the text.

One way which I tried to solve those issues, is by removing the supertab plugin from my bundle folder, but it's a not satisfactory solution.

--
Jônatas Eduardo

--
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: Substitution of text in keywords

...
> > I've written a function to standardise the case of keywords in my code,
> > however when I run it it's not just the keywords that are being changed
> > - text within quotes are also being changed e.g. in a message.
...
> there is a script called SrchRplcHiGrp.vim on the Vim web-site athttp://www.vim.org/scripts/script.php?script_id=848which might do what
> you want. (I haven't used it myself.)

Yes, it will do exactly what David Clark wants (and more).

David F.

--
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: How to customize CTRL-W CTRL-F?

On Sun, 27 Nov 2011, Peng Yu wrote:

> Hi,
>
> I want to customize the behavior of CTRL-W CTRL-F. For example, it is
> of the pattern #include <header.h>, I will search for C and C++ header
> file directories. If it is of the pattern import os, I'll search for
> python library directories for file os.py.
>
> More generally, it a line match for some pattern, I will call an
> external program (the program could be written as a vim function) to
> resolve the file to be opened.
>
> :help CTRL-W_f doesn't tell me how to customize it. Could anybody let
> me know how to do so? Thanks!

See:

:help 'include' -- 'inc' = how to determine a line might be an 'include'
:help 'includeexpr' -- 'inex' = how to transform that line into a filename

Generally, filetypes set up some minimal setup, usually enough to handle
files in the same directory or a subdir.

E.g. ft=python sets up:

include=s*\(from\|import\)
(which doesn't work... but that's a topic for a different thread)

and:
includeexpr=substitute(v:fname,'\.','/','g')

Obviously there are lots of cases where it could be improved, and it
often depends on the way a project is set up. Just wanted to point out
the simple setup already present. Most third-party ftplugins do this,
too. So, again, you might not have to do the work yourself.

If you do end up trying this on your own, this command is helpful:

:che! -- show all files detected as includes
:help :checkpath

--
Best,
Ben

--
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: Substitution of text in keywords

Hi Christian,

>Now how about something like this:
>:%s/\<and\>/\=synIDattr(synID(line('.'),col('.'),1),'name')=~'openroadS
trin>g'?submatch(0):'And'/g

That works great from the command line. :)

However, when I put it into my function it removes all instances of the
search field. Here's what I've got in my function...

:silent!
%s,\<and\>,\=synIDattr(synID(line('.')\,col('.')\,1)\,'name')=~'openroad
String'?submatch(0):"And",g

Regards
Dave


*****************************************************************************
This e-mail contains confidential information and is intended solely for use by the individual named or entity to whom it is addressed. Please notify the sender and postmaster@aviagen.com immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the named addressee, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Aviagen accepts no liability for the content of this e-mail and any consequences of actions taken in reliance on the contents, unless that information is subsequently confirmed in writing. Any views, opinions or actions presented in this e-mail are solely the author's and have not been approved by Aviagen. Any defamatory statements or infringing communication is contrary to Aviagen policy and outside the scope of the employment of the individual concerned. No employee or agent is authorized to conclude any binding agreement on behalf of Aviagen with another party by e-mail. Aviagen has taken reasonable precautions to ensure no viruses are present in this e-mail, but cannot accept responsibility for any loss or damage arising from the use of this e-mail or attachments.
*****************************************************************************

--
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: Synchronizing or merging undo across platforms

On Mon, November 28, 2011 4:39 pm, Benjamin Fritz wrote:
> Wouldn't you just escape the '%' characters? fnameescape() should do
> it for you I think. So you should just do:
>
> :exec "rundo" fnameescape(undofile(@%))

Yes, I think escape(undofile(@%), '%') will work.

Sorry for the noise,

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: NeoComplCache plugin set map to select from popup

=> On [2011-11-27 13:06:55 +0900]:
matsushita shougo Said:
> HI, I'm the author of neocomplcache.
>
> > I set NeoComplCache in my vimrc like this.
> > All of those are from help file of NeoComplCache.
> > I want to map <C-n>,<C-p> or <C-j>,<C-k> to select complete item from popup.
> > Does anybody knows how to set this ?
> > By the way, if you have good hints on my NeoComplCache setting. plese tell me.
> > I will apperciate it.
> > ( I know this setting is long, you can jump to map setting directly. )
> ...
> >
> >
> >        " Plugin key-mappings.
> >        " <CR>: close popup and save indent.
> >        inoremap <expr><CR>  neocomplcache#close_popup() . "\<CR>"
> >        " <TAB>: completion.
> >        inoremap <expr><TAB>  pumvisible() ? "\<C-n>" : "\<TAB>"
> >        " <C-h>, <BS>: close popup and delete backword char.
> >        inoremap <expr><C-h> neocomplcache#smart_close_popup()."\<C-h>"
> >        inoremap <expr><BS> neocomplcache#smart_close_popup()."\<C-h>"
> >        inoremap <expr><C-y>  neocomplcache#close_popup()
> >        inoremap <expr><C-e>  neocomplcache#cancel_popup()
> >        inoremap <expr><C-g>  neocomplcache#undo_completion()
> >        " FIXME use <C-n>, <C-p> or <C-j>, <C-k> to select from popup.
> >
>
> What's your problem?
> <C-n> and <C-p> are default mappings to select from popup.
I have found out the problem,
I set complete="w,b,t..." in vimrc, when I comment this line.
Then NeoComplCache can work with <C-n>,<C-p> now.
> <C-j> and <C-k> are not but you can mapping easily.
>
> inoremap <expr><C-j> "\<C-n>" : "\<C-j>"
> inoremap <expr><C-k> "\<C-p>" : "\<C-k>"
>
> --
> 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

--
>> stardiviner << =>GPG: 5D9F64D8 Twitter: @numbchild
http://stardiviner.dyndns-blog.com/author.html

Re: Synchronizing or merging undo across platforms

On Sun, Nov 27, 2011 at 11:31 PM, Christian Brabandt <cblists@256bit.org> wrote:
> Hi Bram!
>
> On So, 27 Nov 2011, Bram Moolenaar wrote:
>
>>
>> Christian Brabandt wrote:
>>
>> >
>> > When using a separate 'undodir' directory to store the undofiles, Vim
>> > uses the complete path of the file as filename, replacing the path
>> > separators ('/') by '%'. So far this works as documented by :h
>> > 'undodir'.
>> >
>> > Now when using :rundo with a filename, that contains the complete path
>> > and using '%' as directory separators, those '%' will be replaced by
>> > the current file name (as documented by :h filename-modifiers) and
>> > surprise surprise Vim won't be able to read the undofile.
>> >
>> > So this is just plain wrong in this case. So here is a patch, that
>> > fixes that. This applies only to :rundo and I am not sure, whether
>> > this should also apply to :wundo (I tend not to apply it there) but
>> > this should be kept in mind.
>> >
>> > Bram, please check and apply.
>>
>> In most places where you can use a file name % is expanded.  And it's
>> also useful, especially in the form "%:h" to get the directory.
>
> I don't understand. Using '%' as path separators contradicts the usage
> your pointing out. How am I supposed to :rundo an undofile, that
> contains the '%'-separator?
>

Wouldn't you just escape the '%' characters? fnameescape() should do
it for you I think. So you should just do:

:exec "rundo" fnameescape(undofile(@%))

--
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: rating manipulations on www.vim.org have taken place

Excerpts from Michael Henry's message of Mon Nov 28 14:34:16 +0100 2011:
> If throwing out old votes seems too drastic, maybe the votes
> could be displayed according to their age, with totals computed
> over the past 6 months, 1 year, or the entire history.
Or assigned to script versions? We have upload datum of those.

Maybe it would be enough hot display all votings - then people can judge
whether abuse has taken place.

Yes - captchas would be a solution as well.

Marc Weber

--
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: rating manipulations on www.vim.org have taken place

On 11/27/2011 11:06 PM, Marc Weber wrote:
> In an older thread we've already discussed the option to decay votings
> slowly - new version may no longer suffer from issues of older versions.

If throwing out old votes seems too drastic, maybe the votes
could be displayed according to their age, with totals computed
over the past 6 months, 1 year, or the entire history.

Michael Henry

--
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: Synchronizing or merging undo across platforms

On 28/11/11 06:31, Christian Brabandt wrote:
> Hi Bram!
>
> On So, 27 Nov 2011, Bram Moolenaar wrote:
>
>>
>> Christian Brabandt wrote:
>>
>>> On Wed, November 16, 2011 9:38 pm, Paul wrote:
>>>> On Nov 16, 1:42 am, "Christian Brabandt"<cbli...@256bit.org> wrote:
>>>>
>>>>> Well, first check that
>>>>> :echo undofile(@%) points to the same undofile across each platform.
>>>>
>>>> Aha, thanks. That helped me determine that my Vim silently ignores me
>>>> when I try to set relative directories for undodir.
>>>>
>>>> :set undodir=. works fine, but no undo file is created when I :set
>>>> undodir=./undodir
>>>>
>>>> This seems to be a different behavior than that of backupdir, even
>>>> though :help undodir says "See |'backupdir'| for details of the
>>>> format." Is this expected/documented/fixable?
>>>
>>> Hm, setting 'undodir' to a relative directory works for me. I can't
>>> reproduce this. However there is a bug when using rundo with those
>>> files.
>>>
>>> When using a separate 'undodir' directory to store the undofiles, Vim
>>> uses the complete path of the file as filename, replacing the path
>>> separators ('/') by '%'. So far this works as documented by :h
>>> 'undodir'.
>>>
>>> Now when using :rundo with a filename, that contains the complete path
>>> and using '%' as directory separators, those '%' will be replaced by
>>> the current file name (as documented by :h filename-modifiers) and
>>> surprise surprise Vim won't be able to read the undofile.
>>>
>>> So this is just plain wrong in this case. So here is a patch, that
>>> fixes that. This applies only to :rundo and I am not sure, whether
>>> this should also apply to :wundo (I tend not to apply it there) but
>>> this should be kept in mind.
>>>
>>> Bram, please check and apply.
>>
>> In most places where you can use a file name % is expanded. And it's
>> also useful, especially in the form "%:h" to get the directory.
>
> I don't understand. Using '%' as path separators contradicts the usage
> your pointing out. How am I supposed to :rundo an undofile, that
> contains the '%'-separator?

The path separator is % in 'undodir' but / in the operand of :rundo (see
the examples under ":help :rundo").

>
> #v+
> ~$ mkdir -p /tmp/undo
> ~$ vim -u NONE -U NONE -N -i NONE -c ':set undodir=/tmp/undo|set
> undofile|exe "wundo" undofile(@%)|q' ~/.vimrc
> ~$ vim -u NONE -U NONE -N -i NONE -c ':set undodir=/tmp/undo|set
> undofile|exe "verbose rundo" undofile(@%)' ~/.vimrc
> "~/.vimrc" 438L, 13769C
> Reading undo file: /tmp/undo/.vimrchome.vimrcchrisbra.vimrc.vim.vimrcvimrc
> Fehler beim Ausführen von "command line":
> E822: Cannot open undo file for reading: /tmp/undo/.vimrchome.vimrcchrisbra.vim
> rc.vim.vimrcvimrc
> #v-
>
> regards,
> Christian
>


Best regards,
Tony.
--
Burn's Hog Weighing Method:
(1) Get a perfectly symmetrical plank and balance it across a
sawhorse.
(2) Put the hog on one end of the plank.
(3) Pile rocks on the other end until the plank is again
perfectly balanced.
(4) Carefully guess the weight of the rocks.
-- Robert Burns

--
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: Substitution of text in keywords

Hi Dave,
(please don't top poste)

On Mon, November 28, 2011 10:04 am, Clark, David wrote:
> Using :echo synIDattr(synID(line('.'),col('.'),1), 'name') returns
> "openroadString".

Now how about something like this:
:%s/\<and\>/\=synIDattr(synID(line('.'),col('.'),1),'name')=~'openroadString'?submatch(0):'And'/g


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: Substitution of text in keywords

Hi Christian,

Using :echo synIDattr(synID(line('.'),col('.'),1), 'name') returns
"openroadString".

HTH
Dave

-----Original Message-----
From: vim_use@googlegroups.com [mailto:vim_use@googlegroups.com] On
Behalf Of Christian Brabandt
Sent: 27 November 2011 14:10
To: vim_use@googlegroups.com
Subject: Re: Substitution of text in keywords

Hi Clark,!

On Do, 24 Nov 2011, Clark, David wrote:

> Hi Christian,
>
> Thanks for the info...
>
> If I understand you correctly you're saying I should remove the
> exclamation mark and add an 'e' to the end of each line, e.g:
>
> :silent %s,\<and\>,And,ge
>
> Also, the syntax file I'm using has lots of syntax keyword groups and
an
> individual item may exist in any one of them. However, what I'm trying
> to achieve is not to change items which are between quotes - can you
> advise what the syntax should be for this?

If you put the cursor on a keyword in quotes and enter
:echo synIDattr(synID(line('.'),col('.'),1), 'name')

What does Vim output?

Also, if you only want to exclude items in quotes, one might be able to
construct a better RE for you.

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


*****************************************************************************
This e-mail contains confidential information and is intended solely for use by the individual named or entity to whom it is addressed. Please notify the sender and postmaster@aviagen.com immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the named addressee, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Aviagen accepts no liability for the content of this e-mail and any consequences of actions taken in reliance on the contents, unless that information is subsequently confirmed in writing. Any views, opinions or actions presented in this e-mail are solely the author's and have not been approved by Aviagen. Any defamatory statements or infringing communication is contrary to Aviagen policy and outside the scope of the employment of the individual concerned. No employee or agent is authorized to conclude any binding agreement on behalf of Aviagen with another party by e-mail. Aviagen has taken reasonable precautions to ensure no viruses are present in this e-mail, but cannot accept responsibility for any loss or damage arising from the use of this e-mail or attachments.
*****************************************************************************

--
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, November 27, 2011

Re: rating manipulations on www.vim.org have taken place

On Mon, Nov 28, 2011 at 05:06, Marc Weber wrote:
> Alternatives? Force login? ...

Maybe a captcha system could be integrated?

--
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: Synchronizing or merging undo across platforms

Hi Bram!

On So, 27 Nov 2011, Bram Moolenaar wrote:

>
> Christian Brabandt wrote:
>
> > On Wed, November 16, 2011 9:38 pm, Paul wrote:
> > > On Nov 16, 1:42 am, "Christian Brabandt" <cbli...@256bit.org> wrote:
> > >
> > >> Well, first check that
> > >> :echo undofile(@%) points to the same undofile across each platform.
> > >
> > > Aha, thanks. That helped me determine that my Vim silently ignores me
> > > when I try to set relative directories for undodir.
> > >
> > > :set undodir=. works fine, but no undo file is created when I :set
> > > undodir=./undodir
> > >
> > > This seems to be a different behavior than that of backupdir, even
> > > though :help undodir says "See |'backupdir'| for details of the
> > > format." Is this expected/documented/fixable?
> >
> > Hm, setting 'undodir' to a relative directory works for me. I can't
> > reproduce this. However there is a bug when using rundo with those
> > files.
> >
> > When using a separate 'undodir' directory to store the undofiles, Vim
> > uses the complete path of the file as filename, replacing the path
> > separators ('/') by '%'. So far this works as documented by :h
> > 'undodir'.
> >
> > Now when using :rundo with a filename, that contains the complete path
> > and using '%' as directory separators, those '%' will be replaced by
> > the current file name (as documented by :h filename-modifiers) and
> > surprise surprise Vim won't be able to read the undofile.
> >
> > So this is just plain wrong in this case. So here is a patch, that
> > fixes that. This applies only to :rundo and I am not sure, whether
> > this should also apply to :wundo (I tend not to apply it there) but
> > this should be kept in mind.
> >
> > Bram, please check and apply.
>
> In most places where you can use a file name % is expanded. And it's
> also useful, especially in the form "%:h" to get the directory.

I don't understand. Using '%' as path separators contradicts the usage
your pointing out. How am I supposed to :rundo an undofile, that
contains the '%'-separator?

#v+
~$ mkdir -p /tmp/undo
~$ vim -u NONE -U NONE -N -i NONE -c ':set undodir=/tmp/undo|set
undofile|exe "wundo" undofile(@%)|q' ~/.vimrc
~$ vim -u NONE -U NONE -N -i NONE -c ':set undodir=/tmp/undo|set
undofile|exe "verbose rundo" undofile(@%)' ~/.vimrc
"~/.vimrc" 438L, 13769C
Reading undo file: /tmp/undo/.vimrchome.vimrcchrisbra.vimrc.vim.vimrcvimrc
Fehler beim Ausführen von "command line":
E822: Cannot open undo file for reading: /tmp/undo/.vimrchome.vimrcchrisbra.vim
rc.vim.vimrcvimrc
#v-

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