Skip to content
CaseKeep Replace - Atom package
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
keymaps
lib
menus
spec
styles
.gitignore
CHANGELOG.md
LICENSE.md
README.md
package.json

README.md

CaseKeep Replace

With this package you can replace given string with another, but preserve its original case.

Default keyboard shortcut: ctrl+cmd+r

Example

With this code:

function testCase() {
  const TESTCASE = 'TestCase'
  
  return TESTCASE
}

If you replace testCase to newCase you will get:

function newCase() {
  const NEWCASE = 'NewCase'
  
  return NEWCASE
}

The case-keep-replace package will do four replacements:

  1. Replace var-like strings: testCase -> newCase
  2. Replace class-like strings: TestCase -> NewCase
  3. Replace const-like strings: TESTCASE -> NEWCASE
  4. Replace underscored-const-like strings: TEST_CASE -> NEW_CASE
You can’t perform that action at this time.