https://github.com/gryf/dragvisuals
Pathogenised Damian Conways dragvisuals
https://github.com/gryf/dragvisuals
vim vim-plugin
Last synced: 11 months ago
JSON representation
Pathogenised Damian Conways dragvisuals
- Host: GitHub
- URL: https://github.com/gryf/dragvisuals
- Owner: gryf
- Created: 2017-06-01T04:04:33.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-01T04:04:47.000Z (about 9 years ago)
- Last Synced: 2025-03-02T07:38:52.765Z (over 1 year ago)
- Topics: vim, vim-plugin
- Language: Vim script
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
dragvisuals
===========
This is **exact** copy of `Damian Conway`_ script for moving visually selected
blocks around. The purpose of this repository is to make it more convenient for
package managers like Pathogen_.
Installation
------------
To install it, any kind of Vim package manager can be used, like NeoBundle_,
Pathogen_, Vundle_ or vim-plug_.
For manual installation, copy subdirectories from this repository to your
``~/.vim`` directory.
Usage
-----
To use it, add the following to your ``.vimrc``:
.. code:: vim
vmap DVB_Drag('left')
vmap DVB_Drag('right')
vmap DVB_Drag('down')
vmap DVB_Drag('up')
vmap D DVB_Duplicate()
" Remove any introduced trailing whitespace after moving...
let g:DVB_TrimWS = 1
Or, if you use the arrow keys for normal motions, choose four other keys for
block dragging. For example:
.. code:: vim
vmap h DVB_Drag('left')
vmap l DVB_Drag('right')
vmap j DVB_Drag('down')
vmap k DVB_Drag('up')
Or:
.. code:: vim
vmap DVB_Drag('left')
vmap DVB_Drag('right')
vmap DVB_Drag('down')
vmap DVB_Drag('up')
Or even:
.. code:: vim
vmap DVB_Drag('left')
vmap DVB_Drag('right')
vmap DVB_Drag('down')
vmap DVB_Drag('up')
License
-------
This work is placed under public domain.
.. _Pathogen: https://github.com/tpope/vim-pathogen
.. _Vundle: https://github.com/gmarik/Vundle.vim
.. _NeoBundle: https://github.com/Shougo/neobundle.vim
.. _vim-plug: https://github.com/junegunn/vim-plug
.. _Damian Conway: https://github.com/thoughtstream/Damian-Conway-s-Vim-Setup