Loading ...
Sorry, an error occurred while loading the content.

Re: Feature request: change settings using ncurses menus (TUI)

Expand Messages
  • Marko Mahnič
    ... A curses menu implementation is provided with this library: http://www.vim.org/scripts/script.php?script_id=2606 It requires Python with ncurses. If you
    Message 1 of 8 , Nov 4, 2009
    • 0 Attachment
      On Nov 3, 1:43 pm, Parker Jones <zoubi...@...> wrote:
      > Changing settings is something that I and perhaps many other users don't do often, so it's less familiar than other parts of vim.  It would be a great development if it were easier to change settings by having a curses menu driven interface (obviously without replacing the existing command line input).  

      A curses menu implementation is provided with this library:
      http://www.vim.org/scripts/script.php?script_id=2606

      It requires Python with ncurses. If you want to use the same menus
      and other extras in gvim, a patch for if_python is required.

      A newer (pre-release) version is also available at
      http://sourceforge.net/projects/vimuiex/
      http://vimuiex.sourceforge.net

      Marko
      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Tony Mechelynck
      ... I thought the OP _was_ referring to constructing a syntax script, which is indeed a kind of programming and would IMHO not benefit at all from a
      Message 2 of 8 , Nov 28, 2009
      • 0 Attachment
        On 04/11/09 08:40, Gary Johnson wrote:
        >
        > On 2009-11-04, James Vega wrote:
        >> On Tue, Nov 03, 2009 at 11:02:38PM -0800, Gary Johnson wrote:
        >>> On 2009-11-04, Parker Jones wrote:
        >>>> Recently, I wanted to change the syntax highlighting language, but even after
        >>>> spending 15 minutes reading the documentation I got fed up and gave up. It
        >>>> really shouldn't be that hard. A menu-driven interface could solve this by
        >>>> just letting the user pick out settings from a list and likewise choose from
        >>>> possible values.
        >>>
        >>> I don't see how a menu-driven interface will help with this.
        >>> Writing syntax highlighting rules is more akin to writing a program
        >>> than it is to choosing option settings.
        >>
        >> I think this is referring to changing the filetype for a buffer, not
        >> changing the syntax highlighting rules.
        >
        > OH. I see now. Thanks.
        >
        > If that's the case, then executing
        >
        > :set ft=<filetype>
        >
        > where the set of<filetype> values can be found from
        >
        > :!ls $VIMRUNTIME/syntax
        >
        > seems pretty simple to me. Yes, I realize that's not nearly as
        > clear and straightforward as selecting the file type from a menu,
        > but a user should very rarely need to select the file type manually;
        > Vim should almost always be able to determine the file type
        > automatically.
        >
        > If Vim is not able to determine the correct file type automatically,
        > the proper solution is to give it better guidance in the user's
        > ~/.vim/filetype.vim, not require the user to set the file type
        > manually every time he opens such a file.
        >
        > Regards,
        > Gary

        I thought the OP _was_ referring to constructing a syntax script, which
        is indeed a kind of programming and would IMHO not benefit at all from a
        menu-driven interface.

        However, if the matter is merely choosing among the existing "known"
        filetypes, then there _is_ a menu, however you must first enable it by
        using "Syntax => Show filetypes in menu". Then you get a menu for
        setting the 'syntax' option. Experiment shows that it also sets the
        filetype, e.g., after you've added the filetypes to the Syntax menu,
        clicking "Syntax => A => Aap" sets both 'filetype' and 'syntax' to "aap".

        In Console Vim, it is possible to use the same menus as in gvim,
        provided that your Console Vim is compiled with +menu. They look
        slightly different because of the differences between a text interface
        and a GUI; and they are at bottom rather than at top. See ":help
        console-menus" about how to enable them in your vimrc.

        I agree that automatic setting of filetypes is the Vim-like way to go.
        Some filetypes are so similar that user guidance (I mean, guidance
        _from_ the user _to_ filetype.vim) can help discriminate among them.
        This can be done either by means of global options, or of modelines,
        depending on the particular circumstances. For details, see:
        :help filetype.txt
        :help syntax.txt

        Best regards,
        Tony.
        --
        More than any time in history, mankind now faces a crossroads. One
        path leads to despair and utter hopelessness, the other to total
        extinction. Let us pray that we have the wisdom to choose correctly.
        -- Woody Allen

        --
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
      Your message has been successfully submitted and would be delivered to recipients shortly.