1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-02 22:58:01 +00:00

Add Filter Lines Through An External Program as a vim til.

This commit is contained in:
jbranchaud
2015-08-11 23:04:49 -05:00
parent 016793bde9
commit 0d91482323
2 changed files with 21 additions and 0 deletions

View File

@@ -149,6 +149,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
- [Create A New File In A New Directory](vim/create-a-new-file-in-a-new-directory.md)
- [Edges Of The Selection](vim/edges-of-the-selection.md)
- [End Of The Word](vim/end-of-the-word.md)
- [Filter Lines Through An External Program](vim/filter-lines-through-an-external-program.md)
- [Generate and Edit Rails Migration](vim/generate-and-edit-rails-migration.md)
- [Head of File Name](vim/head-of-file-name.md)
- [Help For Non-Normal Mode Features](vim/help-for-non-normal-mode-features.md)

View File

@@ -0,0 +1,20 @@
# Filter Lines Through An External Program
Vim allows you to filter lines from your current buffer through an external
program. For instance, if you have some ugly looking json that you'd like to
format in a readable way, you might want to filter it through an external
json pretty printer program.
To filter the entire file through an external program, use
```
:%!! <external-program>
```
Or you can make a visual selection and just filter that
```
:'<,'>!! <external-program>
```
See `:h !!` for more details.