Автоматический перенос строки

  • @Vio-Ru said,

    Thanks for the answer! It is necessary after pasting from the clipboard, that is, pasted from the clipboard and Notepad moved the cursor to a new line. The length of the text on the clipboard can be any

    If you want the newline after pasting from the clipboard, then the macro I showed should work for you.

    @PeterJones said,

    [original phrasing by @Vio-Ru]: вставил какой-либо текст
    [English version]: “Inserted some text”
    [Translated to Russian]: «Вставленный текст»
    [Translated back to English]: “Pasted text”

    Looking at the translation of my translation, apparently “pasted text” and “inserted some text” are closer in Russian than they are in English.

    I was misinterpreting the auto-English translation of “вставил какой-либо текст”, which was shown to me as “inserted some text”, as “inserted [by typing] some text”, rather than the “inserted [by pasting from the clipboard] some text” that was apparently meant. Sorry for the lingual confusion.

  • Thank you for answer! But your macros is not working ))
    Here are the screenshots, what I need

    alt text

    alt text

  • 12-03-2020 02-47-47.png

    12-03-2020 02-53-21.png

  • @Vio-Ru said in Автоматический перенос строки:

    But your macros is not working ))

    Apparently there was confusion (probably a language thing, still), because with the screenshots you showed, you are not using the macro. The macro doesn’t change the normal paste behavior – whether you use Edit > Paste, RightClick > Paste, or Ctrl+V. The macro is a separate command – in the Macro menu – which does both a paste and an enter.

    I will use pictures, in case my words don’t translate well for you.

    You have to use the macro to get the paste-then-enter behavior.

    If you want a keyboard shortcut, like maybe Ctrl+Shift+V, to be used for this paste+enter, you can use Macros > Modify Shortcut / Delete Macro
    Then (1) select PasteEnter, (2) Modify, (3) select keys – I checked Ctrl and Shift, and selected the V, for Ctrl+Shift+V as the keyboard shortcut, (4) OK, (5) CLOSE.
    After this, Ctrl+Shift+V (or whatever key sequence you choose) will run Macro > PasteEnter.

    But without running the PasteEnter macro, you cannot expect the new behavior.

    I hope this makes it clear.

  • Yes, it works like that. But I need it without additional taps, such as Macros or hot keys. I need to configure it once and then so that at each insert from the buffer the cursor jumps to the next line without using additional clicks.
    As I understand it, this behavior is impossible to implement.
    In any case, thank you for your time.

  • @Vio-Ru ,

    But I need it without additional taps, such as Macros or hot keys. I need to configure it once and then so that at each insert from the buffer the cursor jumps to the next line without using additional clicks.

    There are no additional clicks. There are different clicks. Instead of using Ctrl+V for paste, use whatever shortcut you assign to that macro. It’s really simple, and the same number of keystrokes.

    In fact, if you always want paste to be paste+enter, you can use shortcut mapper to remove Ctrl+V from normal Paste, and instead assign Ctrl+V to the PasetEnter macro

    Also, if you usually use RightClick > Paste to access the paste function from the context menu, you can also edit the context menu config to give you the option of RightClick > PasteEnter instead, an put it right next to the paste:

    1. Use Settings > Edit Popup ContextMenu
    2. Add <Item MenuEntryName="Macro" MenuItemName="PasteEnter"/> immediately after the <Item MenuEntryName="Edit" MenuItemName="Paste"/> line
    3. save, exit, and reload Notepad++
    4. Now your RightClick menu will show PasteEnter right after Paste. You can use RClick > PasteEnter anytime you would have used RClick > Paste, with exactly the same amount of effort from now on.

    So, to sum up:

    1. if you assign a keyboard shortcut to PasteEnter macro, you can use that anytime you would have used Ctrl+V, with exactly the same number of clicks as a normal Ctrl+V.
    2. if you assign the Ctrl+V keyboard shortcut to PasteEnter macro, you can use that every time you paste with Ctrl+V, because it will be using that macro instead of the normal just-paste functionality
    3. if you add the PasteEnter macro to the right click context menu, you can use that entry in the right click context menu exactly as easily as you can use the normal paste from the right click menu.

    There are many ways to make the Paste+Enter functionality identically-easy to use as the builtin paste functionality. I have shown three right here – including one that replaces Ctrl+V functionality with the new Paste+Enter with the same keystroke. There is no difference in difficulty of long-term use between using PasteEnter macro and using normal Paste – it can be done in the same number of keystrokes (1) or in the same right-click context menu; it’s exactly the same difficulty to use.

  • Thanks a lot, Peter! Everything turned out as I wanted :)

  • @Vio-Ru Добрый день. Мне нужно тоже самое. Я выполнил все действия описанные выше, но в меню Макросов не появился нужный , хотя он прописан в файле, но программа его не видит (( У вас были подобные проблемы?

  • @PeterJones Hello! I follow your instruction literaly … Step by step. But I can’t see PasteEnter in Macros menu! I try in 2 computers, but nothing… Please, help! !
    ![0_1615624589383_Screenshot_1.png](Uploading 100%)
    ![0_1615624617723_Screenshot_2.png](Uploading 100%)

  • @Gena-M said in Автоматический перенос строки:


    Sorry, your screenshots did not embed properly, so I cannot see what you showed.

    The procedure I described reliably works for me. So maybe you did something wrong or you missed a step.

    Please respond to the following questions/requests to help us help you:

    1. Please share those screenshots again – make sure they show up in the “preview” window in the forum – that will help us understand what you have and what you don’t have
    2. Please go to the ? menu and Debug Info entry, and copy/paste that information into your reply. This will tell us what version you are using and what directories we should expect files to be in
    3. Did you create the macro as described in the 6 steps in my first message? Please show us a screenshot of the Macro menu to show that PasteEnter macro was created and saved
    4. Did you correctly edit the Context Menu (including restarting Notepad++)?

    Hopefully, we can help you figure out which step went wrong.

Log in to reply