Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Compatible with VsVim

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
weizehua Posted - Nov 10 2019 : 8:43:56 PM
Visual Assist Completion is not compatible with VsVim:
Whenever there is a text is completed by Visual Assist, VsVim is failed to record the last change('.' key).
example1(with dot to -> enabled):
origional code :
std::string s;
printf("%s", s);
printf("%s", s);
after typing vim command:
/s)<Enter>ss.c<Tab>()<Esc>n.
code should become:
std::string s;
printf("%s", s.c_str());
printf("%s", s.c_str());
but the real result with (dot to ->) was:
std::string s;
printf("%s", s.c_str());
printf("%s", c_str());
---------------------------------------
An other example(if I have a variable named s1_numbers nearby):
with vim command:
/s)<Enter>Cs1_<Tab>);<Esc>n.
the code should become:
std::string s;
printf("%s", s1_numbers);
printf("%s", s1_numbers);
but the real result was:
std::string s;
printf("%s", s1_numbers);
printf("%s1_numbers);
--------------------------------
So, every time I toggle Visual Assist completion, VsVim failed to react the last change.
27   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Feb 19 2020 : 11:09:08 AM
For the include file path, are you testing the same solution you sent me a link to? The screen shot shows the same cpp file, but I cannot reproduce what you are seeing here. So I just wanted to double check that we are testing the same solution. If we are can you please export your VA and IDE settings and send them to me:

VA Options -> Performance -> Export Settings
IDE tools menu -> Import and Export Settings -> Export selected environment settings

I can then import them here and see if I can reproduce the problem then.


For the spell checker, can you send me a sample file with Chinese comments in it? I wonder if the file encoding matters. Also are you working with Simplified Chinese or Traditional Chinese? There are different spelling dictionaries for the two languages, so I want to test with the right one.


Thank you for the project for Add Include, I am seeing the same problem here. This goes wrong since VA is not picking up the include directories you are setting in the "CMakeLists.txt" file. This is a known problem:

case=140829

For now, can you please make a new txt file called "CppProperties.json" and place it in the same directory as your "CMakeLists.txt" file. This file can be used to tell the IDE, and also VA, which extra include directories to use. Give it the following content:

{
  "configurations": [
    {
      "name": "Windows x64",
      "includePath": [
           "src",
           "C:/external_inc"
        ]
    }
  ]
}

you can set as many include directories as you want in the "includePath" list. Now save this file and restart Visual Studio. This should fix Add Include, since VA will now know that "src" is an include directory it can start from.

This might also fix your other problem, where VA cannot find the header file in the external include directory. But I cannot reproduce that problem, there is no need to use a "CppProperties.json" file for me to help.


Would you be able to send me a copy of your simple Step Filter test? I can at least try and reproduce the problem where functions are not picked up the first time. Maybe this will offer some clues as to what is going wrong here.


For Rename, what you want is what VA is designed to do. Are you aware of the "Display uses in comments and strings" option in the Rename dialog? You can use this to filter out all of the places that VA thinks are not code, which should help. Without an example of where this goes wrong it's hard to know what is going on here.
weizehua Posted - Feb 18 2020 : 9:35:16 PM
For the coloring problem:
I'll pay attention when it triggered.

For spelling check:
Steps are a bit complicated. And, no .dic or .aff files:




In fact, spelling check for chinese is not necessary. I think that not marking Chinese words as spelling errors are just enough.
weizehua Posted - Feb 18 2020 : 9:14:42 PM
For rename:
Please have try on renaming template parameter. VA_X and Visual Studio will both renames almost everything. But when I really want to rename everything, they always both left some thing not renamed, making a mess of the project.

For myself, I would rename template parameter in two case:
1. separate one parameter into two, using two different names. For this case, I usually want to renames the usage inside one class/function(renames only the real usages).
2. I just want to use another name. In this case, I want to "Replace" all names matchs, so I don't needs refactoring, because "Replace Text" works fine.
weizehua Posted - Feb 18 2020 : 8:54:44 PM
For add include:




I have tested all the combinations, the default setting works perfectly in .sln solution, but works bad in CMake project.

Example:
https://git.happyzh.com/weizehua/cmake_include_test/tree/add_inc
weizehua Posted - Feb 18 2020 : 8:50:00 PM
For Step Filter:
It's a CMake project, build under Windows, using configuration "Debug-X64".
In my small demo, I tried to create two projects, one is a static library, one is an executable.
When I debug the executable for the first time, I does'nt show any function inside that static library.
If I debug for the second time, It works good.

And in my working project, I really see some functions in step filter. But the function shown are the functions I checked in step filter's dialog when this project is yong and small.





weizehua Posted - Feb 18 2020 : 8:29:54 PM
for include completion:

cursor at the first line, inside <>:


cursor at the second line, inside <>:


va_x info:


vs info:




feline Posted - Feb 18 2020 : 12:33:50 PM
The problem in the VA refactoring project is that the brackets for the namespace are on the same line. In the cpp file, change:

namespace ns
{};

into:
namespace ns
{
};

and VA refactoring will work correctly. This is currently a known bug, but I don't yet have an estimate for when this will be fixed.

case=43387

For VA Step filter, how are you compiling your main solution? Is it compiled via CMake? Is it compiled under Windows?

Does the main solution have a .SLN file at all? I am wondering if building with CMake is a factor with VA Step filter.

Are any functions at all being shown by VA Step Filter when you are debugging? I wonder if VA is showing some symbols, but not other symbols. If so, knowing which ones are shown and which ones are not shown might give us a clue as to the problem.


For Add Include, in the VA Options -> Code Generation settings, what do you have the two pull down boxes for Add Include set to?

When Add Include gets the wrong path, can you post an example of what VA is inserting, along with the correct full path of the file, and the full path of the file you were editing when you triggered Add Include? I am trying to understand what is going wrong here.


For Rename, VA uses the same search for both Find References and Rename. If you have cases where Rename does not work well, can you please try running Find References and see what results VA is returning? With some examples of what is going wrong maybe I can help.


The Find Symbol dialog, ignoring underscore _ when searching is a very good idea. I have put in a feature request for a setting to do this:

case=141907

For typing "aonetten" to match "add_one_and_times_ten_then_minus_two" is harder in the Find Symbol dialog. In a listbox we normally have a small scope, so we can avoid having too many matches. In the Find Symbol dialog you are going to get a lot more matches, making it harder to find what you want.


The Find Symbol dialog not opening the file, can you please open this dialog, right click into the dialog and turn On:

Find Symbol dialog -> Right click menu -> File columns (reopens dialog)

this will show two extra columns, "File" and "Directory". When you have a case where the dialog cannot open the file, can you please look at the File and Directory, and see if VA is trying to open the correct file? Does the file actually exist in this directory?
feline Posted - Feb 17 2020 : 3:58:31 PM
When you have the colour problem, all text is white, what file extension is the file you are working in?

If you show VA Outline does VA show the correct information for the file? I am trying to work out what might be going wrong here.

For Chinese, have you tried installed a Chinese spell checking dictionary?

https://docs.wholetomato.com/default.asp?W199
feline Posted - Feb 17 2020 : 1:32:42 PM
For the error line:

#include <external_inc.h> // VA_X don't have this, but including this is ok.

if you place the keyboard cursor into the filename, what does VA show in its context and definition fields? These are normally at the top of the editor window, and are where the Alt-M list appears. What happens if you press Alt-G?

Now I have created the folder and the file, VA is suggesting it for me just fine. I am testing VS2019, version 16.4.5, with Visual Assist 2358.0, and this is what I am seeing:

weizehua Posted - Feb 17 2020 : 11:48:42 AM
the second line is not that important.
error in the first line is more important.
It seems that headers files that not inside CMake project's directory are not listed by VA_X.
feline Posted - Feb 17 2020 : 11:42:25 AM
I have the CMake test here, thank you for this, I am now working through the problems you are seeing.

First the error line:

#include <local_inc/local_inc.h> // list by VA_X, but error.

I have put in a bug report for this:

case=141897

You are right, VA should not be suggesting this header file inside a #include <> statement, but we are.
weizehua Posted - Feb 13 2020 : 08:23:38 AM
And sometimes Find Symbol can't switch to the file that contains the symbol I choosed.
I don't know how to trigger this. It wokrs fine most of the time, but sometimes just not work.
weizehua Posted - Feb 13 2020 : 08:17:29 AM
Some others things that annoying:

Coloring: I don't know how this error being triggered. When this error triggered, all text gets a white color(using Dark theme). I have to do someting to re-enable coloring. Maybe disable VA_X and re-eanble it, maybe cloding Text Editor and re-open it. This may not be a bug of VA_X, because after I disabled VA_X's coloring, the error still exists. But coloring can still works when this error triggered if i use Visual Studio's coloring.

Underlying: Chinese characters are always treated as spelling error. Resulting lots of "Red" lines in Text Editor.

Editor: the problem is posted by this topic.

Refactoring: please have a try on this:
https://git.happyzh.com/weizehua/va_x_refactoring

Step Filter: I'm always enabling this and used to love this. But for now, it never shows the function that I want to skip. I tried to write a small project to reproduce this. But in small prject VA_X's step Filter works good. But in my working project, it never shows the function that I want to skip.

Add include: maybe this is the problem of incorrect include completion: the genreated include path is always relative to current file and annoying. If i change the setting, VA_X can't generate a path that really exists.

Renaming: I'm afraid of using rename now. Because it either renames everything or renames only the text I selected. And the dialog that let me choose which one to rename(if it wants to rename everything) is not that easy to use. I'd rather use Replace Text and specific directories and file extensions, which is much easier. If renaming is complicated, I will use CLion to do a rename, both the "Rename" function and "Relace in Path" in CLion are so easy to use.

Find Symbol and Open File in Solution: This is not a bug. And both function are good and indispensable. But they are not good enough. Typing space or underscore is annoying. Most of the time, I don't remember whether the original name have a underscore. Why couldn't typing "addone" to find "add_one"? What if the names get more complicated, such as "add_one_and_times_ten_then_minus_two". I just want to type "aonetten", no space, because this works in enhanced listboxes.
weizehua Posted - Feb 13 2020 : 06:55:26 AM
include completion in CMake base project:
https://git.happyzh.com/weizehua/cmake_include_test
feline Posted - Feb 13 2020 : 06:06:19 AM
To help English problems, could you make a small sample project showing one or more of the bugs you are seeing? For example a simple CMake project that confuses VA? If so, you could send me the project, and a very simple comment telling me where to look for the problem, which should be easier for both of us.

If this is an option, please send me the files via email:

[email protected]

including this thread ID or URL in the description, so we can match it up.

Also, is Google Translate, Chinese to English, of any help at all?

https://translate.google.com/#view=home&op=translate&sl=zh-CN&tl=en
weizehua Posted - Feb 12 2020 : 7:25:18 PM
Visual Assist is absolutely the NO.1 plugin for Visual Studio in all the plugins I used.
I have used Visual Assist for more than ten years and I really love it.

But with more and more small problems with Visual Assist, I switched off lots of function in Visual Assist. Including coloring, hightlighing, underlying, Editor enhance, etc.
And now i'm going to switch off enhanced listboxes. Because Visual Studio's completion seems more stable. Even enhanced listboxes is more powerful and stronger. But there is a saying in China: "#38182;#19978;#28155;#33457;#19981;#22914;#38634;#20013;#36865;#28845;#12290;". Lacking of basic functionality is more annoying.

In fact, they are good functions and I really want to enable them. But here's bugs. And with my poor English, switching off that function is much easier than posting an new bug report.
But anyway, I hope that Visual Assist's developing team can continue to make greater achievements.
weizehua Posted - Feb 12 2020 : 7:02:56 PM
quote:
Originally posted by feline


Are you seeing problems with listboxes outside of repeating the last insert?


Yes, with Visual Studio's updating comes new features, there comes more and more small problems in visual assist. In most of the time I can't figure out whether the problem belongs to Visual Studio(usually they are problem of IntellSense) itself or belongs to Visual Assist.

For example, include completion for CMake project is not correct in Visual Assist's listbox. I used to think that this is a bug of Visual Studio more than one year. Until I found that Visual Studio can handle include completion correctly by chance days ago.
feline Posted - Nov 21 2019 : 2:27:31 PM
Dot to repeat the last change is a place where VsVim needs to be aware that VA is active, and inserting characters into the editor. Since VsVim is not currently detecting VA correctly, it's not a surprise that these changes also have a problem with repeating the last change. Hopefully once detection of VA is working again, this will help.

Are you seeing problems with listboxes outside of repeating the last insert?
weizehua Posted - Nov 21 2019 : 03:02:25 AM
quote:
Originally posted by feline

Can you post a couple of examples of listboxes not working correctly when working with VA and VsVim? I am seeing the problem with using dot to repeat an insert, but when I was typing, listboxes seemed to be working normally for me.

Does the problem happen in any insert session? Only when entering insert via certain commands? Is there a pattern I should be looking for?

I have used Vim before, but have never worked with VsVim, I always found the way I work in Vim and the way I work in Visual Studio with VA to be to different to really work together.


It seems **All** input generated by Visual Assist will break VsVim's "Last Change" Command. Including:

Editor - Insert _ after m and Shift.
Editor - Convert dot to -> in C/C++
Editor - Insert () and closing })'"

