Suppose I have a local csv file that is located in /home/my_data/data.csv. Suppose I also have some code that looks like this:
import pandas as pd
df = pd.read_csv(PATH_TO_MY_DATA)
I was curious if it were possible to have local paths be tab completed in a function like read_csv() (or any function really)?
In other words, once I start writing pd.read_csv('/home/my_' and then hit tab, is it possible to have a window popup or something that will tab complete to pd.read_csv('/home/my_data/'?
Actually I do have have this kind of completion, but i don’t remember if I had to configure it.
But there is a good old keybinding if you know you want a file:
“C-x C-f” in insert mode which invoke company-files
Note: this works on vanilla vim too
@VincentRavera with the example that I provide in the initial post, C-x C-f gives me a message saying Cannot complete at point. Any idea what’s going on there?
Your second suggestion worked. I wonder if it’s something to do with python backend or something. I will mess around with it and report back if I have a solution. Thank you for your help!