Saturday, February 15, 2014

Re: add menus or buttons to menu bar or tool bar, where is a how-to?

On 16/02/14 01:17, Lew_Rockwell_fan wrote:
> I feel sure there must be a how-to on this somewhere but I'm not finding it.
> The vim related documentation on the web is a HUGE haystack.

The right place to look for Vim documentation is the inline help. It is
still a huge haystack though. To help you search that, see
:help
:help help
:help helphelp
:help :helpgrep

>
> Ideally, I'd like to define buttons and menus, indicated by text, not icons,
> and put them both on the menu bar and delete the tool bar. If that's not
> possible my second choice is to edit the toolbar, removing most of what's on
> there and putting on a user-defined button or two. It would be nice to be
> able to edit the menus too. Or some of what I want to do could alternately
> be accomplished by defining key bindings. Most immediately, I want to make
> cntrl-w toggle wrap like it does in cream. If I could also put that function
> in a button that would be very nice. If I could put the button on the menu
> bar instead of the tool bar and delete the tool bar that would be very, very
> nice indeed.

To hide (i.e. avoid displaying) the toolbar:
:help 'guioptions'
:help go-T
To add menu items:
:help creating-menus

Beware of changing the function of already defined hotkeys: Ctrl+W
already has very useful but different functions in both Normal and
Insert modes, see
:help CTRL-W
:help i_CTRL-W

If I wanted to toggle wrap by means of a single key, I would use one of
the F keys, most of which are unassigned by out-of-the-box Vim: either
:map <F12> :set invwrap<CR>
:imap <F12> <C-O>:set invwrap<CR>
or
:map <F12> :set wrap<CR>
:map <S-F12> :set nowrap<CR>
:imap <F12> <C-O>:set wrap<CR>
:imap <S-F12> <C-O>:set nowrap<CR>

You could also add similar commands to the menubar, either as a menuitem
in one of the existing menus, or (if you want to define many such new
menus) as part of a new menu of your own. Again, that is all described
under :help creating-menus

>
> If anyone could point me toward something simple and step-by-step explicit
> on any part of what I'm looking for I would appreciate it.
>
> I'm a gedit-refugee, new to the vi family of editors. I finally got tired of
> waiting for the gedit devs to fix the line-numbering-with-large-fonts bug so
> I looked around. X2's color scheme sucks and isn't editable. Several
> otherwise good editors don't so syntactic color coding. Cream is pretty
> nice, and I love the toggle-wrap and intelligent indentation anticipation,
> but it takes a loooooong time to start. So right now I'm focusing on evim.
> Any suggestions would be appreciated. Thanks for reading.

IMHO that so-called Easy Vim is a little bit too easy compared with
"real" Vim. Maybe the way kindergarten is easy compared to high school
senior year. So I would advise you to graduate out of it as soon as you
can. Try running vimtutor if you haven't yet, IMHO that's a pretty good
hands-on tutorial to using Vim, a tutorial which doesn't eschew serious
features.

DISCLAIMER: All the latter paragraph is just my personal opinion; other
people may think differently.

Best regards,
Tony.
--
"It is not hardness of heart or evil passions that drive certain
individuals to atheism, but rather a scrupulous intellectual honesty."
[Steve Allen, quoted in "2000 Years of Disbelief,
Famous People with the Courage to Doubt", by
James A. Haught, Prometheus Books, 1996]


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: