Skip to content

josuecau/vim-textobj-cssprop

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

vim-textobj-cssprop

To select css property text by vim-textobj.

This plugin depends on the vim-textobj-user. So you need to install it in order to use this plugin.

Key mappings

To select css property with propname : and ;.

To select css property without propname : and ;.

You can define your own mapping (e.g. ac / ic) by adding this in your .vimrc:

let g:textobj_cssprop_no_default_key_mappings=1
xmap ac <Plug>(textobj-cssprop-a)
omap ac <Plug>(textobj-cssprop-a)
xmap ic <Plug>(textobj-cssprop-i)
omap ic <Plug>(textobj-cssprop-i)

Features added in this fork

  • Also works with Less and Sass (SCSS)
  • Deals with specific cases:
    • Minified CSS (without white spaces)
    • No extra semi-colon at the end of ruleset
    • Properties like filter: progid:DXImageTransform.…
  • New default mapping to avoid conflict with vim-textobj-comment

About

To select css property by vim text object.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 100.0%