https://github.com/jamescherti/vim-pathaction
Execute the pathaction command-line tool from Vim/Neovim
https://github.com/jamescherti/vim-pathaction
pathaction vim
Last synced: 11 months ago
JSON representation
Execute the pathaction command-line tool from Vim/Neovim
- Host: GitHub
- URL: https://github.com/jamescherti/vim-pathaction
- Owner: jamescherti
- License: mit
- Created: 2025-02-21T12:47:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-09T19:27:05.000Z (about 1 year ago)
- Last Synced: 2025-07-27T11:56:29.245Z (11 months ago)
- Topics: pathaction, vim
- Language: Vim Script
- Homepage: https://github.com/jamescherti/vim-pathaction
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# vim-pathaction - Execute the pathaction command-line tool from Vim

Execute pathaction.yaml rules using the pathaction command-line tool from Vim.
(The [pathaction](https://github.com/jamescherti/pathaction) command-line tool enables the execution of specific commands on targeted files or directories. Its key advantage lies in its flexibility, allowing users to handle various types of files simply by passing the file or directory as an argument to the `pathaction` tool. The tool uses a `.pathaction.yaml` rule-set file to determine which command to execute. Additionally, Jinja2 templating can be employed in the rule-set file to further customize the commands.)
## Customizations
### Keybindings
Below are two examples of key bindings (`ee` to execute the "main" tag and `ei` to execute the "install" tag):
```vim
nnoremap ee :call pathaction#run("main")
nnoremap ei :call pathaction#run("install")
```
## Author and license
Copyright (C) 2021-2025 [James Cherti](https://www.jamescherti.com).
Distributed under terms of the MIT license.
## Installation
### Installation with Vim's built-in package manager (Vim 8 and above)
```bash
mkdir -p ~/.vim/pack/jamescherti/start
cd ~/.vim/pack/jamescherti/start
git clone --depth 1 https://github.com/jamescherti/vim-pathaction
vim -u NONE -c "helptags vim-pathaction/doc" -c q
```
### Installation with a third-party plugin manager
You can also install this Vim plugin with any third-party plugin manager such as Pathogen or Vundle.
## Links
- [vim-pathaction @GitHub](https://github.com/jamescherti/vim-pathaction)
- The `pathaction` command-line tool (requirement): [pathaction](https://github.com/jamescherti/pathaction)
- For Emacs users: [pathaction.el @GitHub](https://github.com/jamescherti/pathaction.el), an Emacs package that allows executing the `pathaction` command-line tool directly from Emacs.