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

ProTip: start vim with obsession #11

Open
sunaku opened this issue Sep 6, 2013 · 2 comments
Open

ProTip: start vim with obsession #11

sunaku opened this issue Sep 6, 2013 · 2 comments

Comments

@sunaku
Copy link

sunaku commented Sep 6, 2013

Hello,

I'd like to share the following sh(1) function that I wrote to "alias" vim so that it starts with obsession, unless there are any arguments provided to vim (in the case of editing a particular file). Just add it to your .profile or .bashrc or .zshrc to use it.

function vim() {
  if test $# -gt 0; then
    env vim "$@"
  elif test -f Session.vim; then
    env vim -S
  else
    env vim -c Obsession
  fi
}

Thanks so much for creating vim obsession! 💌

@dhruvasagar
Copy link

This is neat and I used it for a while, then I created a plugin for vim to do this instead and a little more to enable easy switching between vim sessions cleanly. Checkout https://github.com/dhruvasagar/vim-prosession

@lfv89
Copy link

lfv89 commented Sep 10, 2014

@sunaku This is exactly what I was looking for, thank you.

@sunaku sunaku changed the title pro tip: start vim with obsession ProTip: start vim with obsession Sep 10, 2014
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

No branches or pull requests

3 participants