Vertical code alignment + a little Punto

    Greetings. Talk about vertical alignment of the code?

    So, inspired by a recent article, I realized how to. Fully automatic alignment + syntax parsing is certainly a convenient thing, but no. And I had an idea. We simply let the programmer determine in each specific case by what symbols and in what places the code should be aligned.

    This works in any editor and with any text. Something like this: You



    can immediately pick up the application here: sourceforge.net/projects/tnice/files
    (select the text, press Ctrl + Shift + D, write alignment characters, press Ctrl + Enter)
    A detailed manual and the principle of operation under the cut.

    Why a little Punto?

    I have long had the idea of ​​abandoning crafts under the name Punto Switcher. He uses global hooks (and this is a big responsibility), I do not trust him, because He climbs himself to check for updates, although the jackdaws are not worth it. Repeatedly ran into the errors that led Punto. Therefore, the most important function: converting the layout - I brought to this software. Also, the function of converting the caps + translation of the text into transliteration (just in case: D) got into it. And of course, the killer feature is vertical alignment of the code.

    But what about without hooks?

    In general, software works like this. When a hotkey software happens, it does the following:
    1. Backups the current text on the clipboard
    2. Cleans the clipboard
    3. Emulates pressing Ctrl + C
    4. Waits for the text to appear on the clipboard (constantly checking it through GetClipboardSequenceNumber every 10ms, and so on for one seconds)
    5. As soon as the text appears - it either immediately converts or starts the editor
    6. In case of successful editing - puts the new text into the clipboard
    7. Emulates a user presses Ctrl + V
    8. Waits for half a second and restores the old clipboard. If at any stage after the second - something goes wrong, it still restores the text on the clipboard.

    How to use.

    After launch, there will be a tray icon. Clicking on the icon will expand the settings window:



    In it, on the left, hotkeys for all functions. In the screenshot, the first hotkey is 'Shift +' Actually there should be Pause | Break there, but the default Windows control for some reason does not display it. Green checkmarks indicate that the hotkey has been successfully installed. Right options for the vertical alignment window. Generally intuitive interface ^ _ ^.

    The main user case - select a piece of text, click hotkey. The conversion will take place immediately, but the editor will be launched to align the code:



    In it, on the right side on each line we write the substrings by which we will be aligned. When everyone has written, press Ctrl + Enter and editing will be completed (or Esc to cancel editing).

    What's next.

    Need to refine the manuals and description on sourceforge. Add autoload daw. I would like to add sound when converting text (like Punto).

    The project is open, the license will be GNU.

    Now you know how I spent last Sunday.

    Sourceforge TNice .

    upd. 07/15/2014
    Fixed errors when converting the language.
    Fixed error when converting translite found by comrade cmepthuk
    Waiting for a buffer now through GetClipboardSequenceNumber.
    Restoring the focus of the original window when editing is canceled.

    upd. 07/21/2014
    Fixed layout conversion bug

    Also popular now: