dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

Extract Vim cursor position into a plugin

Open LandonSchropp opened this issue 4 years ago • 0 comments

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

LandonSchropp avatar Mar 02 '20 03:03 LandonSchropp