Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vimdiff does not work with suda.vim #32

Open
IMOKURI opened this issue Sep 1, 2020 · 2 comments
Open

vimdiff does not work with suda.vim #32

IMOKURI opened this issue Sep 1, 2020 · 2 comments

Comments

@IMOKURI
Copy link

IMOKURI commented Sep 1, 2020

nvim -u minimal_init.vim -d <ファイル1> <ファイル2> のように開いたときに、最初のファイルが開かれてしまい、横並びで表示ができないのですが、表示する方法はありますでしょうか。

neovim バージョン

$ nvim --version
NVIM v0.5.0-nightly-87-g2bbbb34ce
Build type: Release
LuaJIT 2.1.0-beta3

minimal_init.vim

let g:suda_smart_edit = 1

set runtimepath=$VIMRUNTIME

set packpath=./

で、 pack/minimal/start/ 配下に clone しています。

よろしくお願いいたします。

@lambdalisue
Copy link
Owner

nvim -d A B はサポートできていないようです。
とりあえず表示したい場合は、かわりに Vim に入ってからサイドバイサイドで開き、それぞれで diffthis を実行する等で対処してください。

@lambdalisue lambdalisue changed the title diffモードで開けない vimdiff does not work with suda.vim Sep 8, 2020
@sleepywitti
Copy link

Hello,
thanks to Google Translator I could read the Japanese messages to find out you have the same problem like me. Also it seems to be the same problem like in issue 23.
I have no fix for suda, but found the following solution to work. This way, suda_smart_edit will be disabled when nvim is opened using the -d argument:

if ! &diff
  let g:suda_smart_edit = 1
endif 

I hope it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants