Closed qlambert-pro closed 9 years ago
so I managed to fix it by modifying the script, namely I replaced: let cmdline = "ocp-indent --numeric --indent-empty --lines " . a:lnum . '-' let s:indents = systemlist(cmdline, getline('1','$')) by: let cmdline = "ocp-indent " . bufname("") . " --numeric --indent-empty --lines " . a:lnum . "-" let s:indents = split(system(cmdline), "\n")
The issue should probably remain open unless the problem has been solved ?
I don't understand what went wrong, though, and ocp-indent
should read from stdin rather than the buffer file, or results would get weird on unsaved buffers...
You are right, I forgot to update, but I made some other modifications. I can make a pull request with the fixed version I am using that does read from the standard input. Let me know if you are interested.
Please do! Thanks :)
Hi, I am having trouble using ocp-indent with vim. As far as I can tell the script is called but what is stored in s:indents always seem to be interpreted as 0 level of indentation.
I couldn't find any documentation for systemlist, so that led me to think that I may need to install something else for it to work since other users do not seem to have trouble using it.
Can someone tell me if the problem does come from there and what would be the solution ?