Is there an optional way to change the string inside a specific type of brackets in vim, for example
{1,2,3,4,5} => {5,4,3,2,1}
?
How about this team?
:%s/{\zs\\(.\\{-}\\)\ze}/\= join(reverse(split(submatch(0), '\zs')), '')/g
The idea is to use the append function to register using the uppercase case name.
append
To achieve this, you need to make some preparations:
"a
:let @a=""
{,1,2,3,4,5}
}
Ok, here we go:
"AdF,
.
"aP
{,5,4,3,2,1}
Using regex
:.s/\v(\d+),(\d+),(\d+),(\d+),(\d+)/\5,\4,\3,\2,\1
Source: https://habr.com/ru/post/1274422/More articles:How can I sort a DataFrame by date in Python? - pythonJVM JIT method is recalculated for pure methods - javahow to sort pandas dataframe from one column - pythonhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1274420/can-hotspot-optimize-away-redundant-calls-to-pure-methods-without-inlining-them&usg=ALkJrhhiFacUf_KzQvLryVENQ-pmR9eRVgEnable if statement? - javaError in assembly configuration in Android Studio - androidhow to enable button if json answer is correct? - vue.jsAngular curly pagination - angularJamba lambda expression for nested conditions - javaFailed to convert char [] to stream in java 8 - javaAll Articles