=== modified file 'vim/bundle/CamelCaseMotion/.git/config' (properties changed: -x to +x) === modified file 'vim/bundle/CamelCaseMotion/.git/hooks/applypatch-msg.sample' --- vim/bundle/CamelCaseMotion/.git/hooks/applypatch-msg.sample 2016-08-04 08:13:44 +0000 +++ vim/bundle/CamelCaseMotion/.git/hooks/applypatch-msg.sample 2015-02-13 09:51:26 +0000 @@ -10,6 +10,6 @@ # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup -commitmsg="$(git rev-parse --git-path hooks/commit-msg)" -test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} +test -x "$GIT_DIR/hooks/commit-msg" && + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} : === modified file 'vim/bundle/CamelCaseMotion/.git/hooks/pre-applypatch.sample' --- vim/bundle/CamelCaseMotion/.git/hooks/pre-applypatch.sample 2016-08-04 08:13:44 +0000 +++ vim/bundle/CamelCaseMotion/.git/hooks/pre-applypatch.sample 2015-02-13 09:51:26 +0000 @@ -9,6 +9,6 @@ # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup -precommit="$(git rev-parse --git-path hooks/pre-commit)" -test -x "$precommit" && exec "$precommit" ${1+"$@"} +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} : === modified file 'vim/bundle/CamelCaseMotion/.git/hooks/pre-push.sample' --- vim/bundle/CamelCaseMotion/.git/hooks/pre-push.sample 2016-08-04 08:13:44 +0000 +++ vim/bundle/CamelCaseMotion/.git/hooks/pre-push.sample 2015-02-13 09:51:26 +0000 @@ -24,6 +24,7 @@ z40=0000000000000000000000000000000000000000 +IFS=' ' while read local_ref local_sha remote_ref remote_sha do if [ "$local_sha" = $z40 ] === modified file 'vim/bundle/CamelCaseMotion/.git/hooks/update.sample' --- vim/bundle/CamelCaseMotion/.git/hooks/update.sample 2016-08-04 08:13:44 +0000 +++ vim/bundle/CamelCaseMotion/.git/hooks/update.sample 2015-02-13 09:51:26 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # -# An example hook script to block unannotated tags from entering. +# An example hook script to blocks unannotated tags from entering. # Called by "git receive-pack" with arguments: refname sha1-old sha1-new # # To enable this hook, rename this file to "update". === modified file 'vim/bundle/CamelCaseMotion/.git/index' Binary files vim/bundle/CamelCaseMotion/.git/index 2016-08-04 08:13:44 +0000 and vim/bundle/CamelCaseMotion/.git/index 2015-08-25 11:57:14 +0000 differ === modified file 'vim/bundle/CamelCaseMotion/.git/logs/HEAD' --- vim/bundle/CamelCaseMotion/.git/logs/HEAD 2016-08-04 08:13:44 +0000 +++ vim/bundle/CamelCaseMotion/.git/logs/HEAD 2015-08-25 11:57:14 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 3ae9bf93cce28ddc1f2776999ad516e153769ea4 Jan Pobrislo 1470298348 +0200 clone: from https://github.com/bkad/CamelCaseMotion.git +0000000000000000000000000000000000000000 f3bdefba787d3748d09d4db520403b627abac0c6 Jan Pobrislo 1440501704 +0200 clone: from https://github.com/bkad/CamelCaseMotion.git === modified file 'vim/bundle/CamelCaseMotion/.git/logs/refs/heads/master' --- vim/bundle/CamelCaseMotion/.git/logs/refs/heads/master 2016-08-04 08:13:44 +0000 +++ vim/bundle/CamelCaseMotion/.git/logs/refs/heads/master 2015-08-25 11:57:14 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 3ae9bf93cce28ddc1f2776999ad516e153769ea4 Jan Pobrislo 1470298348 +0200 clone: from https://github.com/bkad/CamelCaseMotion.git +0000000000000000000000000000000000000000 f3bdefba787d3748d09d4db520403b627abac0c6 Jan Pobrislo 1440501704 +0200 clone: from https://github.com/bkad/CamelCaseMotion.git === modified file 'vim/bundle/CamelCaseMotion/.git/logs/refs/remotes/origin/HEAD' --- vim/bundle/CamelCaseMotion/.git/logs/refs/remotes/origin/HEAD 2016-08-04 08:13:44 +0000 +++ vim/bundle/CamelCaseMotion/.git/logs/refs/remotes/origin/HEAD 2015-08-25 11:57:14 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 3ae9bf93cce28ddc1f2776999ad516e153769ea4 Jan Pobrislo 1470298348 +0200 clone: from https://github.com/bkad/CamelCaseMotion.git +0000000000000000000000000000000000000000 f3bdefba787d3748d09d4db520403b627abac0c6 Jan Pobrislo 1440501704 +0200 clone: from https://github.com/bkad/CamelCaseMotion.git === removed directory 'vim/bundle/CamelCaseMotion/.git/objects/04' === removed file 'vim/bundle/CamelCaseMotion/.git/objects/04/9b68d95313b2d14fbbf125a2ba021265c03334' Binary files vim/bundle/CamelCaseMotion/.git/objects/04/9b68d95313b2d14fbbf125a2ba021265c03334 2016-08-04 08:13:44 +0000 and vim/bundle/CamelCaseMotion/.git/objects/04/9b68d95313b2d14fbbf125a2ba021265c03334 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/CamelCaseMotion/.git/objects/38' === added file 'vim/bundle/CamelCaseMotion/.git/objects/38/836db625b0c17313f0761e6b8fed622579ab78' Binary files vim/bundle/CamelCaseMotion/.git/objects/38/836db625b0c17313f0761e6b8fed622579ab78 1970-01-01 00:00:00 +0000 and vim/bundle/CamelCaseMotion/.git/objects/38/836db625b0c17313f0761e6b8fed622579ab78 2015-02-13 09:51:26 +0000 differ === removed directory 'vim/bundle/CamelCaseMotion/.git/objects/3a' === removed file 'vim/bundle/CamelCaseMotion/.git/objects/3a/e9bf93cce28ddc1f2776999ad516e153769ea4' --- vim/bundle/CamelCaseMotion/.git/objects/3a/e9bf93cce28ddc1f2776999ad516e153769ea4 2016-08-04 08:13:44 +0000 +++ vim/bundle/CamelCaseMotion/.git/objects/3a/e9bf93cce28ddc1f2776999ad516e153769ea4 1970-01-01 00:00:00 +0000 @@ -1,3 +0,0 @@ -xOIN0Wy#!ĉ ig,ljx>8VV_Rw -J2E +FY+#/wnQ1P( 79Zz iO$#1H2އ`q`|Got O{r9eM6ng`R)1A;tqc۠A{{>Ch%g/yvizCEyΘ=ZC= -:$[q \ No newline at end of file === added directory 'vim/bundle/CamelCaseMotion/.git/objects/42' === added file 'vim/bundle/CamelCaseMotion/.git/objects/42/c88e4279799bbb2d00a8201b81e33c9580330d' Binary files vim/bundle/CamelCaseMotion/.git/objects/42/c88e4279799bbb2d00a8201b81e33c9580330d 1970-01-01 00:00:00 +0000 and vim/bundle/CamelCaseMotion/.git/objects/42/c88e4279799bbb2d00a8201b81e33c9580330d 2015-08-25 11:57:14 +0000 differ === added directory 'vim/bundle/CamelCaseMotion/.git/objects/4e' === added file 'vim/bundle/CamelCaseMotion/.git/objects/4e/67fd84126346facf56bf7882a47e0f7a946b5f' Binary files vim/bundle/CamelCaseMotion/.git/objects/4e/67fd84126346facf56bf7882a47e0f7a946b5f 1970-01-01 00:00:00 +0000 and vim/bundle/CamelCaseMotion/.git/objects/4e/67fd84126346facf56bf7882a47e0f7a946b5f 2015-02-13 09:51:26 +0000 differ === removed directory 'vim/bundle/CamelCaseMotion/.git/objects/50' === removed file 'vim/bundle/CamelCaseMotion/.git/objects/50/5786d1b8619ef3e8dcd85766be03e4b3cd3477' Binary files vim/bundle/CamelCaseMotion/.git/objects/50/5786d1b8619ef3e8dcd85766be03e4b3cd3477 2016-08-04 08:13:44 +0000 and vim/bundle/CamelCaseMotion/.git/objects/50/5786d1b8619ef3e8dcd85766be03e4b3cd3477 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/CamelCaseMotion/.git/objects/5f' === removed file 'vim/bundle/CamelCaseMotion/.git/objects/5f/568f1cd6ad73d63a3162842d1676691ec33cbb' Binary files vim/bundle/CamelCaseMotion/.git/objects/5f/568f1cd6ad73d63a3162842d1676691ec33cbb 2016-08-04 08:13:44 +0000 and vim/bundle/CamelCaseMotion/.git/objects/5f/568f1cd6ad73d63a3162842d1676691ec33cbb 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/CamelCaseMotion/.git/objects/81' === removed file 'vim/bundle/CamelCaseMotion/.git/objects/81/7cc54c0f60801e2fd1b51aa420c20a7aaf044e' Binary files vim/bundle/CamelCaseMotion/.git/objects/81/7cc54c0f60801e2fd1b51aa420c20a7aaf044e 2016-08-04 08:13:44 +0000 and vim/bundle/CamelCaseMotion/.git/objects/81/7cc54c0f60801e2fd1b51aa420c20a7aaf044e 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/CamelCaseMotion/.git/objects/84' === removed file 'vim/bundle/CamelCaseMotion/.git/objects/84/329a10bbb4c0aa20c0f829a28501394f365e2a' Binary files vim/bundle/CamelCaseMotion/.git/objects/84/329a10bbb4c0aa20c0f829a28501394f365e2a 2016-08-04 08:13:44 +0000 and vim/bundle/CamelCaseMotion/.git/objects/84/329a10bbb4c0aa20c0f829a28501394f365e2a 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/CamelCaseMotion/.git/objects/87' === removed file 'vim/bundle/CamelCaseMotion/.git/objects/87/9972b36d60c98231ece95bdb70b0f95cc61bb8' Binary files vim/bundle/CamelCaseMotion/.git/objects/87/9972b36d60c98231ece95bdb70b0f95cc61bb8 2016-08-04 08:13:44 +0000 and vim/bundle/CamelCaseMotion/.git/objects/87/9972b36d60c98231ece95bdb70b0f95cc61bb8 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/CamelCaseMotion/.git/objects/b1' === added file 'vim/bundle/CamelCaseMotion/.git/objects/b1/cede34c6ef09f1f4d4c20264059f0cd5033f79' Binary files vim/bundle/CamelCaseMotion/.git/objects/b1/cede34c6ef09f1f4d4c20264059f0cd5033f79 1970-01-01 00:00:00 +0000 and vim/bundle/CamelCaseMotion/.git/objects/b1/cede34c6ef09f1f4d4c20264059f0cd5033f79 2015-02-13 09:51:26 +0000 differ === added directory 'vim/bundle/CamelCaseMotion/.git/objects/b2' === added file 'vim/bundle/CamelCaseMotion/.git/objects/b2/1f46d2732460c8dbb1be7e7ffadaf71fee99c4' Binary files vim/bundle/CamelCaseMotion/.git/objects/b2/1f46d2732460c8dbb1be7e7ffadaf71fee99c4 1970-01-01 00:00:00 +0000 and vim/bundle/CamelCaseMotion/.git/objects/b2/1f46d2732460c8dbb1be7e7ffadaf71fee99c4 2015-02-13 09:51:26 +0000 differ === removed directory 'vim/bundle/CamelCaseMotion/.git/objects/b8' === removed file 'vim/bundle/CamelCaseMotion/.git/objects/b8/8435668094a7ba9379d6773efd425a3f5431cc' Binary files vim/bundle/CamelCaseMotion/.git/objects/b8/8435668094a7ba9379d6773efd425a3f5431cc 2016-08-04 08:13:44 +0000 and vim/bundle/CamelCaseMotion/.git/objects/b8/8435668094a7ba9379d6773efd425a3f5431cc 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/CamelCaseMotion/.git/objects/bd' === removed file 'vim/bundle/CamelCaseMotion/.git/objects/bd/ad484bcd5315f6135e5e85ba6bc936bc329801' Binary files vim/bundle/CamelCaseMotion/.git/objects/bd/ad484bcd5315f6135e5e85ba6bc936bc329801 2016-08-04 08:13:44 +0000 and vim/bundle/CamelCaseMotion/.git/objects/bd/ad484bcd5315f6135e5e85ba6bc936bc329801 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/CamelCaseMotion/.git/objects/ef' === added file 'vim/bundle/CamelCaseMotion/.git/objects/ef/4929c20acc7e71bfae78431a9995739776ad30' Binary files vim/bundle/CamelCaseMotion/.git/objects/ef/4929c20acc7e71bfae78431a9995739776ad30 1970-01-01 00:00:00 +0000 and vim/bundle/CamelCaseMotion/.git/objects/ef/4929c20acc7e71bfae78431a9995739776ad30 2015-08-25 11:57:14 +0000 differ === removed directory 'vim/bundle/CamelCaseMotion/.git/objects/f0' === removed file 'vim/bundle/CamelCaseMotion/.git/objects/f0/0d1b1730e933c07b6769b2b6ce12a279d227c7' --- vim/bundle/CamelCaseMotion/.git/objects/f0/0d1b1730e933c07b6769b2b6ce12a279d227c7 2016-08-04 08:13:44 +0000 +++ vim/bundle/CamelCaseMotion/.git/objects/f0/0d1b1730e933c07b6769b2b6ce12a279d227c7 1970-01-01 00:00:00 +0000 @@ -1,2 +0,0 @@ -x0 `{&,1^8' -. D6oTZ/b'J$^,)9Jh.%iWKy`j8Qb 5+Lf= ߠƔ9@ (vQg؜}mpvݔi[l:L \ No newline at end of file === added directory 'vim/bundle/CamelCaseMotion/.git/objects/f3' === added file 'vim/bundle/CamelCaseMotion/.git/objects/f3/bdefba787d3748d09d4db520403b627abac0c6' Binary files vim/bundle/CamelCaseMotion/.git/objects/f3/bdefba787d3748d09d4db520403b627abac0c6 1970-01-01 00:00:00 +0000 and vim/bundle/CamelCaseMotion/.git/objects/f3/bdefba787d3748d09d4db520403b627abac0c6 2015-08-25 11:57:14 +0000 differ === added directory 'vim/bundle/CamelCaseMotion/.git/objects/fc' === added file 'vim/bundle/CamelCaseMotion/.git/objects/fc/6e0b119ada985b5646011bec7a472ff67e5f9e' Binary files vim/bundle/CamelCaseMotion/.git/objects/fc/6e0b119ada985b5646011bec7a472ff67e5f9e 1970-01-01 00:00:00 +0000 and vim/bundle/CamelCaseMotion/.git/objects/fc/6e0b119ada985b5646011bec7a472ff67e5f9e 2015-08-25 11:57:14 +0000 differ === added directory 'vim/bundle/CamelCaseMotion/.git/objects/fd' === added file 'vim/bundle/CamelCaseMotion/.git/objects/fd/5e3417204baaf388c3372645ec1cf5d6e36ce5' Binary files vim/bundle/CamelCaseMotion/.git/objects/fd/5e3417204baaf388c3372645ec1cf5d6e36ce5 1970-01-01 00:00:00 +0000 and vim/bundle/CamelCaseMotion/.git/objects/fd/5e3417204baaf388c3372645ec1cf5d6e36ce5 2015-02-13 09:51:26 +0000 differ === modified file 'vim/bundle/CamelCaseMotion/.git/packed-refs' --- vim/bundle/CamelCaseMotion/.git/packed-refs 2016-08-04 08:13:44 +0000 +++ vim/bundle/CamelCaseMotion/.git/packed-refs 2015-08-25 11:57:14 +0000 @@ -1,2 +1,2 @@ # pack-refs with: peeled fully-peeled -3ae9bf93cce28ddc1f2776999ad516e153769ea4 refs/remotes/origin/master +f3bdefba787d3748d09d4db520403b627abac0c6 refs/remotes/origin/master === modified file 'vim/bundle/CamelCaseMotion/.git/refs/heads/master' --- vim/bundle/CamelCaseMotion/.git/refs/heads/master 2016-08-04 08:13:44 +0000 +++ vim/bundle/CamelCaseMotion/.git/refs/heads/master 2015-08-25 11:57:14 +0000 @@ -1,1 +1,1 @@ -3ae9bf93cce28ddc1f2776999ad516e153769ea4 +f3bdefba787d3748d09d4db520403b627abac0c6 === modified file 'vim/bundle/CamelCaseMotion/.git/shallow' --- vim/bundle/CamelCaseMotion/.git/shallow 2016-08-04 08:13:44 +0000 +++ vim/bundle/CamelCaseMotion/.git/shallow 2015-08-25 11:57:14 +0000 @@ -1,1 +1,1 @@ -3ae9bf93cce28ddc1f2776999ad516e153769ea4 +f3bdefba787d3748d09d4db520403b627abac0c6 === removed file 'vim/bundle/CamelCaseMotion/CHANGES.md' --- vim/bundle/CamelCaseMotion/CHANGES.md 2016-08-04 08:13:44 +0000 +++ vim/bundle/CamelCaseMotion/CHANGES.md 1970-01-01 00:00:00 +0000 @@ -1,5 +0,0 @@ -9f8c26be23e2335e20f7198a4c9d29bd24ed918f ----------------------------------------- - -- No longer map CamelCaseMotion to `w/e/b/ge` by default. - Requires a call to `camelcasemotion#CreateMotionMappings` to bind the default mappings. === removed file 'vim/bundle/CamelCaseMotion/README.md' --- vim/bundle/CamelCaseMotion/README.md 2016-08-04 08:13:44 +0000 +++ vim/bundle/CamelCaseMotion/README.md 1970-01-01 00:00:00 +0000 @@ -1,151 +0,0 @@ -CamelCaseMotion.vim -==================== - -Created By [Ingo Karkat](https://github.com/inkarkat) - -Description ------------ -Vim provides many built-in motions, e.g. to move to the next word, or end of -the current word. Most programming languages use either CamelCase -("anIdentifier") or underscore_notation ("an_identifier") naming conventions -for identifiers. The best way to navigate inside those identifiers using Vim -built-in motions is the [count]f{char} motion, i.e. f{uppercase-char} or f_, -respectively. But we can make this easier: - -This script defines motions similar to `w`, `b`, `e` which do not move -word-wise (forward/backward), but Camel-wise; i.e. to word boundaries and -uppercase letters. The motions also work on underscore notation, where words -are delimited by underscore ('_') characters. From here on, both CamelCase -and underscore_notation entities are referred to as "words" (in double quotes). -Just like with the regular motions, a [count] can be prepended to move over -multiple "words" at once. Outside of "words" (e.g. in non-keyword characters -like / or ;), the new motions move just like the regular motions. - -Vim provides a built-in `iw` text object called 'inner word', which works in -operator-pending and visual mode. Analog to that, this script defines inner -"word" motions which select the "word" (or multiple "words" if a [count] is -given) where the cursor is located. - -Usage -====== -To use the default mappings, add the following to your vimrc: - -```vim -call camelcasemotion#CreateMotionMappings('') -``` - -If you want to use different mappings, map your keys to the -CamelCaseMotion_? mapping targets your vimrc). - -EXAMPLE: Map to w, b and e mappings: - -```vim -map w CamelCaseMotion_w -map b CamelCaseMotion_b -map e CamelCaseMotion_e -map ge CamelCaseMotion_ge -sunmap w -sunmap b -sunmap e -sunmap ge -``` - -EXAMPLE: Map iw, ib and ie motions: - -```vim -omap iw CamelCaseMotion_iw -xmap iw CamelCaseMotion_iw -omap ib CamelCaseMotion_ib -xmap ib CamelCaseMotion_ib -omap ie CamelCaseMotion_ie -xmap ie CamelCaseMotion_ie -``` - -Most commonly motions are `w`, `b` and `e`, all of which can -be used in normal mode, operator-pending mode (cp. `:help operator`), and visual -mode. For example, type `bcw` to change 'Camel' in 'CamelCase' to -something else. - -The `` string is defined with the `mapleader` variable in vim, and -defaults to the backslash character (`\`). Therefore, the motions defined by -this plugin would resolve to `\w`, `\b` and `\e`. Some vim users prefer to use -the comma key (`,`), which you may have already defined in your vimrc. To -check your current mapleader, execute: - -```vim -:let mapleader -``` - -If you get an error, you are still using the default (`\`). If you wish to -define a new mapleader, try: - -```vim -:let mapleader = "your_new_mapleader_string" -``` - -Drop the `:` if you are defining the mapleader in your vimrc. For more -information about mapleader, check out: - -```vim -:help mapleader -``` - -Motions Example ---------------- - -Given the following CamelCase identifiers in a source code fragment: - -``` -set Script31337PathAndNameWithoutExtension11=%~dpn0 -set Script31337PathANDNameWITHOUTExtension11=%~dpn0 -``` - -and the corresponding identifiers in underscore_notation: - -``` -set script_31337_path_and_name_without_extension_11=%~dpn0 -set SCRIPT_31337_PATH_AND_NAME_WITHOUT_EXTENSION_11=%~dpn0 -``` - -w moves to ([x] is cursor position): [s]et, [s]cript, [3]1337, [p]ath, -[a]nd, [n]ame, [w]ithout, [e]xtension, [1]1, [d]pn0, dpn[0], [s]et - -b moves to: [d]pn0, [1]1, [e]xtension, [w]ithout, ... - -e moves to: se[t], scrip[t], 3133[7], pat[h], an[d], nam[e], withou[t], -extensio[n], 1[1], dpn[0] - -Inner Motions Example ---------------------- -Given the following identifier, with the cursor positioned at [x]: - -``` -script_31337_path_and_na[m]e_without_extension_11 -``` - -v3iw selects script_31337_path_and_[name_without_extension_]11 - -v3ib selects script_31337_[path_and_name]_without_extension_11 - -v3ie selects script_31337_path_and_[name_without_extension]_11 - -Instead of visual mode, you can also use c3iw to change, d3iw -to delete, gU3iw to upper-case, and so on. - -Source ------- - -Based on [Moving through camel case words](http://vim.wikia.com/wiki/Moving_through_camel_case_words) by Anthony Van Ham. - -Installation ------------- -If you're using [Vundle](https://github.com/VundleVim/Vundle.vim), -just add `Plugin 'bkad/CamelCaseMotion'` to your .vimrc and run `:PluginInstall`. - -If you're using [pathogen](https://github.com/tpope/vim-pathogen), -add this repo to your bundle directory. - -Dependencies ------------- - -Requires Vim 7.0 or higher. === added file 'vim/bundle/CamelCaseMotion/README.rst' --- vim/bundle/CamelCaseMotion/README.rst 1970-01-01 00:00:00 +0000 +++ vim/bundle/CamelCaseMotion/README.rst 2015-02-13 09:51:26 +0000 @@ -0,0 +1,122 @@ +==================== +CamelCaseMotion.vim +==================== + +Created By Ingo Karkat (https://github.com/inkarkat) + +Description +============ +Vim provides many built-in motions, e.g. to move to the next word, or end of +the current word. Most programming languages use either CamelCase +("anIdentifier") or underscore_notation ("an_identifier") naming conventions +for identifiers. The best way to navigate inside those identifiers using Vim +built-in motions is the [count]f{char} motion, i.e. f{uppercase-char} or f\_, +respectively. But we can make this easier: + +This script defines motions ',w', ',b' and ',e' (similar to 'w', 'b', 'e'), +which do not move word-wise (forward/backward), but Camel-wise; i.e. to word +boundaries and uppercase letters. The motions also work on underscore notation, +where words are delimited by underscore ('_') characters. From here on, both +CamelCase and underscore_notation entities are referred to as "words" (in double +quotes). Just like with the regular motions, a [count] can be prepended to move +over multiple "words" at once. Outside of "words" (e.g. in non-keyword +characters like // or ;), the new motions move just like the regular motions. + +Vim provides a built-in 'iw' text object called 'inner word', which works in +operator-pending and visual mode. Analog to that, this script defines inner +"word" motions 'i,w', 'i,b' and 'i,e', which select the "word" (or multiple +"words" if a [count] is given) where the cursor is located. + +Usage +====== +Use the new motions ',w', ',b' and ',e' in normal mode, operator-pending mode (cp. +:help operator), and visual mode. For example, type 'bc,w' to change 'Camel' in +'CamelCase' to something else. + +**Motions Example** + +Given the following CamelCase identifiers in a source code fragment:: + + set Script31337PathAndNameWithoutExtension11=%~dpn0 + set Script31337PathANDNameWITHOUTExtension11=%~dpn0 + +and the corresponding identifiers in underscore_notation:: + + set script_31337_path_and_name_without_extension_11=%~dpn0 + set SCRIPT_31337_PATH_AND_NAME_WITHOUT_EXTENSION_11=%~dpn0 + +,w moves to ([x] is cursor position): [s]et, [s]cript, [3]1337, [p]ath, +[a]nd, [n]ame, [w]ithout, [e]xtension, [1]1, [d]pn0, dpn[0], [s]et + +,b moves to: [d]pn0, [1]1, [e]xtension, [w]ithout, ... + +,e moves to: se[t], scrip[t], 3133[7], pat[h], an[d], nam[e], withou[t], +extensio[n], 1[1], dpn[0] + +**Inner Motions Example** +Given the following identifier, with the cursor positioned at [x]:: + + script_31337_path_and_na[m]e_without_extension_11 + +v3i,w selects script_31337_path_and_[name_without_extension\_]11 + +v3i,b selects script_31337_[path_and_name]_without_extension_11 + +v3i,e selects script_31337_path_and_[name_without_extension]_11 + +Instead of visual mode, you can also use c3i,w to change, d3i,w to delete, +gU3i,w to upper-case, and so on. + +**Source** + +Based on http://vim.wikia.com/wiki/Moving_through_camel_case_words by Anthony Van Ham. + +Installation +============= +This script is packaged as a vimball. If you have the "gunzip" decompressor +in your PATH, simply edit the \*.vba.gz package in Vim; otherwise, decompress +the archive first, e.g. using WinZip. Inside Vim, install by sourcing the +vimball or via the ``:UseVimball`` command. + +:: + + vim camelcasemotion.vba.gz + :so % + +To uninstall, use the ``:RmVimball`` command. + +**Dependencies** + +Requires Vim 7.0 or higher. + +**Configuration** + +If you want to use different mappings, map your keys to the +``CamelCaseMotion_?`` mapping targets _before_ sourcing this script (e.g. in +your .vimrc). + +**Example**: Use 'W', 'B' and 'E':: + + map CamelCaseMotion_w + map CamelCaseMotion_b + map CamelCaseMotion_e + +**Example**: Replace the default 'w', 'b' and 'e' mappings instead of defining +additional mappings ',w', ',b' and ',e':: + + map w CamelCaseMotion_w + map b CamelCaseMotion_b + map e CamelCaseMotion_e + sunmap w + sunmap b + sunmap e + +**Example**: Replace default 'iw' text-object and define 'ib' and 'ie' +motions:: + + omap iw CamelCaseMotion_iw + xmap iw CamelCaseMotion_iw + omap ib CamelCaseMotion_ib + xmap ib CamelCaseMotion_ib + omap ie CamelCaseMotion_ie + xmap ie CamelCaseMotion_ie === modified file 'vim/bundle/CamelCaseMotion/autoload/camelcasemotion.vim' --- vim/bundle/CamelCaseMotion/autoload/camelcasemotion.vim 2016-08-04 08:13:44 +0000 +++ vim/bundle/CamelCaseMotion/autoload/camelcasemotion.vim 2015-08-25 11:57:14 +0000 @@ -1,186 +1,173 @@ -" camelcasemotion.vim: Motion through CamelCaseWords and underscore_notation. +" camelcasemotion.vim: Motion through CamelCaseWords and underscore_notation. " " DEPENDENCIES: -" - Requires Vim 7.0 or higher. +" - Requires Vim 7.0 or higher. " " Copyright: (C) 2007-2009 by Ingo Karkat -" The VIM LICENSE applies to this script; see ':help copyright'. +" The VIM LICENSE applies to this script; see ':help copyright'. " -" Maintainer: Ingo Karkat -" REVISION DATE REMARKS -" 1.50.001 05-May-2009 Do not create mappings for select mode; -" according to|Select-mode|, printable character -" commands should delete the selection and insert -" the typed characters. -" Moved functions from plugin to separate autoload -" script. -" file creation +" Maintainer: Ingo Karkat +" REVISION DATE REMARKS +" 1.50.001 05-May-2009 Do not create mappings for select mode; +" according to|Select-mode|, printable character +" commands should delete the selection and insert +" the typed characters. +" Moved functions from plugin to separate autoload +" script. +" file creation "- functions ------------------------------------------------------------------" -function! s:Move(direction, count, mode) - " Note: There is no inversion of the regular expression character class - " 'keyword character' (\k). We need an inversion "non-keyword" defined as - " "any non-whitespace character that is not a keyword character" (e.g. - " [!@#$%^&*()]). This can be specified via a non-whitespace character in - " whose place no keyword character matches (\k\@!\S). - - "echo "count is " . a:count - let l:i = 0 - while l:i < a:count - if a:direction == 'e' || a:direction == 'ge' - " "Forward to end" motion. - " number | ACRONYM followed by CamelCase or number | CamelCase | underscore_notation | non-keyword | word - let l:direction = (a:direction == 'e' ? a:direction : 'be') - call search('\m\d\+\|\u\+\ze\%(\u\l\|\d\)\|\l\+\ze\%(\u\|\d\)\|\u\l\+\|\%(\a\|\d\)\+\ze[-_]\|\%(\k\@!\S\)\+\|\%([-_]\@!\k\)\+\>', 'W' . l:direction) - " Note: word must be defined as '\k\>'; '\>' on its own somehow - " dominates over the previous branch. Plus, \k must exclude the - " underscore, or a trailing one will be incorrectly moved over: - " '\%(_\@!\k\)'. - if a:mode == 'o' - " Note: Special additional treatment for operator-pending mode - " "forward to end" motion. - " The difference between normal mode, operator-pending and visual - " mode is that in the latter two, the motion must go _past_ the - " final "word" character, so that all characters of the "word" are - " selected. This is done by appending a 'l' motion after the - " search for the next "word". - " - " In operator-pending mode, the 'l' motion only works properly - " at the end of the line (i.e. when the moved-over "word" is at - " the end of the line) when the 'l' motion is allowed to move - " over to the next line. Thus, the 'l' motion is added - " temporarily to the global 'whichwrap' setting. - " Without this, the motion would leave out the last character in - " the line. I've also experimented with temporarily setting - " "set virtualedit=onemore" , but that didn't work. - let l:save_ww = &whichwrap - set whichwrap+=l - normal! l - let &whichwrap = l:save_ww - endif +function! s:Move( direction, count, mode ) + " Note: There is no inversion of the regular expression character class + " 'keyword character' (\k). We need an inversion "non-keyword" defined as + " "any non-whitespace character that is not a keyword character" (e.g. + " [!@#$%^&*()]). This can be specified via a non-whitespace character in + " whose place no keyword character matches (\k\@!\S). + + "echo "count is " . a:count + let l:i = 0 + while l:i < a:count + if a:direction == 'e' + " "Forward to end" motion. + "call search( '\>\|\(\a\|\d\)\+\ze_', 'We' ) + " end of ... + " number | ACRONYM followed by CamelCase or number | CamelCase | underscore_notation | non-keyword | word + call search( '\m\d\+\|\u\+\ze\%(\u\l\|\d\)\|\l\+\ze\%(\u\|\d\)\|\u\l\+\|\%(\a\|\d\)\+\ze[-_]\|\%(\k\@!\S\)\+\|\%([-_]\@!\k\)\+\>', 'We' ) + " Note: word must be defined as '\k\>'; '\>' on its own somehow + " dominates over the previous branch. Plus, \k must exclude the + " underscore, or a trailing one will be incorrectly moved over: + " '\%(_\@!\k\)'. + if a:mode == 'o' + " Note: Special additional treatment for operator-pending mode + " "forward to end" motion. + " The difference between normal mode, operator-pending and visual + " mode is that in the latter two, the motion must go _past_ the + " final "word" character, so that all characters of the "word" are + " selected. This is done by appending a 'l' motion after the + " search for the next "word". + " + " In operator-pending mode, the 'l' motion only works properly + " at the end of the line (i.e. when the moved-over "word" is at + " the end of the line) when the 'l' motion is allowed to move + " over to the next line. Thus, the 'l' motion is added + " temporarily to the global 'whichwrap' setting. + " Without this, the motion would leave out the last character in + " the line. I've also experimented with temporarily setting + " "set virtualedit=onemore" , but that didn't work. + let l:save_ww = &whichwrap + set whichwrap+=l + normal! l + let &whichwrap = l:save_ww + endif + else + " Forward (a:direction == '') and backward (a:direction == 'b') + " motion. + + let l:direction = (a:direction == 'w' ? '' : a:direction) + + " CamelCase: Jump to beginning of either (start of word, Word, WORD, + " 123). + " Underscore_notation: Jump to the beginning of an underscore-separated + " word or number. + "call search( '\<\|\u', 'W' . l:direction ) + "call search( '\<\|\u\(\l\+\|\u\+\ze\u\)\|\d\+', 'W' . l:direction ) + "call search( '\<\|\u\(\l\+\|\u\+\ze\u\)\|\d\+\|_\zs\(\a\|\d\)\+', 'W' . l:direction ) + " beginning of ... + " word | empty line | non-keyword after whitespaces | non-whitespace after word | number | lowercase folowed by capital letter or number | ACRONYM followed by CamelCase or number | CamelCase | ACRONYM | underscore followed by ACRONYM, Camel, lowercase or number + call search( '\m\<\D\|^$\|\%(^\|\s\)\+\zs\k\@!\S\|\>\<\|\d\+\|\l\+\zs\%(\u\|\d\)\|\u\+\zs\%(\u\l\|\d\)\|\u\l\+\|\u\@\<\|\d\+\|\l\+\zs\%(\u\|\d\)\|\u\+\zs\%(\u\l\|\d\)\|\u\l\+\|\u\@CamelCaseMotion_' . l:motion - execute (l:mode ==# 'v' ? 'x' : l:mode) . - \ 'map ' . a:leader . l:motion . ' ' . l:targetMapping - endfor - endfor - - " Create mappings according to this template: - " (* stands for the mode [ov], ? for the underlying motion [wbe].) - for l:mode in ['o', 'v'] - for l:motion in ['w', 'b', 'e', 'ge'] - let l:targetMapping = 'CamelCaseMotion_i' . l:motion - execute (l:mode ==# 'v' ? 'x' : l:mode) . - \ 'map i' . a:leader . l:motion . ' ' . l:targetMapping - endfor - endfor -endfunction - -" vim: set sts=2 sw=2 expandtab ff=unix fdm=syntax : + call camelcasemotion#Motion( 'b', 1, 'n' ) + normal! v + call camelcasemotion#Motion( a:direction, a:count, 'iv' ) + endif +endfunction + +" vim: set sts=4 sw=4 noexpandtab ff=unix fdm=syntax : === modified file 'vim/bundle/CamelCaseMotion/doc/camelcasemotion.txt' --- vim/bundle/CamelCaseMotion/doc/camelcasemotion.txt 2016-08-04 08:13:44 +0000 +++ vim/bundle/CamelCaseMotion/doc/camelcasemotion.txt 2015-02-13 09:51:26 +0000 @@ -1,4 +1,4 @@ -*camelcasemotion.txt* Motion through CamelCaseWords and underscore_notation. +*camelcasemotion.txt* Motion through CamelCaseWords and underscore_notation. CAMEL CASE MOTION by Ingo Karkat *camelcasemotion.vim* @@ -18,29 +18,29 @@ ("anIdentifier") or underscore_notation ("an_identifier") naming conventions for identifiers. The best way to navigate inside those identifiers using Vim built-in motions is the [count]f{char} motion, i.e. f{uppercase-char} or f_, -respectively. But we can make this easier: +respectively. But we can make this easier: -This script defines motions similar to |w|, |b|, |e|, which do not move word-wise -(forward/backward), but Camel-wise; i.e. to word boundaries and uppercase -letters. The motions also work on underscore notation, where words are -delimited by underscore ('_') characters. From here on, both CamelCase and -underscore_notation entities are referred to as "words" (in double quotes). -Just like with the regular motions, a [count] can be prepended to move over -multiple "words" at once. Outside of "words" (e.g. in non-keyword characters -like // or ;), the new motions move just like the regular motions. +This script defines motions |,w|, |,b| and |,e| (similar to |w|, |b|, |e|), +which do not move word-wise (forward/backward), but Camel-wise; i.e. to +word boundaries and uppercase letters. The motions also work on underscore +notation, where words are delimited by underscore ('_') characters. From +here on, both CamelCase and underscore_notation entities are referred to as +"words" (in double quotes). Just like with the regular motions, a [count] +can be prepended to move over multiple "words" at once. Outside of "words" +(e.g. in non-keyword characters like // or ;), the new motions move just +like the regular motions. Vim provides a built-in |iw| text object called 'inner word', which works in operator-pending and visual mode. Analoguous to that, this script defines -inner "word" motions which select the "word" (or multiple "words" if a -[count] is given) where the cursor is located. +inner "word" motions |i,w|, |i,b| and |i,e|, which select the "word" (or +multiple "words" if a [count] is given) where the cursor is located. ============================================================================== USAGE *camelcasemotion-usage* - -Call |camelcasemotion#CreateMotionMappings('')| to bind the new -motions |w|, |b| and |e| in normal mode, operator-pending + *,w* *,b* *,e* +Use the new motions |,w|, |,b| and |,e| in normal mode, operator-pending mode (cf. |operator|), and visual mode. For example, if the cursor is on the -'m', type 'bcw' to change 'Camel' in 'CamelCase' to something else. +'m', type 'bc,w' to change 'Camel' in 'CamelCase' to something else. EXAMPLE: motions @@ -51,25 +51,22 @@ set script_31337_path_and_name_without_extension_11=%~dpn0 ~ set SCRIPT_31337_PATH_AND_NAME_WITHOUT_EXTENSION_11=%~dpn0 ~ -w moves to ([x] is cursor position): [s]et, [s]cript, [3]1337, [p]ath, +,w moves to ([x] is cursor position): [s]et, [s]cript, [3]1337, [p]ath, [a]nd, [n]ame, [w]ithout, [e]xtension, [1]1, [d]pn0, dpn[0], [s]et -b moves to: [d]pn0, [1]1, [e]xtension, [w]ithout, ... -e moves to: se[t], scrip[t], 3133[7], pat[h], an[d], nam[e], - withou[t], extensio[n], 1[1], dpn[0] +,b moves to: [d]pn0, [1]1, [e]xtension, [w]ithout, ... +,e moves to: se[t], scrip[t], 3133[7], pat[h], an[d], nam[e], withou[t], + extensio[n], 1[1], dpn[0] EXAMPLE: inner motions -|camelcasemotion#CreateMotionMappings('')| also binds the new -motions |iw|, |ib|, |ie|. - Given the following identifier, with the cursor positioned at [x]: script_31337_path_and_na[m]e_without_extension_11 ~ -v3iw selects script_31337_path_and_[name_without_extension_]11 -v3ib selects script_31337_[path_and_name]_without_extension_11 -v3ie selects script_31337_path_and_[name_without_extension]_11 -Instead of visual mode, you can also use c3iw to change, d3iw -to delete, gU3iw to upper-case, and so on. +v3i,w selects script_31337_path_and_[name_without_extension_]11 +v3i,b selects script_31337_[path_and_name]_without_extension_11 +v3i,e selects script_31337_path_and_[name_without_extension]_11 +Instead of visual mode, you can also use c3i,w to change, d3i,w to delete, +gU3i,w to upper-case, and so on. ============================================================================== INSTALLATION *camelcasemotion-installation* @@ -80,33 +77,29 @@ vimball or via the |:UseVimball| command. > vim camelcasemotion.vba.gz :so % -To uninstall, use the |:RmVimball| command: - asdfsdf +To uninstall, use the |:RmVimball| command. DEPENDENCIES *camelcasemotion-dependencies* -- Requires Vim 7.0 or higher. +- Requires Vim 7.0 or higher. ============================================================================== CONFIGURATION *camelcasemotion-configuration* -To use the default mappings, add the following to your |vimrc|: > - camelcasemotion#CreateMotionMappings('') - If you want to use different mappings, map your keys to the -CamelCaseMotion_? mapping targets your |vimrc|). +CamelCaseMotion_? mapping targets _before_ sourcing this script (e.g. in +your |vimrc|). -EXAMPLE: Map to |w|, |b| and |e| mappings: > +EXAMPLE: Replace the default |w|, |b| and |e| mappings instead of defining +additional mappings |,w|, |,b| and |,e|: > map w CamelCaseMotion_w map b CamelCaseMotion_b map e CamelCaseMotion_e - map ge CamelCaseMotion_ge sunmap w sunmap b sunmap e - sunmap ge -EXAMPLE: Map |iw|, |ib| and |ie| motions: > +EXAMPLE: Replace default |iw| text-object and define |ib| and |ie| motions: > omap iw CamelCaseMotion_iw xmap iw CamelCaseMotion_iw omap ib CamelCaseMotion_ib @@ -118,19 +111,18 @@ KNOWN PROBLEMS *camelcasemotion-known-problems* - A degenerate CamelCaseWord containing '\U\u\d' (e.g. "MaP1Roblem") confuses - the operator-pending and visual mode e mapping if 'selection' is not - set to "exclusive". It'll skip "P" and select "P1" in one step. As a - workaround, use |w| instead of |e|; those two mappings have - the same effect inside CamelCaseWords, anyway. -- The operator-pending and visual mode |e| mapping doesn't work - properly when it reaches the end of the buffer; the final character of the - moved-over "word" remains. As a workaround, use the default 'e' motion - instead of 'e'. + the operator-pending and visual mode ,e mapping if 'selection' is not set to + "exclusive". It'll skip "P" and select "P1" in one step. As a workaround, + use |,w| instead of |,e|; those two mappings have the same effect inside + CamelCaseWords, anyway. +- The operator-pending and visual mode |,e| mapping doesn't work properly when + it reaches the end of the buffer; the final character of the moved-over + "word" remains. As a workaround, use the default 'e' motion instead of ',e'. - When the Vim setting 'selection' is not set to "exclusive", a - forward-backward combination in visual mode (e.g. 'vwb') - selects one additional character to the left, instead of only the character - where the motion started. Likewise, extension of the visual selection from - the front end is off by one additional character. + forward-backward combination in visual mode (e.g. 'v,w,b') selects one + additional character to the left, instead of only the character where the + motion started. Likewise, extension of the visual selection from the front + end is off by one additional character. ============================================================================== TODO *camelcasemotion-todo* @@ -141,9 +133,9 @@ 1.50 05-May-2009 - Do not create mappings for select mode; according to |Select-mode|, printable character commands should delete the selection and insert the - typed characters. Now using :xmap to only target visual mode. -- Moved functions from plugin to separate autoload script. -- Split off documentation into separate help file. + typed characters. Now using :xmap to only target visual mode. +- Moved functions from plugin to separate autoload script. +- Split off documentation into separate help file. 1.40 30-Jun-2008 BF: Now using :normal! to be independent from any user mappings. Thanks to @@ -162,30 +154,30 @@ motions. This has no effect inside a CamelCaseWord or inside underscore_notation, but it makes the motions behave like the regular motions (which is important if you replace the default motions). Thanks to Mun Johl -for reporting this. +for reporting this. 1.30 09-Apr-2008 - Allowing users to use mappings different than ,w ,b ,e by defining CamelCaseMotion_? target mappings. This can even be used to replace the default 'w', 'b' and 'e' mappings, as suggested by Mun Johl. -- Now requires VIM 7.0 or higher. +- Now requires VIM 7.0 or higher. 1.20 29-May-2007 ENH: The visual mode motions now also (mostly) work with the (default) setting -'set selection=inclusive', instead of selecting one character too much. +'set selection=inclusive', instead of selecting one character too much. 1.10 28-May-2007 -Incorporated major improvements and simplifications done by Joseph Barker. +Incorporated major improvements and simplifications done by Joseph Barker. 1.00 22-May-2007 -First published version. +First published version. 0.01 11-Oct-2005 -Started development based on vimtip #1016 by Anthony Van Ham. +Started development based on vimtip #1016 by Anthony Van Ham. ============================================================================== Copyright: (C) 2007-2009 by Ingo Karkat -The VIM LICENSE applies to this script; see|copyright|. +The VIM LICENSE applies to this script; see|copyright|. Maintainer: Ingo Karkat ============================================================================== === modified file 'vim/bundle/CamelCaseMotion/plugin/camelcasemotion.vim' --- vim/bundle/CamelCaseMotion/plugin/camelcasemotion.vim 2016-08-04 08:13:44 +0000 +++ vim/bundle/CamelCaseMotion/plugin/camelcasemotion.vim 2015-02-13 09:51:26 +0000 @@ -1,176 +1,204 @@ -" camelcasemotion.vim: Motion through CamelCaseWords and underscore_notation. +" camelcasemotion.vim: Motion through CamelCaseWords and underscore_notation. " " DEPENDENCIES: -" - Requires Vim 7.0 or higher. +" - Requires Vim 7.0 or higher. " " Copyright: (C) 2007-2009 by Ingo Karkat -" The VIM LICENSE applies to this script; see ':help copyright'. +" The VIM LICENSE applies to this script; see ':help copyright'. " -" Source: Based on vimtip #1016 by Anthony Van Ham. -" Maintainer: Ingo Karkat -" REVISION DATE REMARKS -" 1.50.019 05-May-2009 Do not create mappings for select mode; -" according to|Select-mode|, printable character -" commands should delete the selection and insert -" the typed characters. -" Moved functions from plugin to separate autoload -" script. -" Split off documentation into separate help file. -" Now cleaning up Create...Mappings functions. -" 1.40.018 30-Jun-2008 Minor: Removed unnecessary