sc | 1 May 01:39 2010
Picon

Re: vim wired usage issue that need help

On Friday 30 April 2010 10:13:26 am C. Jiang wrote:

> I am running Windows 7. In it I run a VMware (Fedora linux)
>  where my projects files are. I mapped the projects folder in
>  windows 7.  The Vim is installed on windows 7 and I can use
>  the mouse to point a file and right click mouse and in the
>  popup menu, use 'Edit with Vim', 'Edit with existing vim -
>  myopenedfile.txt'.
> 
> The issue is:
> 
> If i open just one file, or open files one by one, ':pwd' in
>  vim will show me the correct path where the current file is;
> 
> But if I highlight 2 or more files and right click and open
>  them with 'open with a single vim', after I check ':pwd' in
>  vim, it shows c:\windows\system32.
> 
> Since my tags for the projects is in the top directory of the
> projects, vim won't find the tag file any more.

the simplest will be to

    :set autochdir

in your _vimrc, although this setting has its detractors, and 
some plugins misbehave with it set, or did in the past -- i edit 
files all over the place and have come to rely on the fact that 
no matter where i am, :pwd is always current to the file i am 
editing
(Continue reading)

Nathan Neff | 1 May 01:59 2010
Picon

Syntax - Highlight TODO w/ Matchgroup

I'm trying to highlight "org-mode" files similar to what's shown here:
http://orgmode.org/img/tasks.png

I found a good start by using "outline.vim" from vim.org.

Now, I'm having problems highlighting the TODO keyword
in a different color than the color of the header.

Example:

* TODO Something

The TODO above should be higlighted differently than the other items
in that line.

Here's what I have so far:
--------------------
syn region Outline_1 matchgroup=Outline_1_match contains=Todo transparent
            \ start='^\*.*'
            \ end='\n\ze\n\?\*[^*]\|^<$'
            \ fold keepend

syn keyword Todo TODO contained

hi! default link Outline_1_match Comment
hi! default link Outline_1 Text
---------------------
I need "matchgroup"since I want to highlight the top TODO
line, but nothing else in that paragraph.

(Continue reading)

Gary Johnson | 1 May 02:01 2010

Re: Backups not created

On 2010-04-30, Ritmo2k wrote:
> With an empty .vimrc or one with just "set backup" in it, or
> typing :set backup, I can't get a backup file created on any
> of my CentOS 5 servers. It used to work and has recently stopped
> on all of them?
> 
> A strace on a remote hosting chroot running an older version of Centos
> shows it working as expected but on any of my servers it never
> attempts a write of the file anywhere?

My guess is that your newer Centos comes with a system vimrc that
contains some setting that's interfering with your backups.

One way to check this is to execute

    :scriptnames

and look for a system vimrc being sourced.  It might be
/etc/vimrc or /usr/share/vim/vimrc.  See

    :help system-vimrc

for more on this file and

    :help startup

for the details of what Vim does at startup.  If you see such a
file, you can open it and see if it contains anything suspicious.
You can also see the current values of options whose setting differ
from the default by executing
(Continue reading)

stosss | 1 May 04:17 2010
Picon

Yank range ?

I went to :he y and I see:

:[range]y[ank] [x]	Yank [range] lines [into register x].

so I do:

:'y,'zy"c

It did not give me an error, but when I type:

"cP

I don't get what I yanked.

What I am doing wrong?
What register is my yanked text in?

-- 
If we can but prevent the government from wasting the labours of the
people, under the pretence of taking care of them, they must become
happy. - Thomas Jefferson

--

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

sc | 1 May 04:46 2010
Picon

Re: Yank range ?

On Friday 30 April 2010 9:17:57 pm stosss wrote:

> I went to :he y and I see:
> :[range]y[ank] [x]	Yank [range] lines [into register x].
> 
> so I do:
> :'y,'zy"c
> 
> It did not give me an error, but when I type:
> 
> "cP
> 
> I don't get what I yanked.
> 
> What I am doing wrong?
> What register is my yanked text in?

i think it'll be in the un-named register (")

i think what you wanted to do was

    :'y,'zyc

if you want it in register c

sc

--

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
(Continue reading)

