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

Re: vim clientserver without gui, highlighting question, and showmode customization

Expand Messages
  • James Moss
    ... Not quite what I want, as you mentioned since that d be the status line. Perhaps I should ask about this a possible future feature on vim-dev? -James
    Message 1 of 7 , Jan 3, 2005
    • 0 Attachment
      Gary Johnson wrote:
      > On 2005-01-03, James Moss <moss@...> wrote:
      >
      >
      >>Can the results of showmode be customized much the way statusline can be
      >>manipulated? I was hoping to ditch the left justified --INSERT-- and go
      >>with a right justified Insert/Command with an asterisk next to it if the
      >>file had been modified, much the way some SVR4 vi's present the
      >>information and nvi presents the bottom line.
      >
      >
      > I don't see any way to customize the 'showmode' display, but you can
      > use the mode() function within a 'statusline' string to display the
      > current mode in the status line. Since you can evaluate an
      > expression within the 'statusline', including calling your own
      > function, you can translate the single-character return value of
      > mode() to whatever string you want.
      >
      > HTH,
      > Gary
      >

      Not quite what I want, as you mentioned since that'd be the status line.
      Perhaps I should ask about this a possible future feature on vim-dev?
      -James
    • Antony Scriven
      ... You can `:set stl= and use `:set ruler ls=0 and customize rulerformat . I also like the way nvi has the line,column info in the centre of the window.
      Message 2 of 7 , Jan 4, 2005
      • 0 Attachment
        James Moss wrote:

        > Gary Johnson wrote:
        >
        > > On 2005-01-03, James Moss <moss@...> wrote:
        > >
        > > > Can the results of showmode be customized much the
        > > > way statusline can be manipulated? I was hoping to
        > > > ditch the left justified --INSERT-- and go with a
        > > > right justified Insert/Command with an asterisk next
        > > > to it if the file had been modified, much the way
        > > > some SVR4 vi's present the information and nvi
        > > > presents the bottom line.
        > >
        > > I don't see any way to customize the 'showmode'
        > > display, but you can use the mode() function within a
        > > 'statusline' string to display the current mode in the
        > > status line. Since you can evaluate an expression
        > > within the 'statusline', including calling your own
        > > function, you can translate the single-character return
        > > value of mode() to whatever string you want.
        > > [...]
        >
        > Not quite what I want, as you mentioned since that'd be
        > the status line. Perhaps I should ask about this a
        > possible future feature on vim-dev?

        You can `:set stl=' and use `:set ruler ls=0' and customize
        'rulerformat'. I also like the way nvi has the line,column
        info in the centre of the window. Problem with this in vim
        is that vim doesn't make the full width of the screen
        available for messages. If a message runs into the ruler
        then you get a `Hit enter' prompt. Maybe there's an easy way
        to fix that?

        Antony
      • Bram Moolenaar
        ... It s below :help x11-clientserver : A non GUI Vim with access to the X11 display (|xterm-clipboard| enabled), can also act as a command server if a server
        Message 3 of 7 , Jan 4, 2005
        • 0 Attachment
          James Moss wrote:

          > Can a vim server be setup/used without a GUI choice compiled in? The
          > clientserver documents didn't specify though all the example refer to
          > gvim and I was kind of hoping that this would be possible from the
          > commandline.

          It's below ":help x11-clientserver":

          A non GUI Vim with access to the X11 display (|xterm-clipboard|
          enabled), can also act as a command server if a server name is
          explicitly given with the --servername argument.

          On Unix "vim" and "gvim" are actually the same program. You can also
          use the client-server functionality for the non-GUI version, but it
          doesn't start as a server by default, while the GUI version does. You
          need to start Vim with:

          vim --servername VIM [other arguments]

          > Also, pouring through the syntax files, I noticed that there's a c.vim
          > and an Operator group. I expected to see regex's to match +'s, -'s,
          > ='s, etc but this isn't the case. Is there any specific reason as to
          > why operators and other common items (brackets, parens, even ->, etc)
          > aren't highlighted by default?

          Highlighting single characters is hardly noticable. Also, it has not
          much function to highlight characters that are easily recognized
          already. It's better to highlight only the things that look better with
          highlighting.

          > Can the results of showmode be customized much the way statusline can be
          > manipulated? I was hoping to ditch the left justified --INSERT-- and go
          > with a right justified Insert/Command with an asterisk next to it if the
          > file had been modified, much the way some SVR4 vi's present the
          > information and nvi presents the bottom line.

          No, this is fixed. But, as others already mentioned, you can switch off
          'showmode' and put something in a custom statusline.

          --
          hundred-and-one symptoms of being an internet addict:
          221. Your wife melts your keyboard in the oven.

          /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
          /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
          \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
          \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
        • James Moss
          ... Thanks for the pointers on the other stuff ... I don t suppose this being a fixed/hardcoded and non-customizable item would change anytime in the future?
          Message 4 of 7 , Jan 5, 2005
          • 0 Attachment
            Bram Moolenaar wrote:
            > James Moss wrote:

            Thanks for the pointers on the other stuff

            >
            >
            >>Can the results of showmode be customized much the way statusline can be
            >>manipulated? I was hoping to ditch the left justified --INSERT-- and go
            >>with a right justified Insert/Command with an asterisk next to it if the
            >>file had been modified, much the way some SVR4 vi's present the
            >>information and nvi presents the bottom line.
            >
            >
            > No, this is fixed. But, as others already mentioned, you can switch off
            > 'showmode' and put something in a custom statusline.
            >

            I don't suppose this being a fixed/hardcoded and non-customizable item
            would change anytime in the future? I haven't looked through the code
            for this, but would you accept patches or would you rather people find a
            way to get along with what others have stated (no showmode/put something
            in a custom statusline)?
            -James
          • Bram Moolenaar
            ... I don t see a good reason to customize this. At least it will not be easy to implement, since redrawing the commandline is complicated. Also, we have so
            Message 5 of 7 , Jan 6, 2005
            • 0 Attachment
              James Moss wrote:

              > >>Can the results of showmode be customized much the way statusline can be
              > >>manipulated? I was hoping to ditch the left justified --INSERT-- and go
              > >>with a right justified Insert/Command with an asterisk next to it if the
              > >>file had been modified, much the way some SVR4 vi's present the
              > >>information and nvi presents the bottom line.
              > >
              > > No, this is fixed. But, as others already mentioned, you can switch off
              > > 'showmode' and put something in a custom statusline.
              >
              > I don't suppose this being a fixed/hardcoded and non-customizable item
              > would change anytime in the future? I haven't looked through the code
              > for this, but would you accept patches or would you rather people find a
              > way to get along with what others have stated (no showmode/put something
              > in a custom statusline)?

              I don't see a good reason to customize this. At least it will not be
              easy to implement, since redrawing the commandline is complicated.
              Also, we have so many options already... There must be many things with
              a higher priority.

              --
              Vi is clearly superior to emacs, since "vi" has only two characters
              (and two keystrokes), while "emacs" has five. (Randy C. Ford)

              /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
              /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
              \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
              \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
            Your message has been successfully submitted and would be delivered to recipients shortly.