Reputation: 1
I work on Visual studio 2022 (Microsoft Visual Studio Enterprise 2022 (64-bit) - Current Version 17.10.3 ) and intellisense autocomplete erases the period. How can i have it not erase the period (or add it automatically after it is erased) ? edit: Just noticed that on another project (same VS version of course), auto-completion works properly ! Is there a way to copy whatever settings that project has onto my own ? Could I even see the differences listed ?
For example, whenever I am typing my code and type in an object (such "products") and type the period/fullstop sign (".") right afterwards, the suggestions for completing the code appear, such as "length", "push", "map", "foreach", "join" etc. I can then press the arrow keys to navigate along the list's terms. If I then press Enter or Tab, it selects and types its selection onto my code.
It should be typing it right at my cursor's position, and this means after the full stop / period sign ("."). Instead, it deletes the period sign and writes right at the end of my previously typed word, creating a monster of a term (such as "productslength", instead of "products.length"). This is how it looks with the intellicode suggestion... and this is how it looks after I press enter or tab or double-click on the auto-completion.
Sample code used in project
let products = []; /* Store fetched products globally. */ async function initialize_Data() { products = await fetchOnlineData(url_Products); }
function CreateProductsListCardsHTML() { products.forEach((product, index) => { const cardHTML = CreateProductCardHTML(product); productCards.insertAdjacentHTML('afterbegin', cardHTML); }) } .
Upvotes: 0
Views: 100
Reputation: 3321
From looking at your description, it seems the intellisense does not work. For this issue, here are suggestions you can check:
1.Did you install three-party expansions like ReSharper
? If yes, please navigate to Editor->Completing Characters and set Enter Key/Tab Key to Inserts
or disable this extension and switch to visual studio native intellisense.
2.Please try to reset all settings and restart you visual studio. For more information, please read Reset all settings
3.If your VS is not the latest, please update your VS to the latest version with Visual Studio Installer.
If the issue persists, you can provide more information about your issue:
productslength
UPDATE
Is there a way to copy whatever settings that project has onto my own ? Could I even see the differences listed?
You can use a Template to reuse the same settings. Open that project, go to Project->Export Template
and follow the wizard to create a template that includes your settings.
Then create a project with the exported template.
If you open the both projects with the same VS instance installed on your machine, auto-completion works properly in another project, please try to delete .vs
folder in your project and reload it to see if the issue persists.
Hope it can help.
Upvotes: 0