Wednesday, June 1, 2011

expand "(" doesn't work

hi,

doesn't expand("<cword>") work if the cursor is under "(".
it works for ")" though. any reason for this ?
i am running vim 7.0

thanks
sinbad

--
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: Weird auto-comment after 72 lines

Try :help cinoptions (specifically, the *N value for which the help says:

    *N    Vim searches for unclosed comments at most N lines away.  This
          limits the time needed to search for the start of a comment.
          (default 30 lines).

I think that the help may be out of date, because the code (in get_c_indent(), misc1.c) has

    int ind_maxcomment = 70;

which would explain the 72-line behavior (it searches back 70 lines for the start of the comment, so line 71 works as expected, and line 72 doesn't.)

On Tue, May 31, 2011 at 9:44 PM, Gary Johnson <garyjohn@spocom.com> wrote:
On 2011-05-31, Fab wrote:
> Hi,
> I'm reporting a very strange behavior I have only noticed today on
> vim.
> If you open a C file (vim foo.c) and enter this text:
> /*
> then press ENTER
> vim will automatically align the comment and will insert automatically
> a space, star, space: ' * ' before every line.
>
> Unfortunately after 72 lines, this sort of convenient indentation
> capability stop working:
> vim insert only a star (no spaces), and sometimes (if previous text
> has some sort of indentation, it insert several spaces)
>



--
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: Restore file from undo

On Tue, May 31, 2011 9:35 pm, Vsevolod Velichko wrote:
> 2011/5/31 Christian Brabandt <cblists@256bit.org>:
>> Hm, if I remember correctly, the inodes are zeroed out, when a file is
>> deleted for ext3 and ext4. That's why extundelete only works correctly
>> with ext2.
>
> Not exactly.
>
> There is even utility ext3grep[1] written by Carlo Wood, which
> performs all the lookup for you. It can help in some cases.
>
> [1] http://code.google.com/p/ext3grep/

Thanks. I was refering to that part from the ext3 faq易:

,----
| Q: How can I recover (undelete) deleted files from my ext3
| partition?
|
| Actually, you can't! This is what one of the developers, Andreas
| Dilger, said about it: In order to ensure that ext3 can safely
| resume an unlink after a crash, it actually zeros out the block
| pointers in the inode, whereas ext2 just marks these blocks as
| unused in the block bitmaps and marks the inode as "deleted" and
| leaves the block pointers alone.
|
| Your only hope is to "grep" for parts of your files that have been
| deleted and hope for the best.
`----

It seems, this is not entirely correct, as stated in the ext3 undelete
HOWTO昌.

extundelete昆, ext3grep昂 and ext3undel&#8309; and might be helpful in
these cases.

That being said, I have no experience with any of these tools and just
wanted to add this info to this thread, just in case this might be useful
to anybody who stumbles over this thread via google.

Links:
易)http://batleth.sapienti-sat.org/projects/FAQs/ext3-faq.html
昌)http://carlo17.home.xs4all.nl/howto/undelete_ext3.html
昆)http://extundelete.sourceforge.net/
昂)http://code.google.com/p/ext3grep/
&#8309;)http://projects.izzysoft.de/trac/ext3undel

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: syntax highlighting perl with large multiline html strings

Hi Fred,

just a tangential note.

On Tuesday 31 May 2011 23:02:58 Fred Malone wrote:
> Hi all,
>
> I apologize if this has been asked before. I do a lot of programming in
> perl as cgi files and such. Many of the scripts I work on do a lot of html
> printing. Frequently there are multi-line html sections such as this:
> print <<HTML;

You should always specify the type of quotes of the here-doc explicitly:
<<"HTML" or <<'HTML' because people don't always get it right. For more
information see:

http://perl-begin.org/tutorials/bad-elements/#string-notation

And:

http://perl-begin.org/books/advanced/#pbp

Regards,

Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
"Star Trek: We, the Living Dead" - http://shlom.in/st-wtld

Yesterday I asked one of my students if she knew what an encyclopedia is, and
she said: "Is it something like Wikipedia?".
-- http://twitter.com/alisonclement/status/8421314259

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
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: [HELP]perl-support problem on gvim 7.3

Hi,

On Wednesday 01 Jun 2011 04:51:01 zhang listar wrote:
> The os is windows xp sp3, with gvim 7.3.
>
> I am new to Perl, and want to use vim to edit perl, so I download
> perl-support and install it.
>
> But when I start gvim to edit a file say, test.pl. it gives the error as
> follows:
>
> can't locate Per/tags.pm in @INC at (eval 9) line 1.
>

You have a copying error here - next time use your shell's session copy-and-
paste feature.

You probably mean you need to install this module -
http://search.cpan.org/dist/Perl-Tags/ - so install it from CPAN.

> can't call method "process" on an undefined value at (eval 10) line 5

Can't help you with this one yet.

Regards,

Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Understand what Open Source is - http://shlom.in/oss-fs

"I simply hate, detest, loathe, despise, and abhor redundancy."
-- http://uncyclopedia.org/wiki/Redundancy

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
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: Different working directories in different tabs

Weird. I was 100% it did work yesteday when I was discussing this in the #vim irc channel. However now it works just as all of you've said. :) 

--
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: Different working directories in different tabs

On 2011-05-31, Martin Lundberg wrote:
> On Tuesday, May 31, 2011 2:55:40 PM UTC+2, Christian Brabandt wrote:
>
>
> :h :lcd
>
> regards,
> Christian
>
> Hi Christian. To my understanding that is not what I'm talking about. The :lcd
> command changes it for the current window. I'm talking about creating a new tab
> and changing the working directory using :cd. It changes the cwd for that tab
> only (you can even see the filenames of the other tabs changing on the tabs).
> If you then change back to another tab it's cwd has not changed.

There are two commands that change the working directory: :cd,
which is global, and :lcd, which is window-local. There is no
change-directory command whose scope is a tab.

That said, you could use the TabEnter autocommand event and a
tab-local variable to :cd to the working directory you define for
each tab. That is, in each tab you could execute

:let t:wd = "some/directory"

and in your ~/.vimrc you could have an autocommand something like
this:

au TabEnter * if exists("t:wd") | exe "cd" t:wd | endif

See

:help TabEnter
:help t:var

Regards,
Gary

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php