- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I use VS 2008.
Very often, when I press "End"(keyboard), it doesn't go to the end of the line. I mean it goes father than the real "end" (including many blanks).
What's wrong?
Mike
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I use VS 2008.
Very often, when I press "End"(keyboard), it doesn't go to the end of the line. I mean it goes father than the real "end" (including many blanks).
What's wrong?
Mike
In VS2008 you have to select Edit -> Advanced -> View White Spaces (Ctrl+E,S), then you see, where you have blanks.
Markus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In VS2008 you have to select Edit -> Advanced -> View White Spaces (Ctrl+E,S), then you see, where you have blanks.
Markus
But why there are blanks at the end of the line? I didn't add them.
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mike
Did the source come from another system?
Has it beenedited ouside of Visual Studio?
In which case it may be that some other editorhas "padded out" the lines.
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did the source come from another system?
Has it beenedited ouside of Visual Studio?
In which case it may be that some other editorhas "padded out" the lines.
Les
No. I am sure that I write the whole program.
And also at first it ends without padded blanks.
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
VS IDE auto-indents the code depending on {} level and other factors (e.g. newline following if(expr))
Assume some level of indentation exists on a whitespace lines following some statement (e.g. open lines for visual clarity of statements). Then assume you position the cursor elsewhere, then come back with cursor at beginning of line (in front of white space). Now you start entering TAB or space to align code.
In VS you can turn on a highlight for whitespace. Or get into the habit of pressing END when you move the cursor.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
VS IDE auto-indents the code depending on {} level and other factors (e.g. newline following if(expr))
Assume some level of indentation exists on a whitespace lines following some statement (e.g. open lines for visual clarity of statements). Then assume you position the cursor elsewhere, then come back with cursor at beginning of line (in front of white space). Now you start entering TAB or space to align code.
In VS you can turn on a highlight for whitespace. Or get into the habit of pressing END when you move the cursor.
Jim Dempsey
I don't know if I know exactly what you say. I always use Home or End. When pressing End, I cannot go to the real "End" of line.
For example, parts of program are as following:
minl = MINLOC((/-7,2,-7,5/),dim=2) ! returns 1, first
! occurrence of minimum <===I hit return here and add the following line,
print *,minl <=== Press End here.
^ <==== cursor stop here
How to quickly move the cursor by keyboard to the real "End" of minl (I use CTRL-> CTRL<-, but no exact answer).
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could it be that you are using Fixed Line format (F77) and that the line is padded to 80 character position such that you can add a comment past column 80 should you so desire to do so. If your source file is of format FILENAM.F as opposed to FILENAME.F90 then the Visual Studion IDE may assume fixed line length and padd the line for you (as an unwanted favor).
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could it be that you are using Fixed Line format (F77) and that the line is padded to 80 character position such that you can add a comment past column 80 should you so desire to do so. If your source file is of format FILENAM.F as opposed to FILENAME.F90 then the Visual Studion IDE may assume fixed line length and padd the line for you (as an unwanted favor).
Jim
No. My filename is named as *.f90.
Now I'd like to know how to quickly move the cursor by keyboard to the real "End" of a line?
I use CTRL-> CTRL<-, but no correct answer.
I am wondering don't you or other user find this similar problem?
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Now I'd like to know how to quickly move the cursor by keyboard to the real "End" of a line?
I use CTRL-> CTRL<-, but no correct answer.
I am wondering don't you or other user find this similar problem?
Mike
"End", "Home", "Ctrl-End" and "Ctrl-Home" did. "End" especially taking me to just after the last character on the line, which is what youare looking for."Ctrl-End" takes me to the end of the source file.
But I have just searched the Tools->Options and other IDE settings but I can't see anything in there that would cause your problem. Maybe someone else will see it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mike,
I knew there was something in there, just couldnt see it (lack of coffee!)
It's a long shot but :
If you look at Project->Properties->Fortran->Language
If you have "Source File Format" set to fixed format (compiler option /fixed) AND "Pad Fixed Form Source Lines" set to "Yes" (compiler option /pad_source) then this would explain the behaviour you are getting.
Otherwise I am stumped as to what is causing it :-(
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Les, those options affect the compiler's treatment of source lines and have no effect on the editor.
I just tried this and I found that for my sources, pressing End took me to the end of the line without trailing spaces. I wondered if the behavior might be different in Fortran and C++ sources, but it worked the same for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
FWIW, in VS2005PPE (& Fortran code), pressing End takes me to the end of a line including trailing spaces, if any.
By "if any", I mean those I have added incidentally due to copying lines or deleting earlier comments etc - only a small proportion of lines affect, so it is not a problem.
OT: Incidentally, how come the spell checker on this site does not like "Fortran"?
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah, the spell checker is a child of the 70s. As is Microsoft Word's. I'll get this fixed.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page