Menu

#761 Ctrl-E insertion of environment: Unreliable behaviour

None
closed
nobody
None
1
2014-08-27
2014-08-27
Anonymous
No

When pressing Ctrl-E, an environment block is inserted. Within roughly the first 0.5-1 seconds the environment name is NOT highlighted as a placeholder. Starting to type an environment name within this time will cause the \end{NAME} tag not to be updated, and thus typing quickly "Ctrl-E itemize" would result in

\begin{itemize}
    content 
\end{environment-name}

Apparently the same code is used for changing the environment name here that is used for changing environment types later and introduces this delay.

When using autocompletion of \begin instead, the environment name is instantly recognized as a placeholder however. Changing Ctrl-E to use the same insertion method would likely resolve the issue.

Discussion

  • Jan  Sundermeyer

    Jan Sundermeyer - 2014-08-27

    the automatic geenration of a mirror cursor occurs if the cursors stays some time on the environment name.

    This is intended behaviour.

    if you know that you want to place a different environment, why don't you use env-completion ?

    Type: "it" and complete with ctrl+alt+space ...

     
    • Klaus

      Klaus - 2014-08-27

      While the behaviour makes sense for changing the name of a previously existing environment, the delay doesn't make sense for a command inserting a new environment with a place-holder name, since it causes an unnatural pause during writing.

      Alternative methods work of course (my preferred one begin autocompletion on \begin. Ctrl-E would be more convenient though.

       
  • Jan  Sundermeyer

    Jan Sundermeyer - 2014-08-27

    Ticket moved from /p/texstudio/bugs/1078/

     
  • Tim Hoffmann

    Tim Hoffmann - 2014-08-27

    fixed: hg 4666 (0f220c90ba24)

     
  • Tim Hoffmann

    Tim Hoffmann - 2014-08-27
    • status: open --> closed
    • Group: -->
     

Anonymous
Anonymous

Add attachments
Cancel