Custom autocomplete line beginning?

2. Help
2014-07-11
2014-07-15
  • Not sure if that is the right thing to ask.

    Curious if there is a native way or a plugin to auto complete list characters.

    I use NPP for editing Taskpaper files and it would be nice if I'm typing a list out, it would auto insert a dash beginning at the new line.

    thank you.

     
  • THEVENOT Guy
    THEVENOT Guy
    2014-07-12

    Hello jasper.p.jenkins,

    I think that inserting a dash, after a new line, is possible with a simple macro !

    To create the new macro, just, follow the method, below :

    • Start Notepad++

    • Open a new document ( CTRL + N )

    • Select, with the mouse, menu and sub-menu Macro - Start Recording

    • Press, one after another, on the three keys Enter, Dash, Space

    • Select, with the mouse, menu and sub-menu Macro - Stop Recording

    • Select menu and sub-menu Macro - Save Current Recorded Macro...

    • In the Shorcut dialog, type a name for this macro, for example Enter with Dash

    • Check the ALT key

    • Choose the key Enter, in the list

    • Click on the OK button to validate this new macro and shortcut

    Et voilà !

    From now on, after typing some text, in the current line, as soon as you press on the combination ALT + Enter, you'll move on the next line, after the two characters dash ( 0x2d ) and space ( 0x20 ) :-)


    NOTES :

    • The shortcuts CTRL +Enter, CTRL + ALT + Enter and CTRL + ALT + SHIFT + Enter are already used by N++

    • The shortcut SHIFT + Enter can NOT be affected ( In fact, it's still possible, but you need to directly modify the shorcuts.xml file, with an other editor, when N++ is not started )

    • The CTRL + SHIFT + Enter and ALT + SHIFT + Enter shortcuts seem, also, available, but you must verify that NO plugin, of your N++ configuration, uses them !


    IMPORTANT :

    If you want to use a shortcut with a key, from 0 to 9, of the numeric keypad, at the right of your keyboard, DO NOT use any combination ALT + Key and SHIFT + Key

    • The ALT key shortcut is used with the numeric keypad, by Windows, to write any character from its ANSI code ( For example : ALT + 0,2,0,1 write an É character, of the Windows-1252 code page )

    • The SHIFT + Key shorcut is used, by Windows, on the numeric keypad, as direction keys, Origin/End keys or PageUp/PageDown keys

    Hope that this solution will help you, somehow !

    Cheers,

    guy038

     
    Last edit: THEVENOT Guy 2014-07-12
  • thank you for the detailed post!