how to get directory names under a path in Vim script?
问题 I want a simple solution to get directory names under a path in vim script. Here is my tried ways: the code. https://gist.github.com/4307744 Function is at line L84. I use this function as complete function for input(). So this function need to return a list of directory names under a path. e.g. to/path/ - a/ - b/ I want to get a and b . I tried to find vim internal functions with :help functions . only found globpath() , but it will return full path. So does anyone have a simple solution ?