Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 CR/LF issue with snippets
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Ketchup Master

57 Posts

Posted - Jun 01 2016 :  04:30:49 AM  Show Profile  Reply with Quote

I have created a snippet for easily creating my class header.
It seems however that it is not using the standard CR/LF but only a LF (I'm on Windows).
What I do is:
-right click in the Solution Explorer on some folder
-Add > New Item...
-Choose Visual C++ and then Header File (.h)
-fill in the name and press Add
In the newly created, empty file: type in the shortcut of my snippet and press enter

It now seems that the file only has LineFeeds.
If I create a new file and first press the Enter key to add a new line,
and only then do the snippet stuff, then I nicely get CR/LF.
The problem is that copy pasting other code in the file ends up with a mixture of both types of line endings...

I also didn't find the (tpl?) file in which my custom snippet was added.
I searched in
and in the folder above, but there no .tpl file was present at all...

This is my snippet:

This is a view on the file after I copy pasted some other code in it:

My VisualAssist version:

VA_X.dll file version 10.9.2098.0 built 2016.05.12
DevEnv.exe version 12.0.40629.0 Professional
msenv.dll version 12.0.40629.0
Comctl32.dll version 6.10.7601.18837
Windows Server 2008 R2 6.1 Build 7601 Service Pack 1 (remote)
36 processors (x86-64, WOW64)
Language info: 1252, 0x409

Whole Tomato Software

United Kingdom
3279 Posts

Posted - Jun 01 2016 :  7:49:05 PM  Show Profile  Reply with Quote
This is odd and I wasn't able to reproduce your problem.

You can find your edited VA snippets here:

They only have LF characters for newline but the end result is correct for me when I save the header file. (both CR and LF are present)

Can you please send in your cpp.tpl using the below form?

So I can try reproducing the problem here. Please paste the URL of this topic for the "Your request" field.

BTW, are you aware the content of a new header file is specified here?

I'm wondering if you modified the content here which may play a role regarding this problem.

Also, you may consider using this place instead of a separate header snippet.

Edited by - accord on Jun 01 2016 8:03:48 PM
Go to Top of Page

Ketchup Master

57 Posts

Posted - Jun 02 2016 :  12:05:33 PM  Show Profile  Reply with Quote
Related to Create Header File:
No I didn't use that. It seems it is only used when you use the Refactor > Create File... command?
However the location of the new file can't be modified in the dialog and is taken over from the current file you start Create File from?
So you always need to start with a file in a certain folder already? Would be nice if you could just adapt the file location.
However, when I use this way of creating a new file, I don't have the LF only issue....

Related to the Cpp.tpl file:
The %APPDATA% is pointing to C:\Users\bta\AppData\Roaming
but in that folder there is only a DebuggerTools folder and no AutoText folder.
(Note that I am working on a Terminal Server together with other people).

I search in my C:\users\bta\AppData folder for Cpp.tpl files and I get these 2 hits:
C:\Users\bta\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Whole Tomato Software\Visual Assist\10.9.2098.0\Autotext\Latest\Cpp.tpl
(I have both VS2013 and VS2010 installed)
When I look in those files, I don't see my ompheader in both files though, so probably it looks somewhere else?
So unfortunately I can't upload the file containing the definitinon...
Go to Top of Page

Whole Tomato Software

United Kingdom
17497 Posts

Posted - Jun 02 2016 :  7:52:16 PM  Show Profile  Reply with Quote
I have managed to reproduce the problem here:


As a partial work around, can you try turning On:

IDE tools menu -> Options -> Environment -> Documents -> Check for consistent line endings on load

this should help to fix the problem until it can be fixed.

zen is the art of being at one with the two'ness
Go to Top of Page

Whole Tomato Software

2817 Posts

Posted - Jul 18 2016 :  10:38:26 PM  Show Profile  Reply with Quote
case=97552 is fixed in build 2107.
Go to Top of Page

Ketchup Master

57 Posts

Posted - Jul 28 2016 :  09:32:52 AM  Show Profile  Reply with Quote
Just verified with that build and it seems fixed indeed. Thanks!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2021 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000