Code Monkey home page Code Monkey logo

case-switch's People

Contributors

andersennl avatar dtw avatar steveoh avatar valo avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

valo w4-steve dtw

case-switch's Issues

Change to sentence case removes line breaks as well as single and double quotes from text

Hope this is useful and possible to update:
I can imagine many reasons why removing returns ' and " is required but here is an example where preserving all of the orginal content would be really helpful:

TIMBER “ROUGH SAWN” 2.1M 125 X 150MM STRAINERS UC4 -7’5-6
TIMBER "ROUGH SAWN" 1.8M X 100-125MM UC4 (6’ 4-5")
TIMBER "ROUGH SAWN" 2.10M 150- 175MM STRAINERS UC4 (8’ 6-7)

is changed to one long sentence without " & ' :
Timber rough sawn 2 1 m 125 x 150 mm strainers uc4 7 5 6 timber rough sawn 1 8 m x 100 125 mm uc4 6 4 5 timber rough sawn 2 10 m 150 175 mm strainers uc4 8 6 7

Using BBEdit the result is:

Timber “rough sawn” 2.1m 125 x 150mm strainers uc4 -7’5-6
Timber "rough sawn" 1.8m x 100-125mm uc4 (6’ 4-5")
Timber "rough sawn" 2.10m 150- 175mm strainers uc4 (8’ 6-7)

Keybindings conflict with copy key

The keybindings 'ctrl-c ctrl-c' package are in conflict with native copy keybinding 'ctrl-c'. Half the time the copy don't work.
Can you enable the personalization of keybindings in the package like the capture:
capture du 2016-05-26 13 29 18

Thereby the user can disable and change keybindings.

Thank's for your package.

Support multiple selections

Hi!

First of all, thanks for this package, it's already pretty essential to my workflow!
There is one minor thing that bugs me a bit though; it appears it doesn't support multiple selections. If I have multiple selections, it only case-switches the first one. It would be great if it supported multiple selections 😄

Uncaught TypeError: Cannot read property 'getSelections' of undefined

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.28.2 x64
Electron: 2.0.5
OS: Unknown Windows version
Thrown From: case-switch package 2.2.4

Stack Trace

Uncaught TypeError: Cannot read property 'getSelections' of undefined

At C:\Users\Hali\.atom\packages\case-switch\lib\selector.coffee:18

TypeError: Cannot read property 'getSelections' of undefined
    at Selector.module.exports.Selector.convertToCamel (/packages/case-switch/lib/selector.coffee:18:5)
    at Object.convertToCamelCase (/packages/case-switch/lib/case-switch.coffee:20:20)
    at /packages/case-switch/lib/case-switch.coffee:12:82)
    at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.28.2/resources/app/src/command-registry.js:384:49)
    at CommandRegistry.dispatch (~/AppData/Local/atom/app-1.28.2/resources/app/src/command-registry.js:273:23)
    at AtomEnvironment.dispatchApplicationMenuCommand (~/AppData/Local/atom/app-1.28.2/resources/app/src/atom-environment.js:1347:25)
    at EventEmitter.outerCallback (~/AppData/Local/atom/app-1.28.2/resources/app/src/application-delegate.js:339:53)
    at emitThree (events.js:136:13)
    at EventEmitter.emit (events.js:217:7)

Commands

     -1:18.7.0 pane:split-right-and-copy-active-item (img.welcome-img)
     -1:02.0 bracket-matcher:go-to-matching-bracket (atom-pane.pane.active)
     -0:52.3.0 window:increase-font-size (atom-pane.pane.active)
     -0:39.4.0 editor:select-to-beginning-of-word (atom-pane.pane.active)
     -0:23.1.0 teletype:share-portal (atom-pane.pane.active)
     -0:11 case-switch:convert-to-camel-case (atom-pane.pane.active)

Non-Core Packages

