Gvim save session dialog

24 views
Skip to first unread message

av

unread,
Apr 21, 2015, 7:25:24 AM4/21/15
to vim...@googlegroups.com
Hi,

I would like to know what is the command in gvim to popup the save or load session dialog that is available from the gvim toolbar.

Thank you,

Alexandre

Jürgen Krämer

unread,
Apr 21, 2015, 7:38:54 AM4/21/15
to vim...@googlegroups.com

Hi,

av schrieb am 21.04.2015 um 13:25:
>
> I would like to know what is the command in gvim to popup the save or
> load session dialog that is available from the gvim toolbar.

take a look at the output of

:menu ToolBar

Somewhere in this output you will see something like

220 LoadSesn
n*s :call <SNR>25_LoadVimSesn()<CR>
v*s <C-C>:call <SNR>25_LoadVimSesn()<CR><C-\><C-G>
s*s <C-C>:call <SNR>25_LoadVimSesn()<CR><C-\><C-G>
o*s <C-C>:call <SNR>25_LoadVimSesn()<CR><C-\><C-G>
230 SaveSesn
n*s :call <SNR>25_SaveVimSesn()<CR>
v*s <C-C>:call <SNR>25_SaveVimSesn()<CR><C-\><C-G>
s*s <C-C>:call <SNR>25_SaveVimSesn()<CR><C-\><C-G>
o*s <C-C>:call <SNR>25_SaveVimSesn()<CR><C-\><C-G>

(The numbers you see might be different.) Then issue the following
commands:

:function <SNR>25_LoadVimSesn
:function <SNR>25_SaveVimSesn

This will show you how these function were declared. At the end, those
functions are wrappers around

browse source <some_session_file_name>

and

browse mksession! <some_session_file_name_as_default>

Regards,
Jürgen

--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)

alexandre viau

unread,
Apr 21, 2015, 7:51:17 AM4/21/15
to vim...@googlegroups.com
Hi Jürgen,

Thanks it works! I will add a mapping to replace the toolbar.

Best regards / Bien cordialement

Alexandre



--
--
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 a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/Y5IBCGp1X70/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

av

unread,
Apr 24, 2015, 8:22:47 AM4/24/15
to vim...@googlegroups.com
I solved the issue by associating the .vim files to a batch file containing:

start c:\vim\vim74\gvim.exe -S %1

Reply all
Reply to author
Forward
0 new messages