2

What is the syntax of the Locations field in the Find and Replace pane of LightTable? (which appears when hitting CTRL-SHIFT-F, or CTRL+SPACE then Searcher: show)

I would like to exclude all files of the docs/ subfolder, as well as all *.txt and *.csv files of my workspace. What should I enter in the Locations field to exclude them from a search & replace?

Or inversely, I'd like to include only the files from the src/ subfolder. How would I accomplish that?

olange
  • 165
  • 2
  • 7
  • Per default, the Locations field contains ``, which looks like a symbolic location. [Sublime Text](http://stackoverflow.com/questions/13706965/limit-file-search-scope-in-sublime-text-2) also uses symbolic locations and allows to include/exclude folders and files from the search with patterns and symbolic locations, such as `-/docs/*,-*.csv,-*.txt` or `, `. Do we have such features in LightTable also? – olange Dec 15 '14 at 10:44
  • Looking at the [source code](https://github.com/LightTable/LightTable/blob/a950c188f2cee0fa397ea7ad0bfbc4ccdad473d0/src/lt/objs/search.cljs#L46) of LightTable (as of version 0.7.2), `` is the only symbolic location being supported, and it must be entered as is. – olange Dec 22 '14 at 08:22

1 Answers1

2

There doesn't seem to be a way to exclude directories or file patterns right now. However, you can specify which directories to include. You will have to write the whole path though (relative paths use Light Table's application directory). If you want to have more than one path you can separate them by using a comma:

/absolute/path/to/first/dir, /absolute/path/to/second/dir
Mattias W
  • 146
  • 2
  • 3
  • Many thanks for your answer. Specifying absolute paths does work. And as discussed in the Google Group thread you mentioned, I also found that `~` does not expand to the user home on my Mac. – olange Dec 22 '14 at 08:19