2

Here is what I am doing now:

vim + $1 -c "set titlestring=$title guioptions-=m guioptions-=r lines=66 columns=239" -c ":source .vim_map" -c "sp .help.txt" -c ":wincmd j"

I would like to open the .help.txt in split window but as read-only where the other file (the $1 as it is in the script) to be writable.

How can I do this?

Regards, Piotr

1

You can use the :sview command, which opens the file in a split and sets 'readonly' on it.

vim ... -c "sview .help.txt" ...
1

I found a way. First split the window, then view the file.

Replace this -c "sp .help.txt" with this -c "sp" -c "view .help.txt"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.