Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow additional commands in script.vim #13

Open
krisleech opened this issue Dec 7, 2013 · 9 comments
Open

Allow additional commands in script.vim #13

krisleech opened this issue Dec 7, 2013 · 9 comments
Assignees

Comments

@krisleech
Copy link

I have to issue a few more commands than are at the top of script.vim to remove things like colorcolumn and the status bar. I also need to issue nonumber twice (not sure why!).

Would you consider allowing an additional file to to included (passed via a command line arg) or if you think its generic enough we could add it to script.vim for everyone. I'm currently doing the below:

:bufdo :set nocursorline
:bufdo :set colorcolumn=
:bufdo :set nu!
:bufdo :set nu!
:set laststatus=0
:buffer 1

I think colorcolumn is an optional feature so it would need wrapping in an exists(+colorcolumn).

Thoughts?

@tybenz
Copy link
Owner

tybenz commented Dec 9, 2013

Yeah I've been thinking a lot about allowing users to add extra vimscript stuff to their presentations.

One of the presentations I'm working on right now has some "diagrams". I used the ASCII art stuff to generate a starting point, but then I tweaked it by hand to make it look a little cleaner.

I've been thinking about allowing the user to have a directory of slides that they can hand-create and will auto-replace the vimdeck-generated ones. Along with an additional script file that will be added onto presentation/script.vim

As far as your edits go, they look pretty basic. I wouldn't have any real objections to putting these in the default script.vim, especially if we allow the user to have overwrites.

@krisleech
Copy link
Author

Sounds like we have a similar usecase, I ended up working purely on the generated slides and removing presentation.md (and thus the VimDeck dependency). But I couldn't have got to that point without VimDeck because it creates the files with numbered suffixes. I also wrote a function which you to reveal hidden text/code on a slide which works really well.

Maybe what I could do is put up a git repo and we can see if we could build it in to VimDeck, if appropriate.

@tybenz
Copy link
Owner

tybenz commented Dec 10, 2013

Yeah. I'd love to check it out. Let me know when it's up!

One thing vimdeck does well is the open command. Lately, I've been doing the same and editing the generated slides by hand, but if you keep everything in the presentation directory, you can still use vimdeck open and it will perform the vim presentation/*.md -S presentation/script.vim for you. It's just a convenience thing.

The problem comes when you need to edit the text of an ascii header or prefer to keep slides.md up-to-date. There needs to be a hybrid between editing the main file, and tweaking the text/behavior of the outputted presentation.

@krisleech
Copy link
Author

https://github.com/krisleech/wisper-presentation

You can see the ideas in the above repo. For syntax highlighting I'm using markers:

@begin=ruby@
puts 'codez 1'
@end=ruby@

@begin=ruby@
puts 'codez 2'
@end=ruby@
:bufdo :call SyntaxRange#Include('@begin=ruby@', '@end=ruby@', 'ruby', 'NonText')

Its a bit ad-hoc at the moment, I'll probably tidy it up to be more generic at some point.

@tybenz
Copy link
Owner

tybenz commented Feb 24, 2014

That's awesome. I didn't even realize SyntaxRange could do markers like that. Might be a useful refactor for vimdeck.

Here's an example of one of my presentations: http://github.com/tybenz/presentation-js-legos

I just run ./go.sh (see here) and it works! Replaces vimdeck's generated ascii art with some of my own and prepends commands to script.vim.

@tybenz tybenz self-assigned this Jul 28, 2014
@sloria
Copy link

sloria commented Dec 5, 2014

+1 for allowing for extra vimscript. Would be great to be able to change colorscheme and modify plugin settings for presentations.

@aswna
Copy link

aswna commented Sep 19, 2017

Some more ideas here: https://github.com/aswna/vimdeck-show

@tybenz
Copy link
Owner

tybenz commented Sep 19, 2017

@aswna this is awesome! well done! do you have an example presentation made/given using vimdeck-show?

@aswna
Copy link

aswna commented Sep 20, 2017

@tybenz sure! Here: https://github.com/aswna/GNU-Linux-Tools-sessions
(Session 02 is more complete, since contains custom script.vim in its folder.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants