Thursday, August 20, 2009

Retaining cursor position and getting back the # character's normal use

Hi,


I have two questions:

1) Let's say I have the following code:

if ( whatever1 ) {

# do stuff 1;
}


if ( whatever2 ) {

# do stuff 2;
}


And let's say I'm in normal mode and have my cursor on the first "e"
of "whatever1". When I now use j to move a couple of lines down, I
would like the cursor to also be at the first "e" of "whatever2", but
what it does is jump to the beginning of the line between the two
ifs and never returns. I have set "sol" to true and I don't know
what other setting can help here (except for virtualedit, which I don't
want).

2) I write a lot in Perl, in which the default behaviour of the # key
is special. I don't *want* it to be special. All I want, is to get the
"#" character when I type the "#" character. That is all. How can I achieve
this?

Thanks,
Bernard

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

No comments:

Post a Comment