Skip to content

Extract Vim cursor position into a pluginΒ #659

@LandonSchropp

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. πŸ™‚

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