Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yogeshdhamija/terminal-command-motion.vim
Add a motion to vim representing a terminal command (in a terminal buffer) so you can yank it, or navigate by commands rather than words or lines.
https://github.com/yogeshdhamija/terminal-command-motion.vim
neovim neovim-plugin vim vim-plugin vim-plugins
Last synced: 3 months ago
JSON representation
Add a motion to vim representing a terminal command (in a terminal buffer) so you can yank it, or navigate by commands rather than words or lines.
- Host: GitHub
- URL: https://github.com/yogeshdhamija/terminal-command-motion.vim
- Owner: yogeshdhamija
- License: mit
- Created: 2022-01-24T05:02:11.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-28T20:27:39.000Z (almost 2 years ago)
- Last Synced: 2024-06-10T01:38:43.813Z (5 months ago)
- Topics: neovim, neovim-plugin, vim, vim-plugin, vim-plugins
- Language: Vim Script
- Homepage:
- Size: 51.8 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# terminal-command-motion.vim
[![CI](https://github.com/yogeshdhamija/terminal-command-motion.vim/actions/workflows/ci.yml/badge.svg)](https://github.com/yogeshdhamija/terminal-command-motion.vim/actions/workflows/ci.yml) -> status for latest vim
[![CI](https://github.com/yogeshdhamija/terminal-command-motion.vim/actions/workflows/ci.yml/badge.svg)](https://github.com/yogeshdhamija/terminal-command-motion.vim/actions/workflows/ci.yml) -> status for latest neovim![gif](https://user-images.githubusercontent.com/4468354/150797271-0293d84c-a9e7-4c89-a3e8-4b0a4e68ecca.gif)
## To Install
Using [vim-plug](https://github.com/junegunn/vim-plug):
```vim
Plug 'yogeshdhamija/terminal-command-motion.vim'
```Works in both [vim](https://www.vim.org/), and [neovim](https://neovim.io/).
## Usage
This plugin adds a "terminal command" motion to vim.`yacm` to (Y)ank (A)ll of a (C)o(m)mand in a terminal buffer
...and associated commands like `3cm`, `2CM`, `yicm`, etc.
See `:h terminal-command-motion.txt` for details (or check the `/doc` folder).
## Required Setup
You must set `g:terminal_command_motion_prompt_matcher` (see `:h g:terminal_command_motion_prompt_matcher`).This is the search (vim regex enabled) that will be used to find your terminal prompt. Example:
```
let g:terminal_command_motion_prompt_matcher = 'prompt\$'
```## To Test
Locally, run:
```
./test.sh
```
In docker, run:
```
docker build . -t testing_terminal-command-motion.vim && docker run testing_terminal-command-motion.vim
```