Questions tagged [refactor]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
26 votes
1 answer
16k 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?
Geremia's user avatar
  • 956
1 vote
1 answer
206 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 ...
Ryan Lue's user avatar
  • 871
31 votes
2 answers
6k 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 ...
ideasman42's user avatar
  • 3,683