and so on. Strings have to be on one line. See [help text-objects] for a description of other predefined text objects. function! JHStringObject(cmd,delim,mode) if a:mode == 'i' let c = 'normal T' . a:delim . a:cmd . 't' . a:delim elseif a:mode == 'a' let c = 'normal F' . a:delim . a:cmd . 'f' . a:delim endif execute c if a:cmd == 'c' normal l startinsert endif endfunction nnoremap di" :call JHStringObject('d','"','i') nnoremap di' :call JHStringObject('d',"'",'i') nnoremap da" :call JHStringObject('d','"','a') nnoremap da' :call JHStringObject('d',"'",'a') nnoremap ci" :call JHStringObject('c','"','i') nnoremap ci' :call JHStringObject('c',"'",'i') nnoremap ca" :call JHStringObject('c','"','a') nnoremap ca' :call JHStringObject('c',"'",'a') nnoremap yi" :call JHStringObject('y','"','i'
Attributes | Values |
---|---|
rdfs:label |
|
rdfs:comment |
|
Version |
|
dbkwik:vim/property/wikiPageUsesTemplate | |
Previous |
|
Category |
|
Author |
|
Complexity |
|
Created |
|
ID |
|
NEXT |
|
Rating |
|
abstract |
|