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

g:rocannon_open_action = vsplit #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

nicr9
Copy link

@nicr9 nicr9 commented Nov 1, 2015

Why?

I've been using Rocannon recently (I think it's pretty cool BTW) and I prefer when opening new windows (e.g., with :RT) that they open in vsplits. Given monitor aspect ratios these days and line length restrictions in most style guidelines, I think it just makes sense to have the option available.

Anyway, I found g:rocannon_open_action listed in the docs and tried changing it to vsplit. It didn't work straight away so I dug in to the code a bit and this is what I changed while I was getting it working.

What?

So there's a few things in here:

  • Updated comments and docs to mention that vsplits are an option too.
  • Added some basic validation on the action argument to rocannon#OpenAlternate().
  • Refactored act to open_action to make things a bit clearer (I don't mind taking this out, I just thought it was more explicit this way).
  • Fixed a bug: If you set g:rocannon_open_action = ... in your ~/.vimrc then act (renamed to open_action) never gets assigned in ftplugin/ansible.vim.

Obligatory GIF

@nicr9
Copy link
Author

nicr9 commented Apr 17, 2016

Hey @MicahElliott, have you had a chance to look at this?

Let me know if there's something you'd like me to change here.

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

Successfully merging this pull request may close these issues.

1 participant