Normal word complete in LINQPad 6
C# autocomplete is awesome in LINQPad 6, but F# autocomplete is a little slow and I can't type some characters to get the autocomplete menu.
Most of time, I only want to complete a very long function name, for example:
let veryverylongfunction x = x
let result = very|
After "very", I can only use complete word hotkey(ctrl+space) to help me complete it, and it is slow in F# mode.
In other editors, there is a normal word complete feature, it only complete the words in the same file.
In Emacs, it called "hippie-expand", the hotkey is "Alt+/", the main function is just completing word. If I press "Alt+/" many times, I can get more similar words to complete. JetBrains IDE use the same hotkey as Emacs.
I hope LINQPad can use "Alt+/" style autocomplete to speed up, it will be great in F# mode.
Comments
By "slow", do you mean that it's unergonomic to have to press Ctrl+Space, or are you experiencing a small freeze in the UI while the autocomplete figures out what to do?
A small freeze in the UI, I can notice it even I open the file for a moment and get the autocomplete list cache. I understand F# autocomplete is slow, it use F# service to get the data, not as fast as the C#.
The main reason is I didn't always use intellisense to complete a long name. In C# mode, I also like to have a normal word complete. Word complete without intellisense is faster and I can repeat the same hotkey to get the right word interactively. This feature is common in other editors.
Press Ctrl+Space or Alt+/ is ok for me.
Word complete (Code complete) = Ctrl + Space
Expand word = Alt + /
LINQPad didn't have expand word now.
Are you saying that word complete (without intellisense) builds a list by taking all the distinct words in the current file?
This would be of limited use, though, right? For example, if I type, "String.isn", autocompletion lets me quickly select "IsNullOrWhiteSpace" - this cannot happen without the language service.
Also, what benefit would it have in C# when the language-based autocompletion is fast?
Yes, the list contains all the words in the current file or other open files. Pressing word complete hot key will complete the nearest word above the current position.
Yes, without language service, it can't show "IsNullOrWhiteSpace".
But if there is already a "String.IsNULLOrWhiteSpace" above, I can only type "Str" or less characters to get the whole word "String.IsNULLOrWhiteSpace" with word complete. Word complete can be used with intellisense together. Word complete is faster to get the word already typed.
C# autocompletion is really good, there is no special benefit to use word complete, I just use expand word feature in rider IDE sometimes to complete some common long methods. But F# autocompletion is slow now, word complete is more useful in F# mode.