html advanced text objects : some alternate text objects for html
script karma |
Rating 7/3,
Downloaded by 1498 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Michael Brown |
|
script type |
ftplugin |
|
description |
Repo: http://github.com/mjbrownie/html-textobjects
Example vid (includes other plugins): http://www.youtube.com/watch?v=NbV-OrFMalU
The inbuilt text object for html (cit cat) is great for the immediate tag but requires some additional movement if you have nesting.
This plugin gives you some more text objects to play with eg 'cahf' (cut-around-html-form) 'cihb' (cut-in-html-body) , 'viht' (visual-inner-html-table) , 'gUihd' (go UPPERCASE in html div)
This is still very much a work in progress any ideas on mapping naming conventions/ bugs etc please contact me.
" Dependencies:
"
" textobj-user by Kana Natsuno
" http://www.vim.org/scripts/script.php?script_id=2100
"
"
" Overview:
"
" This plugin adds some textobjects to the html filetype
"
" ihf/ahf - in/around a <form>
" ihf/ahd - in/around a <div>
" ihf/ahs - in/around a <span>
"
"
" ihb <body>
" ihp <p>
" ihu <ul>
" ihl <li>
" iht <table>
" ihr <tr>
" ihc <td> (in-html-cell to avoid clash with <div>)
""
" so Use as you would other text objects in visual selection, cutting and
" dealleting etc.
"
" Installation:
"
" Please ensure you have the above plugins installed as instructed
" This file should be in your after/ftplugin for html
"
" ~/.vim/after/ftplugin/html/html_textobjects.vim
"
" }}
Note theres a complimentary django textobject script
http://www.vim.org/scripts/script.php?script_id=2999 |
|
install details |
File needs to be in " ~/.vim/after/ftplugin/html/html_textobjects.vim |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 142.132.191.50
|