Auto complete variable or typenames in current file

I've been a great fan of Emacs in the past and used JDEE for sometime
with Java. One of the really nice modes provided an auto completion
function for typenames or variables. So for example if you had a long
variable/field name you could type the first few letters and hit a key
to complete, each match would be cycled. The Emacs function would check
through the current buffer (source file) for matches and cycle through
each in turn.

Has this kind of functionality been suggested or discussed for Resharper?

I also miss the ability in Windows editors to split the screen
horizontally and vertically, flip between the panes and load different
files into each pane. This becomes very useful when you want to flip to
the definition of a class or method and then flip back and leave the
code for reference. Most GUI based editors tile the windows (with title
bar adornmensts) which always felt too cumbersome (Codewright 6.x for
example). Not sure what could be done within a VS.NET plugin but
wondered if anyone else found this useful - One of the features I sorely
miss from Emacs.


Regards
Darren

7 comments
Comment actions Permalink

Darren,

I'm not sure I completely understand your request. This would be useful
if you could provide an example of use case. Currently ReSharper does
suggest variable names from their type name (e.g. if you're declaring a
variable of type SampleBroker, ReSharper will suggest names "sampleBroker"
and "broker").

Regarding editor split - unfortunately it's too diffucult to extend
VS.NET this way.

--
Oleg Stepanov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Darren Syzling" <dsyzling@optial.com> wrote in message
news:c4ibj7$smi$1@is.intellij.net...

I've been a great fan of Emacs in the past and used JDEE for sometime
with Java. One of the really nice modes provided an auto completion
function for typenames or variables. So for example if you had a long
variable/field name you could type the first few letters and hit a key
to complete, each match would be cycled. The Emacs function would check
through the current buffer (source file) for matches and cycle through
each in turn.

>

Has this kind of functionality been suggested or discussed for Resharper?

>

I also miss the ability in Windows editors to split the screen
horizontally and vertically, flip between the panes and load different
files into each pane. This becomes very useful when you want to flip to
the definition of a class or method and then flip back and leave the
code for reference. Most GUI based editors tile the windows (with title
bar adornmensts) which always felt too cumbersome (Codewright 6.x for
example). Not sure what could be done within a VS.NET plugin but
wondered if anyone else found this useful - One of the features I sorely
miss from Emacs.

>
>

Regards
Darren

>


0
Comment actions Permalink

Darren,
Standard Visual Studio functionality available through menu items
"Window/New Horizontal Tab Group" and "Window/New Vertical Tab Group" may
answer your request about splitting editor.

--
Andrey Simanovsky
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"



"Darren Syzling" <dsyzling@optial.com> wrote in message
news:c4ibj7$smi$1@is.intellij.net...

I've been a great fan of Emacs in the past and used JDEE for sometime
with Java. One of the really nice modes provided an auto completion
function for typenames or variables. So for example if you had a long
variable/field name you could type the first few letters and hit a key
to complete, each match would be cycled. The Emacs function would check
through the current buffer (source file) for matches and cycle through
each in turn.

>

Has this kind of functionality been suggested or discussed for Resharper?

>

I also miss the ability in Windows editors to split the screen
horizontally and vertically, flip between the panes and load different
files into each pane. This becomes very useful when you want to flip to
the definition of a class or method and then flip back and leave the
code for reference. Most GUI based editors tile the windows (with title
bar adornmensts) which always felt too cumbersome (Codewright 6.x for
example). Not sure what could be done within a VS.NET plugin but
wondered if anyone else found this useful - One of the features I sorely
miss from Emacs.

>
>

Regards
Darren

>


0
Comment actions Permalink

Sure let's say I'm adding code to a method and I've declared something like:

MD5CryptoServiceProvider myServiceProvider = new MD5CryptoServiceProvider();