Suggestions - Enable Suggestion Lists.(Enable in C++)

When Suggestions is enabled, not all ListBox breaks "Last CHange", only the listbox generated by VA_X will break it.
For example, this listbox will breaks "Last Change":



but this will not:




-------------
In fact, all functions in VA_X's "Editor" Option will breaks "Last Change". But it doesn't matter. Because nobody will use "Last Change" after them.
feline Posted - Nov 18 2019 : 2:55:21 PM
Can you post a couple of examples of listboxes not working correctly when working with VA and VsVim? I am seeing the problem with using dot to repeat an insert, but when I was typing, listboxes seemed to be working normally for me.

Does the problem happen in any insert session? Only when entering insert via certain commands? Is there a pattern I should be looking for?

I have used Vim before, but have never worked with VsVim, I always found the way I work in Vim and the way I work in Visual Studio with VA to be to different to really work together.
sean Posted - Nov 18 2019 : 1:30:56 PM
VsVim is not able to properly detect the presence of Visual Assist. I submitted a pull request to fix that:
https://github.com/VsVim/VsVim/pull/2750

But I have no idea if that is the source of all the trouble -- Vim is a whole different world for me.
weizehua Posted - Nov 17 2019 : 11:45:14 PM
Can I browse the issue list?
weizehua Posted - Nov 17 2019 : 11:43:03 PM
Not only dot completion.
All Completion provided by Visual Assist(All completion with a tomato icon) face this problem.
weizehua Posted - Nov 17 2019 : 11:40:44 PM
I don't know if VsVim really exit "Insert Mode".
This is just my guess. It just act like VsVim exiting from "Insert Mode" then re-enter. But it is just a guess.
It�s up to you to figure out what exactly happened.
feline Posted - Nov 13 2019 : 3:14:32 PM
I am seeing the same problem with repeating the last insert command via dot, but I don't understand your point about leaving and returning to "Insert Mode". How do you know this is happening?

