xaizek / dotvim (License: Unspecified) (since 2018-12-07)
Vim configuration and plugins.
Commit ecf3d8a81206cfdac5bc40ec1c61773e0b00adbf

Improve :DiffOrig command with code highlight
Author: xaizek
Author date (UTC): 2021-07-04 14:57
Committer name: xaizek
Committer date (UTC): 2021-07-04 14:57
Parent(s): c61de882364922be8d7adcd406379ec86e67f128
Signing key: 99DC5E4DB05F6BE2
Tree: c754f3daeb1ea24348a4eb41eb30073b170fe962
File Lines added Lines deleted
vimrc 23 4
File vimrc changed (mode: 100644) (index b95b94f..26557f8)
... ... let g:vimsyn_folding = 'f'
801 801 " ============================================================================== " ==============================================================================
802 802 " misc commands and functions " misc commands and functions
803 803
804 if !exists(":DiffOrig")
805 command DiffOrig set noautowrite | vert new | set bt=nofile | r # | 0d_
806 \ | diffthis | wincmd p | diffthis | set autowrite
807 endif
804 function! s:DiffOrig()
805 set noautowrite
806
807 try
808 let l:ft = &filetype
809
810 leftabove vert new
811 set buftype=nofile
812
813 read #
814 0delete_
815
816 " set file type here to not do it to an empty buffer
817 let &filetype = l:ft
818
819 diffthis
820 wincmd p
821 diffthis
822 finally
823 set autowrite
824 endtry
825 endfunction
826 command! DiffOrig call s:DiffOrig()
808 827
809 828 " query title of page at URL in the current line (whole line) and insert it one " query title of page at URL in the current line (whole line) and insert it one
810 829 " line above " line above
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/dotvim

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

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