Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [refactor]

The tag has no usage guidance.

5
votes
1answer
460 views

Renaming variables

What is the simplest way to rename variables in Vim, without adding any new packages? Is there a way without using regexps, too?
1
vote
1answer
174 views

Alternatives (or ways to refactor) complex conditional logic in a key mapping?

Follow up to this question. The Question I have code for a custom key mapping with conditional logic. My understanding is that in vimscript, that means: it has to be all on one line (since it's a ...
18
votes
2answers
2k views

Swap function arguments

When refactoring code it would be useful to be able to swap function arguments. Changing for eg: func(foo[0], bar(), baz.spam) into func(baz.spam, foo[0], bar()) Is there some way to swap ...