stosss | 1 May 04:57 2010
Picon

Re: Yank range ?

On Fri, Apr 30, 2010 at 10:46 PM, sc <toothpik <at> swbell.net> wrote:
> On Friday 30 April 2010 9:17:57 pm stosss wrote:
>
>> I went to :he y and I see:
>> :[range]y[ank] [x]    Yank [range] lines [into register x].
>>
>> so I do:
>> :'y,'zy"c
>>
>> It did not give me an error, but when I type:
>>
>> "cP
>>
>> I don't get what I yanked.
>>
>> What I am doing wrong?
>> What register is my yanked text in?
>
> i think it'll be in the un-named register (")

Yes typing P dumped my text into the file.

> i think what you wanted to do was
>
>    :'y,'zyc

This produced the E492 error

So how does range yank into a named register work?

(Continue reading)

AK | 1 May 04:54 2010
Picon

Keeping screen position

I don't like when I'm jumping between two files and if I need to edit a
line at the bottom and see some text at the top, vim re-centers screen
after ctrl-^ so I have to scroll again. I made a little mapping that
remembers and restores screen:

nnoremap <silent> <c-^> msHmt<c-^>:normal! 'tzt`s<CR>

It works great nearly always but on a rare occasion, it seems like it
jumps to the top of file. Or a couple screenfuls up, or something like
that. It happens rarely enough that I can't figure out what causes this
and yet often enough to be annoying; and it always happens when I'm too
busy with something else to investigate.

I'm hoping someone here might be able to spot the problem with this
mapping. Much thanks in advance!

--

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

stosss | 1 May 05:00 2010
Picon

Re: Yank range ?

On Fri, Apr 30, 2010 at 10:57 PM, stosss <stosss <at> gmail.com> wrote:
> On Fri, Apr 30, 2010 at 10:46 PM, sc <toothpik <at> swbell.net> wrote:
>> On Friday 30 April 2010 9:17:57 pm stosss wrote:
>>
>>> I went to :he y and I see:
>>> :[range]y[ank] [x]    Yank [range] lines [into register x].
>>>
>>> so I do:
>>> :'y,'zy"c
>>>
>>> It did not give me an error, but when I type:
>>>
>>> "cP
>>>
>>> I don't get what I yanked.
>>>
>>> What I am doing wrong?
>>> What register is my yanked text in?
>>
>> i think it'll be in the un-named register (")
>
> Yes typing P dumped my text into the file.
>
>> i think what you wanted to do was
>>
>>    :'y,'zyc
>
> This produced the E492 error
>
> So how does range yank into a named register work?
(Continue reading)

Charles E Campbell Jr | 1 May 04:44 2010

Re: Strange problem with netrw in vim 7.2 windows

Jack Donohue wrote:
> I use the x (execute) command a lot
>
> " Netrw Directory Listing                                        
> (netrw v132)
> "   Sorted by time
> "   Quick Help: <F1>:help  -:go up dir  D:delete  R:rename  s:sort-by 
> x:exec
> " 
> ============================================================================ 
>
>
> Works fine in vim70, but I recently changed to vim 7.2 and I sometime 
> get this:
>
> Press <cr> to continue
>
> instead of opening the file with the file association.  I'm running 
> Windows XP SP 3
>
> Any ideas what's wrong?
Does increasing your cmdheight option help?  (:set ch=2)

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
(Continue reading)

Ritmo2k | 1 May 05:10 2010
Picon

Re: Backups not created

> My guess is that your newer Centos comes with a system vimrc that
> contains some setting that's interfering with your backups.
>
> One way to check this is to execute
>
>     :scriptnames
>
> and look for a system vimrc being sourced.  It might be
> /etc/vimrc or /usr/share/vim/vimrc.  See
>
>     :help system-vimrc
>
> for more on this file and
>
>     :help startup
>
> for the details of what Vim does at startup.  If you see such a
> file, you can open it and see if it contains anything suspicious.
> You can also see the current values of options whose setting differ
> from the default by executing
>
>     :set
>
> Unfortunately, I'm not familiar with all the options that can affect
> backups, but
>
>     :help 07.4
>
> seems to explain them pretty well.  You can also execute
>
(Continue reading)