place.vim : Enter characters without moving
| script karma
Downloaded by 41
Comments, bugs, improvements
script versions (upload new version)
|Note that development happens on Github
place.vim allows you to add insertions to your text without moving your cursor.
If you suffer from the following problems, this plugin might be for you:
- Forgotten to add a ';' at the end of a line.
- Forgotten var, let, $ or any other variant at the beginning of a line.
- Wanted to insert some text without having to enter insert mode, move to the place, leave insert mode, and go back
Add a mapping of your choice to get place.vim working for you.
nmap ga <Plug>(place-insert)
(Examples are using `ga` as the prefix key but it can be anything you want)
place.vim works in the 'vim' way. Here are a few examples of what it does
`|` denotes cursor position
$thi|s->doSomeStuff = 5
$this->doSomeStuff = 5;
It also supports multiple line motions
A more complex motion (t)
T|his is Y sentence
This is MY sentence
> I want to enter 'var' or 'let' like you said I could in the README!
Sure thing, there's a separate mapping `<Plug>(place-insert-multiple)` to map to.
Read the docs.
Either that or you can enable it globally:
`let g:place_single_character_mode = 0`
Now, when you finish your motion, an input box will appear with what you want to insert.
This is turned off by default because I imagine the majority of people want to insert small things like $ or ;.
|Using vim-plug you can do the following
Click on the package to download.
ip used for rating: 220.127.116.11
- Remove default mapping of ga and expose <Plug> mapping instead
- Expose <Plug> mapping to insert multiple characters
- Blink on insertion for visual feedback
- Add support for the following motions:
- Make plugin repeatable with . command if repeat.vim is installed
- Don't jump the cursor on undo of insertion made by place.vim