Framer icon indicating copy to clipboard operation
Framer copied to clipboard

Framer Studio editor improvements

Open koenbok opened this issue 10 years ago • 23 comments

I'm working on a bunch of editor issues and I wanted to track and discuss them here. Please remember that a lot of editor features are personal preference so for efficiency sake I'm going to default to Sublime behaviour by default (please discuss instances where you think there is a good reason to deviate).

Shortlist
  • [x] Check missing autocomplete words
  • [x] Improve code highlighting (more like on the site, ->)
  • [x] Fix moveWordLeft/Right text expansion
  • [ ] Shift tab should also outdent (just like cmd-[)
  • [x] Fix more "Script error" instances
  • [x] Make the gutter numbers more reliable
  • [x] Improve text coloring on scrolling
  • [x] Perf (convert to ARC, get latest updates)
  • [x] Fix deleteWordBackward
Wontfix
  • No default selection in autocomplete (both Sublime and XCode do this, I added option-enter to ignore)
  • More advanced expand/unexpand behaviour with shift. Sublime keeps showing the caret on selection so you can grow/shrink a selection with option-shift-left/right
Hardtofix (big features/ideas)
  • Code folding
  • Handling multiple files
  • Multiple selection editing
  • Tabs to spaces (and reverse)

koenbok avatar Feb 02 '15 21:02 koenbok

I bet @uxdiogenes has some comments here :-) Ping.

koenbok avatar Feb 02 '15 21:02 koenbok

Hah, like 90% of mine are issues with CMD+arrows, CMD+shift+arrows, alt+arrows, and alt+shift+arrows. e.g. (let's say | is the cursor, and underscores before the text is actually spaces):

___home|.visible Alt+shift+Left arrow should select to ___|home|.visible, instead it |___home|.visible

uxdiogenes avatar Feb 02 '15 21:02 uxdiogenes

Yes that is fixed in the upcoming release.

koenbok avatar Feb 02 '15 21:02 koenbok

Is that in release? I still got it. Also:

home.visible|.test Alt+shift+left arrow should select to home.|visible|.test, instead it home|.visible|.test

uxdiogenes avatar Feb 02 '15 21:02 uxdiogenes

___home|.visible CMD+Left arrow should move to ___|home.visible, instead it moves to |___home.visible

___home|.visible CMD+shift+Left arrow should select to ___|home.visible, instead it selects to |___home|.visible

uxdiogenes avatar Feb 02 '15 21:02 uxdiogenes

No I still have to ship it :-)

First one is fixed, second one is hard because _ is a word character as in you want this to work:

my_home|.visible CMD+Left arrow |my_home|.visible

koenbok avatar Feb 02 '15 22:02 koenbok

Sorry, that's confusing, I used underscores because github was making my spaces look like they disappeared. Pretend those ___ prefixes are actually spaces or tabs.

uxdiogenes avatar Feb 02 '15 22:02 uxdiogenes

Ah yes, then fixed :-)

koenbok avatar Feb 02 '15 22:02 koenbok

Well then! Awesome. We'll see if more comes up after the next release :).

uxdiogenes avatar Feb 02 '15 22:02 uxdiogenes

Don't suggest the same word with different caps:

image

koenbok avatar Feb 02 '15 23:02 koenbok

New to framer studio, but one thing that keeps tripping me up is duplicating closing elements like ) or ". For example when I write method arguments, pressing ( generates () for me like sublime, but when I try to close it using ) I end up with ()).

tehfailsafe avatar Feb 22 '15 17:02 tehfailsafe

You can disable this under View > Insert Closing Character.

koenbok avatar Feb 22 '15 17:02 koenbok

One thing that is nice about how sublime handles that situation is that it will prevent the insertion of the duplicate closing character if the cursor is on the left side of it.

uxdiogenes avatar Feb 22 '15 17:02 uxdiogenes

Got it, disabled for now, thanks!

Last one that is pretty minor is cmd-enter creating a new line without breaking the current line. Is that an option I missed somewhere as well?

tehfailsafe avatar Feb 22 '15 17:02 tehfailsafe

@tehfailsafe You can get that behavior in FS (and most native text views on OS X) by adding the following lines to ~/Library/KeyBindings/DefaultKeyBinding.dict:

// Insert and move to blank line below (Command Enter)
"@\U000D" = (moveToEndOfParagraph:, insertNewline:);
// Insert and move to blank line above (Command Shift Enter)
"@$\U000D" = (moveToBeginningOfParagraph:, moveLeft:, insertNewline:);

peteschaffner avatar Jul 03 '15 14:07 peteschaffner

Dang, I did not even know about this.

koenbok avatar Jul 06 '15 21:07 koenbok

Adding to the list. I would love to have dragging an image into the visual panel paste the code snippet at the location where my cursor is currently at rest.

ps. code folding still my #1!

edchao avatar Jan 13 '16 23:01 edchao

Yes. Code folding I really need that quite a bit. On Wed, Jan 13, 2016 at 3:25 PM Ed Chao [email protected] wrote:

Adding to the list. I would love to have dragging an image into the visual panel paste the code snippet at the location where my cursor is currently at rest.

ps. code folding still my #1 https://github.com/koenbok/Framer/issues/1!

— Reply to this email directly or view it on GitHub https://github.com/koenbok/Framer/issues/175#issuecomment-171470297.

jordandobson avatar Jan 13 '16 23:01 jordandobson

On top of folding, has anyone tried setting up a build process like webpack to watch files and re-bundle framer.js? Modules are awesome and I'd love to see live code updates from atom directly inside of studio by simply starting an npm script or something.

tehfailsafe avatar Jan 13 '16 23:01 tehfailsafe

We have some ideas around code folding. We'll start working on those after we land the next big studio release. If you have implementation ideas too, let me know.

jornvandijk avatar Jan 14 '16 12:01 jornvandijk

Hi. In framer, I use a lot copy paste more than make functions getting a code more easy to find where change it (Folding helps a lot top keep clear code). I could be awesome that include Expand Selection to Word (cmd+D) functionality. It is faster than "Find/replace".

Thanks

molavec avatar Aug 12 '16 14:08 molavec

Another thing is include Camel Case recognition with Alt + Back Arrow and Alt + Forward Arrow

molavec avatar Aug 12 '16 14:08 molavec

Curious about this: "wontfix: More advanced expand/unexpand behaviour with shift. Sublime keeps showing the caret on selection so you can grow/shrink a selection with option-shift-left/right"

Do that refer to :

Cat.food|.taste()

Shift+Option+left: Cat.|food|.taste()

Shift+Option+left: |Cat.food|.taste()

Shift+Option+right: |Cat.food.taste|() opposed to Cat.|food|.taste()

Is the existing behavior preferred? I don't think I've encountered it before (Sublime and elsewhere) and it throws me all the time; makes an accidental over-selection un-undoable.

IanBellomy avatar Jan 26 '17 14:01 IanBellomy