Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swap&indent lines / blocks #19

Closed
shokai opened this issue Apr 19, 2016 · 6 comments
Closed

swap&indent lines / blocks #19

shokai opened this issue Apr 19, 2016 · 6 comments

Comments

@shokai
Copy link
Owner

shokai commented Apr 19, 2016

ctrl+up/down - swap lines
shift+up/down - swap blocks
shift+left/right - indent

shokai added a commit that referenced this issue Apr 20, 2016
@shokai
Copy link
Owner Author

shokai commented Apr 20, 2016

display indent by space prefix

@shokai shokai changed the title swap lines / blocks swap&indent lines / blocks Apr 20, 2016
@shokai
Copy link
Owner Author

shokai commented Apr 20, 2016

indentは行頭スペースではなくindentプロパティを持たせた方が良いと思う
どうせ後で行ごとに誰が編集したかを保持するし #22

shokai added a commit that referenced this issue Apr 20, 2016
shokai added a commit that referenced this issue Apr 20, 2016
@shokai
Copy link
Owner Author

shokai commented Apr 20, 2016

line schema

{
  value: "string",
  indent: number,
  user: userId
}

@shokai
Copy link
Owner Author

shokai commented Apr 20, 2016

lineが複雑なObjectになったので、diffで保存する部分がやはりだめなようだ
#20 の実装が必要

shokai added a commit that referenced this issue Apr 20, 2016
shokai added a commit that referenced this issue Apr 20, 2016
@shokai
Copy link
Owner Author

shokai commented Apr 20, 2016

cloneをまともな実装に入れ替えたらちゃんと(lineがstringだった頃と同程度に)保存が動くようになった
https://www.npmjs.com/package/clone

shokai added a commit that referenced this issue Apr 20, 2016
shokai added a commit that referenced this issue Apr 21, 2016
shokai added a commit that referenced this issue Apr 21, 2016
shokai added a commit that referenced this issue Apr 21, 2016
shokai added a commit that referenced this issue Apr 21, 2016
shokai added a commit that referenced this issue Apr 21, 2016
shokai added a commit that referenced this issue Apr 21, 2016
shokai added a commit that referenced this issue Apr 21, 2016
@shokai
Copy link
Owner Author

shokai commented Apr 21, 2016

  • 行頭でのスペースキー、バックスペースキーでindent
  • insertNewLineした時に元の行のindentを引き継ぐ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant