Closed isundaylee closed 5 years ago
Thanks for PR, when I saw your PR, I felt that I want custom-surround works in other surround operation(delete-surround
, change-surround
).
So I started evaluation if its possible with current vmp implementation, then that grows to #1104. Although its implementation is different, it is greatly inspired by your idea.
If you have any opinion, suggestion, please put it on #1104.
Even better! Thanks for implementing this and for making this awesome plugin :)
I'll close this PR then.
(This is my first
atom-vim-mode-plus
PR, so definitely let me know if I've missed something, or if there already exists similar feature to this :) )This PR adds a config option
customSurroundPairs
that allows the user to define custom pairs of texts to be used with surround operators.Example use case: Adding surrounding PHP tags
By setting
customSurroundPairs
tothe user can change (
|
for cursor)to
using the key sequence
y s i w p
.Setting accessibility
Since the schema of this setting is rather complex (it is an array consisting of objects with certain properties),
atom-settings
will not render it in the settings panel. Instead, the only way to set it seems to be manually modifying the user'sconfig.cson
file.Should we switch to use a simpler config schema so that this option can be shown in the settings panel? For example, we can make the setting be an array of strings of format "trigger|start|end".
Alternatively, we can keep the current schema. But in that case we might want to document this option somewhere since it's not gonna be in the settings panel.