atom-bitcoin 0.6.0 
atom-clock 0.1.16 
atom-crypto-bar 0.7.0 
atom-eclipse-syntax 0.0.6 
atom-netconf 1.6.1 
autumn-highlighter-syntax 1.13.0 
bitcoin-status-bar 0.2.0 
brightpoint 0.3.1 
case-switch 2.2.4 
city-lights-syntax 1.1.8 
city-lights-ui 1.3.5 
floobits 0.32.12 
hey-pane 1.1.0 
Hydrogen 2.5.1 
jackhammer-syntax 1.1.0 
join-plus 0.4.0 
rabbitvcs-svn 0.6.0 
scroll-through-time 0.3.0 
styri-syntax 0.2.0 
tab-switcher 1.5.6 
teletype 0.13.3 
theme-switch 0.6.0 
zentabs 0.8.9 

Toggle case seems to be broken

When I try to use the case toggle I get the error below. It seems the issue that the toggle function is not passing a selection to the functions here: https://github.com/andersennl/case-switch/blob/master/lib/selector.coffee#L8

Atom Version: 1.4.3
System: Mac OS X 10.11.3
Thrown From: case-switch package, v2.0.1

Stack Trace

Uncaught TypeError: Cannot read property 'getText' of undefined

At /Users/valentin/.atom/packages/case-switch/lib/selector.coffee:38

TypeError: Cannot read property 'getText' of undefined
    at Selector.module.exports.Selector.isHyphenCase (/Users/valentin/.atom/packages/case-switch/lib/selector.coffee:38:14)
    at Selector.module.exports.Selector.toggleSelection (/Users/valentin/.atom/packages/case-switch/lib/selector.coffee:9:9)
    at Object.module.exports.CaseSwitch.toggle (/Users/valentin/.atom/packages/case-switch/lib/case-switch.coffee:17:20)
    at atom-workspace.<anonymous> (/Users/valentin/.atom/packages/case-switch/lib/case-switch.coffee:11:67)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:536:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:359:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:97:36)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -0:07.6.0 core:select-down (atom-text-editor.editor.is-focused)
     -0:07.4.0 core:cut (atom-text-editor.editor.is-focused)
  4x -0:07.3.0 core:move-down (atom-text-editor.editor.is-focused)
     -0:06.7.0 core:paste (atom-text-editor.editor.is-focused)
  2x -0:06.5.0 core:move-up (atom-text-editor.editor.is-focused)
     -0:05.5.0 core:save (atom-text-editor.editor.is-focused)
  2x -0:05.4.0 core:move-down (atom-text-editor.editor.is-focused)
     -0:05.1.0 core:select-down (atom-text-editor.editor.is-focused)
     -0:04.8.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:04.3.0 core:save (atom-text-editor.editor.is-focused)
     -0:04.3.0 pane:show-previous-item (atom-text-editor.editor.is-focused)
  4x -0:03.6.0 core:move-up (atom-text-editor.editor.is-focused)
  2x -0:03.0 editor:move-to-end-of-word (atom-text-editor.editor.is-focused)
     -0:02.6.0 editor:select-to-beginning-of-word (atom-text-editor.editor.is-focused)
  2x -0:02.2.0 editor:select-to-end-of-word (atom-text-editor.editor.is-focused)
     -0:00.9.0 case-switch:toggle (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "ignoredNames": [
      ".git/"
    ],
    "projectHome": "/Users/valentin/workspace"
  }
}

Installed Packages

# User
advanced-open-file, v0.14.2
case-switch, v2.0.1
emmet, v2.3.17
expand-region, v0.2.4
git-plus, v5.12.0
goto, v1.7.1
language-emblem, v0.2.0
language-rspec, v0.3.0
language-slim, v0.5.0
rails-rspec, v0.3.2
rails-transporter, v1.6.5
ruby-block, v0.3.5
ruby-block-converter, v3.5.0

# Dev
No dev packages

Seems Only "case-switch:convert-to-kebab-case" is working

Try to set hot keys

'atom-workspace':
  "ctrl-alt-t": 'case-switch:toggle'
  "ctrl-alt-c": "case-switch:convert-to-camel-case"
  "ctrl-alt-s": "case-switch:convert-to-snake-case"
  "ctrl-alt-k": "case-switch:convert-to-kebab-case"

All work except ctrl-alt-k

Tried alt-c ctrl-k, also not working

Thanks for you help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.