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

Extract Vim cursor position into a plugin #659

Open
LandonSchropp opened this issue Mar 2, 2020 · 0 comments
Open

Extract Vim cursor position into a plugin #659

LandonSchropp opened this issue Mar 2, 2020 · 0 comments

Comments

@LandonSchropp
Copy link

I really love this chunk of the Thoughtbot .vimrc:

  " When editing a file, always jump to the last known cursor position.
  " Don't do it for commit messages, when the position is invalid, or when
  " inside an event handler (happens when dropping a file on gvim).
  autocmd BufReadPost *
    \ if &ft != 'gitcommit' && line("'\"") > 0 && line("'\"") <= line("$") |
    \   exe "normal g`\"" |
    \ endif

However, I don't personally use the Thoughtbot dotfiles as a base anymore. I would love if you guys could extract this into its own plugin repository, and include it using something like vim-plug. I'd be willing to do the legwork on the repo if you guys want to host it under thoughtbot, or host it under my own name if you didn't. 🙂

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

1 participant