Giter VIP home page Giter VIP logo

Comments (23)

fbreuer avatar fbreuer commented on August 15, 2024

deleting paragraphs

in theory: delete all content and then double click the paragraph to delete it.

in practice in single column mode: after all content has been deleted from a paragraph, it disappears, but is still present as a blank line in the text file.

in practice in two column mode: after all content has been deleted from a paragraph, it disappears, but is still present as additional space between paragraph.

obviously, this behaviour is erronous. I need to find a way to prevent Chromeless' contentEditable to prune empty paragraphs.

splitting paragraphs

insert a blank line by hitting ctrl+enter twice at the position where you want to split the paragraph. then click the paragraph twice to switch it back to display mode.

joining paragraphs

joining paragraphs can only be done via copy and paste at the moment. this should change in the future. suggestions on how to make this functionality available in the user interface are welcome.

from qute-html5.

pkra avatar pkra commented on August 15, 2024

Hm, tested some more and should read:

  • Splitting paragraphs doesn't work in two-column-preview mode. It does work in single column mode.

from qute-html5.

fbreuer avatar fbreuer commented on August 15, 2024

on my system, splitting paragraphs works fine in both modes.

from qute-html5.

fbreuer avatar fbreuer commented on August 15, 2024

Okay, I see the merit in making paragraph editing work more like in a standard text editor. (Even though I do not see this as an end in itself; I'd rather experiment with different editing paradigms.)

So, I'd suggest the following changes to the current keyboard shortcuts:

  1. Enter splits the current paragraph into two paragraphs at the current cursor position.

  2. Hitting Backspace when the cursor is at the beginning of a paragraph joins the current and the preceeding paragraph.

  3. Hitting Delete when the cursor is at the end of a paragraph joins the current and the succeeding paragraph.

If empty paragraphs do not dissappear suddenly (as they do now), then these changes already take care of deleting paragraphs. (I briefly considered adding a separate keyboard shortcut for deleting entire paragraphs, but then decided against it: Qute does not have an undo mechanism, so adding shortcuts that destroy a lot of text at once is a bad idea.)

What do you think? Would that work for you? Any suggestions how the setup could be improved?

from qute-html5.

pkra avatar pkra commented on August 15, 2024

Felix,

  • Splitting paragraphs never works for me -- using the linux binaries on ubuntu 11.04.Maybe you could test this in a vm?
  • I like the way it's supposed to work right now -- keeping paragraphs together with a simple enter (wordrpess uses shift+enter for a newline kind of thing) and using ctrl+enter for 'real' paragraphs. I just want to be able to delete empty paragraphs ;)
  • I wouldn't mind at all if I need to do something special to delete/join paragraphs (i.e., ctrl+backspace or something). I like the idea to kindly enforce that paragraphs are coherent entities...

from qute-html5.

fbreuer avatar fbreuer commented on August 15, 2024

Yes, deleting empty paragraphs really has to happen :) And I will investigate the splitting paragraphs issue. Regarding future keyboard shortcuts:

I like the way it's supposed to work right now -- keeping paragraphs together with a simple enter (wordrpess uses shift+enter for a newline kind of thing) and using ctrl+enter for 'real' paragraphs.

Okay. One question: currently Enter creates a new empty paragraph after the focused one. An alternative would be to have Enter split the current paragraph into two formal paragraphs at the current position. Which of these two options would you prefer?

I wouldn't mind at all if I need to do something special to delete/join paragraphs (i.e., ctrl+backspace or something). I like the idea to kindly enforce that paragraphs are coherent entities..

Yes, I also like the idea of treating paragraphs as "formal" entities. Special purpose keyboard shortcuts also have the advantage that they are easier to implement than simply overloading the standard bksp and del keys :)

So, how about this: Ctrl+Bksp joins the current and previous paragraphs and Ctrl+Del joins the current and next paragraphs?

from qute-html5.

fbreuer avatar fbreuer commented on August 15, 2024

All of these issues should be fixed in the current HEAD version.

  • while in edit mode, paragraphs do not disappear when they become empty.
  • when an empty paragraph is switched to display mode, it is deleted.
  • Enter starts a new paragraph, Ctrl+Enter splits the current paragraph and Shift+Enter inserts a newline.
  • Ctrl+Bksp and Ctrl+Del join the current paragraph with the prev/next paragraph.

I am happy with the result so far. But the Ctrl+Bksp and Ctrl+Del bindings bother me. Any better idea?

from qute-html5.

fbreuer avatar fbreuer commented on August 15, 2024

I have changed the bindings. To join with the previous paragraph, got to the beginning of the current paragraph and hit backspace. To join with the next paragraph, to to the end of the current paragraph and hit del.

These bindings are simply more natural.

from qute-html5.

fbreuer avatar fbreuer commented on August 15, 2024

Peter,

Splitting paragraphs never works for me -- using the linux binaries on ubuntu 11.04.Maybe you could test this in a vm?

