Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nfvs/vim-perforce
Perforce integration for Vim
https://github.com/nfvs/vim-perforce
p4 perforce vim vim-plugin
Last synced: 3 months ago
JSON representation
Perforce integration for Vim
- Host: GitHub
- URL: https://github.com/nfvs/vim-perforce
- Owner: nfvs
- Created: 2014-07-30T20:08:53.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-06-21T07:12:24.000Z (over 4 years ago)
- Last Synced: 2024-04-18T15:57:05.047Z (10 months ago)
- Topics: p4, perforce, vim, vim-plugin
- Language: Vim script
- Size: 24.4 KB
- Stars: 36
- Watchers: 3
- Forks: 13
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# perforce.vim
Vim Perforce integration for the 21st century!
No relation to [Tom Slee's](http://www.vim.org/scripts/script.php?script_id=167) or [Hari Krishna Dara's](http://vim.sourceforge.net/scripts/script.php?script_id=240) plugins.
## Installation
Vundle is the recommended way to install vim-perforce. Add this line to your .vimrc:
Bundle 'nfvs/vim-perforce'
Then run `:PluginInstall` inside Vim.
## Usage
By default, when trying to save a read-only file, a prompt to open the file for edit in Perforce is displayed.
Additionally, the following commands are available:
##### :P4info
Display perforce information.##### :P4edit
Start editing the current file (opened in the default changelist).##### :P4revert
Revert the current file (a confirmation prompt is displayed).##### :P4movetocl
Move the current file to a different changelist.## Settings
The following settings can be set in your `.vimrc` file:
##### g:perforce\_open\_on\_change _(default: 0)_
Prompt to open the file for edit in Perforce when starting to modify a read-only file.##### g:perforce\_open\_on\_save _(default: 1)_
Prompt to open the file for edit in Perforce when trying to write a read-only file (with :w!).##### g:perforce\_auto\_source\_dirs _(default: [])_
Restrict Perforce automatic operations (save/change read-only files) to a limited set of directories. Please note that on Windows backslashes need to be escaped. Example:`let g:perforce_auto_source_dirs = ['C:\\Users\\nfvs\\Perforce']`
##### g:perforce\_use\_relative\_paths _(default: 0)_
Send relative file paths to Perforce so it can automatically detect which root to use (useful when sharing a Perforce repository between Linux and Windows or when using Cygwin).##### g:perforce\_use\_cygpath _(default: 0)_
Use the cygpath utility to translate paths from Cygwin to absolute Windows paths. May work in cases where g:perforce\_use\_relative\_paths does not.##### g:perforce\_prompt\_on\_open _(default: 1)_
Whether to prompt the user when a file is open for edit (either on change or on save).## License
Copyright (C) Nuno Santos. Distributed under the same terms as Vim itself. See `:help license`.