Regular set: set fp=par\ 70j Our set: Set fp=par 70j Just like the regular :set, multiple options may still be specified: Set fp=par 70j tw=100 ai! ai? The only known caveat is in single word options: Set fp=par 70j ai What you'll end up with is 'fp' set to 'par 70j ai' because Set uses the presence of the =, ! or ? symbols to differentiate the current word as the start of a new option rather than part of the last one. Of course, there is no real reason to use Set unless there is an obscure set, such as: Set mp=texify -b -p --src-specials % vs set mp=texify\ -b\ -p\ --src-specials\ % Of course, there is:
Attributes | Values |
---|
rdfs:label
| - Set options with automatic escaping of spaces
|
rdfs:comment
| - Regular set: set fp=par\ 70j Our set: Set fp=par 70j Just like the regular :set, multiple options may still be specified: Set fp=par 70j tw=100 ai! ai? The only known caveat is in single word options: Set fp=par 70j ai What you'll end up with is 'fp' set to 'par 70j ai' because Set uses the presence of the =, ! or ? symbols to differentiate the current word as the start of a new option rather than part of the last one. Of course, there is no real reason to use Set unless there is an obscure set, such as: Set mp=texify -b -p --src-specials % vs set mp=texify\ -b\ -p\ --src-specials\ % Of course, there is:
|
Version
| |
dbkwik:vim/property/wikiPageUsesTemplate
| |
Previous
| |
Category
| |
Author
| |
Complexity
| |
Created
| |
ID
| |
NEXT
| |
Rating
| |
abstract
| - Regular set: set fp=par\ 70j Our set: Set fp=par 70j Just like the regular :set, multiple options may still be specified: Set fp=par 70j tw=100 ai! ai? The only known caveat is in single word options: Set fp=par 70j ai What you'll end up with is 'fp' set to 'par 70j ai' because Set uses the presence of the =, ! or ? symbols to differentiate the current word as the start of a new option rather than part of the last one. Of course, there is no real reason to use Set unless there is an obscure set, such as: Set mp=texify -b -p --src-specials % vs set mp=texify\ -b\ -p\ --src-specials\ % Of course, there is: let &mp='texify -b -p --src-specials %' I like the ability to use Set, however; requires much less thought and planning: if I do a regular 'set' and get an error, I just go up a line in the command-line history and change the 'set' to 'Set' and forget it. function! Set( ... ) let result = '' for i in a:000 if ( i !~ '[=!?]' ) let result .= '\' endif " Escaping out any existing spaces takes care of the case where we passed in escaped spaces. let result .= ' ' .escape( i, ' ' ) endfor execute 'set' .result endfunction com! -nargs=+ -complete=option Set call Set( )
|