# vim-client - send commands to the Vim editor
The **command-line tools `vim-client-edit`, `vim-client-diff`** and the **Python module `vim_client`** will allow you to connect to a Vim server and make it:
- Edit files or directories in new tabs,
- Compare files (similar to vimdiff),
- Evaluate expressions and return their result,
- Send commands to Vim.
It will allow you, for example, to make Vim edit or diff files from outside of Vim (e.g. from a shell like Bash, Zsh, etc.).
## License
Copyright (c) [James Cherti](https://www.jamescherti.com).
Distributed under terms of the MIT license.
## Requirements
- Python >= 3.0
- The Vim editor ('vim' or 'gvim' in $PATH. Vim must be compiled with |+clientserver|, which is the case of most Vim distributions, because the Python module **vim_client** uses command-line arguments `vim --remote-*`)
## Installation
```console
sudo pip install vim-client
```
## The 'vim-client-\*' command-line tools
Edit a file in the current window/tab:
```console
vim-client-edit file1
```
Edit multiple files/directories in separate tabs:
```console
vim-client-edit --tab file1 file2 file3
```
Edit multiple files/directories in stacked horizontal splits:
```console
vim-client-edit --split file1 file2
```
Edit multiple files/directories in side-by-side vertical splits (To open vertical splits on the right of the current window, use the Vim option `set splitright`):
```console
vim-client-edit --vsplit file1 file2
```
Edit and compare up to eight files in a new tab:
```console
vim-client-diff --tab file1 file2
```
## Recommendations
### Add aliases to ~/.bashrc
It is recommended to add the following aliases to your `~/.bashrc`:
```sh
alias gvim='vim-client-edit --tab'
alias vim='vim-client-edit --tab'
alias vi='vim-client-edit --tab'
alias vimdiff='vim-client-diff --tab'
```
### Start diff mode with vertical splits (vim-client-diff)
Add the following line to your `~/.vimrc`:
```viml
set diffopt+=vertical
```
### Create desktop launchers
File: `/usr/local/share/applications/vim-client-edit.desktop`
```
[Desktop Entry]
Name=vim-client-edit
GenericName=Vim Client Edit
Comment=Vim Client Edit
Exec=vim-client-edit --tab %F
Terminal=false
Type=Application
Keywords=Text;editor;
Icon=gvim
Categories=Utility;TextEditor;
StartupNotify=false
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
```
File: `/usr/local/share/applications/vim-client-diff.desktop`
```
[Desktop Entry]
Name=vim-client-diff
GenericName=Vim Client Diff
Comment=Vim Client Diff
Exec=vim-client-diff --tab %F
Terminal=false
Type=Application
Keywords=Text;editor;
Icon=gvim
Categories=Utility;TextEditor;
StartupNotify=false
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
```
## Links
- [vim-client @PyPI](https://pypi.org/project/vim-client/)
- [vim-client @GitHub](https://github.com/jamescherti/vim-client)
- [Vim documentation about +clientserver and 'vim \-\-remote'](http://vimdoc.sourceforge.net/htmldoc/remote.html) (`:help remote.txt`)
Raw data
{
"_id": null,
"home_page": "https://github.com/jamescherti/vim-client",
"name": "vim-client",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6, <4",
"maintainer_email": "",
"keywords": "vim,server,remote,edit,client,clientserver",
"author": "James Cherti",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/4f/bd/729dfcea99ad554b27ba9aa7f80f842859c28e7940f8e3dad121bd3ed0d3/vim-client-1.0.5.tar.gz",
"platform": null,
"description": "# vim-client - send commands to the Vim editor\n\nThe **command-line tools `vim-client-edit`, `vim-client-diff`** and the **Python module `vim_client`** will allow you to connect to a Vim server and make it:\n- Edit files or directories in new tabs,\n- Compare files (similar to vimdiff),\n- Evaluate expressions and return their result,\n- Send commands to Vim.\n\nIt will allow you, for example, to make Vim edit or diff files from outside of Vim (e.g. from a shell like Bash, Zsh, etc.).\n\n## License\n\nCopyright (c) [James Cherti](https://www.jamescherti.com).\n\nDistributed under terms of the MIT license.\n\n## Requirements\n\n- Python >= 3.0\n- The Vim editor ('vim' or 'gvim' in $PATH. Vim must be compiled with |+clientserver|, which is the case of most Vim distributions, because the Python module **vim_client** uses command-line arguments `vim --remote-*`)\n\n## Installation\n\n```console\nsudo pip install vim-client\n```\n\n## The 'vim-client-\\*' command-line tools\n\nEdit a file in the current window/tab:\n```console\nvim-client-edit file1\n```\n\nEdit multiple files/directories in separate tabs:\n```console\nvim-client-edit --tab file1 file2 file3\n```\n\nEdit multiple files/directories in stacked horizontal splits:\n```console\nvim-client-edit --split file1 file2\n```\n\nEdit multiple files/directories in side-by-side vertical splits (To open vertical splits on the right of the current window, use the Vim option `set splitright`):\n```console\nvim-client-edit --vsplit file1 file2\n```\n\nEdit and compare up to eight files in a new tab:\n```console\nvim-client-diff --tab file1 file2\n```\n\n## Recommendations\n\n### Add aliases to ~/.bashrc\n\nIt is recommended to add the following aliases to your `~/.bashrc`:\n```sh\nalias gvim='vim-client-edit --tab'\nalias vim='vim-client-edit --tab'\nalias vi='vim-client-edit --tab'\nalias vimdiff='vim-client-diff --tab'\n```\n\n### Start diff mode with vertical splits (vim-client-diff)\n\nAdd the following line to your `~/.vimrc`:\n```viml\nset diffopt+=vertical\n```\n\n### Create desktop launchers\nFile: `/usr/local/share/applications/vim-client-edit.desktop`\n```\n[Desktop Entry]\nName=vim-client-edit\nGenericName=Vim Client Edit\nComment=Vim Client Edit\nExec=vim-client-edit --tab %F\nTerminal=false\nType=Application\nKeywords=Text;editor;\nIcon=gvim\nCategories=Utility;TextEditor;\nStartupNotify=false\nMimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;\n```\n\nFile: `/usr/local/share/applications/vim-client-diff.desktop`\n```\n[Desktop Entry]\nName=vim-client-diff\nGenericName=Vim Client Diff\nComment=Vim Client Diff\nExec=vim-client-diff --tab %F\nTerminal=false\nType=Application\nKeywords=Text;editor;\nIcon=gvim\nCategories=Utility;TextEditor;\nStartupNotify=false\nMimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;\n```\n\n## Links\n\n- [vim-client @PyPI](https://pypi.org/project/vim-client/)\n- [vim-client @GitHub](https://github.com/jamescherti/vim-client)\n- [Vim documentation about +clientserver and 'vim \\-\\-remote'](http://vimdoc.sourceforge.net/htmldoc/remote.html) (`:help remote.txt`)\n\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Connect to Vim server, edit files, evaluate Vim expressions, and send commands to Vim.",
"version": "1.0.5",
"split_keywords": [
"vim",
"server",
"remote",
"edit",
"client",
"clientserver"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0c58694c2f1354991203cb7c6b7bda08b320c52d1f1e10f87ffba062f96f1bcc",
"md5": "25f5156503d42d5820a992c37da41e54",
"sha256": "7314c6546c5856d1861675af4ff7e37af3c2cd283469bb8c6b20c9be5c8bcd93"
},
"downloads": -1,
"filename": "vim_client-1.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "25f5156503d42d5820a992c37da41e54",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6, <4",
"size": 9119,
"upload_time": "2023-01-29T21:01:34",
"upload_time_iso_8601": "2023-01-29T21:01:34.632019Z",
"url": "https://files.pythonhosted.org/packages/0c/58/694c2f1354991203cb7c6b7bda08b320c52d1f1e10f87ffba062f96f1bcc/vim_client-1.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4fbd729dfcea99ad554b27ba9aa7f80f842859c28e7940f8e3dad121bd3ed0d3",
"md5": "fb3f2559c6424b614da2e231695695ef",
"sha256": "1010156d9efcdd064166011bd59dd6c8a56787863586108df38e8c21f55eef4b"
},
"downloads": -1,
"filename": "vim-client-1.0.5.tar.gz",
"has_sig": false,
"md5_digest": "fb3f2559c6424b614da2e231695695ef",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6, <4",
"size": 8643,
"upload_time": "2023-01-29T21:01:36",
"upload_time_iso_8601": "2023-01-29T21:01:36.511927Z",
"url": "https://files.pythonhosted.org/packages/4f/bd/729dfcea99ad554b27ba9aa7f80f842859c28e7940f8e3dad121bd3ed0d3/vim-client-1.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-29 21:01:36",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "jamescherti",
"github_project": "vim-client",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "vim-client"
}