tpope/vim-abolish là một trong những repo mã nguồn mở mà TopGit theo dõi, hiện có 3.0k sao, viết chủ yếu bằng Vim Script. abolish.vim: Work with several variants of a word at once
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
I sat on this plugin for 3 years before releasing it, primarily
because it's so gosh darn hard to explain. It's three superficially
unrelated plugins in one that share a common theme: working with
variants of a word.
Abbreviation
I know how to spell "separate". I know how to spell "desperate". My
fingers, however, have trouble distinguishing between the two, and I
invariably have a 50 percent chance of typing "seperate" or "desparate"
each time one of these comes up. At first, I tried abbreviations:
:iabbrev seperate separate
:iabbrev desparate desperate
But this falls short at the beginning of a sentence.
:iabbrev Seperate Separate
:iabbrev Desparate Desperate
To be really thorough, we need uppercase too!
:iabbrev SEPERATE SEPARATE
:iabbrev DESPARATE DESPERATE
Oh, but consider the noun form, and the adverb form!
Abolish.vim has your back. One command to do all six, and you can
repeat it with & too!
:%Subvert/facilit{y,ies}/building{,s}/g
From a conceptual level, one way to think about how this substitution
works is to imagine that in the braces you are declaring the
requirements for turning that word from singular to plural. In
the facility example, the same base letters in both the singular
and plural form of the word are facilit To turn "facility" to a
plural word you must change the y to ies so you specify
{y,ies} in the braces.
To convert the word "building" from singular to plural, again
look at the common letters between the singular and plural forms:
building. In this case you do not need to remove any letter
from building to turn it into plural form and you need to
add an s so the braces should be {,s}.
A few more examples:
Address to Reference
:Subvert/address{,es}/reference{,s}/g
Blog to Post (you can just do this with a regular :s also)
:Subvert/blog{,s}/post{,s}/g
Child to Adult
:Subvert/child{,ren}/adult{,s}/g
Be amazed as it correctly turns the word children into the word adults!
Die to Spinner
:Subvert/di{e,ce}/spinner{,s}/g
You can abbreviate it as :S, and it accepts the full range of flags
including things like c (confirm).
There's also a variant for searching and a variant for grepping.
Coercion
Want to turn fooBar into foo_bar? Press crs (coerce to
snake_case). MixedCase (crm), camelCase (crc), UPPER_CASE
(cru), dash-case (cr-), and dot.case (cr.) are all just 3
keystrokes away.
Installation
Install using your favorite package manager, or use Vim's built-in package
support:
mkdir -p ~/.vim/pack/tpope/start
cd ~/.vim/pack/tpope/start
git clone https://tpope.io/vim/abolish.git
vim -u NONE -c "helptags abolish/doc" -c q
Self-Promotion
Like abolish.vim? Follow the repository on
GitHub and vote for it on
vim.org. And if
you're feeling especially charitable, follow tpope on
Twitter and
GitHub.
License
Copyright (c) Tim Pope. Distributed under the same terms as Vim itself.
See :help license.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/tpope/vim-abolish là nguồn chính thức.
tpope/vim-abolish có bao nhiêu sao?
tpope/vim-abolish có 3.0k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/tpope/vim-abolish. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
tpope/vim-abolish có phải mã nguồn mở không?
TopGit chưa ghi nhận license cho tpope/vim-abolish. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
tpope/vim-abolish còn đang phát triển không?
Commit gần nhất trên tpope/vim-abolish là 2.3 năm trước (theo timestamp GitHub). Repo có 97 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
tpope/vim-abolish là gì?
tpope/vim-abolish (tpope/vim-abolish) là dự án Vim Script trên GitHub. Theo mô tả gốc: abolish.vim: Work with several variants of a word at once
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về vim-abolish?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về vim-abolish.