Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
indent problem after the ()
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  15 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
adshuangjoh  
View profile  
 More options Jul 2 2011, 6:11 am
From: adshuangjoh <adshuang...@gmail.com>
Date: Sat, 2 Jul 2011 03:11:23 -0700 (PDT)
Local: Sat, Jul 2 2011 6:11 am
Subject: indent problem after the ()
anyone can tell me how to fix the problem? it just happen on some file
types like: cpp/c/cs/java/

Problem:
//////////////////////////////////////////////////////////////////
void foo()   //press enter after the ')'
    //cursor is here

expected:

void foo()
//i want the cursor here.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dr-dr xp  
View profile  
 More options Jul 3 2011, 2:40 pm
From: dr-dr xp <drdr...@gmail.com>
Date: Mon, 4 Jul 2011 02:40:51 +0800
Local: Sun, Jul 3 2011 2:40 pm
Subject: Re: indent problem after the ()

Without a ";" I think the cursor should just be there where you actually
got.

It is an indentation feature by VIM itself.

--
要了几天饱饭就不记得西北风啥味了

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
adshuangjoh  
View profile  
 More options Jul 4 2011, 12:47 am
From: adshuangjoh <adshuang...@gmail.com>
Date: Sun, 3 Jul 2011 21:47:47 -0700 (PDT)
Local: Mon, Jul 4 2011 12:47 am
Subject: Re: indent problem after the ()
yes, you are right, the problem is that when I try to input the { at
the cursor there, the { will automatically move to the begin of the
line, but it doesn't work when the xptemplate is installed.

do you think it is a problem or do you know how can i fix it?

how to reproduce:

A: without: xptemplate:
void foo()  //step 1: enter
    //cursor here, step 2: then input the '{', the '{' will go to the
begin of the line.

like:
void foo()
{

B: with xptemplate installed:
void foo()  //step 1: enter
    //cursor here, step 2: then input the '{', the '{' will keep them
with the '}' added.

like:
void foo()
    {}

Johnny

On Jul 4, 2:40 am, dr-dr xp <drdr...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dr-dr xp  
View profile  
 More options Jul 4 2011, 1:52 am
From: dr-dr xp <drdr...@gmail.com>
Date: Mon, 4 Jul 2011 13:52:46 +0800
Local: Mon, Jul 4 2011 1:52 am
Subject: Re: indent problem after the ()

Yes It is a problem.

Moving "{" back to column 1 is controlled by VIM option "indentkeys".

Because that is a different way in which XPT puts chars on to screen,
"indentkeys" doesn't work with XPT natively.

I'm gonna have a look at this issue.
A possible solution is copying behaviors of  "indentkeys".

2011/7/4 adshuangjoh <adshuang...@gmail.com>

--
要了几天饱饭就不记得西北风啥味了

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
adshuangjoh  
View profile  
 More options Jul 4 2011, 10:52 am
From: adshuangjoh <adshuang...@gmail.com>
Date: Mon, 4 Jul 2011 07:52:11 -0700 (PDT)
Local: Mon, Jul 4 2011 10:52 am
Subject: Re: indent problem after the ()
thanks very much, wait for your update.

Johnny

On Jul 4, 1:52 pm, dr-dr xp <drdr...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dr-dr xp  
View profile  
 More options Jul 5 2011, 12:17 pm
From: dr-dr xp <drdr...@gmail.com>
Date: Wed, 6 Jul 2011 00:17:45 +0800
Local: Tues, Jul 5 2011 12:17 pm
Subject: Re: indent problem after the ()

This issue has been fixed. check it out.

2011/7/4 adshuangjoh <adshuang...@gmail.com>

--
要了几天饱饭就不记得西北风啥味了

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
adshuangjoh  
View profile  
 More options Jul 6 2011, 1:30 am
From: adshuangjoh <adshuang...@gmail.com>
Date: Tue, 5 Jul 2011 22:30:55 -0700 (PDT)
Local: Wed, Jul 6 2011 1:30 am
Subject: Re: indent problem after the ()
thanks for you effort but sounds like it doesn't work on my OFFICE
PC.  I will have a test when I back home tomorrow on my HOME PC.

Is this fix just for the Vim 7.2 ? does it matter if I use the Vim
7.3 ? also it seems like the default value for the option
"g:xptemplate_brace_complete" has been change to 0? I have to set it
to 1 on the vimrc file to make this feature work.

am I missing anything?  I am just start to use Vim for around 1 month.

On Jul 6, 12:17 am, dr-dr xp <drdr...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dr-dr xp  
View profile  
 More options Jul 6 2011, 3:35 am
From: dr-dr xp <drdr...@gmail.com>
Date: Wed, 6 Jul 2011 15:35:18 +0800
Local: Wed, Jul 6 2011 3:35 am
Subject: Re: indent problem after the ()

2011/7/6 adshuangjoh <adshuang...@gmail.com>

> thanks for you effort but sounds like it doesn't work on my OFFICE
> PC.  I will have a test when I back home tomorrow on my HOME PC.

> Is this fix just for the Vim 7.2 ? does it matter if I use the Vim

I am not sure now about this issue. I use VIM 7.3 and it works fine. I'm
gonna do more test on it.
Because it depends on two settings 'indentkeys' and 'indentexpr' to work,
 any of them may cause it not to work.

Would you send me your .vimrc and a list of your plugins installed?

And please tell me the values of these following settings on your VIM with a
.java file opened:
:set indentkeys?
:set indentexpr?
:set cindent?
:set cinkeys?
:set cinoptions?

This will help a lot for tracking the problem.
Thanks.

> 7.3 ? also it seems like the default value for the option
> "g:xptemplate_brace_complete" has been change to 0? I have to set it
> to 1 on the vimrc file to make this feature work.

Default value of g:xptemplate_brace_complete is 0 from this release. Because
someone complained about this.

--
要了几天饱饭就不记得西北风啥味了

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dr-dr xp  
View profile  
 More options Jul 6 2011, 3:43 am
From: dr-dr xp <drdr...@gmail.com>
Date: Wed, 6 Jul 2011 15:43:39 +0800
Local: Wed, Jul 6 2011 3:43 am
Subject: Re: indent problem after the ()

I noticed that if I type:
void a()<CR>{
it automatically reduces the indent.

But:
void a()<CR><Space><LEFT>{
it does not reduce indent.

On my notepad, VIM and XPT acts the same in this way.
Not sure if this is just the issue you have had.

2011/7/6 dr-dr xp <drdr...@gmail.com>

--
要了几天饱饭就不记得西北风啥味了

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
adshuangjoh  
View profile  
 More options Jul 6 2011, 4:56 am
From: adshuangjoh <adshuang...@gmail.com>
Date: Wed, 6 Jul 2011 01:56:22 -0700 (PDT)
Local: Wed, Jul 6 2011 4:56 am
Subject: Re: indent problem after the ()
Hi,

Thanks for still working on this, I have send the vimrc file to you
gmail, please check it.

vim plugin as below:
Directory of C:\Program Files (x86)\Vim\vim73\plugin\
////////////////////////////////////////////
a.vim
bufexplorer.vim
cscope_macros.vim
EnhancedCommentify.vim
getscriptPlugin.vim
gzip.vim
matchparen.vim
minibufexpl.vim
NERD_commenter.vim
NERD_tree.vim
netrwPlugin.vim
New Text Document.txt
README.txt
rrhelper.vim
spellfile.vim
supertab.vba
taglist.vim
tarPlugin.vim
tohtml.vim
vimballPlugin.vim
vimspell.vim_
zipPlugin.vim

/////////////////////////////////////////////////////////////
C:\Program Files (x86)\Vim\vimfiles\...
snipMate.vim
supertab.vim
omnicppcomplete.vim
Align.vim
AlignMaps.vim
visual_studio.vim

On Jul 6, 3:35 pm, dr-dr xp <drdr...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
adshuangjoh  
View profile  
 More options Jul 6 2011, 5:25 am
From: adshuangjoh <adshuang...@gmail.com>
Date: Wed, 6 Jul 2011 02:25:44 -0700 (PDT)
Local: Wed, Jul 6 2011 5:25 am
Subject: Re: indent problem after the ()
Hi,

Thanks for still working on this, I have send the vimrc file to you
gmail, please check it.

vim plugin as below:
Directory of C:\Program Files (x86)\Vim\vim73\plugin\
////////////////////////////////////////////
a.vim
bufexplorer.vim
cscope_macros.vim
EnhancedCommentify.vim
getscriptPlugin.vim
gzip.vim
matchparen.vim
minibufexpl.vim
NERD_commenter.vim
NERD_tree.vim
netrwPlugin.vim
New Text Document.txt
README.txt
rrhelper.vim
spellfile.vim
supertab.vba
taglist.vim
tarPlugin.vim
tohtml.vim
vimballPlugin.vim
vimspell.vim_
zipPlugin.vim

/////////////////////////////////////////////////////////////
C:\Program Files (x86)\Vim\vimfiles\...
snipMate.vim
supertab.vim
omnicppcomplete.vim
Align.vim
AlignMaps.vim
visual_studio.vim

On Jul 6, 3:35 pm, dr-dr xp <drdr...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
adshuangjoh  
View profile  
 More options Jul 6 2011, 10:49 am
From: adshuangjoh <adshuang...@gmail.com>
Date: Wed, 6 Jul 2011 07:49:53 -0700 (PDT)
Local: Wed, Jul 6 2011 10:49 am
Subject: Re: indent problem after the ()
Hi,
I just install the vim73 in a clean machine, with the only plugin
xptemplate installed, unfortunatelly, the issue is still there with
the vimrc as below:

set nocompatible
filetype plugin  on
let g:xptemplate_brace_complete=1

so it sounds like we need another settings to make it work?

On Jul 6, 3:35 pm, dr-dr xp <drdr...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
adshuangjoh  
View profile  
 More options Jul 6 2011, 10:52 am
From: adshuangjoh <adshuang...@gmail.com>
Date: Wed, 6 Jul 2011 07:52:58 -0700 (PDT)
Local: Wed, Jul 6 2011 10:52 am
Subject: Re: indent problem after the ()
Hi,

I just have the Vim7.3 + xptemplate installed on a CLEAN machine, and
the problem is still there, sounds like it need other options set to
make it work correctly.

vimrc file:
set nocompatible
filetype plugin  on
let g:xptemplate_brace_complete=1

On Jul 6, 3:35 pm, dr-dr xp <drdr...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
adshuangjoh  
View profile  
 More options Jul 6 2011, 11:01 am
From: adshuangjoh <adshuang...@gmail.com>
Date: Wed, 6 Jul 2011 08:01:58 -0700 (PDT)
Local: Wed, Jul 6 2011 11:01 am
Subject: Re: indent problem after the ()
Sorry, I sent to drdrxp@gmail by mistake, please check it now.

also update:
I just have the Vim7.3 with the only plugin xptemplate installed on a
CLEAN machine, and the problem is still there, sounds like it need
other options set to make it work correctly.

vimrc file:
set nocompatible
filetype plugin  on
let g:xptemplate_brace_complete=1

On Jul 6, 4:56 pm, adshuangjoh <adshuang...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dr-dr xp  
View profile  
 More options Jul 8 2011, 2:12 pm
From: dr-dr xp <drdr...@gmail.com>
Date: Sat, 9 Jul 2011 02:12:14 +0800
Local: Fri, Jul 8 2011 2:12 pm
Subject: Re: indent problem after the ()

Fixed.

--
要了几天饱饭就不记得西北风啥味了

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »