Enable filename tab completion everywhere?

7 views (last 30 days)
neutral_bias
neutral_bias on 5 Aug 2016
Commented: Trenton on 26 Aug 2016
Hi,
is there a way of enabling filename tab completion everywhere (as soon as I start entering a string), not just when filling in certain function's arguments? In most other programmers' editors and IDEs (vim, emacs, IPython, Eclipse, ...) this is a standard feature, and saves a lot of time. In Matlab, it only seems to be available for select functions, which is a pain.
Best, Tobias
  4 Comments
neutral_bias
neutral_bias on 7 Aug 2016
Edited: neutral_bias on 7 Aug 2016
So, to make this more clear, what I'd like to have is that if I define a variable to a string constant (or give a string constant as a function argument), matlab tab completion should offer me the file names that match what I've typed so far. So if I type this, for example:
infilename = '/somedir/a<Tab>
... then I'd like Matlab to open a popup menu and show me all the files in /somedir that start with "a".
This behaviour already exists in Matlab, but only for certain arguments to certain built-in functions, like the first argument to load(). If you do this:
load('/somedir/a<Tab>
... you get the popup that I described above (obviously, if you're on windows, replace "/somedir" with "c:\somedir"). I'd just like to get it whenever I type a string constant, not just for certain arguments to certain functions.
Thanks,
'bias
Trenton
Trenton on 26 Aug 2016
This used to be possible, as published at undocumentedmatlab. However, I can't find the file they reference TC.xml in 2016a. I also didn't see anything similar after a cursory grep, suggested by stackOverflow. I too would like to be able to this, but I think they have intentionally made it difficult.

Sign in to comment.

Answers (0)

Categories

Find more on File Operations in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!