Skip to content

Extract Vim cursor position into a plugin #659

Description

@LandonSchropp

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. 🙂

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions