Add support for multiple files, line number, -o -O -p cmd line arguemnt#87
Add support for multiple files, line number, -o -O -p cmd line arguemnt#87lguarda wants to merge 10 commits intosamjwill:mainfrom
Conversation
|
Hi lguarda! Thanks for the PR! I appreciate that you took some time to dedicate to looking into potential improvements for the plugin. I want to be upfront that at the moment, I'm quite low on bandwidth, and may not be able to review for a while. I hope to get to it eventually, but it could take some time. Regarding |
|
Ok thanks it something that i never used so i didn't even think of next/prev, i will continue to update this PR and keep the default behavior with argadd + next/prev |
Improvement: - directory can be open - multiple files are supported - cmd line argument -o -O -p are supported to open in split vsplit or tab - cmd line file option + is also supported so `nvim file +32` will i open file at the line 32
…ion in a dictionary Also change unit test since the scope of unception_arg_parse as change
…o support line number
…nd in another tab)
in lua number if number will always be asserted as true
```lua
if 0 then print("number is == true") end
```
And in viml boolean doesn't exit
So for example this:
nvim --cmd "let g:unception_disable=0"
will still disable unception since in lua `if 0` == `if true`
we could also do this instead
```
nvim --cmd "lua vim.g.unception_disable=false"
```
but i think it's better to also support viml
In This PR which add some cmd line option parsing capabilities
Added:
vim.g.unception_multi_file_open_methodso for example by default the argadd method is used, so only one file will be visisble
but if you type
nvim file1 file2 -Oboth file will be open in a vsplitFixed:
nvim --cmd "let g:unception_disable=0"now 0 is set to false so lua code handle it properlyall boolean config value can be set to 0 in viml this will be handled as false
Example usage
What's remaining to do:
Actualy vim.fn.* will do this lua/viml translation, so it's seems better to use vim.rpcrequest/notify