I add some lines and then want to reference myServiceProvider but I'm
sick of typing this variable name in full all of the time. In Emacs I
would type 'my' and then hit a key, it would search back over the buffer
looking for strings (it wasn't very intelligent about context since it
didn't parse the language in the buffer) and prompt me with
myServiceProvider. If that's the variable/string I require I carry on
typing if not I hit the key again and it continues to search back for
further matches of 'my*'. I think the Emacs function also had an option
to search all current open buffers as well.

Is this a little clearer? It just saves typing long variable names or
class names when you've already used them within the existing source
file. The Emacs version wasn't that clever in terms of context but if
you've parsed the file and understand the source structure there might
be more relevant suggestions that you could offer the user to save typing.


Darren


0
Comment actions Permalink

Thanks Andrey, yes I've seen those options they just seem very clunky in
comparison to the fast split available on Emacs - probably due to the
all the extra tabs and window adornments.

I'll have to play around with some key assignments to check if I can
switch between these tab groups. An initial play with the menus seemed
to switch between the groups one minute and then close the entire window
set the next.

I understand this would be very difficult to achieve with a VS.NET
plug-in anyway.

Darren

0
Comment actions Permalink

Darren,

Yes, not it's perfectly clear. I wonder if you gave a try to our code
completion features. You can see detailed description on our features pages,
but basically you can

1) choose a symbol in the current context starting with the typed prefix
by pressing Ctrl+Space
2) choose a symbol in the current context which matches the expected
type by pressing CtrlShiftSpace
3) choose a type name from the entire solution (not neccessarily
imported) by pressing CtrlAltSpace

Hope this helps.
--
Oleg Stepanov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Darren Syzling" <dsyzling_no_spam_@optial.com> wrote in message
news:c4jkhh$7um$1@is.intellij.net...

Sure let's say I'm adding code to a method and I've declared something

like:
>

MD5CryptoServiceProvider myServiceProvider = new

MD5CryptoServiceProvider();
>

I add some lines and then want to reference myServiceProvider but I'm
sick of typing this variable name in full all of the time. In Emacs I
would type 'my' and then hit a key, it would search back over the buffer
looking for strings (it wasn't very intelligent about context since it
didn't parse the language in the buffer) and prompt me with
myServiceProvider. If that's the variable/string I require I carry on
typing if not I hit the key again and it continues to search back for
further matches of 'my*'. I think the Emacs function also had an option
to search all current open buffers as well.

>

Is this a little clearer? It just saves typing long variable names or
class names when you've already used them within the existing source
file. The Emacs version wasn't that clever in terms of context but if
you've parsed the file and understand the source structure there might
be more relevant suggestions that you could offer the user to save typing.

>
>

Darren

>
>


0
Comment actions Permalink

Thanks Oleg, completely missed this functionality - that more than fits
the bill - just need to get used to using the three functions...


Thanks
Darren

Oleg Stepanov (JetBrains) wrote:

Darren,

Yes, not it's perfectly clear. I wonder if you gave a try to our code
completion features. You can see detailed description on our features pages,
but basically you can

1) choose a symbol in the current context starting with the typed prefix
by pressing Ctrl+Space
2) choose a symbol in the current context which matches the expected
type by pressing CtrlShiftSpace
3) choose a type name from the entire solution (not neccessarily
imported) by pressing CtrlAltSpace

Hope this helps.


0
Comment actions Permalink

Great! I'm glad this helped you.

--
Oleg Stepanov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Darren Syzling" <dsyzling_no_spam_@optial.com> wrote in message
news:c4jule$fac$1@is.intellij.net...

Thanks Oleg, completely missed this functionality - that more than fits
the bill - just need to get used to using the three functions...

>
>

Thanks
Darren

>

Oleg Stepanov (JetBrains) wrote:

>

Darren,

>

Yes, not it's perfectly clear. I wonder if you gave a try to our

code

completion features. You can see detailed description on our features

pages,

but basically you can

>

1) choose a symbol in the current context starting with the typed

prefix

by pressing Ctrl+Space
2) choose a symbol in the current context which matches the expected
type by pressing CtrlShiftSpace
3) choose a type name from the entire solution (not neccessarily
imported) by pressing CtrlAltSpace

>

Hope this helps.

>


0

Please sign in to leave a comment.