Testing VS2017, VA 2353 and VsVim 2.7.0.0 I am testing this with a "simpler" test, I am using "o" to make a new line and enter Insert mode, and then typing

s.len<TAB>;<ESCAPE>

so I enter a single new line of code. Typing this slowly, and watching the status / mode bar at the bottom of the screen, it never stops saying "INSERT", so why do you think that VsVim is leaving and returning to insert mode?

When I used to use Vim, many years ago, under Linux, I am sure that when pressing dot I would see the previous actions repeated on the screen, but here when I press dot nothing is retyped, it is just block editing the document in one go, to repeat the last set of actions. I wonder if this is a factor.

I have put in a bug report for only the text after the dot being entered:

case=141495
weizehua Posted - Nov 13 2019 : 02:55:08 AM
I have tried setting TrackCaretVisibility. Both 00 and 01. That does'nt solve this problem.
with TrackCaretVisibility==01, Visual Assist will not popup a listbox when TextEditor is not under "Insert Mode".
But this problem is that whenever a Visual Assist Completion is triggered, TextEditor will exit "Insert Mode", re-enter "Insert Mode", then do the changes.
This makes Vim failed to record the last change. Because "Last Change" in Vim means All the commands you typed in last "Insert Mode", including how you enter and exit "Insert Mode".

Maybe find a way to ensure completion will not make VIM(or TextEditor) exit from "Insert Mode" is a good solution.
accord Posted - Nov 11 2019 : 01:10:28 AM
Can you please try this to see if it helps?
https://docs.wholetomato.com/default.asp?W271
https://github.com/VsVim/VsVim/wiki/FAQ#how-can-i-use-visual-assist-and-vsvim

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000