Jump to content

/code* command behavior


Recommended Posts

I must have a flaky installation….

Can anyone confirm if they see this behavior:

  1. If I have some text in a note that needs to go into a code block, I just select that text and go to the blue "+" menu, select "code  block" and then the text is in the code block.
  2. If, however, I select the text and invoke /codeblock (via the slash commad), the code block appears but without the text, the text is deleted.

If so, that would be again an inconsistent behavior (I know it can solved by a workaround: pressing CTRL-C before invoking /codeblock) that prevents developing habits and  -- once again -- reduces productivity. So I would report it, if someone can confirm. I am on Windows V10.82.2.

Link to comment
47 minutes ago, Razmataz said:

I must have a flaky installation….

Can anyone confirm if they see this behavior:

  1. If I have some text in a note that needs to go into a code block, I just select that text and go to the blue "+" menu, select "code  block" and then the text is in the code block.
  2. If, however, I select the text and invoke /codeblock (via the slash commad), the code block appears but without the text, the text is deleted.

If so, that would be again an inconsistent behavior (I know it can solved by a workaround: pressing CTRL-C before invoking /codeblock) that prevents developing habits and  -- once again -- reduces productivity. So I would report it, if someone can confirm. I am on Windows V10.82.2.

Same here. Generally when you select some text and hit "/", the text disappears.

About developing habits: Don't think Evernote development team is using Evernote in their daily life, and therefore not really aware of habits and routines users are having.

Link to comment

I'm not really sure the / was intended to be used like that. If you slect text and hit any key the text is replaced by that key. This default Windows behaviour kicks in before the menu appears. If you are going to select some text and turn it into a code box I guess you will either have to use the insert menu or even better the keyboard shortcut (ctrl+shift+L)

  • Like 1
Link to comment
8 minutes ago, Mike P said:

 If you slect text and hit any key the text is replaced by that key.

Really, like with CTRL-C (to copy)? The text is not replaced.

Text is replaced by a new character. But not if you press a command: I just pressed CTRL-B while "command" was selected. It didn't get replaced, it became bold.

Link to comment
1 hour ago, ErnstM said:

No problem here with Evernote 10.81.4 on macOS.

But that means that MAC and PC behave differently. That's not good either. I thought the whole Electron business is about avoiding that.

Link to comment
9 minutes ago, Razmataz said:

Really, like with CTRL-C (to copy)? The text is not replaced.

Text is replaced by a new character. But not if you press a command: I just pressed CTRL-B while "command" was selected. It didn't get replaced, it became bold.

We are not talking about typing a command. I don't think Windows can possibly know that / is a command in EN. If you select text and press any of the "autoformatting" combinations in EN they will delete the text.

The same happens if you highlight text to make it into a link. Ctrl+k or the insert menu or the tool bar icon adds the text to the "text" section of the link menu. Typing / deletes the text.

Link to comment

But the text is somewhere, otherwise we couldn’t get it back with CTRL-Z. So Evernote, knowing that / is a command (if one of the options from the menu are taken) could easily restore the text and put it into the right place. 

I think they simply didn’t think about it. It is not such a big deal, I agree, but you cannot defend every design problem with “it’s not Evernotes fault”. They need to think about a coherent UI. 

I give you another example: when assigning tags and typing a few characters from a tag, once enough has been typed that the tag is now unique, you can simply press return to get that tag. This is good and convenient and provides for rapid tag assignment.

But when you want to move the note into another notebook, and use the shortcut to pop up the possible notebooks, and start to type a notebook name, even if you have typed enough to uniquely identify the notebook, you cannot simply press return, because nothing happens then. You’ve got to go to the single entry left (using the keyboard or the mouse) to select it, and *then* you can press return. 

So assigning a notebook is different from assigning a tag. 

Now be my guest to explain, why this is a good UI design. 

With these inconsistencies it is impossible to develop habits that let you do rapid entries. And productivity is about those habits.

YMMV. 

Link to comment
35 minutes ago, Razmataz said:

But that means that MAC and PC behave differently. That's not good either. I thought the whole Electron business is about avoiding that.

I'm not sure what Ernst meant by "No problem here with Evernote 10.81.4 on macOS" -- MacOS does the same thing: when I select text and press '/', the text is replaced with a '/' key and then the slash commands popup up.

I think they *could* intercept the slash and only popup the slash commands when you have selected text, but how would they know you wanted to encapsulate the text with a code block and you actually did not want to replace the text with a slash?

The way the slash command is handled in this case in Evernote is the same way that both (for example) UpNote and Obsidian handle the slash command.

Link to comment
12 minutes ago, Boot17 said:.

I think they *could* intercept the slash and only popup the slash commands when you have selected text, but how would they know you wanted to encapsulate the text with a code block and you actually did not want to replace the text with a slash?

Once one of the entries of the drop-down slash menu is selected, it is a command. 

Link to comment

So then if I have text selected and I press '/', you suggest to not replace the text with the '/' character just yet, but wait to see what the user will do with the slash commands first?

If I press Esc to dismiss the commands then we replace the selected text with the '/' character, but if I type 'c' (because I'm going to type 'cod' to get the 'code block' command filtered, I'm not going to use the mouse to click on it) then... what happens with the 'c' character as far as showing in the note? Nothing because it's still in the menu of slash commands and we haven't determined yet if I'm going to do a command or not?

 

Link to comment

No. I am just saying that if it is a command, bring back the text.

But I understand that this is asking for too much. A developer would have to spend perhaps even two hours on it and that time is better spent on other bugs.

I stand by my story that a command should behave the same regardless how it was invoked.

I rest my case with regards of the "/" command. But not with regards of the selection of Notebooks (see above). In particular that I realize now that the list invoked by the CTRL-Q command does in fact behave like the tags (enough to press ENTER, no need to select).

Link to comment

I think part of the problem is a poor decision (in my opinion) to use / as the "command". If they had used ctrl+/ (I know that is already in use - see below) they would have much more flexibility. We also wouldn't get an unwanted, distracting menu pop up everytime we type / and actaully want the / character.

If I use ctrl+/ to open the keyboard shortcuts list when my focus is on the note list, the keyboard shortcut list opens and my focus is moved to the search at the top of the shortcuts. Perfect.

If I use ctrl+/ when I am editing a note both the keyboard shortcuts list and the insert menu open and my focus is left in the text. A pain.

11 hours ago, Razmataz said:

With these inconsistencies it is impossible to develop habits that let you do rapid entries. And productivity is about those habits.

I completely agree that we should have consistency, although by comparison with other auto formatting I don't believe this is a good example of inconsitency. The different behaviour of notebooks and tags, which you describe, is a much better one.

 

 

  • Like 2
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...