Why does IntelliSense keep changing function to Function?

那年仲夏 提交于 2019-12-04 16:05:22

问题


I am having a very strange IntelliSense issue, and I'm not sure if it's Visual Studio 2013 or ReSharper 8.1. When I'm working in views (cshtml) within script tags (javascript), something keeps changing "function" to "Function" with a capital "F."

<script type="text/javascript">
    var something = function() .... //on tab or completing the ()'s, it changes to Function
</script>

This isn't a huge deal, of course, but it's becoming a pain in my neck as I keep having to go back and lower-case the "F." Does anyone know why this is happening?

I'm running Visual Studio 2013 Ultimate with ReSharper 8.1 C# edition.


回答1:


Clearing the caches would probably work - Resharper->Options->Environment->General and click the Clear Caches button.




回答2:


I'm experiencing the same issue with ReSharper 8.1.23.546, and it hasn't been resolved with a cache clear. It is reported to have been fixed in build 8.1.1000+

The only thing that worked for me was to disable auto-popup for JavaScript, as described here:

http://youtrack.jetbrains.com/issue/RSRP-400812

  • Go to Resharper > Options > Intellsense > Autopop > JavaScript
  • Choose 'Display but do not preselect' for all the drop down items

This is less a fix than a way to make the irksome behavior go away until I can get an upgrade.

I love ReSharper, but this was annoying enough that I was contemplating buying a ticket to the Czech Republic to poke someone in the eye.




回答3:


Clearing cache didn't fix my issue. The best fix for me was to remove the "(" character from being able to auto-complete in my JS since I always just type "function(".

I did this by going to Resharper > Options > Intellisense > Completing Characters, and put a "(" in the Do not complete on box for JavaScript.




回答4:


I was having issues with R# grabbing every function it could find instead of what is in the _refereneces.js file so I changed the intellisense to use visual studio's instead of R#.



来源:https://stackoverflow.com/questions/21312137/why-does-intellisense-keep-changing-function-to-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!