Comments (11)
Sure, I look into the "Free 20-User Edition" edition and learn the basics. Afterwards I'll decide if it would be easy enough to include! :-)
from vim-signify.
Cool, let me know if you want help. Is there a tutorial for adding vcs support to signify? I didn't see anything in the docs on what it takes to add a new architecture.
Great plugin by the way!
thanks!
-s.
On Jul 29, 2013, at 9:25 AM, Marco Hinz [email protected] wrote:
Sure, I look into the "Free 20-User Edition" edition and try to learn the basics. Afterwards I'll decide if it would be easy enough to include! :-)
—
Reply to this email directly or view it on GitHub.
from vim-signify.
So.. I just downloaded the p4 commandline client, but it obviously needs a "valid Perforce server network address 'P4PORT' for most operations". Let's see if I can set that up.
Basically one just need to figure out how to get a unified diff from the VCS. Afterwars I'd just add a function "sy#repo#get_diff_perforce()" and extend the internal list in "sy#repo#detect()" by 'perforce'.
Example for hg:
function! sy#repo#get_diff_hg(path) abort
if executable('hg')
let diff = system('hg diff --nodates -U0 -- '. sy#util#escape(a:path))
return v:shell_error ? '' : diff
endif
endfunction
No magic at all. It's really just reading the stdout of one external command. (The -U0 option is important in this case, so all diffs look the same for all VCS.)
from vim-signify.
So perforce uses external diff tools, but you can set it via the P4DIFF variable. So you could do:
env P4DIFF=diff p4 diff -du
To generate the unified diff…
So I think that would look like:
function! sy#repo#get_diff_perforce(path) abort
if executable('perforce')
let diff = system('env P4DIFF=diff p4 diff -du '. sy#util#escape(a:path))
return v:shell_error ? '' : diff
endif
endfunction
Thanks! Does that help?
On Jul 29, 2013, at 9:39 AM, Marco Hinz [email protected] wrote:
So.. I just downloaded the p4 commandline client, but it obviously needs a "valid Perforce server network address 'P4PORT' for most operations". Let's see if I can set that up.
Basically one just need to figure out how to get a unified diff from the VCS. Afterwars I'd just add a function "sy#repo#get_diff_perforce()" and extend the internal list in "sy#repo#detect()" by 'perforce'.
Example for hg:
function! sy#repo#get_diff_hg(path) abort
if executable('hg')
let diff = system('hg diff --nodates -U0 -- '. sy#util#escape(a:path))
return v:shell_error ? '' : diff
endif
endfunction
—
Reply to this email directly or view it on GitHub.
from vim-signify.
Okay, so when -d
is used to provide options to diff(1), then it should be -dU0
. Otherwise it looks good to me.
EDIT:
git fetch && git checkout perforce-support
Does this work as intended?
from vim-signify.
yup, looks great! Thanks!
from vim-signify.
Okay, this was easy. :-)
I'll merge it into master then. Thanks for the feedback!
BTW, make sure to set g:signify_vcs_list
to only those VCS you really use.
from vim-signify.
Awesome, thanks for the quick response!
I just set that up today actually. Very nice!
Another thing you might consider is integration with vim-airline, but that is an issue for another thread :-).
Again - great work and thanks for the plugin!
On Jul 29, 2013, at 4:11 PM, Marco Hinz [email protected] wrote:
Okay, this was easy. :-)
Awesome, I'll merge it into master then. Thanks for the feedback!
BTW, make sure to set g:signify_vcs_list to only those VCS you really use.
—
Reply to this email directly or view it on GitHub.
from vim-signify.
I'm glad you like it!
Out of curiousity: do you mean a function that can be included in the statusline? (re: airline integration)
from vim-signify.
Yeah, exactly. Something simple like # of lines changed? Or even that a file differs from the repo.
On Jul 29, 2013, at 4:32 PM, Marco Hinz [email protected] wrote:
I'm glad you like it!
Out of curiousity: do you mean a function that can be included in a statusline? (re: airline integration)
—
Reply to this email directly or view it on GitHub.
from vim-signify.
Actually I'm playing around with something similar at the moment. autoload/sy/repo.vim
already contains sy#repo#get_stat_git()
which populates the quickfix list of all changed files (plus number of added/deleted lines) in the repo. Because of this you could easily navigate between changed files via :cn
/:cp
(which I have mapped to the left/right arrow keys) etc.
from vim-signify.
Related Issues (20)
- Show git changes by colour HOT 1
- Visual bug HOT 1
- Jump to a line number without counting uncommited lines HOT 1
- For some files, the ~ symbol will always be displayed HOT 2
- Is it possible to color the line number instead of a sign? HOT 2
- Custom `numhl` highlightings are ignored HOT 2
- Vim-signify does not work. HOT 5
- Get "Undefined variable: g:signify_detecting" error when I start vim. HOT 1
- signify creates infinite highlight groups HOT 3
- Sign Blocks and lua file
- [Feature Request] Window borders for SignifyHunkDiff
- Support for DesignSync (dssc) version control system HOT 1
- documentation for legacy branch
- open all folds on disable signify folds
- Support environment variables in diff commands HOT 1
- `List index out of range` caused by missing priority in `sign place` output
- Error when opening hunk diff floating window on neovim HOT 1
- `Key not present in Dictionary` errors when using `g:signify_vcs_cmds` HOT 2
- fossil: -c 0 currently (<=fossil-2.23) does not work as expected (uses default number of context lines) HOT 1
- Remove trailing white spaces on the changed lines HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-signify.