andri-ch / gotoword

vim plugin that gives users the possibility to write and access documentation about the word or expr. under cursor
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Create context enforcers that test that some conditions for the context are met #37

Open andri-ch opened 9 years ago

andri-ch commented 9 years ago

when we have context that was determined based on collected data & reasoning , we need a command to make sure that context is valid - a context enforcer.

Eg. user wants info about "bin". But "bin" can be anything, but especially a Unix directory located under / or /usr, etc. So, in the "system diretory" context, it should check that "bin" is a dir, not a file (maybe using file and its absolute path -> that parent is / or /usr, etc.) More than one enforcer could be applied (and stacked) for a word. One enforcer should be: detect_filetype(), detect_parent(), etc.