Giter Site home page Giter Site logo

julesjulian / word-jumper-deluxe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ajile/word-jumper

1.0 1.0 2.0 26 KB

Provides ability to jump camelCase hills and UPPER_CASE valleys.

Home Page: https://atom.io/packages/word-jumper-deluxe

License: MIT License

CoffeeScript 100.00%

word-jumper-deluxe's People

Contributors

ajile avatar julesjulian avatar matiasgarciaisaia avatar maxnowack avatar

Stargazers

 avatar

Watchers

 avatar  avatar

word-jumper-deluxe's Issues

[BUG] Does not work with soft-wrapped lines above the cursor

To reproduce:

  1. Edit config.cson
  editor:
    softWrapAtPreferredLineLength: true
    preferredLineLength: 30
  1. Open a new editor with the following content
I am a line with more than 30 characters
Use word-jumper-deluxe here
a final line
  1. Place the cursor before "word-jumper-deluxe" on the second line

  2. Trigger word-jumper-deluxe:move-right

Result:

The cursor will be positioned on line 3 just before "line" instead of being positioned after "word" in "word-jumper-deluxe" on line 2.

Word Jump Select (Left Or Right) Jumping Multiple Lines

When invoking either of these on the pictured text below:

'ctrl-shift-right': 'word-jumper-deluxe:select-right'
'ctrl-shift-left': 'word-jumper-deluxe:select-left'

The cursor jumps like this (for both left and right):

screen shot 2018-10-25 at 10 14 57 am

screen shot 2018-10-25 at 10 15 57 am

Seeing this behavior anywhere in the pictured text. Stop symbols are set to default. When I mashed around select -left and -right, the cursor keeps jumping forward by the same selection, and ultimately crashed with this error:



**Atom**: 1.32.0 x64
**Electron**: 2.0.9
**OS**: Mac OS X 10.12.6
**Thrown From**: [word-jumper-deluxe](https://github.com/julesjulian/word-jumper-deluxe) package 1.3.0


### Stack Trace

Uncaught TypeError: Cannot read property 'length' of undefined

At /Users/xxx/.atom/packages/word-jumper-deluxe/lib/word-jumper-deluxe.coffee:110

TypeError: Cannot read property 'length' of undefined
at move (/packages/word-jumper-deluxe/lib/word-jumper-deluxe.coffee:110:55)
at moveCursors (/packages/word-jumper-deluxe/lib/word-jumper-deluxe.coffee:152:3)
at /packages/word-jumper-deluxe/lib/word-jumper-deluxe.coffee:172:9)
at CommandRegistry.handleCommandEvent (/Users/xxx/Applications/Atom.app/Contents/Resources/app/static/:11:345848)
at KeymapManager.t.exports.KeymapManager.dispatchCommandEvent (/Users/xxx/Applications/Atom.app/Contents/Resources/app/static/:11:1226096)
at KeymapManager.t.exports.KeymapManager.handleKeyboardEvent (/Users/xxx/Applications/Atom.app/Contents/Resources/app/static/:11:1222230)
at WindowEventHandler.handleDocumentKeyEvent (/Users/xxx/Applications/Atom.app/Contents/Resources/app/static/:11:281284)


### Commands

 -0:20.4.0 core:move-down (input.hidden-input)
 -0:20.1.0 editor:move-to-end-of-word (input.hidden-input)
 -0:19.6.0 word-jumper-deluxe:select-right (input.hidden-input)

2x -0:18.6.0 core:move-down (input.hidden-input)
3x -0:17.9.0 word-jumper-deluxe:select-right (input.hidden-input)
3x -0:15.2.0 word-jumper-deluxe:select-left (input.hidden-input)
-0:14.1.0 word-jumper-deluxe:select-right (input.hidden-input)
-0:13.9.0 word-jumper-deluxe:select-left (input.hidden-input)
-0:13.8.0 word-jumper-deluxe:select-right (input.hidden-input)
-0:13.7.0 word-jumper-deluxe:select-left (input.hidden-input)
-0:13.5.0 word-jumper-deluxe:select-right (input.hidden-input)
-0:13.4.0 word-jumper-deluxe:select-left (input.hidden-input)
-0:13.3.0 word-jumper-deluxe:select-right (input.hidden-input)
-0:13.2.0 word-jumper-deluxe:select-left (input.hidden-input)
-0:13.1.0 word-jumper-deluxe:select-right (input.hidden-input)
-0:13 word-jumper-deluxe:select-left (input.hidden-input)

Different behaviour around underscores

The behaviour of word-jumper-deluxe concerning underscores is quite different than what I see in all other Linux applications. The normal behaviour would be to jump past the underscore, directly before the next/previous word, so for instance moving the cursor from the beginning of |foo_bar until the end as in foo_bar| would take two Ctrl + right commands and not three.

[BUG] On Linux, keyboard should bind to Ctrl+ and not Alt+

For some reason, in Atom 0.18.0 (latest stable), this package seems to be keybinding to Alt+arrow and not Ctrl+arrow.
I was able to make this package work by adding the following to my keymap.cson

"atom-workspace atom-text-editor":
  "ctrl-backspace": "word-jumper-deluxe:remove-left"
  "ctrl-delete": "word-jumper-deluxe:remove-right"
  "ctrl-left": "word-jumper-deluxe:move-left"
  "ctrl-right": "word-jumper-deluxe:move-right"
  "ctrl-shift-left": "word-jumper-deluxe:select-left"
  "ctrl-shift-right": "word-jumper-deluxe:select-right"

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.