Does this mean that in Qute 0.2 on Linux pressing Ctrl+Enter does not insert a newline into the current paragraph?

from qute-html5.

fbreuer avatar fbreuer commented on August 15, 2024

Peter,

I have noticed in a VM that Firefox on Linux does not seem to handle the Ctrl+Enter keyboard event at all. Could you go to http://unixpapa.com/js/testkey.html in Firefox and see if the keyboard shortcut Ctrl+Enter produces any output (like Shift+Enter does)?

from qute-html5.

fbreuer avatar fbreuer commented on August 15, 2024

Peter,

(this is the last one ;)

I am uploading a beta version of Qute 0.3 for Linux. Could you please test all the issues we discussed, if you have time? Thanks!

from qute-html5.

pkra avatar pkra commented on August 15, 2024

Felix,
Just got my hands on 0.3beta

  • The good news: splitting paragraphs somewhat works. But there has to be an empty line (created by shift+enter) to do the split (by hitting enter).
  • So splitting by, say, moving to the end of a sentence and hitting enter does not work -- just gives a regular new paragraph below the current one
  • The bad news: doing this splitting in single window mode leads to qute dropping out of editiing mode -- and one has click to get back into a paragraph :(
  • Deleting/joining paragraphs works very nicely!

from qute-html5.

fbreuer avatar fbreuer commented on August 15, 2024

Peter,

I do not know if you read through all of the zillion comments I wrote, but:

  • Splitting at the current cursor position happens when you press Ctrl+Enter (in 0.3 beta).
  • However, I have the suspicion that the Ctrl+Enter shortcut does not work at all in Firefox on Linux. (It works fine on Windows.)
  • Could you please go to http://unixpapa.com/js/testkey.html with Firefox and test whether Ctrl+Enter is recognized by Firefox at all?

from qute-html5.

pkra avatar pkra commented on August 15, 2024

Hm... Strange. Today everything works as it should. I have no idea what I did differently yesterday. But who cares :)

from qute-html5.

pkra avatar pkra commented on August 15, 2024

Oh, and yes -- I get all your comments as emails and in my feed reader ;)

from qute-html5.

pkra avatar pkra commented on August 15, 2024

I have new woes... The following happens frequently

  • I'm rewriting a paragraph
  • I hit delete too much at the beginning of the paragraph
  • this joins it with the preceding one
  • quick reaction is to hit enter
  • I end up with a new paragraph
  • I have to painfully navigate back to the right place to make separate the paragraphs again

Could you think about changing this? I would suggest to make deleting paragraphs by ctrl+del/backspace

from qute-html5.

fbreuer avatar fbreuer commented on August 15, 2024

no, I don't think adding a keyboard shortcut for deleting entire paragraphs is a good idea, as long as there is no undo functionality (and there won't be undo functionality for the forseeable future).

however, I might consider swapping enter and ctrl+enter. that would solve the problem you are experiencing as well. and it might be more intuitive for many users anyway. what do you think?

from qute-html5.

pkra avatar pkra commented on August 15, 2024

Oh, sorry, my fault. I wrote badly. I didn't mean delete-paragraph option. I meant joining/splitting just as you understood ;)

Switching enter and ctrl+enter (which, incidentally in linux is shift+enter) would be fine.

Alternatively, you could make delete/backspace at pargraph end points more complicated as ctrl+del/backspace.

I don't really mind the focus on individual paragraphs.

from qute-html5.

pkra avatar pkra commented on August 15, 2024

Oh, and since when does ctrl+backspace join up paragraphs -- that's cool! But makes me want an undo funciton even more ;)

from qute-html5.

fbreuer avatar fbreuer commented on August 15, 2024

currently enter, shift+enter and ctrl+enter do three different things: enter opens a new, empty paragraph. ctrl+enter splits the current paragraph. shift+enter inserts a newline in the current paragraph, without splitting it.

I think swapping shift+enter and enter will do fine.

I tried the ctr+del/ctrl+backspace variant and was not happy with it. even to me the change in document structure appeared to be too unpredictable. plus ctrl+del and ctrl+backspace are default keybindings for deleting words in Firefox. I would like to keep that feature.

I definitely want to keep the focus on individual paragraphs. but the current del and backspace handling does not interfere with the individual paragraphs paradigm from my pov.

from qute-html5.

fbreuer avatar fbreuer commented on August 15, 2024

regarding the joining shortcuts: what do you think about ctrl+alt+up and ctrl+alt+down for joining?

from qute-html5.

pkra avatar pkra commented on August 15, 2024

Whatever you want to do. I just want to know if it's a bug or intentional ;)

Also, there's a lot of problems when selecting text. E.g., when I'm selecting and the cursor ends up at the beginning of the paragraph -- then backspace joins up with the paragraph before :( very irritating...

from qute-html5.

fbreuer avatar fbreuer commented on August 15, 2024

I think by now, the shortcuts work pretty well...

from qute-html5.

Related Issues (20)

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.