aboutsummaryrefslogtreecommitdiff
path: root/runtime/menu.vim
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:31:31 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:31:31 +0000
commit9243becbedbb6a1592208051f8fa2b090dcc5e7d (patch)
tree607c2a862ec3f4399b8766383f6f8e04c4aa43b4 /runtime/menu.vim
parent9e40b6e9e1bc67f2d856adb837ee64dd0e25b717 (diff)
parent3c48d3c83fc21dbc0841f9210f04bdb073d73cd1 (diff)
downloadrneovim-usermarks.tar.gz
rneovim-usermarks.tar.bz2
rneovim-usermarks.zip
Merge remote-tracking branch 'upstream/master' into usermarksusermarks
Diffstat (limited to 'runtime/menu.vim')
-rw-r--r--runtime/menu.vim35
1 files changed, 23 insertions, 12 deletions
diff --git a/runtime/menu.vim b/runtime/menu.vim
index 0a5ac36095..2671bb51cb 100644
--- a/runtime/menu.vim
+++ b/runtime/menu.vim
@@ -2,7 +2,7 @@
" You can also use this as a start for your own set of menus.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2020 Mar 29
+" Last Change: 2022 Nov 27
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
" in all modes and avoid side effects from mappings defined by the user.
@@ -89,6 +89,21 @@ an 9999.75 &Help.-sep2- <Nop>
an 9999.80 &Help.&Version :version<CR>
an 9999.90 &Help.&About :intro<CR>
+if exists(':tlmenu')
+ tlnoremenu 9999.10 &Help.&Overview<Tab><F1> <C-W>:help<CR>
+ tlnoremenu 9999.20 &Help.&User\ Manual <C-W>:help usr_toc<CR>
+ tlnoremenu 9999.30 &Help.&How-To\ Links <C-W>:help how-to<CR>
+ tlnoremenu <silent> 9999.40 &Help.&Find\.\.\. <C-W>:call <SID>Helpfind()<CR>
+ tlnoremenu 9999.45 &Help.-sep1- <Nop>
+ tlnoremenu 9999.50 &Help.&Credits <C-W>:help credits<CR>
+ tlnoremenu 9999.60 &Help.Co&pying <C-W>:help copying<CR>
+ tlnoremenu 9999.70 &Help.&Sponsor/Register <C-W>:help sponsor<CR>
+ tlnoremenu 9999.70 &Help.O&rphans <C-W>:help kcc<CR>
+ tlnoremenu 9999.75 &Help.-sep2- <Nop>
+ tlnoremenu 9999.80 &Help.&Version <C-W>:version<CR>
+ tlnoremenu 9999.90 &Help.&About <C-W>:intro<CR>
+endif
+
fun! s:Helpfind()
if !exists("g:menutrans_help_dialog")
let g:menutrans_help_dialog = "Enter a command or word to find help on:\n\nPrepend i_ for Input mode commands (e.g.: i_CTRL-X)\nPrepend c_ for command-line editing commands (e.g.: c_<Del>)\nPrepend ' for an option name (e.g.: 'shiftwidth')"
@@ -124,12 +139,7 @@ if has("diff")
an 10.420 &File.Split\ Patched\ &By\.\.\. :browse vert diffpatch<CR>
endif
-if has("printer")
- an 10.500 &File.-SEP3- <Nop>
- an 10.510 &File.&Print :hardcopy<CR>
- vunmenu &File.&Print
- vnoremenu &File.&Print :hardcopy<CR>
-elseif has("unix")
+if has("unix")
an 10.500 &File.-SEP3- <Nop>
an 10.510 &File.&Print :w !lpr<CR>
vunmenu &File.&Print
@@ -702,6 +712,11 @@ func s:BMCanAdd(name, num)
return 0
endif
+ " no name with control characters
+ if a:name =~ '[\x01-\x1f]'
+ return 0
+ endif
+
" no special buffer, such as terminal or popup
let buftype = getbufvar(a:num, '&buftype')
if buftype != '' && buftype != 'nofile' && buftype != 'nowrite'
@@ -1049,11 +1064,7 @@ if has("toolbar")
an <silent> 1.20 ToolBar.Save :if expand("%") == ""<Bar>browse confirm w<Bar>else<Bar>confirm w<Bar>endif<CR>
an 1.30 ToolBar.SaveAll :browse confirm wa<CR>
- if has("printer")
- an 1.40 ToolBar.Print :hardcopy<CR>
- vunmenu ToolBar.Print
- vnoremenu ToolBar.Print :hardcopy<CR>
- elseif has("unix")
+ if has("unix")
an 1.40 ToolBar.Print :w !lpr<CR>
vunmenu ToolBar.Print
vnoremenu ToolBar.Print :w !lpr<CR>