Skip to content

Sublime text keybindings:"Ctrl-Enter" and "Shift-Ctrl-Enter"#2354

Closed
srajanpaliwal wants to merge 4 commits intocodemirror:v4from
srajanpaliwal:v4
Closed

Sublime text keybindings:"Ctrl-Enter" and "Shift-Ctrl-Enter"#2354
srajanpaliwal wants to merge 4 commits intocodemirror:v4from
srajanpaliwal:v4

Conversation

@srajanpaliwal
Copy link
Copy Markdown
Contributor

To insert newline after and new line before the text respectively.

To insert newline after and new line before the text respectively.
@marijnh
Copy link
Copy Markdown
Member

marijnh commented Mar 11, 2014

Could you please indent the code consistently (two spaces per block, no tabs) and make sure the linter passes? (Install node, then run bin/lint in the checkout directory)

"Shift-Ctrl-K"            Delete line
"Ctrl-K Ctrl-K"           Delete line to right
"Ctrl-K Ctrl-Backspace"   Delete line to left
Swapline                  scrolls with the cursor
@srajanpaliwal
Copy link
Copy Markdown
Contributor Author

i added some more binding for sublime and corrected a previous swap line bind implementation

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Linux bindings for ST3, ctrl-k is bound to delete the word before the cursor (as it is in CM's default bindings). Maybe this is different on Mac? If so, could you research how the bindings differ, in general, between mac and non-mac platforms?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, you're changing mapK, not map! Ignore the previous comment.

    Added helper function inserLine
    also wraped replaceRange in cm.operation
@srajanpaliwal
Copy link
Copy Markdown
Contributor Author

I tried implementing setSelections .But "undo" when using setSelections didn't reset the cursors. I think ,it's because "undo" invoked by Ctrl-Z does not change the selection. i know "selectionundo" is present but i didn't know how it can be used.

marijnh added a commit that referenced this pull request Mar 17, 2014
marijnh added a commit that referenced this pull request Mar 17, 2014
@marijnh
Copy link
Copy Markdown
Member

marijnh commented Mar 17, 2014

I have merged your patches as 567d5d5 and 7ec7ec0, and followed up with ec12939 and 05ed565 to do further cleanup and simplification.

Undoing selection can be done with ctrl-u (cmd-u on mac).

@marijnh marijnh closed this Mar 17, 2014
@srajanpaliwal srajanpaliwal deleted the v4 branch April 1, 2014 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants