Closed chrisgrounds closed 5 years ago
The documentation is lacking. It's just a field of CommandOption
which is passed as the first argument to functions that you define as a (neo)vim command.
There really doesn't exist a whole lot in the standard library to do things. If you have an idea for a nice API, feel free to open a PR on nvim-hs-contrib repository which could be considered as the standard library.
Hi again,
I'm not sure if github issues are the place for this, but I don't know where else to ask.
So I'm wondering if there is an idiosyncratic way to read and write to a file with nvim-hs? Obviously, since we are using Haskell we could just use Haskell's built-in
readFile
andwriteFile
commands, but on the other hand looking atRangeSpecification
(http://hackage.haskell.org/package/nvim-hs-2.0.0.0/docs/Neovim.html#t:RangeSpecification) I can see there are options forCurrentLine
,WholeFile
, andRangeCount
which would suggest the idiosyncratic way would be to use something else internal to nvim-hs, but I'm not clear what that is.What would your recommendation for reading/writing a file to perform some modifications to the text inside be?