Commit 1ca22d0ea3d3d12fba5e1c57bf478c8aa1c63f2b

Add :diff command to invoke `vim -d`
Uses selection of current pane when it contains more than one file.

Otherwise uses left pane file and right pane file keeping order
inside Vim.
Author: xaizek
Author date (UTC): 2020-04-20 14:54
Committer name: xaizek
Committer date (UTC): 2020-04-20 14:54
Parent(s): 0b87a5667fe7f5008a1ea796f019a2781176a632
Signing key: 99DC5E4DB05F6BE2
Tree: 77226eb07a3df93a907dfa1c05d0e45fc794849d
File Lines added Lines deleted
vifmrc 13 0
File vifmrc changed (mode: 100644) (index 5e3aab7..3c2ac42)
... ... command! mkcd! :mkdir! %a | cd %a
237 237 " run make in current directory " run make in current directory
238 238 command! make !!make %a command! make !!make %a
239 239
240 " use Vim to diff files
241 " uses selection of current pane when it contains more than one file
242 " otherwise uses left pane file and right pane file keeping order inside Vim
243 command! diff : if expand('%%c') == expand('%%f')
244 \ | if paneisat('right') && paneisat('bottom')
245 \ | execute '!vim -d %%C %%c'
246 \ | else
247 \ | execute '!vim -d %%c %%C'
248 \ | endif
249 \ | else
250 \ | execute '!vim -d %%f'
251 \ | endif
252
240 253 " ============================================================================== " ==============================================================================
241 254 " targeting Vim instances " targeting Vim instances
242 255
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/dotvifm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/dotvifm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master