mirror of
https://github.com/amix/vimrc
synced 2025-06-29 11:04:59 +08:00
Updated plugins
This commit is contained in:
@ -117,22 +117,19 @@ 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`), snake\_case
|
||||
(`crs`), UPPER\_CASE (`cru`), dash-case (`cr-`), dot.case (`cr.`),
|
||||
space case (`cr<space>`), and Title Case (`crt`) are all just 3
|
||||
keystrokes away.
|
||||
snake\_case). MixedCase (`crm`), camelCase (`crc`), UPPER\_CASE (`cru`),
|
||||
dash-case (`cr-`), dot.case (`cr.`), space case (`cr<space>`), and
|
||||
Title Case (`crt`) are all just 3 keystrokes away.
|
||||
|
||||
## Installation
|
||||
|
||||
If you don't have a preferred installation method, I recommend
|
||||
installing [pathogen.vim](https://github.com/tpope/vim-pathogen), and
|
||||
then simply copy and paste:
|
||||
Install using your favorite package manager, or use Vim's built-in package
|
||||
support:
|
||||
|
||||
cd ~/.vim/bundle
|
||||
git clone git://github.com/tpope/vim-abolish.git
|
||||
|
||||
Once help tags have been generated, you can view the manual with
|
||||
`:help abolish`.
|
||||
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
|
||||
|
||||
|
@ -150,16 +150,15 @@ using the cr mapping (mnemonic: CoeRce) followed by one of the following
|
||||
characters:
|
||||
|
||||
c: camelCase
|
||||
m: MixedCase
|
||||
p: PascalCase
|
||||
m: MixedCase (aka PascalCase)
|
||||
_: snake_case
|
||||
s: snake_case
|
||||
u: SNAKE_UPPERCASE
|
||||
U: SNAKE_UPPERCASE
|
||||
-: dash-case (not usually reversible; see |abolish-coercion-reversible|)
|
||||
k: kebab-case (not usually reversible; see |abolish-coercion-reversible|)
|
||||
-: dash-case (aka kebab-case)
|
||||
.: dot.case (not usually reversible; see |abolish-coercion-reversible|)
|
||||
<space>: space case (not usually reversible; see |abolish-coercion-reversible|)
|
||||
t: Title Case (not usually reversible; see |abolish-coercion-reversible|)
|
||||
|
||||
For example, cru on a lowercase word is a slightly easier to type equivalent
|
||||
to gUiw.
|
||||
|
@ -1,6 +1,6 @@
|
||||
" abolish.vim - Language friendly searches, substitutions, and abbreviations
|
||||
" Maintainer: Tim Pope <http://tpo.pe/>
|
||||
" Version: 1.1
|
||||
" Version: 1.2
|
||||
" GetLatestVimScripts: 1545 1 :AutoInstall: abolish.vim
|
||||
|
||||
" Initialization {{{1
|
||||
@ -23,8 +23,8 @@ endif
|
||||
" }}}1
|
||||
" Utility functions {{{1
|
||||
|
||||
function! s:function(name)
|
||||
return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '<SNR>\d\+_'),''))
|
||||
function! s:function(name) abort
|
||||
return function(substitute(a:name,'^s:',matchstr(expand('<sfile>'), '.*\zs<SNR>\d\+_'),''))
|
||||
endfunction
|
||||
|
||||
function! s:send(self,func,...)
|
||||
@ -565,6 +565,7 @@ endfunction
|
||||
call extend(Abolish.Coercions, {
|
||||
\ 'c': Abolish.camelcase,
|
||||
\ 'm': Abolish.mixedcase,
|
||||
\ 'p': Abolish.mixedcase,
|
||||
\ 's': Abolish.snakecase,
|
||||
\ '_': Abolish.snakecase,
|
||||
\ 'u': Abolish.uppercase,
|
||||
@ -619,7 +620,7 @@ endfunction
|
||||
|
||||
nnoremap <expr> <Plug>(abolish-coerce) <SID>coerce(nr2char(getchar()))
|
||||
vnoremap <expr> <Plug>(abolish-coerce) <SID>coerce(nr2char(getchar()))
|
||||
nnoremap <expr> <plug>(abolish-coerce-word) <SID>coerce(nr2char(getchar())).'iw'
|
||||
nnoremap <expr> <Plug>(abolish-coerce-word) <SID>coerce(nr2char(getchar())).'iw'
|
||||
|
||||
" }}}1
|
||||
|
||||
|
Reference in New Issue
Block a user