All Projects → farmergreg → Vim Lastplace

farmergreg / Vim Lastplace

Licence: mit
Intelligently reopen files at your last edit position in Vim.

Projects that are alternatives of or similar to Vim Lastplace

Vlc Bittorrent
A bittorrent plugin for VLC.
Stars: ✭ 198 (-26.94%)
Mutual labels:  plugin, ubuntu, debian
MisakaLinuxToolbox
御坂妹妹们的Linux VPS工具箱
Stars: ✭ 237 (-12.55%)
Mutual labels:  debian, ubuntu
ansible-role-containerized-wordpress
Deploy & run Docker Compose project for WordPress instance with Let's Encrypt HTTPS encryption
Stars: ✭ 15 (-94.46%)
Mutual labels:  debian, ubuntu
Polybar Themes
A huge collection of polybar themes with different styles, colors and variants.
Stars: ✭ 3,687 (+1260.52%)
Mutual labels:  ubuntu, debian
Howtopopbuntu
Tweaks for Debian & Ubuntu based Distro.
Stars: ✭ 267 (-1.48%)
Mutual labels:  ubuntu, debian
ansible-ssh-keys
Ansible role to manage ssh keys in Debian-like systems
Stars: ✭ 26 (-90.41%)
Mutual labels:  debian, ubuntu
ufw-docker-automated
Manage docker containers firewall with UFW!
Stars: ✭ 114 (-57.93%)
Mutual labels:  debian, ubuntu
sublime-patcher
Bash script for patching/cracking Sublime Text on Linux
Stars: ✭ 20 (-92.62%)
Mutual labels:  debian, ubuntu
ansible-role-daemonize
Ansible Role - Daemonize.
Stars: ✭ 14 (-94.83%)
Mutual labels:  debian, ubuntu
darknet.py
darknet.py is a network application with no dependencies other than Python and Tor, useful to anonymize the traffic of linux servers and workstations.
Stars: ✭ 71 (-73.8%)
Mutual labels:  debian, ubuntu
airgeddon deb packages
Useful related to airgeddon packages for Debian based Linux distributions
Stars: ✭ 22 (-91.88%)
Mutual labels:  debian, ubuntu
dist-detect
Try to determine what Linux/Unix distribution is running on a remote host and get a hint if security updates are applied.
Stars: ✭ 14 (-94.83%)
Mutual labels:  debian, ubuntu
dawgmon
dawg the hallway monitor - monitor operating system changes and analyze introduced attack surface when installing software
Stars: ✭ 52 (-80.81%)
Mutual labels:  debian, ubuntu
8821au-20210708
Linux Driver for USB WiFi Adapters that are based on the RTL8811AU and RTL8821AU Chipsets - v5.12.5.2
Stars: ✭ 40 (-85.24%)
Mutual labels:  debian, ubuntu
pacstall-programs
Pacstall's official program repository
Stars: ✭ 63 (-76.75%)
Mutual labels:  debian, ubuntu
docker-debian-releases
Creates docker images of historic Debian-based distribution releases
Stars: ✭ 19 (-92.99%)
Mutual labels:  debian, ubuntu
notion-linux
Native Notion packages for Linux
Stars: ✭ 887 (+227.31%)
Mutual labels:  debian, ubuntu
ansible-dnsmasq
Ansible role to set up Dnsmasq in Debian-like systems
Stars: ✭ 18 (-93.36%)
Mutual labels:  debian, ubuntu
InstallOS
Network reinstallation of the Linux system.
Stars: ✭ 34 (-87.45%)
Mutual labels:  debian, ubuntu
ISPC-PHPCompiler
Compile and manage multiple PHP versions easily!
Stars: ✭ 35 (-87.08%)
Mutual labels:  debian, ubuntu

vim-lastplace v3.2.1

Intelligently reopen files at your last edit position. By default git, svn, and mercurial commit messages are ignored because you probably want to type a new message and not re-edit the previous one.

Advantages

Advantages over the snippets that can be found around the net include:

  • Commit messages automatically start at the beginning of a file. This is important because many version control systems re-use the same file for commit message editing.
  • Maximizes Available Context
    • Center the cursor vertically after restoring last edit position.
    • Keep as much of the file on screen as possible when last edit position is at the end of the file.
  • Opens folds if the last edit position is inside a fold.
  • Works properly with new file templates and scripts that jump to a specific line in them.

Installation

You can use pathogen.vim or other plugin managers to install and use vim-lastplace.

cd ~/.vim/bundle
git clone git://github.com/farmergreg/vim-lastplace.git

Depending on which Vim package you're using, Vim may be preconfigured with last-edit-position logic that doesn't work quite as well as vim-lastplace. If so, you may want to disable that in favor of vim-lastplace. For example, for Vim as packaged with Git for Windows, you can edit C:\Program Files\Git\etc\vimrc and comment out the "Remember positions in files" autocmd BufReadPost * block.

Configuration

You can configure what file types to ignore by setting g:lastplace_ignore in your vimrc. This is a comma separated list. By default it is set to:

    let g:lastplace_ignore = "gitcommit,gitrebase,svn,hgcommit"

You can configure buffer types to ignore by setting g:lastplace_ignore_buftype in your vimrc. This is a comma separated list. By default it is set to:

    let g:lastplace_ignore_buftype = "quickfix,nofile,help"

Closed folds are automatically opened when jumping to the last edit position. If you do not like this behavior you can disable it by putting this in your vimrc:

    let g:lastplace_open_folds = 0

Miscellaneous

This plugin is complete and stable. Please do not be afraid to try it even if there is very little recent activity in this repository. If you do find a bug, please submit a pull request that fixes whatever problem you're having.

Version History

vim-lastplace uses semver to manage version numbers.

3.2.1

  • Re-center screen when opening folds
  • Documentation fixes and updates

3.1.1

  • Add 'nofile' and 'help' to lastplace_ignore_buftype. (Issue #14)
  • Do not jump when a new file is created (Issue #15, #16)

3.1.0

  • Add g:lastplace_ignore_buftype setting.
  • Update github links from username dietsche to farmergreg.

3.0.4

  • Add g:lastplace_open_folds option.

3.0.3

  • Point release for Debian packaging. Changes all http links to https. No code changes.

3.0.2

  • A fix for files that are smaller than the current screen size (issue #8)

3.0.1

  • A fix for files with modelines.

3.0.0

  • Open folds if the last edited area is inside a closed fold.

2.0.1

  • Add gitrebase filetype to the ignore list.

2.0.0

  • Center the screen when restoring the cursor position.
  • When at the end of a file, keep as much of it on screen as possible.

1.0.0

  • Initial version.

About

Get the latest version, submit pull requests, and file bug reports on GitHub:

If you like this plugin, please star and rate it on these sites:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].