user4206400
user4206400

Reputation:

Is there an autocomplete for Dr. Racket?

I usually use Sublime text editor and gnome terminal to edit and run my programs. Due to educational purposes, I am using the IDE Dr. Racket.

I could not find an autocomplete feature to use while typing. I checked this out on google and at Dr. Racket's menu.

For instance, if I am calling a function already defined I would like to accelerate the process of typing the functions name. I have tried using control + /, but it does not work as an autocomplete for variables and procedures already defined.


Edit

@Sylwester, look, I tried that with a previous defined function, named square. It did not work:enter image description here

Upvotes: 22

Views: 7787

Answers (2)

Metaxal
Metaxal

Reputation: 1123

On top of the default autocomplete, there are various other options:

  • The drcomplete package provides several autocomplete features,
  • The quickscript-extra package contains the dynamic-abbrev script (autocomplete based on the contents of the file) and complete-word script (completion based on a given dictionary),
  • The quickscript-competition-2020 package contains the fishy-completion script (lexical-based completion).

For the latter 2, you get scripts entries in the Scripts menu in DrRacket, plus default keybindings that can be changed by editing the scripts. (Also note that the other scripts installed at the same time can be deactivated from the Scripts|Manage|Disable scripts… menu.)

Upvotes: 7

Sylwester
Sylwester

Reputation: 48775

Image of list of matched

Linux and Windows

CTRL + /.

Mac OSX

Command + /

The last "key" might not be a button on its own and if that's so it needs to be the combination to make a /. eg. on my norwegian keyboard its CTRL + SHIFT + 7 since SHIFT + 7 makes a /.

I have no idea where it gets it's matches from since I see it finds fold even when it is not called that in #lang racket. It does not seem to catch user procedures either.

This answer is based on information from a racket mailing list entry from 2011. It's not documented in DrRacket shotcuts page so it might not be officially supported.

Upvotes: 21

Related Questions